Updating loader so that it allows to load complete mission scripts for mission designers from other paths.

This commit is contained in:
FlightControl_Master 2018-03-10 07:00:09 +01:00
parent 370278e643
commit ae2e99a560
2 changed files with 2 additions and 4 deletions

View File

@ -7,7 +7,7 @@ __Moose = {}
__Moose.Include = function( IncludeFile )
if not __Moose.Includes[ IncludeFile ] then
__Moose.Includes[IncludeFile] = IncludeFile
local f = assert( base.loadfile( __Moose.ProgramPath .. IncludeFile ) )
local f = assert( base.loadfile( IncludeFile ) )
if f == nil then
error ("Moose: Could not load Moose file " .. IncludeFile )
else
@ -17,6 +17,4 @@ __Moose.Include = function( IncludeFile )
end
end
__Moose.ProgramPath = "Scripts/Moose/"
__Moose.Includes = {}

View File

@ -47,7 +47,7 @@ while( MooseSource ) do
local MooseFilePath = MooseDevelopmentPath .. "/" .. MooseSource
if MooseDynamicStatic == "D" then
print( "Load dynamic: " .. MooseSource )
MooseFile:write( "__Moose.Include( '" .. MooseSource .. "' )\n" )
MooseFile:write( "__Moose.Include( 'Scripts/Moose/" .. MooseSource .. "' )\n" )
end
if MooseDynamicStatic == "S" then
print( "Load static: " .. MooseSource )