diff options
Diffstat (limited to 'ClientHamr/GuiLua/skang.lua')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index af315e3..4fb84f1 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -144,7 +144,7 @@ moduleBegin = function (name, author, copyright, version, timestamp, skin, isLua | |||
144 | f:close() | 144 | f:close() |
145 | end | 145 | end |
146 | if skin then | 146 | if skin then |
147 | skin = "local skang = require 'skang'\nlocal this = require 'test'\n" .. skin | 147 | skin = "local skang = require 'skang'\nlocal " .. name .. " = require '" .. name .. "'\n" .. skin |
148 | if nil == mainSkin._NAME then mainSkin = _M end | 148 | if nil == mainSkin._NAME then mainSkin = _M end |
149 | end | 149 | end |
150 | _M.DEFAULT_SKANG = skin | 150 | _M.DEFAULT_SKANG = skin |
@@ -358,8 +358,7 @@ moduleEnd = function (module) | |||
358 | 358 | ||
359 | -- Run the main skin, which is the first skin that is defined. In theory, the skin from the main module. | 359 | -- Run the main skin, which is the first skin that is defined. In theory, the skin from the main module. |
360 | if mainSkin == module then | 360 | if mainSkin == module then |
361 | print("~~~~~~~~~~~~~~~~~RUNNING SKIN FOR " .. module._NAME) | 361 | print("RUNNING SKIN FOR " .. module._NAME) |
362 | print(module.DEFAULT_SKANG .. '\n~~~~~~~~~~~~~~~~~') | ||
363 | local skin, err = loadstring(module.DEFAULT_SKANG) | 362 | local skin, err = loadstring(module.DEFAULT_SKANG) |
364 | if skin then | 363 | if skin then |
365 | setfenv(skin, getfenv(2)) | 364 | setfenv(skin, getfenv(2)) |