Files
wwdpublic/Content.Shared/Atmos/EntitySystems/SharedAtmosDebugOverlaySystem.cs
SimpleStation14 23c0e985d4 Mirror: Run fixgridatmos for cargo & emergency shuttle (#361)
## Mirror of PR #26382: [Run `fixgridatmos` for cargo & emergency
shuttle](https://github.com/space-wizards/space-station-14/pull/26382)
from <img src="https://avatars.githubusercontent.com/u/10567778?v=4"
alt="space-wizards" width="22"/>
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)

###### `ec761114eacdeed6e68f9c94dddfdbec8a6e26be`

PR opened by <img
src="https://avatars.githubusercontent.com/u/60421075?v=4"
width="16"/><a href="https://github.com/ElectroJr"> ElectroJr</a> at
2024-03-24 07:27:14 UTC

---

PR changed 6 files with 60 additions and 575 deletions.

The PR had the following labels:
- Status: Needs Review


---

<details open="true"><summary><h1>Original Body</h1></summary>

> This PR also changes fixgridatmos so that it trimms empty/invalid
tiles.
> 
> 🆑
> - fix: Fixed the cargo & emergency shuttle not being airtight.
> 


</details>

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: SimpleStation14 <Unknown>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
2024-05-29 10:14:43 +01:00

53 lines
1.8 KiB
C#

using System.Numerics;
using Robust.Shared.Serialization;
namespace Content.Shared.Atmos.EntitySystems
{
public abstract class SharedAtmosDebugOverlaySystem : EntitySystem
{
// Keep in mind, this system is hilariously unoptimized. The goal here is to provide accurate debug data.
public const int LocalViewRange = 16;
protected float AccumulatedFrameTime;
[Serializable, NetSerializable]
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,
bool Immutable);
/// <summary>
/// Invalid tiles for the gas overlay.
/// No point re-sending every tile if only a subset might have been updated.
/// </summary>
[Serializable, NetSerializable]
public sealed class AtmosDebugOverlayMessage : EntityEventArgs
{
public NetEntity GridId { get; }
public Vector2i BaseIdx { get; }
// LocalViewRange*LocalViewRange
public AtmosDebugOverlayData?[] OverlayData { get; }
public AtmosDebugOverlayMessage(NetEntity gridIndices, Vector2i baseIdx, AtmosDebugOverlayData?[] overlayData)
{
GridId = gridIndices;
BaseIdx = baseIdx;
OverlayData = overlayData;
}
}
[Serializable, NetSerializable]
public sealed class AtmosDebugOverlayDisableMessage : EntityEventArgs
{
}
}
}