code:
:: bodyswap widgets [nobr widget]

/* It's too fucking big jesus christ */

/* first arg is slave getting swapped, second is body she is being swapped to. The second body's physical traits overwrite the originals */
<<widget "BodySwap">>

<<set WombInit($args[1])>> /*Just to be sure.*/
<<set $args[0].genes = $args[1].genes>>
<<set $args[0].physicalAge = $args[1].physicalAge>>
<<set $args[0].visualAge = $args[1].visualAge>>
<<set $args[0].ageImplant = $args[1].ageImplant>>
<<set $args[0].health.condition = $args[1].health.condition>>
<<set $args[0].health.shortDamage = $args[1].health.shortDamage>>
<<set $args[0].health.longDamage = $args[1].health.longDamage>>
<<set $args[0].health.illness = $args[1].health.illness>>
<<set $args[0].health.tired = $args[1].health.tired>>
<<set $args[0].health.health = $args[1].health.health>>
<<set $args[0].weight = $args[1].weight>>
<<set $args[0].muscles = $args[1].muscles>>
<<set $args[0].height = $args[1].height>>
<<set $args[0].heightImplant = $args[1].heightImplant>>
<<set $args[0].race = $args[1].race>>
<<set $args[0].origRace = $args[1].origRace>>
<<set $args[0].pubicHColor = $args[1].pubicHColor>>
<<set $args[0].skin = $args[1].skin>>
<<set $args[0].origSkin = $args[1].origSkin>>
<<set $args[0].markings = $args[1].markings>>
<<set $args[0].eye = $args[1].eye>>
<<set $args[0].hears = $args[1].hears>>
<<set $args[0].earImplant = $args[1].earImplant>>
<<set $args[0].earShape = $args[1].earShape>>
<<set $args[0].earT = $args[1].earT>>
<<set $args[0].earTColor = $args[1].earTColor>>
<<set $args[0].smells = $args[1].smells>>
<<set $args[0].tastes = $args[1].tastes>>
<<set $args[0].horn = $args[1].horn>>
<<set $args[0].hornColor = $args[1].hornColor>>
<<set $args[0].PTail = $args[1].PTail>>
<<set $args[0].tail = $args[1].tail>>
<<set $args[0].tailShape = $args[1].tailShape>>
<<set $args[0].tailColor = $args[1].tailColor>>
<<set $args[0].origHColor = $args[1].origHColor>>
<<set $args[0].hColor = $args[1].hColor>>
<<set $args[0].hLength = $args[1].hLength>>
<<set $args[0].hStyle = $args[1].hStyle>>
<<set $args[0].pubicHStyle = $args[1].pubicHStyle>>
<<set $args[0].waist = $args[1].waist>>
<<set $args[0].corsetPiercing = $args[1].corsetPiercing>>
<<set $args[0].arm = $args[1].arm>>
<<set $args[0].leg = $args[1].leg>>
<<set $args[0].PLimb = $args[1].PLimb>>
<<set $args[0].readyProsthetics = $args[1].readyProsthetics>>
<<set $args[0].heels = $args[1].heels>>
<<set $args[0].voice = $args[1].voice>>
<<set $args[0].voiceImplant = $args[1].voiceImplant>>
<<set $args[0].shoulders = $args[1].shoulders>>
<<set $args[0].shouldersImplant = $args[1].shouldersImplant>>
<<set $args[0].boobs = $args[1].boobs>>
<<set $args[0].boobsImplant = $args[1].boobsImplant>>
<<set $args[0].boobsImplantType = $args[1].boobsImplantType>>
<<set $args[0].boobShape = $args[1].boobShape>>
<<set $args[0].nipples = $args[1].nipples>>
<<set $args[0].nipplesPiercing = $args[1].nipplesPiercing>>
<<set $args[0].nipplesAccessory = $args[1].nipplesAccessory>>
<<set $args[0].areolae = $args[1].areolae>>
<<set $args[0].areolaePiercing = $args[1].areolaePiercing>>
<<set $args[0].areolaeShape = $args[1].areolaeShape>>
<<set $args[0].boobsTat = $args[1].boobsTat>>
<<set $args[0].lactation = $args[1].lactation>>
<<set $args[0].lactationDuration = $args[1].lactationDuration>>
<<set $args[0].induceLactation = $args[1].induceLactation>>
<<set $args[0].boobsMilk = $args[1].boobsMilk>>
<<set $args[0].lactationAdaptation = $args[1].lactationAdaptation>>
<<set $args[0].hips = $args[1].hips>>
<<set $args[0].hipsImplant = $args[1].hipsImplant>>
<<set $args[0].butt = $args[1].butt>>
<<set $args[0].buttImplant = $args[1].buttImplant>>
<<set $args[0].buttImplantType = $args[1].buttImplantType>>
<<set $args[0].buttTat = $args[1].buttTat>>
<<set $args[0].face = $args[1].face>>
<<set $args[0].faceImplant = $args[1].faceImplant>>
<<set $args[0].faceShape = $args[1].faceShape>>
<<set $args[0].lips = $args[1].lips>>
<<set $args[0].lipsImplant = $args[1].lipsImplant>>
<<set $args[0].lipsPiercing = $args[1].lipsPiercing>>
<<set $args[0].lipsTat = $args[1].lipsTat>>
<<set $args[0].teeth = $args[1].teeth>>
<<set $args[0].tonguePiercing = $args[1].tonguePiercing>>
<<set $args[0].vagina = $args[1].vagina>>
<<set $args[0].vaginaLube = $args[1].vaginaLube>>
<<set $args[0].vaginaPiercing = $args[1].vaginaPiercing>>
<<set $args[0].vaginaTat = $args[1].vaginaTat>>
<<set $args[0].fertKnown = $args[1].fertKnown>>
<<set $args[0].fertPeak = $args[1].fertPeak>>
<<set $args[0].broodmother = $args[1].broodmother>>
<<set $args[0].broodmotherFetuses = $args[1].broodmotherFetuses>>
<<set $args[0].broodmotherOnHold = $args[1].broodmotherOnHold>>
<<set $args[0].broodmotherCountDown = $args[1].broodmotherCountDown>>
<<set $args[0].labia = $args[1].labia>>
<<set $args[0].clit = $args[1].clit>>
<<set $args[0].clitPiercing = $args[1].clitPiercing>>
<<set $args[0].dick = $args[1].dick>>
<<set $args[0].foreskin = $args[1].foreskin>>
<<set $args[0].anus = $args[1].anus>>
<<set $args[0].analArea = $args[1].analArea>>
<<set $args[0].dickPiercing = $args[1].dickPiercing>>
<<set $args[0].dickTat = $args[1].dickTat>>
<<set $args[0].prostate = $args[1].prostate>>
<<set $args[0].balls = $args[1].balls>>
<<set $args[0].scrotum = $args[1].scrotum>>
<<set $args[0].ovaries = $args[1].ovaries>>
<<set $args[0].anusPiercing = $args[1].anusPiercing>>
<<set $args[0].anusTat = $args[1].anusTat>>
<<set $args[0].brand = $args[1].brand>>
<<set $args[0].nosePiercing = $args[1].nosePiercing>>
<<set $args[0].eyebrowPiercing = $args[1].eyebrowPiercing>>
<<set $args[0].navelPiercing = $args[1].navelPiercing>>
<<set $args[0].shouldersTat = $args[1].shouldersTat>>
<<set $args[0].armsTat = $args[1].armsTat>>
<<set $args[0].legsTat = $args[1].legsTat>>
<<set $args[0].backTat = $args[1].backTat>>
<<set $args[0].stampTat = $args[1].stampTat>>
<<set $args[0].hormones = $args[1].hormones>>
<<set $args[0].chem = $args[1].chem>>
<<set $args[0].vaginalAttachment = $args[1].vaginalAttachment>>
<<set $args[0].chastityVagina = $args[1].chastityVagina>>
<<set $args[0].chastityPenis = $args[1].chastityPenis>>
<<set $args[0].chastityAnus = $args[1].chastityAnus>>
<<if (def $args[0].custom) && (def $args[1].custom)>>
	<<set $args[0].custom.tattoo = $args[1].custom.tattoo>>
