public override void HandleAddedToManager(PluginManager manager) { base.HandleAddedToManager(manager); if (Filename != null) { Watcher.AddMapping(Name); } foreach (var name in pluginReferenceFields.Keys) { pluginReferenceFields[name].SetValue(this, manager.GetPlugin(name)); } /*var compilable_plugin = CSharpPluginLoader.GetCompilablePlugin(Interface.Oxide.PluginDirectory, Name); * if (compilable_plugin != null && compilable_plugin.CompiledAssembly != null) * { * System.IO.File.WriteAllBytes(Interface.Oxide.PluginDirectory + "\\" + Name + ".dump", compilable_plugin.CompiledAssembly.PatchedAssembly); * Interface.Oxide.LogWarning($"The raw assembly has been dumped to Plugins/{Name}.dump"); * }*/ try { OnCallHook("Loaded", null); } catch (Exception ex) { Interface.Oxide.LogException($"Failed to initialize plugin '{Name} v{Version}'", ex); Loader.PluginErrors[Name] = ex.Message; } }
public override void HandleAddedToManager(PluginManager manager) { base.HandleAddedToManager(manager); if (Filename != null) { Watcher.AddMapping(Name); } CallHook("Loaded", null); }
public override void HandleAddedToManager(PluginManager manager) { base.HandleAddedToManager(manager); if (Filename != null) { Watcher.AddMapping(Name); } foreach (var name in pluginReferences.Keys) { pluginReferences[name].SetValue(this, manager.GetPlugin(name)); } CallHook("Loaded", null); }
/// <summary> /// Called when this plugin has been added to the specified manager /// </summary> /// <param name="manager"></param> public override void HandleAddedToManager(PluginManager manager) { // Call base base.HandleAddedToManager(manager); // Subscribe all our hooks foreach (string key in Globals) { Subscribe(key); } // Add us to the watcher watcher.AddMapping(Name); // Let the plugin know that it's loading CallFunction("Init", null); }