2023-01-16 21:42:22 +13:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
2024-06-07 00:05:58 +12:00
|
|
|
namespace Content.Shared.Guidebook;
|
|
|
|
|
|
2025-03-19 14:30:31 -04:00
|
|
|
[Prototype]
|
2024-06-07 00:05:58 +12:00
|
|
|
public sealed partial class GuideEntryPrototype : GuideEntry, IPrototype
|
|
|
|
|
{
|
|
|
|
|
public string ID => Id;
|
|
|
|
|
}
|
2023-01-16 21:42:22 +13:00
|
|
|
|
|
|
|
|
[Virtual]
|
|
|
|
|
public class GuideEntry
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The file containing the contents of this guide.
|
|
|
|
|
/// </summary>
|
2024-06-07 00:05:58 +12:00
|
|
|
[DataField(required: true)] public ResPath Text = default!;
|
2023-01-16 21:42:22 +13:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The unique id for this guide.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[IdDataField]
|
|
|
|
|
public string Id = default!;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this guide. This gets localized.
|
|
|
|
|
/// </summary>
|
2024-06-07 00:05:58 +12:00
|
|
|
[DataField(required: true)] public string Name = default!;
|
2023-01-16 21:42:22 +13:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The "children" of this guide for when guides are shown in a tree / table of contents.
|
|
|
|
|
/// </summary>
|
2024-06-07 00:05:58 +12:00
|
|
|
[DataField]
|
|
|
|
|
public List<ProtoId<GuideEntryPrototype>> Children = new();
|
2023-01-16 21:42:22 +13:00
|
|
|
|
2023-07-26 10:05:09 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Enable filtering of items.
|
|
|
|
|
/// </summary>
|
2024-06-07 00:05:58 +12:00
|
|
|
[DataField] public bool FilterEnabled = default!;
|
2023-07-26 10:05:09 +02:00
|
|
|
|
2024-06-07 07:28:55 -04:00
|
|
|
[DataField] public bool RuleEntry;
|
2023-07-26 10:05:09 +02:00
|
|
|
|
2023-01-16 21:42:22 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// 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 <see cref="Children"/>.
|
|
|
|
|
/// </summary>
|
2024-06-07 00:05:58 +12:00
|
|
|
[DataField] public int Priority = 0;
|
2024-05-02 20:41:11 +03:00
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public bool CrystallPunkAllowed = false;
|
2024-09-23 18:34:04 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ability to disable guidebooks in the wrong language. Use "ru-RU" or "en-US" for example, check ContentLocalizationManager.Culture
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public string? LocFilter;
|
2023-01-16 21:42:22 +13:00
|
|
|
}
|