code:
:: Dairy [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Dairy", $showEncyclopedia = 1, $encyclopedia = "Dairy", _SL = $slaves.length, _DL = $DairyiIDs.length>>

<<SlaveIDSort $DairyiIDs>>
<<if $dairyName != "the Dairy">>
	<<set $dairyNameCaps = $dairyName.replace("the ", "The ")>>
<</if>>

<<if ($dairyRestraintsSetting != 2) || ($dairyRestraintsUpgrade != 1)>>
	<<if $dairyStimulatorsSetting == 2>>
		<<set $dairyStimulatorsSetting = 1>>
	<</if>>
	<<if $dairyPregSetting >= 2>>
		<<set $dairyPregSetting = 1>>
	<</if>>
	<<if $dairyFeedersSetting == 2>>
		<<set $dairyFeedersSetting = 1>>
	<</if>>
<</if>>

<<if ($Milkmaid != 0) && ($dairyRestraintsSetting == 2)>>
	<<setLocalPronouns $Milkmaid>>
	$Milkmaid.slaveName has been removed from $his position as Milkmaid, since an industrialized dairy automates $his duties.
	<<= removeJob($Milkmaid, "be the Milkmaid")>>

<</if>>

<<if (_DL > 1)>>
	<<if $dairyFeedersSettingChanged == 1>>
		In unison, the milking machines press their feeding phalli into the slaves' mouths and down their throats. Once situated, they begin to facefuck the slaves, who gag and struggle as they figure out how to breathe while this is going on. Once each slave is no longer panicking and is inhaling and exhaling regularly, there is a hydraulic sound and the transparent reservoir of feeding fluid near their head begins to drain. The slaves swallow desperately, their bellies beginning to swell with nutrition and drugs.

	<<elseif $dairyFeedersSettingChanged == -1>>
		In unison, the milking machines withdraw their feeders from the slaves' throats. The slaves gag and cough, strings of feeding fluid and saliva running between their lips and the heads of the feeding phalli. These remain close to their faces so that the slaves can suck them off once they get hungry, which they will, very soon. The slaves' mouths and tongues are very tired, and most of them rest with their mouths open and their tongues hanging out.

	<</if>>
	<<if $dairyPregSettingChanged == 1>>
		<<for _Di = 0; _Di < _DL; _Di++>>
			<<set _i = $slaveIndices[$DairyiIDs[_Di]]>>
			<<setLocalPronouns $slaves[_i]>>
			<<if ($slaves[_i].vagina > -1) && ($slaves[_i].vagina < 3)>>
				$slaves[_i].slaveName's milking machine ejects $him, since it cannot fit the mandated dildo into $his tight cunt.
				<<= removeJob($slaves[_i], "work in the dairy")>>
				<<set _DL--, _Di-->>
			<</if>>
			<<if ($dairyPregSetting > 0)>>
				<<set WombCleanGenericReserve($slaves[_i], "incubator", 9999)>>
				<<set WombCleanGenericReserve($slaves[_i], "nursery", 9999)>>
				<<if (($slaves[_i].broodmother > 0) || ($slaves[_i].bellyImplant != -1))>>
					$slaves[_i].slaveName's milking machine ejects $him, since it detected a foreign body in $his womb blocking its required functions.
					<<= removeJob($slaves[_i], "work in the dairy")>>
					<<set _DL--, _Di-->>
				<</if>>
			<</if>>
		<</for>>
		In unison, the milking machines withdraw their dildos from the pregnant slaves' vaginas. The auxiliary drug injectors hiss as the slaves are filled with drugs that promote natural lubrication. The slaves begin to shift awkwardly as they feel their pussies begin to drool slick female fluids. Once a machine judges that its slave's cunt is sufficiently wet, it readies a gigantic dildo. The slaves cannot see their own groins, but as soon as the heads of the dildos touch their pussylips, they begin to
		<<if $dairyFeedersSetting < 2>>
			struggle instinctively against their restraints, and the more energetic ones begin to weep.
		<<else>>
			struggle instinctively against their restraints.
		<</if>>
		As the massive phalli begin to ejaculate fertility drugs and semen, they drive all resistance out of the poor girls.

	<<elseif $dairyPregSettingChanged == -1>>
		In unison, the milking machines withdraw their monstrous dildos from the pregnant slaves' stretched cunts. Their pussies' overcharged production of natural lubricant produces a gush of pent-up female fluids from each loose vagina as the phalli slide clear.
		<<if $dairyFeedersSetting < 2>>
			The slaves moan with relief at the sudden reduction in fullness. Being penetrated like that while pregnant must be quite uncomfortable.
		<<else>>
			The slaves are silent, since their mouths and throats are being fucked by the feeders, but most of them relax a little in their restraints.
		<</if>>
		The machines do replace the withdrawn dildos with more reasonably sized phalli and resume thrusting, but the slaves are relieved anyway.

	<</if>>
	<<if $dairyStimulatorsSettingChanged == 1>>
		<<for _Di = 0; _Di < _DL; _Di++>>
			<<set _i = $slaveIndices[$DairyiIDs[_Di]]>>
			<<setLocalPronouns $slaves[_i]>>
			<<if ($slaves[_i].anus < 3)>>
				$slaves[_i].slaveName's milking machine ejects $him, since it cannot fit its massive anal dildo up $his tight asshole.
				<<= removeJob($slaves[_i], "work in the dairy")>>
				<<set _DL--, _Di-->>
			<</if>>
		<</for>>
		In unison, the milking machines shove their dildos deep into slaves' anuses, ejaculating large quantities of lubricant deep inside their rectums. The slaves start in surprise at the sudden rush of warm slick fluid, and then relax as the phalli withdraw themselves from their butts. Their relief is short-lived, however, as their assholes are only empty for a moment. The reasonably sized dildos are replaced with dildos the size of horse cocks. As soon as the slaves feel the heads of these monstrous phalli press inexorably against their sphincters,
		<<if $dairyFeedersSetting < 2>>
			they begin to scream and struggle instinctively. As the constant assrape that will define their existences for the foreseeable future begins in earnest, their whining
		<<else>>
			they begin to struggle wildly. As the constant assrape that will define their existences for the foreseeable future begins in earnest, their wriggling
		<</if>>
		gradually diminishes as each slave is exhausted and slumps within their restraints. The machines take no notice, and continue the relentless sodomy.

	<<elseif $dairyStimulatorsSettingChanged == -1>>
		In unison, the milking machines withdraw their gargantuan dildos from the slaves' loosened anuses.
		<<if $dairyFeedersSetting < 2>>
			Several of the more energetic slaves begin to cry quietly with relief
		<<else>>
			The slaves are silent, since their mouths and throats are being fucked by the feeders, but most of them slump against their machines with relief
		<</if>>
		as their sphincters gradually recover from wide open to merely gaping. The machines switch out the withdrawn dildos for phalli that are just large, but the slaves barely react at all as they are penetrated. After what their sphincters have been through, a merely big dick is nothing to them.

	<</if>>
	<<setNonlocalPronouns $seeDicks>>
	<<if $dairyRestraintsSettingChanged == 1>>
		<<if $dairyRestraintsSetting == 1>>
			<<for _Di = 0; _Di < _DL; _Di++>>
				<<set _i = $slaveIndices[$DairyiIDs[_Di]]>>
				<<setLocalPronouns $slaves[_i]>>
				<<if ($slaves[_i].indentureRestrictions >= 2)>>
					$slaves[_i].slaveName's milking machine declines to restrain $him, since $he is encoded as an indentured servant protected from restraint for milking.
					<<= removeJob($slaves[_i], "work in the dairy")>>
					<<set _DL--, _Di-->>
				<</if>>
			<</for>>
			The next cow to stumble over to a milking machine to be drained is gently but firmly embraced by its restraints, allowing it to suck _himU dry and violate _himU without any regard for _hisU feelings. Most of the cows accept this new wrinkle in their lives, since the restraints let them go afterward, and the milking machines bring temporary relief. Some, however, begin to regard the machines with concern.
		<<else>>
			The next cow to stumble over to a milking machine to be drained finds to _hisU surprise that _heU is not restrained while it sucks _himU dry. _HeU wiggles around experimentally, verifying that _heU is indeed free to pull _himselfU away from its ministrations if _heU wishes. There's little actual impact on the cows' behavior, since they still need the relief the machines offer.
		<</if>>

	<<elseif $dairyRestraintsSettingChanged == -1>>
		<<if $dairyRestraintsSetting == 1>>
			<<for _Di = 0; _Di < _DL; _Di++>>
				<<set _i = $slaveIndices[$DairyiIDs[_Di]]>>
				<<setLocalPronouns $slaves[_i]>>
				<<if ($slaves[_i].indentureRestrictions >= 1)>>
					$slaves[_i].slaveName's milking machine declines to restrain $him, since $he is encoded as an indentured servant protected from being restrained for milking.
					<<= removeJob($slaves[_i], "work in the dairy")>>
					<<set _DL--, _Di-->>
				<</if>>
			<</for>>
			The next time a cow tries to get up after being milked, _heU finds to _hisU sudden terror that the machine will not let _himU go. It continues to add fluids to _hisU body, and remove them from _hisU nipples, ignoring _hisU mounting panic as _heU realizes that it's to be _hisU new partner and lover, on a level far more intimate than any possible human relationship. The other cows approach their machines with trepidation, but the mounting pressure in their udders forces them to embrace their immurement despite their terror.
		<<else>>
			The next time a cow finishes an intensive milking period, _hisU restraints loosen. _HeU does not move for a long time, as though _heU is unable to believe that _heU is, at least in an immediate and local sense, free. Finally, _heU prises _himselfU out of _hisU milking machine's embrace, thick strings of fluid leading from it to _hisU orifices as _heU pulls each one off of its corresponding port.
		<</if>>

	<</if>>
<</if>>

<<set $dairyStimulatorsSettingChanged = 0, $dairyFeedersSettingChanged = 0, $dairyPregSettingChanged = 0, $dairyRestraintsSettingChanged = 0>>

<<if ($dairyRestraintsSetting > 1)>>

	$dairyNameCaps is an industrial facility, but there's a viewing gallery for visitors.
	<<switch $dairyDecoration>>
	<<case "Roman Revivalist">>
		The screens there review each slave's liquid contributions to the state in minute detail.
	<<case "Aztec Revivalist">>
		The strange sight of the milking machines, designed to look like fertility statues gives the space an imposing feeling.
	<<case "Egyptian Revivalist">>
		The screens there list a tally of each slave's contributions to the harvest this season. They also identify related slaves who occupy multi-slave milking machines so that they may feed each other directly.
	<<case "Edo Revivalist">>
		It looks out on a strangely contradictory sight: a beautiful and terrible combination of modern slavery and technology, placed amongst tatami mats and rice paper partitions.
	<<case "Arabian Revivalist">>
		It looks out on a strangely contradictory sight: a beautiful and terrible combination of modern slavery and technology, placed inside brightly tiled walls.
	<<case "Chinese Revivalist">>
		The milking machines are fascinating: they're encased in decorative carvings, making it look like the slaves are in the embrace of traditional Chinese depictions of lions, bears, and dragons.
	<<case "Chattel Religionist">>
		It presents the inmates as lessons, here to expiate their sins in a purgatory created by technology.
	<<case "Degradationist">>
		The screens there feature, among a sea of facts and figures about each slave, their most recent brain scan.
	<<case "Repopulation Focus">>
		The gallery is placed for a good view of each slave's swelling breasts and growing pregnancy. A screen is prominently displayed before each slave, detailing the number of babies she produced and the current number occupying their womb.
	<<case "Eugenics">>
		The screens there tell very little about the slaves within. That information is privy only to Society's Elite.
	<<case "Asset Expansionist">>
		It's designed for VIP visits, since this place is arguably the present apogee of expansionism. Nowhere else can breasts become so large. This is a place for pride.
	<<case "Transformation Fetishist">>
		It's designed for VIP visits, since this place is arguably the present apogee of transformationism. Nowhere else can slaves be so radically changed, from humans into something less — and something more.
	<<case "Gender Radicalist">>
		The gallery is placed for a good view of each slave's front, from their head to what's between their spread legs.
	<<case "Gender Fundamentalist">>
		The gallery is placed for a good view of each slave's breasts, belly, and cunt. Visitors can critically compare each feminine advantage.
	<<case "Physical Idealist">>
		The gallery is placed for a good view of each slave's body. Though muscles are at a lower premium here, there is intense interest in such radical changes to human biology.
	<<case "Supremacist">>
		The screens there give information about each cow, but the data they present is also predictive. They imply a vision for a world in which more subhumans serve in this way. Many more.
	<<case "Subjugationist">>
		The screens there give information about each cow, but the data they present is also predictive. They imply a vision for a world in which more milking machines have $arcologies[0].FSSubjugationistRace components. Many more.
	<<case "Paternalist">>
		The screens there include feeds that show what media is being pumped into the slaves through their machines. It's designed to provide as much mental stimulation as possible.
	<<case "Pastoralist">>
		The screens there let the production figures speak for themselves. There may be more personable cows out there, but they don't produce milk like these do.
	<<case "Maturity Preferentialist">>
		The screens there give each slave's productivity and forecast it into the future. The facility is unmatched at extracting value from mature bodies.
	<<case "Youth Preferentialist">>
		The screens there give each slave's productivity and forecast it into the future. The best bodies here have many, many years of productivity ahead of them.
	<<case "Body Purist">>
		The screens there offer reams of data on each slave's product purity. Drugs are necessary here, and each body's balance results in a different grade of product.
	<<case "Slimness Enthusiast">>
		The screens there alternate live views of the fashionably slim cows in their stalls with brief infomercials on the specialized techniques and equipment $dairyName uses to extract milk from such modest udders.
	<<case "Hedonistic">>
		The gallery is placed for a good view of each slave's fattened body and the undulations running through them from the force of the milkers<<if $dairyPregSetting || $dairyFeedersSetting || $dairyStimulatorsSetting>> and other assorted tubes and dildos<</if>>.
	<<case "Intellectual Dependency">>
		The screens there feature an active scan showcasing each slave's diminishing brain activity.
	<<case "Slave Professionalism">>
		It serves as a dire warning to what happens to unskilled, moronic slaves.
	<<case "Petite Admiration">>
		The gallery is placed for a good view of each slave's petite body. Those that don't fit in a standard milking unit are kept well out of sight.
	<<case "Statuesque Glorification">>
		The gallery is placed for a good view of each slave's body. Fascinated visitors may peruse each slave's productivity statistics contrasted against their height on a corresponding touchscreen.
	<<default>>
		Fascinated visitors may peruse each slave's productivity statistics on a corresponding touchscreen.
	<</switch>>

<<else>>

	$dairyNameCaps
	<<switch $dairyDecoration>>
	<<case "Roman Revivalist">>
		is functional and clean, using traditional methods wherever possible. At one end of the long row of stalls there is an alcove with a shrine to the Roman goddess of bountiful harvests.
	<<case "Aztec Revivalist">>
		is sterile and organized, using traditional methods wherever possible. At one end of the long row of stalls there is an alcove with a shrine to the Aztec god of the Earth.
	<<case "Egyptian Revivalist">>
		is functional and clean, using traditional methods wherever possible. At one end of the long row of stalls there is an alcove with a shrine to the Egyptian god of bountiful harvests.
	<<case "Edo Revivalist">>
		is clean and traditional. The stalls are constructed of bamboo and carefully shaped wood, and muscle power is used wherever possible. Cows exercise and help out by walking on a wooden wheel that raises fresh water to $dairyName.
	<<case "Arabian Revivalist">>
		is clean and traditional. Its dusky stone walls keep it so warm that the cows go nude, basking in the hot sun between milkings.
	<<case "Chinese Revivalist">>
		is clean and traditional. The stalls are constructed of bamboo and carefully shaped wood, and muscle power is used wherever possible. Cows exercise and help out by fetching and carrying as best they can.
	<<case "Chattel Religionist">>
		is functional and clean. There are nice quotations from the holy book on the walls, and there is a little shrine designed to allow a cow who has difficulty standing to make their devotions comfortably.
	<<case "Degradationist">>
		is harsh and utilitarian. There are stands to restrain cows who aren't being milked for dosing, punishment, or sexual use. There are cattle prods here and there to use on resistant cows, unproductive cows, or cows one wishes to hear scream.
	<<case "Repopulation Focus">>
		is comfortable and well-kept. The milking machines are specially designed to maximize a pregnant cow's comfort. After a milking, cows have a wide selection of soft furniture to choose from, so comfortable that most fall fast asleep.
	<<case "Eugenics">>
		is comfortable, well-kept and well-monitored. Cows are kept track of at all times to make sure no-one tries to increase milk production via pregnancy.
	<<case "Asset Expansionist">>
		looks misleadingly industrial at first glance. Though the cows here are free-range, the facility mounts a system of slings and cranes to allow slaves with massive udders to walk around with their tits suspended from the ceiling.
	<<case "Transformation Fetishist">>
		looks like a medical facility at first glance. Transformation is just as much a priority as production: there are surgical and drug injection machines right here.
	<<case "Gender Radicalist">>
		is comfortable and well-kept. The milking machines include perianal vibrators to massage slaves from butthole to cock while they give cum.
	<<case "Gender Fundamentalist">>
		is comfortable and well-kept. The milking machines include vibrators so that cows can get off while they're milked.
	<<case "Physical Idealist">>
		could be mistaken for a gym with milking machines. Cows here are expected to keep fit between milkings, since the best milk comes from cattle who are healthy, muscular, and strong.
	<<case "Supremacist">>
		is spartan, since that's all subhuman cows need. There are cattle prods here and there to use on resistant cows, unproductive cows, or subhuman cows one wishes to hear scream.
	<<case "Subjugationist">>
		is spartan, since that's all $arcologies[0].FSSubjugationistRace cows need. There are cattle prods here and there to use on resistant cows, unproductive cows, or $arcologies[0].FSSubjugationistRace cows one wishes to hear scream.
	<<case "Paternalist">>
		is comfortable and well-kept. Rather than stalls, $dairyName has an open arrangement of machines cows can use freely, and a lovely common area they can relax in afterward.
	<<case "Pastoralist">>
		is state of the art, but is also brilliantly designed to look like a barn. All the advanced machinery retracts when not in use, leaving the cows in a clean, airy pastoral paradise. It smells of summer.
	<<case "Maturity Preferentialist">>
		is inviting and homelike. After a milking, cows have a wide selection of soft furniture to choose from, so comfortable that most fall fast asleep.
	<<case "Youth Preferentialist">>
		is functional, but fun. There are all sorts of fun activities to keep the cows amused between milkings, cleverly adapted for girls with massive mammaries.
	<<case "Body Purist">>
		is state of the art, and spotlessly clean. All attention here is on the cows, to keep them happy, productive, and pure.
	<<case "Slimness Enthusiast">>
		is quite unusual. Since the cows it milks may not necessarily have gigantic boobs, the milking machines here can adapt to drain cream from any body.
	<<case "Hedonistic">>
		is comfortable and fun. The stalls are filled with thick, soft pillows to lounge on while hooked to the milking machines and with plenty of toys to make use of while getting milked. Cows here are expected to binge eat between milkings, since the best milk comes from cattle who are immobile, stuffed with food and hugely fat.
	<<case "Intellectual Dependency">>
		is simple and fun. Getting situated for milking is easy enough for even the dumbest cow to figure out and there are all sorts of activities to keep the cows amused between milkings.
	<<case "Slave Professionalism">>
		is functional and clean. A wide selection of informative documentaries and books are available for cows to keep their minds sharp while the milker does its business.
	<<case "Petite Admiration">>
		is comfortable and well-kept. While designed for miniature cows, accommodations for large udders allow even the lankiest of cattle to make use of the machinery.
	<<case "Statuesque Glorification">>
		is comfortable and well-kept. While designed for towering cows, accommodations for large udders allow even the shortest of cattle to make use of the machinery; even if they need help to reach it.
	<<default>>
		is comfortable and well-kept. It features nice rest areas for cows to lounge in after a milking, and exercise equipment to keep them healthy.
	<</switch>>

<</if>>

<<if _DL > 2>>
	$dairyNameCaps is working steadily.
	<<if ($dairyRestraintsUpgrade == 1) && ($dairyRestraintsSetting > 1)>>
	Each cow is strapped into their own milking machine. The machines are set up in rows, alternating forward and backward so that the cows are interleaved as closely as possible without touching.
	<<if ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0)>>
		<<if $dairyFeedersSetting == 2>>
		A phallic feeding tube completely fills each cow's mouth and throat, making it eerily quiet in there. Occasionally one of the cows convulses when a particularly long rush of food and drugs flows down their gullet.
		<<else>>
		When feeding is required, a phallus extends into cows' mouths.
		<</if>>
	<</if>>
	<<if ($dairyStimulatorsUpgrade == 1) && ($dairyStimulatorsSetting > 0)>>
		<<if $dairyStimulatorsSetting == 2>>
		Every cow is being sodomized by a massive phallus. Most are pumping away gently, the strokes taking a long time to push the half-<<if $showInches == 2>>yard<<else>>meter<</if>> of shaft into each slave's rectum and pull it out again. When a slave's balls are ready to give cum, however, the pace quickens, and the agonized slave wriggles in involuntary desperation to escape until they finally stiffen, squirt, and slump in exhaustion.
		<<else>>
		Each cow's anus is periodically fucked by a machine phallus that ejaculates hydration directly up their butt. When a slave's balls are ready to give cum, they are mercilessly sodomized until prostate stimulation forces an orgasm.
		<</if>>
	<</if>>
	<<if ($dairyPregUpgrade == 1) && ($dairyPregSetting > 0)>>
		<<if $dairyPregSetting == 3>>
		Fertile cows' vagina's are constantly penetrated by huge dildos that ejaculate extra strong fertility drugs into their progressively distending wombs. The drugs induce intense arousal and excessive female lubrication, so the constant dildo rape fills $dairyName with occasional gushing noises and nonstop moaning.
		<<elseif $dairyPregSetting == 2>>
		Fertile cows' vagina's are constantly penetrated by huge dildos that ejaculate fertility drugs. The drugs produce excessive female lubrication, so the constant dildo rape fills $dairyName with occasional gushing noises.
		<<else>>
		The fertile cows are visibly pregnant.
		<</if>>
	<</if>>
	<<else>>
	The row of milking machines is available for cows to use.
	<<if ($dairyRestraintsSetting > 0)>>
		When they do, the machines gently restrain them until they are completely done.
	<</if>>
	<<if ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0)>>
		The machines mount convenient phallic feeders for slaves to suck for tasty food while they're milked.
	<</if>>
	<<if ($dairyPregUpgrade == 1) && ($dairyPregSetting > 0)>>
		The fertile cows are visibly pregnant.
	<</if>>
	<<if ($dairyStimulatorsUpgrade == 1) && ($dairyStimulatorsSetting > 0)>>
		The machines gently sodomize cows who need the extra nutrition and treatment the dildos can ejaculate into them<<if $seeDicks > 0>>, and fuck them more vigorously when they need help ejaculating.<</if>>
	<</if>>
	<</if>>
