Only ghosts can examine warps names (#11124)
This commit is contained in:
parent
f6e9145e11
commit
54dad06851
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue