noita-mapcap/init.lua
David Vogel 607b16e5d2 Update for newest noita
- Disable sandbox limitations
- Refactor some code, clean it up
- Make coroutines work inside the mod
2019-10-22 22:48:43 +02:00

16 lines
752 B
Lua

dofile("mods/noita-mapcap/files/init.lua")
function OnPlayerSpawned(player_entity)
--EntityLoad("mods/noita-mapcap/files/luacomponent.xml") -- ffi isn't accessible from inside lua components, scrap that idea
modGUI = GuiCreate()
end
function OnWorldPostUpdate() -- this is called every time the game has finished updating the world
wake_up_waiting_threads(1) -- Coroutines aren't run every frame in this sandbox, do it manually here.
end
ModMagicNumbersFileAdd("mods/noita-mapcap/files/magic_numbers.xml") -- override some game constants
-- Only works up to the 16-10-2019 version of noita. And even then, ffi and other nice stuff is only accessible here.
--ModLuaFileAppend("data/scripts/director_init.lua", "mods/noita-mapcap/files/init.lua")