1
0

GuideEntry.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Utility;
  3. namespace Content.Shared.Guidebook;
  4. [Prototype]
  5. public sealed partial class GuideEntryPrototype : GuideEntry, IPrototype
  6. {
  7. public string ID => Id;
  8. }
  9. [Virtual]
  10. public class GuideEntry
  11. {
  12. /// <summary>
  13. /// The file containing the contents of this guide.
  14. /// </summary>
  15. [DataField(required: true)] public ResPath Text = default!;
  16. /// <summary>
  17. /// The unique id for this guide.
  18. /// </summary>
  19. [IdDataField]
  20. public string Id = default!;
  21. /// <summary>
  22. /// The name of this guide. This gets localized.
  23. /// </summary>
  24. [DataField(required: true)] public string Name = default!;
  25. /// <summary>
  26. /// The "children" of this guide for when guides are shown in a tree / table of contents.
  27. /// </summary>
  28. [DataField]
  29. public List<ProtoId<GuideEntryPrototype>> Children = new();
  30. /// <summary>
  31. /// Enable filtering of items.
  32. /// </summary>
  33. [DataField] public bool FilterEnabled = default!;
  34. [DataField] public bool RuleEntry;
  35. /// <summary>
  36. /// Priority for sorting top-level guides when shown in a tree / table of contents.
  37. /// If the guide is the child of some other guide, the order simply determined by the order of children in <see cref="Children"/>.
  38. /// </summary>
  39. [DataField] public int Priority = 0;
  40. }