From 631fd374d42ff26635d5ba2648f8e893ad7f602c Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Wed, 28 Oct 2020 23:44:01 -0400 Subject: [PATCH] pers bus duping fix --- src/endWeek/economics/persBusiness.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/endWeek/economics/persBusiness.js b/src/endWeek/economics/persBusiness.js index dee87e2f029..e07afbfa3ff 100644 --- a/src/endWeek/economics/persBusiness.js +++ b/src/endWeek/economics/persBusiness.js @@ -846,6 +846,7 @@ App.EndWeek.personalBusiness = function() { } } App.Events.addParagraph(el, r); + r = []; if (V.secExpEnabled > 0) { if (V.SecExp.smilingMan.progress === 10 && random(1, 100) >= 85) { @@ -890,7 +891,6 @@ App.EndWeek.personalBusiness = function() { IncreasePCSkills('engineering', 0.1); } App.Events.addParagraph(el, r); - r = []; if (V.SecExp.buildings.weapManu) { r = []; @@ -937,14 +937,21 @@ App.EndWeek.personalBusiness = function() { } else { cashX(income, "personalBusiness"); } + App.Events.addParagraph(el, r); } if (V.SecExp.edicts.taxTrade === 1) { const tradeTax = Math.ceil(V.SecExp.core.trade * random(80, 120)); - r.push(App.UI.DOM.makeElement("div", `Fees on transitioning goods this week made <span class="yellowgreen">${cashFormat(tradeTax)}.</span>`)); + App.Events.addNode( + el, + [ + `Fees on transitioning goods this week made`, + App.UI.DOM.makeElement("span", `${cashFormat(tradeTax)}.`, "yellowgreen") + ], + "div" + ); cashX(Math.ceil(tradeTax), "personalBusiness"); } - App.Events.addParagraph(el, r); } r = []; r.push(`Routine upkeep of your demesne costs <span class="yellow">${cashFormat(V.costs)}.</span>`); -- GitLab