<<elseif $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren > 0>>
	$dairyNameCaps is quiet and calm. The only sounds are faint sucking and gushing noises.
<<elseif _DL > 0>>
	$dairyNameCaps is sparsely populated.
<<elseif $Milkmaid != 0>>
	$Milkmaid.slaveName is alone in $dairyName, and has nothing to do but clean and maintain the equipment.
<<else>>
	$dairyNameCaps is empty and desolate.
	<<link "Decommission the dairy" "Main">>
		<<set $dairy = 0, $dairyFeedersUpgrade = 0, $dairyPregUpgrade = 0, $dairyStimulatorsUpgrade = 0, $dairyDecoration = "standard", $dairyFeedersSetting = 0, $dairyPregSetting = 0, $dairyStimulatorsSetting = 0, $dairyHyperPregRemodel = 0, $cumPipeline = 0, $milkPipeline = 0>>
		<<set _dai = $sectors.findIndex(function(s) { return s.type == "Dairy"; })>>
		<<if _dai != -1>>
			<<set $sectors[_dai].type = "Manufacturing">>
		<</if>>
	<</link>>
<</if>>

<<if _DL > 0>>
	<<removeFacilityWorkers "dairy" "rest" "get milked">>
<</if>>

<<set _Tmult0 = Math.trunc($dairy*1000*$upgradeMultiplierArcology)>>

$dairyNameCaps can support $dairy milkers. There <<if _DL == 1>>is<<else>>are<</if>> currently _DL cow<<if _DL != 1>>s<</if>>. [[Expand the dairy|Dairy][cashX(forceNeg(_Tmult0), "capEx"), $dairy += 5, $PC.skill.engineering += .1]] //Costs <<print cashFormat(_Tmult0)>> and will increase upkeep costs//

