Remove hard dependency on default
This commit is contained in:
parent
b3590ccf56
commit
f539ca71d5
|
@ -45,6 +45,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -62,6 +66,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -79,6 +87,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -96,6 +108,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -113,6 +129,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -130,6 +150,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -147,6 +171,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -164,6 +192,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -181,6 +213,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
@ -198,6 +234,10 @@ minetest.register_lbm({
|
||||||
--
|
--
|
||||||
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
local item_def = Everness.loot_chest.default[rand:next(1, #Everness.loot_chest.default)]
|
||||||
|
|
||||||
|
if not minetest.registered_items[item_def.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if rand:next(0, 100) <= item_def.chance then
|
if rand:next(0, 100) <= item_def.chance then
|
||||||
local stack = ItemStack(item_def.name)
|
local stack = ItemStack(item_def.name)
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue