diff --git a/Dalamud.CorePlugin/PluginImpl.cs b/Dalamud.CorePlugin/PluginImpl.cs
index 7c9adc6a8..52f54d140 100644
--- a/Dalamud.CorePlugin/PluginImpl.cs
+++ b/Dalamud.CorePlugin/PluginImpl.cs
@@ -2,7 +2,6 @@ using System;
using System.IO;
using Dalamud.Configuration.Internal;
-using Dalamud.Game;
using Dalamud.Game.Command;
using Dalamud.Interface.Windowing;
using Dalamud.Plugin;
diff --git a/Dalamud/ClientLanguage.cs b/Dalamud/ClientLanguage.cs
index 8f2c52456..1bf1c884a 100644
--- a/Dalamud/ClientLanguage.cs
+++ b/Dalamud/ClientLanguage.cs
@@ -1,10 +1,11 @@
-namespace Dalamud;
+using Dalamud.Utility;
-// TODO(v10): Delete this, and use Dalamud.Common.ClientLanguage instead for everything.
+namespace Dalamud;
///
/// Enum describing the language the game loads in.
///
+[Api10ToDo("Delete this, and use Dalamud.Common.ClientLanguage instead for everything.")]
public enum ClientLanguage
{
///
diff --git a/Dalamud/ClientLanguageExtensions.cs b/Dalamud/ClientLanguageExtensions.cs
index e19ca1eb1..40ff65867 100644
--- a/Dalamud/ClientLanguageExtensions.cs
+++ b/Dalamud/ClientLanguageExtensions.cs
@@ -1,10 +1,11 @@
-using System;
+using Dalamud.Utility;
namespace Dalamud;
///
/// Extension methods for the class.
///
+[Api10ToDo("Delete this, and use Dalamud.Common.ClientLanguage instead for everything.")]
public static class ClientLanguageExtensions
{
///
diff --git a/Dalamud/Configuration/Internal/DalamudConfiguration.cs b/Dalamud/Configuration/Internal/DalamudConfiguration.cs
index 9159f042c..a1c6efe9b 100644
--- a/Dalamud/Configuration/Internal/DalamudConfiguration.cs
+++ b/Dalamud/Configuration/Internal/DalamudConfiguration.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
diff --git a/Dalamud/Configuration/Internal/DevPluginSettings.cs b/Dalamud/Configuration/Internal/DevPluginSettings.cs
index 63d56fdb6..361632a14 100644
--- a/Dalamud/Configuration/Internal/DevPluginSettings.cs
+++ b/Dalamud/Configuration/Internal/DevPluginSettings.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
namespace Dalamud.Configuration.Internal;
diff --git a/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs b/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs
index a251da763..2df9ec5fe 100644
--- a/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs
+++ b/Dalamud/Configuration/Internal/EnvironmentConfiguration.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Configuration.Internal;
///
diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs
index f9d2aff3c..e44016dc6 100644
--- a/Dalamud/Dalamud.cs
+++ b/Dalamud/Dalamud.cs
@@ -33,8 +33,9 @@ internal sealed class Dalamud : IServiceType
{
#region Internals
+ private static int shownServiceError = 0;
private readonly ManualResetEvent unloadSignal;
-
+
#endregion
///
@@ -68,54 +69,47 @@ internal sealed class Dalamud : IServiceType
// Set up FFXIVClientStructs
this.SetupClientStructsResolver(cacheDir);
-
- if (!configuration.IsResumeGameAfterPluginLoad)
+
+ void KickoffGameThread()
{
+ Log.Verbose("=============== GAME THREAD KICKOFF ===============");
+ Timings.Event("Game thread kickoff");
NativeFunctions.SetEvent(mainThreadContinueEvent);
- ServiceManager.InitializeEarlyLoadableServices()
- .ContinueWith(t =>
+ }
+
+ void HandleServiceInitFailure(Task t)
+ {
+ Log.Error(t.Exception!, "Service initialization failure");
+
+ if (Interlocked.CompareExchange(ref shownServiceError, 1, 0) != 0)
+ return;
+
+ Util.Fatal(
+ "Dalamud failed to load all necessary services.\n\nThe game will continue, but you may not be able to use plugins.",
+ "Dalamud", false);
+ }
+
+ ServiceManager.InitializeEarlyLoadableServices()
+ .ContinueWith(
+ t =>
{
if (t.IsCompletedSuccessfully)
return;
-
- Log.Error(t.Exception!, "Service initialization failure");
- Util.Fatal(
- "Dalamud failed to load all necessary services.\n\nThe game will continue, but you may not be able to use plugins.",
- "Dalamud", false);
+
+ HandleServiceInitFailure(t);
});
- }
- else
- {
- Task.Run(async () =>
+
+ ServiceManager.BlockingResolved.ContinueWith(
+ t =>
{
- try
+ if (t.IsCompletedSuccessfully)
{
- var tasks = new[]
- {
- ServiceManager.InitializeEarlyLoadableServices(),
- ServiceManager.BlockingResolved,
- };
-
- await Task.WhenAny(tasks);
- var faultedTasks = tasks.Where(x => x.IsFaulted).Select(x => (Exception)x.Exception!).ToArray();
- if (faultedTasks.Any())
- throw new AggregateException(faultedTasks);
-
- NativeFunctions.SetEvent(mainThreadContinueEvent);
-
- await Task.WhenAll(tasks);
- }
- catch (Exception e)
- {
- Log.Error(e, "Service initialization failure");
- Util.Fatal("Dalamud could not initialize correctly. Please report this error. \n\nThe game will continue, but you may not be able to use plugins.", "Dalamud", false);
- }
- finally
- {
- NativeFunctions.SetEvent(mainThreadContinueEvent);
+ KickoffGameThread();
+ return;
}
+
+ HandleServiceInitFailure(t);
});
- }
this.DefaultExceptionFilter = NativeFunctions.SetUnhandledExceptionFilter(nint.Zero);
NativeFunctions.SetUnhandledExceptionFilter(this.DefaultExceptionFilter);
diff --git a/Dalamud/Game/Addon/Events/PluginEventController.cs b/Dalamud/Game/Addon/Events/PluginEventController.cs
index 3ba067a6d..4c125cec3 100644
--- a/Dalamud/Game/Addon/Events/PluginEventController.cs
+++ b/Dalamud/Game/Addon/Events/PluginEventController.cs
@@ -5,6 +5,7 @@ using Dalamud.Game.Gui;
using Dalamud.Logging.Internal;
using Dalamud.Memory;
using Dalamud.Plugin.Services;
+
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace Dalamud.Game.Addon.Events;
diff --git a/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs b/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs
index eefb3b5e9..c7bbef002 100644
--- a/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs
+++ b/Dalamud/Game/Addon/Lifecycle/AddonLifecycle.cs
@@ -10,6 +10,7 @@ using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Memory;
using Dalamud.Plugin.Services;
+
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace Dalamud.Game.Addon.Lifecycle;
diff --git a/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs
index fd3b5d79d..7953ea27a 100644
--- a/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs
+++ b/Dalamud/Game/Addon/Lifecycle/AddonLifecycleReceiveEventListener.cs
@@ -4,6 +4,7 @@ using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
using Dalamud.Hooking;
using Dalamud.Logging.Internal;
using Dalamud.Memory;
+
using FFXIVClientStructs.FFXIV.Component.GUI;
namespace Dalamud.Game.Addon.Lifecycle;
diff --git a/Dalamud/Game/BaseAddressResolver.cs b/Dalamud/Game/BaseAddressResolver.cs
index 7a455aea0..4133117d7 100644
--- a/Dalamud/Game/BaseAddressResolver.cs
+++ b/Dalamud/Game/BaseAddressResolver.cs
@@ -1,10 +1,7 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
-using JetBrains.Annotations;
-
namespace Dalamud.Game;
///
diff --git a/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs b/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs
index f4115511d..b3bfe3f06 100644
--- a/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs
+++ b/Dalamud/Game/ClientState/Aetherytes/AetheryteList.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using Serilog;
diff --git a/Dalamud/Game/ClientState/Buddy/BuddyList.cs b/Dalamud/Game/ClientState/Buddy/BuddyList.cs
index 949ccae25..91a201090 100644
--- a/Dalamud/Game/ClientState/Buddy/BuddyList.cs
+++ b/Dalamud/Game/ClientState/Buddy/BuddyList.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
@@ -6,6 +5,7 @@ using System.Runtime.InteropServices;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.ClientState.Buddy;
diff --git a/Dalamud/Game/ClientState/Buddy/BuddyMember.cs b/Dalamud/Game/ClientState/Buddy/BuddyMember.cs
index 80a510ce5..b075b0453 100644
--- a/Dalamud/Game/ClientState/Buddy/BuddyMember.cs
+++ b/Dalamud/Game/ClientState/Buddy/BuddyMember.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Resolvers;
diff --git a/Dalamud/Game/ClientState/ClientStateAddressResolver.cs b/Dalamud/Game/ClientState/ClientStateAddressResolver.cs
index 73ed24e95..0caced248 100644
--- a/Dalamud/Game/ClientState/ClientStateAddressResolver.cs
+++ b/Dalamud/Game/ClientState/ClientStateAddressResolver.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState;
///
diff --git a/Dalamud/Game/ClientState/Conditions/Condition.cs b/Dalamud/Game/ClientState/Conditions/Condition.cs
index 98132798f..d281d7aec 100644
--- a/Dalamud/Game/ClientState/Conditions/Condition.cs
+++ b/Dalamud/Game/ClientState/Conditions/Condition.cs
@@ -1,6 +1,7 @@
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.ClientState.Conditions;
diff --git a/Dalamud/Game/ClientState/Fates/Fate.cs b/Dalamud/Game/ClientState/Fates/Fate.cs
index 440767846..47b32dce0 100644
--- a/Dalamud/Game/ClientState/Fates/Fate.cs
+++ b/Dalamud/Game/ClientState/Fates/Fate.cs
@@ -1,4 +1,3 @@
-using System;
using System.Numerics;
using Dalamud.Data;
diff --git a/Dalamud/Game/ClientState/Fates/FateTable.cs b/Dalamud/Game/ClientState/Fates/FateTable.cs
index 182db18d4..288bcb947 100644
--- a/Dalamud/Game/ClientState/Fates/FateTable.cs
+++ b/Dalamud/Game/ClientState/Fates/FateTable.cs
@@ -1,10 +1,10 @@
-using System;
using System.Collections;
using System.Collections.Generic;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.ClientState.Fates;
diff --git a/Dalamud/Game/ClientState/GamePad/GamepadButtons.cs b/Dalamud/Game/ClientState/GamePad/GamepadButtons.cs
index a73f72857..5718c7ab6 100644
--- a/Dalamud/Game/ClientState/GamePad/GamepadButtons.cs
+++ b/Dalamud/Game/ClientState/GamePad/GamepadButtons.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.GamePad;
///
diff --git a/Dalamud/Game/ClientState/GamePad/GamepadState.cs b/Dalamud/Game/ClientState/GamePad/GamepadState.cs
index c684d1ec6..2e339b42f 100644
--- a/Dalamud/Game/ClientState/GamePad/GamepadState.cs
+++ b/Dalamud/Game/ClientState/GamePad/GamepadState.cs
@@ -1,10 +1,10 @@
-using System;
using System.Numerics;
using Dalamud.Hooking;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using ImGuiNET;
using Serilog;
diff --git a/Dalamud/Game/ClientState/JobGauge/Enums/Nadi.cs b/Dalamud/Game/ClientState/JobGauge/Enums/Nadi.cs
index 159ecbb26..dd3434389 100644
--- a/Dalamud/Game/ClientState/JobGauge/Enums/Nadi.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Enums/Nadi.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Game.ClientState.JobGauge.Enums;
+namespace Dalamud.Game.ClientState.JobGauge.Enums;
///
/// MNK Nadi types.
diff --git a/Dalamud/Game/ClientState/JobGauge/Enums/Sen.cs b/Dalamud/Game/ClientState/JobGauge/Enums/Sen.cs
index bdd98b750..a1a6035c6 100644
--- a/Dalamud/Game/ClientState/JobGauge/Enums/Sen.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Enums/Sen.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Enums;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/JobGauges.cs b/Dalamud/Game/ClientState/JobGauge/JobGauges.cs
index 5085c361c..8a0a84436 100644
--- a/Dalamud/Game/ClientState/JobGauge/JobGauges.cs
+++ b/Dalamud/Game/ClientState/JobGauge/JobGauges.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Reflection;
@@ -6,6 +5,7 @@ using Dalamud.Game.ClientState.JobGauge.Types;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.ClientState.JobGauge;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/ASTGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/ASTGauge.cs
index 4549ff9c9..ae75aae3d 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/ASTGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/ASTGauge.cs
@@ -1,4 +1,3 @@
-using System;
using System.Linq;
using Dalamud.Game.ClientState.JobGauge.Enums;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/BLMGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/BLMGauge.cs
index 4ed8eabe4..6b59aeef3 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/BLMGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/BLMGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/BRDGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/BRDGauge.cs
index 1a7f7bd47..bfcf3cc38 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/BRDGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/BRDGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.JobGauge.Enums;
using FFXIVClientStructs.FFXIV.Client.Game.Gauge;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/DNCGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/DNCGauge.cs
index 455c5bca0..73a3819af 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/DNCGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/DNCGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/DRGGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/DRGGauge.cs
index 39e39b41b..de530b699 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/DRGGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/DRGGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/DRKGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/DRKGauge.cs
index 25a245ac6..834087040 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/DRKGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/DRKGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/GNBGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/GNBGauge.cs
index 4acc9a712..5c1f6c1c1 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/GNBGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/GNBGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase.cs b/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase.cs
index 09280cf7c..4f14fb8d1 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase{T}.cs b/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase{T}.cs
index dbe107d2c..624b98d51 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase{T}.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/JobGaugeBase{T}.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/MCHGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/MCHGauge.cs
index 76e3b00c4..b59f8e0ea 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/MCHGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/MCHGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/MNKGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/MNKGauge.cs
index 4f572a7c4..98189068e 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/MNKGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/MNKGauge.cs
@@ -1,4 +1,3 @@
-using System;
using System.Linq;
using Dalamud.Game.ClientState.JobGauge.Enums;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/NINGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/NINGauge.cs
index 998ee10a4..1e3b6df3c 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/NINGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/NINGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/PLDGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/PLDGauge.cs
index 8998200c2..e14dc36e6 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/PLDGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/PLDGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/RDMGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/RDMGauge.cs
index 0b10a2b4d..b53df9a05 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/RDMGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/RDMGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/RPRGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/RPRGauge.cs
index 7ddafcc4c..967cdc824 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/RPRGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/RPRGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/SAMGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/SAMGauge.cs
index 4d4c2d397..f3417f002 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/SAMGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/SAMGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/SCHGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/SCHGauge.cs
index ae8c87f3a..e0cc8e384 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/SCHGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/SCHGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/SGEGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/SGEGauge.cs
index 4775809c1..f6da8540b 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/SGEGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/SGEGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs
index 6b03a4c6e..aa7e27fd2 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/SMNGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.JobGauge.Enums;
using FFXIVClientStructs.FFXIV.Client.Game.Gauge;
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/WARGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/WARGauge.cs
index 2a50e9d24..49cb4f7a5 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/WARGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/WARGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/JobGauge/Types/WHMGauge.cs b/Dalamud/Game/ClientState/JobGauge/Types/WHMGauge.cs
index afe19f59d..23af3c9a7 100644
--- a/Dalamud/Game/ClientState/JobGauge/Types/WHMGauge.cs
+++ b/Dalamud/Game/ClientState/JobGauge/Types/WHMGauge.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.JobGauge.Types;
///
diff --git a/Dalamud/Game/ClientState/Keys/KeyState.cs b/Dalamud/Game/ClientState/Keys/KeyState.cs
index b32a7d88b..73a3da376 100644
--- a/Dalamud/Game/ClientState/Keys/KeyState.cs
+++ b/Dalamud/Game/ClientState/Keys/KeyState.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
@@ -6,6 +5,7 @@ using System.Runtime.InteropServices;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.ClientState.Keys;
diff --git a/Dalamud/Game/ClientState/Keys/VirtualKeyAttribute.cs b/Dalamud/Game/ClientState/Keys/VirtualKeyAttribute.cs
index 6d0750f0d..0a46b5122 100644
--- a/Dalamud/Game/ClientState/Keys/VirtualKeyAttribute.cs
+++ b/Dalamud/Game/ClientState/Keys/VirtualKeyAttribute.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Game.ClientState.Keys;
+namespace Dalamud.Game.ClientState.Keys;
///
/// Attribute describing a VirtualKey.
diff --git a/Dalamud/Game/ClientState/Objects/Enums/StatusFlags.cs b/Dalamud/Game/ClientState/Objects/Enums/StatusFlags.cs
index 2fed2a655..7f642f649 100644
--- a/Dalamud/Game/ClientState/Objects/Enums/StatusFlags.cs
+++ b/Dalamud/Game/ClientState/Objects/Enums/StatusFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.ClientState.Objects.Enums;
///
diff --git a/Dalamud/Game/ClientState/Objects/SubKinds/EventObj.cs b/Dalamud/Game/ClientState/Objects/SubKinds/EventObj.cs
index 9d977ec95..ee2b62f0f 100644
--- a/Dalamud/Game/ClientState/Objects/SubKinds/EventObj.cs
+++ b/Dalamud/Game/ClientState/Objects/SubKinds/EventObj.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.Objects.Types;
namespace Dalamud.Game.ClientState.Objects.SubKinds;
diff --git a/Dalamud/Game/ClientState/Objects/SubKinds/Npc.cs b/Dalamud/Game/ClientState/Objects/SubKinds/Npc.cs
index 802e647ff..ee4f350a0 100644
--- a/Dalamud/Game/ClientState/Objects/SubKinds/Npc.cs
+++ b/Dalamud/Game/ClientState/Objects/SubKinds/Npc.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.Objects.Types;
namespace Dalamud.Game.ClientState.Objects.SubKinds;
diff --git a/Dalamud/Game/ClientState/Objects/TargetManager.cs b/Dalamud/Game/ClientState/Objects/TargetManager.cs
index 844813af4..92aaabd75 100644
--- a/Dalamud/Game/ClientState/Objects/TargetManager.cs
+++ b/Dalamud/Game/ClientState/Objects/TargetManager.cs
@@ -1,8 +1,7 @@
-using System;
-
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
+
#pragma warning disable CS0618
namespace Dalamud.Game.ClientState.Objects;
diff --git a/Dalamud/Game/ClientState/Objects/Types/BattleChara.cs b/Dalamud/Game/ClientState/Objects/Types/BattleChara.cs
index 0c5d16675..a95d32da0 100644
--- a/Dalamud/Game/ClientState/Objects/Types/BattleChara.cs
+++ b/Dalamud/Game/ClientState/Objects/Types/BattleChara.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.Statuses;
using Dalamud.Utility;
diff --git a/Dalamud/Game/ClientState/Objects/Types/GameObject.cs b/Dalamud/Game/ClientState/Objects/Types/GameObject.cs
index 3d5b4c288..5ec2be758 100644
--- a/Dalamud/Game/ClientState/Objects/Types/GameObject.cs
+++ b/Dalamud/Game/ClientState/Objects/Types/GameObject.cs
@@ -1,4 +1,3 @@
-using System;
using System.Numerics;
using Dalamud.Game.ClientState.Objects.Enums;
diff --git a/Dalamud/Game/ClientState/Party/PartyList.cs b/Dalamud/Game/ClientState/Party/PartyList.cs
index 0e16306f1..53e3d2a4e 100644
--- a/Dalamud/Game/ClientState/Party/PartyList.cs
+++ b/Dalamud/Game/ClientState/Party/PartyList.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
@@ -6,6 +5,7 @@ using System.Runtime.InteropServices;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.ClientState.Party;
diff --git a/Dalamud/Game/ClientState/Party/PartyMember.cs b/Dalamud/Game/ClientState/Party/PartyMember.cs
index ef65e3b19..9da2e2539 100644
--- a/Dalamud/Game/ClientState/Party/PartyMember.cs
+++ b/Dalamud/Game/ClientState/Party/PartyMember.cs
@@ -1,4 +1,3 @@
-using System;
using System.Numerics;
using Dalamud.Game.ClientState.Objects;
diff --git a/Dalamud/Game/ClientState/Resolvers/ExcelResolver{T}.cs b/Dalamud/Game/ClientState/Resolvers/ExcelResolver{T}.cs
index 722c5a6bc..04003d9aa 100644
--- a/Dalamud/Game/ClientState/Resolvers/ExcelResolver{T}.cs
+++ b/Dalamud/Game/ClientState/Resolvers/ExcelResolver{T}.cs
@@ -1,4 +1,5 @@
using Dalamud.Data;
+
using Lumina.Excel;
namespace Dalamud.Game.ClientState.Resolvers;
diff --git a/Dalamud/Game/ClientState/Statuses/Status.cs b/Dalamud/Game/ClientState/Statuses/Status.cs
index aa5759a03..b40786fe9 100644
--- a/Dalamud/Game/ClientState/Statuses/Status.cs
+++ b/Dalamud/Game/ClientState/Statuses/Status.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Resolvers;
diff --git a/Dalamud/Game/ClientState/Statuses/StatusList.cs b/Dalamud/Game/ClientState/Statuses/StatusList.cs
index fce59e29b..aac35948e 100644
--- a/Dalamud/Game/ClientState/Statuses/StatusList.cs
+++ b/Dalamud/Game/ClientState/Statuses/StatusList.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
diff --git a/Dalamud/Game/Command/CommandInfo.cs b/Dalamud/Game/Command/CommandInfo.cs
index bc0250a66..13987f8ae 100644
--- a/Dalamud/Game/Command/CommandInfo.cs
+++ b/Dalamud/Game/Command/CommandInfo.cs
@@ -1,5 +1,3 @@
-using System.Reflection;
-
namespace Dalamud.Game.Command;
///
diff --git a/Dalamud/Game/Config/ConfigChangeEvent.cs b/Dalamud/Game/Config/ConfigChangeEvent.cs
index 941033c61..ca898b6b3 100644
--- a/Dalamud/Game/Config/ConfigChangeEvent.cs
+++ b/Dalamud/Game/Config/ConfigChangeEvent.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Game.Config;
+namespace Dalamud.Game.Config;
public abstract record ConfigChangeEvent(Enum Option);
diff --git a/Dalamud/Game/Config/ConfigOptionNotFoundException.cs b/Dalamud/Game/Config/ConfigOptionNotFoundException.cs
index e7f20f173..bc493d530 100644
--- a/Dalamud/Game/Config/ConfigOptionNotFoundException.cs
+++ b/Dalamud/Game/Config/ConfigOptionNotFoundException.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Config;
///
diff --git a/Dalamud/Game/Config/GameConfigOptionAttribute.cs b/Dalamud/Game/Config/GameConfigOptionAttribute.cs
index 4ddc41abc..5ba18b37b 100644
--- a/Dalamud/Game/Config/GameConfigOptionAttribute.cs
+++ b/Dalamud/Game/Config/GameConfigOptionAttribute.cs
@@ -1,7 +1,3 @@
-using System;
-
-using FFXIVClientStructs.FFXIV.Common.Configuration;
-
namespace Dalamud.Game.Config;
///
diff --git a/Dalamud/Game/Config/IncorrectConfigTypeException.cs b/Dalamud/Game/Config/IncorrectConfigTypeException.cs
index e8f81df92..f067efcdc 100644
--- a/Dalamud/Game/Config/IncorrectConfigTypeException.cs
+++ b/Dalamud/Game/Config/IncorrectConfigTypeException.cs
@@ -1,7 +1,3 @@
-using System;
-
-using FFXIVClientStructs.FFXIV.Common.Configuration;
-
namespace Dalamud.Game.Config;
///
diff --git a/Dalamud/Game/FrameworkAddressResolver.cs b/Dalamud/Game/FrameworkAddressResolver.cs
index 39ae15155..e9c1dad80 100644
--- a/Dalamud/Game/FrameworkAddressResolver.cs
+++ b/Dalamud/Game/FrameworkAddressResolver.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game;
///
diff --git a/Dalamud/Game/Gui/ChatGui.cs b/Dalamud/Game/Gui/ChatGui.cs
index 3c6ed2fc1..294ddd5c3 100644
--- a/Dalamud/Game/Gui/ChatGui.cs
+++ b/Dalamud/Game/Gui/ChatGui.cs
@@ -12,7 +12,6 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Memory;
-using Dalamud.Plugin.Internal;
using Dalamud.Plugin.Services;
using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.System.String;
diff --git a/Dalamud/Game/Gui/Dtr/DtrBar.cs b/Dalamud/Game/Gui/Dtr/DtrBar.cs
index 8a7982b07..5c92a721a 100644
--- a/Dalamud/Game/Gui/Dtr/DtrBar.cs
+++ b/Dalamud/Game/Gui/Dtr/DtrBar.cs
@@ -11,6 +11,7 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Plugin.Services;
+
using FFXIVClientStructs.FFXIV.Client.Graphics;
using FFXIVClientStructs.FFXIV.Client.System.Memory;
using FFXIVClientStructs.FFXIV.Component.GUI;
diff --git a/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs b/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs
index ef4ce062b..b549afb8b 100644
--- a/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs
+++ b/Dalamud/Game/Gui/Dtr/DtrBarEntry.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Linq;
+using System.Linq;
using Dalamud.Configuration.Internal;
using Dalamud.Game.Text.SeStringHandling;
diff --git a/Dalamud/Game/Gui/FlyText/FlyTextGui.cs b/Dalamud/Game/Gui/FlyText/FlyTextGui.cs
index 61bfc5d0a..6a9fd007f 100644
--- a/Dalamud/Game/Gui/FlyText/FlyTextGui.cs
+++ b/Dalamud/Game/Gui/FlyText/FlyTextGui.cs
@@ -7,6 +7,7 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Memory;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.Gui.FlyText;
diff --git a/Dalamud/Game/Gui/GameGuiAddressResolver.cs b/Dalamud/Game/Gui/GameGuiAddressResolver.cs
index cbed42a65..6928a037e 100644
--- a/Dalamud/Game/Gui/GameGuiAddressResolver.cs
+++ b/Dalamud/Game/Gui/GameGuiAddressResolver.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui;
///
diff --git a/Dalamud/Game/Gui/PartyFinder/PartyFinderGui.cs b/Dalamud/Game/Gui/PartyFinder/PartyFinderGui.cs
index beac09478..fb89e5497 100644
--- a/Dalamud/Game/Gui/PartyFinder/PartyFinderGui.cs
+++ b/Dalamud/Game/Gui/PartyFinder/PartyFinderGui.cs
@@ -6,6 +6,7 @@ using Dalamud.Hooking;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Services;
+
using Serilog;
namespace Dalamud.Game.Gui.PartyFinder;
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/ConditionFlags.cs b/Dalamud/Game/Gui/PartyFinder/Types/ConditionFlags.cs
index d9be66856..8c1ed6ba7 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/ConditionFlags.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/ConditionFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui.PartyFinder.Types;
///
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/DutyFinderSettingsFlags.cs b/Dalamud/Game/Gui/PartyFinder/Types/DutyFinderSettingsFlags.cs
index e3ab56ed3..e27e11df4 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/DutyFinderSettingsFlags.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/DutyFinderSettingsFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui.PartyFinder.Types;
///
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/JobFlags.cs b/Dalamud/Game/Gui/PartyFinder/Types/JobFlags.cs
index 9d6c8820c..419a4a138 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/JobFlags.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/JobFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui.PartyFinder.Types;
///
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/LootRuleFlags.cs b/Dalamud/Game/Gui/PartyFinder/Types/LootRuleFlags.cs
index 6e43ecf4c..6d6918c4e 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/LootRuleFlags.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/LootRuleFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui.PartyFinder.Types;
///
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/ObjectiveFlags.cs b/Dalamud/Game/Gui/PartyFinder/Types/ObjectiveFlags.cs
index 19f56f84c..2ff3922b9 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/ObjectiveFlags.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/ObjectiveFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui.PartyFinder.Types;
///
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderListing.cs b/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderListing.cs
index 503b7d905..1a5b76f5b 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderListing.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderListing.cs
@@ -1,10 +1,10 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using Dalamud.Data;
using Dalamud.Game.Gui.PartyFinder.Internal;
using Dalamud.Game.Text.SeStringHandling;
+
using Lumina.Excel.GeneratedSheets;
namespace Dalamud.Game.Gui.PartyFinder.Types;
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderSlot.cs b/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderSlot.cs
index a0853adf1..631a89a41 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderSlot.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/PartyFinderSlot.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Dalamud/Game/Gui/PartyFinder/Types/SearchAreaFlags.cs b/Dalamud/Game/Gui/PartyFinder/Types/SearchAreaFlags.cs
index 27a3f5ee8..7d405cd09 100644
--- a/Dalamud/Game/Gui/PartyFinder/Types/SearchAreaFlags.cs
+++ b/Dalamud/Game/Gui/PartyFinder/Types/SearchAreaFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Gui.PartyFinder.Types;
///
diff --git a/Dalamud/Game/Internal/AntiDebug.cs b/Dalamud/Game/Internal/AntiDebug.cs
index 5ab024012..a818d4d54 100644
--- a/Dalamud/Game/Internal/AntiDebug.cs
+++ b/Dalamud/Game/Internal/AntiDebug.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
#if !DEBUG
diff --git a/Dalamud/Game/Internal/DXGI/ISwapChainAddressResolver.cs b/Dalamud/Game/Internal/DXGI/ISwapChainAddressResolver.cs
index 867119be5..daccb8d14 100644
--- a/Dalamud/Game/Internal/DXGI/ISwapChainAddressResolver.cs
+++ b/Dalamud/Game/Internal/DXGI/ISwapChainAddressResolver.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Internal.DXGI;
///
diff --git a/Dalamud/Game/Internal/DalamudAtkTweaks.cs b/Dalamud/Game/Internal/DalamudAtkTweaks.cs
index 9f9328de1..33fec85a0 100644
--- a/Dalamud/Game/Internal/DalamudAtkTweaks.cs
+++ b/Dalamud/Game/Internal/DalamudAtkTweaks.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
using CheapLoc;
@@ -9,6 +8,7 @@ using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Hooking;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Windowing;
+
using FFXIVClientStructs.FFXIV.Component.GUI;
using Serilog;
diff --git a/Dalamud/Game/Libc/LibcFunction.cs b/Dalamud/Game/Libc/LibcFunction.cs
index 73ccc4399..bdab51707 100644
--- a/Dalamud/Game/Libc/LibcFunction.cs
+++ b/Dalamud/Game/Libc/LibcFunction.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
using System.Text;
diff --git a/Dalamud/Game/Libc/LibcFunctionAddressResolver.cs b/Dalamud/Game/Libc/LibcFunctionAddressResolver.cs
index 3b8742678..23f197893 100644
--- a/Dalamud/Game/Libc/LibcFunctionAddressResolver.cs
+++ b/Dalamud/Game/Libc/LibcFunctionAddressResolver.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Libc;
///
diff --git a/Dalamud/Game/Libc/OwnedStdString.cs b/Dalamud/Game/Libc/OwnedStdString.cs
index db92257b3..c43cb7089 100644
--- a/Dalamud/Game/Libc/OwnedStdString.cs
+++ b/Dalamud/Game/Libc/OwnedStdString.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Dalamud.Game.Libc;
diff --git a/Dalamud/Game/Libc/StdString.cs b/Dalamud/Game/Libc/StdString.cs
index 816219a82..af6a96b0f 100644
--- a/Dalamud/Game/Libc/StdString.cs
+++ b/Dalamud/Game/Libc/StdString.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
using System.Text;
diff --git a/Dalamud/Game/Network/Internal/MarketBoardUploaders/MarketBoardItemRequest.cs b/Dalamud/Game/Network/Internal/MarketBoardUploaders/MarketBoardItemRequest.cs
index bc8043732..eb4ed7ece 100644
--- a/Dalamud/Game/Network/Internal/MarketBoardUploaders/MarketBoardItemRequest.cs
+++ b/Dalamud/Game/Network/Internal/MarketBoardUploaders/MarketBoardItemRequest.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
diff --git a/Dalamud/Game/Network/Internal/MarketBoardUploaders/Universalis/UniversalisMarketBoardUploader.cs b/Dalamud/Game/Network/Internal/MarketBoardUploaders/Universalis/UniversalisMarketBoardUploader.cs
index 34a255e19..4fe701c48 100644
--- a/Dalamud/Game/Network/Internal/MarketBoardUploaders/Universalis/UniversalisMarketBoardUploader.cs
+++ b/Dalamud/Game/Network/Internal/MarketBoardUploaders/Universalis/UniversalisMarketBoardUploader.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using Dalamud.Game.Network.Internal.MarketBoardUploaders.Universalis.Types;
using Dalamud.Game.Network.Structures;
using Dalamud.Networking.Http;
+
using Newtonsoft.Json;
using Serilog;
diff --git a/Dalamud/Game/Network/Internal/NetworkHandlers.cs b/Dalamud/Game/Network/Internal/NetworkHandlers.cs
index 167a3fcaa..f7091817c 100644
--- a/Dalamud/Game/Network/Internal/NetworkHandlers.cs
+++ b/Dalamud/Game/Network/Internal/NetworkHandlers.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Game/Network/Internal/WinSockHandlers.cs b/Dalamud/Game/Network/Internal/WinSockHandlers.cs
index 619c458c4..384858cfe 100644
--- a/Dalamud/Game/Network/Internal/WinSockHandlers.cs
+++ b/Dalamud/Game/Network/Internal/WinSockHandlers.cs
@@ -1,4 +1,3 @@
-using System;
using System.Net.Sockets;
using System.Runtime.InteropServices;
diff --git a/Dalamud/Game/Network/Structures/MarketBoardCurrentOfferings.cs b/Dalamud/Game/Network/Structures/MarketBoardCurrentOfferings.cs
index 4d57a0fbd..fc782cd51 100644
--- a/Dalamud/Game/Network/Structures/MarketBoardCurrentOfferings.cs
+++ b/Dalamud/Game/Network/Structures/MarketBoardCurrentOfferings.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
diff --git a/Dalamud/Game/Network/Structures/MarketBoardHistory.cs b/Dalamud/Game/Network/Structures/MarketBoardHistory.cs
index 9a61b814e..148c321db 100644
--- a/Dalamud/Game/Network/Structures/MarketBoardHistory.cs
+++ b/Dalamud/Game/Network/Structures/MarketBoardHistory.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
diff --git a/Dalamud/Game/Network/Structures/MarketBoardPurchase.cs b/Dalamud/Game/Network/Structures/MarketBoardPurchase.cs
index 4e9b67a74..62d104cff 100644
--- a/Dalamud/Game/Network/Structures/MarketBoardPurchase.cs
+++ b/Dalamud/Game/Network/Structures/MarketBoardPurchase.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
namespace Dalamud.Game.Network.Structures;
diff --git a/Dalamud/Game/Network/Structures/MarketBoardPurchaseHandler.cs b/Dalamud/Game/Network/Structures/MarketBoardPurchaseHandler.cs
index 0d0c18329..783e62cda 100644
--- a/Dalamud/Game/Network/Structures/MarketBoardPurchaseHandler.cs
+++ b/Dalamud/Game/Network/Structures/MarketBoardPurchaseHandler.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
namespace Dalamud.Game.Network.Structures;
diff --git a/Dalamud/Game/SigScanner.cs b/Dalamud/Game/SigScanner.cs
index 5e49052ae..ff6a9e327 100644
--- a/Dalamud/Game/SigScanner.cs
+++ b/Dalamud/Game/SigScanner.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
@@ -7,8 +6,6 @@ using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using Dalamud.IoC;
-using Dalamud.IoC.Internal;
using Iced.Intel;
using Newtonsoft.Json;
using Serilog;
diff --git a/Dalamud/Game/Text/Sanitizer/Sanitizer.cs b/Dalamud/Game/Text/Sanitizer/Sanitizer.cs
index 0647f5d28..3966d3b89 100644
--- a/Dalamud/Game/Text/Sanitizer/Sanitizer.cs
+++ b/Dalamud/Game/Text/Sanitizer/Sanitizer.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payload.cs b/Dalamud/Game/Text/SeStringHandling/Payload.cs
index ff7332f12..b876598de 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payload.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
@@ -6,6 +5,7 @@ using System.IO;
using Dalamud.Data;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Plugin.Services;
+
using Newtonsoft.Json;
using Serilog;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs
index 7b8ffd146..451d43065 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs
index 7a1ed417c..0310372bb 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/DalamudLinkPayload.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/MapLinkPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/MapLinkPayload.cs
index 667b52e36..7d975b347 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/MapLinkPayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/MapLinkPayload.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/NewLinePayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/NewLinePayload.cs
index 3df724e75..0b090b3d6 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/NewLinePayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/NewLinePayload.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
namespace Dalamud.Game.Text.SeStringHandling.Payloads;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/RawPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/RawPayload.cs
index c42805b92..a7e41cbc6 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/RawPayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/RawPayload.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/TextPayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/TextPayload.cs
index 1cb27f4ea..7c1ce1a3c 100644
--- a/Dalamud/Game/Text/SeStringHandling/Payloads/TextPayload.cs
+++ b/Dalamud/Game/Text/SeStringHandling/Payloads/TextPayload.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
diff --git a/Dalamud/Game/Text/SeStringHandling/SeString.cs b/Dalamud/Game/Text/SeStringHandling/SeString.cs
index 91dceb5d1..4a04f0326 100644
--- a/Dalamud/Game/Text/SeStringHandling/SeString.cs
+++ b/Dalamud/Game/Text/SeStringHandling/SeString.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs b/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs
index dae9e11a9..e78ac2de8 100644
--- a/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs
+++ b/Dalamud/Game/Text/SeStringHandling/SeStringBuilder.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Linq;
using Dalamud.Game.Text.SeStringHandling.Payloads;
diff --git a/Dalamud/Game/Text/XivChatEntry.cs b/Dalamud/Game/Text/XivChatEntry.cs
index afc89b906..7dfba25d5 100644
--- a/Dalamud/Game/Text/XivChatEntry.cs
+++ b/Dalamud/Game/Text/XivChatEntry.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.Text.SeStringHandling;
namespace Dalamud.Game.Text;
diff --git a/Dalamud/Game/Text/XivChatTypeInfoAttribute.cs b/Dalamud/Game/Text/XivChatTypeInfoAttribute.cs
index 91bdeef40..32ff89e32 100644
--- a/Dalamud/Game/Text/XivChatTypeInfoAttribute.cs
+++ b/Dalamud/Game/Text/XivChatTypeInfoAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Game.Text;
///
diff --git a/Dalamud/Hooking/AsmHook.cs b/Dalamud/Hooking/AsmHook.cs
index b05347a0a..4ee96bb15 100644
--- a/Dalamud/Hooking/AsmHook.cs
+++ b/Dalamud/Hooking/AsmHook.cs
@@ -1,9 +1,8 @@
-using System;
using System.Reflection;
using System.Reflection.Emit;
using Dalamud.Hooking.Internal;
-using Dalamud.Memory;
+
using Reloaded.Hooks;
namespace Dalamud.Hooking;
diff --git a/Dalamud/Hooking/IDalamudHook.cs b/Dalamud/Hooking/IDalamudHook.cs
index bd7084d86..bffca242e 100644
--- a/Dalamud/Hooking/IDalamudHook.cs
+++ b/Dalamud/Hooking/IDalamudHook.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Hooking;
///
diff --git a/Dalamud/Hooking/Internal/CallHook.cs b/Dalamud/Hooking/Internal/CallHook.cs
index 2bef59c86..c9b5562ba 100644
--- a/Dalamud/Hooking/Internal/CallHook.cs
+++ b/Dalamud/Hooking/Internal/CallHook.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Runtime.InteropServices;
+using System.Runtime.InteropServices;
using Reloaded.Hooks.Definitions;
diff --git a/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs b/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs
index e1900a903..7a177206f 100644
--- a/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs
+++ b/Dalamud/Hooking/Internal/FunctionPointerVariableHook.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
diff --git a/Dalamud/Hooking/Internal/HookInfo.cs b/Dalamud/Hooking/Internal/HookInfo.cs
index 0ab05c314..3672e8e01 100644
--- a/Dalamud/Hooking/Internal/HookInfo.cs
+++ b/Dalamud/Hooking/Internal/HookInfo.cs
@@ -1,4 +1,3 @@
-using System;
using System.Diagnostics;
using System.Reflection;
diff --git a/Dalamud/Hooking/Internal/HookManager.cs b/Dalamud/Hooking/Internal/HookManager.cs
index c8cdf3a46..44c1e6735 100644
--- a/Dalamud/Hooking/Internal/HookManager.cs
+++ b/Dalamud/Hooking/Internal/HookManager.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
@@ -6,6 +5,7 @@ using System.Runtime.InteropServices;
using Dalamud.Logging.Internal;
using Dalamud.Memory;
+
using Iced.Intel;
namespace Dalamud.Hooking.Internal;
diff --git a/Dalamud/Hooking/Internal/MinHookHook.cs b/Dalamud/Hooking/Internal/MinHookHook.cs
index 89a7d9206..4cebca0d0 100644
--- a/Dalamud/Hooking/Internal/MinHookHook.cs
+++ b/Dalamud/Hooking/Internal/MinHookHook.cs
@@ -1,4 +1,3 @@
-using System;
using System.Reflection;
namespace Dalamud.Hooking.Internal;
diff --git a/Dalamud/Hooking/Internal/PeHeader.cs b/Dalamud/Hooking/Internal/PeHeader.cs
index b0e1770f5..51df4a174 100644
--- a/Dalamud/Hooking/Internal/PeHeader.cs
+++ b/Dalamud/Hooking/Internal/PeHeader.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
#pragma warning disable
diff --git a/Dalamud/Hooking/Internal/ReloadedHook.cs b/Dalamud/Hooking/Internal/ReloadedHook.cs
index 172bd9671..bf441a86d 100644
--- a/Dalamud/Hooking/Internal/ReloadedHook.cs
+++ b/Dalamud/Hooking/Internal/ReloadedHook.cs
@@ -1,4 +1,3 @@
-using System;
using System.Reflection;
using Reloaded.Hooks;
diff --git a/Dalamud/Hooking/Internal/Unhooker.cs b/Dalamud/Hooking/Internal/Unhooker.cs
index 09b071ee9..79ee59b66 100644
--- a/Dalamud/Hooking/Internal/Unhooker.cs
+++ b/Dalamud/Hooking/Internal/Unhooker.cs
@@ -1,6 +1,4 @@
-using System;
-
-using Dalamud.Memory;
+using Dalamud.Memory;
namespace Dalamud.Hooking.Internal;
diff --git a/Dalamud/Interface/Animation/Easing.cs b/Dalamud/Interface/Animation/Easing.cs
index 54c41c16d..edab25149 100644
--- a/Dalamud/Interface/Animation/Easing.cs
+++ b/Dalamud/Interface/Animation/Easing.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Diagnostics;
+using System.Diagnostics;
using System.Numerics;
namespace Dalamud.Interface.Animation;
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InCirc.cs b/Dalamud/Interface/Animation/EasingFunctions/InCirc.cs
index ebfc1341c..c467104c5 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InCirc.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InCirc.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InCirc" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InCubic.cs b/Dalamud/Interface/Animation/EasingFunctions/InCubic.cs
index d49715893..78f6774ac 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InCubic.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InCubic.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InCubic" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InElastic.cs b/Dalamud/Interface/Animation/EasingFunctions/InElastic.cs
index 30e21cca8..c53c3d587 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InElastic.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InElastic.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InElastic" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutCirc.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutCirc.cs
index fa90c9fd3..71a598dfb 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InOutCirc.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InOutCirc.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InOutCirc" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutCubic.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutCubic.cs
index bc55bff70..07bcfa28d 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InOutCubic.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InOutCubic.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InOutCubic" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutElastic.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutElastic.cs
index b0c76b725..f78f9f336 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InOutElastic.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InOutElastic.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InOutCirc" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs
index a4d427710..64ab98b16 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InOutQuint.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InOutQuint" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs b/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs
index a3700d6c5..2f347ff80 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InOutSine.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InOutSine" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InQuint.cs b/Dalamud/Interface/Animation/EasingFunctions/InQuint.cs
index 20122efc6..a5ab5a22c 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InQuint.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InQuint.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InQuint" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/InSine.cs b/Dalamud/Interface/Animation/EasingFunctions/InSine.cs
index 553996303..fa079baad 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/InSine.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/InSine.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "InSine" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/OutCirc.cs b/Dalamud/Interface/Animation/EasingFunctions/OutCirc.cs
index 356beb13d..b0d3b895a 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/OutCirc.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/OutCirc.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "OutCirc" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/OutCubic.cs b/Dalamud/Interface/Animation/EasingFunctions/OutCubic.cs
index 9fbe48b26..9c1bb57dc 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/OutCubic.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/OutCubic.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "OutCubic" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/OutElastic.cs b/Dalamud/Interface/Animation/EasingFunctions/OutElastic.cs
index d73fca30e..6a4fcd6dc 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/OutElastic.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/OutElastic.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "OutElastic" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/OutQuint.cs b/Dalamud/Interface/Animation/EasingFunctions/OutQuint.cs
index f83a4eb47..a3174e762 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/OutQuint.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/OutQuint.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "OutQuint" easing animation.
diff --git a/Dalamud/Interface/Animation/EasingFunctions/OutSine.cs b/Dalamud/Interface/Animation/EasingFunctions/OutSine.cs
index 1576f697b..ba82232b3 100644
--- a/Dalamud/Interface/Animation/EasingFunctions/OutSine.cs
+++ b/Dalamud/Interface/Animation/EasingFunctions/OutSine.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Animation.EasingFunctions;
+namespace Dalamud.Interface.Animation.EasingFunctions;
///
/// Class providing an "OutSine" easing animation.
diff --git a/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs b/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs
index 719f470b8..dc2c99608 100644
--- a/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs
+++ b/Dalamud/Interface/Components/ImGuiComponents.IconButton.cs
@@ -1,4 +1,3 @@
-using System;
using System.Numerics;
using Dalamud.Interface.Utility;
diff --git a/Dalamud/Interface/DragDrop/DragDropInterop.cs b/Dalamud/Interface/DragDrop/DragDropInterop.cs
index 6a7043861..c2cbffb68 100644
--- a/Dalamud/Interface/DragDrop/DragDropInterop.cs
+++ b/Dalamud/Interface/DragDrop/DragDropInterop.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
diff --git a/Dalamud/Interface/DragDrop/DragDropManager.cs b/Dalamud/Interface/DragDrop/DragDropManager.cs
index be1865415..c9f0f9b80 100644
--- a/Dalamud/Interface/DragDrop/DragDropManager.cs
+++ b/Dalamud/Interface/DragDrop/DragDropManager.cs
@@ -1,10 +1,10 @@
-using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Dalamud.Interface.Internal;
using Dalamud.IoC;
using Dalamud.IoC.Internal;
+
using ImGuiNET;
using Serilog;
diff --git a/Dalamud/Interface/DragDrop/DragDropTarget.cs b/Dalamud/Interface/DragDrop/DragDropTarget.cs
index bbd7a5061..8115e7353 100644
--- a/Dalamud/Interface/DragDrop/DragDropTarget.cs
+++ b/Dalamud/Interface/DragDrop/DragDropTarget.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Interface/FontAwesome/FontAwesomeCategoriesAttribute.cs b/Dalamud/Interface/FontAwesome/FontAwesomeCategoriesAttribute.cs
index 62572057d..624208c3d 100644
--- a/Dalamud/Interface/FontAwesome/FontAwesomeCategoriesAttribute.cs
+++ b/Dalamud/Interface/FontAwesome/FontAwesomeCategoriesAttribute.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface;
+namespace Dalamud.Interface;
///
/// Set categories associated with a font awesome icon.
diff --git a/Dalamud/Interface/FontAwesome/FontAwesomeHelpers.cs b/Dalamud/Interface/FontAwesome/FontAwesomeHelpers.cs
index 2259db148..14a7072b9 100644
--- a/Dalamud/Interface/FontAwesome/FontAwesomeHelpers.cs
+++ b/Dalamud/Interface/FontAwesome/FontAwesomeHelpers.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Dalamud/Interface/FontAwesome/FontAwesomeSearchTermsAttribute.cs b/Dalamud/Interface/FontAwesome/FontAwesomeSearchTermsAttribute.cs
index 6ee1c75cd..fd4c90fa1 100644
--- a/Dalamud/Interface/FontAwesome/FontAwesomeSearchTermsAttribute.cs
+++ b/Dalamud/Interface/FontAwesome/FontAwesomeSearchTermsAttribute.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface;
+namespace Dalamud.Interface;
///
/// Set search terms associated with a font awesome icon.
diff --git a/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs b/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs
index 587c0dbe3..6b602d911 100644
--- a/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs
+++ b/Dalamud/Interface/GameFonts/GameFontLayoutPlan.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Numerics;
diff --git a/Dalamud/Interface/ImGuiFileDialog/DriveListLoader.cs b/Dalamud/Interface/ImGuiFileDialog/DriveListLoader.cs
index 5898fefdf..487a08132 100644
--- a/Dalamud/Interface/ImGuiFileDialog/DriveListLoader.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/DriveListLoader.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs
index ba71c8cfa..121ec8890 100644
--- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Files.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Helpers.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Helpers.cs
index 96bdb3172..57844c48b 100644
--- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Helpers.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Helpers.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Interface.ImGuiFileDialog;
///
diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs
index 07e3bc20f..2a5d1b607 100644
--- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.Structs.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs
index 411f203cc..1d31642d3 100644
--- a/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/FileDialog.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs b/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs
index 7970279af..ae9c8ef38 100644
--- a/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/FileDialogManager.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using ImGuiNET;
diff --git a/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs b/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs
index ea35f4c65..510348710 100644
--- a/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs
+++ b/Dalamud/Interface/ImGuiFileDialog/ImGuiFileDialogFlags.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Interface.ImGuiFileDialog;
///
diff --git a/Dalamud/Interface/Internal/DalamudCommands.cs b/Dalamud/Interface/Internal/DalamudCommands.cs
index b64df8f19..9e6f7cf32 100644
--- a/Dalamud/Interface/Internal/DalamudCommands.cs
+++ b/Dalamud/Interface/Internal/DalamudCommands.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
diff --git a/Dalamud/Interface/Internal/DalamudIme.cs b/Dalamud/Interface/Internal/DalamudIme.cs
index 35e33fbfb..61ec24484 100644
--- a/Dalamud/Interface/Internal/DalamudIme.cs
+++ b/Dalamud/Interface/Internal/DalamudIme.cs
@@ -11,7 +11,6 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Text.Unicode;
-using Dalamud.Game;
using Dalamud.Game.Text;
using Dalamud.Hooking.WndProcHook;
using Dalamud.Interface.Colors;
diff --git a/Dalamud/Interface/Internal/PluginCategoryManager.cs b/Dalamud/Interface/Internal/PluginCategoryManager.cs
index ddfcff6bc..3f94b2d2e 100644
--- a/Dalamud/Interface/Internal/PluginCategoryManager.cs
+++ b/Dalamud/Interface/Internal/PluginCategoryManager.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
diff --git a/Dalamud/Interface/Internal/TextureManager.cs b/Dalamud/Interface/Internal/TextureManager.cs
index 21c5c8cd9..2444c2c85 100644
--- a/Dalamud/Interface/Internal/TextureManager.cs
+++ b/Dalamud/Interface/Internal/TextureManager.cs
@@ -9,6 +9,7 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Plugin.Services;
+
using Lumina.Data.Files;
using Lumina.Data.Parsing.Tex.Buffers;
using SharpDX.DXGI;
diff --git a/Dalamud/Interface/Internal/UiDebug.cs b/Dalamud/Interface/Internal/UiDebug.cs
index d93b90799..e5e99f6d4 100644
--- a/Dalamud/Interface/Internal/UiDebug.cs
+++ b/Dalamud/Interface/Internal/UiDebug.cs
@@ -1,9 +1,6 @@
-using System;
using System.Numerics;
using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using Dalamud.Game;
using Dalamud.Game.Gui;
using Dalamud.Interface.Utility;
using Dalamud.Memory;
diff --git a/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs b/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs
index dcde7d008..055cb9f49 100644
--- a/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/BranchSwitcherWindow.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -11,6 +10,7 @@ using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Windowing;
using Dalamud.Networking.Http;
+
using ImGuiNET;
using Newtonsoft.Json;
diff --git a/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs b/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs
index 8c5458557..0b704990b 100644
--- a/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/ComponentDemoWindow.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Numerics;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs
index 26af2a8b2..0ac83c126 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonLifecycleWidget.cs
@@ -1,10 +1,10 @@
using System.Diagnostics.CodeAnalysis;
-using System.Drawing;
using System.Linq;
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs
index dfa6f173d..eb1164eb2 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddressesWidget.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using Dalamud.Game;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs
index fbb945368..0efe1ae4c 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AetherytesWidget.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Aetherytes;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs
index 7725df5bf..c3305c168 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ConditionWidget.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Conditions;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs
index cc4e97779..dca5862c3 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/DtrBarWidget.cs
@@ -1,5 +1,6 @@
using Dalamud.Configuration.Internal;
using Dalamud.Game.Gui.Dtr;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs
index de9af9aa2..b36a7836c 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FateTableWidget.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Fates;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs
index ddbf61342..40275645f 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FlyTextWidget.cs
@@ -1,6 +1,7 @@
using System.Numerics;
using Dalamud.Game.Gui.FlyText;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs
index 0a8a15580..3e87540c3 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/GamepadWidget.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.GamePad;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs
index 06c691cc9..4ac37b21f 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/IconBrowserWidget.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Drawing;
using System.Linq;
using System.Numerics;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs
index 14fb7a5f2..ce56052b1 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/KeyStateWidget.cs
@@ -1,5 +1,6 @@
using Dalamud.Game.ClientState.Keys;
using Dalamud.Interface.Colors;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
index eab1ab781..41b0904df 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/NetworkMonitorWidget.cs
@@ -1,14 +1,13 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
-using System.Numerics;
using System.Text.RegularExpressions;
-using Dalamud.Data;
using Dalamud.Game.Network;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Memory;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs
index 3a6145030..d1e6bc58a 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ServicesWidget.cs
@@ -7,6 +7,7 @@ using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.IoC.Internal;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs
index 8d6879ac1..36651d43e 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/TexWidget.cs
@@ -4,8 +4,9 @@ using System.Numerics;
using Dalamud.Interface.Utility;
using Dalamud.Plugin.Services;
+
using ImGuiNET;
-using ImGuiScene;
+
using Serilog;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs
index 4bca6a839..e101fbd0b 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ToastWidget.cs
@@ -2,6 +2,7 @@
using Dalamud.Game.Gui.Toast;
using Dalamud.Interface.Utility;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs
index 3308325bc..1f8b4c62c 100644
--- a/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/UIColorWidget.cs
@@ -1,6 +1,7 @@
using System.Numerics;
using Dalamud.Data;
+
using ImGuiNET;
using Lumina.Excel.GeneratedSheets;
diff --git a/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs b/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs
index f229b1de3..1f633934f 100644
--- a/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/HitchSettingsWindow.cs
@@ -1,5 +1,6 @@
using Dalamud.Configuration.Internal;
using Dalamud.Interface.Windowing;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows;
diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelog.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelog.cs
index 4f2c70a25..cc3a3ca25 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelog.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelog.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogEntry.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogEntry.cs
index 5108a535e..d643f4230 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogEntry.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogEntry.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
+namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
///
/// Class representing a Dalamud changelog.
diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs
index a9ad0c21a..f6171e192 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/DalamudChangelogManager.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Json;
using System.Threading.Tasks;
diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/IChangelogEntry.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/IChangelogEntry.cs
index 1f5baa1be..97e615081 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstaller/IChangelogEntry.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/IChangelogEntry.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
+namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
///
/// Class representing a changelog entry.
diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs
index 6bee26755..cac249abd 100644
--- a/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/ProfileManagerWidget.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Linq;
+using System.Linq;
using System.Numerics;
using System.Threading.Tasks;
diff --git a/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs b/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs
index bfa30cafd..eac3b1862 100644
--- a/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/PluginStatWindow.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
diff --git a/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs b/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs
index 93b75976a..28dcdb117 100644
--- a/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/ProfilerWindow.cs
@@ -190,6 +190,9 @@ public class ProfilerWindow : Window
uint eventTextDepth = maxRectDept + 2;
+ var eventsXPos = new List();
+ const float eventsXPosFudge = 5f;
+
foreach (var timingEvent in Timings.Events)
{
var startX = (timingEvent.StartTime - this.min) / (this.max - this.min) * width;
@@ -214,11 +217,19 @@ public class ProfilerWindow : Window
{
textPos.X = pos.X + (uint)startX - textSize.X - padding;
}
+
+ var numClashes = eventsXPos.Count(x => Math.Abs(x - textPos.X) < textSize.X + eventsXPosFudge);
+ if (numClashes > 0)
+ {
+ textPos.Y -= numClashes * textSize.Y;
+ }
ImGui.GetWindowDrawList().AddText(
textPos,
ImGui.GetColorU32(ImGuiColors.DalamudWhite),
timingEvent.Name);
+
+ eventsXPos.Add(textPos.X);
}
}
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/AddonLifecycleAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/AddonLifecycleAgingStep.cs
index b2229e4e4..28edab88a 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/AddonLifecycleAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/AddonLifecycleAgingStep.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
-using Dalamud.Game.Addon;
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ChatAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ChatAgingStep.cs
index c7b6213d4..af26f40a1 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ChatAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ChatAgingStep.cs
@@ -1,6 +1,7 @@
using Dalamud.Game.Gui;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ConditionAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ConditionAgingStep.cs
index fee692ab8..8ce2111c9 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ConditionAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ConditionAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Conditions;
+
using ImGuiNET;
using Serilog;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/DutyStateAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/DutyStateAgingStep.cs
index 2a92d7bd3..19e218ecb 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/DutyStateAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/DutyStateAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.DutyState;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/EnterTerritoryAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/EnterTerritoryAgingStep.cs
index 4f5c758d6..a61af7f94 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/EnterTerritoryAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/EnterTerritoryAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GameConfigAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GameConfigAgingStep.cs
index 7c3145bbc..97c163590 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GameConfigAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GameConfigAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.Config;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GamepadStateAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GamepadStateAgingStep.cs
index 55e836dfb..ccee570c7 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GamepadStateAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/GamepadStateAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.GamePad;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HandledExceptionAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HandledExceptionAgingStep.cs
index 43798968e..5d2173ad5 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HandledExceptionAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HandledExceptionAgingStep.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HoverAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HoverAgingStep.cs
index b4b069487..8f509b8e7 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HoverAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/HoverAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.Gui;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ItemPayloadAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ItemPayloadAgingStep.cs
index 3c7282188..1ccb5934f 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ItemPayloadAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ItemPayloadAgingStep.cs
@@ -1,8 +1,7 @@
-using System;
-
-using Dalamud.Game.Gui;
+using Dalamud.Game.Gui;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/KeyStateAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/KeyStateAgingStep.cs
index c1ae9289a..522943e87 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/KeyStateAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/KeyStateAgingStep.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Keys;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LoginEventAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LoginEventAgingStep.cs
index 23b0b903a..d755e95ef 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LoginEventAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LoginEventAgingStep.cs
@@ -1,6 +1,5 @@
-using System;
-
using Dalamud.Game.ClientState;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LogoutEventAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LogoutEventAgingStep.cs
index c4c6ebfce..1869dd108 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LogoutEventAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/LogoutEventAgingStep.cs
@@ -1,6 +1,5 @@
-using System;
-
using Dalamud.Game.ClientState;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/PartyFinderAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/PartyFinderAgingStep.cs
index eea015ad8..f4236c4b6 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/PartyFinderAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/PartyFinderAgingStep.cs
@@ -1,5 +1,6 @@
using Dalamud.Game.Gui.PartyFinder;
using Dalamud.Game.Gui.PartyFinder.Types;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/TargetAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/TargetAgingStep.cs
index 0a1b4d91d..f8767ad53 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/TargetAgingStep.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/TargetAgingStep.cs
@@ -1,6 +1,7 @@
using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.SubKinds;
using Dalamud.Game.ClientState.Objects.Types;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps;
diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs b/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs
index 8e43d30a6..8f4a59843 100644
--- a/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/SelfTest/SelfTestWindow.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
diff --git a/Dalamud/Interface/Internal/Windows/Settings/SettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/SettingsEntry.cs
index 1e57d716e..a72cae024 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/SettingsEntry.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/SettingsEntry.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Interface.Internal.Windows.Settings;
+namespace Dalamud.Interface.Internal.Windows.Settings;
///
/// Basic, drawable settings entry.
diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs
index 7dd0fa5d1..2559911cf 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabDtr.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
@@ -9,6 +8,7 @@ using Dalamud.Game.Gui.Dtr;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Components;
using Dalamud.Interface.Utility;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Settings.Tabs;
diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs
index c706a42c1..2707f67df 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabExperimental.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.CodeAnalysis;
using CheapLoc;
using Dalamud.Configuration.Internal;
diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs
index 6adddbc82..6bce2a451 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/ButtonSettingsEntry.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.CodeAnalysis;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs
index 55deb61bc..cfb1ff39f 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/DevPluginsSettingsEntry.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
@@ -14,6 +13,7 @@ using Dalamud.Interface.Components;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Plugin.Internal;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Settings.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs
index 2dd7cc6d0..cb79000d2 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/LanguageChooserSettingsEntry.cs
@@ -1,13 +1,12 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
using System.Linq;
using CheapLoc;
using Dalamud.Configuration.Internal;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Utility;
+
using ImGuiNET;
namespace Dalamud.Interface.Internal.Windows.Settings.Widgets;
diff --git a/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs b/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs
index dcbb42089..f2a8dc46f 100644
--- a/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs
+++ b/Dalamud/Interface/Internal/Windows/Settings/Widgets/SettingsEntry{T}.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Diagnostics;
+using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
diff --git a/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs b/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs
index fb556ba45..ceb009139 100644
--- a/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs
+++ b/Dalamud/Interface/Internal/Windows/StyleEditor/StyleEditorWindow.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
@@ -6,7 +5,6 @@ using System.Reflection;
using CheapLoc;
using Dalamud.Configuration.Internal;
-using Dalamud.Data;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Components;
using Dalamud.Interface.Style;
@@ -14,7 +12,7 @@ using Dalamud.Interface.Utility;
using Dalamud.Interface.Windowing;
using Dalamud.Utility;
using ImGuiNET;
-using Lumina.Excel.GeneratedSheets;
+
using Serilog;
namespace Dalamud.Interface.Internal.Windows.StyleEditor;
diff --git a/Dalamud/Interface/Style/StyleModel.cs b/Dalamud/Interface/Style/StyleModel.cs
index 172c105b0..643fe463d 100644
--- a/Dalamud/Interface/Style/StyleModel.cs
+++ b/Dalamud/Interface/Style/StyleModel.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using System.Numerics;
diff --git a/Dalamud/Interface/Style/StyleModelV1.cs b/Dalamud/Interface/Style/StyleModelV1.cs
index ee6bb06a4..43341126e 100644
--- a/Dalamud/Interface/Style/StyleModelV1.cs
+++ b/Dalamud/Interface/Style/StyleModelV1.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Numerics;
diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs
index 9440b89e6..cc3ef8455 100644
--- a/Dalamud/Interface/UiBuilder.cs
+++ b/Dalamud/Interface/UiBuilder.cs
@@ -17,7 +17,6 @@ using Dalamud.Interface.Internal.ManagedAsserts;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.ManagedFontAtlas;
using Dalamud.Interface.ManagedFontAtlas.Internals;
-using Dalamud.Plugin;
using Dalamud.Plugin.Internal.Types;
using Dalamud.Plugin.Services;
using Dalamud.Utility;
diff --git a/Dalamud/Interface/Utility/ImGuiHelpers.cs b/Dalamud/Interface/Utility/ImGuiHelpers.cs
index 639b0315d..885f73067 100644
--- a/Dalamud/Interface/Utility/ImGuiHelpers.cs
+++ b/Dalamud/Interface/Utility/ImGuiHelpers.cs
@@ -12,6 +12,7 @@ using Dalamud.Game.ClientState.Keys;
using Dalamud.Interface.ManagedFontAtlas;
using Dalamud.Interface.ManagedFontAtlas.Internals;
using Dalamud.Interface.Utility.Raii;
+
using ImGuiNET;
using ImGuiScene;
diff --git a/Dalamud/Interface/Windowing/Window.cs b/Dalamud/Interface/Windowing/Window.cs
index a7565c294..7bf5a0363 100644
--- a/Dalamud/Interface/Windowing/Window.cs
+++ b/Dalamud/Interface/Windowing/Window.cs
@@ -11,6 +11,7 @@ using Dalamud.Interface.Colors;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Utility;
using Dalamud.Logging.Internal;
+
using FFXIVClientStructs.FFXIV.Client.UI;
using ImGuiNET;
using PInvoke;
diff --git a/Dalamud/Interface/Windowing/WindowSystem.cs b/Dalamud/Interface/Windowing/WindowSystem.cs
index 3e2a95a8d..dc4d6aca1 100644
--- a/Dalamud/Interface/Windowing/WindowSystem.cs
+++ b/Dalamud/Interface/Windowing/WindowSystem.cs
@@ -1,9 +1,9 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using Dalamud.Configuration.Internal;
using Dalamud.Interface.Internal.ManagedAsserts;
+
using ImGuiNET;
using Serilog;
diff --git a/Dalamud/IoC/Internal/InherentDependencyAttribute.cs b/Dalamud/IoC/Internal/InherentDependencyAttribute.cs
index 612a2dda6..069af38cb 100644
--- a/Dalamud/IoC/Internal/InherentDependencyAttribute.cs
+++ b/Dalamud/IoC/Internal/InherentDependencyAttribute.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.IoC.Internal;
+namespace Dalamud.IoC.Internal;
///
/// Mark a class as being dependent on a service, without actually injecting it.
diff --git a/Dalamud/IoC/Internal/InterfaceVersionAttribute.cs b/Dalamud/IoC/Internal/InterfaceVersionAttribute.cs
index db69e17aa..64870e724 100644
--- a/Dalamud/IoC/Internal/InterfaceVersionAttribute.cs
+++ b/Dalamud/IoC/Internal/InterfaceVersionAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.IoC.Internal;
///
diff --git a/Dalamud/IoC/Internal/ObjectInstance.cs b/Dalamud/IoC/Internal/ObjectInstance.cs
index 857a5b682..f636c2243 100644
--- a/Dalamud/IoC/Internal/ObjectInstance.cs
+++ b/Dalamud/IoC/Internal/ObjectInstance.cs
@@ -1,4 +1,3 @@
-using System;
using System.Reflection;
using System.Threading.Tasks;
diff --git a/Dalamud/IoC/Internal/ResolveViaAttribute.cs b/Dalamud/IoC/Internal/ResolveViaAttribute.cs
index 002878525..ffd6a36e0 100644
--- a/Dalamud/IoC/Internal/ResolveViaAttribute.cs
+++ b/Dalamud/IoC/Internal/ResolveViaAttribute.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.IoC.Internal;
+namespace Dalamud.IoC.Internal;
///
/// Indicates that an interface a service can implement can be used to resolve that service.
diff --git a/Dalamud/IoC/Internal/ServiceContainer.cs b/Dalamud/IoC/Internal/ServiceContainer.cs
index 9adf37f85..73b1c2667 100644
--- a/Dalamud/IoC/Internal/ServiceContainer.cs
+++ b/Dalamud/IoC/Internal/ServiceContainer.cs
@@ -3,7 +3,6 @@ using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
using System.Threading.Tasks;
using Dalamud.Logging.Internal;
diff --git a/Dalamud/IoC/Internal/ServiceScope.cs b/Dalamud/IoC/Internal/ServiceScope.cs
index 9fcf1af3c..759819fe9 100644
--- a/Dalamud/IoC/Internal/ServiceScope.cs
+++ b/Dalamud/IoC/Internal/ServiceScope.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
diff --git a/Dalamud/IoC/PluginInterfaceAttribute.cs b/Dalamud/IoC/PluginInterfaceAttribute.cs
index 1711a5e84..1a5189950 100644
--- a/Dalamud/IoC/PluginInterfaceAttribute.cs
+++ b/Dalamud/IoC/PluginInterfaceAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.IoC;
///
diff --git a/Dalamud/IoC/PluginServiceAttribute.cs b/Dalamud/IoC/PluginServiceAttribute.cs
index 84d500cb3..8a27de512 100644
--- a/Dalamud/IoC/PluginServiceAttribute.cs
+++ b/Dalamud/IoC/PluginServiceAttribute.cs
@@ -1,6 +1,4 @@
-using System;
-
-using JetBrains.Annotations;
+using JetBrains.Annotations;
namespace Dalamud.IoC;
diff --git a/Dalamud/IoC/RequiredVersionAttribute.cs b/Dalamud/IoC/RequiredVersionAttribute.cs
index 97aca56bb..b1b573b2a 100644
--- a/Dalamud/IoC/RequiredVersionAttribute.cs
+++ b/Dalamud/IoC/RequiredVersionAttribute.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.IoC;
///
diff --git a/Dalamud/Localization.cs b/Dalamud/Localization.cs
index 7b2ac62e7..a50b6081f 100644
--- a/Dalamud/Localization.cs
+++ b/Dalamud/Localization.cs
@@ -1,4 +1,3 @@
-using System;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -6,6 +5,7 @@ using System.Reflection;
using CheapLoc;
using Dalamud.Configuration.Internal;
+
using Serilog;
namespace Dalamud;
diff --git a/Dalamud/Logging/Internal/SerilogEventSink.cs b/Dalamud/Logging/Internal/SerilogEventSink.cs
index 14baca456..fd0c57892 100644
--- a/Dalamud/Logging/Internal/SerilogEventSink.cs
+++ b/Dalamud/Logging/Internal/SerilogEventSink.cs
@@ -1,5 +1,3 @@
-using System;
-
using Serilog.Core;
using Serilog.Events;
diff --git a/Dalamud/Logging/Retention/RetentionBehaviour.cs b/Dalamud/Logging/Retention/RetentionBehaviour.cs
index 66c4c5f97..e0d332355 100644
--- a/Dalamud/Logging/Retention/RetentionBehaviour.cs
+++ b/Dalamud/Logging/Retention/RetentionBehaviour.cs
@@ -1,5 +1,4 @@
-using System;
-using System.IO;
+using System.IO;
using Serilog;
diff --git a/Dalamud/Logging/ScopedPluginLogService.cs b/Dalamud/Logging/ScopedPluginLogService.cs
index 0c044f2c2..b7930fb58 100644
--- a/Dalamud/Logging/ScopedPluginLogService.cs
+++ b/Dalamud/Logging/ScopedPluginLogService.cs
@@ -2,6 +2,7 @@
using Dalamud.IoC.Internal;
using Dalamud.Plugin.Internal.Types;
using Dalamud.Plugin.Services;
+
using Serilog;
using Serilog.Core;
using Serilog.Events;
diff --git a/Dalamud/Memory/Exceptions/MemoryAllocationException.cs b/Dalamud/Memory/Exceptions/MemoryAllocationException.cs
index efa875def..3f3a1b997 100644
--- a/Dalamud/Memory/Exceptions/MemoryAllocationException.cs
+++ b/Dalamud/Memory/Exceptions/MemoryAllocationException.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Runtime.Serialization;
-
namespace Dalamud.Memory.Exceptions;
///
diff --git a/Dalamud/Memory/Exceptions/MemoryException.cs b/Dalamud/Memory/Exceptions/MemoryException.cs
index 117a13c6b..aefc6bd63 100644
--- a/Dalamud/Memory/Exceptions/MemoryException.cs
+++ b/Dalamud/Memory/Exceptions/MemoryException.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Runtime.Serialization;
-
namespace Dalamud.Memory.Exceptions;
///
diff --git a/Dalamud/Memory/Exceptions/MemoryPermissionException.cs b/Dalamud/Memory/Exceptions/MemoryPermissionException.cs
index abc749740..5224bb844 100644
--- a/Dalamud/Memory/Exceptions/MemoryPermissionException.cs
+++ b/Dalamud/Memory/Exceptions/MemoryPermissionException.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Runtime.Serialization;
-
namespace Dalamud.Memory.Exceptions;
///
diff --git a/Dalamud/Memory/Exceptions/MemoryReadException.cs b/Dalamud/Memory/Exceptions/MemoryReadException.cs
index f0b79075d..66eb19551 100644
--- a/Dalamud/Memory/Exceptions/MemoryReadException.cs
+++ b/Dalamud/Memory/Exceptions/MemoryReadException.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Runtime.Serialization;
-
namespace Dalamud.Memory.Exceptions;
///
diff --git a/Dalamud/Memory/Exceptions/MemoryWriteException.cs b/Dalamud/Memory/Exceptions/MemoryWriteException.cs
index 87011edd3..4b2fa7728 100644
--- a/Dalamud/Memory/Exceptions/MemoryWriteException.cs
+++ b/Dalamud/Memory/Exceptions/MemoryWriteException.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Runtime.Serialization;
-
namespace Dalamud.Memory.Exceptions;
///
diff --git a/Dalamud/Memory/MemoryProtection.cs b/Dalamud/Memory/MemoryProtection.cs
index 019b656e8..ba196b2e6 100644
--- a/Dalamud/Memory/MemoryProtection.cs
+++ b/Dalamud/Memory/MemoryProtection.cs
@@ -1,5 +1,3 @@
-using System;
-
// This is a copy from NativeFunctions.MemoryProtection
namespace Dalamud.Memory;
diff --git a/Dalamud/NativeFunctions.cs b/Dalamud/NativeFunctions.cs
index 14a39a6be..32ab99372 100644
--- a/Dalamud/NativeFunctions.cs
+++ b/Dalamud/NativeFunctions.cs
@@ -1,4 +1,3 @@
-using System;
using System.Diagnostics.CodeAnalysis;
using System.Net.Sockets;
using System.Runtime.InteropServices;
diff --git a/Dalamud/NativeMethods.txt b/Dalamud/NativeMethods.txt
index 18143e1af..c42e76c1c 100644
--- a/Dalamud/NativeMethods.txt
+++ b/Dalamud/NativeMethods.txt
@@ -3,3 +3,11 @@ FILE_ACCESS_RIGHTS
MoveFileEx
FlushFileBuffers
WriteFile
+
+SetWindowPos
+SetForegroundWindow
+SetFocus
+SetActiveWindow
+HWND_TOPMOST
+HWND_NOTOPMOST
+SET_WINDOW_POS_FLAGS
diff --git a/Dalamud/Networking/Http/HappyEyeballsCallback.cs b/Dalamud/Networking/Http/HappyEyeballsCallback.cs
index 7ca77576c..4e3ee61f6 100644
--- a/Dalamud/Networking/Http/HappyEyeballsCallback.cs
+++ b/Dalamud/Networking/Http/HappyEyeballsCallback.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
diff --git a/Dalamud/Networking/Http/HappyHttpClient.cs b/Dalamud/Networking/Http/HappyHttpClient.cs
index 37e327e84..aeed98695 100644
--- a/Dalamud/Networking/Http/HappyHttpClient.cs
+++ b/Dalamud/Networking/Http/HappyHttpClient.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Net;
+using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs
index 364d65600..7111fcdc2 100644
--- a/Dalamud/Plugin/DalamudPluginInterface.cs
+++ b/Dalamud/Plugin/DalamudPluginInterface.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -25,7 +24,6 @@ using Dalamud.Plugin.Internal.Types.Manifest;
using Dalamud.Plugin.Ipc;
using Dalamud.Plugin.Ipc.Exceptions;
using Dalamud.Plugin.Ipc.Internal;
-using Dalamud.Utility;
namespace Dalamud.Plugin;
diff --git a/Dalamud/Plugin/IDalamudPlugin.cs b/Dalamud/Plugin/IDalamudPlugin.cs
index b48d55d1c..ebf39708f 100644
--- a/Dalamud/Plugin/IDalamudPlugin.cs
+++ b/Dalamud/Plugin/IDalamudPlugin.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin;
///
diff --git a/Dalamud/Plugin/InstalledPluginState.cs b/Dalamud/Plugin/InstalledPluginState.cs
index ba9e6f879..79b9de1ee 100644
--- a/Dalamud/Plugin/InstalledPluginState.cs
+++ b/Dalamud/Plugin/InstalledPluginState.cs
@@ -1,6 +1,4 @@
-using System;
-
-using Dalamud.Utility;
+using Dalamud.Utility;
namespace Dalamud.Plugin;
diff --git a/Dalamud/Plugin/Internal/Exceptions/PluginException.cs b/Dalamud/Plugin/Internal/Exceptions/PluginException.cs
index 292be5431..ff1f324ea 100644
--- a/Dalamud/Plugin/Internal/Exceptions/PluginException.cs
+++ b/Dalamud/Plugin/Internal/Exceptions/PluginException.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Internal.Exceptions;
///
diff --git a/Dalamud/Plugin/Internal/Loader/AssemblyLoadContextBuilder.cs b/Dalamud/Plugin/Internal/Loader/AssemblyLoadContextBuilder.cs
index 1a6830a3a..1c6e6feed 100644
--- a/Dalamud/Plugin/Internal/Loader/AssemblyLoadContextBuilder.cs
+++ b/Dalamud/Plugin/Internal/Loader/AssemblyLoadContextBuilder.cs
@@ -1,7 +1,6 @@
// Copyright (c) Nate McMaster, Dalamud contributors.
// Licensed under the Apache License, Version 2.0. See License.txt in the Loader root for license information.
-using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
diff --git a/Dalamud/Plugin/Internal/Loader/LibraryModel/ManagedLibrary.cs b/Dalamud/Plugin/Internal/Loader/LibraryModel/ManagedLibrary.cs
index 386184c28..77672700c 100644
--- a/Dalamud/Plugin/Internal/Loader/LibraryModel/ManagedLibrary.cs
+++ b/Dalamud/Plugin/Internal/Loader/LibraryModel/ManagedLibrary.cs
@@ -1,7 +1,6 @@
// Copyright (c) Nate McMaster, Dalamud contributors.
// Licensed under the Apache License, Version 2.0. See License.txt in the Loader root for license information.
-using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
diff --git a/Dalamud/Plugin/Internal/Loader/LibraryModel/NativeLibrary.cs b/Dalamud/Plugin/Internal/Loader/LibraryModel/NativeLibrary.cs
index 47b9f701d..42b57502b 100644
--- a/Dalamud/Plugin/Internal/Loader/LibraryModel/NativeLibrary.cs
+++ b/Dalamud/Plugin/Internal/Loader/LibraryModel/NativeLibrary.cs
@@ -1,7 +1,6 @@
// Copyright (c) Nate McMaster, Dalamud contributors.
// Licensed under the Apache License, Version 2.0. See License.txt in the Loader root for license information.
-using System;
using System.Diagnostics;
using System.IO;
diff --git a/Dalamud/Plugin/Internal/Loader/LoaderConfig.cs b/Dalamud/Plugin/Internal/Loader/LoaderConfig.cs
index 0b2150069..b863b8ee1 100644
--- a/Dalamud/Plugin/Internal/Loader/LoaderConfig.cs
+++ b/Dalamud/Plugin/Internal/Loader/LoaderConfig.cs
@@ -1,7 +1,6 @@
// Copyright (c) Nate McMaster, Dalamud contributors.
// Licensed under the Apache License, Version 2.0. See License.txt in the Loader root for license information.
-using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
diff --git a/Dalamud/Plugin/Internal/Loader/ManagedLoadContext.cs b/Dalamud/Plugin/Internal/Loader/ManagedLoadContext.cs
index e0629217a..4ea4eb5c4 100644
--- a/Dalamud/Plugin/Internal/Loader/ManagedLoadContext.cs
+++ b/Dalamud/Plugin/Internal/Loader/ManagedLoadContext.cs
@@ -1,7 +1,6 @@
// Copyright (c) Nate McMaster, Dalamud contributors.
// Licensed under the Apache License, Version 2.0. See License.txt in the Loader root for license information.
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
diff --git a/Dalamud/Plugin/Internal/Loader/PluginLoader.cs b/Dalamud/Plugin/Internal/Loader/PluginLoader.cs
index 63b47cf17..54b9cad4b 100644
--- a/Dalamud/Plugin/Internal/Loader/PluginLoader.cs
+++ b/Dalamud/Plugin/Internal/Loader/PluginLoader.cs
@@ -1,7 +1,6 @@
// Copyright (c) Nate McMaster, Dalamud team.
// Licensed under the Apache License, Version 2.0. See License.txt in the Loader root for license information.
-using System.IO;
using System.Reflection;
using System.Runtime.Loader;
diff --git a/Dalamud/Plugin/Internal/PluginManager.cs b/Dalamud/Plugin/Internal/PluginManager.cs
index 5924a4e08..266c26b9b 100644
--- a/Dalamud/Plugin/Internal/PluginManager.cs
+++ b/Dalamud/Plugin/Internal/PluginManager.cs
@@ -22,7 +22,6 @@ using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Internal.Windows.PluginInstaller;
using Dalamud.IoC;
-using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
using Dalamud.Networking.Http;
using Dalamud.Plugin.Internal.Exceptions;
@@ -42,8 +41,8 @@ namespace Dalamud.Plugin.Internal;
/// NOTE: ALL plugin exposed services are marked as dependencies for
/// from .
///
-[ServiceManager.BlockingEarlyLoadedService("Accomodation of plugins that blocks the game startup.")]
-internal partial class PluginManager : IInternalDisposableService
+[ServiceManager.BlockingEarlyLoadedService("Accommodation of plugins that blocks the game startup.")]
+internal class PluginManager : IInternalDisposableService
{
///
/// Default time to wait between plugin unload and plugin assembly unload.
@@ -245,6 +244,11 @@ internal partial class PluginManager : IInternalDisposableService
/// Gets or sets a value indicating whether banned plugins will be loaded.
///
public bool LoadBannedPlugins { get; set; }
+
+ ///
+ /// Gets a tracker for plugins that are loading at startup, used to display information to the user.
+ ///
+ public StartupLoadTracker? StartupLoadTracking { get; private set; }
///
/// Gets a value indicating whether the given repo manifest should be visible to the user.
@@ -632,6 +636,15 @@ internal partial class PluginManager : IInternalDisposableService
Log.Information($"============= LoadPluginsAsync({logPrefix}) END =============");
}
+ // Initialize the startup load tracker for all LoadSync plugins
+ {
+ this.StartupLoadTracking = new();
+ foreach (var pluginDef in pluginDefs.Where(x => x.Manifest.LoadSync))
+ {
+ this.StartupLoadTracking.Add(pluginDef.Manifest!.InternalName, pluginDef.Manifest.Name);
+ }
+ }
+
var syncPlugins = pluginDefs.Where(def => def.Manifest?.LoadSync == true).ToList();
var asyncPlugins = pluginDefs.Where(def => def.Manifest?.LoadSync != true).ToList();
var loadTasks = new List();
@@ -702,6 +715,8 @@ internal partial class PluginManager : IInternalDisposableService
{
Log.Error(ex, "Plugin and profile validation failed!");
}
+
+ this.StartupLoadTracking = null;
},
tokenSource.Token);
}
@@ -1689,6 +1704,10 @@ internal partial class PluginManager : IInternalDisposableService
this.installedPluginsList.Add(plugin);
}
+ // Mark as finished loading
+ if (manifest.LoadSync)
+ this.StartupLoadTracking?.Finish(manifest.InternalName);
+
return plugin;
}
@@ -1782,7 +1801,16 @@ internal partial class PluginManager : IInternalDisposableService
using (Timings.Start("PM Load Sync Plugins"))
{
- this.LoadAllPlugins().Wait();
+ var loadAllPlugins = Task.Run(this.LoadAllPlugins);
+
+ // We wait for all blocking services and tasks to finish before kicking off the main thread in any mode.
+ // This means that we don't want to block here if this stupid thing isn't enabled.
+ if (this.configuration.IsResumeGameAfterPluginLoad)
+ {
+ Log.Verbose("Waiting for all plugins to load before resuming game");
+ loadAllPlugins.Wait();
+ }
+
Log.Information("[T3] PML OK!");
}
@@ -1793,6 +1821,63 @@ internal partial class PluginManager : IInternalDisposableService
Log.Error(ex, "Plugin load failed");
}
}
+
+ ///
+ /// Simple class that tracks the internal names and public names of plugins that we are planning to load at startup,
+ /// and are still actively loading.
+ ///
+ public class StartupLoadTracker
+ {
+ private readonly Dictionary internalToPublic = new();
+ private readonly ConcurrentBag allInternalNames = new();
+ private readonly ConcurrentBag finishedInternalNames = new();
+
+ ///
+ /// Gets a value indicating the total load progress.
+ ///
+ public float Progress => (float)this.finishedInternalNames.Count / this.allInternalNames.Count;
+
+ ///
+ /// Calculate a set of internal names that are still pending.
+ ///
+ /// Set of pending InternalNames.
+ public IReadOnlySet GetPendingInternalNames()
+ {
+ var pending = new HashSet(this.allInternalNames);
+ pending.ExceptWith(this.finishedInternalNames);
+ return pending;
+ }
+
+ ///
+ /// Track a new plugin.
+ ///
+ /// The plugin's internal name.
+ /// The plugin's public name.
+ public void Add(string internalName, string publicName)
+ {
+ this.internalToPublic[internalName] = publicName;
+ this.allInternalNames.Add(internalName);
+ }
+
+ ///
+ /// Mark a plugin as finished loading.
+ ///
+ /// The internal name of the plugin.
+ public void Finish(string internalName)
+ {
+ this.finishedInternalNames.Add(internalName);
+ }
+
+ ///
+ /// Get the public name for a given internal name.
+ ///
+ /// The internal name to look up.
+ /// The public name.
+ public string? GetPublicName(string internalName)
+ {
+ return this.internalToPublic.TryGetValue(internalName, out var publicName) ? publicName : null;
+ }
+ }
private static class Locs
{
diff --git a/Dalamud/Plugin/Internal/Profiles/Profile.cs b/Dalamud/Plugin/Internal/Profiles/Profile.cs
index 6319cca0d..2c254167e 100644
--- a/Dalamud/Plugin/Internal/Profiles/Profile.cs
+++ b/Dalamud/Plugin/Internal/Profiles/Profile.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
diff --git a/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs b/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs
index ee8505174..d9c5ac787 100644
--- a/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs
+++ b/Dalamud/Plugin/Internal/Profiles/ProfileManager.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
diff --git a/Dalamud/Plugin/Internal/Types/BannedPlugin.cs b/Dalamud/Plugin/Internal/Types/BannedPlugin.cs
index 1d5f956b3..a21bbf02b 100644
--- a/Dalamud/Plugin/Internal/Types/BannedPlugin.cs
+++ b/Dalamud/Plugin/Internal/Types/BannedPlugin.cs
@@ -1,5 +1,3 @@
-using System;
-
using Newtonsoft.Json;
namespace Dalamud.Plugin.Internal.Types;
diff --git a/Dalamud/Plugin/Internal/Types/LocalDevPlugin.cs b/Dalamud/Plugin/Internal/Types/LocalDevPlugin.cs
index 9f7c761de..ab7b86021 100644
--- a/Dalamud/Plugin/Internal/Types/LocalDevPlugin.cs
+++ b/Dalamud/Plugin/Internal/Types/LocalDevPlugin.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
diff --git a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs
index 0c8777cfe..9f60ddc97 100644
--- a/Dalamud/Plugin/Internal/Types/LocalPlugin.cs
+++ b/Dalamud/Plugin/Internal/Types/LocalPlugin.cs
@@ -4,11 +4,9 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
-using Dalamud.Common.Game;
using Dalamud.Configuration.Internal;
using Dalamud.Game;
using Dalamud.Game.Gui.Dtr;
-using Dalamud.Interface.GameFonts;
using Dalamud.Interface.Internal;
using Dalamud.IoC.Internal;
using Dalamud.Logging.Internal;
diff --git a/Dalamud/Plugin/Internal/Types/Manifest/ILocalPluginManifest.cs b/Dalamud/Plugin/Internal/Types/Manifest/ILocalPluginManifest.cs
index 5b147dde1..2db1e5aad 100644
--- a/Dalamud/Plugin/Internal/Types/Manifest/ILocalPluginManifest.cs
+++ b/Dalamud/Plugin/Internal/Types/Manifest/ILocalPluginManifest.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Dalamud.Plugin.Internal.Types.Manifest;
+namespace Dalamud.Plugin.Internal.Types.Manifest;
///
/// Public interface for the local plugin manifest.
diff --git a/Dalamud/Plugin/Internal/Types/Manifest/IPluginManifest.cs b/Dalamud/Plugin/Internal/Types/Manifest/IPluginManifest.cs
index 9e052efad..59b2ff34a 100644
--- a/Dalamud/Plugin/Internal/Types/Manifest/IPluginManifest.cs
+++ b/Dalamud/Plugin/Internal/Types/Manifest/IPluginManifest.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace Dalamud.Plugin.Internal.Types.Manifest;
diff --git a/Dalamud/Plugin/Internal/Types/Manifest/LocalPluginManifest.cs b/Dalamud/Plugin/Internal/Types/Manifest/LocalPluginManifest.cs
index b7fe6d062..1a0ab8faa 100644
--- a/Dalamud/Plugin/Internal/Types/Manifest/LocalPluginManifest.cs
+++ b/Dalamud/Plugin/Internal/Types/Manifest/LocalPluginManifest.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
using Dalamud.Utility;
diff --git a/Dalamud/Plugin/Internal/Types/PluginPatchData.cs b/Dalamud/Plugin/Internal/Types/PluginPatchData.cs
index d95c1e62c..f713e4df0 100644
--- a/Dalamud/Plugin/Internal/Types/PluginPatchData.cs
+++ b/Dalamud/Plugin/Internal/Types/PluginPatchData.cs
@@ -1,4 +1,3 @@
-using System;
using System.IO;
namespace Dalamud.Plugin.Internal.Types;
diff --git a/Dalamud/Plugin/Internal/Types/PluginRepository.cs b/Dalamud/Plugin/Internal/Types/PluginRepository.cs
index 8de25aa08..2f63070c3 100644
--- a/Dalamud/Plugin/Internal/Types/PluginRepository.cs
+++ b/Dalamud/Plugin/Internal/Types/PluginRepository.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
diff --git a/Dalamud/Plugin/Ipc/Exceptions/DataCacheCreationError.cs b/Dalamud/Plugin/Ipc/Exceptions/DataCacheCreationError.cs
index 0dafc88aa..db095bad9 100644
--- a/Dalamud/Plugin/Ipc/Exceptions/DataCacheCreationError.cs
+++ b/Dalamud/Plugin/Ipc/Exceptions/DataCacheCreationError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Ipc.Exceptions;
///
diff --git a/Dalamud/Plugin/Ipc/Exceptions/DataCacheTypeMismatchError.cs b/Dalamud/Plugin/Ipc/Exceptions/DataCacheTypeMismatchError.cs
index 4db731687..e5d9cc4db 100644
--- a/Dalamud/Plugin/Ipc/Exceptions/DataCacheTypeMismatchError.cs
+++ b/Dalamud/Plugin/Ipc/Exceptions/DataCacheTypeMismatchError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Ipc.Exceptions;
///
diff --git a/Dalamud/Plugin/Ipc/Exceptions/DataCacheValueNullError.cs b/Dalamud/Plugin/Ipc/Exceptions/DataCacheValueNullError.cs
index daa8bf509..f81a7c324 100644
--- a/Dalamud/Plugin/Ipc/Exceptions/DataCacheValueNullError.cs
+++ b/Dalamud/Plugin/Ipc/Exceptions/DataCacheValueNullError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Ipc.Exceptions;
///
diff --git a/Dalamud/Plugin/Ipc/Exceptions/IpcError.cs b/Dalamud/Plugin/Ipc/Exceptions/IpcError.cs
index 5cc0ccae9..0212bd673 100644
--- a/Dalamud/Plugin/Ipc/Exceptions/IpcError.cs
+++ b/Dalamud/Plugin/Ipc/Exceptions/IpcError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Ipc.Exceptions;
///
diff --git a/Dalamud/Plugin/Ipc/Exceptions/IpcTypeMismatchError.cs b/Dalamud/Plugin/Ipc/Exceptions/IpcTypeMismatchError.cs
index 1aa191b78..abe6e70b8 100644
--- a/Dalamud/Plugin/Ipc/Exceptions/IpcTypeMismatchError.cs
+++ b/Dalamud/Plugin/Ipc/Exceptions/IpcTypeMismatchError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Ipc.Exceptions;
///
diff --git a/Dalamud/Plugin/Ipc/Exceptions/IpcValueNullError.cs b/Dalamud/Plugin/Ipc/Exceptions/IpcValueNullError.cs
index f5a764387..50f9dcaba 100644
--- a/Dalamud/Plugin/Ipc/Exceptions/IpcValueNullError.cs
+++ b/Dalamud/Plugin/Ipc/Exceptions/IpcValueNullError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace Dalamud.Plugin.Ipc.Exceptions;
///
diff --git a/Dalamud/Plugin/Ipc/ICallGateProvider.cs b/Dalamud/Plugin/Ipc/ICallGateProvider.cs
index 333878d07..cf4c59b2e 100644
--- a/Dalamud/Plugin/Ipc/ICallGateProvider.cs
+++ b/Dalamud/Plugin/Ipc/ICallGateProvider.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Plugin.Ipc.Internal;
#pragma warning disable SA1402 // File may only contain a single type
diff --git a/Dalamud/Plugin/Ipc/ICallGateSubscriber.cs b/Dalamud/Plugin/Ipc/ICallGateSubscriber.cs
index 94afa200a..40d642a61 100644
--- a/Dalamud/Plugin/Ipc/ICallGateSubscriber.cs
+++ b/Dalamud/Plugin/Ipc/ICallGateSubscriber.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Plugin.Ipc.Internal;
#pragma warning disable SA1402 // File may only contain a single type
diff --git a/Dalamud/Plugin/Ipc/Internal/DataShare.cs b/Dalamud/Plugin/Ipc/Internal/DataShare.cs
index 0d3eb1a10..8ce5ddb95 100644
--- a/Dalamud/Plugin/Ipc/Internal/DataShare.cs
+++ b/Dalamud/Plugin/Ipc/Internal/DataShare.cs
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Dalamud.Plugin.Ipc.Exceptions;
+
using Serilog;
namespace Dalamud.Plugin.Ipc.Internal;
diff --git a/Dalamud/Plugin/Services/IAddonEventManager.cs b/Dalamud/Plugin/Services/IAddonEventManager.cs
index e696bbaae..c6ec5a941 100644
--- a/Dalamud/Plugin/Services/IAddonEventManager.cs
+++ b/Dalamud/Plugin/Services/IAddonEventManager.cs
@@ -1,5 +1,4 @@
-using Dalamud.Game.Addon;
-using Dalamud.Game.Addon.Events;
+using Dalamud.Game.Addon.Events;
namespace Dalamud.Plugin.Services;
diff --git a/Dalamud/Plugin/Services/IAddonLifecycle.cs b/Dalamud/Plugin/Services/IAddonLifecycle.cs
index 6f44349d5..ebf629b85 100644
--- a/Dalamud/Plugin/Services/IAddonLifecycle.cs
+++ b/Dalamud/Plugin/Services/IAddonLifecycle.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using Dalamud.Game.Addon;
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
diff --git a/Dalamud/Plugin/Services/IBuddyList.cs b/Dalamud/Plugin/Services/IBuddyList.cs
index f273d71c9..f5b9651a2 100644
--- a/Dalamud/Plugin/Services/IBuddyList.cs
+++ b/Dalamud/Plugin/Services/IBuddyList.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using Dalamud.Game.ClientState.Buddy;
diff --git a/Dalamud/Plugin/Services/IClientState.cs b/Dalamud/Plugin/Services/IClientState.cs
index 50e31fad0..95d5259e6 100644
--- a/Dalamud/Plugin/Services/IClientState.cs
+++ b/Dalamud/Plugin/Services/IClientState.cs
@@ -1,5 +1,3 @@
-using System;
-
using Dalamud.Game.ClientState.Objects.SubKinds;
namespace Dalamud.Plugin.Services;
diff --git a/Dalamud/Plugin/Services/IDtrBar.cs b/Dalamud/Plugin/Services/IDtrBar.cs
index 6019bb1e6..ae2fe560b 100644
--- a/Dalamud/Plugin/Services/IDtrBar.cs
+++ b/Dalamud/Plugin/Services/IDtrBar.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using Dalamud.Game.Gui.Dtr;
using Dalamud.Game.Text.SeStringHandling;
diff --git a/Dalamud/Plugin/Services/IGameConfig.cs b/Dalamud/Plugin/Services/IGameConfig.cs
index c69fa906a..ed70b5753 100644
--- a/Dalamud/Plugin/Services/IGameConfig.cs
+++ b/Dalamud/Plugin/Services/IGameConfig.cs
@@ -1,5 +1,4 @@
using System.Diagnostics;
-using System.Threading.Tasks;
using Dalamud.Game.Config;
using Dalamud.Plugin.Internal.Types;
diff --git a/Dalamud/Plugin/Services/IGameGui.cs b/Dalamud/Plugin/Services/IGameGui.cs
index ddb0ec67c..0e2da7874 100644
--- a/Dalamud/Plugin/Services/IGameGui.cs
+++ b/Dalamud/Plugin/Services/IGameGui.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Numerics;
+using System.Numerics;
using Dalamud.Game.Gui;
using Dalamud.Game.Text.SeStringHandling.Payloads;
diff --git a/Dalamud/Plugin/Services/IPluginLog.cs b/Dalamud/Plugin/Services/IPluginLog.cs
index aac321092..dcba5bb29 100644
--- a/Dalamud/Plugin/Services/IPluginLog.cs
+++ b/Dalamud/Plugin/Services/IPluginLog.cs
@@ -1,5 +1,4 @@
-using Serilog;
-using Serilog.Events;
+using Serilog.Events;
#pragma warning disable CS1573 // See https://github.com/dotnet/roslyn/issues/40325
diff --git a/Dalamud/Plugin/Services/ISigScanner.cs b/Dalamud/Plugin/Services/ISigScanner.cs
index c3bb7d6c1..1aedb01fd 100644
--- a/Dalamud/Plugin/Services/ISigScanner.cs
+++ b/Dalamud/Plugin/Services/ISigScanner.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Diagnostics;
+using System.Diagnostics;
namespace Dalamud.Game;
diff --git a/Dalamud/Plugin/Services/ITextureProvider.cs b/Dalamud/Plugin/Services/ITextureProvider.cs
index f91d4ee8e..dc8ae1f86 100644
--- a/Dalamud/Plugin/Services/ITextureProvider.cs
+++ b/Dalamud/Plugin/Services/ITextureProvider.cs
@@ -1,5 +1,4 @@
-using System;
-using System.IO;
+using System.IO;
using Dalamud.Interface.Internal;
using Lumina.Data.Files;
diff --git a/Dalamud/Plugin/Services/ITitleScreenMenu.cs b/Dalamud/Plugin/Services/ITitleScreenMenu.cs
index b4af06e71..9db8c70e4 100644
--- a/Dalamud/Plugin/Services/ITitleScreenMenu.cs
+++ b/Dalamud/Plugin/Services/ITitleScreenMenu.cs
@@ -2,7 +2,6 @@
using Dalamud.Interface;
using Dalamud.Interface.Internal;
-using ImGuiScene;
namespace Dalamud.Plugin.Services;
diff --git a/Dalamud/SafeMemory.cs b/Dalamud/SafeMemory.cs
index 4b2a981bd..3365ff118 100644
--- a/Dalamud/SafeMemory.cs
+++ b/Dalamud/SafeMemory.cs
@@ -1,4 +1,3 @@
-using System;
using System.Runtime.InteropServices;
using System.Text;
diff --git a/Dalamud/IServiceType.cs b/Dalamud/Service/IServiceType.cs
similarity index 100%
rename from Dalamud/IServiceType.cs
rename to Dalamud/Service/IServiceType.cs
diff --git a/Dalamud/Service/LoadingDialog.cs b/Dalamud/Service/LoadingDialog.cs
new file mode 100644
index 000000000..64af02171
--- /dev/null
+++ b/Dalamud/Service/LoadingDialog.cs
@@ -0,0 +1,252 @@
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using Dalamud.Plugin.Internal;
+using Dalamud.Utility;
+using Windows.Win32.Foundation;
+using Windows.Win32.UI.WindowsAndMessaging;
+
+namespace Dalamud;
+
+///
+/// Class providing an early-loading dialog.
+///
+internal class LoadingDialog
+{
+ // TODO: We can't localize any of what's in here at the moment, because Localization is an EarlyLoadedService.
+
+ private static int wasGloballyHidden = 0;
+
+ private Thread? thread;
+ private TaskDialogButton? inProgressHideButton;
+ private TaskDialogPage? page;
+ private bool canHide;
+ private State currentState = State.LoadingDalamud;
+ private DateTime firstShowTime;
+
+ ///
+ /// Enum representing the state of the dialog.
+ ///
+ public enum State
+ {
+ ///
+ /// Show a message stating that Dalamud is currently loading.
+ ///
+ LoadingDalamud,
+
+ ///
+ /// Show a message stating that Dalamud is currently loading plugins.
+ ///
+ LoadingPlugins,
+
+ ///
+ /// Show a message stating that Dalamud is currently updating plugins.
+ ///
+ AutoUpdatePlugins,
+ }
+
+ ///
+ /// Gets or sets the current state of the dialog.
+ ///
+ public State CurrentState
+ {
+ get => this.currentState;
+ set
+ {
+ this.currentState = value;
+ this.UpdatePage();
+ }
+ }
+
+ ///
+ /// Gets or sets a value indicating whether or not the dialog can be hidden by the user.
+ ///
+ /// Thrown if called before the dialog has been created.
+ public bool CanHide
+ {
+ get => this.canHide;
+ set
+ {
+ this.canHide = value;
+ this.UpdatePage();
+ }
+ }
+
+ ///
+ /// Show the dialog.
+ ///
+ public void Show()
+ {
+ if (Volatile.Read(ref wasGloballyHidden) == 1)
+ return;
+
+ if (this.thread?.IsAlive == true)
+ return;
+
+ this.thread = new Thread(this.ThreadStart)
+ {
+ Name = "Dalamud Loading Dialog",
+ };
+ this.thread.SetApartmentState(ApartmentState.STA);
+ this.thread.Start();
+
+ this.firstShowTime = DateTime.Now;
+ }
+
+ ///
+ /// Hide the dialog.
+ ///
+ public void HideAndJoin()
+ {
+ if (this.thread == null || !this.thread.IsAlive)
+ return;
+
+ this.inProgressHideButton?.PerformClick();
+ this.thread!.Join();
+ }
+
+ private void UpdatePage()
+ {
+ if (this.page == null)
+ return;
+
+ this.page.Heading = this.currentState switch
+ {
+ State.LoadingDalamud => "Dalamud is loading...",
+ State.LoadingPlugins => "Waiting for plugins to load...",
+ State.AutoUpdatePlugins => "Updating plugins...",
+ _ => throw new ArgumentOutOfRangeException(),
+ };
+
+ var context = string.Empty;
+ if (this.currentState == State.LoadingPlugins)
+ {
+ context = "\nPreparing...";
+
+ var tracker = Service.GetNullable()?.StartupLoadTracking;
+ if (tracker != null)
+ {
+ var nameString = tracker.GetPendingInternalNames()
+ .Select(x => tracker.GetPublicName(x))
+ .Where(x => x != null)
+ .Aggregate(string.Empty, (acc, x) => acc + x + ", ");
+
+ if (!nameString.IsNullOrEmpty())
+ context = $"\nWaiting for: {nameString[..^2]}";
+ }
+ }
+
+ // Add some text if loading takes more than a few minutes
+ if (DateTime.Now - this.firstShowTime > TimeSpan.FromMinutes(3))
+ context += "\nIt's been a while now. Please report this issue on our Discord server.";
+
+ this.page.Text = this.currentState switch
+ {
+ State.LoadingDalamud => "Please wait while Dalamud loads...",
+ State.LoadingPlugins => "Please wait while Dalamud loads plugins...",
+ State.AutoUpdatePlugins => "Please wait while Dalamud updates your plugins...",
+ _ => throw new ArgumentOutOfRangeException(),
+#pragma warning disable SA1513
+ } + context;
+#pragma warning restore SA1513
+
+ this.inProgressHideButton!.Enabled = this.canHide;
+ }
+
+ private async Task DialogStatePeriodicUpdate(CancellationToken token)
+ {
+ using var timer = new PeriodicTimer(TimeSpan.FromMilliseconds(50));
+ while (!token.IsCancellationRequested)
+ {
+ await timer.WaitForNextTickAsync(token);
+ this.UpdatePage();
+ }
+ }
+
+ private void ThreadStart()
+ {
+ Application.EnableVisualStyles();
+
+ this.inProgressHideButton = new TaskDialogButton("Hide", this.canHide);
+
+ // We don't have access to the asset service here.
+ var workingDirectory = Service.Get().StartInfo.WorkingDirectory;
+ TaskDialogIcon? dialogIcon = null;
+ if (!workingDirectory.IsNullOrEmpty())
+ {
+ var extractedIcon = Icon.ExtractAssociatedIcon(Path.Combine(workingDirectory, "Dalamud.Injector.exe"));
+ if (extractedIcon != null)
+ {
+ dialogIcon = new TaskDialogIcon(extractedIcon);
+ }
+ }
+
+ dialogIcon ??= TaskDialogIcon.Information;
+ this.page = new TaskDialogPage
+ {
+ ProgressBar = new TaskDialogProgressBar(TaskDialogProgressBarState.Marquee),
+ Caption = "Dalamud",
+ Icon = dialogIcon,
+ Buttons = { this.inProgressHideButton },
+ AllowMinimize = false,
+ AllowCancel = false,
+ Expander = new TaskDialogExpander
+ {
+ CollapsedButtonText = "What does this mean?",
+ ExpandedButtonText = "What does this mean?",
+ Text = "Some of the plugins you have installed through Dalamud are taking a long time to load.\n" +
+ "This is likely normal, please wait a little while longer.",
+ },
+ SizeToContent = true,
+ };
+
+ this.UpdatePage();
+
+ // Call private TaskDialog ctor
+ var ctor = typeof(TaskDialog).GetConstructor(
+ BindingFlags.Instance | BindingFlags.NonPublic,
+ null,
+ Array.Empty(),
+ null);
+
+ var taskDialog = (TaskDialog)ctor!.Invoke(Array.Empty