Improve atmos debug overlay (#22520)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Robust.Shared.Map;
|
||||
using System.Numerics;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Atmos.EntitySystems
|
||||
@@ -10,27 +10,17 @@ namespace Content.Shared.Atmos.EntitySystems
|
||||
protected float AccumulatedFrameTime;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public readonly struct AtmosDebugOverlayData
|
||||
{
|
||||
public readonly float Temperature;
|
||||
public readonly float[] Moles;
|
||||
public readonly AtmosDirection PressureDirection;
|
||||
public readonly AtmosDirection LastPressureDirection;
|
||||
public readonly int InExcitedGroup;
|
||||
public readonly AtmosDirection BlockDirection;
|
||||
public readonly bool IsSpace;
|
||||
|
||||
public AtmosDebugOverlayData(float temperature, float[] moles, AtmosDirection pressureDirection, AtmosDirection lastPressureDirection, int inExcited, AtmosDirection blockDirection, bool isSpace)
|
||||
{
|
||||
Temperature = temperature;
|
||||
Moles = moles;
|
||||
PressureDirection = pressureDirection;
|
||||
LastPressureDirection = lastPressureDirection;
|
||||
InExcitedGroup = inExcited;
|
||||
BlockDirection = blockDirection;
|
||||
IsSpace = isSpace;
|
||||
}
|
||||
}
|
||||
public readonly record struct AtmosDebugOverlayData(
|
||||
Vector2 Indices,
|
||||
float Temperature,
|
||||
float[]? Moles,
|
||||
AtmosDirection PressureDirection,
|
||||
AtmosDirection LastPressureDirection,
|
||||
AtmosDirection BlockDirection,
|
||||
int? InExcitedGroup,
|
||||
bool IsSpace,
|
||||
bool MapAtmosphere,
|
||||
bool NoGrid);
|
||||
|
||||
/// <summary>
|
||||
/// Invalid tiles for the gas overlay.
|
||||
@@ -43,9 +33,9 @@ namespace Content.Shared.Atmos.EntitySystems
|
||||
|
||||
public Vector2i BaseIdx { get; }
|
||||
// LocalViewRange*LocalViewRange
|
||||
public AtmosDebugOverlayData[] OverlayData { get; }
|
||||
public AtmosDebugOverlayData?[] OverlayData { get; }
|
||||
|
||||
public AtmosDebugOverlayMessage(NetEntity gridIndices, Vector2i baseIdx, AtmosDebugOverlayData[] overlayData)
|
||||
public AtmosDebugOverlayMessage(NetEntity gridIndices, Vector2i baseIdx, AtmosDebugOverlayData?[] overlayData)
|
||||
{
|
||||
GridId = gridIndices;
|
||||
BaseIdx = baseIdx;
|
||||
|
||||
Reference in New Issue
Block a user