|
|
@ -606,12 +606,10 @@ function dfhack.script_environment(name, strict)
|
|
|
|
local scripts = internal.scripts
|
|
|
|
local scripts = internal.scripts
|
|
|
|
local path = dfhack.findScript(name)
|
|
|
|
local path = dfhack.findScript(name)
|
|
|
|
if not scripts[path] or scripts[path]:needs_update() then
|
|
|
|
if not scripts[path] or scripts[path]:needs_update() then
|
|
|
|
local _, env = dfhack.run_script_with_env(nil,
|
|
|
|
local _, env = dfhack.run_script_with_env(nil, name, {
|
|
|
|
name,
|
|
|
|
module=true,
|
|
|
|
{
|
|
|
|
module_strict=(strict and true or false) -- ensure that this key is present if 'strict' is nil
|
|
|
|
module=true,
|
|
|
|
})
|
|
|
|
module_strict=(strict and true or false) -- ensure that this key is present if 'strict' is nil
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return env
|
|
|
|
return env
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if strict and not scripts[path]:get_flags().module then
|
|
|
|
if strict and not scripts[path]:get_flags().module then
|
|
|
|