Show Point buy on Build tab

This commit is contained in:
Stefan Zermatten
2022-08-25 13:18:24 +02:00
parent 8d729216b5
commit 11a527481e
9 changed files with 221 additions and 57 deletions

View File

@@ -42,6 +42,7 @@ export default function computePointBuy(computation, node) {
prop.spent += costFunction.value;
}
});
prop.pointsLeft = (prop.total?.value || 0) - (prop.spent || 0);
if (prop.spent > prop.total?.value) {
prop.errors = prop.errors || [];
prop.errors.push({