mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-12 00:38:44 +07:00
Unlockable mechs
This commit is contained in:
@ -443,6 +443,8 @@ text.liquid.heatcapacity=[LIGHT_GRAY]Heat Capacity: {0}
|
|||||||
text.liquid.viscosity=[LIGHT_GRAY]Viscosity: {0}
|
text.liquid.viscosity=[LIGHT_GRAY]Viscosity: {0}
|
||||||
text.liquid.temperature=[LIGHT_GRAY]Temperature: {0}
|
text.liquid.temperature=[LIGHT_GRAY]Temperature: {0}
|
||||||
|
|
||||||
|
block.core.name=Core
|
||||||
|
block.metalfloor.name=Metal Floor
|
||||||
block.deepwater.name=deepwater
|
block.deepwater.name=deepwater
|
||||||
block.water.name=water
|
block.water.name=water
|
||||||
block.lava.name=lava
|
block.lava.name=lava
|
||||||
|
@ -37,14 +37,23 @@ public class Mechs implements ContentList{
|
|||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
|
|
||||||
alpha = new Mech("alpha-mech", false){{
|
alpha = new Mech("alpha-mech", false){
|
||||||
|
{
|
||||||
drillPower = 1;
|
drillPower = 1;
|
||||||
mineSpeed = 1.5f;
|
mineSpeed = 1.5f;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
boostSpeed = 0.85f;
|
boostSpeed = 0.85f;
|
||||||
weapon = Weapons.blaster;
|
weapon = Weapons.blaster;
|
||||||
maxSpeed = 4f;
|
maxSpeed = 4f;
|
||||||
}};
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAlt(Player player){
|
||||||
|
if(player.altHeat >= 0.91f){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
delta = new Mech("delta-mech", false){
|
delta = new Mech("delta-mech", false){
|
||||||
{
|
{
|
||||||
|
@ -476,6 +476,9 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||||||
updateShooting(); //server simulates player shooting
|
updateShooting(); //server simulates player shooting
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
}else{
|
||||||
|
//unlock mech when used
|
||||||
|
control.database().unlockContent(mech);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mobile){
|
if(mobile){
|
||||||
|
@ -10,6 +10,8 @@ import io.anuke.mindustry.ui.ContentDisplay;
|
|||||||
import io.anuke.ucore.graphics.Draw;
|
import io.anuke.ucore.graphics.Draw;
|
||||||
import io.anuke.ucore.scene.ui.layout.Table;
|
import io.anuke.ucore.scene.ui.layout.Table;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.mobile;
|
||||||
|
|
||||||
//TODO merge unit type with mech
|
//TODO merge unit type with mech
|
||||||
public class Mech extends Upgrade implements UnlockableContent{
|
public class Mech extends Upgrade implements UnlockableContent{
|
||||||
public boolean flying;
|
public boolean flying;
|
||||||
@ -55,6 +57,11 @@ public class Mech extends Upgrade implements UnlockableContent{
|
|||||||
|
|
||||||
public float getRotationAlpha(Player player){return 1f;}
|
public float getRotationAlpha(Player player){return 1f;}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHidden() {
|
||||||
|
return !flying && mobile;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void displayInfo(Table table){
|
public void displayInfo(Table table){
|
||||||
ContentDisplay.displayMech(table, this);
|
ContentDisplay.displayMech(table, this);
|
||||||
|
Reference in New Issue
Block a user