diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index ea28c45aa4..e5a72e56e1 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -67,7 +67,11 @@ public class Recipes implements ContentList{ new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.carbide, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6)); new Recipe(power, PowerBlocks.battery, new ItemStack(Items.tungsten, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4)); new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.carbide, 16), new ItemStack(Items.tungsten, 16), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 20)); + + //generators new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 30)); + //new Recipe(power, PowerBlocks.turbinegenerator, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 30)); + //new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.carbide, 50)); //new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.carbide, 50)); @@ -77,9 +81,11 @@ public class Recipes implements ContentList{ //DRILLS, PRODUCERS new Recipe(production, ProductionBlocks.tungstenDrill, new ItemStack(Items.tungsten, 30)); new Recipe(production, ProductionBlocks.carbideDrill, new ItemStack(Items.tungsten, 40), new ItemStack(Items.carbide, 40)); + new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.tungsten, 60), new ItemStack(Items.carbide, 70), new ItemStack(Items.silicon, 60), new ItemStack(Items.carbide, 60)); new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.tungsten, 50), new ItemStack(Items.carbide, 50), new ItemStack(Items.lead, 40)); new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.tungsten, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20)); + new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.tungsten, 90), new ItemStack(Items.carbide, 150), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 100)); //UNITS new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30)); diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java index 3a04a26607..3d348b3c41 100644 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java @@ -19,17 +19,17 @@ public class CraftingBlocks extends BlockList implements ContentList { public void load() { smelter = new Smelter("smelter") {{ health = 70; - inputs = new Item[]{Items.tungsten}; + inputs = new ItemStack[]{new ItemStack(Items.tungsten, 3)}; fuel = Items.coal; result = Items.carbide; - craftTime = 35f; + craftTime = 40f; useFlux = true; }}; arcsmelter = new PowerSmelter("arc-smelter") {{ health = 90; craftEffect = BlockFx.smeltsmoke; - inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.tungsten, 1)}; + inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.tungsten, 2)}; result = Items.carbide; powerUse = 0.1f; craftTime = 25f; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java index 35b0c93a5e..415016ffbc 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color; import io.anuke.mindustry.content.fx.BlockFx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; +import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.world.BarType; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; @@ -22,7 +23,7 @@ public class Smelter extends Block{ protected final int timerDump = timers++; protected final int timerCraft = timers++; - protected Item[] inputs; + protected ItemStack[] inputs; protected Item fuel; protected Item result; @@ -45,8 +46,8 @@ public class Smelter extends Block{ @Override public void setBars(){ - for(Item item : inputs){ - bars.add(new BlockBar(BarType.inventory, true, tile -> (float)tile.entity.items.getItem(item)/itemCapacity)); + for(ItemStack item : inputs){ + bars.add(new BlockBar(BarType.inventory, true, tile -> (float)tile.entity.items.getItem(item.item)/itemCapacity)); } } @@ -67,9 +68,9 @@ public class Smelter extends Block{ public void init() { super.init(); - for(Item item : inputs){ - if(item.fluxiness >= minFlux && useFlux){ - throw new IllegalArgumentException("'" + name + "' has input item '" + item.name + "', which is a flux, when useFlux is enabled. To prevent ambiguous item use, either remove this flux item from the inputs, or set useFlux to false."); + for(ItemStack item : inputs){ + if(item.item.fluxiness >= minFlux && useFlux){ + throw new IllegalArgumentException("'" + name + "' has input item '" + item.item.name + "', which is a flux, when useFlux is enabled. To prevent ambiguous item use, either remove this flux item from the inputs, or set useFlux to false."); } } } @@ -98,8 +99,8 @@ public class Smelter extends Block{ } //make sure it has all the items - for(Item item : inputs){ - if(!entity.items.hasItem(item)){ + for(ItemStack item : inputs){ + if(!entity.items.hasItem(item.item, item.amount)){ return; } } @@ -126,8 +127,8 @@ public class Smelter extends Block{ } if(consumeInputs) { - for (Item item : inputs) { - entity.items.removeItem(item, 1); + for (ItemStack item : inputs) { + entity.items.removeItem(item.item, item.amount); } } @@ -144,8 +145,8 @@ public class Smelter extends Block{ public boolean acceptItem(Item item, Tile tile, Tile source){ boolean isInput = false; - for(Item req : inputs){ - if(req == item){ + for(ItemStack req : inputs){ + if(req.item == item){ isInput = true; break; }