Fixed #7841
This commit is contained in:
@@ -71,16 +71,17 @@ public class Planets{
|
||||
//TODO SHOULD there be lighting?
|
||||
updateLighting = false;
|
||||
|
||||
defaultAttributes.set(Attribute.heat, 0.8f);
|
||||
|
||||
ruleSetter = r -> {
|
||||
r.waveTeam = Team.malis;
|
||||
r.placeRangeCheck = false; //TODO true or false?
|
||||
r.attributes.set(Attribute.heat, 0.8f);
|
||||
r.placeRangeCheck = false;
|
||||
r.showSpawns = true;
|
||||
r.fog = true;
|
||||
r.staticFog = true;
|
||||
r.lighting = false;
|
||||
r.coreDestroyClear = true;
|
||||
r.onlyDepositCore = true; //TODO not sure
|
||||
r.onlyDepositCore = true;
|
||||
};
|
||||
|
||||
unlockedOnLand.add(Blocks.coreBastion);
|
||||
@@ -139,7 +140,6 @@ public class Planets{
|
||||
ruleSetter = r -> {
|
||||
r.waveTeam = Team.crux;
|
||||
r.placeRangeCheck = false;
|
||||
r.attributes.clear();
|
||||
r.showSpawns = false;
|
||||
};
|
||||
iconColor = Color.valueOf("7d4dff");
|
||||
|
||||
@@ -18,6 +18,7 @@ import mindustry.graphics.g3d.*;
|
||||
import mindustry.graphics.g3d.PlanetGrid.*;
|
||||
import mindustry.maps.generators.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
@@ -69,6 +70,8 @@ public class Planet extends UnlockableContent{
|
||||
public boolean accessible = true;
|
||||
/** Environment flags for sectors on this planet. */
|
||||
public int defaultEnv = Env.terrestrial | Env.spores | Env.groundOil | Env.groundWater | Env.oxygen;
|
||||
/** Environment attributes. */
|
||||
public Attributes defaultAttributes = new Attributes();
|
||||
/** If true, a day/night cycle is simulated. */
|
||||
public boolean updateLighting = true;
|
||||
/** Day/night cycle parameters. */
|
||||
@@ -182,6 +185,8 @@ public class Planet extends UnlockableContent{
|
||||
public void applyRules(Rules rules){
|
||||
ruleSetter.get(rules);
|
||||
|
||||
rules.attributes.clear();
|
||||
rules.attributes.add(defaultAttributes);
|
||||
rules.env = defaultEnv;
|
||||
rules.hiddenBuildItems.clear();
|
||||
rules.hiddenBuildItems.addAll(hiddenItems);
|
||||
|
||||
@@ -250,6 +250,8 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
for(Planet planet : new Planet[]{Planets.serpulo, Planets.erekir}){
|
||||
t.button(planet.localizedName, style, () -> {
|
||||
rules.env = planet.defaultEnv;
|
||||
rules.attributes.clear();
|
||||
rules.attributes.add(planet.defaultAttributes);
|
||||
rules.hiddenBuildItems.clear();
|
||||
rules.hiddenBuildItems.addAll(planet.hiddenItems);
|
||||
}).group(group).checked(b -> rules.env == planet.defaultEnv);
|
||||
|
||||
Reference in New Issue
Block a user