Replace IResettingEntitySystem with RoundRestartCleanupEvent. (#4245)

* Replace IResettingEntitySystem with RoundRestartCleanupEvent.

* oops
This commit is contained in:
Vera Aguilera Puerto
2021-06-29 15:56:07 +02:00
committed by GitHub
parent 16e1c2c798
commit bc7b315b18
27 changed files with 136 additions and 66 deletions

View File

@@ -25,7 +25,7 @@ using Dependency = Robust.Shared.IoC.DependencyAttribute;
namespace Content.Server.Atmos.EntitySystems
{
[UsedImplicitly]
internal sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem, IResettingEntitySystem
internal sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
@@ -67,6 +67,8 @@ namespace Content.Server.Atmos.EntitySystems
{
base.Initialize();
SubscribeLocalEvent<RoundRestartCleanupEvent>(Reset);
_atmosphereSystem = Get<AtmosphereSystem>();
_playerManager.PlayerStatusChanged += OnPlayerStatusChanged;
_mapManager.OnGridRemoved += OnGridRemoved;
@@ -479,7 +481,7 @@ namespace Content.Server.Atmos.EntitySystems
}
}
public void Reset()
public void Reset(RoundRestartCleanupEvent ev)
{
_invalidTiles.Clear();
_overlay.Clear();