From bfd4a48edd3a2d788c78af43dabedcdc7f8fcd74 Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Tue, 28 Jul 2020 02:26:38 -0400 Subject: [PATCH] Added text coloring to remove animal housing price --- src/facilities/farmyard/farmyard.js | 15 +++++++++------ src/facilities/farmyard/farmyard.tw | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js index 6f3b6d9b253..d46bdd5f4a4 100644 --- a/src/facilities/farmyard/farmyard.js +++ b/src/facilities/farmyard/farmyard.js @@ -491,7 +491,11 @@ App.Facilities.Farmyard.animalHousing = function() { const removeHousing = document.createElement("div"), - removeCost = ((farmyardKennels + farmyardStables + farmyardCages) * 5000) * V.upgradeMultiplierArcology; + removeHousingCost = document.createElement("span"), + + removeHousingPrice = ((farmyardKennels + farmyardStables + farmyardCages) * 5000) * V.upgradeMultiplierArcology; + + removeHousingCost.classList.add("yellowgreen"); if (farmyardKennels || farmyardStables || farmyardCages) { removeHousing.append(document.createElement("br")); @@ -511,17 +515,16 @@ App.Facilities.Farmyard.animalHousing = function() { V.felines = []; App.Facilities.Farmyard.clearAnimalsBought(); + cashX(forceNeg(removeHousingPrice)); })); - removeHousing.append(` Will cost ${cashFormat(removeCost)}`); + removeHousingCost.append(cashFormat(removeHousingPrice)); + removeHousing.append(` Will cost `, removeHousingCost); } - frag.append(" ", kennels); - frag.append(" ", stables); - frag.append(" ", cages); - frag.append(" ", removeHousing); + frag.append(kennels, stables, cages, removeHousing); return frag; }; diff --git a/src/facilities/farmyard/farmyard.tw b/src/facilities/farmyard/farmyard.tw index 8bc80e3a035..e29de32b121 100644 --- a/src/facilities/farmyard/farmyard.tw +++ b/src/facilities/farmyard/farmyard.tw @@ -190,12 +190,13 @@ </span> <span id="rules"> -<br><br> +<br> <<includeDOM App.Facilities.Farmyard.rules()>> -<br><br> +<br> </span> <span id="upgrades"> +<br> <<includeDOM App.Facilities.Farmyard.upgrades()>> <br> </span> -- GitLab