added legend to npc list

This commit is contained in:
Sokomine 2023-07-22 10:05:11 +02:00
parent 80b47889ec
commit 922b7fa32b

View File

@ -357,9 +357,13 @@ yl_speak_up.get_fs_show_npc_list = function(pname, selected_row)
else
selected_row = 1
info_current_row = 'label[0.1,11.2;Click on a column name/header in order to sort by '..
'that column.\nClick it again in order to reverse sort order.\n'..
'that column. Click it again in order to reverse sort order.\n'..
'Click on a row to get more information about a specific NPC.\n'..
'Only NPC that can be edited by you are shown.]'
'Only NPC that can be edited by you are shown.\n'..
'Legend: \"G\": is generic NPC. '..
'\"#Tr\", \"#Pr\": Number of trades or properties the NPC offers.\n'..
' \"#Ed\": Number of players that can edit the NPC. '..
'\"Privs\": List of abbreviated names of privs the NPC has.]'
end
local formspec = {}
@ -443,8 +447,10 @@ yl_speak_up.get_fs_show_npc_list = function(pname, selected_row)
table.insert(formspec, line.priv_list)
end
table.insert(formspec, ";"..selected_row.."]")
return formspec_start..table.concat(formspec, ',')..info_current_row..
'button_exit[0.1,14;19.6,0.6;exit;Exit]'
return table.concat({formspec_start,
table.concat(formspec, ','),
info_current_row,
'button_exit[0.1,14;19.6,0.6;exit;Exit]'}, '')
end