From c1c68775b25314b566a2aae9a304d1b470f5794d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 9 Oct 2022 14:05:22 +0200 Subject: DevTest: Explain purpose of most items in tooltips (#12833) --- games/devtest/mods/chest_of_everything/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'games/devtest/mods/chest_of_everything/init.lua') 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 -- cgit v1.2.3