#3 made mute message less misleading

This commit is contained in:
Sokomine 2023-11-14 02:29:43 +01:00
parent f60aaa8bd0
commit 9b7e08f2b0

View File

@ -701,16 +701,20 @@ yl_speak_up.set_muted = function(p_name, obj, set_muted)
luaentity.yl_speak_up.talk = false
yl_speak_up.update_nametag(luaentity)
minetest.chat_send_player(p_name,"NPC with ID n_"..npc.." will shut up at pos "..
minetest.pos_to_string(obj:get_pos(),0).." on command of "..p_name)
-- minetest.chat_send_player(p_name,"NPC with ID n_"..npc.." will shut up at pos "..
-- minetest.pos_to_string(obj:get_pos(),0).." on command of "..p_name)
minetest.chat_send_player(p_name, "NPC n_"..tostring(npc).." is now muted and will "..
"only talk to those who can edit the NPC.")
yl_speak_up.log_change(p_name, "n_"..npc, "muted - NPC stops talking")
elseif(not(set_muted) and not(luaentity.yl_speak_up.talk)) then
-- mute the npc
luaentity.yl_speak_up.talk = true
yl_speak_up.update_nametag(luaentity)
minetest.chat_send_player(p_name,"NPC with ID n_"..npc.." will resume speech at pos "..
minetest.pos_to_string(obj:get_pos(),0).." on command of "..p_name)
minetest.chat_send_player(p_name, "NPC n_"..tostring(npc).." is no longer muted and "..
"will talk with any player who right-clicks the NPC.")
-- minetest.chat_send_player(p_name,"NPC with ID n_"..npc.." will resume speech at pos "..
-- minetest.pos_to_string(obj:get_pos(),0).." on command of "..p_name)
yl_speak_up.log_change(p_name, "n_"..npc, "unmuted - NPC talks again")
end
end