diff --git a/mods/nc_player_setup/step_interactinv.lua b/mods/nc_player_setup/step_interactinv.lua index f341a1e5..c1c3d06b 100644 --- a/mods/nc_player_setup/step_interactinv.lua +++ b/mods/nc_player_setup/step_interactinv.lua @@ -1,22 +1,12 @@ -- LUALOCALS < --------------------------------------------------------- -local nodecore, pairs - = nodecore, pairs +local nodecore + = nodecore -- LUALOCALS > --------------------------------------------------------- nodecore.register_playerstep({ label = "inventory requires interact", - action = function(player, data) + action = function(player) if nodecore.interact(player) then return end - local pos = player:get_pos() - pos.y = pos.y + data.properties.eye_height - local inv = player:get_inventory() - for i, stack in pairs(inv:get_list("main")) do - if not stack:is_empty() then - if nodecore.item_is_virtual(stack) then - nodecore.item_eject(pos, stack, 0.001) - inv:set_stack("main", i, "") - end - end - end + return nodecore.inventory_dump(player) end })