Fix blindfold round cleanup bug (#9821)

* Blindness public api

* fix blinding round cleanup bug
This commit is contained in:
Rane
2022-07-19 03:10:08 -04:00
committed by GitHub
parent 91adb3edb3
commit 037feb3ad0
2 changed files with 33 additions and 2 deletions

View File

@@ -3,6 +3,14 @@ using Content.Shared.Eye.Blinding;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Administration;
using Content.Shared.Administration.Events;
using Content.Shared.GameTicking;
using Robust.Shared.GameObjects;
using Robust.Shared.Network;
namespace Content.Client.Eye.Blinding;
@@ -25,6 +33,8 @@ public sealed class BlindingSystem : EntitySystem
SubscribeLocalEvent<BlindableComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<BlindableComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup);
_overlay = new();
}
@@ -52,4 +62,9 @@ public sealed class BlindingSystem : EntitySystem
_overlayMan.RemoveOverlay(_overlay);
}
}
private void RoundRestartCleanup(RoundRestartCleanupEvent ev)
{
_lightManager.Enabled = true;
}
}