Updated to Risa's changes
This commit is contained in:
@@ -8,6 +8,8 @@ using OtterGui.Services;
|
||||
|
||||
namespace CustomizePlus.Core.Services.Dalamud;
|
||||
|
||||
#pragma warning disable SeStringEvaluator
|
||||
|
||||
public class DalamudServices
|
||||
{
|
||||
public static void AddServices(ServiceManager services, IDalamudPluginInterface pi)
|
||||
@@ -27,6 +29,7 @@ public class DalamudServices
|
||||
.AddDalamudService<IPluginLog>(pi)
|
||||
.AddDalamudService<ITargetManager>(pi)
|
||||
.AddDalamudService<INotificationManager>(pi)
|
||||
.AddDalamudService<IContextMenu>(pi);
|
||||
.AddDalamudService<IContextMenu>(pi)
|
||||
.AddDalamudService<ISeStringEvaluator>(pi);
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ public class HookingService : IDisposable
|
||||
private readonly ProfileManager _profileManager;
|
||||
private readonly ArmatureManager _armatureManager;
|
||||
private readonly GameStateService _gameStateService;
|
||||
private readonly DalamudBranchService _dalamudBranchService;
|
||||
private readonly Logger _logger;
|
||||
|
||||
private Hook<RenderDelegate>? _renderManagerHook;
|
||||
@@ -46,7 +45,6 @@ public class HookingService : IDisposable
|
||||
ProfileManager profileManager,
|
||||
ArmatureManager armatureManager,
|
||||
GameStateService gameStateService,
|
||||
DalamudBranchService dalamudBranchService,
|
||||
Logger logger)
|
||||
{
|
||||
_configuration = configuration;
|
||||
@@ -55,7 +53,6 @@ public class HookingService : IDisposable
|
||||
_profileManager = profileManager;
|
||||
_armatureManager = armatureManager;
|
||||
_gameStateService = gameStateService;
|
||||
_dalamudBranchService = dalamudBranchService;
|
||||
_logger = logger;
|
||||
|
||||
ReloadHooks();
|
||||
@@ -75,12 +72,6 @@ public class HookingService : IDisposable
|
||||
RenderHookFailed = false;
|
||||
MovementHookFailed = false;
|
||||
|
||||
if(!_dalamudBranchService.AllowPluginToRun)
|
||||
{
|
||||
_logger.Error("Not reloading hooks because the plugin is not allowed to run. (Branch Service)");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (_configuration.PluginEnabled)
|
||||
|
||||
@@ -21,22 +21,18 @@ public class SupportLogBuilderService
|
||||
private readonly ProfileManager _profileManager;
|
||||
private readonly ArmatureManager _armatureManager;
|
||||
private readonly IDalamudPluginInterface _dalamudPluginInterface;
|
||||
private readonly DalamudBranchService _dalamudBranchService;
|
||||
|
||||
public SupportLogBuilderService(
|
||||
PluginConfiguration configuration,
|
||||
TemplateManager templateManager,
|
||||
ProfileManager profileManager,
|
||||
ArmatureManager armatureManager,
|
||||
IDalamudPluginInterface dalamudPluginInterface,
|
||||
DalamudBranchService dalamudBranchService)
|
||||
IDalamudPluginInterface dalamudPluginInterface)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_templateManager = templateManager;
|
||||
_profileManager = profileManager;
|
||||
_armatureManager = armatureManager;
|
||||
_dalamudPluginInterface = dalamudPluginInterface;
|
||||
_dalamudBranchService = dalamudBranchService;
|
||||
}
|
||||
|
||||
public string BuildSupportLog()
|
||||
@@ -45,7 +41,6 @@ public class SupportLogBuilderService
|
||||
sb.AppendLine("**Settings**");
|
||||
sb.Append($"> **`Plugin Version: `** {VersionHelper.Version}\n");
|
||||
sb.Append($"> **`Commit Hash: `** {ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}\n");
|
||||
sb.Append($"> **`Dalamud Branch: `** {_dalamudBranchService.CurrentBranchName} ({_dalamudBranchService.CurrentBranch})\n");
|
||||
sb.Append($"> **`Plugin enabled: `** {_configuration.PluginEnabled}\n");
|
||||
sb.AppendLine("**Settings -> Editor Settings**");
|
||||
sb.Append($"> **`Preview character (editor): `** {_configuration.EditorConfiguration.PreviewCharacter.Incognito(null)}\n");
|
||||
|
||||
@@ -12,18 +12,15 @@ public class UserNotifierService : IDisposable
|
||||
{
|
||||
private readonly IClientState _clientState;
|
||||
private readonly ChatService _chatService;
|
||||
private readonly DalamudBranchService _dalamudBranchService;
|
||||
private readonly PopupSystem _popupSystem;
|
||||
|
||||
public UserNotifierService(
|
||||
IClientState clientState,
|
||||
ChatService chatService,
|
||||
DalamudBranchService dalamudBranchService,
|
||||
PopupSystem popupSystem)
|
||||
{
|
||||
_clientState = clientState;
|
||||
_chatService = chatService;
|
||||
_dalamudBranchService = dalamudBranchService;
|
||||
_popupSystem = popupSystem;
|
||||
|
||||
NotifyUser(true);
|
||||
@@ -46,17 +43,5 @@ public class UserNotifierService : IDisposable
|
||||
if (VersionHelper.IsTesting)
|
||||
_chatService.PrintInChat($"You are running testing version of Customize+! Some features like integration with other plugins might not function correctly.",
|
||||
ChatService.ChatMessageColor.Warning);
|
||||
|
||||
if (!_dalamudBranchService.AllowPluginToRun)
|
||||
{
|
||||
_chatService.PrintInChat(DalamudBranchService.PluginDisabledMessage,
|
||||
ChatService.ChatMessageColor.Error);
|
||||
|
||||
if (displayOptionalMessages)
|
||||
{
|
||||
if(_popupSystem.ShowPopup(PopupSystem.Messages.PluginDisabledNonReleaseDalamud))
|
||||
UIGlobals.PlayChatSoundEffect(11);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user