mirror of
https://gitea.your-land.de/Sokomine/yl_speak_up.git
synced 2025-06-20 14:18:02 +02:00
do not right-click on nodes with a formspec
This commit is contained in:
parent
0784b86b1d
commit
151b55581c
@ -524,8 +524,14 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r)
|
||||
if(not(node) or not(node.name) or not(minetest.registered_nodes[node.name])) then
|
||||
return false
|
||||
end
|
||||
-- TODO: do not right-click nodes that have a metadata formspec string
|
||||
-- TODO: do not right-click nodes that have an inventory (they most likely show a formspec - which the NPC can't use anyway)
|
||||
-- do not right-click nodes that have a metadata formspec string
|
||||
local meta = minetest.get_meta(r.r_pos)
|
||||
if(meta and meta:get_string("formspec") and meta:get_string("formspec") ~= "") then
|
||||
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id).." "..
|
||||
"block: right-click - The block at "..pos_str.." has a "..
|
||||
"formspec set. NPC can't read these. Interaction not possible.")
|
||||
return false
|
||||
end
|
||||
-- is it a door?
|
||||
if(doors.registered_doors[node.name]) then
|
||||
doors.door_toggle( r.r_pos, node, nil) --, clicker)
|
||||
|
Loading…
Reference in New Issue
Block a user