took care of unregistered globals

This commit is contained in:
Sokomine 2021-06-21 00:43:09 +02:00
parent eb7861393b
commit 58e701fde1

View File

@ -211,13 +211,13 @@ end
-- Note: In edit mode, effects will *not* be executed.
yl_speak_up.execute_all_relevant_effects = function(player, effects, o_id, action_was_successful)
local target_dialog = ""
local pname = player:get_player_name()
local n_id = yl_speak_up.speak_to[pname].n_id
if(not(effects)) then
yl_speak_up.debug_msg(player, n_id, o_id, "No effects given.")
-- no effects? Then...return to the start dialog
return ""
end
local pname = player:get_player_name()
local n_id = yl_speak_up.speak_to[pname].n_id
local edit_mode = (yl_speak_up.edit_mode[pname] == n_id)
-- Important: the list of effects is *sorted* here. The order remains constant!
local sorted_key_list = yl_speak_up.sort_keys(effects)
@ -529,7 +529,7 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r)
end
end
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." "..
"block: dig - success: "..tostring(dig_res).." at pos "..pos_str..".")
"block: dig - success: "..tostring(node.name).." at pos "..pos_str..".")
return true
-- "Punch the block.", -- 4
elseif(r.r_value and r.r_value == "punch") then