<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology)>>

<<if $dairyFeedersUpgrade == 1>>
	The milking machines can hold feeders in slaves' mouths and inject drugs into their bodies, ensuring ideal nutrition and production.

    The feeders are
	<<if $dairyFeedersSetting == 2>>
		''industrial.'' [[Moderate|Dairy][$dairyFeedersSetting = 1, $dairyFeedersSettingChanged = -1]]
	<<elseif $dairyFeedersSetting == 1>>
		''active.'' [[Inactive|Dairy][$dairyFeedersSetting = 0]]<<if ($seeExtreme != 0) && ($dairyRestraintsSetting == 2)>> | [[Industrial|Dairy][$dairyFeedersSetting = 2, $dairyFeedersSettingChanged = 1]]<</if>>
	<<else>>
		''inactive.'' [[Active|Dairy][$dairyFeedersSetting = 1]]
	<</if>>
<<else>>
	$dairyNameCaps is equipped to feed and clean slaves normally. [[Upgrade the milking machines with intubators|Dairy][cashX(forceNeg(_Tmult1), "capEx"), $dairyFeedersUpgrade = 1, $PC.skill.engineering += 0.1]] //Costs <<print cashFormat(_Tmult1)>> and will increase upkeep costs//

<</if>>

<<if $seePreg != 0>>

	<<set _Tmult3 = Math.trunc(2500*$upgradeMultiplierArcology)>>
	<<if $dairyPregUpgrade == 1>>
		$dairyNameCaps can support cow pregnancies.

    Fertile cows' wombs are
		<<if $dairyPregSetting == 3>>
			''worked to capacity.'' [[Industrial|Dairy][$dairyPregSetting = 2]]
		<<elseif $dairyPregSetting == 2>>
			''industrially employed.'' <<if ($seeExtreme != 0) && ($seeHyperPreg == 1) && ($dairyRestraintsSetting == 2) && ($dairyHyperPregRemodel == 1)>> [[Mass Production|Dairy][$dairyPregSetting = 3]] | <</if>>[[Moderate|Dairy][$dairyPregSetting = 1, $dairyPregSettingChanged = -1]]
		<<elseif $dairyPregSetting == 1>>
			''for hire.'' [[Not for hire|Dairy][$dairyPregSetting = 0]]<<if ($seeExtreme != 0) && ($dairyRestraintsSetting == 2)>> | [[Industrial|Dairy][$dairyPregSetting = 2, $dairyPregSettingChanged = 1]]<</if>>
		<<else>>
			''not for hire.'' [[For hire|Dairy][$dairyPregSetting = 1]]
		<</if>>
	<<else>>
		$dairyNameCaps is not prepared to support cow pregnancies, and therefore cannot be used to contract out fertile slaves' wombs.

    [[Upgrade the dairy to support pregnancies|Dairy][cashX(forceNeg(_Tmult3), "capEx"), $dairyPregUpgrade = 1]] //Costs <<print cashFormat(_Tmult3)>> and will increase upkeep costs//
	<</if>>
<</if>>

<<if $dairyStimulatorsUpgrade == 1>>
	The milking machines mount reciprocating dildos that can sodomize the slaves, delivering extra nutrition and pharmaceuticals. <<if $seeDicks > 0>>The prostate stimulation also serves to increase semen production, where appropriate.<</if>>

    The sodomizers are
	<<if $dairyStimulatorsSetting == 2>>
		''industrial,'' employing dildos the size of horse phalli. [[Moderate|Dairy][$dairyStimulatorsSetting = 1, $dairyStimulatorsSettingChanged = -1]]
	<<elseif $dairyStimulatorsSetting == 1>>
		''active.'' [[Deactivate|Dairy][$dairyStimulatorsSetting = 0]]<<if ($seeExtreme != 0) && ($dairyRestraintsSetting == 2)>> | [[Industrial|Dairy][$dairyStimulatorsSetting = 2, $dairyStimulatorsSettingChanged = 1]]<</if>>
	<<else>>
		''inactive.'' [[Activate|Dairy][$dairyStimulatorsSetting = 1]]
	<</if>>
<<else>>
	$dairyNameCaps does not automatically sodomize. [[Upgrade the cockmilking machines with sodomizers|Dairy][cashX(forceNeg(_Tmult1), "capEx"), $dairyStimulatorsUpgrade = 1, $PC.skill.engineering += 0.1]] //Costs <<print cashFormat(_Tmult1)>> and will increase upkeep costs//
<</if>>

<<set _Tmult2 = Math.trunc(5000*$upgradeMultiplierArcology)>>
<<if ($dairyPregSetting == 2) || ($dairyStimulatorsSetting == 2)>>

<<if $dairyPrepUpgrade == 1>>
	$dairyNameCaps features a preparatory raper designed to gape slaves for integration.
<<else>>
	$dairyNameCaps's industrial machines can only accept slaves with loose holes. [[Install a preparatory raper|Dairy][cashX(forceNeg(_Tmult2), "capEx"), $dairyPrepUpgrade = 1, $PC.skill.engineering += 0.1]] //Costs <<print cashFormat(_Tmult2)>>//
<</if>>
<</if>>

<<if $dairyRestraintsUpgrade == 1>>
	$dairyNameCaps is equipped to restrain cows.

    The cows are restrained
	<<if $dairyRestraintsSetting == 2>>
		''permanently,'' allowing use of industrial techniques even devoted cows would flinch at. [[Only during milking|Dairy][$dairyRestraintsSetting = 1, $dairyFeedersSettingChanged = -1]]
	<<elseif $dairyRestraintsSetting == 1>>
		''when being milked,'' giving the machines full play. [[Free range|Dairy][$dairyRestraintsSetting = 0, $dairyFeedersSettingChanged = -1]] | [[Permanent machine milking|Dairy][$dairyRestraintsSetting = 2, $dairyFeedersSettingChanged = 1]]
	<<else>>
		''only when necessary,'' allowing obedient cows freedom to range around. [[Restrain the cows|Dairy][$dairyRestraintsSetting = 1, $dairyFeedersSettingChanged = 1]]
	<</if>>
<<else>>
	$dairyNameCaps is not equipped to restrain recalcitrant cows. [[Equip the dairy with milking racks|Dairy][cashX(forceNeg(_Tmult2), "capEx"), $dairyRestraintsUpgrade = 1]] //Costs <<print cashFormat(_Tmult2)>>//
<</if>>

<<if ($seeHyperPreg == 1) && ($dairyRestraintsSetting == 2) && ($dairyStimulatorsSetting == 2) && ($dairyFeedersSetting == 2) && ($dairyPregSetting >= 1)>>

	<<if $dairyHyperPregRemodel == 1>>
		$dairyNameCaps's milking racks have been remodeled to allow cows' abnormal pregnancies room to grow.
	<<else>>
		$dairyNameCaps's milking racks can be remodeled to hold hyper-pregnant cattle. [[Expand the milking racks|Dairy][cashX(forceNeg(_Tmult1), "capEx"), $dairyHyperPregRemodel = 1]] //Costs <<print cashFormat(_Tmult1)>>//
	<</if>>
<</if>>

<<if ($bioreactorsAnnounced != 0) && ($dairyRestraintsSetting == 2) && ($dairyStimulatorsSetting == 2) && ($dairyFeedersSetting == 2)>>

$dairyNameCaps will
	<<if $createBioreactors == 1>>
		''convert perfected cows into equipment,'' removing them from slave status, permanently. [[Cancel conversion|Dairy][$createBioreactors = 0]]
	<<else>>
		''leave perfected cows as slaves.'' [[Convert them into equipment|Dairy][$createBioreactors = 1]]
	<</if>>
<</if>>

<<if $arcologies[0].FSSlimnessEnthusiast > 80>>

	<<if $dairySlimMaintainUpgrade == 1>>
		Thanks to advances precipitated by the arcology's commitment to the fashion of slimmer slaves, $dairyName has been updated with optimized milkers for small breasts, and a customized drug regimen to extract maximum output while maintaining small breast sizes.
		<<if $dairySlimMaintain == 1>>
			$dairyNameCaps is currently set to limit the breast growth of slimmer slaves while maximizing their milk output. [[Return to Normal Operation|Dairy][$dairySlimMaintain = 0]] //NOTE: This may allow the automatic administration of lactation inducing drugs//
		<<else>>
			$dairyNameCaps is currently set to normal operation, and will allow the breasts of slimmer slaves to expand due to milking. [[Set milkers to preserve small breast sizes|Dairy][$dairySlimMaintain = 1]] //NOTE: This will NOT remove existing lactation implants//
		<</if>>
	<<else>>
		Dairy cows' breasts will expand normally as a result of the milking process. [[Optimize the milking process to preserve small breast sizes|Dairy][cashX(forceNeg(_Tmult2), "capEx"), $dairySlimMaintainUpgrade = 1, $dairySlimMaintain = 1, $PC.skill.engineering += 0.1]] //Costs <<print cashFormat(_Tmult2)>>//
	<</if>>
<<elseif $arcologies[0].FSSlimnessEnthusiast > 20>>

	<<if $dairySlimMaintainUpgrade == 1>>
		Thanks to advances precipitated by the arcology's commitment to the fashion of slimmer slaves, $dairyName has been re-engineered so that its milking process can now prevent the unwanted breast expansion of fashionably slim slaves.
		<<if $dairySlimMaintain == 1>>
			$dairyNameCaps is currently set to limit the breast growth of slimmer slaves. [[Return to Normal Operation|Dairy][$dairySlimMaintain = 0]] //NOTE: This may allow the automatic administration of lactation inducing drugs//
		<<else>>
			$dairyNameCaps is currently set to normal operation, and will allow the breasts of slimmer slaves to expand due to milking. [[Set milkers to preserve small breast sizes|Dairy][$dairySlimMaintain = 1]] //NOTE: This will NOT remove existing lactation implants//
		<</if>>
	<<else>>
		Dairy cows' breasts will expand normally as a result of the milking process. [[Optimize the milking process to preserve small breast sizes|Dairy][cashX(forceNeg(_Tmult2), "capEx"), $dairySlimMaintainUpgrade = 1, $dairySlimMaintain = 1, $PC.skill.engineering += 0.1]] //Costs <<print cashFormat(_Tmult2)>>//
	<</if>>
<</if>>

<<if $dairySlimMaintain == 0>>
	<<if $dairyImplantsSetting == 1>>
		All cows will undergo lactation implant surgery to increase their milk output.
		[[Restrict lactation surgery on cum-cows|Dairy][$dairyImplantsSetting = 0]] | [[Restrict maximization surgery on cattle|Dairy][$dairyImplantsSetting = 2]] | [[Encourage natural lactation in cattle|Dairy][$dairyImplantsSetting = 3]]
	<<elseif $dairyImplantsSetting == 2>>
		Cows will not undergo surgical procedures to maximize production.
		[[Maximize production in all cattle|Dairy][$dairyImplantsSetting = 1]] | [[Maximize production in only milkable cows|Dairy][$dairyImplantsSetting = 0]] | [[Encourage natural lactation in cattle|Dairy][$dairyImplantsSetting = 3]]
	<<elseif $dairyImplantsSetting == 3>>
		Non-lactating cows incapable of producing cum will undergo manual stimulation to promote natural production.
		[[Maximize production in all cattle|Dairy][$dairyImplantsSetting = 1]] | [[Maximize production in only milkable cows|Dairy][$dairyImplantsSetting = 0]] | [[Restrict maximization surgery on cattle|Dairy][$dairyImplantsSetting = 2]]
	<<else>>
		Naturally lactating cows, cows with non-lactating breasts, and cows incapable of producing cum will undergo lactation implant surgery to increase their milk output.
		[[Maximize lactation in all cattle|Dairy][$dairyImplantsSetting = 1]] | [[Restrict maximization surgery on cattle|Dairy][$dairyImplantsSetting = 2]] | [[Encourage natural lactation in cattle|Dairy][$dairyImplantsSetting = 3]]
	<</if>>
<<else>>
	Current settings do not implant lactation implants into cows.
<</if>>

<<if $dairyWeightSetting == 0>>
	$dairyNameCaps is keeping cows at least chubby. [[Increase Weight Target|Dairy][$dairyWeightSetting = 1]] | [[Disable Dietary Control|Dairy][$dairyWeightSetting = -1]]
<<elseif $dairyWeightSetting == 1>>
	$dairyNameCaps aims to keep cows overweight. [[Increase Weight Target|Dairy][$dairyWeightSetting = 2]] | [[Decrease Weight Target|Dairy][$dairyWeightSetting = 0]] | [[Disable Dietary Control|Dairy][$dairyWeightSetting = -1]]
<<elseif $dairyWeightSetting == 2>>
	$dairyNameCaps aims to keep cows fat. [[Increase Weight Target|Dairy][$dairyWeightSetting = 3]] | [[Decrease Weight Target|Dairy][$dairyWeightSetting = 1]] | [[Disable Dietary Control|Dairy][$dairyWeightSetting = -1]]
<<elseif $dairyWeightSetting == 3>>
	$dairyNameCaps aims to keep cows very fat. [[Increase Weight Target|Dairy][$dairyWeightSetting = 4]] | [[Decrease Weight Target|Dairy][$dairyWeightSetting = 2]] | [[Disable Dietary Control|Dairy][$dairyWeightSetting = -1]]
<<elseif $dairyWeightSetting == 4>>
	$dairyNameCaps aims to keep cows so fat they can barely move. [[Decrease Weight Target|Dairy][$dairyWeightSetting = 3]] | [[Disable Dietary Control|Dairy][$dairyWeightSetting = -1]]
<<else>>
	$dairyNameCaps is currently not monitoring slave diets and will allow you full control. [[Enable Dietary Control|Dairy][$dairyWeightSetting = 0]]
<</if>> <<if $dairySlimMaintainUpgrade == 1 || $arcologies[0].FSSlimnessEnthusiast > 20>> //NOTE: Slimness controls will override all weight settings//<</if>>

<<if $arcologies[0].FSPaternalist == "unset">>

	<<if $dairyUpgradeMenials == 1>>
		<<if $menialBioreactors > 0>>
			Menial Bioreactors are restrained here and there, in every unused space. Hoses run from their nipples<<if $seeDicks != 0>> and penises<</if>> into the machinery, and from the machinery into their mouths<<if $seeDicks != 100>>, anuses, and the pussies beneath their pregnant bellies<<else>> and anuses<</if>>.
		<<else>>
			In addition to the standard milking machines, $dairyName includes numerous hose hookups for menial Bioreactors. When there's space, any menial milkers you own can be placed in any empty space and connected.
		<</if>>
	<<else>>
		There is no provision for milking menial Bioreactors. [[Add hose hookups|Dairy][cashX(forceNeg(_Tmult1), "capEx"), $dairyUpgradeMenials = 1]] //Costs <<print cashFormat(_Tmult1)>>//
	<</if>>
<</if>>

<<if ($dairyPregSetting > 1) || ($dairyFeedersSetting > 1) || ($dairyStimulatorsSetting > 1)>>

@@.yellow;WARNING:@@ current milking machine settings may have irreversible effects on cows.
<</if>>

<<DairyStatistics 1>>

<<set _facility = App.Entity.facilities.dairy>>
<<if ($Milkmaid != 0)>>
	<<print App.UI.SlaveList.displayManager(_facility)>>
	<<if canAchieveErection($Milkmaid) && $Milkmaid.pubertyXY == 1>>
		<<setLocalPronouns $Milkmaid>>

		<<if $milkmaidImpregnates == 1>>
			Keeping the cows pregnant is part of $his job. <<link "Order $him to stop impregnating" "Dairy">><<set $milkmaidImpregnates = 0>><</link>>
		<<elseif $seePreg != 0>>
			$He could be directed to keep the cows pregnant $himself. <<link "Order $him to impregnate" "Dairy">><<set $milkmaidImpregnates = 1>><</link>>
		<</if>>
	<</if>>
<<elseif $dairyRestraintsSetting > 1>>
	//Current milking machine settings make a Milkmaid superfluous by replacing their duties with automation//
<<else>>
	You do not have a slave serving as a Milkmaid. [[Appoint one|Milkmaid Select]]
<</if>>

<<set _seed = $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren>>
<<if _seed > 0>>
	<<if _seed > 1>>
		//In addition, _seed milking machines have biological components installed in them.//
	<<else>>
	//In addition, one milking machine has biological components installed in it.//
	<</if>>

<</if>>

<<print App.UI.SlaveList.listSJFacilitySlaves(_facility)>>

Rename $dairyName: <<textbox "$dairyName" $dairyName "Dairy">> //Use a noun or similar short phrase//


code:
:: Dairy Report [nobr]

<<set _MMWorkout = 0>>

<<SlaveIDSort $DairyiIDs>>
<<set _DL = $DairyiIDs.length, _SL = $slaves.length, $bioreactorPerfectedID = 0, $legendaryBallsID = 0, $legendaryCowID = 0, $milkmaidDevotionBonus = 1, $milkmaidHealthBonus = 0, $milkmaidTrustBonus = 1, $milkmaidDevotionThreshold = 45, $milkmaidTrustThreshold = 35, _anusesStretched = 0, _birthers = 0, _births = 0, _cumWeek = 0, _femCumWeek = 0, _FLsFetish = 0, _milkWeek = 0, _balltacular = 0, _boobtacular = 0, _careerForgotten = 0, _chemMinor = 0, _chemSevere = 0, _desterilized = 0, _hatefilled = 0, _horrified = 0, _intelligenceLost = 0, _mindbroken = 0, _profits = 0, _skillsLost = 0, _stupidified = 0, _vaginasStretched = 0, _cmSlave = 0, _dsSlave = 0, _hfSlave = 0, _hrSlave = 0, _slSlave = 0, _cfSlave = 0, _stSlave = 0, _btSlave = 0>>

<<set $facility = $facility || {}, $facility.dairy = initFacilityStatistics($facility.dairy)>>

<<if ($Milkmaid != 0)>>
	<<set _FLs = $slaveIndices[$Milkmaid.ID]>>
	<<set _milkmaidImpregnated = 0, _milkers = 0, _cummers = 0, _breeders = 0, _prostateStim = 0>>

	<<if (_DL > 0)>>
		<<for _dI = 0; _dI < _DL; _dI++>>
			<<set _i = $slaveIndices[$DairyiIDs[_dI]]>>
			<<if $slaves[_i].lactation > 0>>
				<<set _milkers++>>
			<</if>>
			<<if $slaves[_i].balls > 0 && $slaves[_i].ballType == "human">>
				<<set _cummers++>>
			<</if>>
			<<if ($slaves[_i].bellyPreg >= 500 && $dairyPregSetting > 0)>>
				<<set _breeders++>>
			<</if>>
			<<if ($milkmaidImpregnates == 1) && (canPenetrate($Milkmaid)) && $Milkmaid.pubertyXY == 1>>
				<<if (canImpreg($slaves[_i], $Milkmaid))>>
					<<set $slaves[_i].preg = 1, $slaves[_i].pregSource = $Milkmaid.ID, $slaves[_i].pregKnown = 1, $slaves[_i].pregWeek = 1, _milkmaidImpregnated++>>
					<<if $slaves[_i].mpreg == 1>>
						<<set $slaves[_i].counter.anal += 10, $analTotal += 10>>
					<<else>>
						<<set $slaves[_i].counter.vaginal += 10, $vaginalTotal += 10>>
					<</if>>
					<<set $slaves[_i].pregType = setPregType($slaves[_i])>>
					<<set WombImpregnate($slaves[_i], $slaves[_i].pregType, $Milkmaid.ID, 1)>>
				<</if>>
			<</if>>
			/* how much effort the MM must take to force a slave into a stall */
			<<if $slaves[_i].devotion <= 20>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].trust < 20>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].muscles >= 30 || $slaves[_i].muscles < -30>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].weight >= 70>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].weight >= 160>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].boobs >= 20000>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].balls >= 30>>
				<<set _MMWorkout++>>
			<</if>>
			<<if $slaves[_i].belly >= 5000>>
				<<set _MMWorkout++>>
			<</if>>
			<<if !canWalk($slaves[_i])>> /* big bonus if they can't move themselves and are fat as cows */
				<<if $slaves[_i].weight >= 70>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if $slaves[_i].weight >= 160>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if $slaves[_i].boobs >= 20000>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if $slaves[_i].balls >= 30>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if $slaves[_i].belly >= 5000>>
					<<set _MMWorkout += 2>>
				<</if>>
			<</if>>
			<<if ($dairyStimulatorsSetting < 2) && ($Milkmaid.dick > 4) && (canPenetrate($Milkmaid)) && _prostateStim != 1>>
				<<if ($slaves[_i].balls > 0) && ($slaves[_i].prostate > 0)>>
					<<set _prostateStim = 1>>
				<</if>>
			<</if>>
		<</for>>
	<</if>>

	<<if $slaves[_FLs].health.condition < 90>>
		<<set $slaves[_FLs].curatives = 2>>
	<<else>>
		<<set $slaves[_FLs].curatives = 0>>
	<</if>>
	<<if ($slaves[_FLs].diet != "healthy")>>
		<<set ($slaves[_FLs].diet = "healthy")>>
	<</if>>
	<<if $slaves[_FLs].devotion <= 60>>
		<<set $slaves[_FLs].devotion += 5>>
	<</if>>
	<<if $slaves[_FLs].trust < 60>>
		<<set $slaves[_FLs].trust += 5>>
	<</if>>
	<<if ($slaves[_FLs].skill.oral > 0)>>
		<<set $milkmaidDevotionBonus += Math.trunc($slaves[_FLs].skill.oral/30)>>
	<</if>>
	<<if ($slaves[_FLs].health.condition >= 80)>>
		<<set $milkmaidHealthBonus++>>
	<</if>>
	<<if $slaves[_FLs].rules.living != "luxurious">>
		<<set $slaves[_FLs].rules.living = "luxurious">>
	<</if>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
		<<if _milkers >= _cummers && _milkers >= _breeders>>
			<<if $slaves[_FLs].fetish != "boobs">>
				<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
					<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "boobs">>
				<</if>>
			<<elseif $slaves[_FLs].fetishKnown == 0>>
				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
			<<else>>
				<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
		<<elseif _cummers >= _breeders>>
			<<if $slaves[_FLs].fetish != "cumslut">>
				<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
					<<set _FLsFetish = 3, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "cumslut">>
				<</if>>
			<<elseif $slaves[_FLs].fetishKnown == 0>>
				<<set _FLsFetish = 3, $slaves[_FLs].fetishKnown = 1>>
			<<else>>
				<<set _FLsFetish = 4, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
		<<else>>
			<<if $slaves[_FLs].fetish != "pregnancy">>
				<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
					<<set _FLsFetish = 5, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "pregnancy">>
				<</if>>
			<<elseif $slaves[_FLs].fetishKnown == 0>>
				<<set _FLsFetish = 5, $slaves[_FLs].fetishKnown = 1>>
			<<else>>
				<<set _FLsFetish = 6, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
		<</if>>
	<</if>>
	<<run getSlaveStatisticData($Milkmaid, $facility.dairy)>>
	<<set $Milkmaid = $slaves[_FLs], $i = _FLs>>
	<<setLocalPronouns $Milkmaid>>
	    <<= SlaveFullName($Milkmaid)>> is serving as your Milkmaid.
	<<if $Milkmaid.relationship == -3 && $Milkmaid.devotion > 50>>
		<<set $milkmaidDevotionBonus += 2, $milkmaidTrustBonus += 2>>
		$He tries $his best to be your perfect farm<<= $wife>>.
	<</if>>
	<<if _milkmaidImpregnated > 0>>
		It's $his responsibility to keep $his charges pregnant, and $he constantly
		<<if _milkmaidImpregnated == 1>>
			breeds the one fertile cow.
		<<else>>
			fills the _milkmaidImpregnated cows' cunts with $his cum.
		<</if>>
		<<if $Milkmaid.career == "a breeding bull">>
			$He was conditioned to fill empty wombs, so $he takes a @@.hotpink;deep pleasure@@ in $his job.
			<<set $slaves[_FLs].devotion++>>
		<<elseif ($Milkmaid.fetish == "pregnancy" && $Milkmaid.fetishKnown == 1)>>
			$He has a pregnancy fetish, so $he finds $his job @@.hotpink;quite enjoyable,@@ especially when $he gets to watch the cows swell with $his children.
			<<set $slaves[_FLs].devotion += Math.ceil($slaves[_FLs].fetishStrength/25)>>
			<<set $slaves[_FLs].fetishStrength += 2>>
		<</if>>
		<<set _Tmult = (_milkmaidImpregnated * 10), $slaves[_FLs].counter.penetrative += _Tmult, $Milkmaid.counter.penetrative += _Tmult, $penetrativeTotal += _Tmult>>
		<<set $slaves[_FLs].need = 0>>
	<</if>>
	<<if (_FLsFetish == 1)>>
		In $his line of work, $he touches more breasts than even you do. $He lives in an atmosphere of quivering, heaving, milky breastflesh; of girls who shudder and moan when $he touches their creamy nipples. $He has @@.lightcoral;become more of a breast $girl.@@
	<<elseif (_FLsFetish == 2)>>
		It's a hard life, pulling teats and washing cows, but it does @@.lightsalmon;make $him more of a breast fetishist.@@
	<<elseif (_FLsFetish == 3)>>
		In $his line of work, $he touches more dicks and balls than most sluts. $He lives in an atmosphere of constant orgasm and ejaculation; of girls who shudder and moan when $he touches their engorged members. $He has @@.lightcoral;become more of a cum $girl.@@
	<<elseif (_FLsFetish == 4)>>
		It's a hard life, cupping balls, cleaning dicks, and observing semen quality, but it does @@.lightsalmon;make $him more of a cum fetishist.@@
	<<elseif (_FLsFetish == 5)>>
		In $his line of work, $he fondles more pregnancies than most clinics. $He lives in an atmosphere of swollen, hanging, baby-filled bellies; of girls who shudder and moan when $he runs $his hands across their bellies. $He has @@.lightcoral;grown a taste for girls laden with child.@@
	<<elseif (_FLsFetish == 6)>>
		It's a hard life, washing bellies and inspecting pussies, but it does @@.lightsalmon;make $him more of a pregnancy fetishist.@@
	<</if>>
	<<if ($Milkmaid.muscles > 30)>>
		<<set $milkmaidHealthBonus++>>
		$His muscles help $him handle the fattest or most reluctant cow.
	<</if>>
	<<if (_MMWorkout > random(1,30-$Milkmaid.geneticQuirks.mLoss+$Milkmaid.geneticQuirks.mGain)) && $Milkmaid.muscles < 60>>
		Constantly having to wrestle unruly or aiding heavy cows into their stalls forces $him to @@.lime;build muscle.@@
		<<set $slaves[_FLs].muscles++>>
	<</if>>
	<<if ($Milkmaid.skill.oral > 30)>>
		$His skilled tongue helps $him keep $his cattle happy.
	<</if>>
	<<if ($Milkmaid.skill.oral < 90)>>
		<<= SkillIncrease.Oral($slaves[_FLs], 3)>>
	<</if>>
	<<if ($Milkmaid.sexualQuirk == "caring")>>
		<<set $milkmaidTrustBonus++>>
		$He's very caring, and does $his best to get the cows to trust $him.
	<</if>>
	<<if ($Milkmaid.behavioralQuirk == "funny")>>
		<<set $milkmaidTrustBonus++>>
		$He's funny, and does $his best to get the cows to trust $him by keeping them laughing.
	<</if>>
	<<if setup.milkmaidCareers.includes($Milkmaid.career)>>
		<<set $milkmaidHealthBonus++>>
		$He has career experience dealing with milk animals.
	<<elseif $Milkmaid.skill.milkmaid >= $masteredXP>>
		<<set $milkmaidHealthBonus++>>
		$He has experience harvesting slave products from working for you.
	<<else>>
		<<set $slaves[_FLs].skill.milkmaid += random(1,Math.ceil(($Milkmaid.intelligence+$Milkmaid.intelligenceImplant)/15) + 8)>>
	<</if>>
	<<if _prostateStim == 1>>
		$He uses $his turgid cock to give prostate stimulation to slaves that need help ejaculating.
		<<set $slaves[_FLs].need -= 50>>
	<</if>>
	<<set $milkmaidDevotionThreshold += (5*$milkmaidDevotionBonus), $milkmaidTrustThreshold += (5*$milkmaidTrustBonus)>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$DairyiIDs[_dI]]>>
		<<if $Milkmaid.rivalryTarget == $slaves[$i].ID>>
			<<setLocalPronouns $slaves[$i] 2>>
			$He either neglects or harasses $his <<print rivalryTerm($Milkmaid)>>, $slaves[$i].slaveName, making sure _he2 is unhappy and uncomfortable.
			<<set $slaves[$i].devotion -= 3, $slaves[$i].trust -= 3>>
			<<if random(1,100) > 65>>
				<<set $Milkmaid.rivalry++, $slaves[_FLs].rivalry++, $slaves[$i].rivalry++>>
			<</if>>
		<<elseif $Milkmaid.relationshipTarget == $slaves[$i].ID>>
			<<setLocalPronouns $slaves[$i] 2>>
			$He dotes over $his <<print relationshipTerm($Milkmaid)>>, $slaves[$i].slaveName, making sure _he2 is happy and comfortable.
			<<set $slaves[$i].devotion++, $slaves[$i].trust++>>
		<<elseif $familyTesting == 1 && areRelated($Milkmaid, $slaves[$i]) > 0>>
			<<setLocalPronouns $slaves[$i] 2>>
			$He pays special attention to $his <<print relativeTerm($Milkmaid,$slaves[$i])>>, $slaves[$i].slaveName, making sure _he2 is well kept and happy.
			<<set $slaves[$i].trust++>>
		<<elseif $Milkmaid.relationTarget == $slaves[$i].ID && $familyTesting == 0>>
			<<setLocalPronouns $slaves[$i] 2>>
			$He pays special attention to $his $slaves[$i].relation, $slaves[$i].slaveName, making sure _he2 is well kept and happy.
			<<set $slaves[$i].trust++>>
		<</if>>
		<<if $slaves[$i].prestigeDesc == "$He is remembered for winning best in show as a dairy cow.">>
			<<if ($slaves[$i].lactation > 0) && (($slaves[$i].boobs-$slaves[$i].boobsImplant) > 6000)>>
				$He spends extra time with $slaves[$i].slaveName, the well-known cow. $He is fascinated by $slaves[$i].slaveName's massive $slaves[$i].boobs cc breasts and spends extra time massaging and kneading them to maximize production.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<<else>>
				$He is disappointed that the well-known cow $slaves[$i].slaveName<<if ($slaves[$i].lactation == 0)>> isn't producing milk anymore. <<else>>'s breasts have shrunken considerably from their heyday.<</if>>
			<</if>>
		<</if>>
		<<if $slaves[$i].prestigeDesc == "$He is remembered for winning best in show as a cockmilker.">>
			<<if (($slaves[$i].balls > 6) && ($slaves[$i].dick != 0)) || (($slaves[$i].balls > 4) && ($slaves[$i].dick != 0) && ($slaves[$i].prostate > 1))>>
				$He spends extra time with $slaves[$i].slaveName, the massive ejaculating cow. $He can't help but massage the cow's dick and testes to stimulate them further and coax more from them.
				<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
			<<else>>
				$He is disappointed that the (formerly) massive ejaculating cow $slaves[$i].slaveName<<if $slaves[$i].balls == 0 || $slaves[$i].dick == 0>> is incapable of giving cum<<elseif $slaves[$i].prostate < 2>> no longer possesses a hyperactive prostate<<else>>'s balls are considerably smaller than at their heyday<</if>>.
			<</if>>
		<</if>>
		<<if $slaves[$i].prestigeDesc == "$He is remembered for winning best in show as a breeder." && $slaves[$i].bellyPreg >= 1500>>
			<<setLocalPronouns $slaves[$i] 2>>
			$He spends extra time with $slaves[$i].slaveName, the well-known breeder. $Milkmaid.slaveName is fascinated by _his2 growing pregnancy and popular womb. $He makes sure _his2 belly and its occupants are nice and comfortable.
			<<set $slaves[$i].devotion += 3, $slaves[$i].trust += 3>>
		<</if>>
	<</for>>
<</if>>

<<set _Tadd = ($bioreactorsXY + $bioreactorsXX + $bioreactorsHerm + $bioreactorsBarren)>>
<<if (_DL + _Tadd > 0)>>
	<<if ($Milkmaid != 0)>>

<</if>>
	    <<if (_DL != 1)>>''There are _DL cows in $dairyName.''<<else>>''There is one cow in $dairyName.''<</if>>
	<<if ($dairyRestraintsSetting > 1)>>
		The facility functions as an industrial slave products factory.
	<</if>>
	<<if (_Tadd > 0)>>
		_Tadd milking machines have permanent biological components, making a total of <<print _Tadd + _DL>> milk-producing bodies.
	<</if>>
<</if>>

<<if ($Milkmaid != 0)>>
	<<set $i = _FLs>> /* apply following SA passages to facility leader */
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>

			<<= SlaveArt($slaves[_FLs], 0, 0)>>

		<</if>>
		/* 000-250-006 */
		''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as your Milkmaid.

		<<= saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set $Milkmaid = $slaves[_FLs]>>
<</if>>

