Make sure explosions reset on round restart (#7801)
This commit is contained in:
@@ -7,6 +7,7 @@ using Content.Shared.Camera;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Explosion;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Server.Containers;
|
||||
using Robust.Server.Player;
|
||||
@@ -67,6 +68,8 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
SubscribeLocalEvent<ExplosionResistanceComponent, GetExplosionResistanceEvent>(OnGetResistance);
|
||||
SubscribeLocalEvent<TileChangedEvent>(OnTileChanged);
|
||||
|
||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnReset);
|
||||
|
||||
// Handled by ExplosionSystem.Processing.cs
|
||||
SubscribeLocalEvent<MapChangedEvent>(OnMapChanged);
|
||||
|
||||
@@ -76,10 +79,18 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
InitAirtightMap();
|
||||
}
|
||||
|
||||
private void OnReset(RoundRestartCleanupEvent ev)
|
||||
{
|
||||
_explosionQueue.Clear();
|
||||
_activeExplosion = null;
|
||||
_nodeGroupSystem.Snoozing = false;
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
UnsubscribeCvars();
|
||||
_nodeGroupSystem.Snoozing = false;
|
||||
}
|
||||
|
||||
private void OnGetResistance(EntityUid uid, ExplosionResistanceComponent component, GetExplosionResistanceEvent args)
|
||||
|
||||
Reference in New Issue
Block a user