Oyxgen env

This commit is contained in:
Anuken
2021-08-20 10:06:16 -04:00
parent cd7103e3f4
commit f0a8c6e281
3 changed files with 17 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ public class Rules{
/** Base unit cap. Can still be increased by blocks. */
public int unitCap = 0;
/** Environmental flags that dictate visuals & how blocks function. */
public int environment = Env.terrestrial | Env.spores | Env.groundOil | Env.groundWater;
public int environment = Env.terrestrial | Env.spores | Env.groundOil | Env.groundWater | Env.oxygen;
/** Attributes of the environment. */
public Attributes attributes = new Attributes();
/** Sector for saves that have them. */
@@ -140,6 +140,10 @@ public class Rules{
}
}
public boolean hasEnv(int env){
return (environment & env) != 0;
}
public float unitBuildSpeed(Team team){
return unitBuildSpeedMultiplier * teams.get(team).unitBuildSpeedMultiplier;
}