From 54dad068519dbc02cfdd64c97937ef903a1a5cf5 Mon Sep 17 00:00:00 2001 From: Alex Evgrashin Date: Fri, 9 Sep 2022 05:42:46 +0200 Subject: [PATCH] Only ghosts can examine warps names (#11124) --- Content.Server/Warps/WarpPointSystem.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Content.Server/Warps/WarpPointSystem.cs b/Content.Server/Warps/WarpPointSystem.cs index 3d9cd4e73a..9798f3fe86 100644 --- a/Content.Server/Warps/WarpPointSystem.cs +++ b/Content.Server/Warps/WarpPointSystem.cs @@ -1,3 +1,4 @@ +using Content.Server.Ghost.Components; using Content.Shared.Examine; namespace Content.Server.Warps; @@ -10,8 +11,11 @@ public sealed class WarpPointSystem : EntitySystem SubscribeLocalEvent(OnWarpPointExamine); } - private static void OnWarpPointExamine(EntityUid uid, WarpPointComponent component, ExaminedEvent args) + private void OnWarpPointExamine(EntityUid uid, WarpPointComponent component, ExaminedEvent args) { + if (!HasComp(args.Examiner)) + return; + var loc = component.Location == null ? "" : $"'{component.Location}'"; args.PushText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc))); }