Injector sprite fix (#9011)

This commit is contained in:
Leon Friedrich
2022-07-09 21:59:39 +12:00
committed by GitHub
parent 029924e163
commit 65408f63d4
5 changed files with 28 additions and 11 deletions

View File

@@ -184,4 +184,9 @@ namespace Content.Shared.SubFloor
Covered, // is there a floor tile over this entity
ScannerRevealed, // is this entity revealed by a scanner or some other entity?
}
public enum SubfloorLayers : byte
{
FirstLayer
}
}

View File

@@ -1,4 +1,6 @@
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Generic;
namespace Content.Shared.SubFloor
{
@@ -43,6 +45,13 @@ namespace Content.Shared.SubFloor
[DataField("scannerTransparency")]
public float ScannerTransparency = 0.8f;
/// <summary>
/// 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 };
/// <summary>
/// The entities this subfloor is revealed by.
/// </summary>