Fix station income instantly accumulating roundstart (#36572)

Fix station money accumulating roundstart
This commit is contained in:
Nemanja
2025-04-14 19:00:34 -04:00
committed by GitHub
parent ace3682de3
commit ed3e4c7d4e
5 changed files with 27 additions and 13 deletions

View File

@@ -28,7 +28,7 @@ public sealed partial class CargoSystem
args.Amount > GetBalanceFromAccount((station, bank), ent.Comp.Account) * ent.Comp.TransferLimit)
return;
if (_timing.CurTime < ent.Comp.NextAccountActionTime)
if (Timing.CurTime < ent.Comp.NextAccountActionTime)
return;
if (!_accessReaderSystem.IsAllowed(args.Actor, ent))
@@ -38,7 +38,7 @@ public sealed partial class CargoSystem
return;
}
ent.Comp.NextAccountActionTime = _timing.CurTime + ent.Comp.AccountActionDelay;
ent.Comp.NextAccountActionTime = Timing.CurTime + ent.Comp.AccountActionDelay;
Dirty(ent);
UpdateBankAccount((station, bank), -args.Amount, CreateAccountDistribution(ent.Comp.Account, bank));
_audio.PlayPvs(ApproveSound, ent);