From b1a7aef97d9da0cf1034153030514ab1637d1469 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Sun, 15 Nov 2020 04:16:02 +0100 Subject: [PATCH] Make atmos debug overlay system data clear on round restart (#2558) --- .../GameObjects/EntitySystems/AtmosDebugOverlaySystem.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/EntitySystems/AtmosDebugOverlaySystem.cs b/Content.Client/GameObjects/EntitySystems/AtmosDebugOverlaySystem.cs index 5b63db19f2..2a0895d1e1 100644 --- a/Content.Client/GameObjects/EntitySystems/AtmosDebugOverlaySystem.cs +++ b/Content.Client/GameObjects/EntitySystems/AtmosDebugOverlaySystem.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using Content.Client.Atmos; using Content.Shared.Atmos; using Content.Shared.GameObjects.EntitySystems.Atmos; +using Content.Shared.GameTicking; using JetBrains.Annotations; using Robust.Client.Graphics; using Robust.Client.Interfaces.Graphics.Overlays; @@ -19,7 +20,7 @@ using Robust.Shared.Utility; namespace Content.Client.GameObjects.EntitySystems { [UsedImplicitly] - internal sealed class AtmosDebugOverlaySystem : SharedAtmosDebugOverlaySystem + internal sealed class AtmosDebugOverlaySystem : SharedAtmosDebugOverlaySystem, IResettingEntitySystem { [Dependency] private readonly IMapManager _mapManager = default!; @@ -55,6 +56,11 @@ namespace Content.Client.GameObjects.EntitySystems overlayManager.RemoveOverlay(nameof(GasTileOverlay)); } + public void Reset() + { + _tileData.Clear(); + } + private void OnGridRemoved(GridId gridId) { if (_tileData.ContainsKey(gridId))