Redesign of the ship browser, its a lot cleaner and extensible now
This commit is contained in:
@@ -52,7 +52,10 @@ class AttributeDisplay(ViewColumn):
|
||||
self.columnText = info.displayName if info.displayName != "" else info.name
|
||||
|
||||
def getText(self, mod):
|
||||
attr = mod.getModifiedItemAttr(self.info.name)
|
||||
if hasattr(mod, "item"):
|
||||
attr = mod.getModifiedItemAttr(self.info.name)
|
||||
else:
|
||||
attr = mod.getAttribute(self.info.name)
|
||||
if attr:
|
||||
return (formatAmount(attr, 3, 0, 3))
|
||||
else:
|
||||
@@ -66,4 +69,4 @@ class AttributeDisplay(ViewColumn):
|
||||
("displayName", bool, False),
|
||||
("showIcon", bool, True))
|
||||
|
||||
AttributeDisplay.register()
|
||||
AttributeDisplay.register()
|
||||
|
||||
Reference in New Issue
Block a user