code:
:: misc widgets [nobr widget]

/* TODO: Modularize. */

/%
Call as <<UpdateNextButton>>
Allows for dynamic updating of the next button in the storyCaption (left side-bar) for events that disable the button until user makes a selection
%/
<<widget "UpdateNextButton">>
	<<replace "#nextButton">> <<userButton>> <</replace>>
<</widget>>

/%
Call as <<SlaveInteractImpreg>>
%/
<<widget "SlaveInteractImpreg">>
<<replace #impreg>>
	<<if $activeSlave.fuckdoll == 0>>
	<<if canGetPregnant($activeSlave) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && ($activeSlave.fuckdoll == 0) && $seePreg != 0>>
		<<if canImpreg($activeSlave, $PC)>>
			| <<link "Impregnate $him yourself">><<replace "#miniscene">><<include "FPCImpreg">>
    <</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<</if>>
		<<if canImpreg($activeSlave, $activeSlave)>>
			| <<link "Use $his own seed to impregnate $him">><<replace "#miniscene">><<include "FSlaveSelfImpreg">>
    <</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<</if>>
		| [["Use another slave to impregnate " + $him|FSlaveImpreg]]
	<</if>>
	<<if $activeSlave.assignment != "work in the dairy" && $activeSlave.assignment != "be confined in the arcade" && $activeSlave.assignment != "be confined in the cellblock">>
		<<if $enema == 1>>
			<<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>>
				<<if $activeSlave.inflationType == "water" || $activeSlave.inflationType == "none">>
					| <<link "Fill $his ass with water">><<set $activeSlave.inflationType = "water">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
				<</if>>
				<<if $medicalEnema == 1>>
					<<if $activeSlave.inflationType == "aphrodisiac" || $activeSlave.inflationType == "none">>
						| <<link "Fill $his ass with aphrodisiacs">><<set $activeSlave.inflationType = "aphrodisiac">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
					<</if>>
					<<if $activeSlave.inflationType == "curative" || $activeSlave.inflationType == "none">>
						| <<link "Fill $his ass with curatives">><<set $activeSlave.inflationType = "curative">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
					<</if>>
					<<if $activeSlave.inflationType == "tightener" || $activeSlave.inflationType == "none">>
						| <<link "Fill $his ass with rectal tighteners">><<set $activeSlave.inflationType = "tightener">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
					<</if>>
				<</if>>
			<</if>> /* inflation < 3 */
		<</if>> /* enema == 1 */
		<<if $dairyPiping == 1>>
			<<if ($milkPipeline > 88 && $milkPipeline != 0) || $arcologies[0].FSPastoralistLaw == 1>>
				<<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>>
					<<if $activeSlave.inflationType == "milk" || $activeSlave.inflationType == "none">>
						| <<link "Fill $his ass with milk">><<set $activeSlave.inflationType = "milk">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
						| <<link "Force-feed $him milk">><<set $activeSlave.inflationType = "milk">><<set $activeSlave.inflationMethod = 1>><<replace "#miniscene">><<include "FillUpFace">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
					<</if>>
				<</if>>
			<<else>>
				| //$dairyNameCaps is not producing enough milk to pump through the pipes//
			<</if>>
			<<if ($cumPipeline > 88 && $cumPipeline != 0) || $arcologies[0].FSPastoralistLaw == 1>>
				<<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>>
					<<if $activeSlave.inflationType == "cum" || $activeSlave.inflationType == "none">>
						| <<link "Fill $his ass with cum">><<set $activeSlave.inflationType = "cum">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
						| <<link "Force-feed $him cum">><<set $activeSlave.inflationType = "cum">><<set $activeSlave.inflationMethod = 1>><<replace "#miniscene">><<include "FillUpFace">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
					<</if>>
				<</if>>
			<<else>>
				| //$dairyNameCaps is not producing enough cum to pump through the pipes//
			<</if>>
		<</if>> /* dairyPiping == 1 */
		<<if $wcPiping == 1>>
			<<if ($activeSlave.inflation < 3 && $activeSlave.pregKnown == 0 && $activeSlave.bellyImplant < 1500) || ($activeSlave.inflation < 1)>>
				<<if $activeSlave.inflationType == "urine" || $activeSlave.inflationType == "none">>
					| <<link "Fill $his ass with urine">><<set $activeSlave.inflationType = "urine">><<set $activeSlave.inflationMethod = 2>><<replace "#miniscene">><<include "FillUpButt">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
				<</if>>
			<</if>>
		<</if>> /* wcPiping == 1 */
	<</if>> /* assigned to dairy or arcade */
	<<if $activeSlave.inflation == 0 && $activeSlave.bellyImplant < 1500>>
		<<if $activeSlave.assignment != "work in the dairy" && $activeSlave.assignment != "be confined in the arcade" && $activeSlave.assignment != "be confined in the cellblock">>
			| [["Use another slave to force-feed " + $him|SlaveOnSlaveFeedingWorkAround]]
			<<if $buckets == 1>>
				| <<link "Make $him consume two liters of slave food">><<set $activeSlave.inflationType = "food">><<set $activeSlave.inflationMethod = 1>><<set $activeSlave.inflation = 1>><<replace "#miniscene">><<include "forceFeeding">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
				<<if $activeSlave.pregKnown == 0>>
					| <<link "Force $him to consume a gallon of slave food">><<set $activeSlave.inflationType = "food">><<set $activeSlave.inflationMethod = 1>><<set $activeSlave.inflation = 2>><<replace "#miniscene">><<include "forceFeeding">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
					| <<link "Force two gallons of slave food into $him">><<set $activeSlave.inflationType = "food">><<set $activeSlave.inflationMethod = 1>><<set $activeSlave.inflation = 3>><<replace "#miniscene">><<include "forceFeeding">>
<</replace>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
	<<else>>
		<<if (canGetPregnant($activeSlave)) && ($activeSlave.geneticQuirks.superfetation != 2 || $geneticMappingUpgrade != 0) && $seePreg != 0>>
			<<if canImpreg($activeSlave, $PC)>>
				| <<link "Put a baby in $him">><<replace "#miniscene">><<FFuckdollImpreg>>
<</replace>><</link>>
			<</if>>
		<</if>>
	<</if>>
	<</replace>>
<<replace #bloating>>
	<<if $activeSlave.inflation > 0>>

		__Required Bloating__: <<if $activeSlave.inflation == 3>><<print "$He is required to keep 2 gallons of $activeSlave.inflationType in $him at all times">><<elseif $activeSlave.inflation == 2>><<print "$He is required to keep 4 liters of $activeSlave.inflationType in $him at all times">><<elseif $activeSlave.inflation == 1>><<print "$He is required to keep 2 liters of $activeSlave.inflationType in $him at all times">><</if>>.
		<<if $activeSlave.inflationMethod == 3>>
			<<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0,$activeSlave.cumSource = 0,$activeSlave.milkSource = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<<elseif $activeSlave.inflationType == "milk">>
			<<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<<elseif $activeSlave.inflationType == "cum">>
			<<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<<else>>
			<<link "Let $him deflate">><<set $activeSlave.inflation = 0,$activeSlave.inflationType = "none",$activeSlave.inflationMethod = 0, SetBellySize($activeSlave)>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<</if>>
	<</if>>
<</replace>>
<</widget>>

/%
Call as <<SlaveInteractDrugs>>
%/
<<widget "SlaveInteractDrugs">>
	<<replace #drugs>>

