Start implementing support for mutaplasmids.

* There's a new table `mutators` that has an FK back to a module, and links to an attribute ID with it's new value
* Fixes an issue in the item state where the "base" value showed the literal base value for the attribute, regardless of override / mutators
* If there is an override and a mutated attribute, mutated value takes effect
This commit is contained in:
blitzmann
2018-05-24 01:26:49 -04:00
parent 33d4a8a691
commit fabf759aa7
8 changed files with 132 additions and 9 deletions

View File

@@ -174,7 +174,12 @@ class ItemParams(wx.Panel):
info = self.attrInfo.get(name)
att = self.attrValues[name]
valDefault = getattr(info, "value", None)
# If we're working with a stuff object, we should get the original value from our getBaseAttrValue function,
# which will return the value with respect to the effective base (with mutators / overrides in place)
valDefault = getattr(info, "value", None) # Get default value from attribute
if self.stuff is not None:
# if it's a stuff, overwrite default (with fallback to current value)
valDefault = self.stuff.getBaseAttrValue(name, valDefault)
valueDefault = valDefault if valDefault is not None else att
val = getattr(att, "value", None)