:: Clinic [nobr jump-to-safe jump-from-safe]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Clinic", $encyclopedia = "Clinic", _CL = App.Entity.facilities.clinic.employeesIDs().size>>

<<if $clinicName != "the Clinic">>
	<<set $clinicNameCaps = $clinicName.replace("the ", "The ")>>
<</if>>
<p class="scene-intro">
	$clinicNameCaps
	<<switch $clinicDecoration>>
		<<case "Roman Revivalist">>
			is open and airy; a breeze wafts through the space, and Roman theories on natural cleanliness are very much on display.
		<<case "Aztec Revivalist">>
			is open and airy; a light hint of herbs and natural oil permeates the air. Everything is incredibly sterile, especially the blood management equipment.
		<<case "Egyptian Revivalist">>
			is open and airy; clean rushes are strewn across the floor, making a gentle susurration when anyone crosses the space.
		<<case "Edo Revivalist">>
			is clean and spartan to the point of featurelessness. Spotless tatami mats cover the floor, and partitions divide the space into cubicles.
		<<case "Arabian Revivalist">>
			is open and airy; a thin trail of smoke wafts through the space on a gentle breeze, coming from a brazier burning incense.
		<<case "Chinese Revivalist">>
			is open and airy; a thin trail of smoke wafts through the space on a gentle breeze, coming from a brazier burning medicinal herbs.
		<<case "Chattel Religionist">>
			is open and airy; shaded beams of sunlight shine through skylights to bathe each bed in a pool of healing warmth.
		<<case "Degradationist">>
			is clean and cold, all scrubbed tile and cool steel. The beds have prominent restraint attachment points to force patients into any position desired.
		<<case "Repopulation Focus">>
			is warm and inviting, with wide corridors and ample seating for its pregnant clientèle. All the equipment is designed to accommodate heavily pregnant women.
		<<case "Eugenics">>
			is warm and inviting on one side, cold and utilitarian on the other. Only the toys of the elite are allowed the best of care.
		<<case "Asset Expansionist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for equipment specialized to support growth.
		<<case "Transformation Fetishist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for equipment specialized to support radical surgery.
		<<case "Gender Radicalist">>
			is comfortable and feminine. Its curving walls and soft colors are designed to present slaves coming out of anesthesia with an impression of girlishness.
		<<case "Gender Fundamentalist">>
			is comfortable and feminine. Its curving walls and soft colors are designed to keep slaves here for their female health nice and comfortable.
		<<case "Physical Idealist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for some piece of equipment useful in making the human body faster or stronger.
		<<case "Supremacist">>
			is clean and cold, all scrubbed tile and cool steel. The only hint of its radical uses are the pseudoscientific racialist charts on the walls.
		<<case "Subjugationist">>
			is clean and cold, all scrubbed tile and cool steel. The only hint of its radical uses are the pseudoscientific racialist charts on the walls.
		<<case "Paternalist">>
			is warm and inviting, with curved walls and warm colors designed to put patients at their ease. Each bed is well provided with entertainment options.
		<<case "Pastoralist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for equipment specialized for human veterinary medicine.
		<<case "Maturity Preferentialist">>
			is comfortable and soothing, with curved walls and cool colors designed to keep patients relaxed. Each bed is provided with refined yet invariably pornographic entertainment options.
		<<case "Youth Preferentialist">>
			is bright and cheerful, with curved walls and pastel colors designed to keep patients in good spirits. Each bed is provided with light entertainment options.
		<<case "Body Purist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is filled with equipment designed to make medicine as low-impact as possible.
		<<case "Slimness Enthusiast">>
			is warm and inviting, with curved walls and warm colors designed to put patients at their ease. Each bed is well provided with entertainment options.
		<<case "Hedonistic">>
			is warm and comfortable, with extra wide, soft, heated beds and ample morphine. Pleasant smells are pumped into the recovery wards, plenty of entertainment is available and chubby nurse in a too small dress with a big bowl of slave food is only a button press away. It can be quite difficult to convince patients to leave.
		<<case "Intellectual Dependency">>
			is bright and cheerful, with plenty of simple amusements to keep bimbos distracted and in bed. A complex locking mechanism promises no chance of a slave wandering off to slake their lust.
		<<case "Slave Professionalism">>
			is clean and cold, all scrubbed tile and cool steel. Any delays in recovery are nothing more than time spent not honing one's talents.
		<<case "Petite Admiration">>
			is open and airy due to all the extra space freed up by shortening the beds. A footrest is the only accommodation made for tall slaves.
		<<case "Statuesque Glorification">>
			is warm and comfortable, if a little cramped; tall slaves require long beds, after all. A meager footstool is the only accommodation made for short slaves.
		<<default>>
			is a well-equipped modern medical facility. Each patient has their own area, with heavy automation to provide them treatment without any human intervention at all.
	<</switch>>

	<<if _CL > 2>>
		$clinicNameCaps is busy. Patients occupy many of the beds; most are alert, but a few are dozing under medication designed to promote healing through deep rest.
	<<elseif _CL > 0>>
		$clinicNameCaps is sparsely populated. Patients occupy a few of the beds; most are alert, but a few are dozing under medication designed to promote healing through deep rest.
	<<elseif $Nurse != 0>>
		$Nurse.slaveName is alone in the clinic, and has nothing to do but keep the place spotlessly clean and ready for its next patients.
	<<else>>
		$clinicNameCaps is empty and quiet.
		<div class="choices" style="font-style:normal">
			[[Decommission the Clinic|Main][$clinic = 0, $clinicDecoration = "standard", $clinicUpgradeScanner = 0, $clinicUpgradeFilters = 0, $clinicUpgradePurge = 0, $clinicInflateBelly = 0, $clinicSpeedGestation = 0]]
		</div>
	<</if>>
</p>

<div>
	<<set _Tmult0 = Math.trunc($clinic*1000*$upgradeMultiplierArcology)>>
	$clinicNameCaps has room to support $clinic slaves while they receive treatment.
	There <<if _CL == 1>>is<<else>>are<</if>> currently _CL slave<<if _CL != 1>>s<</if>> receiving treatment in $clinicName.
	<div class="choices">
		[[Expand the clinic|Clinic][cashX(forceNeg(_Tmult0), "capEx"), $clinic += 5, $PC.skill.engineering += .1]]
		<span class="note">
			Costs <<print cashFormat(_Tmult0)>>
		</span>
	</div>
	<div class="choices">
		<<if _CL > 0>>
			<<removeFacilityWorkers "clinic" "rest" "rest">>
		<</if>>
	</div>
</div>

<div>
	<<if $clinicUpgradeScanner == 1>>
		$clinicNameCaps's scanners have been upgraded with a sampling system that can estimate carcinogenic damage to a slave's body.
	<<else>>
		<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology*Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier))>>
		It mounts powerful medical scanning technology.
		<div class="choices">
			[[Upgrade the scanners to help detect genomic damage|Clinic][cashX(forceNeg(_Tmult1), "capEx"), $clinicUpgradeScanner = 1, $PC.skill.hacking += 0.1]]
			<span class="note">
				Costs <<print cashFormat(_Tmult1)>>
			</span>
		</div>
	<</if>>
</div>

<div>
	<<if $clinicUpgradeFilters == 1>>
		<<if $clinicUpgradePurge >= 1>>
			The entire floor beneath $clinicName is occupied by a huge filtration plant that constantly cycles out the patients' blood to remove impurities.
			<<if $clinicUpgradePurge > 1>>
				Microscopic magnets have been added to better facilitate the leeching of impurities from cells.
			<</if>>
			The blood is intensely cleaned to greatly decrease the presence of impurities at the cost of compatibility. Patients will likely be ill for the duration of the treatment.
		<</if>>
		<<set _Tmult3 = Math.trunc(150000*$upgradeMultiplierArcology*Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier))>>
		<<if $clinicUpgradePurge === 0>>
			The entire floor beneath $clinicName is occupied by a huge filtration plant that constantly cycles out the patients' blood to remove impurities.
			<div class="choices">
				[[Increase the effectiveness of the impurity purging|Clinic][cashX(forceNeg(_Tmult3), "capEx"), $clinicUpgradePurge = 1, $PC.skill.hacking += 0.1]]
				<span class="note">
					Costs <<print cashFormat(_Tmult3)>> and may cause health problems in slaves.
				</span>
			</div>
		<<elseif $clinicUpgradePurge === 1>>
			Add nano magnets into the process to increase the rate that impurities are pulled from the body.
			<div class="choices">
				[[Further increase the effectiveness of the impurity purging|Clinic][cashX(forceNeg(_Tmult3*2), "capEx"), $clinicUpgradePurge = 3, $PC.skill.hacking += 0.1]]
				<span class="note">
					Costs <<print cashFormat(_Tmult3*2)>>
				</span>
			</div>
		<</if>>
		<<if $Nurse == 0>>
			<div>
				However, without a nurse in attendance, the @@.yellow;blood treatment equipment remains idle.@@
			</div>
		<</if>>
	<<else>>
		<<set _Tmult2 = Math.trunc(50000*$upgradeMultiplierArcology*Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier))>>
		It includes standard dialysis equipment.
		<div class="choices">
			[[Install advanced blood treatment equipment to help address drug side effects|Clinic][cashX(forceNeg(_Tmult2), "capEx"), $clinicUpgradeFilters = 1, $PC.skill.hacking += 0.1]]
			<span class="note">
				Costs <<print cashFormat(_Tmult2)>>
			</span>
		</div>
	<</if>>