<<set _oldCash = $cash>>
<<for _dI = 0; _dI < _DL; _dI++>>
	<<set $i = $slaveIndices[$DairyiIDs[_dI]]>>
	<<setLocalPronouns $slaves[$i]>>
	/* Special attention section */
	<<if ($legendaryCowID == 0) && ($slaves[$i].lactation > 0) && (($slaves[$i].boobs-$slaves[$i].boobsImplant-$slaves[$i].boobsMilk) > 6000) && ($slaves[$i].devotion > 50) && ($slaves[$i].prestige == 0)>>
		<<set $legendaryCowID = $slaves[$i].ID>>
	<</if>>
	<<if ($legendaryBallsID == 0) && ($slaves[$i].dick != 0) && ($slaves[$i].balls > 5 || ($slaves[$i].balls > 4 && $slaves[$i].prostate > 1)) && ($slaves[$i].devotion > 50) && ($slaves[$i].prestige == 0)>>
		<<set $legendaryBallsID = $slaves[$i].ID>>
	<</if>>

	/* Perform facility based rule changes */
	<<if ($dairySlimMaintain == 0)>>
		<<if $dairyWeightSetting == 0>>
			<<if $slaves[$i].weight <= 30>>
				<<set $slaves[$i].diet = "fattening">>
			<<else>>
				<<set $slaves[$i].diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 1>>
			<<if $slaves[$i].weight <= 95>>
				<<set $slaves[$i].diet = "fattening">>
			<<else>>
				<<set $slaves[$i].diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 2>>
			<<if $slaves[$i].weight <= 130>>
				<<set $slaves[$i].diet = "fattening">>
			<<else>>
				<<set $slaves[$i].diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 3>>
			<<if $slaves[$i].weight <= 160>>
				<<set $slaves[$i].diet = "fattening">>
			<<else>>
				<<set $slaves[$i].diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 4>>
			<<if $slaves[$i].weight <= 195>>
				<<set $slaves[$i].diet = "fattening">>
			<<else>>
				<<set $slaves[$i].diet = "healthy">>
			<</if>>
		<<elseif $dairyRestraintsSetting > 1>>
			<<set $slaves[$i].diet = "healthy">>
		<</if>>
	<<elseif $slaves[$i].weight > 10>>
		<<set $slaves[$i].diet = "restricted">>
	<<elseif ($slaves[$i].diet == "fattening") || $slaves[$i].diet == "healthy" || ($dairyRestraintsSetting > 1)>>
		<<set $slaves[$i].diet = "healthy">>
	<</if>>
	<<if $dairyRestraintsSetting > 1>>
		<<set $slaves[$i].collar = "none", $slaves[$i].choosesOwnClothes = 0, $slaves[$i].clothes = "no clothing", $slaves[$i].vaginalAccessory = "none", $slaves[$i].vaginalAttachment = "none", $slaves[$i].dickAccessory = "none", $slaves[$i].buttplug = "none", $slaves[$i].chastityAnus = 0, $slaves[$i].chastityPenis = 0, $slaves[$i].chastityVagina = 0>>
	<</if>>
	<<switch $dairyDecoration>>
	<<case "Arabian Revivalist" "Aztec Revivalist" "Chattel Religionist" "Chinese Revivalist" "Degradationist" "Edo Revivalist" "Egyptian Revivalist" "Roman Revivalist" "Subjugationist" "Supremacist">>
		<<set $slaves[$i].rules.living = "spare">>
	<<default>>
		<<set $slaves[$i].rules.living = "normal">>
	<</switch>>
	<<if $dairyPregSetting > 0>>
		<<set WombCleanGenericReserve($slaves[$i], "incubator", 9999)>>
		<<set WombCleanGenericReserve($slaves[$i], "nursery", 9999)>>
	<</if>>

	/* General End of Week effects */
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>

				<<= SlaveArt($slaves[$i], 0, 0)>>

		<</if>>
		/* 000-250-006 */
		''__@@.pink;<<= SlaveFullName($slaves[$i])>>@@__''
		<<if $slaves[$i].choosesOwnAssignment == 2>>
			<<include "SA chooses own job">>
		<<else>>
			is serving as a cow in $dairyName.
		<</if>>

    $He <<= saGetMilked($slaves[$i])>>

		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA chooses own job">>
		<<run saGetMilked($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set _milkWeek += $milk, _cumWeek += $cum>>

	/* Facility Specific End of Week effects */
	<<if ($slaves[$i].devotion <= 20) && ($slaves[$i].trust >= -20)>>
		<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
	<</if>>
	<<if ($slaves[$i].health.condition < -80)>>
		<<run improveCondition($slaves[$i], 20)>>
	<<elseif ($slaves[$i].health.condition < -40)>>
		<<run improveCondition($slaves[$i], 10)>>
	<<elseif ($slaves[$i].health.condition < 0)>>
		<<run improveCondition($slaves[$i], 7)>>
	<<elseif ($slaves[$i].health.condition < 90)>>
		<<run improveCondition($slaves[$i], 3)>>
	<</if>>
	<<if ($slaves[$i].inflation > 0)>>
		<<set $slaves[$i].inflation = 0, $slaves[$i].inflationType = "none", $slaves[$i].inflationMethod = 0, $slaves[$i].milkSource = 0>>
		<<run SetBellySize($slaves[$i])>>
	<</if>>
	<<set _gigantomastiaMod = $slaves[$i].geneticQuirks.gigantomastia == 2 ? ($slaves[$i].geneticQuirks.macromastia == 2 ? 3 : 2) : 1>>
	<<if ($slaves[$i].lactation > 0) && (($dairySlimMaintain == 0) || ($slaves[$i].boobs > 700))>>
		<<if ($slaves[$i].boobs < 2000)>>
			<<set _growth = 100>>
		<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
			<<set _growth = 50>>
		<<elseif ($slaves[$i].boobs < 10000*_gigantomastiaMod)>>
			<<set _growth = 25>>
		<<else>>
			<<set _growth = 0>>
		<</if>>
		<<if ($slaves[$i].geneMods.NCS == 1)>>
			<<set _growth = Math.trunc(_growth/2)>>
		<</if>>
		<<set $slaves[$i].boobs += _growth>>
	<</if>>
	<<if $slaves[$i].prostate == 1>>
		<<set $slaves[$i].prostate = 2>>
		<<run cashX(forceNeg($surgeryCost), "slaveSurgery", $slaves[$i]), surgeryDamage($slaves[$i], 10)>>
	<</if>>
	<<if $slaves[$i].vasectomy == 1>>
		<<set $slaves[$i].vasectomy = 0>>
		<<run cashX(forceNeg($surgeryCost), "slaveSurgery", $slaves[$i]), surgeryDamage($slaves[$i], 10)>>
	<</if>>
	<<if ($dairySlimMaintain == 0)>>
		<<if $dairyImplantsSetting <= 1>>
			<<if ($slaves[$i].lactation < 2) && ($slaves[$i].boobs > 300 || $slaves[$i].balls == 0 || $slaves[$i].lactation == 1 || $dairyImplantsSetting == 1)>>
				<<set $slaves[$i].lactation = 2, $slaves[$i].lactationDuration = 2>>
				<<run cashX(forceNeg($surgeryCost), "slaveSurgery", $slaves[$i]), surgeryDamage($slaves[$i], 10)>>
			<</if>>
		<<elseif $dairyImplantsSetting == 3>>
			<<if ($slaves[$i].lactation < 1) && ($slaves[$i].boobs > 300 || $slaves[$i].balls == 0)>>
				<<set $slaves[$i].induceLactation += 9>>
				<<run induceLactation($slaves[$i])>>
			<</if>>
		<</if>>
	<</if>>
	<<if ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0)>>
		<<if ($dairySlimMaintain == 0)>>
			<<if ($slaves[$i].balls == 0)>>
				<<set $slaves[$i].hormones = 2>>
			<</if>>
		<<elseif $slaves[$i].diet == "fattening">>
			<<set $slaves[$i].weight += 2>>
			<<if $slaves[$i].weightDirection == 1>>
				<<set $slaves[$i].weight += 2>>
			<</if>>
		<</if>>
		<<if ($slaves[$i].health.condition < 75)>>
			<<run improveCondition($slaves[$i], 25)>>
		<<else>>
			<<if ($dairySlimMaintain == 0) && $slaves[$i].lactation > 0>>
				<<if $dairyFeedersSetting > 1 && $dairyStimulatorsSetting > 0>>
					<<if $slaves[$i].boobs < 50000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if ($slaves[$i].boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
						<</if>>
						<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if ($slaves[$i].geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set $slaves[$i].boobs += _growth>>
					<<else>>
						/*<<set $slaves[$i].boobs = 50000>>*/
					<</if>>
				<<elseif $dairyFeedersSetting > 0 && $dairyStimulatorsSetting > 0>>
					<<if $slaves[$i].boobs < 25000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if ($slaves[$i].boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
						<</if>>
						<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if ($slaves[$i].geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set $slaves[$i].boobs += _growth>>
					<</if>>
				<<elseif $dairyFeedersSetting > 1>>
					<<if $slaves[$i].boobs < 10000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if ($slaves[$i].boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
						<</if>>
						<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if ($slaves[$i].geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set $slaves[$i].boobs += _growth>>
					<</if>>
				<<else>>
					<<if $slaves[$i].boobs < 5000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if ($slaves[$i].boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
						<</if>>
						<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if ($slaves[$i].geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set $slaves[$i].boobs += _growth>>
					<</if>>
				<</if>>
			<</if>>
			<<if ($slaves[$i].balls > 0)>>
				<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
					<<if ($slaves[$i].geneMods.NCS == 0) && ($slaves[$i].balls < 125)>>
						<<set $slaves[$i].balls++>>
					<<elseif ($slaves[$i].geneMods.NCS == 1) && ($slaves[$i].balls < 125) && (random(1,600) > (30+(10*$slaves[$i].balls)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
						<<set $slaves[$i].balls++>>
					<</if>>
					<<if ($slaves[$i].balls >= 125)>>
						<<set _balltacular++>>
						<<set _btSlave = $slaves[$i]>>
					<</if>>
				<<elseif ($slaves[$i].balls < 10)>>
					<<if ($slaves[$i].geneMods.NCS == 0) && (random(1,100) > (40+(10*$slaves[$i].balls)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
						<<set $slaves[$i].balls++>>
					<<elseif ($slaves[$i].geneMods.NCS == 1) && ($slaves[$i].balls < 125) && (random(1,50) > (40+(10*$slaves[$i].balls)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
						<<set $slaves[$i].balls++>>
					<</if>>
					<<if ($slaves[$i].balls >= 10)>>
						<<set _balltacular++>>
						<<set _btSlave = $slaves[$i]>>
					<</if>>
				<</if>>
				<<if $slaves[$i].dick > 0>>
					<<if $slaves[$i].dick < 10>>
						<<if (($slaves[$i].geneMods.NCS == 0) && (random(1,100) > (40+(10*$slaves[$i].dick)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10))))>>
							<<set $slaves[$i].dick++>>
						<<elseif (($slaves[$i].geneMods.NCS == 1) && (random(1,50) > (40+(10*$slaves[$i].dick)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10))))>>
							<<set $slaves[$i].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</if>> /* closes ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0) */
	<<if ($dairyStimulatorsUpgrade == 1) && $dairyStimulatorsSetting > 0>>
		<<if ($dairyStimulatorsSetting > 1) && ($slaves[$i].anus < 4)>>
			<<set $slaves[$i].anus++>>
			<<if ($slaves[$i].anus >= 4)>>
				<<set _anusesStretched++>>
			<</if>>
		<<elseif ($slaves[$i].anus < 3)>>
			<<set $slaves[$i].anus++>>
		<</if>>
		<<if ($slaves[$i].health.condition < 60)>>
			<<run improveCondition($slaves[$i], 20)>>
		<<elseif $dairySlimMaintain == 0 && $slaves[$i].lactation > 0>>
			<<if $dairyFeedersSetting > 1>>
				<<if $slaves[$i].boobs < 50000>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if ($slaves[$i].boobs < 2000)>>
							<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
							<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<</if>>
					<<else>>
						<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
					<</if>>
					<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
						<<set _boobtacular++>>
					<</if>>
					<<if ($slaves[$i].geneMods.NCS == 1)>>
						<<set _growth = Math.trunc(_growth/2)>>
					<</if>>
					<<set $slaves[$i].boobs += _growth>>
				<</if>>
			<<elseif $dairyFeedersSetting > 0>>
				<<if $slaves[$i].boobs < 25000>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if ($slaves[$i].boobs < 2000)>>
							<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
							<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<</if>>
					<<else>>
						<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
					<</if>>
					<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
						<<set _boobtacular++>>
					<</if>>
					<<if ($slaves[$i].geneMods.NCS == 1)>>
						<<set _growth = Math.trunc(_growth/2)>>
					<</if>>
					<<set $slaves[$i].boobs += _growth>>
				<</if>>
			<<else>>
				<<if $slaves[$i].boobs < 10000>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if ($slaves[$i].boobs < 2000)>>
							<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<elseif ($slaves[$i].boobs < 5000*_gigantomastiaMod)>>
							<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<</if>>
					<<else>>
						<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/4))>>
					<</if>>
					<<if $slaves[$i].boobs <= 20000 && $slaves[$i].boobs+_growth > 20000>>
						<<set _boobtacular++>>
					<</if>>
					<<if ($slaves[$i].geneMods.NCS == 1)>>
						<<set _growth = Math.trunc(_growth/2)>>
					<</if>>
					<<set $slaves[$i].boobs += _growth>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
	<<if ($dairyRestraintsSetting > 1)>>
		<<if $slaves[$i].lactation > 0>>
			<<set $slaves[$i].lactationAdaptation += 1>>
		<</if>>
		<<if ($slaves[$i].muscles > -100)>>
			<<set $slaves[$i].muscles -= 1+$slaves[$i].geneticQuirks.mLoss>>
		<</if>>
		<<if ($slaves[$i].fetish == "mindbroken")>>
			<<if ($slaves[$i].boobs > 48000) && (($slaves[$i].balls >= 10) || ($slaves[$i].balls == 0))>>
				<<set $bioreactorPerfectedID = $slaves[$i].ID>>
			<</if>>
		<<else>>
			<<if ($slaves[$i].sexualFlaw != "self hating")>>
				<<if ($slaves[$i].sexualFlaw != "cum addict") || ($dairyFeedersSetting == 0)>>
					<<if ($slaves[$i].sexualFlaw != "anal addict") || ($dairyStimulatorsSetting == 0)>>
						<<if ($slaves[$i].sexualFlaw != "breeder") || ($slaves[$i].preg < 0) || ($dairyPregSetting == 0)>>
							<<if $dairyStimulatorsSetting > 1>>
								<<if ($slaves[$i].sexualFlaw != "hates anal") && ($slaves[$i].sexualQuirk != "painal queen")>>
									<<set $slaves[$i].sexualFlaw = "hates anal">>
								<</if>>
							<</if>>
							<<if $dairyPregSetting > 1>>
								<<if ($slaves[$i].sexualFlaw != "hates penetration") && ($slaves[$i].sexualQuirk != "strugglefuck queen")>>
									<<set $slaves[$i].sexualFlaw = "hates penetration">>
								<</if>>
							<</if>>
							<<if $dairyFeedersSetting > 1>>
								<<if ($slaves[$i].sexualFlaw != "hates oral") && ($slaves[$i].sexualQuirk != "gagfuck queen")>>
									<<set $slaves[$i].sexualFlaw = "hates oral">>
								<</if>>
							<</if>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<if $slaves[$i].chem > 250>>
			<<set _chemSevere++>>
		<<elseif $slaves[$i].chem > 100>>
			<<set _chemMinor++>>
			<<set _cmSlave = $slaves[$i]>>
		<</if>>
	<</if>>
	<<if ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 5>>
		<<if $slaves[$i].devotion <= 95 && $slaves[$i].sexualFlaw != "self hating">>
			<<if ($slaves[$i].sexualFlaw != "breeder") || ($slaves[$i].preg < 0)>>
				<<if ($slaves[$i].devotion > -75)>>
					<<set $slaves[$i].devotion -= 10>>
					<<if ($slaves[$i].devotion < -65)>>
						<<set _hatefilled++>>
						<<set _hfSlave = $slaves[$i]>>
					<</if>>
				<<elseif ($slaves[$i].trust > -75)>>
					<<set $slaves[$i].trust -= 10>>
					<<if ($slaves[$i].trust < -65)>>
						<<set _horrified++>>
						<<set _hrSlave = $slaves[$i]>>
					<</if>>
				<<elseif ($slaves[$i].skill.vaginal > 0)>>
					<<set $slaves[$i].skill.vaginal -= 10, _skillsLost++>>
					<<set _slSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].skill.oral > 0)>>
					<<set $slaves[$i].skill.oral -= 10, _skillsLost++>>
					<<set _slSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].skill.anal > 0)>>
					<<set $slaves[$i].skill.anal -= 10, _skillsLost++>>
					<<set _slSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].career != "a bioreactor")>>
					<<set $slaves[$i].career = "a bioreactor", _careerForgotten++>>
					<<set _cfSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].intelligenceImplant > 0)>>
					<<set $slaves[$i].intelligenceImplant = Math.clamp($slaves[$i].intelligenceImplant-5, 0, 30), _skillsLost++>>
					<<set _slSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].intelligence >= -15)>>
					<<set $slaves[$i].intelligence -= 5, _intelligenceLost++>>
				<<elseif ($slaves[$i].devotion >= -20)>>
					<<set $slaves[$i].devotion -= 10>>
				<<elseif ($slaves[$i].trust >= -20)>>
					<<set $slaves[$i].trust -= 10>>
				<<elseif ($slaves[$i].skill.whoring > 0)>>
					<<set $slaves[$i].skill.whoring -= 10, _skillsLost++>>
					<<set _slSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].skill.entertainment > 0)>>
					<<set $slaves[$i].skill.entertainment -= 10, _skillsLost++>>
					<<set _slSlave = $slaves[$i]>>
				<<elseif ($slaves[$i].intelligence >= -50)>>
					<<set $slaves[$i].intelligence -= 5>>
					<<if $slaves[$i].intelligence < -50>>
						<<set _stupidified++>>
						<<set _stSlave = $slaves[$i]>>
					<</if>>
				<<elseif ($slaves[$i].fetish != "mindbroken")>>
					<<set $slaves[$i].fetish = "mindbroken", _mindbroken++>>
				<</if>>
			<</if>>
		<</if>>
		<<if (($slaves[$i].counter.milk > 1000) && ($slaves[$i].boobs > 12000) || ($slaves[$i].counter.cum > 1000) && ($slaves[$i].balls >= 10)) && ($slaves[$i].career != "a bioreactor")>>
			<<set $slaves[$i].career = "a bioreactor", _careerForgotten++>>
			<<set _cfSlave = $slaves[$i]>>
		<</if>>
		<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
			<<set $slaves[$i].chem += 5>>
		<<else>>
			<<set $slaves[$i].chem += 2>>
		<</if>>
	<<elseif ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 3>>
		<<if ($slaves[$i].devotion < 75)>>
			<<if ($slaves[$i].devotion > -75)>>
				<<set $slaves[$i].devotion -= 5>>
				<<if ($slaves[$i].devotion < -70)>>
					<<set _hatefilled++>>
					<<set _hfSlave = $slaves[$i]>>
				<</if>>
			<<elseif ($slaves[$i].trust > -75)>>
				<<set $slaves[$i].trust -= 5>>
				<<if ($slaves[$i].trust < -70)>>
					<<set _horrified++>>
					<<set _hrSlave = $slaves[$i]>>
				<</if>>
			<<elseif ($slaves[$i].skill.vaginal >= 20)>>
				<<set $slaves[$i].skill.vaginal -= 10, _skillsLost++>>
				<<set _slSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].skill.oral >= 20)>>
				<<set $slaves[$i].skill.oral -= 10, _skillsLost++>>
				<<set _slSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].skill.anal >= 20)>>
				<<set $slaves[$i].skill.anal -= 10, _skillsLost++>>
				<<set _slSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].career != "a bioreactor")>>
				<<set $slaves[$i].career = "a bioreactor", _careerForgotten++>>
				<<set _cfSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].intelligenceImplant > 0)>>
				<<set $slaves[$i].intelligenceImplant = Math.clamp($slaves[$i].intelligenceImplant-5, 0, 30), _skillsLost++>>
				<<set _slSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].intelligence >= -15)>>
				<<set $slaves[$i].intelligence -= 5, _intelligenceLost++>>
			<<elseif ($slaves[$i].devotion >= -20)>>
				<<set $slaves[$i].devotion -= 8>>
			<<elseif ($slaves[$i].trust >= -20)>>
				<<set $slaves[$i].trust -= 8>>
			<<elseif ($slaves[$i].skill.whoring >= 20)>>
				<<set $slaves[$i].skill.whoring -= 10, _skillsLost++>>
				<<set _slSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].skill.entertainment >= 20)>>
				<<set $slaves[$i].skill.entertainment -= 10, _skillsLost++>>
				<<set _slSlave = $slaves[$i]>>
			<<elseif ($slaves[$i].intelligence >= -50)>>
				<<set $slaves[$i].intelligence -= 5>>
				<<if $slaves[$i].intelligence < -50>>
					<<set _stupidified++>>
					<<set _stSlave = $slaves[$i]>>
				<</if>>
			<<elseif ($slaves[$i].fetish != "mindbroken")>>
				<<set $slaves[$i].fetish = "mindbroken", _mindbroken++>>
			<</if>>
		<<elseif (($slaves[$i].counter.milk > 1000) && ($slaves[$i].boobs > 12000) || ($slaves[$i].counter.cum > 1000) && ($slaves[$i].balls >= 10)) && ($slaves[$i].career != "a bioreactor")>>
			<<set $slaves[$i].career = "a bioreactor", _careerForgotten++>>
			<<set _cfSlave = $slaves[$i]>>
		<</if>>
		<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
			<<set $slaves[$i].chem += 2>>
		<<else>>
			<<set $slaves[$i].chem++>>
		<</if>>
	<</if>> /* closes ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 5 */
	<<if ($dairyPregUpgrade == 1) && ($dairyPregSetting > 0)>>
		<<if ($slaves[$i].ovaries == 1) && ($slaves[$i].vagina > -1)>>
			<<set _femCumWeek += Math.trunc((70-$slaves[$i].physicalAge)/(30-($slaves[$i].vaginaLube*10)))>>
			<<if ($slaves[$i].preg == -2)>>
				<<set $slaves[$i].preg = 0, _desterilized++>>
				<<set _dsSlave = $slaves[$i]>>
			<</if>>
			<<if isFertile($slaves[$i])>>
				<<if $slaves[$i].eggType == "human">>
					<<set $slaves[$i].preg = 1, $slaves[$i].pregWeek = 1, $slaves[$i].pregKnown = 1>>
					<<if ($dairyPregSetting > 2)>>
						<<set $slaves[$i].pregType = random(10,29)>>
					<<elseif ($dairyPregSetting > 1)>>
						<<set $slaves[$i].pregType = random(3,6)>>
					<<else>>
						<<set $slaves[$i].pregType = either(1, 1, 1, 1, 2, 2, 2, 3, 3, 4)>>
					<</if>>
					<<set $slaves[$i].pregSource = -2>>
					<<set WombImpregnate($slaves[$i], $slaves[$i].pregType, -2, 1)>>
				<</if>> /*closes eggType */
				<<if ($slaves[$i].vagina == 0)>>
					<<set $slaves[$i].vagina++>>
				<</if>>
			<<elseif ($slaves[$i].pregKnown == 1)>>
				<<if ($dairyPregSetting > 2)>>
					<<run cashX(100, "milked", $slaves[$i])>>
				<<elseif ($dairyPregSetting > 1)>>
					<<run cashX(50, "milked", $slaves[$i])>>
				<<else>>
					<<run cashX(25, "milked", $slaves[$i])>>
				<</if>>
				<<if ($dairyPregSetting > 1) && ($slaves[$i].vagina < 4)>>
					<<set $slaves[$i].vagina++>>
					<<if ($slaves[$i].vagina == 4)>>
						<<set _vaginasStretched++>>
					<</if>>
				<<elseif ($slaves[$i].vagina < 3)>>
					<<set $slaves[$i].vagina++>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</for>>

