More api11 and 7.1 work
This commit is contained in:
@@ -4,8 +4,8 @@ using OtterGui.Log;
|
||||
using Penumbra.GameData.Data;
|
||||
using System.Collections.Frozen;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using CustomizePlus.GameData.ReverseSearchDictionaries.Bases;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace CustomizePlus.GameData.ReverseSearchDictionaries;
|
||||
|
||||
@@ -17,8 +17,8 @@ public sealed class ReverseSearchDictBNpc(IDalamudPluginInterface pluginInterfac
|
||||
private static IReadOnlyDictionary<string, uint> CreateBNpcData(IDataManager gameData)
|
||||
{
|
||||
var sheet = gameData.GetExcelSheet<BNpcName>(gameData.Language)!;
|
||||
var dict = new Dictionary<string, uint>((int)sheet.RowCount);
|
||||
foreach (var n in sheet.Where(n => n.Singular.RawData.Length > 0))
|
||||
var dict = new Dictionary<string, uint>((int)sheet.Count);
|
||||
foreach (var n in sheet.Where(n => n.Singular.ByteLength > 0))
|
||||
dict.TryAdd(DataUtility.ToTitleCaseExtended(n.Singular, n.Article), n.RowId);
|
||||
return dict.ToFrozenDictionary();
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using OtterGui.Log;
|
||||
using Penumbra.GameData.Data;
|
||||
using System.Collections.Frozen;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using CustomizePlus.GameData.ReverseSearchDictionaries.Bases;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace CustomizePlus.GameData.ReverseSearchDictionaries;
|
||||
|
||||
@@ -17,8 +17,8 @@ public sealed class ReverseSearchDictCompanion(IDalamudPluginInterface pluginInt
|
||||
private static IReadOnlyDictionary<string, uint> CreateCompanionData(IDataManager gameData)
|
||||
{
|
||||
var sheet = gameData.GetExcelSheet<Companion>(gameData.Language)!;
|
||||
var dict = new Dictionary<string, uint>((int)sheet.RowCount);
|
||||
foreach (var c in sheet.Where(c => c.Singular.RawData.Length > 0 && c.Order < ushort.MaxValue))
|
||||
var dict = new Dictionary<string, uint>((int)sheet.Count);
|
||||
foreach (var c in sheet.Where(c => c.Singular.ByteLength > 0 && c.Order < ushort.MaxValue))
|
||||
dict.TryAdd(DataUtility.ToTitleCaseExtended(c.Singular, c.Article), c.RowId);
|
||||
return dict.ToFrozenDictionary();
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ using OtterGui.Log;
|
||||
using Penumbra.GameData.Data;
|
||||
using System.Collections.Frozen;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using CustomizePlus.GameData.ReverseSearchDictionaries.Bases;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace CustomizePlus.GameData.ReverseSearchDictionaries;
|
||||
|
||||
@@ -17,8 +17,8 @@ public sealed class ReverseSearchDictENpc(IDalamudPluginInterface pluginInterfac
|
||||
private static IReadOnlyDictionary<string, uint> CreateENpcData(IDataManager gameData)
|
||||
{
|
||||
var sheet = gameData.GetExcelSheet<ENpcResident>(gameData.Language)!;
|
||||
var dict = new Dictionary<string, uint>((int)sheet.RowCount);
|
||||
foreach (var n in sheet.Where(e => e.Singular.RawData.Length > 0))
|
||||
var dict = new Dictionary<string, uint>((int)sheet.Count);
|
||||
foreach (var n in sheet.Where(e => e.Singular.ByteLength > 0))
|
||||
dict.TryAdd(DataUtility.ToTitleCaseExtended(n.Singular, n.Article), n.RowId);
|
||||
return dict.ToFrozenDictionary();
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ using OtterGui.Log;
|
||||
using Penumbra.GameData.Data;
|
||||
using System.Collections.Frozen;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using CustomizePlus.GameData.ReverseSearchDictionaries.Bases;
|
||||
using Dalamud.Utility;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace CustomizePlus.GameData.ReverseSearchDictionaries;
|
||||
|
||||
@@ -18,7 +18,7 @@ public sealed class ReverseSearchDictMount(IDalamudPluginInterface pluginInterfa
|
||||
private static IReadOnlyDictionary<string, uint> CreateMountData(IDataManager gameData)
|
||||
{
|
||||
var sheet = gameData.GetExcelSheet<Mount>(gameData.Language)!;
|
||||
var dict = new Dictionary<string, uint>((int)sheet.RowCount);
|
||||
var dict = new Dictionary<string, uint>((int)sheet.Count);
|
||||
// Add some custom data.
|
||||
dict.TryAdd("Falcon (Porter)", 119);
|
||||
dict.TryAdd("Hippo Cart (Quest)", 295);
|
||||
@@ -27,14 +27,14 @@ public sealed class ReverseSearchDictMount(IDalamudPluginInterface pluginInterfa
|
||||
dict.TryAdd("Moon-hopper (Quest)", 309);
|
||||
foreach (var m in sheet)
|
||||
{
|
||||
if (m.Singular.RawData.Length > 0 && m.Order >= 0)
|
||||
if (m.Singular.ByteLength > 0 && m.Order >= 0)
|
||||
{
|
||||
dict.TryAdd(DataUtility.ToTitleCaseExtended(m.Singular, m.Article), m.RowId);
|
||||
}
|
||||
else if (m.Unknown18.RawData.Length > 0)
|
||||
else if (m.Unknown1.ByteLength > 0)
|
||||
{
|
||||
// Try to transform some file names into category names.
|
||||
var whistle = m.Unknown18.ToDalamudString().ToString();
|
||||
var whistle = m.Unknown18.ToString();
|
||||
whistle = whistle.Replace("SE_Bt_Etc_", string.Empty)
|
||||
.Replace("Mount_", string.Empty)
|
||||
.Replace("_call", string.Empty)
|
||||
|
||||
Reference in New Issue
Block a user