diff --git a/core/assets-raw/sprites/blocks/environment/blackrockshadow1.png b/core/assets-raw/sprites/blocks/environment/blackrockshadow1.png deleted file mode 100644 index 11730b4576..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/blackrockshadow1.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/grass-cliff-edge-1.png b/core/assets-raw/sprites/blocks/environment/grass-cliff-edge-1.png deleted file mode 100644 index 38f7011a99..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/grass-cliff-edge-1.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/grass-cliff-edge-2.png b/core/assets-raw/sprites/blocks/environment/grass-cliff-edge-2.png deleted file mode 100644 index 4625d77cfb..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/grass-cliff-edge-2.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/grass-cliff-edge.png b/core/assets-raw/sprites/blocks/environment/grass-cliff-edge.png deleted file mode 100644 index 5d93602184..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/grass-cliff-edge.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/grass-cliff-side.png b/core/assets-raw/sprites/blocks/environment/grass-cliff-side.png deleted file mode 100644 index a165417491..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/grass-cliff-side.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/grass1.png b/core/assets-raw/sprites/blocks/environment/grass1.png index d024726eba..1e600d144d 100644 Binary files a/core/assets-raw/sprites/blocks/environment/grass1.png and b/core/assets-raw/sprites/blocks/environment/grass1.png differ diff --git a/core/assets-raw/sprites/blocks/environment/grass2.png b/core/assets-raw/sprites/blocks/environment/grass2.png index 0271e2c0c9..5bdfe6cc8e 100644 Binary files a/core/assets-raw/sprites/blocks/environment/grass2.png and b/core/assets-raw/sprites/blocks/environment/grass2.png differ diff --git a/core/assets-raw/sprites/blocks/environment/grass3.png b/core/assets-raw/sprites/blocks/environment/grass3.png index 37457a6ad2..6ce88c3d74 100644 Binary files a/core/assets-raw/sprites/blocks/environment/grass3.png and b/core/assets-raw/sprites/blocks/environment/grass3.png differ diff --git a/core/assets-raw/sprites/blocks/environment/grassedge.png b/core/assets-raw/sprites/blocks/environment/grassedge.png index fdf155f66f..f4e2a53254 100644 Binary files a/core/assets-raw/sprites/blocks/environment/grassedge.png and b/core/assets-raw/sprites/blocks/environment/grassedge.png differ diff --git a/core/assets-raw/sprites/blocks/environment/icerockshadow1.png b/core/assets-raw/sprites/blocks/environment/icerockshadow1.png deleted file mode 100644 index daa90b6e0d..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/icerockshadow1.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/icerockshadow2.png b/core/assets-raw/sprites/blocks/environment/icerockshadow2.png deleted file mode 100644 index 1bbc0af176..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/icerockshadow2.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/rockshadow1.png b/core/assets-raw/sprites/blocks/environment/rockshadow1.png deleted file mode 100644 index daa90b6e0d..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/rockshadow1.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/rockshadow2.png b/core/assets-raw/sprites/blocks/environment/rockshadow2.png deleted file mode 100644 index 1bbc0af176..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/rockshadow2.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/environment/shrub.png b/core/assets-raw/sprites/blocks/environment/shrub.png index 6a7bad1a80..74335d79cd 100644 Binary files a/core/assets-raw/sprites/blocks/environment/shrub.png and b/core/assets-raw/sprites/blocks/environment/shrub.png differ diff --git a/core/assets-raw/sprites/blocks/environment/shrubshadow.png b/core/assets-raw/sprites/blocks/environment/shrubshadow.png deleted file mode 100644 index 7c22d939de..0000000000 Binary files a/core/assets-raw/sprites/blocks/environment/shrubshadow.png and /dev/null differ diff --git a/core/assets-raw/sprites/blocks/production/alloy-smelter.png b/core/assets-raw/sprites/blocks/production/alloy-smelter.png index 0150f3a516..a80b7e0727 100644 Binary files a/core/assets-raw/sprites/blocks/production/alloy-smelter.png and b/core/assets-raw/sprites/blocks/production/alloy-smelter.png differ diff --git a/core/src/io/anuke/mindustry/content/Items.java b/core/src/io/anuke/mindustry/content/Items.java index 5dd7220a32..8879f460ef 100644 --- a/core/src/io/anuke/mindustry/content/Items.java +++ b/core/src/io/anuke/mindustry/content/Items.java @@ -7,7 +7,7 @@ import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemType; public class Items implements ContentList{ - public static Item stone, copper, lead, densealloy, coal, titanium, thorium, silicon, plastanium, phasefabric, surgealloy, + public static Item scrap, copper, lead, graphite, coal, titanium, thorium, silicon, plastanium, phasefabric, surgealloy, biomatter, sand, blastCompound, pyratite; @Override @@ -27,9 +27,9 @@ public class Items implements ContentList{ genOre = true; }}; - densealloy = new Item("dense-alloy", Color.valueOf("b2c6d2")){{ + graphite = new Item("graphite", Color.valueOf("b2c6d2")){{ type = ItemType.material; - cost = 1.2f; + cost = 1.3f; }}; coal = new Item("coal", Color.valueOf("272727")){{ @@ -55,8 +55,8 @@ public class Items implements ContentList{ genOre = true; }}; - stone = new Item("stone", Color.valueOf("777777")){{ - hardness = 3; + scrap = new Item("scrap", Color.valueOf("777777")){{ + }}; silicon = new Item("silicon", Color.valueOf("53565c")){{ diff --git a/core/src/io/anuke/mindustry/content/Liquids.java b/core/src/io/anuke/mindustry/content/Liquids.java index 9ff4a489ea..c366b4a79a 100644 --- a/core/src/io/anuke/mindustry/content/Liquids.java +++ b/core/src/io/anuke/mindustry/content/Liquids.java @@ -6,7 +6,7 @@ import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Liquid; public class Liquids implements ContentList{ - public static Liquid water, lava, oil, cryofluid; + public static Liquid water, slag, oil, cryofluid; @Override public void load(){ @@ -24,34 +24,28 @@ public class Liquids implements ContentList{ } }; - lava = new Liquid("lava", Color.valueOf("e37341")){ - { - temperature = 1f; - viscosity = 0.8f; - tier = 2; - effect = StatusEffects.melting; - } - }; + slag = new Liquid("slag", Color.valueOf("e37341")){{ + temperature = 1f; + viscosity = 0.8f; + tier = 2; + effect = StatusEffects.melting; + }}; - oil = new Liquid("oil", Color.valueOf("313131")){ - { - viscosity = 0.7f; - flammability = 0.6f; - explosiveness = 0.6f; - heatCapacity = 0.7f; - tier = 1; - effect = StatusEffects.tarred; - } - }; + oil = new Liquid("oil", Color.valueOf("313131")){{ + viscosity = 0.7f; + flammability = 0.6f; + explosiveness = 0.6f; + heatCapacity = 0.7f; + tier = 1; + effect = StatusEffects.tarred; + }}; - cryofluid = new Liquid("cryofluid", Color.SKY){ - { - heatCapacity = 0.9f; - temperature = 0.25f; - tier = 1; - effect = StatusEffects.freezing; - } - }; + cryofluid = new Liquid("cryofluid", Color.SKY){{ + heatCapacity = 0.9f; + temperature = 0.25f; + tier = 1; + effect = StatusEffects.freezing; + }}; } @Override diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index 19e30d8037..91a6f52f1d 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -27,11 +27,11 @@ public class Recipes implements ContentList{ new Recipe(defense, DefenseBlocks.copperWall, new ItemStack(Items.copper, 12)).setAlwaysUnlocked(true); new Recipe(defense, DefenseBlocks.copperWallLarge, new ItemStack(Items.copper, 12 * 4)).setAlwaysUnlocked(true); - new Recipe(defense, DefenseBlocks.denseAlloyWall, new ItemStack(Items.densealloy, 12)); - new Recipe(defense, DefenseBlocks.denseAlloyWallLarge, new ItemStack(Items.densealloy, 12 * 4)); + new Recipe(defense, DefenseBlocks.denseAlloyWall, new ItemStack(Items.titanium, 12)); + new Recipe(defense, DefenseBlocks.denseAlloyWallLarge, new ItemStack(Items.titanium, 12 * 4)); - new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.densealloy, 12), new ItemStack(Items.silicon, 8)); - new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.densealloy, 12 * 4), new ItemStack(Items.silicon, 8 * 4)); + new Recipe(defense, DefenseBlocks.door, new ItemStack(Items.titanium, 12), new ItemStack(Items.silicon, 8)); + new Recipe(defense, DefenseBlocks.doorLarge, new ItemStack(Items.titanium, 12 * 4), new ItemStack(Items.silicon, 8 * 4)); new Recipe(defense, DefenseBlocks.thoriumWall, new ItemStack(Items.thorium, 12)); new Recipe(defense, DefenseBlocks.thoriumWallLarge, new ItemStack(Items.thorium, 12 * 4)); @@ -42,36 +42,35 @@ public class Recipes implements ContentList{ new Recipe(defense, DefenseBlocks.surgeWall, new ItemStack(Items.surgealloy, 12)); new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4)); - new Recipe(effect, StorageBlocks.container, new ItemStack(Items.densealloy, 200)); - new Recipe(effect, StorageBlocks.vault, new ItemStack(Items.densealloy, 500), new ItemStack(Items.thorium, 250)); + new Recipe(effect, StorageBlocks.container, new ItemStack(Items.titanium, 200)); + new Recipe(effect, StorageBlocks.vault, new ItemStack(Items.titanium, 500), new ItemStack(Items.thorium, 250)); new Recipe(effect, StorageBlocks.core, - new ItemStack(Items.copper, 2000), new ItemStack(Items.densealloy, 2000), + new ItemStack(Items.copper, 2000), new ItemStack(Items.titanium, 2000), new ItemStack(Items.silicon, 1750), new ItemStack(Items.thorium, 1000), new ItemStack(Items.surgealloy, 500), new ItemStack(Items.phasefabric, 750) ); //projectors - new Recipe(effect, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180)); - new Recipe(effect, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); - new Recipe(effect, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); + new Recipe(effect, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180)); + new Recipe(effect, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); + new Recipe(effect, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.titanium, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250)); - new Recipe(effect, DefenseBlocks.shockMine, new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 25)) - .setDependencies(Items.blastCompound); + new Recipe(effect, DefenseBlocks.shockMine, new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 25)); //TURRETS new Recipe(turret, TurretBlocks.duo, new ItemStack(Items.copper, 40)).setAlwaysUnlocked(true); new Recipe(turret, TurretBlocks.arc, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 20)); - new Recipe(turret, TurretBlocks.hail, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 35)); + new Recipe(turret, TurretBlocks.hail, new ItemStack(Items.copper, 60), new ItemStack(Items.graphite, 35)); new Recipe(turret, TurretBlocks.lancer, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 90)); - new Recipe(turret, TurretBlocks.wave, new ItemStack(Items.densealloy, 60), new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150)); - new Recipe(turret, TurretBlocks.salvo, new ItemStack(Items.copper, 210), new ItemStack(Items.densealloy, 190), new ItemStack(Items.thorium, 130)); - new Recipe(turret, TurretBlocks.swarmer, new ItemStack(Items.densealloy, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60)); - new Recipe(turret, TurretBlocks.ripple, new ItemStack(Items.copper, 300), new ItemStack(Items.densealloy, 220), new ItemStack(Items.thorium, 120)); - new Recipe(turret, TurretBlocks.cyclone, new ItemStack(Items.copper, 400), new ItemStack(Items.densealloy, 400), new ItemStack(Items.surgealloy, 200), new ItemStack(Items.plastanium, 150)); - new Recipe(turret, TurretBlocks.fuse, new ItemStack(Items.copper, 450), new ItemStack(Items.densealloy, 450), new ItemStack(Items.surgealloy, 250)); - new Recipe(turret, TurretBlocks.spectre, new ItemStack(Items.copper, 700), new ItemStack(Items.densealloy, 600), new ItemStack(Items.surgealloy, 500), new ItemStack(Items.plastanium, 350), new ItemStack(Items.thorium, 500)); - new Recipe(turret, TurretBlocks.meltdown, new ItemStack(Items.copper, 500), new ItemStack(Items.lead, 700), new ItemStack(Items.densealloy, 600), new ItemStack(Items.surgealloy, 650), new ItemStack(Items.silicon, 650)); + new Recipe(turret, TurretBlocks.wave, new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150)); + new Recipe(turret, TurretBlocks.salvo, new ItemStack(Items.copper, 210), new ItemStack(Items.graphite, 190), new ItemStack(Items.thorium, 130)); + new Recipe(turret, TurretBlocks.swarmer, new ItemStack(Items.graphite, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60)); + new Recipe(turret, TurretBlocks.ripple, new ItemStack(Items.copper, 300), new ItemStack(Items.graphite, 220), new ItemStack(Items.thorium, 120)); + new Recipe(turret, TurretBlocks.cyclone, new ItemStack(Items.copper, 400), new ItemStack(Items.surgealloy, 200), new ItemStack(Items.plastanium, 150)); + new Recipe(turret, TurretBlocks.fuse, new ItemStack(Items.copper, 450), new ItemStack(Items.graphite, 450), new ItemStack(Items.surgealloy, 250)); + new Recipe(turret, TurretBlocks.spectre, new ItemStack(Items.copper, 700), new ItemStack(Items.graphite, 600), new ItemStack(Items.surgealloy, 500), new ItemStack(Items.plastanium, 350), new ItemStack(Items.thorium, 500)); + new Recipe(turret, TurretBlocks.meltdown, new ItemStack(Items.copper, 500), new ItemStack(Items.lead, 700), new ItemStack(Items.graphite, 600), new ItemStack(Items.surgealloy, 650), new ItemStack(Items.silicon, 650)); //DISTRIBUTION new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.copper, 1)).setAlwaysUnlocked(true); @@ -82,73 +81,65 @@ public class Recipes implements ContentList{ new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.copper, 2)).setAlwaysUnlocked(true); new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.copper, 6)).setAlwaysUnlocked(true); - //advanced densealloy transport - 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.overflowGate, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 8)); - new Recipe(distribution, DistributionBlocks.itemBridge, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8)); - new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.densealloy, 50), new ItemStack(Items.silicon, 60)); - new Recipe(distribution, DistributionBlocks.massDriver, new ItemStack(Items.densealloy, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100)); + //more advanced transport + new Recipe(distribution, DistributionBlocks.distributor, new ItemStack(Items.titanium, 8), new ItemStack(Items.copper, 8)); + new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.titanium, 4), new ItemStack(Items.copper, 4)); + new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.titanium, 4), new ItemStack(Items.copper, 8)); + new Recipe(distribution, DistributionBlocks.itemBridge, new ItemStack(Items.titanium, 8), new ItemStack(Items.copper, 8)); + new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 60)); + new Recipe(distribution, DistributionBlocks.massDriver, new ItemStack(Items.titanium, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100)); //CRAFTING //smelting - new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.copper, 100)); - new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.copper, 110), new ItemStack(Items.densealloy, 70), new ItemStack(Items.lead, 50)); - new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); + new Recipe(crafting, CraftingBlocks.siliconSmelter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); //advanced fabrication - new Recipe(crafting, CraftingBlocks.plastaniumCompressor, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 230), new ItemStack(Items.densealloy, 120), new ItemStack(Items.titanium, 160)); + new Recipe(crafting, CraftingBlocks.plastaniumCompressor, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 230), new ItemStack(Items.graphite, 120), new ItemStack(Items.titanium, 160)); new Recipe(crafting, CraftingBlocks.phaseWeaver, new ItemStack(Items.silicon, 260), new ItemStack(Items.lead, 240), new ItemStack(Items.thorium, 150)); - new Recipe(crafting, CraftingBlocks.alloySmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140)); + new Recipe(crafting, CraftingBlocks.surgeSmelter, new ItemStack(Items.silicon, 160), new ItemStack(Items.lead, 160), new ItemStack(Items.thorium, 140)); //misc new Recipe(crafting, CraftingBlocks.pulverizer, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 50)); new Recipe(crafting, CraftingBlocks.pyratiteMixer, new ItemStack(Items.copper, 100), new ItemStack(Items.lead, 50)); - new Recipe(crafting, CraftingBlocks.blastMixer, new ItemStack(Items.lead, 60), new ItemStack(Items.densealloy, 40)); + new Recipe(crafting, CraftingBlocks.blastMixer, new ItemStack(Items.lead, 60), new ItemStack(Items.titanium, 40)); new Recipe(crafting, CraftingBlocks.cryofluidmixer, new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 80), new ItemStack(Items.thorium, 90)); - new Recipe(crafting, CraftingBlocks.solidifier, new ItemStack(Items.densealloy, 30), new ItemStack(Items.copper, 20)); - new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.densealloy, 90)); - new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.densealloy, 10), new ItemStack(Items.lead, 30)); + new Recipe(crafting, CraftingBlocks.melter, new ItemStack(Items.copper, 60), new ItemStack(Items.lead, 70), new ItemStack(Items.graphite, 90)); + new Recipe(crafting, CraftingBlocks.incinerator, new ItemStack(Items.graphite, 10), new ItemStack(Items.lead, 30)); //processing 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.centrifuge, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); + new Recipe(crafting, CraftingBlocks.separator, new ItemStack(Items.copper, 60), new ItemStack(Items.titanium, 50)); //POWER - new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6)) - .setDependencies(PowerBlocks.combustionGenerator); - new Recipe(power, PowerBlocks.powerNodeLarge, new ItemStack(Items.densealloy, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6)) - .setDependencies(PowerBlocks.powerNode); - new Recipe(power, PowerBlocks.battery, new ItemStack(Items.copper, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4)) - .setDependencies(PowerBlocks.powerNode); - new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.densealloy, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30)) - .setDependencies(PowerBlocks.powerNode); + new Recipe(power, PowerBlocks.powerNode, new ItemStack(Items.copper, 2), new ItemStack(Items.lead, 6)); + new Recipe(power, PowerBlocks.powerNodeLarge, new ItemStack(Items.titanium, 10), new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 6)); + new Recipe(power, PowerBlocks.battery, new ItemStack(Items.copper, 8), new ItemStack(Items.lead, 30), new ItemStack(Items.silicon, 4)); + new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.titanium, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 30)); //generators - combustion new Recipe(power, PowerBlocks.combustionGenerator, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 30)); - new Recipe(power, PowerBlocks.turbineGenerator, new ItemStack(Items.copper, 70), new ItemStack(Items.densealloy, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60)); - new Recipe(power, PowerBlocks.thermalGenerator, new ItemStack(Items.copper, 80), new ItemStack(Items.densealloy, 70), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 70), new ItemStack(Items.thorium, 70)); + new Recipe(power, PowerBlocks.turbineGenerator, new ItemStack(Items.copper, 70), new ItemStack(Items.graphite, 50), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 60)); + new Recipe(power, PowerBlocks.thermalGenerator, new ItemStack(Items.copper, 80), new ItemStack(Items.graphite, 70), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 70), new ItemStack(Items.thorium, 70)); //generators - solar new Recipe(power, PowerBlocks.solarPanel, new ItemStack(Items.lead, 20), new ItemStack(Items.silicon, 30)); new Recipe(power, PowerBlocks.largeSolarPanel, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 290), new ItemStack(Items.phasefabric, 30)); //generators - nuclear - new Recipe(power, PowerBlocks.thoriumReactor, new ItemStack(Items.lead, 600), new ItemStack(Items.silicon, 400), new ItemStack(Items.densealloy, 300), new ItemStack(Items.thorium, 300)); + new Recipe(power, PowerBlocks.thoriumReactor, new ItemStack(Items.lead, 600), new ItemStack(Items.silicon, 400), new ItemStack(Items.graphite, 300), new ItemStack(Items.thorium, 300)); new Recipe(power, PowerBlocks.rtgGenerator, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 150), new ItemStack(Items.phasefabric, 50), new ItemStack(Items.plastanium, 150), new ItemStack(Items.thorium, 100)); //DRILLS, PRODUCERS new Recipe(production, ProductionBlocks.mechanicalDrill, new ItemStack(Items.copper, 45)).setAlwaysUnlocked(true); - new Recipe(production, ProductionBlocks.pneumaticDrill, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50)); - new Recipe(production, ProductionBlocks.laserDrill, new ItemStack(Items.copper, 70), new ItemStack(Items.densealloy, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); - new Recipe(production, ProductionBlocks.blastDrill, new ItemStack(Items.copper, 130), new ItemStack(Items.densealloy, 180), new ItemStack(Items.silicon, 120), new ItemStack(Items.titanium, 100), new ItemStack(Items.thorium, 60)); + new Recipe(production, ProductionBlocks.pneumaticDrill, new ItemStack(Items.copper, 60), new ItemStack(Items.graphite, 50)); + new Recipe(production, ProductionBlocks.laserDrill, new ItemStack(Items.copper, 70), new ItemStack(Items.graphite, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 50)); + new Recipe(production, ProductionBlocks.blastDrill, new ItemStack(Items.copper, 130), new ItemStack(Items.silicon, 120), new ItemStack(Items.titanium, 100), new ItemStack(Items.thorium, 60)); - new Recipe(production, ProductionBlocks.waterExtractor, new ItemStack(Items.copper, 50), new ItemStack(Items.densealloy, 50), new ItemStack(Items.lead, 40)); + new Recipe(production, ProductionBlocks.waterExtractor, new ItemStack(Items.copper, 50), new ItemStack(Items.graphite, 50), new ItemStack(Items.lead, 40)); new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.copper, 20), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 20)); - new Recipe(production, ProductionBlocks.oilExtractor, new ItemStack(Items.copper, 300), new ItemStack(Items.densealloy, 350), new ItemStack(Items.lead, 230), new ItemStack(Items.thorium, 230), new ItemStack(Items.silicon, 150)); + new Recipe(production, ProductionBlocks.oilExtractor, new ItemStack(Items.copper, 300), new ItemStack(Items.graphite, 350), new ItemStack(Items.lead, 230), new ItemStack(Items.thorium, 230), new ItemStack(Items.silicon, 150)); //UNITS @@ -158,14 +149,14 @@ public class Recipes implements ContentList{ new Recipe(upgrade, UpgradeBlocks.javelinPad, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasefabric, 200)); new Recipe(upgrade, UpgradeBlocks.glaivePad, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200)); - new Recipe(upgrade, UpgradeBlocks.alphaPad, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 100), new ItemStack(Items.copper, 150)).setVisible(RecipeVisibility.mobileOnly); - new Recipe(upgrade, UpgradeBlocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)); - new Recipe(upgrade, UpgradeBlocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)); - new Recipe(upgrade, UpgradeBlocks.omegaPad, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)); + new Recipe(upgrade, UpgradeBlocks.alphaPad, new ItemStack(Items.lead, 200), new ItemStack(Items.graphite, 100), new ItemStack(Items.copper, 150)).setVisible(RecipeVisibility.mobileOnly); + new Recipe(upgrade, UpgradeBlocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.titanium, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)); + new Recipe(upgrade, UpgradeBlocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.titanium, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)); + new Recipe(upgrade, UpgradeBlocks.omegaPad, new ItemStack(Items.lead, 450), new ItemStack(Items.graphite, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)); - //actual unit related stuff + //unit factories new Recipe(units, UnitBlocks.spiritFactory, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130)); - new Recipe(units, UnitBlocks.phantomFactory, new ItemStack(Items.densealloy, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210)); + new Recipe(units, UnitBlocks.phantomFactory, new ItemStack(Items.titanium, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210)); new Recipe(units, UnitBlocks.daggerFactory, new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 70)); new Recipe(units, UnitBlocks.titanFactory, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90)); @@ -176,10 +167,12 @@ 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.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 - new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1)).setDependencies(CraftingBlocks.smelter); + new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.lead, 1)); new Recipe(liquid, LiquidBlocks.pulseConduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.lead, 1)); new Recipe(liquid, LiquidBlocks.phaseConduit, new ItemStack(Items.phasefabric, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.titanium, 20)); @@ -188,7 +181,7 @@ public class Recipes implements ContentList{ new Recipe(liquid, LiquidBlocks.liquidJunction, new ItemStack(Items.titanium, 4), new ItemStack(Items.lead, 4)); new Recipe(liquid, LiquidBlocks.bridgeConduit, new ItemStack(Items.titanium, 8), new ItemStack(Items.lead, 8)); - new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.copper, 30), new ItemStack(Items.lead, 20)).setDependencies(CraftingBlocks.smelter); + new Recipe(liquid, LiquidBlocks.mechanicalPump, new ItemStack(Items.copper, 30), new ItemStack(Items.lead, 20)); new Recipe(liquid, LiquidBlocks.rotaryPump, new ItemStack(Items.copper, 140), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 70)); new Recipe(liquid, LiquidBlocks.thermalPump, new ItemStack(Items.copper, 160), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 60), new ItemStack(Items.titanium, 80), new ItemStack(Items.thorium, 70)); } diff --git a/core/src/io/anuke/mindustry/content/blocks/Blocks.java b/core/src/io/anuke/mindustry/content/blocks/Blocks.java index 16618bb039..8ce81e4667 100644 --- a/core/src/io/anuke/mindustry/content/blocks/Blocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/Blocks.java @@ -90,20 +90,6 @@ public class Blocks extends BlockList implements ContentList{ minimapColor = Color.valueOf("506eb4"); }}; - lava = new Floor("lava"){{ - drownTime = 100f; - liquidColor = Color.valueOf("ed5334"); - speedMultiplier = 0.2f; - damageTaken = 0.5f; - status = StatusEffects.melting; - statusIntensity = 0.8f; - variants = 0; - liquidDrop = Liquids.lava; - isLiquid = true; - cacheLayer = CacheLayer.lava; - minimapColor = Color.valueOf("ed5334"); - }}; - tar = new Floor("tar"){{ drownTime = 150f; liquidColor = Color.valueOf("292929"); @@ -119,14 +105,12 @@ public class Blocks extends BlockList implements ContentList{ stone = new Floor("stone"){{ hasOres = true; - drops = new ItemStack(Items.stone, 1); blends = block -> block != this && !(block instanceof OreBlock); minimapColor = Color.valueOf("323232"); playerUnmineable = true; }}; blackstone = new Floor("blackstone"){{ - drops = new ItemStack(Items.stone, 1); minimapColor = Color.valueOf("252525"); playerUnmineable = true; hasOres = true; diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java index 0933c8a0fb..feec001313 100644 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java @@ -10,38 +10,14 @@ import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.production.*; public class CraftingBlocks extends BlockList implements ContentList{ - public static Block smelter, arcsmelter, siliconsmelter, plastaniumCompressor, phaseWeaver, alloySmelter, + public static Block siliconSmelter, plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, - cryofluidmixer, melter, separator, centrifuge, biomatterCompressor, pulverizer, solidifier, incinerator; + cryofluidmixer, melter, separator, biomatterCompressor, pulverizer, incinerator; @Override public void load(){ - smelter = new Smelter("smelter"){{ - health = 70; - result = Items.densealloy; - craftTime = 45f; - burnDuration = 46f; - useFlux = true; - consumes.items(new ItemStack(Items.copper, 1), new ItemStack(Items.lead, 2)); - consumes.item(Items.coal).optional(true); - }}; - - arcsmelter = new PowerSmelter("arc-smelter"){{ - health = 90; - craftEffect = BlockFx.smeltsmoke; - result = Items.densealloy; - craftTime = 30f; - size = 2; - - useFlux = true; - fluxNeeded = 2; - - consumes.items(new ItemStack(Items.copper, 1), new ItemStack(Items.lead, 2)); - consumes.power(0.1f); - }}; - - siliconsmelter = new PowerSmelter("silicon-smelter"){{ + siliconSmelter = new PowerSmelter("silicon-smelter"){{ health = 90; craftEffect = BlockFx.smeltsmoke; result = Items.silicon; @@ -50,7 +26,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ hasLiquids = false; flameColor = Color.valueOf("ffef99"); - consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)); + consumes.items(new ItemStack(Items.sand, 2)); consumes.power(0.05f); }}; @@ -59,7 +35,6 @@ public class CraftingBlocks extends BlockList implements ContentList{ liquidCapacity = 60f; craftTime = 60f; output = Items.plastanium; - itemCapacity = 30; size = 2; health = 320; hasPower = hasLiquids = true; @@ -81,11 +56,11 @@ public class CraftingBlocks extends BlockList implements ContentList{ consumes.power(0.5f); }}; - alloySmelter = new PowerSmelter("alloy-smelter"){{ + surgeSmelter = new PowerSmelter("surge-smelter"){{ craftEffect = BlockFx.smeltsmoke; result = Items.surgealloy; craftTime = 75f; - size = 2; + size = 3; useFlux = true; fluxNeeded = 3; @@ -97,7 +72,6 @@ public class CraftingBlocks extends BlockList implements ContentList{ cryofluidmixer = new LiquidMixer("cryofluidmixer"){{ outputLiquid = Liquids.cryofluid; liquidPerItem = 50f; - itemCapacity = 50; size = 2; hasPower = true; @@ -107,7 +81,6 @@ public class CraftingBlocks extends BlockList implements ContentList{ }}; blastMixer = new GenericCrafter("blast-mixer"){{ - itemCapacity = 20; hasItems = true; hasPower = true; hasLiquids = true; @@ -121,7 +94,6 @@ public class CraftingBlocks extends BlockList implements ContentList{ pyratiteMixer = new PowerSmelter("pyratite-mixer"){{ flameColor = Color.CLEAR; - itemCapacity = 20; hasItems = true; hasPower = true; result = Items.pyratite; @@ -129,54 +101,31 @@ public class CraftingBlocks extends BlockList implements ContentList{ size = 2; consumes.power(0.02f); - consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 2), new ItemStack(Items.sand, 2)); + consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 1), new ItemStack(Items.sand, 1)); }}; melter = new PowerCrafter("melter"){{ health = 200; - outputLiquid = Liquids.lava; + outputLiquid = Liquids.slag; outputLiquidAmount = 1f; - itemCapacity = 20; craftTime = 10f; + size = 2; hasLiquids = hasPower = true; consumes.power(0.1f); - consumes.item(Items.stone, 1); + consumes.item(Items.scrap, 1); }}; separator = new Separator("separator"){{ results = new ItemStack[]{ - new ItemStack(null, 10), - new ItemStack(Items.sand, 10), - new ItemStack(Items.stone, 9), - new ItemStack(Items.copper, 4), - new ItemStack(Items.lead, 2), - new ItemStack(Items.coal, 2), - new ItemStack(Items.titanium, 1), - }; - filterTime = 40f; - itemCapacity = 40; - health = 50; - - consumes.item(Items.stone, 2); - consumes.liquid(Liquids.water, 0.3f); - }}; - - centrifuge = new Separator("centrifuge"){{ - results = new ItemStack[]{ - new ItemStack(null, 13), - new ItemStack(Items.sand, 12), - new ItemStack(Items.stone, 11), new ItemStack(Items.copper, 5), new ItemStack(Items.lead, 3), - new ItemStack(Items.coal, 3), new ItemStack(Items.titanium, 2), new ItemStack(Items.thorium, 1) }; hasPower = true; filterTime = 15f; - itemCapacity = 60; health = 50 * 4; spinnerLength = 1.5f; spinnerRadius = 3.5f; @@ -184,14 +133,12 @@ public class CraftingBlocks extends BlockList implements ContentList{ spinnerSpeed = 3f; size = 2; - consumes.item(Items.stone, 2); - consumes.power(0.2f); - consumes.liquid(Liquids.water, 0.5f); + consumes.power(0.1f); + consumes.liquid(Liquids.slag, 0.2f); }}; biomatterCompressor = new Compressor("biomattercompressor"){{ liquidCapacity = 60f; - itemCapacity = 50; craftTime = 20f; outputLiquid = Liquids.oil; outputLiquidAmount = 2.5f; @@ -204,30 +151,16 @@ public class CraftingBlocks extends BlockList implements ContentList{ }}; pulverizer = new Pulverizer("pulverizer"){{ - itemCapacity = 40; output = Items.sand; - health = 80; craftEffect = BlockFx.pulverize; craftTime = 40f; updateEffect = BlockFx.pulverizeSmall; hasItems = hasPower = true; - consumes.item(Items.stone, 1); + consumes.item(Items.scrap, 1); consumes.power(0.05f); }}; - solidifier = new GenericCrafter("solidifer"){{ - liquidCapacity = 21f; - craftTime = 14; - output = Items.stone; - itemCapacity = 20; - health = 80; - craftEffect = BlockFx.purifystone; - hasLiquids = hasItems = true; - - consumes.liquid(Liquids.lava, 1f); - }}; - incinerator = new Incinerator("incinerator"){{ health = 90; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java index 1652a4bff6..053339535b 100644 --- a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java @@ -84,13 +84,13 @@ public class TurretBlocks extends BlockList implements ContentList{ }}; lancer = new ChargeTurret("lancer"){{ - range = 90f; - chargeTime = 60f; + range = 170f; + chargeTime = 50f; chargeMaxDelay = 30f; chargeEffects = 7; shootType = AmmoTypes.lancerLaser; recoil = 2f; - reload = 100f; + reload = 120f; cooldown = 0.03f; powerUsed = 1 / 3f; consumes.powerBuffered(60f); @@ -107,13 +107,13 @@ public class TurretBlocks extends BlockList implements ContentList{ arc = new PowerTurret("arc"){{ shootType = AmmoTypes.arc; - reload = 85f; - shootShake = 1f; + reload = 20f; + shootShake = 0f; shootCone = 40f; rotatespeed = 8f; powerUsed = 1f / 3f; consumes.powerBuffered(30f); - range = 150f; + range = 50f; shootEffect = ShootFx.lightningShoot; heatColor = Color.RED; recoil = 1f; diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java index 1bce07f371..fb0c69b0e2 100644 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java @@ -142,11 +142,11 @@ public class TurretBullets extends BulletList implements ContentList{ } }; - lancerLaser = new BulletType(0.001f, 140){ + lancerLaser = new BulletType(0.001f, 60){ Color[] colors = {Palette.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Palette.lancerLaser, Color.WHITE}; float[] tscales = {1f, 0.7f, 0.5f, 0.2f}; float[] lenscales = {1f, 1.1f, 1.13f, 1.14f}; - float length = 100f; + float length = 170f; { hiteffect = BulletFx.hitLancer; @@ -315,7 +315,7 @@ public class TurretBullets extends BulletList implements ContentList{ } }; - arc = new BulletType(0.001f, 26){ + arc = new BulletType(0.001f, 8){ { lifetime = 1; despawneffect = Fx.none; diff --git a/core/src/io/anuke/mindustry/maps/TutorialSector.java b/core/src/io/anuke/mindustry/maps/TutorialSector.java index 436f0678c2..1886f8cafc 100644 --- a/core/src/io/anuke/mindustry/maps/TutorialSector.java +++ b/core/src/io/anuke/mindustry/maps/TutorialSector.java @@ -2,7 +2,6 @@ package io.anuke.mindustry.maps; import io.anuke.arc.collection.Array; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.blocks.CraftingBlocks; import io.anuke.mindustry.content.blocks.ProductionBlocks; import io.anuke.mindustry.content.blocks.StorageBlocks; import io.anuke.mindustry.content.blocks.UnitBlocks; @@ -97,7 +96,7 @@ public class TutorialSector{ new ItemMission(Items.copper, 100), new ItemMission(Items.lead, 50), - new BlockMission(CraftingBlocks.smelter), +// new BlockMission(CraftingBlocks.smelter), new ItemMission(Items.densealloy, 10), new WaveMission(5) ); diff --git a/core/src/io/anuke/mindustry/type/Recipe.java b/core/src/io/anuke/mindustry/type/Recipe.java index 2ac7590bd6..d14451de12 100644 --- a/core/src/io/anuke/mindustry/type/Recipe.java +++ b/core/src/io/anuke/mindustry/type/Recipe.java @@ -37,7 +37,6 @@ public class Recipe extends UnlockableContent{ public boolean alwaysUnlocked; private UnlockableContent[] dependencies; - private Block[] blockDependencies; public Recipe(Category category, Block result, ItemStack... requirements){ this.result = result; @@ -151,28 +150,6 @@ public class Recipe extends UnlockableContent{ } } - @Override - public UnlockableContent[] getDependencies(){ - if(blockDependencies != null && dependencies == null){ - dependencies = new UnlockableContent[blockDependencies.length]; - for(int i = 0; i < dependencies.length; i++){ - dependencies[i] = Recipe.getByResult(blockDependencies[i]); - } - return dependencies; - } - return dependencies; - } - - public Recipe setDependencies(UnlockableContent... dependencies){ - this.dependencies = dependencies; - return this; - } - - public Recipe setDependencies(Block... dependencies){ - this.blockDependencies = dependencies; - return this; - } - public enum RecipeVisibility{ mobileOnly(true, false), desktopOnly(false, true), diff --git a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java index 8365e7323d..d7897fc520 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java @@ -31,7 +31,6 @@ import io.anuke.mindustry.net.Net; import io.anuke.mindustry.net.Packets.AdminAction; import io.anuke.mindustry.type.Recipe; import io.anuke.mindustry.ui.IntFormat; -import io.anuke.mindustry.ui.Minimap; import io.anuke.mindustry.ui.dialogs.FloatingDialog; import static io.anuke.mindustry.Vars.*; diff --git a/core/src/io/anuke/mindustry/world/BaseBlock.java b/core/src/io/anuke/mindustry/world/BaseBlock.java index 82088ff38e..835f764760 100644 --- a/core/src/io/anuke/mindustry/world/BaseBlock.java +++ b/core/src/io/anuke/mindustry/world/BaseBlock.java @@ -28,7 +28,7 @@ public abstract class BaseBlock extends MappableContent{ public boolean consumesPower = true; public boolean outputsPower = false; - public int itemCapacity; + public int itemCapacity = 10; public float liquidCapacity = 10f; public float liquidFlowFactor = 4.9f; diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index f579d3b683..cbdda80858 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -365,6 +365,10 @@ public class Tile implements Position, TargetTrait{ cost += 1; } + if(target().synthetic()){ + cost += target().block().health / 10f; + } + if(floor.isLiquid){ cost += 100f; } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java index a8a76c46a6..e0a3a2c3e1 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java @@ -55,7 +55,6 @@ public class ForceProjector extends Block { canOverdrive = false; hasLiquids = true; hasItems = true; - itemCapacity = 10; consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.1f)).optional(true).update(false); consumePower = new ConsumeForceProjectorPower(60f, 60f); consumes.add(consumePower); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java index 503ad4c2f1..a945cfdf68 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java @@ -44,7 +44,6 @@ public class MendProjector extends Block{ update = true; hasPower = true; hasItems = true; - itemCapacity = 10; } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java index 32f8498d59..100856eeca 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java @@ -45,7 +45,6 @@ public class OverdriveProjector extends Block{ hasPower = true; hasItems = true; canOverdrive = false; - itemCapacity = 10; } @Override diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index cb639260c4..15aab629bd 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -28,7 +28,7 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; public class Conveyor extends Block{ - private static final float itemSpace = 0.135f * 2.5f; + private static final float itemSpace = 0.135f * 4f; private static final float offsetScl = 128f * 3f; private static final float minmove = 1f / (Short.MAX_VALUE - 2); private static ItemPos drawpos = new ItemPos(); diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index b4fa156706..ba9b8dea28 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -68,7 +68,6 @@ public class Drill extends Block{ update = true; solid = true; layer = Layer.overlay; - itemCapacity = 5; group = BlockGroup.drills; hasLiquids = true; liquidCapacity = 5f; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Fracker.java b/core/src/io/anuke/mindustry/world/blocks/production/Fracker.java index d84517128b..efebd3c73f 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Fracker.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Fracker.java @@ -18,7 +18,6 @@ public class Fracker extends SolidPump{ public Fracker(String name){ super(name); hasItems = true; - itemCapacity = 20; singleLiquid = false; consumes.require(ConsumeItem.class); diff --git a/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java b/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java index a2423363ae..a26a41d1a4 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java @@ -1,8 +1,15 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; +import io.anuke.arc.entities.Effects; +import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.graphics.g2d.TextureRegion; +import io.anuke.arc.math.Mathf; +import io.anuke.arc.util.Time; +import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.fx.BlockFx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; @@ -11,18 +18,12 @@ import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.PowerBlock; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.StatUnit; -import io.anuke.arc.entities.Effects; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.util.Time; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.math.Mathf; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; -import static io.anuke.mindustry.Vars.*; +import static io.anuke.mindustry.Vars.content; public class PowerSmelter extends PowerBlock{ protected final int timerDump = timers++; @@ -52,11 +53,14 @@ public class PowerSmelter extends PowerBlock{ hasItems = true; update = true; solid = true; - itemCapacity = 20; } @Override public void init(){ + if(useFlux){ + consumes.item(Items.sand).optional(true); + } + super.init(); produces.set(result); diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Separator.java b/core/src/io/anuke/mindustry/world/blocks/production/Separator.java index 26cfde40f7..d1cdccf51a 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Separator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Separator.java @@ -2,20 +2,19 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.graphics.g2d.TextureRegion; -import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.Liquids; +import io.anuke.arc.math.Mathf; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.production.GenericCrafter.GenericCrafterEntity; +import io.anuke.mindustry.world.consumers.ConsumeItem; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.values.ItemFilterValue; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Mathf; /** * Extracts a random list of items from an input item and an input liquid. @@ -41,9 +40,6 @@ public class Separator extends Block{ solid = true; hasItems = true; hasLiquids = true; - - consumes.item(Items.stone); - consumes.liquid(Liquids.water, 0.1f); } @Override @@ -103,7 +99,7 @@ public class Separator extends Block{ int count = 0; Item item = null; - //TODO possible desync since items are random + //TODO guaranteed desync since items are random for(ItemStack stack : results){ if(i >= count && i < count + stack.amount){ item = stack.item; @@ -112,8 +108,11 @@ public class Separator extends Block{ count += stack.amount; } - entity.items.remove(consumes.item(), consumes.itemAmount()); - if(item != null){ + if(consumes.has(ConsumeItem.class)){ + entity.items.remove(consumes.item(), consumes.itemAmount()); + } + + if(item != null && entity.items.get(item) < itemCapacity){ offloading = true; offloadNear(tile, item); offloading = false; 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 985a9f0d75..d8ac64705f 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java @@ -40,7 +40,6 @@ public class Smelter extends Block{ update = true; hasItems = true; solid = true; - itemCapacity = 20; consumes.require(ConsumeItems.class); consumes.require(ConsumeItem.class); diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java index d33212a858..c31c44d030 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java @@ -36,9 +36,6 @@ import java.io.IOException; import static io.anuke.mindustry.Vars.*; public class CoreBlock extends StorageBlock{ - protected float droneRespawnDuration = 60 * 6; - protected UnitType droneType = UnitTypes.spirit; - protected TextureRegion openRegion; protected TextureRegion topRegion; @@ -187,38 +184,11 @@ public class CoreBlock extends StorageBlock{ } entity.heat = Mathf.lerpDelta(entity.heat, 1f, 0.1f); entity.time += entity.delta(); - entity.progress += 1f / (entity.currentUnit instanceof Player ? state.mode.respawnTime : droneRespawnDuration) * entity.delta(); + entity.progress += 1f / state.mode.respawnTime * entity.delta(); if(entity.progress >= 1f){ Call.onUnitRespawn(tile, entity.currentUnit); } - }else if(!netServer.isWaitingForPlayers()){ - entity.warmup += Time.delta(); - - if(entity.solid && entity.warmup > 60f && unitGroups[tile.getTeamID()].getByID(entity.droneID) == null && !Net.client()){ - - boolean found = false; - for(BaseUnit unit : unitGroups[tile.getTeamID()].all()){ - if(unit.getType().id == droneType.id){ - entity.droneID = unit.id; - found = true; - break; - } - } - - if(!found && !TutorialSector.supressDrone()){ - BaseUnit unit = droneType.create(tile.getTeam()); - unit.setSpawner(tile); - unit.setDead(true); - unit.add(); - - useContent(tile, droneType); - - entity.droneID = unit.id; - } - } - - entity.heat = Mathf.lerpDelta(entity.heat, 0f, 0.1f); } } @@ -229,9 +199,7 @@ public class CoreBlock extends StorageBlock{ public class CoreEntity extends TileEntity implements SpawnerTrait{ public Unit currentUnit; - int droneID = -1; boolean solid = true; - float warmup; float progress; float time; float heat; @@ -253,13 +221,11 @@ public class CoreBlock extends StorageBlock{ @Override public void write(DataOutput stream) throws IOException{ stream.writeBoolean(solid); - stream.writeInt(droneID); } @Override public void read(DataInput stream) throws IOException{ solid = stream.readBoolean(); - droneID = stream.readInt(); } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java index 72fa6e0939..8eaaaeee70 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java @@ -48,7 +48,6 @@ public class UnitFactory extends Block{ hasPower = true; hasItems = true; solid = false; - itemCapacity = 10; flags = EnumSet.of(BlockFlag.producer, BlockFlag.target); consumes.require(ConsumeItems.class);