Only ghosts can examine warps names (#11124)

This commit is contained in:
Alex Evgrashin
2022-09-09 05:42:46 +02:00
committed by GitHub
parent f6e9145e11
commit 54dad06851

View File

@@ -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<WarpPointComponent, ExaminedEvent>(OnWarpPointExamine);
}
private static void OnWarpPointExamine(EntityUid uid, WarpPointComponent component, ExaminedEvent args)
private void OnWarpPointExamine(EntityUid uid, WarpPointComponent component, ExaminedEvent args)
{
if (!HasComp<GhostComponent>(args.Examiner))
return;
var loc = component.Location == null ? "<null>" : $"'{component.Location}'";
args.PushText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc)));
}