diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 501c1bc062..ee5301ce6f 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -443,6 +443,8 @@ text.liquid.heatcapacity=[LIGHT_GRAY]Heat Capacity: {0} text.liquid.viscosity=[LIGHT_GRAY]Viscosity: {0} text.liquid.temperature=[LIGHT_GRAY]Temperature: {0} +block.core.name=Core +block.metalfloor.name=Metal Floor block.deepwater.name=deepwater block.water.name=water block.lava.name=lava diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index 86ffde48cd..3c9fdeefd1 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -37,14 +37,23 @@ public class Mechs implements ContentList{ @Override public void load(){ - alpha = new Mech("alpha-mech", false){{ - drillPower = 1; - mineSpeed = 1.5f; - speed = 0.5f; - boostSpeed = 0.85f; - weapon = Weapons.blaster; - maxSpeed = 4f; - }}; + alpha = new Mech("alpha-mech", false){ + { + drillPower = 1; + mineSpeed = 1.5f; + speed = 0.5f; + boostSpeed = 0.85f; + weapon = Weapons.blaster; + maxSpeed = 4f; + } + + @Override + public void updateAlt(Player player){ + if(player.altHeat >= 0.91f){ + + } + } + }; delta = new Mech("delta-mech", false){ { diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index a40bb31d92..d7eb75db0a 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -476,6 +476,9 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra updateShooting(); //server simulates player shooting } return; + }else{ + //unlock mech when used + control.database().unlockContent(mech); } if(mobile){ diff --git a/core/src/io/anuke/mindustry/type/Mech.java b/core/src/io/anuke/mindustry/type/Mech.java index be903f2428..dd1329f3d1 100644 --- a/core/src/io/anuke/mindustry/type/Mech.java +++ b/core/src/io/anuke/mindustry/type/Mech.java @@ -10,6 +10,8 @@ import io.anuke.mindustry.ui.ContentDisplay; import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.scene.ui.layout.Table; +import static io.anuke.mindustry.Vars.mobile; + //TODO merge unit type with mech public class Mech extends Upgrade implements UnlockableContent{ public boolean flying; @@ -55,6 +57,11 @@ public class Mech extends Upgrade implements UnlockableContent{ public float getRotationAlpha(Player player){return 1f;} + @Override + public boolean isHidden() { + return !flying && mobile; + } + @Override public void displayInfo(Table table){ ContentDisplay.displayMech(table, this);