gm-editor: Make df.global prefix optional

develop
lethosor 2015-10-11 11:44:52 -04:00
parent 632a809d6f
commit d3d21fa371
1 changed files with 5 additions and 0 deletions

@ -418,6 +418,11 @@ setmetatable(eval_env, {__index = function(_, k)
elseif k == 'unit' then
return dfhack.gui.getSelectedUnit()
else
for g in pairs(df.global) do
if g == k then
return df.global[k]
end
end
return _G[k]
end
end})