2022-06-23 14:36:47 +10:00
|
|
|
using Content.Shared.Cargo;
|
2022-07-15 14:11:41 +10:00
|
|
|
using Content.Shared.Cargo.Prototypes;
|
2024-01-19 13:02:28 +11:00
|
|
|
using Robust.Shared.Prototypes;
|
2022-07-15 14:11:41 +10:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2022-06-23 14:36:47 +10:00
|
|
|
|
|
|
|
|
namespace Content.Server.Cargo.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stores all of cargo orders for a particular station.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class StationCargoOrderDatabaseComponent : Component
|
2022-06-23 14:36:47 +10:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum amount of orders a station is allowed, approved or not.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("capacity")]
|
|
|
|
|
public int Capacity = 20;
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("orders")]
|
2023-03-05 04:27:30 +00:00
|
|
|
public List<CargoOrderData> Orders = new();
|
2022-06-23 14:36:47 +10:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-03-05 04:27:30 +00:00
|
|
|
/// Used to determine unique order IDs
|
2022-06-23 14:36:47 +10:00
|
|
|
/// </summary>
|
2023-03-05 04:27:30 +00:00
|
|
|
public int NumOrdersCreated;
|
2022-06-23 14:36:47 +10:00
|
|
|
|
2023-05-31 11:13:02 +10:00
|
|
|
// TODO: Can probably dump this
|
2022-06-23 14:36:47 +10:00
|
|
|
/// <summary>
|
|
|
|
|
/// The cargo shuttle assigned to this station.
|
|
|
|
|
/// </summary>
|
2022-11-16 20:22:11 +01:00
|
|
|
[DataField("shuttle")]
|
2022-06-23 14:36:47 +10:00
|
|
|
public EntityUid? Shuttle;
|
2024-01-19 13:02:28 +11:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The paper-type prototype to spawn with the order information.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public EntProtoId PrinterOutput = "PaperCargoInvoice";
|
2022-06-23 14:36:47 +10:00
|
|
|
}
|