/// <summary> /// Saves the config file for the specified plugin /// </summary> /// <param name="plugintable"></param> private static void lua_SaveConfig(LuaTable plugintable) { LuaPlugin plugin = plugintable["Object"] as LuaPlugin; if (plugin == null) { return; } plugin.SaveConfig(); }
/// <summary> /// Loads a plugin using this loader /// </summary> /// <param name="directory"></param> /// <param name="name"></param> /// <returns></returns> public override Plugin Load(string directory, string name) { // Get the filename string filename = Path.Combine(directory, name + ".lua"); // Check it exists if (!File.Exists(filename)) return null; LuaExtension.InitializeTypes(); // Create it LuaPlugin plugin = new LuaPlugin(filename, LuaExtension, Watcher); plugin.Load(); // Return it return plugin; }