Design change for paginated text blobs
fix for !accounts; Warning: spammy, if there are many accounts! display loot comment in roll list
This commit is contained in:
@@ -353,22 +353,23 @@ class LootListsController:
|
||||
blob += "<header2>%s<end>\n" % category if category is not None else ""
|
||||
|
||||
for item in items:
|
||||
item.id = self.text.make_item(item.low_id, item.high_id, item.ql, item.name)
|
||||
if item.multiloot > 1:
|
||||
single_link = self.text.make_chatcmd("Add to loot", "/tell <myname> loot %s 1" % item.id)
|
||||
single_link1 = self.text.make_chatcmd("Add to auction", "/tell <myname> auction prepare %s " % item.id)
|
||||
multi_link = self.text.make_chatcmd(
|
||||
"Add x%d to loot" % item.multiloot, "/tell <myname> loot %s %d" % (item.id, item.multiloot))
|
||||
multi_link2 = self.text.make_chatcmd(
|
||||
"Add x%d to auction" % item.multiloot, "/tell <myname> auction prepare %s (ALL)" % item.id)
|
||||
add_links = "└ [%s] [%s]<br> └ [%s] [%s (ALL) - One Winner]" % (
|
||||
single_link, multi_link, single_link1, multi_link2)
|
||||
else:
|
||||
add_links = "└ [%s]<br> └ [%s]" % (
|
||||
self.text.make_chatcmd("Add to loot", "/tell <myname> loot %s 1" % item.id),
|
||||
self.text.make_chatcmd("Add to auction", "/tell <myname> auction prepare %s" % item.id))
|
||||
comment = f" ({item.comment})" if item.comment != "" else ""
|
||||
item.id = self.text.make_item(item.low_id, item.high_id, item.ql, item.name + comment)
|
||||
|
||||
comment = " (%s)" % item.comment if item.comment != "" else ""
|
||||
if item.multiloot > 1:
|
||||
print(item)
|
||||
single_link = self.text.make_chatcmd("Add to loot", f"/tell <myname> loot {item.id}")
|
||||
single_link1 = self.text.make_chatcmd("Add to auction", f"/tell <myname> auction prepare {item.id} ")
|
||||
multi_link = self.text.make_chatcmd(
|
||||
f"Add x{item.multiloot:d} to loot", f"/tell <myname> loot {item.id} {item.multiloot}")
|
||||
multi_link2 = self.text.make_chatcmd(
|
||||
f"Add x{item.multiloot:d} to auction", f"/tell <myname> auction prepare {item.id} (ALL)")
|
||||
add_links = f"└ [{single_link}] [{multi_link}]<br> └ [{single_link1}] [{multi_link2} (ALL) - One Winner]"
|
||||
else:
|
||||
add_links = f"└ [{self.text.make_chatcmd('Add to loot', f'/tell <myname> loot {item.id} {comment}')}]<br> " \
|
||||
f"└ [{self.text.make_chatcmd('Add to auction', f'/tell <myname> auction prepare {item.id}')}]"
|
||||
|
||||
# comment = f" ({item.comment})" if item.comment != "" else ""
|
||||
|
||||
if self.setting_service.get("use_item_icons").get_value():
|
||||
item_link = self.text.make_item(item.low_id, item.high_id, item.ql, "<img src=rdb://%s>" % item.icon)
|
||||
|
||||
Reference in New Issue
Block a user