From 2f60fc33f6637dbda80132e53f0e99c4c31f0ac5 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sun, 28 Aug 2022 02:29:00 +0700 Subject: [PATCH] update heh move to proper persistent --- LightPerms.Discord/Plugin.cs | 5 +++-- LightPerms.Discord/manifest.xml | 4 ++-- LightPerms/LightPerms.csproj | 2 +- LightPerms/Plugin.cs | 5 +++-- LightPerms/manifest.xml | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/LightPerms.Discord/Plugin.cs b/LightPerms.Discord/Plugin.cs index ff43ec1..56aa008 100644 --- a/LightPerms.Discord/Plugin.cs +++ b/LightPerms.Discord/Plugin.cs @@ -1,5 +1,6 @@ using System.IO; using System.Windows.Controls; +using heh.Utils; using Torch; using Torch.API; using Torch.API.Managers; @@ -11,12 +12,12 @@ namespace LightPerms.Discord; public class Plugin : TorchPluginBase, IWpfPlugin { - private Persistent _config = null!; + private ProperPersistent _config = null!; public override void Init(ITorchBase torch) { base.Init(torch); - _config = Persistent.Load(Path.Combine(StoragePath, "LightPerms.Discord.cfg")); + _config = new(Path.Combine(StoragePath, "LightPerms.Discord.cfg")); Torch.Managers.GetManager().AddFactory(s => new DiscordManager(s.Torch, _config.Data)); } diff --git a/LightPerms.Discord/manifest.xml b/LightPerms.Discord/manifest.xml index b648171..c984f15 100644 --- a/LightPerms.Discord/manifest.xml +++ b/LightPerms.Discord/manifest.xml @@ -2,11 +2,11 @@ LightPerms.Discord d53cf5e6-27ea-491b-9579-8506d93f184b - v1.0.1 + v1.0.3 5c3f35b3-ac9d-486f-8559-f931536c6700 - v1.0.1 + v1.0.3 \ No newline at end of file diff --git a/LightPerms/LightPerms.csproj b/LightPerms/LightPerms.csproj index d5ed674..0de71bd 100644 --- a/LightPerms/LightPerms.csproj +++ b/LightPerms/LightPerms.csproj @@ -71,7 +71,7 @@ - + diff --git a/LightPerms/Plugin.cs b/LightPerms/Plugin.cs index e064811..45424cc 100644 --- a/LightPerms/Plugin.cs +++ b/LightPerms/Plugin.cs @@ -1,6 +1,7 @@ using System.IO; using System.Windows.Controls; using heh; +using heh.Utils; using Torch; using Torch.API; using Torch.API.Managers; @@ -12,12 +13,12 @@ namespace LightPerms; public class Plugin : TorchPluginBase, IWpfPlugin { - private Persistent _config = null!; + private ProperPersistent _config = null!; public override void Init(ITorchBase torch) { base.Init(torch); - _config = Persistent.Load(Path.Combine(StoragePath, "LightPerms.cfg")); + _config = new(Path.Combine(StoragePath, "LightPerms.cfg")); Torch.Managers.AddManager(DbManager.Static); Torch.Managers.AddManager(new PermissionsManager(Torch)); Torch.Managers.GetManager().AddFactory(s => new MultiplayerMembersManager(s.Torch)); diff --git a/LightPerms/manifest.xml b/LightPerms/manifest.xml index 2aa6f27..8d03a05 100644 --- a/LightPerms/manifest.xml +++ b/LightPerms/manifest.xml @@ -2,5 +2,5 @@ LightPerms 5c3f35b3-ac9d-486f-8559-f931536c6700 - v1.0.1 + v1.0.4 \ No newline at end of file