mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
More map balance / Fixed 'oh no' on 5x5+ block destruction
This commit is contained in:
parent
110def97d9
commit
1e111d29d9
Binary file not shown.
@ -542,8 +542,8 @@ public class Zones implements ContentList{
|
|||||||
.drops(ItemStack.with(Items.copper, 2000, Items.lead, 1500, Items.silicon, 1000, Items.graphite, 1000, Items.thorium, 200, Items.titanium, 2000, Items.metaglass, 1000))
|
.drops(ItemStack.with(Items.copper, 2000, Items.lead, 1500, Items.silicon, 1000, Items.graphite, 1000, Items.thorium, 200, Items.titanium, 2000, Items.metaglass, 1000))
|
||||||
.decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
|
.decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01))){{
|
||||||
loadout = Loadouts.basicNucleus;
|
loadout = Loadouts.basicNucleus;
|
||||||
baseLaunchCost = ItemStack.with(Items.copper, 500, Items.lead, 500, Items.silicon, 200, Items.metaglass, 100);
|
baseLaunchCost = ItemStack.with(Items.copper, 500, Items.silicon, 200, Items.metaglass, 100);
|
||||||
startingItems = ItemStack.list(Items.copper, 2500, Items.lead, 1500, Items.silicon, 800, Items.metaglass, 400);
|
startingItems = ItemStack.list(Items.copper, 2500, Items.lead, 3000, Items.silicon, 800, Items.metaglass, 400);
|
||||||
itemRequirements = ItemStack.with(Items.copper, 10000, Items.titanium, 8000, Items.metaglass, 6000, Items.plastanium, 2000);
|
itemRequirements = ItemStack.with(Items.copper, 10000, Items.titanium, 8000, Items.metaglass, 6000, Items.plastanium, 2000);
|
||||||
conditionWave = 30;
|
conditionWave = 30;
|
||||||
launchPeriod = 15;
|
launchPeriod = 15;
|
||||||
|
@ -11,27 +11,24 @@ public class RubbleDecal extends Decal{
|
|||||||
private static final TextureRegion[][] regions = new TextureRegion[16][0];
|
private static final TextureRegion[][] regions = new TextureRegion[16][0];
|
||||||
private TextureRegion region;
|
private TextureRegion region;
|
||||||
|
|
||||||
/**
|
/**Creates a rubble effect at a position. Provide a block size to use.*/
|
||||||
* Creates a rubble effect at a position. Provide a block size to use.
|
|
||||||
*/
|
|
||||||
public static void create(float x, float y, int size){
|
public static void create(float x, float y, int size){
|
||||||
if(headless) return;
|
if(headless) return;
|
||||||
|
|
||||||
if(regions[size].length == 0){
|
if(regions[size].length == 0){
|
||||||
int i = 0;
|
regions[size] = new TextureRegion[2];
|
||||||
for(; i < 2; i++){
|
for(int j = 0; j < 2; j++){
|
||||||
if(!Core.atlas.has("rubble-" + size + "-" + i)){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
regions[size] = new TextureRegion[i + 1];
|
|
||||||
for(int j = 0; j <= i; j++){
|
|
||||||
regions[size][j] = Core.atlas.find("rubble-" + size + "-" + j);
|
regions[size][j] = Core.atlas.find("rubble-" + size + "-" + j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RubbleDecal decal = new RubbleDecal();
|
RubbleDecal decal = new RubbleDecal();
|
||||||
decal.region = regions[size][Mathf.clamp(Mathf.randomSeed(decal.id, 0, 1), 0, regions[size].length - 1)];
|
decal.region = regions[size][Mathf.clamp(Mathf.randomSeed(decal.id, 0, 1), 0, regions[size].length - 1)];
|
||||||
|
|
||||||
|
if(!Core.atlas.isFound(decal.region)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
decal.set(x, y);
|
decal.set(x, y);
|
||||||
decal.add();
|
decal.add();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user