<<if $inflatedSlavesMilk > 0>>
	<<set _milkWeek -= ((8*$inflatedSlavesMilk*10)+8)>>
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<set _cumWeek -= ((80*$inflatedSlavesCum*10)+80)>>
	<<if _cumWeek < 0>>
		<<set _cumWeek = 0>>
	<</if>>
<</if>>

<<if (_Tadd > 0)>>
	<<set _tempCash = $cash>>
	<<set _seed = (100*$bioreactorsXY) + (100*$bioreactorsHerm), _cumWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set _cashX = _seed*random(40,50)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set _cashX = _seed*(random(25,35)+Math.trunc($arcologies[0].FSPastoralist/10))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<else>>
		<<set _cashX = _seed*random(25,35)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<</if>>
	<<set _seed = (2*$bioreactorsXX) + (2*$bioreactorsHerm), _femCumWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set _cashX = _seed*random(40,50)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set _cashX = _seed*(random(25,35)+Math.trunc($arcologies[0].FSPastoralist/10))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<else>>
		<<set _cashX = _seed*random(25,35)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<</if>>
	<<set _seed = (800*$bioreactorsXX) + (700*$bioreactorsBarren) + (600*$bioreactorsXY) + (600*$bioreactorsHerm), _milkWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set _cashX = _seed*(13+Math.trunc($arcologies[0].FSPastoralist/30))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set _cashX = _seed*(8+Math.trunc($arcologies[0].FSPastoralist/30))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<else>>
		<<set _cashX = _seed*9>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<</if>>

_Tadd permanently converted biological "machine<<if _Tadd > 1>>s<</if>>" produce<<if _Tadd == 1>>s<</if>> @@.yellowgreen;<<print cashFormat($cash-_tempCash)>>@@ income.
<</if>>

<<if $inflatedSlavesMilk > 0>>
	<<set _cashX -= Math.trunc(((600*($inflatedSlavesMilk)+8)+random(50,200)))>>
	<<run cashX(_cashX, "milked")>>
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<set _cashX -= Math.trunc(((300*($inflatedSlavesCum+8))+random(25,100)))>>
	<<run cashX(_cashX, "milked")>>
<</if>>

<<set _profits = $cash-_oldCash>>

<<if _chemSevere > 1>>
	_chemSevere cows' productivity is being reduced by the long term effects of industrial use.
<<elseif _chemSevere > 0>>
	One cow's productivity is being reduced by the long term effects of industrial use.
<</if>>
<<if _chemMinor > 1>>
	_chemMinor cows have been drugged and used long enough that they require increased curative doses, slightly reducing their output.
<<elseif _chemMinor > 0>>
	<<setLocalPronouns _cmSlave>>
	One cow has been drugged and used long enough that $he requires increased curative doses, slightly reducing $his output.
<</if>>
<<if _desterilized > 1>>
	_desterilized cows had minor health issues preventing their fertile womb from conceiving; the issues have been resolved and they have been impregnated.
<<elseif _desterilized > 0>>
	<<setLocalPronouns _dsSlave>>
	One cow had minor health issues preventing $his fertile womb from conceiving; they have been resolved and $he has been impregnated.
<</if>>
<<if _hatefilled > 1>>
	_hatefilled cows stopped struggling so much when fucked by the machines; it seems they have sunk into a fugue.
<<elseif _hatefilled > 0>>
	<<setLocalPronouns _hfSlave>>
	One cow stopped struggling so much when fucked by the machines; it seems $he has sunk into a fugue.
<</if>>
<<if _horrified > 1>>
	_horrified cows' emotional activity dropped significantly; this indicates acceptance that they are not likely to leave $dairyName, ever again.
<<elseif _horrified > 0>>
	<<setLocalPronouns _hrSlave>>
	One cow's emotional activity dropped significantly; this indicates acceptance that $he is not likely to leave $dairyName, ever again.
<</if>>
<<if _skillsLost > 1>>
	_skillsLost cows forgot skills due to their inability to focus on anything but machine rape.
