* Validate cargo markets
* readonly market ID
/// All of the <see cref="CargoProductPrototype.Group"/>s that are supported.
/// </summary>
[DataField, AutoNetworkedField]
- public List<string> AllowedGroups = new() { "market" };
+ public List<ProtoId<CargoMarketPrototype>> AllowedGroups = new() { "market" };
/// <summary>
/// Access needed to toggle the limit on this console.
--- /dev/null
+using Robust.Shared.Prototypes;
+
+namespace Content.Shared.Cargo.Prototypes;
+
+/// <summary>
+/// Defines a "market" that a cargo computer can access and make orders from.
+/// </summary>
+[Prototype]
+public sealed partial class CargoMarketPrototype : IPrototype
+{
+ /// <inheritdoc/>
+ [IdDataField]
+ public string ID { get; private set; } = default!;
+}
/// The prototype group of the product. (e.g. Contraband)
/// </summary>
[DataField]
- public string Group { get; private set; } = "market";
+ public ProtoId<CargoMarketPrototype> Group { get; private set; } = "market";
}
}
--- /dev/null
+- type: cargoMarket
+ id: market