diff --git a/files/libraries/noita-api/live-reload.lua b/files/libraries/noita-api/live-reload.lua index 4f2a2b8..5d1b76c 100644 --- a/files/libraries/noita-api/live-reload.lua +++ b/files/libraries/noita-api/live-reload.lua @@ -45,6 +45,7 @@ function LiveReload:Reload(modPath, interval) local res, err = dofile(modPath .. "init.lua") if err then print(string.format("Error reloading mod: %s", err)) + error(string.format("Error reloading mod: %s", err)) end end diff --git a/init.lua b/init.lua index 2b75352..0552776 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,7 @@ end local CameraAPI = require("noita-api.camera") local Coords = require("coordinates") local DebugAPI = require("noita-api.debug") -local LiveReload = require("noita-api.live-reload") +--local LiveReload = require("noita-api.live-reload") local Vec2 = require("noita-api.vec2") ----------------------- @@ -105,12 +105,11 @@ end ---Called *every* time the game has finished updating the world. function OnWorldPostUpdate() - -- Reload mod every 60 frames. - -- This allows live updates to the mod while Noita is running. - -- !!! DISABLE THIS LINE AND THE CORRESPONDING REQUIRE BEFORE COMMITTING !!! - --LiveReload:Reload("mods/noita-mapcap/", 60) - Message:CatchException("OnWorldPostUpdate", function () + -- Reload mod every 60 frames. + -- This allows live updates to the mod while Noita is running. + -- !!! DISABLE THIS LINE AND THE CORRESPONDING REQUIRE BEFORE COMMITTING !!! + --LiveReload:Reload("mods/noita-mapcap/", 60) Check:Resolutions(60)