Impact map balance / Block balance / Editor block sorting

This commit is contained in:
Anuken 2019-03-03 19:54:20 -05:00
parent 9e960d461b
commit 21f3a053ed
5 changed files with 15 additions and 8 deletions

Binary file not shown.

View File

@ -450,7 +450,7 @@ public class Blocks implements ContentList{
Items.titanium, 2
);
hasPower = true;
filterTime = 30f;
filterTime = 35f;
spinnerLength = 1.5f;
spinnerRadius = 3.5f;
spinnerThickness = 1.5f;
@ -458,7 +458,7 @@ public class Blocks implements ContentList{
size = 2;
consumes.power(1f);
consumes.liquid(Liquids.slag, 0.09f);
consumes.liquid(Liquids.slag, 0.07f);
}};
cultivator = new Cultivator("cultivator"){{

View File

@ -361,11 +361,11 @@ public class Zones implements ContentList{
).drops(ItemStack.with(Items.copper, 2000, Items.lead, 1500, Items.silicon, 1000, Items.graphite, 2000, Items.pyratite, 2000, Items.titanium, 2000, Items.metaglass, 1000, Items.coal, 2000))){{
loadout = Loadouts.basicFoundation;
baseLaunchCost = ItemStack.with(Items.copper, 500, Items.lead, 500, Items.silicon, 100);
startingItems = ItemStack.list(Items.copper, 2000, Items.lead, 500, Items.silicon, 200);
startingItems = ItemStack.list(Items.copper, 2000, Items.lead, 500, Items.silicon, 200, Items.titanium, 400, Items.graphite, 200);
itemRequirements = ItemStack.with(Items.silicon, 8000, Items.titanium, 6000, Items.graphite, 4000);
conditionWave = 20;
zoneRequirements = new Zone[]{stainedMountains};
blockRequirements = new Block[]{Blocks.launchPad, Blocks.unloader};
blockRequirements = new Block[]{Blocks.launchPad, Blocks.unloader, Blocks.melter, Blocks.separator};
resources = new Item[]{Items.scrap};
rules = () -> new Rules(){{
waves = true;

View File

@ -29,6 +29,7 @@ import io.anuke.mindustry.ui.dialogs.FloatingDialog;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Block.Icon;
import io.anuke.mindustry.world.blocks.OreBlock;
import io.anuke.mindustry.world.blocks.storage.CoreBlock;
import java.io.DataInputStream;
import java.io.InputStream;
@ -503,9 +504,15 @@ public class MapEditorDialog extends Dialog implements Disposable{
blocksOut.clear();
blocksOut.addAll(Vars.content.blocks());
blocksOut.sort((b1, b2) -> b1.synthetic() && !b2.synthetic() ? 1 : b2.synthetic() && !b1.synthetic() ? -1 :
b1 instanceof OreBlock && !(b2 instanceof OreBlock) ? 1 : !(b1 instanceof OreBlock) && b2 instanceof OreBlock ? -1 :
Integer.compare(b1.id, b2.id));
blocksOut.sort((b1, b2) -> {
int core = -Boolean.compare(b1 instanceof CoreBlock, b2 instanceof CoreBlock);
if(core != 0) return core;
int synth = Boolean.compare(b1.synthetic(), b2.synthetic());
if(synth != 0) return synth;
int ore = Boolean.compare(b1 instanceof OreBlock, b2 instanceof OreBlock);
if(ore != 0) return ore;
return Integer.compare(b1.id, b2.id);
});
for(Block block : blocksOut){
TextureRegion region = block.icon(Icon.medium);

View File

@ -56,7 +56,7 @@ public class Loadout extends Content{
char c = layout[y].charAt(x);
if(entries.containsKey(c)){
BlockEntry entry = entries.get(c);
blocks.put(Pos.get(x - coreX, layout.length - 1 - (y - coreY)), entry);
blocks.put(Pos.get(x - coreX, -(y - coreY)), entry);
}
}
}