Easy debugging for all Moosers #2093

Enables everybody to use load Moose from an external full path.
This is needed to use PyCharm with EmmyLua Debugger.
Needs also De-Sanitize to load mission script with full path.
This commit is contained in:
kaltokri
2024-01-09 16:09:19 +01:00
committed by Rolf Geuenich
parent 4ac583e434
commit 4fda8cc5fb
3 changed files with 152 additions and 143 deletions

View File

@@ -18,5 +18,7 @@ __Moose.Include = function( IncludeFile )
end
__Moose.Includes = {}
__Moose.Include( 'Scripts/Moose/Modules.lua' )
if not MOOSE_DEVELOPMENT_FOLDER then
MOOSE_DEVELOPMENT_FOLDER='Scripts'
end
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Modules.lua' )

View File

@@ -3,7 +3,11 @@
-- Try to load Moose as individual script files from <DcsInstallDir\Script\Moose
-- which should be a Junction link to the MOOSE repository subfolder "Moose Development\Moose".
-- This method is used by Moose developers and not mission builders.
ModuleLoader = 'Scripts/Moose/Modules.lua'
if not MOOSE_DEVELOPMENT_FOLDER then
MOOSE_DEVELOPMENT_FOLDER='Scripts'
end
ModuleLoader = MOOSE_DEVELOPMENT_FOLDER..'/Moose/Modules.lua'
if io then
local f=io.open(ModuleLoader,"r")
@@ -31,7 +35,7 @@ if io then
__Moose.Includes = {}
__Moose.Include( 'Scripts/Moose/Modules.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Modules.lua' )
BASE:TraceOnOff( true )
env.info( '*** MOOSE INCLUDE END *** ' )