Fixed potion appearance in creative menu (search) (#4760)
This fixes potion appearance in creative menu, in the search tab. Proper potions appear there now. Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4760 Co-authored-by: the-real-herowl <wiktor_t-i@proton.me> Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
This commit is contained in:
parent
5fa5dac9a0
commit
1c36a4e07c
@ -124,16 +124,19 @@ minetest.register_on_mods_loaded(function()
|
|||||||
local potency = def._default_potent_level - 1
|
local potency = def._default_potent_level - 1
|
||||||
stack:get_meta():set_int("mcl_potions:potion_potent", potency)
|
stack:get_meta():set_int("mcl_potions:potion_potent", potency)
|
||||||
table.insert(inventory_lists["brew"], stack:to_string())
|
table.insert(inventory_lists["brew"], stack:to_string())
|
||||||
|
table.insert(inventory_lists["all"], stack:to_string())
|
||||||
end
|
end
|
||||||
if def.has_plus then
|
if def.has_plus then
|
||||||
local stack = ItemStack(name)
|
local stack = ItemStack(name)
|
||||||
local extend = def._default_extend_level
|
local extend = def._default_extend_level
|
||||||
stack:get_meta():set_int("mcl_potions:potion_plus", extend)
|
stack:get_meta():set_int("mcl_potions:potion_plus", extend)
|
||||||
table.insert(inventory_lists["brew"], stack:to_string())
|
table.insert(inventory_lists["brew"], stack:to_string())
|
||||||
|
table.insert(inventory_lists["all"], stack:to_string())
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
table.insert(inventory_lists["all"], name)
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(inventory_lists["all"], name)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user