Only ghosts can examine warps names (#11124)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Server.Ghost.Components;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
|
|
||||||
namespace Content.Server.Warps;
|
namespace Content.Server.Warps;
|
||||||
@@ -10,8 +11,11 @@ public sealed class WarpPointSystem : EntitySystem
|
|||||||
SubscribeLocalEvent<WarpPointComponent, ExaminedEvent>(OnWarpPointExamine);
|
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}'";
|
var loc = component.Location == null ? "<null>" : $"'{component.Location}'";
|
||||||
args.PushText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc)));
|
args.PushText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user