Put treasure loot into random inventory slots
This commit is contained in:
parent
7851cee45e
commit
1daf9b7a59
4 changed files with 58 additions and 12 deletions
|
@ -377,9 +377,7 @@ local function PlaceChest(pos, param2)
|
|||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local items = tsm_railcorridors.get_treasures(pr)
|
||||
for i=1, math.min(#items, inv:get_size("main")) do
|
||||
inv:set_stack("main", i, ItemStack(items[i]))
|
||||
end
|
||||
mcl_loot.fill_inventory(inv, "main", items)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue