Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
CrimeMoot authored Dec 19, 2024
1 parent 0109c1a commit 0ed0d37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<RadioChannelPrototype>("Command");
_radio.SendRadioMessage(uid, Loc.GetString("shipyard-console-docking", ("vessel", vessel.Name.ToString())), channel, uid);
PlayConfirmSound(uid, component);
Expand Down
5 changes: 5 additions & 0 deletions Content.Server/Cargo/Systems/CargoSystem.Orders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ed0d37

Please sign in to comment.