<<elseif _skillsLost > 0>>
	<<setLocalPronouns _slSlave>>
	One cow forgot skills due to $his inability to focus on anything but machine rape.
<</if>>
<<if _careerForgotten > 1>>
	_careerForgotten cows forgot the details of their past professional lives; all they can remember now is this.
<<elseif _careerForgotten > 0>>
	<<setLocalPronouns _cfSlave>>
	One cow forgot the details of $his past professional life; all $he can remember now is this.
<</if>>
<<if _vaginasStretched > 1>>
	_vaginasStretched cows' vaginas were broken in for machine use, and are unlikely to be any use for anything other than receiving cum and medication, and giving birth.
<<elseif _vaginasStretched > 0>>
	One cow's vagina was broken in for machine use, and is unlikely to be any use for anything other than receiving cum and medication, and giving birth.
<</if>>
<<if _anusesStretched > 1>>
	_anusesStretched cows' anuses were loosened by machine sodomy, and are now permanently gaped.
<<elseif _anusesStretched > 0>>
	One cow's anus was loosened by machine sodomy, and is now permanently gaped.
<</if>>
<<if _intelligenceLost > 1>>
	_intelligenceLost cows suffered some loss of intelligence due to accumulated mental stress from life attached to a milking machine.
<<elseif _intelligenceLost > 0>>
	One cow suffered some loss of intelligence due to accumulated mental stress from life attached to a milking machine.
<</if>>
<<if _stupidified > 1>>
	_stupidified cows were so mentally dulled by use as biological factories that they were reduced to a very low level of intelligence.
<<elseif _stupidified > 0>>
	<<setLocalPronouns _stSlave>>
	One cow was so mentally dulled by use as biological factories that $he was reduced to a very low level of intelligence.
<</if>>
<<if _mindbroken > 1>>
	_mindbroken cows finally lost higher mental function, and are now nothing more than industrial equipment made of meat.
<<elseif _mindbroken > 0>>
	One cow finally lost higher mental function, and is now nothing more than industrial equipment made of meat.
<</if>>
<<if _boobtacular > 1>>
	_boobtacular cows grew past 30 kilograms of breasts, a remarkable advance in capacity.
<<elseif _boobtacular > 0>>
	One cow grew past 30 kilograms of breasts, a remarkable advance in capacity.
<</if>>
<<if _balltacular > 1>>
	_balltacular cows' testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking them with extra force.
<<elseif _balltacular > 0>>
	<<setLocalPronouns _btSlave>>
	One cow's testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking $him with extra force.
<</if>>

<<if ($dairyPregUpgrade == 1)>>
	<<if ($dairyPregSetting >= 2)>>
		Fertile cows make you a significant profit through contract pregnancies.
	<<elseif ($dairyPregSetting == 1)>>
		Fertile cows make you a small profit through contract pregnancies.
	<</if>>
<</if>>
<<set _cumWeek = Math.trunc(_cumWeek/10)>>
<<set $cumPipeline = _cumWeek, $milkPipeline = _milkWeek>>
<<if $inflatedSlavesMilk > 0>>
	<<set _outputMilk = ((8*$inflatedSlavesMilk*10)+8)>>
<<else>>
	<<set _outputMilk = 0>>
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<set _outputCum = (((80*$inflatedSlavesCum*10)+80)/10)>>
<<else>>
	<<set _outputCum = 0>>
<</if>>
$dairyNameCaps produced <<print _milkWeek+_outputMilk>> liters of milk<<if _cumWeek > 0>> and <<print _cumWeek+_outputCum>> liters of cum<</if>> this week.
<<if $inflatedSlavesMilk > 0>>
	_outputMilk liters of milk were pumped into your penthouse for filling slaves this week.
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<if $inflatedSlavesMilk > 0>>and <</if>>_outputCum liters of cum were pumped into your penthouse<<if $inflatedSlavesMilk > 0>> as well<<else>> this week<</if>>.
<</if>>
<<if _femCumWeek > 0>>
	The machines also managed to reclaim _femCumWeek liters of salable vaginal secretions.
<</if>>
<<if _births > 1>>
	Additionally, _birthers cows gave birth<<if _births > _birthers>> to a total of _births calves<</if>> this week.
<<elseif _births > 0>>
	Additionally, one cow gave birth<<if _births > _birthers>> to a total of _births calves<</if>> this week.
<</if>>

<<if $arcologies[0].FSRestart != "unset" && $eugenicsFullControl != 1>>
	<<if $dairyPregSetting > 0>>
		The Societal Elite know what you are doing with your cows. @@.red;They do not approve.@@
		<<set $failedElite += 5>>
	<</if>>
	<<if _milkmaidImpregnates == 1>>
		The Societal Elite know you've ordered $Milkmaid.slaveName to impregnate your cows. @@.red;They are not amused by your disinterest in eugenics.@@
		<<set $failedElite += 10>>
	<</if>>
<</if>>

<>
<<if (_profits > 0)>>
	The sale of these products makes a profit of @@.yellowgreen;<<print cashFormat(_profits)>>.@@
<<elseif (_profits < 0)>>
	Due to <<if $dairyImplantsSetting != 3>>one-off costs of hormonal implants to encourage fluid production<<else>>the need to induce lactation in some cows<</if>>, your dairy made a loss of @@.red;<<print cashFormat(_profits)>>.@@
<<else>>
	Due to <<if $dairyImplantsSetting != 3>>one-off costs of hormonal implants to encourage fluid production<<else>>the need to induce lactation in some cows<</if>> paired with existing output, your dairy broke even this week.
<</if>>

<<if ($arcologies[0].FSPastoralistLaw == 1)>>
	Slave products have completely replaced traditional dairy, making the facility extremely lucrative.
<</if>>

<<if ($dairySlimMaintainUpgrade == 1 && $dairySlimMaintain == 1)>>

	<<if $arcologies[0].FSSlimnessEnthusiast > 80>>
		Because of your arcology's great enthusiasm for small breasted slaves, the dairy's milking systems have been carefully overhauled and optimized for maximum milk extraction from slaves with smaller endowments — providing a significant boost to their otherwise modest output. This also prevents unfashionable breast expansion of already slim slaves through the milking process.
	<<elseif $arcologies[0].FSSlimnessEnthusiast > 20>>
		In keeping with your arcology's ideals, $dairyName has been modified to handle slim slaves with minimal impact to their body shapes. This limits potential profitability, but prevents unfashionable breast expansion of already slim slaves through the milking process.
	<<else>>
		Due to your arcology's lack of enthusiasm for small breasted slaves the dairy has discontinued using milking techniques that prevent breast growth through the milking process.
		<<set $dairySlimMaintain = 0, $dairySlimMaintainUpgrade = 0>>
	<</if>>
<</if>>

<<if ($createBioreactors == 1) && ($bioreactorPerfectedID != 0)>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$DairyiIDs[_dI]]>>
		<<setLocalPronouns $slaves[$i]>>
		<<if ($slaves[$i].ID == $bioreactorPerfectedID)>>

    <<= SlaveFullName($slaves[$i])>>'s breasts<<if $slaves[$i].balls > 0>>, balls<</if>><<if $slaves[$i].ovaries == 1>>, belly<</if>>, body, and mind have been completely adapted to synthesize useful products. $He has been reclassified as part of the machine $he's now permanently attached to. This combination is projected to produce approximately
			<<if $slaves[$i].balls > 0>><<print 1000*Math.trunc((3*52*(45-$slaves[$i].physicalAge))/1000)>> liters of cum,<</if>>
			<<if $slaves[$i].ovaries == 1>><<print 100*Math.trunc((52*(45-$slaves[$i].physicalAge))/100)>> liters of vaginal secretions, <<if $dairyPregSetting == 3>><<print 13*(45-$slaves[$i].physicalAge)>><<else>><<print 5*(45-$slaves[$i].physicalAge)>><</if>> slaves,<</if>>
			and <<print 1000*Math.trunc((300*52*(45-$slaves[$i].physicalAge))/1000)>> liters of milk over a <<print 45-$slaves[$i].physicalAge>> year period before its biological components must be replaced.
			<<if ($slaves[$i].ovaries == 1)>>
				<<if ($slaves[$i].balls == 0)>>
					<<set $bioreactorsXX++>>
				<<else>>
					<<set $bioreactorsHerm++>>
				<</if>>
			<<else>>
				<<if ($slaves[$i].balls == 0)>>
					<<set $bioreactorsBarren++>>
				<<else>>
					<<set $bioreactorsXY++>>
				<</if>>
			<</if>>
			<<set $activeSlave = $slaves[$i]>>
			<<= removeActiveSlave() >>
			<<break>>
		<</if>>
	<</for>>
<</if>>

<<if $dairyDecoration != "standard">>

    $dairyNameCaps's @@.green;$dairyDecoration style is well known.@@
<</if>>

<<if _DL > 0>>

	<<DairyStatistics 0>>
	<<timed 50ms>>
		<<replace #dairystats>>
			<<DairyStatistics 1>>
		<</replace>>
	<</timed>>
<</if>>
<<if (_DL + _Tadd) > 0 || $Milkmaid != 0>>

<</if>>

repo_name: IchthysdeKilt/fc

license: mit


code:
:: Description Options [nobr]

<<set $nextButton = "Back">>
<<if $storedLink !== "Slave Interact">>
	<<if lastVisited("Slave Interact") === 1>>
		<<set $storedLink = "Slave Interact">>
	<<else>>
		<<set $storedLink = "Options">>
	<</if>>
<</if>>
<<set $nextLink = $storedLink>>

//These options will affect both the long form description of each slave and the miniscenes available from the main menu.//

<<options $surnameOrder>>
	<<option 0 "Allow nationality name order">>
	Order names ''based on country of origin''.
	<<option 1 "Force name surname">>
	Names will always be ''Name Surname''.
	<<option 2 "Force surname name">>
	Names will always be ''Surname Name''.
<</options>>

<<options $seeRace>>
	<<option 0 "Disable most mentions of race">>
		Ethnicity will ''almost never'' be mentioned.
	<<option 1 "Enable mentions of race">>
		Ethnicity will ''occasionally'' be mentioned.
<</options>>

<<options $seeNationality>>
	<<option 0 "Disable most mentions of nationality">>
		Nationality will ''almost never'' be mentioned.
	<<option 1 "Enable mentions of nationality">>
		Nationality will ''occasionally'' be mentioned.
<</options>>

<<options $showImplantEffects>>
	The effects of implants are
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showClothing>>
	Clothing is mostly
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showWardrobe>>
	The Slave Interact wardrobe is
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>
<<options $showMainClothing>>
	The Slave Interact clothing list is
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showAgeDetail>>
	Detailed slave age information is
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showHeightCMs>>
	Approximate height is
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showBodyMods>>
	Cosmetic body mods are
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showSexualHistory>>
	Sexual histories are
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showScores>>
	Attractiveness and Sexual scores are
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>

<<options $showBoobCCs>>
	Volume, in CCs, of breasts is
	<<option 1 "Shown">>
	<<option 0 "Hidden">>
<</options>>
<<options $showInches>>
	Height and length units are in
	<<option 2 "Imperial">>
	<<option 1 "Metric">>
<</options>>

<<if $seeDicks > 0>>

	<<options $showDickCMs>>
		Approximate sizes of dicks and balls are
		<<option 1 "Shown">>
		<<option 0 "Hidden">>
	<</options>>
<</if>>

<<if $showNumbers == 1>>Only numbers @@.cyan;UP TO $showNumbersMax@@<<else>>Numbers<</if>> are displayed as
<<if $showNumbers == 1>>
	words.
	<<textbox "$showNumbersMax" $showNumbersMax>> //[[Words|Description Options][$showNumbers = 0]]// | //[[Integers|Description Options][$showNumbers = 2]]//
<<elseif $showNumbers == 2>>
	@@.yellow;INTEGERS.@@ //[[Words|Description Options][$showNumbers = 0]]// | //[[Both|Description Options][$showNumbers = 1, $showNumbersMax = 20]]//
<<else>>
	@@.yellow;WORDS.@@ //[[Integers|Description Options][$showNumbers = 2]]// | //[[Both|Description Options][$showNumbers = 1, $showNumbersMax = 20]]//
<</if>>


code:
:: Discard Confirm [nobr]

This will permanently remove $activeSlave.slaveName from the game, and you will not receive any money for $him. This is primarily intended as a way to rid yourself of bugged slaves. Are you certain?

<<link "Discard $him" "Slave Sold">><</link>>

[[Cancel|Slave Interact]]