Files
tbd-station-14/Content.Server/Warps/WarpPointSystem.cs
2023-08-25 18:50:46 +10:00

23 lines
681 B
C#

using Content.Shared.Examine;
using Content.Shared.Ghost;
namespace Content.Server.Warps;
public sealed class WarpPointSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<WarpPointComponent, ExaminedEvent>(OnWarpPointExamine);
}
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)));
}
}