<</if>>
<<set $args[0].bellyTat = $args[1].bellyTat>>
<<set $args[0].abortionTat = $args[1].abortionTat>>
<<set $args[0].birthsTat = $args[1].birthsTat>>
<<set $args[0].pubertyAgeXX = $args[1].pubertyAgeXX>>
<<set $args[0].pubertyXX = $args[1].pubertyXX>>
<<set $args[0].pubertyAgeXY = $args[1].pubertyAgeXY>>
<<set $args[0].pubertyXY = $args[1].pubertyXY>>
<<set $args[0].breedingMark = $args[1].breedingMark>>
<<set $args[0].underArmHColor = $args[1].underArmHColor>>
<<set $args[0].underArmHStyle = $args[1].underArmHStyle>>
<<set $args[0].ballType = $args[1].ballType>>
<<set $args[0].eggType = $args[1].eggType>>
<<set $args[0].bald = $args[1].bald>>
<<set $args[0].hormoneBalance = $args[1].hormoneBalance>>
<<set $args[0].breastMesh = $args[1].breastMesh>>
<<set $args[0].vasectomy = $args[1].vasectomy>>
<<set $args[0].haircuts = $args[1].haircuts>>
<<set $args[0].ovaryAge = $args[1].ovaryAge>>
<<set $args[0].readyOva = $args[1].readyOva>>
<<set $args[0].womb = $args[1].womb>> /* this is array assigned by reference, if slave body that is $args[1] will be still used anywhere in code (not discarded) — it's WRONG (they now technically share one womb object). Please tell me about it then. But if old body $args[1] just discarded — it's no problem then.*/
<<set $args[0].pregAdaptation = $args[1].pregAdaptation>>
<<set $args[0].geneMods = $args[1].geneMods>>
<<set $args[0].NCSyouthening = $args[1].NCSyouthening>>
<<set $args[0].eyebrowHColor = $args[1].eyebrowHColor>>
<<set $args[0].eyebrowHStyle = $args[1].eyebrowHStyle>>
<<set $args[0].eyebrowFullness = $args[1].eyebrowFullness>>
<<set $args[0].wombImplant = $args[1].wombImplant>>
<<set $args[0].ovaImplant = $args[1].ovaImplant>>
<<set $args[0].geneticQuirks = $args[1].geneticQuirks>>
<<set $args[0].albinismOverride = $args[1].albinismOverride>>
<<set $args[0].clone = $args[1].clone>>
<<set $args[0].cloneID = $args[1].cloneID>>
<<set $args[0].inbreedingCoeff = $args[1].inbreedingCoeff>>

