using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array; namespace Content.Shared.Roles; [Prototype] public sealed partial class StartingGearPrototype : IPrototype, IInheritingPrototype, IEquipmentLoadout { /// [ViewVariables] [IdDataField] public string ID { get; private set; } = string.Empty; /// [ParentDataField(typeof(AbstractPrototypeIdArraySerializer))] public string[]? Parents { get; private set; } /// [AbstractDataField] public bool Abstract { get; private set; } /// [DataField] [AlwaysPushInheritance] public Dictionary Equipment { get; set; } = new(); /// [DataField] [AlwaysPushInheritance] public List Inhand { get; set; } = new(); /// [DataField] [AlwaysPushInheritance] public Dictionary> Storage { get; set; } = new(); } /// /// Specifies the starting entity prototypes and where to equip them for the specified class. /// public interface IEquipmentLoadout { /// /// The slot and entity prototype ID of the equipment that is to be spawned and equipped onto the entity. /// public Dictionary Equipment { get; set; } /// /// The inhand items that are equipped when this starting gear is equipped onto an entity. /// public List Inhand { get; set; } /// /// Inserts entities into the specified slot's storage (if it does have storage). /// public Dictionary> Storage { get; set; } /// /// Gets the entity prototype ID of a slot in this starting gear. /// public string GetGear(string slot) { return Equipment.TryGetValue(slot, out var equipment) ? equipment : string.Empty; } }