From f7ad444e7833043a2270efe203795fca0702003f Mon Sep 17 00:00:00 2001 From: SpacialCircumstances Date: Tue, 16 Jul 2024 09:52:24 +0200 Subject: [PATCH] Fix scheduled bulk upgrades checking for wrong tick --- server/services/scheduleBuy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/services/scheduleBuy.ts b/server/services/scheduleBuy.ts index 1c96d21cc..0b8e5d1dc 100644 --- a/server/services/scheduleBuy.ts +++ b/server/services/scheduleBuy.ts @@ -37,7 +37,7 @@ export default class ScheduleBuyService extends EventEmitter { for (let player of game.galaxy.players) { if (player.scheduledActions.length == 0) continue; const currentActions = player.scheduledActions - .filter(a => a.tick == game.state.tick - 1) // Tick number that we just finished + .filter(a => a.tick == game.state.tick) // Tick number that we just finished .sort((a, b) => { // Take the defined priorities // We sort in the order totalCredits, belowPrice, infrastructureAmount, percentageOfCredits @@ -106,7 +106,7 @@ export default class ScheduleBuyService extends EventEmitter { } _repeatOrRemoveAction(game: Game, actions: PlayerScheduledActions[]) { - const tick = game.state.tick - 1; + const tick = game.state.tick; for (let i = 0; i < actions.length; i++) { const action = actions[i]