Skip to content

Commit

Permalink
Removed RTS AI difficulty modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Sep 26, 2024
1 parent 3b3257f commit cfbbee8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
2 changes: 0 additions & 2 deletions core/src/mindustry/content/Planets.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public static void load(){
};
campaignRuleDefaults.fog = true;
campaignRuleDefaults.showSpawns = true;
campaignRuleDefaults.rtsAI = true;

unlockedOnLand.add(Blocks.coreBastion);
}};
Expand Down Expand Up @@ -147,7 +146,6 @@ public static void load(){
r.placeRangeCheck = false;
r.showSpawns = false;
};
showRtsAIRule = true;
iconColor = Color.valueOf("7d4dff");
atmosphereColor = Color.valueOf("3c1b8f");
atmosphereRadIn = 0.02f;
Expand Down
16 changes: 0 additions & 16 deletions core/src/mindustry/game/CampaignRules.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package mindustry.game;

import mindustry.*;
import mindustry.gen.*;
import mindustry.type.*;

public class CampaignRules{
Expand All @@ -10,26 +8,12 @@ public class CampaignRules{
public boolean showSpawns;
public boolean sectorInvasion;
public boolean randomWaveAI;
public boolean rtsAI;

public void apply(Planet planet, Rules rules){
rules.staticFog = rules.fog = fog;
rules.showSpawns = showSpawns;
rules.randomWaveAI = randomWaveAI;
rules.objectiveTimerMultiplier = difficulty.waveTimeMultiplier;
if(planet.showRtsAIRule && rules.attackMode){
boolean swapped = rules.teams.get(rules.waveTeam).rtsAi != rtsAI;
rules.teams.get(rules.waveTeam).rtsAi = rtsAI;
rules.teams.get(rules.waveTeam).rtsMinWeight = 1.2f * difficulty.enemyHealthMultiplier;

if(swapped && Vars.state.isGame()){
Groups.unit.each(u -> {
if(u.team == rules.waveTeam && !u.isPlayer()){
u.resetController();
}
});
}
}
rules.teams.get(rules.waveTeam).blockHealthMultiplier = difficulty.enemyHealthMultiplier;
rules.teams.get(rules.waveTeam).unitHealthMultiplier = difficulty.enemyHealthMultiplier;
rules.teams.get(rules.waveTeam).unitCostMultiplier = 1f / difficulty.enemySpawnMultiplier;
Expand Down
2 changes: 0 additions & 2 deletions core/src/mindustry/type/Planet.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ public class Planet extends UnlockableContent{
public CampaignRules campaignRuleDefaults = new CampaignRules();
/** Sets up rules on game load for any sector on this planet. */
public Cons<Rules> ruleSetter = r -> {};
/** If true, RTS AI can be customized. */
public boolean showRtsAIRule = false;

/** @deprecated no-op, do not use. */
@Deprecated
Expand Down
3 changes: 0 additions & 3 deletions core/src/mindustry/ui/dialogs/CampaignRulesDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ void rebuild(){
check("@rules.fog", b -> rules.fog = b, () -> rules.fog);
check("@rules.showspawns", b -> rules.showSpawns = b, () -> rules.showSpawns);
check("@rules.randomwaveai", b -> rules.randomWaveAI = b, () -> rules.randomWaveAI);
if(planet.showRtsAIRule){
check("@rules.rtsai.campaign", b -> rules.rtsAI = b, () -> rules.rtsAI);
}
}).growY();
}

Expand Down

0 comments on commit cfbbee8

Please sign in to comment.