Use fakelib for CI

Fixes #6.
This commit is contained in:
Y. Wang 2024-05-23 10:40:31 +02:00
parent 4f186b74df
commit 05ae8f524b
No known key found for this signature in database
GPG Key ID: 39EC2419DF97489A
4 changed files with 7 additions and 4 deletions

View File

@ -45,7 +45,7 @@ read_globals = {
fields = {"copy"},
},
mtt = {
fields = {"join_player", "register"},
fields = {"join_player", "leave_player", "register"},
}
}

View File

@ -1,3 +1,5 @@
when:
- event: push
steps:
luacheck:
image: pipelinecomponents/luacheck
@ -10,6 +12,7 @@ steps:
- apk add git
- mkdir test/worldmods
- git clone --depth 1 https://github.com/BuckarooBanzay/mtt test/worldmods/mtt
- git clone --depth 1 https://github.com/OgelGames/fakelib test/worldmods/fakelib
- git clone --depth 1 https://codeberg.org/Wuzzy/minetest_doc test/worldmods/doc
- git clone --depth 1 https://git.bananach.space/advtrains.git test/worldmods/advtrains
- git clone --depth 1 https://git.bananach.space/basic_trains.git test/worldmods/basic_trains

View File

@ -1,5 +1,5 @@
name=advtrains_doc_integration
title=Documentation system integration for Advtrains
depends=advtrains,doc
optional_depends=advtrains_attachment_offset_patch,advtrains_livery_database,dlxtrains,doc_items,mtt,multi_component_liveries,techage
optional_depends=advtrains_attachment_offset_patch,advtrains_livery_database,dlxtrains,doc_items,fakelib,mtt,multi_component_liveries,techage
supported_games=*,minetest_game

View File

@ -1,11 +1,11 @@
if doc then
mtt.register("wagon information formspec", function(cb)
local player = mtt.join_player("singleplayer")
mtt.join_player("singleplayer")
for k in pairs(advtrains_doc_integration.prototypes) do
print("Found wagon prototype: " .. k)
doc.show_entry("singleplayer", "advtrains_wagons", k, true)
end
player:leave()
mtt.leave_player("singleplayer")
cb()
end)
end