Fix a few things with affected by tab (indentation issue, overwriting modifier incorrectly)
This commit is contained in:
@@ -74,6 +74,9 @@ class ModifiedAttributeDict(collections.MutableMapping):
|
||||
self.__multipliers = {}
|
||||
self.__penalizedMultipliers = {}
|
||||
self.__postIncreases = {}
|
||||
# We sometimes override the modifier (for things like skill handling). Store it here instead of registering it
|
||||
# with the fit (which could cause bug for items that have both item bonuses and skill bonus, ie Subsystems)
|
||||
self.__tmpModifier = None
|
||||
|
||||
def clear(self):
|
||||
self.__intermediary.clear()
|
||||
@@ -269,7 +272,7 @@ class ModifiedAttributeDict(collections.MutableMapping):
|
||||
# to point to the correct fit. See GH Issue #434
|
||||
fit = self.parent.owner
|
||||
skill = fit.character.getSkill(skillName)
|
||||
fit.register(skill)
|
||||
self.__tmpModifier = skill
|
||||
return skill.level
|
||||
|
||||
def getAfflictions(self, key):
|
||||
@@ -295,7 +298,12 @@ class ModifiedAttributeDict(collections.MutableMapping):
|
||||
# Reassign alias to list
|
||||
affs = affs[fit]
|
||||
# Get modifier which helps to compose 'Affected by' map
|
||||
modifier = self.fit.getModifier()
|
||||
|
||||
if self.__tmpModifier:
|
||||
modifier = self.__tmpModifier
|
||||
self.__tmpModifier = None
|
||||
else:
|
||||
modifier = self.fit.getModifier()
|
||||
|
||||
# Add current affliction to list
|
||||
affs.append((modifier, operation, bonus, used))
|
||||
|
||||
@@ -1203,7 +1203,7 @@ class ItemAffectedBy(wx.Panel):
|
||||
penalized += "(penalized)"
|
||||
if 'r' in attrModifier:
|
||||
penalized += "(resisted)"
|
||||
attrModifier = "*"
|
||||
attrModifier = "*"
|
||||
|
||||
# this is the Module node, the attribute will be attached to this
|
||||
display = "%s %s %.2f %s" % (displayStr, attrModifier, attrAmount, penalized)
|
||||
@@ -1335,7 +1335,7 @@ class ItemAffectedBy(wx.Panel):
|
||||
penalized += "(penalized)"
|
||||
if 'r' in attrModifier:
|
||||
penalized += "(resisted)"
|
||||
attrModifier = "*"
|
||||
attrModifier = "*"
|
||||
|
||||
attributes.append((attrName, (displayName if displayName != "" else attrName), attrModifier,
|
||||
attrAmount, penalized, attrIcon))
|
||||
|
||||
@@ -431,6 +431,9 @@ def main(old, new, groups=True, effects=True, attributes=True, renames=True):
|
||||
title = 'items'
|
||||
printrenames(ren_items, title)
|
||||
|
||||
print
|
||||
print
|
||||
|
||||
if effects or attributes or groups:
|
||||
# Print legend only when there're any interesting changes
|
||||
if len(global_itmdata[S["removed"]]) > 0 or len(global_itmdata[S["changed"]]) > 0 or len(global_itmdata[S["added"]]) > 0:
|
||||
|
||||
Reference in New Issue
Block a user