This commit is contained in:
Anuken
2022-02-16 15:28:22 -05:00
parent eaf02e8328
commit e86b4b0192
3 changed files with 12 additions and 2 deletions

View File

@@ -51,6 +51,7 @@ public class Liquids{
viscosity = 0.85f;
flammability = 0.1f;
capPuddles = false;
hidden = true;
colorFrom = Color.valueOf("f98f4a");
colorTo = Color.valueOf("9e172c");

View File

@@ -1236,7 +1236,7 @@ public class UnitTypes{
//region air support
mono = new UnitType("mono"){{
defaultController = MinerAI::new;
unitBasedDefaultController = u -> new MinerAI();
flying = true;
drag = 0.06f;
@@ -1255,7 +1255,7 @@ public class UnitTypes{
}};
poly = new UnitType("poly"){{
defaultController = BuilderAI::new;
unitBasedDefaultController = u -> new BuilderAI();
flying = true;
drag = 0.05f;
@@ -1310,6 +1310,7 @@ public class UnitTypes{
}};
mega = new UnitType("mega"){{
//TODO control?
defaultController = RepairAI::new;
mineTier = 3;
@@ -3318,6 +3319,7 @@ public class UnitTypes{
isCounted = false;
allowedInPayloads = false;
logicControllable = false;
playerControllable = false;
envDisabled = 0;
payloadCapacity = 0f;

View File

@@ -57,6 +57,8 @@ public class Liquid extends UnlockableContent implements Senseable{
public boolean capPuddles = true;
/** Effect when this liquid vaporizes. */
public Effect vaporEffect = Fx.vapor;
/** If true, this liquid is hidden in most UI. */
public boolean hidden;
public Liquid(String name, Color color){
super(name);
@@ -89,6 +91,11 @@ public class Liquid extends UnlockableContent implements Senseable{
}
}
@Override
public boolean isHidden(){
return hidden;
}
public int getAnimationFrame(){
return (int)(Time.time / (gas ? animationScaleGas : animationScaleLiquid) * animationFrames + id*5) % animationFrames;
}