Moves guidebook UI logic to a UI Controller, some tweaks (#14601)

This commit is contained in:
AJCM-git
2023-03-22 23:41:43 -04:00
committed by GitHub
parent 6b2558456b
commit 7a6fddce4f
10 changed files with 268 additions and 127 deletions

View File

@@ -1,23 +1,34 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Client.Guidebook;
namespace Content.Client.Guidebook.Components;
/// <summary>
/// This component stores a reference to a guidebook that contains information relevant to this entity.
/// </summary>
[RegisterComponent]
[Access(typeof(GuidebookSystem))]
public sealed class GuideHelpComponent : Component
{
/// <summary>
/// What guides to include show when opening the guidebook. The first entry will be used to select the currently
/// selected guidebook.
/// What guides to include show when opening the guidebook. The first entry will be used to select the currently
/// selected guidebook.
/// </summary>
[DataField("guides", customTypeSerializer: typeof(PrototypeIdListSerializer<GuideEntryPrototype>), required: true)]
[ViewVariables]
public List<string> Guides = new();
/// <summary>
/// Whether or not to automatically include the children of the given guides.
/// Whether or not to automatically include the children of the given guides.
/// </summary>
[DataField("includeChildren")]
[ViewVariables(VVAccess.ReadWrite)]
public bool IncludeChildren = true;
/// <summary>
/// Whether or not to open the UI when interacting with the entity while on hand.
/// Mostly intended for books
/// </summary>
[DataField("openOnActivation")]
[ViewVariables(VVAccess.ReadWrite)]
public bool OpenOnActivation;
}