diff --git a/privs.lua b/privs.lua index 11b7958..9e49862 100644 --- a/privs.lua +++ b/privs.lua @@ -49,6 +49,10 @@ yl_speak_up.npc_has_priv = function(n_id, priv_name, generic_npc_id) if(not(n_id) or not(priv_name)) then return false end + -- remove the leading "_" from the n_id: + if(generic_npc_id) then + generic_npc_id = string.sub(generic_npc_id, 2) + end -- if the precondition or effect come from a generic_npc and that -- generic npc has the desired priv, then the priv has been granted if(generic_npc_id