|
@ -79,7 +79,7 @@ namespace IPA.Loader |
|
|
|
|
|
|
|
|
internal static IConfigProvider SelfConfigProvider { get; set; } = null; |
|
|
internal static IConfigProvider SelfConfigProvider { get; set; } = null; |
|
|
|
|
|
|
|
|
internal static List<Tuple<IConfigProvider,DateTime>> configProviders = new List<Tuple<IConfigProvider, DateTime>>(); |
|
|
|
|
|
|
|
|
internal static List<KeyValuePair<IConfigProvider,Ref<DateTime>>> configProviders = new List<KeyValuePair<IConfigProvider, Ref<DateTime>>>(); |
|
|
|
|
|
|
|
|
private static void LoadPlugins() |
|
|
private static void LoadPlugins() |
|
|
{ |
|
|
{ |
|
@ -164,7 +164,7 @@ namespace IPA.Loader |
|
|
|
|
|
|
|
|
_bsPlugins.Add(selfPlugin); |
|
|
_bsPlugins.Add(selfPlugin); |
|
|
|
|
|
|
|
|
configProviders.Add(new Tuple<IConfigProvider, DateTime>(SelfConfigProvider = new JsonConfigProvider() { Filename = Path.Combine("UserData", SelfPlugin.IPA_Name) }, SelfConfigProvider.LastModified)); |
|
|
|
|
|
|
|
|
configProviders.Add(new KeyValuePair<IConfigProvider, Ref<DateTime>>(SelfConfigProvider = new JsonConfigProvider() { Filename = Path.Combine("UserData", SelfPlugin.IPA_Name) }, new Ref<DateTime>(SelfConfigProvider.LastModified))); |
|
|
SelfConfigProvider.Load(); |
|
|
SelfConfigProvider.Load(); |
|
|
|
|
|
|
|
|
//Load copied plugins
|
|
|
//Load copied plugins
|
|
@ -268,7 +268,7 @@ namespace IPA.Loader |
|
|
if (cfgProvider == null) |
|
|
if (cfgProvider == null) |
|
|
{ |
|
|
{ |
|
|
cfgProvider = new JsonConfigProvider() { Filename = Path.Combine("UserData", $"{bsPlugin.Name}") }; |
|
|
cfgProvider = new JsonConfigProvider() { Filename = Path.Combine("UserData", $"{bsPlugin.Name}") }; |
|
|
configProviders.Add(new Tuple<IConfigProvider, DateTime>(cfgProvider, cfgProvider.LastModified)); |
|
|
|
|
|
|
|
|
configProviders.Add(new KeyValuePair<IConfigProvider, Ref<DateTime>>(cfgProvider, new Ref<DateTime>(cfgProvider.LastModified))); |
|
|
cfgProvider.Load(); |
|
|
cfgProvider.Load(); |
|
|
} |
|
|
} |
|
|
initArgs.Add(cfgProvider); |
|
|
initArgs.Add(cfgProvider); |
|
|