Add guidebook protodata tag: embed prototype values in guidebook text (#27570)
* First clumsy implementation of guidebook protodata * Support for Properties, format strings * Better null * Rename file * Documentation and some cleanup * Handle errors better * Added note about client-side components * A couple of examples * DataFields * Use attributes like a sane person * Outdated doc * string.Empty * No IComponent? * No casting * Use EntityManager.ComponentFactory * Use FrozenDictionary * Cache tagged component fields * Iterate components and check if they're tagged
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.Guidebook;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
@@ -50,5 +52,15 @@ namespace Content.Shared.Explosion.Components
|
||||
/// Whether or not to show the user a popup when starting the timer.
|
||||
/// </summary>
|
||||
[DataField] public bool DoPopup = true;
|
||||
|
||||
#region GuidebookData
|
||||
|
||||
[GuidebookData]
|
||||
public float? ShortestDelayOption => DelayOptions?.Min();
|
||||
|
||||
[GuidebookData]
|
||||
public float? LongestDelayOption => DelayOptions?.Max();
|
||||
|
||||
#endregion GuidebookData
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user