diff options
Diffstat (limited to 'Malmstone/Plugin.cs')
| -rw-r--r-- | Malmstone/Plugin.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Malmstone/Plugin.cs b/Malmstone/Plugin.cs index 6f5e50c..b2cfde7 100644 --- a/Malmstone/Plugin.cs +++ b/Malmstone/Plugin.cs @@ -11,6 +11,7 @@ using Dalamud.Game.Text.SeStringHandling.Payloads; using System.Collections.Generic; using System.Linq; using Malmstone.Utils; +using Malmstone.Addons; namespace Malmstone; @@ -20,6 +21,8 @@ public sealed class Plugin : IDalamudPlugin [PluginService] internal static ITextureProvider TextureProvider { get; private set; } = null!; [PluginService] internal static ICommandManager CommandManager { get; private set; } = null!; [PluginService] internal static IChatGui Chat { get; private set; } = null!; + [PluginService] internal static IAddonLifecycle AddonLifeCycle { get; private set; } = null!; + [PluginService] internal static IToastGui ToastGui { get; private set; } = null!; private const string CommandName = "/pmalm"; @@ -28,7 +31,9 @@ public sealed class Plugin : IDalamudPlugin public readonly WindowSystem WindowSystem = new("Malmstone"); private ConfigWindow ConfigWindow { get; init; } private MainWindow MainWindow { get; init; } + internal readonly PvPService PvPService; + internal PvPMatchAddon PvPAddon; public Plugin() { @@ -37,8 +42,21 @@ public sealed class Plugin : IDalamudPlugin ConfigWindow = new ConfigWindow(this); MainWindow = new MainWindow(this); PvPService = new PvPService(); + PvPAddon = new PvPMatchAddon(this); + if (Configuration.ShowProgressionChatPostCC) + PvPAddon.EnableCrystallineConflictPostMatch(); + if (Configuration.ShowProgressionChatPostRW) + PvPAddon.EnableRivalWingsPostMatch(); + if (Configuration.ShowProgressionChatPostFL) + PvPAddon.EnableFrontlinePostMatch(); + if (Configuration.ShowProgressionToastPostMatch) + PvPAddon.EnablePostMatchProgressionToast(); + if (Configuration.PostmatchProgressionToastType < 0 || Configuration.PostmatchProgressionToastType > 2) + { + Configuration.PostmatchProgressionToastType = 0; + } - WindowSystem.AddWindow(ConfigWindow); + WindowSystem.AddWindow(ConfigWindow); WindowSystem.AddWindow(MainWindow); CommandManager.AddHandler(CommandName, new CommandInfo(OnCommand) |
