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
{
///
[ViewVariables]
[IdDataField]
public string ID { get; private set; } = string.Empty;
///
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer))]
public string[]? Parents { get; private set; }
///
[AbstractDataField]
public bool Abstract { get; }
///
/// The slot and entity prototype ID of the equipment that is to be spawned and equipped onto the entity.
///
[DataField]
[AlwaysPushInheritance]
public Dictionary Equipment = new();
///
/// The inhand items that are equipped when this starting gear is equipped onto an entity.
///
[DataField]
[AlwaysPushInheritance]
public List Inhand = new(0);
///
/// Inserts entities into the specified slot's storage (if it does have storage).
///
[DataField]
[AlwaysPushInheritance]
public Dictionary> Storage = new();
///
/// 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;
}
}