</div>

<div>
	<<if $bellyImplants == 1 && $Nurse == 0>>
		A resident nurse could be used to safely regulate the rate a slave's fillable belly implant for maximum size with minimum health loss.
	<<elseif $bellyImplants == 1 && $clinicInflateBelly == 1>>
		$clinicNameCaps is useful for keeping slaves healthy during long term procedures. Slaves in $clinicName with inflatable belly implants will be filled during their time under $Nurse.slaveName's supervision to maximize growth with minimized health complications.
		<div class="choices">
			[[Do not fill belly implants|Clinic][$clinicInflateBelly = 0]]
		</div>
	<<elseif $bellyImplants == 1 && $Nurse != 0 && $clinicInflateBelly != 1>>
		$clinicNameCaps is useful for keeping slaves healthy during long term procedures. $Nurse.slaveName can supervise weekly filling regimens for clinic slaves with fillable belly implants during their stay to maximize growth with minimal health complications.
		<div class="choices">
			[[Fill belly implants|Clinic][$clinicInflateBelly = 1]]
		</div>
	<</if>>
</div>

<div>
	<<if $seePreg == 1>>
		<<if $clinicObservePregnancy != 1>>
			Pregnant patients will not be kept under observation.
			<div class="choices">
				[[Keep high-risk pregnancies under observation|Clinic][$clinicObservePregnancy = 1]]
			</div>
		<<else>>
			Patients undergoing a high-risk pregnancy or are close to giving birth will be kept under observation.
			<div class="choices">
				[[Stop observing pregnancies|Clinic][$clinicObservePregnancy = 0]]
			</div>
		<</if>>
	<</if>>
</div>

<div>
	<<if $pregSpeedControl == 1 && $Nurse == 0>>
		A resident nurse could be used to supervise patients under rapid gestation agents while minimizing strain and health complications.
	<<elseif $pregSpeedControl == 1 && $clinicSpeedGestation == 1>>
		It's exceedingly dangerous to speed up gestation without constant supervision. In $clinicName, $Nurse.slaveName will monitor slaves on rapid gestation agents; making sure the growing patients' food demands are met, monitoring their skin and womb and, if need be, perform an emergency c-section should the need arise.
		<div class="choices">
			[[Limit rapid gestation agents to selected slaves only|Clinic][$clinicSpeedGestation = 0]]
		</div>
	<<elseif $pregSpeedControl == 1 && $Nurse != 0 && $clinicSpeedGestation != 1>>
		$clinicNameCaps is currently not applying rapid gestation agents to pregnant patients. Only individually selected slaves will undergo this procedure
		<div class="choices">
			[[Speed up gestation for all pregnant patients|Clinic][$clinicSpeedGestation = 1]]
		</div>
	<</if>>
</div>

<p>
	<<print App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.clinic, true)>>
</p>

<p>
	Rename $clinicName: <<textbox "$clinicName" $clinicName "Clinic">>
	<span class="note">
		Use a noun or similar short phrase
	</span>
</p>

<<run App.UI.SlaveList.ScrollPosition.restore()>>

src/uncategorized/clinic.tw