Move MaskComponent to shared and add toggle events (#22395)

* Move MaskComponent to shared and add toggle events

* Datafield and network IsToggled

* Add missing dirty
This commit is contained in:
DrSmugleaf
2023-12-12 19:02:35 -07:00
committed by GitHub
parent 16bd6802df
commit ad6dc94c60
12 changed files with 174 additions and 148 deletions

View File

@@ -1,21 +0,0 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Clothing.Components
{
[Access(typeof(MaskSystem))]
[RegisterComponent]
public sealed partial class MaskComponent : Component
{
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ToggleAction = "ActionToggleMask";
/// <summary>
/// This mask can be toggled (pulled up/down)
/// </summary>
[DataField("toggleActionEntity")]
public EntityUid? ToggleActionEntity;
public bool IsToggled = false;
}
}