generated from den3606/noita-mod-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.lua
42 lines (30 loc) · 1.71 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
dofile_once("mods/d-wonders/files/scripts/lib/utilities.lua")
print("d-wonders load")
function OnModPreInit()
-- print("Mod - OnModPreInit()") -- First this is called for all mods
end
function OnModInit()
-- print("Mod - OnModInit()") -- After that this is called for all mods
end
function OnModPostInit()
-- print("Mod - OnModPostInit()") -- Then this is called for all mods
end
function OnPlayerSpawned(player_entity) -- This runs when player entity has been created
-- GamePrint("OnPlayerSpawned() - Player entity id: " .. tostring(player_entity))
end
function OnWorldInitialized() -- This is called once the game world is initialized. Doesn't ensure any world chunks actually exist. Use OnPlayerSpawned to ensure the chunks around player have been loaded or created.
-- GamePrint("OnWorldInitialized() " .. tostring(GameGetFrameNum()))
end
function OnWorldPreUpdate() -- This is called every time the game is about to start updating the world
-- GamePrint("Pre-update hook " .. tostring(GameGetFrameNum()))
end
function OnWorldPostUpdate() -- This is called every time the game has finished updating the world
-- GamePrint("Post-update hook " .. tostring(GameGetFrameNum()))
end
function OnMagicNumbersAndWorldSeedInitialized() -- this is the last point where the Mod* API is available. after this materials.xml will be loaded.
end
ModLuaFileAppend("data/scripts/gun/gun_actions.lua", "mods/d-wonders/files/scripts/append/gun_actions.lua")
local content = ModTextFileGetContent("data/translations/common.csv")
local noita_remover_content = ModTextFileGetContent("mods/d-wonders/files/translations/common.csv")
ModTextFileSetContent("data/translations/common.csv", content .. noita_remover_content)
print("d-wonders loaded")