view ghosts on round end (#11680)
* view ghosts on round end * now make it good * it toggles now i hope
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.Visible;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Visible;
|
||||
using Content.Shared.Revenant.Components;
|
||||
using Content.Shared.Revenant.EntitySystems;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -8,6 +9,7 @@ namespace Content.Server.Revenant.EntitySystems;
|
||||
public sealed class CorporealSystem : SharedCorporealSystem
|
||||
{
|
||||
[Dependency] private readonly VisibilitySystem _visibilitySystem = default!;
|
||||
[Dependency] private readonly GameTicker _ticker = default!;
|
||||
|
||||
public override void OnStartup(EntityUid uid, CorporealComponent component, ComponentStartup args)
|
||||
{
|
||||
@@ -25,7 +27,7 @@ public sealed class CorporealSystem : SharedCorporealSystem
|
||||
{
|
||||
base.OnShutdown(uid, component, args);
|
||||
|
||||
if (TryComp<VisibilityComponent>(uid, out var visibility))
|
||||
if (TryComp<VisibilityComponent>(uid, out var visibility) && _ticker.RunLevel != GameRunLevel.PostRound)
|
||||
{
|
||||
_visibilitySystem.AddLayer(visibility, (int) VisibilityFlags.Ghost, false);
|
||||
_visibilitySystem.RemoveLayer(visibility, (int) VisibilityFlags.Normal, false);
|
||||
|
||||
Reference in New Issue
Block a user