Experimental: no longer run in dev/staging dalamud when not Debug/ReleaseValidate

This commit is contained in:
RisaDev
2024-11-18 01:08:25 +03:00
parent 9c0b8b7ab0
commit 344dc52614
11 changed files with 124 additions and 18 deletions

View File

@@ -20,6 +20,7 @@ using CustomizePlus.Templates.Events;
using CustomizePlus.Templates.Data;
using ECommonsLite.Schedulers;
using CustomizePlus.Core.Helpers;
using CustomizePlus.Core.Services.Dalamud;
namespace CustomizePlus.UI.Windows.MainWindow;
@@ -37,6 +38,7 @@ public class MainWindow : Window, IDisposable
private readonly TemplateEditorManager _templateEditorManager;
private readonly PluginConfiguration _configuration;
private readonly HookingService _hookingService;
private readonly DalamudBranchService _dalamudBranchService;
private readonly TemplateEditorEvent _templateEditorEvent;
@@ -59,6 +61,7 @@ public class MainWindow : Window, IDisposable
TemplateEditorManager templateEditorManager,
PluginConfiguration configuration,
HookingService hookingService,
DalamudBranchService dalamudBranchService,
TemplateEditorEvent templateEditorEvent
) : base($"Customize+ {VersionHelper.Version}###CPlusMainWindow")
{
@@ -74,6 +77,7 @@ public class MainWindow : Window, IDisposable
_templateEditorManager = templateEditorManager;
_configuration = configuration;
_hookingService = hookingService;
_dalamudBranchService = dalamudBranchService;
_templateEditorEvent = templateEditorEvent;
@@ -97,7 +101,7 @@ public class MainWindow : Window, IDisposable
{
var yPos = ImGui.GetCursorPosY();
using (var disabled = ImRaii.Disabled(_hookingService.RenderHookFailed || _hookingService.MovementHookFailed))
using (var disabled = ImRaii.Disabled(_hookingService.RenderHookFailed || _hookingService.MovementHookFailed || !_dalamudBranchService.AllowPluginToRun))
{
LockWindowClosureIfNeeded();
ImGuiEx.EzTabBar("##tabs", null, _switchToTab, [