Skip to content

Commit

Permalink
oh right
Browse files Browse the repository at this point in the history
  • Loading branch information
MilonPL committed Nov 4, 2024
1 parent 869a34e commit 7f96717
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Content.Server/Cargo/Systems/CargoSystem.Orders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private void OnApproveOrderMessage(EntityUid uid, CargoOrderConsoleComponent com
$"{ToPrettyString(player):user} approved order [orderId:{order.OrderId}, quantity:{order.OrderQuantity}, product:{order.ProductId}, requester:{order.Requester}, reason:{order.Reason}] with balance at {bank.Balance}");

orderDatabase.Orders.Remove(order);
DeductFunds(bank, cost);
UpdateBankAccount(station.Value, bank, -cost);
UpdateOrders(station.Value);
}

Expand Down Expand Up @@ -538,11 +538,6 @@ private bool FulfillOrder(CargoOrderData order, EntityCoordinates spawn, string?

}

private void DeductFunds(StationBankAccountComponent component, int amount)
{
component.Balance = Math.Max(0, component.Balance - amount);
}

#region Station

private bool TryGetOrderDatabase([NotNullWhen(true)] EntityUid? stationUid, [MaybeNullWhen(false)] out StationCargoOrderDatabaseComponent dbComp)
Expand Down

0 comments on commit 7f96717

Please sign in to comment.