mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-20 09:17:19 +07:00
initialWaveSpacing rule
This commit is contained in:
parent
b99a750655
commit
4a07c95e1c
@ -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
|
||||
|
Binary file not shown.
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user