using Content.Shared.Actions;
using Content.Shared.Clothing.Components;
namespace Content.Shared.Clothing;
/// <summary>
/// Raised directed at a piece of clothing to get the set of layers to show on the wearer's sprite
/// </summary>
public sealed class GetEquipmentVisualsEvent : EntityEventArgs
{
/// Entity that is wearing the item.
public readonly EntityUid Equipee;
public readonly string Slot;
/// The layers that will be added to the entity that is wearing this item.
/// <remarks>
/// Note that the actual ordering of the layers depends on the order in which they are added to this list;
/// </remarks>
public List<(string, PrototypeLayerData)> Layers = new();
public GetEquipmentVisualsEvent(EntityUid equipee, string slot)
Equipee = equipee;
Slot = slot;
}
/// Raised directed at a piece of clothing after its visuals have been updated.
/// Useful for systems/components that modify the visual layers that an item adds to a player. (e.g. RGB memes)
public sealed class EquipmentVisualsUpdatedEvent : EntityEventArgs
/// The layers that this item is now revealing.
public HashSet<string> RevealedLayers;
public EquipmentVisualsUpdatedEvent(EntityUid equipee, string slot, HashSet<string> revealedLayers)
RevealedLayers = revealedLayers;
public sealed partial class ToggleMaskEvent : InstantActionEvent { }
/// Event raised on the mask entity when it is toggled.
[ByRefEvent]
public readonly record struct ItemMaskToggledEvent(EntityUid Wearer, string? equippedPrefix, bool IsToggled, bool IsEquip);
/// Event raised on the entity wearing the mask when it is toggled.
public readonly record struct WearerMaskToggledEvent(bool IsToggled);
/// Raised on the clothing entity when it is equipped to a valid slot,
/// as determined by <see cref="ClothingComponent.Slots"/>.
public readonly record struct ClothingGotEquippedEvent(EntityUid Wearer, ClothingComponent Clothing);
/// Raised on the clothing entity when it is unequipped from a valid slot,
public readonly record struct ClothingGotUnequippedEvent(EntityUid Wearer, ClothingComponent Clothing);
/// Raised on an entity when they equip a clothing item to a valid slot,
public readonly record struct ClothingDidEquippedEvent(Entity<ClothingComponent> Clothing);
/// Raised on an entity when they unequip a clothing item from a valid slot,
public readonly record struct ClothingDidUnequippedEvent(Entity<ClothingComponent> Clothing);