mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 18:15:17 +00:00
alliances expire after 1000 ticks (~1.5 minutes)
This commit is contained in:
@@ -32,6 +32,13 @@ export class PlayerExecution implements Execution {
|
||||
}
|
||||
this.player.setTroops(this.config.troopAdditionRate(this.player))
|
||||
|
||||
const alliances = Array.from(this.player.alliances())
|
||||
for (const alliance of alliances) {
|
||||
if (this.mg.ticks() - alliance.createdAt() > this.mg.config().allianceDuration()) {
|
||||
alliance.expire()
|
||||
}
|
||||
}
|
||||
|
||||
if (ticks - this.lastCalc > this.ticksPerClusterCalc) {
|
||||
this.lastCalc = ticks
|
||||
const start = performance.now()
|
||||
|
||||
Reference in New Issue
Block a user