From e6b736cbec705a79ff44999de1f9b2e0bf29f336 Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Wed, 2 Jan 2019 10:25:29 -0500
Subject: [PATCH] some fixes

---
 src/init/setupVars.tw                       |  6 +--
 src/pregmod/csec.tw                         | 50 ++++++++++-----------
 src/uncategorized/BackwardsCompatibility.tw |  2 +
 3 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/src/init/setupVars.tw b/src/init/setupVars.tw
index 8078172630e..c0129c3c92a 100644
--- a/src/init/setupVars.tw
+++ b/src/init/setupVars.tw
@@ -299,11 +299,11 @@ equine: {type: "equine", normalOvaMin:1, normalOvaMax: 1, normalBirth: 48, minLi
 
 <<set setup.veryYoungCareers = ["a babysitter", "a beggar", "a beggar", "a bully hunter", "a bully", "a camp counselor", "a cheerleader", "a child actress", "a child prodigy", "a child prostitute", "a child prostitute", "a child soldier", "a child soldier", "a club manager", "a club recruiter", "a club treasurer", "a cum dump", "a dropout", "a dropout", "a drug mule", "a farmer's daughter", "a girl scout", "a girl scout", "a hall monitor", "a handmaiden", "a hospital volunteer", "a housesitter", "a juvenile delinquent", "a juvenile delinquent", "a latchkey kid", "a lemonade stand operator", "a marching band leader", "a meat toilet", "a military brat", "a model-UN star", "a model", "a noblewoman", "a pageant star", "a paper girl", "a part-time farm laborer", "a pick-pocket", "a refugee", "a refugee", "a refugee", "a school nurse's assistant", "a shrine maiden", "a street thug", "a street urchin", "a street urchin", "a street urchin", "a student council president", "a student from a boarding school", "a student from a private school", "a student from a public school", "a student from a public school", "a student from a public school", "a student from a public school", "a student from a public school", "a sweatshop worker", "a sweatshop worker", "a sweatshop worker", "a sweatshop worker", "a teacher's pet", "an apprentice", "an aspiring pop star", "an idol", "an orphan", "an orphan", "an orphan", "an orphan", "an orphan", "being homeschooled by her parents", "captain of the kendo club", "from a lower class family", "from a lower class family", "from a lower class family", "from a middle class family", "from a middle class family", "from an upper class family", "homeless", "homeless", "homeless"]>> /* pregmod */
 
-<<set setup.youngCareers = ["a babysitter", "a ballerina", "a barista", "a bartender", "a beggar", "a blogger", "a butler", "a camgirl", "a camp counselor", "a camwhore", "a cashier", "a cheerleader", "a cocktail waitress", "a comedian", "a con artist", "a cook", "a courier", "a cowgirl", "a criminal", "a croupier", "a cum dump", "a dairy worker", "a dancer", "a delivery woman", "a drug mule", "a factory worker", "a farm laborer", "a farm laborer", "a farmer's daughter", "a florist", "a gang member", "a gang member", "a gardener", "a groomer", "a gymnast", "a handmaiden", "a house DJ", "a housesitter", "a housewife", "a law enforcement officer", "a lifeguard", "a magician's assistant", "a maid", "a mail-order bride", "a masseuse", "a meat toilet", "a mechanic", "a medical student", "a mistress", "a model", "a musician", "a noblewoman", "a nun", "a nurse", "a paramedic", "a party girl", "a personal assistant", "a personal trainer", "a pirate", "a political activist", "a porn star", "a prisoner", "a programmer", "a prostitute", "a racing driver", "a reality show star", "a receptionist", "a refugee", "a ride attendant", "a saleswoman", "a school nurse", "a secretary", "a security guard", "a service worker", "a shrine maiden", "a shut-in", "a soldier", "a street performer", "a street vendor", "a stripper", "a student", "a student", "a student", "a switchboard operator", "a teaching assistant", "a tour guide", "a trophy wife", "a truck driver", "a video game streamer", "a waitress", "a wet nurse", "a yoga instructor", "an actress", "an air hostess", "an apprentice", "an arcade attendant", "an artist", "an aspiring pop star", "an assassin", "an athlete", "an au pair", "an escort", "an exotic dancer", "an idol", "an intern", "an office worker", "homeless", "in a militia", "unemployed", "unemployed", "unemployed", "unemployed", "unemployed"]>>
+<<set setup.youngCareers = ["a babysitter", "a ballerina", "a barista", "a bartender", "a beggar", "a blogger", "a butler", "a camgirl", "a camp counselor", "a camwhore", "a cashier", "a cheerleader", "a cocktail waitress", "a comedian", "a con artist", "a cook", "a courier", "a cowgirl", "a criminal", "a croupier", "a cum dump", "a dairy worker", "a dancer", "a delivery woman", "a dominatrix", "a drug mule", "a factory worker", "a farm laborer", "a farm laborer", "a farmer's daughter", "a florist", "a gang member", "a gang member", "a gardener", "a groomer", "a gymnast", "a handmaiden", "a house DJ", "a housesitter", "a housewife", "a law enforcement officer", "a lifeguard", "a magician's assistant", "a maid", "a mail-order bride", "a masseuse", "a meat toilet", "a mechanic", "a medical student", "a mistress", "a model", "a musician", "a noblewoman", "a nun", "a nurse", "a paramedic", "a party girl", "a personal assistant", "a personal trainer", "a pirate", "a political activist", "a porn star", "a prisoner", "a programmer", "a prostitute", "a racing driver", "a reality show star", "a receptionist", "a refugee", "a ride attendant", "a saleswoman", "a school nurse", "a secretary", "a security guard", "a service worker", "a shrine maiden", "a shut-in", "a soldier", "a street performer", "a street vendor", "a stripper", "a student", "a student", "a student", "a switchboard operator", "a teaching assistant", "a tour guide", "a trophy wife", "a truck driver", "a video game streamer", "a waitress", "a wet nurse", "a yoga instructor", "an actress", "an air hostess", "an apprentice", "an arcade attendant", "an artist", "an aspiring pop star", "an assassin", "an athlete", "an au pair", "an escort", "an exotic dancer", "an idol", "an intern", "an office worker", "homeless", "in a militia", "unemployed", "unemployed", "unemployed", "unemployed", "unemployed"]>>
 
 <<set setup.educatedCareers = ["a ballerina", "a banker", "a bureaucrat", "a business owner", "a businessman", "a captain", "a chemist", "a chief of police", "a classical dancer", "a classical musician", "a coach", "a college scout", "a concierge", "a coroner", "a corporate executive", "a cosmetologist", "a counselor", "a criminal", "a critic", "a cult leader", "a dean", "a dentist", "a dentist", "a director", "a dispatch officer", "a doctor", "a historian", "a housekeeper", "a journalist", "a journalist", "a judge", "a lawyer", "a librarian", "a lobbyist", "a madam", "a manager", "a mechanic", "a mediator", "a medical student", "a mercenary", "a military officer", "a military recruiter", "a nanny", "a noblewoman", "a nun", "a painter", "a paramedic", "a personal assistant", "a pharmacist", "a physician", "a photographer", "a pilot", "a poet", "a police detective", "a police negotiator", "a police officer", "a political activist", "a politician", "a practitioner", "a principal", "a prison warden", "a private detective", "a private instructor", "a procuress", "a producer", "a professional bartender", "a professor", "a programmer", "a prostitute", "a psychologist", "a refugee", "a scholar", "a scientist", "a sculptor", "a secretary", "a serial divorcee", "a shut-in", "a stockbroker", "a surgeon", "a teacher", "a teaching assistant", "a therapist", "a train conductor", "a transporter", "a veterinarian", "a wedding planner", "a writer", "a zookeeper", "an actress", "an air hostess", "an animator", "an archaeologist", "an architect", "an artist", "an assassin", "an astronaut", "an economist", "an editor", "an engineer", "an escort", "an estate agent", "an investor", "an MS pilot", "an office worker", "an orchestra conductor", "retired", "unemployed"]>>
 
-<<set setup.uneducatedCareers = ["a baker", "a barber", "a barista", "a bartender", "a beekeeper", "a beggar", "a blacksmith", "a blogger", "a bodyguard", "a bouncer", "a bounty hunter", "a boxer", "a brewer", "a bullfighter", "a bus driver", "a butcher", "a butler", "a camgirl", "a camp counselor", "a camwhore", "a candlestick maker", "a caregiver", "a carpenter", "a cashier", "a charity worker", "a chauffeur", "a cheerleader", "a chiropractor", "a clown", "a cobbler", "a cocktail waitress", "a comedian", "a con artist", "a construction worker", "a cook", "a cowgirl", "a criminal", "a croupier", "a cum dump", "a dairy worker", "a dancer", "a delivery woman", "a driller", "a drug mule", "a factory worker", "a farm laborer", "a farmer's daughter", "a farmer", "a firefighter", "a fisherwoman", "a florist", "a fortune teller", "a gang leader", "a gang member", "a gardener", "a gravedigger", "a groomer", "a gymnast", "a handmaiden", "a hotel manager", "a house DJ", "a housewife", "a hunter", "a janitor", "a landlady", "a launderer", "a law enforcement officer", "a lifeguard", "a local news anchor", "a lumberjack", "a magician's assistant", "a maid", "a mail carrier", "a mail-order bride", "a masseuse", "a masseuse", "a meat toilet", "a medic", "a medic", "a medium", "a messenger", "a midwife", "a milkmaid", "a mime", "a miner", "a missionary", "a mistress", "a model", "a mortician", "a musician", "a nanny", "a nurse", "a paramedic", "a park ranger", "a party girl", "a peddler", "a personal trainer", "a pimp", "a pirate", "a plumber", "a political activist", "a prison guard", "a prisoner", "a procuress", "a prostitute", "a racing driver", "a radio show host", "a rancher", "a receptionist", "a referee", "a refugee", "a revolutionary", "a ride attendant", "a roadie", "a rodeo star", "a sailor", "a saleswoman", "a school nurse", "a seamstress", "a secretary", "a security guard", "a service worker", "a shepherd", "a shrine maiden", "a soldier", "a stage magician", "a street performer", "a street vendor", "a stripper", "a student", "a student athlete", "a stuntwoman", "a switchboard operator", "a tailor", "a talent scout", "a taxi driver", "a teacher", "a tour guide", "a trophy wife", "a truck driver", "a waitress", "a weathergirl", "a welder", "a wet nurse", "a whaler", "a wrestler", "a zookeeper", "an acrobat", "an actress", "an arcade attendant", "an artist", "an aspiring pop star", "an athlete", "an electrician", "an enforcer", "an enforcer", "an escort", "an exotic dancer", "an exterminator", "an innkeeper", "an office worker", "an orderly", "homeless", "in a militia", "retired", "unemployed", "unemployed", "unemployed", "unemployed", "unemployed"]>>
+<<set setup.uneducatedCareers = ["a baker", "a barber", "a barista", "a bartender", "a beekeeper", "a beggar", "a blacksmith", "a blogger", "a bodyguard", "a bouncer", "a bounty hunter", "a boxer", "a brewer", "a bullfighter", "a bus driver", "a butcher", "a butler", "a camgirl", "a camp counselor", "a camwhore", "a candlestick maker", "a caregiver", "a carpenter", "a cashier", "a charity worker", "a chauffeur", "a cheerleader", "a chiropractor", "a clown", "a cobbler", "a cocktail waitress", "a comedian", "a con artist", "a construction worker", "a cook", "a cowgirl", "a criminal", "a croupier", "a cum dump", "a dairy worker", "a dancer", "a delivery woman", "a dominatrix", "a driller", "a drug mule", "a factory worker", "a farm laborer", "a farmer's daughter", "a farmer", "a firefighter", "a fisherwoman", "a florist", "a fortune teller", "a gang leader", "a gang member", "a gardener", "a gravedigger", "a groomer", "a gymnast", "a handmaiden", "a hotel manager", "a house DJ", "a housewife", "a hunter", "a janitor", "a landlady", "a launderer", "a law enforcement officer", "a lifeguard", "a local news anchor", "a lumberjack", "a magician's assistant", "a maid", "a mail carrier", "a mail-order bride", "a masseuse", "a masseuse", "a meat toilet", "a medic", "a medic", "a medium", "a messenger", "a midwife", "a milkmaid", "a mime", "a miner", "a missionary", "a mistress", "a model", "a mortician", "a musician", "a nanny", "a nurse", "a paramedic", "a park ranger", "a party girl", "a peddler", "a personal trainer", "a pimp", "a pirate", "a plumber", "a political activist", "a prison guard", "a prisoner", "a procuress", "a prostitute", "a racing driver", "a radio show host", "a rancher", "a receptionist", "a referee", "a refugee", "a revolutionary", "a ride attendant", "a roadie", "a rodeo star", "a sailor", "a saleswoman", "a school nurse", "a seamstress", "a secretary", "a security guard", "a service worker", "a shepherd", "a shrine maiden", "a soldier", "a stage magician", "a street performer", "a street vendor", "a stripper", "a student", "a student athlete", "a stuntwoman", "a switchboard operator", "a tailor", "a talent scout", "a taxi driver", "a teacher", "a tour guide", "a trophy wife", "a truck driver", "a waitress", "a weathergirl", "a welder", "a wet nurse", "a whaler", "a wrestler", "a zookeeper", "an acrobat", "an actress", "an arcade attendant", "an artist", "an aspiring pop star", "an athlete", "an electrician", "an enforcer", "an enforcer", "an escort", "an exotic dancer", "an exterminator", "an innkeeper", "an office worker", "an orderly", "homeless", "in a militia", "retired", "unemployed", "unemployed", "unemployed", "unemployed", "unemployed"]>>
 
 <<set setup.gratefulCareers = ["a beggar", "a drug mule", "a peddler", "a pick-pocket", "a prisoner", "a refugee", "a shut-in", "a street urchin", "a student from a boarding school", "a sweatshop worker", "a thief", "an orphan", "from a lower class family", "homeless", "unemployed"]>>
 
@@ -313,7 +313,7 @@ equine: {type: "equine", normalOvaMin:1, normalOvaMax: 1, normalBirth: 48, minLi
 
 <<set setup.whoreCareers = ["a child prostitute", "a criminal", "a cum dump", "a Futanari Sister", "a juvenile delinquent", "a mail-order bride", "a meat toilet", "a mistress", "a model", "a pageant star", "a pirate", "a porn star", "a prostitute", "a reality show star", "a saleswoman", "a serial divorcee", "a stripper", "a trophy wife", "an escort", "an exotic dancer"]>>
 
-<<set setup.HGCareers = ["a captain", "a corporate executive", "a director", "a gang leader", "a judge", "a lawyer", "a leading arcology citizen", "a military officer", "a model-UN star", "a noblewoman", "a politician", "a Queen", "a slaver", "a student council president"]>>
+<<set setup.HGCareers = ["a captain", "a corporate executive", "a director", "a dominatrix", "a gang leader", "a judge", "a lawyer", "a leading arcology citizen", "a military officer", "a model-UN star", "a noblewoman", "a politician", "a Queen", "a slaver", "a student council president"]>>
 
 <<set setup.madamCareers = ["a banker", "a business owner", "a businessman", "a camp counselor", "a club manager", "a hotel manager", "a landlady", "a madam", "a manager", "a park ranger", "a pimp", "a procuress", "a stockbroker", "an innkeeper"]>>
 
diff --git a/src/pregmod/csec.tw b/src/pregmod/csec.tw
index 3bfb2073727..540da863686 100644
--- a/src/pregmod/csec.tw
+++ b/src/pregmod/csec.tw
@@ -319,65 +319,65 @@ Performing a cesarean section is trivial for the remote surgery to carry out. $a
 		<</link>>
 		//Will cost <<print cashFormat(500)>> weekly//
 	<<elseif _lostBabies != 1 && $DefaultBirthDestination != "anywhere">>
-		$His <<if _curBabies > 1>>babies<<else>>baby<</if>> were sent to $DefaultBirthDestination. $slaves[$i].slaveName
+		$His <<if _curBabies > 1>>babies<<else>>baby<</if>> were sent to $DefaultBirthDestination. $activeSlave.slaveName
 				<<switch $DefaultBirthDestination>>
 					<<case "an orphanage">>
-						<<if $slaves[$i].devotion > 95>>
+						<<if $activeSlave.devotion > 95>>
 							worships you so completely that $he will not resent this.
-						<<elseif $slaves[$i].devotion > 50>>
+						<<elseif $activeSlave.devotion > 50>>
 							is devoted to you, but $he will @@.mediumorchid;struggle to accept this.@@
-							<<set $slaves[$i].devotion -= 2>>
-						<<elseif $slaves[$i].devotion > 20>>
+							<<set $activeSlave.devotion -= 2>>
+						<<elseif $activeSlave.devotion > 20>>
 							has accepted being a sex slave, but $he will @@.mediumorchid;resent this intensely.@@
-							<<set $slaves[$i].devotion -= 3>>
+							<<set $activeSlave.devotion -= 3>>
 						<<else>>
 							will of course @@.mediumorchid;hate you for this.@@
-							<<set $slaves[$i].devotion -= 4>>
+							<<set $activeSlave.devotion -= 4>>
 						<</if>>
 						<<set $slaveOrphanageTotal += _curBabies>>
 					<<case "a citizen school">>
-						<<if $slaves[$i].devotion > 95>>
+						<<if $activeSlave.devotion > 95>>
 							loves you already, but <<print $he>>'ll @@.hotpink;love you even more@@ for this.
-						<<elseif $slaves[$i].devotion > 50>>
+						<<elseif $activeSlave.devotion > 50>>
 							knows about these and will be @@.hotpink;overjoyed.@@ $He will miss $his child<<if _curBabies > 1>>ren<</if>>, but $he expected that.
-						<<elseif $slaves[$i].devotion > 20>>
+						<<elseif $activeSlave.devotion > 20>>
 							will naturally miss $his child<<if _curBabies > 1>>ren<</if>>, but will @@.hotpink;take comfort@@ in the hope that $his offspring will have a better life.
 						<<else>>
 							will naturally retain some resentment over being separated from $his child<<if _curBabies > 1>>ren<</if>>, but this should be balanced by hope that $his offspring will have a better life.
 						<</if>>
-						<<set $slaves[$i].devotion += 4, $citizenOrphanageTotal += _curBabies>>
+						<<set $activeSlave.devotion += 4, $citizenOrphanageTotal += _curBabies>>
 					<<case "a private school">>
-						<<if $slaves[$i].devotion > 95>>
+						<<if $activeSlave.devotion > 95>>
 							will @@.hotpink;worship you utterly@@ for this.
-						<<elseif $slaves[$i].devotion > 50>>
+						<<elseif $activeSlave.devotion > 50>>
 							understands that this is the best possible outcome for the offspring of slave, and will be @@.hotpink;overjoyed.@@
-						<<elseif $slaves[$i].devotion > 20>>
+						<<elseif $activeSlave.devotion > 20>>
 							will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since <<print $he>>'ll understand this is the best possible outcome for a slave mother.
 						<<else>>
 							will resent being separated from $his child<<if _curBabies > 1>>ren<</if>>, but @@.hotpink;should understand and be grateful@@ that this is the best possible outcome here.
 						<</if>>
 						The child<<if _curBabies > 1>>ren<</if>> will be raised privately, with expert care and tutoring, an expensive proposition.
-						<<set $slaves[$i].devotion += 6, $privateOrphanageTotal += _curBabies>>
+						<<set $activeSlave.devotion += 6, $privateOrphanageTotal += _curBabies>>
 					<<case "the market">>
-						<<if $slaves[$i].prestige > 1 || $slaves[$i].pornPrestige > 2>>
+						<<if $activeSlave.prestige > 1 || $activeSlave.pornPrestige > 2>>
 							<<set _babyCost = random(-12,100)>>
-							<<if $slaves[$i].prematureBirth > 0>><<set _babyCost = random(-32,40)>><</if>>
+							<<if $activeSlave.prematureBirth > 0>><<set _babyCost = random(-32,40)>><</if>>
 						<<else>>
 							<<set _babyCost = random(-12,12)>>
-							<<if $slaves[$i].prematureBirth > 0>><<set _babyCost = -45>><</if>>
+							<<if $activeSlave.prematureBirth > 0>><<set _babyCost = -45>><</if>>
 						<</if>>
-						$His <<if _curBabies > 1>>babies<<else>>baby<</if>> were sold for <<if _curBabies > 1>>a total of <</if>>@@.yellowgreen;<<print cashFormat(_curBabies*(50+_babyCost))>>.@@<<if $slaves[$i].prematureBirth == 1>> A low price due to the added costs of caring for them.<</if>>
-						<<if $slaves[$i].devotion > 95>>
+						$His <<if _curBabies > 1>>babies<<else>>baby<</if>> were sold for <<if _curBabies > 1>>a total of <</if>>@@.yellowgreen;<<print cashFormat(_curBabies*(50+_babyCost))>>.@@<<if $activeSlave.prematureBirth == 1>> A low price due to the added costs of caring for them.<</if>>
+						<<if $activeSlave.devotion > 95>>
 							$He adheres to your thoughts so strongly that even though you backed out of caring for $his child<<if _curBabies > 1>>ren<</if>>, $he still truly believes you are doing $him an honor.
-						<<elseif $slaves[$i].devotion > 50>>
+						<<elseif $activeSlave.devotion > 50>>
 							$He is @@.mediumorchid;deeply hurt@@ by your sudden decision to sell $his child<<if _curBabies > 1>>ren<</if>> instead of having <<if _curBabies > 1>>them<<else>>it<</if>> cared for. $His trust in your words @@.gold;wavers@@ as $he thinks of $his child<<if _curBabies > 1>>ren<</if>>'s future.
-							<<set $slaves[$i].trust -= 5, $slaves[$i].devotion -= 5>>
-						<<elseif $slaves[$i].devotion > 20>>
+							<<set $activeSlave.trust -= 5, $activeSlave.devotion -= 5>>
+						<<elseif $activeSlave.devotion > 20>>
 							$He is @@.mediumorchid;devastated@@ by your sudden decision to sell $his child<<if _curBabies > 1>>ren<</if>> instead of having <<if _curBabies > 1>>them<<else>>it<</if>> cared for. $His mind struggles to comprehend @@.gold;such betrayal.@@
-							<<set $slaves[$i].trust -= 10, $slaves[$i].devotion -= 10>>
+							<<set $activeSlave.trust -= 10, $activeSlave.devotion -= 10>>
 						<<else>>
 							For a moment, $he saw a glimmer of good in you; @@.mediumorchid;$he was clearly wrong.@@ $His mind struggles to comprehend @@.gold;why $he could ever even thing of trusting such a person.@@
-							<<set $slaves[$i].trust -= 30, $slaves[$i].devotion -= 30>>
+							<<set $activeSlave.trust -= 30, $activeSlave.devotion -= 30>>
 						<</if>>
 						<<set $cash += _curBabies*(50+_babyCost)>>
 				<</switch>>
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index 6da2ce83bff..d9225114b4d 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -3603,6 +3603,8 @@ Done!
 <<if $secExp == 1>>
 <br>
 <<include "SecExpBackwardCompatibility">>
+<<else>>
+	<<set $crime = 0, $security = 0>>
 <</if>>
 
 <<if ndef $masteredXP>>
-- 
GitLab