minor bugfix

This commit is contained in:
Sokomine 2022-09-30 02:20:12 +02:00
parent dffd17a44b
commit 48202642dd

View File

@ -486,6 +486,9 @@ yl_speak_up.input_fs_action_npc_gives = function(player, formname, fields)
end
local pname = player:get_player_name()
local trade_inv = minetest.get_inventory({type="detached", name="yl_speak_up_player_"..pname})
if(not(yl_speak_up.speak_to[pname])) then
return
end
local a_id = yl_speak_up.speak_to[pname].a_id
if(fields.npc_does_not_have_item) then
-- the NPC can't supply the item - abort the action