Files
wwdpublic/Content.Server/Warps/WarpPointSystem.cs
keronshb 83d95e0b21 Wizard Teleport Scroll (Teleport Location ECS) (#36424)
(cherry picked from commit 0a394d4af5b3b5320a011ae2bbe0542f41fe22dc)
2025-11-20 14:52:37 +03:00

24 lines
709 B
C#

using Content.Shared.Examine;
using Content.Shared.Ghost;
using Content.Shared.Warps;
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)));
}
}