]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Wizard Fix - Summon Ghost Event no longer shows Admin Ghosts or Revenants (#34994)
authorkeronshb <54602815+keronshb@users.noreply.github.com>
Sun, 16 Feb 2025 20:29:10 +0000 (15:29 -0500)
committerGitHub <noreply@github.com>
Sun, 16 Feb 2025 20:29:10 +0000 (21:29 +0100)
* Prevents admin ghosts from being shown with ghost event

* Changes summon ghost tooltip to permanently visible

* Adds AllowGhostShownByEvent tag, adds it to regular observers, removes ghost hands check & revenant check and replaces it with a tag check.

Content.Server/Ghost/GhostSystem.cs
Resources/Prototypes/Entities/Mobs/Player/observer.yml
Resources/Prototypes/Magic/event_spells.yml
Resources/Prototypes/tags.yml

index 4220f1231ecf3b1b42ce68f455b4bf7a9403ad7a..b5e9894ee37bff26f6ab6d4205784f9f116f40aa 100644 (file)
@@ -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<GhostComponent> _ghostQuery;
         private EntityQuery<PhysicsComponent> _physicsQuery;
@@ -398,8 +400,11 @@ namespace Content.Server.Ghost
         public void MakeVisible(bool visible)
         {
             var entityQuery = EntityQueryEnumerator<GhostComponent, VisibilityComponent>();
-            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);
index 351fab6efea05a7d1c85789a42566b03fbe4b0a0..7fe4fbed9bd40a70ca1ef70980f0cbe9b959f339 100644 (file)
@@ -73,6 +73,9 @@
   id: MobObserver
   components:
   - type: Spectral
+  - type: Tag
+    tags:
+    - AllowGhostShownByEvent
 
 - type: entity
   id: ActionGhostBoo
index 5aad8925a60a27f6918ad7820bdb4685be3b0cb1..87b3a571077d4d79fecd43bee586179b7894424e 100644 (file)
@@ -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
index 968805a7b69c41106cb5f56a6a7538cc34983301..958caccfe7dc0e367b82ea2e493be5bfb3e93c60 100644 (file)
@@ -15,6 +15,9 @@
 - type: Tag
   id: AirSensor
 
+- type: Tag
+  id: AllowGhostShownByEvent
+
 - type: Tag
   id: Ambrosia