0
0
Fork 0

Merge pull request 'mcl_inventory: Remove _mcl_autogroup dependency from mcl_inventory' (#76) from fix_inventory_depends into master

Reviewed-on: Mineclonia/Mineclonia#76
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2021-06-25 15:25:45 +00:00 committed by Elias Fleckenstein
parent 8f584be235
commit 3b2a25a6cb
2 changed files with 6 additions and 8 deletions

View File

@ -27,10 +27,9 @@ local function replace_enchanted_books(tbl)
end end
end end
--[[ Populate all the item tables. We only do this once. Note this mod must be --[[ Populate all the item tables. We only do this once. Note this code must be
loaded after _mcl_autogroup for this to work, because it required certain executed after loading all the other mods in order to work. ]]
groups to be set. ]] minetest.register_on_mods_loaded(function()
do
for name,def in pairs(minetest.registered_items) do 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 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) local function is_redstone(def)
@ -108,7 +107,7 @@ do
table.sort(to_sort) table.sort(to_sort)
replace_enchanted_books(to_sort) replace_enchanted_books(to_sort)
end end
end end)
local function filter_item(name, description, lang, filter) local function filter_item(name, description, lang, filter)
local desc local desc

View File

@ -1,6 +1,5 @@
name = mcl_inventory name = mcl_inventory
author = BlockMen author = BlockMen
description = Adds the player inventory and creative inventory. description = Adds the player inventory and creative inventory.
depends = mcl_init, mcl_formspec, mcl_player depends = mcl_init, mcl_formspec, mcl_enchanting
optional_depends = _mcl_autogroup, mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide optional_depends = mcl_armor, mcl_brewing, mcl_potions, mcl_enchanting, mcl_craftguide, mcl_player