Drugs: $activeSlave.drugs.
	<<link "None">><<set $activeSlave.drugs = "no drugs">><<SlaveInteractDrugs>><</link>>
	<<if $activeSlave.indentureRestrictions < 2>>
		<<if $activeSlave.drugs == "intensive breast injections" || $activeSlave.drugs == "intensive butt injections" || $activeSlave.drugs == "intensive penis enhancement" || $activeSlave.drugs == "intensive testicle enhancement">>
			| <<link "Moderate">>
				<<switch $activeSlave.drugs>>
				<<case "intensive breast injections">>
					<<set $activeSlave.drugs = "breast injections">>
				<<case "intensive butt injections">>
					<<set $activeSlave.drugs = "butt injections">>
				<<case "intensive penis enhancement">>
					<<set $activeSlave.drugs = "penis enhancement">>
				<<case "intensive testicle enhancement">>
					<<set $activeSlave.drugs = "testicle enhancement">>
				<</switch>>
				<<SlaveInteractDrugs>>
			<</link>>
		<<elseif $activeSlave.drugs == "breast injections" || $activeSlave.drugs == "butt injections" || $activeSlave.drugs == "penis enhancement" || $activeSlave.drugs == "testicle enhancement">>
			| <<link "Intensify">>
				<<set $activeSlave.drugs = "intensive " + $activeSlave.drugs>>
				<<SlaveInteractDrugs>>
			<</link>>
		<</if>>
		<<if ($activeSlave.intelligence > -100) && $activeSlave.indentureRestrictions < 1>>
			| <<link "Psychosuppressants">><<set $activeSlave.drugs = "psychosuppressants">><<SlaveInteractDrugs>><</link>>
		<<else>>
			| Psychosuppressants
		<</if>>
		<<if $arcologies[0].FSSlaveProfessionalismResearch == 1>>
			<<if canImproveIntelligence($activeSlave)>>
				| <<link "Psychostimulants">><<set $activeSlave.drugs = "psychostimulants">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Psychostimulants
			<</if>>
		<</if>>
		<<if ($activeSlave.boobs < 48000)>>
			| <<link "Breasts">><<set $activeSlave.drugs = "breast injections">><<SlaveInteractDrugs>><</link>>
		<<else>>
			| Breasts
		<</if>>
		<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
			<<if ($activeSlave.boobs < 25000)>>
				| <<link "Hyper-Breasts">><<set $activeSlave.drugs = "hyper breast injections">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Hyper Breasts
			<</if>>
		<</if>>
		<<if $arcologies[0].FSSlimnessEnthusiastResearch == 1>>
			<<if ($activeSlave.boobs-$activeSlave.boobsImplant-$activeSlave.boobsMilk > 100)>>
				| <<link "Breast reducers">><<set $activeSlave.drugs = "breast redistributors">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Breast reducers
			<</if>>
			<<if ($activeSlave.nipples == "huge" || $activeSlave.nipples == "puffy" || $activeSlave.nipples == "cute")>>
				| <<link "Nipple reducers">><<set $activeSlave.drugs = "nipple atrophiers">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Nipple reducers
			<</if>>
		<</if>>
		<<if ($activeSlave.butt < 9)>>
			| <<link "Buttocks">><<set $activeSlave.drugs = "butt injections">><<SlaveInteractDrugs>><</link>>
		<<else>>
			| Buttocks
		<</if>>
		<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
			<<if ($activeSlave.butt < 20)>>
				| <<link "Hyper-Buttocks">><<set $activeSlave.drugs = "hyper butt injections">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Hyper Buttocks
			<</if>>
		<</if>>
		<<if $arcologies[0].FSSlimnessEnthusiastResearch == 1>>
			<<if ($activeSlave.butt-$activeSlave.buttImplant > 0)>>
				| <<link "Butt reducers">><<set $activeSlave.drugs = "butt redistributors">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Butt reducers
			<</if>>
		<</if>>
		<<if ($activeSlave.lips <= 95) || (($activeSlave.lips <= 85) && ($seeExtreme != 1))>>
			| <<link "Lips">><<set $activeSlave.drugs = "lip injections">><<SlaveInteractDrugs>><</link>>
		<<else>>
			| Lips
		<</if>>
		<<if $arcologies[0].FSSlimnessEnthusiastResearch == 1>>
			<<if ($activeSlave.lips-$activeSlave.lipsImplant > 0)>>
				| <<link "Lip reducers">><<set $activeSlave.drugs = "lip atrophiers">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Lip reducers
			<</if>>
		<</if>>
		<<if $growthStim == 1>>
			<<if canImproveHeight($activeSlave)>>
				| <<link "Growth Stimulants">><<set $activeSlave.drugs = "growth stimulants">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Growth Stimulants
			<</if>>
		<</if>>
		| <<link "Fertility">><<set $activeSlave.drugs = "fertility drugs">><<SlaveInteractDrugs>><</link>>
		<<if ($seeHyperPreg == 1) && ($activeSlave.indentureRestrictions < 1) && ($superFertilityDrugs == 1) && ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
			| <<link "Fertility+">><<set $activeSlave.drugs = "super fertility drugs">><<SlaveInteractDrugs>><</link>>
		<</if>>
		<<if ($activeSlave.dick > 0)>>
			<<if ($activeSlave.dick < 10)>>
				| <<link "Penis enhancement">><<set $activeSlave.drugs = "penis enhancement">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Penis enhancement
			<</if>>
		<<else>>
			<<if ($activeSlave.clit < 5)>>
				| <<link "Clitoris enhancement">><<set $activeSlave.drugs = "penis enhancement">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Clitoris enhancement
			<</if>>
		<</if>>
		<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
			<<if ($activeSlave.dick > 0)>>
				<<if ($activeSlave.dick < 31)>>
					| <<link "Hyper penis enhancement">><<set $activeSlave.drugs = "hyper penis enhancement">><<SlaveInteractDrugs>><</link>>
				<<else>>
					| Hyper penis enhancement
				<</if>>
			<<else>>
				<<if ($activeSlave.clit < 5)>>
					| <<link "Hyper clitoris enhancement">><<set $activeSlave.drugs = "penis enhancement">><<SlaveInteractDrugs>><</link>>
				<<else>>
					| Hyper clitoris enhancement
				<</if>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSSlimnessEnthusiastResearch == 1>>
			<<if ($activeSlave.dick > 1)>>
				| <<link "Penis reducers">><<set $activeSlave.drugs = "penis atrophiers">><<SlaveInteractDrugs>><</link>>
			<<elseif $activeSlave.dick == 1>>
				| Penis reducers
			<</if>>
		<</if>>
		<<if $activeSlave.dick > 0 && $activeSlave.dick < 11 && !canAchieveErection($activeSlave) && $activeSlave.chastityPenis != 1>>
			| <<link "Erectile dysfunction circumvention">><<set $activeSlave.drugs = "priapism agents">><<SlaveInteractDrugs>><</link>>
		<</if>>
		<<if ($activeSlave.balls > 0)>>
			| <<link "Testicle enhancement">><<set $activeSlave.drugs = "testicle enhancement">><<SlaveInteractDrugs>><</link>>
			<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
				| <<link "Hyper testicle enhancement">><<set $activeSlave.drugs = "hyper testicle enhancement">><<SlaveInteractDrugs>><</link>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSSlimnessEnthusiastResearch == 1>>
			<<if ($activeSlave.balls > 1)>>
				| <<link "Testicle reducers">><<set $activeSlave.drugs = "testicle atrophiers">><<SlaveInteractDrugs>><</link>>
			<<elseif $activeSlave.balls == 1>>
				| Testicle reducers
			<</if>>
			<<if ($activeSlave.clit > 0)>>
				| <<link "Clitoris reducers">><<set $activeSlave.drugs = "clitoris atrophiers">><<SlaveInteractDrugs>><</link>>
			<</if>>
			<<if ($activeSlave.labia > 0)>>
				| <<link "Labia reducers">><<set $activeSlave.drugs = "labia atrophiers">><<SlaveInteractDrugs>><</link>>
			<</if>>
		<</if>>
		<<if $arcologies[0].FSYouthPreferentialistResearch == 1>>
			<<if ($activeSlave.visualAge > 18)>>
				| <<link "Anti-aging cream">><<set $activeSlave.drugs = "anti-aging cream">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Anti-aging cream
			<</if>>
		<</if>>
		| <<link "Steroids">><<set $activeSlave.drugs = "steroids">><<SlaveInteractDrugs>><</link>>
		<<if $arcologies[0].FSSlimnessEnthusiastResearch == 1>>
			<<if ($activeSlave.weight > -95)>>
				| <<link "Weight loss pills">><<set $activeSlave.drugs = "appetite suppressors">><<SlaveInteractDrugs>><</link>>
			<<else>>
				| Weight loss pills
			<</if>>
		<</if>>
		<<if $precociousPuberty == 1 && $pubertyHormones == 1 && ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>>
			<<if ($activeSlave.ovaries == 1 || $activeSlave.mpreg == 1) && $activeSlave.pubertyXX == 0>>
				| <<link "Female hormone injections">><<set $activeSlave.drugs = "female hormone injections">><<SlaveInteractDrugs>><</link>>
			<</if>>
			<<if $activeSlave.balls > 0 && $activeSlave.pubertyXY == 0>>
				| <<link "Male hormone injections">><<set $activeSlave.drugs = "male hormone injections">><<SlaveInteractDrugs>><</link>>
			<</if>>
		<</if>>
		| <<link "Hormone enhancers">><<set $activeSlave.drugs = "hormone enhancers">><<SlaveInteractDrugs>><</link>>
		| <<link "Hormone blockers">><<set $activeSlave.drugs = "hormone blockers">><<SlaveInteractDrugs>><</link>>
		<<if $activeSlave.boobs > 250 && $activeSlave.boobShape != "saggy" && $purchasedSagBGone == 1>>
			| <<link "Sag-B-Gone breast lifting cream">><<set $activeSlave.drugs = "sag-B-gone">><<SlaveInteractDrugs>><</link>>
		<</if>>
	<</if>>
	<</replace>>
