+using Content.Shared.DrawDepth;
using Content.Shared.SubFloor;
using Robust.Client.GameObjects;
}
args.Sprite.Visible = hasVisibleLayer || revealed;
+
+ // allows a t-ray to show wires/pipes above carpets/puddles
+ if (scannerRevealed)
+ {
+ component.OriginalDrawDepth ??= args.Sprite.DrawDepth;
+ args.Sprite.DrawDepth = (int) Shared.DrawDepth.DrawDepth.FloorObjects + 1;
+ }
+ else if (component.OriginalDrawDepth.HasValue)
+ {
+ args.Sprite.DrawDepth = component.OriginalDrawDepth.Value;
+ component.OriginalDrawDepth = null;
+ }
}
private void UpdateAll()
/// </summary>
[DataField("visibleLayers")]
public HashSet<Enum> VisibleLayers = new() { SubfloorLayers.FirstLayer };
+
+ /// <summary>
+ /// This is used for storing the original draw depth of a t-ray revealed entity.
+ /// e.g. when a t-ray revealed cable is drawn above a carpet.
+ /// </summary>
+ [DataField]
+ public int? OriginalDrawDepth;
}
}