Skip to content

Commit 0b484fd

Browse files
appgurueuimre84
authored andcommitted
Fix table.insert usage
1 parent bfa75a2 commit 0b484fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mods/bones/init.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,14 @@ minetest.register_on_dieplayer(function(player)
320320
return
321321
end
322322

323-
local all_inventory = collect_all_items(player)
324-
if bones_mode == "bones" and #all_inventory > 0 then
323+
local all_items = collect_all_items(player)
324+
if bones_mode == "bones" and #all_items > 0 then
325325
bones_mode, bones_pos, bones_inv, bones_meta = find_node_for_bones_on_player_death(player, player_pos)
326326
end
327-
if bones_mode == "drop" and #all_inventory > 0 then
328-
all_inventory.insert(all_inventory,ItemStack("bones:bones"))
327+
if bones_mode == "drop" and #all_items > 0 then
328+
table.insert(all_items, ItemStack("bones:bones"))
329329
end
330-
local dropped = dump_into(bones_mode, bones_inv, bones_pos, all_inventory)
330+
local dropped = dump_into(bones_mode, bones_inv, bones_pos, all_items)
331331

332332
local log_message
333333
local chat_message

0 commit comments

Comments
 (0)