Show users with pending trades
This commit is contained in:
parent
03c3cedb6b
commit
1929ea9af3
1 changed files with 12 additions and 2 deletions
14
colors.py
14
colors.py
|
@ -270,7 +270,17 @@ for event in log.log:
|
|||
logitems = logitems[::-1]
|
||||
coupons = coupons[::-1]
|
||||
|
||||
tradepend = len(list(Counter(tradeout).elements())) - len(list(Counter(tradein).elements()))
|
||||
tradepend = len(tradeout) - len(tradein)
|
||||
tradediff = tradeout.copy()
|
||||
halftrades = []
|
||||
if tradepend > 0:
|
||||
for trade in tradein:
|
||||
if trade in tradediff:
|
||||
tradediff.remove(trade)
|
||||
tradediff = sorted(list(dict.fromkeys(tradediff)))
|
||||
for trade in tradediff:
|
||||
cuttrade = trade[11:]
|
||||
halftrades.append(cuttrade)
|
||||
|
||||
print("Calculating level")
|
||||
|
||||
|
@ -1310,7 +1320,7 @@ def indexgen():
|
|||
content.write("rainbow" + " + " + str(levelcrayons - 56))
|
||||
content.write("\">(" + rank + ")</span></li>\n")
|
||||
if tradepend > 0:
|
||||
content.write("<li>" + str(tradepend) + " card")
|
||||
content.write("<li title=\"pending: " + ", ".join(halftrades) + "\">" + str(tradepend) + " card")
|
||||
if tradepend > 1:
|
||||
content.write("s")
|
||||
content.write(" held for trades</li>\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue