From 1f5a9790762ef97a08fd44dc2d607f4f2bdebc18 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Fri, 3 Jan 2020 17:14:43 -0600 Subject: [PATCH] RuntimeOptions annotation is now obtained early --- IPA.Loader/Loader/PluginLoader.cs | 4 ++-- IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/IPA.Loader/Loader/PluginLoader.cs b/IPA.Loader/Loader/PluginLoader.cs index 3da0cae5..b1b6ca11 100644 --- a/IPA.Loader/Loader/PluginLoader.cs +++ b/IPA.Loader/Loader/PluginLoader.cs @@ -272,9 +272,9 @@ namespace IPA.Loader return; } - var val = rtOptionsArg.Value?.GetType(); - Logger.loader.Debug($"value type is {(val == null ? "null" : val.FullName)}"); + var rtOptionsValInt = (int)rtOptionsArg.Value; // `int` is the underlying type of RuntimeOptions + meta.RuntimeOptions = (RuntimeOptions)rtOptionsValInt; meta.IsAttributePlugin = true; meta.PluginType = type; return; diff --git a/IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs b/IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs index 024c7db6..44caf8f6 100644 --- a/IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs +++ b/IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs @@ -17,6 +17,7 @@ namespace IPA } } + // TODO: figure out a better name for this public enum RuntimeOptions { SingleStartInit,