feat: only enable ContextMenu module when testing

This commit is contained in:
goaaats 2022-01-29 05:04:28 +01:00
parent 2873dcaae2
commit 9785243eea
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -2,6 +2,7 @@ using System;
using System.Numerics;
using System.Runtime.InteropServices;
using Dalamud.Configuration.Internal;
using Dalamud.Game.Gui.ContextMenus;
using Dalamud.Game.Gui.Dtr;
using Dalamud.Game.Gui.FlyText;
@ -443,7 +444,15 @@ namespace Dalamud.Game.Gui
Service<ToastGui>.Get().Enable();
Service<FlyTextGui>.Get().Enable();
Service<PartyFinderGui>.Get().Enable();
Service<ContextMenu>.Get().Enable();
// TODO(goat): Remove when stable
var config = Service<DalamudConfiguration>.Get();
if (config.DalamudBetaKey == DalamudConfiguration.DalamudCurrentBetaKey)
{
Log.Warning("TAKE CARE!!! You are using Dalamud Testing, so the new context menu feature is enabled.\nThis may cause crashes with unupdated plugins.");
Service<ContextMenu>.Get().Enable();
}
this.setGlobalBgmHook.Enable();
this.handleItemHoverHook.Enable();
this.handleItemOutHook.Enable();