HOTFIX -- update "Original Value" skillpoint display

This commit is contained in:
hppeng 2022-06-26 05:44:10 -07:00
parent 21773ab52d
commit 379ebb8224

View file

@ -721,6 +721,7 @@ class DisplayBuildWarningsNode extends ComputeNode {
let total_assigned = 0; let total_assigned = 0;
for (let i in skp_order){ //big bren for (let i in skp_order){ //big bren
const assigned = skillpoints[i] - base_totals[i] + min_assigned[i] const assigned = skillpoints[i] - base_totals[i] + min_assigned[i]
setText(skp_order[i] + "-skp-base", "Original: " + base_totals[i]);
setText(skp_order[i] + "-skp-assign", "Assign: " + assigned); setText(skp_order[i] + "-skp-assign", "Assign: " + assigned);
setValue(skp_order[i] + "-skp", skillpoints[i]); setValue(skp_order[i] + "-skp", skillpoints[i]);
let linebreak = document.createElement("br"); let linebreak = document.createElement("br");
@ -908,7 +909,6 @@ class SkillPointSetterNode extends ComputeNode {
if (input_map.size !== 1) { throw "SkillPointSetterNode accepts exactly one input (build)"; } if (input_map.size !== 1) { throw "SkillPointSetterNode accepts exactly one input (build)"; }
const [build] = input_map.values(); // Extract values, pattern match it into size one list and bind to first element const [build] = input_map.values(); // Extract values, pattern match it into size one list and bind to first element
for (const [idx, elem] of skp_order.entries()) { for (const [idx, elem] of skp_order.entries()) {
setText(elem + "-skp-base", "Original: " + build.base_skillpoints[idx]);
document.getElementById(elem+'-skp').value = build.total_skillpoints[idx]; document.getElementById(elem+'-skp').value = build.total_skillpoints[idx];
} }
// NOTE: DO NOT merge these loops for performance reasons!!! // NOTE: DO NOT merge these loops for performance reasons!!!