LockVisualizer (#25224)

* LockVisualizer

* Fix state

* Clean some code

* Make it component, fix tests fail

* Fix for StateUnlocked

Now it is possible to manually set the unlocked state and it will work!

* Optimize LockVisualizer, add check for unlocked state

* No todo I guess
This commit is contained in:
MilenVolf
2024-02-17 02:52:31 +03:00
committed by GitHub
parent 19a7b0592c
commit c7870882f6
27 changed files with 98 additions and 110 deletions

View File

@@ -0,0 +1,20 @@
namespace Content.Client.Lock.Visualizers;
[RegisterComponent]
[Access(typeof(LockVisualizerSystem))]
public sealed partial class LockVisualsComponent : Component
{
/// <summary>
/// The RSI state used for the lock indicator while the entity is locked.
/// </summary>
[DataField("stateLocked")]
[ViewVariables(VVAccess.ReadWrite)]
public string? StateLocked = "locked";
/// <summary>
/// The RSI state used for the lock indicator entity is unlocked.
/// </summary>
[DataField("stateUnlocked")]
[ViewVariables(VVAccess.ReadWrite)]
public string? StateUnlocked = "unlocked";
}