using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.Utility; namespace Content.Client.Guidebook; [Virtual] public class GuideEntry { /// /// The file containing the contents of this guide. /// [DataField("text", required: true)] public ResourcePath Text = default!; /// /// The unique id for this guide. /// [IdDataField] public string Id = default!; /// /// The name of this guide. This gets localized. /// [DataField("name", required: true)] public string Name = default!; /// /// The "children" of this guide for when guides are shown in a tree / table of contents. /// [DataField("children", customTypeSerializer:typeof(PrototypeIdListSerializer))] public List Children = new(); /// /// Priority for sorting top-level guides when shown in a tree / table of contents. /// If the guide is the child of some other guide, the order simply determined by the order of children in . /// [DataField("priority")] public int Priority = 0; } [Prototype("guideEntry")] public sealed class GuideEntryPrototype : GuideEntry, IPrototype { public string ID => Id; }