forked from Sokomine/yl_speak_up
bugfix: if give_item failed to give all: log properly
This commit is contained in:
parent
ebbc6eb3e4
commit
47277d555b
@ -407,9 +407,11 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r)
|
||||
return false
|
||||
end
|
||||
local r = player:get_inventory():add_item("main", item)
|
||||
if(not(r)) then
|
||||
if(not(r) or not(r:is_empty())) then
|
||||
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." "..
|
||||
"give_item: "..tostring(item:get_name()).." failed.")
|
||||
local pname = player:get_player_name()
|
||||
yl_speak_up.log_change(pname, n_id, "No room for item: "..r:to_string())
|
||||
return false
|
||||
end
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user