Put treasure loot into random inventory slots

This commit is contained in:
Wuzzy 2019-02-28 18:00:17 +01:00
parent 7851cee45e
commit 1daf9b7a59
4 changed files with 58 additions and 12 deletions

View file

@ -188,9 +188,7 @@ mcl_structures.generate_igloo_basement = function(pos, orientation)
local meta = minetest.get_meta(chest_pos)
local inv = meta:get_inventory()
inv:set_size("main", 9*3)
for i=1, #lootitems do
inv:add_item("main", lootitems[i])
end
mcl_loot.fill_inventory(inv, "main", lootitems)
end
return success
end
@ -401,9 +399,7 @@ mcl_structures.generate_desert_temple = function(pos)
local meta = minetest.get_meta(chests[c])
local inv = meta:get_inventory()
inv:set_size("main", 9*3)
for i=1, #lootitems do
inv:add_item("main", lootitems[i])
end
mcl_loot.fill_inventory(inv, "main", lootitems)
end
-- Initialize pressure plates and randomly remove up to 5 plates