using Content.Shared.DisplacementMap;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Inventory;
[RegisterComponent, NetworkedComponent]
[Access(typeof(InventorySystem))]
[AutoGenerateComponentState(true)]
public sealed partial class InventoryComponent : Component
{
///
/// The template defining how the inventory layout will look like.
///
[DataField, AutoNetworkedField]
[ViewVariables] // use the API method
public ProtoId TemplateId = "human";
///
/// For setting the TemplateId.
///
[ViewVariables(VVAccess.ReadWrite)]
public ProtoId TemplateIdVV
{
get => TemplateId;
set => IoCManager.Resolve().System().SetTemplateId((Owner, this), value);
}
[DataField, AutoNetworkedField]
public string? SpeciesId;
[ViewVariables]
public SlotDefinition[] Slots = Array.Empty();
[ViewVariables]
public ContainerSlot[] Containers = Array.Empty();
[DataField, AutoNetworkedField]
public Dictionary Displacements = new();
///
/// Alternate displacement maps, which if available, will be selected for the player of the appropriate gender.
///
[DataField, AutoNetworkedField]
public Dictionary FemaleDisplacements = new();
///
/// Alternate displacement maps, which if available, will be selected for the player of the appropriate gender.
///
[DataField, AutoNetworkedField]
public Dictionary MaleDisplacements = new();
}
///
/// Raised if the of an inventory changed.
///
[ByRefEvent]
public struct InventoryTemplateUpdated;