mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Unlockable mechs
This commit is contained in:
parent
206314f4f4
commit
5de61aaed3
@ -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
|
||||
|
@ -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){
|
||||
{
|
||||
|
@ -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){
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user