<</widget>>

/%
Call as <<SlaveInteractFertility>>
%/
<<widget "SlaveInteractFertility">>
<<replace #fertilityblock>>
<<if $activeSlave.ovaries == 1 || $activeSlave.mpreg == 1 || $activeSlave.preg > 0>>
	<<if ($activeSlave.preg < -1)>>
		//$He is sterile//
	<<elseif ($activeSlave.pubertyXX == 0) && $activeSlave.preg < 1>>
		//$He is not yet fertile//
	<<elseif $activeSlave.ovaryAge >= 47 && $activeSlave.preg < 1>>
		//$He is too old to become pregnant//
		<<if $activeSlave.preg == -1>>
			<<set $activeSlave.preg = 0>>
			<<run SetBellySize($activeSlave)>>
		<</if>>
	<<elseif $activeSlave.broodmotherOnHold == 1>>
		//$His pregnancy implant is turned off<<if $activeSlave.broodmotherCountDown > 0>>; $he is expected to be completely emptied of $his remaining brood in $activeSlave.broodmotherCountDown week<<if $activeSlave.broodmotherCountDown > 1>>s<</if>><<else>>.<</if>>//
		[[Turn on implant|Slave Interact][$activeSlave.broodmotherOnHold = 0, $activeSlave.broodmotherCountDown = 0]]
	<<elseif ($activeSlave.preg >= -1)>>
		Contraception: <<if $activeSlave.preg == -1>><<print "using contraceptives">><<elseif $activeSlave.pregWeek < 0>><<print "postpartum">><<elseif $activeSlave.preg == 0>><<print "fertile">><<elseif $activeSlave.preg < 4>><<print "may be pregnant">><<else>><<print $activeSlave.preg>><<print " weeks pregnant">><</if>>.
		<<if ($activeSlave.preg > 0 && $pregnancyMonitoringUpgrade == 1)>>
			[[Inspect pregnancy|Analyze Pregnancy]] |
		<</if>>
		<<if ($activeSlave.preg == 0)>>
			<<link "Use contraceptives">><<set $activeSlave.preg = -1>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<<elseif ($activeSlave.preg == -1)>>
			<<link "Let $him get pregnant">><<set $activeSlave.preg = 0>><<SlaveInteractImpreg>><<SlaveInteractFertility>><</link>>
		<<elseif $activeSlave.induce == 1>>
			//Hormones are being slipped into $his food; $he will give birth suddenly and rapidly this week//
		<<elseif ($activeSlave.preg > $activeSlave.pregData.normalBirth-2 && $activeSlave.preg > $activeSlave.pregData.minLiveBirth) && ($activeSlave.broodmother == 0) && ($activeSlave.labor == 0)>>
			[[Induce labor|Slave Interact][$activeSlave.labor = 1,$activeSlave.induce = 1,$birthee = 1]]
			| [["Give " + $him + " a cesarean section"|csec]]
		<<elseif ($activeSlave.broodmother > 0)>>
			<<if $activeSlave.broodmotherOnHold != 1>>
				[[Turn off implant|Slave Interact][$activeSlave.broodmotherOnHold = 1, $activeSlave.broodmotherCountDown = 38-WombMinPreg($activeSlave)]]
			<</if>>
			<<if ($activeSlave.broodmotherOnHold != 1) && ($activeSlave.preg >= 36)>>
				|
			<</if>>
			<<if ($activeSlave.preg > 37)>>
				| [[Induce mass childbirth|BirthStorm]]
			<</if>>
		<<elseif ($activeSlave.preg > $activeSlave.pregData.minLiveBirth)>>
			[["Give " + $him + " a cesarean section"|csec]]
		<<elseif ($activeSlave.preg > 0) && $activeSlave.breedingMark == 1 && $propOutcome == 1 && $arcologies[0].FSRestart != "unset" && $eugenicsFullControl != 1 && ($activeSlave.pregSource == -1 || $activeSlave.pregSource == -6)>>
			//You are forbidden from aborting an Elite child//
		<<elseif ($activeSlave.preg > 0)>>
			[["Abort " + $his + " pregnancy"|Abort]]
		<</if>>
	<</if>>
