better loggin

This commit is contained in:
jomo
2014-06-29 15:37:45 +02:00
parent 4a2cbf7f1f
commit 5ed5753b38

View File

@@ -56,9 +56,11 @@ def doCycle(player, up):
shift = -9 if up else 9 shift = -9 if up else 9
shift = shift % len(items) shift = shift % len(items)
for _ in range(4): for _ in range(4):
msg(player, items[:shift])
items = items[shift:] + items[:shift] # shift "around" items = items[shift:] + items[:shift] # shift "around"
uniq_items = sorted(set(list(items)[:9])) # get unique inventory uniq_items = sorted(set(list(items)[:9])) # get unique inventory
msg(player, uniq_items)
if uniq_items != [None]: # row not empty if uniq_items != [None]: # row not empty
msg(player, "not empty, using")
break break
msg(player, "empty, skipping")
inv.setContents(items) inv.setContents(items)