From e101059595b6003d42cbc033675a24c7f2a387a2 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 20 Apr 2014 05:24:24 +1000 Subject: Have the skin loader add the correct require line, and fix up test to suit. --- ClientHamr/GuiLua/skang.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ClientHamr/GuiLua/skang.lua') 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 f:close() end if skin then - skin = "local skang = require 'skang'\nlocal this = require 'test'\n" .. skin + skin = "local skang = require 'skang'\nlocal " .. name .. " = require '" .. name .. "'\n" .. skin if nil == mainSkin._NAME then mainSkin = _M end end _M.DEFAULT_SKANG = skin @@ -358,8 +358,7 @@ moduleEnd = function (module) -- Run the main skin, which is the first skin that is defined. In theory, the skin from the main module. if mainSkin == module then - print("~~~~~~~~~~~~~~~~~RUNNING SKIN FOR " .. module._NAME) -print(module.DEFAULT_SKANG .. '\n~~~~~~~~~~~~~~~~~') + print("RUNNING SKIN FOR " .. module._NAME) local skin, err = loadstring(module.DEFAULT_SKANG) if skin then setfenv(skin, getfenv(2)) -- cgit v1.1