2022-07-18 20:53:34 +00:00
|
|
|
-- Copyright (c) 2022 David Vogel
|
|
|
|
--
|
|
|
|
-- This software is released under the MIT License.
|
|
|
|
-- https://opensource.org/licenses/MIT
|
|
|
|
|
2019-10-22 20:48:43 +00:00
|
|
|
dofile("mods/noita-mapcap/files/init.lua")
|
2019-10-18 14:14:06 +00:00
|
|
|
|
2019-10-22 20:48:43 +00:00
|
|
|
function OnPlayerSpawned(player_entity)
|
|
|
|
--EntityLoad("mods/noita-mapcap/files/luacomponent.xml") -- ffi isn't accessible from inside lua components, scrap that idea
|
|
|
|
modGUI = GuiCreate()
|
2019-10-25 15:29:52 +00:00
|
|
|
GameSetCameraFree(true)
|
2022-07-19 16:28:30 +00:00
|
|
|
|
|
|
|
-- Start entity capturing right when the player spawn.
|
|
|
|
--DebugEntityCapture()
|
2019-10-18 14:14:06 +00:00
|
|
|
end
|
|
|
|
|
2022-07-19 16:28:30 +00:00
|
|
|
-- Called *every* time the game is about to start updating the world
|
|
|
|
function OnWorldPreUpdate()
|
2019-10-22 20:48:43 +00:00
|
|
|
wake_up_waiting_threads(1) -- Coroutines aren't run every frame in this sandbox, do it manually here.
|
2019-10-18 14:14:06 +00:00
|
|
|
end
|
|
|
|
|
2022-07-19 16:28:30 +00:00
|
|
|
-- Called *every* time the game has finished updating the world
|
|
|
|
function OnWorldPostUpdate() end
|
|
|
|
|
2019-10-18 20:58:20 +00:00
|
|
|
ModMagicNumbersFileAdd("mods/noita-mapcap/files/magic_numbers.xml") -- override some game constants
|
2022-07-18 20:53:34 +00:00
|
|
|
|
|
|
|
-- Apply overrides.
|
2022-07-19 16:28:30 +00:00
|
|
|
ModLuaFileAppend("data/scripts/perks/perk.lua", "mods/noita-mapcap/files/overrides/perks/perk.lua")
|