Remove string appearance keys (#10114)

This commit is contained in:
Leon Friedrich
2022-08-08 13:44:16 +12:00
committed by GitHub
parent 1783dd82e7
commit 193b9f467d
14 changed files with 56 additions and 54 deletions

View File

@@ -7,8 +7,6 @@ namespace Content.Shared.Foldable;
[UsedImplicitly]
public abstract class SharedFoldableSystem : EntitySystem
{
private const string FoldKey = "FoldedState";
public override void Initialize()
{
base.Initialize();
@@ -50,7 +48,7 @@ public abstract class SharedFoldableSystem : EntitySystem
Dirty(component);
if (TryComp(component.Owner, out AppearanceComponent? appearance))
appearance.SetData(FoldKey, folded);
appearance.SetData(FoldedVisuals.State, folded);
}
private void OnInsertEvent(EntityUid uid, FoldableComponent component, ContainerGettingInsertedAttemptEvent args)
@@ -58,4 +56,9 @@ public abstract class SharedFoldableSystem : EntitySystem
if (!component.IsFolded)
args.Cancel();
}
public enum FoldedVisuals : byte
{
State
}
}