From 922b7fa32b3fbc805e6e01e79ac7eabf46457528 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sat, 22 Jul 2023 10:05:11 +0200 Subject: [PATCH] added legend to npc list --- fs_npc_list.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs_npc_list.lua b/fs_npc_list.lua index 62e69c5..e8c0bdb 100644 --- a/fs_npc_list.lua +++ b/fs_npc_list.lua @@ -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