aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/chest_of_everything/init.lua
diff options
context:
space:
mode:
authorWuzzy <Wuzzy@disroot.org>2022-10-09 14:05:22 +0200
committerGitHub <noreply@github.com>2022-10-09 08:05:22 -0400
commitc1c68775b25314b566a2aae9a304d1b470f5794d (patch)
tree127bdadf77939c194d1ec01696a9a0440f769a7b /games/devtest/mods/chest_of_everything/init.lua
parent804a31818907e737a1ec727580d5822532ff3e6b (diff)
downloadminetest-c1c68775b25314b566a2aae9a304d1b470f5794d.tar.xz
DevTest: Explain purpose of most items in tooltips (#12833)
Diffstat (limited to 'games/devtest/mods/chest_of_everything/init.lua')
-rw-r--r--games/devtest/mods/chest_of_everything/init.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/games/devtest/mods/chest_of_everything/init.lua b/games/devtest/mods/chest_of_everything/init.lua
index 3e9d2678a..11e890dec 100644
--- a/games/devtest/mods/chest_of_everything/init.lua
+++ b/games/devtest/mods/chest_of_everything/init.lua
@@ -91,6 +91,7 @@ minetest.register_on_mods_loaded(function()
* Other tools
* Craftitems
* Other items
+ * Items from the 'broken' mod
* Dummy items ]]
local function compare(item1, item2)
local def1 = minetest.registered_items[item1]
@@ -101,6 +102,8 @@ minetest.register_on_mods_loaded(function()
local testtool2 = minetest.get_item_group(item2, "testtool") == 1
local dummy1 = minetest.get_item_group(item1, "dummy") == 1
local dummy2 = minetest.get_item_group(item2, "dummy") == 1
+ local broken1 = def1.mod_origin == "broken"
+ local broken2 = def2.mod_origin == "broken"
local craftitem1 = def1.type == "craft"
local craftitem2 = def2.type == "craft"
if item1 == "chest_of_everything:chest" then
@@ -111,6 +114,10 @@ minetest.register_on_mods_loaded(function()
return false
elseif not dummy1 and dummy2 then
return true
+ elseif broken1 and not broken2 then
+ return false
+ elseif not broken1 and broken2 then
+ return true
elseif testtool1 and not testtool2 then
return true
elseif not testtool1 and testtool2 then