2021-09-15 16:36:43 +02:00
|
|
|
|
using Content.Shared.Examine;
|
2020-10-08 17:41:23 +02:00
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Shared.Construction.Steps
|
2020-10-08 17:41:23 +02:00
|
|
|
|
{
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public abstract partial class ArbitraryInsertConstructionGraphStep : EntityInsertConstructionGraphStep
|
2020-10-08 17:41:23 +02:00
|
|
|
|
{
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[DataField("name")] public string Name { get; private set; } = string.Empty;
|
2020-10-08 17:41:23 +02:00
|
|
|
|
|
2022-10-30 02:48:53 -04:00
|
|
|
|
[DataField("icon")] public SpriteSpecifier? Icon { get; private set; }
|
2021-02-24 16:26:56 +01:00
|
|
|
|
|
2021-09-15 16:36:43 +02:00
|
|
|
|
public override void DoExamine(ExaminedEvent examinedEvent)
|
2021-02-24 16:26:56 +01:00
|
|
|
|
{
|
2021-09-15 16:36:43 +02:00
|
|
|
|
if (string.IsNullOrEmpty(Name))
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
2024-01-05 23:53:13 -07:00
|
|
|
|
examinedEvent.PushMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", Name)));
|
2021-02-24 16:26:56 +01:00
|
|
|
|
}
|
2021-11-02 11:24:32 +01:00
|
|
|
|
|
|
|
|
|
|
public override ConstructionGuideEntry GenerateGuideEntry()
|
|
|
|
|
|
{
|
2022-10-30 02:48:53 -04:00
|
|
|
|
return new ConstructionGuideEntry
|
2021-11-02 11:24:32 +01:00
|
|
|
|
{
|
|
|
|
|
|
Localization = "construction-presenter-arbitrary-step",
|
|
|
|
|
|
Arguments = new (string, object)[]{("name", Name)},
|
|
|
|
|
|
Icon = Icon,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2020-10-08 17:41:23 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|