2021-06-21 02:13:54 +02:00
|
|
|
using Content.Shared.Examine;
|
2020-05-24 14:31:57 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.Localization;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2020-05-24 14:31:57 +02:00
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Warps
|
2020-05-24 14:31:57 +02:00
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2021-10-27 18:10:40 +02:00
|
|
|
#pragma warning disable 618
|
2020-05-24 14:31:57 +02:00
|
|
|
public sealed class WarpPointComponent : Component, IExamine
|
2021-10-27 18:10:40 +02:00
|
|
|
#pragma warning restore 618
|
2020-05-24 14:31:57 +02:00
|
|
|
{
|
|
|
|
|
public override string Name => "WarpPoint";
|
|
|
|
|
|
2021-03-16 15:50:20 +01:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("location")] public string? Location { get; set; }
|
2020-05-24 14:31:57 +02:00
|
|
|
|
2021-12-20 12:42:42 +01:00
|
|
|
public void Examine(FormattedMessage message, bool inDetailsRange)
|
2020-05-24 14:31:57 +02:00
|
|
|
{
|
|
|
|
|
var loc = Location == null ? "<null>" : $"'{Location}'";
|
2021-06-21 02:13:54 +02:00
|
|
|
message.AddText(Loc.GetString("warp-point-component-on-examine-success", ("location", loc)));
|
2020-05-24 14:31:57 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|