2024-07-23 12:34:48 +03:00
|
|
|
|
using Content.Shared.DisplacementMap;
|
|
|
|
|
|
using Robust.Shared.Containers;
|
2023-12-07 16:20:51 -05:00
|
|
|
|
using Robust.Shared.GameStates;
|
2023-04-11 17:20:47 -07:00
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2021-12-30 22:56:10 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Inventory;
|
|
|
|
|
|
|
2023-04-11 17:20:47 -07:00
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
|
|
|
|
[Access(typeof(InventorySystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class InventoryComponent : Component
|
2021-12-30 22:56:10 +01:00
|
|
|
|
{
|
2022-04-03 02:01:22 +02:00
|
|
|
|
[DataField("templateId", customTypeSerializer: typeof(PrototypeIdSerializer<InventoryTemplatePrototype>))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public string TemplateId { get; private set; } = "human";
|
2023-04-11 17:20:47 -07:00
|
|
|
|
|
|
|
|
|
|
[DataField("speciesId")] public string? SpeciesId { get; set; }
|
2023-12-07 16:20:51 -05:00
|
|
|
|
|
|
|
|
|
|
public SlotDefinition[] Slots = Array.Empty<SlotDefinition>();
|
|
|
|
|
|
public ContainerSlot[] Containers = Array.Empty<ContainerSlot>();
|
2024-04-27 08:03:58 +02:00
|
|
|
|
|
2024-07-23 12:04:09 +03:00
|
|
|
|
[DataField]
|
|
|
|
|
|
public Dictionary<string, DisplacementData> Displacements = new();
|
2024-04-28 01:44:43 +03:00
|
|
|
|
|
2024-07-23 12:04:09 +03:00
|
|
|
|
/// <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();
|
2024-07-03 01:09:57 +03:00
|
|
|
|
|
2024-07-23 12:04:09 +03:00
|
|
|
|
/// <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();
|
2021-12-30 22:56:10 +01:00
|
|
|
|
}
|