Added check to append "..." when a shop has more than 5 matches.
parent
2dab55ab78
commit
2b6db04d28
|
@ -181,10 +181,16 @@ class Commands:
|
||||||
if len(shop_list) == 0:
|
if len(shop_list) == 0:
|
||||||
raise ItemNotFound
|
raise ItemNotFound
|
||||||
|
|
||||||
shop_list_str = ""
|
shop_list_str = "\n"
|
||||||
for shop in shop_list:
|
for shop in shop_list:
|
||||||
shop_list_str = shop_list_str + shop[0].selling_str() + list_to_string(
|
matches = self.interface.get_inventory_matches(session, shop[0], item_name)
|
||||||
self.interface.get_inventory_matches(session, shop[0], item_name)) + '\n\n'
|
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:
|
finally:
|
||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue