Remove string appearance keys (#10114)
This commit is contained in:
@@ -249,4 +249,10 @@ namespace Content.Shared.Atmos.Monitor
|
||||
Pressure,
|
||||
Gas
|
||||
}
|
||||
|
||||
public enum AtmosMonitorVisuals : byte
|
||||
{
|
||||
Offset,
|
||||
AlarmType,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace Content.Shared.Buckle.Components
|
||||
public enum StrapVisuals : byte
|
||||
{
|
||||
RotationAngle,
|
||||
BuckledState
|
||||
BuckledState,
|
||||
State
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace Content.Shared.SubFloor
|
||||
/// Sprite layer keys for the layers that are always visible, even if the entity is below a floor tile. E.g.,
|
||||
/// the vent part of a vent is always visible, even though the piping is hidden.
|
||||
/// </summary>
|
||||
[DataField("visibleLayers", customTypeSerializer:typeof(CustomHashSetSerializer<object, AppearanceKeySerializer>))]
|
||||
public HashSet<object> VisibleLayers = new() { SubfloorLayers.FirstLayer };
|
||||
[DataField("visibleLayers")]
|
||||
public HashSet<Enum> VisibleLayers = new() { SubfloorLayers.FirstLayer };
|
||||
|
||||
/// <summary>
|
||||
/// The entities this subfloor is revealed by.
|
||||
|
||||
@@ -4,8 +4,23 @@ namespace Content.Shared.Toggleable;
|
||||
|
||||
// Appearance Data key
|
||||
[Serializable, NetSerializable]
|
||||
public enum ToggleableLightVisuals
|
||||
public enum ToggleableLightVisuals : byte
|
||||
{
|
||||
Enabled,
|
||||
Color
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generic sprite layer keys.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public enum LightLayers : byte
|
||||
{
|
||||
Light,
|
||||
|
||||
/// <summary>
|
||||
/// Used as a key for generic unshaded layers. Not necessarily related to an entity with an actual light source.
|
||||
/// Use this instead of creating a unique single-purpose "unshaded" enum for every visualizer.
|
||||
/// </summary>
|
||||
Unshaded,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user