diff --git a/data/libs/autoload.lua b/data/libs/autoload.lua index 15da553eb9e..19a5a53769b 100644 --- a/data/libs/autoload.lua +++ b/data/libs/autoload.lua @@ -4,8 +4,6 @@ -- this is the only library automatically loaded at startup -- its the right place to extend core Lua tables -require 'SpaceStation' - string.trim = function(s) return string.gsub(s or "", "^%s*(.-)%s*$", "%1") end diff --git a/src/lua/Lua.cpp b/src/lua/Lua.cpp index 31210eba9c6..23c23af4cee 100644 --- a/src/lua/Lua.cpp +++ b/src/lua/Lua.cpp @@ -66,6 +66,8 @@ namespace Lua { LuaColor::Register(manager->GetLuaState()); LuaEngine::Register(); + + pi_lua_dofile(manager->GetLuaState(), "libs/autoload.lua"); } void InitModules() @@ -122,7 +124,7 @@ namespace Lua { SceneGraph::Lua::Init(); // XXX load everything. for now, just modules - pi_lua_dofile(l, "libs/autoload.lua"); + // pi_lua_dofile(l, "libs/autoload.lua"); lua_pop(l, 1); pi_lua_import(l, "pigui", true);