1
0
Fork 0

on_pick_up api: remove empty stack entities

This commit is contained in:
cora 2022-10-14 01:27:10 +02:00 committed by PrairieWind
parent efb3072458
commit 1ac0da335a
1 changed files with 1 additions and 1 deletions

View File

@ -3134,7 +3134,7 @@ local function check_item_pickup(self)
for k,v in pairs(self.pick_up) do
if not player_near(p) and self.on_pick_up and l.itemstring:find(v) then
local r = self.on_pick_up(self,l)
if r then
if r and r:get_count() > 0 then
l.itemstring = r:to_string()
else
o:remove()