mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Change coroutines to OnWorldPreUpdate callback
This commit is contained in:
parent
6cf06d42d9
commit
0ec2776705
9
init.lua
9
init.lua
@ -9,12 +9,19 @@ function OnPlayerSpawned(player_entity)
|
|||||||
--EntityLoad("mods/noita-mapcap/files/luacomponent.xml") -- ffi isn't accessible from inside lua components, scrap that idea
|
--EntityLoad("mods/noita-mapcap/files/luacomponent.xml") -- ffi isn't accessible from inside lua components, scrap that idea
|
||||||
modGUI = GuiCreate()
|
modGUI = GuiCreate()
|
||||||
GameSetCameraFree(true)
|
GameSetCameraFree(true)
|
||||||
|
|
||||||
|
-- Start entity capturing right when the player spawn.
|
||||||
|
--DebugEntityCapture()
|
||||||
end
|
end
|
||||||
|
|
||||||
function OnWorldPostUpdate() -- this is called every time the game has finished updating the world
|
-- Called *every* time the game is about to start updating the world
|
||||||
|
function OnWorldPreUpdate()
|
||||||
wake_up_waiting_threads(1) -- Coroutines aren't run every frame in this sandbox, do it manually here.
|
wake_up_waiting_threads(1) -- Coroutines aren't run every frame in this sandbox, do it manually here.
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Called *every* time the game has finished updating the world
|
||||||
|
function OnWorldPostUpdate() end
|
||||||
|
|
||||||
ModMagicNumbersFileAdd("mods/noita-mapcap/files/magic_numbers.xml") -- override some game constants
|
ModMagicNumbersFileAdd("mods/noita-mapcap/files/magic_numbers.xml") -- override some game constants
|
||||||
|
|
||||||
-- Apply overrides.
|
-- Apply overrides.
|
||||||
|
Loading…
Reference in New Issue
Block a user