<<set $args[0].canRecruit = 0>>

<<if $args[2] != 1>> /* swapping NOT gene pool records */
	<<set $args[0].counter.publicUse = $args[1].counter.publicUse>>
	<<set $args[0].counter.laborCount = $args[1].counter.laborCount>>
	<<set $args[0].porn = $args[1].porn>>
	<<set $args[0].aphrodisiacs = $args[1].aphrodisiacs>>
	<<set $args[0].curatives = $args[1].curatives>>
	<<set $args[0].drugs = $args[1].drugs>>
	<<set $args[0].prestige = $args[1].prestige>>
	<<set $args[0].porn.viewerCount = $args[1].porn.viewerCount>>
	<<set $args[0].porn.prestige = $args[1].porn.prestige>>
	<<set $args[0].porn.prestigeDesc = $args[1].porn.prestigeDesc>>
	<<set $args[0].prestigeDesc = $args[1].prestigeDesc>>
	<<set $args[0].minorInjury = $args[1].minorInjury>>
	<<set $args[0].eyewear = $args[1].eyewear>>
	<<set $args[0].earwear = $args[1].earwear>>
	<<set $args[0].earsPiercing = $args[1].earsPiercing>>
	<<set $args[0].armAccessory = $args[1].armAccessory>>
	<<set $args[0].legAccessory = $args[1].legAccessory>>
	<<set $args[0].bellyAccessory = $args[1].bellyAccessory>>
	<<set $args[0].preg = $args[1].preg>>
	<<set $args[0].pregSource = $args[1].pregSource>>
	<<set $args[0].pregType = $args[1].pregType>>
	<<set $args[0].labor = $args[1].labor>>
	<<set $args[0].clitSetting = $args[1].clitSetting>>
	<<set $args[0].diet = $args[1].diet>>
	<<set $args[0].dietCum = $args[1].dietCum>>
	<<set $args[0].dietMilk = $args[1].dietMilk>>
	<<set $args[0].clothes = $args[1].clothes>>
	<<set $args[0].collar = $args[1].collar>>
	<<set $args[0].faceAccessory  = $args[1].faceAccessory>>
	<<set $args[0].mouthAccessory  = $args[1].mouthAccessory>>
	<<set $args[0].shoes = $args[1].shoes>>
	<<set $args[0].makeup = $args[1].makeup>>
	<<set $args[0].nails = $args[1].nails>>
	<<set $args[0].vaginalAccessory = $args[1].vaginalAccessory>>
	<<set $args[0].dickAccessory = $args[1].dickAccessory>>
	<<set $args[0].buttplug = $args[1].buttplug>>
	<<set $args[0].buttplugAttachment = $args[1].buttplugAttachment>>
	<<set $args[0].induce = $args[1].induce>>
	<<set $args[0].mpreg = $args[1].mpreg>>
	<<set $args[0].pregKnown = $args[1].pregKnown>>
	<<set $args[0].pregWeek = $args[1].pregWeek>>
	<<set $args[0].belly = $args[1].belly>>
	<<set $args[0].bellyPreg = $args[1].bellyPreg>>
	<<set $args[0].bellyFluid = $args[1].bellyFluid>>
	<<set $args[0].bellyImplant = $args[1].bellyImplant>>
	<<set $args[0].bellySag = $args[1].bellySag>>
	<<set $args[0].bellySagPreg = $args[1].bellySagPreg>>
	<<set $args[0].bellyPain = $args[1].bellyPain>>
	<<set $args[0].cervixImplant = $args[1].cervixImplant>>
	<<set $args[0].scar = $args[1].scar>>
	<<set $args[0].pregControl = $args[1].pregControl>>
	<<run deflate($args[0])>>
