From 9eeec0e86e06324bb5baa621074d2a077452d1cb Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 6 Mar 2016 12:58:13 +0100 Subject: [PATCH] [u_inv] Drop when when not enough space in main list --- mods/unified_inventory/bags.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/unified_inventory/bags.lua b/mods/unified_inventory/bags.lua index 9ffafa9c..6472ce69 100755 --- a/mods/unified_inventory/bags.lua +++ b/mods/unified_inventory/bags.lua @@ -134,7 +134,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if not stack then return elseif not player:get_inventory():room_for_item("main", stack) then - minetest.chat_send_player(player:get_player_name(), "You need one free slot in your main inventory") + local pos = player:getpos() + pos.y = pos.y + 2 + minetest.add_item(pos, stack) return end player:get_inventory():add_item("main", stack)