Standardized item capacity across blocks

This commit is contained in:
Anuken 2019-01-03 12:00:14 -05:00
parent 120e0f6971
commit dc12d58054
12 changed files with 7 additions and 24 deletions

View File

@ -82,7 +82,7 @@ public class Recipes implements ContentList{
new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.copper, 2)).setAlwaysUnlocked(true); new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.copper, 2)).setAlwaysUnlocked(true);
new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.copper, 6)).setAlwaysUnlocked(true); new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.copper, 6)).setAlwaysUnlocked(true);
//advanced densealloy transporat //more advanced transport
new Recipe(distribution, DistributionBlocks.distributor, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8)); new Recipe(distribution, DistributionBlocks.distributor, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8));
new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 4)); new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 4));
new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 8)); new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 8));
@ -114,7 +114,6 @@ public class Recipes implements ContentList{
//processing //processing
new Recipe(crafting, CraftingBlocks.biomatterCompressor, new ItemStack(Items.lead, 70), new ItemStack(Items.silicon, 60)); new Recipe(crafting, CraftingBlocks.biomatterCompressor, new ItemStack(Items.lead, 70), new ItemStack(Items.silicon, 60));
new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50)); new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50));
new Recipe(crafting, CraftingBlocks.centrifuge, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50));
//POWER //POWER
new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6)) new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6))
@ -175,7 +174,9 @@ public class Recipes implements ContentList{
new Recipe(units, UnitBlocks.revenantFactory, new ItemStack(Items.plastanium, 300), new ItemStack(Items.titanium, 400), new ItemStack(Items.lead, 300), new ItemStack(Items.silicon, 400), new ItemStack(Items.surgealloy, 100)); new Recipe(units, UnitBlocks.revenantFactory, new ItemStack(Items.plastanium, 300), new ItemStack(Items.titanium, 400), new ItemStack(Items.lead, 300), new ItemStack(Items.silicon, 400), new ItemStack(Items.surgealloy, 100));
new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.copper, 30), new ItemStack(Items.silicon, 30)); new Recipe(units, UnitBlocks.repairPoint, new ItemStack(Items.lead, 30), new ItemStack(Items.copper, 30), new ItemStack(Items.silicon, 30));
new Recipe(units, UnitBlocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.densealloy, 100), new ItemStack(Items.silicon, 200));
//removed for testing MOBA-style unit production
//new Recipe(units, UnitBlocks.commandCenter, new ItemStack(Items.lead, 100), new ItemStack(Items.densealloy, 100), new ItemStack(Items.silicon, 200));
//LIQUIDS //LIQUIDS
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1)); new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1));

View File

