feat: reloading hud scripts

This commit is contained in:
MihailRis
2025-03-15 21:12:19 +03:00
parent f9998f0a93
commit 6fb14ee0a4
5 changed files with 36 additions and 14 deletions
+3
View File
@@ -173,6 +173,8 @@ function run_current_file()
func = function() item.reload_script(unit) end
elseif script_type == "world" then
func = function() world.reload_script(unit) end
elseif script_type == "hud" then
func = function() hud.reload_script(unit) end
end
local output = core.capture_output(func)
document.output:add(
@@ -392,6 +394,7 @@ local function build_scripts_classification()
local packs = pack.get_installed()
for _, packid in ipairs(packs) do
scripts_classification[packid..":scripts/world.lua"] = {"world", packid}
scripts_classification[packid..":scripts/hud.lua"] = {"hud", packid}
end
end