Show shortcut values in market list
This commit is contained in:
@@ -55,6 +55,14 @@ class BaseName(ViewColumn):
|
||||
return stuff.item.name
|
||||
else:
|
||||
item = getattr(stuff, "item", stuff)
|
||||
marketShortcut = getattr(item, "marketShortcut", None)
|
||||
|
||||
if marketShortcut:
|
||||
# use unicode subscript to display shortcut value
|
||||
shortcut = unichr(marketShortcut+8320)+u" "
|
||||
|
||||
return shortcut+item.name
|
||||
|
||||
return item.name
|
||||
|
||||
BaseName.register()
|
||||
|
||||
@@ -438,6 +438,11 @@ class ItemView(d.Display):
|
||||
self.metalvls = sMkt.directAttrRequest(items, attrs)
|
||||
# Re-sort stuff
|
||||
items.sort(key=self.itemSort)
|
||||
|
||||
for i, item in enumerate(items[:9]):
|
||||
# set shortcut info for first 9 modules
|
||||
item.marketShortcut = i+1
|
||||
|
||||
d.Display.refresh(self, items)
|
||||
|
||||
def makeReverseMetaMap(self):
|
||||
|
||||
Reference in New Issue
Block a user