<</if>>
<<if ($activeSlave.pregKnown == 1) && ($pregSpeedControl == 1) && ($activeSlave.breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset") && ($activeSlave.indentureRestrictions < 1) && ($activeSlave.broodmother == 0) && $seePreg != 0>>

	__Pregnancy control__: <<if $activeSlave.pregControl == "labor suppressors">>Labor is suppressed<<elseif $activeSlave.pregControl == "slow gestation">>Slowed gestation speed<<elseif $activeSlave.pregControl == "speed up">>Faster gestation speed, staffed clinic recommended<<else>>Normal gestation and birth<</if>>.
	<<if ($activeSlave.preg >= $activeSlave.pregData.minLiveBirth)>>

		<<if $activeSlave.pregControl == "labor suppressors">>
			<<link "Normal Birth">><<set $activeSlave.pregControl = "none">><<SlaveInteractFertility>><</link>>
		<<else>>
			<<link "Suppress Labor">><<set $activeSlave.pregControl = "labor suppressors">><<SlaveInteractFertility>><</link>>
		<</if>>
	<<elseif ($activeSlave.preg < $activeSlave.pregData.normalBirth)>>

		<<if $activeSlave.pregControl != "none">>
			<<link "Normal Gestation">><<set $activeSlave.pregControl = "none">><<SlaveInteractFertility>><</link>> |
		<</if>>
		<<if $activeSlave.pregControl != "slow Gestation">>
			<<link "Slow Gestation">><<set $activeSlave.pregControl = "slow gestation">><<SlaveInteractFertility>><</link>> |
		<</if>>
		<<if $activeSlave.pregControl != "speed up">>
			<<link "Fast Gestation">><<set $activeSlave.pregControl = "speed up">><<SlaveInteractFertility>><</link>>
		<</if>>
	<</if>>
<</if>>
<</replace>>
<</widget>>
/%
Call as <<SlaveInteractSexOption>>
%/
<<widget "SlaveInteractSexOption">>
<<replace #sexoption>>
	<<if ($activeSlave.vagina > -1)>>
		<<if canDoVaginal($activeSlave)>>
			<<link "Fuck $him">><<replace "#miniscene">><<include "FVagina">>
<</replace>><<SlaveInteractFertility>><</link>>
			<<if canDoAnal($activeSlave)>>
				| <<link "Use $his holes">><<replace "#miniscene">><<include "FButt">>
    <</replace>><<SlaveInteractFertility>><</link>>
			<</if>>
			<<if ($activeSlave.bellyPreg >= 300000)>>
				| <<link "Fuck $him on $his belly">><<replace "#miniscene">><<include "FBellyFuck">>
    <</replace>><<SlaveInteractFertility>><</link>>
			<</if>>
			<<if $activeSlave.bellyPreg >= 300000 && $pregInventions >= 1>>
				| <<link "Fuck $him in $his maternity swing">><<replace "#miniscene">><<include "FMaternitySwing">>
    <</replace>><<SlaveInteractFertility>><</link>>
			<</if>>
			<<if $activeSlave.bellyPreg >= 300000 && $pregInventions >= 1>>
				| <<link "Fuck $him with the help of $his assistants">><<replace "#miniscene">><<include "FAssistedSex">>
    <</replace>><<SlaveInteractFertility>><</link>>
			<</if>>
			<<if $activeSlave.bellyPreg >= 300000 && $pregInventions >= 1>>
				| <<link "Fuck $him in your goo pool">><<replace "#miniscene">><<include "FPoolSex">>
    <</replace>><<SlaveInteractFertility>><</link>>
			<</if>>
		<<else>>
			//Remove $his chastity belt if you wish to fuck $him//
		<</if>>
	<</if>>
	<<if $activeSlave.bellyPreg >= 300000>>
		<<if canDoVaginal($activeSlave) || canDoAnal($activeSlave)>>
			| <<link "Fuck $him on $his belly">><<replace "#miniscene">><<include "FBellyFuck">>
    <</replace>><</link>>
			<<if $pregInventions >= 1>>
				| <<link "Fuck $him in $his maternity swing">><<replace "#miniscene">><<include "FMaternitySwing">>
    <</replace>><</link>>
				| <<link "Fuck $him with the help of $his assistants">><<replace "#miniscene">><<include "FAssistedSex">>
    <</replace>><</link>>
				| <<link "Fuck $him in your goo pool">><<replace "#miniscene">><<include "FPoolSex">>
    <</replace>><</link>>
			<</if>>
		<</if>>
	<</if>>
<</replace>>
<</widget>>
/%
Call as <<SlaveInteractAnalSexOption>>
%/
<<widget "SlaveInteractAnalSexOption">>
<<replace #analsexoption>>
	<<if canDoAnal($activeSlave)>>
		| <<link "Fuck $his ass">><<replace "#miniscene">><<include "FAnus">>
    <</replace>><</link>>
	<<else>>
		| //Remove $his chastity belt if you wish to fuck $his ass//
	<</if>>
<</replace>>
<</widget>>
/%
Call as <<SlaveInteractAnalGropeOption>>
%/
<<widget "SlaveInteractAnalGropeOption">>
<<replace #analgropeoption>>
	<<if canDoAnal($activeSlave)>>
		| <<link "Grope $his butt">><<replace "#miniscene">><<include "FondleButt">>
    <</replace>><</link>>
	<</if>>
<</replace>>
<</widget>>
/%
Call as <<SlaveInteractGropeOption>>
%/
<<widget "SlaveInteractGropeOption">>
<<replace #gropeoption>>
	<<if ($activeSlave.vagina > -1)>>
		<<if canDoVaginal($activeSlave)>>
			| <<link "Grope $his pussy">><<replace "#miniscene">><<include "FondleVagina">>
    <</replace>><</link>>
		<</if>>
	<</if>>
<</replace>>
<</widget>>
/%
Call as <<SlaveInteractDickGropeOption>>
%/
<<widget "SlaveInteractDickGropeOption">>
<<replace #dickgropeoption>>
	<<if ($activeSlave.dick > 0)>>
		<<if !($activeSlave.chastityPenis)>>
		| <<link "Grope $his dick">><<replace "#miniscene">><<include "FondleDick">>
    <</replace>><</link>>
			<<if canPenetrate($activeSlave) && $sexualOpeness == 1>>
				| <<link "Ride $his dick">><<replace "#miniscene">><<include "FDick">>
    <</replace>><</link>>
			<</if>>
		<<else>>
			| //Remove $his dick chastity belt if you wish to play with $his cock//
		<</if>>
	<</if>>
<</replace>>
<</widget>>

<<widget "Master">><<if def $args[0]>><<run Enunciate($args[0])>><<elseif ndef $titleEnunciate>><<run Enunciate($activeSlave)>><</if>>$titleEnunciate<</widget>>
<<widget "say">><<if (def $args[0]) && $sayEnunciate != "lisp">>$args[0]<<else>>$sayEnunciate<</if>><</widget>>
<<widget "s">>$sEnunciate<</widget>>
<<widget "S">>$SEnunciate<</widget>>
<<widget "ss">>$ssEnunciate<</widget>>
<<widget "c">>$cEnunciate<</widget>>
<<widget "C">>$CEnunciate<</widget>>
<<widget "cc">>$ccEnunciate<</widget>>
<<widget "z">>$zEnunciate<</widget>>
<<widget "Z">>$ZEnunciate<</widget>>
<<widget "zz">>$zzEnunciate<</widget>>
<<widget "ch">>$chEnunciate<</widget>>
<<widget "Ch">>$ChEnunciate<</widget>>
<<widget "ps">>$psEnunciate<</widget>>
<<widget "Ps">>$PsEnunciate<</widget>>
<<widget "sh">>$shEnunciate<</widget>>
<<widget "Sh">>$ShEnunciate<</widget>>
<<widget "sc">>$scEnunciate<</widget>>
<<widget "Sc">>$ScEnunciate<</widget>>
<<widget "sch">>$schEnunciate<</widget>>
<<widget "Sch">>$SchEnunciate<</widget>>
<<widget "x">>$xEnunciate<</widget>>
<<widget "X">>$XEnunciate<</widget>>

/*
	If $args[0] is defined, it is assumed the primary slave is speaking about secondary slave. Else, the secondary slave is speaking about primary slave.
	This means that <<he>> will print _heLisp or $he, and <<he 2>> will print _he2Lisp or _he2.
	Pronouns must be set for both slaves, and <<setSpokenLocalPronouns primarySlave secondarySlave>> must be previously called.
*/
<<widget "he">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_heLisp<<else>>$he<</if>><<else>><<if _primarySlaveLisp>>_he2Lisp<<else>>_he2<</if>><</if>><</widget>>
<<widget "his">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_hisLisp<<else>>$his<</if>><<else>><<if _primarySlaveLisp>>_his2Lisp<<else>>_his2<</if>><</if>><</widget>>
<<widget "hers">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_hersLisp<<else>>$hers<</if>><<else>><<if _primarySlaveLisp>>_hers2Lisp<<else>>_hers2<</if>><</if>><</widget>>
<<widget "himself">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_himselfLisp<<else>>$himself<</if>><<else>><<if _primarySlaveLisp>>_himself2Lisp<<else>>_himself2<</if>><</if>><</widget>>
<<widget "daughter">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_daughterLisp<<else>>$daughter<</if>><<else>><<if _primarySlaveLisp>>_daughter2Lisp<<else>>_daughter2<</if>><</if>><</widget>>
<<widget "sister">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_sisterLisp<<else>>$sister<</if>><<else>><<if _primarySlaveLisp>>_sister2Lisp<<else>>_sister2<</if>><</if>><</widget>>
<<widget "loli">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_loliLisp<<else>>$loli<</if>><<else>><<if _primarySlaveLisp>>_loli2Lisp<<else>>_loli2<</if>><</if>><</widget>>
<<widget "wife">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_wifeLisp<<else>>$wife<</if>><<else>><<if _primarySlaveLisp>>_wife2Lisp<<else>>_wife2<</if>><</if>><</widget>>
<<widget "wives">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_wivesLisp<<else>>$wives<</if>><<else>><<if _primarySlaveLisp>>_wives2Lisp<<else>>_wives2<</if>><</if>><</widget>>
<<widget "He">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_HeLisp<<else>>$He<</if>><<else>><<if _primarySlaveLisp>>_He2Lisp<<else>>_He2<</if>><</if>><</widget>>
<<widget "His">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_HisLisp<<else>>$His<</if>><<else>><<if _primarySlaveLisp>>_His2Lisp<<else>>_His2<</if>><</if>><</widget>>
<<widget "Hers">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_HersLisp<<else>>$Hers<</if>><<else>><<if _primarySlaveLisp>>_Hers2Lisp<<else>>_Hers2<</if>><</if>><</widget>>
<<widget "Himself">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_HimselfLisp<<else>>$Himself<</if>><<else>><<if _primarySlaveLisp>>_Himself2Lisp<<else>>_Himself2<</if>><</if>><</widget>>
<<widget "Daughter">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_DaughterLisp<<else>>$Daughter<</if>><<else>><<if _primarySlaveLisp>>_Daughter2Lisp<<else>>_Daughter2<</if>><</if>><</widget>>
<<widget "Sister">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_SisterLisp<<else>>$Sister<</if>><<else>><<if _primarySlaveLisp>>_Sister2Lisp<<else>>_Sister2<</if>><</if>><</widget>>
<<widget "Loli">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_LoliLisp<<else>>$Loli<</if>><<else>><<if _primarySlaveLisp>>_Loli2Lisp<<else>>_Loli2<</if>><</if>><</widget>>
<<widget "Wife">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_WifeLisp<<else>>$Wife<</if>><<else>><<if _primarySlaveLisp>>_Wife2Lisp<<else>>_Wife2<</if>><</if>><</widget>>
<<widget "Wives">><<if ndef $args[0]>><<if _secondarySlaveLisp>>_WivesLisp<<else>>$Wives<</if>><<else>><<if _primarySlaveLisp>>_Wives2Lisp<<else>>_Wives2<</if>><</if>><</widget>>

<<widget "heP">><<if _playerSlaveLisp>>_hePLisp<<else>>_heP<</if>><</widget>>
<<widget "hisP">><<if _playerSlaveLisp>>_hisPLisp<<else>>_hisP<</if>><</widget>>
<<widget "hersP">><<if _playerSlaveLisp>>_hersPLisp<<else>>_hersP<</if>><</widget>>
<<widget "himselfP">><<if _playerSlaveLisp>>_himselfPLisp<<else>>_himselfP<</if>><</widget>>
<<widget "daughterP">><<if _playerSlaveLisp>>_daughterPLisp<<else>>_daughterP<</if>><</widget>>
<<widget "sisterP">><<if _playerSlaveLisp>>_sisterPLisp<<else>>_sisterP<</if>><</widget>>
<<widget "loliP">><<if _playerSlaveLisp>>_loliPLisp<<else>>_loliP<</if>><</widget>>
<<widget "wifeP">><<if _playerSlaveLisp>>_wifePLisp<<else>>_wifeP<</if>><</widget>>
<<widget "wivesP">><<if _playerSlaveLisp>>_wivesPLisp<<else>>_wivesP<</if>><</widget>>
<<widget "HeP">><<if _playerSlaveLisp>>_HePLisp<<else>>_HeP<</if>><</widget>>
<<widget "HisP">><<if _playerSlaveLisp>>_HisPLisp<<else>>_HisP<</if>><</widget>>
<<widget "HersP">><<if _playerSlaveLisp>>_HersPLisp<<else>>_HersP<</if>><</widget>>
<<widget "HimselfP">><<if _playerSlaveLisp>>_HimselfPLisp<<else>>_HimselfP<</if>><</widget>>
<<widget "DaughterP">><<if _playerSlaveLisp>>_DaughterPLisp<<else>>_DaughterP<</if>><</widget>>
<<widget "SisterP">><<if _playerSlaveLisp>>_SisterPLisp<<else>>_SisterP<</if>><</widget>>
<<widget "LoliP">><<if _playerSlaveLisp>>_LoliPLisp<<else>>_LoliP<</if>><</widget>>
<<widget "WifeP">><<if _playerSlaveLisp>>_WifePLisp<<else>>_WifeP<</if>><</widget>>
<<widget "WivesP">><<if _playerSlaveLisp>>_WivesPLisp<<else>>_WivesP<</if>><</widget>>

<<widget "heA">><<if _assistantSlaveLisp>>_heALisp<<else>>_heA<</if>><</widget>>
<<widget "hisA">><<if _assistantSlaveLisp>>_hisALisp<<else>>_hisA<</if>><</widget>>
<<widget "hersA">><<if _assistantSlaveLisp>>_hersALisp<<else>>_hersA<</if>><</widget>>
<<widget "himselfA">><<if _assistantSlaveLisp>>_himselfALisp<<else>>_himselfA<</if>><</widget>>
<<widget "daughterA">><<if _assistantSlaveLisp>>_daughterALisp<<else>>_daughterA<</if>><</widget>>
<<widget "sisterA">><<if _assistantSlaveLisp>>_sisterALisp<<else>>_sisterA<</if>><</widget>>
<<widget "loliA">><<if _assistantSlaveLisp>>_loliALisp<<else>>_loliA<</if>><</widget>>
<<widget "wifeA">><<if _assistantSlaveLisp>>_wifeALisp<<else>>_wifeA<</if>><</widget>>
<<widget "wivesA">><<if _assistantSlaveLisp>>_wivesALisp<<else>>_wivesA<</if>><</widget>>
<<widget "HeA">><<if _assistantSlaveLisp>>_HeALisp<<else>>_HeA<</if>><</widget>>
<<widget "HisA">><<if _assistantSlaveLisp>>_HisALisp<<else>>_HisA<</if>><</widget>>
<<widget "HersA">><<if _assistantSlaveLisp>>_HersALisp<<else>>_HersA<</if>><</widget>>
<<widget "HimselfA">><<if _assistantSlaveLisp>>_HimselfALisp<<else>>_HimselfA<</if>><</widget>>
<<widget "DaughterA">><<if _assistantSlaveLisp>>_DaughterALisp<<else>>_DaughterA<</if>><</widget>>
<<widget "SisterA">><<if _assistantSlaveLisp>>_SisterALisp<<else>>_SisterA<</if>><</widget>>
<<widget "LoliA">><<if _assistantSlaveLisp>>_LoliALisp<<else>>_LoliA<</if>><</widget>>
<<widget "WifeA">><<if _assistantSlaveLisp>>_WifeALisp<<else>>_WifeA<</if>><</widget>>
<<widget "WivesA">><<if _assistantSlaveLisp>>_WivesALisp<<else>>_WivesA<</if>><</widget>>

/%
Call as <<EventFetish>>
$args[0]: Slave.
$args[1]: Fetish.
%/
<<widget "EventFetish">>

<<if $args[0].fetish == $args[1]>>
	This experience
	<<if $args[0].fetishKnown == 1>>
		<<if $args[0].fetishStrength <= 95>>
			@@.lightsalmon;<<switch $args[0].fetish>>
			<<case "submissive">>deepens $his sexual need to submit.
			<<case "cumslut">>increases $his appetite for oral sex.
			<<case "humiliation">>makes $him even more eager to be humiliated.
			<<case "buttslut">>encourages $him to focus on anal sex.
			<<case "boobs">>focuses $his sexuality on $his breasts and nipples.
			<<case "sadist">>titillates the sadistic part of $him.
			<<case "masochist">>helps conflate pain and sexual pleasure for $him.
			<<case "dom">>strengthens $his desire to top other slaves.
			<<case "pregnancy">>further confuses lust and pregnancy in $his mind.
			<<default>>ERROR: bad fetish
			<</switch>>@@
			<<set $args[0].fetishStrength += 10>>
		<<else>>
			is @@.hotpink;especially enjoyable for $him,@@ since
			<<switch $args[0].fetish>>
			<<case "submissive">>$he's an utterly submissive little slut.
			<<case "cumslut">>$his <<if $args[0].vagina > -1>>clit<<else>>frenulum<</if>> might as well be located in $his throat.
			<<case "humiliation">>$he has a hopeless need to be humiliated and degraded.
			<<case "buttslut">>$he's completely in love with having $his ass fucked.
			<<case "boobs">>$he loves breast play more than any other kind of sex.
			<<case "sadist">>nothing is as titillating to $him as another slave's pain can be.
			<<case "masochist">>$he loves pain more than $he likes pleasure.
			<<case "dom">>$he lives for the times $he's allowed to fuck someone.
			<<case "pregnancy">>all $his deepest sexual desires involve <<if $args[0].vagina > -1 || $args[0].mpreg == 1>>pregnancy<<else>>impregnation<</if>>.
			<<default>>ERROR: bad fetish
			<</switch>>
			<<set $args[0].devotion += 3>>
		<</if>>
	<<else>>
		was surprisingly appealing for $him, revealing that $he's a
		@@.lightsalmon;<<switch $args[0].fetish>>
		<<case "submissive">>sexual submissive!
		<<case "humiliation">>humiliation slut!
		<<case "boobs">>slut for breast play!
		<<case "pregnancy">>pregslut!
		<<default>>$args[0]!
		<</switch>>@@
		<<set $args[0].fetishKnown = 1>>
	<</if>>
<</if>>

<</widget>>

/%
Call as <<SlaveSort [$slaves]>>
$args[0]: array to sort
%/
<<widget "SlaveSort">>
	<<run SlaveSort.slaves($args[0])>>
<</widget>>

/%
 Call as <<SlaveIDSort [slaveIDs]>>
 $args[0]: array to sort
%/
<<widget "SlaveIDSort">>
	<<run SlaveSort.IDs($args[0])>>
<</widget>>

/%
 Call as <<SlaveIndexSort [slaveIndxs]>>
 $args[0]: array to sort
%/
<<widget "SlaveIndexSort">>
	<<run SlaveSort.indices($args[0])>>
<</widget>>

/* Called as <<FSChangeDecoration "FSName" "clothesBoughtFSClothes">>, will generate description of current decoration level and a link to increase it if applicable, quotes are needed to pass FSName as reference - DO NOT INCLUDE IT AS PROPERTY OF $arcologies[0]! */
<<widget "FSChangeDecoration">>
<<set _FS = $args[0]>>
<<set _FSDecoration = _FS + "Decoration">>
<<capture _FS, _FSDecoration>>
<<switch $arcologies[0][_FSDecoration]>>
<<case 20>>
	$arcologies[0].name is not customized to support this goal.
	<<if $arcologies[0][_FS] >= 10>>
		[[Modify your arcology's internal media to support this goal|Future Society][$arcologies[0][_FSDecoration] = 40, cashX(-2500, "capEx")]] //Costs <<print cashFormat(2500)>>//
	<<else>>
		You must advance this goal before customization to support it becomes available.
	<</if>>
<<case 40>>
	$arcologies[0].name's media is supporting this goal.
	<<if $arcologies[0][_FS] >= 30>>
		[[Redecorate your arcology's public spaces to support this goal|Future Society][$arcologies[0][_FSDecoration] = 60, cashX(-10000, "capEx")]] //Costs <<print cashFormat(10000)>>//
	<<else>>
		You must advance this goal before further customization to support it becomes available.
	<</if>>
<<case 60>>
	$arcologies[0].name's media is supporting this goal, and $arcologies[0].name's public spaces are decorated to support it too.
	<<if $arcologies[0][_FS] >= 50>>
		[[Station slaves in your arcology's public spaces to promote this goal|Future Society][$arcologies[0][_FSDecoration] = 80, cashX(-10000, "capEx")]] //Costs <<print cashFormat(10000)>>//
	<<else>>
		You must advance this goal before further customization to support it becomes available.
	<</if>>
<<case 80>>
	$arcologies[0].name's media is supporting this goal; $arcologies[0].name's public spaces are decorated to support it, and have slaves stationed in them to support it too.
	<<if $arcologies[0][_FS] >= 70>>
		<<if def $args[3]>> /* Only for FSRepopulation */
			[[Customize the exterior of the arcology to support this goal|Future Society][$arcologies[0][_FSDecoration] = 100, State.variables[$args[1]] = 1, State.variables[$args[2]] = 1, State.variables[$args[3]] = 1, cashX(-20000, "capEx")]] //Costs <<print cashFormat(20000)>>//
		<<elseif def $args[1]>>
			[[Customize the exterior of the arcology to support this goal|Future Society][$arcologies[0][_FSDecoration] = 100, State.variables[$args[1]] = 1, cashX(-20000, "capEx")]] //Costs <<print cashFormat(20000)>>//
		<<elseif $args[0] == "FSRestart">>
			[[Customize the exterior of the arcology to support this goal and fully establish the Societal Elite|Future Society][$arcologies[0].FSRestartDecoration = 100, $upgradeMultiplierArcology = upgradeMultiplierArcology(), $upgradeMultiplierMedicine = upgradeMultiplierMedicine(), cashX(-75000, "capEx")]] //Costs <<print cashFormat(75000)>> and may dilute your control over the arcology//
		<<else>>
			[[Customize the exterior of the arcology to support this goal|Future Society][$arcologies[0][_FSDecoration] = 100, cashX(-20000, "capEx")]] //Costs <<print cashFormat(20000)>>//
		<</if>>
	<<else>>
		You must advance this goal before further customization to support it becomes available.
	<</if>>
<<case 100>>
	$arcologies[0].name's media is supporting this goal; $arcologies[0].name's public spaces are decorated to support it, and have slaves stationed in them to support it. The exterior of the arcology has been remodeled to support it as well; the arcology is fully customized for this goal.
<</switch>>
<</capture>>
<</widget>>

/* Called as <<SetFacilityDecoration "facilityDecoration">>, will generate a clickable list of potential decorations, quotes are needed to pass facilityDecoration as reference - DO NOT INCLUDE $ PREFIX! */
<<widget "SetFacilityDecoration">>
<<if ($arcologies[0].FSSupremacist >= 20) && (State.variables[$args[0]] != "Supremacist")>>

[[Supremacist redecoration|Future Society][State.variables[$args[0]] = "Supremacist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSSubjugationist >= 20) && (State.variables[$args[0]] != "Subjugationist")>>

[[Subjugationist redecoration|Future Society][State.variables[$args[0]] = "Subjugationist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSRepopulationFocus >= 20) && (State.variables[$args[0]] != "Repopulation Focus")>>

[[Repopulation Focus redecoration|Future Society][State.variables[$args[0]] = "Repopulation Focus", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSRestart >= 20) && (State.variables[$args[0]] != "Eugenics")>>

[[Eugenics redecoration|Future Society][State.variables[$args[0]] = "Eugenics", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSGenderRadicalist >= 20) && (State.variables[$args[0]] != "Gender Radicalist")>>

[[Gender Radicalist redecoration|Future Society][State.variables[$args[0]] = "Gender Radicalist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSGenderFundamentalist >= 20) && (State.variables[$args[0]] != "Gender Fundamentalist")>>

[[Gender Fundamentalist redecoration|Future Society][State.variables[$args[0]] = "Gender Fundamentalist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSPaternalist >= 20) && (State.variables[$args[0]] != "Paternalist")>>

[[Paternalist redecoration|Future Society][State.variables[$args[0]] = "Paternalist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSIntellectualDependency >= 20) && (State.variables[$args[0]] != "Intellectual Dependency")>>

[[Intellectual Dependency redecoration|Future Society][State.variables[$args[0]] = "Intellectual Dependency", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSSlaveProfessionalism >= 20) && (State.variables[$args[0]] != "Slave Professionalism")>>

[[Slave Professionalism redecoration|Future Society][State.variables[$args[0]] = "Slave Professionalism", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSBodyPurist >= 20) && (State.variables[$args[0]] != "Body Purist")>>

[[Body Purist redecoration|Future Society][State.variables[$args[0]] = "Body Purist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSTransformationFetishist >= 20) && (State.variables[$args[0]] != "Transformation Fetishist")>>

[[Transformation Fetishist redecoration|Future Society][State.variables[$args[0]] = "Transformation Fetishist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSYouthPreferentialist >= 20) && (State.variables[$args[0]] != "Youth Preferentialist")>>

[[Youth Preferentialist redecoration|Future Society][State.variables[$args[0]] = "Youth Preferentialist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSMaturityPreferentialist >= 20) && (State.variables[$args[0]] != "Maturity Preferentialist")>>

[[Maturity Preferentialist redecoration|Future Society][State.variables[$args[0]] = "Maturity Preferentialist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSPetiteAdmiration >= 20) && (State.variables[$args[0]] != "Petite Admiration")>>

[[Petite Admiration redecoration|Future Society][State.variables[$args[0]] = "Petite Admiration", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSStatuesqueGlorification >= 20) && (State.variables[$args[0]] != "Statuesque Glorification")>>

[[Statuesque Glorification redecoration|Future Society][State.variables[$args[0]] = "Statuesque Glorification", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSSlimnessEnthusiast >= 20) && (State.variables[$args[0]] != "Slimness Enthusiast")>>

[[Slimness Enthusiast redecoration|Future Society][State.variables[$args[0]] = "Slimness Enthusiast", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSAssetExpansionist >= 20) && (State.variables[$args[0]] != "Asset Expansionist")>>

[[Asset Expansionist redecoration|Future Society][State.variables[$args[0]] = "Asset Expansionist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSPastoralist >= 20) && (State.variables[$args[0]] != "Pastoralist")>>

[[Pastoralist redecoration|Future Society][State.variables[$args[0]] = "Pastoralist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSPhysicalIdealist >= 20) && (State.variables[$args[0]] != "Physical Idealist")>>

[[Physical Idealist redecoration|Future Society][State.variables[$args[0]] = "Physical Idealist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSHedonisticDecadence >= 20) && (State.variables[$args[0]] != "Hedonistic")>>

[[Hedonistic redecoration|Future Society][State.variables[$args[0]] = "Hedonistic", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSChattelReligionist >= 20) && (State.variables[$args[0]] != "Chattel Religionist")>>

[[Chattel Religionist redecoration|Future Society][State.variables[$args[0]] = "Chattel Religionist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSDegradationist >= 20) && (State.variables[$args[0]] != "Degradationist")>>

[[Degradationist redecoration|Future Society][State.variables[$args[0]] = "Degradationist", cashX(-5000, "capEx")]]

<</if>>
<<if ($arcologies[0].FSRomanRevivalist >= 20) && (State.variables[$args[0]] != "Roman Revivalist")>>

[[Roman Revivalist redecoration|Future Society][State.variables[$args[0]] = "Roman Revivalist", cashX(-5000, "capEx")]]

<<elseif ($arcologies[0].FSAztecRevivalist >= 20) && (State.variables[$args[0]] != "Aztec Revivalist")>>

[[Aztec Revivalist redecoration|Future Society][State.variables[$args[0]] = "Aztec Revivalist", cashX(-5000, "capEx")]]

<<elseif ($arcologies[0].FSEgyptianRevivalist >= 20) && (State.variables[$args[0]] != "Egyptian Revivalist")>>

[[Egyptian Revivalist redecoration|Future Society][State.variables[$args[0]] = "Egyptian Revivalist", cashX(-5000, "capEx")]]

<<elseif ($arcologies[0].FSEdoRevivalist >= 20) && (State.variables[$args[0]] != "Edo Revivalist")>>

[[Edo Revivalist redecoration|Future Society][State.variables[$args[0]] = "Edo Revivalist", cashX(-5000, "capEx")]]

<<elseif ($arcologies[0].FSArabianRevivalist >= 20) && (State.variables[$args[0]] != "Arabian Revivalist")>>

[[Arabian Revivalist redecoration|Future Society][State.variables[$args[0]] = "Arabian Revivalist", cashX(-5000, "capEx")]]

<<elseif ($arcologies[0].FSChineseRevivalist >= 20) && (State.variables[$args[0]] != "Chinese Revivalist")>>

[[Chinese Revivalist redecoration|Future Society][State.variables[$args[0]] = "Chinese Revivalist", cashX(-5000, "capEx")]]

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

/*
OBSOLETE: Use setPregType()instead!
Call as <<SetPregType>>
$args[0]: Slave.
*/
<<widget "SetPregType">> /* IMHO rework is possible. Can be more interesting to play, if this code will take in account more body conditions - age, fat, food, hormone levels, etc. */
	<<if $args[0].broodmother < 1>> /* Broodmothers should be not processed here. Necessary now.*/
		<<if (def $args[0].readyOva) && $args[0].readyOva > 0 >>
			<<set $args[0].pregType = $args[0].readyOva, $args[0].readyOva = 0>> /* just single override; for delayed impregnation cases */
		<</if>>
		<<if $args[0].ID == -1>>
			<<if $PC.counter.birthMaster > 0>> /* Predisposed to twins */
				<<if $PC.fertDrugs == 1>>
					<<set $args[0].pregType = either(2, 2, 3, 3, 3, 3, 4, 4)>>
				<<else>>
					<<set $args[0].pregType = either(1, 1, 1, 2, 2, 2, 2, 2, 2, 3)>>
				<</if>>
				<<if $PC.forcedFertDrugs > 0>>
					<<set $args[0].pregType += either(1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4)>>
				<</if>>
			<<else>>
				<<if $PC.fertDrugs == 1>>
					<<set $args[0].pregType = either(1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4)>>
				<<else>>
					<<set $args[0].pregType = either(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2)>>
				<</if>>
				<<if $PC.forcedFertDrugs > 0>>
					<<set $args[0].pregType += either(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4)>>
				<</if>>
			<</if>>
		<<else>>
			<<if $args[0].pregType == 0>>
				<<if ($args[0].drugs == "super fertility drugs")>>
					<<if (($masterSuitePregnancyFertilitySupplements == 1) && (($args[0].assignment == "serve in the master suite") || ($args[0].assignment == "be your Concubine")))>>
						<<if ($args[0].hormones == 2)>>
							<<set $args[0].pregType = random(20,29)>>
						<<else>>
							<<set $args[0].pregType = random(10,29)>>
						<</if>>
					<<else>>
						<<if ($args[0].hormones == 2)>>
							<<set $args[0].pregType = random(10,29)>>
						<<else>>
							<<set $args[0].pregType = either(3, 4, 4, 4, 5, 5, 6, 10, 11, 20)>>
						<</if>>
					<</if>>
				<<elseif ($args[0].drugs == "fertility drugs")>>
					<<if (($masterSuitePregnancyFertilitySupplements == 1) && (($args[0].assignment == "serve in the master suite") || ($args[0].assignment == "be your Concubine")))>>
						<<if ($args[0].hormones == 2)>>
							<<set $args[0].pregType = random(4,5)>>
						<<else>>
							<<set $args[0].pregType = either(2, 2, 3, 3, 3, 3, 4, 4, 5, 5)>>
						<</if>>
					<<else>>
						<<if ($args[0].hormones == 2)>>
							<<set $args[0].pregType = random(2,5)>>
						<<else>>
							<<set $args[0].pregType = either(1, 1, 2, 2, 3, 3, 4, 4, 5, 5)>>
						<</if>>
					<</if>>
				<<else>>
					<<set $args[0].pregType = either(1, 1, 1, 1, 1, 1, 1, 1, 1, 2)>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</widget>>

/* see how they are on a single line? This permits "."s and other things to be appended directly onto the widget result */

/*
 Call as <<EventNameLink>>
*/
<<widget "EventNameLink">><<print "[[SlaveFullName($activeSlave)|Long Slave Description][$nextLink = passage(), $eventDescription = 1]]">><</widget>>

/*
 Call as <<EventNameDelink>>
*/
<<widget "EventNameDelink">><<replace "#name">><<= SlaveFullName($activeSlave)>><</replace>><</widget>>


code:
:: PT widgets [widget nobr]

<<widget "InduceFlawAbuseEffects">>
	<<if $activeSlave.devotion > 20>>
		$He's @@.mediumorchid;desperately confused@@ by this treatment, since the effect would be ruined if you explained it to $him, and $his @@.gold;trust in you is reduced.@@
	<<elseif $activeSlave.devotion >= -20>>
		$He's @@.mediumorchid;confused, depressed@@ and @@.gold;frightened@@ by this treatment, since the effect would be ruined if you explained it to $him.
	<<else>>
		$He's @@.mediumorchid;angry@@ and @@.gold;afraid@@ that you would treat $him like this.
	<</if>>
	<<if $activeSlave.energy > 10>>
		$His @@.red;appetite for sex is also reduced.@@
		<<set $activeSlave.energy -= 2>>
	<</if>>
	<<set $activeSlave.devotion -= 5>>
	<<set $activeSlave.trust -= 5>>
<</widget>>

<<widget "InduceFlawLenityEffects">>
	<<if $activeSlave.devotion <= 20>>
		$He doesn't understand what you intend by this strange treatment, but it does make $him @@.mediumaquamarine;inappropriately trusting.@@
		<<set $activeSlave.trust += 5>>
	<</if>>
<</widget>>

<<widget "BasicTrainingDefaulter">>
	<br>
	<<set _pti = $personalAttention.findIndex(function(s) { return s.ID == $activeSlave.ID; })>>
	<<if ($activeSlave.devotion > 20) && ($activeSlave.behavioralFlaw != "none") && ($activeSlave.behavioralQuirk == "none")>>
		Since $he's obedient, @@.yellow;$his training assignment has defaulted to softening $his behavioral flaw.@@
		<<set $personalAttention[_pti].trainingRegimen = "soften her behavioral flaw">>
	<<elseif ($activeSlave.devotion > 20) && ($activeSlave.sexualQuirk == "none") && !["abusive", "anal addict", "attention whore", "breast growth", "breeder", "cum addict", "malicious", "neglectful", "none", "self hating"].includes($activeSlave.sexualFlaw)>>
		Since $he's obedient, @@.yellow;$his training assignment has defaulted to softening $his sexual flaw.@@
		<<set $personalAttention[_pti].trainingRegimen = "soften her sexual flaw">>
	<<elseif ($activeSlave.devotion > 20) && ($activeSlave.behavioralFlaw != "none") && ($activeSlave.behavioralQuirk != "none")>>
		Since $he's obedient and already has a behavioral quirk, @@.yellow;$his training assignment has defaulted to removing $his behavioral flaw.@@
		<<set $personalAttention[_pti].trainingRegimen = "fix her behavioral flaw">>
	<<elseif ($activeSlave.devotion > 20) && !["abusive", "anal addict", "attention whore", "breast growth", "breeder", "cum addict", "malicious", "neglectful", "none", "self hating"].includes($activeSlave.sexualFlaw)>>
		Since $he's obedient and already has a sexual quirk, @@.yellow;$his training assignment has defaulted to removing $his sexual flaw.@@
		<<set $personalAttention[_pti].trainingRegimen = "fix her sexual flaw">>
	<<elseif ($activeSlave.devotion <= 20) && ($activeSlave.trust >= -20)>>
		@@.yellow;$His training assignment has defaulted to breaking $his will.@@
		<<set $personalAttention[_pti].trainingRegimen = "break her will">>
	<<else>>
		$He is now fully broken; @@.yellow;$his training assignment has defaulted to fostering devotion.@@
		<<set $personalAttention[_pti].trainingRegimen = "build her devotion">>
	<</if>>
	<<set $activeSlave.training = 0, $slaves[$slaveIndices[$activeSlave.ID]].training = 0>>
<</widget>>

license: mit