11 Adjust dynamic items in loot chests to make them less OP

This commit is contained in:
Juraj Vajda 2023-07-10 14:02:54 -04:00
parent 321e089c9a
commit ba53b38d1b

View File

@ -985,9 +985,13 @@ function Everness.set_loot_chest_items()
local loot_items = {}
for name, def in pairs(minetest.registered_items) do
local craft_recipe = minetest.get_craft_recipe(name)
local mod_name = name:split(':')[1]
if def.groups
and next(def.groups)
and (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0)
and (craft_recipe.items or mod_name == 'default')
then
table.insert(loot_items, {
name = name,