From 3b2a25a6cb338e9acdc9e2c8e72cb1221147f878 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 25 Jun 2021 15:25:45 +0000 Subject: [PATCH] Merge pull request 'mcl_inventory: Remove _mcl_autogroup dependency from mcl_inventory' (#76) from fix_inventory_depends into master Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/76 Reviewed-by: cora --- mods/HUD/mcl_inventory/creative.lua | 9 ++++----- mods/HUD/mcl_inventory/mod.conf | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 6eac1c329..ff9cccf9e 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -27,10 +27,9 @@ local function replace_enchanted_books(tbl) end end ---[[ Populate all the item tables. We only do this once. Note this mod must be -loaded after _mcl_autogroup for this to work, because it required certain -groups to be set. ]] -do +--[[ Populate all the item tables. We only do this once. Note this code must be +executed after loading all the other mods in order to work. ]] +minetest.register_on_mods_loaded(function() for name,def in pairs(minetest.registered_items) do if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" then local function is_redstone(def) @@ -108,7 +107,7 @@ do table.sort(to_sort) replace_enchanted_books(to_sort) end -end +end) local function filter_item(name, description, lang, filter) local desc diff --git a/mods/HUD/mcl_inventory/mod.conf b/mods/HUD/mcl_inventory/mod.conf index 7585d9f70..10e669265 100644 --- a/mods/HUD/mcl_inventory/mod.conf +++ b/mods/HUD/mcl_inventory/mod.conf @@ -1,6 +1,5 @@ name = mcl_inventory author = BlockMen description = Adds the player inventory and creative inventory. -depends = mcl_init, mcl_formspec, mcl_player -optional_depends = _mcl_autogroup, mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide - +depends = mcl_init, mcl_formspec, mcl_enchanting +optional_depends = mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide, mcl_player