From 29b0ee2f45915705072c000453a7131bbd34942e Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Fri, 3 Jul 2020 10:54:25 +0200
Subject: [PATCH] get pronouns properly

---
 src/events/scheduled/murderAttempt.js | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/events/scheduled/murderAttempt.js b/src/events/scheduled/murderAttempt.js
index 79ffdff1bc4..4b58c6ff6f6 100644
--- a/src/events/scheduled/murderAttempt.js
+++ b/src/events/scheduled/murderAttempt.js
@@ -5,21 +5,9 @@ App.Events.murderAttempt = function() {
 	const variation = jsEither(["trade", "slave", "drug", "military"]);
 	const companyName = "RealTec"; // TODO generate name
 	const isSincere = Math.random() > 0.6;
-	// TODO get business man pronouns dynamically
-	let he, man, himself, him, his;
-	if (V.arcologies[0].FSGenderRadicalist === "unset") {
-		he = "he";
-		his = "his";
-		him = "him";
-		man = "man";
-		himself = "himself";
-	} else {
-		he = "she";
-		his = "her";
-		him = "her";
-		man = "woman";
-		himself = "herself";
-	}
+
+	const {he, his, him, woman: man, himself} = getPronouns(V.arcologies[0].FSGenderRadicalist === "unset"
+		? {pronoun: App.Data.Pronouns.Kind.male} : {pronoun: App.Data.Pronouns.Kind.female});
 
 	const documentFragment = document.createDocumentFragment();
 	intro(documentFragment);
-- 
GitLab