public void OnModLoaded() { PluginCompiler.CheckCompilerBinary(); // Include references to all loaded game extensions and any assemblies they reference foreach (Core.Extensions.Extension extension in Interface.Oxide.GetAllExtensions()) { if (extension == null || !extension.IsCoreExtension && !extension.IsGameExtension) { continue; } System.Reflection.Assembly assembly = extension.GetType().Assembly; string assemblyName = assembly.GetName().Name; if (AssemblyBlacklist.Contains(assemblyName)) { continue; } PluginReferences.Add(assemblyName); foreach (System.Reflection.AssemblyName reference in assembly.GetReferencedAssemblies()) { if (reference != null) { PluginReferences.Add(reference.Name); } } } }
public void OnModLoaded() { // Include references to all loaded game extensions and any assemblies they reference foreach (var extension in Interface.Oxide.GetAllExtensions()) { if (extension == null || !extension.IsGameExtension) { continue; } var assembly = extension.GetType().Assembly; PluginReferences.Add(assembly.GetName().Name); foreach (var reference in assembly.GetReferencedAssemblies()) { if (reference != null) { PluginReferences.Add(reference.Name); } } } }