@ -12,7 +12,7 @@ import io.anuke.mindustry.world.blocks.production.*;
public class CraftingBlocks extends BlockList implements ContentList{ public class CraftingBlocks extends BlockList implements ContentList{
public static Block arcsmelter, siliconsmelter, plastaniumCompressor, phaseWeaver, alloySmelter, public static Block arcsmelter, siliconsmelter, plastaniumCompressor, phaseWeaver, alloySmelter,
pyratiteMixer, blastMixer, pyratiteMixer, blastMixer,
cryofluidmixer, melter, separator, biomatterCompressor, pulverizer, solidifier, incinerator; cryofluidmixer, melter, separator, biomatterCompressor, pulverizer, incinerator;
@Override @Override
public void load(){ public void load(){
@ -36,7 +36,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
liquidCapacity = 60f; liquidCapacity = 60f;
craftTime = 60f; craftTime = 60f;
output = Items.plastanium; output = Items.plastanium;
itemCapacity = 30;
powerCapacity = 40f; powerCapacity = 40f;
size = 2; size = 2;
health = 320; health = 320;
@ -77,7 +76,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
cryofluidmixer = new LiquidMixer("cryofluidmixer"){{ cryofluidmixer = new LiquidMixer("cryofluidmixer"){{
outputLiquid = Liquids.cryofluid; outputLiquid = Liquids.cryofluid;
liquidPerItem = 50f; liquidPerItem = 50f;
itemCapacity = 50;
size = 2; size = 2;
hasPower = true; hasPower = true;
@ -87,7 +85,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
}}; }};
blastMixer = new GenericCrafter("blast-mixer"){{ blastMixer = new GenericCrafter("blast-mixer"){{
itemCapacity = 20;
hasItems = true; hasItems = true;
hasPower = true; hasPower = true;
hasLiquids = true; hasLiquids = true;
@ -101,7 +98,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
pyratiteMixer = new PowerSmelter("pyratite-mixer"){{ pyratiteMixer = new PowerSmelter("pyratite-mixer"){{
flameColor = Color.CLEAR; flameColor = Color.CLEAR;
itemCapacity = 20;
hasItems = true; hasItems = true;
hasPower = true; hasPower = true;
result = Items.pyratite; result = Items.pyratite;
@ -116,7 +112,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
health = 200; health = 200;
outputLiquid = Liquids.slag; outputLiquid = Liquids.slag;
outputLiquidAmount = 1f; outputLiquidAmount = 1f;
itemCapacity = 20;
craftTime = 10f; craftTime = 10f;
size = 2; size = 2;
hasLiquids = hasPower = true; hasLiquids = hasPower = true;
@ -135,7 +130,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
hasPower = true; hasPower = true;
filterTime = 15f; filterTime = 15f;
itemCapacity = 60;
health = 50 * 4; health = 50 * 4;
spinnerLength = 1.5f; spinnerLength = 1.5f;
spinnerRadius = 3.5f; spinnerRadius = 3.5f;
@ -149,7 +143,6 @@ public class CraftingBlocks extends BlockList implements ContentList{
biomatterCompressor = new Compressor("biomattercompressor"){{ biomatterCompressor = new Compressor("biomattercompressor"){{
liquidCapacity = 60f; liquidCapacity = 60f;
itemCapacity = 50;
craftTime = 20f; craftTime = 20f;
outputLiquid = Liquids.oil; outputLiquid = Liquids.oil;
outputLiquidAmount = 2.5f; outputLiquidAmount = 2.5f;
@ -162,15 +155,13 @@ public class CraftingBlocks extends BlockList implements ContentList{
}}; }};
pulverizer = new Pulverizer("pulverizer"){{ pulverizer = new Pulverizer("pulverizer"){{
itemCapacity = 40;
output = Items.sand; output = Items.sand;
health = 80;
craftEffect = BlockFx.pulverize; craftEffect = BlockFx.pulverize;
craftTime = 40f; craftTime = 40f;
updateEffect = BlockFx.pulverizeSmall; updateEffect = BlockFx.pulverizeSmall;
hasItems = hasPower = true; hasItems = hasPower = true;
consumes.item(Items.stone, 1); consumes.item(Items.scrap, 1);
consumes.power(0.05f); consumes.power(0.05f);
}}; }};

View File

@ -28,7 +28,7 @@ public abstract class BaseBlock extends MappableContent{
public boolean consumesPower = true; public boolean consumesPower = true;
public boolean outputsPower; public boolean outputsPower;
public int itemCapacity; public int itemCapacity = 10;
public float liquidCapacity = 10f; public float liquidCapacity = 10f;
public float liquidFlowFactor = 4.9f; public float liquidFlowFactor = 4.9f;
public float powerCapacity = 10f; public float powerCapacity = 10f;

View File

@ -52,7 +52,6 @@ public class ForceProjector extends Block {
hasLiquids = true; hasLiquids = true;
powerCapacity = 60f; powerCapacity = 60f;
hasItems = true; hasItems = true;
itemCapacity = 10;
consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.1f)).optional(true).update(false); consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.1f)).optional(true).update(false);
} }

View File

@ -44,7 +44,6 @@ public class MendProjector extends Block{
update = true; update = true;
hasPower = true; hasPower = true;
hasItems = true; hasItems = true;
itemCapacity = 10;
} }
@Override @Override

View File

@ -45,7 +45,6 @@ public class OverdriveProjector extends Block{
hasPower = true; hasPower = true;
hasItems = true; hasItems = true;
canOverdrive = false; canOverdrive = false;
itemCapacity = 10;
} }
@Override @Override

View File

@ -33,7 +33,6 @@ public abstract class ItemGenerator extends PowerGenerator{
public ItemGenerator(String name){ public ItemGenerator(String name){
super(name); super(name);
itemCapacity = 20;
hasItems = true; hasItems = true;
consumes.add(new ConsumeItemFilter(item -> getItemEfficiency(item) >= minItemEfficiency)).update(false).optional(true); consumes.add(new ConsumeItemFilter(item -> getItemEfficiency(item) >= minItemEfficiency)).update(false).optional(true);

View File

@ -68,7 +68,6 @@ public class Drill extends Block{
update = true; update = true;
solid = true; solid = true;
layer = Layer.overlay; layer = Layer.overlay;
itemCapacity = 5;
group = BlockGroup.drills; group = BlockGroup.drills;
hasLiquids = true; hasLiquids = true;
liquidCapacity = 5f; liquidCapacity = 5f;

View File

@ -18,7 +18,6 @@ public class Fracker extends SolidPump{
public Fracker(String name){ public Fracker(String name){
super(name); super(name);
hasItems = true; hasItems = true;
itemCapacity = 20;
singleLiquid = false; singleLiquid = false;
consumes.require(ConsumeItem.class); consumes.require(ConsumeItem.class);

View File

@ -52,7 +52,6 @@ public class PowerSmelter extends PowerBlock{
hasItems = true; hasItems = true;
update = true; update = true;
solid = true; solid = true;
itemCapacity = 20;
} }
@Override @Override

View File

@ -40,7 +40,6 @@ public class Smelter extends Block{
update = true; update = true;
hasItems = true; hasItems = true;
solid = true; solid = true;
itemCapacity = 20;
consumes.require(ConsumeItems.class); consumes.require(ConsumeItems.class);
consumes.require(ConsumeItem.class); consumes.require(ConsumeItem.class);

View File

@ -48,7 +48,6 @@ public class UnitFactory extends Block{
hasPower = true; hasPower = true;
hasItems = true; hasItems = true;
solid = false; solid = false;
itemCapacity = 10;
flags = EnumSet.of(BlockFlag.producer, BlockFlag.target); flags = EnumSet.of(BlockFlag.producer, BlockFlag.target);
consumes.require(ConsumeItems.class); consumes.require(ConsumeItems.class);