forked from Sokomine/yl_speak_up
took care of unregistered globals
This commit is contained in:
parent
eb7861393b
commit
58e701fde1
@ -211,13 +211,13 @@ end
|
|||||||
-- Note: In edit mode, effects will *not* be executed.
|
-- Note: In edit mode, effects will *not* be executed.
|
||||||
yl_speak_up.execute_all_relevant_effects = function(player, effects, o_id, action_was_successful)
|
yl_speak_up.execute_all_relevant_effects = function(player, effects, o_id, action_was_successful)
|
||||||
local target_dialog = ""
|
local target_dialog = ""
|
||||||
|
local pname = player:get_player_name()
|
||||||
|
local n_id = yl_speak_up.speak_to[pname].n_id
|
||||||
if(not(effects)) then
|
if(not(effects)) then
|
||||||
yl_speak_up.debug_msg(player, n_id, o_id, "No effects given.")
|
yl_speak_up.debug_msg(player, n_id, o_id, "No effects given.")
|
||||||
-- no effects? Then...return to the start dialog
|
-- no effects? Then...return to the start dialog
|
||||||
return ""
|
return ""
|
||||||
end
|
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)
|
local edit_mode = (yl_speak_up.edit_mode[pname] == n_id)
|
||||||
-- Important: the list of effects is *sorted* here. The order remains constant!
|
-- Important: the list of effects is *sorted* here. The order remains constant!
|
||||||
local sorted_key_list = yl_speak_up.sort_keys(effects)
|
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
|
||||||
end
|
end
|
||||||
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." "..
|
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
|
return true
|
||||||
-- "Punch the block.", -- 4
|
-- "Punch the block.", -- 4
|
||||||
elseif(r.r_value and r.r_value == "punch") then
|
elseif(r.r_value and r.r_value == "punch") then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user