diff options
Diffstat (limited to 'ClientHamr/GuiLua/skang.lua')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index d5622fd..bd05031 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -116,7 +116,15 @@ moduleBegin = function (name, author, copyright, version, timestamp, skin, isLua | |||
116 | end | 116 | end |
117 | _M.VERSION = version .. versionName .. timestamp | 117 | _M.VERSION = version .. versionName .. timestamp |
118 | _M.VERSION_DESC = versionDesc | 118 | _M.VERSION_DESC = versionDesc |
119 | -- TODO - If there's no skin passed in, try to find the file skin .. '.skang' and load that instead. | 119 | -- If there is a .skang file, read that in and override the passed in skin. |
120 | local f = io.open(name .. '.skang') | ||
121 | if f then | ||
122 | skin = f:read('*l') | ||
123 | if '#' == string.sub(skin, 1, 1) then skin = '' end | ||
124 | skin = skin .. f:read('*a') | ||
125 | f:close() | ||
126 | end | ||
127 | if skin then skin = "local skang = require 'skang'\nlocal this = require 'test'\n" .. skin end | ||
120 | _M.DEFAULT_SKANG = skin | 128 | _M.DEFAULT_SKANG = skin |
121 | 129 | ||
122 | --_G[_M._NAME] = _M -- Stuff it into a global of the same name. | 130 | --_G[_M._NAME] = _M -- Stuff it into a global of the same name. |