From f83ee21cac167b4da48492a1299671f5d94ac139 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 6 Jul 2021 08:39:52 +0100 Subject: [PATCH] fix nil pos on drop --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 234367c..65528a5 100644 --- a/init.lua +++ b/init.lua @@ -572,7 +572,8 @@ function stamina.eat(hp_change, replace_with_item, itemstack, user, pointed_thin if inv:room_for_item("main", {name = replace_with_item}) then inv:add_item("main", replace_with_item) else - pos.y = math.floor(pos.y - 1.0) + local pos = user:get_pos() + core.add_item(pos, replace_with_item) end end