Skip to content

Commit

Permalink
fix: better fix for preventing players from joining
Browse files Browse the repository at this point in the history
  • Loading branch information
leia-uwu committed Jan 28, 2025
1 parent 325632e commit 7d0abf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion server/src/data/gasStages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface GasStage {
readonly newRadius: number
readonly dps: number
readonly summonAirdrop?: boolean
readonly preventJoin?: boolean
}

export const GasStages: GasStage[] = [
Expand Down Expand Up @@ -45,7 +46,8 @@ export const GasStages: GasStage[] = [
duration: 20,
oldRadius: 0.45,
newRadius: 0.3,
dps: 2
dps: 2,
preventJoin: true
},
{
state: GasState.Waiting,
Expand Down
2 changes: 1 addition & 1 deletion server/src/gas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class Gas {
this.game.addTimeout(() => this.advanceGasStage(), duration * 1000);
}

if (this.stage === GasState.Advancing && this.game.allowJoin) {
if (currentStage.preventJoin) {
this.game.setGameData({ allowJoin: false });
}
}
Expand Down

0 comments on commit 7d0abf0

Please sign in to comment.