added priv check for inventory access
This commit is contained in:
parent
e820ce312e
commit
90269a7e4f
@ -42,8 +42,15 @@ yl_speak_up.get_fs_inventory = function(player)
|
||||
return "size[6,2]"..
|
||||
"label[0.2,0.5;Ups! This NPC lacks ID or name.]"..
|
||||
"button_exit[2,1.5;1,0.9;exit;Exit]"
|
||||
|
||||
end
|
||||
|
||||
-- only players which can edit this npc can see its inventory
|
||||
if(not(yl_speak_up.may_edit_npc(player, n_id))) then
|
||||
return "size[6,2]"..
|
||||
"label[0.2,0.5;Sorry. You lack the privileges.]"..
|
||||
"button_exit[2,1.5;1,0.9;exit;Exit]"
|
||||
end
|
||||
|
||||
return "size[12,11]" ..
|
||||
"label[2,-0.2;Inventory of "..minetest.formspec_escape(dialog.n_npc)..
|
||||
" (ID: "..tostring(n_id).."):]"..
|
||||
|
Loading…
Reference in New Issue
Block a user