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)
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Frozen;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Services;
|
||||
using ImGuiNET;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using OtterGui.Custom;
|
||||
using OtterGui.Log;
|
||||
using Penumbra.GameData.Actors;
|
||||
using Penumbra.GameData.Data;
|
||||
using Penumbra.GameData.DataContainers;
|
||||
using Penumbra.GameData.DataContainers.Bases;
|
||||
using Penumbra.GameData.Gui;
|
||||
using Penumbra.GameData.Interop;
|
||||
using Penumbra.GameData.Structs;
|
||||
using Penumbra.String;
|
||||
|
||||
namespace CustomizePlus.UI.Windows.Controls;
|
||||
|
||||
@@ -66,8 +66,8 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
|
||||
_event.Subscribe(OnProfileChange, ProfileChanged.Priority.ProfileFileSystemSelector);
|
||||
|
||||
_clientState.Login += OnLoginLogout;
|
||||
_clientState.Logout += OnLoginLogout;
|
||||
_clientState.Login += OnLogin;
|
||||
_clientState.Logout += OnLogout;
|
||||
|
||||
AddButton(NewButton, 0);
|
||||
AddButton(CloneButton, 20);
|
||||
@@ -79,8 +79,8 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
{
|
||||
base.Dispose();
|
||||
_event.Unsubscribe(OnProfileChange);
|
||||
_clientState.Login -= OnLoginLogout;
|
||||
_clientState.Logout -= OnLoginLogout;
|
||||
_clientState.Login -= OnLogin;
|
||||
_clientState.Logout -= OnLogout;
|
||||
}
|
||||
|
||||
protected override uint ExpandedFolderColor
|
||||
@@ -142,7 +142,12 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLoginLogout()
|
||||
private void OnLogin()
|
||||
{
|
||||
SetFilterDirty();
|
||||
}
|
||||
|
||||
private void OnLogout(int type, int code)
|
||||
{
|
||||
SetFilterDirty();
|
||||
}
|
||||
|
||||
Submodule submodules/ECommons updated: 3570e20725...b7282bc11c
Submodule submodules/OtterGui updated: 3e6b085749...8ba88eff15
Submodule submodules/Penumbra.GameData updated: 63cbf82417...fb4a6673c1
Reference in New Issue
Block a user