Fixed Default attribute sheet worker

This commit is contained in:
Cassie
2018-11-05 15:45:05 -06:00
parent 11cd80a05b
commit 65617d613c
@@ -3837,6 +3837,21 @@ on("change:repeating_weapon", function() {
});
});
//Setting the Default attribute name for default skill
on("change:default_attribute", function() {
getAttrs(["default_attribute", "default_display"], function(v) {
const display = (v.default_display);
const attribute = (v.default_attribute);
let update = {};
//This sets a hidden input with the Attribute name so the roll template can use it to indicate what attribute was rolled
let attributeNew = attribute.slice(2, -1);
if (attributeNew != display) {update["default_display"] = attributeNew;};
setAttrs(update);
});
});
//REFACTORED Range & MELEE UPDATES
['repeating_range',
'repeating_melee',