diff --git a/config.lua b/config.lua index 1d67819..32d0e41 100644 --- a/config.lua +++ b/config.lua @@ -67,6 +67,12 @@ yl_speak_up.mob_skins["yl_speak_up:human"] = { "yl_speak_up_main_default.png", "some_skin.png", "2022_06_28_the-lonley-lumberjack-20494635.png"} +-- some mobs (in particular from mobs_redo) can switch between follow (their owner), +-- stand and walking when they're right-clicked; emulate this behaviour for NPC in +-- this list +yl_speak_up.emulate_orders_on_rightclick = { + "mobs_npc:npc", "mobs_npc:igor", "mobs_npc:trader"} + -- some properties from external NPC can be edited and changed (they have the self. prefix), -- and it is possible to react to property changes with handlers; diff --git a/fs_talkdialog.lua b/fs_talkdialog.lua index aa4e88b..385270e 100644 --- a/fs_talkdialog.lua +++ b/fs_talkdialog.lua @@ -884,7 +884,9 @@ yl_speak_up.get_fs_talkdialog = function(player, n_id, d_id, alternate_text, rec end -- mobs_redo based NPC can follow, stand or wander around - if(luaentity and luaentity.order and may_edit_npc) then + if(luaentity and luaentity.order and may_edit_npc + -- not all mobs need or support this feature + and table.indexof(yl_speak_up.emulate_orders_on_rightclick, luaentity.name) > -1) then if(luaentity.order ~= "follow") then h = yl_speak_up.add_edit_button_fs_talkdialog(formspec, h, "order_follow",