From c35f6950246fa721db31932cac906730a332a0f2 Mon Sep 17 00:00:00 2001 From: Milon Date: Sun, 3 Nov 2024 00:51:24 +0100 Subject: [PATCH] fix --- Content.Server/Cargo/Systems/CargoSystem.Orders.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Content.Server/Cargo/Systems/CargoSystem.Orders.cs b/Content.Server/Cargo/Systems/CargoSystem.Orders.cs index 2c41e88d622..69a276302f9 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Orders.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Orders.cs @@ -85,9 +85,11 @@ private void UpdateConsole(float frameTime) { _timer -= Delay; - foreach (var account in EntityQuery()) + var stationQuery = EntityQueryEnumerator(); + while (stationQuery.MoveNext(out var uid, out var bank)) { - account.Balance += account.IncreasePerSecond * Delay; + var balanceToAdd = bank.IncreasePerSecond * Delay; + UpdateBankAccount(uid, bank, balanceToAdd); } var query = EntityQueryEnumerator();