:: Farmyard [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Farmyard", $showEncyclopedia = 1, $encyclopedia = "Farmyard">>

<<if $farmyardName != "the Farmyard">>
	<<set $farmyardNameCaps = $farmyardName.replace("the ", "The ")>>
<</if>>

$farmyardNameCaps is not dissimilar to a warehouse in its basic size and form, but most warehouses don't contain the huge, dense, banks of crop-growing machinery this one does. Here, fruits and vegetables of all shapes and sizes are grown; from exotic, succulent Old World fruits to the average, everyday, vegetables. This is where the majority of the food in $arcologies[0].name comes from, making this one of the more critical facilities in your arcology.

<br><br>

<<if $farmyardUpgrade == 0>>
	[[Upgrade the water pump|Farmyard][$cash -= Math.trunc(1000*$upgradeMultiplierArcology),$farmyardUpgrade += 1]]
	//Costs <<print cashFormat(Math.trunc(1000*$upgradeMultiplierArcology))>> and slightly increases crop yield.//
	<br>
<<elseif $farmyardUpgrade == 1>>
	[[Use a higher-quality fertilizer|Farmyard][$cash -= Math.trunc(2000*$upgradeMultiplierArcology),$farmyardUpgrade += 1]]
	//Costs <<print cashFormat(Math.trunc(2000*$upgradeMultiplierArcology))>> and slightly increases upkeep costs and crop yield.//
	<br>	
	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces.
<<elseif $farmyardUpgrade == 2>>
	[[Purchase a hydroponics system|Farmyard][$cash -= Math.trunc(5000*$upgradeMultiplierArcology),$farmyardUpgrade += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and slightly decreases upkeep costs.//
	<br>
	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces. $farmyardNameCaps is using a higher-quality fertilizer, increasing the amount of crops it produces.
<<elseif $farmyardUpgrade == 3>>
	[[Upgrade the machinery to increase the yield of crops|Farmyard][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $farmyardUpgrade += 1]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and moderately decreases upkeep costs.//
	<br>
	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces. $farmyardNameCaps is using a higher-quality fertilizer, increasing the amount of crops it produces. $farmyardNameCaps is outfitted with an advanced hydroponics system, slightly reducing the amount of water your crops consume.
<<elseif $farmyardUpgrade == 4>>
	[[Purchase genetically modified seeds|Farmyard][$cash -= Math.trunc(20000*$upgradeMultiplierArcology),$farmyardUpgrade += 1]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and moderately increases crop yield.//
	<br>
	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces. $farmyardNameCaps is using a higher-quality fertilizer, increasing the amount of crops it produces. $farmyardNameCaps is outfitted with an advanced hydroponics system, slightly reducing the amount of water your crops consume. The machinery in $farmyardName has been upgraded, and is more efficient.
<<elseif $farmyardUpgrade == 5>>
	[[Purchase an R&D lab to experiment on different plant types|Farmyard][$cash -= Math.trunc(50000*$upgradeMultiplierArcology),$farmyardUpgrade = 6,$farmyardLab = 1]]
	//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>> and unlocks the Research Lab.//
	<br>
	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces. $farmyardNameCaps is using a higher-quality fertilizer, increasing the amount of crops it produces. $farmyardNameCaps is outfitted with an advanced hydroponics system, slightly reducing the amount of water your crops consume. The machinery in $farmyardName has been upgraded, and is more efficient. $farmyardNameCaps is using genetically modified seeds, moderately increasing the amount of crops it produces.
<<elseif $farmyardUpgrade == 6>>
	The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces. $farmyardNameCaps is using a higher-quality fertilizer, increasing the amount of crops it produces. $farmyardNameCaps is outfitted with an advanced hydroponics system, slightly reducing the amount of water your crops consume. The machinery in $farmyardName has been upgraded, and is more efficient. $farmyardNameCaps is using genetically modified seeds, moderately increasing the amount of crops it produces. A high-tech metal door, complete with retinal and fingerprint scanners, stands at the far end of $farmyardName.
<</if>>

<<if $seeBestiality == 1>>
<br>
	<<if ($farmyardKennels == 0)>>
		<br>
		<<switch $continent>>
		<<case "North America">>
			<<set $activeCanine = {species: "wolf", speciesCap: "Wolf", speciesPlural: "wolves", type: "canine", dickSize: "large", ballType: "wolf"}>>
			<<set $boughtWolves = 1>>
		<<case "South America" "Brazil">>
			<<set $activeCanine = {species: "fox", speciesCap: "Fox", speciesPlural: "foxes", type: "canine", dickSize: "large", ballType: "fox"}>>
			<<set $boughtFoxes = 1>>
		<<case "Europe" "the Middle East" "Africa" "Asia" "Japan">>
			<<set $activeCanine = {species: "jackal", speciesCap: "Jackal", speciesPlural: "jackals", type: "canine", dickSize: "large", ballType: "jackal"}>>
			<<set $boughtJackals = 1>>
		<<case "Australia">>
			<<set $activeCanine = {species: "dingo", speciesCap: "Dingo", speciesPlural: "dingos", type: "canine", dickSize: "large", ballType: "dingo"}>>
			<<set $boughtDingos = 1>>
		<</switch>>
		[[Add kennels|Farmyard][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $farmyardKennels = 1]]
		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and allows you to keep <<print $activeCanine.species>>s. This description is temporary and will be changed.//
		<br>
	<<elseif ($farmyardKennels == 1)>>
		<br>
		Kennels have been built in one corner of $farmyardName, and are currently occupied by <<print $activeCanine.species>>s. //This description is temporary and will be changed.//
		<<if $rep > 10000>>
		<br>
			[[Upgrade kennels|Farmyard][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $farmyardKennels = 2]]
			//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and allows you to keep all types of exotic canines. This description is temporary and will be changed.//
		<</if>>
		<br>
	<<elseif ($farmyardKennels == 2)>>
		<br>
		<<link"Kennels" "FarmyardAnimals">><</link>> have been built in one corner of $farmyardName, and are currently occupied by 
		<<nobr>>
		<<if $boughtCanines > 0>>
			<<if $boughtWolves == 1 && $activeCanine.species != "wolf">>
				wolves<<if $boughtCanines > 1>>,<</if>> 
			<</if>>
			<<if $boughtFoxes == 1 && $activeCanine.species != "fox">>
				foxes<<if $boughtCanines > 1>>,<</if>> 
			<</if>>
			<<if $boughtJackals == 1 && $activeCanine.species != "jackal">>
				jackals<<if $boughtCanines > 1>>,<</if>> 
			<</if>>
			<<if $boughtDingos == 1 && $activeCanine.species != "dingo">>
				dingos<<if $boughtCanines > 1>>,<</if>> 
			<</if>>
			and
		<</if>>
		<<print $activeCanine.speciesPlural>>.
		<</nobr>>
		<br>
	<</if>>

	<<if ($farmyardStable == 0)>>
		<br>
		<<set $activeHooved = {species: "horse", speciesCap: "Horse", speciesPlural: "horses", type: "hooved", dickSize: "huge", ballType: "horse"}>>
		[[Add a stable|Farmyard][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $farmyardStable = 1]]
		//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and allows you to keep <<print "horse">>s. This description is temporary and will be changed.//
		<br>
	<<elseif ($farmyardStable == 1)>>
		<br>
		A large stable has been built at the far end of $farmyardName, and currently holds a decent amount of large <<print "horse">>s. //This description is temporary and will be changed.//
		<br>
	<</if>>

	<<if ($farmyardCages == 0)>>
		<br>
		<<switch $continent>>
		<<case "North America">>
			<<set $activeFeline = {species: "cougar", speciesCap: "Cougar", speciesPlural: "cougars", type: "feline", dickSize: "large", ballType: "cougar"}>>
			<<set $boughtCougars = 1>>
		<<case "South America" "Brazil">>
			<<set $activeFeline = {species: "jaguar", speciesCap: "Jaguar", speciesPlural: "jaguars", type: "feline", dickSize: "large", ballType: "jaguar"}>>
			<<set $boughtJaguars = 1>>
		<<case "Europe">>
			<<set $activeFeline = {species: "lynx", speciesCap: "Lynx", speciesPlural: "lynx", type: "feline", dickSize: "large", ballType: "lynx"}>>
			<<set $boughtLynx = 1>>
		<<case "the Middle East" "Australia">>
			<<set $activeFeline = {species: "leopard", speciesCap: "Leopard", speciesPlural: "leopards", type: "feline", dickSize: "large", ballType: "leopard"}>>
			<<set $boughtLeopards = 1>>
		<<case "Africa">>
			<<set $activeFeline = {species: "lion", speciesCap: "Lion", speciesPlural: "lions", type: "feline", dickSize: "large", ballType: "lion"}>>
			<<set $boughtLions = 1>>
		<<case "Asia" "Japan">>
			<<set $activeFeline = {species: "tiger", speciesCap: "Tiger", speciesPlural: "tigers", type: "feline", dickSize: "large", ballType: "tiger"}>>
			<<set $boughtTigers = 1>>
		<</switch>>
		[[Add cages|Farmyard][$cash -= Math.trunc(25000*$upgradeMultiplierArcology), $farmyardCages = 1]]
		//Costs <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>> and allows you to keep <<print $activeFeline.species>>s. This description is temporary and will be changed.//
		<br>
	<<elseif ($farmyardCages == 1)>>
		<br>
		Large cages have been set up along one wall of $farmyardName, and are currently occupied by large <<print($activeFeline.species)>>s. //This description is temporary and will be changed.//
		<<if $rep > 15000>>
		<br>
			[[Upgrade cages|Farmyard][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $farmyardCages = 2]]
			//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and allows to keep all types of exotic felines. This description is temporary and will be changed.//
		<</if>>
	<<elseif ($farmyardCages == 2)>>
		<br>
		<<link "Large cages" "FarmyardAnimals">><</link>> have been built in one corner of $farmyardName, and are currently occupied by large
		<<nobr>>
		<<if $boughtFelines > 0>>
			<<if $boughtCougars == 1 && $activeFeline.species != "cougar">>
				cougars<<if $boughtFelines > 1>>,<</if>> 
			<</if>>
			<<if $boughtJaguars == 1 && $activeFeline.species != "jaguar">>
				jaguars<<if $boughtFelines > 1>>,<</if>> 
			<</if>>
			<<if $boughtLynx == 1 && $activeFeline.species != "lynx">>
				lynx<<if $boughtFelines > 1>>,<</if>> 
			<</if>>
			<<if $boughtLeopards == 1 && $activeFeline.species != "leopard">>
				leopards<<if $boughtFelines > 1>>,<</if>> 
			<</if>>
			<<if $boughtLions == 1 && $activeFeline.species != "lion">>
				lions<<if $boughtFelines > 1>>,<</if>> 
			<</if>>
			<<if $boughtTigers == 1 && $activeFeline.species != "tiger">>
				tigers<<if $boughtFelines > 1>>,<</if>>
			<</if>>
			and
		<</if>>
		<<print $activeFeline.speciesPlural>>.
		<</nobr>>
		<br>
	<</if>>
<</if>>

<<if $farmyardLab == 1>>
	<br><br>
	A <<link "research and development lab" "FarmyardLab">><</link>> has been built at one end of $farmyardName. @@.red;ALPHA CONTENT!@@
<</if>>

<br><br>

<<link "Decommission $farmyardName and return this sector to manufacturing">>
	<<set $farmyardName = "the Farmyard", $farmyard = 0, $farmyardUpgrade = 0, $farmyardUpgradeList = [], $farmyardLab = 0, $farmyardCrops = 0, $farmyardKennels = 0, $farmyardStable = 0, $farmyardCages = 0, $activeCanine = "wolf", $activeHooved = "horse", $activeFeline = "cougar", $boughtCanines = 0, $boughtFelines = 0, $boughtWolves = 0, $boughtFoxes = 0, $boughtJackals = 0, $boughtDingos = 0, $boughtCougars = 0, $boughtJaguars = 0, $boughtLynx = 0, $boughtLeopards = 0, $boughtLions = 0, $boughtTigers = 0, $pitAnimal = 0>>
	<<for _i = 0; _i < $sectors.length; _i++>>
		<<if $sectors[_i].type == "Farmyard">><<set $sectors[_i].type = "Manufacturing">><<break>><</if>>
	<</for>>
	<<goto "Main">>
<</link>>

<br><br>Rename $farmyardName: <<textbox "$farmyardName" $farmyardName "Farmyard">> //Use a noun or similar short phrase//
