No sector default AI

This commit is contained in:
Anuken
2022-02-08 14:56:34 -05:00
parent b4a9d546aa
commit 2fabd39ea1
3 changed files with 5 additions and 1 deletions

View File

@@ -102,6 +102,7 @@ public class Planets{
allowWaveSimulation = true;
allowSectorInvasion = true;
allowLaunchSchematics = true;
defaultAI = true;
atmosphereColor = Color.valueOf("3c1b8f");
atmosphereRadIn = 0.02f;
atmosphereRadOut = 0.3f;

View File

@@ -115,9 +115,10 @@ public class Logic implements ApplicationListener{
if(state.isCampaign()){
//enable building AI on campaign unless the preset disables it
//TODO should be configurable, I don't want building AI everywhere.
if(!(state.getSector().preset != null && !state.getSector().preset.useAI)){
if(state.getSector().planet.defaultAI && !(state.getSector().preset != null && !state.getSector().preset.useAI)){
state.rules.waveTeam.rules().ai = true;
}
state.rules.coreIncinerates = true;
state.rules.waveTeam.rules().aiTier = state.getSector().threat * 0.8f;
state.rules.waveTeam.rules().infiniteResources = true;

View File

@@ -90,6 +90,8 @@ public class Planet extends UnlockableContent{
public boolean allowWaveSimulation = false;
/** Whether to simulate sector invasions from enemy bases. */
public boolean allowSectorInvasion = false;
/** If true, builder AI is turned on for all sectors on this planet by default. */
public boolean defaultAI = false;
/** Parent body that this planet orbits around. If null, this planet is considered to be in the middle of the solar system.*/
public @Nullable Planet parent;
/** The root parent of the whole solar system this planet is in. */