Sloth's subfloor vismask adventure (#35347)

* Add a subfloor vismask

Significantly cuts down on sent entity count.

* More optimisations

* Fix command

* Fixes

* namespace cleanup

* Review

* Vismasks

* Content update

* Bandaid

* awewa

* Revert these

* reh

* Update Content.Shared/SubFloor/TrayScannerComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2025-03-21 00:57:04 +11:00
committed by GitHub
parent 2e7f01b99e
commit 9292e3a43c
22 changed files with 277 additions and 47 deletions

View File

@@ -1,6 +1,4 @@
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Generic;
namespace Content.Shared.SubFloor
{
@@ -27,7 +25,7 @@ namespace Content.Shared.SubFloor
/// <remarks>
/// Useful for entities like vents, which are only partially hidden. Anchor attempts will still be blocked.
/// </remarks>
[DataField("blockInteractions")]
[DataField]
public bool BlockInteractions { get; set; } = true;
/// <summary>
@@ -36,15 +34,15 @@ namespace Content.Shared.SubFloor
/// <remarks>
/// Useful for cables and piping, gives maint it's distinct noise.
/// </remarks>
[DataField("blockAmbience")]
[DataField]
public bool BlockAmbience { get; set; } = true;
/// <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")]
public HashSet<Enum> VisibleLayers = new() { SubfloorLayers.FirstLayer };
[DataField]
public HashSet<Enum> VisibleLayers = new();
/// <summary>
/// This is used for storing the original draw depth of a t-ray revealed entity.