Initial commit: AetherBags + KamiToolKit for FC Gitea
Debug Build and Test / Build against Latest Dalamud (push) Has been cancelled
Debug Build and Test / Build against Staging Dalamud (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-08 14:46:31 -05:00
commit 8db4ce6094
375 changed files with 34124 additions and 0 deletions
@@ -0,0 +1,23 @@
using System.Runtime.CompilerServices;
using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.System.Framework;
using KamiToolKit.Classes;
namespace KamiToolKit.Extensions;
public static unsafe class MainThreadSafety {
/// <summary>
/// Returns true if <em>not</em> on the main thread. Use this to return early.
/// </summary>
public static bool TryAssertMainThread([CallerFilePath] string? callerFilePath = null, [CallerMemberName] string? callerName = null) {
if (Framework.Instance()->IsDestroying) return true;
if (!ThreadSafety.IsMainThread) {
Log.Error($"{callerFilePath?.Split(@"\")[^1][..^2]}{callerName} must be invoked from the main thread.");
return true;
}
return false;
}
}