1
0

WarpPointSystem.cs 681 B

12345678910111213141516171819202122
  1. using Content.Shared.Examine;
  2. using Content.Shared.Ghost;
  3. namespace Content.Server.Warps;
  4. public sealed class WarpPointSystem : EntitySystem
  5. {
  6. public override void Initialize()
  7. {
  8. base.Initialize();
  9. SubscribeLocalEvent<WarpPointComponent, ExaminedEvent>(OnWarpPointExamine);
  10. }
  11. private void OnWarpPointExamine(EntityUid uid, WarpPointComponent component, ExaminedEvent args)
  12. {
  13. if (!HasComp<GhostComponent>(args.Examiner))
  14. return;
  15. var loc = component.Location == null ? "<null>" : $"'{component.Location}'";
  16. args.PushText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc)));
  17. }
  18. }