Files
wwdpublic/Content.Shared/IdentityManagement/Components/IdentityBlockerComponent.cs
vanx 3119228efb [Fix/Tweak] Masks Hiding Identity (#917)
* neck gaiter hide identity + block food

* identity

* punk ingestion

* Update Resources/Prototypes/Entities/Clothing/Masks/bandanas.yml

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* Update Resources/Prototypes/_NF/Entities/Clothing/Masks/masks_punk.yml

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

* Update Resources/Prototypes/_NF/Entities/Clothing/Masks/masks_punk.yml

Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>

---------

Co-authored-by: vanx <vanxxxx@discord>
Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
2025-12-26 12:49:44 +03:00

38 lines
1.1 KiB
C#

using Content.Shared.Inventory;
using Robust.Shared.GameStates;
namespace Content.Shared.IdentityManagement.Components;
[RegisterComponent, NetworkedComponent]
public sealed partial class IdentityBlockerComponent : Component
{
[DataField]
public bool Enabled = true;
/// <summary>
/// What part of your face does this cover? Eyes, mouth, or full?
/// </summary>
[DataField]
public IdentityBlockerCoverage Coverage = IdentityBlockerCoverage.FULL;
}
public enum IdentityBlockerCoverage
{
NONE = 0,
MOUTH = 1 << 0,
EYES = 1 << 1,
FULL = MOUTH | EYES // White Dream edit; no outer
}
/// <summary>
/// Raised on an entity and relayed to inventory to determine if its identity should be knowable.
/// </summary>
public sealed class SeeIdentityAttemptEvent : CancellableEntityEventArgs, IInventoryRelayEvent
{
// i.e. masks, helmets, or glasses.
public SlotFlags TargetSlots => SlotFlags.MASK | SlotFlags.HEAD | SlotFlags.EYES | SlotFlags.OUTERCLOTHING;
// cumulative coverage from each relayed slot
public IdentityBlockerCoverage TotalCoverage = IdentityBlockerCoverage.NONE;
}