Browse Source

RuntimeOptions annotation is now obtained early

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
4185b21f6e
2 changed files with 3 additions and 2 deletions
  1. +2
    -2
      IPA.Loader/Loader/PluginLoader.cs
  2. +1
    -0
      IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs

+ 2
- 2
IPA.Loader/Loader/PluginLoader.cs View File

@ -272,9 +272,9 @@ namespace IPA.Loader
return; 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.IsAttributePlugin = true;
meta.PluginType = type; meta.PluginType = type;
return; return;


+ 1
- 0
IPA.Loader/PluginInterfaces/Attributes/PluginAttribute.cs View File

@ -17,6 +17,7 @@ namespace IPA
} }
} }
// TODO: figure out a better name for this
public enum RuntimeOptions public enum RuntimeOptions
{ {
SingleStartInit, SingleStartInit,


Loading…
Cancel
Save