From 8eed6fbe215dc421f16dfda3585fe4c885d97ac6 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Thu, 23 Apr 2020 19:47:57 +0300 Subject: [PATCH] Ignore mutations with 0 base value --- eos/saveddata/mutator.py | 2 ++ gui/builtinItemStatsViews/itemMutator.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eos/saveddata/mutator.py b/eos/saveddata/mutator.py index 6353397aa..f16e36656 100644 --- a/eos/saveddata/mutator.py +++ b/eos/saveddata/mutator.py @@ -81,6 +81,8 @@ class Mutator(EqBase): @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: diff --git a/gui/builtinItemStatsViews/itemMutator.py b/gui/builtinItemStatsViews/itemMutator.py index 59d1ad171..ce5d366c7 100644 --- a/gui/builtinItemStatsViews/itemMutator.py +++ b/gui/builtinItemStatsViews/itemMutator.py @@ -93,6 +93,8 @@ class ItemMutatorList(wx.ScrolledWindow): 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