Instantiate mutators when a mutated module is created / loaded from DB. Some bug fixes for a few things.
This commit is contained in:
@@ -23,7 +23,7 @@ class AttributeGauge(wx.Window):
|
||||
self._bar_colour = None
|
||||
self._bar_gradient = None
|
||||
|
||||
self.leading_edge = True
|
||||
self.leading_edge = leading_edge
|
||||
|
||||
self._border_padding = 0
|
||||
self._max_range = max_range
|
||||
|
||||
@@ -36,13 +36,16 @@ class ItemMutator(wx.Panel):
|
||||
min = round(x.min, 2)
|
||||
max = round(x.max, 2)
|
||||
|
||||
value = stuff.itemModifiedAttributes.getOriginal(x.name)
|
||||
slider = AttributeSlider(self, value, min, max, not x.highIsGood)
|
||||
slider.SetValue(value)
|
||||
base_value = stuff.item.attributes[x.name].value
|
||||
|
||||
mutator = stuff.mutators[x.attributeID]
|
||||
|
||||
slider = AttributeSlider(self, base_value, min, max, not x.highIsGood)
|
||||
slider.SetValue(mutator.value)
|
||||
headingSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
minValue = round(value * min, 3)
|
||||
maxValue = round(value * max, 3)
|
||||
minValue = round(base_value * min, 3)
|
||||
maxValue = round(base_value * max, 3)
|
||||
|
||||
# create array for the two ranges
|
||||
min_t = [minValue, min, None]
|
||||
@@ -64,7 +67,7 @@ class ItemMutator(wx.Panel):
|
||||
worse_range = min_t
|
||||
|
||||
print("{}: \nHigh is good: {}".format(x.displayName, x.highIsGood))
|
||||
print("Value {}".format(value))
|
||||
print("Value {}".format(base_value))
|
||||
|
||||
print(min_t)
|
||||
print(max_t)
|
||||
|
||||
Reference in New Issue
Block a user