<</if>>
/*
<<if def $args[2]>>
	<<= assignJob($args[0], "rest")>>
<</if>>
*/

<</widget>>

<<widget "BodySwapName">>

<<if $args[1].bodySwap == 0>>
	<<if $args[1].birthSurname>>
		<<if $args[1].birthName !== "">>
			<<set $args[0].origBodyOwner = SlaveFullBirthName($args[1])>>
		<<else>>
			<<set $args[0].origBodyOwner = $args[1].slaveName + " " + $args[1].birthSurname>>
		<</if>>
	<<elseif $args[1].birthName>>
		<<if $args[1].slaveSurname>>
			<<if (($surnameOrder != 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes($args[1].nationality)) || ($surnameOrder == 2)>>
				<<set $args[0].origBodyOwner = $args[1].slaveSurname + " " + $args[1].birthName>>
			<<else>>
				<<set $args[0].origBodyOwner = $args[1].birthName + " " + $args[1].slaveSurname>>
			<</if>>
		<<else>>
			<<set $args[0].origBodyOwner = $args[1].birthName>>
		<</if>>
	<<elseif $args[1].slaveSurname>>
		<<set $args[0].origBodyOwner = SlaveFullName($args[1])>>
	<<else>>
		<<set $args[0].origBodyOwner = $args[1].slaveName>>
	<</if>>
<<else>>
	<<set $args[0].origBodyOwner = $args[1].origBodyOwner>>
<</if>>

<</widget>>

repo_name: Welptard/fc

license: mit


code:
:: death widgets [widget nobr]

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

			<<= SlaveArt($args[0], 0, 0)>>

	<</if>>
	/* 000-250-006 */
	<<setLocalPronouns $args[0]>>
	<<if $args[0].assignment == "be confined in the arcade">>
		You are notified by $arcadeName staff that one of the cabinets has broken down and will need to be replaced. It would seem ''@@.pink;$args[0].slaveName@@'', the fucktoy encased in it, died <<if $args[0].physicalAge >= 70>>naturally of old age despite<<else>>suddenly, unrelated to<</if>> $his living conditions. $He was a good unit; logs show $he was taking dick up until the very end.
	<<elseif $args[0].assignment == "work in the dairy" && $dairyRestraintsSetting > 1>>
		You are notified by $dairyName staff that one of the occupied milkers has ceased producing. Upon inspection, it would seem ''@@.pink;$args[0].slaveName@@'', the cow restrained in it, died <<if $args[0].physicalAge >= 70>>naturally of old age despite<<else>>suddenly, unrelated to<</if>> $his living conditions. $He was a good cow; $he gave milk up until $his death.
	<<elseif $args[0].fuckdoll > 0>>
		One of your Fuckdolls' monitoring systems alerts you that the slave contained within has died. It would seem ''@@.pink;$args[0].slaveName@@'' has died <<if $args[0].physicalAge >= 70>>naturally of old age despite<<else>>suddenly, unrelated to<</if>> $his living conditions. Thankfully the suit notifies its owner of such things; especially with the rumors of earlier models and necrophilia you hear occasionally.
	<<else>>
		''@@.pink;$args[0].slaveName@@'' failed to report in for a routine inspection, something that rarely occurs under your watch. It doesn't take long to track down the wayward slave.
		<<set _deathSeed = random(1,100)>>
		<<if _deathSeed > 75>>
			$He is found dead in $his bed, having died sometime during the previous night.
		<<elseif _deathSeed > 50>>
			$He is found dead in a stairwell, having had a heart attack while trying to climb it.
		<<elseif _deathSeed > 25>>
			$He is found dead in the showers, having slipped sometime earlier.
		<<else>>
			<<if App.Utils.hasNonassignmentSex($args[0])>>
				$He is found dead in the bed of another slave, having died during intercourse. $His lover is not taking it well.
			<<else>>
				$He is found dead in the cafeteria, having died during breakfast; $he ruined the day for a number of your slaves.
			<</if>>
		<</if>>
		$args[0].slaveName died at the age of $args[0].actualAge;
		<<if $args[0].actualAge < 10>>
			$he lived a tragically short life.
		<<elseif $args[0].actualAge < 20>>
			$he died far too young.
		<<elseif $args[0].actualAge < 30>>
			$he died in what would be a sex slave's prime.
		<<elseif $args[0].actualAge < 50>>
			$he died in $his prime.
		<<elseif $args[0].actualAge < 65>>
			$he lived a fair life, good or bad.
		<<elseif $args[0].actualAge < 90>>
			$he lived a long life and experienced much during it.
		<<else>>
			$he lived a very long life that few get to see.
		<</if>>
	<</if>>
<</widget>>

<<widget "DeathOverdose">>
	<<setLocalPronouns $args[0]>>
	/* 000-250-006 */
	<<if $seeImages && $seeReportImages>>

			<<= SlaveArt($args[0], 0, 0)>>

	<</if>>
	/* 000-250-006 */
	<<if $args[0].assignment == "be confined in the arcade">>
		You are notified by $arcadeName staff that one of the cabinets has broken down and will need to be replaced. It would seem ''@@.pink;$args[0].slaveName@@'', the fucktoy encased in it, died of an aphrodisiac overdose from the constant aphrodisiac injections. $He was a good unit; logs show $he was taking dick up until the very end.
	<<elseif $args[0].assignment == "work in the dairy" && $dairyRestraintsSetting > 1>>
		You are notified by $dairyName staff that one of the occupied milkers has ceased producing. Upon inspection, it would seem ''@@.pink;$args[0].slaveName@@'', the cow restrained in it, died of an aphrodisiac overdose. How $he managed to get them is unknown, but $he was a good cow; $he gave milk up until $his death.
	<<elseif $args[0].fuckdoll > 0>>
		One of your Fuckdolls' monitoring systems alerts you that the slave contained within has died. It would seem ''@@.pink;$args[0].slaveName@@'' has died of an aphrodisiac overdose. Thankfully the suit notifies its owner of such things; especially with the rumors of earlier models and necrophilia you hear occasionally. It does little to deal with the resulting mess of the orgasm $he died during, however.
	<<else>>
		''@@.pink;$args[0].slaveName@@'' failed to report in for a routine inspection, something that rarely occurs under your watch. It doesn't take long to track down the wayward slave.
		$He is found dead in $his bed, having died sometime earlier. Judging by the mess and the expression on $his face, $he died of a heart attack during a particularly intense orgasm bought about by the massive amount of aphrodisiacs in $his system. $args[0].slaveName died at the age of $args[0].actualAge;
		<<if $args[0].actualAge < 10>>
			$he lived a tragically short life.
		<<elseif $args[0].actualAge < 20>>
			$he died far too young.
		<<elseif $args[0].actualAge < 30>>
			$he died in what would be a sex slave's prime.
		<<elseif $args[0].actualAge < 50>>
			$he died in $his prime.
		<<elseif $args[0].actualAge < 65>>
			$he lived a fair life, good or bad.
		<<elseif $args[0].actualAge < 90>>
			$he lived a long life and experienced much during it.
		<<else>>
			$he lived a very long life that few get to see.
		<</if>>
	<</if>>
<</widget>>

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

			<<= SlaveArt($args[0], 0, 0)>>

	<</if>>
	/* 000-250-006 */
	<<setLocalPronouns $args[0]>>
	<<if $args[0].assignment == "be confined in the arcade">>
		You are notified by $arcadeName staff that one of the cabinets has broken down and will need to be replaced. It would seem ''@@.pink;$args[0].slaveName@@'', the fucktoy encased in it, died to poor health caused by $his living conditions. $He was a good unit; logs show $he was taking dick up until the very end.
	<<elseif $args[0].assignment == "work in the dairy" && $dairyRestraintsSetting > 1>>
		You are notified by $dairyName staff that one of the occupied milkers has ceased producing. Upon inspection, it would seem ''@@.pink;$args[0].slaveName@@'', the cow restrained in it, died to poor health caused by $his living conditions. $He was a good cow; $he gave milk up until $his death.
	<<elseif $args[0].fuckdoll > 0>>
		One of your Fuckdolls' monitoring systems alerts you that the slave contained within has died. It would seem ''@@.pink;$args[0].slaveName@@'' has died of general poor health. Thankfully the suit notifies its owner of such things; especially with the rumors of earlier models and necrophilia you hear occasionally. Clean up is easy enough, however.
	<<else>>
		''@@.pink;$args[0].slaveName@@'' failed to report in for a routine inspection, something that rarely occurs under your watch. It doesn't take long to track down the wayward slave.
		$He is found dead in $his bed, having died sometime during the night. $He has been in very poor health lately, so you knew this was a possibility. $args[0].slaveName died at the age of $args[0].actualAge;
		<<if $args[0].actualAge < 10>>
			$he lived a tragically short life.
		<<elseif $args[0].actualAge < 20>>
			$he died far too young.
		<<elseif $args[0].actualAge < 30>>
			$he died in what would be a sex slave's prime.
		<<elseif $args[0].actualAge < 50>>
			$he died in $his prime.
		<<elseif $args[0].actualAge < 65>>
			$he lived a fair life, good or bad.
		<<elseif $args[0].actualAge < 90>>
			$he lived a long life and experienced much during it.
		<<else>>
			$he lived a very long life that few get to see.
		<</if>>
		<<if ($arcologies[0].FSPaternalist != "unset") && ($args[0].actualAge < 75)>>
			Allowing a slave to die under your care @@.red;severely damages@@ your image as a caring slaveowner and @@.red;calls into question@@ your paternalistic resolve.
			<<run FutureSocieties.Change("Paternalist", -10)>>
		<</if>>
	<</if>>
<</widget>>


code:
:: pregmod widgets [nobr widget]

<<widget "setLocalPronouns">>
/*
	"He has a camera. The camera belongs to him. It is his camera. The camera is his."
	"She has a diamond ring. The diamond ring belongs to her. It is her diamond ring. The diamond ring is hers."

	Pronouns are tricky to get right, and this widget should make it easier to use variables naturally in writing. There are two problems in English pronouns that matter here:

	1. Her/her vs his/him. To solve this ambiguity, variables use male pronouns throughout, although players will of course see the contents of the variable. "$He glared" can be printed as "She glared."

	2. Her/hers vs his/his. Here, the opposite problem. In this one case and this alone, where you would use "hers," (the possessive pronoun) the variable is female, since the distinction is only important there. I am very sorry for English.
*/
	<<run App.Utils.setLocalPronouns($args[0], $args[1])>>
<</widget>>

<<widget "setNonlocalPronouns">>
	/* a fake slave object, we need the .pronoun attribute only */
	<<set _fSlave = {pronoun: App.Data.Pronouns.Kind.female}>>
	/* Used for generic slaves, citizens, security, etc. */
	<<if $diversePronouns == 1>>
		<<if $args[0] === 100>>
			<<set _fSlave.pronoun = App.Data.Pronouns.Kind.male>>
		<<elseif ($args[0] > 0) && (random(1,100) <= $args[0])>>
			<<set _fSlave.pronoun = App.Data.Pronouns.Kind.male>>
		<</if>>
	<</if>>
	<<run App.Utils.setLocalPronouns(_fSlave, 'U')>>
<</widget>>

<<widget "setPlayerPronouns">>
	<<set _pl = ["he", "his", "hers", "him", "himself", "woman", "women", "loli", "girl", "daughter", "sister", "wife", "wives",
		"He", "His", "Hers", "Him", "Himself", "Woman", "Women", "Loli", "Girl", "Daughter", "Sister", "Wife", "Wives"]>>
	<<run App.Utils.setLocalPronouns($PC, 'P', _pl)>>
	<<unset _pl>>
<</widget>>

<<widget "setAssistantPronouns">>
	<<set _apl = ["he", "his", "hers", "him", "himself", "woman", "women", "loli", "girl", "daughter", "sister", "wife", "wives",
		"He", "His", "Hers", "Him", "Himself", "Woman", "Women", "Loli", "Girl", "Daughter", "Sister", "Wife", "Wives"]>>

	<<run App.Utils.setLocalPronouns(assistant.pronouns().main, 'A', _apl)>>
	<<if $assistant.market>>
		<<run App.Utils.setLocalPronouns(assistant.pronouns().market, 'M', _apl)>>
	<</if>>
	<<unset _apl>>
<</widget>>

/*
	Should be called with two slave objects as arguments, the primary and secondary. E.g. <<setSpokenLocalPronouns $activeSlave $subSlave>>
	_primarySlaveLisp and _secondarySlaveLisp only exist so that we don't have to rely on using the exact variables $activeSlave and $subSlave
*/
<<widget "setSpokenLocalPronouns">>
	<<set _primarySlaveLisp = SlaveStatsChecker.checkForLisp($args[0])>>

	<<set _heLisp = lispReplace($he)>>
	<<set _hisLisp = lispReplace($his)>>
	<<set _hersLisp = lispReplace($hers)>>
	<<set _himselfLisp = lispReplace($himself)>>
	<<set _daughterLisp = lispReplace($daughter)>>
	<<set _sisterLisp = lispReplace($sister)>>
	<<set _loliLisp = lispReplace($loli)>>
	<<set _wifeLisp = lispReplace($wife)>>
	<<set _wivesLisp = lispReplace($wives)>>

	<<set _HeLisp = lispReplace($He)>>
	<<set _HisLisp = lispReplace($His)>>
	<<set _HersLisp = lispReplace($Hers)>>
	<<set _HimselfLisp = lispReplace($Himself)>>
	<<set _DaughterLisp = lispReplace($Daughter)>>
	<<set _SisterLisp = lispReplace($Sister)>>
	<<set _LoliLisp = lispReplace($Loli)>>
	<<set _WifeLisp = lispReplace($Wife)>>
	<<set _WivesLisp = lispReplace($Wives)>>

	<<if def _he2>>
		<<set _secondarySlaveLisp = SlaveStatsChecker.checkForLisp($args[1])>>

		<<set _he2Lisp = lispReplace(_he2)>>
		<<set _his2Lisp = lispReplace(_his2)>>
		<<set _hers2Lisp = lispReplace(_hers2)>>
		<<set _himself2Lisp = lispReplace(_himself2)>>
		<<set _daughter2Lisp = lispReplace(_daughter2)>>
		<<set _sister2Lisp = lispReplace(_sister2)>>
		<<set _loli2Lisp = lispReplace(_loli2)>>
		<<set _wife2Lisp = lispReplace(_wife2)>>
		<<set _wives2Lisp = lispReplace(_wives2)>>

		<<set _He2Lisp = lispReplace(_He2)>>
		<<set _His2Lisp = lispReplace(_His2)>>
		<<set _Hers2Lisp = lispReplace(_Hers2)>>
		<<set _Himself2Lisp = lispReplace(_Himself2)>>
		<<set _Daughter2Lisp = lispReplace(_Daughter2)>>
		<<set _Sister2Lisp = lispReplace(_Sister2)>>
		<<set _Loli2Lisp = lispReplace(_Loli2)>>
		<<set _Wife2Lisp = lispReplace(_Wife2)>>
		<<set _Wives2Lisp = lispReplace(_Wives2)>>
	<</if>>
<</widget>>

<<widget "setSpokenPlayerPronouns">>
	<<set _playerSlaveLisp = SlaveStatsChecker.checkForLisp($args[0])>>

	<<set _hePLisp = lispReplace(_heP)>>
	<<set _hisPLisp = lispReplace(_hisP)>>
	<<set _hersPLisp = lispReplace(_hersP)>>
	<<set _himselfPLisp = lispReplace(_himselfP)>>
	<<set _daughterPLisp = lispReplace(_daughterP)>>
	<<set _sisterPLisp = lispReplace(_sisterP)>>
	<<set _loliPLisp = lispReplace(_loliP)>>
	<<set _wifePLisp = lispReplace(_wifeP)>>
	<<set _wivesPLisp = lispReplace(_wivesP)>>

	<<set _HePLisp = lispReplace(_HeP)>>
	<<set _HisPLisp = lispReplace(_HisP)>>
	<<set _HersPLisp = lispReplace(_HersP)>>
	<<set _HimselfPLisp = lispReplace(_HimselfP)>>
	<<set _DaughterPLisp = lispReplace(_DaughterP)>>
	<<set _SisterPLisp = lispReplace(_SisterP)>>
	<<set _LoliPLisp = lispReplace(_LoliP)>>
	<<set _WifePLisp = lispReplace(_WifeP)>>
	<<set _WivesPLisp = lispReplace(_WivesP)>>
<</widget>>

<<widget "setSpokenAssistantPronouns">>
	<<set _assistantSlaveLisp = SlaveStatsChecker.checkForLisp($args[0])>>

	<<set _heALisp = lispReplace(_heA)>>
	<<set _hisALisp = lispReplace(_hisA)>>
	<<set _hersALisp = lispReplace(_hersA)>>
	<<set _himselfALisp = lispReplace(_himselfA)>>
	<<set _daughterALisp = lispReplace(_daughterA)>>
	<<set _sisterALisp = lispReplace(_sisterA)>>
	<<set _loliALisp = lispReplace(_loliA)>>
	<<set _wifeALisp = lispReplace(_wifeA)>>
	<<set _wivesALisp = lispReplace(_wivesA)>>

	<<set _HeALisp = lispReplace(_HeA)>>
	<<set _HisALisp = lispReplace(_HisA)>>
	<<set _HersALisp = lispReplace(_HersA)>>
	<<set _HimselfALisp = lispReplace(_HimselfA)>>
	<<set _DaughterALisp = lispReplace(_DaughterA)>>
	<<set _SisterALisp = lispReplace(_SisterA)>>
	<<set _LoliALisp = lispReplace(_LoliA)>>
	<<set _WifeALisp = lispReplace(_WifeA)>>
	<<set _WivesALisp = lispReplace(_WivesA)>>
<</widget>>

<<widget "PlayerRace">>
	<<replace #ethnicity>>
		You're $PC.race.
	<</replace>>
<</widget>>

<<widget "PlayerSkin">>
	<<replace #skin>>
		You have $PC.skin skin.
	<</replace>>
<</widget>>

<<widget "PlayerMarkings">>
	<<replace #markings>>
		<<if $PC.markings == "none">>
			Your skin is pure and clear of any freckles.
		<<elseif $PC.markings == "freckles">>
			You have some freckles on your cheeks and elsewhere.
		<<elseif $PC.markings == "heavily freckled">>
			You have dense freckles on your cheeks and elsewhere.
		<</if>>
	<</replace>>
<</widget>>

<<widget "AgePCEffects">>
<<switch $PC.actualAge>>
<<case 3>>
	<<set $AgeTrainingLowerBoundPC = 18, $AgeTrainingUpperBoundPC = 20, $AgeEffectOnTrainerPricingPC = .1, $AgeEffectOnTrainerEffectivenessPC = .1>>
<<case 4>>
	<<set $AgeTrainingLowerBoundPC = 17, $AgeTrainingUpperBoundPC = 19, $AgeEffectOnTrainerPricingPC = .15, $AgeEffectOnTrainerEffectivenessPC = .15>>
<<case 5>>
	<<set $AgeTrainingLowerBoundPC = 16, $AgeTrainingUpperBoundPC = 18, $AgeEffectOnTrainerPricingPC = .35, $AgeEffectOnTrainerEffectivenessPC = .35>>
<<case 6>>
	<<set $AgeTrainingLowerBoundPC = 15, $AgeTrainingUpperBoundPC = 17, $AgeEffectOnTrainerPricingPC = .55, $AgeEffectOnTrainerEffectivenessPC = .55>>
<<case 7>>
	<<set $AgeTrainingLowerBoundPC = 14, $AgeTrainingUpperBoundPC = 16, $AgeEffectOnTrainerPricingPC = .75, $AgeEffectOnTrainerEffectivenessPC = .75>>
<<case 8>>
	<<set $AgeTrainingLowerBoundPC = 13, $AgeTrainingUpperBoundPC = 15, $AgeEffectOnTrainerPricingPC = .85, $AgeEffectOnTrainerEffectivenessPC = .85>>
<<case 9>>
	<<set $AgeTrainingLowerBoundPC = 12, $AgeTrainingUpperBoundPC = 14, $AgeEffectOnTrainerPricingPC = 1.00, $AgeEffectOnTrainerEffectivenessPC = 1.00>>
<<case 10>>
	<<set $AgeTrainingLowerBoundPC = 11, $AgeTrainingUpperBoundPC = 13, $AgeEffectOnTrainerPricingPC = 1.0005, $AgeEffectOnTrainerEffectivenessPC = 1.0005>>
<<case 11>>
	<<set $AgeTrainingLowerBoundPC = 10, $AgeTrainingUpperBoundPC = 12, $AgeEffectOnTrainerPricingPC = 1.01, $AgeEffectOnTrainerEffectivenessPC = 1.01>>
<<case 12>>
	<<set $AgeTrainingLowerBoundPC = 9, $AgeTrainingUpperBoundPC = 11, $AgeEffectOnTrainerPricingPC = 1.02, $AgeEffectOnTrainerEffectivenessPC = 1.02>>
<<case 13>>
	<<set $AgeTrainingLowerBoundPC = 8, $AgeTrainingUpperBoundPC = 10, $AgeEffectOnTrainerPricingPC = 1.03, $AgeEffectOnTrainerEffectivenessPC = 1.03>>
<<case 14>>
	<<set $AgeTrainingLowerBoundPC = 7, $AgeTrainingUpperBoundPC = 9, $AgeEffectOnTrainerPricingPC = 1.04, $AgeEffectOnTrainerEffectivenessPC = 1.04>>
<<case 15>>
	<<set $AgeTrainingLowerBoundPC = 6, $AgeTrainingUpperBoundPC = 8, $AgeEffectOnTrainerPricingPC = 1.05, $AgeEffectOnTrainerEffectivenessPC = 1.05>>
<<case 16>>
	<<set $AgeTrainingLowerBoundPC = 5, $AgeTrainingUpperBoundPC = 7, $AgeEffectOnTrainerPricingPC = 1.06, $AgeEffectOnTrainerEffectivenessPC = 1.06>>
<<case 17>>
	<<set $AgeTrainingLowerBoundPC = 4, $AgeTrainingUpperBoundPC = 6, $AgeEffectOnTrainerPricingPC = 1.07, $AgeEffectOnTrainerEffectivenessPC = 1.07>>
<<case 18>>
	<<set $AgeTrainingLowerBoundPC = 3, $AgeTrainingUpperBoundPC = 5, $AgeEffectOnTrainerPricingPC = 1.08, $AgeEffectOnTrainerEffectivenessPC = 1.08>>
<</switch>>
<</widget>>


code:
all .tw passages that are included from other passages via the <<include>> macro should be stored in this folder or its subfolders for organizational purposes

for these included passages, it is not safe to assume that a temporary variable (starting with underscore _ character) will be confined in scope to that file alone

when passages are included by other passages, any variables that they set will override variables in the calling passage, so extra care should be taken in these passages if they use $i, _i, _j or other common variable names to ensure that callers are not expecting those variables to be unchanged after the include

all sa... passages

arcologyDescription
neighborDescription
officeDescription

surgeryDegradation

weekly

	persBusiness
	rulesAssistantReport

penthouse

	fullReport
	penthouseReport

neighbors

	neighborsDevelopment
	neighborsFSAdoption

facilities

	arcadeReport
	brothelReport
	cellblockReport
	clinicReport
	clubReport
	dairyReport
	labReport
	masterSuiteReport
	schoolroomReport
	servantsQuartersReport
	spaReport
	nurseryReport

economics

	corporationDevelopments
	marketsReport

npc

	hgApplication
	lawCompliance
	longSlaveDescription
	newSlaveIntro

init

	initRules
	BackwardsCompatibility