Browse Source

Removed arbitrary reference import from plugin name lookup

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
bb2ec71bad
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      IPA.Loader/Loader/PluginLoader.cs

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

@ -184,14 +184,13 @@ namespace IPA.Loader
AssemblyResolver = new CecilLibLoader() AssemblyResolver = new CecilLibLoader()
}).MainModule; }).MainModule;
var iBeatSaberPlugin = pluginModule.ImportReference(typeof(IBeatSaberPlugin));
foreach (var type in pluginModule.Types) foreach (var type in pluginModule.Types)
{ {
foreach (var inter in type.Interfaces) foreach (var inter in type.Interfaces)
{ {
var ifType = inter.InterfaceType; var ifType = inter.InterfaceType;
if (iBeatSaberPlugin.FullName == ifType.FullName)
if (typeof(IBeatSaberPlugin).FullName == ifType.FullName)
{ {
metadata.PluginType = type; metadata.PluginType = type;
break; break;


Loading…
Cancel
Save