diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index 4220f1231e..b5e9894ee3 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -26,6 +26,7 @@ using Content.Shared.Movement.Events; using Content.Shared.Movement.Systems; using Content.Shared.Popups; using Content.Shared.Storage.Components; +using Content.Shared.Tag; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Configuration; @@ -64,6 +65,7 @@ namespace Content.Server.Ghost [Dependency] private readonly DamageableSystem _damageable = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly TagSystem _tag = default!; private EntityQuery _ghostQuery; private EntityQuery _physicsQuery; @@ -398,8 +400,11 @@ namespace Content.Server.Ghost public void MakeVisible(bool visible) { var entityQuery = EntityQueryEnumerator(); - while (entityQuery.MoveNext(out var uid, out _, out var vis)) + while (entityQuery.MoveNext(out var uid, out var _, out var vis)) { + if (!_tag.HasTag(uid, "AllowGhostShownByEvent")) + continue; + if (visible) { _visibilitySystem.AddLayer((uid, vis), (int) VisibilityFlags.Normal, false); diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index 351fab6efe..7fe4fbed9b 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -73,6 +73,9 @@ id: MobObserver components: - type: Spectral + - type: Tag + tags: + - AllowGhostShownByEvent - type: entity id: ActionGhostBoo diff --git a/Resources/Prototypes/Magic/event_spells.yml b/Resources/Prototypes/Magic/event_spells.yml index 5aad8925a6..87b3a57107 100644 --- a/Resources/Prototypes/Magic/event_spells.yml +++ b/Resources/Prototypes/Magic/event_spells.yml @@ -1,7 +1,7 @@ - type: entity id: ActionSummonGhosts name: Summon Ghosts - description: Makes all current ghosts permanently invisible + description: Makes all current ghosts permanently visible components: - type: InstantAction useDelay: 120 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 968805a7b6..958caccfe7 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -15,6 +15,9 @@ - type: Tag id: AirSensor +- type: Tag + id: AllowGhostShownByEvent + - type: Tag id: Ambrosia