mirror of https://github.com/odrling/Aegisub
2000 GET!! Changed how the Lua factory is registered.
Originally committed to SVN as r2000.
This commit is contained in:
parent
f8d7c69c15
commit
777242fce3
|
@ -255,15 +255,17 @@ namespace Automation4 {
|
|||
// Factory class for Lua scripts
|
||||
class LuaScriptFactory : public ScriptFactory {
|
||||
public:
|
||||
LuaScriptFactory()
|
||||
LuaScriptFactory() { }
|
||||
|
||||
~LuaScriptFactory() { }
|
||||
|
||||
void RegisterFactory ()
|
||||
{
|
||||
engine_name = _T("Lua");
|
||||
filename_pattern = _T("*.lua");
|
||||
Register(this);
|
||||
}
|
||||
|
||||
~LuaScriptFactory() { }
|
||||
|
||||
virtual Script* Produce(const wxString &filename) const
|
||||
{
|
||||
// Just check if file extension is .lua
|
||||
|
|
|
@ -82,7 +82,8 @@ void PluginManager::RegisterBuiltInPlugins() {
|
|||
|
||||
// Automation languages
|
||||
#ifdef WITH_AUTO4_LUA
|
||||
new Automation4::LuaScriptFactory();
|
||||
Automation4::LuaScriptFactory *lua = new Automation4::LuaScriptFactory();
|
||||
lua->RegisterFactory();
|
||||
#endif
|
||||
#ifdef WITH_PERL
|
||||
Automation4::PerlScriptFactory *perl = new Automation4::PerlScriptFactory();
|
||||
|
|
Loading…
Reference in New Issue