Skip to content

Commit

Permalink
Log init errors
Browse files Browse the repository at this point in the history
Sometimes Noita doesn't log them for me :/
  • Loading branch information
dextercd committed Jan 3, 2024
1 parent 877940c commit 40340a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion component-explorer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ if not load_imgui then
end
error("Missing ImGui.")
else
local success, result
function OnModPostInit()
-- Delay dofile calls until latter end of mod initialisation, so that other
-- mods can do ModLuaFileAppend to the component-explorer files.
dofile("mods/component-explorer/main.lua")
success, result = pcall(dofile, "mods/component-explorer/main.lua")
end

function OnWorldInitialized()
if not success then
print("CE init error: " .. tostring(result))
end
end
end

0 comments on commit 40340a2

Please sign in to comment.