Files
tbd-station-14/Content.Shared/IdentityManagement/Components/IdentityBlockerComponent.cs
āda 320e67a411 Predict identity (#40185)
* crossing the pond

* share some station records

* share some criminal records

* single system

* comments

* minor touchups

* I always forget this part

* requested changes

* revert predicted spawn

* requested changes

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
2025-09-24 01:32:20 +02:00

41 lines
1.2 KiB
C#

using Content.Shared.Inventory;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.IdentityManagement.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class IdentityBlockerComponent : Component
{
[DataField, AutoNetworkedField]
public bool Enabled = true;
/// <summary>
/// What part of your face does this cover? Eyes, mouth, or full?
/// </summary>
[DataField]
public IdentityBlockerCoverage Coverage = IdentityBlockerCoverage.FULL;
}
[Flags]
[Serializable, NetSerializable]
public enum IdentityBlockerCoverage
{
NONE = 0,
MOUTH = 1 << 0,
EYES = 1 << 1,
FULL = MOUTH | EYES
}
/// <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;
}