forked from your-land-mirror/yl_speak_up
fixed bug in on_rightclick
This commit is contained in:
parent
701f687415
commit
eb7861393b
@ -42,7 +42,7 @@ local check_what = {
|
||||
"- please select -",
|
||||
"an internal state (i.e. of a quest)", -- 2
|
||||
"a block somewhere", -- 3
|
||||
"NPC crafts soemthing", -- 4
|
||||
"NPC crafts something", -- 4
|
||||
"go to other dialog if the previous effect failed", -- 5
|
||||
"send a chat message to all players", -- 6
|
||||
}
|
||||
@ -571,6 +571,7 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r)
|
||||
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." "..
|
||||
"block: Opened/closed trapdoor at "..pos_str..".")
|
||||
elseif(minetest.registered_nodes[node.name]
|
||||
and minetest.registered_nodes[node.name].on_rightclick
|
||||
and minetest.registered_nodes[node.name].on_rightclick(r.r_pos, node, nil)) then
|
||||
minetest.registered_nodes[node.name].on_rightclick(r.r_pos, node, nil)
|
||||
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." "..
|
||||
@ -581,7 +582,7 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r)
|
||||
end
|
||||
end
|
||||
return false
|
||||
-- ""NPC crafts soemthing", -- 4
|
||||
-- ""NPC crafts something", -- 4
|
||||
elseif(r.r_type == "craft") then
|
||||
if(not(r.r_craft_grid) or not(r.r_value)) then
|
||||
return false
|
||||
|
@ -392,7 +392,7 @@ yl_speak_up.input_fs_edit_option_related = function(player, formname, fields,
|
||||
v[ "p_itemstack" ] = data.inv_stack_name
|
||||
end
|
||||
|
||||
-- "NPC crafts soemthing", -- 4
|
||||
-- "NPC crafts something", -- 4
|
||||
-- (only for effects; not for preconditions)
|
||||
elseif(data.what and id_prefix == "r_" and data.what == 4) then
|
||||
local player_inv = player:get_inventory()
|
||||
@ -1087,7 +1087,7 @@ yl_speak_up.get_fs_edit_option_related = function(player, table_click_result,
|
||||
"Example: \"default:apple 3\" for three apples,\n"..
|
||||
" \"farming:bread\" for a bread.]"
|
||||
|
||||
-- "NPC crafts soemthing", -- 4
|
||||
-- "NPC crafts something", -- 4
|
||||
-- (craft - only for effects - not for preconditions)
|
||||
elseif(data.what and id_prefix == "r_" and data.what == 4) then
|
||||
local bg_img = ""
|
||||
|
Loading…
Reference in New Issue
Block a user