From 5da1e48c92a79e354a17ba89334bbbc762fb1783 Mon Sep 17 00:00:00 2001
From: Stuffed <stuffedgames@gmail.com>
Date: Fri, 5 May 2017 00:51:45 +0900
Subject: [PATCH] Fix missing $ in slaves

---
 sanityCheck                            | 2 ++
 src/uncategorized/genericPlotEvents.tw | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sanityCheck b/sanityCheck
index 45705bc8e15..080dc0e9c20 100755
--- a/sanityCheck
+++ b/sanityCheck
@@ -65,6 +65,8 @@ $GREP -e "[$]slaves[.]"  --and --not -e '[$]slaves[.]\(length\|random\|map\|filt
 $GREP -e "activeSlave[.]" --and -e "slaves\[..\?\][.]" --and --not -e '[.]ID' --and --not -e 'slaves\[..\?\][.]\(slaveName\|actualAge\|relation\|assignment\|age\|devotion\|trust\|vagina\)' -- 'src/*' | myprint "MaybeAccidentalMixingOfSlavesAndActiveSlave"
 # Check, e.g.  <<set foo == 4>>
 $GREP "<<set[^{>=]*==" -- 'src/*' | myprint "DoubleEqualsInSet"
+# Check for, e.g   <<if slaves[foo]>>
+$GREP "<<\([^>]\|[^>]>[^>]\)*[^$]slaves\[" -- 'src/*' | myprint "MissingDollar"
 
 # Check that we do not have any variables that we use only once.   e.g.     $onlyUsedOnce
 (
diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw
index 1649a817816..e5a4ceed67c 100644
--- a/src/uncategorized/genericPlotEvents.tw
+++ b/src/uncategorized/genericPlotEvents.tw
@@ -545,7 +545,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your
 	<<replace "#result">>
 	Since subjecting all the affected slaves to abortions would cause you severe losses, you've decided to let them keep the pregnancies. You hope you are prepared for all the children you'll be producing. Those who couldn't become pregnant @@.lime;gained some breast, hip and ass size@@, as well as @@.lime;began lactating@@.
 	<<for $i = 0; $i < $slaves.length; $i++>>
-		<<if ($slaves[$i].drugs == "breast injections") && canGetPregnant(slaves[$i])>>
+		<<if ($slaves[$i].drugs == "breast injections") && canGetPregnant($slaves[$i])>>
 			<<set $slaves[$i].preg = 1>>
 			<<set $slaves[$i].pregType = random(20,29)>>
 		<<elseif $slaves[$i].drugs == "breast injections">>
-- 
GitLab