| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Content.Shared.DisplacementMap;
- using Robust.Shared.Containers;
- using Robust.Shared.GameStates;
- using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
- namespace Content.Shared.Inventory;
- [RegisterComponent, NetworkedComponent]
- [Access(typeof(InventorySystem))]
- [AutoGenerateComponentState(true)]
- public sealed partial class InventoryComponent : Component
- {
- [DataField("templateId", customTypeSerializer: typeof(PrototypeIdSerializer<InventoryTemplatePrototype>))]
- [AutoNetworkedField]
- public string TemplateId { get; set; } = "human";
- [DataField("speciesId")] public string? SpeciesId { get; set; }
- public SlotDefinition[] Slots = Array.Empty<SlotDefinition>();
- public ContainerSlot[] Containers = Array.Empty<ContainerSlot>();
- [DataField]
- public Dictionary<string, DisplacementData> Displacements = new();
- /// <summary>
- /// Alternate displacement maps, which if available, will be selected for the player of the appropriate gender.
- /// </summary>
- [DataField]
- public Dictionary<string, DisplacementData> FemaleDisplacements = new();
- /// <summary>
- /// Alternate displacement maps, which if available, will be selected for the player of the appropriate gender.
- /// </summary>
- [DataField]
- public Dictionary<string, DisplacementData> MaleDisplacements = new();
- }
- /// <summary>
- /// Raised if the <see cref="InventoryComponent.TemplateId"/> of an inventory changed.
- /// </summary>
- [ByRefEvent]
- public struct InventoryTemplateUpdated;
|