From 0ed0d377ff746bad4d0fc926c1a0b752a91d7b8e Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Thu, 19 Dec 2024 14:31:01 +0500 Subject: [PATCH] fix? --- .../Backmen/Shipyard/Systems/ShipyardSystem.Consoles.cs | 2 +- Content.Server/Cargo/Systems/CargoSystem.Orders.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/Backmen/Shipyard/Systems/ShipyardSystem.Consoles.cs b/Content.Server/Backmen/Shipyard/Systems/ShipyardSystem.Consoles.cs index 8b4cc80bdb8..a01cb7a7dae 100644 --- a/Content.Server/Backmen/Shipyard/Systems/ShipyardSystem.Consoles.cs +++ b/Content.Server/Backmen/Shipyard/Systems/ShipyardSystem.Consoles.cs @@ -107,7 +107,7 @@ private void OnPurchaseMessage(EntityUid uid, ShipyardConsoleComponent component return; } - UpdateBankAccount(bankUid, bank, -vessel.Price); + _cargo.DeductFunds(bank, vessel.Price); var channel = _prototypeManager.Index("Command"); _radio.SendRadioMessage(uid, Loc.GetString("shipyard-console-docking", ("vessel", vessel.Name.ToString())), channel, uid); PlayConfirmSound(uid, component); diff --git a/Content.Server/Cargo/Systems/CargoSystem.Orders.cs b/Content.Server/Cargo/Systems/CargoSystem.Orders.cs index c2206748b17..b768d635661 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Orders.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Orders.cs @@ -538,6 +538,11 @@ private bool FulfillOrder(CargoOrderData order, EntityCoordinates spawn, string? } + public void DeductFunds(StationBankAccountComponent bank, int amount) + { + bank.Balance = bank.Balance - amount; + } + #region Station private bool TryGetOrderDatabase([NotNullWhen(true)] EntityUid? stationUid, [MaybeNullWhen(false)] out StationCargoOrderDatabaseComponent dbComp)