MOOSE/Moose/Moose.lua
svenvandevelde b10a59ae18 Found a solution to avoid having to install MOOSE.
Now MOOSE can be copied into the mission file, but you'll need to
include a "do file" action of moose.lua in the mission file and copy the
rest of the MOOSE files to the MIZ file.
2015-12-03 23:40:50 +01:00

30 lines
693 B
Lua

local base = _G
env.info("Loading MOOSE " .. base.timer.getAbsTime() )
function script_path()
local str = debug.getinfo(2, "S").source
return str:match("(.*/)"):sub(1,-2)
end
Include = {}
Include.LoadPath = script_path() .. "Mission\\"
env.info( "Include.LoadPath = " .. Include.LoadPath )
Include.Files = {}
Include.File = function( IncludeFile )
if not Include.Files[ IncludeFile ] then
Include.Files[IncludeFile] = IncludeFile
base.dofile( Include.LoadPath .. "" .. IncludeFile .. ".lua" )
--local chunk, errMsg = base.loadfile( IncludeFile .. ".lua" )
env.info( "Include:" .. IncludeFile .. " loaded " )
end
end
Include.File( "Database" )
env.info("Loaded MOOSE")