Provide API for other mods to load their owm modules.

This commit is contained in:
IQuant 2024-10-12 13:55:31 +03:00
parent 0f55a96df4
commit d5e7f54ef1
7 changed files with 47 additions and 10 deletions

View file

@ -0,0 +1,4 @@
<Mod
version_built_with="12"
>
</Mod>

3
ew_api_example/init.lua Normal file
View 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
View 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>

View 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