Small changes to accomodate eos attribute rework

This commit is contained in:
cncfanatics
2010-10-31 10:18:52 +01:00
parent eb65f08510
commit 710e1e13f7
3 changed files with 6 additions and 9 deletions

2
eos

Submodule eos updated: 8bbf8c874a...533606ff86

View File

@@ -106,7 +106,7 @@ class TargetingMiscViewFull(StatsView):
("labelFullAlignTime", lambda: fit.alignTime, 3, 0, 0, "s"),
("labelFullSigRadius", lambda: fit.ship.getModifiedItemAttr("signatureRadius"), 3, 0, 9, ""),
("labelFullWarpSpeed", lambda: fit.warpSpeed, 3, 0, 0, "AU/s"),
("labelFullCargo", lambda: fit.extraAttributes["capacity"], 3, 0, 9, u"m\u00B3"))
("labelFullCargo", lambda: fit.ship.getModifiedItemAttr("capacity"), 3, 0, 9, u"m\u00B3"))
counter = 0
for labelName, value, prec, lowest, highest, unit in stats:
label = getattr(self, labelName)

View File

@@ -252,7 +252,6 @@ class ItemParams (wx.Panel):
attrsInfo = self.item.attributes if self.stuff is None else self.stuff.charge.attributes
names = list(attrs.iterkeys())
names.extend(("mass", "capacity", "volume"))
names.sort()
idNameMap = {}
@@ -260,12 +259,10 @@ class ItemParams (wx.Panel):
for name in names:
info = attrsInfo.get(name)
if name in ("mass", "capacity", "volume"):
value = getattr(self.item, name, 0)
else:
att = attrs[name]
val = getattr(att, "value", None)
value = val if val is not None else att
att = attrs[name]
val = getattr(att, "value", None)
value = val if val is not None else att
if self.toggleView != 1:
attrName = name