Cleanup cargo shuttle/telepad order code (#13591)
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
This commit is contained in:
@@ -6,23 +6,39 @@ namespace Content.Shared.Cargo
|
||||
[NetSerializable, Serializable]
|
||||
public sealed class CargoOrderData
|
||||
{
|
||||
public int OrderIndex;
|
||||
/// The human-readable number, when displaying this order
|
||||
public int PrintableOrderNumber { get { return OrderIndex + 1; } }
|
||||
public string ProductId;
|
||||
public int Amount;
|
||||
public string Requester;
|
||||
/// <summary>
|
||||
/// A unique (arbitrary) ID which identifies this order.
|
||||
/// </summary>
|
||||
public readonly int OrderId;
|
||||
|
||||
/// <summary>
|
||||
/// Prototype id for the item to create
|
||||
/// </summary>
|
||||
public readonly string ProductId;
|
||||
|
||||
/// <summary>
|
||||
/// The number of items in the order. Not readonly, as it might change
|
||||
/// due to caps on the amount of orders that can be placed.
|
||||
/// </summary>
|
||||
public int OrderQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// How many instances of this order that we've already dispatched
|
||||
/// <summary>
|
||||
public int NumDispatched = 0;
|
||||
|
||||
public readonly string Requester;
|
||||
// public String RequesterRank; // TODO Figure out how to get Character ID card data
|
||||
// public int RequesterId;
|
||||
public string Reason;
|
||||
public bool Approved => Approver is not null;
|
||||
public readonly string Reason;
|
||||
public bool Approved => Approver is not null;
|
||||
public string? Approver;
|
||||
|
||||
public CargoOrderData(int orderIndex, string productId, int amount, string requester, string reason)
|
||||
public CargoOrderData(int orderId, string productId, int amount, string requester, string reason)
|
||||
{
|
||||
OrderIndex = orderIndex;
|
||||
OrderId = orderId;
|
||||
ProductId = productId;
|
||||
Amount = amount;
|
||||
OrderQuantity = amount;
|
||||
Requester = requester;
|
||||
Reason = reason;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user