2021-02-27 04:12:09 +01:00
|
|
|
|
#nullable enable
|
2021-02-24 16:26:56 +01:00
|
|
|
|
using Robust.Shared.Localization;
|
|
|
|
|
|
using Robust.Shared.Serialization;
|
2020-10-08 17:41:23 +02:00
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Construction
|
|
|
|
|
|
{
|
|
|
|
|
|
public abstract class ArbitraryInsertConstructionGraphStep : EntityInsertConstructionGraphStep
|
|
|
|
|
|
{
|
2021-02-27 04:12:09 +01:00
|
|
|
|
public string Name { get; private set; } = string.Empty;
|
|
|
|
|
|
public SpriteSpecifier Icon { get; private set; } = SpriteSpecifier.Invalid;
|
2020-10-08 17:41:23 +02:00
|
|
|
|
|
|
|
|
|
|
public override void ExposeData(ObjectSerializer serializer)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.ExposeData(serializer);
|
|
|
|
|
|
|
|
|
|
|
|
serializer.DataField(this, x => x.Icon, "icon", SpriteSpecifier.Invalid);
|
|
|
|
|
|
serializer.DataField(this, x => x.Name, "name", string.Empty);
|
|
|
|
|
|
}
|
2021-02-24 16:26:56 +01:00
|
|
|
|
|
|
|
|
|
|
public override void DoExamine(FormattedMessage message, bool inDetailsRange)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (string.IsNullOrEmpty(Name)) return;
|
|
|
|
|
|
message.AddMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", Name)));
|
|
|
|
|
|
}
|
2020-10-08 17:41:23 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|