mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-20 06:47:44 +01:00
Add SeStringEvaluator service (#2188)
* Add SeStringEvaluator service * Move DrawCopyableText into WidgetUtil * Use Icon2RemapTable in SeStringRenderer * Beautify some code * Make sure to use the correct language * Add SeString Creator widget * Fix getting local parameters * Update expressionNames * misc changes * Use InvariantCulture in TryResolveSheet * Add SeStringEvaluatorAgingStep * Fix item id comparisons * Add SheetRedirectResolverAgingStep * Add NounProcessorAgingStep * Update SeString.CreateItemLink This also adds the internal ItemUtil class. * Fix name of SeStringCreator widget * Add Global Parameters tab to SeStringCreatorWidget * Load widgets on demand * Update SeStringCreatorWidget * Resizable SeStringCreatorWidget panels * Update GamepadStateAgingStep * Experimental status was removed in #2144 * Update SheetRedirectResolver, rewrite Noun params * Fixes for 4 am code * Remove incorrect column offset I have no idea how that happened. * Draw names of linked things --------- Co-authored-by: Soreepeong <3614868+Soreepeong@users.noreply.github.com> Co-authored-by: KazWolfe <KazWolfe@users.noreply.github.com>
This commit is contained in:
parent
7cac19ce81
commit
fdbfdbb2cd
36 changed files with 5831 additions and 196 deletions
73
Dalamud/Game/Text/Noun/NounParams.cs
Normal file
73
Dalamud/Game/Text/Noun/NounParams.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using Dalamud.Game.Text.Noun.Enums;
|
||||
|
||||
using Lumina.Text.ReadOnly;
|
||||
|
||||
using LSheets = Lumina.Excel.Sheets;
|
||||
|
||||
namespace Dalamud.Game.Text.Noun;
|
||||
|
||||
/// <summary>
|
||||
/// Parameters for noun processing.
|
||||
/// </summary>
|
||||
internal record struct NounParams()
|
||||
{
|
||||
/// <summary>
|
||||
/// The language of the sheet to be processed.
|
||||
/// </summary>
|
||||
public required ClientLanguage Language;
|
||||
|
||||
/// <summary>
|
||||
/// The name of the sheet containing the row to process.
|
||||
/// </summary>
|
||||
public required string SheetName = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The row id within the sheet to process.
|
||||
/// </summary>
|
||||
public required uint RowId;
|
||||
|
||||
/// <summary>
|
||||
/// The quantity of the entity (default is 1). Used to determine grammatical number (e.g., singular or plural).
|
||||
/// </summary>
|
||||
public int Quantity = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The article type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Depending on the <see cref="Language"/>, this has different meanings.<br/>
|
||||
/// See <see cref="JapaneseArticleType"/>, <see cref="GermanArticleType"/>, <see cref="FrenchArticleType"/>, <see cref="EnglishArticleType"/>.
|
||||
/// </remarks>
|
||||
public int ArticleType = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The grammatical case (e.g., Nominative, Genitive, Dative, Accusative) used for German texts (default is 0).
|
||||
/// </summary>
|
||||
public int GrammaticalCase = 0;
|
||||
|
||||
/// <summary>
|
||||
/// An optional string that is placed in front of the text that should be linked, such as item names (default is an empty string; the game uses "//").
|
||||
/// </summary>
|
||||
public ReadOnlySeString LinkMarker = default;
|
||||
|
||||
/// <summary>
|
||||
/// An indicator that this noun will be processed from an Action sheet. Only used for German texts.
|
||||
/// </summary>
|
||||
public bool IsActionSheet;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the column offset.
|
||||
/// </summary>
|
||||
public readonly int ColumnOffset => this.SheetName switch
|
||||
{
|
||||
// See "E8 ?? ?? ?? ?? 44 8B 6B 08"
|
||||
nameof(LSheets.BeastTribe) => 10,
|
||||
nameof(LSheets.DeepDungeonItem) => 1,
|
||||
nameof(LSheets.DeepDungeonEquipment) => 1,
|
||||
nameof(LSheets.DeepDungeonMagicStone) => 1,
|
||||
nameof(LSheets.DeepDungeonDemiclone) => 1,
|
||||
nameof(LSheets.Glasses) => 4,
|
||||
nameof(LSheets.GlassesStyle) => 15,
|
||||
_ => 0,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue