6
StarHorizon_Public/Content.Shared/Construction/Steps/ArbitraryInsertConstructionGraphStep.cs
2026-01-24 12:49:55 +03:00

33 lines
1.1 KiB
C#

using Content.Shared.Examine;
using Robust.Shared.Utility;
namespace Content.Shared.Construction.Steps
{
public abstract partial class ArbitraryInsertConstructionGraphStep : EntityInsertConstructionGraphStep
{
[DataField] public LocId Name { get; private set; } = string.Empty;
[DataField] public SpriteSpecifier? Icon { get; private set; }
public override void DoExamine(ExaminedEvent examinedEvent)
{
if (string.IsNullOrEmpty(Name))
return;
var stepName = Loc.GetString(Name);
examinedEvent.PushMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", stepName)));
}
public override ConstructionGuideEntry GenerateGuideEntry()
{
var stepName = Loc.GetString(Name);
return new ConstructionGuideEntry
{
Localization = "construction-presenter-arbitrary-step",
Arguments = new (string, object)[]{("name", stepName)},
Icon = Icon,
};
}
}
}