Skip to content

Commit

Permalink
Ignore mutations with 0 base value
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFenX committed Apr 23, 2020
1 parent 0859f2f commit 8eed6fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eos/saveddata/mutator.py
Expand Up @@ -81,6 +81,8 @@ def build(self):
@validates("value")
def validator(self, key, val):
""" Validates values as properly falling within the range of the modules' Mutaplasmid """
if self.baseValue == 0:
return 0
mod = val / self.baseValue

if self.minMod <= mod <= self.maxMod:
Expand Down
2 changes: 2 additions & 0 deletions gui/builtinItemStatsViews/itemMutator.py
Expand Up @@ -93,6 +93,8 @@ def __init__(self, parent, mod):

first = True
for m in sorted(mod.mutators.values(), key=lambda x: x.attribute.displayName):
if m.baseValue == 0:
continue
if not first:
sizer.Add(wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL), 0, wx.ALL | wx.EXPAND, 5)
first = False
Expand Down

0 comments on commit 8eed6fb

Please sign in to comment.