From a5b60bd2910fc120849db2ac1582d464c2c2eb1b Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Fri, 8 Oct 2010 23:48:28 +0200 Subject: [PATCH] Add modification type and amount in affected by --- eos | 2 +- gui/itemStats.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/eos b/eos index d8ca447ef..5f34cd339 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit d8ca447efd612cdd272cee7ae10f5b36ae5324b0 +Subproject commit 5f34cd339e15e88a56529c893a9bd4b54ea93e33 diff --git a/gui/itemStats.py b/gui/itemStats.py index 5613adc5d..557bb2fff 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -441,20 +441,20 @@ class ItemAffectedBy (wx.Panel): things = {} for attrName in cont.iterAfflictions(): for fit, afflictors in cont.getAfflictions(attrName).iteritems(): - for afflictor in afflictors: + for afflictor, modifier, amount in afflictors: if afflictor.item.name not in things: things[afflictor.item.name] = [type(afflictor), set(), set()] info = things[afflictor.item.name] info[1].add(afflictor) - info[2].add(attrName) + info[2].add((attrName, modifier, amount)) order = things.keys() order.sort(key=lambda x: (self.ORDER.index(things[x][0]), x)) for itemName in order: info = things[itemName] - afflictorType, afflictors, attrNames = info + afflictorType, afflictors, attrData = info counter = len(afflictors) baseAfflictor = afflictors.pop() @@ -468,7 +468,7 @@ class ItemAffectedBy (wx.Panel): child = self.affectedBy.AppendItem(root, "%s" % itemName if counter == 1 else "%s x %d" % (itemName,counter), itemIcon) if counter > 0: - for attrName in attrNames: + for attrName, attrModifier, attrAmount in attrData: attrInfo = self.stuff.item.attributes.get(attrName) displayName = (attrInfo.displayName if self.toggleView ==1 else attrInfo.name) if attrInfo else "" @@ -481,6 +481,5 @@ class ItemAffectedBy (wx.Panel): else: attrIcon = self.imageList.Add(bitmapLoader.getBitmap("07_15", "pack")) - - self.affectedBy.AppendItem(child, "%s" % (displayName if displayName != "" else attrName), attrIcon) + self.affectedBy.AppendItem(child, "%s %s%.2f" % ((displayName if displayName != "" else attrName), attrModifier, attrAmount), attrIcon)