diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 209ed90de..ea1afcac5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,9 @@ name: Build Dalamud on: [push, pull_request, workflow_dispatch] +# Globally blocking because of git pushes in deploy step concurrency: - group: build_dalamud_${{ github.ref_name }} + group: build_dalamud_${{ github.repository_owner }} cancel-in-progress: false jobs: @@ -23,7 +24,7 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 - uses: actions/setup-dotnet@v3 with: - dotnet-version: '10.0.100' + dotnet-version: '9.0.200' - name: Define VERSION run: | $env:COMMIT = $env:GITHUB_SHA.Substring(0, 7) diff --git a/.github/workflows/rollup.yml b/.github/workflows/rollup.yml index f4e013258..8fe049ad7 100644 --- a/.github/workflows/rollup.yml +++ b/.github/workflows/rollup.yml @@ -1,8 +1,8 @@ name: Rollup changes to next version on: -# push: -# branches: -# - master + push: + branches: + - master workflow_dispatch: jobs: diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 6ffb3bb01..8331affcc 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,57 +1,19 @@ { "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Build Schema", + "$ref": "#/definitions/build", "definitions": { - "Host": { - "type": "string", - "enum": [ - "AppVeyor", - "AzurePipelines", - "Bamboo", - "Bitbucket", - "Bitrise", - "GitHubActions", - "GitLab", - "Jenkins", - "Rider", - "SpaceAutomation", - "TeamCity", - "Terminal", - "TravisCI", - "VisualStudio", - "VSCode" - ] - }, - "ExecutableTarget": { - "type": "string", - "enum": [ - "CI", - "Clean", - "Compile", - "CompileCImGui", - "CompileCImGuizmo", - "CompileCImPlot", - "CompileDalamud", - "CompileDalamudBoot", - "CompileDalamudCrashHandler", - "CompileImGuiNatives", - "CompileInjector", - "Restore", - "SetCILogging", - "Test" - ] - }, - "Verbosity": { - "type": "string", - "description": "", - "enum": [ - "Verbose", - "Normal", - "Minimal", - "Quiet" - ] - }, - "NukeBuild": { + "build": { + "type": "object", "properties": { + "Configuration": { + "type": "string", + "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", + "enum": [ + "Debug", + "Release" + ] + }, "Continue": { "type": "boolean", "description": "Indicates to continue a previously failed build attempt" @@ -61,8 +23,29 @@ "description": "Shows the help text for this build assembly" }, "Host": { + "type": "string", "description": "Host for execution. Default is 'automatic'", - "$ref": "#/definitions/Host" + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "IsDocsBuild": { + "type": "boolean", + "description": "Whether we are building for documentation - emits generated files" }, "NoLogo": { "type": "boolean", @@ -91,46 +74,65 @@ "type": "array", "description": "List of targets to be skipped. Empty list skips all dependencies", "items": { - "$ref": "#/definitions/ExecutableTarget" + "type": "string", + "enum": [ + "CI", + "Clean", + "Compile", + "CompileCImGui", + "CompileCImGuizmo", + "CompileCImPlot", + "CompileDalamud", + "CompileDalamudBoot", + "CompileDalamudCrashHandler", + "CompileImGuiNatives", + "CompileInjector", + "CompileInjectorBoot", + "Restore", + "SetCILogging", + "Test" + ] } }, + "Solution": { + "type": "string", + "description": "Path to a solution file that is automatically loaded" + }, "Target": { "type": "array", "description": "List of targets to be invoked. Default is '{default_target}'", "items": { - "$ref": "#/definitions/ExecutableTarget" + "type": "string", + "enum": [ + "CI", + "Clean", + "Compile", + "CompileCImGui", + "CompileCImGuizmo", + "CompileCImPlot", + "CompileDalamud", + "CompileDalamudBoot", + "CompileDalamudCrashHandler", + "CompileImGuiNatives", + "CompileInjector", + "CompileInjectorBoot", + "Restore", + "SetCILogging", + "Test" + ] } }, "Verbosity": { + "type": "string", "description": "Logging verbosity during build execution. Default is 'Normal'", - "$ref": "#/definitions/Verbosity" - } - } - } - }, - "allOf": [ - { - "properties": { - "Configuration": { - "type": "string", - "description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", "enum": [ - "Debug", - "Release" + "Minimal", + "Normal", + "Quiet", + "Verbose" ] - }, - "IsDocsBuild": { - "type": "boolean", - "description": "Whether we are building for documentation - emits generated files" - }, - "Solution": { - "type": "string", - "description": "Path to a solution file that is automatically loaded" } } - }, - { - "$ref": "#/definitions/NukeBuild" } - ] -} + } +} \ No newline at end of file diff --git a/Dalamud.Boot/DalamudStartInfo.cpp b/Dalamud.Boot/DalamudStartInfo.cpp index 9c8fd9721..5be8f97d0 100644 --- a/Dalamud.Boot/DalamudStartInfo.cpp +++ b/Dalamud.Boot/DalamudStartInfo.cpp @@ -108,11 +108,6 @@ void from_json(const nlohmann::json& json, DalamudStartInfo& config) { config.LogName = json.value("LogName", config.LogName); config.PluginDirectory = json.value("PluginDirectory", config.PluginDirectory); config.AssetDirectory = json.value("AssetDirectory", config.AssetDirectory); - - if (json.contains("TempDirectory") && !json["TempDirectory"].is_null()) { - config.TempDirectory = json.value("TempDirectory", config.TempDirectory); - } - config.Language = json.value("Language", config.Language); config.Platform = json.value("Platform", config.Platform); config.GameVersion = json.value("GameVersion", config.GameVersion); diff --git a/Dalamud.Boot/DalamudStartInfo.h b/Dalamud.Boot/DalamudStartInfo.h index 308dcab7d..0eeaddeed 100644 --- a/Dalamud.Boot/DalamudStartInfo.h +++ b/Dalamud.Boot/DalamudStartInfo.h @@ -44,7 +44,6 @@ struct DalamudStartInfo { std::string ConfigurationPath; std::string LogPath; std::string LogName; - std::string TempDirectory; std::string PluginDirectory; std::string AssetDirectory; ClientLanguage Language = ClientLanguage::English; diff --git a/Dalamud.Boot/veh.cpp b/Dalamud.Boot/veh.cpp index c0a0b034a..194840e52 100644 --- a/Dalamud.Boot/veh.cpp +++ b/Dalamud.Boot/veh.cpp @@ -124,7 +124,6 @@ static DalamudExpected append_injector_launch_args(std::vector(g_startInfo.LogName) + L"\""); args.emplace_back(L"--dalamud-plugin-directory=\"" + unicode::convert(g_startInfo.PluginDirectory) + L"\""); args.emplace_back(L"--dalamud-asset-directory=\"" + unicode::convert(g_startInfo.AssetDirectory) + L"\""); - args.emplace_back(L"--dalamud-temp-directory=\"" + unicode::convert(g_startInfo.TempDirectory) + L"\""); args.emplace_back(std::format(L"--dalamud-client-language={}", static_cast(g_startInfo.Language))); args.emplace_back(std::format(L"--dalamud-delay-initialize={}", g_startInfo.DelayInitializeMs)); // NoLoadPlugins/NoLoadThirdPartyPlugins: supplied from DalamudCrashHandler diff --git a/Dalamud.Common/DalamudStartInfo.cs b/Dalamud.Common/DalamudStartInfo.cs index 8c66a85ba..a0d7f8b0b 100644 --- a/Dalamud.Common/DalamudStartInfo.cs +++ b/Dalamud.Common/DalamudStartInfo.cs @@ -34,12 +34,6 @@ public record DalamudStartInfo /// public string? ConfigurationPath { get; set; } - /// - /// Gets or sets the directory for temporary files. This directory needs to exist and be writable to the user. - /// It should also be predictable and easy for launchers to find. - /// - public string? TempDirectory { get; set; } - /// /// Gets or sets the path of the log files. /// diff --git a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj new file mode 100644 index 000000000..7f8de3843 --- /dev/null +++ b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj @@ -0,0 +1,111 @@ + + + + {8874326B-E755-4D13-90B4-59AB263A3E6B} + Dalamud_Injector_Boot + Debug + x64 + + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + 10.0 + Dalamud.Injector + + + + Application + true + v143 + false + Unicode + ..\bin\$(Configuration)\ + obj\$(Configuration)\ + + + + + Level3 + true + true + stdcpp23 + pch.h + ProgramDatabase + CPPDLLTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + + + Console + true + false + ..\lib\CoreCLR;%(AdditionalLibraryDirectories) + $(OutDir)$(TargetName).Boot.pdb + + + + + true + false + MultiThreadedDebugDLL + _DEBUG;%(PreprocessorDefinitions) + + + false + false + + + + + true + true + MultiThreadedDLL + NDEBUG;%(PreprocessorDefinitions) + + + true + true + + + + + + nethost.dll + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters new file mode 100644 index 000000000..8f4372d89 --- /dev/null +++ b/Dalamud.Injector.Boot/Dalamud.Injector.Boot.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {4faac519-3a73-4b2b-96e7-fb597f02c0be} + ico;rc + + + + + Resource Files + + + + + Resource Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/Dalamud.Injector/dalamud.ico b/Dalamud.Injector.Boot/dalamud.ico similarity index 100% rename from Dalamud.Injector/dalamud.ico rename to Dalamud.Injector.Boot/dalamud.ico diff --git a/Dalamud.Injector.Boot/main.cpp b/Dalamud.Injector.Boot/main.cpp new file mode 100644 index 000000000..df4120009 --- /dev/null +++ b/Dalamud.Injector.Boot/main.cpp @@ -0,0 +1,48 @@ +#define WIN32_LEAN_AND_MEAN + +#include +#include +#include +#include "..\Dalamud.Boot\logging.h" +#include "..\lib\CoreCLR\CoreCLR.h" +#include "..\lib\CoreCLR\boot.h" + +int wmain(int argc, wchar_t** argv) +{ + // Take care: don't redirect stderr/out here, we need to write our pid to stdout for XL to read + //logging::start_file_logging("dalamud.injector.boot.log", false); + logging::I("Dalamud Injector, (c) 2021 XIVLauncher Contributors"); + logging::I("Built at : " __DATE__ "@" __TIME__); + + wchar_t _module_path[MAX_PATH]; + GetModuleFileNameW(NULL, _module_path, sizeof _module_path / 2); + std::filesystem::path fs_module_path(_module_path); + + std::wstring runtimeconfig_path = _wcsdup(fs_module_path.replace_filename(L"Dalamud.Injector.runtimeconfig.json").c_str()); + std::wstring module_path = _wcsdup(fs_module_path.replace_filename(L"Dalamud.Injector.dll").c_str()); + + // =========================================================================== // + + void* entrypoint_vfn; + const auto result = InitializeClrAndGetEntryPoint( + GetModuleHandleW(nullptr), + false, + runtimeconfig_path, + module_path, + L"Dalamud.Injector.EntryPoint, Dalamud.Injector", + L"Main", + L"Dalamud.Injector.EntryPoint+MainDelegate, Dalamud.Injector", + &entrypoint_vfn); + + if (FAILED(result)) + return result; + + typedef int (CORECLR_DELEGATE_CALLTYPE* custom_component_entry_point_fn)(int, wchar_t**); + custom_component_entry_point_fn entrypoint_fn = reinterpret_cast(entrypoint_vfn); + + logging::I("Running Dalamud Injector..."); + const auto ret = entrypoint_fn(argc, argv); + logging::I("Done!"); + + return ret; +} diff --git a/Dalamud.Injector.Boot/pch.h b/Dalamud.Injector.Boot/pch.h new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/Dalamud.Injector.Boot/pch.h @@ -0,0 +1 @@ +#pragma once diff --git a/Dalamud.Injector.Boot/resources.rc b/Dalamud.Injector.Boot/resources.rc new file mode 100644 index 000000000..8369e82a1 --- /dev/null +++ b/Dalamud.Injector.Boot/resources.rc @@ -0,0 +1 @@ +MAINICON ICON "dalamud.ico" diff --git a/Dalamud.Injector/Dalamud.Injector.csproj b/Dalamud.Injector/Dalamud.Injector.csproj index a0b4f6451..4a55174a1 100644 --- a/Dalamud.Injector/Dalamud.Injector.csproj +++ b/Dalamud.Injector/Dalamud.Injector.csproj @@ -13,13 +13,12 @@ - Exe + Library ..\bin\$(Configuration)\ false false true false - dalamud.ico diff --git a/Dalamud.Injector/Program.cs b/Dalamud.Injector/EntryPoint.cs similarity index 98% rename from Dalamud.Injector/Program.cs rename to Dalamud.Injector/EntryPoint.cs index 13fcacef2..b876aa6ed 100644 --- a/Dalamud.Injector/Program.cs +++ b/Dalamud.Injector/EntryPoint.cs @@ -25,20 +25,34 @@ namespace Dalamud.Injector /// /// Entrypoint to the program. /// - public sealed class Program + public sealed class EntryPoint { + /// + /// A delegate used during initialization of the CLR from Dalamud.Injector.Boot. + /// + /// Count of arguments. + /// char** string arguments. + /// Return value (HRESULT). + public delegate int MainDelegate(int argc, IntPtr argvPtr); + /// /// Start the Dalamud injector. /// - /// Command line arguments. + /// Count of arguments. + /// byte** string arguments. /// Return value (HRESULT). - public static int Main(string[] argsArray) + public static int Main(int argc, IntPtr argvPtr) { try { - // API14 TODO: Refactor - var args = argsArray.ToList(); - args.Insert(0, Assembly.GetExecutingAssembly().Location); + List args = new(argc); + + unsafe + { + var argv = (IntPtr*)argvPtr; + for (var i = 0; i < argc; i++) + args.Add(Marshal.PtrToStringUni(argv[i])); + } Init(args); args.Remove("-v"); // Remove "verbose" flag @@ -291,7 +305,6 @@ namespace Dalamud.Injector var configurationPath = startInfo.ConfigurationPath; var pluginDirectory = startInfo.PluginDirectory; var assetDirectory = startInfo.AssetDirectory; - var tempDirectory = startInfo.TempDirectory; var delayInitializeMs = startInfo.DelayInitializeMs; var logName = startInfo.LogName; var logPath = startInfo.LogPath; @@ -322,10 +335,6 @@ namespace Dalamud.Injector { assetDirectory = args[i][key.Length..]; } - else if (args[i].StartsWith(key = "--dalamud-temp-directory=")) - { - tempDirectory = args[i][key.Length..]; - } else if (args[i].StartsWith(key = "--dalamud-delay-initialize=")) { delayInitializeMs = int.Parse(args[i][key.Length..]); @@ -438,7 +447,6 @@ namespace Dalamud.Injector startInfo.ConfigurationPath = configurationPath; startInfo.PluginDirectory = pluginDirectory; startInfo.AssetDirectory = assetDirectory; - startInfo.TempDirectory = tempDirectory; startInfo.Language = clientLanguage; startInfo.Platform = platform; startInfo.DelayInitializeMs = delayInitializeMs; diff --git a/Dalamud.sln b/Dalamud.sln index de91e7ceb..c3af00f44 100644 --- a/Dalamud.sln +++ b/Dalamud.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.1.32319.34 MinimumVisualStudioVersion = 10.0.40219.1 @@ -7,6 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig .gitignore = .gitignore tools\BannedSymbols.txt = tools\BannedSymbols.txt + targets\Dalamud.Plugin.Bootstrap.targets = targets\Dalamud.Plugin.Bootstrap.targets + targets\Dalamud.Plugin.targets = targets\Dalamud.Plugin.targets tools\dalamud.ruleset = tools\dalamud.ruleset Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props @@ -25,6 +27,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dalamud.Boot", "Dalamud.Boo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dalamud.Injector", "Dalamud.Injector\Dalamud.Injector.csproj", "{5B832F73-5F54-4ADC-870F-D0095EF72C9A}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dalamud.Injector.Boot", "Dalamud.Injector.Boot\Dalamud.Injector.Boot.vcxproj", "{8874326B-E755-4D13-90B4-59AB263A3E6B}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dalamud.Test", "Dalamud.Test\Dalamud.Test.csproj", "{C8004563-1806-4329-844F-0EF6274291FC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{E15BDA6D-E881-4482-94BA-BE5527E917FF}" @@ -45,6 +49,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropGenerator", "lib\FFX EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropGenerator.Runtime", "lib\FFXIVClientStructs\InteropGenerator.Runtime\InteropGenerator.Runtime.csproj", "{A6AA1C3F-9470-4922-9D3F-D4549657AB22}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Injector", "Injector", "{19775C83-7117-4A5F-AA00-18889F46A490}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{8F079208-C227-4D96-9427-2BEBE0003944}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cimgui", "external\cimgui\cimgui.vcxproj", "{8430077C-F736-4246-A052-8EA1CECE844E}" @@ -97,6 +103,10 @@ Global {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Debug|Any CPU.Build.0 = Debug|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|Any CPU.ActiveCfg = Release|x64 {5B832F73-5F54-4ADC-870F-D0095EF72C9A}.Release|Any CPU.Build.0 = Release|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Debug|Any CPU.Build.0 = Debug|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|Any CPU.ActiveCfg = Release|x64 + {8874326B-E755-4D13-90B4-59AB263A3E6B}.Release|Any CPU.Build.0 = Release|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Debug|Any CPU.ActiveCfg = Debug|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Debug|Any CPU.Build.0 = Debug|x64 {C8004563-1806-4329-844F-0EF6274291FC}.Release|Any CPU.ActiveCfg = Release|x64 @@ -178,6 +188,8 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {5B832F73-5F54-4ADC-870F-D0095EF72C9A} = {19775C83-7117-4A5F-AA00-18889F46A490} + {8874326B-E755-4D13-90B4-59AB263A3E6B} = {19775C83-7117-4A5F-AA00-18889F46A490} {4AFDB34A-7467-4D41-B067-53BC4101D9D0} = {8F079208-C227-4D96-9427-2BEBE0003944} {C9B87BD7-AF49-41C3-91F1-D550ADEB7833} = {8BBACF2D-7AB8-4610-A115-0E363D35C291} {E0D51896-604F-4B40-8CFE-51941607B3A1} = {8BBACF2D-7AB8-4610-A115-0E363D35C291} diff --git a/Dalamud/Configuration/Internal/DalamudConfiguration.cs b/Dalamud/Configuration/Internal/DalamudConfiguration.cs index ddcb26914..d546dc517 100644 --- a/Dalamud/Configuration/Internal/DalamudConfiguration.cs +++ b/Dalamud/Configuration/Internal/DalamudConfiguration.cs @@ -495,16 +495,6 @@ internal sealed class DalamudConfiguration : IInternalDisposableService #pragma warning restore SA1516 #pragma warning restore SA1600 - /// - /// Gets or sets a list of badge passwords used to unlock badges. - /// - public List UsedBadgePasswords { get; set; } = []; - - /// - /// Gets or sets a value indicating whether badges should be shown on the title screen. - /// - public bool ShowBadgesOnTitleScreen { get; set; } = true; - /// /// Load a configuration from the provided path. /// diff --git a/Dalamud/Configuration/PluginConfigurations.cs b/Dalamud/Configuration/PluginConfigurations.cs index 7ce4697cb..fa2969d31 100644 --- a/Dalamud/Configuration/PluginConfigurations.cs +++ b/Dalamud/Configuration/PluginConfigurations.cs @@ -11,7 +11,7 @@ namespace Dalamud.Configuration; /// /// Configuration to store settings for a dalamud plugin. /// -[Api15ToDo("Make this a service. We need to be able to dispose it reliably to write configs asynchronously. Maybe also let people write files with vfs.")] +[Api13ToDo("Make this a service. We need to be able to dispose it reliably to write configs asynchronously. Maybe also let people write files with vfs.")] public sealed class PluginConfigurations { private readonly DirectoryInfo configDirectory; diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index 2d32b8e8a..a411883d5 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Dalamud.Common; using Dalamud.Configuration.Internal; using Dalamud.Game; -using Dalamud.Hooking.Internal.Verification; using Dalamud.Plugin.Internal; using Dalamud.Storage; using Dalamud.Utility; @@ -74,11 +73,6 @@ internal sealed unsafe class Dalamud : IServiceType scanner, Localization.FromAssets(info.AssetDirectory!, configuration.LanguageOverride)); - using (Timings.Start("HookVerifier Init")) - { - HookVerifier.Initialize(scanner); - } - // Set up FFXIVClientStructs this.SetupClientStructsResolver(cacheDir); diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index 5f79eb274..a50f12d79 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -6,7 +6,7 @@ XIV Launcher addon framework - 14.0.0.2 + 13.0.0.13 $(DalamudVersion) $(DalamudVersion) $(DalamudVersion) @@ -73,6 +73,8 @@ all + + @@ -83,8 +85,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + + + @@ -117,8 +122,6 @@ PreserveNewest - - @@ -223,4 +226,9 @@ + + + + + diff --git a/Dalamud/DalamudAsset.cs b/Dalamud/DalamudAsset.cs index 9c0f247ee..27771116e 100644 --- a/Dalamud/DalamudAsset.cs +++ b/Dalamud/DalamudAsset.cs @@ -73,7 +73,7 @@ public enum DalamudAsset [DalamudAsset(DalamudAssetPurpose.TextureFromPng)] [DalamudAssetPath("UIRes", "troubleIcon.png")] TroubleIcon = 1006, - + /// /// : The plugin trouble icon overlay. /// @@ -124,13 +124,6 @@ public enum DalamudAsset [DalamudAssetPath("UIRes", "tsmShade.png")] TitleScreenMenuShade = 1013, - /// - /// : Atlas containing badges. - /// - [DalamudAsset(DalamudAssetPurpose.TextureFromPng)] - [DalamudAssetPath("UIRes", "badgeAtlas.png")] - BadgeAtlas = 1015, - /// /// : Noto Sans CJK JP Medium. /// @@ -158,7 +151,7 @@ public enum DalamudAsset /// : FontAwesome Free Solid. /// [DalamudAsset(DalamudAssetPurpose.Font)] - [DalamudAssetPath("UIRes", "FontAwesome710FreeSolid.otf")] + [DalamudAssetPath("UIRes", "FontAwesomeFreeSolid.otf")] FontAwesomeFreeSolid = 2003, /// diff --git a/Dalamud/Data/DataManager.cs b/Dalamud/Data/DataManager.cs index f53195a2d..ed0aa6c4d 100644 --- a/Dalamud/Data/DataManager.cs +++ b/Dalamud/Data/DataManager.cs @@ -82,13 +82,8 @@ internal sealed class DataManager : IInternalDisposableService, IDataManager var tsInfo = JsonConvert.DeserializeObject( dalamud.StartInfo.TroubleshootingPackData); - - // Don't fail for IndexIntegrityResult.Exception, since the check during launch has a very small timeout - // this.HasModifiedGameDataFiles = - // tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed; - - // TODO: Put above back when check in XL is fixed - this.HasModifiedGameDataFiles = false; + this.HasModifiedGameDataFiles = + tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed or LauncherTroubleshootingInfo.IndexIntegrityResult.Exception; if (this.HasModifiedGameDataFiles) Log.Verbose("Game data integrity check failed!\n{TsData}", dalamud.StartInfo.TroubleshootingPackData); diff --git a/Dalamud/EntryPoint.cs b/Dalamud/EntryPoint.cs index d9f6ef172..0f8cb0480 100644 --- a/Dalamud/EntryPoint.cs +++ b/Dalamud/EntryPoint.cs @@ -192,8 +192,8 @@ public sealed class EntryPoint var dalamud = new Dalamud(info, fs, configuration, mainThreadContinueEvent); Log.Information("This is Dalamud - Core: {GitHash}, CS: {CsGitHash} [{CsVersion}]", - Versioning.GetScmVersion(), - Versioning.GetGitHashClientStructs(), + Util.GetScmVersion(), + Util.GetGitHashClientStructs(), FFXIVClientStructs.ThisAssembly.Git.Commits); dalamud.WaitForUnload(); @@ -263,7 +263,7 @@ public sealed class EntryPoint var symbolPath = Path.Combine(info.AssetDirectory, "UIRes", "pdb"); var searchPath = $".;{symbolPath}"; - var currentProcess = Windows.Win32.PInvoke.GetCurrentProcess(); + var currentProcess = Windows.Win32.PInvoke.GetCurrentProcess_SafeHandle(); // Remove any existing Symbol Handler and Init a new one with our search path added Windows.Win32.PInvoke.SymCleanup(currentProcess); diff --git a/Dalamud/Game/Addon/AddonLifecyclePooledArgs.cs b/Dalamud/Game/Addon/AddonLifecyclePooledArgs.cs new file mode 100644 index 000000000..14def2036 --- /dev/null +++ b/Dalamud/Game/Addon/AddonLifecyclePooledArgs.cs @@ -0,0 +1,107 @@ +using System.Runtime.CompilerServices; +using System.Threading; + +using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; + +namespace Dalamud.Game.Addon; + +/// Argument pool for Addon Lifecycle services. +[ServiceManager.EarlyLoadedService] +internal sealed class AddonLifecyclePooledArgs : IServiceType +{ + private readonly AddonSetupArgs?[] addonSetupArgPool = new AddonSetupArgs?[64]; + private readonly AddonFinalizeArgs?[] addonFinalizeArgPool = new AddonFinalizeArgs?[64]; + private readonly AddonDrawArgs?[] addonDrawArgPool = new AddonDrawArgs?[64]; + private readonly AddonUpdateArgs?[] addonUpdateArgPool = new AddonUpdateArgs?[64]; + private readonly AddonRefreshArgs?[] addonRefreshArgPool = new AddonRefreshArgs?[64]; + private readonly AddonRequestedUpdateArgs?[] addonRequestedUpdateArgPool = new AddonRequestedUpdateArgs?[64]; + private readonly AddonReceiveEventArgs?[] addonReceiveEventArgPool = new AddonReceiveEventArgs?[64]; + + [ServiceManager.ServiceConstructor] + private AddonLifecyclePooledArgs() + { + } + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonSetupArgs arg) => new(out arg, this.addonSetupArgPool); + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonFinalizeArgs arg) => new(out arg, this.addonFinalizeArgPool); + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonDrawArgs arg) => new(out arg, this.addonDrawArgPool); + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonUpdateArgs arg) => new(out arg, this.addonUpdateArgPool); + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonRefreshArgs arg) => new(out arg, this.addonRefreshArgPool); + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonRequestedUpdateArgs arg) => + new(out arg, this.addonRequestedUpdateArgPool); + + /// Rents an instance of an argument. + /// The rented instance. + /// The returner. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public PooledEntry Rent(out AddonReceiveEventArgs arg) => + new(out arg, this.addonReceiveEventArgPool); + + /// Returns the object to the pool on dispose. + /// The type. + public readonly ref struct PooledEntry + where T : AddonArgs, new() + { + private readonly Span pool; + private readonly T obj; + + /// Initializes a new instance of the struct. + /// An instance of the argument. + /// The pool to rent from and return to. + public PooledEntry(out T arg, Span pool) + { + this.pool = pool; + foreach (ref var item in pool) + { + if (Interlocked.Exchange(ref item, null) is { } v) + { + this.obj = arg = v; + return; + } + } + + this.obj = arg = new(); + } + + /// Returns the item to the pool. + public void Dispose() + { + var tmp = this.obj; + foreach (ref var item in this.pool) + { + if (Interlocked.Exchange(ref item, tmp) is not { } tmp2) + return; + tmp = tmp2; + } + } + } +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs index c4a7e8f53..c008db08f 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonArgs.cs @@ -5,24 +5,19 @@ namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; /// /// Base class for AddonLifecycle AddonArgTypes. /// -public class AddonArgs +public abstract unsafe class AddonArgs { /// /// Constant string representing the name of an addon that is invalid. /// public const string InvalidAddon = "NullAddon"; - /// - /// Initializes a new instance of the class. - /// - internal AddonArgs() - { - } + private string? addonName; /// /// Gets the name of the addon this args referrers to. /// - public string AddonName { get; private set; } = InvalidAddon; + public string AddonName => this.GetAddonName(); /// /// Gets the pointer to the addons AtkUnitBase. @@ -30,17 +25,55 @@ public class AddonArgs public AtkUnitBasePtr Addon { get; - internal set - { - field = value; - - if (!this.Addon.IsNull && !string.IsNullOrEmpty(value.Name)) - this.AddonName = value.Name; - } + internal set; } /// /// Gets the type of these args. /// - public virtual AddonArgsType Type => AddonArgsType.Generic; + public abstract AddonArgsType Type { get; } + + /// + /// Checks if addon name matches the given span of char. + /// + /// The name to check. + /// Whether it is the case. + internal bool IsAddon(string name) + { + if (this.Addon.IsNull) + return false; + + if (name.Length is 0 or > 32) + return false; + + if (string.IsNullOrEmpty(this.Addon.Name)) + return false; + + return name == this.Addon.Name; + } + + /// + /// Clears this AddonArgs values. + /// + internal virtual void Clear() + { + this.addonName = null; + this.Addon = 0; + } + + /// + /// Helper method for ensuring the name of the addon is valid. + /// + /// The name of the addon for this object. when invalid. + private string GetAddonName() + { + if (this.Addon.IsNull) return InvalidAddon; + + var name = this.Addon.Name; + + if (string.IsNullOrEmpty(name)) + return InvalidAddon; + + return this.addonName ??= name; + } } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonCloseArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonCloseArgs.cs deleted file mode 100644 index db3e442f8..000000000 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonCloseArgs.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; - -/// -/// Addon argument data for Close events. -/// -public class AddonCloseArgs : AddonArgs -{ - /// - /// Initializes a new instance of the class. - /// - internal AddonCloseArgs() - { - } - - /// - public override AddonArgsType Type => AddonArgsType.Close; - - /// - /// Gets or sets a value indicating whether the window should fire the callback method on close. - /// - public bool FireCallback { get; set; } -} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonDrawArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonDrawArgs.cs new file mode 100644 index 000000000..989e11912 --- /dev/null +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonDrawArgs.cs @@ -0,0 +1,24 @@ +namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; + +/// +/// Addon argument data for Draw events. +/// +public class AddonDrawArgs : AddonArgs, ICloneable +{ + /// + /// Initializes a new instance of the class. + /// + [Obsolete("Not intended for public construction.", false)] + public AddonDrawArgs() + { + } + + /// + public override AddonArgsType Type => AddonArgsType.Draw; + + /// + public AddonDrawArgs Clone() => (AddonDrawArgs)this.MemberwiseClone(); + + /// + object ICloneable.Clone() => this.Clone(); +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonFinalizeArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonFinalizeArgs.cs new file mode 100644 index 000000000..d9401b414 --- /dev/null +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonFinalizeArgs.cs @@ -0,0 +1,24 @@ +namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; + +/// +/// Addon argument data for ReceiveEvent events. +/// +public class AddonFinalizeArgs : AddonArgs, ICloneable +{ + /// + /// Initializes a new instance of the class. + /// + [Obsolete("Not intended for public construction.", false)] + public AddonFinalizeArgs() + { + } + + /// + public override AddonArgsType Type => AddonArgsType.Finalize; + + /// + public AddonFinalizeArgs Clone() => (AddonFinalizeArgs)this.MemberwiseClone(); + + /// + object ICloneable.Clone() => this.Clone(); +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonHideArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonHideArgs.cs deleted file mode 100644 index 3e3521bd0..000000000 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonHideArgs.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; - -/// -/// Addon argument data for Hide events. -/// -public class AddonHideArgs : AddonArgs -{ - /// - /// Initializes a new instance of the class. - /// - internal AddonHideArgs() - { - } - - /// - public override AddonArgsType Type => AddonArgsType.Hide; - - /// - /// Gets or sets a value indicating whether to call the hide callback handler when this hides. - /// - public bool CallHideCallback { get; set; } - - /// - /// Gets or sets the flags that the window will set when it Shows/Hides. - /// - public uint SetShowHideFlags { get; set; } - - /// - /// Gets or sets a value indicating whether something for this event message. - /// - internal bool UnknownBool { get; set; } -} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonReceiveEventArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonReceiveEventArgs.cs index 785cd199f..980fe4f2f 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonReceiveEventArgs.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonReceiveEventArgs.cs @@ -3,12 +3,13 @@ namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; /// /// Addon argument data for ReceiveEvent events. /// -public class AddonReceiveEventArgs : AddonArgs +public class AddonReceiveEventArgs : AddonArgs, ICloneable { /// /// Initializes a new instance of the class. /// - internal AddonReceiveEventArgs() + [Obsolete("Not intended for public construction.", false)] + public AddonReceiveEventArgs() { } @@ -31,7 +32,23 @@ public class AddonReceiveEventArgs : AddonArgs public nint AtkEvent { get; set; } /// - /// Gets or sets the pointer to an AtkEventData for this event message. + /// Gets or sets the pointer to a block of data for this event message. /// - public nint AtkEventData { get; set; } + public nint Data { get; set; } + + /// + public AddonReceiveEventArgs Clone() => (AddonReceiveEventArgs)this.MemberwiseClone(); + + /// + object ICloneable.Clone() => this.Clone(); + + /// + internal override void Clear() + { + base.Clear(); + this.AtkEventType = default; + this.EventParam = default; + this.AtkEvent = default; + this.Data = default; + } } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRefreshArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRefreshArgs.cs index d81d262bf..d28631c3c 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRefreshArgs.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRefreshArgs.cs @@ -1,22 +1,17 @@ -using System.Collections.Generic; - -using Dalamud.Game.NativeWrapper; -using Dalamud.Utility; - using FFXIVClientStructs.FFXIV.Component.GUI; -using FFXIVClientStructs.Interop; namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; /// /// Addon argument data for Refresh events. /// -public class AddonRefreshArgs : AddonArgs +public class AddonRefreshArgs : AddonArgs, ICloneable { /// /// Initializes a new instance of the class. /// - internal AddonRefreshArgs() + [Obsolete("Not intended for public construction.", false)] + public AddonRefreshArgs() { } @@ -36,32 +31,19 @@ public class AddonRefreshArgs : AddonArgs /// /// Gets the AtkValues in the form of a span. /// - [Obsolete("Pending removal, Use AtkValueEnumerable instead.")] - [Api15ToDo("Make this internal, remove obsolete")] public unsafe Span AtkValueSpan => new(this.AtkValues.ToPointer(), (int)this.AtkValueCount); - /// - /// Gets an enumerable collection of of the event's AtkValues. - /// - /// - /// An of corresponding to the event's AtkValues. - /// - public IEnumerable AtkValueEnumerable - { - get - { - for (var i = 0; i < this.AtkValueCount; i++) - { - AtkValuePtr ptr; - unsafe - { -#pragma warning disable CS0618 // Type or member is obsolete - ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i)); -#pragma warning restore CS0618 // Type or member is obsolete - } + /// + public AddonRefreshArgs Clone() => (AddonRefreshArgs)this.MemberwiseClone(); - yield return ptr; - } - } + /// + object ICloneable.Clone() => this.Clone(); + + /// + internal override void Clear() + { + base.Clear(); + this.AtkValueCount = default; + this.AtkValues = default; } } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRequestedUpdateArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRequestedUpdateArgs.cs index 7005b77c2..e87a980fd 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRequestedUpdateArgs.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonRequestedUpdateArgs.cs @@ -3,12 +3,13 @@ namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; /// /// Addon argument data for OnRequestedUpdate events. /// -public class AddonRequestedUpdateArgs : AddonArgs +public class AddonRequestedUpdateArgs : AddonArgs, ICloneable { /// /// Initializes a new instance of the class. /// - internal AddonRequestedUpdateArgs() + [Obsolete("Not intended for public construction.", false)] + public AddonRequestedUpdateArgs() { } @@ -24,4 +25,18 @@ public class AddonRequestedUpdateArgs : AddonArgs /// Gets or sets the StringArrayData** for this event. /// public nint StringArrayData { get; set; } + + /// + public AddonRequestedUpdateArgs Clone() => (AddonRequestedUpdateArgs)this.MemberwiseClone(); + + /// + object ICloneable.Clone() => this.Clone(); + + /// + internal override void Clear() + { + base.Clear(); + this.NumberArrayData = default; + this.StringArrayData = default; + } } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonSetupArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonSetupArgs.cs index 1cc0eacf3..0dd9ecee2 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonSetupArgs.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonSetupArgs.cs @@ -1,22 +1,17 @@ -using System.Collections.Generic; - -using Dalamud.Game.NativeWrapper; -using Dalamud.Utility; - using FFXIVClientStructs.FFXIV.Component.GUI; -using FFXIVClientStructs.Interop; namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; /// /// Addon argument data for Setup events. /// -public class AddonSetupArgs : AddonArgs +public class AddonSetupArgs : AddonArgs, ICloneable { /// /// Initializes a new instance of the class. /// - internal AddonSetupArgs() + [Obsolete("Not intended for public construction.", false)] + public AddonSetupArgs() { } @@ -36,32 +31,19 @@ public class AddonSetupArgs : AddonArgs /// /// Gets the AtkValues in the form of a span. /// - [Obsolete("Pending removal, Use AtkValueEnumerable instead.")] - [Api15ToDo("Make this internal, remove obsolete")] public unsafe Span AtkValueSpan => new(this.AtkValues.ToPointer(), (int)this.AtkValueCount); - /// - /// Gets an enumerable collection of of the event's AtkValues. - /// - /// - /// An of corresponding to the event's AtkValues. - /// - public IEnumerable AtkValueEnumerable - { - get - { - for (var i = 0; i < this.AtkValueCount; i++) - { - AtkValuePtr ptr; - unsafe - { -#pragma warning disable CS0618 // Type or member is obsolete - ptr = new AtkValuePtr((nint)this.AtkValueSpan.GetPointer(i)); -#pragma warning restore CS0618 // Type or member is obsolete - } + /// + public AddonSetupArgs Clone() => (AddonSetupArgs)this.MemberwiseClone(); - yield return ptr; - } - } + /// + object ICloneable.Clone() => this.Clone(); + + /// + internal override void Clear() + { + base.Clear(); + this.AtkValueCount = default; + this.AtkValues = default; } } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonShowArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonShowArgs.cs deleted file mode 100644 index 3153d1208..000000000 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonShowArgs.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; - -/// -/// Addon argument data for Show events. -/// -public class AddonShowArgs : AddonArgs -{ - /// - /// Initializes a new instance of the class. - /// - internal AddonShowArgs() - { - } - - /// - public override AddonArgsType Type => AddonArgsType.Show; - - /// - /// Gets or sets a value indicating whether the window should play open sound effects. - /// - public bool SilenceOpenSoundEffect { get; set; } - - /// - /// Gets or sets the flags that the window will unset when it Shows/Hides. - /// - public uint UnsetShowHideFlags { get; set; } -} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonUpdateArgs.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonUpdateArgs.cs new file mode 100644 index 000000000..a263f6ae4 --- /dev/null +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgTypes/AddonUpdateArgs.cs @@ -0,0 +1,45 @@ +namespace Dalamud.Game.Addon.Lifecycle.AddonArgTypes; + +/// +/// Addon argument data for Update events. +/// +public class AddonUpdateArgs : AddonArgs, ICloneable +{ + /// + /// Initializes a new instance of the class. + /// + [Obsolete("Not intended for public construction.", false)] + public AddonUpdateArgs() + { + } + + /// + public override AddonArgsType Type => AddonArgsType.Update; + + /// + /// Gets the time since the last update. + /// + public float TimeDelta + { + get => this.TimeDeltaInternal; + init => this.TimeDeltaInternal = value; + } + + /// + /// Gets or sets the time since the last update. + /// + internal float TimeDeltaInternal { get; set; } + + /// + public AddonUpdateArgs Clone() => (AddonUpdateArgs)this.MemberwiseClone(); + + /// + object ICloneable.Clone() => this.Clone(); + + /// + internal override void Clear() + { + base.Clear(); + this.TimeDeltaInternal = default; + } +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonArgsType.cs b/Dalamud/Game/Addon/Lifecycle/AddonArgsType.cs index 46ee479ac..b58b5f4c7 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonArgsType.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonArgsType.cs @@ -5,43 +5,38 @@ /// public enum AddonArgsType { - /// - /// Generic arg type that contains no meaningful data. - /// - Generic, - /// /// Contains argument data for Setup. /// Setup, - + + /// + /// Contains argument data for Update. + /// + Update, + + /// + /// Contains argument data for Draw. + /// + Draw, + + /// + /// Contains argument data for Finalize. + /// + Finalize, + /// /// Contains argument data for RequestedUpdate. - /// + /// RequestedUpdate, - + /// /// Contains argument data for Refresh. - /// + /// Refresh, - + /// /// Contains argument data for ReceiveEvent. /// ReceiveEvent, - - /// - /// Contains argument data for Show. - /// - Show, - - /// - /// Contains argument data for Hide. - /// - Hide, - - /// - /// Contains argument data for Close. - /// - Close, } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonEvent.cs b/Dalamud/Game/Addon/Lifecycle/AddonEvent.cs index 3b9c6e867..5fd0ac964 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonEvent.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonEvent.cs @@ -16,7 +16,7 @@ public enum AddonEvent /// /// PreSetup, - + /// /// An event that is fired after an addon has finished its initial setup. This event is particularly useful for /// developers seeking to add custom elements to now-initialized and populated node lists, as well as reading data @@ -29,6 +29,7 @@ public enum AddonEvent /// An event that is fired before an addon begins its update cycle via . This event /// is fired every frame that an addon is loaded, regardless of visibility. /// + /// PreUpdate, /// @@ -41,6 +42,7 @@ public enum AddonEvent /// An event that is fired before an addon begins drawing to screen via . Unlike /// , this event is only fired if an addon is visible or otherwise drawing to screen. /// + /// PreDraw, /// @@ -60,8 +62,9 @@ public enum AddonEvent ///
/// As this is part of the destruction process for an addon, this event does not have an associated Post event. /// + /// PreFinalize, - + /// /// An event that is fired before a call to is made in response to a /// change in the subscribed or @@ -78,13 +81,13 @@ public enum AddonEvent /// to the Free Company's overview. /// PreRequestedUpdate, - + /// /// An event that is fired after an addon has finished processing an ArrayData update. /// See for more information. /// PostRequestedUpdate, - + /// /// An event that is fired before an addon calls its method. Refreshes are /// generally triggered in response to certain user interactions such as changing tabs, and are primarily used to @@ -93,13 +96,13 @@ public enum AddonEvent /// /// PreRefresh, - + /// /// An event that is fired after an addon has finished its refresh. /// See for more information. /// PostRefresh, - + /// /// An event that is fired before an addon begins processing a user-driven event via /// , such as mousing over an element or clicking a button. This event @@ -109,98 +112,10 @@ public enum AddonEvent /// /// PreReceiveEvent, - + /// /// An event that is fired after an addon finishes calling its method. /// See for more information. /// PostReceiveEvent, - - /// - /// An event that is fired before an addon processes its open method. - /// - PreOpen, - - /// - /// An event that is fired after an addon has processed its open method. - /// - PostOpen, - - /// - /// An even that is fired before an addon processes its Close method. - /// - PreClose, - - /// - /// An event that is fired after an addon has processed its Close method. - /// - PostClose, - - /// - /// An event that is fired before an addon processes its Show method. - /// - PreShow, - - /// - /// An event that is fired after an addon has processed its Show method. - /// - PostShow, - - /// - /// An event that is fired before an addon processes its Hide method. - /// - PreHide, - - /// - /// An event that is fired after an addon has processed its Hide method. - /// - PostHide, - - /// - /// An event that is fired before an addon processes its OnMove method. - /// OnMove is triggered only when a move is completed. - /// - PreMove, - - /// - /// An event that is fired after an addon has processed its OnMove method. - /// OnMove is triggered only when a move is completed. - /// - PostMove, - - /// - /// An event that is fired before an addon processes its MouseOver method. - /// - PreMouseOver, - - /// - /// An event that is fired after an addon has processed its MouseOver method. - /// - PostMouseOver, - - /// - /// An event that is fired before an addon processes its MouseOut method. - /// - PreMouseOut, - - /// - /// An event that is fired after an addon has processed its MouseOut method. - /// - PostMouseOut, - - /// - /// An event that is fired before an addon processes its Focus method. - /// - /// - /// Be aware this is only called for certain popup windows, it is not triggered when clicking on windows. - /// - PreFocus, - - /// - /// An event that is fired after an addon has processed its Focus method. - /// - /// - /// Be aware this is only called for certain popup windows, it is not triggered when clicking on windows. - /// - PostFocus, } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs b/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs index 78cea1a0f..b44ab8764 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs @@ -1,15 +1,16 @@ using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; using Dalamud.Hooking; +using Dalamud.Hooking.Internal; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Logging.Internal; using Dalamud.Plugin.Services; +using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.GUI; namespace Dalamud.Game.Addon.Lifecycle; @@ -20,36 +21,75 @@ namespace Dalamud.Game.Addon.Lifecycle; [ServiceManager.EarlyLoadedService] internal unsafe class AddonLifecycle : IInternalDisposableService { - /// - /// Gets a list of all allocated addon virtual tables. - /// - public static readonly List AllocatedTables = []; - private static readonly ModuleLog Log = new("AddonLifecycle"); - private Hook? onInitializeAddonHook; + [ServiceManager.ServiceDependency] + private readonly Framework framework = Service.Get(); + + [ServiceManager.ServiceDependency] + private readonly AddonLifecyclePooledArgs argsPool = Service.Get(); + + private readonly nint disallowedReceiveEventAddress; + + private readonly AddonLifecycleAddressResolver address; + private readonly AddonSetupHook onAddonSetupHook; + private readonly Hook onAddonFinalizeHook; + private readonly CallHook onAddonDrawHook; + private readonly CallHook onAddonUpdateHook; + private readonly Hook onAddonRefreshHook; + private readonly CallHook onAddonRequestedUpdateHook; [ServiceManager.ServiceConstructor] - private AddonLifecycle() + private AddonLifecycle(TargetSigScanner sigScanner) { - this.onInitializeAddonHook = Hook.FromAddress((nint)AtkUnitBase.StaticVirtualTablePointer->Initialize, this.OnAddonInitialize); - this.onInitializeAddonHook.Enable(); + this.address = new AddonLifecycleAddressResolver(); + this.address.Setup(sigScanner); + + this.disallowedReceiveEventAddress = (nint)AtkUnitBase.StaticVirtualTablePointer->ReceiveEvent; + + var refreshAddonAddress = (nint)RaptureAtkUnitManager.StaticVirtualTablePointer->RefreshAddon; + + this.onAddonSetupHook = new AddonSetupHook(this.address.AddonSetup, this.OnAddonSetup); + this.onAddonFinalizeHook = Hook.FromAddress(this.address.AddonFinalize, this.OnAddonFinalize); + this.onAddonDrawHook = new CallHook(this.address.AddonDraw, this.OnAddonDraw); + this.onAddonUpdateHook = new CallHook(this.address.AddonUpdate, this.OnAddonUpdate); + this.onAddonRefreshHook = Hook.FromAddress(refreshAddonAddress, this.OnAddonRefresh); + this.onAddonRequestedUpdateHook = new CallHook(this.address.AddonOnRequestedUpdate, this.OnRequestedUpdate); + + this.onAddonSetupHook.Enable(); + this.onAddonFinalizeHook.Enable(); + this.onAddonDrawHook.Enable(); + this.onAddonUpdateHook.Enable(); + this.onAddonRefreshHook.Enable(); + this.onAddonRequestedUpdateHook.Enable(); } + private delegate void AddonFinalizeDelegate(AtkUnitManager* unitManager, AtkUnitBase** atkUnitBase); + + /// + /// Gets a list of all AddonLifecycle ReceiveEvent Listener Hooks. + /// + internal List ReceiveEventListeners { get; } = new(); + /// /// Gets a list of all AddonLifecycle Event Listeners. - ///
- /// Mapping is: EventType -> AddonName -> ListenerList - internal Dictionary>> EventListeners { get; } = []; + ///
+ internal List EventListeners { get; } = new(); /// void IInternalDisposableService.DisposeService() { - this.onInitializeAddonHook?.Dispose(); - this.onInitializeAddonHook = null; + this.onAddonSetupHook.Dispose(); + this.onAddonFinalizeHook.Dispose(); + this.onAddonDrawHook.Dispose(); + this.onAddonUpdateHook.Dispose(); + this.onAddonRefreshHook.Dispose(); + this.onAddonRequestedUpdateHook.Dispose(); - AllocatedTables.ForEach(entry => entry.Dispose()); - AllocatedTables.Clear(); + foreach (var receiveEventListener in this.ReceiveEventListeners) + { + receiveEventListener.Dispose(); + } } /// @@ -58,20 +98,20 @@ internal unsafe class AddonLifecycle : IInternalDisposableService /// The listener to register. internal void RegisterListener(AddonLifecycleEventListener listener) { - if (!this.EventListeners.ContainsKey(listener.EventType)) + this.framework.RunOnTick(() => { - if (!this.EventListeners.TryAdd(listener.EventType, [])) - return; - } - - // Note: string.Empty is a valid addon name, as that will trigger on any addon for this event type - if (!this.EventListeners[listener.EventType].ContainsKey(listener.AddonName)) - { - if (!this.EventListeners[listener.EventType].TryAdd(listener.AddonName, [])) - return; - } - - this.EventListeners[listener.EventType][listener.AddonName].Add(listener); + this.EventListeners.Add(listener); + + // If we want receive event messages have an already active addon, enable the receive event hook. + // If the addon isn't active yet, we'll grab the hook when it sets up. + if (listener is { EventType: AddonEvent.PreReceiveEvent or AddonEvent.PostReceiveEvent }) + { + if (this.ReceiveEventListeners.FirstOrDefault(listeners => listeners.AddonNames.Contains(listener.AddonName)) is { } receiveEventListener) + { + receiveEventListener.TryEnable(); + } + } + }); } /// @@ -80,13 +120,27 @@ internal unsafe class AddonLifecycle : IInternalDisposableService /// The listener to unregister. internal void UnregisterListener(AddonLifecycleEventListener listener) { - if (this.EventListeners.TryGetValue(listener.EventType, out var addonListeners)) + // Set removed state to true immediately, then lazily remove it from the EventListeners list on next Framework Update. + listener.Removed = true; + + this.framework.RunOnTick(() => { - if (addonListeners.TryGetValue(listener.AddonName, out var addonListener)) + this.EventListeners.Remove(listener); + + // If we are disabling an ReceiveEvent listener, check if we should disable the hook. + if (listener is { EventType: AddonEvent.PreReceiveEvent or AddonEvent.PostReceiveEvent }) { - addonListener.Remove(listener); + // Get the ReceiveEvent Listener for this addon + if (this.ReceiveEventListeners.FirstOrDefault(listeners => listeners.AddonNames.Contains(listener.AddonName)) is { } receiveEventListener) + { + // If there are no other listeners listening for this event, disable the hook. + if (!this.EventListeners.Any(listeners => listeners.AddonName.Contains(listener.AddonName) && listener.EventType is AddonEvent.PreReceiveEvent or AddonEvent.PostReceiveEvent)) + { + receiveEventListener.Disable(); + } + } } - } + }); } /// @@ -97,76 +151,226 @@ internal unsafe class AddonLifecycle : IInternalDisposableService /// What to blame on errors. internal void InvokeListenersSafely(AddonEvent eventType, AddonArgs args, [CallerMemberName] string blame = "") { - // Early return if we don't have any listeners of this type - if (!this.EventListeners.TryGetValue(eventType, out var addonListeners)) return; - - // Handle listeners for this event type that don't care which addon is triggering it - if (addonListeners.TryGetValue(string.Empty, out var globalListeners)) + // Do not use linq; this is a high-traffic function, and more heap allocations avoided, the better. + foreach (var listener in this.EventListeners) { - foreach (var listener in globalListeners) + if (listener.EventType != eventType) + continue; + + // If the listener is pending removal, and is waiting until the next Framework Update, don't invoke listener. + if (listener.Removed) + continue; + + // Match on string.empty for listeners that want events for all addons. + if (!string.IsNullOrWhiteSpace(listener.AddonName) && !args.IsAddon(listener.AddonName)) + continue; + + try { - try - { - listener.FunctionDelegate.Invoke(eventType, args); - } - catch (Exception e) - { - Log.Error(e, $"Exception in {blame} during {eventType} invoke, for global addon event listener."); - } + listener.FunctionDelegate.Invoke(eventType, args); } - } - - // Handle listeners that are listening for this addon and event type specifically - if (addonListeners.TryGetValue(args.AddonName, out var addonListener)) - { - foreach (var listener in addonListener) + catch (Exception e) { - try - { - listener.FunctionDelegate.Invoke(eventType, args); - } - catch (Exception e) - { - Log.Error(e, $"Exception in {blame} during {eventType} invoke, for specific addon {args.AddonName}."); - } + Log.Error(e, $"Exception in {blame} during {eventType} invoke."); } } } - /// - /// Resolves a virtual table address to the original virtual table address. - /// - /// The modified address to resolve. - /// The original address. - internal AtkUnitBase.AtkUnitBaseVirtualTable* GetOriginalVirtualTable(AtkUnitBase.AtkUnitBaseVirtualTable* tableAddress) + private void RegisterReceiveEventHook(AtkUnitBase* addon) { - var matchedTable = AllocatedTables.FirstOrDefault(table => table.ModifiedVirtualTable == tableAddress); - if (matchedTable == null) return null; + // Hook the addon's ReceiveEvent function here, but only enable the hook if we have an active listener. + // Disallows hooking the core internal event handler. + var addonName = addon->NameString; + var receiveEventAddress = (nint)addon->VirtualTable->ReceiveEvent; + if (receiveEventAddress != this.disallowedReceiveEventAddress) + { + // If we have a ReceiveEvent listener already made for this hook address, add this addon's name to that handler. + if (this.ReceiveEventListeners.FirstOrDefault(listener => listener.FunctionAddress == receiveEventAddress) is { } existingListener) + { + if (!existingListener.AddonNames.Contains(addonName)) + { + existingListener.AddonNames.Add(addonName); + } + } - return matchedTable.OriginalVirtualTable; + // Else, we have an addon that we don't have the ReceiveEvent for yet, make it. + else + { + this.ReceiveEventListeners.Add(new AddonLifecycleReceiveEventListener(this, addonName, receiveEventAddress)); + } + + // If we have an active listener for this addon already, we need to activate this hook. + if (this.EventListeners.Any(listener => (listener.EventType is AddonEvent.PostReceiveEvent or AddonEvent.PreReceiveEvent) && listener.AddonName == addonName)) + { + if (this.ReceiveEventListeners.FirstOrDefault(listener => listener.AddonNames.Contains(addonName)) is { } receiveEventListener) + { + receiveEventListener.TryEnable(); + } + } + } } - private void OnAddonInitialize(AtkUnitBase* addon) + private void UnregisterReceiveEventHook(string addonName) + { + // Remove this addons ReceiveEvent Registration + if (this.ReceiveEventListeners.FirstOrDefault(listener => listener.AddonNames.Contains(addonName)) is { } eventListener) + { + eventListener.AddonNames.Remove(addonName); + + // If there are no more listeners let's remove and dispose. + if (eventListener.AddonNames.Count is 0) + { + this.ReceiveEventListeners.Remove(eventListener); + eventListener.Dispose(); + } + } + } + + private void OnAddonSetup(AtkUnitBase* addon, uint valueCount, AtkValue* values) { try { - this.LogInitialize(addon->NameString); - - // AddonVirtualTable class handles creating the virtual table, and overriding each of the tracked virtual functions - AllocatedTables.Add(new AddonVirtualTable(addon, this)); + this.RegisterReceiveEventHook(addon); } catch (Exception e) { - Log.Error(e, "Exception in AddonLifecycle during OnAddonInitialize."); + Log.Error(e, "Exception in OnAddonSetup ReceiveEvent Registration."); } - this.onInitializeAddonHook!.Original(addon); + using var returner = this.argsPool.Rent(out AddonSetupArgs arg); + arg.Clear(); + arg.Addon = (nint)addon; + arg.AtkValueCount = valueCount; + arg.AtkValues = (nint)values; + this.InvokeListenersSafely(AddonEvent.PreSetup, arg); + valueCount = arg.AtkValueCount; + values = (AtkValue*)arg.AtkValues; + + try + { + addon->OnSetup(valueCount, values); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonSetup. This may be a bug in the game or another plugin hooking this method."); + } + + this.InvokeListenersSafely(AddonEvent.PostSetup, arg); } - [Conditional("DEBUG")] - private void LogInitialize(string addonName) + private void OnAddonFinalize(AtkUnitManager* unitManager, AtkUnitBase** atkUnitBase) { - Log.Debug($"Initializing {addonName}"); + try + { + var addonName = atkUnitBase[0]->NameString; + this.UnregisterReceiveEventHook(addonName); + } + catch (Exception e) + { + Log.Error(e, "Exception in OnAddonFinalize ReceiveEvent Removal."); + } + + using var returner = this.argsPool.Rent(out AddonFinalizeArgs arg); + arg.Clear(); + arg.Addon = (nint)atkUnitBase[0]; + this.InvokeListenersSafely(AddonEvent.PreFinalize, arg); + + try + { + this.onAddonFinalizeHook.Original(unitManager, atkUnitBase); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonFinalize. This may be a bug in the game or another plugin hooking this method."); + } + } + + private void OnAddonDraw(AtkUnitBase* addon) + { + using var returner = this.argsPool.Rent(out AddonDrawArgs arg); + arg.Clear(); + arg.Addon = (nint)addon; + this.InvokeListenersSafely(AddonEvent.PreDraw, arg); + + try + { + addon->Draw(); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonDraw. This may be a bug in the game or another plugin hooking this method."); + } + + this.InvokeListenersSafely(AddonEvent.PostDraw, arg); + } + + private void OnAddonUpdate(AtkUnitBase* addon, float delta) + { + using var returner = this.argsPool.Rent(out AddonUpdateArgs arg); + arg.Clear(); + arg.Addon = (nint)addon; + arg.TimeDeltaInternal = delta; + this.InvokeListenersSafely(AddonEvent.PreUpdate, arg); + + try + { + addon->Update(delta); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonUpdate. This may be a bug in the game or another plugin hooking this method."); + } + + this.InvokeListenersSafely(AddonEvent.PostUpdate, arg); + } + + private bool OnAddonRefresh(AtkUnitManager* thisPtr, AtkUnitBase* addon, uint valueCount, AtkValue* values) + { + var result = false; + + using var returner = this.argsPool.Rent(out AddonRefreshArgs arg); + arg.Clear(); + arg.Addon = (nint)addon; + arg.AtkValueCount = valueCount; + arg.AtkValues = (nint)values; + this.InvokeListenersSafely(AddonEvent.PreRefresh, arg); + valueCount = arg.AtkValueCount; + values = (AtkValue*)arg.AtkValues; + + try + { + result = this.onAddonRefreshHook.Original(thisPtr, addon, valueCount, values); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonRefresh. This may be a bug in the game or another plugin hooking this method."); + } + + this.InvokeListenersSafely(AddonEvent.PostRefresh, arg); + return result; + } + + private void OnRequestedUpdate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData) + { + using var returner = this.argsPool.Rent(out AddonRequestedUpdateArgs arg); + arg.Clear(); + arg.Addon = (nint)addon; + arg.NumberArrayData = (nint)numberArrayData; + arg.StringArrayData = (nint)stringArrayData; + this.InvokeListenersSafely(AddonEvent.PreRequestedUpdate, arg); + numberArrayData = (NumberArrayData**)arg.NumberArrayData; + stringArrayData = (StringArrayData**)arg.StringArrayData; + + try + { + addon->OnRequestedUpdate(numberArrayData, stringArrayData); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonRequestedUpdate. This may be a bug in the game or another plugin hooking this method."); + } + + this.InvokeListenersSafely(AddonEvent.PostRequestedUpdate, arg); } } @@ -183,7 +387,7 @@ internal class AddonLifecyclePluginScoped : IInternalDisposableService, IAddonLi [ServiceManager.ServiceDependency] private readonly AddonLifecycle addonLifecycleService = Service.Get(); - private readonly List eventListeners = []; + private readonly List eventListeners = new(); /// void IInternalDisposableService.DisposeService() @@ -254,14 +458,10 @@ internal class AddonLifecyclePluginScoped : IInternalDisposableService, IAddonLi this.eventListeners.RemoveAll(entry => { if (entry.FunctionDelegate != handler) return false; - + this.addonLifecycleService.UnregisterListener(entry); return true; }); } } - - /// - public unsafe nint GetOriginalVirtualTable(nint virtualTableAddress) - => (nint)this.addonLifecycleService.GetOriginalVirtualTable((AtkUnitBase.AtkUnitBaseVirtualTable*)virtualTableAddress); } diff --git a/Dalamud/Game/Addon/Lifecycle/AddonLifecycleAddressResolver.cs b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleAddressResolver.cs new file mode 100644 index 000000000..854d666fd --- /dev/null +++ b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleAddressResolver.cs @@ -0,0 +1,56 @@ +using FFXIVClientStructs.FFXIV.Component.GUI; + +namespace Dalamud.Game.Addon.Lifecycle; + +/// +/// AddonLifecycleService memory address resolver. +/// +internal unsafe class AddonLifecycleAddressResolver : BaseAddressResolver +{ + /// + /// Gets the address of the addon setup hook invoked by the AtkUnitManager. + /// There are two callsites for this vFunc, we need to hook both of them to catch both normal UI and special UI cases like dialogue. + /// This is called for a majority of all addon OnSetup's. + /// + public nint AddonSetup { get; private set; } + + /// + /// Gets the address of the other addon setup hook invoked by the AtkUnitManager. + /// There are two callsites for this vFunc, we need to hook both of them to catch both normal UI and special UI cases like dialogue. + /// This seems to be called rarely for specific addons. + /// + public nint AddonSetup2 { get; private set; } + + /// + /// Gets the address of the addon finalize hook invoked by the AtkUnitManager. + /// + public nint AddonFinalize { get; private set; } + + /// + /// Gets the address of the addon draw hook invoked by virtual function call. + /// + public nint AddonDraw { get; private set; } + + /// + /// Gets the address of the addon update hook invoked by virtual function call. + /// + public nint AddonUpdate { get; private set; } + + /// + /// Gets the address of the addon onRequestedUpdate hook invoked by virtual function call. + /// + public nint AddonOnRequestedUpdate { get; private set; } + + /// + /// Scan for and setup any configured address pointers. + /// + /// The signature scanner to facilitate setup. + protected override void Setup64Bit(ISigScanner sig) + { + this.AddonSetup = sig.ScanText("4C 8B 88 ?? ?? ?? ?? 66 44 39 BB"); + this.AddonFinalize = sig.ScanText("E8 ?? ?? ?? ?? 48 83 EF 01 75 D5"); + this.AddonDraw = sig.ScanText("FF 90 ?? ?? ?? ?? 83 EB 01 79 C4 48 81 EF ?? ?? ?? ?? 48 83 ED 01"); + this.AddonUpdate = sig.ScanText("FF 90 ?? ?? ?? ?? 40 88 AF ?? ?? ?? ?? 45 33 D2"); + this.AddonOnRequestedUpdate = sig.ScanText("FF 90 A0 01 00 00 48 8B 5C 24 30"); + } +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonLifecycleEventListener.cs b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleEventListener.cs index fc82e0582..9d411cdbc 100644 --- a/Dalamud/Game/Addon/Lifecycle/AddonLifecycleEventListener.cs +++ b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleEventListener.cs @@ -25,12 +25,17 @@ internal class AddonLifecycleEventListener /// string.Empty if it wants to be called for any addon. /// public string AddonName { get; init; } - + + /// + /// Gets or sets a value indicating whether this event has been unregistered. + /// + public bool Removed { get; set; } + /// /// Gets the event type this listener is looking for. /// public AddonEvent EventType { get; init; } - + /// /// Gets the delegate this listener invokes. /// diff --git a/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs new file mode 100644 index 000000000..0d2bcc7f2 --- /dev/null +++ b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs @@ -0,0 +1,112 @@ +using System.Collections.Generic; + +using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; +using Dalamud.Hooking; +using Dalamud.Logging.Internal; + +using FFXIVClientStructs.FFXIV.Component.GUI; + +namespace Dalamud.Game.Addon.Lifecycle; + +/// +/// This class is a helper for tracking and invoking listener delegates for Addon_OnReceiveEvent. +/// Multiple addons may use the same ReceiveEvent function, this helper makes sure that those addon events are handled properly. +/// +internal unsafe class AddonLifecycleReceiveEventListener : IDisposable +{ + private static readonly ModuleLog Log = new("AddonLifecycle"); + + [ServiceManager.ServiceDependency] + private readonly AddonLifecyclePooledArgs argsPool = Service.Get(); + + /// + /// Initializes a new instance of the class. + /// + /// AddonLifecycle service instance. + /// Initial Addon Requesting this listener. + /// Address of Addon's ReceiveEvent function. + internal AddonLifecycleReceiveEventListener(AddonLifecycle service, string addonName, nint receiveEventAddress) + { + this.AddonLifecycle = service; + this.AddonNames = [addonName]; + this.FunctionAddress = receiveEventAddress; + } + + /// + /// Gets the list of addons that use this receive event hook. + /// + public List AddonNames { get; init; } + + /// + /// Gets the address of the ReceiveEvent function as provided by the vtable on setup. + /// + public nint FunctionAddress { get; init; } + + /// + /// Gets the contained hook for these addons. + /// + public Hook? Hook { get; private set; } + + /// + /// Gets or sets the Reference to AddonLifecycle service instance. + /// + private AddonLifecycle AddonLifecycle { get; set; } + + /// + /// Try to hook and enable this receive event handler. + /// + public void TryEnable() + { + this.Hook ??= Hook.FromAddress(this.FunctionAddress, this.OnReceiveEvent); + this.Hook?.Enable(); + } + + /// + /// Disable the hook for this receive event handler. + /// + public void Disable() + { + this.Hook?.Disable(); + } + + /// + public void Dispose() + { + this.Hook?.Dispose(); + } + + private void OnReceiveEvent(AtkUnitBase* addon, AtkEventType eventType, int eventParam, AtkEvent* atkEvent, AtkEventData* atkEventData) + { + // Check that we didn't get here through a call to another addons handler. + var addonName = addon->NameString; + if (!this.AddonNames.Contains(addonName)) + { + this.Hook!.Original(addon, eventType, eventParam, atkEvent, atkEventData); + return; + } + + using var returner = this.argsPool.Rent(out AddonReceiveEventArgs arg); + arg.Clear(); + arg.Addon = (nint)addon; + arg.AtkEventType = (byte)eventType; + arg.EventParam = eventParam; + arg.AtkEvent = (IntPtr)atkEvent; + arg.Data = (nint)atkEventData; + this.AddonLifecycle.InvokeListenersSafely(AddonEvent.PreReceiveEvent, arg); + eventType = (AtkEventType)arg.AtkEventType; + eventParam = arg.EventParam; + atkEvent = (AtkEvent*)arg.AtkEvent; + atkEventData = (AtkEventData*)arg.Data; + + try + { + this.Hook!.Original(addon, eventType, eventParam, atkEvent, atkEventData); + } + catch (Exception e) + { + Log.Error(e, "Caught exception when calling original AddonReceiveEvent. This may be a bug in the game or another plugin hooking this method."); + } + + this.AddonLifecycle.InvokeListenersSafely(AddonEvent.PostReceiveEvent, arg); + } +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonSetupHook.cs b/Dalamud/Game/Addon/Lifecycle/AddonSetupHook.cs new file mode 100644 index 000000000..297323b8f --- /dev/null +++ b/Dalamud/Game/Addon/Lifecycle/AddonSetupHook.cs @@ -0,0 +1,80 @@ +using System.Runtime.InteropServices; + +using Reloaded.Hooks.Definitions; + +namespace Dalamud.Game.Addon.Lifecycle; + +/// +/// This class represents a callsite hook used to replace the address of the OnSetup function in r9. +/// +/// Delegate signature for this hook. +internal class AddonSetupHook : IDisposable where T : Delegate +{ + private readonly Reloaded.Hooks.AsmHook asmHook; + + private T? detour; + private bool activated; + + /// + /// Initializes a new instance of the class. + /// + /// Address of the instruction to replace. + /// Delegate to invoke. + internal AddonSetupHook(nint address, T detour) + { + this.detour = detour; + + var detourPtr = Marshal.GetFunctionPointerForDelegate(this.detour); + var code = new[] + { + "use64", + $"mov r9, 0x{detourPtr:X8}", + }; + + var opt = new AsmHookOptions + { + PreferRelativeJump = true, + Behaviour = Reloaded.Hooks.Definitions.Enums.AsmHookBehaviour.DoNotExecuteOriginal, + MaxOpcodeSize = 5, + }; + + this.asmHook = new Reloaded.Hooks.AsmHook(code, (nuint)address, opt); + } + + /// + /// Gets a value indicating whether the hook is enabled. + /// + public bool IsEnabled => this.asmHook.IsEnabled; + + /// + /// Starts intercepting a call to the function. + /// + public void Enable() + { + if (!this.activated) + { + this.activated = true; + this.asmHook.Activate(); + return; + } + + this.asmHook.Enable(); + } + + /// + /// Stops intercepting a call to the function. + /// + public void Disable() + { + this.asmHook.Disable(); + } + + /// + /// Remove a hook from the current process. + /// + public void Dispose() + { + this.asmHook.Disable(); + this.detour = null; + } +} diff --git a/Dalamud/Game/Addon/Lifecycle/AddonVirtualTable.cs b/Dalamud/Game/Addon/Lifecycle/AddonVirtualTable.cs deleted file mode 100644 index 736415738..000000000 --- a/Dalamud/Game/Addon/Lifecycle/AddonVirtualTable.cs +++ /dev/null @@ -1,645 +0,0 @@ -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Threading; - -using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; -using Dalamud.Logging.Internal; - -using FFXIVClientStructs.FFXIV.Client.System.Memory; -using FFXIVClientStructs.FFXIV.Component.GUI; - -namespace Dalamud.Game.Addon.Lifecycle; - -/// -/// Represents a class that holds references to an addons original and modified virtual table entries. -/// -internal unsafe class AddonVirtualTable : IDisposable -{ - // This need to be at minimum the largest virtual table size of all addons - // Copying extra entries is not problematic, and is considered safe. - private const int VirtualTableEntryCount = 200; - - private const bool EnableLogging = false; - - private static readonly ModuleLog Log = new("LifecycleVT"); - - private readonly AddonLifecycle lifecycleService; - - // Each addon gets its own set of args that are used to mutate the original call when used in pre-calls - private readonly AddonSetupArgs setupArgs = new(); - private readonly AddonArgs finalizeArgs = new(); - private readonly AddonArgs drawArgs = new(); - private readonly AddonArgs updateArgs = new(); - private readonly AddonRefreshArgs refreshArgs = new(); - private readonly AddonRequestedUpdateArgs requestedUpdateArgs = new(); - private readonly AddonReceiveEventArgs receiveEventArgs = new(); - private readonly AddonArgs openArgs = new(); - private readonly AddonCloseArgs closeArgs = new(); - private readonly AddonShowArgs showArgs = new(); - private readonly AddonHideArgs hideArgs = new(); - private readonly AddonArgs onMoveArgs = new(); - private readonly AddonArgs onMouseOverArgs = new(); - private readonly AddonArgs onMouseOutArgs = new(); - private readonly AddonArgs focusArgs = new(); - - private readonly AtkUnitBase* atkUnitBase; - - // Pinned Function Delegates, as these functions get assigned to an unmanaged virtual table, - // the CLR needs to know they are in use, or it will invalidate them causing random crashing. - private readonly AtkUnitBase.Delegates.Dtor destructorFunction; - private readonly AtkUnitBase.Delegates.OnSetup onSetupFunction; - private readonly AtkUnitBase.Delegates.Finalizer finalizerFunction; - private readonly AtkUnitBase.Delegates.Draw drawFunction; - private readonly AtkUnitBase.Delegates.Update updateFunction; - private readonly AtkUnitBase.Delegates.OnRefresh onRefreshFunction; - private readonly AtkUnitBase.Delegates.OnRequestedUpdate onRequestedUpdateFunction; - private readonly AtkUnitBase.Delegates.ReceiveEvent onReceiveEventFunction; - private readonly AtkUnitBase.Delegates.Open openFunction; - private readonly AtkUnitBase.Delegates.Close closeFunction; - private readonly AtkUnitBase.Delegates.Show showFunction; - private readonly AtkUnitBase.Delegates.Hide hideFunction; - private readonly AtkUnitBase.Delegates.OnMove onMoveFunction; - private readonly AtkUnitBase.Delegates.OnMouseOver onMouseOverFunction; - private readonly AtkUnitBase.Delegates.OnMouseOut onMouseOutFunction; - private readonly AtkUnitBase.Delegates.Focus focusFunction; - - /// - /// Initializes a new instance of the class. - /// - /// AtkUnitBase* for the addon to replace the table of. - /// Reference to AddonLifecycle service to callback and invoke listeners. - internal AddonVirtualTable(AtkUnitBase* addon, AddonLifecycle lifecycleService) - { - this.atkUnitBase = addon; - this.lifecycleService = lifecycleService; - - // Save original virtual table - this.OriginalVirtualTable = addon->VirtualTable; - - // Create copy of original table - // Note this will copy any derived/overriden functions that this specific addon has. - // Note: currently there are 73 virtual functions, but there's no harm in copying more for when they add new virtual functions to the game - this.ModifiedVirtualTable = (AtkUnitBase.AtkUnitBaseVirtualTable*)IMemorySpace.GetUISpace()->Malloc(0x8 * VirtualTableEntryCount, 8); - NativeMemory.Copy(addon->VirtualTable, this.ModifiedVirtualTable, 0x8 * VirtualTableEntryCount); - - // Overwrite the addons existing virtual table with our own - addon->VirtualTable = this.ModifiedVirtualTable; - - // Pin each of our listener functions - this.destructorFunction = this.OnAddonDestructor; - this.onSetupFunction = this.OnAddonSetup; - this.finalizerFunction = this.OnAddonFinalize; - this.drawFunction = this.OnAddonDraw; - this.updateFunction = this.OnAddonUpdate; - this.onRefreshFunction = this.OnAddonRefresh; - this.onRequestedUpdateFunction = this.OnRequestedUpdate; - this.onReceiveEventFunction = this.OnAddonReceiveEvent; - this.openFunction = this.OnAddonOpen; - this.closeFunction = this.OnAddonClose; - this.showFunction = this.OnAddonShow; - this.hideFunction = this.OnAddonHide; - this.onMoveFunction = this.OnAddonMove; - this.onMouseOverFunction = this.OnAddonMouseOver; - this.onMouseOutFunction = this.OnAddonMouseOut; - this.focusFunction = this.OnAddonFocus; - - // Overwrite specific virtual table entries - this.ModifiedVirtualTable->Dtor = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.destructorFunction); - this.ModifiedVirtualTable->OnSetup = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onSetupFunction); - this.ModifiedVirtualTable->Finalizer = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.finalizerFunction); - this.ModifiedVirtualTable->Draw = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.drawFunction); - this.ModifiedVirtualTable->Update = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.updateFunction); - this.ModifiedVirtualTable->OnRefresh = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onRefreshFunction); - this.ModifiedVirtualTable->OnRequestedUpdate = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onRequestedUpdateFunction); - this.ModifiedVirtualTable->ReceiveEvent = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onReceiveEventFunction); - this.ModifiedVirtualTable->Open = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.openFunction); - this.ModifiedVirtualTable->Close = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.closeFunction); - this.ModifiedVirtualTable->Show = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.showFunction); - this.ModifiedVirtualTable->Hide = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.hideFunction); - this.ModifiedVirtualTable->OnMove = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onMoveFunction); - this.ModifiedVirtualTable->OnMouseOver = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onMouseOverFunction); - this.ModifiedVirtualTable->OnMouseOut = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.onMouseOutFunction); - this.ModifiedVirtualTable->Focus = (delegate* unmanaged)Marshal.GetFunctionPointerForDelegate(this.focusFunction); - } - - /// - /// Gets the original virtual table address for this addon. - /// - internal AtkUnitBase.AtkUnitBaseVirtualTable* OriginalVirtualTable { get; private set; } - - /// - /// Gets the modified virtual address for this addon. - /// - internal AtkUnitBase.AtkUnitBaseVirtualTable* ModifiedVirtualTable { get; private set; } - - /// - public void Dispose() - { - // Ensure restoration is done atomically. - Interlocked.Exchange(ref *(nint*)&this.atkUnitBase->VirtualTable, (nint)this.OriginalVirtualTable); - IMemorySpace.Free(this.ModifiedVirtualTable, 0x8 * VirtualTableEntryCount); - } - - private AtkEventListener* OnAddonDestructor(AtkUnitBase* thisPtr, byte freeFlags) - { - AtkEventListener* result = null; - - try - { - this.LogEvent(EnableLogging); - - try - { - result = this.OriginalVirtualTable->Dtor(thisPtr, freeFlags); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Dtor. This may be a bug in the game or another plugin hooking this method."); - } - - if ((freeFlags & 1) == 1) - { - IMemorySpace.Free(this.ModifiedVirtualTable, 0x8 * VirtualTableEntryCount); - AddonLifecycle.AllocatedTables.Remove(this); - } - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonDestructor."); - } - - return result; - } - - private void OnAddonSetup(AtkUnitBase* addon, uint valueCount, AtkValue* values) - { - try - { - this.LogEvent(EnableLogging); - - this.setupArgs.Addon = addon; - this.setupArgs.AtkValueCount = valueCount; - this.setupArgs.AtkValues = (nint)values; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreSetup, this.setupArgs); - - valueCount = this.setupArgs.AtkValueCount; - values = (AtkValue*)this.setupArgs.AtkValues; - - try - { - this.OriginalVirtualTable->OnSetup(addon, valueCount, values); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon OnSetup. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostSetup, this.setupArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonSetup."); - } - } - - private void OnAddonFinalize(AtkUnitBase* thisPtr) - { - try - { - this.LogEvent(EnableLogging); - - this.finalizeArgs.Addon = thisPtr; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreFinalize, this.finalizeArgs); - - try - { - this.OriginalVirtualTable->Finalizer(thisPtr); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Finalizer. This may be a bug in the game or another plugin hooking this method."); - } - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonFinalize."); - } - } - - private void OnAddonDraw(AtkUnitBase* addon) - { - try - { - this.LogEvent(EnableLogging); - - this.drawArgs.Addon = addon; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreDraw, this.drawArgs); - - try - { - this.OriginalVirtualTable->Draw(addon); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Draw. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostDraw, this.drawArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonDraw."); - } - } - - private void OnAddonUpdate(AtkUnitBase* addon, float delta) - { - try - { - this.LogEvent(EnableLogging); - - this.updateArgs.Addon = addon; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreUpdate, this.updateArgs); - - // Note: Do not pass or allow manipulation of delta. - // It's realistically not something that should be needed. - // And even if someone does, they are encouraged to hook Update themselves. - - try - { - this.OriginalVirtualTable->Update(addon, delta); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Update. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostUpdate, this.updateArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonUpdate."); - } - } - - private bool OnAddonRefresh(AtkUnitBase* addon, uint valueCount, AtkValue* values) - { - var result = false; - - try - { - this.LogEvent(EnableLogging); - - this.refreshArgs.Addon = addon; - this.refreshArgs.AtkValueCount = valueCount; - this.refreshArgs.AtkValues = (nint)values; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreRefresh, this.refreshArgs); - - valueCount = this.refreshArgs.AtkValueCount; - values = (AtkValue*)this.refreshArgs.AtkValues; - - try - { - result = this.OriginalVirtualTable->OnRefresh(addon, valueCount, values); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon OnRefresh. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostRefresh, this.refreshArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonRefresh."); - } - - return result; - } - - private void OnRequestedUpdate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData) - { - try - { - this.LogEvent(EnableLogging); - - this.requestedUpdateArgs.Addon = addon; - this.requestedUpdateArgs.NumberArrayData = (nint)numberArrayData; - this.requestedUpdateArgs.StringArrayData = (nint)stringArrayData; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreRequestedUpdate, this.requestedUpdateArgs); - - numberArrayData = (NumberArrayData**)this.requestedUpdateArgs.NumberArrayData; - stringArrayData = (StringArrayData**)this.requestedUpdateArgs.StringArrayData; - - try - { - this.OriginalVirtualTable->OnRequestedUpdate(addon, numberArrayData, stringArrayData); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon OnRequestedUpdate. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostRequestedUpdate, this.requestedUpdateArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnRequestedUpdate."); - } - } - - private void OnAddonReceiveEvent(AtkUnitBase* addon, AtkEventType eventType, int eventParam, AtkEvent* atkEvent, AtkEventData* atkEventData) - { - try - { - this.LogEvent(EnableLogging); - - this.receiveEventArgs.Addon = (nint)addon; - this.receiveEventArgs.AtkEventType = (byte)eventType; - this.receiveEventArgs.EventParam = eventParam; - this.receiveEventArgs.AtkEvent = (IntPtr)atkEvent; - this.receiveEventArgs.AtkEventData = (nint)atkEventData; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreReceiveEvent, this.receiveEventArgs); - - eventType = (AtkEventType)this.receiveEventArgs.AtkEventType; - eventParam = this.receiveEventArgs.EventParam; - atkEvent = (AtkEvent*)this.receiveEventArgs.AtkEvent; - atkEventData = (AtkEventData*)this.receiveEventArgs.AtkEventData; - - try - { - this.OriginalVirtualTable->ReceiveEvent(addon, eventType, eventParam, atkEvent, atkEventData); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon ReceiveEvent. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostReceiveEvent, this.receiveEventArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonReceiveEvent."); - } - } - - private bool OnAddonOpen(AtkUnitBase* thisPtr, uint depthLayer) - { - var result = false; - - try - { - this.LogEvent(EnableLogging); - - this.openArgs.Addon = thisPtr; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreOpen, this.openArgs); - - try - { - result = this.OriginalVirtualTable->Open(thisPtr, depthLayer); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Open. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostOpen, this.openArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonOpen."); - } - - return result; - } - - private bool OnAddonClose(AtkUnitBase* thisPtr, bool fireCallback) - { - var result = false; - - try - { - this.LogEvent(EnableLogging); - - this.closeArgs.Addon = thisPtr; - this.closeArgs.FireCallback = fireCallback; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreClose, this.closeArgs); - - fireCallback = this.closeArgs.FireCallback; - - try - { - result = this.OriginalVirtualTable->Close(thisPtr, fireCallback); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Close. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostClose, this.closeArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonClose."); - } - - return result; - } - - private void OnAddonShow(AtkUnitBase* thisPtr, bool silenceOpenSoundEffect, uint unsetShowHideFlags) - { - try - { - this.LogEvent(EnableLogging); - - this.showArgs.Addon = thisPtr; - this.showArgs.SilenceOpenSoundEffect = silenceOpenSoundEffect; - this.showArgs.UnsetShowHideFlags = unsetShowHideFlags; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreShow, this.showArgs); - - silenceOpenSoundEffect = this.showArgs.SilenceOpenSoundEffect; - unsetShowHideFlags = this.showArgs.UnsetShowHideFlags; - - try - { - this.OriginalVirtualTable->Show(thisPtr, silenceOpenSoundEffect, unsetShowHideFlags); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Show. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostShow, this.showArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonShow."); - } - } - - private void OnAddonHide(AtkUnitBase* thisPtr, bool unkBool, bool callHideCallback, uint setShowHideFlags) - { - try - { - this.LogEvent(EnableLogging); - - this.hideArgs.Addon = thisPtr; - this.hideArgs.UnknownBool = unkBool; - this.hideArgs.CallHideCallback = callHideCallback; - this.hideArgs.SetShowHideFlags = setShowHideFlags; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreHide, this.hideArgs); - - unkBool = this.hideArgs.UnknownBool; - callHideCallback = this.hideArgs.CallHideCallback; - setShowHideFlags = this.hideArgs.SetShowHideFlags; - - try - { - this.OriginalVirtualTable->Hide(thisPtr, unkBool, callHideCallback, setShowHideFlags); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Hide. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostHide, this.hideArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonHide."); - } - } - - private void OnAddonMove(AtkUnitBase* thisPtr) - { - try - { - this.LogEvent(EnableLogging); - - this.onMoveArgs.Addon = thisPtr; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreMove, this.onMoveArgs); - - try - { - this.OriginalVirtualTable->OnMove(thisPtr); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon OnMove. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostMove, this.onMoveArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonMove."); - } - } - - private void OnAddonMouseOver(AtkUnitBase* thisPtr) - { - try - { - this.LogEvent(EnableLogging); - - this.onMouseOverArgs.Addon = thisPtr; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreMouseOver, this.onMouseOverArgs); - - try - { - this.OriginalVirtualTable->OnMouseOver(thisPtr); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon OnMouseOver. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostMouseOver, this.onMouseOverArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonMouseOver."); - } - } - - private void OnAddonMouseOut(AtkUnitBase* thisPtr) - { - try - { - this.LogEvent(EnableLogging); - - this.onMouseOutArgs.Addon = thisPtr; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreMouseOut, this.onMouseOutArgs); - - try - { - this.OriginalVirtualTable->OnMouseOut(thisPtr); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon OnMouseOut. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostMouseOut, this.onMouseOutArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonMouseOut."); - } - } - - private void OnAddonFocus(AtkUnitBase* thisPtr) - { - try - { - this.LogEvent(EnableLogging); - - this.focusArgs.Addon = thisPtr; - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PreFocus, this.focusArgs); - - try - { - this.OriginalVirtualTable->Focus(thisPtr); - } - catch (Exception e) - { - Log.Error(e, "Caught exception when calling original Addon Focus. This may be a bug in the game or another plugin hooking this method."); - } - - this.lifecycleService.InvokeListenersSafely(AddonEvent.PostFocus, this.focusArgs); - } - catch (Exception e) - { - Log.Error(e, "Caught exception from Dalamud when attempting to process OnAddonFocus."); - } - } - - [Conditional("DEBUG")] - private void LogEvent(bool loggingEnabled, [CallerMemberName] string caller = "") - { - if (loggingEnabled) - { - // Manually disable the really spammy log events, you can comment this out if you need to debug them. - if (caller is "OnAddonUpdate" or "OnAddonDraw" or "OnAddonReceiveEvent" or "OnRequestedUpdate") - return; - - Log.Debug($"[{caller}]: {this.atkUnitBase->NameString}"); - } - } -} diff --git a/Dalamud/Game/BaseAddressResolver.cs b/Dalamud/Game/BaseAddressResolver.cs index d41b1d9d8..4133117d7 100644 --- a/Dalamud/Game/BaseAddressResolver.cs +++ b/Dalamud/Game/BaseAddressResolver.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; -using Dalamud.Plugin.Services; - namespace Dalamud.Game; /// diff --git a/Dalamud/Game/ChatHandlers.cs b/Dalamud/Game/ChatHandlers.cs index 279bf46e5..b1b798a8a 100644 --- a/Dalamud/Game/ChatHandlers.cs +++ b/Dalamud/Game/ChatHandlers.cs @@ -104,7 +104,7 @@ internal partial class ChatHandlers : IServiceType if (this.configuration.PrintDalamudWelcomeMsg) { - chatGui.Print(string.Format(Loc.Localize("DalamudWelcome", "Dalamud {0} loaded."), Versioning.GetScmVersion()) + chatGui.Print(string.Format(Loc.Localize("DalamudWelcome", "Dalamud {0} loaded."), Util.GetScmVersion()) + string.Format(Loc.Localize("PluginsWelcome", " {0} plugin(s) loaded."), pluginManager.InstalledPlugins.Count(x => x.IsLoaded))); } @@ -116,7 +116,7 @@ internal partial class ChatHandlers : IServiceType } } - if (string.IsNullOrEmpty(this.configuration.LastVersion) || !Versioning.GetAssemblyVersion().StartsWith(this.configuration.LastVersion)) + if (string.IsNullOrEmpty(this.configuration.LastVersion) || !Util.AssemblyVersion.StartsWith(this.configuration.LastVersion)) { var linkPayload = chatGui.AddChatLinkHandler( (_, _) => dalamudInterface.OpenPluginInstallerTo(PluginInstallerOpenKind.Changelogs)); @@ -137,7 +137,7 @@ internal partial class ChatHandlers : IServiceType Type = XivChatType.Notice, }); - this.configuration.LastVersion = Versioning.GetAssemblyVersion(); + this.configuration.LastVersion = Util.AssemblyVersion; this.configuration.QueueSave(); } diff --git a/Dalamud/Game/ClientState/Aetherytes/AetheryteEntry.cs b/Dalamud/Game/ClientState/Aetherytes/AetheryteEntry.cs index e0a5df06d..89dd8b8b1 100644 --- a/Dalamud/Game/ClientState/Aetherytes/AetheryteEntry.cs +++ b/Dalamud/Game/ClientState/Aetherytes/AetheryteEntry.cs @@ -63,37 +63,47 @@ public interface IAetheryteEntry } /// -/// This struct represents an aetheryte entry available to the game. +/// Class representing an aetheryte entry available to the game. /// -/// Data read from the Aetheryte List. -internal readonly struct AetheryteEntry(TeleportInfo data) : IAetheryteEntry +internal sealed class AetheryteEntry : IAetheryteEntry { - /// - public uint AetheryteId => data.AetheryteId; + private readonly TeleportInfo data; + + /// + /// Initializes a new instance of the class. + /// + /// Data read from the Aetheryte List. + internal AetheryteEntry(TeleportInfo data) + { + this.data = data; + } /// - public uint TerritoryId => data.TerritoryId; + public uint AetheryteId => this.data.AetheryteId; /// - public byte SubIndex => data.SubIndex; + public uint TerritoryId => this.data.TerritoryId; /// - public byte Ward => data.Ward; + public byte SubIndex => this.data.SubIndex; /// - public byte Plot => data.Plot; + public byte Ward => this.data.Ward; /// - public uint GilCost => data.GilCost; + public byte Plot => this.data.Plot; /// - public bool IsFavourite => data.IsFavourite; + public uint GilCost => this.data.GilCost; /// - public bool IsSharedHouse => data.IsSharedHouse; + public bool IsFavourite => this.data.IsFavourite; /// - public bool IsApartment => data.IsApartment; + public bool IsSharedHouse => this.data.IsSharedHouse; + + /// + public bool IsApartment => this.data.IsApartment; /// public RowRef AetheryteData => LuminaUtils.CreateRef(this.AetheryteId); diff --git a/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs b/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs index 12a629958..4a6d011e9 100644 --- a/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs +++ b/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs @@ -88,7 +88,10 @@ internal sealed partial class AetheryteList /// public IEnumerator GetEnumerator() { - return new Enumerator(this); + for (var i = 0; i < this.Length; i++) + { + yield return this[i]; + } } /// @@ -96,34 +99,4 @@ internal sealed partial class AetheryteList { return this.GetEnumerator(); } - - private struct Enumerator(AetheryteList aetheryteList) : IEnumerator - { - private int index = -1; - - public IAetheryteEntry Current { get; private set; } - - object IEnumerator.Current => this.Current; - - public bool MoveNext() - { - if (++this.index < aetheryteList.Length) - { - this.Current = aetheryteList[this.index]; - return true; - } - - this.Current = default; - return false; - } - - public void Reset() - { - this.index = -1; - } - - public void Dispose() - { - } - } } diff --git a/Dalamud/Game/ClientState/Buddy/BuddyList.cs b/Dalamud/Game/ClientState/Buddy/BuddyList.cs index 3bec6d9f1..dbac76518 100644 --- a/Dalamud/Game/ClientState/Buddy/BuddyList.cs +++ b/Dalamud/Game/ClientState/Buddy/BuddyList.cs @@ -8,7 +8,6 @@ using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; using CSBuddy = FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy; -using CSBuddyMember = FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember; using CSUIState = FFXIVClientStructs.FFXIV.Client.Game.UI.UIState; namespace Dalamud.Game.ClientState.Buddy; @@ -24,7 +23,7 @@ namespace Dalamud.Game.ClientState.Buddy; #pragma warning restore SA1015 internal sealed partial class BuddyList : IServiceType, IBuddyList { - private const uint InvalidEntityId = 0xE0000000; + private const uint InvalidObjectID = 0xE0000000; [ServiceManager.ServiceDependency] private readonly PlayerState playerState = Service.Get(); @@ -85,37 +84,37 @@ internal sealed partial class BuddyList : IServiceType, IBuddyList } /// - public unsafe nint GetCompanionBuddyMemberAddress() + public unsafe IntPtr GetCompanionBuddyMemberAddress() { - return (nint)this.BuddyListStruct->CompanionInfo.Companion; + return (IntPtr)this.BuddyListStruct->CompanionInfo.Companion; } /// - public unsafe nint GetPetBuddyMemberAddress() + public unsafe IntPtr GetPetBuddyMemberAddress() { - return (nint)this.BuddyListStruct->PetInfo.Pet; + return (IntPtr)this.BuddyListStruct->PetInfo.Pet; } /// - public unsafe nint GetBattleBuddyMemberAddress(int index) + public unsafe IntPtr GetBattleBuddyMemberAddress(int index) { if (index < 0 || index >= 3) - return 0; + return IntPtr.Zero; - return (nint)Unsafe.AsPointer(ref this.BuddyListStruct->BattleBuddies[index]); + return (IntPtr)Unsafe.AsPointer(ref this.BuddyListStruct->BattleBuddies[index]); } /// - public unsafe IBuddyMember? CreateBuddyMemberReference(nint address) + public IBuddyMember? CreateBuddyMemberReference(IntPtr address) { - if (address == 0) + if (address == IntPtr.Zero) return null; - if (this.playerState.ContentId == 0) + if (!this.playerState.IsLoaded) return null; - var buddy = new BuddyMember((CSBuddyMember*)address); - if (buddy.EntityId == InvalidEntityId) + var buddy = new BuddyMember(address); + if (buddy.ObjectId == InvalidObjectID) return null; return buddy; @@ -133,39 +132,12 @@ internal sealed partial class BuddyList /// public IEnumerator GetEnumerator() { - return new Enumerator(this); + for (var i = 0; i < this.Length; i++) + { + yield return this[i]; + } } /// IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - - private struct Enumerator(BuddyList buddyList) : IEnumerator - { - private int index = -1; - - public IBuddyMember Current { get; private set; } - - object IEnumerator.Current => this.Current; - - public bool MoveNext() - { - if (++this.index < buddyList.Length) - { - this.Current = buddyList[this.index]; - return true; - } - - this.Current = default; - return false; - } - - public void Reset() - { - this.index = -1; - } - - public void Dispose() - { - } - } } diff --git a/Dalamud/Game/ClientState/Buddy/BuddyMember.cs b/Dalamud/Game/ClientState/Buddy/BuddyMember.cs index 8018bafaf..393598d32 100644 --- a/Dalamud/Game/ClientState/Buddy/BuddyMember.cs +++ b/Dalamud/Game/ClientState/Buddy/BuddyMember.cs @@ -1,24 +1,20 @@ -using System.Diagnostics.CodeAnalysis; - using Dalamud.Data; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.Types; using Lumina.Excel; -using CSBuddyMember = FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember; - namespace Dalamud.Game.ClientState.Buddy; /// /// Interface representing represents a buddy such as the chocobo companion, summoned pets, squadron groups and trust parties. /// -public interface IBuddyMember : IEquatable +public interface IBuddyMember { /// /// Gets the address of the buddy in memory. /// - nint Address { get; } + IntPtr Address { get; } /// /// Gets the object ID of this buddy. @@ -71,34 +67,42 @@ public interface IBuddyMember : IEquatable } /// -/// This struct represents a buddy such as the chocobo companion, summoned pets, squadron groups and trust parties. +/// This class represents a buddy such as the chocobo companion, summoned pets, squadron groups and trust parties. /// -/// A pointer to the BuddyMember. -internal readonly unsafe struct BuddyMember(CSBuddyMember* ptr) : IBuddyMember +internal unsafe class BuddyMember : IBuddyMember { [ServiceManager.ServiceDependency] private readonly ObjectTable objectTable = Service.Get(); - /// - public nint Address => (nint)ptr; + /// + /// Initializes a new instance of the class. + /// + /// Buddy address. + internal BuddyMember(IntPtr address) + { + this.Address = address; + } /// - public uint ObjectId => this.EntityId; + public IntPtr Address { get; } /// - public uint EntityId => ptr->EntityId; + public uint ObjectId => this.Struct->EntityId; /// - public IGameObject? GameObject => this.objectTable.SearchById(this.EntityId); + public uint EntityId => this.Struct->EntityId; /// - public uint CurrentHP => ptr->CurrentHealth; + public IGameObject? GameObject => this.objectTable.SearchById(this.ObjectId); /// - public uint MaxHP => ptr->MaxHealth; + public uint CurrentHP => this.Struct->CurrentHealth; /// - public uint DataID => ptr->DataId; + public uint MaxHP => this.Struct->MaxHealth; + + /// + public uint DataID => this.Struct->DataId; /// public RowRef MountData => LuminaUtils.CreateRef(this.DataID); @@ -109,25 +113,5 @@ internal readonly unsafe struct BuddyMember(CSBuddyMember* ptr) : IBuddyMember /// public RowRef TrustData => LuminaUtils.CreateRef(this.DataID); - public static bool operator ==(BuddyMember x, BuddyMember y) => x.Equals(y); - - public static bool operator !=(BuddyMember x, BuddyMember y) => !(x == y); - - /// - public bool Equals(IBuddyMember? other) - { - return this.EntityId == other.EntityId; - } - - /// - public override bool Equals([NotNullWhen(true)] object? obj) - { - return obj is BuddyMember fate && this.Equals(fate); - } - - /// - public override int GetHashCode() - { - return this.EntityId.GetHashCode(); - } + private FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember* Struct => (FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember*)this.Address; } diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index f7c0b75ed..93720e1db 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -37,6 +37,7 @@ internal sealed class ClientState : IInternalDisposableService, IClientState private readonly GameLifecycle lifecycle; private readonly ClientStateAddressResolver address; + private readonly Hook handleZoneInitPacketHook; private readonly Hook uiModuleHandlePacketHook; private readonly Hook setCurrentInstanceHook; @@ -71,11 +72,13 @@ internal sealed class ClientState : IInternalDisposableService, IClientState this.ClientLanguage = (ClientLanguage)dalamud.StartInfo.Language; + this.handleZoneInitPacketHook = Hook.FromAddress(this.AddressResolver.HandleZoneInitPacket, this.HandleZoneInitPacketDetour); this.uiModuleHandlePacketHook = Hook.FromAddress((nint)UIModule.StaticVirtualTablePointer->HandlePacket, this.UIModuleHandlePacketDetour); this.setCurrentInstanceHook = Hook.FromAddress(this.AddressResolver.SetCurrentInstance, this.SetCurrentInstanceDetour); this.networkHandlers.CfPop += this.NetworkHandlersOnCfPop; + this.handleZoneInitPacketHook.Enable(); this.uiModuleHandlePacketHook.Enable(); this.setCurrentInstanceHook.Enable(); @@ -268,6 +271,7 @@ internal sealed class ClientState : IInternalDisposableService, IClientState /// void IInternalDisposableService.DisposeService() { + this.handleZoneInitPacketHook.Dispose(); this.uiModuleHandlePacketHook.Dispose(); this.onLogoutHook.Dispose(); this.setCurrentInstanceHook.Dispose(); @@ -290,6 +294,23 @@ internal sealed class ClientState : IInternalDisposableService, IClientState this.framework.Update += this.OnFrameworkUpdate; } + private void HandleZoneInitPacketDetour(nint a1, uint localPlayerEntityId, nint packet, byte type) + { + this.handleZoneInitPacketHook.Original(a1, localPlayerEntityId, packet, type); + + try + { + var eventArgs = ZoneInitEventArgs.Read(packet); + Log.Debug($"ZoneInit: {eventArgs}"); + this.ZoneInit?.InvokeSafely(eventArgs); + this.TerritoryType = (ushort)eventArgs.TerritoryType.RowId; + } + catch (Exception ex) + { + Log.Error(ex, "Exception during ZoneInit"); + } + } + private unsafe void UIModuleHandlePacketDetour( UIModule* thisPtr, UIModulePacketType type, uint uintParam, void* packet) { @@ -335,15 +356,6 @@ internal sealed class ClientState : IInternalDisposableService, IClientState break; } - - case (UIModulePacketType)5: // TODO: Use UIModulePacketType.InitZone when available - { - var eventArgs = ZoneInitEventArgs.Read((nint)packet); - Log.Debug($"ZoneInit: {eventArgs}"); - this.ZoneInit?.InvokeSafely(eventArgs); - this.TerritoryType = (ushort)eventArgs.TerritoryType.RowId; - break; - } } } diff --git a/Dalamud/Game/ClientState/ClientStateAddressResolver.cs b/Dalamud/Game/ClientState/ClientStateAddressResolver.cs index ae7549b97..2fc859d09 100644 --- a/Dalamud/Game/ClientState/ClientStateAddressResolver.cs +++ b/Dalamud/Game/ClientState/ClientStateAddressResolver.cs @@ -1,5 +1,3 @@ -using Dalamud.Plugin.Services; - namespace Dalamud.Game.ClientState; /// @@ -21,6 +19,11 @@ internal sealed class ClientStateAddressResolver : BaseAddressResolver // Functions + /// + /// Gets the address of the method that handles the ZoneInit packet. + /// + public nint HandleZoneInitPacket { get; private set; } + /// /// Gets the address of the method that sets the current public instance. /// @@ -32,6 +35,7 @@ internal sealed class ClientStateAddressResolver : BaseAddressResolver /// The signature scanner to facilitate setup. protected override void Setup64Bit(ISigScanner sig) { + this.HandleZoneInitPacket = sig.ScanText("E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 44 0F B6 45"); this.SetCurrentInstance = sig.ScanText("E8 ?? ?? ?? ?? 0F B6 55 ?? 48 8D 0D ?? ?? ?? ?? C0 EA"); // NetworkModuleProxy.SetCurrentInstance // These resolve to fixed offsets only, without the base address added in, so GetStaticAddressFromSig() can't be used. diff --git a/Dalamud/Game/ClientState/Conditions/Condition.cs b/Dalamud/Game/ClientState/Conditions/Condition.cs index 6f61ab246..99748f71b 100644 --- a/Dalamud/Game/ClientState/Conditions/Condition.cs +++ b/Dalamud/Game/ClientState/Conditions/Condition.cs @@ -18,7 +18,7 @@ internal sealed class Condition : IInternalDisposableService, ICondition /// /// Gets the current max number of conditions. You can get this just by looking at the condition sheet and how many rows it has. /// - internal const int MaxConditionEntries = 112; + internal const int MaxConditionEntries = 104; [ServiceManager.ServiceDependency] private readonly Framework framework = Service.Get(); diff --git a/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs b/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs index b5894d891..19451dd5c 100644 --- a/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs +++ b/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs @@ -520,17 +520,4 @@ public enum ConditionFlag PilotingMech = 102, // Unknown103 = 103, - - /// - /// Unable to execute command while editing a strategy board. - /// - EditingStrategyBoard = 104, - - // Unknown105 = 105, - // Unknown106 = 106, - // Unknown107 = 107, - // Unknown108 = 108, - // Unknown109 = 109, - // Unknown110 = 110, - // Unknown111 = 111, } diff --git a/Dalamud/Game/ClientState/Fates/Fate.cs b/Dalamud/Game/ClientState/Fates/Fate.cs index 4348c4025..f82109fd0 100644 --- a/Dalamud/Game/ClientState/Fates/Fate.cs +++ b/Dalamud/Game/ClientState/Fates/Fate.cs @@ -1,4 +1,3 @@ -using System.Diagnostics.CodeAnalysis; using System.Numerics; using Dalamud.Data; @@ -8,12 +7,10 @@ using Dalamud.Memory; using Lumina.Excel; -using CSFateContext = FFXIVClientStructs.FFXIV.Client.Game.Fate.FateContext; - namespace Dalamud.Game.ClientState.Fates; /// -/// Interface representing a fate entry that can be seen in the current area. +/// Interface representing an fate entry that can be seen in the current area. /// public interface IFate : IEquatable { @@ -115,96 +112,129 @@ public interface IFate : IEquatable /// /// Gets the address of this Fate in memory. /// - nint Address { get; } + IntPtr Address { get; } } /// -/// This struct represents a Fate. +/// This class represents an FFXIV Fate. /// -/// A pointer to the FateContext. -internal readonly unsafe struct Fate(CSFateContext* ptr) : IFate +internal unsafe partial class Fate { + /// + /// Initializes a new instance of the class. + /// + /// The address of this fate in memory. + internal Fate(IntPtr address) + { + this.Address = address; + } + /// - public nint Address => (nint)ptr; + public IntPtr Address { get; } + + private FFXIVClientStructs.FFXIV.Client.Game.Fate.FateContext* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Fate.FateContext*)this.Address; + + public static bool operator ==(Fate fate1, Fate fate2) + { + if (fate1 is null || fate2 is null) + return Equals(fate1, fate2); + + return fate1.Equals(fate2); + } + + public static bool operator !=(Fate fate1, Fate fate2) => !(fate1 == fate2); + + /// + /// Gets a value indicating whether this Fate is still valid in memory. + /// + /// The fate to check. + /// True or false. + public static bool IsValid(Fate fate) + { + if (fate == null) + return false; + + var playerState = Service.Get(); + return playerState.IsLoaded == true; + } + + /// + /// Gets a value indicating whether this actor is still valid in memory. + /// + /// True or false. + public bool IsValid() => IsValid(this); /// - public ushort FateId => ptr->FateId; + bool IEquatable.Equals(IFate other) => this.FateId == other?.FateId; + + /// + public override bool Equals(object obj) => ((IEquatable)this).Equals(obj as IFate); + + /// + public override int GetHashCode() => this.FateId.GetHashCode(); +} + +/// +/// This class represents an FFXIV Fate. +/// +internal unsafe partial class Fate : IFate +{ + /// + public ushort FateId => this.Struct->FateId; /// public RowRef GameData => LuminaUtils.CreateRef(this.FateId); /// - public int StartTimeEpoch => ptr->StartTimeEpoch; + public int StartTimeEpoch => this.Struct->StartTimeEpoch; /// - public short Duration => ptr->Duration; + public short Duration => this.Struct->Duration; /// public long TimeRemaining => this.StartTimeEpoch + this.Duration - DateTimeOffset.Now.ToUnixTimeSeconds(); /// - public SeString Name => MemoryHelper.ReadSeString(&ptr->Name); + public SeString Name => MemoryHelper.ReadSeString(&this.Struct->Name); /// - public SeString Description => MemoryHelper.ReadSeString(&ptr->Description); + public SeString Description => MemoryHelper.ReadSeString(&this.Struct->Description); /// - public SeString Objective => MemoryHelper.ReadSeString(&ptr->Objective); + public SeString Objective => MemoryHelper.ReadSeString(&this.Struct->Objective); /// - public FateState State => (FateState)ptr->State; + public FateState State => (FateState)this.Struct->State; /// - public byte HandInCount => ptr->HandInCount; + public byte HandInCount => this.Struct->HandInCount; /// - public byte Progress => ptr->Progress; + public byte Progress => this.Struct->Progress; /// - public bool HasBonus => ptr->IsBonus; + public bool HasBonus => this.Struct->IsBonus; /// - public uint IconId => ptr->IconId; + public uint IconId => this.Struct->IconId; /// - public byte Level => ptr->Level; + public byte Level => this.Struct->Level; /// - public byte MaxLevel => ptr->MaxLevel; + public byte MaxLevel => this.Struct->MaxLevel; /// - public Vector3 Position => ptr->Location; + public Vector3 Position => this.Struct->Location; /// - public float Radius => ptr->Radius; + public float Radius => this.Struct->Radius; /// - public uint MapIconId => ptr->MapIconId; + public uint MapIconId => this.Struct->MapIconId; /// /// Gets the territory this is located in. /// - public RowRef TerritoryType => LuminaUtils.CreateRef(ptr->MapMarkers[0].MapMarkerData.TerritoryTypeId); - - public static bool operator ==(Fate x, Fate y) => x.Equals(y); - - public static bool operator !=(Fate x, Fate y) => !(x == y); - - /// - public bool Equals(IFate? other) - { - return this.FateId == other.FateId; - } - - /// - public override bool Equals([NotNullWhen(true)] object? obj) - { - return obj is Fate fate && this.Equals(fate); - } - - /// - public override int GetHashCode() - { - return this.FateId.GetHashCode(); - } + public RowRef TerritoryType => LuminaUtils.CreateRef(this.Struct->MapMarkers[0].MapMarkerData.TerritoryTypeId); } diff --git a/Dalamud/Game/ClientState/Fates/FateTable.cs b/Dalamud/Game/ClientState/Fates/FateTable.cs index 41e974f04..30b0f4102 100644 --- a/Dalamud/Game/ClientState/Fates/FateTable.cs +++ b/Dalamud/Game/ClientState/Fates/FateTable.cs @@ -6,7 +6,6 @@ using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; -using CSFateContext = FFXIVClientStructs.FFXIV.Client.Game.Fate.FateContext; using CSFateManager = FFXIVClientStructs.FFXIV.Client.Game.Fate.FateManager; namespace Dalamud.Game.ClientState.Fates; @@ -27,7 +26,7 @@ internal sealed partial class FateTable : IServiceType, IFateTable } /// - public unsafe nint Address => (nint)CSFateManager.Instance(); + public unsafe IntPtr Address => (nint)CSFateManager.Instance(); /// public unsafe int Length @@ -70,29 +69,29 @@ internal sealed partial class FateTable : IServiceType, IFateTable } /// - public unsafe nint GetFateAddress(int index) + public unsafe IntPtr GetFateAddress(int index) { if (index >= this.Length) - return 0; + return IntPtr.Zero; var fateManager = CSFateManager.Instance(); if (fateManager == null) - return 0; + return IntPtr.Zero; - return (nint)fateManager->Fates[index].Value; + return (IntPtr)fateManager->Fates[index].Value; } /// - public unsafe IFate? CreateFateReference(IntPtr address) + public IFate? CreateFateReference(IntPtr offset) { - if (address == 0) + if (offset == IntPtr.Zero) return null; - var clientState = Service.Get(); - if (clientState.LocalContentId == 0) + var playerState = Service.Get(); + if (!playerState.IsLoaded) return null; - return new Fate((CSFateContext*)address); + return new Fate(offset); } } @@ -107,39 +106,12 @@ internal sealed partial class FateTable /// public IEnumerator GetEnumerator() { - return new Enumerator(this); + for (var i = 0; i < this.Length; i++) + { + yield return this[i]; + } } /// IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - - private struct Enumerator(FateTable fateTable) : IEnumerator - { - private int index = -1; - - public IFate Current { get; private set; } - - object IEnumerator.Current => this.Current; - - public bool MoveNext() - { - if (++this.index < fateTable.Length) - { - this.Current = fateTable[this.index]; - return true; - } - - this.Current = default; - return false; - } - - public void Reset() - { - this.index = -1; - } - - public void Dispose() - { - } - } } diff --git a/Dalamud/Game/ClientState/Objects/ObjectTable.cs b/Dalamud/Game/ClientState/Objects/ObjectTable.cs index 9a2c7343e..b66dd4775 100644 --- a/Dalamud/Game/ClientState/Objects/ObjectTable.cs +++ b/Dalamud/Game/ClientState/Objects/ObjectTable.cs @@ -13,6 +13,8 @@ using Dalamud.Utility; using FFXIVClientStructs.Interop; +using Microsoft.Extensions.ObjectPool; + using CSGameObject = FFXIVClientStructs.FFXIV.Client.Game.Object.GameObject; using CSGameObjectManager = FFXIVClientStructs.FFXIV.Client.Game.Object.GameObjectManager; @@ -35,6 +37,8 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable private readonly CachedEntry[] cachedObjectTable; + private readonly Enumerator?[] frameworkThreadEnumerators = new Enumerator?[4]; + [ServiceManager.ServiceConstructor] private unsafe ObjectTable() { @@ -44,6 +48,9 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable this.cachedObjectTable = new CachedEntry[objectTableLength]; for (var i = 0; i < this.cachedObjectTable.Length; i++) this.cachedObjectTable[i] = new(nativeObjectTable.GetPointer(i)); + + for (var i = 0; i < this.frameworkThreadEnumerators.Length; i++) + this.frameworkThreadEnumerators[i] = new(this, i); } /// @@ -236,25 +243,43 @@ internal sealed partial class ObjectTable public IEnumerator GetEnumerator() { ThreadSafety.AssertMainThread(); - return new Enumerator(this); + + // If we're on the framework thread, see if there's an already allocated enumerator available for use. + foreach (ref var x in this.frameworkThreadEnumerators.AsSpan()) + { + if (x is not null) + { + var t = x; + x = null; + t.Reset(); + return t; + } + } + + // No reusable enumerator is available; allocate a new temporary one. + return new Enumerator(this, -1); } /// IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - private struct Enumerator(ObjectTable owner) : IEnumerator + private sealed class Enumerator(ObjectTable owner, int slotId) : IEnumerator, IResettable { + private ObjectTable? owner = owner; + private int index = -1; - public IGameObject Current { get; private set; } + public IGameObject Current { get; private set; } = null!; object IEnumerator.Current => this.Current; public bool MoveNext() { - var cache = owner.cachedObjectTable.AsSpan(); + if (this.index == objectTableLength) + return false; - while (++this.index < objectTableLength) + var cache = this.owner!.cachedObjectTable.AsSpan(); + for (this.index++; this.index < objectTableLength; this.index++) { if (cache[this.index].Update() is { } ao) { @@ -263,17 +288,24 @@ internal sealed partial class ObjectTable } } - this.Current = default; return false; } - public void Reset() - { - this.index = -1; - } + public void Reset() => this.index = -1; public void Dispose() { + if (this.owner is not { } o) + return; + + if (slotId != -1) + o.frameworkThreadEnumerators[slotId] = this; + } + + public bool TryReset() + { + this.Reset(); + return true; } } } diff --git a/Dalamud/Game/ClientState/Objects/TargetManager.cs b/Dalamud/Game/ClientState/Objects/TargetManager.cs index a6432e242..f81154693 100644 --- a/Dalamud/Game/ClientState/Objects/TargetManager.cs +++ b/Dalamud/Game/ClientState/Objects/TargetManager.cs @@ -1,7 +1,6 @@ using Dalamud.Game.ClientState.Objects.Types; using Dalamud.IoC; using Dalamud.IoC.Internal; -using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game.Control; diff --git a/Dalamud/Game/ClientState/Party/PartyList.cs b/Dalamud/Game/ClientState/Party/PartyList.cs index 90959f926..9618b679c 100644 --- a/Dalamud/Game/ClientState/Party/PartyList.cs +++ b/Dalamud/Game/ClientState/Party/PartyList.cs @@ -9,7 +9,6 @@ using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; using CSGroupManager = FFXIVClientStructs.FFXIV.Client.Game.Group.GroupManager; -using CSPartyMember = FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember; namespace Dalamud.Game.ClientState.Party; @@ -44,20 +43,20 @@ internal sealed unsafe partial class PartyList : IServiceType, IPartyList public bool IsAlliance => this.GroupManagerStruct->MainGroup.AllianceFlags > 0; /// - public unsafe nint GroupManagerAddress => (nint)CSGroupManager.Instance(); + public unsafe IntPtr GroupManagerAddress => (nint)CSGroupManager.Instance(); /// - public nint GroupListAddress => (nint)Unsafe.AsPointer(ref GroupManagerStruct->MainGroup.PartyMembers[0]); + public IntPtr GroupListAddress => (IntPtr)Unsafe.AsPointer(ref GroupManagerStruct->MainGroup.PartyMembers[0]); /// - public nint AllianceListAddress => (nint)Unsafe.AsPointer(ref this.GroupManagerStruct->MainGroup.AllianceMembers[0]); + public IntPtr AllianceListAddress => (IntPtr)Unsafe.AsPointer(ref this.GroupManagerStruct->MainGroup.AllianceMembers[0]); /// public long PartyId => this.GroupManagerStruct->MainGroup.PartyId; - private static int PartyMemberSize { get; } = Marshal.SizeOf(); + private static int PartyMemberSize { get; } = Marshal.SizeOf(); - private CSGroupManager* GroupManagerStruct => (CSGroupManager*)this.GroupManagerAddress; + private FFXIVClientStructs.FFXIV.Client.Game.Group.GroupManager* GroupManagerStruct => (FFXIVClientStructs.FFXIV.Client.Game.Group.GroupManager*)this.GroupManagerAddress; /// public IPartyMember? this[int index] @@ -82,45 +81,39 @@ internal sealed unsafe partial class PartyList : IServiceType, IPartyList } /// - public nint GetPartyMemberAddress(int index) + public IntPtr GetPartyMemberAddress(int index) { if (index < 0 || index >= GroupLength) - return 0; + return IntPtr.Zero; return this.GroupListAddress + (index * PartyMemberSize); } /// - public IPartyMember? CreatePartyMemberReference(nint address) + public IPartyMember? CreatePartyMemberReference(IntPtr address) { - if (this.playerState.ContentId == 0) + if (address == IntPtr.Zero || !this.playerState.IsLoaded) return null; - if (address == 0) - return null; - - return new PartyMember((CSPartyMember*)address); + return new PartyMember(address); } /// - public nint GetAllianceMemberAddress(int index) + public IntPtr GetAllianceMemberAddress(int index) { if (index < 0 || index >= AllianceLength) - return 0; + return IntPtr.Zero; return this.AllianceListAddress + (index * PartyMemberSize); } /// - public IPartyMember? CreateAllianceMemberReference(nint address) + public IPartyMember? CreateAllianceMemberReference(IntPtr address) { - if (this.playerState.ContentId == 0) + if (address == IntPtr.Zero || !this.playerState.IsLoaded) return null; - if (address == 0) - return null; - - return new PartyMember((CSPartyMember*)address); + return new PartyMember(address); } } @@ -135,43 +128,18 @@ internal sealed partial class PartyList /// public IEnumerator GetEnumerator() { - return new Enumerator(this); + // Normally using Length results in a recursion crash, however we know the party size via ptr. + for (var i = 0; i < this.Length; i++) + { + var member = this[i]; + + if (member == null) + break; + + yield return member; + } } /// IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); - - private struct Enumerator(PartyList partyList) : IEnumerator - { - private int index = -1; - - public IPartyMember Current { get; private set; } - - object IEnumerator.Current => this.Current; - - public bool MoveNext() - { - while (++this.index < partyList.Length) - { - var partyMember = partyList[this.index]; - if (partyMember != null) - { - this.Current = partyMember; - return true; - } - } - - this.Current = default; - return false; - } - - public void Reset() - { - this.index = -1; - } - - public void Dispose() - { - } - } } diff --git a/Dalamud/Game/ClientState/Party/PartyMember.cs b/Dalamud/Game/ClientState/Party/PartyMember.cs index 84e3f21c8..4c738d866 100644 --- a/Dalamud/Game/ClientState/Party/PartyMember.cs +++ b/Dalamud/Game/ClientState/Party/PartyMember.cs @@ -1,28 +1,26 @@ -using System.Diagnostics.CodeAnalysis; using System.Numerics; +using System.Runtime.CompilerServices; using Dalamud.Data; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Statuses; using Dalamud.Game.Text.SeStringHandling; -using Dalamud.Utility; +using Dalamud.Memory; using Lumina.Excel; -using CSPartyMember = FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember; - namespace Dalamud.Game.ClientState.Party; /// /// Interface representing a party member. /// -public interface IPartyMember : IEquatable +public interface IPartyMember { /// /// Gets the address of this party member in memory. /// - nint Address { get; } + IntPtr Address { get; } /// /// Gets a list of buffs or debuffs applied to this party member. @@ -110,82 +108,69 @@ public interface IPartyMember : IEquatable } /// -/// This struct represents a party member in the group manager. +/// This class represents a party member in the group manager. /// -/// A pointer to the PartyMember. -internal unsafe readonly struct PartyMember(CSPartyMember* ptr) : IPartyMember +internal unsafe class PartyMember : IPartyMember { - /// - public nint Address => (nint)ptr; + /// + /// Initializes a new instance of the class. + /// + /// Address of the party member. + internal PartyMember(IntPtr address) + { + this.Address = address; + } /// - public StatusList Statuses => new(&ptr->StatusManager); + public IntPtr Address { get; } /// - public Vector3 Position => ptr->Position; + public StatusList Statuses => new(&this.Struct->StatusManager); /// - [Api15ToDo("Change type to ulong.")] - public long ContentId => (long)ptr->ContentId; + public Vector3 Position => this.Struct->Position; /// - public uint ObjectId => ptr->EntityId; + public long ContentId => (long)this.Struct->ContentId; /// - public uint EntityId => ptr->EntityId; + public uint ObjectId => this.Struct->EntityId; + + /// + public uint EntityId => this.Struct->EntityId; /// public IGameObject? GameObject => Service.Get().SearchById(this.EntityId); /// - public uint CurrentHP => ptr->CurrentHP; + public uint CurrentHP => this.Struct->CurrentHP; /// - public uint MaxHP => ptr->MaxHP; + public uint MaxHP => this.Struct->MaxHP; /// - public ushort CurrentMP => ptr->CurrentMP; + public ushort CurrentMP => this.Struct->CurrentMP; /// - public ushort MaxMP => ptr->MaxMP; + public ushort MaxMP => this.Struct->MaxMP; /// - public RowRef Territory => LuminaUtils.CreateRef(ptr->TerritoryType); + public RowRef Territory => LuminaUtils.CreateRef(this.Struct->TerritoryType); /// - public RowRef World => LuminaUtils.CreateRef(ptr->HomeWorld); + public RowRef World => LuminaUtils.CreateRef(this.Struct->HomeWorld); /// - public SeString Name => SeString.Parse(ptr->Name); + public SeString Name => SeString.Parse(this.Struct->Name); /// - public byte Sex => ptr->Sex; + public byte Sex => this.Struct->Sex; /// - public RowRef ClassJob => LuminaUtils.CreateRef(ptr->ClassJob); + public RowRef ClassJob => LuminaUtils.CreateRef(this.Struct->ClassJob); /// - public byte Level => ptr->Level; + public byte Level => this.Struct->Level; - public static bool operator ==(PartyMember x, PartyMember y) => x.Equals(y); - - public static bool operator !=(PartyMember x, PartyMember y) => !(x == y); - - /// - public bool Equals(IPartyMember? other) - { - return this.EntityId == other.EntityId; - } - - /// - public override bool Equals([NotNullWhen(true)] object? obj) - { - return obj is PartyMember fate && this.Equals(fate); - } - - /// - public override int GetHashCode() - { - return this.EntityId.GetHashCode(); - } + private FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember*)this.Address; } diff --git a/Dalamud/Game/ClientState/Statuses/Status.cs b/Dalamud/Game/ClientState/Statuses/Status.cs index 160b15de5..2775f8f9b 100644 --- a/Dalamud/Game/ClientState/Statuses/Status.cs +++ b/Dalamud/Game/ClientState/Statuses/Status.cs @@ -1,49 +1,61 @@ -using System.Diagnostics.CodeAnalysis; - using Dalamud.Data; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.Types; using Lumina.Excel; -using CSStatus = FFXIVClientStructs.FFXIV.Client.Game.Status; - namespace Dalamud.Game.ClientState.Statuses; /// -/// Interface representing a status. +/// This class represents a status effect an actor is afflicted by. /// -public interface IStatus : IEquatable +public unsafe class Status { + /// + /// Initializes a new instance of the class. + /// + /// Status address. + internal Status(IntPtr address) + { + this.Address = address; + } + /// /// Gets the address of the status in memory. /// - nint Address { get; } + public IntPtr Address { get; } /// /// Gets the status ID of this status. /// - uint StatusId { get; } + public uint StatusId => this.Struct->StatusId; /// /// Gets the GameData associated with this status. /// - RowRef GameData { get; } + public RowRef GameData => LuminaUtils.CreateRef(this.Struct->StatusId); /// /// Gets the parameter value of the status. /// - ushort Param { get; } + public ushort Param => this.Struct->Param; + + /// + /// Gets the stack count of this status. + /// Only valid if this is a non-food status. + /// + [Obsolete($"Replaced with {nameof(Param)}", true)] + public byte StackCount => (byte)this.Struct->Param; /// /// Gets the time remaining of this status. /// - float RemainingTime { get; } + public float RemainingTime => this.Struct->RemainingTime; /// /// Gets the source ID of this status. /// - uint SourceId { get; } + public uint SourceId => this.Struct->SourceObject.ObjectId; /// /// Gets the source actor associated with this status. @@ -51,55 +63,7 @@ public interface IStatus : IEquatable /// /// This iterates the actor table, it should be used with care. /// - IGameObject? SourceObject { get; } -} - -/// -/// This struct represents a status effect an actor is afflicted by. -/// -/// A pointer to the Status. -internal unsafe readonly struct Status(CSStatus* ptr) : IStatus -{ - /// - public nint Address => (nint)ptr; - - /// - public uint StatusId => ptr->StatusId; - - /// - public RowRef GameData => LuminaUtils.CreateRef(ptr->StatusId); - - /// - public ushort Param => ptr->Param; - - /// - public float RemainingTime => ptr->RemainingTime; - - /// - public uint SourceId => ptr->SourceObject.ObjectId; - - /// public IGameObject? SourceObject => Service.Get().SearchById(this.SourceId); - public static bool operator ==(Status x, Status y) => x.Equals(y); - - public static bool operator !=(Status x, Status y) => !(x == y); - - /// - public bool Equals(IStatus? other) - { - return this.StatusId == other.StatusId && this.SourceId == other.SourceId && this.Param == other.Param && this.RemainingTime == other.RemainingTime; - } - - /// - public override bool Equals([NotNullWhen(true)] object? obj) - { - return obj is Status fate && this.Equals(fate); - } - - /// - public override int GetHashCode() - { - return HashCode.Combine(this.StatusId, this.SourceId, this.Param, this.RemainingTime); - } + private FFXIVClientStructs.FFXIV.Client.Game.Status* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Status*)this.Address; } diff --git a/Dalamud/Game/ClientState/Statuses/StatusList.cs b/Dalamud/Game/ClientState/Statuses/StatusList.cs index 43650a48c..410ae9d7c 100644 --- a/Dalamud/Game/ClientState/Statuses/StatusList.cs +++ b/Dalamud/Game/ClientState/Statuses/StatusList.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using CSStatus = FFXIVClientStructs.FFXIV.Client.Game.Status; +using Dalamud.Game.Player; namespace Dalamud.Game.ClientState.Statuses; @@ -16,7 +16,7 @@ public sealed unsafe partial class StatusList /// Initializes a new instance of the class. /// /// Address of the status list. - internal StatusList(nint address) + internal StatusList(IntPtr address) { this.Address = address; } @@ -26,14 +26,14 @@ public sealed unsafe partial class StatusList /// /// Pointer to the status list. internal unsafe StatusList(void* pointer) - : this((nint)pointer) + : this((IntPtr)pointer) { } /// /// Gets the address of the status list in memory. /// - public nint Address { get; } + public IntPtr Address { get; } /// /// Gets the amount of status effect slots the actor has. @@ -49,7 +49,7 @@ public sealed unsafe partial class StatusList /// /// Status Index. /// The status at the specified index. - public IStatus? this[int index] + public Status? this[int index] { get { @@ -66,7 +66,7 @@ public sealed unsafe partial class StatusList /// /// The address of the status list in memory. /// The status object containing the requested data. - public static StatusList? CreateStatusListReference(nint address) + public static StatusList? CreateStatusListReference(IntPtr address) { if (address == IntPtr.Zero) return null; @@ -74,12 +74,8 @@ public sealed unsafe partial class StatusList // The use case for CreateStatusListReference and CreateStatusReference to be static is so // fake status lists can be generated. Since they aren't exposed as services, it's either // here or somewhere else. - var clientState = Service.Get(); - - if (clientState.LocalContentId == 0) - return null; - - if (address == 0) + var playerState = Service.Get(); + if (!playerState.IsLoaded) return null; return new StatusList(address); @@ -90,15 +86,16 @@ public sealed unsafe partial class StatusList /// /// The address of the status effect in memory. /// The status object containing the requested data. - public static IStatus? CreateStatusReference(nint address) + public static Status? CreateStatusReference(IntPtr address) { if (address == IntPtr.Zero) return null; - if (address == 0) + var playerState = Service.Get(); + if (!playerState.IsLoaded) return null; - return new Status((CSStatus*)address); + return new Status(address); } /// @@ -106,22 +103,22 @@ public sealed unsafe partial class StatusList /// /// The index of the status. /// The memory address of the status. - public nint GetStatusAddress(int index) + public IntPtr GetStatusAddress(int index) { if (index < 0 || index >= this.Length) - return 0; + return IntPtr.Zero; - return (nint)Unsafe.AsPointer(ref this.Struct->Status[index]); + return (IntPtr)Unsafe.AsPointer(ref this.Struct->Status[index]); } } /// /// This collection represents the status effects an actor is afflicted by. /// -public sealed partial class StatusList : IReadOnlyCollection, ICollection +public sealed partial class StatusList : IReadOnlyCollection, ICollection { /// - int IReadOnlyCollection.Count => this.Length; + int IReadOnlyCollection.Count => this.Length; /// int ICollection.Count => this.Length; @@ -133,9 +130,17 @@ public sealed partial class StatusList : IReadOnlyCollection, ICollecti object ICollection.SyncRoot => this; /// - public IEnumerator GetEnumerator() + public IEnumerator GetEnumerator() { - return new Enumerator(this); + for (var i = 0; i < this.Length; i++) + { + var status = this[i]; + + if (status == null || status.StatusId == 0) + continue; + + yield return status; + } } /// @@ -150,38 +155,4 @@ public sealed partial class StatusList : IReadOnlyCollection, ICollecti index++; } } - - private struct Enumerator(StatusList statusList) : IEnumerator - { - private int index = -1; - - public IStatus Current { get; private set; } - - object IEnumerator.Current => this.Current; - - public bool MoveNext() - { - while (++this.index < statusList.Length) - { - var status = statusList[this.index]; - if (status != null && status.StatusId != 0) - { - this.Current = status; - return true; - } - } - - this.Current = default; - return false; - } - - public void Reset() - { - this.index = -1; - } - - public void Dispose() - { - } - } } diff --git a/Dalamud/Game/ClientState/Structs/StatusEffect.cs b/Dalamud/Game/ClientState/Structs/StatusEffect.cs new file mode 100644 index 000000000..2a60a7d3b --- /dev/null +++ b/Dalamud/Game/ClientState/Structs/StatusEffect.cs @@ -0,0 +1,35 @@ +using System.Runtime.InteropServices; + +namespace Dalamud.Game.ClientState.Structs; + +/// +/// Native memory representation of a FFXIV status effect. +/// +[StructLayout(LayoutKind.Sequential)] +public struct StatusEffect +{ + /// + /// The effect ID. + /// + public short EffectId; + + /// + /// How many stacks are present. + /// + public byte StackCount; + + /// + /// Additional parameters. + /// + public byte Param; + + /// + /// The duration remaining. + /// + public float Duration; + + /// + /// The ID of the actor that caused this effect. + /// + public int OwnerId; +} diff --git a/Dalamud/Game/ClientState/ZoneInit.cs b/Dalamud/Game/ClientState/ZoneInit.cs index 7eb4576aa..5c2213c90 100644 --- a/Dalamud/Game/ClientState/ZoneInit.cs +++ b/Dalamud/Game/ClientState/ZoneInit.cs @@ -59,7 +59,7 @@ public class ZoneInitEventArgs : EventArgs eventArgs.ContentFinderCondition = dataManager.GetExcelSheet().GetRow(*(ushort*)(packet + 0x06)); eventArgs.Weather = dataManager.GetExcelSheet().GetRow(*(byte*)(packet + 0x10)); - const int NumFestivals = 8; + const int NumFestivals = 4; eventArgs.ActiveFestivals = new Festival[NumFestivals]; eventArgs.ActiveFestivalPhases = new ushort[NumFestivals]; @@ -67,7 +67,7 @@ public class ZoneInitEventArgs : EventArgs // but it's unclear why they exist as separate entries and why they would be different. for (var i = 0; i < NumFestivals; i++) { - eventArgs.ActiveFestivals[i] = dataManager.GetExcelSheet().GetRow(*(ushort*)(packet + 0x26 + (i * 2))); + eventArgs.ActiveFestivals[i] = dataManager.GetExcelSheet().GetRow(*(ushort*)(packet + 0x2E + (i * 2))); eventArgs.ActiveFestivalPhases[i] = *(ushort*)(packet + 0x36 + (i * 2)); } diff --git a/Dalamud/Game/Config/GameConfigAddressResolver.cs b/Dalamud/Game/Config/GameConfigAddressResolver.cs index e03f4f40b..2491c4033 100644 --- a/Dalamud/Game/Config/GameConfigAddressResolver.cs +++ b/Dalamud/Game/Config/GameConfigAddressResolver.cs @@ -1,6 +1,4 @@ -using Dalamud.Plugin.Services; - -namespace Dalamud.Game.Config; +namespace Dalamud.Game.Config; /// /// Game config system address resolver. diff --git a/Dalamud/Game/Config/UiConfigOption.cs b/Dalamud/Game/Config/UiConfigOption.cs index 0cfc3b1e9..f6a9aaa21 100644 --- a/Dalamud/Game/Config/UiConfigOption.cs +++ b/Dalamud/Game/Config/UiConfigOption.cs @@ -4069,13 +4069,6 @@ public enum UiConfigOption [GameConfigOption("GposePortraitRotateType", ConfigType.UInt)] GposePortraitRotateType, - /// - /// UiConfig option with the internal name GroupPosePortraitUnlockAspectLimit. - /// This option is a UInt. - /// - [GameConfigOption("GroupPosePortraitUnlockAspectLimit", ConfigType.UInt)] - GroupPosePortraitUnlockAspectLimit, - /// /// UiConfig option with the internal name LsListSortPriority. /// This option is a UInt. diff --git a/Dalamud/Game/DutyState/DutyStateAddressResolver.cs b/Dalamud/Game/DutyState/DutyStateAddressResolver.cs index 480b699a0..1bca93efb 100644 --- a/Dalamud/Game/DutyState/DutyStateAddressResolver.cs +++ b/Dalamud/Game/DutyState/DutyStateAddressResolver.cs @@ -1,5 +1,3 @@ -using Dalamud.Plugin.Services; - namespace Dalamud.Game.DutyState; /// diff --git a/Dalamud/Game/Gui/ChatGui.cs b/Dalamud/Game/Gui/ChatGui.cs index 30e2b676c..d7303c4ce 100644 --- a/Dalamud/Game/Gui/ChatGui.cs +++ b/Dalamud/Game/Gui/ChatGui.cs @@ -26,6 +26,7 @@ using Lumina.Text; using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; +using LSeStringBuilder = Lumina.Text.SeStringBuilder; using SeString = Dalamud.Game.Text.SeStringHandling.SeString; using SeStringBuilder = Dalamud.Game.Text.SeStringHandling.SeStringBuilder; @@ -206,21 +207,21 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui if (this.chatQueue.Count == 0) return; - using var rssb = new RentedSeStringBuilder(); + var sb = LSeStringBuilder.SharedPool.Get(); Span namebuf = stackalloc byte[256]; using var sender = new Utf8String(); using var message = new Utf8String(); while (this.chatQueue.TryDequeue(out var chat)) { - rssb.Builder.Clear(); + sb.Clear(); foreach (var c in UtfEnumerator.From(chat.MessageBytes, UtfEnumeratorFlags.Utf8SeString)) { if (c.IsSeStringPayload) - rssb.Builder.Append((ReadOnlySeStringSpan)chat.MessageBytes.AsSpan(c.ByteOffset, c.ByteLength)); + sb.Append((ReadOnlySeStringSpan)chat.MessageBytes.AsSpan(c.ByteOffset, c.ByteLength)); else if (c.Value.IntValue == 0x202F) - rssb.Builder.BeginMacro(MacroCode.NonBreakingSpace).EndMacro(); + sb.BeginMacro(MacroCode.NonBreakingSpace).EndMacro(); else - rssb.Builder.Append(c); + sb.Append(c); } if (chat.NameBytes.Length + 1 < namebuf.Length) @@ -234,7 +235,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui sender.SetString(chat.NameBytes.NullTerminate()); } - message.SetString(rssb.Builder.GetViewAsSpan()); + message.SetString(sb.GetViewAsSpan()); var targetChannel = chat.Type ?? this.configuration.GeneralChatType; @@ -246,6 +247,8 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui chat.Timestamp, (byte)(chat.Silent ? 1 : 0)); } + + LSeStringBuilder.SharedPool.Return(sb); } /// @@ -323,28 +326,29 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui private void PrintTagged(ReadOnlySpan message, XivChatType channel, string? tag, ushort? color) { - using var rssb = new RentedSeStringBuilder(); + var sb = LSeStringBuilder.SharedPool.Get(); if (!tag.IsNullOrEmpty()) { if (color is not null) { - rssb.Builder - .PushColorType(color.Value) - .Append($"[{tag}] ") - .PopColorType(); + sb.PushColorType(color.Value); + sb.Append($"[{tag}] "); + sb.PopColorType(); } else { - rssb.Builder.Append($"[{tag}] "); + sb.Append($"[{tag}] "); } } this.Print(new XivChatEntry { - MessageBytes = rssb.Builder.Append((ReadOnlySeStringSpan)message).ToArray(), + MessageBytes = sb.Append((ReadOnlySeStringSpan)message).ToArray(), Type = channel, }); + + LSeStringBuilder.SharedPool.Return(sb); } private void InventoryItemCopyDetour(InventoryItem* thisPtr, InventoryItem* otherPtr) @@ -453,8 +457,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui Log.Verbose($"InteractableLinkClicked: {Payload.EmbeddedInfoType.DalamudLink}"); - using var rssb = new RentedSeStringBuilder(); - + var sb = LSeStringBuilder.SharedPool.Get(); try { var seStringSpan = new ReadOnlySeStringSpan(linkData->Payload); @@ -462,7 +465,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui // read until link terminator foreach (var payload in seStringSpan) { - rssb.Builder.Append(payload); + sb.Append(payload); if (payload.Type == ReadOnlySePayloadType.Macro && payload.MacroCode == MacroCode.Link && @@ -474,7 +477,7 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui } } - var seStr = SeString.Parse(rssb.Builder.ToArray()); + var seStr = SeString.Parse(sb.ToArray()); if (seStr.Payloads.Count == 0 || seStr.Payloads[0] is not DalamudLinkPayload link) return; @@ -492,6 +495,10 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui { Log.Error(ex, "Exception in HandleLinkClickDetour"); } + finally + { + LSeStringBuilder.SharedPool.Return(sb); + } } } diff --git a/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs b/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs index aada374ec..7512f4160 100644 --- a/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs +++ b/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs @@ -31,7 +31,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM private static readonly ModuleLog Log = new("ContextMenu"); private readonly Hook atkModuleVf22OpenAddonByAgentHook; - private readonly Hook addonContextMenuOnMenuSelectedHook; + private readonly Hook addonContextMenuOnMenuSelectedHook; private uint? addonContextSubNameId; @@ -40,7 +40,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM { var raptureAtkModuleVtable = (nint*)RaptureAtkModule.StaticVirtualTablePointer; this.atkModuleVf22OpenAddonByAgentHook = Hook.FromAddress(raptureAtkModuleVtable[22], this.AtkModuleVf22OpenAddonByAgentDetour); - this.addonContextMenuOnMenuSelectedHook = Hook.FromAddress((nint)AddonContextMenu.StaticVirtualTablePointer->OnMenuSelected, this.AddonContextMenuOnMenuSelectedDetour); + this.addonContextMenuOnMenuSelectedHook = Hook.FromAddress((nint)AddonContextMenu.StaticVirtualTablePointer->OnMenuSelected, this.AddonContextMenuOnMenuSelectedDetour); this.atkModuleVf22OpenAddonByAgentHook.Enable(); this.addonContextMenuOnMenuSelectedHook.Enable(); @@ -48,6 +48,10 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM private delegate ushort AtkModuleVf22OpenAddonByAgentDelegate(AtkModule* module, byte* addonName, int valueCount, AtkValue* values, AgentInterface* agent, nint a7, bool a8); + private delegate bool AddonContextMenuOnMenuSelectedDelegate(AddonContextMenu* addon, int selectedIdx, byte a3); + + private delegate ushort RaptureAtkModuleOpenAddonDelegate(RaptureAtkModule* a1, uint addonNameId, uint valueCount, AtkValue* values, AgentInterface* parentAgent, ulong unk, ushort parentAddonId, int unk2); + /// public event IContextMenu.OnMenuOpenedDelegate? OnMenuOpened; @@ -181,7 +185,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM values[0].ChangeType(ValueType.UInt); values[0].UInt = 0; values[1].ChangeType(ValueType.String); - values[1].SetManagedString(name.EncodeWithNullTerminator()); + values[1].SetManagedString(name.Encode().NullTerminate()); values[2].ChangeType(ValueType.Int); values[2].Int = x; values[3].ChangeType(ValueType.Int); @@ -261,7 +265,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM submenuMask |= 1u << i; nameData[i].ChangeType(ValueType.String); - nameData[i].SetManagedString(this.GetPrefixedName(item).EncodeWithNullTerminator()); + nameData[i].SetManagedString(this.GetPrefixedName(item).Encode().NullTerminate()); } for (var i = 0; i < prefixMenuSize; ++i) @@ -291,9 +295,8 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM // 2: UInt = Return Mask (?) // 3: UInt = Submenu Mask // 4: UInt = OpenAtCursorPosition ? 2 : 1 - // 5: UInt = ? - // 6: UInt = ? - // 7: UInt = ? + // 5: UInt = 0 + // 6: UInt = 0 foreach (var item in items) { @@ -309,7 +312,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM } } - this.SetupGenericMenu(8, 0, 2, 3, items, ref valueCount, ref values); + this.SetupGenericMenu(7, 0, 2, 3, items, ref valueCount, ref values); } private void SetupContextSubMenu(IReadOnlyList items, ref int valueCount, ref AtkValue* values) diff --git a/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs b/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs index 138484580..f5b7011fe 100644 --- a/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs +++ b/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs @@ -150,7 +150,7 @@ internal sealed unsafe class DtrBarEntry : IDisposable, IDtrBarEntry } /// - [Api15ToDo("Maybe make this config scoped to internal name?")] + [Api13ToDo("Maybe make this config scoped to internal name?")] public bool UserHidden => this.configuration.DtrIgnore?.Contains(this.Title) ?? false; /// diff --git a/Dalamud/Game/Gui/FlyText/FlyTextKind.cs b/Dalamud/Game/Gui/FlyText/FlyTextKind.cs index da448c683..2b8325927 100644 --- a/Dalamud/Game/Gui/FlyText/FlyTextKind.cs +++ b/Dalamud/Game/Gui/FlyText/FlyTextKind.cs @@ -92,16 +92,34 @@ public enum FlyTextKind : int /// IslandExp = 15, + /// + /// Val1 in serif font next to all caps condensed font Text1 with Text2 in sans-serif as subtitle. + /// + [Obsolete("Use Dataset instead", true)] + Unknown16 = 16, + /// /// Val1 in serif font next to all caps condensed font Text1 with Text2 in sans-serif as subtitle. /// Dataset = 16, + /// + /// Val1 in serif font, Text2 in sans-serif as subtitle. + /// + [Obsolete("Use Knowledge instead", true)] + Unknown17 = 17, + /// /// Val1 in serif font, Text2 in sans-serif as subtitle. /// Knowledge = 17, + /// + /// Val1 in serif font, Text2 in sans-serif as subtitle. + /// + [Obsolete("Use PhantomExp instead", true)] + Unknown18 = 18, + /// /// Val1 in serif font, Text2 in sans-serif as subtitle. /// diff --git a/Dalamud/Game/Gui/GameGuiAddressResolver.cs b/Dalamud/Game/Gui/GameGuiAddressResolver.cs index 1295e2047..92b89c5a9 100644 --- a/Dalamud/Game/Gui/GameGuiAddressResolver.cs +++ b/Dalamud/Game/Gui/GameGuiAddressResolver.cs @@ -1,5 +1,3 @@ -using Dalamud.Plugin.Services; - namespace Dalamud.Game.Gui; /// diff --git a/Dalamud/Game/Gui/HoverActionKind.cs b/Dalamud/Game/Gui/HoverActionKind.cs index b786f12ee..ef8fe6400 100644 --- a/Dalamud/Game/Gui/HoverActionKind.cs +++ b/Dalamud/Game/Gui/HoverActionKind.cs @@ -14,145 +14,140 @@ public enum HoverActionKind /// /// A regular action is hovered. /// - Action = 29, + Action = 28, /// /// A crafting action is hovered. /// - CraftingAction = 30, + CraftingAction = 29, /// /// A general action is hovered. /// - GeneralAction = 31, + GeneralAction = 30, /// /// A companion order type of action is hovered. /// - CompanionOrder = 32, // Game Term: BuddyOrder + CompanionOrder = 31, // Game Term: BuddyOrder /// /// A main command type of action is hovered. /// - MainCommand = 33, + MainCommand = 32, /// /// An extras command type of action is hovered. /// - ExtraCommand = 34, + ExtraCommand = 33, /// /// A companion action is hovered. /// - Companion = 35, + Companion = 34, /// /// A pet order type of action is hovered. /// - PetOrder = 36, + PetOrder = 35, /// /// A trait is hovered. /// - Trait = 37, + Trait = 36, /// /// A buddy action is hovered. /// - BuddyAction = 38, + BuddyAction = 37, /// /// A company action is hovered. /// - CompanyAction = 39, + CompanyAction = 38, /// /// A mount is hovered. /// - Mount = 40, + Mount = 39, /// /// A chocobo race action is hovered. /// - ChocoboRaceAction = 41, + ChocoboRaceAction = 40, /// /// A chocobo race item is hovered. /// - ChocoboRaceItem = 42, + ChocoboRaceItem = 41, /// /// A deep dungeon equipment is hovered. /// - DeepDungeonEquipment = 43, + DeepDungeonEquipment = 42, /// /// A deep dungeon equipment 2 is hovered. /// - DeepDungeonEquipment2 = 44, + DeepDungeonEquipment2 = 43, /// /// A deep dungeon item is hovered. /// - DeepDungeonItem = 45, + DeepDungeonItem = 44, /// /// A quick chat is hovered. /// - QuickChat = 46, + QuickChat = 45, /// /// An action combo route is hovered. /// - ActionComboRoute = 47, + ActionComboRoute = 46, /// /// A pvp trait is hovered. /// - PvPSelectTrait = 48, + PvPSelectTrait = 47, /// /// A squadron action is hovered. /// - BgcArmyAction = 49, + BgcArmyAction = 48, /// /// A perform action is hovered. /// - Perform = 50, + Perform = 49, /// /// A deep dungeon magic stone is hovered. /// - DeepDungeonMagicStone = 51, + DeepDungeonMagicStone = 50, /// /// A deep dungeon demiclone is hovered. /// - DeepDungeonDemiclone = 52, + DeepDungeonDemiclone = 51, /// /// An eureka magia action is hovered. /// - EurekaMagiaAction = 53, + EurekaMagiaAction = 52, /// /// An island sanctuary temporary item is hovered. /// - MYCTemporaryItem = 54, + MYCTemporaryItem = 53, /// /// An ornament is hovered. /// - Ornament = 55, + Ornament = 54, /// /// Glasses are hovered. /// - Glasses = 56, - - /// - /// Phantom Job Trait is hovered. - /// - MKDTrait = 58, + Glasses = 55, } diff --git a/Dalamud/Game/Gui/NamePlate/NamePlateGuiAddressResolver.cs b/Dalamud/Game/Gui/NamePlate/NamePlateGuiAddressResolver.cs index f97450c28..450e1fa9f 100644 --- a/Dalamud/Game/Gui/NamePlate/NamePlateGuiAddressResolver.cs +++ b/Dalamud/Game/Gui/NamePlate/NamePlateGuiAddressResolver.cs @@ -1,5 +1,3 @@ -using Dalamud.Plugin.Services; - namespace Dalamud.Game.Gui.NamePlate; /// diff --git a/Dalamud/Game/Internal/DalamudCompletion.cs b/Dalamud/Game/Internal/DalamudCompletion.cs index 50816a603..e3564c823 100644 --- a/Dalamud/Game/Internal/DalamudCompletion.cs +++ b/Dalamud/Game/Internal/DalamudCompletion.cs @@ -11,6 +11,8 @@ using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Component.Completion; using FFXIVClientStructs.FFXIV.Component.GUI; +using Lumina.Text; + namespace Dalamud.Game.Internal; /// @@ -251,14 +253,16 @@ internal sealed unsafe class DalamudCompletion : IInternalDisposableService { public EntryStrings(string command) { - using var rssb = new RentedSeStringBuilder(); + var rssb = SeStringBuilder.SharedPool.Get(); - this.Display = Utf8String.FromSequence(rssb.Builder + this.Display = Utf8String.FromSequence(rssb .PushColorType(539) .Append(command) .PopColorType() .GetViewAsSpan()); + SeStringBuilder.SharedPool.Return(rssb); + this.Match = Utf8String.FromString(command); } diff --git a/Dalamud/Game/Inventory/GameInventory.cs b/Dalamud/Game/Inventory/GameInventory.cs index 5390c2707..535b84372 100644 --- a/Dalamud/Game/Inventory/GameInventory.cs +++ b/Dalamud/Game/Inventory/GameInventory.cs @@ -305,8 +305,7 @@ internal class GameInventory : IInternalDisposableService private GameInventoryItem[] CreateItemsArray(int length) { var items = new GameInventoryItem[length]; - foreach (ref var item in items.AsSpan()) - item = new(); + items.Initialize(); return items; } diff --git a/Dalamud/Game/Network/GameNetworkAddressResolver.cs b/Dalamud/Game/Network/GameNetworkAddressResolver.cs index 48abc2d97..de92f7c10 100644 --- a/Dalamud/Game/Network/GameNetworkAddressResolver.cs +++ b/Dalamud/Game/Network/GameNetworkAddressResolver.cs @@ -1,5 +1,3 @@ -using Dalamud.Plugin.Services; - namespace Dalamud.Game.Network; /// diff --git a/Dalamud/Game/Network/Internal/NetworkHandlersAddressResolver.cs b/Dalamud/Game/Network/Internal/NetworkHandlersAddressResolver.cs index 34c071556..9cd46f798 100644 --- a/Dalamud/Game/Network/Internal/NetworkHandlersAddressResolver.cs +++ b/Dalamud/Game/Network/Internal/NetworkHandlersAddressResolver.cs @@ -1,6 +1,4 @@ -using Dalamud.Plugin.Services; - -namespace Dalamud.Game.Network.Internal; +namespace Dalamud.Game.Network.Internal; /// /// Internal address resolver for the network handlers. diff --git a/Dalamud/Game/SigScanner.cs b/Dalamud/Game/SigScanner.cs index 262e98fa5..c8a371aee 100644 --- a/Dalamud/Game/SigScanner.cs +++ b/Dalamud/Game/SigScanner.cs @@ -8,8 +8,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; -using Dalamud.Plugin.Services; - using Iced.Intel; using Newtonsoft.Json; using Serilog; diff --git a/Dalamud/Game/TargetSigScanner.cs b/Dalamud/Game/TargetSigScanner.cs index 540d0ea47..f60c32d9a 100644 --- a/Dalamud/Game/TargetSigScanner.cs +++ b/Dalamud/Game/TargetSigScanner.cs @@ -1,9 +1,8 @@ -using System.Diagnostics; +using System.Diagnostics; using System.IO; using Dalamud.IoC; using Dalamud.IoC.Internal; -using Dalamud.Plugin.Services; namespace Dalamud.Game; diff --git a/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs b/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs index f05c15263..58bcdbd0b 100644 --- a/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs +++ b/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs @@ -102,15 +102,16 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator // TODO: remove culture info toggling after supporting CultureInfo for SeStringBuilder.Append, // and then remove try...finally block (discard builder from the pool on exception) var previousCulture = CultureInfo.CurrentCulture; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); try { CultureInfo.CurrentCulture = Localization.GetCultureInfoFromLangCode(lang.ToCode()); - return this.EvaluateAndAppendTo(rssb.Builder, str, localParameters, lang).ToReadOnlySeString(); + return this.EvaluateAndAppendTo(builder, str, localParameters, lang).ToReadOnlySeString(); } finally { CultureInfo.CurrentCulture = previousCulture; + SeStringBuilder.SharedPool.Return(builder); } } @@ -929,8 +930,7 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator itemId += 1000000; } - using var rssb = new RentedSeStringBuilder(); - var sb = rssb.Builder; + var sb = SeStringBuilder.SharedPool.Get(); sb.Append(this.EvaluateFromAddon(6, [rarity], context.Language)); @@ -956,6 +956,7 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator sb.PopLink(); text = sb.ToReadOnlySeString(); + SeStringBuilder.SharedPool.Return(sb); } private void CreateSheetLink(in SeStringContext context, string resolvedSheetName, ReadOnlySeString text, uint eRowIdValue, uint eColParamValue) @@ -1027,33 +1028,40 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!payload.TryGetExpression(out var eStr)) return false; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - var headContext = new SeStringContext(rssb.Builder, context.LocalParameters, context.Language); - - if (!this.ResolveStringExpression(headContext, eStr)) - return false; - - var str = rssb.Builder.ToReadOnlySeString(); - var pIdx = 0; - - foreach (var p in str) + try { - pIdx++; + var headContext = new SeStringContext(builder, context.LocalParameters, context.Language); - if (p.Type == ReadOnlySePayloadType.Invalid) - continue; + if (!this.ResolveStringExpression(headContext, eStr)) + return false; - if (pIdx == 1 && p.Type == ReadOnlySePayloadType.Text) + var str = builder.ToReadOnlySeString(); + var pIdx = 0; + + foreach (var p in str) { - context.Builder.Append(Encoding.UTF8.GetString(p.Body.ToArray()).ToUpper(context.CultureInfo)); - continue; + pIdx++; + + if (p.Type == ReadOnlySePayloadType.Invalid) + continue; + + if (pIdx == 1 && p.Type == ReadOnlySePayloadType.Text) + { + context.Builder.Append(Encoding.UTF8.GetString(p.Body.ToArray()).ToUpper(context.CultureInfo)); + continue; + } + + context.Builder.Append(p); } - context.Builder.Append(p); + return true; + } + finally + { + SeStringBuilder.SharedPool.Return(builder); } - - return true; } private bool TryResolveHead(in SeStringContext context, in ReadOnlySePayloadSpan payload) @@ -1061,33 +1069,40 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!payload.TryGetExpression(out var eStr)) return false; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - var headContext = new SeStringContext(rssb.Builder, context.LocalParameters, context.Language); - - if (!this.ResolveStringExpression(headContext, eStr)) - return false; - - var str = rssb.Builder.ToReadOnlySeString(); - var pIdx = 0; - - foreach (var p in str) + try { - pIdx++; + var headContext = new SeStringContext(builder, context.LocalParameters, context.Language); - if (p.Type == ReadOnlySePayloadType.Invalid) - continue; + if (!this.ResolveStringExpression(headContext, eStr)) + return false; - if (pIdx == 1 && p.Type == ReadOnlySePayloadType.Text) + var str = builder.ToReadOnlySeString(); + var pIdx = 0; + + foreach (var p in str) { - context.Builder.Append(Encoding.UTF8.GetString(p.Body.Span).FirstCharToUpper(context.CultureInfo)); - continue; + pIdx++; + + if (p.Type == ReadOnlySePayloadType.Invalid) + continue; + + if (pIdx == 1 && p.Type == ReadOnlySePayloadType.Text) + { + context.Builder.Append(Encoding.UTF8.GetString(p.Body.Span).FirstCharToUpper(context.CultureInfo)); + continue; + } + + context.Builder.Append(p); } - context.Builder.Append(p); + return true; + } + finally + { + SeStringBuilder.SharedPool.Return(builder); } - - return true; } private bool TryResolveSplit(in SeStringContext context, in ReadOnlySePayloadSpan payload) @@ -1098,25 +1113,32 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!eSeparator.TryGetString(out var eSeparatorVal) || !eIndex.TryGetUInt(out var eIndexVal) || eIndexVal <= 0) return false; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - var headContext = new SeStringContext(rssb.Builder, context.LocalParameters, context.Language); - - if (!this.ResolveStringExpression(headContext, eText)) - return false; - - var separator = eSeparatorVal.ExtractText(); - if (separator.Length < 1) - return false; - - var splitted = rssb.Builder.ToReadOnlySeString().ExtractText().Split(separator[0]); - if (eIndexVal <= splitted.Length) + try { - context.Builder.Append(splitted[eIndexVal - 1]); - return true; - } + var headContext = new SeStringContext(builder, context.LocalParameters, context.Language); - return false; + if (!this.ResolveStringExpression(headContext, eText)) + return false; + + var separator = eSeparatorVal.ExtractText(); + if (separator.Length < 1) + return false; + + var splitted = builder.ToReadOnlySeString().ExtractText().Split(separator[0]); + if (eIndexVal <= splitted.Length) + { + context.Builder.Append(splitted[eIndexVal - 1]); + return true; + } + + return false; + } + finally + { + SeStringBuilder.SharedPool.Return(builder); + } } private bool TryResolveHeadAll(in SeStringContext context, in ReadOnlySePayloadSpan payload) @@ -1124,30 +1146,37 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!payload.TryGetExpression(out var eStr)) return false; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - var headContext = new SeStringContext(rssb.Builder, context.LocalParameters, context.Language); - - if (!this.ResolveStringExpression(headContext, eStr)) - return false; - - var str = rssb.Builder.ToReadOnlySeString(); - - foreach (var p in str) + try { - if (p.Type == ReadOnlySePayloadType.Invalid) - continue; + var headContext = new SeStringContext(builder, context.LocalParameters, context.Language); - if (p.Type == ReadOnlySePayloadType.Text) + if (!this.ResolveStringExpression(headContext, eStr)) + return false; + + var str = builder.ToReadOnlySeString(); + + foreach (var p in str) { - context.Builder.Append(Encoding.UTF8.GetString(p.Body.Span).ToUpper(true, true, false, context.Language)); - continue; + if (p.Type == ReadOnlySePayloadType.Invalid) + continue; + + if (p.Type == ReadOnlySePayloadType.Text) + { + context.Builder.Append(Encoding.UTF8.GetString(p.Body.Span).ToUpper(true, true, false, context.Language)); + continue; + } + + context.Builder.Append(p); } - context.Builder.Append(p); + return true; + } + finally + { + SeStringBuilder.SharedPool.Return(builder); } - - return true; } private bool TryResolveFixed(in SeStringContext context, in ReadOnlySePayloadSpan payload) @@ -1277,13 +1306,14 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!this.dataManager.GetExcelSheet().TryGetRow(mapId, out var mapRow)) return false; - using var rssb = new RentedSeStringBuilder(); + var sb = SeStringBuilder.SharedPool.Get(); - rssb.Builder.Append(placeNameRow.Name); + sb.Append(placeNameRow.Name); if (instance is > 0 and <= 9) - rssb.Builder.Append((char)((char)0xE0B0 + (char)instance)); + sb.Append((char)((char)0xE0B0 + (char)instance)); - var placeNameWithInstance = rssb.Builder.ToReadOnlySeString(); + var placeNameWithInstance = sb.ToReadOnlySeString(); + SeStringBuilder.SharedPool.Return(sb); var mapPosX = ConvertRawToMapPosX(mapRow, rawX / 1000f); var mapPosY = ConvertRawToMapPosY(mapRow, rawY / 1000f); @@ -1432,22 +1462,23 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator statusDescription = statusRow.Description.AsSpan(); } - using var rssb = new RentedSeStringBuilder(); + var sb = SeStringBuilder.SharedPool.Get(); switch (statusRow.StatusCategory) { case 1: - rssb.Builder.Append(this.EvaluateFromAddon(376, default, context.Language)); + sb.Append(this.EvaluateFromAddon(376, default, context.Language)); break; case 2: - rssb.Builder.Append(this.EvaluateFromAddon(377, default, context.Language)); + sb.Append(this.EvaluateFromAddon(377, default, context.Language)); break; } - rssb.Builder.Append(statusName); + sb.Append(statusName); - var linkText = rssb.Builder.ToReadOnlySeString(); + var linkText = sb.ToReadOnlySeString(); + SeStringBuilder.SharedPool.Return(sb); context.Builder .BeginMacro(MacroCode.Link) @@ -1702,31 +1733,38 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!payload.TryGetExpression(out var eStr)) return false; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - var headContext = new SeStringContext(rssb.Builder, context.LocalParameters, context.Language); - - if (!this.ResolveStringExpression(headContext, eStr)) - return false; - - var str = rssb.Builder.ToReadOnlySeString(); - - foreach (var p in str) + try { - if (p.Type == ReadOnlySePayloadType.Invalid) - continue; + var headContext = new SeStringContext(builder, context.LocalParameters, context.Language); - if (p.Type == ReadOnlySePayloadType.Text) + if (!this.ResolveStringExpression(headContext, eStr)) + return false; + + var str = builder.ToReadOnlySeString(); + + foreach (var p in str) { - context.Builder.Append(Encoding.UTF8.GetString(p.Body.ToArray()).ToLower(context.CultureInfo)); + if (p.Type == ReadOnlySePayloadType.Invalid) + continue; - continue; + if (p.Type == ReadOnlySePayloadType.Text) + { + context.Builder.Append(Encoding.UTF8.GetString(p.Body.ToArray()).ToLower(context.CultureInfo)); + + continue; + } + + context.Builder.Append(p); } - context.Builder.Append(p); + return true; + } + finally + { + SeStringBuilder.SharedPool.Return(builder); } - - return true; } private bool TryResolveNoun(ClientLanguage language, in SeStringContext context, in ReadOnlySePayloadSpan payload) @@ -1796,33 +1834,40 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (!payload.TryGetExpression(out var eStr)) return false; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - var headContext = new SeStringContext(rssb.Builder, context.LocalParameters, context.Language); - - if (!this.ResolveStringExpression(headContext, eStr)) - return false; - - var str = rssb.Builder.ToReadOnlySeString(); - var pIdx = 0; - - foreach (var p in str) + try { - pIdx++; + var headContext = new SeStringContext(builder, context.LocalParameters, context.Language); - if (p.Type == ReadOnlySePayloadType.Invalid) - continue; + if (!this.ResolveStringExpression(headContext, eStr)) + return false; - if (pIdx == 1 && p.Type == ReadOnlySePayloadType.Text) + var str = builder.ToReadOnlySeString(); + var pIdx = 0; + + foreach (var p in str) { - context.Builder.Append(Encoding.UTF8.GetString(p.Body.Span).FirstCharToLower(context.CultureInfo)); - continue; + pIdx++; + + if (p.Type == ReadOnlySePayloadType.Invalid) + continue; + + if (pIdx == 1 && p.Type == ReadOnlySePayloadType.Text) + { + context.Builder.Append(Encoding.UTF8.GetString(p.Body.Span).FirstCharToLower(context.CultureInfo)); + continue; + } + + context.Builder.Append(p); } - context.Builder.Append(p); + return true; + } + finally + { + SeStringBuilder.SharedPool.Return(builder); } - - return true; } private bool TryResolveColorType(in SeStringContext context, in ReadOnlySePayloadSpan payload) @@ -2087,19 +2132,19 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator if (operand1.TryGetString(out var strval1) && operand2.TryGetString(out var strval2)) { - using var rssb1 = new RentedSeStringBuilder(); - using var rssb2 = new RentedSeStringBuilder(); var resolvedStr1 = this.EvaluateAndAppendTo( - rssb1.Builder, + SeStringBuilder.SharedPool.Get(), strval1, context.LocalParameters, context.Language); var resolvedStr2 = this.EvaluateAndAppendTo( - rssb2.Builder, + SeStringBuilder.SharedPool.Get(), strval2, context.LocalParameters, context.Language); var equals = resolvedStr1.GetViewAsSpan().SequenceEqual(resolvedStr2.GetViewAsSpan()); + SeStringBuilder.SharedPool.Return(resolvedStr1); + SeStringBuilder.SharedPool.Return(resolvedStr2); if ((ExpressionType)exprType == ExpressionType.Equal) value = equals ? 1u : 0u; diff --git a/Dalamud/Game/Text/Evaluator/SeStringParameter.cs b/Dalamud/Game/Text/Evaluator/SeStringParameter.cs index 036d1c921..1c6dd96cb 100644 --- a/Dalamud/Game/Text/Evaluator/SeStringParameter.cs +++ b/Dalamud/Game/Text/Evaluator/SeStringParameter.cs @@ -3,6 +3,7 @@ using System.Globalization; using Lumina.Text.ReadOnly; using DSeString = Dalamud.Game.Text.SeStringHandling.SeString; +using LSeString = Lumina.Text.SeString; namespace Dalamud.Game.Text.Evaluator; @@ -70,6 +71,9 @@ public readonly struct SeStringParameter public static implicit operator SeStringParameter(ReadOnlySeStringSpan value) => new(new ReadOnlySeString(value)); + [Obsolete("Switch to using ReadOnlySeString instead of Lumina's SeString.", true)] + public static implicit operator SeStringParameter(LSeString value) => new(new ReadOnlySeString(value.RawData)); + public static implicit operator SeStringParameter(DSeString value) => new(new ReadOnlySeString(value.Encode())); public static implicit operator SeStringParameter(string value) => new(value); diff --git a/Dalamud/Game/Text/Noun/NounProcessor.cs b/Dalamud/Game/Text/Noun/NounProcessor.cs index 993d341df..18f8cd4a9 100644 --- a/Dalamud/Game/Text/Noun/NounProcessor.cs +++ b/Dalamud/Game/Text/Noun/NounProcessor.cs @@ -9,6 +9,7 @@ using Dalamud.Utility; using Lumina.Excel; using Lumina.Text.ReadOnly; +using LSeStringBuilder = Lumina.Text.SeStringBuilder; using LSheets = Lumina.Excel.Sheets; namespace Dalamud.Game.Text.Noun; @@ -146,28 +147,30 @@ internal class NounProcessor : IServiceType var attributiveSheet = this.dataManager.Excel.GetSheet(nounParams.Language.ToLumina(), nameof(LSheets.Attributive)); - using var rssb = new RentedSeStringBuilder(); + var builder = LSeStringBuilder.SharedPool.Get(); // Ko-So-A-Do var ksad = attributiveSheet.GetRow((uint)nounParams.ArticleType).ReadStringColumn(nounParams.Quantity > 1 ? 1 : 0); if (!ksad.IsEmpty) { - rssb.Builder.Append(ksad); + builder.Append(ksad); if (nounParams.Quantity > 1) { - rssb.Builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); } } if (!nounParams.LinkMarker.IsEmpty) - rssb.Builder.Append(nounParams.LinkMarker); + builder.Append(nounParams.LinkMarker); var text = row.ReadStringColumn(nounParams.ColumnOffset); if (!text.IsEmpty) - rssb.Builder.Append(text); + builder.Append(text); - return rssb.Builder.ToReadOnlySeString(); + var ross = builder.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(builder); + return ross; } /// @@ -197,7 +200,7 @@ internal class NounProcessor : IServiceType var attributiveSheet = this.dataManager.Excel.GetSheet(nounParams.Language.ToLumina(), nameof(LSheets.Attributive)); - using var rssb = new RentedSeStringBuilder(); + var builder = LSeStringBuilder.SharedPool.Get(); var isProperNounColumn = nounParams.ColumnOffset + ArticleColumnIdx; var isProperNoun = isProperNounColumn >= 0 ? row.ReadInt8Column(isProperNounColumn) : ~isProperNounColumn; @@ -213,19 +216,21 @@ internal class NounProcessor : IServiceType var article = attributiveSheet.GetRow((uint)nounParams.ArticleType) .ReadStringColumn(articleColumn + grammaticalNumberColumnOffset); if (!article.IsEmpty) - rssb.Builder.Append(article); + builder.Append(article); if (!nounParams.LinkMarker.IsEmpty) - rssb.Builder.Append(nounParams.LinkMarker); + builder.Append(nounParams.LinkMarker); } var text = row.ReadStringColumn(nounParams.ColumnOffset + (nounParams.Quantity == 1 ? SingularColumnIdx : PluralColumnIdx)); if (!text.IsEmpty) - rssb.Builder.Append(text); + builder.Append(text); - rssb.Builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); - return rssb.Builder.ToReadOnlySeString(); + var ross = builder.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(builder); + return ross; } /// @@ -257,13 +262,17 @@ internal class NounProcessor : IServiceType var attributiveSheet = this.dataManager.Excel.GetSheet(nounParams.Language.ToLumina(), nameof(LSheets.Attributive)); - using var rssb = new RentedSeStringBuilder(); + var builder = LSeStringBuilder.SharedPool.Get(); + ReadOnlySeString ross; if (nounParams.IsActionSheet) { - rssb.Builder.Append(row.ReadStringColumn(nounParams.GrammaticalCase)); - rssb.Builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); - return rssb.Builder.ToReadOnlySeString(); + builder.Append(row.ReadStringColumn(nounParams.GrammaticalCase)); + builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + + ross = builder.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(builder); + return ross; } var genderIndexColumn = nounParams.ColumnOffset + PronounColumnIdx; @@ -293,32 +302,35 @@ internal class NounProcessor : IServiceType var grammaticalGender = attributiveSheet.GetRow((uint)nounParams.ArticleType) .ReadStringColumn(caseColumnOffset + genderIndex); // Genus if (!grammaticalGender.IsEmpty) - rssb.Builder.Append(grammaticalGender); + builder.Append(grammaticalGender); } if (!nounParams.LinkMarker.IsEmpty) - rssb.Builder.Append(nounParams.LinkMarker); + builder.Append(nounParams.LinkMarker); - rssb.Builder.Append(text); + builder.Append(text); var plural = attributiveSheet.GetRow((uint)(caseRowOffset + 26)) .ReadStringColumn(caseColumnOffset + genderIndex); - if (rssb.Builder.ContainsText("[p]"u8)) - rssb.Builder.ReplaceText("[p]"u8, plural); + if (builder.ContainsText("[p]"u8)) + builder.ReplaceText("[p]"u8, plural); else - rssb.Builder.Append(plural); + builder.Append(plural); if (hasT) { var article = attributiveSheet.GetRow(39).ReadStringColumn(caseColumnOffset + genderIndex); // Definiter Artikel - rssb.Builder.ReplaceText("[t]"u8, article); + builder.ReplaceText("[t]"u8, article); } } - rssb.Builder.ReplaceText("[pa]"u8, attributiveSheet.GetRow(24).ReadStringColumn(caseColumnOffset + genderIndex)); + var pa = attributiveSheet.GetRow(24).ReadStringColumn(caseColumnOffset + genderIndex); + builder.ReplaceText("[pa]"u8, pa); - var declensionRow = (GermanArticleType)nounParams.ArticleType switch + RawRow declensionRow; + + declensionRow = (GermanArticleType)nounParams.ArticleType switch { // Schwache Flexion eines Adjektivs?! GermanArticleType.Possessive or GermanArticleType.Demonstrative => attributiveSheet.GetRow(25), @@ -335,10 +347,14 @@ internal class NounProcessor : IServiceType _ => attributiveSheet.GetRow(26), }; - rssb.Builder.ReplaceText("[a]"u8, declensionRow.ReadStringColumn(caseColumnOffset + genderIndex)); - rssb.Builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + var declension = declensionRow.ReadStringColumn(caseColumnOffset + genderIndex); + builder.ReplaceText("[a]"u8, declension); - return rssb.Builder.ToReadOnlySeString(); + builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + + ross = builder.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(builder); + return ross; } /// @@ -369,7 +385,8 @@ internal class NounProcessor : IServiceType var attributiveSheet = this.dataManager.Excel.GetSheet(nounParams.Language.ToLumina(), nameof(LSheets.Attributive)); - using var rssb = new RentedSeStringBuilder(); + var builder = LSeStringBuilder.SharedPool.Get(); + ReadOnlySeString ross; var startsWithVowelColumn = nounParams.ColumnOffset + StartsWithVowelColumnIdx; var startsWithVowel = startsWithVowelColumn >= 0 @@ -388,19 +405,21 @@ internal class NounProcessor : IServiceType { var v21 = attributiveSheet.GetRow((uint)nounParams.ArticleType).ReadStringColumn(v20); if (!v21.IsEmpty) - rssb.Builder.Append(v21); + builder.Append(v21); if (!nounParams.LinkMarker.IsEmpty) - rssb.Builder.Append(nounParams.LinkMarker); + builder.Append(nounParams.LinkMarker); var text = row.ReadStringColumn(nounParams.ColumnOffset + (nounParams.Quantity <= 1 ? SingularColumnIdx : PluralColumnIdx)); if (!text.IsEmpty) - rssb.Builder.Append(text); + builder.Append(text); if (nounParams.Quantity <= 1) - rssb.Builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); - return rssb.Builder.ToReadOnlySeString(); + ross = builder.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(builder); + return ross; } var v17 = row.ReadInt8Column(nounParams.ColumnOffset + Unknown5ColumnIdx); @@ -409,32 +428,34 @@ internal class NounProcessor : IServiceType var v29 = attributiveSheet.GetRow((uint)nounParams.ArticleType).ReadStringColumn(v20 + 2); if (!v29.IsEmpty) { - rssb.Builder.Append(v29); + builder.Append(v29); if (!nounParams.LinkMarker.IsEmpty) - rssb.Builder.Append(nounParams.LinkMarker); + builder.Append(nounParams.LinkMarker); var text = row.ReadStringColumn(nounParams.ColumnOffset + PluralColumnIdx); if (!text.IsEmpty) - rssb.Builder.Append(text); + builder.Append(text); } } else { var v27 = attributiveSheet.GetRow((uint)nounParams.ArticleType).ReadStringColumn(v20 + (v17 != 0 ? 1 : 3)); if (!v27.IsEmpty) - rssb.Builder.Append(v27); + builder.Append(v27); if (!nounParams.LinkMarker.IsEmpty) - rssb.Builder.Append(nounParams.LinkMarker); + builder.Append(nounParams.LinkMarker); var text = row.ReadStringColumn(nounParams.ColumnOffset + SingularColumnIdx); if (!text.IsEmpty) - rssb.Builder.Append(text); + builder.Append(text); } - rssb.Builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); + builder.ReplaceText("[n]"u8, ReadOnlySeString.FromText(nounParams.Quantity.ToString())); - return rssb.Builder.ToReadOnlySeString(); + ross = builder.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(builder); + return ross; } } diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs index 8178a6d33..470e942c3 100644 --- a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs +++ b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs @@ -1,7 +1,6 @@ using System.IO; using Dalamud.Game.Text.Evaluator; -using Dalamud.Utility; using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; @@ -33,14 +32,13 @@ public class AutoTranslatePayload : Payload, ITextProvider this.Group = group; this.Key = key; - using var rssb = new RentedSeStringBuilder(); - - this.payload = rssb.Builder - .BeginMacro(MacroCode.Fixed) - .AppendUIntExpression(group - 1) - .AppendUIntExpression(key) - .EndMacro() - .ToReadOnlySeString(); + var ssb = Lumina.Text.SeStringBuilder.SharedPool.Get(); + this.payload = ssb.BeginMacro(MacroCode.Fixed) + .AppendUIntExpression(group - 1) + .AppendUIntExpression(key) + .EndMacro() + .ToReadOnlySeString(); + Lumina.Text.SeStringBuilder.SharedPool.Return(ssb); } /// diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs index 2becb815b..8b020b111 100644 --- a/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs +++ b/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs @@ -1,7 +1,5 @@ using System.IO; -using Dalamud.Utility; - using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; @@ -39,18 +37,19 @@ public class DalamudLinkPayload : Payload /// protected override byte[] EncodeImpl() { - using var rssb = new RentedSeStringBuilder(); - return rssb.Builder - .BeginMacro(MacroCode.Link) - .AppendIntExpression((int)EmbeddedInfoType.DalamudLink - 1) - .AppendUIntExpression(this.CommandId) - .AppendIntExpression(this.Extra1) - .AppendIntExpression(this.Extra2) - .BeginStringExpression() - .Append(JsonConvert.SerializeObject(new[] { this.Plugin, this.ExtraString })) - .EndExpression() - .EndMacro() - .ToArray(); + var ssb = Lumina.Text.SeStringBuilder.SharedPool.Get(); + var res = ssb.BeginMacro(MacroCode.Link) + .AppendIntExpression((int)EmbeddedInfoType.DalamudLink - 1) + .AppendUIntExpression(this.CommandId) + .AppendIntExpression(this.Extra1) + .AppendIntExpression(this.Extra2) + .BeginStringExpression() + .Append(JsonConvert.SerializeObject(new[] { this.Plugin, this.ExtraString })) + .EndExpression() + .EndMacro() + .ToArray(); + Lumina.Text.SeStringBuilder.SharedPool.Return(ssb); + return res; } /// diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/PlayerPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/PlayerPayload.cs index 01ca1b955..55697782e 100644 --- a/Dalamud/Game/Text/SeStringHandling/Payloads/PlayerPayload.cs +++ b/Dalamud/Game/Text/SeStringHandling/Payloads/PlayerPayload.cs @@ -1,7 +1,8 @@ +using System.Collections.Generic; using System.IO; +using System.Text; using Dalamud.Data; -using Dalamud.Utility; using Lumina.Excel; using Lumina.Excel.Sheets; @@ -86,12 +87,14 @@ public class PlayerPayload : Payload /// protected override byte[] EncodeImpl() { - using var rssb = new RentedSeStringBuilder(); - return rssb.Builder - .PushLinkCharacter(this.playerName, this.serverId) - .Append(this.playerName) - .PopLink() - .ToArray(); + var ssb = Lumina.Text.SeStringBuilder.SharedPool.Get(); + var res = ssb + .PushLinkCharacter(this.playerName, this.serverId) + .Append(this.playerName) + .PopLink() + .ToArray(); + Lumina.Text.SeStringBuilder.SharedPool.Return(ssb); + return res; } /// diff --git a/Dalamud/Game/Text/SeStringHandling/SeString.cs b/Dalamud/Game/Text/SeStringHandling/SeString.cs index b94b05cac..8805c2177 100644 --- a/Dalamud/Game/Text/SeStringHandling/SeString.cs +++ b/Dalamud/Game/Text/SeStringHandling/SeString.cs @@ -113,6 +113,14 @@ public class SeString /// Equivalent SeString. public static implicit operator SeString(string str) => new(new TextPayload(str)); + /// + /// Implicitly convert a string into a SeString containing a . + /// + /// string to convert. + /// Equivalent SeString. + [Obsolete("Switch to using ReadOnlySeString instead of Lumina's SeString.", true)] + public static explicit operator SeString(Lumina.Text.SeString str) => str.ToDalamudString(); + /// /// Parse a binary game message into an SeString. /// @@ -198,9 +206,8 @@ public class SeString var textColor = ItemUtil.GetItemRarityColorType(rawId); var textEdgeColor = textColor + 1u; - using var rssb = new RentedSeStringBuilder(); - - var itemLink = rssb.Builder + var sb = LSeStringBuilder.SharedPool.Get(); + var itemLink = sb .PushColorType(textColor) .PushEdgeColorType(textEdgeColor) .PushLinkItem(rawId, copyName) @@ -209,6 +216,7 @@ public class SeString .PopEdgeColorType() .PopColorType() .ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(sb); return SeString.Parse(seStringEvaluator.EvaluateFromAddon(371, [itemLink], clientState.ClientLanguage)); } @@ -250,12 +258,16 @@ public class SeString var mapPayload = new MapLinkPayload(territoryId, mapId, rawX, rawY); var nameString = GetMapLinkNameString(mapPayload.PlaceName, instance, mapPayload.CoordinateString); - return new SeString(new List([ + var payloads = new List(new Payload[] + { mapPayload, - ..TextArrowPayloads, + // arrow goes here new TextPayload(nameString), RawPayload.LinkTerminator, - ])); + }); + payloads.InsertRange(1, TextArrowPayloads); + + return new SeString(payloads); } /// @@ -286,12 +298,16 @@ public class SeString var mapPayload = new MapLinkPayload(territoryId, mapId, xCoord, yCoord, fudgeFactor); var nameString = GetMapLinkNameString(mapPayload.PlaceName, instance, mapPayload.CoordinateString); - return new SeString(new List([ + var payloads = new List(new Payload[] + { mapPayload, - ..TextArrowPayloads, + // arrow goes here new TextPayload(nameString), RawPayload.LinkTerminator, - ])); + }); + payloads.InsertRange(1, TextArrowPayloads); + + return new SeString(payloads); } /// @@ -347,15 +363,21 @@ public class SeString /// An SeString containing all the payloads necessary to display a party finder link in the chat log. public static SeString CreatePartyFinderLink(uint listingId, string recruiterName, bool isCrossWorld = false) { - var clientState = Service.Get(); - var seStringEvaluator = Service.Get(); - - return new SeString(new List([ + var payloads = new List() + { new PartyFinderPayload(listingId, isCrossWorld ? PartyFinderPayload.PartyFinderLinkType.NotSpecified : PartyFinderPayload.PartyFinderLinkType.LimitedToHomeWorld), - ..TextArrowPayloads, - ..SeString.Parse(seStringEvaluator.EvaluateFromAddon(2265, [recruiterName, isCrossWorld ? 0 : 1], clientState.ClientLanguage)).Payloads, - RawPayload.LinkTerminator - ])); + // -> + new TextPayload($"Looking for Party ({recruiterName})" + (isCrossWorld ? " " : string.Empty)), + }; + + payloads.InsertRange(1, TextArrowPayloads); + + if (isCrossWorld) + payloads.Add(new IconPayload(BitmapFontIcon.CrossWorld)); + + payloads.Add(RawPayload.LinkTerminator); + + return new SeString(payloads); } /// @@ -365,12 +387,16 @@ public class SeString /// An SeString containing all the payloads necessary to display a link to the party finder search conditions. public static SeString CreatePartyFinderSearchConditionsLink(string message) { - return new SeString(new List([ + var payloads = new List() + { new PartyFinderPayload(), - ..TextArrowPayloads, + // -> new TextPayload(message), - RawPayload.LinkTerminator - ])); + }; + payloads.InsertRange(1, TextArrowPayloads); + payloads.Add(RawPayload.LinkTerminator); + + return new SeString(payloads); } /// diff --git a/Dalamud/Game/UnlockState/ItemActionAction.cs b/Dalamud/Game/UnlockState/ItemActionType.cs similarity index 96% rename from Dalamud/Game/UnlockState/ItemActionAction.cs rename to Dalamud/Game/UnlockState/ItemActionType.cs index 0e86fcb67..8e3d79b84 100644 --- a/Dalamud/Game/UnlockState/ItemActionAction.cs +++ b/Dalamud/Game/UnlockState/ItemActionType.cs @@ -3,9 +3,9 @@ using Lumina.Excel.Sheets; namespace Dalamud.Game.UnlockState; /// -/// Enum for . +/// Enum for . /// -internal enum ItemActionAction : ushort +internal enum ItemActionType : ushort { /// /// No item action. diff --git a/Dalamud/Game/UnlockState/RecipeData.cs b/Dalamud/Game/UnlockState/RecipeData.cs index 7fa0d4b8f..c419ba4fd 100644 --- a/Dalamud/Game/UnlockState/RecipeData.cs +++ b/Dalamud/Game/UnlockState/RecipeData.cs @@ -158,23 +158,67 @@ internal unsafe class RecipeData : IInternalDisposableService { noteBookDivisionIndex++; - if (!noteBookDivisionRow.AllowedCraftTypes[craftType]) - continue; + // For future Lumina.Excel update, replace with: + // if (!notebookDivisionRow.AllowedCraftTypes[craftType]) + // continue; + + switch (craftTypeRow.RowId) + { + case 0 when !noteBookDivisionRow.CRPCraft: continue; + case 1 when !noteBookDivisionRow.BSMCraft: continue; + case 2 when !noteBookDivisionRow.ARMCraft: continue; + case 3 when !noteBookDivisionRow.GSMCraft: continue; + case 4 when !noteBookDivisionRow.LTWCraft: continue; + case 5 when !noteBookDivisionRow.WVRCraft: continue; + case 6 when !noteBookDivisionRow.ALCCraft: continue; + case 7 when !noteBookDivisionRow.CULCraft: continue; + } if (noteBookDivisionRow.GatheringOpeningLevel != byte.MaxValue) continue; - if (noteBookDivisionRow.RequiresSecretRecipeBookGroupUnlock) + // For future Lumina.Excel update, replace with: + // if (notebookDivisionRow.RequiresSecretRecipeBookGroupUnlock) + if (noteBookDivisionRow.Unknown1) { var secretRecipeBookUnlocked = false; - foreach (var secretRecipeBookGroup in noteBookDivisionRow.SecretRecipeBookGroups) + // For future Lumina.Excel update, iterate over notebookDivisionRow.SecretRecipeBookGroups + for (var i = 0; i < 2; i++) { - if (secretRecipeBookGroup.RowId == 0 || !secretRecipeBookGroup.IsValid) + // For future Lumina.Excel update, replace with: + // if (secretRecipeBookGroup.RowId == 0 || !secretRecipeBookGroup.IsValid) + // continue; + var secretRecipeBookGroupRowId = i switch + { + 0 => noteBookDivisionRow.Unknown2, + 1 => noteBookDivisionRow.Unknown2, + _ => default, + }; + + if (secretRecipeBookGroupRowId == 0) continue; - var bitIndex = secretRecipeBookGroup.Value.SecretRecipeBook[craftType].RowId; - if (PlayerState.Instance()->UnlockedSecretRecipeBooksBitArray.Get((int)bitIndex)) + if (!this.dataManager.GetExcelSheet().TryGetRow(secretRecipeBookGroupRowId, out var secretRecipeBookGroupRow)) + continue; + + // For future Lumina.Excel update, replace with: + // var bitIndex = secretRecipeBookGroup.Value.UnlockBitIndex[craftType]; + + var bitIndex = craftType switch + { + 0 => secretRecipeBookGroupRow.Unknown0, + 1 => secretRecipeBookGroupRow.Unknown1, + 2 => secretRecipeBookGroupRow.Unknown2, + 3 => secretRecipeBookGroupRow.Unknown3, + 4 => secretRecipeBookGroupRow.Unknown4, + 5 => secretRecipeBookGroupRow.Unknown5, + 6 => secretRecipeBookGroupRow.Unknown6, + 7 => secretRecipeBookGroupRow.Unknown7, + _ => default, + }; + + if (PlayerState.Instance()->UnlockedSecretRecipeBooksBitArray.Get(bitIndex)) { secretRecipeBookUnlocked = true; break; diff --git a/Dalamud/Game/UnlockState/UnlockState.cs b/Dalamud/Game/UnlockState/UnlockState.cs index cc70a524c..cd896ffb6 100644 --- a/Dalamud/Game/UnlockState/UnlockState.cs +++ b/Dalamud/Game/UnlockState/UnlockState.cs @@ -209,7 +209,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState /// public bool IsEmjVoiceNpcUnlocked(EmjVoiceNpc row) { - return this.IsUnlockLinkUnlocked(row.UnlockLink); + return this.IsUnlockLinkUnlocked(row.Unknown26); } /// @@ -217,7 +217,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState { return this.dataManager.GetExcelSheet().TryGetRow(row.RowId, out var emjVoiceNpcRow) && this.IsEmjVoiceNpcUnlocked(emjVoiceNpcRow) - && QuestManager.IsQuestComplete(row.UnlockQuest.RowId); + && QuestManager.IsQuestComplete(row.Unknown1); } /// @@ -264,47 +264,47 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState // To avoid the ExdModule.GetItemRowById call, which can return null if the excel page // is not loaded, we're going to imitate the IsItemActionUnlocked call first: - switch ((ItemActionAction)row.ItemAction.Value.Action.RowId) + switch ((ItemActionType)row.ItemAction.Value.Type) { - case ItemActionAction.Companion: + case ItemActionType.Companion: return UIState.Instance()->IsCompanionUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.BuddyEquip: + case ItemActionType.BuddyEquip: return UIState.Instance()->Buddy.CompanionInfo.IsBuddyEquipUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.Mount: + case ItemActionType.Mount: return PlayerState.Instance()->IsMountUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.SecretRecipeBook: + case ItemActionType.SecretRecipeBook: return PlayerState.Instance()->IsSecretRecipeBookUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.UnlockLink: - case ItemActionAction.OccultRecords: + case ItemActionType.UnlockLink: + case ItemActionType.OccultRecords: return UIState.Instance()->IsUnlockLinkUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.TripleTriadCard when row.AdditionalData.Is(): + case ItemActionType.TripleTriadCard when row.AdditionalData.Is(): return UIState.Instance()->IsTripleTriadCardUnlocked((ushort)row.AdditionalData.RowId); - case ItemActionAction.FolkloreTome: + case ItemActionType.FolkloreTome: return PlayerState.Instance()->IsFolkloreBookUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.OrchestrionRoll when row.AdditionalData.Is(): + case ItemActionType.OrchestrionRoll when row.AdditionalData.Is(): return PlayerState.Instance()->IsOrchestrionRollUnlocked(row.AdditionalData.RowId); - case ItemActionAction.FramersKit: + case ItemActionType.FramersKit: return PlayerState.Instance()->IsFramersKitUnlocked(row.AdditionalData.RowId); - case ItemActionAction.Ornament: + case ItemActionType.Ornament: return PlayerState.Instance()->IsOrnamentUnlocked(row.ItemAction.Value.Data[0]); - case ItemActionAction.Glasses: + case ItemActionType.Glasses: return PlayerState.Instance()->IsGlassesUnlocked((ushort)row.AdditionalData.RowId); - case ItemActionAction.SoulShards when PublicContentOccultCrescent.GetState() is var occultCrescentState && occultCrescentState != null: + case ItemActionType.SoulShards when PublicContentOccultCrescent.GetState() is var occultCrescentState && occultCrescentState != null: var supportJobId = (byte)row.ItemAction.Value.Data[0]; return supportJobId < occultCrescentState->SupportJobLevels.Length && occultCrescentState->SupportJobLevels[supportJobId] != 0; - case ItemActionAction.CompanySealVouchers: + case ItemActionType.CompanySealVouchers: return false; } @@ -327,7 +327,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState /// public bool IsMKDLoreUnlocked(MKDLore row) { - return this.IsUnlockLinkUnlocked(row.UnlockLink); + return this.IsUnlockLinkUnlocked(row.Unknown2); } /// @@ -414,20 +414,20 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState if (row.ItemAction.RowId == 0) return false; - return (ItemActionAction)row.ItemAction.Value.Action.RowId - is ItemActionAction.Companion - or ItemActionAction.BuddyEquip - or ItemActionAction.Mount - or ItemActionAction.SecretRecipeBook - or ItemActionAction.UnlockLink - or ItemActionAction.TripleTriadCard - or ItemActionAction.FolkloreTome - or ItemActionAction.OrchestrionRoll - or ItemActionAction.FramersKit - or ItemActionAction.Ornament - or ItemActionAction.Glasses - or ItemActionAction.OccultRecords - or ItemActionAction.SoulShards; + return (ItemActionType)row.ItemAction.Value.Type + is ItemActionType.Companion + or ItemActionType.BuddyEquip + or ItemActionType.Mount + or ItemActionType.SecretRecipeBook + or ItemActionType.UnlockLink + or ItemActionType.TripleTriadCard + or ItemActionType.FolkloreTome + or ItemActionType.OrchestrionRoll + or ItemActionType.FramersKit + or ItemActionType.Ornament + or ItemActionType.Glasses + or ItemActionType.OccultRecords + or ItemActionType.SoulShards; } /// diff --git a/Dalamud/GlobalSuppressions.cs b/Dalamud/GlobalSuppressions.cs index 35754eb04..8a9d31b12 100644 --- a/Dalamud/GlobalSuppressions.cs +++ b/Dalamud/GlobalSuppressions.cs @@ -21,7 +21,6 @@ using System.Diagnostics.CodeAnalysis; [assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1116:SplitParametersMustStartOnLineAfterDeclaration", Justification = "Reviewed.")] [assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "This would be nice, but a big refactor")] [assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileNameMustMatchTypeName", Justification = "I don't like this one so much")] -[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1108:BlockStatementsMustNotContainEmbeddedComments", Justification = "I like having comments in blocks")] // ImRAII stuff [assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed.", Scope = "namespaceanddescendants", Target = "Dalamud.Interface.Utility.Raii")] diff --git a/Dalamud/Hooking/Hook.cs b/Dalamud/Hooking/Hook.cs index b8fd78b4f..faf4658a5 100644 --- a/Dalamud/Hooking/Hook.cs +++ b/Dalamud/Hooking/Hook.cs @@ -4,7 +4,6 @@ using System.Runtime.InteropServices; using Dalamud.Configuration.Internal; using Dalamud.Hooking.Internal; -using Dalamud.Hooking.Internal.Verification; namespace Dalamud.Hooking; @@ -202,19 +201,19 @@ public abstract class Hook : IDalamudHook where T : Delegate if (EnvironmentConfiguration.DalamudForceMinHook) useMinHook = true; - var moduleHandle = Windows.Win32.PInvoke.GetModuleHandle(moduleName); - if (moduleHandle.IsNull) + using var moduleHandle = Windows.Win32.PInvoke.GetModuleHandle(moduleName); + if (moduleHandle.IsInvalid) throw new Exception($"Could not get a handle to module {moduleName}"); - var procAddress = Windows.Win32.PInvoke.GetProcAddress(moduleHandle, exportName); - if (procAddress.IsNull) + var procAddress = (nint)Windows.Win32.PInvoke.GetProcAddress(moduleHandle, exportName); + if (procAddress == IntPtr.Zero) throw new Exception($"Could not get the address of {moduleName}::{exportName}"); - var address = HookManager.FollowJmp(procAddress.Value); + procAddress = HookManager.FollowJmp(procAddress); if (useMinHook) - return new MinHookHook(address, detour, Assembly.GetCallingAssembly()); + return new MinHookHook(procAddress, detour, Assembly.GetCallingAssembly()); else - return new ReloadedHook(address, detour, Assembly.GetCallingAssembly()); + return new ReloadedHook(procAddress, detour, Assembly.GetCallingAssembly()); } /// @@ -231,8 +230,6 @@ public abstract class Hook : IDalamudHook where T : Delegate if (EnvironmentConfiguration.DalamudForceMinHook) useMinHook = true; - HookVerifier.Verify(procAddress); - procAddress = HookManager.FollowJmp(procAddress); if (useMinHook) return new MinHookHook(procAddress, detour, Assembly.GetCallingAssembly()); diff --git a/Dalamud/Hooking/Internal/CallHook.cs b/Dalamud/Hooking/Internal/CallHook.cs new file mode 100644 index 000000000..92bc6e31a --- /dev/null +++ b/Dalamud/Hooking/Internal/CallHook.cs @@ -0,0 +1,100 @@ +using System.Runtime.InteropServices; + +using Reloaded.Hooks.Definitions; + +namespace Dalamud.Hooking.Internal; + +/// +/// This class represents a callsite hook. Only the specific address's instructions are replaced with this hook. +/// This is a destructive operation, no other callsite hooks can coexist at the same address. +/// +/// There's no .Original for this hook type. +/// This is only intended for be for functions where the parameters provided allow you to invoke the original call. +/// +/// This class was specifically added for hooking virtual function callsites. +/// Only the specific callsite hooked is modified, if the game calls the virtual function from other locations this hook will not be triggered. +/// +/// Delegate signature for this hook. +internal class CallHook : IDalamudHook where T : Delegate +{ + private readonly Reloaded.Hooks.AsmHook asmHook; + + private T? detour; + private bool activated; + + /// + /// Initializes a new instance of the class. + /// + /// Address of the instruction to replace. + /// Delegate to invoke. + internal CallHook(nint address, T detour) + { + ArgumentNullException.ThrowIfNull(detour); + + this.detour = detour; + this.Address = address; + + var detourPtr = Marshal.GetFunctionPointerForDelegate(this.detour); + var code = new[] + { + "use64", + $"mov rax, 0x{detourPtr:X8}", + "call rax", + }; + + var opt = new AsmHookOptions + { + PreferRelativeJump = true, + Behaviour = Reloaded.Hooks.Definitions.Enums.AsmHookBehaviour.DoNotExecuteOriginal, + MaxOpcodeSize = 5, + }; + + this.asmHook = new Reloaded.Hooks.AsmHook(code, (nuint)address, opt); + } + + /// + /// Gets a value indicating whether the hook is enabled. + /// + public bool IsEnabled => this.asmHook.IsEnabled; + + /// + public IntPtr Address { get; } + + /// + public string BackendName => "Reloaded AsmHook"; + + /// + public bool IsDisposed => this.detour == null; + + /// + /// Starts intercepting a call to the function. + /// + public void Enable() + { + if (!this.activated) + { + this.activated = true; + this.asmHook.Activate(); + return; + } + + this.asmHook.Enable(); + } + + /// + /// Stops intercepting a call to the function. + /// + public void Disable() + { + this.asmHook.Disable(); + } + + /// + /// Remove a hook from the current process. + /// + public void Dispose() + { + this.asmHook.Disable(); + this.detour = null; + } +} diff --git a/Dalamud/Hooking/Internal/Verification/HookVerificationException.cs b/Dalamud/Hooking/Internal/Verification/HookVerificationException.cs deleted file mode 100644 index c43b5d540..000000000 --- a/Dalamud/Hooking/Internal/Verification/HookVerificationException.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Linq; - -namespace Dalamud.Hooking.Internal.Verification; - -/// -/// Exception thrown when a provided delegate for a hook does not match a known delegate. -/// -public class HookVerificationException : Exception -{ - private HookVerificationException(string message) - : base(message) - { - } - - /// - /// Create a new exception. - /// - /// The address of the function that is being hooked. - /// The delegate passed by the user. - /// The delegate we think is correct. - /// Additional context to show to the user. - /// The created exception. - internal static HookVerificationException Create(IntPtr address, Type passed, Type enforced, string message) - { - return new HookVerificationException( - $"Hook verification failed for address 0x{address.ToInt64():X}\n\n" + - $"Why: {message}\n" + - $"Passed Delegate: {GetSignature(passed)}\n" + - $"Correct Delegate: {GetSignature(enforced)}\n\n" + - "The hook delegate must exactly match the provided signature to prevent memory corruption and wrong data passed to originals."); - } - - private static string GetSignature(Type delegateType) - { - var method = delegateType.GetMethod("Invoke"); - if (method == null) return delegateType.Name; - - var parameters = string.Join(", ", method.GetParameters().Select(p => p.ParameterType.Name)); - return $"{method.ReturnType.Name} ({parameters})"; - } -} diff --git a/Dalamud/Hooking/Internal/Verification/HookVerifier.cs b/Dalamud/Hooking/Internal/Verification/HookVerifier.cs deleted file mode 100644 index ad68ae38e..000000000 --- a/Dalamud/Hooking/Internal/Verification/HookVerifier.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System.Linq; - -using Dalamud.Game; -using Dalamud.Logging.Internal; - -namespace Dalamud.Hooking.Internal.Verification; - -/// -/// Global utility that can verify whether hook delegates are correctly declared. -/// Initialized out-of-band, since Hook is instantiated all over the place without a service, so this cannot be -/// a service either. -/// -internal static class HookVerifier -{ - private static readonly ModuleLog Log = new("HookVerifier"); - - private static readonly VerificationEntry[] ToVerify = - [ - new( - "ActorControlSelf", - "E8 ?? ?? ?? ?? 0F B7 0B 83 E9 64", - typeof(ActorControlSelfDelegate), - "Signature changed in Patch 7.4") // 7.4 (new parameters) - ]; - - private delegate void ActorControlSelfDelegate(uint category, uint eventId, uint param1, uint param2, uint param3, uint param4, uint param5, uint param6, uint param7, uint param8, ulong targetId, byte param9); - - /// - /// Initializes a new instance of the class. - /// - /// Process to scan in. - public static void Initialize(TargetSigScanner scanner) - { - foreach (var entry in ToVerify) - { - if (!scanner.TryScanText(entry.Signature, out var address)) - { - Log.Error("Could not resolve signature for hook {Name} ({Sig})", entry.Name, entry.Signature); - continue; - } - - entry.Address = address; - } - } - - /// - /// Verify the hook with the provided address and exception. - /// - /// The address of the function we are hooking. - /// The delegate type passed by the creator of the hook. - /// Exception thrown when we think the hook is not correctly declared. - public static void Verify(IntPtr address) where T : Delegate - { - var entry = ToVerify.FirstOrDefault(x => x.Address == address); - - // Nothing to verify for this hook? - if (entry == null) - { - return; - } - - var passedType = typeof(T); - - // Directly compare delegates - if (passedType == entry.TargetDelegateType) - { - return; - } - - var passedInvoke = passedType.GetMethod("Invoke")!; - var enforcedInvoke = entry.TargetDelegateType.GetMethod("Invoke")!; - - // Compare Return Type - var mismatch = passedInvoke.ReturnType != enforcedInvoke.ReturnType; - - // Compare Parameter Count - var passedParams = passedInvoke.GetParameters(); - var enforcedParams = enforcedInvoke.GetParameters(); - - if (passedParams.Length != enforcedParams.Length) - { - mismatch = true; - } - else - { - // Compare Parameter Types - for (var i = 0; i < passedParams.Length; i++) - { - if (passedParams[i].ParameterType != enforcedParams[i].ParameterType) - { - mismatch = true; - break; - } - } - } - - if (mismatch) - { - throw HookVerificationException.Create(address, passedType, entry.TargetDelegateType, entry.Message); - } - } - - private record VerificationEntry(string Name, string Signature, Type TargetDelegateType, string Message) - { - public nint Address { get; set; } - } -} diff --git a/Dalamud/Interface/Animation/Easing.cs b/Dalamud/Interface/Animation/Easing.cs index a9dfad1f0..0d2057b3b 100644 --- a/Dalamud/Interface/Animation/Easing.cs +++ b/Dalamud/Interface/Animation/Easing.cs @@ -48,7 +48,7 @@ public abstract class Easing /// Gets the current value of the animation, following unclamped logic. /// [Obsolete($"This field has been deprecated. Use either {nameof(ValueClamped)} or {nameof(ValueUnclamped)} instead.", true)] - [Api15ToDo("Map this field to ValueClamped, probably.")] + [Api13ToDo("Map this field to ValueClamped, probably.")] public double Value => this.ValueUnclamped; /// diff --git a/Dalamud/Interface/DalamudWindowOpenKinds.cs b/Dalamud/Interface/DalamudWindowOpenKinds.cs index 891f9281a..35d2825f7 100644 --- a/Dalamud/Interface/DalamudWindowOpenKinds.cs +++ b/Dalamud/Interface/DalamudWindowOpenKinds.cs @@ -56,11 +56,6 @@ public enum SettingsOpenKind /// ServerInfoBar, - /// - /// Open to the "Badges" page. - /// - Badge, - /// /// Open to the "Experimental" page. /// diff --git a/Dalamud/Interface/FontAwesome/FontAwesomeIcon.cs b/Dalamud/Interface/FontAwesome/FontAwesomeIcon.cs index 35df9cfbc..f88d7f8f0 100644 --- a/Dalamud/Interface/FontAwesome/FontAwesomeIcon.cs +++ b/Dalamud/Interface/FontAwesome/FontAwesomeIcon.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // Generated by Dalamud.FASharpGen - don't modify this file directly. -// Font-Awesome Version: 7.1.0 +// Font-Awesome Version: 6.4.2 // //------------------------------------------------------------------------------ @@ -29,14 +29,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "address-book" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "address book", "contact", "directory", "employee", "index", "little black book", "portfolio", "rolodex", "uer", "username" })] + [FontAwesomeSearchTerms(new[] { "address book", "contact", "directory", "index", "little black book", "rolodex" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication", "Users + People" })] AddressBook = 0xF2B9, /// /// The Font Awesome "address-card" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "address card", "about", "contact", "employee", "id", "identification", "portfolio", "postcard", "profile", "registration", "uer", "username" })] + [FontAwesomeSearchTerms(new[] { "address card", "about", "contact", "id", "identification", "postcard", "profile", "registration" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Alphabet", "Business", "Communication", "Users + People" })] AddressCard = 0xF2BB, @@ -54,13 +54,6 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Automotive" })] AirFreshener = 0xF5D0, - /// - /// The Font Awesome "alarm-clock" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "alarm clock", "alarm", "alarm clock", "clock", "date", "late", "pending", "reminder", "sleep", "snooze", "timer", "timestamp", "watch" })] - [FontAwesomeCategoriesAttribute(new[] { "Alert", "Time", "Travel + Hotel" })] - AlarmClock = 0xF34E, - /// /// The Font Awesome "align-center" icon unicode character. /// @@ -120,28 +113,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "anchor-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "anchor circle check", "enable", "marina", "not affected", "ok", "okay", "port", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "anchor circle check", "marina", "not affected", "ok", "okay", "port" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Maritime" })] AnchorCircleCheck = 0xE4AA, /// /// The Font Awesome "anchor-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "anchor circle exclamation", "affected", "failed", "marina", "port" })] + [FontAwesomeSearchTerms(new[] { "anchor circle exclamation", "affected", "marina", "port" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Maritime" })] AnchorCircleExclamation = 0xE4AB, /// /// The Font Awesome "anchor-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "anchor circle xmark", "destroy", "marina", "port", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "anchor circle xmark", "destroy", "marina", "port" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Maritime" })] AnchorCircleXmark = 0xE4AC, /// /// The Font Awesome "anchor-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "anchor lock", "closed", "lockdown", "marina", "padlock", "port", "privacy", "quarantine" })] + [FontAwesomeSearchTerms(new[] { "anchor lock", "closed", "lockdown", "marina", "port", "quarantine" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Maritime" })] AnchorLock = 0xE4AD, @@ -176,7 +169,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "angle-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "angle down", "down arrowhead", "arrow", "caret", "download", "expand", "insert" })] + [FontAwesomeSearchTerms(new[] { "angle down", "down arrowhead", "arrow", "caret", "download", "expand" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] AngleDown = 0xF107, @@ -197,7 +190,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "angle-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "angle up", "up arrowhead", "arrow", "caret", "collapse", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "angle up", "up arrowhead", "arrow", "caret", "collapse", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] AngleUp = 0xF106, @@ -260,7 +253,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "circle-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle up", "arrow-circle-o-up", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "circle up", "arrow-circle-o-up" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ArrowAltCircleUp = 0xF35B, @@ -288,7 +281,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "circle-arrow-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle arrow up", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "circle arrow up", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ArrowCircleUp = 0xF0AA, @@ -316,7 +309,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-down-up-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow down up lock", "border", "closed", "crossing", "lockdown", "padlock", "privacy", "quarantine", "transfer" })] + [FontAwesomeSearchTerms(new[] { "arrow down up lock", "border", "closed", "crossing", "lockdown", "quarantine", "transfer" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowDownUpLock = 0xE4B0, @@ -344,7 +337,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-right-arrow-left" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow right arrow left", "arrow", "arrows", "reciprocate", "return", "swap", "transfer" })] + [FontAwesomeSearchTerms(new[] { "arrow right arrow left", "rightwards arrow over leftwards arrow", "arrow", "arrows", "reciprocate", "return", "swap", "transfer" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ArrowRightArrowLeft = 0xF0EC, @@ -365,14 +358,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-right-to-bracket" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow right to bracket", "arrow", "enter", "insert", "join", "log in", "login", "sign in", "sign up", "sign-in", "signin", "signup" })] + [FontAwesomeSearchTerms(new[] { "arrow right to bracket", "arrow", "enter", "join", "log in", "login", "sign in", "sign up", "sign-in", "signin", "signup" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ArrowRightToBracket = 0xF090, /// /// The Font Awesome "arrow-right-to-city" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow right to city", "building", "city", "exodus", "insert", "rural", "urban" })] + [FontAwesomeSearchTerms(new[] { "arrow right to city", "building", "city", "exodus", "rural", "urban" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] ArrowRightToCity = 0xE4B3, @@ -400,14 +393,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrows-down-to-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows down to line", "insert", "scale down", "sink" })] + [FontAwesomeSearchTerms(new[] { "arrows down to line", "scale down", "sink" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowsDownToLine = 0xE4B8, /// /// The Font Awesome "arrows-down-to-people" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows down to people", "affected", "focus", "insert", "targeted", "together", "uer" })] + [FontAwesomeSearchTerms(new[] { "arrows down to people", "affected", "focus", "targeted" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] ArrowsDownToPeople = 0xE4B9, @@ -442,14 +435,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrows-to-circle" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows to circle", "center", "concentrate", "coordinate", "coordination", "focal point", "focus", "insert" })] + [FontAwesomeSearchTerms(new[] { "arrows to circle", "center", "concentrate", "coordinate", "coordination", "focal point", "focus" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowsToCircle = 0xE4BD, /// /// The Font Awesome "arrows-to-dot" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows to dot", "assembly point", "center", "condense", "focus", "insert", "minimize" })] + [FontAwesomeSearchTerms(new[] { "arrows to dot", "assembly point", "center", "condense", "focus", "minimize" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Business", "Humanitarian", "Marketing" })] ArrowsToDot = 0xE4BE, @@ -470,7 +463,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrows-turn-to-dots" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows turn to dots", "destination", "insert", "nexus" })] + [FontAwesomeSearchTerms(new[] { "arrows turn to dots", "destination", "nexus" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowsTurnToDots = 0xE4C1, @@ -491,7 +484,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrows-up-to-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows up to line", "rise", "scale up", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "arrows up to line", "rise", "scale up" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowsUpToLine = 0xE4C2, @@ -526,28 +519,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up", "upwards arrow", "forward", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "arrow up", "upwards arrow", "forward", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ArrowUp = 0xF062, /// /// The Font Awesome "arrow-up-from-bracket" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up from bracket", "share", "transfer", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "arrow up from bracket", "share", "transfer", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ArrowUpFromBracket = 0xE09A, /// /// The Font Awesome "arrow-up-from-ground-water" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up from ground water", "groundwater", "spring", "upgrade", "water supply", "water table" })] + [FontAwesomeSearchTerms(new[] { "arrow up from ground water", "groundwater", "spring", "water supply", "water table" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Energy", "Humanitarian" })] ArrowUpFromGroundWater = 0xE4B5, /// /// The Font Awesome "arrow-up-from-water-pump" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up from water pump", "flood", "groundwater", "pump", "submersible", "sump pump", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "arrow up from water pump", "flood", "groundwater", "pump", "submersible", "sump pump" })] [FontAwesomeCategoriesAttribute(new[] { "Household", "Humanitarian" })] ArrowUpFromWaterPump = 0xE4B6, @@ -561,14 +554,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-up-right-dots" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up right dots", "growth", "increase", "population", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "arrow up right dots", "growth", "increase", "population" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowUpRightDots = 0xE4B7, /// /// The Font Awesome "arrow-up-right-from-square" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up right from square", "new", "open", "send", "share", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "arrow up right from square", "new", "open", "send", "share" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Humanitarian" })] ArrowUpRightFromSquare = 0xF08E, @@ -583,7 +576,7 @@ public enum FontAwesomeIcon /// The Font Awesome "asterisk" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0x2A. /// - [FontAwesomeSearchTerms(new[] { "asterisk", "asterisk", "heavy asterisk", "annotation", "details", "reference", "required", "star" })] + [FontAwesomeSearchTerms(new[] { "asterisk", "asterisk", "heavy asterisk", "annotation", "details", "reference", "star" })] [FontAwesomeCategoriesAttribute(new[] { "Punctuation + Symbols", "Spinners" })] Asterisk = 0xF069, @@ -598,14 +591,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "book-atlas" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "book atlas", "book", "directions", "geography", "globe", "knowledge", "library", "map", "research", "travel", "wayfinding" })] + [FontAwesomeSearchTerms(new[] { "book atlas", "book", "directions", "geography", "globe", "library", "map", "research", "travel", "wayfinding" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Travel + Hotel" })] Atlas = 0xF558, /// /// The Font Awesome "atom" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "atheism", "atheist", "atom", "atom symbol", "chemistry", "electron", "ion", "isotope", "knowledge", "neutron", "nuclear", "proton", "science" })] + [FontAwesomeSearchTerms(new[] { "atheism", "atheist", "atom", "atom symbol", "chemistry", "electron", "ion", "isotope", "neutron", "nuclear", "proton", "science" })] [FontAwesomeCategoriesAttribute(new[] { "Education", "Energy", "Religion", "Science", "Science Fiction", "Spinners" })] Atom = 0xF5D2, @@ -626,14 +619,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "award" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "award", "guarantee", "honor", "praise", "prize", "recognition", "ribbon", "trophy", "warranty" })] + [FontAwesomeSearchTerms(new[] { "award", "honor", "praise", "prize", "recognition", "ribbon", "trophy" })] [FontAwesomeCategoriesAttribute(new[] { "Education", "Political" })] Award = 0xF559, /// /// The Font Awesome "baby" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "baby", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "baby", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Humanitarian", "Users + People" })] Baby = 0xF77C, @@ -675,7 +668,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bacterium" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bacterium", "antibiotic", "antibody", "covid-19", "germ", "health", "organism", "sick" })] + [FontAwesomeSearchTerms(new[] { "bacterium", "antibiotic", "antibody", "covid-19", "health", "organism", "sick" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health" })] Bacterium = 0xE05A, @@ -717,14 +710,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "ban" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "404", "abort", "ban", "block", "cancel", "circle", "delete", "deny", "disabled", "entry", "failed", "forbidden", "hide", "no", "not", "not found", "prohibit", "prohibited", "remove", "slash", "stop", "trash" })] + [FontAwesomeSearchTerms(new[] { "abort", "ban", "block", "cancel", "delete", "entry", "forbidden", "hide", "no", "not", "prohibit", "prohibited", "remove", "stop", "trash" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security" })] Ban = 0xF05E, /// /// The Font Awesome "bandage" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "adhesive bandage", "bandage", "boo boo", "first aid", "modify", "ouch" })] + [FontAwesomeSearchTerms(new[] { "adhesive bandage", "bandage", "boo boo", "first aid", "ouch" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Medical + Health" })] BandAid = 0xF462, @@ -822,7 +815,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bed" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bed", "hospital", "hotel", "lodging", "mattress", "patient", "person in bed", "rest", "sleep", "travel", "uer" })] + [FontAwesomeSearchTerms(new[] { "bed", "hospital", "hotel", "lodging", "mattress", "patient", "person in bed", "rest", "sleep", "travel" })] [FontAwesomeCategoriesAttribute(new[] { "Household", "Humanitarian", "Maps", "Travel + Hotel", "Users + People" })] Bed = 0xF236, @@ -836,7 +829,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bell" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "alarm", "alert", "bel", "bell", "chime", "notification", "reminder", "request" })] + [FontAwesomeSearchTerms(new[] { "alarm", "alert", "bel", "bell", "chime", "notification", "reminder" })] [FontAwesomeCategoriesAttribute(new[] { "Alert", "Education", "Household", "Maps", "Shopping", "Social", "Time" })] Bell = 0xF0F3, @@ -871,14 +864,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-biking" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person biking", "bicycle", "bike", "biking", "cyclist", "pedal", "person biking", "summer", "uer", "wheel" })] + [FontAwesomeSearchTerms(new[] { "person biking", "bicycle", "bike", "biking", "cyclist", "pedal", "person biking", "summer", "wheel" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Sports + Fitness", "Users + People" })] Biking = 0xF84A, /// /// The Font Awesome "binoculars" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "binoculars", "glasses", "inspection", "magnifier", "magnify", "scenic", "spyglass", "view" })] + [FontAwesomeSearchTerms(new[] { "binoculars", "glasses", "magnify", "scenic", "spyglass", "view" })] [FontAwesomeCategoriesAttribute(new[] { "Astronomy", "Camping", "Maps", "Nature" })] Binoculars = 0xF1E5, @@ -920,7 +913,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-walking-with-cane" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person walking with cane", "blind", "cane", "follow", "uer" })] + [FontAwesomeSearchTerms(new[] { "person walking with cane", "blind", "cane" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Maps", "Users + People" })] Blind = 0xF29D, @@ -976,14 +969,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "book" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "book", "cover", "decorated", "diary", "documentation", "journal", "knowledge", "library", "notebook", "notebook with decorative cover", "read", "research", "scholar" })] + [FontAwesomeSearchTerms(new[] { "book", "cover", "decorated", "diary", "documentation", "journal", "library", "notebook", "notebook with decorative cover", "read", "research" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Maps", "Writing" })] Book = 0xF02D, /// /// The Font Awesome "book-bookmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "book bookmark", "knowledge", "library", "research" })] + [FontAwesomeSearchTerms(new[] { "book bookmark", "library", "research" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Writing" })] BookBookmark = 0xE0BB, @@ -1011,7 +1004,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "book-open" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "book open", "book", "book", "flyer", "knowledge", "library", "notebook", "open", "open book", "pamphlet", "reading", "research" })] + [FontAwesomeSearchTerms(new[] { "book open", "book", "book", "flyer", "library", "notebook", "open", "open book", "pamphlet", "reading", "research" })] [FontAwesomeCategoriesAttribute(new[] { "Education" })] BookOpen = 0xF518, @@ -1137,7 +1130,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "brain" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "brain", "cerebellum", "gray matter", "intellect", "intelligent", "knowledge", "medulla oblongata", "mind", "noodle", "scholar", "wit" })] + [FontAwesomeSearchTerms(new[] { "brain", "cerebellum", "gray matter", "intellect", "intelligent", "medulla oblongata", "mind", "noodle", "wit" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Science" })] Brain = 0xF5DC, @@ -1165,28 +1158,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bridge-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bridge circle check", "bridge", "enable", "not affected", "ok", "okay", "road", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "bridge circle check", "bridge", "not affected", "ok", "okay", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] BridgeCircleCheck = 0xE4C9, /// /// The Font Awesome "bridge-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bridge circle exclamation", "affected", "bridge", "failed", "road" })] + [FontAwesomeSearchTerms(new[] { "bridge circle exclamation", "affected", "bridge", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] BridgeCircleExclamation = 0xE4CA, /// /// The Font Awesome "bridge-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bridge circle xmark", "bridge", "destroy", "road", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "bridge circle xmark", "bridge", "destroy", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] BridgeCircleXmark = 0xE4CB, /// /// The Font Awesome "bridge-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bridge lock", "bridge", "closed", "lockdown", "padlock", "privacy", "quarantine", "road" })] + [FontAwesomeSearchTerms(new[] { "bridge lock", "bridge", "closed", "lockdown", "quarantine", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] BridgeLock = 0xE4CC, @@ -1200,7 +1193,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "briefcase" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bag", "briefcas", "briefcase", "business", "luggage", "offer", "office", "portfolio", "work" })] + [FontAwesomeSearchTerms(new[] { "bag", "briefcas", "briefcase", "business", "luggage", "office", "work" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Maps", "Travel + Hotel" })] Briefcase = 0xF0B1, @@ -1214,7 +1207,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "tower-broadcast" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tower broadcast", "airwaves", "antenna", "communication", "emergency", "radio", "reception", "signal", "waves" })] + [FontAwesomeSearchTerms(new[] { "tower broadcast", "airwaves", "antenna", "communication", "emergency", "radio", "reception", "waves" })] [FontAwesomeCategoriesAttribute(new[] { "Connectivity", "Energy", "Film + Video", "Humanitarian" })] BroadcastTower = 0xF519, @@ -1228,7 +1221,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "brush" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "brush", "art", "bristles", "color", "handle", "maintenance", "modify", "paint" })] + [FontAwesomeSearchTerms(new[] { "brush", "art", "bristles", "color", "handle", "paint" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Design", "Editing" })] Brush = 0xF55D, @@ -1256,7 +1249,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bug-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bug slash", "beetle", "disabled", "fix", "glitch", "insect", "optimize", "repair", "report", "warning" })] + [FontAwesomeSearchTerms(new[] { "bug slash", "beetle", "fix", "glitch", "insect", "optimize", "repair", "report", "warning" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Security" })] BugSlash = 0xE490, @@ -1277,42 +1270,42 @@ public enum FontAwesomeIcon /// /// The Font Awesome "building-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building circle check", "building", "city", "enable", "not affected", "office", "ok", "okay", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "building circle check", "building", "city", "not affected", "office", "ok", "okay" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] BuildingCircleCheck = 0xE4D2, /// /// The Font Awesome "building-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building circle exclamation", "affected", "building", "city", "failed", "office" })] + [FontAwesomeSearchTerms(new[] { "building circle exclamation", "affected", "building", "city", "office" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] BuildingCircleExclamation = 0xE4D3, /// /// The Font Awesome "building-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building circle xmark", "building", "city", "destroy", "office", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "building circle xmark", "building", "city", "destroy", "office" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] BuildingCircleXmark = 0xE4D4, /// /// The Font Awesome "building-flag" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building flag", "building", "city", "diplomat", "embassy", "flag", "headquarters", "united nations" })] + [FontAwesomeSearchTerms(new[] { "building flag", " city", "building", "diplomat", "embassy", "flag", "headquarters", "united nations" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian", "Political" })] BuildingFlag = 0xE4D5, /// /// The Font Awesome "building-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building lock", "building", "city", "closed", "lock", "lockdown", "padlock", "privacy", "quarantine", "secure" })] + [FontAwesomeSearchTerms(new[] { "building lock", "building", "city", "closed", "lock", "lockdown", "quarantine", "secure" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian", "Security" })] BuildingLock = 0xE4D6, /// /// The Font Awesome "building-ngo" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building ngo", "building", "city", "non governmental organization", "office" })] + [FontAwesomeSearchTerms(new[] { "building ngo", " city", "building", "non governmental organization", "office" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] BuildingNgo = 0xE4D7, @@ -1333,7 +1326,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "building-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "building user", "apartment", "building", "city", "employee", "uer" })] + [FontAwesomeSearchTerms(new[] { "building user", "apartment", "building", "city" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] BuildingUser = 0xE4DA, @@ -1347,7 +1340,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bullhorn" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bullhorn", "bullhorn", "announcement", "broadcast", "loud", "louder", "loudspeaker", "megaphone", "public address", "request", "share" })] + [FontAwesomeSearchTerms(new[] { "bullhorn", "bullhorn", "announcement", "broadcast", "loud", "louder", "loudspeaker", "megaphone", "public address", "share" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication", "Marketing", "Political", "Shopping" })] Bullhorn = 0xF0A1, @@ -1389,17 +1382,10 @@ public enum FontAwesomeIcon /// /// The Font Awesome "business-time" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "business time", "alarm", "briefcase", "business socks", "clock", "flight of the conchords", "portfolio", "reminder", "wednesday" })] + [FontAwesomeSearchTerms(new[] { "business time", "alarm", "briefcase", "business socks", "clock", "flight of the conchords", "reminder", "wednesday" })] [FontAwesomeCategoriesAttribute(new[] { "Business" })] BusinessTime = 0xF64A, - /// - /// The Font Awesome "bus-side" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "bus side", "bus", "public transportation", "transportation", "travel", "vehicle" })] - [FontAwesomeCategoriesAttribute(new[] { "Automotive", "Humanitarian", "Logistics", "Transportation", "Travel + Hotel" })] - BusSide = 0xE81D, - /// /// The Font Awesome "calculator" icon unicode character. /// @@ -1424,7 +1410,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "calendar-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "calendar check", "accept", "agree", "appointment", "confirm", "correct", "date", "day", "done", "enable", "event", "month", "ok", "schedule", "select", "success", "tick", "time", "todo", "validate", "warranty", "when", "working", "year" })] + [FontAwesomeSearchTerms(new[] { "calendar check", "accept", "agree", "appointment", "confirm", "correct", "date", "day", "done", "event", "month", "ok", "schedule", "select", "success", "tick", "time", "todo", "when", "year" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] CalendarCheck = 0xF274, @@ -1452,7 +1438,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "calendar-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "calendar xmark", "archive", "calendar", "date", "day", "delete", "event", "month", "remove", "schedule", "time", "uncheck", "when", "x", "year" })] + [FontAwesomeSearchTerms(new[] { "calendar xmark", "archive", "calendar", "date", "day", "delete", "event", "month", "remove", "schedule", "time", "when", "x", "year" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] CalendarTimes = 0xF273, @@ -1466,21 +1452,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "camera" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "camera", "image", "img", "lens", "photo", "picture", "record", "shutter", "video" })] + [FontAwesomeSearchTerms(new[] { "camera", "image", "lens", "photo", "picture", "record", "shutter", "video" })] [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware", "Photos + Images", "Shopping", "Social" })] Camera = 0xF030, /// /// The Font Awesome "camera-retro" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "camera retro", "camera", "image", "img", "lens", "photo", "picture", "record", "shutter", "video" })] + [FontAwesomeSearchTerms(new[] { "camera retro", "camera", "image", "lens", "photo", "picture", "record", "shutter", "video" })] [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware", "Photos + Images", "Shopping" })] CameraRetro = 0xF083, /// /// The Font Awesome "camera-rotate" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "camera rotate", "flip", "front-facing", "img", "photo", "selfie" })] + [FontAwesomeSearchTerms(new[] { "camera rotate", "flip", "front-facing", "photo", "selfie" })] [FontAwesomeCategoriesAttribute(new[] { "Photos + Images" })] CameraRotate = 0xE0D8, @@ -1571,7 +1557,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "square-caret-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square caret down", "arrow", "caret-square-o-down", "dropdown", "expand", "insert", "menu", "more", "triangle" })] + [FontAwesomeSearchTerms(new[] { "square caret down", "arrow", "caret-square-o-down", "dropdown", "expand", "menu", "more", "triangle" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] CaretSquareDown = 0xF150, @@ -1592,14 +1578,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "square-caret-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square caret up", "arrow", "caret-square-o-up", "collapse", "triangle", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "square caret up", "arrow", "caret-square-o-up", "collapse", "triangle", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] CaretSquareUp = 0xF151, /// /// The Font Awesome "caret-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "caret up", "arrow", "collapse", "triangle", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "caret up", "arrow", "collapse", "triangle" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] CaretUp = 0xF0D8, @@ -1627,7 +1613,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "cart-arrow-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "cart arrow down", "download", "insert", "save", "shopping" })] + [FontAwesomeSearchTerms(new[] { "cart arrow down", "download", "save", "shopping" })] [FontAwesomeCategoriesAttribute(new[] { "Shopping" })] CartArrowDown = 0xF218, @@ -1676,7 +1662,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "certificate" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "certificate", "badge", "guarantee", "star", "verified" })] + [FontAwesomeSearchTerms(new[] { "certificate", "badge", "star", "verified" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Shapes", "Shopping", "Spinners" })] Certificate = 0xF0A3, @@ -1697,98 +1683,91 @@ public enum FontAwesomeIcon /// /// The Font Awesome "chalkboard-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chalkboard user", "blackboard", "instructor", "learning", "professor", "school", "uer", "whiteboard", "writing" })] + [FontAwesomeSearchTerms(new[] { "chalkboard user", "blackboard", "instructor", "learning", "professor", "school", "whiteboard", "writing" })] [FontAwesomeCategoriesAttribute(new[] { "Education", "Users + People" })] ChalkboardTeacher = 0xF51C, /// /// The Font Awesome "charging-station" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "charging station", "car charger", "charge", "charging", "electric", "ev", "tesla", "vehicle" })] + [FontAwesomeSearchTerms(new[] { "charging station", "electric", "ev", "tesla", "vehicle" })] [FontAwesomeCategoriesAttribute(new[] { "Automotive", "Energy" })] ChargingStation = 0xF5E7, /// /// The Font Awesome "chart-area" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart area", "analytics", "area", "chart", "graph", "performance", "revenue", "statistics" })] + [FontAwesomeSearchTerms(new[] { "chart area", "analytics", "area", "chart", "graph" })] [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams" })] ChartArea = 0xF1FE, /// /// The Font Awesome "chart-bar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart bar", "analytics", "bar", "chart", "graph", "performance", "statistics" })] + [FontAwesomeSearchTerms(new[] { "chart bar", "analytics", "bar", "chart", "graph" })] [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams" })] ChartBar = 0xF080, /// /// The Font Awesome "chart-column" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart column", "bar", "bar chart", "chart", "graph", "performance", "revenue", "statistics", "track", "trend" })] + [FontAwesomeSearchTerms(new[] { "chart column", "bar", "bar chart", "chart", "graph", "track", "trend" })] [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams" })] ChartColumn = 0xE0E3, - /// - /// The Font Awesome "chart-diagram" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "chart diagram", "algorithm", "analytics", "flow", "graph" })] - [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams", "Coding" })] - ChartDiagram = 0xE695, - /// /// The Font Awesome "chart-gantt" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart gantt", "chart", "graph", "performance", "statistics", "track", "trend" })] + [FontAwesomeSearchTerms(new[] { "chart gantt", "chart", "graph", "track", "trend" })] [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams" })] ChartGantt = 0xE0E4, /// /// The Font Awesome "chart-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart line", "activity", "analytics", "chart", "dashboard", "gain", "graph", "increase", "line", "performance", "revenue", "statistics" })] + [FontAwesomeSearchTerms(new[] { "chart line", "activity", "analytics", "chart", "dashboard", "gain", "graph", "increase", "line" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Charts + Diagrams", "Money" })] ChartLine = 0xF201, /// /// The Font Awesome "chart-pie" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart pie", "analytics", "chart", "diagram", "graph", "performance", "pie", "revenue", "statistics" })] + [FontAwesomeSearchTerms(new[] { "chart pie", "analytics", "chart", "diagram", "graph", "pie" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Charts + Diagrams", "Money" })] ChartPie = 0xF200, /// /// The Font Awesome "chart-simple" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chart simple", "analytics", "bar", "chart", "column", "graph", "performance", "revenue", "row", "statistics", "trend" })] + [FontAwesomeSearchTerms(new[] { "chart simple", "analytics", "bar", "chart", "column", "graph", "row", "trend" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Charts + Diagrams", "Editing", "Logistics", "Marketing" })] ChartSimple = 0xE473, /// /// The Font Awesome "check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "check mark", "accept", "agree", "check", "check mark", "checkmark", "confirm", "correct", "coupon", "done", "enable", "mark", "notice", "notification", "notify", "ok", "select", "success", "tick", "todo", "true", "validate", "working", "yes", "✓" })] + [FontAwesomeSearchTerms(new[] { "check mark", "accept", "agree", "check", "check mark", "checkmark", "confirm", "correct", "done", "mark", "notice", "notification", "notify", "ok", "select", "success", "tick", "todo", "yes", "✓" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Punctuation + Symbols", "Text Formatting" })] Check = 0xF00C, /// /// The Font Awesome "circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle check", "accept", "affected", "agree", "clear", "confirm", "correct", "coupon", "done", "enable", "ok", "select", "success", "tick", "todo", "validate", "working", "yes" })] + [FontAwesomeSearchTerms(new[] { "circle check", "accept", "affected", "agree", "clear", "confirm", "correct", "done", "ok", "select", "success", "tick", "todo", "yes" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Text Formatting", "Toggle" })] CheckCircle = 0xF058, /// /// The Font Awesome "check-double" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "check double", "accept", "agree", "checkmark", "confirm", "correct", "coupon", "done", "enable", "notice", "notification", "notify", "ok", "select", "select all", "success", "tick", "todo", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "check double", "accept", "agree", "checkmark", "confirm", "correct", "done", "notice", "notification", "notify", "ok", "select", "success", "tick", "todo" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Political", "Punctuation + Symbols", "Text Formatting" })] CheckDouble = 0xF560, /// /// The Font Awesome "square-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square check", "accept", "agree", "box", "button", "check", "check box with check", "check mark button", "checkmark", "confirm", "correct", "coupon", "done", "enable", "mark", "ok", "select", "success", "tick", "todo", "validate", "working", "yes", "✓" })] + [FontAwesomeSearchTerms(new[] { "square check", "accept", "agree", "box", "button", "check", "check box with check", "check mark button", "checkmark", "confirm", "correct", "done", "mark", "ok", "select", "success", "tick", "todo", "yes", "✓" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Text Formatting" })] CheckSquare = 0xF14A, @@ -1879,14 +1858,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "circle-chevron-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle chevron up", "arrow", "collapse", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "circle chevron up", "arrow", "collapse", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ChevronCircleUp = 0xF139, /// /// The Font Awesome "chevron-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chevron down", "arrow", "download", "expand", "insert" })] + [FontAwesomeSearchTerms(new[] { "chevron down", "arrow", "download", "expand" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ChevronDown = 0xF078, @@ -1907,14 +1886,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "chevron-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "chevron up", "arrow", "collapse", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "chevron up", "arrow", "collapse", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ChevronUp = 0xF077, /// /// The Font Awesome "child" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "child", "boy", "girl", "kid", "toddler", "uer", "young", "youth" })] + [FontAwesomeSearchTerms(new[] { "child", "boy", "girl", "kid", "toddler", "young", "youth" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Users + People" })] Child = 0xF1AE, @@ -1928,21 +1907,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "child-dress" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "child dress", "boy", "girl", "kid", "toddler", "uer", "young", "youth" })] + [FontAwesomeSearchTerms(new[] { "child dress", "boy", "girl", "kid", "toddler", "young", "youth" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Users + People" })] ChildDress = 0xE59C, /// /// The Font Awesome "child-reaching" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "child reaching", "boy", "girl", "kid", "toddler", "uer", "young", "youth" })] + [FontAwesomeSearchTerms(new[] { "child reaching", "boy", "girl", "kid", "toddler", "young", "youth" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Users + People" })] ChildReaching = 0xE59D, /// /// The Font Awesome "children" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "children", "boy", "child", "girl", "kid", "kids", "together", "uer", "young", "youth" })] + [FontAwesomeSearchTerms(new[] { "children", "boy", "child", "girl", "kid", "kids", "young", "youth" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Humanitarian", "Users + People" })] Children = 0xE4E1, @@ -1998,49 +1977,49 @@ public enum FontAwesomeIcon /// /// The Font Awesome "clipboard" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clipboard", "copy", "notepad", "notes", "paste", "record" })] + [FontAwesomeSearchTerms(new[] { "clipboar", "clipboard", "copy", "notes", "paste", "record" })] [FontAwesomeCategoriesAttribute(new[] { "Business" })] Clipboard = 0xF328, /// /// The Font Awesome "clipboard-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clipboard check", "accept", "agree", "confirm", "coupon", "done", "enable", "ok", "select", "success", "tick", "todo", "validate", "working", "yes" })] - [FontAwesomeCategoriesAttribute(new[] { "Business", "Logistics", "Science" })] + [FontAwesomeSearchTerms(new[] { "clipboard check", "accept", "agree", "confirm", "done", "ok", "select", "success", "tick", "todo", "yes" })] + [FontAwesomeCategoriesAttribute(new[] { "Logistics", "Science" })] ClipboardCheck = 0xF46C, /// /// The Font Awesome "clipboard-list" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clipboard list", "cheatsheet", "checklist", "completed", "done", "finished", "intinerary", "ol", "schedule", "summary", "survey", "tick", "todo", "ul", "wishlist" })] + [FontAwesomeSearchTerms(new[] { "clipboard list", "checklist", "completed", "done", "finished", "intinerary", "ol", "schedule", "tick", "todo", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Logistics" })] ClipboardList = 0xF46D, /// /// The Font Awesome "clipboard-question" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clipboard question", "assistance", "faq", "interview", "query", "question" })] + [FontAwesomeSearchTerms(new[] { "clipboard question", "assistance", "interview", "query", "question" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Humanitarian", "Logistics" })] ClipboardQuestion = 0xE4E3, /// /// The Font Awesome "clipboard-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clipboard user", "attendance", "employee", "record", "roster", "staff", "uer" })] - [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Medical + Health", "Users + People" })] + [FontAwesomeSearchTerms(new[] { "clipboard user", "attendance", "record", "roster", "staff" })] + [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health", "Users + People" })] ClipboardUser = 0xF7F3, /// /// The Font Awesome "clock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "00", "4", "4:00", "clock", "date", "four", "four o’clock", "hour", "late", "minute", "o'clock", "o’clock", "pending", "schedule", "ticking", "time", "timer", "timestamp", "watch" })] + [FontAwesomeSearchTerms(new[] { "00", "4", "4:00", "clock", "date", "four", "four o’clock", "hour", "late", "minute", "o'clock", "o’clock", "schedule", "ticking", "time", "timer", "timestamp", "watch" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] Clock = 0xF017, /// /// The Font Awesome "clone" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clone", "add", "arrange", "copy", "duplicate", "new", "paste" })] + [FontAwesomeSearchTerms(new[] { "clone", "arrange", "copy", "duplicate", "paste" })] [FontAwesomeCategoriesAttribute(new[] { "Design", "Files", "Photos + Images" })] Clone = 0xF24D, @@ -2133,7 +2112,7 @@ public enum FontAwesomeIcon /// The Font Awesome "cloud-arrow-up" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xF0EE. /// - [FontAwesomeSearchTerms(new[] { "cloud arrow up", "import", "save", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "cloud arrow up", "import", "save", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Connectivity" })] CloudUploadAlt = 0xF382, @@ -2154,14 +2133,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "code" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "brackets", "code", "development", "html", "mysql", "sql" })] + [FontAwesomeSearchTerms(new[] { "brackets", "code", "development", "html" })] [FontAwesomeCategoriesAttribute(new[] { "Coding" })] Code = 0xF121, /// /// The Font Awesome "code-branch" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "code branch", "branch", "git", "github", "mysql", "rebase", "sql", "svn", "vcs", "version" })] + [FontAwesomeSearchTerms(new[] { "code branch", "branch", "git", "github", "rebase", "svn", "vcs", "version" })] [FontAwesomeCategoriesAttribute(new[] { "Coding" })] CodeBranch = 0xF126, @@ -2210,21 +2189,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "gear" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "cog", "cogwheel", "configuration", "gear", "mechanical", "modify", "settings", "sprocket", "tool", "wheel" })] + [FontAwesomeSearchTerms(new[] { "cog", "cogwheel", "gear", "mechanical", "settings", "sprocket", "tool", "wheel" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Editing", "Spinners" })] Cog = 0xF013, /// /// The Font Awesome "gears" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "configuration", "gears", "mechanical", "modify", "settings", "sprocket", "wheel" })] + [FontAwesomeSearchTerms(new[] { "gears", "mechanical", "settings", "sprocket", "wheel" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Logistics" })] Cogs = 0xF085, /// /// The Font Awesome "coins" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "coins", "currency", "dime", "financial", "gold", "money", "penny", "premium" })] + [FontAwesomeSearchTerms(new[] { "coins", "currency", "dime", "financial", "gold", "money", "penny" })] [FontAwesomeCategoriesAttribute(new[] { "Money" })] Coins = 0xF51E, @@ -2238,70 +2217,63 @@ public enum FontAwesomeIcon /// /// The Font Awesome "table-columns" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "table columns", "browser", "category", "dashboard", "organize", "panes", "split" })] + [FontAwesomeSearchTerms(new[] { "table columns", "browser", "dashboard", "organize", "panes", "split" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Text Formatting" })] Columns = 0xF0DB, /// /// The Font Awesome "comment" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comment", "right speech bubble", "answer", "bubble", "chat", "commenting", "conversation", "conversation", "discussion", "feedback", "message", "note", "notification", "sms", "speech", "talk", "talking", "texting" })] + [FontAwesomeSearchTerms(new[] { "comment", "right speech bubble", "bubble", "chat", "commenting", "conversation", "feedback", "message", "note", "notification", "sms", "speech", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Shapes", "Social" })] Comment = 0xF075, /// /// The Font Awesome "message" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "answer", "bubble", "chat", "commenting", "conversation", "conversation", "discussion", "feedback", "message", "note", "notification", "sms", "speech", "talk", "talking", "texting" })] + [FontAwesomeSearchTerms(new[] { "bubble", "chat", "commenting", "conversation", "feedback", "message", "note", "notification", "sms", "speech", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Social" })] CommentAlt = 0xF27A, /// /// The Font Awesome "comment-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comment dollar", "answer", "bubble", "chat", "commenting", "conversation", "feedback", "message", "money", "note", "notification", "pay", "salary", "sms", "speech", "spend", "texting", "transfer" })] + [FontAwesomeSearchTerms(new[] { "comment dollar", "bubble", "chat", "commenting", "conversation", "feedback", "message", "money", "note", "notification", "pay", "sms", "speech", "spend", "texting", "transfer" })] [FontAwesomeCategoriesAttribute(new[] { "Marketing", "Money" })] CommentDollar = 0xF651, /// /// The Font Awesome "comment-dots" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comment dots", "answer", "balloon", "bubble", "chat", "comic", "commenting", "conversation", "dialog", "feedback", "message", "more", "note", "notification", "reply", "request", "sms", "speech", "speech balloon", "texting" })] + [FontAwesomeSearchTerms(new[] { "comment dots", "balloon", "bubble", "chat", "comic", "commenting", "conversation", "dialog", "feedback", "message", "more", "note", "notification", "reply", "sms", "speech", "speech balloon", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication" })] CommentDots = 0xF4AD, /// /// The Font Awesome "comment-medical" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comment medical", "advice", "answer", "bubble", "chat", "commenting", "conversation", "diagnose", "feedback", "message", "note", "notification", "prescription", "sms", "speech", "texting" })] + [FontAwesomeSearchTerms(new[] { "comment medical", "advice", "bubble", "chat", "commenting", "conversation", "diagnose", "feedback", "message", "note", "notification", "prescription", "sms", "speech", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Medical + Health" })] CommentMedical = 0xF7F5, - /// - /// The Font Awesome "comment-nodes" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "comment nodes", "ai", "artificial intelligence", "cluster", "language", "model", "network", "neuronal" })] - [FontAwesomeCategoriesAttribute(new[] { "Coding", "Communication" })] - CommentNodes = 0xE696, - /// /// The Font Awesome "comments" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comments", "two speech bubbles", "answer", "bubble", "chat", "commenting", "conversation", "conversation", "discussion", "feedback", "message", "note", "notification", "sms", "speech", "talk", "talking", "texting" })] + [FontAwesomeSearchTerms(new[] { "comments", "two speech bubbles", "bubble", "chat", "commenting", "conversation", "feedback", "message", "note", "notification", "sms", "speech", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication" })] Comments = 0xF086, /// /// The Font Awesome "comments-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comments dollar", "answer", "bubble", "chat", "commenting", "conversation", "feedback", "message", "money", "note", "notification", "pay", "salary", "sms", "speech", "spend", "texting", "transfer" })] + [FontAwesomeSearchTerms(new[] { "comments dollar", "bubble", "chat", "commenting", "conversation", "feedback", "message", "money", "note", "notification", "pay", "sms", "speech", "spend", "texting", "transfer" })] [FontAwesomeCategoriesAttribute(new[] { "Marketing", "Money" })] CommentsDollar = 0xF653, /// /// The Font Awesome "comment-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comment slash", "answer", "bubble", "cancel", "chat", "commenting", "conversation", "disabled", "feedback", "message", "mute", "note", "notification", "quiet", "sms", "speech", "texting" })] + [FontAwesomeSearchTerms(new[] { "comment slash", "bubble", "cancel", "chat", "commenting", "conversation", "feedback", "message", "mute", "note", "notification", "quiet", "sms", "speech", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication" })] CommentSlash = 0xF4B3, @@ -2329,7 +2301,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "down-left-and-up-right-to-center" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "down left and up right to center", "collapse", "fullscreen", "minimize", "move", "resize", "scale", "shrink", "size", "smaller" })] + [FontAwesomeSearchTerms(new[] { "down left and up right to center", "collapse", "fullscreen", "minimize", "move", "resize", "shrink", "smaller" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] CompressAlt = 0xF422, @@ -2350,7 +2322,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "bell-concierge" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bell concierge", "attention", "bell", "bellhop", "bellhop bell", "hotel", "receptionist", "request", "service", "support" })] + [FontAwesomeSearchTerms(new[] { "bell concierge", "attention", "bell", "bellhop", "bellhop bell", "hotel", "receptionist", "service", "support" })] [FontAwesomeCategoriesAttribute(new[] { "Travel + Hotel" })] ConciergeBell = 0xF562, @@ -2406,14 +2378,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "crop" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "crop", "design", "frame", "mask", "modify", "resize", "shrink" })] + [FontAwesomeSearchTerms(new[] { "crop", "design", "frame", "mask", "resize", "shrink" })] [FontAwesomeCategoriesAttribute(new[] { "Design", "Editing" })] Crop = 0xF125, /// /// The Font Awesome "crop-simple" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "crop simple", "design", "frame", "mask", "modify", "resize", "shrink" })] + [FontAwesomeSearchTerms(new[] { "crop simple", "design", "frame", "mask", "resize", "shrink" })] [FontAwesomeCategoriesAttribute(new[] { "Design", "Editing" })] CropAlt = 0xF565, @@ -2441,7 +2413,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "crown" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "award", "clothing", "crown", "favorite", "king", "queen", "royal", "tiara", "vip" })] + [FontAwesomeSearchTerms(new[] { "award", "clothing", "crown", "favorite", "king", "queen", "royal", "tiara" })] [FontAwesomeCategoriesAttribute(new[] { "Shapes" })] Crown = 0xF521, @@ -2483,14 +2455,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "scissors" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "black safety scissors", "white scissors", "clip", "cutting", "equipment", "modify", "scissors", "snip", "tool" })] + [FontAwesomeSearchTerms(new[] { "black safety scissors", "white scissors", "clip", "cutting", "scissors", "snip", "tool" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Editing", "Files" })] Cut = 0xF0C4, /// /// The Font Awesome "database" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "database", "computer", "development", "directory", "memory", "mysql", "sql", "storage" })] + [FontAwesomeSearchTerms(new[] { "database", "computer", "development", "directory", "memory", "storage" })] [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware" })] Database = 0xF1C0, @@ -2498,7 +2470,7 @@ public enum FontAwesomeIcon /// The Font Awesome "ear-deaf" icon unicode character. /// [FontAwesomeSearchTerms(new[] { "ear deaf", "ear", "hearing", "sign language" })] - [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Communication" })] + [FontAwesomeCategoriesAttribute(new[] { "Accessibility" })] Deaf = 0xF2A4, /// @@ -2526,7 +2498,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-dots-from-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person dots from line", "allergy", "diagnosis", "uer" })] + [FontAwesomeSearchTerms(new[] { "person dots from line", "allergy", "diagnosis" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Users + People" })] Diagnoses = 0xF470, @@ -2554,7 +2526,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "diamond" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "diamond", "ace", "card", "cards", "diamond suit", "game", "gem", "gemstone", "poker", "suit" })] + [FontAwesomeSearchTerms(new[] { "diamond", "card", "cards", "diamond suit", "game", "gem", "gemstone", "poker", "suit" })] [FontAwesomeCategoriesAttribute(new[] { "Gaming", "Shapes" })] Diamond = 0xF219, @@ -2681,7 +2653,7 @@ public enum FontAwesomeIcon /// The Font Awesome "dollar-sign" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0x24. /// - [FontAwesomeSearchTerms(new[] { "dollar sign", "dollar sign", "coupon", "currency", "dollar", "heavy dollar sign", "investment", "money", "premium", "revenue", "salary" })] + [FontAwesomeSearchTerms(new[] { "dollar sign", "dollar sign", "currency", "dollar", "heavy dollar sign", "money" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Maps", "Money" })] DollarSign = 0xF155, @@ -2702,7 +2674,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "circle-dollar-to-slot" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle dollar to slot", "contribute", "generosity", "gift", "give", "premium" })] + [FontAwesomeSearchTerms(new[] { "circle dollar to slot", "contribute", "generosity", "gift", "give" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Money", "Political" })] Donate = 0xF4B9, @@ -2716,7 +2688,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "door-closed" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "door closed", "doo", "door", "enter", "exit", "locked", "privacy" })] + [FontAwesomeSearchTerms(new[] { "door closed", "doo", "door", "enter", "exit", "locked" })] [FontAwesomeCategoriesAttribute(new[] { "Household", "Security", "Travel + Hotel" })] DoorClosed = 0xF52A, @@ -2744,7 +2716,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "download" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "download", "export", "hard drive", "insert", "save", "transfer" })] + [FontAwesomeSearchTerms(new[] { "download", "export", "hard drive", "save", "transfer" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Devices + Hardware" })] Download = 0xF019, @@ -2793,7 +2765,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "dumbbell" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "dumbbell", "exercise", "gym", "strength", "weight", "weight-lifting", "workout" })] + [FontAwesomeSearchTerms(new[] { "dumbbell", "exercise", "gym", "strength", "weight", "weight-lifting" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness", "Travel + Hotel" })] Dumbbell = 0xF44B, @@ -2828,7 +2800,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "pen-to-square" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "pen to square", "edit", "modify", "pen", "pencil", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "pen to square", "edit", "pen", "pencil", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Editing", "Writing" })] Edit = 0xF044, @@ -2849,56 +2821,56 @@ public enum FontAwesomeIcon /// /// The Font Awesome "elevator" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "accessibility", "elevator", "hoist", "lift", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "accessibility", "elevator", "hoist", "lift", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Travel + Hotel", "Users + People" })] Elevator = 0xE16D, /// /// The Font Awesome "ellipsis" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ellipsis", "dots", "drag", "kebab", "list", "menu", "nav", "navigation", "ol", "pacman", "reorder", "settings", "three dots", "ul" })] + [FontAwesomeSearchTerms(new[] { "ellipsis", "dots", "drag", "kebab", "list", "menu", "nav", "navigation", "ol", "pacman", "reorder", "settings", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Editing" })] EllipsisH = 0xF141, /// /// The Font Awesome "ellipsis-vertical" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ellipsis vertical", "bullet", "dots", "drag", "kebab", "list", "menu", "nav", "navigation", "ol", "reorder", "settings", "three dots", "ul" })] + [FontAwesomeSearchTerms(new[] { "ellipsis vertical", "dots", "drag", "kebab", "list", "menu", "nav", "navigation", "ol", "reorder", "settings", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Editing" })] EllipsisV = 0xF142, /// /// The Font Awesome "envelope" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "back of envelope", "e-mail", "email", "envelope", "letter", "mail", "message", "newsletter", "notification", "offer", "support" })] + [FontAwesomeSearchTerms(new[] { "back of envelope", "e-mail", "email", "envelope", "letter", "mail", "message", "notification", "support" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication", "Humanitarian", "Social", "Writing" })] Envelope = 0xF0E0, /// /// The Font Awesome "envelope-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "envelope circle check", "check", "email", "enable", "envelope", "mail", "not affected", "ok", "okay", "read", "sent", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "envelope circle check", "check", "email", "envelope", "mail", "not affected", "ok", "okay", "read", "sent" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication", "Humanitarian" })] EnvelopeCircleCheck = 0xE4E8, /// /// The Font Awesome "envelope-open" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "envelope open", "e-mail", "email", "letter", "mail", "message", "newsletter", "notification", "offer", "support" })] + [FontAwesomeSearchTerms(new[] { "envelope open", "e-mail", "email", "letter", "mail", "message", "notification", "support" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication", "Writing" })] EnvelopeOpen = 0xF2B6, /// /// The Font Awesome "envelope-open-text" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "envelope open text", "e-mail", "email", "letter", "mail", "message", "newsletter", "notification", "offer", "support" })] + [FontAwesomeSearchTerms(new[] { "envelope open text", "e-mail", "email", "letter", "mail", "message", "notification", "support" })] [FontAwesomeCategoriesAttribute(new[] { "Marketing" })] EnvelopeOpenText = 0xF658, /// /// The Font Awesome "square-envelope" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square envelope", "e-mail", "email", "letter", "mail", "message", "notification", "offer", "support" })] + [FontAwesomeSearchTerms(new[] { "square envelope", "e-mail", "email", "letter", "mail", "message", "notification", "support" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication" })] EnvelopeSquare = 0xF199, @@ -2942,42 +2914,42 @@ public enum FontAwesomeIcon /// The Font Awesome "exclamation" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0x21. /// - [FontAwesomeSearchTerms(new[] { "!", "exclamation mark", "alert", "attention", "danger", "error", "exclamation", "failed", "important", "mark", "notice", "notification", "notify", "outlined", "problem", "punctuation", "red exclamation mark", "required", "warning", "white exclamation mark" })] + [FontAwesomeSearchTerms(new[] { "!", "exclamation mark", "alert", "danger", "error", "exclamation", "important", "mark", "notice", "notification", "notify", "outlined", "problem", "punctuation", "red exclamation mark", "warning", "white exclamation mark" })] [FontAwesomeCategoriesAttribute(new[] { "Alert", "Punctuation + Symbols" })] Exclamation = 0xF12A, /// /// The Font Awesome "circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle exclamation", "affect", "alert", "attention", "damage", "danger", "error", "failed", "important", "notice", "notification", "notify", "problem", "required", "warning" })] + [FontAwesomeSearchTerms(new[] { "circle exclamation", "affect", "alert", "damage", "danger", "error", "important", "notice", "notification", "notify", "problem", "warning" })] [FontAwesomeCategoriesAttribute(new[] { "Alert", "Punctuation + Symbols" })] ExclamationCircle = 0xF06A, /// /// The Font Awesome "triangle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "triangle exclamation", "alert", "attention", "danger", "error", "failed", "important", "notice", "notification", "notify", "problem", "required", "warnin", "warning" })] + [FontAwesomeSearchTerms(new[] { "triangle exclamation", "alert", "danger", "error", "important", "notice", "notification", "notify", "problem", "warnin", "warning" })] [FontAwesomeCategoriesAttribute(new[] { "Alert" })] ExclamationTriangle = 0xF071, /// /// The Font Awesome "expand" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows", "bigger", "enlarge", "expand", "fullscreen", "maximize", "resize", "resize", "scale", "size", "viewfinder" })] + [FontAwesomeSearchTerms(new[] { "expand", "bigger", "crop", "enlarge", "focus", "fullscreen", "resize", "viewfinder" })] [FontAwesomeCategoriesAttribute(new[] { "Media Playback" })] Expand = 0xF065, /// /// The Font Awesome "up-right-and-down-left-from-center" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "up right and down left from center", "arrows", "bigger", "enlarge", "expand", "fullscreen", "maximize", "resize", "resize", "scale", "size" })] + [FontAwesomeSearchTerms(new[] { "up right and down left from center", "arrows", "bigger", "enlarge", "fullscreen", "resize" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] ExpandAlt = 0xF424, /// /// The Font Awesome "maximize" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows", "bigger", "enlarge", "expand", "fullscreen", "maximize", "resize", "resize", "scale", "size" })] + [FontAwesomeSearchTerms(new[] { "maximize", "bigger", "enlarge", "fullscreen", "move", "resize" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] ExpandArrowsAlt = 0xF31E, @@ -2991,7 +2963,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "up-right-from-square" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "up right from square", "external-link", "new", "open", "share", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "up right from square", "external-link", "new", "open", "share" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] ExternalLinkAlt = 0xF35D, @@ -3019,7 +2991,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "eye-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "eye slash", "blind", "disabled", "hide", "show", "toggle", "unseen", "views", "visible", "visiblity" })] + [FontAwesomeSearchTerms(new[] { "eye slash", "blind", "hide", "show", "toggle", "unseen", "views", "visible", "visiblity" })] [FontAwesomeCategoriesAttribute(new[] { "Design", "Editing", "Maps", "Photos + Images", "Security" })] EyeSlash = 0xF070, @@ -3033,14 +3005,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "backward-fast" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "backward fast", "arrow", "beginning", "first", "last track button", "previous", "previous scene", "previous track", "quick", "rewind", "start", "triangle" })] + [FontAwesomeSearchTerms(new[] { "backward fast", "arrow", "beginning", "first", "last track button", "previous", "previous scene", "previous track", "rewind", "start", "triangle" })] [FontAwesomeCategoriesAttribute(new[] { "Media Playback" })] FastBackward = 0xF049, /// /// The Font Awesome "forward-fast" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "forward fast", "arrow", "end", "last", "next", "next scene", "next track", "next track button", "quick", "triangle" })] + [FontAwesomeSearchTerms(new[] { "forward fast", "arrow", "end", "last", "next", "next scene", "next track", "next track button", "triangle" })] [FontAwesomeCategoriesAttribute(new[] { "Media Playback" })] FastForward = 0xF050, @@ -3082,7 +3054,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-dress" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person dress", "man", "skirt", "uer", "woman" })] + [FontAwesomeSearchTerms(new[] { "person dress", "man", "skirt", "woman" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] Female = 0xF182, @@ -3103,7 +3075,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file", "empty document", "cv", "document", "new", "page", "page facing up", "pdf", "resume" })] + [FontAwesomeSearchTerms(new[] { "file", "empty document", "document", "new", "page", "page facing up", "pdf", "resume" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Coding", "Files", "Humanitarian", "Shapes", "Writing" })] File = 0xF15B, @@ -3131,14 +3103,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file circle check", "document", "enable", "file", "not affected", "ok", "okay", "paper", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "file circle check", "document", "file", "not affected", "ok", "okay", "paper" })] [FontAwesomeCategoriesAttribute(new[] { "Files", "Humanitarian" })] FileCircleCheck = 0xE5A0, /// /// The Font Awesome "file-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file circle exclamation", "document", "failed", "file", "paper" })] + [FontAwesomeSearchTerms(new[] { "file circle exclamation", "document", "file", "paper" })] [FontAwesomeCategoriesAttribute(new[] { "Files", "Humanitarian" })] FileCircleExclamation = 0xE4EB, @@ -3166,21 +3138,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file circle xmark", "document", "file", "paper", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "file circle xmark", "document", "file", "paper" })] [FontAwesomeCategoriesAttribute(new[] { "Files", "Humanitarian" })] FileCircleXmark = 0xE5A1, /// /// The Font Awesome "file-code" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file code", "css", "development", "document", "html", "mysql", "sql" })] + [FontAwesomeSearchTerms(new[] { "file code", "css", "development", "document", "html" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Files" })] FileCode = 0xF1C9, /// /// The Font Awesome "file-contract" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file contract", "agreement", "binding", "document", "legal", "signature", "username" })] + [FontAwesomeSearchTerms(new[] { "file contract", "agreement", "binding", "document", "legal", "signature" })] [FontAwesomeCategoriesAttribute(new[] { "Security" })] FileContract = 0xF56C, @@ -3194,7 +3166,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file-arrow-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file arrow down", "archive", "document", "export", "insert", "save" })] + [FontAwesomeSearchTerms(new[] { "file arrow down", "document", "export", "save" })] [FontAwesomeCategoriesAttribute(new[] { "Files" })] FileDownload = 0xF56D, @@ -3212,31 +3184,17 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Files" })] FileExport = 0xF56E, - /// - /// The Font Awesome "file-fragment" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "file fragment", "block", "data", "partial", "piece" })] - [FontAwesomeCategoriesAttribute(new[] { "Files" })] - FileFragment = 0xE697, - - /// - /// The Font Awesome "file-half-dashed" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "file half dashed", "data", "fragment", "partial", "piece" })] - [FontAwesomeCategoriesAttribute(new[] { "Files" })] - FileHalfDashed = 0xE698, - /// /// The Font Awesome "file-image" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file image", "document with picture", "document", "image", "img", "jpg", "photo", "png" })] + [FontAwesomeSearchTerms(new[] { "file image", "document with picture", "document", "image", "jpg", "photo", "png" })] [FontAwesomeCategoriesAttribute(new[] { "Files", "Photos + Images" })] FileImage = 0xF1C5, /// /// The Font Awesome "file-import" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file import", "copy", "document", "insert", "send", "upload" })] + [FontAwesomeSearchTerms(new[] { "file import", "copy", "document", "send", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Files" })] FileImport = 0xF56F, @@ -3250,7 +3208,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file-invoice-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file invoice dollar", "$", "account", "bill", "charge", "document", "dollar-sign", "money", "payment", "receipt", "revenue", "salary", "usd" })] + [FontAwesomeSearchTerms(new[] { "file invoice dollar", "$", "account", "bill", "charge", "document", "dollar-sign", "money", "payment", "receipt", "usd" })] [FontAwesomeCategoriesAttribute(new[] { "Money" })] FileInvoiceDollar = 0xF571, @@ -3278,7 +3236,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file-pen" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file pen", "edit", "memo", "modify", "pen", "pencil", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "file pen", "edit", "memo", "pen", "pencil", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Files", "Humanitarian" })] FilePen = 0xF31C, @@ -3306,14 +3264,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "file-signature" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file signature", "john hancock", "contract", "document", "name", "username" })] + [FontAwesomeSearchTerms(new[] { "file signature", "john hancock", "contract", "document", "name" })] [FontAwesomeCategoriesAttribute(new[] { "Security" })] FileSignature = 0xF573, /// /// The Font Awesome "file-arrow-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "file arrow up", "document", "import", "page", "save", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "file arrow up", "document", "import", "page", "save" })] [FontAwesomeCategoriesAttribute(new[] { "Files" })] FileUpload = 0xF574, @@ -3362,14 +3320,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "filter-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "filter circle xmark", "cancel", "funnel", "options", "remove", "separate", "sort", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "filter circle xmark", "cancel", "funnel", "options", "remove", "separate", "sort" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] FilterCircleXmark = 0xE17B, /// /// The Font Awesome "fingerprint" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "fingerprint", "human", "id", "identification", "lock", "privacy", "smudge", "touch", "unique", "unlock" })] + [FontAwesomeSearchTerms(new[] { "fingerprint", "human", "id", "identification", "lock", "smudge", "touch", "unique", "unlock" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Security" })] Fingerprint = 0xF577, @@ -3453,14 +3411,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "flask" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "flask", "beaker", "chemicals", "experiment", "experimental", "knowledge", "labs", "liquid", "potion", "science", "vial" })] + [FontAwesomeSearchTerms(new[] { "flask", "beaker", "chemicals", "experiment", "experimental", "labs", "liquid", "potion", "science", "vial" })] [FontAwesomeCategoriesAttribute(new[] { "Food + Beverage", "Maps", "Medical + Health", "Science" })] Flask = 0xF0C3, /// /// The Font Awesome "flask-vial" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "flask vial", "ampule", "beaker", "chemicals", "chemistry", "experiment", "experimental", "lab", "laboratory", "labs", "liquid", "potion", "science", "test", "test tube", "vial" })] + [FontAwesomeSearchTerms(new[] { "flask vial", " beaker", " chemicals", " experiment", " experimental", " labs", " liquid", " science", " vial", "ampule", "chemistry", "lab", "laboratory", "potion", "test", "test tube" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health", "Science" })] FlaskVial = 0xE4F3, @@ -3581,7 +3539,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "face-frown" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "face frown", "disapprove", "emoticon", "face", "frown", "frowning face", "rating", "sad", "uer" })] + [FontAwesomeSearchTerms(new[] { "face frown", "disapprove", "emoticon", "face", "frown", "frowning face", "rating", "sad" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Emoji", "Users + People" })] Frown = 0xF119, @@ -3595,7 +3553,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "filter-circle-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "filter circle dollar", "filter", "money", "options", "premium", "separate", "sort" })] + [FontAwesomeSearchTerms(new[] { "filter circle dollar", "filter", "money", "options", "separate", "sort" })] [FontAwesomeCategoriesAttribute(new[] { "Marketing" })] FunnelDollar = 0xF662, @@ -3609,7 +3567,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "gamepad" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "gamepad", "arcade", "controller", "d-pad", "joystick", "playstore", "video", "video game" })] + [FontAwesomeSearchTerms(new[] { "gamepad", "arcade", "controller", "d-pad", "joystick", "video", "video game" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Devices + Hardware", "Gaming", "Maps" })] Gamepad = 0xF11B, @@ -3637,7 +3595,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "gauge-simple-high" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "gauge simple high", "dashboard", "fast", "odometer", "quick", "speed", "speedometer" })] + [FontAwesomeSearchTerms(new[] { "gauge simple high", "dashboard", "fast", "odometer", "speed", "speedometer" })] [FontAwesomeCategoriesAttribute(new[] { "Automotive" })] GaugeSimpleHigh = 0xF62A, @@ -3735,7 +3693,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "globe" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "all", "coordinates", "country", "earth", "global", "globe", "globe with meridians", "gps", "internet", "language", "localize", "location", "map", "meridians", "network", "online", "place", "planet", "translate", "travel", "world", "www" })] + [FontAwesomeSearchTerms(new[] { "all", "coordinates", "country", "earth", "global", "globe", "globe with meridians", "gps", "internet", "language", "localize", "location", "map", "meridians", "network", "online", "place", "planet", "translate", "travel", "world" })] [FontAwesomeCategoriesAttribute(new[] { "Astronomy", "Business", "Charity", "Connectivity", "Maps" })] Globe = 0xF0AC, @@ -3862,7 +3820,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "face-grin-stars" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "face grin stars", "emoticon", "eyes", "face", "grinning", "quality", "star", "star-struck", "starry-eyed", "vip" })] + [FontAwesomeSearchTerms(new[] { "face grin stars", "emoticon", "eyes", "face", "grinning", "star", "star-struck", "starry-eyed" })] [FontAwesomeCategoriesAttribute(new[] { "Emoji" })] GrinStars = 0xF587, @@ -3904,7 +3862,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "grip" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "grip", "affordance", "app", "collection", "dashboard", "drag", "drop", "grab", "grid", "handle", "launcher", "square" })] + [FontAwesomeSearchTerms(new[] { "grip", "affordance", "drag", "drop", "grab", "handle" })] [FontAwesomeCategoriesAttribute(new[] { "Editing" })] GripHorizontal = 0xF58D, @@ -3967,7 +3925,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hammer" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "admin", "configuration", "equipment", "fix", "hammer", "maintenance", "modify", "recovery", "repair", "settings", "tool" })] + [FontAwesomeSearchTerms(new[] { "admin", "fix", "hammer", "recovery", "repair", "settings", "tool" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Humanitarian" })] Hammer = 0xF6E3, @@ -3995,8 +3953,8 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hand-holding-droplet" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hand holding droplet", "blood", "carry", "covid-19", "drought", "grow", "lift", "sanitation" })] - [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands", "Medical + Health" })] + [FontAwesomeSearchTerms(new[] { "hand holding droplet", "carry", "covid-19", "drought", "grow", "lift", "sanitation" })] + [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands" })] HandHoldingDroplet = 0xF4C1, /// @@ -4009,7 +3967,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hand-holding-heart" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hand holding heart", "carry", "charity", "gift", "lift", "package", "wishlist" })] + [FontAwesomeSearchTerms(new[] { "hand holding heart", "carry", "charity", "gift", "lift", "package" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands" })] HandHoldingHeart = 0xF4BE, @@ -4023,7 +3981,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hand-holding-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hand holding dollar", "$", "carry", "coupon", "dollar sign", "donate", "donation", "giving", "investment", "lift", "money", "premium", "price", "revenue", "salary" })] + [FontAwesomeSearchTerms(new[] { "hand holding dollar", "$", "carry", "dollar sign", "donation", "giving", "lift", "money", "price" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands", "Money" })] HandHoldingUsd = 0xF4C0, @@ -4044,7 +4002,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hand" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hand", "raised hand", "backhand", "game", "halt", "palm", "raised", "raised back of hand", "request", "roshambo", "stop" })] + [FontAwesomeSearchTerms(new[] { "hand", "raised hand", "backhand", "game", "halt", "palm", "raised", "raised back of hand", "roshambo", "stop" })] [FontAwesomeCategoriesAttribute(new[] { "Hands", "Media Playback" })] HandPaper = 0xF256, @@ -4086,7 +4044,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hand-point-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hand point up", "finger", "hand", "hand-o-up", "index", "index pointing up", "point", "request", "up", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "hand point up", "finger", "hand", "hand-o-up", "index", "index pointing up", "point", "up" })] [FontAwesomeCategoriesAttribute(new[] { "Hands" })] HandPointUp = 0xF0A6, @@ -4136,29 +4094,27 @@ public enum FontAwesomeIcon /// The Font Awesome "handshake" icon unicode character. /// [FontAwesomeSearchTerms(new[] { "handshake", "agreement", "greeting", "meeting", "partnership" })] - [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands", "Humanitarian", "Political", "Shopping" })] + [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands", "Political", "Shopping" })] Handshake = 0xF2B5, /// - /// The Font Awesome "handshake" icon unicode character. - /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xF2B5. + /// The Font Awesome "handshake-simple" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "handshake", "agreement", "greeting", "meeting", "partnership" })] - [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands", "Humanitarian", "Political", "Shopping" })] + [FontAwesomeSearchTerms(new[] { "handshake simple", "agreement", "greeting", "hand", "handshake", "meeting", "partnership", "shake" })] + [FontAwesomeCategoriesAttribute(new[] { "Charity", "Hands", "Humanitarian" })] HandshakeSimple = 0xF4C6, /// - /// The Font Awesome "handshake-slash" icon unicode character. - /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xE060. + /// The Font Awesome "handshake-simple-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "handshake slash", "broken", "covid-19", "disabled", "social distance" })] + [FontAwesomeSearchTerms(new[] { "handshake simple slash", "broken", "covid-19", "social distance" })] [FontAwesomeCategoriesAttribute(new[] { "Hands" })] HandshakeSimpleSlash = 0xE05F, /// /// The Font Awesome "handshake-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "handshake slash", "broken", "covid-19", "disabled", "social distance" })] + [FontAwesomeSearchTerms(new[] { "handshake slash", "broken", "covid-19", "social distance" })] [FontAwesomeCategoriesAttribute(new[] { "Hands" })] HandshakeSlash = 0xE060, @@ -4172,7 +4128,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hands-holding-child" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hands holding child", "care", "give", "help", "hold", "parent", "protect" })] + [FontAwesomeSearchTerms(new[] { "hands holding child", "care", "give", "help", "hold", "protect" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Childhood", "Hands", "Humanitarian", "Security" })] HandsHoldingChild = 0xE4FA, @@ -4207,7 +4163,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "helmet-safety" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "helmet safety", "construction", "hardhat", "helmet", "maintenance", "safety" })] + [FontAwesomeSearchTerms(new[] { "helmet safety", "construction", "hardhat", "helmet", "safety" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Logistics" })] HardHat = 0xF807, @@ -4262,11 +4218,10 @@ public enum FontAwesomeIcon Headphones = 0xF025, /// - /// The Font Awesome "headphones" icon unicode character. - /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xF025. + /// The Font Awesome "headphones-simple" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "headphones", "audio", "earbud", "headphone", "listen", "music", "sound", "speaker" })] - [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware", "Film + Video", "Music + Audio" })] + [FontAwesomeSearchTerms(new[] { "headphones simple", "audio", "listen", "music", "sound", "speaker" })] + [FontAwesomeCategoriesAttribute(new[] { "Music + Audio" })] HeadphonesAlt = 0xF58F, /// @@ -4279,35 +4234,35 @@ public enum FontAwesomeIcon /// /// The Font Awesome "head-side-cough" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "head side cough", "cough", "covid-19", "germs", "lungs", "respiratory", "sick", "uer" })] + [FontAwesomeSearchTerms(new[] { "head side cough", "cough", "covid-19", "germs", "lungs", "respiratory", "sick" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Users + People" })] HeadSideCough = 0xE061, /// /// The Font Awesome "head-side-cough-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "head side cough slash", "cough", "covid-19", "disabled", "germs", "lungs", "respiratory", "sick", "uer" })] + [FontAwesomeSearchTerms(new[] { "head side cough slash", "cough", "covid-19", "germs", "lungs", "respiratory", "sick" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Users + People" })] HeadSideCoughSlash = 0xE062, /// /// The Font Awesome "head-side-mask" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "head side mask", "breath", "coronavirus", "covid-19", "filter", "flu", "infection", "pandemic", "respirator", "uer", "virus" })] + [FontAwesomeSearchTerms(new[] { "head side mask", "breath", "coronavirus", "covid-19", "filter", "flu", "infection", "pandemic", "respirator", "virus" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Users + People" })] HeadSideMask = 0xE063, /// /// The Font Awesome "head-side-virus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "head side virus", "cold", "coronavirus", "covid-19", "flu", "infection", "pandemic", "sick", "uer" })] + [FontAwesomeSearchTerms(new[] { "head side virus", "cold", "coronavirus", "covid-19", "flu", "infection", "pandemic", "sick" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Users + People" })] HeadSideVirus = 0xE064, /// /// The Font Awesome "heart" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ace", "card", "favorite", "game", "heart", "heart suit", "like", "love", "relationship", "valentine", "wishlist" })] + [FontAwesomeSearchTerms(new[] { "black", "black heart", "blue", "blue heart", "brown", "brown heart", "card", "evil", "favorite", "game", "green", "green heart", "heart", "heart suit", "like", "love", "orange", "orange heart", "purple", "purple heart", "red heart", "relationship", "valentine", "white", "white heart", "wicked", "yellow", "yellow heart" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Gaming", "Holidays", "Maps", "Medical + Health", "Shapes", "Shopping", "Social", "Sports + Fitness" })] Heart = 0xF004, @@ -4335,14 +4290,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "heart-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "heart circle check", "enable", "favorite", "heart", "love", "not affected", "ok", "okay", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "heart circle check", "favorite", "heart", "love", "not affected", "ok", "okay" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health" })] HeartCircleCheck = 0xE4FD, /// /// The Font Awesome "heart-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "heart circle exclamation", "failed", "favorite", "heart", "love" })] + [FontAwesomeSearchTerms(new[] { "heart circle exclamation", "favorite", "heart", "love" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health" })] HeartCircleExclamation = 0xE4FE, @@ -4363,7 +4318,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "heart-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "heart circle xmark", "favorite", "heart", "love", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "heart circle xmark", "favorite", "heart", "love" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health" })] HeartCircleXmark = 0xE501, @@ -4388,38 +4343,17 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Disaster + Crisis", "Humanitarian" })] HelmetUn = 0xE503, - /// - /// The Font Awesome "hexagon" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "hexagon", "horizontal black hexagon", "geometry", "honeycomb", "polygon", "shape" })] - [FontAwesomeCategoriesAttribute(new[] { "Shapes" })] - Hexagon = 0xF312, - - /// - /// The Font Awesome "hexagon-nodes" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "hexagon nodes", "action", "ai", "artificial intelligence", "cluster", "graph", "language", "llm", "model", "network", "neuronal" })] - [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams", "Coding" })] - HexagonNodes = 0xE699, - - /// - /// The Font Awesome "hexagon-nodes-bolt" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "hexagon nodes bolt", "llm", "action", "ai", "artificial intelligence", "cluster", "graph", "language", "llm", "model", "network", "neuronal" })] - [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams", "Coding" })] - HexagonNodesBolt = 0xE69A, - /// /// The Font Awesome "highlighter" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "highlighter", "edit", "marker", "modify", "sharpie", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "highlighter", "edit", "marker", "sharpie", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Text Formatting" })] Highlighter = 0xF591, /// /// The Font Awesome "person-hiking" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person hiking", "autumn", "fall", "follow", "hike", "mountain", "outdoors", "summer", "uer", "walk" })] + [FontAwesomeSearchTerms(new[] { "person hiking", "autumn", "fall", "hike", "mountain", "outdoors", "summer", "walk" })] [FontAwesomeCategoriesAttribute(new[] { "Camping", "Nature", "Sports + Fitness", "Users + People" })] Hiking = 0xF6EC, @@ -4447,7 +4381,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "clock-rotate-left" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clock rotate left", "rewind", "clock", "pending", "reverse", "time", "time machine", "time travel", "waiting" })] + [FontAwesomeSearchTerms(new[] { "clock rotate left", "rewind", "clock", "reverse", "time", "time machine", "time travel" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Medical + Health" })] History = 0xF1DA, @@ -4511,7 +4445,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hospital-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hospital user", "covid-19", "doctor", "network", "patient", "primary care", "uer" })] + [FontAwesomeSearchTerms(new[] { "hospital user", "covid-19", "doctor", "network", "patient", "primary care" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Medical + Health", "Users + People" })] HospitalUser = 0xF80D, @@ -4532,7 +4466,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hot-tub-person" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hot tub person", "jacuzzi", "spa", "uer" })] + [FontAwesomeSearchTerms(new[] { "hot tub person", "jacuzzi", "spa" })] [FontAwesomeCategoriesAttribute(new[] { "Travel + Hotel", "Users + People" })] HotTub = 0xF593, @@ -4546,21 +4480,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "hourglass-end" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hourglass end", "hour", "hourglass done", "minute", "pending", "sand", "stopwatch", "time", "timer", "waiting" })] + [FontAwesomeSearchTerms(new[] { "hourglass end", "hour", "hourglass done", "minute", "sand", "stopwatch", "time", "timer" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] HourglassEnd = 0xF253, /// /// The Font Awesome "hourglass-half" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hourglass half", "hour", "minute", "pending", "sand", "stopwatch", "time", "waiting" })] + [FontAwesomeSearchTerms(new[] { "hourglass half", "hour", "minute", "sand", "stopwatch", "time" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] HourglassHalf = 0xF252, /// /// The Font Awesome "hourglass-start" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "hourglass start", "hour", "minute", "sand", "stopwatch", "time", "waiting" })] + [FontAwesomeSearchTerms(new[] { "hourglass start", "hour", "minute", "sand", "stopwatch", "time" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] HourglassStart = 0xF251, @@ -4574,7 +4508,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "house-chimney-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house chimney user", "covid-19", "home", "isolation", "quarantine", "uer" })] + [FontAwesomeSearchTerms(new[] { "house chimney user", "covid-19", "home", "isolation", "quarantine" })] [FontAwesomeCategoriesAttribute(new[] { "Household", "Users + People" })] HouseChimneyUser = 0xE065, @@ -4588,21 +4522,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "house-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house circle check", "abode", "enable", "home", "house", "not affected", "ok", "okay", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "house circle check", "abode", "home", "house", "not affected", "ok", "okay" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] HouseCircleCheck = 0xE509, /// /// The Font Awesome "house-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house circle exclamation", "abode", "affected", "failed", "home", "house" })] + [FontAwesomeSearchTerms(new[] { "house circle exclamation", "abode", "affected", "home", "house" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] HouseCircleExclamation = 0xE50A, /// /// The Font Awesome "house-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house circle xmark", "abode", "destroy", "home", "house", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "house circle xmark", "abode", "destroy", "home", "house" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian" })] HouseCircleXmark = 0xE50B, @@ -4658,7 +4592,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "house-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house lock", "closed", "home", "house", "lockdown", "padlock", "privacy", "quarantine" })] + [FontAwesomeSearchTerms(new[] { "house lock", "closed", "home", "house", "lockdown", "quarantine" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Household", "Humanitarian", "Security" })] HouseLock = 0xE510, @@ -4672,21 +4606,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "house-medical-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house medical circle check", "clinic", "enable", "hospital", "not affected", "ok", "okay", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "house medical circle check", "clinic", "hospital", "not affected", "ok", "okay" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian", "Medical + Health" })] HouseMedicalCircleCheck = 0xE511, /// /// The Font Awesome "house-medical-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house medical circle exclamation", "affected", "clinic", "failed", "hospital" })] + [FontAwesomeSearchTerms(new[] { "house medical circle exclamation", "affected", "clinic", "hospital" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian", "Medical + Health" })] HouseMedicalCircleExclamation = 0xE512, /// /// The Font Awesome "house-medical-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house medical circle xmark", "clinic", "destroy", "hospital", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "house medical circle xmark", "clinic", "destroy", "hospital" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian", "Medical + Health" })] HouseMedicalCircleXmark = 0xE513, @@ -4700,7 +4634,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "house-signal" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house signal", "abode", "building", "connect", "family", "home", "residence", "smart home", "wifi", "www" })] + [FontAwesomeSearchTerms(new[] { "house signal", "abode", "building", "connect", "family", "home", "residence", "smart home", "wifi" })] [FontAwesomeCategoriesAttribute(new[] { "Connectivity", "Household", "Humanitarian" })] HouseSignal = 0xE012, @@ -4714,7 +4648,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "house-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "house user", "house", "uer" })] + [FontAwesomeSearchTerms(new[] { "house user", "house" })] [FontAwesomeCategoriesAttribute(new[] { "Household", "Users + People" })] HouseUser = 0xE1B0, @@ -4756,7 +4690,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "icons" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "icons", "bolt", "category", "emoji", "heart", "image", "music", "photo", "symbols" })] + [FontAwesomeSearchTerms(new[] { "icons", "bolt", "emoji", "heart", "image", "music", "photo", "symbols" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Design", "Social", "Text Formatting" })] Icons = 0xF86D, @@ -4770,21 +4704,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "id-badge" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "id badge", "address", "contact", "identification", "license", "profile", "uer", "username" })] + [FontAwesomeSearchTerms(new[] { "id badge", "address", "contact", "identification", "license", "profile" })] [FontAwesomeCategoriesAttribute(new[] { "Photos + Images", "Security", "Users + People" })] IdBadge = 0xF2C1, /// /// The Font Awesome "id-card" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "id card", "contact", "demographics", "document", "identification", "issued", "profile", "registration", "uer", "username" })] + [FontAwesomeSearchTerms(new[] { "id card", "contact", "demographics", "document", "identification", "issued", "profile", "registration" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Photos + Images", "Security", "Users + People" })] IdCard = 0xF2C2, /// /// The Font Awesome "id-card-clip" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "id card clip", "contact", "demographics", "document", "identification", "issued", "profile", "uer", "username" })] + [FontAwesomeSearchTerms(new[] { "id card clip", "contact", "demographics", "document", "identification", "issued", "profile" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Security", "Users + People" })] IdCardAlt = 0xF47F, @@ -4798,14 +4732,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "image" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "image", "album", "img", "landscape", "photo", "picture" })] + [FontAwesomeSearchTerms(new[] { "image", "album", "landscape", "photo", "picture" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Photos + Images", "Social" })] Image = 0xF03E, /// /// The Font Awesome "images" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "images", "album", "img", "landscape", "photo", "picture" })] + [FontAwesomeSearchTerms(new[] { "images", "album", "landscape", "photo", "picture" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Photos + Images", "Social" })] Images = 0xF302, @@ -4858,12 +4792,6 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Maps" })] InfoCircle = 0xF05A, - /// - /// The Font Awesome "instagramsquare" icon unicode character. - /// - [Obsolete] - InstagramSquare = 0xF955, - /// /// The Font Awesome "italic" icon unicode character. /// @@ -4993,7 +4921,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "landmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "landmark", "building", "classical", "historic", "memorable", "monument", "museum", "politics", "society" })] + [FontAwesomeSearchTerms(new[] { "landmark", "building", "classical", "historic", "memorable", "monument", "museum", "politics" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Business", "Humanitarian", "Maps", "Money" })] Landmark = 0xF66F, @@ -5028,14 +4956,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "laptop" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "computer", "cpu", "dell", "demo", "device", "fabook", "fb", "laptop", "mac", "macbook", "machine", "pc", "personal" })] + [FontAwesomeSearchTerms(new[] { "computer", "cpu", "dell", "demo", "device", "laptop", "mac", "macbook", "machine", "pc", "personal" })] [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware", "Humanitarian" })] Laptop = 0xF109, /// /// The Font Awesome "laptop-code" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "laptop code", "computer", "cpu", "dell", "demo", "develop", "device", "fabook", "fb", "mac", "macbook", "machine", "mysql", "pc", "sql" })] + [FontAwesomeSearchTerms(new[] { "laptop code", "computer", "cpu", "dell", "demo", "develop", "device", "mac", "macbook", "machine", "pc" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Education" })] LaptopCode = 0xF5FC, @@ -5091,7 +5019,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "layer-group" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "layer group", "arrange", "category", "develop", "layers", "map", "platform", "stack" })] + [FontAwesomeSearchTerms(new[] { "layer group", "arrange", "develop", "layers", "map", "stack" })] [FontAwesomeCategoriesAttribute(new[] { "Design", "Maps" })] LayerGroup = 0xF5FD, @@ -5148,7 +5076,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "lightbulb" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "lightbulb", "bulb", "bulb", "comic", "comic", "electric", "electric", "energy", "idea", "idea", "innovation", "inspiration", "inspiration", "light", "light bulb", "mechanical" })] + [FontAwesomeSearchTerms(new[] { "lightbulb", " comic", " electric", " idea", " innovation", " inspiration", " light", " light bulb", " bulb", "bulb", "comic", "electric", "energy", "idea", "inspiration", "mechanical" })] [FontAwesomeCategoriesAttribute(new[] { "Energy", "Household", "Maps", "Marketing" })] Lightbulb = 0xF0EB, @@ -5176,28 +5104,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "list" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "list", "bullet", "category", "cheatsheet", "checklist", "completed", "done", "finished", "ol", "summary", "todo", "ul" })] + [FontAwesomeSearchTerms(new[] { "list", "checklist", "completed", "done", "finished", "ol", "todo", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] List = 0xF03A, /// /// The Font Awesome "rectangle-list" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "rectangle list", "cheatsheet", "checklist", "completed", "done", "finished", "ol", "summary", "todo", "ul" })] + [FontAwesomeSearchTerms(new[] { "rectangle list", "checklist", "completed", "done", "finished", "ol", "todo", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] ListAlt = 0xF022, /// /// The Font Awesome "list-ol" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "list ol", "cheatsheet", "checklist", "completed", "done", "finished", "numbers", "ol", "summary", "todo", "ul" })] + [FontAwesomeSearchTerms(new[] { "list ol", "checklist", "completed", "done", "finished", "numbers", "ol", "todo", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] ListOl = 0xF0CB, /// /// The Font Awesome "list-ul" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "list ul", "bullet", "cheatsheet", "checklist", "completed", "done", "finished", "ol", "summary", "survey", "todo", "ul" })] + [FontAwesomeSearchTerms(new[] { "list ul", "checklist", "completed", "done", "finished", "ol", "todo", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] ListUl = 0xF0CA, @@ -5225,21 +5153,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "location-pin-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "location pin lock", "closed", "lockdown", "map", "padlock", "privacy", "quarantine" })] + [FontAwesomeSearchTerms(new[] { "location pin lock", "closed", "lockdown", "map", "quarantine" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Maps" })] LocationPinLock = 0xE51F, /// /// The Font Awesome "lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "admin", "closed", "lock", "locked", "open", "padlock", "password", "privacy", "private", "protect", "security" })] + [FontAwesomeSearchTerms(new[] { "admin", "closed", "lock", "locked", "open", "password", "private", "protect", "security" })] [FontAwesomeCategoriesAttribute(new[] { "Security" })] Lock = 0xF023, /// /// The Font Awesome "lock-open" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "lock open", "admin", "lock", "open", "padlock", "password", "privacy", "private", "protect", "security", "unlock" })] + [FontAwesomeSearchTerms(new[] { "lock open", "admin", "lock", "open", "password", "private", "protect", "security", "unlock" })] [FontAwesomeCategoriesAttribute(new[] { "Security" })] LockOpen = 0xF3C1, @@ -5274,7 +5202,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "up-long" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "up long", "long-arrow-up", "upgrade", "upload" })] + [FontAwesomeSearchTerms(new[] { "up long", "long-arrow-up", "upload" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] LongArrowAltUp = 0xF30C, @@ -5323,28 +5251,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "magnifying-glass-arrow-right" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass arrow right", "find", "magnifier", "next", "search" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass arrow right", "find", "next", "search" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Humanitarian", "Marketing" })] MagnifyingGlassArrowRight = 0xE521, /// /// The Font Awesome "magnifying-glass-chart" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass chart", "analysis", "chart", "data", "graph", "intelligence", "magnifier", "market", "revenue" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass chart", " data", " graph", " intelligence", "analysis", "chart", "market" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Humanitarian", "Marketing" })] MagnifyingGlassChart = 0xE522, /// /// The Font Awesome "envelopes-bulk" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "envelopes bulk", "archive", "envelope", "letter", "newsletter", "offer", "post office", "postal", "postcard", "send", "stamp", "usps" })] + [FontAwesomeSearchTerms(new[] { "envelopes bulk", "archive", "envelope", "letter", "post office", "postal", "postcard", "send", "stamp", "usps" })] [FontAwesomeCategoriesAttribute(new[] { "Marketing" })] MailBulk = 0xF674, /// /// The Font Awesome "person" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person", "default", "man", "person standing", "stand", "standing", "uer", "woman" })] + [FontAwesomeSearchTerms(new[] { "person", "man", "person standing", "stand", "standing", "woman" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Maps", "Users + People" })] Male = 0xF183, @@ -5407,7 +5335,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "marker" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "marker", "design", "edit", "modify", "sharpie", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "marker", "design", "edit", "sharpie", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design" })] Marker = 0xF5A1, @@ -5421,7 +5349,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "mars-and-venus-burst" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "mars and venus burst", "gender", "uer", "violence" })] + [FontAwesomeSearchTerms(new[] { "mars and venus burst", "gender", "violence" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] MarsAndVenusBurst = 0xE523, @@ -5484,7 +5412,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "medal" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "award", "guarantee", "medal", "quality", "ribbon", "sports medal", "star", "trophy", "warranty" })] + [FontAwesomeSearchTerms(new[] { "award", "medal", "ribbon", "sports medal", "star", "trophy" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness" })] Medal = 0xF5A2, @@ -5498,7 +5426,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "face-meh" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "face meh", "deadpan", "default", "emoticon", "face", "meh", "neutral", "neutral face", "rating", "uer" })] + [FontAwesomeSearchTerms(new[] { "face meh", "deadpan", "emoticon", "face", "meh", "neutral", "neutral face", "rating" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Emoji", "Users + People" })] Meh = 0xF11A, @@ -5554,35 +5482,35 @@ public enum FontAwesomeIcon /// /// The Font Awesome "microphone" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "microphone", "address", "audio", "information", "podcast", "public", "record", "sing", "sound", "talking", "voice" })] + [FontAwesomeSearchTerms(new[] { "microphone", "address", "audio", "information", "podcast", "public", "record", "sing", "sound", "voice" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Film + Video", "Music + Audio", "Toggle" })] Microphone = 0xF130, /// /// The Font Awesome "microphone-lines" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "microphone lines", "audio", "mic", "microphone", "music", "podcast", "record", "sing", "sound", "studio", "studio microphone", "talking", "voice" })] + [FontAwesomeSearchTerms(new[] { "microphone lines", "audio", "mic", "microphone", "music", "podcast", "record", "sing", "sound", "studio", "studio microphone", "voice" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Film + Video", "Music + Audio" })] MicrophoneAlt = 0xF3C9, /// /// The Font Awesome "microphone-lines-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "microphone lines slash", "audio", "disable", "disabled", "disconnect", "disconnect", "mute", "podcast", "record", "sing", "sound", "voice" })] + [FontAwesomeSearchTerms(new[] { "microphone lines slash", "audio", "disable", "mute", "podcast", "record", "sing", "sound", "voice" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Film + Video", "Music + Audio" })] MicrophoneAltSlash = 0xF539, /// /// The Font Awesome "microphone-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "microphone slash", "audio", "disable", "disabled", "mute", "podcast", "record", "sing", "sound", "voice" })] + [FontAwesomeSearchTerms(new[] { "microphone slash", "audio", "disable", "mute", "podcast", "record", "sing", "sound", "voice" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Film + Video", "Music + Audio", "Toggle" })] MicrophoneSlash = 0xF131, /// /// The Font Awesome "microscope" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "covid-19", "electron", "knowledge", "lens", "microscope", "optics", "science", "shrink", "testing", "tool" })] + [FontAwesomeSearchTerms(new[] { "covid-19", "electron", "lens", "microscope", "optics", "science", "shrink", "testing", "tool" })] [FontAwesomeCategoriesAttribute(new[] { "Education", "Humanitarian", "Medical + Health", "Science" })] Microscope = 0xF610, @@ -5656,80 +5584,73 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Communication", "Devices + Hardware", "Humanitarian" })] MobileScreen = 0xF3CF, - /// - /// The Font Awesome "mobile-vibrate" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "mobile vibrate", "android", "call", "cell", "cell phone", "device", "haptic", "mobile", "mobile phone", "notification", "number", "phone", "screen", "telephone", "text" })] - [FontAwesomeCategoriesAttribute(new[] { "Communication", "Devices + Hardware" })] - MobileVibrate = 0xE816, - /// /// The Font Awesome "money-bill" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill", "buy", "cash", "checkout", "coupon", "investment", "money", "payment", "premium", "price", "purchase", "revenue", "salary" })] + [FontAwesomeSearchTerms(new[] { "money bill", "buy", "cash", "checkout", "money", "payment", "price", "purchase" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Money" })] MoneyBill = 0xF0D6, /// /// The Font Awesome "money-bill-1" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill 1", "buy", "cash", "checkout", "money", "payment", "premium", "price", "purchase", "salary" })] + [FontAwesomeSearchTerms(new[] { "money bill 1", "buy", "cash", "checkout", "money", "payment", "price", "purchase" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Money" })] MoneyBillAlt = 0xF3D1, /// /// The Font Awesome "money-bills" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bills", "atm", "cash", "investment", "money", "moolah", "premium", "revenue", "salary" })] + [FontAwesomeSearchTerms(new[] { "money bills", "atm", "cash", "money", "moolah" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Money" })] MoneyBills = 0xE1F3, /// /// The Font Awesome "money-bill-transfer" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill transfer", "bank", "conversion", "deposit", "investment", "money", "salary", "transfer", "withdrawal" })] + [FontAwesomeSearchTerms(new[] { "money bill transfer", "bank", "conversion", "deposit", "money", "transfer", "withdrawal" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Money" })] MoneyBillTransfer = 0xE528, /// /// The Font Awesome "money-bill-trend-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill trend up", "bank", "bonds", "inflation", "investment", "market", "revenue", "salary", "stocks", "trade" })] + [FontAwesomeSearchTerms(new[] { "money bill trend up", "bank", "bonds", "inflation", "market", "stocks", "trade" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Money" })] MoneyBillTrendUp = 0xE529, /// /// The Font Awesome "money-bill-wave" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill wave", "buy", "cash", "checkout", "money", "payment", "premium", "price", "purchase", "salary" })] + [FontAwesomeSearchTerms(new[] { "money bill wave", "buy", "cash", "checkout", "money", "payment", "price", "purchase" })] [FontAwesomeCategoriesAttribute(new[] { "Money" })] MoneyBillWave = 0xF53A, /// /// The Font Awesome "money-bill-1-wave" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill 1 wave", "buy", "cash", "checkout", "money", "payment", "premium", "price", "purchase", "salary" })] + [FontAwesomeSearchTerms(new[] { "money bill 1 wave", "buy", "cash", "checkout", "money", "payment", "price", "purchase" })] [FontAwesomeCategoriesAttribute(new[] { "Money" })] MoneyBillWaveAlt = 0xF53B, /// /// The Font Awesome "money-bill-wheat" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money bill wheat", "agribusiness", "agriculture", "farming", "food", "investment", "livelihood", "subsidy" })] + [FontAwesomeSearchTerms(new[] { "money bill wheat", "agribusiness", "agriculture", "farming", "food", "livelihood", "subsidy" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Money" })] MoneyBillWheat = 0xE52A, /// /// The Font Awesome "money-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money check", "bank check", "buy", "checkout", "cheque", "money", "payment", "price", "purchase", "salary" })] + [FontAwesomeSearchTerms(new[] { "money check", "bank check", "buy", "checkout", "cheque", "money", "payment", "price", "purchase" })] [FontAwesomeCategoriesAttribute(new[] { "Money", "Shopping" })] MoneyCheck = 0xF53C, /// /// The Font Awesome "money-check-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "money check dollar", "bank check", "buy", "checkout", "cheque", "money", "payment", "price", "purchase", "salary" })] + [FontAwesomeSearchTerms(new[] { "money check dollar", "bank check", "buy", "checkout", "cheque", "money", "payment", "price", "purchase" })] [FontAwesomeCategoriesAttribute(new[] { "Money", "Shopping" })] MoneyCheckAlt = 0xF53D, @@ -5862,21 +5783,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "newspaper" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "article", "editorial", "headline", "journal", "journalism", "news", "newsletter", "newspaper", "paper", "press" })] + [FontAwesomeSearchTerms(new[] { "article", "editorial", "headline", "journal", "journalism", "news", "newspaper", "paper", "press" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Writing" })] Newspaper = 0xF1EA, - /// - /// The Font Awesome "non-binary" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "non binary", "female", "gender", "male", "nb", "queer" })] - [FontAwesomeCategoriesAttribute(new[] { "Genders" })] - NonBinary = 0xE807, - /// /// The Font Awesome "notdef" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "notdef", "404", "close", "missing", "not found" })] + [FontAwesomeSearchTerms(new[] { "notdef", "close", "missing" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Writing" })] Notdef = 0xE1FE, @@ -5908,13 +5822,6 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Design" })] ObjectUngroup = 0xF248, - /// - /// The Font Awesome "octagon" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "octagon", "octagonal", "shape", "sign", "stop", "stop sign" })] - [FontAwesomeCategoriesAttribute(new[] { "Shapes" })] - Octagon = 0xF306, - /// /// The Font Awesome "oil-can" icon unicode character. /// @@ -5960,14 +5867,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "paintbrush" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "acrylic", "art", "brush", "color", "fill", "modify", "paint", "paintbrush", "painting", "pigment", "watercolor" })] + [FontAwesomeSearchTerms(new[] { "acrylic", "art", "brush", "color", "fill", "paint", "paintbrush", "painting", "pigment", "watercolor" })] [FontAwesomeCategoriesAttribute(new[] { "Design", "Editing" })] PaintBrush = 0xF1FC, /// /// The Font Awesome "paint-roller" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "paint roller", "acrylic", "art", "brush", "color", "fill", "maintenance", "paint", "pigment", "watercolor" })] + [FontAwesomeSearchTerms(new[] { "paint roller", "acrylic", "art", "brush", "color", "fill", "paint", "pigment", "watercolor" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Design" })] PaintRoller = 0xF5AA, @@ -5988,7 +5895,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "panorama" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "panorama", "image", "img", "landscape", "photo", "wide" })] + [FontAwesomeSearchTerms(new[] { "panorama", "image", "landscape", "photo", "wide" })] [FontAwesomeCategoriesAttribute(new[] { "Photos + Images" })] Panorama = 0xE209, @@ -6079,105 +5986,98 @@ public enum FontAwesomeIcon /// /// The Font Awesome "pen" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ballpoint", "design", "edit", "modify", "pen", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "ballpoint", "design", "edit", "pen", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Editing", "Writing" })] Pen = 0xF304, /// /// The Font Awesome "pen-clip" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "pen clip", "design", "edit", "modify", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "pen clip", "design", "edit", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Editing", "Writing" })] PenAlt = 0xF305, /// /// The Font Awesome "pencil" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "lower left pencil", "design", "draw", "edit", "lead", "maintenance", "modify", "pencil", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "lower left pencil", "design", "draw", "edit", "lead", "pencil", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Construction", "Design", "Editing", "Writing" })] PencilAlt = 0xF303, /// /// The Font Awesome "pen-ruler" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "pen ruler", "design", "draft", "draw", "maintenance", "modify", "pencil" })] + [FontAwesomeSearchTerms(new[] { "pen ruler", "design", "draft", "draw", "pencil" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Design", "Editing" })] PencilRuler = 0xF5AE, /// /// The Font Awesome "pen-fancy" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "pen fancy", "black nib", "design", "edit", "fountain", "fountain pen", "modify", "nib", "pen", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "pen fancy", "black nib", "design", "edit", "fountain", "fountain pen", "nib", "pen", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Editing" })] PenFancy = 0xF5AC, /// /// The Font Awesome "pen-nib" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "pen nib", "design", "edit", "fountain pen", "modify", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "pen nib", "design", "edit", "fountain pen", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Design", "Editing" })] PenNib = 0xF5AD, /// /// The Font Awesome "square-pen" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square pen", "edit", "modify", "pencil-square", "update", "write" })] + [FontAwesomeSearchTerms(new[] { "square pen", "edit", "pencil-square", "update", "write" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Editing", "Writing" })] PenSquare = 0xF14B, - /// - /// The Font Awesome "pentagon" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "5", "five", "pentagon", "shape" })] - [FontAwesomeCategoriesAttribute(new[] { "Shapes" })] - Pentagon = 0xE790, - /// /// The Font Awesome "people-arrows" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people arrows", "conversation", "discussion", "distance", "insert", "isolation", "separate", "social distancing", "talk", "talking", "together", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "people arrows", "distance", "isolation", "separate", "social distancing", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PeopleArrows = 0xE068, /// /// The Font Awesome "people-carry-box" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people carry box", "together", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "people carry box", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Moving", "Users + People" })] PeopleCarry = 0xF4CE, /// /// The Font Awesome "people-group" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people group", "crowd", "family", "group", "team", "together", "uer" })] + [FontAwesomeSearchTerms(new[] { "people group", "family", "group", "team" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Marketing", "Users + People" })] PeopleGroup = 0xE533, /// /// The Font Awesome "people-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people line", "crowd", "group", "need", "together", "uer" })] + [FontAwesomeSearchTerms(new[] { "people line", "group", "need" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PeopleLine = 0xE534, /// /// The Font Awesome "people-pulling" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people pulling", "forced return", "together", "uer", "yanking" })] + [FontAwesomeSearchTerms(new[] { "people pulling", "forced return", "yanking" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PeoplePulling = 0xE535, /// /// The Font Awesome "people-robbery" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people robbery", "criminal", "hands up", "looting", "robbery", "steal", "uer" })] + [FontAwesomeSearchTerms(new[] { "people robbery", "criminal", "hands up", "looting", "robbery", "steal" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PeopleRobbery = 0xE536, /// /// The Font Awesome "people-roof" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "people roof", "crowd", "family", "group", "manage", "people", "safe", "shelter", "together", "uer" })] + [FontAwesomeSearchTerms(new[] { "people roof", "family", "group", "manage", "people", "safe", "shelter" })] [FontAwesomeCategoriesAttribute(new[] { "Camping", "Household", "Humanitarian", "Users + People" })] PeopleRoof = 0xE537, @@ -6207,105 +6107,105 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-arrow-down-to-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person arrow down to line", "ground", "indigenous", "insert", "native", "uer" })] + [FontAwesomeSearchTerms(new[] { "person arrow down to line", "ground", "indigenous", "native" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonArrowDownToLine = 0xE538, /// /// The Font Awesome "person-arrow-up-from-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person arrow up from line", "population", "rise", "uer", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "person arrow up from line", "population", "rise" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonArrowUpFromLine = 0xE539, /// /// The Font Awesome "person-booth" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person booth", "changing room", "curtain", "uer", "vote", "voting" })] + [FontAwesomeSearchTerms(new[] { "person booth", "changing room", "curtain", "vote", "voting" })] [FontAwesomeCategoriesAttribute(new[] { "Political", "Shopping", "Users + People" })] PersonBooth = 0xF756, /// /// The Font Awesome "person-breastfeeding" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person breastfeeding", "baby", "child", "infant", "mother", "nutrition", "parent", "sustenance", "uer" })] + [FontAwesomeSearchTerms(new[] { "person breastfeeding", "baby", "child", "infant", "mother", "nutrition", "sustenance" })] [FontAwesomeCategoriesAttribute(new[] { "Childhood", "Humanitarian", "Medical + Health", "Users + People" })] PersonBreastfeeding = 0xE53A, /// /// The Font Awesome "person-burst" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person burst", "abuse", "accident", "crash", "explode", "uer", "violence" })] + [FontAwesomeSearchTerms(new[] { "person burst", "abuse", "accident", "crash", "explode", "violence" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonBurst = 0xE53B, /// /// The Font Awesome "person-cane" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person cane", "aging", "cane", "elderly", "old", "staff", "uer" })] + [FontAwesomeSearchTerms(new[] { "person cane", "aging", "cane", "elderly", "old", "staff" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Humanitarian", "Medical + Health", "Users + People" })] PersonCane = 0xE53C, /// /// The Font Awesome "person-chalkboard" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person chalkboard", "blackboard", "instructor", "keynote", "lesson", "presentation", "teacher", "uer" })] + [FontAwesomeSearchTerms(new[] { "person chalkboard", "blackboard", "instructor", "keynote", "lesson", "presentation", "teacher" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Education", "Humanitarian", "Users + People" })] PersonChalkboard = 0xE53D, /// /// The Font Awesome "person-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person circle check", "approved", "enable", "not affected", "ok", "okay", "uer", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "person circle check", "approved", "not affected", "ok", "okay" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonCircleCheck = 0xE53E, /// /// The Font Awesome "person-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person circle exclamation", "affected", "alert", "failed", "lost", "missing", "uer" })] + [FontAwesomeSearchTerms(new[] { "person circle exclamation", "affected", "alert", "lost", "missing" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonCircleExclamation = 0xE53F, /// /// The Font Awesome "person-circle-minus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person circle minus", "delete", "remove", "uer" })] + [FontAwesomeSearchTerms(new[] { "person circle minus", "delete", "remove" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonCircleMinus = 0xE540, /// /// The Font Awesome "person-circle-plus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person circle plus", "add", "follow", "found", "uer" })] + [FontAwesomeSearchTerms(new[] { "person circle plus", "add", "found" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonCirclePlus = 0xE541, /// /// The Font Awesome "person-circle-question" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person circle question", "faq", "lost", "missing", "request", "uer" })] + [FontAwesomeSearchTerms(new[] { "person circle question", "lost", "missing" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonCircleQuestion = 0xE542, /// /// The Font Awesome "person-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person circle xmark", "dead", "removed", "uer", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "person circle xmark", "dead", "removed" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonCircleXmark = 0xE543, /// /// The Font Awesome "person-digging" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person digging", "bury", "construction", "debris", "dig", "maintenance", "men at work", "uer" })] + [FontAwesomeSearchTerms(new[] { "person digging", "bury", "construction", "debris", "dig", "men at work" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Humanitarian", "Users + People" })] PersonDigging = 0xF85E, /// /// The Font Awesome "person-dress-burst" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person dress burst", "abuse", "accident", "crash", "explode", "uer", "violence" })] + [FontAwesomeSearchTerms(new[] { "person dress burst", "abuse", "accident", "crash", "explode", "violence" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonDressBurst = 0xE544, @@ -6319,112 +6219,112 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-falling" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person falling", "accident", "fall", "trip", "uer" })] + [FontAwesomeSearchTerms(new[] { "person falling", "accident", "fall", "trip" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonFalling = 0xE546, /// /// The Font Awesome "person-falling-burst" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person falling burst", "accident", "crash", "death", "fall", "homicide", "murder", "uer" })] + [FontAwesomeSearchTerms(new[] { "person falling burst", "accident", "crash", "death", "fall", "homicide", "murder" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonFallingBurst = 0xE547, /// /// The Font Awesome "person-half-dress" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person half dress", "gender", "man", "restroom", "transgender", "uer", "woman" })] + [FontAwesomeSearchTerms(new[] { "person half dress", "gender", "man", "restroom", "transgender", "woman" })] [FontAwesomeCategoriesAttribute(new[] { "Genders", "Humanitarian", "Medical + Health", "Users + People" })] PersonHalfDress = 0xE548, /// /// The Font Awesome "person-harassing" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person harassing", "abuse", "scream", "shame", "shout", "uer", "yell" })] + [FontAwesomeSearchTerms(new[] { "person harassing", "abuse", "scream", "shame", "shout", "yell" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonHarassing = 0xE549, /// /// The Font Awesome "person-military-pointing" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person military pointing", "army", "customs", "guard", "uer" })] + [FontAwesomeSearchTerms(new[] { "person military pointing", "army", "customs", "guard" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonMilitaryPointing = 0xE54A, /// /// The Font Awesome "person-military-rifle" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person military rifle", "armed forces", "army", "military", "rifle", "uer", "war" })] + [FontAwesomeSearchTerms(new[] { "person military rifle", "armed forces", "army", "military", "rifle", "war" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonMilitaryRifle = 0xE54B, /// /// The Font Awesome "person-military-to-person" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person military to person", "civilian", "coordination", "military", "uer" })] + [FontAwesomeSearchTerms(new[] { "person military to person", "civilian", "coordination", "military" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonMilitaryToPerson = 0xE54C, /// /// The Font Awesome "person-pregnant" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person pregnant", "baby", "birth", "child", "parent", "pregnant", "pregnant woman", "uer", "woman" })] + [FontAwesomeSearchTerms(new[] { "person pregnant", "baby", "birth", "child", "pregnant", "pregnant woman", "woman" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] PersonPregnant = 0xE31E, /// /// The Font Awesome "person-rays" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person rays", "affected", "focus", "shine", "uer" })] + [FontAwesomeSearchTerms(new[] { "person rays", "affected", "focus", "shine" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Marketing", "Users + People" })] PersonRays = 0xE54D, /// /// The Font Awesome "person-rifle" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person rifle", "army", "combatant", "gun", "military", "rifle", "uer", "war" })] + [FontAwesomeSearchTerms(new[] { "person rifle", "army", "combatant", "gun", "military", "rifle", "war" })] [FontAwesomeCategoriesAttribute(new[] { "Disaster + Crisis", "Humanitarian", "Security", "Users + People" })] PersonRifle = 0xE54E, /// /// The Font Awesome "person-shelter" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person shelter", "house", "inside", "roof", "safe", "safety", "shelter", "uer" })] + [FontAwesomeSearchTerms(new[] { "person shelter", "house", "inside", "roof", "safe", "safety", "shelter" })] [FontAwesomeCategoriesAttribute(new[] { "Camping", "Humanitarian", "Security", "Users + People" })] PersonShelter = 0xE54F, /// /// The Font Awesome "person-through-window" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person through window", "door", "exit", "forced entry", "leave", "robbery", "steal", "uer", "window" })] + [FontAwesomeSearchTerms(new[] { "person through window", "door", "exit", "forced entry", "leave", "robbery", "steal", "window" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] PersonThroughWindow = 0xE5A9, /// /// The Font Awesome "person-walking-arrow-loop-left" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person walking arrow loop left", "follow", "population return", "return", "uer" })] + [FontAwesomeSearchTerms(new[] { "person walking arrow loop left", "population return", "return" })] [FontAwesomeCategoriesAttribute(new[] { "Disaster + Crisis", "Humanitarian", "Users + People" })] PersonWalkingArrowLoopLeft = 0xE551, /// /// The Font Awesome "person-walking-arrow-right" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person walking arrow right", "exit", "follow", "internally displaced", "leave", "refugee", "uer" })] + [FontAwesomeSearchTerms(new[] { "person walking arrow right", "exit", "internally displaced", "leave", "refugee" })] [FontAwesomeCategoriesAttribute(new[] { "Disaster + Crisis", "Humanitarian", "Users + People" })] PersonWalkingArrowRight = 0xE552, /// /// The Font Awesome "person-walking-dashed-line-arrow-right" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person walking dashed line arrow right", "exit", "follow", "refugee", "uer" })] + [FontAwesomeSearchTerms(new[] { "person walking dashed line arrow right", "exit", "refugee" })] [FontAwesomeCategoriesAttribute(new[] { "Disaster + Crisis", "Humanitarian", "Users + People" })] PersonWalkingDashedLineArrowRight = 0xE553, /// /// The Font Awesome "person-walking-luggage" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person walking luggage", "bag", "baggage", "briefcase", "carry-on", "deployment", "follow", "rolling", "uer" })] + [FontAwesomeSearchTerms(new[] { "person walking luggage", "bag", "baggage", "briefcase", "carry-on", "deployment", "rolling" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Travel + Hotel", "Users + People" })] PersonWalkingLuggage = 0xE554, @@ -6445,7 +6345,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "phone" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "left hand telephone receiver", "call", "earphone", "number", "phone", "receiver", "support", "talking", "telephone", "telephone receiver", "voice" })] + [FontAwesomeSearchTerms(new[] { "left hand telephone receiver", "call", "earphone", "number", "phone", "receiver", "support", "telephone", "telephone receiver", "voice" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication", "Maps" })] Phone = 0xF095, @@ -6459,7 +6359,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "phone-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "phone slash", "call", "cancel", "disabled", "disconnect", "earphone", "mute", "number", "support", "telephone", "voice" })] + [FontAwesomeSearchTerms(new[] { "phone slash", "call", "cancel", "earphone", "mute", "number", "support", "telephone", "voice" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Communication" })] PhoneSlash = 0xF3DD, @@ -6480,7 +6380,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "phone-volume" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "phone volume", "call", "earphone", "number", "ring", "ringing", "sound", "support", "talking", "telephone", "voice", "volume-control-phone" })] + [FontAwesomeSearchTerms(new[] { "phone volume", "call", "earphone", "number", "sound", "support", "telephone", "voice", "volume-control-phone" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Business", "Communication", "Maps", "Media Playback" })] PhoneVolume = 0xF2A0, @@ -6494,7 +6394,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "piggy-bank" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "piggy bank", "bank", "salary", "save", "savings" })] + [FontAwesomeSearchTerms(new[] { "piggy bank", "bank", "save", "savings" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Money", "Political" })] PiggyBank = 0xF4D3, @@ -6530,27 +6430,27 @@ public enum FontAwesomeIcon /// The Font Awesome "plane-arrival" icon unicode character. /// [FontAwesomeSearchTerms(new[] { "plane arrival", "aeroplane", "airplane", "airplane arrival", "airport", "arrivals", "arriving", "destination", "fly", "land", "landing", "location", "mode", "travel", "trip" })] - [FontAwesomeCategoriesAttribute(new[] { "Transportation", "Travel + Hotel" })] + [FontAwesomeCategoriesAttribute(new[] { "Travel + Hotel" })] PlaneArrival = 0xF5AF, /// /// The Font Awesome "plane-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plane circle check", "airplane", "airport", "enable", "flight", "fly", "not affected", "ok", "okay", "travel", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "plane circle check", "airplane", "airport", "flight", "fly", "not affected", "ok", "okay", "travel" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Travel + Hotel" })] PlaneCircleCheck = 0xE555, /// /// The Font Awesome "plane-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plane circle exclamation", "affected", "airplane", "airport", "failed", "flight", "fly", "travel" })] + [FontAwesomeSearchTerms(new[] { "plane circle exclamation", "affected", "airplane", "airport", "flight", "fly", "travel" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Travel + Hotel" })] PlaneCircleExclamation = 0xE556, /// /// The Font Awesome "plane-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plane circle xmark", "airplane", "airport", "destroy", "flight", "fly", "travel", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "plane circle xmark", "airplane", "airport", "destroy", "flight", "fly", "travel" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Travel + Hotel" })] PlaneCircleXmark = 0xE557, @@ -6564,14 +6464,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "plane-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plane lock", "airplane", "airport", "closed", "flight", "fly", "lockdown", "padlock", "privacy", "quarantine", "travel" })] + [FontAwesomeSearchTerms(new[] { "plane lock", "airplane", "airport", "closed", "flight", "fly", "lockdown", "quarantine", "travel" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics", "Travel + Hotel" })] PlaneLock = 0xE558, /// /// The Font Awesome "plane-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plane slash", "airplane mode", "airport", "canceled", "covid-19", "delayed", "disabled", "grounded", "travel" })] + [FontAwesomeSearchTerms(new[] { "plane slash", "airplane mode", "airport", "canceled", "covid-19", "delayed", "grounded", "travel" })] [FontAwesomeCategoriesAttribute(new[] { "Transportation", "Travel + Hotel" })] PlaneSlash = 0xE069, @@ -6627,21 +6527,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "plug-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plug circle check", "electric", "electricity", "enable", "not affected", "ok", "okay", "plug", "power", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "plug circle check", "electric", "electricity", "not affected", "ok", "okay", "plug", "power" })] [FontAwesomeCategoriesAttribute(new[] { "Energy", "Humanitarian" })] PlugCircleCheck = 0xE55C, /// /// The Font Awesome "plug-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plug circle exclamation", "affected", "electric", "electricity", "failed", "plug", "power" })] + [FontAwesomeSearchTerms(new[] { "plug circle exclamation", "affected", "electric", "electricity", "plug", "power" })] [FontAwesomeCategoriesAttribute(new[] { "Energy", "Humanitarian" })] PlugCircleExclamation = 0xE55D, /// /// The Font Awesome "plug-circle-minus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plug circle minus", "disconnect", "electric", "electricity", "plug", "power" })] + [FontAwesomeSearchTerms(new[] { "plug circle minus", "electric", "electricity", "plug", "power" })] [FontAwesomeCategoriesAttribute(new[] { "Energy", "Humanitarian" })] PlugCircleMinus = 0xE55E, @@ -6655,7 +6555,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "plug-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "plug circle xmark", "destroy", "disconnect", "electric", "electricity", "outage", "plug", "power", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "plug circle xmark", "destroy", "electric", "electricity", "outage", "plug", "power" })] [FontAwesomeCategoriesAttribute(new[] { "Energy", "Humanitarian" })] PlugCircleXmark = 0xE560, @@ -6663,7 +6563,7 @@ public enum FontAwesomeIcon /// The Font Awesome "plus" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0x2B. /// - [FontAwesomeSearchTerms(new[] { "+", "plus sign", "add", "create", "expand", "follow", "math", "modify", "new", "plus", "positive", "shape", "sign" })] + [FontAwesomeSearchTerms(new[] { "+", "plus sign", "add", "create", "expand", "math", "new", "plus", "positive", "shape", "sign" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Maps", "Mathematics", "Medical + Health", "Punctuation + Symbols" })] Plus = 0xF067, @@ -6698,21 +6598,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "square-poll-vertical" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square poll vertical", "chart", "graph", "results", "revenue", "statistics", "survey", "trend", "vote", "voting" })] + [FontAwesomeSearchTerms(new[] { "square poll vertical", "chart", "graph", "results", "survey", "trend", "vote", "voting" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Charts + Diagrams", "Marketing", "Social" })] Poll = 0xF681, /// /// The Font Awesome "square-poll-horizontal" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square poll horizontal", "chart", "graph", "results", "statistics", "survey", "trend", "vote", "voting" })] + [FontAwesomeSearchTerms(new[] { "square poll horizontal", "chart", "graph", "results", "survey", "trend", "vote", "voting" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Charts + Diagrams", "Marketing", "Social" })] PollH = 0xF682, /// /// The Font Awesome "poo" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "crap", "dung", "face", "monster", "pile of poo", "poo", "poop", "shit", "smile", "turd", "uer" })] + [FontAwesomeSearchTerms(new[] { "crap", "dung", "face", "monster", "pile of poo", "poo", "poop", "shit", "smile", "turd" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Users + People" })] Poo = 0xF2FE, @@ -6733,7 +6633,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "image-portrait" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "image portrait", "id", "image", "img", "photo", "picture", "selfie", "uer", "username" })] + [FontAwesomeSearchTerms(new[] { "image portrait", "id", "image", "photo", "picture", "selfie" })] [FontAwesomeCategoriesAttribute(new[] { "Photos + Images", "Users + People" })] Portrait = 0xF3E0, @@ -6754,7 +6654,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-praying" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person praying", "kneel", "place of worship", "religion", "thank", "uer", "worship" })] + [FontAwesomeSearchTerms(new[] { "person praying", "kneel", "place of worship", "religion", "thank", "worship" })] [FontAwesomeCategoriesAttribute(new[] { "Religion", "Users + People" })] Pray = 0xF683, @@ -6803,7 +6703,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "diagram-project" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "diagram project", "chart", "graph", "network", "pert", "statistics" })] + [FontAwesomeSearchTerms(new[] { "diagram project", "chart", "graph", "network", "pert" })] [FontAwesomeCategoriesAttribute(new[] { "Charts + Diagrams", "Coding" })] ProjectDiagram = 0xF542, @@ -6831,22 +6731,22 @@ public enum FontAwesomeIcon /// /// The Font Awesome "qrcode" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "qrcode", "barcode", "info", "information", "qr", "qr-code", "scan" })] - [FontAwesomeCategoriesAttribute(new[] { "Coding", "Shopping" })] + [FontAwesomeSearchTerms(new[] { "qrcode", "barcode", "info", "information", "scan" })] + [FontAwesomeCategoriesAttribute(new[] { "Coding" })] Qrcode = 0xF029, /// /// The Font Awesome "question" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0x3F. /// - [FontAwesomeSearchTerms(new[] { "?", "question mark", "faq", "help", "information", "mark", "outlined", "punctuation", "question", "red question mark", "request", "support", "unknown", "white question mark" })] + [FontAwesomeSearchTerms(new[] { "?", "question mark", "help", "information", "mark", "outlined", "punctuation", "question", "red question mark", "support", "unknown", "white question mark" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Alert", "Punctuation + Symbols" })] Question = 0xF128, /// /// The Font Awesome "circle-question" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle question", "faq", "help", "information", "support", "unknown" })] + [FontAwesomeSearchTerms(new[] { "circle question", "help", "information", "support", "unknown" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Punctuation + Symbols" })] QuestionCircle = 0xF059, @@ -6916,14 +6816,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "ranking-star" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ranking star", "chart", "first place", "podium", "quality", "rank", "revenue", "win" })] + [FontAwesomeSearchTerms(new[] { "ranking star", "chart", "first place", "podium", "rank", "win" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Marketing", "Sports + Fitness" })] RankingStar = 0xE561, /// /// The Font Awesome "receipt" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "accounting", "bookkeeping", "check", "coupon", "evidence", "invoice", "money", "pay", "proof", "receipt", "table" })] + [FontAwesomeSearchTerms(new[] { "accounting", "bookkeeping", "check", "evidence", "invoice", "money", "pay", "proof", "receipt", "table" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Money", "Shopping" })] Receipt = 0xF543, @@ -6944,15 +6844,15 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-rotate-right" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow rotate right", "clockwise open circle arrow", "forward", "refresh", "reload", "renew", "repeat", "retry" })] - [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback", "Spinners" })] + [FontAwesomeSearchTerms(new[] { "arrow rotate right", "clockwise open circle arrow", "forward", "refresh", "reload", "repeat" })] + [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] Redo = 0xF01E, /// /// The Font Awesome "rotate-right" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "rotate right", "forward", "refresh", "reload", "renew", "repeat", "retry" })] - [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback", "Spinners" })] + [FontAwesomeSearchTerms(new[] { "rotate right", "forward", "refresh", "reload", "repeat" })] + [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] RedoAlt = 0xF2F9, /// @@ -6965,14 +6865,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "text-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "text slash", "cancel", "disabled", "font", "format", "remove", "style", "text" })] + [FontAwesomeSearchTerms(new[] { "text slash", "cancel", "font", "format", "remove", "style", "text" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] RemoveFormat = 0xF87D, /// /// The Font Awesome "repeat" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow", "clockwise", "flip", "reload", "renew", "repeat", "repeat button", "retry", "rewind", "switch" })] + [FontAwesomeSearchTerms(new[] { "arrow", "clockwise", "flip", "reload", "repeat", "repeat button", "rewind", "switch" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] Repeat = 0xF363, @@ -7000,14 +6900,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "restroom" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "restroom", "bathroom", "toilet", "uer", "water closet", "wc" })] + [FontAwesomeSearchTerms(new[] { "restroom", "bathroom", "toilet", "water closet", "wc" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Users + People" })] Restroom = 0xF7BD, /// /// The Font Awesome "retweet" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "retweet", "refresh", "reload", "renew", "retry", "share", "swap" })] + [FontAwesomeSearchTerms(new[] { "retweet", "refresh", "reload", "share", "swap" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Social" })] Retweet = 0xF079, @@ -7021,7 +6921,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "ring" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ring", "dungeons & dragons", "gollum", "band", "binding", "d&d", "dnd", "engagement", "fantasy", "gold", "jewelry", "marriage", "precious", "premium" })] + [FontAwesomeSearchTerms(new[] { "ring", "dungeons & dragons", "gollum", "band", "binding", "d&d", "dnd", "engagement", "fantasy", "gold", "jewelry", "marriage", "precious" })] [FontAwesomeCategoriesAttribute(new[] { "Gaming", "Spinners" })] Ring = 0xF70B, @@ -7049,28 +6949,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "road-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "road circle check", "enable", "freeway", "highway", "not affected", "ok", "okay", "pavement", "road", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "road circle check", "freeway", "highway", "not affected", "ok", "okay", "pavement", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] RoadCircleCheck = 0xE564, /// /// The Font Awesome "road-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "road circle exclamation", "affected", "failed", "freeway", "highway", "pavement", "road" })] + [FontAwesomeSearchTerms(new[] { "road circle exclamation", "affected", "freeway", "highway", "pavement", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] RoadCircleExclamation = 0xE565, /// /// The Font Awesome "road-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "road circle xmark", "destroy", "freeway", "highway", "pavement", "road", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "road circle xmark", "destroy", "freeway", "highway", "pavement", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] RoadCircleXmark = 0xE566, /// /// The Font Awesome "road-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "road lock", "closed", "freeway", "highway", "lockdown", "padlock", "pavement", "privacy", "quarantine", "road" })] + [FontAwesomeSearchTerms(new[] { "road lock", "closed", "freeway", "highway", "lockdown", "pavement", "quarantine", "road" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Logistics" })] RoadLock = 0xE567, @@ -7161,7 +7061,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-running" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person running", "exit", "flee", "follow", "marathon", "person running", "race", "running", "uer", "workout" })] + [FontAwesomeSearchTerms(new[] { "person running", "exit", "flee", "marathon", "person running", "race", "running" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness", "Users + People" })] Running = 0xF70C, @@ -7182,14 +7082,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "sack-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "sack dollar", "bag", "burlap", "cash", "dollar", "investment", "money", "money bag", "moneybag", "premium", "robber", "salary", "santa", "usd" })] + [FontAwesomeSearchTerms(new[] { "sack dollar", "bag", "burlap", "cash", "dollar", "money", "money bag", "moneybag", "robber", "santa", "usd" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Money" })] SackDollar = 0xF81D, /// /// The Font Awesome "sack-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "sack xmark", "bag", "burlap", "coupon", "rations", "salary", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "sack xmark", "bag", "burlap", "rations" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Money" })] SackXmark = 0xE56A, @@ -7245,21 +7145,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "school-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "school circle check", "enable", "not affected", "ok", "okay", "schoolhouse", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "school circle check", "not affected", "ok", "okay", "schoolhouse" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Education", "Humanitarian" })] SchoolCircleCheck = 0xE56B, /// /// The Font Awesome "school-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "school circle exclamation", "affected", "failed", "schoolhouse" })] + [FontAwesomeSearchTerms(new[] { "school circle exclamation", "affected", "schoolhouse" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Education", "Humanitarian" })] SchoolCircleExclamation = 0xE56C, /// /// The Font Awesome "school-circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "school circle xmark", "destroy", "schoolhouse", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "school circle xmark", "destroy", "schoolhouse" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Education", "Humanitarian" })] SchoolCircleXmark = 0xE56D, @@ -7273,63 +7173,63 @@ public enum FontAwesomeIcon /// /// The Font Awesome "school-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "school lock", "closed", "lockdown", "padlock", "privacy", "quarantine", "schoolhouse" })] + [FontAwesomeSearchTerms(new[] { "school lock", "closed", "lockdown", "quarantine", "schoolhouse" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Education", "Humanitarian" })] SchoolLock = 0xE56F, /// /// The Font Awesome "screwdriver" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "admin", "configuration", "equipment", "fix", "maintenance", "mechanic", "modify", "repair", "screw", "screwdriver", "settings", "tool" })] + [FontAwesomeSearchTerms(new[] { "admin", "fix", "mechanic", "repair", "screw", "screwdriver", "settings", "tool" })] [FontAwesomeCategoriesAttribute(new[] { "Construction" })] Screwdriver = 0xF54A, /// /// The Font Awesome "scroll" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "dungeons & dragons", "announcement", "d&d", "dnd", "fantasy", "paper", "scholar", "script", "scroll" })] + [FontAwesomeSearchTerms(new[] { "dungeons & dragons", "announcement", "d&d", "dnd", "fantasy", "paper", "script", "scroll" })] [FontAwesomeCategoriesAttribute(new[] { "Gaming" })] Scroll = 0xF70E, /// /// The Font Awesome "sd-card" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "sd card", "image", "img", "memory", "photo", "save" })] + [FontAwesomeSearchTerms(new[] { "sd card", "image", "memory", "photo", "save" })] [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware" })] SdCard = 0xF7C2, /// /// The Font Awesome "magnifying-glass" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass", "bigger", "enlarge", "equipment", "find", "glass", "inspection", "magnifier", "magnify", "magnifying", "magnifying glass tilted left", "preview", "search", "tool", "zoom" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass", "bigger", "enlarge", "find", "glass", "magnify", "magnifying", "magnifying glass tilted left", "preview", "search", "tool", "zoom" })] [FontAwesomeCategoriesAttribute(new[] { "Maps" })] Search = 0xF002, /// /// The Font Awesome "magnifying-glass-dollar" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass dollar", "bigger", "enlarge", "find", "magnifier", "magnify", "money", "preview", "zoom" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass dollar", "bigger", "enlarge", "find", "magnify", "money", "preview", "zoom" })] [FontAwesomeCategoriesAttribute(new[] { "Marketing" })] SearchDollar = 0xF688, /// /// The Font Awesome "magnifying-glass-location" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass location", "bigger", "enlarge", "find", "magnifier", "magnify", "preview", "zoom" })] - [FontAwesomeCategoriesAttribute(new[] { "Maps", "Marketing" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass location", "bigger", "enlarge", "find", "magnify", "preview", "zoom" })] + [FontAwesomeCategoriesAttribute(new[] { "Marketing" })] SearchLocation = 0xF689, /// /// The Font Awesome "magnifying-glass-minus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass minus", "magnifier", "minify", "negative", "smaller", "zoom", "zoom out" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass minus", "minify", "negative", "smaller", "zoom", "zoom out" })] [FontAwesomeCategoriesAttribute(new[] { "Maps" })] SearchMinus = 0xF010, /// /// The Font Awesome "magnifying-glass-plus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "magnifying glass plus", "bigger", "enlarge", "magnifier", "magnify", "positive", "zoom", "zoom in" })] + [FontAwesomeSearchTerms(new[] { "magnifying glass plus", "bigger", "enlarge", "magnify", "positive", "zoom", "zoom in" })] [FontAwesomeCategoriesAttribute(new[] { "Maps" })] SearchPlus = 0xF00E, @@ -7343,21 +7243,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "seedling" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "environment", "flora", "grow", "investment", "plant", "sapling", "seedling", "vegan", "young" })] + [FontAwesomeSearchTerms(new[] { "environment", "flora", "grow", "plant", "sapling", "seedling", "vegan", "young" })] [FontAwesomeCategoriesAttribute(new[] { "Charity", "Energy", "Food + Beverage", "Fruits + Vegetables", "Humanitarian", "Nature", "Science" })] Seedling = 0xF4D8, - /// - /// The Font Awesome "septagon" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "septagon", "7", "heptagon", "seven", "shape" })] - [FontAwesomeCategoriesAttribute(new[] { "Shapes" })] - Septagon = 0xE820, - /// /// The Font Awesome "server" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "server", "computer", "cpu", "database", "hardware", "mysql", "network", "sql" })] + [FontAwesomeSearchTerms(new[] { "server", "computer", "cpu", "database", "hardware", "network" })] [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware" })] Server = 0xF233, @@ -7420,7 +7313,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "shield-halved" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "shield halved", "achievement", "armor", "award", "block", "cleric", "defend", "defense", "holy", "paladin", "privacy", "security", "shield", "weapon", "winner" })] + [FontAwesomeSearchTerms(new[] { "shield halved", "achievement", "armor", "award", "block", "cleric", "defend", "defense", "holy", "paladin", "security", "shield", "weapon", "winner" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Gaming", "Security" })] ShieldAlt = 0xF3ED, @@ -7441,7 +7334,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "shield-heart" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "shield heart", "love", "protect", "safe", "safety", "shield", "wishlist" })] + [FontAwesomeSearchTerms(new[] { "shield heart", "love", "protect", "safe", "safety", "shield" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security" })] ShieldHeart = 0xE574, @@ -7462,7 +7355,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "truck-fast" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "truck fast", "express", "fedex", "mail", "overnight", "package", "quick", "ups" })] + [FontAwesomeSearchTerms(new[] { "truck fast", "express", "fedex", "mail", "overnight", "package", "ups" })] [FontAwesomeCategoriesAttribute(new[] { "Logistics", "Shopping" })] ShippingFast = 0xF48B, @@ -7476,7 +7369,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "shop-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "shop lock", "bodega", "building", "buy", "closed", "lock", "lockdown", "market", "padlock", "privacy", "purchase", "quarantine", "shop", "shopping", "store" })] + [FontAwesomeSearchTerms(new[] { "shop lock", "bodega", "building", "buy", "closed", "lock", "lockdown", "market", "purchase", "quarantine", "shop", "shopping", "store" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Humanitarian", "Shopping" })] ShopLock = 0xE4A5, @@ -7504,7 +7397,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "shop-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "shop slash", "building", "buy", "closed", "disabled", "purchase", "shopping" })] + [FontAwesomeSearchTerms(new[] { "shop slash", "building", "buy", "closed", "covid-19", "purchase", "shopping" })] [FontAwesomeCategoriesAttribute(new[] { "Shopping" })] ShopSlash = 0xE070, @@ -7525,7 +7418,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "van-shuttle" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "van shuttle", "airport", "bus", "minibus", "public-transportation", "transportation", "travel", "vehicle" })] + [FontAwesomeSearchTerms(new[] { "van shuttle", "airport", "bus", "machine", "minibus", "public-transportation", "transportation", "travel", "vehicle" })] [FontAwesomeCategoriesAttribute(new[] { "Automotive", "Transportation", "Travel + Hotel" })] ShuttleVan = 0xF5B6, @@ -7546,7 +7439,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "signature" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "signature", "john hancock", "cursive", "name", "username", "writing" })] + [FontAwesomeSearchTerms(new[] { "signature", "john hancock", "cursive", "name", "writing" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Editing", "Writing" })] Signature = 0xF5B7, @@ -7578,20 +7471,6 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Devices + Hardware" })] SimCard = 0xF7C4, - /// - /// The Font Awesome "single-quote-left" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "single quote left", "left single quotation mark", "mention", "note", "phrase", "text", "type" })] - [FontAwesomeCategoriesAttribute(new[] { "Communication", "Punctuation + Symbols", "Writing" })] - SingleQuoteLeft = 0xE81B, - - /// - /// The Font Awesome "single-quote-right" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "single quote right", "mention", "note", "phrase", "right single quotation mark", "text", "type" })] - [FontAwesomeCategoriesAttribute(new[] { "Communication", "Punctuation + Symbols", "Writing" })] - SingleQuoteRight = 0xE81C, - /// /// The Font Awesome "sink" icon unicode character. /// @@ -7609,28 +7488,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-skating" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person skating", "figure skating", "ice", "olympics", "rink", "skate", "uer", "winter" })] + [FontAwesomeSearchTerms(new[] { "person skating", "figure skating", "ice", "olympics", "rink", "skate", "winter" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness", "Users + People" })] Skating = 0xF7C5, /// /// The Font Awesome "person-skiing" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person skiing", "downhill", "olympics", "ski", "skier", "snow", "uer", "winter" })] + [FontAwesomeSearchTerms(new[] { "person skiing", "downhill", "olympics", "ski", "skier", "snow", "winter" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness", "Users + People" })] Skiing = 0xF7C9, /// /// The Font Awesome "person-skiing-nordic" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person skiing nordic", "cross country", "olympics", "uer", "winter" })] + [FontAwesomeSearchTerms(new[] { "person skiing nordic", "cross country", "olympics", "winter" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness", "Users + People" })] SkiingNordic = 0xF7CA, /// /// The Font Awesome "skull" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bones", "death", "face", "fairy tale", "monster", "skeleton", "skull", "uer", "x-ray", "yorick" })] + [FontAwesomeSearchTerms(new[] { "bones", "death", "face", "fairy tale", "monster", "skeleton", "skull", "x-ray", "yorick" })] [FontAwesomeCategoriesAttribute(new[] { "Halloween", "Medical + Health", "Users + People" })] Skull = 0xF54C, @@ -7658,14 +7537,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "sliders" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "adjust", "configuration", "modify", "settings", "sliders", "toggle" })] - [FontAwesomeCategoriesAttribute(new[] { "Editing", "Media Playback", "Music + Audio", "Photos + Images", "Toggle" })] + [FontAwesomeSearchTerms(new[] { "adjust", "settings", "sliders", "toggle" })] + [FontAwesomeCategoriesAttribute(new[] { "Editing", "Media Playback", "Music + Audio", "Photos + Images" })] SlidersH = 0xF1DE, /// /// The Font Awesome "face-smile" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "face smile", "approve", "default", "emoticon", "face", "happy", "rating", "satisfied", "slightly smiling face", "smile", "uer" })] + [FontAwesomeSearchTerms(new[] { "face smile", "approve", "emoticon", "face", "happy", "rating", "satisfied", "slightly smiling face", "smile" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Emoji", "Users + People" })] Smile = 0xF118, @@ -7700,21 +7579,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "ban-smoking" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ban smoking", "ban", "cancel", "circle", "deny", "disabled", "forbidden", "no", "no smoking", "non-smoking", "not", "prohibited", "slash", "smoking" })] + [FontAwesomeSearchTerms(new[] { "ban smoking", "ban", "cancel", "forbidden", "no", "no smoking", "non-smoking", "not", "prohibited", "smoking" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Travel + Hotel" })] SmokingBan = 0xF54D, /// /// The Font Awesome "comment-sms" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "comment sms", "answer", "chat", "conversation", "message", "mobile", "notification", "phone", "sms", "texting" })] + [FontAwesomeSearchTerms(new[] { "comment sms", "chat", "conversation", "message", "mobile", "notification", "phone", "sms", "texting" })] [FontAwesomeCategoriesAttribute(new[] { "Communication" })] Sms = 0xF7CD, /// /// The Font Awesome "person-snowboarding" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person snowboarding", "olympics", "ski", "snow", "snowboard", "snowboarder", "uer", "winter" })] + [FontAwesomeSearchTerms(new[] { "person snowboarding", "olympics", "ski", "snow", "snowboard", "snowboarder", "winter" })] [FontAwesomeCategoriesAttribute(new[] { "Sports + Fitness", "Users + People" })] Snowboarding = 0xF7CE, @@ -7812,7 +7691,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrow-up-wide-short" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow up wide short", "arrange", "filter", "order", "sort-amount-desc", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "arrow up wide short", "arrange", "filter", "order", "sort-amount-desc" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] SortAmountUp = 0xF161, @@ -7826,7 +7705,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "sort-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "sort down", "arrow", "descending", "filter", "insert", "order", "sort-desc" })] + [FontAwesomeSearchTerms(new[] { "sort down", "arrow", "descending", "filter", "order", "sort-desc" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] SortDown = 0xF0DD, @@ -7861,7 +7740,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "sort-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "sort up", "arrow", "ascending", "filter", "order", "sort-asc", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "sort up", "arrow", "ascending", "filter", "order", "sort-asc" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] SortUp = 0xF0DE, @@ -7882,7 +7761,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "spell-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "spell check", "dictionary", "edit", "editor", "enable", "grammar", "text", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "spell check", "dictionary", "edit", "editor", "grammar", "text" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] SpellCheck = 0xF891, @@ -7896,17 +7775,10 @@ public enum FontAwesomeIcon /// /// The Font Awesome "spinner" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "spinner", "circle", "loading", "pending", "progress" })] + [FontAwesomeSearchTerms(new[] { "spinner", "circle", "loading", "progress" })] [FontAwesomeCategoriesAttribute(new[] { "Spinners" })] Spinner = 0xF110, - /// - /// The Font Awesome "spiral" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "spiral", "design", "dizzy", "rotate", "spin", "swirl", "twist" })] - [FontAwesomeCategoriesAttribute(new[] { "Design", "Shapes" })] - Spiral = 0xE80A, - /// /// The Font Awesome "splotch" icon unicode character. /// @@ -7935,13 +7807,6 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Arrows" })] SquareArrowUpRight = 0xF14C, - /// - /// The Font Awesome "square-binary" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "square binary", "ai", "data", "language", "llm", "model", "programming", "token" })] - [FontAwesomeCategoriesAttribute(new[] { "Coding", "Shapes" })] - SquareBinary = 0xE69B, - /// /// The Font Awesome "square-full" icon unicode character. /// @@ -7959,7 +7824,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "square-person-confined" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square person confined", "captivity", "confined", "uer" })] + [FontAwesomeSearchTerms(new[] { "square person confined", "captivity", "confined" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Security", "Users + People" })] SquarePersonConfined = 0xE577, @@ -7980,7 +7845,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "square-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "square xmark", "close", "cross", "cross mark button", "incorrect", "mark", "notice", "notification", "notify", "problem", "square", "uncheck", "window", "wrong", "x", "×" })] + [FontAwesomeSearchTerms(new[] { "square xmark", "close", "cross", "cross mark button", "incorrect", "mark", "notice", "notification", "notify", "problem", "square", "window", "wrong", "x", "×" })] [FontAwesomeCategoriesAttribute(new[] { "Mathematics" })] SquareXmark = 0xF2D3, @@ -8015,7 +7880,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "star" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "achievement", "award", "favorite", "important", "night", "quality", "rating", "score", "star", "vip" })] + [FontAwesomeSearchTerms(new[] { "achievement", "award", "favorite", "important", "night", "rating", "score", "star" })] [FontAwesomeCategoriesAttribute(new[] { "Shapes", "Shopping", "Social", "Toggle" })] Star = 0xF005, @@ -8099,7 +7964,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "stopwatch" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "clock", "reminder", "stopwatch", "time", "waiting" })] + [FontAwesomeSearchTerms(new[] { "clock", "reminder", "stopwatch", "time" })] [FontAwesomeCategoriesAttribute(new[] { "Time" })] Stopwatch = 0xF2F2, @@ -8127,7 +7992,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "store-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "store slash", "building", "buy", "closed", "disabled", "purchase", "shopping" })] + [FontAwesomeSearchTerms(new[] { "store slash", "building", "buy", "closed", "covid-19", "purchase", "shopping" })] [FontAwesomeCategoriesAttribute(new[] { "Shopping" })] StoreSlash = 0xE071, @@ -8141,14 +8006,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "street-view" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "street view", "directions", "location", "map", "navigation", "uer" })] + [FontAwesomeSearchTerms(new[] { "street view", "directions", "location", "map", "navigation" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Users + People" })] StreetView = 0xF21D, /// /// The Font Awesome "strikethrough" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "strikethrough", "cancel", "edit", "font", "format", "modify", "text", "type" })] + [FontAwesomeSearchTerms(new[] { "strikethrough", "cancel", "edit", "font", "format", "text", "type" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] Strikethrough = 0xF0CC, @@ -8225,7 +8090,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-swimming" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person swimming", "ocean", "person swimming", "pool", "sea", "swim", "uer", "water" })] + [FontAwesomeSearchTerms(new[] { "person swimming", "ocean", "person swimming", "pool", "sea", "swim", "water" })] [FontAwesomeCategoriesAttribute(new[] { "Maritime", "Sports + Fitness", "Travel + Hotel", "Users + People" })] Swimmer = 0xF5C4, @@ -8246,14 +8111,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "arrows-rotate" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrows rotate", "clockwise right and left semicircle arrows", "clockwise", "exchange", "modify", "refresh", "reload", "renew", "retry", "rotate", "swap" })] - [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Editing", "Media Playback", "Spinners" })] + [FontAwesomeSearchTerms(new[] { "arrows rotate", "clockwise right and left semicircle arrows", "exchange", "refresh", "reload", "rotate", "swap" })] + [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Editing", "Media Playback" })] Sync = 0xF021, /// /// The Font Awesome "rotate" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "arrow", "clockwise", "exchange", "modify", "refresh", "reload", "renew", "retry", "rotate", "swap", "withershins" })] + [FontAwesomeSearchTerms(new[] { "anticlockwise", "arrow", "counterclockwise", "counterclockwise arrows button", "exchange", "refresh", "reload", "rotate", "swap", "withershins" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Editing", "Media Playback", "Spinners" })] SyncAlt = 0xF2F1, @@ -8267,31 +8132,10 @@ public enum FontAwesomeIcon /// /// The Font Awesome "table" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "table", "category", "data", "excel", "spreadsheet" })] + [FontAwesomeSearchTerms(new[] { "table", "data", "excel", "spreadsheet" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Text Formatting" })] Table = 0xF0CE, - /// - /// The Font Awesome "table-cells-column-lock" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "table cells column lock", "blocks", "boxes", "category", "column", "excel", "grid", "lock", "spreadsheet", "squares" })] - [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] - TableCellsColumnLock = 0xE678, - - /// - /// The Font Awesome "table-cells-row-lock" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "table cells row lock", "blocks", "boxes", "category", "column", "column", "excel", "grid", "lock", "lock", "spreadsheet", "squares" })] - [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] - TableCellsRowLock = 0xE67A, - - /// - /// The Font Awesome "table-cells-row-unlock" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "table cells row unlock", "blocks", "boxes", "category", "column", "column", "excel", "grid", "lock", "lock", "spreadsheet", "squares", "unlock" })] - [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] - TableCellsRowUnlock = 0xE691, - /// /// The Font Awesome "tablet" icon unicode character. /// @@ -8331,7 +8175,7 @@ public enum FontAwesomeIcon /// The Font Awesome "gauge-high" icon unicode character. /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xF625. /// - [FontAwesomeSearchTerms(new[] { "gauge high", "dashboard", "fast", "odometer", "quick", "speed", "speedometer" })] + [FontAwesomeSearchTerms(new[] { "gauge high", "dashboard", "fast", "odometer", "speed", "speedometer" })] [FontAwesomeCategoriesAttribute(new[] { "Automotive" })] TachometerAlt = 0xF3FD, @@ -8373,7 +8217,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "list-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "list check", "bullet", "cheatsheet", "checklist", "downloading", "downloads", "enable", "loading", "progress", "project management", "settings", "summary", "to do", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "list check", "checklist", "downloading", "downloads", "loading", "progress", "project management", "settings", "to do" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Text Formatting" })] Tasks = 0xF0AE, @@ -8436,42 +8280,42 @@ public enum FontAwesomeIcon /// /// The Font Awesome "tent" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bivouac", "campground", "campsite", "refugee", "shelter", "tent" })] + [FontAwesomeSearchTerms(new[] { "bivouac", "campground", "refugee", "shelter", "tent" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Camping", "Humanitarian" })] Tent = 0xE57D, /// /// The Font Awesome "tent-arrow-down-to-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tent arrow down to line", "bivouac", "campground", "campsite", "permanent", "refugee", "refugee", "shelter", "shelter", "tent" })] + [FontAwesomeSearchTerms(new[] { "tent arrow down to line", "permanent", "refugee", "shelter" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Camping", "Humanitarian" })] TentArrowDownToLine = 0xE57E, /// /// The Font Awesome "tent-arrow-left-right" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tent arrow left right", "bivouac", "campground", "campsite", "refugee", "refugee", "shelter", "shelter", "tent", "transition" })] + [FontAwesomeSearchTerms(new[] { "tent arrow left right", "refugee", "shelter", "transition" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Camping", "Humanitarian" })] TentArrowLeftRight = 0xE57F, /// /// The Font Awesome "tent-arrows-down" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tent arrows down", "bivouac", "campground", "campsite", "insert", "refugee", "refugee", "shelter", "shelter", "spontaneous", "tent" })] + [FontAwesomeSearchTerms(new[] { "tent arrows down", "refugee", "shelter", "spontaneous" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Camping", "Humanitarian" })] TentArrowsDown = 0xE581, /// /// The Font Awesome "tent-arrow-turn-left" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tent arrow turn left", "bivouac", "campground", "campsite", "refugee", "refugee", "shelter", "shelter", "temporary", "tent" })] + [FontAwesomeSearchTerms(new[] { "tent arrow turn left", "refugee", "shelter", "temporary" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Camping", "Humanitarian" })] TentArrowTurnLeft = 0xE580, /// /// The Font Awesome "tents" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tents", "bivouac", "bivouac", "campground", "campground", "campsite", "refugee", "refugee", "shelter", "shelter", "tent", "tent" })] + [FontAwesomeSearchTerms(new[] { "tents", "bivouac", "campground", "refugee", "shelter", "tent" })] [FontAwesomeCategoriesAttribute(new[] { "Buildings", "Camping", "Humanitarian" })] Tents = 0xE582, @@ -8485,21 +8329,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "text-height" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "text height", "edit", "font", "format", "modify", "text", "type" })] + [FontAwesomeSearchTerms(new[] { "text height", "edit", "font", "format", "text", "type" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] TextHeight = 0xF034, /// /// The Font Awesome "text-width" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "text width", "edit", "font", "format", "modify", "text", "type" })] + [FontAwesomeSearchTerms(new[] { "text width", "edit", "font", "format", "text", "type" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] TextWidth = 0xF035, /// /// The Font Awesome "table-cells" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "table cells", "blocks", "boxes", "category", "excel", "grid", "spreadsheet", "squares" })] + [FontAwesomeSearchTerms(new[] { "table cells", "blocks", "boxes", "grid", "squares" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] Th = 0xF00A, @@ -8555,14 +8399,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "table-cells-large" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "table cells large", "blocks", "boxes", "category", "excel", "grid", "spreadsheet", "squares" })] + [FontAwesomeSearchTerms(new[] { "table cells large", "blocks", "boxes", "grid", "squares" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] ThLarge = 0xF009, /// /// The Font Awesome "table-list" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "table list", "category", "cheatsheet", "checklist", "completed", "done", "finished", "ol", "summary", "todo", "ul" })] + [FontAwesomeSearchTerms(new[] { "table list", "checklist", "completed", "done", "finished", "ol", "todo", "ul" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] ThList = 0xF00B, @@ -8587,24 +8431,17 @@ public enum FontAwesomeIcon [FontAwesomeCategoriesAttribute(new[] { "Business", "Maps", "Social", "Writing" })] Thumbtack = 0xF08D, - /// - /// The Font Awesome "thumbtack-slash" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "thumbtack slash", "black pushpin", "coordinates", "location", "marker", "pin", "pushpin", "thumb-tack", "unpin" })] - [FontAwesomeCategoriesAttribute(new[] { "Business", "Maps", "Social", "Writing" })] - ThumbtackSlash = 0xE68F, - /// /// The Font Awesome "ticket" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "admission", "admission tickets", "coupon", "movie", "pass", "support", "ticket", "voucher" })] + [FontAwesomeSearchTerms(new[] { "admission", "admission tickets", "movie", "pass", "support", "ticket" })] [FontAwesomeCategoriesAttribute(new[] { "Film + Video", "Maps" })] Ticket = 0xF145, /// /// The Font Awesome "ticket-simple" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "ticket simple", "admission", "coupon", "movie", "pass", "support", "ticket", "voucher" })] + [FontAwesomeSearchTerms(new[] { "ticket simple", "movie", "pass", "support", "ticket" })] [FontAwesomeCategoriesAttribute(new[] { "Maps", "Shapes" })] TicketAlt = 0xF3FF, @@ -8618,29 +8455,29 @@ public enum FontAwesomeIcon /// /// The Font Awesome "xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "xmark", "cancellation x", "multiplication sign", "multiplication x", "cancel", "close", "cross", "cross mark", "error", "exit", "incorrect", "mark", "multiplication", "multiply", "notice", "notification", "notify", "problem", "sign", "uncheck", "wrong", "x", "×" })] + [FontAwesomeSearchTerms(new[] { "xmark", "cancellation x", "multiplication sign", "multiplication x", "cancel", "close", "cross", "cross mark", "error", "exit", "incorrect", "mark", "multiplication", "multiply", "notice", "notification", "notify", "problem", "sign", "wrong", "x", "×" })] [FontAwesomeCategoriesAttribute(new[] { "Editing", "Mathematics" })] Times = 0xF00D, /// /// The Font Awesome "circle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle xmark", "close", "cross", "destroy", "exit", "incorrect", "notice", "notification", "notify", "problem", "uncheck", "wrong", "x" })] + [FontAwesomeSearchTerms(new[] { "circle xmark", "close", "cross", "destroy", "exit", "incorrect", "notice", "notification", "notify", "problem", "wrong", "x" })] [FontAwesomeCategoriesAttribute(new[] { "Mathematics" })] TimesCircle = 0xF057, /// /// The Font Awesome "droplet" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "blood", "cold", "color", "comic", "drop", "droplet", "raindrop", "sweat", "waterdrop" })] - [FontAwesomeCategoriesAttribute(new[] { "Design", "Humanitarian", "Maps", "Medical + Health", "Photos + Images" })] + [FontAwesomeSearchTerms(new[] { "cold", "color", "comic", "drop", "droplet", "raindrop", "sweat", "waterdrop" })] + [FontAwesomeCategoriesAttribute(new[] { "Design", "Humanitarian", "Maps", "Photos + Images" })] Tint = 0xF043, /// /// The Font Awesome "droplet-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "droplet slash", "blood", "color", "disabled", "drop", "droplet", "raindrop", "waterdrop" })] - [FontAwesomeCategoriesAttribute(new[] { "Design", "Medical + Health" })] + [FontAwesomeSearchTerms(new[] { "droplet slash", "color", "drop", "droplet", "raindrop", "waterdrop" })] + [FontAwesomeCategoriesAttribute(new[] { "Design" })] TintSlash = 0xF5C7, /// @@ -8681,7 +8518,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "toilet-paper-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "toilet paper slash", "bathroom", "covid-19", "disabled", "halloween", "holiday", "lavatory", "leaves", "prank", "privy", "restroom", "roll", "toilet", "trouble", "ut oh", "wipe" })] + [FontAwesomeSearchTerms(new[] { "toilet paper slash", "bathroom", "covid-19", "halloween", "holiday", "lavatory", "leaves", "prank", "privy", "restroom", "roll", "toilet", "trouble", "ut oh", "wipe" })] [FontAwesomeCategoriesAttribute(new[] { "Household" })] ToiletPaperSlash = 0xE072, @@ -8702,14 +8539,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "toolbox" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "admin", "chest", "configuration", "container", "equipment", "fix", "maintenance", "mechanic", "modify", "repair", "settings", "tool", "toolbox", "tools" })] + [FontAwesomeSearchTerms(new[] { "admin", "chest", "container", "fix", "mechanic", "repair", "settings", "tool", "toolbox", "tools" })] [FontAwesomeCategoriesAttribute(new[] { "Construction" })] Toolbox = 0xF552, /// /// The Font Awesome "screwdriver-wrench" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "screwdriver wrench", "admin", "configuration", "equipment", "fix", "maintenance", "modify", "repair", "screwdriver", "settings", "tools", "wrench" })] + [FontAwesomeSearchTerms(new[] { "screwdriver wrench", "admin", "fix", "repair", "screwdriver", "settings", "tools", "wrench" })] [FontAwesomeCategoriesAttribute(new[] { "Construction" })] Tools = 0xF7D9, @@ -8744,7 +8581,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "tower-cell" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "tower cell", "airwaves", "antenna", "communication", "radio", "reception", "signal", "waves" })] + [FontAwesomeSearchTerms(new[] { "tower cell", "airwaves", "antenna", "communication", "radio", "reception", "waves" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Connectivity", "Film + Video", "Humanitarian" })] TowerCell = 0xE585, @@ -8772,7 +8609,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "traffic-light" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "traffic light", "direction", "go", "light", "road", "signal", "slow", "stop", "traffic", "travel", "vertical traffic light" })] + [FontAwesomeSearchTerms(new[] { "traffic light", "direction", "light", "road", "signal", "traffic", "travel", "vertical traffic light" })] [FontAwesomeCategoriesAttribute(new[] { "Maps" })] TrafficLight = 0xF637, @@ -8828,21 +8665,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "trash-arrow-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "trash arrow up", "back", "control z", "delete", "garbage", "hide", "oops", "remove", "undo", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "trash arrow up", "back", "control z", "delete", "garbage", "hide", "oops", "remove", "undo" })] [FontAwesomeCategoriesAttribute(new[] { "Editing" })] TrashRestore = 0xF829, /// /// The Font Awesome "trash-can-arrow-up" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "trash can arrow up", "back", "control z", "delete", "garbage", "hide", "oops", "remove", "undo", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "trash can arrow up", "back", "control z", "delete", "garbage", "hide", "oops", "remove", "undo" })] [FontAwesomeCategoriesAttribute(new[] { "Editing" })] TrashRestoreAlt = 0xF82A, /// /// The Font Awesome "tree" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "bark", "evergreen tree", "fall", "flora", "forest", "investment", "nature", "plant", "seasonal", "tree" })] + [FontAwesomeSearchTerms(new[] { "bark", "evergreen tree", "fall", "flora", "forest", "nature", "plant", "seasonal", "tree" })] [FontAwesomeCategoriesAttribute(new[] { "Camping", "Maps", "Nature" })] Tree = 0xF1BB, @@ -8863,14 +8700,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "trowel" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "trowel", "build", "construction", "equipment", "maintenance", "tool" })] + [FontAwesomeSearchTerms(new[] { "trowel", "build", "construction", "tool" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Humanitarian" })] Trowel = 0xE589, /// /// The Font Awesome "trowel-bricks" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "trowel bricks", "build", "construction", "maintenance", "reconstruction", "tool" })] + [FontAwesomeSearchTerms(new[] { "trowel bricks", "build", "construction", "reconstruction", "tool" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Humanitarian" })] TrowelBricks = 0xE58A, @@ -8891,8 +8728,8 @@ public enum FontAwesomeIcon /// /// The Font Awesome "truck-droplet" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "truck droplet", "blood", "thirst", "truck", "water", "water supply" })] - [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health", "Transportation" })] + [FontAwesomeSearchTerms(new[] { "truck droplet", "thirst", "truck", "water", "water supply" })] + [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Transportation" })] TruckDroplet = 0xE58C, /// @@ -8940,7 +8777,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "truck-pickup" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "truck pickup", "cargo", "maintenance", "pick-up", "pickup", "pickup truck", "truck", "vehicle" })] + [FontAwesomeSearchTerms(new[] { "truck pickup", "cargo", "pick-up", "pickup", "pickup truck", "truck", "vehicle" })] [FontAwesomeCategoriesAttribute(new[] { "Automotive", "Construction", "Transportation" })] TruckPickup = 0xF63C, @@ -8996,7 +8833,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "underline" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "underline", "edit", "emphasis", "format", "modify", "text", "writing" })] + [FontAwesomeSearchTerms(new[] { "underline", "edit", "emphasis", "format", "text", "writing" })] [FontAwesomeCategoriesAttribute(new[] { "Text Formatting" })] Underline = 0xF0CD, @@ -9004,20 +8841,20 @@ public enum FontAwesomeIcon /// The Font Awesome "arrow-rotate-left" icon unicode character. /// [FontAwesomeSearchTerms(new[] { "arrow rotate left", "anticlockwise open circle arrow", "back", "control z", "exchange", "oops", "return", "rotate", "swap" })] - [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback", "Spinners" })] + [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] Undo = 0xF0E2, /// /// The Font Awesome "rotate-left" icon unicode character. /// [FontAwesomeSearchTerms(new[] { "rotate left", "back", "control z", "exchange", "oops", "return", "swap" })] - [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback", "Spinners" })] + [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Media Playback" })] UndoAlt = 0xF2EA, /// /// The Font Awesome "universal-access" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "universal access", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "universal access", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility" })] UniversalAccess = 0xF29A, @@ -9031,254 +8868,252 @@ public enum FontAwesomeIcon /// /// The Font Awesome "link-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "link slash", "attachment", "chain", "chain-broken", "disabled", "disconnect", "remove" })] + [FontAwesomeSearchTerms(new[] { "link slash", "attachment", "chain", "chain-broken", "remove" })] [FontAwesomeCategoriesAttribute(new[] { "Editing" })] Unlink = 0xF127, /// /// The Font Awesome "unlock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "admin", "lock", "open", "padlock", "password", "privacy", "private", "protect", "unlock", "unlocked" })] + [FontAwesomeSearchTerms(new[] { "admin", "lock", "open", "password", "private", "protect", "unlock", "unlocked" })] [FontAwesomeCategoriesAttribute(new[] { "Security" })] Unlock = 0xF09C, /// /// The Font Awesome "unlock-keyhole" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "unlock keyhole", "admin", "lock", "padlock", "password", "privacy", "private", "protect" })] + [FontAwesomeSearchTerms(new[] { "unlock keyhole", "admin", "lock", "password", "private", "protect" })] [FontAwesomeCategoriesAttribute(new[] { "Security" })] UnlockAlt = 0xF13E, /// /// The Font Awesome "upload" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "upload", "hard drive", "import", "publish", "upgrade" })] + [FontAwesomeSearchTerms(new[] { "upload", "hard drive", "import", "publish" })] [FontAwesomeCategoriesAttribute(new[] { "Arrows", "Devices + Hardware" })] Upload = 0xF093, /// /// The Font Awesome "user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user", "adult", "bust", "bust in silhouette", "default", "employee", "gender-neutral", "person", "profile", "silhouette", "uer", "unspecified gender", "username", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user", "adult", "bust", "bust in silhouette", "gender-neutral", "person", "profile", "silhouette", "unspecified gender", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Social", "Users + People" })] User = 0xF007, /// - /// The Font Awesome "user" icon unicode character. - /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xF007. + /// The Font Awesome "user-large" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user", "adult", "bust", "bust in silhouette", "default", "employee", "gender-neutral", "person", "profile", "silhouette", "uer", "unspecified gender", "username", "users-people" })] - [FontAwesomeCategoriesAttribute(new[] { "Social", "Users + People" })] + [FontAwesomeSearchTerms(new[] { "user large", "users-people" })] + [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserAlt = 0xF406, /// - /// The Font Awesome "user-slash" icon unicode character. - /// Uses a legacy unicode value for backwards compatability. The current unicode value is 0xF506. + /// The Font Awesome "user-large-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user slash", "ban", "delete", "deny", "disabled", "disconnect", "employee", "remove", "uer" })] + [FontAwesomeSearchTerms(new[] { "user large slash", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserAltSlash = 0xF4FA, /// /// The Font Awesome "user-astronaut" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user astronaut", "avatar", "clothing", "cosmonaut", "nasa", "space", "suit", "uer" })] + [FontAwesomeSearchTerms(new[] { "user astronaut", "avatar", "clothing", "cosmonaut", "nasa", "space", "suit" })] [FontAwesomeCategoriesAttribute(new[] { "Astronomy", "Science Fiction", "Users + People" })] UserAstronaut = 0xF4FB, /// /// The Font Awesome "user-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user check", "employee", "enable", "uer", "users-people", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "user check", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserCheck = 0xF4FC, /// /// The Font Awesome "circle-user" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "circle user", "employee", "uer", "username", "users-people" })] + [FontAwesomeSearchTerms(new[] { "circle user", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Social", "Users + People" })] UserCircle = 0xF2BD, /// /// The Font Awesome "user-clock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user clock", "employee", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user clock", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserClock = 0xF4FD, /// /// The Font Awesome "user-gear" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user gear", "employee", "together", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user gear", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserCog = 0xF4FE, /// /// The Font Awesome "user-pen" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user pen", "employee", "modify", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user pen", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserEdit = 0xF4FF, /// /// The Font Awesome "user-group" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user group", "bust", "busts in silhouette", "crowd", "employee", "silhouette", "together", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user group", "bust", "busts in silhouette", "silhouette", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Social", "Users + People" })] UserFriends = 0xF500, /// /// The Font Awesome "user-graduate" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user graduate", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user graduate", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Education", "Users + People" })] UserGraduate = 0xF501, /// /// The Font Awesome "user-injured" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user injured", "employee", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user injured", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] UserInjured = 0xF728, /// /// The Font Awesome "user-lock" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user lock", "employee", "padlock", "privacy", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user lock", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Security", "Users + People" })] UserLock = 0xF502, /// /// The Font Awesome "user-doctor" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user doctor", "covid-19", "health", "job", "medical", "nurse", "occupation", "physician", "profile", "surgeon", "uer", "worker" })] + [FontAwesomeSearchTerms(new[] { "user doctor", "covid-19", "health", "job", "medical", "nurse", "occupation", "physician", "profile", "surgeon", "worker" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health", "Users + People" })] UserMd = 0xF0F0, /// /// The Font Awesome "user-minus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user minus", "delete", "employee", "negative", "remove", "uer" })] + [FontAwesomeSearchTerms(new[] { "user minus", "delete", "negative", "remove" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserMinus = 0xF503, /// /// The Font Awesome "user-ninja" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user ninja", "assassin", "avatar", "dangerous", "deadly", "fighter", "hidden", "ninja", "sneaky", "stealth", "uer" })] + [FontAwesomeSearchTerms(new[] { "user ninja", "assassin", "avatar", "dangerous", "deadly", "fighter", "hidden", "ninja", "sneaky", "stealth" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserNinja = 0xF504, /// /// The Font Awesome "user-nurse" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user nurse", "covid-19", "doctor", "health", "md", "medical", "midwife", "physician", "practitioner", "surgeon", "uer", "worker" })] + [FontAwesomeSearchTerms(new[] { "user nurse", "covid-19", "doctor", "health", "md", "medical", "midwife", "physician", "practitioner", "surgeon", "worker" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Users + People" })] UserNurse = 0xF82F, /// /// The Font Awesome "user-plus" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user plus", "add", "avatar", "employee", "follow", "positive", "sign up", "signup", "team", "user" })] + [FontAwesomeSearchTerms(new[] { "user plus", "add", "avatar", "positive", "sign up", "signup", "team" })] [FontAwesomeCategoriesAttribute(new[] { "Social", "Users + People" })] UserPlus = 0xF234, /// /// The Font Awesome "users" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users", "employee", "together", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "users", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Social", "Users + People" })] Users = 0xF0C0, /// /// The Font Awesome "users-between-lines" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users between lines", "covered", "crowd", "employee", "group", "people", "together", "uer" })] + [FontAwesomeSearchTerms(new[] { "users between lines", "covered", "group", "people" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] UsersBetweenLines = 0xE591, /// /// The Font Awesome "users-gear" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users gear", "employee", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "users gear", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UsersCog = 0xF509, /// /// The Font Awesome "user-secret" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user secret", "detective", "sleuth", "spy", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user secret", "detective", "sleuth", "spy", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Coding", "Security", "Users + People" })] UserSecret = 0xF21B, /// /// The Font Awesome "user-shield" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user shield", "employee", "protect", "safety", "security", "uer" })] + [FontAwesomeSearchTerms(new[] { "user shield", "protect", "safety" })] [FontAwesomeCategoriesAttribute(new[] { "Security", "Users + People" })] UserShield = 0xF505, /// /// The Font Awesome "user-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user slash", "ban", "delete", "deny", "disabled", "disconnect", "employee", "remove", "uer" })] + [FontAwesomeSearchTerms(new[] { "user slash", "ban", "delete", "remove" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserSlash = 0xF506, /// /// The Font Awesome "users-line" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users line", "crowd", "employee", "group", "need", "people", "together", "uer" })] + [FontAwesomeSearchTerms(new[] { "users line", "group", "need", "people" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] UsersLine = 0xE592, /// /// The Font Awesome "users-rays" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users rays", "affected", "crowd", "employee", "focused", "group", "people", "uer" })] + [FontAwesomeSearchTerms(new[] { "users rays", "affected", "focused", "group", "people" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] UsersRays = 0xE593, /// /// The Font Awesome "users-rectangle" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users rectangle", "crowd", "employee", "focus", "group", "people", "reached", "uer" })] + [FontAwesomeSearchTerms(new[] { "users rectangle", "focus", "group", "people", "reached" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] UsersRectangle = 0xE594, /// /// The Font Awesome "users-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users slash", "disabled", "disconnect", "employee", "together", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "users slash", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UsersSlash = 0xE073, /// /// The Font Awesome "users-viewfinder" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "users viewfinder", "crowd", "focus", "group", "people", "targeted", "uer" })] + [FontAwesomeSearchTerms(new[] { "users viewfinder", "focus", "group", "people", "targeted" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Users + People" })] UsersViewfinder = 0xE595, /// /// The Font Awesome "user-tag" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user tag", "employee", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "user tag", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserTag = 0xF507, /// /// The Font Awesome "user-tie" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user tie", "administrator", "avatar", "business", "clothing", "employee", "formal", "offer", "portfolio", "professional", "suit", "uer" })] + [FontAwesomeSearchTerms(new[] { "user tie", "avatar", "business", "clothing", "formal", "professional", "suit" })] [FontAwesomeCategoriesAttribute(new[] { "Clothing + Fashion", "Users + People" })] UserTie = 0xF508, /// /// The Font Awesome "user-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "user xmark", "archive", "delete", "employee", "remove", "uer", "uncheck", "x" })] + [FontAwesomeSearchTerms(new[] { "user xmark", "archive", "delete", "remove", "x" })] [FontAwesomeCategoriesAttribute(new[] { "Users + People" })] UserTimes = 0xF235, @@ -9299,14 +9134,15 @@ public enum FontAwesomeIcon /// /// The Font Awesome "vault" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "vault", "bank", "important", "investment", "lock", "money", "premium", "privacy", "safe", "salary" })] + [FontAwesomeSearchTerms(new[] { "vault", "bank", "important", "lock", "money", "safe" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Money", "Security" })] Vault = 0xE2C5, /// - /// The Font Awesome "vectorsquare" icon unicode character. + /// The Font Awesome "vector-square" icon unicode character. /// - [Obsolete] + [FontAwesomeSearchTerms(new[] { "vector square", "anchors", "lines", "object", "render", "shape" })] + [FontAwesomeCategoriesAttribute(new[] { "Design" })] VectorSquare = 0xF5CB, /// @@ -9347,21 +9183,21 @@ public enum FontAwesomeIcon /// /// The Font Awesome "vial" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "vial", "ampule", "chemist", "chemistry", "experiment", "knowledge", "lab", "sample", "science", "test", "test tube" })] + [FontAwesomeSearchTerms(new[] { "vial", "ampule", "chemist", "chemistry", "experiment", "lab", "sample", "science", "test", "test tube" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Science" })] Vial = 0xF492, /// /// The Font Awesome "vial-circle-check" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "vial circle check", "ampule", "chemist", "chemistry", "enable", "not affected", "ok", "okay", "success", "test tube", "tube", "vaccine", "validate", "working" })] + [FontAwesomeSearchTerms(new[] { "vial circle check", "ampule", "chemist", "chemistry", "not affected", "ok", "okay", "success", "test tube", "tube", "vaccine" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Medical + Health", "Science" })] VialCircleCheck = 0xE596, /// /// The Font Awesome "vials" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "vials", "ampule", "experiment", "knowledge", "lab", "sample", "science", "test", "test tube" })] + [FontAwesomeSearchTerms(new[] { "vials", "ampule", "experiment", "lab", "sample", "science", "test", "test tube" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health", "Science" })] Vials = 0xF493, @@ -9382,7 +9218,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "video-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "video slash", "add", "create", "disabled", "disconnect", "film", "new", "positive", "record", "video" })] + [FontAwesomeSearchTerms(new[] { "video slash", "add", "create", "film", "new", "positive", "record", "video" })] [FontAwesomeCategoriesAttribute(new[] { "Communication", "Film + Video" })] VideoSlash = 0xF4E2, @@ -9410,7 +9246,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "virus-covid-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "virus covid slash", "bug", "covid-19", "disabled", "flu", "health", "infection", "pandemic", "vaccine", "viral", "virus" })] + [FontAwesomeSearchTerms(new[] { "virus covid slash", "bug", "covid-19", "flu", "health", "infection", "pandemic", "vaccine", "viral", "virus" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health" })] VirusCovidSlash = 0xE4A9, @@ -9424,7 +9260,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "virus-slash" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "virus slash", "bug", "coronavirus", "covid-19", "cure", "disabled", "eliminate", "flu", "health", "infection", "pandemic", "sick", "vaccine", "viral" })] + [FontAwesomeSearchTerms(new[] { "virus slash", "bug", "coronavirus", "covid-19", "cure", "eliminate", "flu", "health", "infection", "pandemic", "sick", "vaccine", "viral" })] [FontAwesomeCategoriesAttribute(new[] { "Medical + Health" })] VirusSlash = 0xE075, @@ -9480,7 +9316,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "check-to-slot" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "check to slot", "accept", "cast", "election", "enable", "politics", "positive", "validate", "voting", "working", "yes" })] + [FontAwesomeSearchTerms(new[] { "check to slot", "accept", "cast", "election", "politics", "positive", "voting", "yes" })] [FontAwesomeCategoriesAttribute(new[] { "Political" })] VoteYea = 0xF772, @@ -9501,14 +9337,14 @@ public enum FontAwesomeIcon /// /// The Font Awesome "person-walking" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "person walking", "crosswalk", "exercise", "follow", "hike", "move", "person walking", "uer", "walk", "walking", "workout" })] + [FontAwesomeSearchTerms(new[] { "person walking", "crosswalk", "exercise", "hike", "move", "person walking", "walk", "walking" })] [FontAwesomeCategoriesAttribute(new[] { "Humanitarian", "Sports + Fitness", "Users + People" })] Walking = 0xF554, /// /// The Font Awesome "wallet" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "wallet", "billfold", "cash", "currency", "money", "salary" })] + [FontAwesomeSearchTerms(new[] { "wallet", "billfold", "cash", "currency", "money" })] [FontAwesomeCategoriesAttribute(new[] { "Business", "Money" })] Wallet = 0xF555, @@ -9544,16 +9380,9 @@ public enum FontAwesomeIcon /// The Font Awesome "wave-square" icon unicode character. /// [FontAwesomeSearchTerms(new[] { "wave square", "frequency", "pulse", "signal" })] - [FontAwesomeCategoriesAttribute(new[] { "Mathematics", "Music + Audio" })] + [FontAwesomeCategoriesAttribute(new[] { "Mathematics" })] WaveSquare = 0xF83E, - /// - /// The Font Awesome "web-awesome" icon unicode character. - /// - [FontAwesomeSearchTerms(new[] { "web awesome", "awesome", "coding", "components", "crown", "web" })] - [FontAwesomeCategoriesAttribute(new[] { "Coding", "Design" })] - WebAwesome = 0xE682, - /// /// The Font Awesome "weight-scale" icon unicode character. /// @@ -9578,28 +9407,28 @@ public enum FontAwesomeIcon /// /// The Font Awesome "wheat-awn-circle-exclamation" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "wheat awn circle exclamation", "affected", "failed", "famine", "food", "gluten", "hunger", "starve", "straw" })] + [FontAwesomeSearchTerms(new[] { "wheat awn circle exclamation", "affected", "famine", "food", "gluten", "hunger", "starve", "straw" })] [FontAwesomeCategoriesAttribute(new[] { "Disaster + Crisis", "Food + Beverage", "Humanitarian" })] WheatAwnCircleExclamation = 0xE598, /// /// The Font Awesome "wheelchair" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "wheelchair", "disabled", "uer", "users-people" })] + [FontAwesomeSearchTerms(new[] { "wheelchair", "users-people" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Maps", "Medical + Health", "Transportation", "Travel + Hotel", "Users + People" })] Wheelchair = 0xF193, /// /// The Font Awesome "wheelchair-move" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "wheelchair move", "access", "disabled", "handicap", "impairment", "physical", "uer", "wheelchair symbol" })] + [FontAwesomeSearchTerms(new[] { "wheelchair move", "access", "handicap", "impairment", "physical", "wheelchair symbol" })] [FontAwesomeCategoriesAttribute(new[] { "Accessibility", "Humanitarian", "Maps", "Medical + Health", "Transportation", "Travel + Hotel", "Users + People" })] WheelchairMove = 0xE2CE, /// /// The Font Awesome "wifi" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "wifi", "connection", "hotspot", "internet", "network", "signal", "wireless", "www" })] + [FontAwesomeSearchTerms(new[] { "wifi", "connection", "hotspot", "internet", "network", "wireless" })] [FontAwesomeCategoriesAttribute(new[] { "Connectivity", "Humanitarian", "Maps", "Toggle", "Travel + Hotel" })] Wifi = 0xF1EB, @@ -9613,7 +9442,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "rectangle-xmark" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "rectangle xmark", "browser", "cancel", "computer", "development", "uncheck" })] + [FontAwesomeSearchTerms(new[] { "rectangle xmark", "browser", "cancel", "computer", "development" })] [FontAwesomeCategoriesAttribute(new[] { "Coding" })] WindowClose = 0xF410, @@ -9676,7 +9505,7 @@ public enum FontAwesomeIcon /// /// The Font Awesome "wrench" icon unicode character. /// - [FontAwesomeSearchTerms(new[] { "configuration", "construction", "equipment", "fix", "mechanic", "modify", "plumbing", "settings", "spanner", "tool", "update", "wrench" })] + [FontAwesomeSearchTerms(new[] { "construction", "fix", "mechanic", "plumbing", "settings", "spanner", "tool", "update", "wrench" })] [FontAwesomeCategoriesAttribute(new[] { "Construction", "Maps" })] Wrench = 0xF0AD, diff --git a/Dalamud/Interface/FontIdentifier/IObjectWithLocalizableName.cs b/Dalamud/Interface/FontIdentifier/IObjectWithLocalizableName.cs index 4b3860431..2b970a5fd 100644 --- a/Dalamud/Interface/FontIdentifier/IObjectWithLocalizableName.cs +++ b/Dalamud/Interface/FontIdentifier/IObjectWithLocalizableName.cs @@ -64,9 +64,9 @@ public interface IObjectWithLocalizableName var result = new Dictionary((int)count); for (var i = 0u; i < count; i++) { - fn->GetLocaleName(i, buf, maxStrLen).ThrowOnError(); + fn->GetLocaleName(i, (ushort*)buf, maxStrLen).ThrowOnError(); var key = new string(buf); - fn->GetString(i, buf, maxStrLen).ThrowOnError(); + fn->GetString(i, (ushort*)buf, maxStrLen).ThrowOnError(); var value = new string(buf); result[key.ToLowerInvariant()] = value; } diff --git a/Dalamud/Interface/FontIdentifier/SystemFontFamilyId.cs b/Dalamud/Interface/FontIdentifier/SystemFontFamilyId.cs index 83a5e810d..420ee77a4 100644 --- a/Dalamud/Interface/FontIdentifier/SystemFontFamilyId.cs +++ b/Dalamud/Interface/FontIdentifier/SystemFontFamilyId.cs @@ -133,8 +133,8 @@ public sealed class SystemFontFamilyId : IFontFamilyId var familyIndex = 0u; BOOL exists = false; - fixed (char* pName = this.EnglishName) - sfc.Get()->FindFamilyName(pName, &familyIndex, &exists).ThrowOnError(); + fixed (void* pName = this.EnglishName) + sfc.Get()->FindFamilyName((ushort*)pName, &familyIndex, &exists).ThrowOnError(); if (!exists) throw new FileNotFoundException($"Font \"{this.EnglishName}\" not found."); diff --git a/Dalamud/Interface/FontIdentifier/SystemFontId.cs b/Dalamud/Interface/FontIdentifier/SystemFontId.cs index 8401f4c79..e11759a88 100644 --- a/Dalamud/Interface/FontIdentifier/SystemFontId.cs +++ b/Dalamud/Interface/FontIdentifier/SystemFontId.cs @@ -113,8 +113,8 @@ public sealed class SystemFontId : IFontId var familyIndex = 0u; BOOL exists = false; - fixed (char* name = this.Family.EnglishName) - sfc.Get()->FindFamilyName(name, &familyIndex, &exists).ThrowOnError(); + fixed (void* name = this.Family.EnglishName) + sfc.Get()->FindFamilyName((ushort*)name, &familyIndex, &exists).ThrowOnError(); if (!exists) throw new FileNotFoundException($"Font \"{this.Family.EnglishName}\" not found."); @@ -151,7 +151,7 @@ public sealed class SystemFontId : IFontId flocal.Get()->GetFilePathLengthFromKey(refKey, refKeySize, &pathSize).ThrowOnError(); var path = stackalloc char[(int)pathSize + 1]; - flocal.Get()->GetFilePathFromKey(refKey, refKeySize, path, pathSize + 1).ThrowOnError(); + flocal.Get()->GetFilePathFromKey(refKey, refKeySize, (ushort*)path, pathSize + 1).ThrowOnError(); return (new(path, 0, (int)pathSize), (int)fface.Get()->GetIndex()); } diff --git a/Dalamud/Interface/ImGuiBackend/Helpers/ReShadePeeler.cs b/Dalamud/Interface/ImGuiBackend/Helpers/ReShadePeeler.cs index 3f3c98c26..824ba382a 100644 --- a/Dalamud/Interface/ImGuiBackend/Helpers/ReShadePeeler.cs +++ b/Dalamud/Interface/ImGuiBackend/Helpers/ReShadePeeler.cs @@ -104,19 +104,19 @@ internal static unsafe class ReShadePeeler fixed (byte* pfn5 = "glBegin"u8) fixed (byte* pfn6 = "vkCreateDevice"u8) { - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn0) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn0) == 0) continue; - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn1) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn1) == 0) continue; - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn2) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn2) == 0) continue; - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn3) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn3) == 0) continue; - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn4) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn4) == 0) continue; - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn5) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn5) == 0) continue; - if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn6) == null) + if (GetProcAddress((HMODULE)dosh, (sbyte*)pfn6) == 0) continue; } diff --git a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs index ea60be98d..0b2e27b57 100644 --- a/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs +++ b/Dalamud/Interface/ImGuiBackend/InputHandler/Win32InputHandler.cs @@ -7,7 +7,6 @@ using System.Runtime.InteropServices; using System.Text; using Dalamud.Bindings.ImGui; -using Dalamud.Console; using Dalamud.Memory; using Dalamud.Utility; @@ -38,8 +37,6 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler private readonly WndProcDelegate wndProcDelegate; private readonly nint platformNamePtr; - private readonly IConsoleVariable cvLogMouseEvents; - private ViewportHandler viewportHandler; private int mouseButtonsDown; @@ -90,11 +87,6 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler this.cursors[(int)ImGuiMouseCursor.ResizeNwse] = LoadCursorW(default, IDC.IDC_SIZENWSE); this.cursors[(int)ImGuiMouseCursor.Hand] = LoadCursorW(default, IDC.IDC_HAND); this.cursors[(int)ImGuiMouseCursor.NotAllowed] = LoadCursorW(default, IDC.IDC_NO); - - this.cvLogMouseEvents = Service.Get().AddVariable( - "imgui.log_mouse_events", - "Log mouse events to console for debugging", - false); } /// @@ -275,23 +267,11 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler case WM.WM_XBUTTONDOWN: case WM.WM_XBUTTONDBLCLK: { - if (this.cvLogMouseEvents.Value) - { - Log.Verbose( - "Handle MouseDown {Btn} WantCaptureMouse: {Want} mouseButtonsDown: {Down}", - GetButton(msg, wParam), - io.WantCaptureMouse, - this.mouseButtonsDown); - } - var button = GetButton(msg, wParam); if (io.WantCaptureMouse) { if (this.mouseButtonsDown == 0 && GetCapture() == nint.Zero) - { SetCapture(hWndCurrent); - } - this.mouseButtonsDown |= 1 << button; io.AddMouseButtonEvent(button, true); return default(LRESULT); @@ -308,28 +288,12 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler case WM.WM_MBUTTONUP: case WM.WM_XBUTTONUP: { - if (this.cvLogMouseEvents.Value) - { - Log.Verbose( - "Handle MouseUp {Btn} WantCaptureMouse: {Want} mouseButtonsDown: {Down}", - GetButton(msg, wParam), - io.WantCaptureMouse, - this.mouseButtonsDown); - } - var button = GetButton(msg, wParam); - - // Need to check if we captured the button event away from the game here, otherwise the game might get - // a down event but no up event, causing the cursor to get stuck. - // Can happen if WantCaptureMouse becomes true in between down and up - if (io.WantCaptureMouse && (this.mouseButtonsDown & (1 << button)) != 0) + if (io.WantCaptureMouse) { this.mouseButtonsDown &= ~(1 << button); if (this.mouseButtonsDown == 0 && GetCapture() == hWndCurrent) - { ReleaseCapture(); - } - io.AddMouseButtonEvent(button, false); return default(LRESULT); } @@ -494,12 +458,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler // (This is the position you can get with ::GetCursorPos() or WM_MOUSEMOVE + ::ClientToScreen(). In theory adding viewport->Pos to a client position would also be the same.) var mousePos = mouseScreenPos; if ((io.ConfigFlags & ImGuiConfigFlags.ViewportsEnable) == 0) - { - // Use game window, otherwise, positions are calculated based on the focused window which might not be the game. - // Leads to offsets. - ClientToScreen(this.hWnd, &mousePos); - } - + ClientToScreen(focusedWindow, &mousePos); io.AddMousePosEvent(mousePos.x, mousePos.y); } @@ -713,7 +672,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler hbrBackground = (HBRUSH)(1 + COLOR.COLOR_BACKGROUND), lpfnWndProc = (delegate* unmanaged)Marshal .GetFunctionPointerForDelegate(this.input.wndProcDelegate), - lpszClassName = windowClassNamePtr, + lpszClassName = (ushort*)windowClassNamePtr, }; if (RegisterClassExW(&wcex) == 0) @@ -742,7 +701,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler fixed (char* windowClassNamePtr = WindowClassName) { UnregisterClassW( - windowClassNamePtr, + (ushort*)windowClassNamePtr, (HINSTANCE)Marshal.GetHINSTANCE(typeof(ViewportHandler).Module)); } @@ -856,8 +815,8 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler { data->Hwnd = CreateWindowExW( (uint)data->DwExStyle, - windowClassNamePtr, - windowClassNamePtr, + (ushort*)windowClassNamePtr, + (ushort*)windowClassNamePtr, (uint)data->DwStyle, rect.left, rect.top, @@ -1071,7 +1030,7 @@ internal sealed unsafe partial class Win32InputHandler : IImGuiInputHandler { var data = (ImGuiViewportDataWin32*)viewport.PlatformUserData; fixed (char* pwszTitle = MemoryHelper.ReadStringNullTerminated((nint)title)) - SetWindowTextW(data->Hwnd, pwszTitle); + SetWindowTextW(data->Hwnd, (ushort*)pwszTitle); } [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])] diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs b/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs index f161c1868..397502b30 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/Internal/SeStringRenderer.cs @@ -162,14 +162,15 @@ internal class SeStringRenderer : IServiceType if (drawParams.Font.HasValue) font = drawParams.Font.Value; - if (ThreadSafety.IsMainThread && drawParams.TargetDrawList is null && font is null) + // API14: Remove commented out code + if (ThreadSafety.IsMainThread /* && drawParams.TargetDrawList is null */ && font is null) font = ImGui.GetFont(); if (font is null) throw new ArgumentException("Specified font is empty."); // This also does argument validation for drawParams. Do it here. // `using var` makes a struct read-only, but we do want to modify it. - using var stateStorage = new SeStringDrawState( + var stateStorage = new SeStringDrawState( sss, drawParams, ThreadSafety.IsMainThread ? this.colorStackSetMainThread : new(this.colorStackSetMainThread.ColorTypes), diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs index 09c3e9ed9..972013328 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs @@ -25,9 +25,7 @@ public record struct SeStringDrawParams public SeStringReplacementEntity.GetEntityDelegate? GetEntity { get; set; } /// Gets or sets the screen offset of the left top corner. - /// Screen offset to draw at, or null to use , if no - /// is specified. Otherwise, you must specify it (for example, by passing when passing the window - /// draw list. + /// Screen offset to draw at, or null to use . public Vector2? ScreenOffset { get; set; } /// Gets or sets the font to use. diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs index dcbe123e7..5e63ef160 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs @@ -10,7 +10,6 @@ using Dalamud.Interface.Utility; using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; - using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; @@ -18,7 +17,7 @@ namespace Dalamud.Interface.ImGuiSeStringRenderer; /// Calculated values from using ImGui styles. [StructLayout(LayoutKind.Sequential)] -public unsafe ref struct SeStringDrawState : IDisposable +public unsafe ref struct SeStringDrawState { private static readonly int ChannelCount = Enum.GetValues().Length; @@ -64,12 +63,18 @@ public unsafe ref struct SeStringDrawState : IDisposable else { this.drawList = ssdp.TargetDrawList.Value; - this.ScreenOffset = ssdp.ScreenOffset ?? Vector2.Zero; + this.ScreenOffset = Vector2.Zero; - this.ScreenOffset = ssdp.ScreenOffset ?? throw new ArgumentException( - $"{nameof(ssdp.ScreenOffset)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state. (GetCursorScreenPos?)"); - this.FontSize = ssdp.FontSize ?? throw new ArgumentException( - $"{nameof(ssdp.FontSize)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state."); + // API14: Remove, always throw + if (ThreadSafety.IsMainThread) + { + this.FontSize = ssdp.FontSize ?? ImGui.GetFontSize(); + } + else + { + throw new ArgumentException( + $"{nameof(ssdp.FontSize)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state."); + } // this.FontSize = ssdp.FontSize ?? throw new ArgumentException( // $"{nameof(ssdp.FontSize)} must be set when specifying a target draw list, as it cannot be fetched from the ImGui state."); @@ -83,7 +88,7 @@ public unsafe ref struct SeStringDrawState : IDisposable this.splitter = default; this.GetEntity = ssdp.GetEntity; this.ScreenOffset = new(MathF.Round(this.ScreenOffset.X), MathF.Round(this.ScreenOffset.Y)); - this.FontSizeScale = this.FontSize / this.Font.FontSize; + this.FontSizeScale = this.FontSize / this.Font->FontSize; this.LineHeight = MathF.Round(ssdp.EffectiveLineHeight); this.LinkUnderlineThickness = ssdp.LinkUnderlineThickness ?? 0f; this.Opacity = ssdp.EffectiveOpacity; @@ -113,7 +118,7 @@ public unsafe ref struct SeStringDrawState : IDisposable public Vector2 ScreenOffset { get; } /// - public ImFontPtr Font { get; } + public ImFont* Font { get; } /// public float FontSize { get; } @@ -188,9 +193,6 @@ public unsafe ref struct SeStringDrawState : IDisposable /// Gets the text fragments. internal List Fragments { get; } - /// - public void Dispose() => this.splitter.ClearFreeMemory(); - /// Sets the current channel in the ImGui draw list splitter. /// Channel to switch to. [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -266,7 +268,7 @@ public unsafe ref struct SeStringDrawState : IDisposable /// Offset of the glyph in pixels w.r.t. . internal void DrawGlyph(scoped in ImGuiHelpers.ImFontGlyphReal g, Vector2 offset) { - var texId = this.Font.ContainerAtlas.Textures.Ref(g.TextureIndex).TexID; + var texId = this.Font->ContainerAtlas->Textures.Ref(g.TextureIndex).TexID; var xy0 = new Vector2( MathF.Round(g.X0 * this.FontSizeScale), MathF.Round(g.Y0 * this.FontSizeScale)); @@ -323,7 +325,7 @@ public unsafe ref struct SeStringDrawState : IDisposable offset += this.ScreenOffset; offset.Y += (this.LinkUnderlineThickness - 1) / 2f; - offset.Y += MathF.Round(((this.LineHeight - this.FontSize) / 2) + (this.Font.Ascent * this.FontSizeScale)); + offset.Y += MathF.Round(((this.LineHeight - this.FontSize) / 2) + (this.Font->Ascent * this.FontSizeScale)); this.SetCurrentChannel(SeStringDrawChannel.Foreground); this.DrawList.AddLine( @@ -350,9 +352,9 @@ public unsafe ref struct SeStringDrawState : IDisposable internal readonly ref ImGuiHelpers.ImFontGlyphReal FindGlyph(Rune rune) { var p = rune.Value is >= ushort.MinValue and < ushort.MaxValue - ? (ImFontGlyphPtr)this.Font.FindGlyph((ushort)rune.Value) - : this.Font.FallbackGlyph; - return ref *(ImGuiHelpers.ImFontGlyphReal*)p.Handle; + ? this.Font->FindGlyph((ushort)rune.Value) + : this.Font->FallbackGlyph; + return ref *(ImGuiHelpers.ImFontGlyphReal*)p; } /// Gets the glyph corresponding to the given codepoint. @@ -385,7 +387,7 @@ public unsafe ref struct SeStringDrawState : IDisposable return 0; return MathF.Round( - this.Font.GetDistanceAdjustmentForPair( + this.Font->GetDistanceAdjustmentForPair( (ushort)left.Value, (ushort)right.Value) * this.FontSizeScale); } diff --git a/Dalamud/Interface/Internal/Badge/BadgeInfo.cs b/Dalamud/Interface/Internal/Badge/BadgeInfo.cs deleted file mode 100644 index 0787f0658..000000000 --- a/Dalamud/Interface/Internal/Badge/BadgeInfo.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Numerics; - -namespace Dalamud.Interface.Internal.Badge; - -/// -/// Represents information about a badge. -/// -/// Name of the badge. -/// Description of the badge. -/// Icon index. -/// Sha256 hash of the unlock password. -/// How the badge is unlocked. -internal record BadgeInfo( - Func Name, - Func Description, - int IconIndex, - string UnlockSha256, - BadgeUnlockMethod UnlockMethod) -{ - private const float BadgeWidth = 256; - private const float BadgeHeight = 256; - private const float BadgesPerRow = 2; - - /// - /// Gets the UV coordinates for the badge icon in the atlas. - /// - /// Width of the atlas. - /// Height of the atlas. - /// UV coordinates. - public (Vector2 Uv0, Vector2 Uv1) GetIconUv(float atlasWidthPx, float atlasHeightPx) - { - // Calculate row and column from icon index - var col = this.IconIndex % (int)BadgesPerRow; - var row = this.IconIndex / (int)BadgesPerRow; - - // Calculate pixel positions - var x0 = col * BadgeWidth; - var y0 = row * BadgeHeight; - var x1 = x0 + BadgeWidth; - var y1 = y0 + BadgeHeight; - - // Convert to UV coordinates (0.0 to 1.0) - var uv0 = new Vector2(x0 / atlasWidthPx, y0 / atlasHeightPx); - var uv1 = new Vector2(x1 / atlasWidthPx, y1 / atlasHeightPx); - - return (uv0, uv1); - } -} diff --git a/Dalamud/Interface/Internal/Badge/BadgeManager.cs b/Dalamud/Interface/Internal/Badge/BadgeManager.cs deleted file mode 100644 index 9290d6cc8..000000000 --- a/Dalamud/Interface/Internal/Badge/BadgeManager.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Collections.Generic; -using System.Linq; - -using Dalamud.Configuration.Internal; - -namespace Dalamud.Interface.Internal.Badge; - -/// -/// Service responsible for managing user badges. -/// -[ServiceManager.EarlyLoadedService] -internal class BadgeManager : IServiceType -{ - private readonly DalamudConfiguration configuration; - - private readonly List badges = - [ - new(() => "Test Badge", - () => "Awarded for testing badges.", - 0, - "937e8d5fbb48bd4949536cd65b8d35c426b80d2f830c5c308e2cdec422ae2244", - BadgeUnlockMethod.User), - - new(() => "Fundraiser #1 Donor", - () => "Awarded for participating in the first patch fundraiser.", - 1, - "56e752257bd0cbb2944f95cc7b3cb3d0db15091dd043f7a195ed37028d079322", - BadgeUnlockMethod.User) - ]; - - private readonly List unlockedBadgeIndices = []; - - /// - /// Initializes a new instance of the class. - /// - /// Configuration to use. - [ServiceManager.ServiceConstructor] - public BadgeManager(DalamudConfiguration configuration) - { - this.configuration = configuration; - - foreach (var usedBadge in this.configuration.UsedBadgePasswords) - { - this.TryUnlockBadge(usedBadge, BadgeUnlockMethod.Startup, out _); - } - } - - /// - /// Gets the badges the user has unlocked. - /// - public IEnumerable UnlockedBadges - => this.badges.Where((_, index) => this.unlockedBadgeIndices.Contains(index)); - - /// - /// Unlock a badge with the given password and method. - /// - /// The password to unlock the badge with. - /// How we are unlocking this badge. - /// The badge that was unlocked, if the function returns true, null otherwise. - /// The unlocked badge, if one was unlocked by this call. - public bool TryUnlockBadge(string password, BadgeUnlockMethod method, out BadgeInfo unlockedBadge) - { - var sha256 = System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes(password)); - var hashString = Convert.ToHexString(sha256); - - foreach (var (idx, badge) in this.badges.Where(x => x.UnlockMethod == method || method == BadgeUnlockMethod.Startup).Index()) - { - if (!this.unlockedBadgeIndices.Contains(idx) && badge.UnlockSha256.Equals(hashString, StringComparison.OrdinalIgnoreCase)) - { - if (method != BadgeUnlockMethod.Startup) - { - this.configuration.UsedBadgePasswords.Add(password); - this.configuration.QueueSave(); - } - - this.unlockedBadgeIndices.Add(idx); - unlockedBadge = badge; - return true; - } - } - - unlockedBadge = null!; - return false; - } -} diff --git a/Dalamud/Interface/Internal/Badge/BadgeUnlockMethod.cs b/Dalamud/Interface/Internal/Badge/BadgeUnlockMethod.cs deleted file mode 100644 index 45828c097..000000000 --- a/Dalamud/Interface/Internal/Badge/BadgeUnlockMethod.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Dalamud.Interface.Internal.Badge; - -/// -/// Method by which a badge can be unlocked. -/// -internal enum BadgeUnlockMethod -{ - /// - /// Badge can be unlocked by the user by entering a password. - /// - User, - - /// - /// Badge can be unlocked from Dalamud internal features. - /// - Internal, - - /// - /// Badge is no longer obtainable and can only be unlocked from the configuration file. - /// - Startup, -} diff --git a/Dalamud/Interface/Internal/DalamudCommands.cs b/Dalamud/Interface/Internal/DalamudCommands.cs index 3e4a5cec6..b1fdb5232 100644 --- a/Dalamud/Interface/Internal/DalamudCommands.cs +++ b/Dalamud/Interface/Internal/DalamudCommands.cs @@ -305,12 +305,12 @@ internal class DalamudCommands : IServiceType chatGui.Print(new SeStringBuilder() .AddItalics("Dalamud:") - .AddText($" {Versioning.GetScmVersion()}") + .AddText($" {Util.GetScmVersion()}") .Build()); chatGui.Print(new SeStringBuilder() .AddItalics("FFXIVCS:") - .AddText($" {Versioning.GetGitHashClientStructs()}") + .AddText($" {Util.GetGitHashClientStructs()}") .Build()); } diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index 13e7ff3f7..bf55a5486 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -19,9 +19,6 @@ using Dalamud.Game.Gui; using Dalamud.Hooking; using Dalamud.Interface.Animation.EasingFunctions; using Dalamud.Interface.Colors; -using Dalamud.Interface.ImGuiNotification; -using Dalamud.Interface.ImGuiNotification.Internal; -using Dalamud.Interface.Internal.Badge; using Dalamud.Interface.Internal.Windows; using Dalamud.Interface.Internal.Windows.Data; using Dalamud.Interface.Internal.Windows.PluginInstaller; @@ -185,7 +182,7 @@ internal class DalamudInterface : IInternalDisposableService () => Service.GetNullable()?.ToggleDevMenu(), VirtualKey.SHIFT); - if (Versioning.GetActiveTrack() != "release") + if (Util.GetActiveTrack() != "release") { titleScreenMenu.AddEntryCore( Loc.Localize("TSMDalamudDevMenu", "Developer Menu"), @@ -543,25 +540,6 @@ internal class DalamudInterface : IInternalDisposableService /// Widget to set current. public void SetDataWindowWidget(IDataWindowWidget widget) => this.dataWindow.CurrentWidget = widget; - /// - /// Play an animation when a badge has been unlocked. - /// - /// The badge that has been unlocked. - public void StartBadgeUnlockAnimation(BadgeInfo badge) - { - var badgeTexture = Service.Get().GetDalamudTextureWrap(DalamudAsset.BadgeAtlas); - var uvs = badge.GetIconUv(badgeTexture.Width, badgeTexture.Height); - - // TODO: Make it more fancy? - Service.Get().AddNotification( - new Notification - { - Title = "Badge unlocked!", - Content = $"You unlocked the badge '{badge.Name()}'", - Type = NotificationType.Success, - }); - } - private void OnDraw() { this.FrameCount++; @@ -583,7 +561,6 @@ internal class DalamudInterface : IInternalDisposableService { this.DrawHiddenDevMenuOpener(); this.DrawDevMenu(); - this.DrawTitleScreenBadges(); if (Service.Get().GameUiHidden) return; @@ -614,68 +591,6 @@ internal class DalamudInterface : IInternalDisposableService } } - private void DrawTitleScreenBadges() - { - if (!this.titleScreenMenuWindow.IsOpen) - return; - - var badgeManager = Service.Get(); - if (!this.configuration.ShowBadgesOnTitleScreen || !badgeManager.UnlockedBadges.Any()) - return; - - var vp = ImGui.GetMainViewport(); - ImGui.SetNextWindowPos(vp.Pos); - ImGui.SetNextWindowSize(vp.Size); - ImGuiHelpers.ForceNextWindowMainViewport(); - ImGui.SetNextWindowBgAlpha(0f); - - ImGui.Begin( - "###TitleScreenBadgeWindow"u8, - ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoDocking | ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoMove | - ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.NoBringToFrontOnFocus | - ImGuiWindowFlags.NoNav); - - var badgeAtlas = Service.Get().GetDalamudTextureWrap(DalamudAsset.BadgeAtlas); - var badgeSize = ImGuiHelpers.GlobalScale * 80; - var spacing = ImGuiHelpers.GlobalScale * 10; - const float margin = 60f; - var startPos = vp.Pos + new Vector2(vp.Size.X - margin, margin); - - // Use the mouse position in screen space for hover detection because the usual ImGui hover checks - // don't work with this full-viewport overlay window setup. - var mouse = ImGui.GetMousePos(); - - foreach (var badge in badgeManager.UnlockedBadges) - { - var uvs = badge.GetIconUv(badgeAtlas.Width, badgeAtlas.Height); - - startPos.X -= badgeSize; - ImGui.SetCursorPos(startPos); - ImGui.Image(badgeAtlas.Handle, new Vector2(badgeSize), uvs.Uv0, uvs.Uv1); - - // Get the actual screen-space bounds of the image we just drew - var badgeMin = ImGui.GetItemRectMin(); - var badgeMax = ImGui.GetItemRectMax(); - - // add spacing to the left for the next badge - startPos.X -= spacing; - - // Manual hit test using mouse position - if (mouse.X >= badgeMin.X && mouse.X <= badgeMax.X && mouse.Y >= badgeMin.Y && mouse.Y <= badgeMax.Y) - { - ImGui.BeginTooltip(); - ImGui.PushTextWrapPos(300 * ImGuiHelpers.GlobalScale); - ImGui.TextWrapped(badge.Name()); - ImGui.Separator(); - ImGui.TextColoredWrapped(ImGuiColors.DalamudGrey, badge.Description()); - ImGui.PopTextWrapPos(); - ImGui.EndTooltip(); - } - } - - ImGui.End(); - } - private void DrawCreditsDarkeningAnimation() { using var style1 = ImRaii.PushStyle(ImGuiStyleVar.WindowRounding, 0f); @@ -754,8 +669,6 @@ internal class DalamudInterface : IInternalDisposableService { using var barColor = ImRaii.PushColor(ImGuiCol.WindowBg, new Vector4(0.060f, 0.060f, 0.060f, 0.773f)); barColor.Push(ImGuiCol.MenuBarBg, Vector4.Zero); - barColor.Push(ImGuiCol.Border, Vector4.Zero); - barColor.Push(ImGuiCol.BorderShadow, Vector4.Zero); if (ImGui.BeginMainMenuBar()) { var pluginManager = Service.Get(); @@ -950,7 +863,7 @@ internal class DalamudInterface : IInternalDisposableService } ImGui.MenuItem(this.dalamud.StartInfo.GameVersion?.ToString() ?? "Unknown version", false, false); - ImGui.MenuItem($"D: {Versioning.GetScmVersion()} CS: {Versioning.GetGitHashClientStructs()}[{FFXIVClientStructs.ThisAssembly.Git.Commits}]", false, false); + ImGui.MenuItem($"D: {Util.GetScmVersion()} CS: {Util.GetGitHashClientStructs()}[{FFXIVClientStructs.ThisAssembly.Git.Commits}]", false, false); ImGui.MenuItem($"CLR: {Environment.Version}", false, false); ImGui.EndMenu(); @@ -1161,8 +1074,8 @@ internal class DalamudInterface : IInternalDisposableService { ImGui.PushFont(InterfaceManager.MonoFont); - ImGui.BeginMenu($"{Versioning.GetActiveTrack() ?? "???"} on {Versioning.GetGitBranch() ?? "???"}", false); - ImGui.BeginMenu($"{Versioning.GetScmVersion()}", false); + ImGui.BeginMenu($"{Util.GetActiveTrack() ?? "???"} on {Util.GetGitBranch() ?? "???"}", false); + ImGui.BeginMenu($"{Util.GetScmVersion()}", false); ImGui.BeginMenu(this.FrameCount.ToString("000000"), false); ImGui.BeginMenu(ImGui.GetIO().Framerate.ToString("000"), false); ImGui.BeginMenu($"W:{Util.FormatBytes(GC.GetTotalMemory(false))}", false); diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 96fcb7dfd..76a1b5172 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -256,7 +256,7 @@ internal partial class InterfaceManager : IInternalDisposableService var gwh = default(HWND); fixed (char* pClass = "FFXIVGAME") { - while ((gwh = FindWindowExW(default, gwh, pClass, default)) != default) + while ((gwh = FindWindowExW(default, gwh, (ushort*)pClass, default)) != default) { uint pid; _ = GetWindowThreadProcessId(gwh, &pid); diff --git a/Dalamud/Interface/Internal/ReShadeHandling/ReShadeAddonInterface.Exports.cs b/Dalamud/Interface/Internal/ReShadeHandling/ReShadeAddonInterface.Exports.cs index d7d3b56c3..d8d210076 100644 --- a/Dalamud/Interface/Internal/ReShadeHandling/ReShadeAddonInterface.Exports.cs +++ b/Dalamud/Interface/Internal/ReShadeHandling/ReShadeAddonInterface.Exports.cs @@ -63,11 +63,11 @@ internal sealed unsafe partial class ReShadeAddonInterface return; - static bool GetProcAddressInto(ProcessModule m, ReadOnlySpan name, void* res) + bool GetProcAddressInto(ProcessModule m, ReadOnlySpan name, void* res) { Span name8 = stackalloc byte[Encoding.UTF8.GetByteCount(name) + 1]; name8[Encoding.UTF8.GetBytes(name, name8)] = 0; - *(nint*)res = (nint)GetProcAddress((HMODULE)m.BaseAddress, (sbyte*)Unsafe.AsPointer(ref name8[0])); + *(nint*)res = GetProcAddress((HMODULE)m.BaseAddress, (sbyte*)Unsafe.AsPointer(ref name8[0])); return *(nint*)res != 0; } } @@ -174,7 +174,7 @@ internal sealed unsafe partial class ReShadeAddonInterface CERT.CERT_NAME_SIMPLE_DISPLAY_TYPE, CERT.CERT_NAME_ISSUER_FLAG, null, - (char*)Unsafe.AsPointer(ref issuerName[0]), + (ushort*)Unsafe.AsPointer(ref issuerName[0]), pcb); if (pcb == 0) throw new Win32Exception("CertGetNameStringW(2)"); diff --git a/Dalamud/Interface/Internal/ReShadeHandling/ReShadeUnwrapper.cs b/Dalamud/Interface/Internal/ReShadeHandling/ReShadeUnwrapper.cs index 711de6eb2..f1210425d 100644 --- a/Dalamud/Interface/Internal/ReShadeHandling/ReShadeUnwrapper.cs +++ b/Dalamud/Interface/Internal/ReShadeHandling/ReShadeUnwrapper.cs @@ -94,7 +94,7 @@ internal static unsafe class ReShadeUnwrapper static bool HasProcExported(ProcessModule m, ReadOnlySpan name) { fixed (byte* p = name) - return GetProcAddress((HMODULE)m.BaseAddress, (sbyte*)p) != null; + return GetProcAddress((HMODULE)m.BaseAddress, (sbyte*)p) != 0; } } diff --git a/Dalamud/Interface/Internal/StaThreadService.cs b/Dalamud/Interface/Internal/StaThreadService.cs index 5e93bbf75..87e003288 100644 --- a/Dalamud/Interface/Internal/StaThreadService.cs +++ b/Dalamud/Interface/Internal/StaThreadService.cs @@ -113,7 +113,7 @@ internal partial class StaThreadService : IInternalDisposableService using var cts = CancellationTokenSource.CreateLinkedTokenSource( this.cancellationTokenSource.Token, cancellationToken); - await this.taskFactory.StartNew(action, cts.Token).ConfigureAwait(true); + await this.taskFactory.StartNew(action, cancellationToken).ConfigureAwait(true); } /// Runs a given delegate in the messaging thread. @@ -126,7 +126,7 @@ internal partial class StaThreadService : IInternalDisposableService using var cts = CancellationTokenSource.CreateLinkedTokenSource( this.cancellationTokenSource.Token, cancellationToken); - return await this.taskFactory.StartNew(func, cts.Token).ConfigureAwait(true); + return await this.taskFactory.StartNew(func, cancellationToken).ConfigureAwait(true); } /// Runs a given delegate in the messaging thread. @@ -138,7 +138,7 @@ internal partial class StaThreadService : IInternalDisposableService using var cts = CancellationTokenSource.CreateLinkedTokenSource( this.cancellationTokenSource.Token, cancellationToken); - await await this.taskFactory.StartNew(func, cts.Token).ConfigureAwait(true); + await await this.taskFactory.StartNew(func, cancellationToken).ConfigureAwait(true); } /// Runs a given delegate in the messaging thread. @@ -151,7 +151,7 @@ internal partial class StaThreadService : IInternalDisposableService using var cts = CancellationTokenSource.CreateLinkedTokenSource( this.cancellationTokenSource.Token, cancellationToken); - return await await this.taskFactory.StartNew(func, cts.Token).ConfigureAwait(true); + return await await this.taskFactory.StartNew(func, cancellationToken).ConfigureAwait(true); } [LibraryImport("ole32.dll")] @@ -216,7 +216,7 @@ internal partial class StaThreadService : IInternalDisposableService lpfnWndProc = &MessageReceiverWndProcStatic, hInstance = hInstance, hbrBackground = (HBRUSH)(COLOR.COLOR_BACKGROUND + 1), - lpszClassName = name, + lpszClassName = (ushort*)name, }; wndClassAtom = RegisterClassExW(&wndClass); @@ -226,8 +226,8 @@ internal partial class StaThreadService : IInternalDisposableService this.messageReceiverHwndTask.SetResult( CreateWindowExW( 0, - (char*)wndClassAtom, - name, + (ushort*)wndClassAtom, + (ushort*)name, 0, CW_USEDEFAULT, CW_USEDEFAULT, @@ -275,7 +275,7 @@ internal partial class StaThreadService : IInternalDisposableService _ = OleFlushClipboard(); OleUninitialize(); if (wndClassAtom != 0) - UnregisterClassW((char*)wndClassAtom, hInstance); + UnregisterClassW((ushort*)wndClassAtom, hInstance); this.messageReceiverHwndTask.TrySetException(e); } } diff --git a/Dalamud/Interface/Internal/UiDebug.cs b/Dalamud/Interface/Internal/UiDebug.cs index 82554995b..1211b505d 100644 --- a/Dalamud/Interface/Internal/UiDebug.cs +++ b/Dalamud/Interface/Internal/UiDebug.cs @@ -420,13 +420,13 @@ internal unsafe class UiDebug ImGui.SameLine(); Service.Get().Draw(textInputComponent->AtkComponentInputBase.RawString); - // ImGui.Text("Text1: "u8); - // ImGui.SameLine(); - // Service.Get().Draw(textInputComponent->UnkText01); - // - // ImGui.Text("Text2: "u8); - // ImGui.SameLine(); - // Service.Get().Draw(textInputComponent->UnkText02); + ImGui.Text("Text1: "u8); + ImGui.SameLine(); + Service.Get().Draw(textInputComponent->UnkText01); + + ImGui.Text("Text2: "u8); + ImGui.SameLine(); + Service.Get().Draw(textInputComponent->UnkText02); ImGui.Text("AvailableLines: "u8); ImGui.SameLine(); diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs index 922d226b6..a35195498 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs +++ b/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs @@ -89,14 +89,20 @@ internal unsafe class ComponentNodeTree : ResNodeTree { case TextInput: var textInputComponent = (AtkComponentTextInput*)this.Component; - ImGui.Text($"InputBase Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.EvaluatedString.StringPtr))}"); - ImGui.Text($"InputBase Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.RawString.StringPtr))}"); - // TODO: Reenable when unknowns have been unprivated / named - // ImGui.Text($"Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText01.StringPtr))}"); - // ImGui.Text($"Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText02.StringPtr))}"); - ImGui.Text($"AvailableLines: {Marshal.PtrToStringAnsi(new(textInputComponent->AvailableLines.StringPtr))}"); - ImGui.Text($"HighlightedAutoTranslateOptionColorPrefix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorPrefix.StringPtr))}"); - ImGui.Text($"HighlightedAutoTranslateOptionColorSuffix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorSuffix.StringPtr))}"); + ImGui.Text( + $"InputBase Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.EvaluatedString.StringPtr))}"); + ImGui.Text( + $"InputBase Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.RawString.StringPtr))}"); + ImGui.Text( + $"Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText01.StringPtr))}"); + ImGui.Text( + $"Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText02.StringPtr))}"); + ImGui.Text( + $"AvailableLines: {Marshal.PtrToStringAnsi(new(textInputComponent->AvailableLines.StringPtr))}"); + ImGui.Text( + $"HighlightedAutoTranslateOptionColorPrefix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorPrefix.StringPtr))}"); + ImGui.Text( + $"HighlightedAutoTranslateOptionColorSuffix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorSuffix.StringPtr))}"); break; case List: case TreeList: diff --git a/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs b/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs index 51a9c48a6..9cc14ea14 100644 --- a/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs +++ b/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs @@ -47,7 +47,7 @@ public class BranchSwitcherWindow : Window this.branches = await client.GetFromJsonAsync>(BranchInfoUrl); Debug.Assert(this.branches != null, "this.branches != null"); - var trackName = Versioning.GetActiveTrack(); + var trackName = Util.GetActiveTrack(); this.selectedBranchIndex = this.branches.IndexOf(x => x.Value.Track == trackName); if (this.selectedBranchIndex == -1) { diff --git a/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs b/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs index 44626ba31..b0a910ead 100644 --- a/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ChangelogWindow.cs @@ -147,7 +147,7 @@ internal sealed class ChangelogWindow : Window, IDisposable var pmWantsChangelog = pm?.InstalledPlugins.Any() ?? true; return (string.IsNullOrEmpty(configuration.LastChangelogMajorMinor) || (!WarrantsChangelogForMajorMinor.StartsWith(configuration.LastChangelogMajorMinor) && - Versioning.GetAssemblyVersion().StartsWith(WarrantsChangelogForMajorMinor))) && pmWantsChangelog; + Util.AssemblyVersion.StartsWith(WarrantsChangelogForMajorMinor))) && pmWantsChangelog; } /// @@ -357,7 +357,7 @@ internal sealed class ChangelogWindow : Window, IDisposable { case State.WindowFadeIn: case State.ExplainerIntro: - ImGui.TextWrapped($"Welcome to Dalamud v{Versioning.GetScmVersion()}!"); + ImGui.TextWrapped($"Welcome to Dalamud v{Util.GetScmVersion()}!"); ImGuiHelpers.ScaledDummy(5); ImGui.TextWrapped(ChangeLog); ImGuiHelpers.ScaledDummy(5); diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs index 4fb13b81a..b58166e89 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs @@ -1,9 +1,11 @@ +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Linq; using Dalamud.Bindings.ImGui; using Dalamud.Game.Addon.Lifecycle; -using Dalamud.Interface.Utility.Raii; -using Dalamud.Utility; +using Dalamud.Interface.Colors; +using Dalamud.Interface.Utility; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; @@ -46,38 +48,97 @@ public class AddonLifecycleWidget : IDataWindowWidget return; } - foreach (var (eventType, addonListeners) in this.AddonLifecycle.EventListeners) + if (ImGui.CollapsingHeader("Listeners"u8)) { - using var eventId = ImRaii.PushId(eventType.ToString()); + ImGui.Indent(); + this.DrawEventListeners(); + ImGui.Unindent(); + } + if (ImGui.CollapsingHeader("ReceiveEvent Hooks"u8)) + { + ImGui.Indent(); + this.DrawReceiveEventHooks(); + ImGui.Unindent(); + } + } + + private void DrawEventListeners() + { + if (!this.Ready) return; + + foreach (var eventType in Enum.GetValues()) + { if (ImGui.CollapsingHeader(eventType.ToString())) { - using var eventIndent = ImRaii.PushIndent(); + ImGui.Indent(); + var listeners = this.AddonLifecycle.EventListeners.Where(listener => listener.EventType == eventType).ToList(); - if (addonListeners.Count == 0) + if (listeners.Count == 0) { - ImGui.Text("No Addons Registered for Event"u8); + ImGui.Text("No Listeners Registered for Event"u8); } - foreach (var (addonName, listeners) in addonListeners) + if (ImGui.BeginTable("AddonLifecycleListenersTable"u8, 2)) { - using var addonId = ImRaii.PushId(addonName); + ImGui.TableSetupColumn("##AddonName"u8, ImGuiTableColumnFlags.WidthFixed, 100.0f * ImGuiHelpers.GlobalScale); + ImGui.TableSetupColumn("##MethodInvoke"u8, ImGuiTableColumnFlags.WidthStretch); - if (ImGui.CollapsingHeader(addonName.IsNullOrEmpty() ? "GLOBAL" : addonName)) + foreach (var listener in listeners) { - using var addonIndent = ImRaii.PushIndent(); + ImGui.TableNextColumn(); + ImGui.Text(listener.AddonName is "" ? "GLOBAL" : listener.AddonName); - if (listeners.Count == 0) - { - ImGui.Text("No Listeners Registered for Event"u8); - } - - foreach (var listener in listeners) - { - ImGui.Text($"{listener.FunctionDelegate.Method.DeclaringType?.FullName ?? "Unknown Declaring Type"}::{listener.FunctionDelegate.Method.Name}"); - } + ImGui.TableNextColumn(); + ImGui.Text($"{listener.FunctionDelegate.Method.DeclaringType?.FullName ?? "Unknown Declaring Type"}::{listener.FunctionDelegate.Method.Name}"); } + + ImGui.EndTable(); } + + ImGui.Unindent(); + } + } + } + + private void DrawReceiveEventHooks() + { + if (!this.Ready) return; + + var listeners = this.AddonLifecycle.ReceiveEventListeners; + + if (listeners.Count == 0) + { + ImGui.Text("No ReceiveEvent Hooks are Registered"u8); + } + + foreach (var receiveEventListener in this.AddonLifecycle.ReceiveEventListeners) + { + if (ImGui.CollapsingHeader(string.Join(", ", receiveEventListener.AddonNames))) + { + ImGui.Columns(2); + + var functionAddress = receiveEventListener.FunctionAddress; + + ImGui.Text("Hook Address"u8); + ImGui.NextColumn(); + ImGui.Text($"0x{functionAddress:X} (ffxiv_dx11.exe+{functionAddress - Process.GetCurrentProcess().MainModule!.BaseAddress:X})"); + + ImGui.NextColumn(); + ImGui.Text("Hook Status"u8); + ImGui.NextColumn(); + if (receiveEventListener.Hook is null) + { + ImGui.Text("Hook is null"u8); + } + else + { + var color = receiveEventListener.Hook.IsEnabled ? ImGuiColors.HealerGreen : ImGuiColors.DalamudRed; + var text = receiveEventListener.Hook.IsEnabled ? "Enabled"u8 : "Disabled"u8; + ImGui.TextColored(color, text); + } + + ImGui.Columns(1); } } } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs index f3e25caf8..3ad8f86c2 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/HookWidget.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Dalamud.Bindings.ImGui; using Dalamud.Game; +using Dalamud.Game.Addon.Lifecycle; using Dalamud.Hooking; using FFXIVClientStructs.FFXIV.Component.GUI; using Serilog; @@ -33,7 +34,7 @@ internal unsafe class HookWidget : IDataWindowWidget private MessageBoxWDelegate? messageBoxWOriginal; private AddonFinalizeDelegate? addonFinalizeOriginal; - private nint address; + private AddonLifecycleAddressResolver? address; private delegate int MessageBoxWDelegate( IntPtr hWnd, @@ -54,7 +55,7 @@ internal unsafe class HookWidget : IDataWindowWidget public string DisplayName { get; init; } = "Hook"; /// - public string[]? CommandShortcuts { get; init; } = ["hook"]; + public string[]? CommandShortcuts { get; init; } = { "hook" }; /// public bool Ready { get; set; } @@ -64,8 +65,8 @@ internal unsafe class HookWidget : IDataWindowWidget { this.Ready = true; - var sigScanner = Service.Get(); - this.address = sigScanner.ScanText("E8 ?? ?? ?? ?? 48 83 EF 01 75 D5"); + this.address = new AddonLifecycleAddressResolver(); + this.address.Setup(Service.Get()); } /// @@ -223,7 +224,7 @@ internal unsafe class HookWidget : IDataWindowWidget private IDalamudHook HookAddonFinalize() { - var hook = Hook.FromAddress(this.address, this.OnAddonFinalize); + var hook = Hook.FromAddress(this.address!.AddonFinalize, this.OnAddonFinalize); this.addonFinalizeOriginal = hook.Original; hook.Enable(); diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs index 1f1f82cdd..0ca754a91 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/PluginIpcWidget.cs @@ -48,20 +48,12 @@ internal class PluginIpcWidget : IDataWindowWidget this.ipcPub.RegisterAction(msg => { - Log.Information( - "Data action was called: {Msg}\n" + - " Context: {Context}", - msg, - this.ipcPub.GetContext()); + Log.Information("Data action was called: {Msg}", msg); }); this.ipcPub.RegisterFunc(msg => { - Log.Information( - "Data func was called: {Msg}\n" + - " Context: {Context}", - msg, - this.ipcPub.GetContext()); + Log.Information("Data func was called: {Msg}", msg); return Guid.NewGuid().ToString(); }); } @@ -69,8 +61,14 @@ internal class PluginIpcWidget : IDataWindowWidget if (this.ipcSub == null) { this.ipcSub = new CallGatePubSub("dataDemo1"); - this.ipcSub.Subscribe(_ => { Log.Information("PONG1"); }); - this.ipcSub.Subscribe(_ => { Log.Information("PONG2"); }); + this.ipcSub.Subscribe(_ => + { + Log.Information("PONG1"); + }); + this.ipcSub.Subscribe(_ => + { + Log.Information("PONG2"); + }); this.ipcSub.Subscribe(_ => throw new Exception("PONG3")); } @@ -80,21 +78,12 @@ internal class PluginIpcWidget : IDataWindowWidget this.ipcPubGo.RegisterAction(go => { - Log.Information( - "Data action was called: {Name}" + - "\n Context: {Context}", - go?.Name, - this.ipcPubGo.GetContext()); + Log.Information("Data action was called: {Name}", go?.Name); }); this.ipcPubGo.RegisterFunc(go => { - Log.Information( - "Data func was called: {Name}\n" + - " Context: {Context}", - go?.Name, - this.ipcPubGo.GetContext()); - + Log.Information("Data func was called: {Name}", go?.Name); return "test"; }); } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs index d43d3b7b2..a88f576f9 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringCreatorWidget.cs @@ -29,6 +29,8 @@ using Lumina.Text.Expressions; using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; +using LSeStringBuilder = Lumina.Text.SeStringBuilder; + namespace Dalamud.Interface.Internal.Windows.Data.Widgets; /// @@ -142,7 +144,7 @@ internal class SeStringCreatorWidget : IDataWindowWidget new TextEntry(TextEntryType.Macro, " "), ]; - private SeStringParameter[]? localParameters = [Versioning.GetScmVersion()]; + private SeStringParameter[]? localParameters = [Util.GetScmVersion()]; private ReadOnlySeString input; private ClientLanguage? language; private Task? validImportSheetNamesTask; @@ -472,25 +474,25 @@ internal class SeStringCreatorWidget : IDataWindowWidget if (ImGui.Button("Print Evaluated"u8)) { - using var rssb = new RentedSeStringBuilder(); + var sb = new LSeStringBuilder(); foreach (var entry in this.entries) { switch (entry.Type) { case TextEntryType.String: - rssb.Builder.Append(entry.Message); + sb.Append(entry.Message); break; case TextEntryType.Macro: case TextEntryType.Fixed: - rssb.Builder.AppendMacroString(entry.Message); + sb.AppendMacroString(entry.Message); break; } } var evaluated = Service.Get().Evaluate( - rssb.Builder.ToReadOnlySeString(), + sb.ToReadOnlySeString(), this.localParameters, this.language); @@ -503,24 +505,24 @@ internal class SeStringCreatorWidget : IDataWindowWidget if (ImGui.Button("Copy MacroString"u8)) { - using var rssb = new RentedSeStringBuilder(); + var sb = new LSeStringBuilder(); foreach (var entry in this.entries) { switch (entry.Type) { case TextEntryType.String: - rssb.Builder.Append(entry.Message); + sb.Append(entry.Message); break; case TextEntryType.Macro: case TextEntryType.Fixed: - rssb.Builder.AppendMacroString(entry.Message); + sb.AppendMacroString(entry.Message); break; } } - ImGui.SetClipboardText(rssb.Builder.ToReadOnlySeString().ToMacroString()); + ImGui.SetClipboardText(sb.ToReadOnlySeString().ToMacroString()); } ImGui.SameLine(); @@ -800,24 +802,24 @@ internal class SeStringCreatorWidget : IDataWindowWidget private unsafe void UpdateInputString(bool resetLocalParameters = true) { - using var rssb = new RentedSeStringBuilder(); + var sb = new LSeStringBuilder(); foreach (var entry in this.entries) { switch (entry.Type) { case TextEntryType.String: - rssb.Builder.Append(entry.Message); + sb.Append(entry.Message); break; case TextEntryType.Macro: case TextEntryType.Fixed: - rssb.Builder.AppendMacroString(entry.Message); + sb.AppendMacroString(entry.Message); break; } } - this.input = rssb.Builder.ToReadOnlySeString(); + this.input = sb.ToReadOnlySeString(); if (resetLocalParameters) this.localParameters = null; @@ -996,9 +998,10 @@ internal class SeStringCreatorWidget : IDataWindowWidget } } - using var rssb = new RentedSeStringBuilder(); - rssb.Builder.AppendIcon(iconId); - ImGuiHelpers.SeStringWrapped(rssb.Builder.ToArray()); + var builder = LSeStringBuilder.SharedPool.Get(); + builder.AppendIcon(iconId); + ImGuiHelpers.SeStringWrapped(builder.ToArray()); + LSeStringBuilder.SharedPool.Return(builder); ImGui.SameLine(); } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs index 6a07152e5..0f51e0322 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs @@ -177,24 +177,6 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget ImGuiHelpers.SeStringWrapped(this.logkind.Value.Data.Span, this.style); } - if (ImGui.CollapsingHeader("Draw into drawlist")) - { - ImGuiHelpers.ScaledDummy(100); - ImGui.SetCursorScreenPos(ImGui.GetItemRectMin() + ImGui.GetStyle().FramePadding); - var clipMin = ImGui.GetItemRectMin() + ImGui.GetStyle().FramePadding; - var clipMax = ImGui.GetItemRectMax() - ImGui.GetStyle().FramePadding; - clipMin.Y = MathF.Max(clipMin.Y, ImGui.GetWindowPos().Y); - clipMax.Y = MathF.Min(clipMax.Y, ImGui.GetWindowPos().Y + ImGui.GetWindowHeight()); - - var dl = ImGui.GetWindowDrawList(); - dl.PushClipRect(clipMin, clipMax); - ImGuiHelpers.CompileSeStringWrapped( - "Test test", - new SeStringDrawParams - { Color = 0xFFFFFFFF, WrapWidth = float.MaxValue, TargetDrawList = dl }); - dl.PopClipRect(); - } - if (ImGui.CollapsingHeader("Addon Table"u8)) { if (ImGui.BeginTable("Addon Sheet"u8, 3)) diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs index 3550f053c..e52a291ef 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs @@ -44,7 +44,7 @@ internal class UiColorWidget : IDataWindowWidget "BB.
" + "· Click on a color to copy the color code.
" + "· Hover on a color to preview the text with edge, when the next color has been used together."); - if (!ImGui.BeginTable("UIColor"u8, 7)) + if (!ImGui.BeginTable("UIColor"u8, 5)) return; ImGui.TableSetupScrollFreeze(0, 1); @@ -62,8 +62,6 @@ internal class UiColorWidget : IDataWindowWidget ImGui.TableSetupColumn("Light"u8, ImGuiTableColumnFlags.WidthFixed, colorw); ImGui.TableSetupColumn("Classic FF"u8, ImGuiTableColumnFlags.WidthFixed, colorw); ImGui.TableSetupColumn("Clear Blue"u8, ImGuiTableColumnFlags.WidthFixed, colorw); - ImGui.TableSetupColumn("Clear White"u8, ImGuiTableColumnFlags.WidthFixed, colorw); - ImGui.TableSetupColumn("Clear Green"u8, ImGuiTableColumnFlags.WidthFixed, colorw); ImGui.TableHeadersRow(); var clipper = ImGui.ImGuiListClipper(); @@ -122,22 +120,6 @@ internal class UiColorWidget : IDataWindowWidget adjacentRow.HasValue) DrawEdgePreview(id, row.ClearBlue, adjacentRow.Value.ClearBlue); ImGui.PopID(); - - ImGui.TableNextColumn(); - ImGui.AlignTextToFramePadding(); - ImGui.PushID($"row{id}_white"); - if (this.DrawColorColumn(row.Unknown0) && - adjacentRow.HasValue) - DrawEdgePreview(id, row.Unknown0, adjacentRow.Value.Unknown0); - ImGui.PopID(); - - ImGui.TableNextColumn(); - ImGui.AlignTextToFramePadding(); - ImGui.PushID($"row{id}_green"); - if (this.DrawColorColumn(row.Unknown1) && - adjacentRow.HasValue) - DrawEdgePreview(id, row.Unknown1, adjacentRow.Value.Unknown1); - ImGui.PopID(); } } diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs index 4d858922a..bc12f4d28 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UldWidget.cs @@ -26,8 +26,8 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets; internal class UldWidget : IDataWindowWidget { // ULD styles can be hardcoded for now as they don't add new ones regularly. Can later try and find where to load these from in the game EXE. - private static readonly string[] ThemeDisplayNames = ["Dark", "Light", "Classic FF", "Clear Blue", "Clear White", "Clear Green"]; - private const string UldBaseBath = "ui/uld/"; + private static readonly string[] ThemeDisplayNames = ["Dark", "Light", "Classic FF", "Clear Blue"]; + private static readonly string[] ThemeBasePaths = ["ui/uld/", "ui/uld/img01/", "ui/uld/img02/", "ui/uld/img03/"]; // 48 8D 15 ?? ?? ?? ?? is the part of the signatures that contain the string location offset // 48 = 64 bit register prefix @@ -263,7 +263,7 @@ internal class UldWidget : IDataWindowWidget } private string ToThemedPath(string path) => - UldBaseBath + (this.selectedTheme > 0 ? $"img{this.selectedTheme:D2}" : "") + path[UldBaseBath.Length..]; + ThemeBasePaths[this.selectedTheme] + path[ThemeBasePaths[0].Length..]; private void DrawTextureEntry(UldRoot.TextureEntry textureEntry, TextureManager textureManager) { diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 3241015fc..ac092bd25 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -302,7 +302,7 @@ internal class PluginInstallerWindow : Window, IDisposable this.profileManagerWidget.Reset(); - if (this.staleDalamudNewVersion == null && !Versioning.GetActiveTrack().IsNullOrEmpty()) + if (this.staleDalamudNewVersion == null && !Util.GetActiveTrack().IsNullOrEmpty()) { Service.Get().GetVersionForCurrentTrack().ContinueWith(t => { @@ -310,7 +310,7 @@ internal class PluginInstallerWindow : Window, IDisposable return; var versionInfo = t.Result; - if (versionInfo.AssemblyVersion != Versioning.GetScmVersion()) + if (versionInfo.AssemblyVersion != Util.GetScmVersion()) { this.staleDalamudNewVersion = versionInfo.AssemblyVersion; } @@ -1670,7 +1670,7 @@ internal class PluginInstallerWindow : Window, IDisposable DrawWarningIcon(); DrawLinesCentered("A new version of Dalamud is available.\n" + "Please restart the game to ensure compatibility with updated plugins.\n" + - $"old: {Versioning.GetScmVersion()} new: {this.staleDalamudNewVersion}"); + $"old: {Util.GetScmVersion()} new: {this.staleDalamudNewVersion}"); ImGuiHelpers.ScaledDummy(10); } @@ -2461,7 +2461,7 @@ internal class PluginInstallerWindow : Window, IDisposable var isOutdated = effectiveApiLevel < PluginManager.DalamudApiLevel; var isIncompatible = manifest.MinimumDalamudVersion != null && - manifest.MinimumDalamudVersion > Versioning.GetAssemblyVersionParsed(); + manifest.MinimumDalamudVersion > Util.AssemblyVersionParsed; var enableInstallButton = this.updateStatus != OperationStatus.InProgress && this.installStatus != OperationStatus.InProgress && diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GamepadStateSelfTestStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GamepadStateSelfTestStep.cs index e2ee676df..d272032e7 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GamepadStateSelfTestStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/Steps/GamepadStateSelfTestStep.cs @@ -3,10 +3,10 @@ using System.Linq; using Dalamud.Game.ClientState.GamePad; using Dalamud.Interface.Utility; using Dalamud.Plugin.SelfTest; -using Dalamud.Utility; - using Lumina.Text.Payloads; +using LSeStringBuilder = Lumina.Text.SeStringBuilder; + namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps; /// @@ -29,25 +29,25 @@ internal class GamepadStateSelfTestStep : ISelfTestStep (GamepadButtons.L1, 12), }; - using var rssb = new RentedSeStringBuilder(); + var builder = LSeStringBuilder.SharedPool.Get(); - rssb.Builder.Append("Hold down "); + builder.Append("Hold down "); for (var i = 0; i < buttons.Length; i++) { var (button, iconId) = buttons[i]; - rssb.Builder - .BeginMacro(MacroCode.Icon) - .AppendUIntExpression(iconId) - .EndMacro() - .PushColorRgba(gamepadState.Raw(button) == 1 ? 0x0000FF00u : 0x000000FF) - .Append(button.ToString()) - .PopColor() - .Append(i < buttons.Length - 1 ? ", " : "."); + builder.BeginMacro(MacroCode.Icon).AppendUIntExpression(iconId).EndMacro(); + builder.PushColorRgba(gamepadState.Raw(button) == 1 ? 0x0000FF00u : 0x000000FF); + builder.Append(button.ToString()); + builder.PopColor(); + + builder.Append(i < buttons.Length - 1 ? ", " : "."); } - ImGuiHelpers.SeStringWrapped(rssb.Builder.ToReadOnlySeString()); + ImGuiHelpers.SeStringWrapped(builder.ToReadOnlySeString()); + + LSeStringBuilder.SharedPool.Return(builder); if (buttons.All(tuple => gamepadState.Raw(tuple.Button) == 1)) { diff --git a/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs b/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs index 62c931b20..581ef3746 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/SettingsWindow.cs @@ -46,7 +46,6 @@ internal sealed class SettingsWindow : Window new SettingsTabLook(), new SettingsTabAutoUpdates(), new SettingsTabDtr(), - new SettingsTabBadge(), new SettingsTabExperimental(), new SettingsTabAbout() ]; diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs index 4785ceb3c..74b9b0fd7 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabAbout.cs @@ -223,7 +223,7 @@ Contribute at: https://github.com/goatcorp/Dalamud .Select(plugin => $"{plugin.Manifest.Name} by {plugin.Manifest.Author}\n") .Aggregate(string.Empty, (current, next) => $"{current}{next}"); - this.creditsText = string.Format(CreditsTextTempl, typeof(Dalamud).Assembly.GetName().Version, pluginCredits, Versioning.GetGitHashClientStructs()); + this.creditsText = string.Format(CreditsTextTempl, typeof(Dalamud).Assembly.GetName().Version, pluginCredits, Util.GetGitHashClientStructs()); var gameGui = Service.Get(); var playerState = PlayerState.Instance(); diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabBadge.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabBadge.cs deleted file mode 100644 index e39c1952c..000000000 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabBadge.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using System.Linq; - -using CheapLoc; -using Dalamud.Bindings.ImGui; -using Dalamud.Interface.Colors; -using Dalamud.Interface.Internal.Badge; -using Dalamud.Interface.Internal.Windows.Settings.Widgets; -using Dalamud.Interface.Utility; -using Dalamud.Storage.Assets; -using Dalamud.Utility.Internal; - -namespace Dalamud.Interface.Internal.Windows.Settings.Tabs; - -[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Internals")] -internal sealed class SettingsTabBadge : SettingsTab -{ - private string badgePassword = string.Empty; - private bool badgeWasError = false; - - public override string Title => Loc.Localize("DalamudSettingsBadge", "Badges"); - - public override SettingsOpenKind Kind => SettingsOpenKind.Badge; - - public override SettingsEntry[] Entries { get; } = - [ - new SettingsEntry( - LazyLoc.Localize("DalamudSettingsShowBadgesOnTitleScreen", "Show Badges on Title Screen"), - LazyLoc.Localize("DalamudSettingsShowBadgesOnTitleScreenHint", "If enabled, your unlocked badges will also be shown on the title screen."), - c => c.ShowBadgesOnTitleScreen, - (v, c) => c.ShowBadgesOnTitleScreen = v), - ]; - - public override void Draw() - { - var badgeManager = Service.Get(); - var dalamudInterface = Service.Get(); - - ImGui.TextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingBadgesHint", "On this tab, you can unlock small badges that show on your title screen.\nBadge codes are usually given out during community events or contests.")); - - ImGuiHelpers.ScaledDummy(5); - - ImGui.Text(Loc.Localize("DalamudSettingsBadgesUnlock", "Unlock a badge")); - ImGui.TextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsBadgesUnlockHint", "If you have received a code for a badge, enter it here to unlock the badge.")); - ImGui.InputTextWithHint( - "##BadgePassword", - Loc.Localize("DalamudSettingsBadgesUnlockHintInput", "Enter badge code here"), - ref this.badgePassword, - 100); - ImGui.SameLine(); - if (ImGui.Button(Loc.Localize("DalamudSettingsBadgesUnlockButton", "Unlock Badge"))) - { - if (badgeManager.TryUnlockBadge(this.badgePassword.Trim(), BadgeUnlockMethod.User, out var unlockedBadge)) - { - dalamudInterface.StartBadgeUnlockAnimation(unlockedBadge); - this.badgeWasError = false; - } - else - { - this.badgeWasError = true; - } - } - - if (this.badgeWasError) - { - ImGuiHelpers.ScaledDummy(5); - ImGui.TextColored(ImGuiColors.DalamudRed, Loc.Localize("DalamudSettingsBadgesUnlockError", "Failed to unlock badge. The code may be invalid or you may have already unlocked this badge.")); - } - - ImGuiHelpers.ScaledDummy(5); - - base.Draw(); - - ImGui.Separator(); - - ImGuiHelpers.ScaledDummy(5); - - var haveBadges = badgeManager.UnlockedBadges.ToArray(); - - if (haveBadges.Length == 0) - { - ImGui.TextColoredWrapped(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsBadgesDidNone", "You did not unlock any badges yet.")); - } - - var badgeTexture = Service.Get().GetDalamudTextureWrap(DalamudAsset.BadgeAtlas); - foreach (var badge in haveBadges) - { - var uvs = badge.GetIconUv(badgeTexture.Width, badgeTexture.Height); - var sectionSize = ImGuiHelpers.GlobalScale * 66; - - var startCursor = ImGui.GetCursorPos(); - - ImGui.SetCursorPos(startCursor); - - var iconSize = ImGuiHelpers.ScaledVector2(64, 64); - var cursorBeforeImage = ImGui.GetCursorPos(); - var rectOffset = ImGui.GetWindowContentRegionMin() + ImGui.GetWindowPos(); - - if (ImGui.IsRectVisible(rectOffset + cursorBeforeImage, rectOffset + cursorBeforeImage + iconSize)) - { - ImGui.Image(badgeTexture.Handle, iconSize, uvs.Uv0, uvs.Uv1); - ImGui.SameLine(); - ImGui.SetCursorPos(cursorBeforeImage); - } - - ImGui.SameLine(); - - ImGuiHelpers.ScaledDummy(5); - ImGui.SameLine(); - - var cursor = ImGui.GetCursorPos(); - - // Name - ImGui.Text(badge.Name()); - - cursor.Y += ImGui.GetTextLineHeightWithSpacing(); - ImGui.SetCursorPos(cursor); - - // Description - ImGui.TextWrapped(badge.Description()); - - startCursor.Y += sectionSize; - ImGui.SetCursorPos(startCursor); - - ImGuiHelpers.ScaledDummy(5); - } - } -} diff --git a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs index ec9440e0e..69cdc4d28 100644 --- a/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs +++ b/Dalamud/Interface/Internal/Windows/TitleScreenMenuWindow.cs @@ -26,6 +26,8 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using Lumina.Text.ReadOnly; using Serilog; +using LSeStringBuilder = Lumina.Text.SeStringBuilder; + namespace Dalamud.Interface.Internal.Windows; /// @@ -470,9 +472,9 @@ internal class TitleScreenMenuWindow : Window, IDisposable private unsafe void OnVersionStringDraw(AddonEvent ev, AddonArgs args) { - if (ev is not (AddonEvent.PostDraw or AddonEvent.PreDraw)) return; + if (args is not AddonDrawArgs drawArgs) return; - var addon = args.Addon.Struct; + var addon = drawArgs.Addon.Struct; var textNode = addon->GetTextNodeById(3); // look and feel init. should be harmless to set. @@ -496,23 +498,20 @@ internal class TitleScreenMenuWindow : Window, IDisposable return; this.lastLoadedPluginCount = count; - using var rssb = new RentedSeStringBuilder(); - - rssb.Builder - .Append(new ReadOnlySeStringSpan(addon->AtkValues[1].String.Value)) - .Append("\n\n") - .PushEdgeColorType(701) - .PushColorType(539) + var lssb = LSeStringBuilder.SharedPool.Get(); + lssb.Append(new ReadOnlySeStringSpan(addon->AtkValues[1].String.Value)).Append("\n\n"); + lssb.PushEdgeColorType(701).PushColorType(539) .Append(SeIconChar.BoxedLetterD.ToIconChar()) - .PopColorType() - .PopEdgeColorType() - .Append($" Dalamud: {Versioning.GetScmVersion()}") - .Append($" - {count} {(count != 1 ? "plugins" : "plugin")} loaded"); + .PopColorType().PopEdgeColorType(); + lssb.Append($" Dalamud: {Util.GetScmVersion()}"); + + lssb.Append($" - {count} {(count != 1 ? "plugins" : "plugin")} loaded"); if (pm?.SafeMode is true) - rssb.Builder.PushColorType(17).Append(" [SAFE MODE]").PopColorType(); + lssb.PushColorType(17).Append(" [SAFE MODE]").PopColorType(); - textNode->SetText(rssb.Builder.GetViewAsSpan()); + textNode->SetText(lssb.GetViewAsSpan()); + LSeStringBuilder.SharedPool.Return(lssb); } private void TitleScreenMenuEntryListChange() => this.privateAtlas.BuildFontsAsync(); diff --git a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs index 41c87fd39..2a93cf093 100644 --- a/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs +++ b/Dalamud/Interface/ManagedFontAtlas/Internals/FontAtlasFactory.BuildToolkit.cs @@ -15,6 +15,7 @@ using Dalamud.Interface.Textures.TextureWraps; using Dalamud.Interface.Utility; using Dalamud.Storage.Assets; using Dalamud.Utility; +using SharpDX.DXGI; using TerraFX.Interop.DirectX; namespace Dalamud.Interface.ManagedFontAtlas.Internals; @@ -748,7 +749,7 @@ internal sealed partial class FontAtlasFactory new( width, height, - (int)(use4 ? DXGI_FORMAT.DXGI_FORMAT_B4G4R4A4_UNORM : DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM), + (int)(use4 ? Format.B4G4R4A4_UNorm : Format.B8G8R8A8_UNorm), width * bpp), buf, name); diff --git a/Dalamud/Interface/Textures/Internal/BitmapCodecInfo.cs b/Dalamud/Interface/Textures/Internal/BitmapCodecInfo.cs index ec56caadd..3d5456500 100644 --- a/Dalamud/Interface/Textures/Internal/BitmapCodecInfo.cs +++ b/Dalamud/Interface/Textures/Internal/BitmapCodecInfo.cs @@ -44,12 +44,12 @@ internal sealed class BitmapCodecInfo : IBitmapCodecInfo private static unsafe string ReadStringUsing( IWICBitmapCodecInfo* codecInfo, - delegate* unmanaged[MemberFunction] readFuncPtr) + delegate* unmanaged readFuncPtr) { var cch = 0u; _ = readFuncPtr(codecInfo, 0, null, &cch); var buf = stackalloc char[(int)cch + 1]; - Marshal.ThrowExceptionForHR(readFuncPtr(codecInfo, cch + 1, buf, &cch)); + Marshal.ThrowExceptionForHR(readFuncPtr(codecInfo, cch + 1, (ushort*)buf, &cch)); return new(buf, 0, (int)cch); } } diff --git a/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs b/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs index fde40d462..837b41271 100644 --- a/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs +++ b/Dalamud/Interface/Textures/Internal/TextureManager.BlameTracker.cs @@ -219,14 +219,14 @@ internal sealed partial class TextureManager return; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int QueryInterfaceStatic(IUnknown* pThis, Guid* riid, void** ppvObject) => ToManagedObject(pThis)?.QueryInterface(riid, ppvObject) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static uint AddRefStatic(IUnknown* pThis) => (uint)(ToManagedObject(pThis)?.AddRef() ?? 0); - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static uint ReleaseStatic(IUnknown* pThis) => (uint)(ToManagedObject(pThis)?.Release() ?? 0); } diff --git a/Dalamud/Interface/Textures/Internal/TextureManager.Clipboard.cs b/Dalamud/Interface/Textures/Internal/TextureManager.Clipboard.cs index 75f7ab975..8a510e967 100644 --- a/Dalamud/Interface/Textures/Internal/TextureManager.Clipboard.cs +++ b/Dalamud/Interface/Textures/Internal/TextureManager.Clipboard.cs @@ -133,7 +133,7 @@ internal sealed partial class TextureManager }, }, }; - namea.AsSpan().CopyTo(new(Unsafe.AsPointer(ref fgda.fgd.e0.cFileName[0]), 260)); + namea.AsSpan().CopyTo(new(fgda.fgd.e0.cFileName, 260)); AddToDataObject( pdo, @@ -157,7 +157,7 @@ internal sealed partial class TextureManager }, }, }; - preferredFileNameWithoutExtension.AsSpan().CopyTo(new(Unsafe.AsPointer(ref fgdw.fgd.e0.cFileName[0]), 260)); + preferredFileNameWithoutExtension.AsSpan().CopyTo(new(fgdw.fgd.e0.cFileName, 260)); AddToDataObject( pdo, @@ -450,7 +450,7 @@ internal sealed partial class TextureManager try { IStream* pfs; - SHCreateStreamOnFileW((char*)pPath, sharedRead, &pfs).ThrowOnError(); + SHCreateStreamOnFileW((ushort*)pPath, sharedRead, &pfs).ThrowOnError(); var stgm2 = new STGMEDIUM { diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs index ea0e21e97..1ea0d9f2f 100644 --- a/Dalamud/Interface/UiBuilder.cs +++ b/Dalamud/Interface/UiBuilder.cs @@ -13,6 +13,7 @@ using Dalamud.Interface.FontIdentifier; using Dalamud.Interface.Internal; using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.ManagedFontAtlas.Internals; +using Dalamud.Plugin; using Dalamud.Plugin.Internal.Types; using Dalamud.Utility; using Serilog; @@ -150,6 +151,13 @@ public interface IUiBuilder /// public ImFontPtr FontMono { get; } + /// + /// Gets the game's active Direct3D device. + /// + // TODO: Remove it on API11/APIXI, and remove SharpDX/PInvoke/etc. dependency from Dalamud. + [Obsolete($"Use {nameof(DeviceHandle)} and wrap it using DirectX wrapper library of your choice.")] + SharpDX.Direct3D11.Device Device { get; } + /// Gets the game's active Direct3D device. /// Pointer to the instance of IUnknown that the game is using and should be containing an ID3D11Device, /// or 0 if it is not available yet. @@ -219,12 +227,6 @@ public interface IUiBuilder /// bool ShouldUseReducedMotion { get; } - /// - /// Gets a value indicating whether the user has enabled the "Enable sound effects for plugin windows" setting.
- /// This setting is effected by the in-game "System Sounds" option and volume. - ///
- bool PluginUISoundEffectsEnabled { get; } - /// /// Loads an ULD file that can load textures containing multiple icons in a single texture. /// @@ -301,6 +303,8 @@ public sealed class UiBuilder : IDisposable, IUiBuilder private IFontHandle? monoFontHandle; private IFontHandle? iconFontFixedWidthHandle; + private SharpDX.Direct3D11.Device? sdxDevice; + /// /// Initializes a new instance of the class and registers it. /// You do not have to call this manually. @@ -490,6 +494,12 @@ public sealed class UiBuilder : IDisposable, IUiBuilder this.InterfaceManagerWithScene?.MonoFontHandle ?? throw new InvalidOperationException("Scene is not yet ready."))); + /// + // TODO: Remove it on API11/APIXI, and remove SharpDX/PInvoke/etc. dependency from Dalamud. + [Obsolete($"Use {nameof(DeviceHandle)} and wrap it using DirectX wrapper library of your choice.")] + public SharpDX.Direct3D11.Device Device => + this.sdxDevice ??= new(this.InterfaceManagerWithScene!.Backend!.DeviceHandle); + /// public nint DeviceHandle => this.InterfaceManagerWithScene?.Backend?.DeviceHandle ?? 0; @@ -566,9 +576,6 @@ public sealed class UiBuilder : IDisposable, IUiBuilder /// public bool ShouldUseReducedMotion => Service.Get().ReduceMotions ?? false; - /// - public bool PluginUISoundEffectsEnabled => Service.Get().EnablePluginUISoundEffects; - /// /// Gets or sets a value indicating whether statistics about UI draw time should be collected. /// diff --git a/Dalamud/Interface/Windowing/Persistence/PresetModel.cs b/Dalamud/Interface/Windowing/Persistence/PresetModel.cs index 4ddf55e51..f7910e0b2 100644 --- a/Dalamud/Interface/Windowing/Persistence/PresetModel.cs +++ b/Dalamud/Interface/Windowing/Persistence/PresetModel.cs @@ -53,7 +53,6 @@ internal class PresetModel /// /// Gets a value indicating whether this preset is in the default state. /// - [JsonIgnore] public bool IsDefault => !this.IsPinned && !this.IsClickThrough && diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs index 5a79a017a..b0786fbb5 100644 --- a/Dalamud/Interface/Windowing/Window.cs +++ b/Dalamud/Interface/Windowing/Window.cs @@ -84,7 +84,7 @@ public abstract class Window Click = _ => { this.internalIsClickthrough = false; - this.presetDirty = true; + this.presetDirty = false; ImGui.OpenPopup(AdditionsPopupName); }, Priority = int.MinValue, @@ -672,13 +672,16 @@ public abstract class Window Task.FromResult(tex)); } - if (isErrorStylePushed) + if (!this.hasError) { - Style.StyleModelV1.DalamudStandard.Pop(); + this.PostDraw(); } else { - this.PostDraw(); + if (isErrorStylePushed) + { + Style.StyleModelV1.DalamudStandard.Pop(); + } } this.PostHandlePreset(persistence); @@ -861,7 +864,7 @@ public abstract class Window foreach (var button in this.allButtons) { if (this.internalIsClickthrough && !button.AvailableClickthrough) - continue; + return; Vector2 position = new(titleBarRect.Max.X - padR - buttonSize, titleBarRect.Min.Y + style.FramePadding.Y); padR += buttonSize + style.ItemInnerSpacing.X; @@ -905,7 +908,7 @@ public abstract class Window private void DrawErrorMessage() { // TODO: Once window systems are services, offer to reload the plugin - ImGui.TextColoredWrapped(ImGuiColors.DalamudRed, Loc.Localize("WindowSystemErrorOccurred", "An error occurred while rendering this window. Please contact the developer for details.")); + ImGui.TextColoredWrapped(ImGuiColors.DalamudRed,Loc.Localize("WindowSystemErrorOccurred", "An error occurred while rendering this window. Please contact the developer for details.")); ImGuiHelpers.ScaledDummy(5); diff --git a/Dalamud/NativeMethods.json b/Dalamud/NativeMethods.json index 46fd3504f..ffb313dfc 100644 --- a/Dalamud/NativeMethods.json +++ b/Dalamud/NativeMethods.json @@ -1,5 +1,4 @@ { "$schema": "https://aka.ms/CsWin32.schema.json", - "useSafeHandles": false, "allowMarshaling": false } diff --git a/Dalamud/Networking/Http/HappyHttpClient.cs b/Dalamud/Networking/Http/HappyHttpClient.cs index c6a476fff..aeed98695 100644 --- a/Dalamud/Networking/Http/HappyHttpClient.cs +++ b/Dalamud/Networking/Http/HappyHttpClient.cs @@ -36,7 +36,7 @@ internal class HappyHttpClient : IInternalDisposableService { UserAgent = { - new ProductInfoHeaderValue("Dalamud", Versioning.GetAssemblyVersion()), + new ProductInfoHeaderValue("Dalamud", Util.AssemblyVersion), }, }, }; diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index e42bbe608..6fd9064b6 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -16,15 +16,18 @@ using Dalamud.Game.Text; using Dalamud.Game.Text.Sanitizer; using Dalamud.Interface; using Dalamud.Interface.Internal; +using Dalamud.Interface.Internal.Windows.PluginInstaller; +using Dalamud.Interface.Internal.Windows.SelfTest; +using Dalamud.Interface.Internal.Windows.Settings; using Dalamud.IoC.Internal; using Dalamud.Plugin.Internal; using Dalamud.Plugin.Internal.AutoUpdate; using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Internal.Types.Manifest; using Dalamud.Plugin.Ipc; +using Dalamud.Plugin.Ipc.Exceptions; using Dalamud.Plugin.Ipc.Internal; -using Dalamud.Plugin.VersionInfo; -using Dalamud.Utility; +using Dalamud.Plugin.Services; using Serilog; @@ -201,7 +204,11 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa return true; } - /// + /// + /// Gets the plugin the given assembly is part of. + /// + /// The assembly to check. + /// The plugin the given assembly is part of, or null if this is a shared assembly or if this information cannot be determined. public IExposedPlugin? GetPlugin(Assembly assembly) => AssemblyLoadContext.GetLoadContext(assembly) switch { @@ -209,7 +216,11 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa var context => this.GetPlugin(context), }; - /// + /// + /// Gets the plugin that loads in the given context. + /// + /// The context to check. + /// The plugin that loads in the given context, or null if this isn't a plugin's context or if this information cannot be determined. public IExposedPlugin? GetPlugin(AssemblyLoadContext context) => Service.Get().InstalledPlugins.FirstOrDefault(p => p.LoadsIn(context)) switch { @@ -217,12 +228,6 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa var p => new ExposedPlugin(p), }; - /// - public IDalamudVersionInfo GetDalamudVersion() - { - return new DalamudVersionInfo(Versioning.GetAssemblyVersionParsed(), Versioning.GetActiveTrack(), Versioning.GetGitHash(), Versioning.GetGitHashClientStructs(), Versioning.GetScmVersion()); - } - #region IPC /// @@ -243,75 +248,75 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateProvider GetIpcProvider(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); /// public ICallGateSubscriber GetIpcSubscriber(string name) - => new CallGatePubSub(name, this.plugin); + => new CallGatePubSub(name); #endregion diff --git a/Dalamud/Plugin/IDalamudPluginInterface.cs b/Dalamud/Plugin/IDalamudPluginInterface.cs index 92ecab006..d1b6977d4 100644 --- a/Dalamud/Plugin/IDalamudPluginInterface.cs +++ b/Dalamud/Plugin/IDalamudPluginInterface.cs @@ -15,7 +15,7 @@ using Dalamud.Plugin.Internal.Types.Manifest; using Dalamud.Plugin.Ipc; using Dalamud.Plugin.Ipc.Exceptions; using Dalamud.Plugin.Ipc.Internal; -using Dalamud.Plugin.VersionInfo; +using Dalamud.Plugin.Services; namespace Dalamud.Plugin; @@ -194,12 +194,6 @@ public interface IDalamudPluginInterface : IServiceProvider /// The plugin that loads in the given context, or null if this isn't a plugin's context or if this information cannot be determined. IExposedPlugin? GetPlugin(AssemblyLoadContext context); - /// - /// Gets information about the version of Dalamud this plugin is loaded into. - /// - /// Class containing version information. - IDalamudVersionInfo GetDalamudVersion(); - /// T GetOrCreateData(string tag, Func dataGenerator) where T : class; diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs index 193a2d45f..e2eded57c 100644 --- a/Dalamud/Plugin/Internal/PluginManager.cs +++ b/Dalamud/Plugin/Internal/PluginManager.cs @@ -1790,7 +1790,7 @@ internal class PluginManager : IInternalDisposableService var updates = this.AvailablePlugins .Where(remoteManifest => plugin.Manifest.InternalName == remoteManifest.InternalName) .Where(remoteManifest => plugin.Manifest.InstalledFromUrl == remoteManifest.SourceRepo.PluginMasterUrl || !remoteManifest.SourceRepo.IsThirdParty) - .Where(remoteManifest => remoteManifest.MinimumDalamudVersion == null || Versioning.GetAssemblyVersionParsed() >= remoteManifest.MinimumDalamudVersion) + .Where(remoteManifest => remoteManifest.MinimumDalamudVersion == null || Util.AssemblyVersionParsed >= remoteManifest.MinimumDalamudVersion) .Where(remoteManifest => { var useTesting = this.UseTesting(remoteManifest); diff --git a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs index 1fe18b95b..0197683ef 100644 --- a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs +++ b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs @@ -315,7 +315,7 @@ internal class LocalPlugin : IAsyncDisposable if (!this.CheckPolicy()) throw new PluginPreconditionFailedException($"Unable to load {this.Name} as a load policy forbids it"); - if (this.Manifest.MinimumDalamudVersion != null && this.Manifest.MinimumDalamudVersion > Versioning.GetAssemblyVersionParsed()) + if (this.Manifest.MinimumDalamudVersion != null && this.Manifest.MinimumDalamudVersion > Util.AssemblyVersionParsed) throw new PluginPreconditionFailedException($"Unable to load {this.Name}, Dalamud version is lower than minimum required version {this.Manifest.MinimumDalamudVersion}"); this.State = PluginState.Loading; diff --git a/Dalamud/Plugin/Internal/Types/PluginRepository.cs b/Dalamud/Plugin/Internal/Types/PluginRepository.cs index d5c1131af..c5e703e4b 100644 --- a/Dalamud/Plugin/Internal/Types/PluginRepository.cs +++ b/Dalamud/Plugin/Internal/Types/PluginRepository.cs @@ -59,7 +59,7 @@ internal class PluginRepository }, UserAgent = { - new ProductInfoHeaderValue("Dalamud", Versioning.GetAssemblyVersion()), + new ProductInfoHeaderValue("Dalamud", Util.AssemblyVersion), }, }, }; @@ -164,7 +164,7 @@ internal class PluginRepository } this.PluginMaster = pluginMaster.Where(this.IsValidManifest).ToList().AsReadOnly(); - + // API9 HACK: Force IsHide to false, we should remove that if (!this.IsThirdParty) { @@ -197,7 +197,7 @@ internal class PluginRepository Log.Error("Plugin {PluginName} in {RepoLink} has an invalid Name.", manifest.InternalName, this.PluginMasterUrl); return false; } - + // ReSharper disable once ConditionIsAlwaysTrueOrFalse if (manifest.AssemblyVersion == null) { @@ -224,7 +224,7 @@ internal class PluginRepository request.Headers.CacheControl = new CacheControlHeaderValue { NoCache = true }; using var requestCts = new CancellationTokenSource(TimeSpan.FromSeconds(timeout)); - + return await httpClient.SendAsync(request, requestCts.Token); } } diff --git a/Dalamud/Plugin/Ipc/ICallGateProvider.cs b/Dalamud/Plugin/Ipc/ICallGateProvider.cs index 387f0adf9..f4e5c76d7 100644 --- a/Dalamud/Plugin/Ipc/ICallGateProvider.cs +++ b/Dalamud/Plugin/Ipc/ICallGateProvider.cs @@ -19,9 +19,6 @@ public interface ICallGateProvider /// public void UnregisterFunc(); - - /// - public IpcContext? GetContext(); } /// diff --git a/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs b/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs index 8bd631b0e..ea94103f7 100644 --- a/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs +++ b/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs @@ -2,9 +2,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Reflection; -using System.Threading; -using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Ipc.Exceptions; using Dalamud.Plugin.Ipc.Internal.Converters; @@ -18,8 +16,6 @@ namespace Dalamud.Plugin.Ipc.Internal; ///
internal class CallGateChannel { - private readonly ThreadLocal ipcExecutionContext = new(); - /// /// The actual storage. /// @@ -149,32 +145,6 @@ internal class CallGateChannel return (TRet)result; } - /// - /// Set the context for the invocations through this channel. - /// - /// The context to set. - internal void SetInvocationContext(IpcContext ipcContext) - { - this.ipcExecutionContext.Value = ipcContext; - } - - /// - /// Get the context for invocations through this channel. - /// - /// The context, if one was set. - internal IpcContext? GetInvocationContext() - { - return this.ipcExecutionContext.IsValueCreated ? this.ipcExecutionContext.Value : null; - } - - /// - /// Clear the context for this channel. - /// - internal void ClearInvocationContext() - { - this.ipcExecutionContext.Value = null; - } - private void CheckAndConvertArgs(object?[]? args, MethodInfo methodInfo) { var paramTypes = methodInfo.GetParameters() diff --git a/Dalamud/Plugin/Ipc/Internal/CallGatePubSub.cs b/Dalamud/Plugin/Ipc/Internal/CallGatePubSub.cs index 8725ef733..cc54a563b 100644 --- a/Dalamud/Plugin/Ipc/Internal/CallGatePubSub.cs +++ b/Dalamud/Plugin/Ipc/Internal/CallGatePubSub.cs @@ -1,5 +1,3 @@ -using Dalamud.Plugin.Internal.Types; - #pragma warning disable SA1402 // File may only contain a single type namespace Dalamud.Plugin.Ipc.Internal; @@ -7,9 +5,9 @@ namespace Dalamud.Plugin.Ipc.Internal; /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -45,9 +43,9 @@ internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -83,9 +81,9 @@ internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider< /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -121,9 +119,9 @@ internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvi /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -159,9 +157,9 @@ internal class CallGatePubSub : CallGatePubSubBase, ICallGateP /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -197,9 +195,9 @@ internal class CallGatePubSub : CallGatePubSubBase, ICallG /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -235,9 +233,9 @@ internal class CallGatePubSub : CallGatePubSubBase, IC /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -273,9 +271,9 @@ internal class CallGatePubSub : CallGatePubSubBase /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } @@ -311,9 +309,9 @@ internal class CallGatePubSub : CallGatePubSub /// internal class CallGatePubSub : CallGatePubSubBase, ICallGateProvider, ICallGateSubscriber { - /// - public CallGatePubSub(string name, LocalPlugin? owningPlugin = null) - : base(name, owningPlugin) + /// + public CallGatePubSub(string name) + : base(name) { } diff --git a/Dalamud/Plugin/Ipc/Internal/CallGatePubSubBase.cs b/Dalamud/Plugin/Ipc/Internal/CallGatePubSubBase.cs index 521824b7b..308457373 100644 --- a/Dalamud/Plugin/Ipc/Internal/CallGatePubSubBase.cs +++ b/Dalamud/Plugin/Ipc/Internal/CallGatePubSubBase.cs @@ -1,11 +1,4 @@ -using System.Reactive.Disposables; -using System.Threading; - -using Dalamud.Plugin.Internal.Types; using Dalamud.Plugin.Ipc.Exceptions; -using Dalamud.Utility; - -using Serilog; namespace Dalamud.Plugin.Ipc.Internal; @@ -18,11 +11,9 @@ internal abstract class CallGatePubSubBase /// Initializes a new instance of the class. ///
/// The name of the IPC registration. - /// The plugin that owns this IPC pubsub. - protected CallGatePubSubBase(string name, LocalPlugin? owningPlugin) + protected CallGatePubSubBase(string name) { this.Channel = Service.Get().GetOrCreateChannel(name); - this.OwningPlugin = owningPlugin; } /// @@ -30,7 +21,7 @@ internal abstract class CallGatePubSubBase /// s. /// public bool HasAction => this.Channel.Action != null; - + /// /// Gets a value indicating whether this IPC call gate has an associated Function. Only exposed to /// s. @@ -42,17 +33,12 @@ internal abstract class CallGatePubSubBase /// s, and can be used to determine if messages should be sent through the gate. /// public int SubscriptionCount => this.Channel.Subscriptions.Count; - + /// /// Gets the underlying channel implementation. /// protected CallGateChannel Channel { get; init; } - - /// - /// Gets the plugin that owns this pubsub instance. - /// - protected LocalPlugin? OwningPlugin { get; init; } - + /// /// Removes the associated Action from this call gate, effectively disabling RPC calls. /// @@ -67,16 +53,6 @@ internal abstract class CallGatePubSubBase public void UnregisterFunc() => this.Channel.Func = null; - /// - /// Gets the current context for this IPC call. This will only be present when called from within an IPC action - /// or function handler, and will be null otherwise. - /// - /// Returns a potential IPC context. - public IpcContext? GetContext() - { - return this.Channel.GetInvocationContext(); - } - /// /// Registers a for use by other plugins via RPC. This Delegate must satisfy the constraints /// of an type as defined by the interface, meaning they may not return a value and must have @@ -129,12 +105,7 @@ internal abstract class CallGatePubSubBase /// /// private protected void InvokeAction(params object?[]? args) - { - using (this.BuildContext()) - { - this.Channel.InvokeAction(args); - } - } + => this.Channel.InvokeAction(args); /// /// Executes the Function registered for this IPC call gate via . This method is intended @@ -149,12 +120,7 @@ internal abstract class CallGatePubSubBase /// /// private protected TRet InvokeFunc(params object?[]? args) - { - using (this.BuildContext()) - { - return this.Channel.InvokeFunc(args); - } - } + => this.Channel.InvokeFunc(args); /// /// Send the given arguments to all subscribers (through ) of this IPC call gate. This method @@ -166,14 +132,4 @@ internal abstract class CallGatePubSubBase /// Delegate arguments. private protected void SendMessage(params object?[]? args) => this.Channel.SendMessage(args); - - private IDisposable BuildContext() - { - this.Channel.SetInvocationContext(new IpcContext - { - SourcePlugin = this.OwningPlugin != null ? new ExposedPlugin(this.OwningPlugin) : null, - }); - - return Disposable.Create(() => { this.Channel.ClearInvocationContext(); }); - } } diff --git a/Dalamud/Plugin/Ipc/IpcContext.cs b/Dalamud/Plugin/Ipc/IpcContext.cs deleted file mode 100644 index 25fde6a36..000000000 --- a/Dalamud/Plugin/Ipc/IpcContext.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Dalamud.Plugin.Ipc; - -/// -/// The context associated for an IPC call. Reads from ThreadLocal. -/// -public class IpcContext -{ - /// - /// Gets the plugin that initiated this IPC call. - /// - public IExposedPlugin? SourcePlugin { get; init; } - - /// - public override string ToString() => $""; -} diff --git a/Dalamud/Plugin/Services/ISelfTestRegistry.cs b/Dalamud/Plugin/SelfTest/ISelfTestRegistry.cs similarity index 92% rename from Dalamud/Plugin/Services/ISelfTestRegistry.cs rename to Dalamud/Plugin/SelfTest/ISelfTestRegistry.cs index 50d3d35ce..af3b583c9 100644 --- a/Dalamud/Plugin/Services/ISelfTestRegistry.cs +++ b/Dalamud/Plugin/SelfTest/ISelfTestRegistry.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; -using Dalamud.Plugin.SelfTest; - -namespace Dalamud.Plugin.Services; +namespace Dalamud.Plugin.SelfTest; /// /// Interface for registering and unregistering self-test steps from plugins. @@ -46,7 +44,7 @@ namespace Dalamud.Plugin.Services; /// } /// /// -public interface ISelfTestRegistry : IDalamudService +public interface ISelfTestRegistry { /// /// Registers the self-test steps for this plugin. diff --git a/Dalamud/Plugin/Services/IAddonLifecycle.cs b/Dalamud/Plugin/Services/IAddonLifecycle.cs index aeff29811..1269b13dc 100644 --- a/Dalamud/Plugin/Services/IAddonLifecycle.cs +++ b/Dalamud/Plugin/Services/IAddonLifecycle.cs @@ -17,7 +17,7 @@ public interface IAddonLifecycle : IDalamudService /// The event type that triggered the message. /// Information about what addon triggered the message. public delegate void AddonEventDelegate(AddonEvent type, AddonArgs args); - + /// /// Register a listener that will trigger on the specified event and any of the specified addons. /// @@ -25,7 +25,7 @@ public interface IAddonLifecycle : IDalamudService /// Addon names that will trigger the handler to be invoked. /// The handler to invoke. void RegisterListener(AddonEvent eventType, IEnumerable addonNames, AddonEventDelegate handler); - + /// /// Register a listener that will trigger on the specified event only for the specified addon. /// @@ -33,14 +33,14 @@ public interface IAddonLifecycle : IDalamudService /// The addon name that will trigger the handler to be invoked. /// The handler to invoke. void RegisterListener(AddonEvent eventType, string addonName, AddonEventDelegate handler); - + /// /// Register a listener that will trigger on the specified event for any addon. /// /// Event type to trigger on. /// The handler to invoke. void RegisterListener(AddonEvent eventType, AddonEventDelegate handler); - + /// /// Unregister listener from specified event type and specified addon names. /// @@ -51,7 +51,7 @@ public interface IAddonLifecycle : IDalamudService /// Addon names to deregister. /// Optional specific handler to remove. void UnregisterListener(AddonEvent eventType, IEnumerable addonNames, [Optional] AddonEventDelegate handler); - + /// /// Unregister all listeners for the specified event type and addon name. /// @@ -62,7 +62,7 @@ public interface IAddonLifecycle : IDalamudService /// Addon name to deregister. /// Optional specific handler to remove. void UnregisterListener(AddonEvent eventType, string addonName, [Optional] AddonEventDelegate handler); - + /// /// Unregister an event type handler.
This will only remove a handler that is added via . ///
@@ -72,17 +72,10 @@ public interface IAddonLifecycle : IDalamudService /// Event type to deregister. /// Optional specific handler to remove. void UnregisterListener(AddonEvent eventType, [Optional] AddonEventDelegate handler); - + /// /// Unregister all events that use the specified handlers. /// /// Handlers to remove. void UnregisterListener(params AddonEventDelegate[] handlers); - - /// - /// Resolves an addons virtual table address back to the original unmodified table address. - /// - /// The address of a modified addons virtual table. - /// The address of the addons original virtual table. - nint GetOriginalVirtualTable(nint virtualTableAddress); } diff --git a/Dalamud/Plugin/Services/IClientState.cs b/Dalamud/Plugin/Services/IClientState.cs index 9e7453c25..2555b3b30 100644 --- a/Dalamud/Plugin/Services/IClientState.cs +++ b/Dalamud/Plugin/Services/IClientState.cs @@ -2,7 +2,6 @@ using Dalamud.Game; using Dalamud.Game.ClientState; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Objects.SubKinds; -using Dalamud.Utility; namespace Dalamud.Plugin.Services; @@ -110,14 +109,12 @@ public interface IClientState : IDalamudService /// /// Gets the local player character, if one is present. /// - [Api15ToDo("Remove")] [Obsolete($"Use {nameof(IPlayerState)} or {nameof(IObjectTable)}.{nameof(IObjectTable.LocalPlayer)} if necessary.")] public IPlayerCharacter? LocalPlayer { get; } /// /// Gets the content ID of the local character. /// - [Api15ToDo("Remove")] [Obsolete($"Use {nameof(IPlayerState)}.{nameof(IPlayerState.ContentId)}")] public ulong LocalContentId { get; } diff --git a/Dalamud/Plugin/Services/ISigScanner.cs b/Dalamud/Plugin/Services/ISigScanner.cs index 017c4fe9d..fbbd8b05a 100644 --- a/Dalamud/Plugin/Services/ISigScanner.cs +++ b/Dalamud/Plugin/Services/ISigScanner.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Threading; -namespace Dalamud.Plugin.Services; +using Dalamud.Plugin.Services; + +namespace Dalamud.Game; /// /// A SigScanner facilitates searching for memory signatures in a given ProcessModule. diff --git a/Dalamud/Plugin/Services/ITargetManager.cs b/Dalamud/Plugin/Services/ITargetManager.cs index 0c14571c5..9c9fce550 100644 --- a/Dalamud/Plugin/Services/ITargetManager.cs +++ b/Dalamud/Plugin/Services/ITargetManager.cs @@ -1,7 +1,7 @@ using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Plugin.Services; -namespace Dalamud.Plugin.Services; +namespace Dalamud.Game.ClientState.Objects; /// /// Get and set various kinds of targets for the player. @@ -37,13 +37,13 @@ public interface ITargetManager : IDalamudService /// Set to null to clear the target. /// public IGameObject? SoftTarget { get; set; } - + /// /// Gets or sets the gpose target. /// Set to null to clear the target. /// public IGameObject? GPoseTarget { get; set; } - + /// /// Gets or sets the mouseover nameplate target. /// Set to null to clear the target. diff --git a/Dalamud/Plugin/VersionInfo/DalamudVersionInfo.cs b/Dalamud/Plugin/VersionInfo/DalamudVersionInfo.cs deleted file mode 100644 index 0a6fad9c2..000000000 --- a/Dalamud/Plugin/VersionInfo/DalamudVersionInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Dalamud.Plugin.VersionInfo; - -/// -internal class DalamudVersionInfo(Version version, string? track, string? gitHash, string? gitHashClientStructs, string? scmVersion) : IDalamudVersionInfo -{ - /// - public Version Version { get; } = version; - - /// - public string? BetaTrack { get; } = track; - - /// - public string? GitHash { get; } = gitHash; - - /// - public string? GitHashClientStructs { get; } = gitHashClientStructs; - - /// - public string? ScmVersion { get; } = scmVersion; -} diff --git a/Dalamud/Plugin/VersionInfo/IDalamudVersionInfo.cs b/Dalamud/Plugin/VersionInfo/IDalamudVersionInfo.cs deleted file mode 100644 index 6297ce196..000000000 --- a/Dalamud/Plugin/VersionInfo/IDalamudVersionInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace Dalamud.Plugin.VersionInfo; - -/// -/// Interface exposing various information related to Dalamud versioning. -/// -public interface IDalamudVersionInfo -{ - /// - /// Gets the Dalamud version. - /// - Version Version { get; } - - /// - /// Gets the currently used beta track. - /// Please don't tell users to switch branches. They have it bad enough, fix your things instead. - /// Null if this build wasn't launched from XIVLauncher. - /// - string? BetaTrack { get; } - - /// - /// Gets the git commit hash value from the assembly or null if it cannot be found. Will be null for Debug builds, - /// and will be suffixed with `-dirty` if in release with pending changes. - /// - string? GitHash { get; } - - /// - /// Gets the git hash value from the assembly or null if it cannot be found. - /// - string? GitHashClientStructs { get; } - - /// - /// Gets the SCM Version from the assembly, or null if it cannot be found. The value returned will generally be - /// the git describe output for this build, which will be a raw version if this is a stable build or an - /// appropriately-annotated version if this is *not* stable. Local builds will return a `Local Build` text string. - /// - string? ScmVersion { get; } -} diff --git a/Dalamud/SafeMemory.cs b/Dalamud/SafeMemory.cs index ca0c8ff92..a8ac40a5d 100644 --- a/Dalamud/SafeMemory.cs +++ b/Dalamud/SafeMemory.cs @@ -1,8 +1,6 @@ using System.Runtime.InteropServices; using System.Text; -using Windows.Win32.Foundation; - namespace Dalamud; /// @@ -14,11 +12,11 @@ namespace Dalamud; /// public static class SafeMemory { - private static readonly HANDLE Handle; + private static readonly SafeHandle Handle; static SafeMemory() { - Handle = Windows.Win32.PInvoke.GetCurrentProcess(); + Handle = Windows.Win32.PInvoke.GetCurrentProcess_SafeHandle(); } /// @@ -30,12 +28,6 @@ public static class SafeMemory /// Whether the read succeeded. public static unsafe bool ReadBytes(IntPtr address, int count, out byte[] buffer) { - if (Handle.IsNull) - { - buffer = []; - return false; - } - buffer = new byte[count <= 0 ? 0 : count]; fixed (byte* p = buffer) { @@ -62,9 +54,6 @@ public static class SafeMemory /// Whether the write succeeded. public static unsafe bool WriteBytes(IntPtr address, byte[] buffer) { - if (Handle.IsNull) - return false; - if (buffer.Length == 0) return true; diff --git a/Dalamud/Service/LoadingDialog.cs b/Dalamud/Service/LoadingDialog.cs index ea45d3bb2..424087743 100644 --- a/Dalamud/Service/LoadingDialog.cs +++ b/Dalamud/Service/LoadingDialog.cs @@ -1,4 +1,4 @@ -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Drawing; @@ -294,18 +294,18 @@ internal sealed class LoadingDialog ? null : Icon.ExtractAssociatedIcon(Path.Combine(workingDirectory, "Dalamud.Injector.exe")); - fixed (char* pszEmpty = "-") - fixed (char* pszWindowTitle = "Dalamud") - fixed (char* pszDalamudBoot = "Dalamud.Boot.dll") - fixed (char* pszThemesManifestResourceName = "RT_MANIFEST_THEMES") - fixed (char* pszHide = Loc.Localize("LoadingDialogHide", "Hide")) - fixed (char* pszShowLatestLogs = Loc.Localize("LoadingDialogShowLatestLogs", "Show Latest Logs")) - fixed (char* pszHideLatestLogs = Loc.Localize("LoadingDialogHideLatestLogs", "Hide Latest Logs")) + fixed (void* pszEmpty = "-") + fixed (void* pszWindowTitle = "Dalamud") + fixed (void* pszDalamudBoot = "Dalamud.Boot.dll") + fixed (void* pszThemesManifestResourceName = "RT_MANIFEST_THEMES") + fixed (void* pszHide = Loc.Localize("LoadingDialogHide", "Hide")) + fixed (void* pszShowLatestLogs = Loc.Localize("LoadingDialogShowLatestLogs", "Show Latest Logs")) + fixed (void* pszHideLatestLogs = Loc.Localize("LoadingDialogHideLatestLogs", "Hide Latest Logs")) { var taskDialogButton = new TASKDIALOG_BUTTON { nButtonID = IDOK, - pszButtonText = pszHide, + pszButtonText = (ushort*)pszHide, }; var taskDialogConfig = new TASKDIALOGCONFIG { @@ -318,8 +318,8 @@ internal sealed class LoadingDialog (int)TDF_CALLBACK_TIMER | (extractedIcon is null ? 0 : (int)TDF_USE_HICON_MAIN), dwCommonButtons = 0, - pszWindowTitle = pszWindowTitle, - pszMainIcon = extractedIcon is null ? TD.TD_INFORMATION_ICON : (char*)extractedIcon.Handle, + pszWindowTitle = (ushort*)pszWindowTitle, + pszMainIcon = extractedIcon is null ? TD.TD_INFORMATION_ICON : (ushort*)extractedIcon.Handle, pszMainInstruction = null, pszContent = null, cButtons = 1, @@ -329,9 +329,9 @@ internal sealed class LoadingDialog pRadioButtons = null, nDefaultRadioButton = 0, pszVerificationText = null, - pszExpandedInformation = pszEmpty, - pszExpandedControlText = pszShowLatestLogs, - pszCollapsedControlText = pszHideLatestLogs, + pszExpandedInformation = (ushort*)pszEmpty, + pszExpandedControlText = (ushort*)pszShowLatestLogs, + pszCollapsedControlText = (ushort*)pszHideLatestLogs, pszFooterIcon = null, pszFooter = null, pfCallback = &HResultFuncBinder, @@ -348,8 +348,8 @@ internal sealed class LoadingDialog { cbSize = (uint)sizeof(ACTCTXW), dwFlags = ACTCTX_FLAG_HMODULE_VALID | ACTCTX_FLAG_RESOURCE_NAME_VALID, - lpResourceName = pszThemesManifestResourceName, - hModule = GetModuleHandleW(pszDalamudBoot), + lpResourceName = (ushort*)pszThemesManifestResourceName, + hModule = GetModuleHandleW((ushort*)pszDalamudBoot), }; hActCtx = CreateActCtxW(&actctx); if (hActCtx == default) diff --git a/Dalamud/Storage/Assets/DalamudAssetPurpose.cs b/Dalamud/Storage/Assets/DalamudAssetPurpose.cs index 69de1f871..e6c7bd920 100644 --- a/Dalamud/Storage/Assets/DalamudAssetPurpose.cs +++ b/Dalamud/Storage/Assets/DalamudAssetPurpose.cs @@ -11,12 +11,12 @@ public enum DalamudAssetPurpose Empty = 0, /// - /// The asset is a .png file, and can be purposed as a . + /// The asset is a .png file, and can be purposed as a . /// TextureFromPng = 10, - + /// - /// The asset is a raw texture, and can be purposed as a . + /// The asset is a raw texture, and can be purposed as a . /// TextureFromRaw = 1001, diff --git a/Dalamud/Support/BugBait.cs b/Dalamud/Support/BugBait.cs index f0a98ca98..7ce96208c 100644 --- a/Dalamud/Support/BugBait.cs +++ b/Dalamud/Support/BugBait.cs @@ -37,7 +37,7 @@ internal static class BugBait Name = plugin.InternalName, Version = isTesting ? plugin.TestingAssemblyVersion?.ToString() : plugin.AssemblyVersion.ToString(), Platform = Util.GetHostPlatform().ToString(), - DalamudHash = Versioning.GetScmVersion(), + DalamudHash = Util.GetScmVersion(), }; if (includeException) diff --git a/Dalamud/Support/DalamudReleases.cs b/Dalamud/Support/DalamudReleases.cs index 949ebf94a..603c77487 100644 --- a/Dalamud/Support/DalamudReleases.cs +++ b/Dalamud/Support/DalamudReleases.cs @@ -38,7 +38,7 @@ internal class DalamudReleases : IServiceType /// The version info for the current track. public async Task GetVersionForCurrentTrack() { - var currentTrack = Versioning.GetActiveTrack(); + var currentTrack = Util.GetActiveTrack(); if (currentTrack.IsNullOrEmpty()) return null; diff --git a/Dalamud/Support/Troubleshooting.cs b/Dalamud/Support/Troubleshooting.cs index de529a29b..88048c462 100644 --- a/Dalamud/Support/Troubleshooting.cs +++ b/Dalamud/Support/Troubleshooting.cs @@ -69,11 +69,11 @@ public static class Troubleshooting LoadedPlugins = pluginManager?.InstalledPlugins?.Select(x => x.Manifest as LocalPluginManifest)?.OrderByDescending(x => x.InternalName).ToArray(), PluginStates = pluginManager?.InstalledPlugins?.Where(x => !x.IsDev).ToDictionary(x => x.Manifest.InternalName, x => x.IsBanned ? "Banned" : x.State.ToString()), EverStartedLoadingPlugins = pluginManager?.InstalledPlugins.Where(x => x.HasEverStartedLoad).Select(x => x.InternalName).ToList(), - DalamudVersion = Versioning.GetScmVersion(), - DalamudGitHash = Versioning.GetGitHash() ?? "Unknown", + DalamudVersion = Util.GetScmVersion(), + DalamudGitHash = Util.GetGitHash() ?? "Unknown", GameVersion = startInfo.GameVersion?.ToString() ?? "Unknown", Language = startInfo.Language.ToString(), - BetaKey = Versioning.GetActiveTrack(), + BetaKey = Util.GetActiveTrack(), DoPluginTest = configuration.DoPluginTest, LoadAllApiLevels = pluginManager?.LoadAllApiLevels == true, InterfaceLoaded = interfaceManager?.IsReady ?? false, diff --git a/Dalamud/Utility/Api15ToDoAttribute.cs b/Dalamud/Utility/Api13ToDoAttribute.cs similarity index 67% rename from Dalamud/Utility/Api15ToDoAttribute.cs rename to Dalamud/Utility/Api13ToDoAttribute.cs index 646c260e8..576401cda 100644 --- a/Dalamud/Utility/Api15ToDoAttribute.cs +++ b/Dalamud/Utility/Api13ToDoAttribute.cs @@ -2,10 +2,9 @@ namespace Dalamud.Utility; /// /// Utility class for marking something to be changed for API 13, for ease of lookup. -/// Intended to represent not the upcoming API, but the one after it for more major changes. /// [AttributeUsage(AttributeTargets.All, Inherited = false)] -internal sealed class Api15ToDoAttribute : Attribute +internal sealed class Api13ToDoAttribute : Attribute { /// /// Marks that this should be made internal. @@ -13,11 +12,11 @@ internal sealed class Api15ToDoAttribute : Attribute public const string MakeInternal = "Make internal."; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The explanation. /// The explanation 2. - public Api15ToDoAttribute(string what, string what2 = "") + public Api13ToDoAttribute(string what, string what2 = "") { _ = what; _ = what2; diff --git a/Dalamud/Utility/ClipboardFormats.cs b/Dalamud/Utility/ClipboardFormats.cs index b80e05dd3..07b6c00d6 100644 --- a/Dalamud/Utility/ClipboardFormats.cs +++ b/Dalamud/Utility/ClipboardFormats.cs @@ -30,8 +30,8 @@ internal static class ClipboardFormats private static unsafe uint ClipboardFormatFromName(ReadOnlySpan name) { uint cf; - fixed (char* p = name) - cf = RegisterClipboardFormatW(p); + fixed (void* p = name) + cf = RegisterClipboardFormatW((ushort*)p); if (cf != 0) return cf; throw Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()) ?? diff --git a/Dalamud/Utility/FilesystemUtil.cs b/Dalamud/Utility/FilesystemUtil.cs index f1b62ee21..3b4298b37 100644 --- a/Dalamud/Utility/FilesystemUtil.cs +++ b/Dalamud/Utility/FilesystemUtil.cs @@ -1,8 +1,7 @@ -using System.ComponentModel; +using System.ComponentModel; using System.IO; using System.Text; -using Windows.Win32.Foundation; using Windows.Win32.Storage.FileSystem; namespace Dalamud.Utility; @@ -48,39 +47,30 @@ public static class FilesystemUtil // Open the temp file var tempPath = path + ".tmp"; - var tempFile = Windows.Win32.PInvoke.CreateFile( + using var tempFile = Windows.Win32.PInvoke.CreateFile( tempPath, (uint)(FILE_ACCESS_RIGHTS.FILE_GENERIC_READ | FILE_ACCESS_RIGHTS.FILE_GENERIC_WRITE), FILE_SHARE_MODE.FILE_SHARE_NONE, null, FILE_CREATION_DISPOSITION.CREATE_ALWAYS, FILE_FLAGS_AND_ATTRIBUTES.FILE_ATTRIBUTE_NORMAL, - HANDLE.Null); + null); - if (tempFile.IsNull) + if (tempFile.IsInvalid) throw new Win32Exception(); // Write the data uint bytesWritten = 0; - fixed (byte* ptr = bytes) - { - if (!Windows.Win32.PInvoke.WriteFile(tempFile, ptr, (uint)bytes.Length, &bytesWritten, null)) - throw new Win32Exception(); - } + if (!Windows.Win32.PInvoke.WriteFile(tempFile, new ReadOnlySpan(bytes), &bytesWritten, null)) + throw new Win32Exception(); if (bytesWritten != bytes.Length) - { - Windows.Win32.PInvoke.CloseHandle(tempFile); throw new Exception($"Could not write all bytes to temp file ({bytesWritten} of {bytes.Length})"); - } if (!Windows.Win32.PInvoke.FlushFileBuffers(tempFile)) - { - Windows.Win32.PInvoke.CloseHandle(tempFile); throw new Win32Exception(); - } - Windows.Win32.PInvoke.CloseHandle(tempFile); + tempFile.Close(); if (!Windows.Win32.PInvoke.MoveFileEx(tempPath, path, MOVE_FILE_FLAGS.MOVEFILE_REPLACE_EXISTING | MOVE_FILE_FLAGS.MOVEFILE_WRITE_THROUGH)) throw new Win32Exception(); diff --git a/Dalamud/Utility/ItemUtil.cs b/Dalamud/Utility/ItemUtil.cs index 8ee465486..5f718bcee 100644 --- a/Dalamud/Utility/ItemUtil.cs +++ b/Dalamud/Utility/ItemUtil.cs @@ -3,8 +3,8 @@ using System.Runtime.CompilerServices; using Dalamud.Data; using Dalamud.Game; using Dalamud.Game.Text; - using Lumina.Excel.Sheets; +using Lumina.Text; using Lumina.Text.ReadOnly; namespace Dalamud.Utility; @@ -125,15 +125,10 @@ public static class ItemUtil if (IsEventItem(itemId)) { - // Only English, German, and French have a Name field. - // For other languages, the Name is an empty string, and the Singular field should be used instead. - language ??= dataManager.Language; - var useSingular = language is not (ClientLanguage.English or ClientLanguage.German or ClientLanguage.French); - return dataManager .GetExcelSheet(language) .TryGetRow(itemId, out var eventItem) - ? (useSingular ? eventItem.Singular : eventItem.Name) + ? eventItem.Name : default; } @@ -149,21 +144,23 @@ public static class ItemUtil if (!includeIcon || kind is not (ItemKind.Hq or ItemKind.Collectible)) return item.Name; - using var rssb = new RentedSeStringBuilder(); + var builder = SeStringBuilder.SharedPool.Get(); - rssb.Builder.Append(item.Name); + builder.Append(item.Name); switch (kind) { case ItemKind.Hq: - rssb.Builder.Append($" {(char)SeIconChar.HighQuality}"); + builder.Append($" {(char)SeIconChar.HighQuality}"); break; case ItemKind.Collectible: - rssb.Builder.Append($" {(char)SeIconChar.Collectible}"); + builder.Append($" {(char)SeIconChar.Collectible}"); break; } - return rssb.Builder.ToReadOnlySeString(); + var itemName = builder.ToReadOnlySeString(); + SeStringBuilder.SharedPool.Return(builder); + return itemName; } /// diff --git a/Dalamud/Utility/SeStringExtensions.cs b/Dalamud/Utility/SeStringExtensions.cs index 9de116f26..cd095c467 100644 --- a/Dalamud/Utility/SeStringExtensions.cs +++ b/Dalamud/Utility/SeStringExtensions.cs @@ -1,3 +1,7 @@ +using System.Linq; + +using InteropGenerator.Runtime; + using Lumina.Text.Parse; using Lumina.Text.ReadOnly; @@ -45,9 +49,11 @@ public static class SeStringExtensions /// this for method chaining. public static DSeStringBuilder AppendMacroString(this DSeStringBuilder ssb, ReadOnlySpan macroString) { - using var rssb = new RentedSeStringBuilder(); - rssb.Builder.AppendMacroString(macroString, new() { ExceptionMode = MacroStringParseExceptionMode.EmbedError }); - return ssb.Append(DSeString.Parse(rssb.Builder.ToReadOnlySeString().Data.Span)); + var lssb = LSeStringBuilder.SharedPool.Get(); + lssb.AppendMacroString(macroString, new() { ExceptionMode = MacroStringParseExceptionMode.EmbedError }); + ssb.Append(DSeString.Parse(lssb.ToReadOnlySeString().Data.Span)); + LSeStringBuilder.SharedPool.Return(lssb); + return ssb; } /// Compiles and appends a macro string. @@ -56,9 +62,11 @@ public static class SeStringExtensions /// this for method chaining. public static DSeStringBuilder AppendMacroString(this DSeStringBuilder ssb, ReadOnlySpan macroString) { - using var rssb = new RentedSeStringBuilder(); - rssb.Builder.AppendMacroString(macroString, new() { ExceptionMode = MacroStringParseExceptionMode.EmbedError }); - return ssb.Append(DSeString.Parse(rssb.Builder.ToReadOnlySeString().Data.Span)); + var lssb = LSeStringBuilder.SharedPool.Get(); + lssb.AppendMacroString(macroString, new() { ExceptionMode = MacroStringParseExceptionMode.EmbedError }); + ssb.Append(DSeString.Parse(lssb.ToReadOnlySeString().Data.Span)); + LSeStringBuilder.SharedPool.Return(lssb); + return ssb; } /// @@ -155,7 +163,7 @@ public static class SeStringExtensions if (ross.IsEmpty) return ross; - using var rssb = new RentedSeStringBuilder(); + var sb = LSeStringBuilder.SharedPool.Get(); foreach (var payload in ross) { @@ -164,25 +172,25 @@ public static class SeStringExtensions if (payload.Type != ReadOnlySePayloadType.Text) { - rssb.Builder.Append(payload); + sb.Append(payload); continue; } var index = payload.Body.Span.IndexOf(toFind); if (index == -1) { - rssb.Builder.Append(payload); + sb.Append(payload); continue; } var lastIndex = 0; while (index != -1) { - rssb.Builder.Append(payload.Body.Span[lastIndex..index]); + sb.Append(payload.Body.Span[lastIndex..index]); if (!replacement.IsEmpty) { - rssb.Builder.Append(replacement); + sb.Append(replacement); } lastIndex = index + toFind.Length; @@ -192,10 +200,12 @@ public static class SeStringExtensions index += lastIndex; } - rssb.Builder.Append(payload.Body.Span[lastIndex..]); + sb.Append(payload.Body.Span[lastIndex..]); } - return rssb.Builder.ToReadOnlySeString(); + var output = sb.ToReadOnlySeString(); + LSeStringBuilder.SharedPool.Return(sb); + return output; } /// diff --git a/Dalamud/Utility/TerraFxCom/ManagedIStream.cs b/Dalamud/Utility/TerraFxCom/ManagedIStream.cs index eb1997daf..caec65da2 100644 --- a/Dalamud/Utility/TerraFxCom/ManagedIStream.cs +++ b/Dalamud/Utility/TerraFxCom/ManagedIStream.cs @@ -57,60 +57,60 @@ internal sealed unsafe class ManagedIStream : IStream.Interface, IRefCountable static ManagedIStream? ToManagedObject(void* pThis) => GCHandle.FromIntPtr(((nint*)pThis)[1]).Target as ManagedIStream; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int QueryInterfaceStatic(IStream* pThis, Guid* riid, void** ppvObject) => ToManagedObject(pThis)?.QueryInterface(riid, ppvObject) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static uint AddRefStatic(IStream* pThis) => (uint)(ToManagedObject(pThis)?.AddRef() ?? 0); - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static uint ReleaseStatic(IStream* pThis) => (uint)(ToManagedObject(pThis)?.Release() ?? 0); - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int ReadStatic(IStream* pThis, void* pv, uint cb, uint* pcbRead) => ToManagedObject(pThis)?.Read(pv, cb, pcbRead) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int WriteStatic(IStream* pThis, void* pv, uint cb, uint* pcbWritten) => ToManagedObject(pThis)?.Write(pv, cb, pcbWritten) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int SeekStatic( IStream* pThis, LARGE_INTEGER dlibMove, uint dwOrigin, ULARGE_INTEGER* plibNewPosition) => ToManagedObject(pThis)?.Seek(dlibMove, dwOrigin, plibNewPosition) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int SetSizeStatic(IStream* pThis, ULARGE_INTEGER libNewSize) => ToManagedObject(pThis)?.SetSize(libNewSize) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int CopyToStatic( IStream* pThis, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) => ToManagedObject(pThis)?.CopyTo(pstm, cb, pcbRead, pcbWritten) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int CommitStatic(IStream* pThis, uint grfCommitFlags) => ToManagedObject(pThis)?.Commit(grfCommitFlags) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int RevertStatic(IStream* pThis) => ToManagedObject(pThis)?.Revert() ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int LockRegionStatic(IStream* pThis, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, uint dwLockType) => ToManagedObject(pThis)?.LockRegion(libOffset, cb, dwLockType) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int UnlockRegionStatic( IStream* pThis, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, uint dwLockType) => ToManagedObject(pThis)?.UnlockRegion(libOffset, cb, dwLockType) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int StatStatic(IStream* pThis, STATSTG* pstatstg, uint grfStatFlag) => ToManagedObject(pThis)?.Stat(pstatstg, grfStatFlag) ?? E.E_UNEXPECTED; - [UnmanagedCallersOnly(CallConvs = [typeof(CallConvMemberFunction)])] + [UnmanagedCallersOnly] static int CloneStatic(IStream* pThis, IStream** ppstm) => ToManagedObject(pThis)?.Clone(ppstm) ?? E.E_UNEXPECTED; } diff --git a/Dalamud/Utility/TerraFxCom/TerraFxComInterfaceExtensions.cs b/Dalamud/Utility/TerraFxCom/TerraFxComInterfaceExtensions.cs index ec108403e..f9252839f 100644 --- a/Dalamud/Utility/TerraFxCom/TerraFxComInterfaceExtensions.cs +++ b/Dalamud/Utility/TerraFxCom/TerraFxComInterfaceExtensions.cs @@ -88,7 +88,7 @@ internal static unsafe partial class TerraFxComInterfaceExtensions fixed (char* pPath = path) { SHCreateStreamOnFileEx( - pPath, + (ushort*)pPath, grfMode, (uint)attributes, fCreate, @@ -115,7 +115,7 @@ internal static unsafe partial class TerraFxComInterfaceExtensions { fixed (char* pName = name) { - var option = new PROPBAG2 { pstrName = pName }; + var option = new PROPBAG2 { pstrName = (ushort*)pName }; return obj.Write(1, &option, &varValue); } } @@ -145,7 +145,7 @@ internal static unsafe partial class TerraFxComInterfaceExtensions try { fixed (char* pName = name) - return obj.SetMetadataByName(pName, &propVarValue); + return obj.SetMetadataByName((ushort*)pName, &propVarValue); } finally { @@ -165,7 +165,7 @@ internal static unsafe partial class TerraFxComInterfaceExtensions public static HRESULT RemoveMetadataByName(ref this IWICMetadataQueryWriter obj, string name) { fixed (char* pName = name) - return obj.RemoveMetadataByName(pName); + return obj.RemoveMetadataByName((ushort*)pName); } [LibraryImport("propsys.dll")] diff --git a/Dalamud/Utility/Util.cs b/Dalamud/Utility/Util.cs index 0ea5bbcbf..19610ef64 100644 --- a/Dalamud/Utility/Util.cs +++ b/Dalamud/Utility/Util.cs @@ -68,10 +68,106 @@ public static partial class Util ]; private static readonly Type GenericSpanType = typeof(Span<>); + private static string? scmVersionInternal; + private static string? gitHashInternal; + private static string? gitHashClientStructsInternal; + private static string? branchInternal; private static ulong moduleStartAddr; private static ulong moduleEndAddr; + /// + /// Gets the Dalamud version. + /// + [Api13ToDo("Remove. Make both versions here internal. Add an API somewhere.")] + public static string AssemblyVersion { get; } = + Assembly.GetAssembly(typeof(ChatHandlers))!.GetName().Version!.ToString(); + + /// + /// Gets the Dalamud version. + /// + internal static Version AssemblyVersionParsed { get; } = + Assembly.GetAssembly(typeof(ChatHandlers))!.GetName().Version!; + + /// + /// Gets the SCM Version from the assembly, or null if it cannot be found. This method will generally return + /// the git describe output for this build, which will be a raw version if this is a stable build or an + /// appropriately-annotated version if this is *not* stable. Local builds will return a `Local Build` text string. + /// + /// The SCM version of the assembly. + public static string GetScmVersion() + { + if (scmVersionInternal != null) return scmVersionInternal; + + var asm = typeof(Util).Assembly; + var attrs = asm.GetCustomAttributes(); + + return scmVersionInternal = attrs.First(a => a.Key == "SCMVersion").Value + ?? asm.GetName().Version!.ToString(); + } + + /// + /// Gets the git commit hash value from the assembly or null if it cannot be found. Will be null for Debug builds, + /// and will be suffixed with `-dirty` if in release with pending changes. + /// + /// The git hash of the assembly. + public static string? GetGitHash() + { + if (gitHashInternal != null) + return gitHashInternal; + + var asm = typeof(Util).Assembly; + var attrs = asm.GetCustomAttributes(); + + return gitHashInternal = attrs.FirstOrDefault(a => a.Key == "GitHash")?.Value ?? "N/A"; + } + + /// + /// Gets the git hash value from the assembly or null if it cannot be found. + /// + /// The git hash of the assembly. + public static string? GetGitHashClientStructs() + { + if (gitHashClientStructsInternal != null) + return gitHashClientStructsInternal; + + var asm = typeof(Util).Assembly; + var attrs = asm.GetCustomAttributes(); + + gitHashClientStructsInternal = attrs.First(a => a.Key == "GitHashClientStructs").Value; + + return gitHashClientStructsInternal; + } + + /// + /// Gets the Git branch name this version of Dalamud was built from, or null, if this is a Debug build. + /// + /// The branch name. + public static string? GetGitBranch() + { + if (branchInternal != null) + return branchInternal; + + var asm = typeof(Util).Assembly; + var attrs = asm.GetCustomAttributes(); + + var gitBranch = attrs.FirstOrDefault(a => a.Key == "GitBranch")?.Value; + if (gitBranch == null) + return null; + + return branchInternal = gitBranch; + } + + /// + /// Gets the active Dalamud track, if this instance was launched through XIVLauncher and used a version + /// downloaded from webservices. + /// + /// The name of the track, or null. + internal static string? GetActiveTrack() + { + return Environment.GetEnvironmentVariable("DALAMUD_BRANCH"); + } + /// public static unsafe string DescribeAddress(void* p) => DescribeAddress((nint)p); @@ -762,7 +858,7 @@ public static partial class Util var sizeWithTerminators = pathBytesSize + (pathBytes.Length * 2); var dropFilesSize = sizeof(DROPFILES); - var hGlobal = Win32_PInvoke.GlobalAlloc( + var hGlobal = Win32_PInvoke.GlobalAlloc_SafeHandle( GLOBAL_ALLOC_FLAGS.GHND, // struct size + size of encoded strings + null terminator for each // string + two null terminators for end of list @@ -800,11 +896,12 @@ public static partial class Util { Win32_PInvoke.SetClipboardData( (uint)CLIPBOARD_FORMAT.CF_HDROP, - (Windows.Win32.Foundation.HANDLE)hGlobal.Value); + hGlobal); Win32_PInvoke.CloseClipboard(); return true; } + hGlobal.Dispose(); return false; } diff --git a/Dalamud/Utility/VectorExtensions.cs b/Dalamud/Utility/VectorExtensions.cs new file mode 100644 index 000000000..f617c8420 --- /dev/null +++ b/Dalamud/Utility/VectorExtensions.cs @@ -0,0 +1,51 @@ +using System.Numerics; + +namespace Dalamud.Utility; + +/// +/// Extension methods for System.Numerics.VectorN and SharpDX.VectorN. +/// +public static class VectorExtensions +{ + /// + /// Converts a SharpDX vector to System.Numerics. + /// + /// Vector to convert. + /// A converted vector. + public static Vector2 ToSystem(this SharpDX.Vector2 vec) => new(x: vec.X, y: vec.Y); + + /// + /// Converts a SharpDX vector to System.Numerics. + /// + /// Vector to convert. + /// A converted vector. + public static Vector3 ToSystem(this SharpDX.Vector3 vec) => new(x: vec.X, y: vec.Y, z: vec.Z); + + /// + /// Converts a SharpDX vector to System.Numerics. + /// + /// Vector to convert. + /// A converted vector. + public static Vector4 ToSystem(this SharpDX.Vector4 vec) => new(x: vec.X, y: vec.Y, z: vec.Z, w: vec.W); + + /// + /// Converts a System.Numerics vector to SharpDX. + /// + /// Vector to convert. + /// A converted vector. + public static SharpDX.Vector2 ToSharpDX(this Vector2 vec) => new(x: vec.X, y: vec.Y); + + /// + /// Converts a System.Numerics vector to SharpDX. + /// + /// Vector to convert. + /// A converted vector. + public static SharpDX.Vector3 ToSharpDX(this Vector3 vec) => new(x: vec.X, y: vec.Y, z: vec.Z); + + /// + /// Converts a System.Numerics vector to SharpDX. + /// + /// Vector to convert. + /// A converted vector. + public static SharpDX.Vector4 ToSharpDX(this Vector4 vec) => new(x: vec.X, y: vec.Y, z: vec.Z, w: vec.W); +} diff --git a/Dalamud/Utility/Versioning.cs b/Dalamud/Utility/Versioning.cs deleted file mode 100644 index d3b30b834..000000000 --- a/Dalamud/Utility/Versioning.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System.Linq; -using System.Reflection; - -namespace Dalamud.Utility; - -/// -/// Helpers to access Dalamud versioning information. -/// -internal static class Versioning -{ - private static string? scmVersionInternal; - private static string? gitHashInternal; - private static string? gitHashClientStructsInternal; - private static string? branchInternal; - - /// - /// Gets the Dalamud version. - /// - /// The raw Dalamud assembly version. - internal static string GetAssemblyVersion() => - Assembly.GetAssembly(typeof(Versioning))!.GetName().Version!.ToString(); - - /// - /// Gets the Dalamud version. - /// - /// The parsed Dalamud assembly version. - internal static Version GetAssemblyVersionParsed() => - Assembly.GetAssembly(typeof(Versioning))!.GetName().Version!; - - /// - /// Gets the SCM Version from the assembly, or null if it cannot be found. This method will generally return - /// the git describe output for this build, which will be a raw version if this is a stable build or an - /// appropriately-annotated version if this is *not* stable. Local builds will return a `Local Build` text string. - /// - /// The SCM version of the assembly. - internal static string GetScmVersion() - { - if (scmVersionInternal != null) return scmVersionInternal; - - var asm = typeof(Util).Assembly; - var attrs = asm.GetCustomAttributes(); - - return scmVersionInternal = attrs.First(a => a.Key == "SCMVersion").Value - ?? asm.GetName().Version!.ToString(); - } - - /// - /// Gets the git commit hash value from the assembly or null if it cannot be found. Will be null for Debug builds, - /// and will be suffixed with `-dirty` if in release with pending changes. - /// - /// The git hash of the assembly. - internal static string? GetGitHash() - { - if (gitHashInternal != null) - return gitHashInternal; - - var asm = typeof(Util).Assembly; - var attrs = asm.GetCustomAttributes(); - - return gitHashInternal = attrs.FirstOrDefault(a => a.Key == "GitHash")?.Value ?? "N/A"; - } - - /// - /// Gets the git hash value from the assembly or null if it cannot be found. - /// - /// The git hash of the assembly. - internal static string? GetGitHashClientStructs() - { - if (gitHashClientStructsInternal != null) - return gitHashClientStructsInternal; - - var asm = typeof(Util).Assembly; - var attrs = asm.GetCustomAttributes(); - - gitHashClientStructsInternal = attrs.First(a => a.Key == "GitHashClientStructs").Value; - - return gitHashClientStructsInternal; - } - - /// - /// Gets the Git branch name this version of Dalamud was built from, or null, if this is a Debug build. - /// - /// The branch name. - internal static string? GetGitBranch() - { - if (branchInternal != null) - return branchInternal; - - var asm = typeof(Util).Assembly; - var attrs = asm.GetCustomAttributes(); - - var gitBranch = attrs.FirstOrDefault(a => a.Key == "GitBranch")?.Value; - if (gitBranch == null) - return null; - - return branchInternal = gitBranch; - } - - /// - /// Gets the active Dalamud track, if this instance was launched through XIVLauncher and used a version - /// downloaded from webservices. - /// - /// The name of the track, or null. - internal static string? GetActiveTrack() - { - return Environment.GetEnvironmentVariable("DALAMUD_BRANCH"); - } -} diff --git a/Directory.Build.props b/Directory.Build.props index 8a8df22d7..f9f061c17 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,12 +2,10 @@ - net10.0-windows + net9.0-windows x64 x64 - - - preview + 13.0 diff --git a/Directory.Packages.props b/Directory.Packages.props index 18760037b..a1cef517e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,61 +1,65 @@ - - true - false - + + true + false + - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + + + - - - - - + + + + + - - - - + + + - - + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/build/DalamudBuild.cs b/build/DalamudBuild.cs index 1a189f2c7..d374c79f8 100644 --- a/build/DalamudBuild.cs +++ b/build/DalamudBuild.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using Nuke.Common; using Nuke.Common.Execution; using Nuke.Common.Git; @@ -41,7 +42,10 @@ public class DalamudBuild : NukeBuild AbsolutePath InjectorProjectDir => RootDirectory / "Dalamud.Injector"; AbsolutePath InjectorProjectFile => InjectorProjectDir / "Dalamud.Injector.csproj"; - + + AbsolutePath InjectorBootProjectDir => RootDirectory / "Dalamud.Injector.Boot"; + AbsolutePath InjectorBootProjectFile => InjectorBootProjectDir / "Dalamud.Injector.Boot.vcxproj"; + AbsolutePath TestProjectDir => RootDirectory / "Dalamud.Test"; AbsolutePath TestProjectFile => TestProjectDir / "Dalamud.Test.csproj"; @@ -127,7 +131,7 @@ public class DalamudBuild : NukeBuild if (IsCIBuild) { s = s - .SetProcessAdditionalArguments("/clp:NoSummary"); // Disable MSBuild summary on CI builds + .SetProcessArgumentConfigurator(a => a.Add("/clp:NoSummary")); // Disable MSBuild summary on CI builds } // We need to emit compiler generated files for the docs build, since docfx can't run generators directly // TODO: This fails every build after this because of redefinitions... @@ -168,6 +172,14 @@ public class DalamudBuild : NukeBuild .EnableNoRestore()); }); + Target CompileInjectorBoot => _ => _ + .Executes(() => + { + MSBuildTasks.MSBuild(s => s + .SetTargetPath(InjectorBootProjectFile) + .SetConfiguration(Configuration)); + }); + Target SetCILogging => _ => _ .DependentFor(Compile) .OnlyWhenStatic(() => IsCIBuild) @@ -184,6 +196,7 @@ public class DalamudBuild : NukeBuild .DependsOn(CompileDalamudBoot) .DependsOn(CompileDalamudCrashHandler) .DependsOn(CompileInjector) + .DependsOn(CompileInjectorBoot) ; Target CI => _ => _ @@ -237,6 +250,12 @@ public class DalamudBuild : NukeBuild .SetProject(InjectorProjectFile) .SetConfiguration(Configuration)); - ArtifactsDirectory.CreateOrCleanDirectory(); + MSBuildTasks.MSBuild(s => s + .SetProjectFile(InjectorBootProjectFile) + .SetConfiguration(Configuration) + .SetTargets("Clean")); + + FileSystemTasks.DeleteDirectory(ArtifactsDirectory); + Directory.CreateDirectory(ArtifactsDirectory); }); } diff --git a/build/build.csproj b/build/build.csproj index 7096c7f8a..b4aaa959d 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -11,8 +11,7 @@ false - - - + + diff --git a/docfx.json b/docfx.json index cf7a80194..30c85957c 100644 --- a/docfx.json +++ b/docfx.json @@ -4,17 +4,18 @@ "src": [ { "files": [ - "bin/Release/Dalamud.dll" + "Dalamud.Interface/Dalamud.Interface.csproj", + "Dalamud/Dalamud.csproj", + "lib/ImGuiScene/ImGuiScene/ImGuiScene.csproj", + "lib/ImGuiScene/deps/ImGui.NET/src/ImGui.NET-472/ImGui.NET-472.csproj", + "lib/ImGuiScene/deps/SDL2-CS/SDL2-CS.csproj" ] } ], "dest": "api", "disableGitFeatures": false, "disableDefaultFilter": false, - "filter": "filterConfig.yml", - "properties": { - "TargetFramework": "net10.0-windows" - } + "filter": "filterConfig.yml" } ], "build": { diff --git a/global.json b/global.json index 93dd0dd1f..ab1a4a2ec 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "10.0.0", + "version": "9.0.0", "rollForward": "latestMinor", "allowPrerelease": true } -} \ No newline at end of file +} diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs index 3cf20bb30..665fa434f 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.DragScalar.cs @@ -238,7 +238,7 @@ public static unsafe partial class ImGui ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref v)), + MemoryMarshal.Cast(new(ref v)), vSpeed, vMin, vMax, @@ -251,7 +251,7 @@ public static unsafe partial class ImGui ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref v)), + MemoryMarshal.Cast(new(ref v)), vSpeed, vMin, vMax, @@ -264,7 +264,7 @@ public static unsafe partial class ImGui ImGuiSliderFlags flags = ImGuiSliderFlags.None) => DragScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref v)), + MemoryMarshal.Cast(new(ref v)), vSpeed, vMin, vMax, diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs index 5881ac462..fb86096ff 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.InputScalar.cs @@ -205,7 +205,7 @@ public static unsafe partial class ImGui InputScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref data)), + MemoryMarshal.Cast(new(ref data)), step, stepFast, format.MoveOrDefault("%.3f"u8), @@ -219,7 +219,7 @@ public static unsafe partial class ImGui InputScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref data)), + MemoryMarshal.Cast(new(ref data)), step, stepFast, format.MoveOrDefault("%.3f"u8), @@ -233,7 +233,7 @@ public static unsafe partial class ImGui InputScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref data)), + MemoryMarshal.Cast(new(ref data)), step, stepFast, format.MoveOrDefault("%.3f"u8), diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs index e455e0778..89b3cc3d6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.Manual.cs @@ -127,14 +127,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -146,14 +140,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -165,14 +153,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback, ref context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -184,14 +166,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback, in context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -311,14 +287,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -330,14 +300,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -350,14 +314,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback, ref context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -370,14 +328,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback, in context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -436,14 +388,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -455,14 +401,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -474,14 +414,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback, ref context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -493,14 +427,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback, in context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -549,14 +477,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -568,14 +490,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -587,14 +503,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback, ref context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -606,14 +516,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback, in context); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } @@ -637,14 +541,8 @@ public unsafe partial class ImGui var t = new ImU8String(buf); t.Reserve(maxLength + 1); var r = TempInputText(bb, id, label, t.Buffer[..(maxLength + 1)], flags); - - var e = (flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0; - if (r | e) - { - var i = t.Buffer.IndexOf((byte)0); - buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); - } - + var i = t.Buffer.IndexOf((byte)0); + buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]); t.Recycle(); return r; } diff --git a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs index b0c4b7c79..20ee78ab6 100644 --- a/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs +++ b/imgui/Dalamud.Bindings.ImGui/Custom/ImGui.SliderScalar.cs @@ -210,7 +210,7 @@ public static unsafe partial class ImGui ImU8String format = default, ImGuiSliderFlags flags = ImGuiSliderFlags.None) => SliderScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref v)), + MemoryMarshal.Cast(new(ref v)), vMin, vMax, format.MoveOrDefault("%.3f"u8), @@ -222,7 +222,7 @@ public static unsafe partial class ImGui SliderScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref v)), + MemoryMarshal.Cast(new(ref v)), vMin, vMax, format.MoveOrDefault("%.3f"u8), @@ -236,7 +236,7 @@ public static unsafe partial class ImGui SliderScalar( label, ImGuiDataType.Float, - MemoryMarshal.Cast(new Span(ref v)), + MemoryMarshal.Cast(new(ref v)), vMin, vMax, format.MoveOrDefault("%.3f"u8), diff --git a/imgui/Dalamud.Bindings.ImGui/ImU8String.cs b/imgui/Dalamud.Bindings.ImGui/ImU8String.cs index f2b635764..a62152c39 100644 --- a/imgui/Dalamud.Bindings.ImGui/ImU8String.cs +++ b/imgui/Dalamud.Bindings.ImGui/ImU8String.cs @@ -156,7 +156,7 @@ public ref struct ImU8String return this.rentedBuffer is { } buf ? buf.AsSpan() - : MemoryMarshal.Cast(new Span(ref Unsafe.AsRef(ref this.fixedBuffer))); + : MemoryMarshal.Cast(new(ref Unsafe.AsRef(ref this.fixedBuffer))); } } @@ -165,7 +165,7 @@ public ref struct ImU8String private ref byte FixedBufferByteRef => ref this.FixedBufferSpan[0]; private Span FixedBufferSpan => - MemoryMarshal.Cast(new Span(ref Unsafe.AsRef(ref this.fixedBuffer))); + MemoryMarshal.Cast(new(ref Unsafe.AsRef(ref this.fixedBuffer))); public static implicit operator ImU8String(ReadOnlySpan text) => new(text); public static implicit operator ImU8String(ReadOnlyMemory text) => new(text); diff --git a/imgui/StandaloneImGuiTestbed/StandaloneImGuiTestbed.csproj b/imgui/StandaloneImGuiTestbed/StandaloneImGuiTestbed.csproj index da31c9a8e..d56faa31e 100644 --- a/imgui/StandaloneImGuiTestbed/StandaloneImGuiTestbed.csproj +++ b/imgui/StandaloneImGuiTestbed/StandaloneImGuiTestbed.csproj @@ -26,7 +26,6 @@ - diff --git a/lib/FFXIVClientStructs b/lib/FFXIVClientStructs index 9c5f93cf3..6f339d8f7 160000 --- a/lib/FFXIVClientStructs +++ b/lib/FFXIVClientStructs @@ -1 +1 @@ -Subproject commit 9c5f93cf3ac57236656cd2323b93cd258ea84a88 +Subproject commit 6f339d8f725fa6922449f7e5c584ca6b8fa2fb19 diff --git a/lib/Lumina.Excel b/lib/Lumina.Excel index d6ff8cf46..5d01489c3 160000 --- a/lib/Lumina.Excel +++ b/lib/Lumina.Excel @@ -1 +1 @@ -Subproject commit d6ff8cf46c7e341989843c28c7550f8d50bee851 +Subproject commit 5d01489c34f33a3d645f49085d7fc0065a1ac801 diff --git a/targets/Dalamud.Plugin.Bootstrap.targets b/targets/Dalamud.Plugin.Bootstrap.targets new file mode 100644 index 000000000..db4bf6cd7 --- /dev/null +++ b/targets/Dalamud.Plugin.Bootstrap.targets @@ -0,0 +1,11 @@ + + + + $(appdata)\XIVLauncher\addon\Hooks\dev\ + $(HOME)/.xlcore/dalamud/Hooks/dev/ + $(HOME)/Library/Application Support/XIV on Mac/dalamud/Hooks/dev/ + $(DALAMUD_HOME)/ + + + + diff --git a/targets/Dalamud.Plugin.targets b/targets/Dalamud.Plugin.targets new file mode 100644 index 000000000..08d19735e --- /dev/null +++ b/targets/Dalamud.Plugin.targets @@ -0,0 +1,35 @@ + + + + net8.0-windows + x64 + enable + latest + true + false + false + true + true + $(AssemblySearchPaths);$(DalamudLibPath) + + + + + + + + + + + + + + + + + + + + + +