From a6f7bd909994123bb2d492a425e5714ffcdfef1e Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Jan 2019 21:22:06 -0500 Subject: [PATCH] Cleanup --- .../io/anuke/mindustry/content/Blocks.java | 58 ++++++++++++++----- core/src/io/anuke/mindustry/content/Fx.java | 2 +- .../io/anuke/mindustry/content/Recipes.java | 4 +- .../mindustry/entities/UnitInventory.java | 3 +- .../mindustry/entities/units/UnitDrops.java | 2 +- core/src/io/anuke/mindustry/maps/Sectors.java | 8 +-- .../blocks/power/LiquidHeatGenerator.java | 3 +- 7 files changed, 53 insertions(+), 27 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index 4c5ad492f1..d2cdfc429d 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -28,24 +28,50 @@ import static io.anuke.mindustry.Vars.content; public class Blocks implements ContentList{ public static Block - air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, - blackstone, dirt, sand, ice, snow, grass, shrub, rock, icerock, blackrock, smelter, siliconSmelter, - plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidmixer, melter, separator, - centrifuge, biomatterCompressor, pulverizer, incinerator, powerVoid, powerSource, itemSource, liquidSource, - itemVoid, copperWall, copperWallLarge, graphiteWall, graphiteWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, - phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine, conveyor, - titaniumconveyor, distributor, junction, itemBridge, phaseConveyor, sorter, router, overflowGate, massDriver, mechanicalPump, - rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit, + //environment + air, blockpart, spawn, space, metalfloor, deepwater, water, lava, tar, stone, blackstone, dirt, sand, ice, snow, + grass, shrub, rock, icerock, blackrock, + + //crafting + smelter, siliconSmelter, plastaniumCompressor, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidmixer, + melter, separator, centrifuge, biomatterCompressor, pulverizer, incinerator, + + //sandbox + powerVoid, powerSource, itemSource, liquidSource, itemVoid, + + //defense + copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge, + phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mendProjector, overdriveProjector, forceProjector, shockMine, + + //transport + conveyor, titaniumconveyor, distributor, junction, itemBridge, phaseConveyor, sorter, router, overflowGate, massDriver, + + //liquids + mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, liquidRouter, liquidtank, liquidJunction, bridgeConduit, phaseConduit, + + //power combustionGenerator, thermalGenerator, turbineGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor, - fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge, mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, - plasmaDrill, waterExtractor, oilExtractor, cultivator, core, vault, container, unloader, duo, scorch, hail, wave, lancer, - arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, - revenantFactory, daggerFactory, titanFactory, fortressFactory, reconstructor, repairPoint, commandCenter, alphaPad, deltaPad, - tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad; + fusionReactor, battery, batteryLarge, powerNode, powerNodeLarge, + + //production + mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, plasmaDrill, waterExtractor, oilExtractor, cultivator, + + //storage + core, vault, container, unloader, + + //turrets + duo, scorch, hail, wave, lancer, arc, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown, + + //units + spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, titanFactory, + fortressFactory, reconstructor, repairPoint, commandCenter, + + //upgrades + alphaPad, deltaPad, tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad; @Override public void load(){ - //region environment blocks + //region environment air = new Floor("air"){ { @@ -354,11 +380,11 @@ public class Blocks implements ContentList{ size = 2; }}; - graphiteWall = new Wall("dense-alloy-wall"){{ + titaniumWall = new Wall("titanium-wall"){{ health = 110 * wallHealthMultiplier; }}; - graphiteWallLarge = new Wall("dense-alloy-wall-large"){{ + titaniumWallLarge = new Wall("titanium-wall-large"){{ health = 110 * wallHealthMultiplier * 4; size = 2; }}; diff --git a/core/src/io/anuke/mindustry/content/Fx.java b/core/src/io/anuke/mindustry/content/Fx.java index 07277b8d1f..03325d4dc6 100644 --- a/core/src/io/anuke/mindustry/content/Fx.java +++ b/core/src/io/anuke/mindustry/content/Fx.java @@ -476,7 +476,7 @@ public class Fx implements ContentList{ }); melting = new Effect(40f, e -> { - Draw.color(Liquids.lava.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); + Draw.color(Liquids.slag.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> { Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f); diff --git a/core/src/io/anuke/mindustry/content/Recipes.java b/core/src/io/anuke/mindustry/content/Recipes.java index f0d86e9214..dfcd04ab0f 100644 --- a/core/src/io/anuke/mindustry/content/Recipes.java +++ b/core/src/io/anuke/mindustry/content/Recipes.java @@ -25,8 +25,8 @@ public class Recipes implements ContentList{ new Recipe(defense, Blocks.copperWall, new ItemStack(Items.copper, 12)).setAlwaysUnlocked(true); new Recipe(defense, Blocks.copperWallLarge, new ItemStack(Items.copper, 12 * 4)).setAlwaysUnlocked(true); - new Recipe(defense, Blocks.denseAlloyWall, new ItemStack(Items.titanium, 12)); - new Recipe(defense, Blocks.denseAlloyWallLarge, new ItemStack(Items.titanium, 12 * 4)); + new Recipe(defense, Blocks.titaniumWall, new ItemStack(Items.titanium, 12)); + new Recipe(defense, Blocks.titaniumWallLarge, new ItemStack(Items.titanium, 12 * 4)); new Recipe(defense, Blocks.door, new ItemStack(Items.titanium, 12), new ItemStack(Items.silicon, 8)); new Recipe(defense, Blocks.doorLarge, new ItemStack(Items.titanium, 12 * 4), new ItemStack(Items.silicon, 8 * 4)); diff --git a/core/src/io/anuke/mindustry/entities/UnitInventory.java b/core/src/io/anuke/mindustry/entities/UnitInventory.java index b4b19d65e8..d4d27d3a3d 100644 --- a/core/src/io/anuke/mindustry/entities/UnitInventory.java +++ b/core/src/io/anuke/mindustry/entities/UnitInventory.java @@ -1,6 +1,5 @@ package io.anuke.mindustry.entities; -import io.anuke.mindustry.content.Items; import io.anuke.mindustry.entities.traits.Saveable; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; @@ -13,7 +12,7 @@ import static io.anuke.mindustry.Vars.content; public class UnitInventory implements Saveable{ private final Unit unit; - private ItemStack item = new ItemStack(Items.stone, 0); + private ItemStack item = new ItemStack(content.item(0), 0); public UnitInventory(Unit unit){ this.unit = unit; diff --git a/core/src/io/anuke/mindustry/entities/units/UnitDrops.java b/core/src/io/anuke/mindustry/entities/units/UnitDrops.java index 25a20a5e45..b3b6d2b36c 100644 --- a/core/src/io/anuke/mindustry/entities/units/UnitDrops.java +++ b/core/src/io/anuke/mindustry/entities/units/UnitDrops.java @@ -23,7 +23,7 @@ public class UnitDrops{ } if(dropTable == null){ - dropTable = new Item[]{Items.densealloy, Items.silicon, Items.lead, Items.copper}; + dropTable = new Item[]{Items.titanium, Items.silicon, Items.lead, Items.copper}; } for(int i = 0; i < 3; i++){ diff --git a/core/src/io/anuke/mindustry/maps/Sectors.java b/core/src/io/anuke/mindustry/maps/Sectors.java index 98ca76e9b5..7adcef5f5d 100644 --- a/core/src/io/anuke/mindustry/maps/Sectors.java +++ b/core/src/io/anuke/mindustry/maps/Sectors.java @@ -217,13 +217,13 @@ public class Sectors{ //set starter items if(sector.difficulty > 12){ //now with titanium - sector.startingItems = Array.with(new ItemStack(Items.copper, 1900), new ItemStack(Items.lead, 500), new ItemStack(Items.densealloy, 470), new ItemStack(Items.silicon, 460), new ItemStack(Items.titanium, 230)); + sector.startingItems = Array.with(new ItemStack(Items.copper, 1900), new ItemStack(Items.lead, 500), new ItemStack(Items.graphite, 470), new ItemStack(Items.silicon, 460), new ItemStack(Items.titanium, 230)); }else if(sector.difficulty > 8){ //just more resources - sector.startingItems = Array.with(new ItemStack(Items.copper, 1500), new ItemStack(Items.lead, 400), new ItemStack(Items.densealloy, 340), new ItemStack(Items.silicon, 250)); + sector.startingItems = Array.with(new ItemStack(Items.copper, 1500), new ItemStack(Items.lead, 400), new ItemStack(Items.graphite, 340), new ItemStack(Items.silicon, 250)); }else if(sector.difficulty > 5){ //now with silicon - sector.startingItems = Array.with(new ItemStack(Items.copper, 950), new ItemStack(Items.lead, 300), new ItemStack(Items.densealloy, 190), new ItemStack(Items.silicon, 140)); + sector.startingItems = Array.with(new ItemStack(Items.copper, 950), new ItemStack(Items.lead, 300), new ItemStack(Items.graphite, 190), new ItemStack(Items.silicon, 140)); }else if(sector.difficulty > 3){ //now with carbide - sector.startingItems = Array.with(new ItemStack(Items.copper, 700), new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 130)); + sector.startingItems = Array.with(new ItemStack(Items.copper, 700), new ItemStack(Items.lead, 200), new ItemStack(Items.graphite, 130)); }else if(sector.difficulty > 2){ //more starter items for faster start sector.startingItems = Array.with(new ItemStack(Items.copper, 400), new ItemStack(Items.lead, 100)); }else{ //empty default diff --git a/core/src/io/anuke/mindustry/world/blocks/power/LiquidHeatGenerator.java b/core/src/io/anuke/mindustry/world/blocks/power/LiquidHeatGenerator.java index bf65ea8bd5..658a6926dc 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/LiquidHeatGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/LiquidHeatGenerator.java @@ -5,6 +5,7 @@ import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.meta.BlockStat; import io.anuke.mindustry.world.meta.StatUnit; +//TODO remove, as this is no longer a thing public class LiquidHeatGenerator extends ItemLiquidGenerator{ public LiquidHeatGenerator(String name){ @@ -17,7 +18,7 @@ public class LiquidHeatGenerator extends ItemLiquidGenerator{ stats.remove(BlockStat.basePowerGeneration); // Right now, Lava is the only thing that can be used. - stats.add(BlockStat.basePowerGeneration, powerProduction * getLiquidEfficiency(Liquids.lava) / maxLiquidGenerate * 60f, StatUnit.powerSecond); + stats.add(BlockStat.basePowerGeneration, powerProduction * getLiquidEfficiency(Liquids.slag) / maxLiquidGenerate * 60f, StatUnit.powerSecond); } @Override