diff --git a/core/assets/maps/hidden-serpulo/111.msav b/core/assets/maps/hidden-serpulo/111.msav index 1f72a1d5d5..ca4a35c284 100644 Binary files a/core/assets/maps/hidden-serpulo/111.msav and b/core/assets/maps/hidden-serpulo/111.msav differ diff --git a/core/assets/maps/hidden-serpulo/180.msav b/core/assets/maps/hidden-serpulo/180.msav index 79355ec2af..6baf0947b8 100644 Binary files a/core/assets/maps/hidden-serpulo/180.msav and b/core/assets/maps/hidden-serpulo/180.msav differ diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 08a33cbc6c..ae6c90c923 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -137,8 +137,10 @@ public class Logic implements ApplicationListener{ state.rules.infiniteResources = false; state.rules.allowEditRules = false; state.rules.allowEditWorldProcessors = false; - state.rules.waveTeam.rules().infiniteResources = true; - state.rules.waveTeam.rules().fillItems = true; + if(state.getPlanet().enemyInfiniteItems){ + state.rules.waveTeam.rules().infiniteResources = true; + state.rules.waveTeam.rules().fillItems = true; + } state.rules.waveTeam.rules().buildSpeedMultiplier *= state.getPlanet().enemyBuildSpeedMultiplier; } diff --git a/core/src/mindustry/type/Planet.java b/core/src/mindustry/type/Planet.java index 6ac860aaa6..50da30a891 100644 --- a/core/src/mindustry/type/Planet.java +++ b/core/src/mindustry/type/Planet.java @@ -125,6 +125,8 @@ public class Planet extends UnlockableContent{ public boolean clearSectorOnLose = false; /** Multiplier for enemy rebuild speeds; only applied in campaign (not standard rules) */ public float enemyBuildSpeedMultiplier = 1f; + /** If true, the enemy team always has infinite items. */ + public boolean enemyInfiniteItems = true; /** If true, enemy cores are replaced with spawnpoints on this planet (for invasions) */ public boolean enemyCoreSpawnReplace = false; /** If true, blocks in the radius of the core will be removed and "built up" in a shockwave upon landing. */ diff --git a/tests/src/test/java/ApplicationTests.java b/tests/src/test/java/ApplicationTests.java index deebf4cc11..66540527f9 100644 --- a/tests/src/test/java/ApplicationTests.java +++ b/tests/src/test/java/ApplicationTests.java @@ -897,8 +897,9 @@ public class ApplicationTests{ ObjectSet resources = new ObjectSet<>(); boolean hasSpawnPoint = false; - assertFalse(state.rules.infiniteResources, "Sector " + zone.name + " must not have infinite resources."); + assertFalse(state.rules.infiniteResources || Team.sharded.rules().infiniteResources, "Sector " + zone.name + " must not have infinite resources."); assertFalse(state.rules.allowEditRules, "Sector " + zone.name + " must not have rule editing enabled."); + assertFalse(state.rules.allowEditWorldProcessors, "Sector " + zone.name + " must not have world processor editing enabled."); assertEquals(Team.sharded, state.rules.defaultTeam, "Sector " + zone.name + " must have the Sharded player team."); assertEquals(Vars.state.getPlanet() == Planets.serpulo ? Team.crux : Team.malis, state.rules.waveTeam, "Sector " + zone.name + " must have the correct enemy team.");