From 46b25f3e221fb92d73b66e59a6354b5938de15b3 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 11 Jan 2020 00:37:38 -0500 Subject: [PATCH] tweak new getslavecost --- src/js/economyJS.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/economyJS.js b/src/js/economyJS.js index e6308a85e7c..c4c0062aca9 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -580,7 +580,7 @@ window.calculateCosts = (function() { /** * @param {App.Entity.SlaveState} s - * @returns {number} + * @returns {Array} */ window.getSlaveCostArray = function(s) { if (!s) { @@ -717,7 +717,7 @@ window.getSlaveCostArray = function(s) { } if (s.geneticQuirks.macromastia === 2) { if (V.geneticMappingUpgrade >= 1) { - retval.push({text: "Additional dietary supplements due to lipedema", value: foodCost * 0.2}); + retval.push({text: "Additional dietary supplements due to macromastia", value: foodCost * 0.2}); } else { retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); } @@ -1004,6 +1004,10 @@ window.getSlaveCostArray = function(s) { return retval; }; +/** + * @param {App.Entity.SlaveState} s + * @returns {Number} + */ window.getSlaveCost = function(s) { return getSlaveCostArray(s).reduce((result, {value})=>result + value, 0); }; -- GitLab