ArbitraryInsertConstructionGraphStep.cs 999 B

123456789101112131415161718192021222324252627282930
  1. using Content.Shared.Examine;
  2. using Robust.Shared.Utility;
  3. namespace Content.Shared.Construction.Steps
  4. {
  5. public abstract partial class ArbitraryInsertConstructionGraphStep : EntityInsertConstructionGraphStep
  6. {
  7. [DataField("name")] public string Name { get; private set; } = string.Empty;
  8. [DataField("icon")] public SpriteSpecifier? Icon { get; private set; }
  9. public override void DoExamine(ExaminedEvent examinedEvent)
  10. {
  11. if (string.IsNullOrEmpty(Name))
  12. return;
  13. examinedEvent.PushMarkup(Loc.GetString("construction-insert-arbitrary-entity", ("stepName", Name)));
  14. }
  15. public override ConstructionGuideEntry GenerateGuideEntry()
  16. {
  17. return new ConstructionGuideEntry
  18. {
  19. Localization = "construction-presenter-arbitrary-step",
  20. Arguments = new (string, object)[]{("name", Name)},
  21. Icon = Icon,
  22. };
  23. }
  24. }
  25. }