Allow IdentityBlocker partial coverage (#24741)
* Allow IdentityBlocker partial coverage * rename to TotalCoverage
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.IdentityManagement.Components;
|
||||
@@ -7,6 +7,20 @@ namespace Content.Shared.IdentityManagement.Components;
|
||||
public sealed partial class IdentityBlockerComponent : Component
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -14,6 +28,9 @@ public sealed partial class IdentityBlockerComponent : Component
|
||||
/// </summary>
|
||||
public sealed class SeeIdentityAttemptEvent : CancellableEntityEventArgs, IInventoryRelayEvent
|
||||
{
|
||||
// i.e. masks or helmets.
|
||||
public SlotFlags TargetSlots => SlotFlags.MASK | SlotFlags.HEAD;
|
||||
// i.e. masks, helmets, or glasses.
|
||||
public SlotFlags TargetSlots => SlotFlags.MASK | SlotFlags.HEAD | SlotFlags.EYES;
|
||||
|
||||
// cumulative coverage from each relayed slot
|
||||
public IdentityBlockerCoverage TotalCoverage = IdentityBlockerCoverage.NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user