Changeset 6629 for code/branches/gamestate/data
- Timestamp:
- Mar 28, 2010, 10:46:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/data/lua/LuaStateInit.lua
r6628 r6629 34 34 -- Furthermore the ".lua" extension is appended to the moduleName parameter when looking for the file 35 35 original_require = require 36 _REQUIREDNAME = "" 37 LuaStateReturnValue = true 36 38 require = function(moduleName) 37 39 if not luaState:fileExists(moduleName .. ".lua") then … … 44 46 if not _LOADED[moduleName] then 45 47 -- save old value 46 _REQUIREDNAME_OLD = _REQUIREDNAME48 local _REQUIREDNAME_OLD = _REQUIREDNAME 47 49 _REQUIREDNAME = moduleName 48 50 luaState:doFile(moduleName .. ".lua") 49 _LOADED[moduleName] = LuaStateReturnValue or true51 _LOADED[moduleName] = LuaStateReturnValue 50 52 -- restore old value 51 53 _REQUIREDNAME = _REQUIREDNAME_OLD
Note: See TracChangeset
for help on using the changeset viewer.