Files
Craftimizer/Craftimizer/Utils/CraftimizerConflictDetector.cs
T
JonKazama-Hellion 923d421e57 Rebrand fork to Forgeimizer with Craftimizer conflict detector
User-facing rebrand of the Hellion Forge maintenance fork so it installs
as a separate Dalamud plugin slot named Forgeimizer and refuses to load
in parallel with upstream Craftimizer. Internal namespaces stay as
Craftimizer.* — this is a deliberate light-rename so a future upstream
merge stays straightforward.

Manifest and build:
- csproj AssemblyName = Forgeimizer (DLL is now Forgeimizer.dll)
- csproj PackageProjectUrl points at the Hellion Gitea
- csproj Authors dual-credits Asriel Camora and Hellion Forge
- Craftimizer.json renamed to Forgeimizer.json with Name/InternalName/
  Punchline/Description/RepoUrl/IconUrl/ImageUrls/Tags updated to
  Forgeimizer + Hellion-hosted URLs

Conflict detector:
- New Utils/CraftimizerConflictDetector.cs checks
  pluginInterface.InstalledPlugins for an active InternalName=="Craftimizer"
  and throws InvalidOperationException with /xlplugins guidance if found
- Plugin.cs constructor calls the detector before Service.Initialize so
  no Dalamud state is touched on conflict

Other user-facing strings:
- WindowSystem name "Craftimizer" -> "Forgeimizer"
- Settings about-tab header "Craftimizer" -> "Forgeimizer", hyperlink
  retargeted to the Hellion Gitea repo (upstream attribution stays on
  the WorkingRobot author line below)
- Configuration.MacroMateName default "Craftimizer" -> "Forgeimizer"
- /craftimizer slash command gains a /forgeimizer alias (all other
  upstream commands stay unchanged for muscle-memory compatibility)

Docs:
- README rewritten with Forgeimizer title, install section, conflict
  notice, slash command table, dual-holder license footer
- COPYRIGHT title and source-code block updated to call out both the
  rebrand and the SDK 15 migration as Hellion Forge fork maintenance
- NOTICE.md direct-word-to-Asriel section now also covers the rebrand
  scope and the conflict detector language, with explicit invitation
  to flag anything that does not sit right

LICENSE remains unchanged — Asriel Camora's MIT notice is mandatory.
Plugin Version stays at 2.9.1.1; this is a rebrand cycle, not a
version bump.
2026-05-26 20:03:23 +02:00

28 lines
929 B
C#

using System.Linq;
using Dalamud.Plugin;
namespace Craftimizer.Utils;
internal static class CraftimizerConflictDetector
{
private const string UpstreamInternalName = "Craftimizer";
public static void ThrowIfUpstreamLoaded(IDalamudPluginInterface pluginInterface)
{
var conflict = pluginInterface.InstalledPlugins.FirstOrDefault(p =>
p.InternalName == UpstreamInternalName && p.IsLoaded
);
if (conflict is null)
return;
throw new System.InvalidOperationException(
"Forgeimizer cannot load while the upstream Craftimizer plugin is active.\n\n"
+ "Both plugins register the same Dalamud hooks (UseAction, IsActionHighlighted) "
+ "and would conflict if loaded together.\n\n"
+ "Action: open /xlplugins, disable the upstream 'Craftimizer' plugin, "
+ "then re-enable Forgeimizer."
);
}
}