From f6e89d08ee8a0b093d465c885a74e6313f615a3e Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Wed, 31 May 2017 10:37:29 -0400
Subject: [PATCH] Traitor addslave tweak.

---
 src/utility/miscWidgets.tw | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw
index 5de15393df4..0151ebf9f2c 100644
--- a/src/utility/miscWidgets.tw
+++ b/src/utility/miscWidgets.tw
@@ -1362,7 +1362,15 @@
 	<<set $REReductionCheckinIDs.push($args[0].ID)>>
 <</if>>
 
-<<set $slaves.push($args[0]), $genePool.push($args[0])>>
+<<set $slaves.push($args[0])>>
+<<if $args[0].origin != "She was your slave, but you freed her, which she repaid by participating in a coup attempt against you. It failed, and she is again your chattel.">>
+	<<set $genePool.push($args[0])>>
+<<else>>
+	<<set _t = $genePool.findIndex(function(s) { return s.ID == $args[0].ID; })>>
+	<<if _t == -1>> /* traitor somehow not found */
+		<<set $genePool.push($args[0])>>
+	<</if>>
+<</if>>
 
 /* add to facilities array if needed */
 <<if $args[0].assignment != "rest">>
-- 
GitLab