mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Provide API for other mods to load their owm modules.
This commit is contained in:
parent
0f55a96df4
commit
d5e7f54ef1
7 changed files with 47 additions and 10 deletions
4
ew_api_example/compatibility.xml
Executable file
4
ew_api_example/compatibility.xml
Executable file
|
@ -0,0 +1,4 @@
|
|||
<Mod
|
||||
version_built_with="12"
|
||||
>
|
||||
</Mod>
|
3
ew_api_example/init.lua
Normal file
3
ew_api_example/init.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
if ModIsEnabled("quant.ew") then
|
||||
ModLuaFileAppend("mods/quant.ew/files/api/extra_modules.lua", "mods/ew_api_example/module.lua")
|
||||
end
|
9
ew_api_example/mod.xml
Executable file
9
ew_api_example/mod.xml
Executable file
|
@ -0,0 +1,9 @@
|
|||
<Mod
|
||||
name="EW API Example mod"
|
||||
description=""
|
||||
request_no_api_restrictions="0"
|
||||
is_game_mode="0"
|
||||
translation_xml_path=""
|
||||
translation_csv_path=""
|
||||
>
|
||||
</Mod>
|
9
ew_api_example/module.lua
Normal file
9
ew_api_example/module.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
local module = {}
|
||||
|
||||
function module.on_world_update()
|
||||
if GameGetFrameNum() % 60 == 0 then
|
||||
GamePrint("Hi from api example!")
|
||||
end
|
||||
end
|
||||
|
||||
return module
|
Loading…
Add table
Add a link
Reference in a new issue