#5501 player needs configured privs to store things requiring npc_privs
This commit is contained in:
parent
77173d84b0
commit
c716f74812
@ -318,7 +318,8 @@ yl_speak_up.save_element_p_or_a_or_e = function(
|
||||
return
|
||||
end
|
||||
local priv_list = {}
|
||||
if(not(yl_speak_up.save_element_check_priv(player, yl_speak_up.npc_privs_priv,
|
||||
if(not(yl_speak_up.save_element_check_priv(player,
|
||||
yl_speak_up.npc_priv_needs_player_priv["effect_"..what_type] or "privs",
|
||||
formspec_input_to, " in order to set this effect"))) then
|
||||
return
|
||||
end
|
||||
@ -336,7 +337,8 @@ yl_speak_up.save_element_p_or_a_or_e = function(
|
||||
"button[1.5,1.5;2,0.9;back_from_error_msg;Back]"})
|
||||
return
|
||||
end
|
||||
if(not(yl_speak_up.save_element_check_priv(player, yl_speak_up.npc_privs_priv,
|
||||
if(not(yl_speak_up.save_element_check_priv(player,
|
||||
yl_speak_up.npc_priv_needs_player_priv["effect_move_player"] or "privs",
|
||||
formspec_input_to, " in order to set this effect"))) then
|
||||
return
|
||||
end
|
||||
@ -1870,6 +1872,7 @@ yl_speak_up.get_sub_fs_edit_option_precondition_entity_type = function(
|
||||
if(yl_speak_up.speak_to[pname].obj) then
|
||||
local obj = yl_speak_up.speak_to[pname].obj
|
||||
if(obj) then
|
||||
local entity = obj:get_luaentity()
|
||||
local entity = obj:get_luaentity()
|
||||
if(entity) then
|
||||
data.entity_type = entity.name
|
||||
@ -2001,7 +2004,7 @@ yl_speak_up.get_sub_fs_edit_option_effect_give_item_or_take_item = function(
|
||||
return formspec..
|
||||
"label[0.2,3.0;"..text.."]"..
|
||||
"label[0.2,3.5;Note: You can *save* this effect only if you have the "..
|
||||
"\""..tostring(yl_speak_up.npc_privs_priv).."\" priv!]"..
|
||||
"\""..tostring(yl_speak_up.npc_priv_needs_player_priv[priv_name] or "?").."\" priv!]"..
|
||||
"label[0.2,8.0;"..
|
||||
"And in order to be able to execute it, this NPC\n"..
|
||||
"needs the \""..tostring(priv_name).."\" priv.\n\t"..
|
||||
@ -2028,7 +2031,8 @@ yl_speak_up.get_sub_fs_edit_option_effect_move = function(
|
||||
return formspec..
|
||||
"label[0.2,3.0;Move the player to this position:]"..
|
||||
"label[0.2,3.5;Note: You can *save* this effect only if you have the "..
|
||||
"\""..tostring(yl_speak_up.npc_privs_priv).."\" priv!\n"..
|
||||
"\""..tostring(yl_speak_up.npc_priv_needs_player_priv["effect_move_player"] or "?")..
|
||||
"\" priv!\n"..
|
||||
"And in order to be able to execute it, this NPC needs the \""..
|
||||
"effect_move_player\" priv.\n\t"..
|
||||
"Type \"/npc_talk_privs grant "..tostring(yl_speak_up.speak_to[pname].n_id)..
|
||||
|
Loading…
Reference in New Issue
Block a user