Cargo Console Limit (#1095)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
windarkata
2020-07-02 07:45:40 -05:00
committed by GitHub
parent 7e061b5968
commit 6775ae8153
7 changed files with 81 additions and 18 deletions

View File

@@ -27,6 +27,8 @@ namespace Content.Client.GameObjects.Components.Cargo
public string BankName { get; private set; }
[ViewVariables]
public int BankBalance { get; private set; }
[ViewVariables]
public (int CurrentCapacity, int MaxCapacity) ShuttleCapacity { get; private set; }
private CargoProductPrototype _product;
@@ -95,6 +97,8 @@ namespace Content.Client.GameObjects.Components.Cargo
BankId = cstate.BankId;
BankName = cstate.BankName;
BankBalance = cstate.BankBalance;
ShuttleCapacity = cstate.ShuttleCapacity;
_menu.UpdateCargoCapacity();
_menu.UpdateBankData();
}
@@ -126,7 +130,10 @@ namespace Content.Client.GameObjects.Components.Cargo
{
if (!(args.Button.Parent.Parent is CargoOrderRow row))
return;
if (ShuttleCapacity.CurrentCapacity == ShuttleCapacity.MaxCapacity)
return;
SendMessage(new SharedCargoConsoleComponent.CargoConsoleApproveOrderMessage(row.Order.OrderNumber));
_menu?.UpdateCargoCapacity();
}
}
}