Wizard Fix - Summon Ghost Event no longer shows Admin Ghosts or Revenants (#34994)
* 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.
This commit is contained in:
@@ -26,6 +26,7 @@ using Content.Shared.Movement.Events;
|
|||||||
using Content.Shared.Movement.Systems;
|
using Content.Shared.Movement.Systems;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Storage.Components;
|
using Content.Shared.Storage.Components;
|
||||||
|
using Content.Shared.Tag;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
@@ -64,6 +65,7 @@ namespace Content.Server.Ghost
|
|||||||
[Dependency] private readonly DamageableSystem _damageable = default!;
|
[Dependency] private readonly DamageableSystem _damageable = default!;
|
||||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
[Dependency] private readonly TagSystem _tag = default!;
|
||||||
|
|
||||||
private EntityQuery<GhostComponent> _ghostQuery;
|
private EntityQuery<GhostComponent> _ghostQuery;
|
||||||
private EntityQuery<PhysicsComponent> _physicsQuery;
|
private EntityQuery<PhysicsComponent> _physicsQuery;
|
||||||
@@ -398,8 +400,11 @@ namespace Content.Server.Ghost
|
|||||||
public void MakeVisible(bool visible)
|
public void MakeVisible(bool visible)
|
||||||
{
|
{
|
||||||
var entityQuery = EntityQueryEnumerator<GhostComponent, VisibilityComponent>();
|
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)
|
if (visible)
|
||||||
{
|
{
|
||||||
_visibilitySystem.AddLayer((uid, vis), (int) VisibilityFlags.Normal, false);
|
_visibilitySystem.AddLayer((uid, vis), (int) VisibilityFlags.Normal, false);
|
||||||
|
|||||||
@@ -73,6 +73,9 @@
|
|||||||
id: MobObserver
|
id: MobObserver
|
||||||
components:
|
components:
|
||||||
- type: Spectral
|
- type: Spectral
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- AllowGhostShownByEvent
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: ActionGhostBoo
|
id: ActionGhostBoo
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: ActionSummonGhosts
|
id: ActionSummonGhosts
|
||||||
name: Summon Ghosts
|
name: Summon Ghosts
|
||||||
description: Makes all current ghosts permanently invisible
|
description: Makes all current ghosts permanently visible
|
||||||
components:
|
components:
|
||||||
- type: InstantAction
|
- type: InstantAction
|
||||||
useDelay: 120
|
useDelay: 120
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: AirSensor
|
id: AirSensor
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: AllowGhostShownByEvent
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: Ambrosia
|
id: Ambrosia
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user