mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 02:41:18 +03:00
* commit * self review * x * format --------- Co-authored-by: iaada <iaada@users.noreply.github.com> Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
32 lines
1.1 KiB
C#
32 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 = [("name", stepName), ("amount", Amount)],
|
|
Icon = Icon,
|
|
};
|
|
}
|
|
}
|
|
}
|