mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* Make masks pullable by others * Small fix * Sort Dependencies * gasjfsakhfaskjfsahjsafjhkfsa forgot to push * Move the methods * Target mask, not wearer --------- Co-authored-by: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
using Content.Shared.Clothing.EntitySystems;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Clothing.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(MaskSystem))]
|
|
public sealed partial class MaskComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Action for toggling a mask (e.g., pulling the mask down or putting it back up)
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntProtoId ToggleAction = "ActionToggleMask";
|
|
|
|
/// <summary>
|
|
/// Action for toggling a mask (e.g., pulling the mask down or putting it back up)
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? ToggleActionEntity;
|
|
|
|
/// <summary>
|
|
/// Whether the mask is currently toggled (e.g., pulled down).
|
|
/// This generally disables some of the mask's functionality.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool IsToggled;
|
|
|
|
/// <summary>
|
|
/// Equipped prefix to use after the mask was pulled down.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public string EquippedPrefix = "up";
|
|
|
|
/// <summary>
|
|
/// When <see langword="false"/>, the mask will not be toggleable.
|
|
/// </summary>
|
|
[DataField("enabled"), AutoNetworkedField]
|
|
public bool IsToggleable = true;
|
|
|
|
/// <summary>
|
|
/// When <see langword="true"/> will disable <see cref="IsToggleable"/> when folded
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool DisableOnFolded;
|
|
|
|
/// <summary>
|
|
/// Toggle Mask delay when the mask is being toggled by someone other than the wearer.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan Delay = TimeSpan.FromSeconds(2);
|
|
|
|
}
|