using Content.Shared.Preferences; using Robust.Shared.Prototypes; namespace Content.Shared.Roles { [Prototype("startingGear")] public sealed partial class StartingGearPrototype : IPrototype { [DataField] public Dictionary Equipment = new(); /// /// if empty, there is no skirt override - instead the uniform provided in equipment is added. /// [DataField] public EntProtoId? InnerClothingSkirt; [DataField] public EntProtoId? Satchel; [DataField] public EntProtoId? Duffelbag; [DataField] public List Inhand = new(0); [ViewVariables] [IdDataField] public string ID { get; private set; } = string.Empty; public string GetGear(string slot, HumanoidCharacterProfile? profile) { if (profile != null) { if (slot == "jumpsuit" && profile.Clothing == ClothingPreference.Jumpskirt && !string.IsNullOrEmpty(InnerClothingSkirt)) return InnerClothingSkirt; if (slot == "back" && profile.Backpack == BackpackPreference.Satchel && !string.IsNullOrEmpty(Satchel)) return Satchel; if (slot == "back" && profile.Backpack == BackpackPreference.Duffelbag && !string.IsNullOrEmpty(Duffelbag)) return Duffelbag; } return Equipment.TryGetValue(slot, out var equipment) ? equipment : string.Empty; } } }