using Content.Shared.Inventory; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Item; /// /// Component used for status effects. /// Forces an item onto the entity the status effect was applied to, either to their inventory or hands. /// [RegisterComponent, NetworkedComponent] [AutoGenerateComponentState] public sealed partial class ForcedItemStatusEffectComponent : Component { /// /// The entities to spawn in the hands of the user. /// If the hands are unavailable, they will not be spawned. /// [DataField] public List HandItems = new (); /// /// The entities to spawn in the inventory of the user. /// If the slots are unavailable, they will not be spawned. /// [DataField] public Dictionary InventoryItems = new (); /// /// s of the spawned items. Used to remove them when the status effect expires. /// [DataField, AutoNetworkedField] public HashSet ItemEntities = new (); /// /// Whether the item should be unremovable from the slot it was placed in. /// [DataField] public bool Unremovable = true; /// /// If the item in the existing slots/hands should be dropped to make space. /// [DataField] public bool DropExisting = true; /// /// Forces the items to spawn in their respective slots, even if usually not possible to equip there. /// Only affects inventory slots. /// [DataField] public bool Force; /// /// Whether the status effect items should be removed when handcuffed. /// Causes the status effect to get removed as well. /// [DataField] public bool RemoveWhenCuffed = true; /// /// The sound to play when the item(s) spawn. /// [DataField, AutoNetworkedField] public SoundSpecifier? SpawnSound; /// /// The sound to play when the item(s) disappear. /// [DataField, AutoNetworkedField] public SoundSpecifier? DespawnSound; }