From a5067d02c97eb938aea565a3c125a5e155d3a4cd Mon Sep 17 00:00:00 2001
From: DCoded <dcoded@live.com>
Date: Mon, 27 Jul 2020 12:32:02 -0400
Subject: [PATCH] Renamed farmyardUpgrade to farmyardUpgrades

---
 js/003-data/gameVariableData.js               |  8 +++++--
 .../backwardsCompatibility.js                 |  4 ++--
 src/facilities/farmyard/farmyard.js           |  4 ++++
 src/facilities/farmyard/farmyard.tw           | 24 +++++++++----------
 src/facilities/farmyard/food/foodAmount.js    |  8 +++----
 .../farmyard/reports/farmyardReport.js        |  8 +++----
 src/js/economyJS.js                           |  8 +++----
 7 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index a02649e277a..701ce457e6e 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -798,8 +798,12 @@ App.Data.resetOnNGPlus = {
 	farmMenials: 0,
 	farmMenialsSpace: 0,
 	farmyardDecoration: "standard",
-	farmyardUpgrade: {
-		pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0
+	farmyardUpgrades: {
+		pump: 0,
+		fertilizer: 0,
+		hydroponics: 0,
+		machinery: 0,
+		seeds: 0,
 	},
 	farmyardCrops: 0,
 	farmyardStables: 0,
diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js
index 64ed1557824..eee6002ecf7 100644
--- a/src/data/backwardsCompatibility/backwardsCompatibility.js
+++ b/src/data/backwardsCompatibility/backwardsCompatibility.js
@@ -302,8 +302,8 @@ App.Update.globalVariables = function(node) {
 	// Farmyard Subsection
 	const animalsBought = ["abbysinians", "beagles", "bengals", "birmans", "bulldogs", "bulls", "canines", "cougars", "dingos", "felines", "foxes", "frenchBulldogs", "germanShepherds", "goldenRetrievers", "hooved", "horses", "jackals", "jaguars", "labradorRetrievers", "leopards", "lions", "lynx", "maineCoons", "orientalShorthairs", "persians", "pigs", "poodles", "pumas", "ragdolls", "rottweilers", "russianBlues", "siameses", "siberianHuskies", "sphynxes", "tigers", "wolves", "yorkshireTerriers", "zebras"];
 	animalsBought.forEach(function(species) { V.animalsBought[species] = V.animalsBought[species] || 0; });
-	if (typeof V.farmyardUpgrade !== "object") {
-		V.farmyardUpgrade = {
+	if (typeof V.farmyardUpgrades !== "object") {
+		V.farmyardUpgrades = {
 			pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0
 		};
 	}
diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js
index 6df4207020d..820b8a5fbe5 100644
--- a/src/facilities/farmyard/farmyard.js
+++ b/src/facilities/farmyard/farmyard.js
@@ -4,6 +4,10 @@ App.Facilities.Farmyard.clearAnimalsBought = function () {
 	}
 };
 
+App.Facilities.Farmyard.upgrades = function () {
+
+};
+
 App.Facilities.Farmyard.animalHousing = function () {
 	let frag = new DocumentFragment();
 
diff --git a/src/facilities/farmyard/farmyard.tw b/src/facilities/farmyard/farmyard.tw
index b4f9b7f5fdb..436ce5e8a08 100644
--- a/src/facilities/farmyard/farmyard.tw
+++ b/src/facilities/farmyard/farmyard.tw
@@ -12,7 +12,7 @@
 
 <<set _CL = $canines.length, _HL = $hooved.length, _FL = $felines.length, _FyL = App.Entity.facilities.farmyard.employeesIDs().size>>
 <p class="scene-intro">
-	$farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and concrete that is $arcologies[0].name. Animals are kept in pens, tended to by your slaves, while <<if $farmyardUpgrade.hydroponics == 1>>rows of hydroponics equipment<<else>>makeshift fields<</if>> grow crops.
+	$farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and concrete that is $arcologies[0].name. Animals are kept in pens, tended to by your slaves, while <<if $farmyardUpgrades.hydroponics == 1>>rows of hydroponics equipment<<else>>makeshift fields<</if>> grow crops.
 	<<switch $farmyardDecoration>>
 		<<case "Roman Revivalist">>
 			Its red tiles and white stone walls are the very picture of a Roman farm villa's construction, as are the marble statues and reliefs. Saturn and Ceres look over the prosperity of the fields<<if $seeBestiality>>, Mercury watches over the health of the animals, and Feronia ensures strong litters in your slaves.<<else>> and Mercury watches over the health of the animals.<</if>>. The slaves here are all looked after well, as they have one of the most important jobs in $arcologies[0].name.
@@ -63,7 +63,7 @@
 		<<case "Hedonistic">>
 			It features wider gates and stalls, for both the humans visiting or tending the occupants, and the animals starting to mimic their handlers <<if $seeBestiality>>and company<</if>>, with plenty of seats along the way.
 		<<default>>
-			It is very much a converted warehouse still, sectioned off in various 'departments'<<if $farmyardUpgrade.machinery == 1>> with machinery placed where it can be<<if $farmyardUpgrade.hydroponics > 0>> and plumbing for the hydroponics system running every which way<</if>><</if>>.
+			It is very much a converted warehouse still, sectioned off in various 'departments'<<if $farmyardUpgrades.machinery == 1>> with machinery placed where it can be<<if $farmyardUpgrades.hydroponics > 0>> and plumbing for the hydroponics system running every which way<</if>><</if>>.
 	<</switch>>
 
 	<<if _FyL > 2>>
@@ -227,8 +227,8 @@
 </span>
 
 <span id="upgrades">
-<<if $farmyardUpgrade.pump == 0>>
-	[[Upgrade the water pump|Farmyard][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.pump = 1]]
+<<if $farmyardUpgrades.pump == 0>>
+	[[Upgrade the water pump|Farmyard][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrades.pump = 1]]
 	<span class="note">
 		Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and slightly increases crop yield.
 	</span>
@@ -236,8 +236,8 @@
 <<else>>
 	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces.
 	<br>
-	<<if $farmyardUpgrade.fertilizer == 0>>
-		[[Use a higher-quality fertilizer|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.fertilizer = 1]]
+	<<if $farmyardUpgrades.fertilizer == 0>>
+		[[Use a higher-quality fertilizer|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrades.fertilizer = 1]]
 		<span class="note">
 			Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> moderately increases crop yield and slightly increases upkeep costs.
 		</span>
@@ -245,8 +245,8 @@
 	<<else>>
 		$farmyardNameCaps is using a higher-quality fertilizer, moderately increasing the amount of crops it produces and raising slightly raising upkeep costs.
 		<br>
-		<<if $farmyardUpgrade.hydroponics == 0>>
-			[[Purchase a hydroponics system|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.hydroponics = 1]]
+		<<if $farmyardUpgrades.hydroponics == 0>>
+			[[Purchase a hydroponics system|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrades.hydroponics = 1]]
 			<span class="note">
 				Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and moderately decreases upkeep costs.
 			</span>
@@ -254,8 +254,8 @@
 		<<else>>
 			$farmyardNameCaps is outfitted with an advanced hydroponics system, reducing the amount of water your crops consume and thus moderately reducing upkeep costs.
 			<br>
-			<<if $farmyardUpgrade.seeds == 0>>
-				[[Purchase genetically modified seeds|Farmyard][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"),$farmyardUpgrade.seeds = 1]]
+			<<if $farmyardUpgrades.seeds == 0>>
+				[[Purchase genetically modified seeds|Farmyard][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"),$farmyardUpgrades.seeds = 1]]
 				<span class="note">
 					Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and significantly increases crop yield and moderately increases upkeep costs.
 				</span>
@@ -263,8 +263,8 @@
 			<<else>>
 				$farmyardNameCaps is using genetically modified seeds, significantly increasing the amount of crops it produces and moderately increasing upkeep costs.
 				<br>
-				<<if $farmyardUpgrade.machinery == 0>>
-					[[Upgrade the machinery|Farmyard][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.machinery = 1]]
+				<<if $farmyardUpgrades.machinery == 0>>
+					[[Upgrade the machinery|Farmyard][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrades.machinery = 1]]
 					<span class="note">
 						Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>> significantly increases crop yield and significantly decreases upkeep costs.
 					</span>
diff --git a/src/facilities/farmyard/food/foodAmount.js b/src/facilities/farmyard/food/foodAmount.js
index 7720ac25f6a..6b7c0a78e25 100644
--- a/src/facilities/farmyard/food/foodAmount.js
+++ b/src/facilities/farmyard/food/foodAmount.js
@@ -9,19 +9,19 @@ App.Facilities.Farmyard.foodAmount = function (slave) {
 		throw `Current slave is not valid. Please report this`;
 	}
 
-	if (V.farmyardUpgrade.pump) {
+	if (V.farmyardUpgrades.pump) {
 		food += 15;
 	}
 
-	if (V.farmyardUpgrade.fertilizer) {
+	if (V.farmyardUpgrades.fertilizer) {
 		food += 35;
 	}
 
-	if (V.farmyardUpgrade.seeds) {
+	if (V.farmyardUpgrades.seeds) {
 		food += 65;
 	}
 
-	if (V.farmyardUpgrade.machinery) {
+	if (V.farmyardUpgrades.machinery) {
 		food += 65;
 	}
 
diff --git a/src/facilities/farmyard/reports/farmyardReport.js b/src/facilities/farmyard/reports/farmyardReport.js
index 098580551c9..05b0ae7a5b8 100644
--- a/src/facilities/farmyard/reports/farmyardReport.js
+++ b/src/facilities/farmyard/reports/farmyardReport.js
@@ -408,19 +408,19 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() {
 	if (V.farmMenials) {
 		let farmMenialProductivity = 9;
 
-		if (V.farmyardUpgrade.pump) {
+		if (V.farmyardUpgrades.pump) {
 			farmMenialProductivity += 1;
 		}
 
-		if (V.farmyardUpgrade.fertilizer) {
+		if (V.farmyardUpgrades.fertilizer) {
 			farmMenialProductivity += 2;
 		}
 
-		if (V.farmyardUpgrade.seeds) {
+		if (V.farmyardUpgrades.seeds) {
 			farmMenialProductivity += 3;
 		}
 
-		if (V.farmyardUpgrade.machinery) {
+		if (V.farmyardUpgrades.machinery) {
 			farmMenialProductivity += 3;
 		}
 
diff --git a/src/js/economyJS.js b/src/js/economyJS.js
index 26f7c235313..f3627cce627 100644
--- a/src/js/economyJS.js
+++ b/src/js/economyJS.js
@@ -608,10 +608,10 @@ globalThis.calculateCosts = (function() {
 		return (
 			(
 				(facility)
-				+(0.1*V.farmyardUpgrade.fertilizer*facility)
-				-(0.2*V.farmyardUpgrade.hydroponics*facility)
-				+(0.2*V.farmyardUpgrade.seeds*facility)
-				-(0.4*V.farmyardUpgrade.machinery*facility)
+				+(0.1*V.farmyardUpgrades.fertilizer*facility)
+				-(0.2*V.farmyardUpgrades.hydroponics*facility)
+				+(0.2*V.farmyardUpgrades.seeds*facility)
+				-(0.4*V.farmyardUpgrades.machinery*facility)
 			)*2
 		);
 	}
-- 
GitLab