Atmos Debug Overlay expansion (#2626)

* Atmos Debug Overlay: Add a way of showing blocked directions

* Atmos Debug Overlay: Adjustable modes client-side

* Atmos Debug Overlay: Fix atvrange help text

* Atmos Debug Overlay: More flexible and clear gas ID specification
This commit is contained in:
20kdc
2020-11-28 13:45:52 +00:00
committed by GitHub
parent 97973c3e78
commit bb22da6827
7 changed files with 238 additions and 42 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using Content.Client.Atmos;
using Content.Shared.GameObjects.EntitySystems.Atmos;
using Content.Shared.Atmos;
using Content.Shared.GameTicking;
using JetBrains.Annotations;
using Robust.Client.Interfaces.Graphics.Overlays;
@@ -20,6 +21,19 @@ namespace Content.Client.GameObjects.EntitySystems
private readonly Dictionary<GridId, AtmosDebugOverlayMessage> _tileData =
new();
// Configuration set by debug commands and used by AtmosDebugOverlay {
/// <summary>Value source for display</summary>
public AtmosDebugOverlayMode CfgMode;
/// <summary>This is subtracted from value (applied before CfgScale)</summary>
public float CfgBase = 0;
/// <summary>The value is divided by this (applied after CfgBase)</summary>
public float CfgScale = Atmospherics.MolesCellStandard * 2;
/// <summary>Gas ID used by GasMoles mode</summary>
public int CfgSpecificGas = 0;
/// <summary>Uses black-to-white interpolation (as opposed to red-green-blue) for colourblind users</summary>
public bool CfgCBM = false;
// }
public override void Initialize()
{
base.Initialize();
@@ -83,4 +97,11 @@ namespace Content.Client.GameObjects.EntitySystems
return srcMsg.OverlayData[relative.X + (relative.Y * LocalViewRange)];
}
}
internal enum AtmosDebugOverlayMode
{
TotalMoles,
GasMoles,
Temperature
}
}