mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:00:43 +00:00
increase spawn imm 10 seconds
This commit is contained in:
@@ -41,7 +41,11 @@ export class ImmunityTimer extends LitElement implements Layer {
|
||||
const immunityDuration = this.game.config().spawnImmunityDuration();
|
||||
const spawnPhaseTurns = this.game.config().numSpawnPhaseTurns();
|
||||
|
||||
if (immunityDuration <= 5 * 10 || this.game.inSpawnPhase()) {
|
||||
if (
|
||||
immunityDuration <= this.game.config().defaultSpawnImmunityDuration() ||
|
||||
this.game.inSpawnPhase()
|
||||
) {
|
||||
// Don't show the timer if default immunity.
|
||||
this.setInactive();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ export interface NukeMagnitude {
|
||||
|
||||
export interface Config {
|
||||
spawnImmunityDuration(): Tick;
|
||||
defaultSpawnImmunityDuration(): Tick;
|
||||
serverConfig(): ServerConfig;
|
||||
gameConfig(): GameConfig;
|
||||
theme(): Theme;
|
||||
|
||||
@@ -163,7 +163,14 @@ export class DefaultConfig implements Config {
|
||||
return 30 * 10; // 30 seconds
|
||||
}
|
||||
spawnImmunityDuration(): Tick {
|
||||
return this._gameConfig.spawnImmunityDuration ?? 5 * 10; // default to 5 seconds
|
||||
return (
|
||||
this._gameConfig.spawnImmunityDuration ??
|
||||
this.defaultSpawnImmunityDuration()
|
||||
);
|
||||
}
|
||||
|
||||
defaultSpawnImmunityDuration(): Tick {
|
||||
return 10 * 10; // 10 seconds.
|
||||
}
|
||||
|
||||
gameConfig(): GameConfig {
|
||||
|
||||
Reference in New Issue
Block a user