diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index f43517e27c..2456397a90 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1063,6 +1063,7 @@ rules.unitcapvariable = Cores Contribute To Unit Cap rules.unitcap = Base Unit Cap rules.enemycorebuildradius = Enemy Core No-Build Radius:[lightgray] (tiles) rules.wavespacing = Wave Spacing:[lightgray] (sec) +rules.initialwavespacing = Initial Wave Spacing:[lightgray] (sec) rules.buildcostmultiplier = Build Cost Multiplier rules.buildspeedmultiplier = Build Speed Multiplier rules.deconstructrefundmultiplier = Deconstruct Refund Multiplier diff --git a/core/assets/maps/onset.msav b/core/assets/maps/onset.msav index 7916e15b77..4a60322380 100644 Binary files a/core/assets/maps/onset.msav and b/core/assets/maps/onset.msav differ diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 0a0ce51f2a..08df9cfeec 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -168,7 +168,7 @@ public class Logic implements ApplicationListener{ public void play(){ state.set(State.playing); //grace period of 2x wave time before game starts - state.wavetime = state.rules.waveSpacing * 2; + state.wavetime = state.rules.initialWaveSpacing <= 0 ? state.rules.waveSpacing * 2 : state.rules.initialWaveSpacing; Events.fire(new PlayEvent()); //add starting items diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index 7289947532..c86ebee88d 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -81,6 +81,8 @@ public class Rules{ public float dropZoneRadius = 300f; /** Time between waves in ticks. */ public float waveSpacing = 2 * Time.toMinutes; + /** Starting wave spacing; if <0, uses waveSpacing * 2. */ + public float initialWaveSpacing = 0f; /** Wave after which the player 'wins'. Used in sectors. Use a value <= 0 to disable. */ public int winWave = 0; /** Base unit cap. Can still be increased by blocks. */ diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 271d80d2a2..355654bddb 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -141,6 +141,10 @@ public class CustomRulesDialog extends BaseDialog{ check("@rules.wavetimer", b -> rules.waveTimer = b, () -> rules.waveTimer); check("@rules.waitForWaveToEnd", b -> rules.waitEnemies = b, () -> rules.waitEnemies); number("@rules.wavespacing", false, f -> rules.waveSpacing = f * 60f, () -> rules.waveSpacing / 60f, () -> true, 1, Float.MAX_VALUE); + //this is experimental, because it's not clear that 0 makes it default. + if(experimental){ + number("@rules.initialwavespacing", false, f -> rules.initialWaveSpacing = f * 60f, () -> rules.initialWaveSpacing / 60f, () -> true, 0, Float.MAX_VALUE); + } number("@rules.dropzoneradius", false, f -> rules.dropZoneRadius = f * tilesize, () -> rules.dropZoneRadius / tilesize, () -> true); title("@rules.title.resourcesbuilding");