From a3c52433804e5bb25a5945a9da25e2b979983e5e Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 23 Jan 2022 22:30:03 -0500 Subject: [PATCH] Erekir tech tree tweaks --- core/src/mindustry/content/Blocks.java | 2 ++ core/src/mindustry/content/ErekirTechTree.java | 2 +- core/src/mindustry/content/UnitTypes.java | 3 +++ core/src/mindustry/entities/comp/MinerComp.java | 4 ++-- core/src/mindustry/type/UnitType.java | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 077d2c2619..208048c63d 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2181,6 +2181,7 @@ public class Blocks{ hasLiquids = true; outputLiquid = new LiquidStack(Liquids.water, 5f / 60f / 9f); liquidCapacity = 20f; + researchCostMultiplier = 0.2f; }}; //TODO rename @@ -2386,6 +2387,7 @@ public class Blocks{ tier = 4; size = 2; range = 4; + researchCostMultiplier = 0.2f; consumes.liquid(Liquids.hydrogen, 0.25f / 60f).boost(); }}; diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 64bf774662..9840061cb5 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -168,7 +168,7 @@ public class ErekirTechTree{ }); }); - node(breach, () -> { + node(breach, Seq.with(new Research(siliconArcFurnace)), () -> { node(berylliumWall, () -> { node(berylliumWallLarge, () -> { diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index b771aea1c2..078002aae7 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -2702,6 +2702,7 @@ public class UnitTypes{ lowAltitude = false; mineWalls = true; mineFloor = false; + mineHardnessScaling = false; flying = true; mineSpeed = 4f; mineTier = 4; @@ -2763,6 +2764,7 @@ public class UnitTypes{ mineWalls = true; targetAir = false; mineFloor = false; + mineHardnessScaling = false; mineSpeed = 5f; mineTier = 4; buildSpeed = 1.4f; @@ -2822,6 +2824,7 @@ public class UnitTypes{ targetAir = false; mineWalls = true; mineFloor = false; + mineHardnessScaling = false; mineSpeed = 6f; mineTier = 4; buildSpeed = 2f; diff --git a/core/src/mindustry/entities/comp/MinerComp.java b/core/src/mindustry/entities/comp/MinerComp.java index c9759b9c8a..495c03283d 100644 --- a/core/src/mindustry/entities/comp/MinerComp.java +++ b/core/src/mindustry/entities/comp/MinerComp.java @@ -89,13 +89,13 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ mineTile = null; mineTimer = 0f; }else if(mining() && item != null){ - mineTimer += Time.delta *type.mineSpeed; + mineTimer += Time.delta * type.mineSpeed; if(Mathf.chance(0.06 * Time.delta)){ Fx.pulverizeSmall.at(mineTile.worldx() + Mathf.range(tilesize / 2f), mineTile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color); } - if(mineTimer >= 50f + item.hardness*15f){ + if(mineTimer >= 50f + (type.mineHardnessScaling ? item.hardness*15f : 15f)){ mineTimer = 0; if(state.rules.sector != null && team() == state.rules.defaultTeam) state.rules.sector.info.handleProduction(item, 1); diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 33c730da97..1ebc8903bf 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -128,6 +128,7 @@ public class UnitType extends UnlockableContent{ public AmmoType ammoType = new ItemAmmoType(Items.copper); public int mineTier = -1; public boolean mineWalls = false, mineFloor = true; + public boolean mineHardnessScaling = true; public float buildSpeed = -1f, mineSpeed = 1f; public Sound mineSound = Sounds.minebeam; public float mineSoundVolume = 0.6f;