Added check to append "..." when a shop has more than 5 matches.

doc_update
Joey Hines 2018-09-26 07:44:42 -05:00
parent 2dab55ab78
commit 2b6db04d28
1 changed files with 9 additions and 3 deletions

View File

@ -181,10 +181,16 @@ class Commands:
if len(shop_list) == 0:
raise ItemNotFound
shop_list_str = ""
shop_list_str = "\n"
for shop in shop_list:
shop_list_str = shop_list_str + shop[0].selling_str() + list_to_string(
self.interface.get_inventory_matches(session, shop[0], item_name)) + '\n\n'
matches = self.interface.get_inventory_matches(session, shop[0], item_name)
shop_list_str = shop_list_str + shop[0].selling_str() + list_to_string(matches)
if len(matches) == 5:
shop_list_str = shop_list_str + '\n**...**'
shop_list_str = shop_list_str + '\n\n'
finally:
session.close()