forked from Sokomine/yl_speak_up
added yl_speak_up.npc_is_in_conversation / npc_is_in_conversation_with
This commit is contained in:
parent
d588e38308
commit
cc15431cb2
@ -502,6 +502,29 @@ yl_speak_up.check_for_disambigous_results = function(n_id, pname)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- returns true if someone is speaking to the NPC
|
||||||
|
yl_speak_up.npc_is_in_conversation = function(n_id)
|
||||||
|
for name, data in pairs(yl_speak_up.speak_to) do
|
||||||
|
if(data and data.n_id and data.n_id == n_id) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- returns a list of players that are in conversation with this NPC
|
||||||
|
yl_speak_up.npc_is_in_conversation_with = function(n_id)
|
||||||
|
local liste = {}
|
||||||
|
for name, data in pairs(yl_speak_up.speak_to) do
|
||||||
|
if(data and data.n_id and data.n_id == n_id) then
|
||||||
|
table.insert(liste, name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return liste
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Make the NPC talk
|
-- Make the NPC talk
|
||||||
|
|
||||||
-- assign n_ID
|
-- assign n_ID
|
||||||
|
Loading…
Reference in New Issue
Block a user