From 8da9123ba362139cbe1a26b96ac1aefebf0ff680 Mon Sep 17 00:00:00 2001
From: kopareigns <kopareigns@gmail.com>
Date: Mon, 16 Jul 2018 20:47:26 -0400
Subject: [PATCH] JSify PlayerName, PoliteRudeTitle, and EventNameDelink

---
 devNotes/twine JS.txt                         | 46 +++++++++++++++++++
 src/events/intro/introSummary.tw              |  4 +-
 src/gui/Encyclopedia/encyclopedia.tw          |  2 +-
 src/js/assayJS.tw                             | 46 +++++++++++++++++++
 src/npc/acquisition.tw                        |  2 +-
 src/npc/fFeelings.tw                          |  4 +-
 ...ceBarracksAdditionalColonelInteractions.tw |  2 +-
 src/pregmod/fMarry.tw                         |  4 +-
 src/pregmod/managePersonalAffairs.tw          |  2 +-
 src/uncategorized/RESS.tw                     | 28 +++++------
 src/uncategorized/matchmaking.tw              |  4 +-
 src/uncategorized/pPeacekeepersDeficit.tw     |  2 +-
 .../pPeacekeepersIndependence.tw              |  2 +-
 src/uncategorized/pRivalryHostage.tw          |  2 +-
 src/uncategorized/pRivalryPeacekeepers.tw     |  2 +-
 src/uncategorized/peConcubineInterview.tw     |  4 +-
 src/utility/descriptionWidgetsStyle.tw        |  2 +-
 src/utility/descriptionWidgetsTattoos.tw      |  4 +-
 src/utility/miscWidgets.tw                    |  3 --
 19 files changed, 127 insertions(+), 38 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index c84bdc5df14..8d3f6d6dedd 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -6788,6 +6788,52 @@ window.SlaveFullName = function SlaveFullName(slave) {
 	return pair.join(" ");
 };
 
+window.PlayerName = function PlayerName() {
+    const V = State.variables;
+    const surnamesFirstCountries = [
+		"Cambodian",
+		"Chinese",
+		"Hungarian",
+		"Japanese",
+		"Korean",
+		"Mongolian",
+		"Taiwanese",
+		"Vietnamese"];
+    let names = [V.PC.name, V.PC.surname || ""];
+    
+    if ((V.surnameOrder !== 1) && (surnamesFirstCountries.includes(V.PC.nationality)))
+		names.reverse();
+	return names.join(" ").trim();
+};
+
+window.PoliteRudeTitle = function PoliteRudeTitle(slave) {
+	const V = State.variables, PC = V.PC, s = V.sEnunciate, ss = V.ssEnunciate;
+	
+	var r = "";
+	if (slave.nationality == "Japanese") {
+		if (slave.trust > 0) {
+			r += `${PC.name}${PC.title > 0 ? "kun" : "chan"}`;
+		} else {
+			r += (PC.surname ? PC.surname : `${PC.name}${s}an`);
+		}
+	} else {
+		if (slave.intelligence < -2) {
+			r += V.titleEnunciate
+		} else if (slave.intelligence > 1) {
+			r += (PC.title > 0 ? `Ma${s}ter` : `Mi${s}tre${ss}`);
+		} else if (slave.trust > 0) {
+			r += PC.name;
+		} else {
+			r += (PC.surname ? PC.surname : PC.name);
+		}
+	}
+	return r;
+};
+
+window.EventNameDelink = function EventNameDelink(slave) {
+	$("#name").empty().text(SlaveFullName(slave));
+};
+
 window.SlaveTitle = function SlaveTitle(slave) {
 	const V = State.variables;
 	let r = "";
diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw
index bda313366b4..7b18ef63fde 100644
--- a/src/events/intro/introSummary.tw
+++ b/src/events/intro/introSummary.tw
@@ -471,7 +471,7 @@ __''Player Character''__
 			[[feminine Mistress|Intro Summary][$PC.title = 0, $PCCreationSex = "feminine ''Mistress''"]]
 		<</if>>
 
-	<br>Everyone calls you ''<<PlayerName>>.''
+	<br>Everyone calls you ''<<= PlayerName()>>.''
 	<br>
 	With ''<<textbox "$PC.name" $PC.name>>'' as your given name and
 	<<if $PC.surname == 0>>
@@ -734,7 +734,7 @@ __''Player Character''__
 	<<else>>
 		feminine ''Mistress'
 	<</if>>
-	and everyone that matters calls you <<PlayerName>>.
+	and everyone that matters calls you <<= PlayerName()>>.
 
 	<br>
 	You are $PC.actualAge years old which is
diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw
index f2ab6d6654b..0900270de98 100644
--- a/src/gui/Encyclopedia/encyclopedia.tw
+++ b/src/gui/Encyclopedia/encyclopedia.tw
@@ -6,7 +6,7 @@
 PLAYING FREE CITIES
 **********/
 <<case "Playing Free Cities">>
-	Welcome to the Free Cities, <<PlayerName>>!
+	Welcome to the Free Cities, <<= PlayerName()>>!
 
 	<br><br>
 	//Future room for lore text//
diff --git a/src/js/assayJS.tw b/src/js/assayJS.tw
index 9a03663c6dc..c00d6ab477a 100644
--- a/src/js/assayJS.tw
+++ b/src/js/assayJS.tw
@@ -428,6 +428,52 @@ window.SlaveFullName = function SlaveFullName(slave) {
 	return pair.join(" ");
 };
 
+window.PlayerName = function PlayerName() {
+    const V = State.variables;
+    const surnamesFirstCountries = [
+		"Cambodian",
+		"Chinese",
+		"Hungarian",
+		"Japanese",
+		"Korean",
+		"Mongolian",
+		"Taiwanese",
+		"Vietnamese"];
+    let names = [V.PC.name, V.PC.surname || ""];
+    
+    if ((V.surnameOrder !== 1) && (surnamesFirstCountries.includes(V.PC.nationality)))
+		names.reverse();
+	return names.join(" ").trim();
+};
+
+window.PoliteRudeTitle = function PoliteRudeTitle(slave) {
+	const V = State.variables, PC = V.PC, s = V.sEnunciate, ss = V.ssEnunciate;
+	
+	var r = "";
+	if (slave.nationality == "Japanese") {
+		if (slave.trust > 0) {
+			r += `${PC.name}${PC.title > 0 ? "kun" : "chan"}`;
+		} else {
+			r += (PC.surname ? PC.surname : `${PC.name}${s}an`);
+		}
+	} else {
+		if (slave.intelligence < -2) {
+			r += V.titleEnunciate
+		} else if (slave.intelligence > 1) {
+			r += (PC.title > 0 ? `Ma${s}ter` : `Mi${s}tre${ss}`);
+		} else if (slave.trust > 0) {
+			r += PC.name;
+		} else {
+			r += (PC.surname ? PC.surname : PC.name);
+		}
+	}
+	return r;
+};
+
+window.EventNameDelink = function EventNameDelink(slave) {
+	$("#name").empty().text(SlaveFullName(slave));
+};
+
 window.SlaveTitle = function SlaveTitle(slave) {
 	const V = State.variables;
 	let r = "";
diff --git a/src/npc/acquisition.tw b/src/npc/acquisition.tw
index 00f939a2271..0c04374057e 100644
--- a/src/npc/acquisition.tw
+++ b/src/npc/acquisition.tw
@@ -142,7 +142,7 @@ You've done it.
 You arrive at your new arcology, $arcologies[0].name, and head straight to the penthouse to enter the access codes that will tell the $arcologies[0].name systems to recognize you as their owner. The penthouse office is ready to receive the codes, and they authenticate. A voice activates in your earpiece.
 <br><br>
 //Congratulations. I am a personal assistant program, and it is my pleasure to assist you,
-<<PlayerName>>
+<<= PlayerName()>>
 the new owner of $arcologies[0].name. I will offer useful information whenever possible in italics. Your new arcology has some unusual equipment. The previous owner kept a small stable of sex slaves. The penthouse therefore has a body modification studio for tattooing, bleaching and piercing, and an auto salon for more prosaic things like hair care. It also has a remote surgery, a small surgical theater that can be operated remotely by a qualified surgeon if you can pay the fee. Finally, it has a slave nutrition system connected to the arcology's hydroponics bays. This system produces a tasty protein-rich drink that provides the physically active female body all its necessary nutrients while leaving the lower digestive tract extremely clean. It even causes a mild increase in sex drive.
 <br><br>
 The previous owner seems to have left in something of a hurry.
diff --git a/src/npc/fFeelings.tw b/src/npc/fFeelings.tw
index 98fb32dabca..51aa204bd24 100644
--- a/src/npc/fFeelings.tw
+++ b/src/npc/fFeelings.tw
@@ -13,7 +13,7 @@
 	<<elseif ($activeSlave.trust >= -50)>>
 		<<if !canTalk($activeSlave)>>gestures<<elseif (_lisping == 1)>>lisps<<else>>mutters<</if>> hesitantly that it's wrong to keep $him a slave, and that you should free $him.
 	<<else>>
-		<<if !canTalk($activeSlave)>>gestures a perfunctory plea not to hurt $him.<<else>>mutters a perfunctory "Plea<<s>>e don't hurt me, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>."<</if>>
+		<<if !canTalk($activeSlave)>>gestures a perfunctory plea not to hurt $him.<<else>>mutters a perfunctory "Plea<<s>>e don't hurt me, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>."<</if>>
 	<</if>>
 
 <<elseif ($activeSlave.devotion < -20)>>
@@ -1039,7 +1039,7 @@ My favorite part of my body i<<s>>
 	<<elseif $activeSlave.devotion < -20 && $activeSlave.trust > 20>>
 		Of cour<<s>>e, I'm your wife, <<Master>>." $He sighs. "Any other que<<s>>tion<<s>>?
 	<<elseif $activeSlave.devotion < -20>>
-		I'm your wife, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle>><<else>><<Master>><</if>>." $He <<say>>s, $his voice wavering. "Plea<<s>>e let me go...
+		I'm your wife, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>." $He <<say>>s, $his voice wavering. "Plea<<s>>e let me go...
 	<<else>>
 		Of cour<<s>>e, I'm your wife, <<Master>>." $He <<say>>s. "It i<<s>>n't <<s>>o bad, I'm <<s>>tarting to like it.
 	<</if>>
diff --git a/src/pregmod/SecForceEX/SpecialForceBarracksAdditionalColonelInteractions.tw b/src/pregmod/SecForceEX/SpecialForceBarracksAdditionalColonelInteractions.tw
index 769f9a64500..c0f6aecc270 100644
--- a/src/pregmod/SecForceEX/SpecialForceBarracksAdditionalColonelInteractions.tw
+++ b/src/pregmod/SecForceEX/SpecialForceBarracksAdditionalColonelInteractions.tw
@@ -29,7 +29,7 @@
 					<<if $PC.slaving < 10>>
 						Your total lack of slavery skill (which is very unusual and very concerning for an arcology owner) means that you are of little to no help or even a hindrance.
 					<<elseif $PC.slaving >= 100>>
-						Your mastery of slaving allows you assist The Colonel greatly. However the shop owner is so impressed by your understanding of slavery that she is more than happy for an endorsement from you. As you are exiting the shop you hear your pre-recorded message which bears the slogan "This is (<<if def $PC.customTitle>>$PC.customTitle <</if>> <<PlayerName>>) and this is my favorite Paternalist shop in $arcologies[0].name."
+						Your mastery of slaving allows you assist The Colonel greatly. However the shop owner is so impressed by your understanding of slavery that she is more than happy for an endorsement from you. As you are exiting the shop you hear your pre-recorded message which bears the slogan "This is (<<if def $PC.customTitle>>$PC.customTitle <</if>> <<= PlayerName()>>) and this is my favorite Paternalist shop in $arcologies[0].name."
 						<<if $arcologies[0].prosperity < 20>>
 							<<set $arcologies[0].prosperity++>>
 						<</if>>
diff --git a/src/pregmod/fMarry.tw b/src/pregmod/fMarry.tw
index 5632317141d..47c784f81f8 100644
--- a/src/pregmod/fMarry.tw
+++ b/src/pregmod/fMarry.tw
@@ -585,9 +585,9 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 		<<elseif $assistantAppearance == "schoolgirl">>
 			"To get this marriage started," $assistantName concludes, "$activeSlave.slaveName, the rules say you should now <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s dick<<if $PC.vagina == 1>> and eat <<if $PC.title == 1>>his<<else>>$his<</if>> pussy<</if>><<else>>eat the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s pussy<</if>>." The slave <<if _reactionType == 0>>only starts when you push $his head to your crotch<<elseif _reactionType == 1>>eagerly complies<<elseif _reactionType == 2>>reluctantly obeys<<else>>hurries to obey<</if>>. Pleased by the sight, $assistantName's avatar starts to jill off.
 		<<elseif $assistantAppearance == "angel">>
-			"To consummate the marriage," $assistantName concludes, "$activeSlave.slaveName, you must now join <<PlayerName>> in their bedroom and consummate this marriage." The slave <<if _reactionType == 0>>stares blankly<<else>>looks confused<</if>>. "After the wedding ends, would be the time." $assistantName says, covering _his2 face in embarrassment at the thought.
+			"To consummate the marriage," $assistantName concludes, "$activeSlave.slaveName, you must now join <<= PlayerName()>> in their bedroom and consummate this marriage." The slave <<if _reactionType == 0>>stares blankly<<else>>looks confused<</if>>. "After the wedding ends, would be the time." $assistantName says, covering _his2 face in embarrassment at the thought.
 		<<elseif $assistantAppearance == "cherub">>
-			"To consummate the marriage," $assistantName concludes, "$activeSlave.slaveName, you should <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s cock<<if $PC.vagina == 1>>and lick their pussy,<</if>><<else>>lick the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s pussy<</if>>, in the privacy of <<PlayerName>>'s bedroom, of course." $assistantName hides _his2 face in _his2 hands at the thought.
+			"To consummate the marriage," $assistantName concludes, "$activeSlave.slaveName, you should <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s cock<<if $PC.vagina == 1>>and lick their pussy,<</if>><<else>>lick the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s pussy<</if>>, in the privacy of <<= PlayerName()>>'s bedroom, of course." $assistantName hides _his2 face in _his2 hands at the thought.
 		<<elseif $assistantAppearance == "incubus">>
 			"To get this marriage started," $assistantName concludes, "$activeSlave.slaveName, you will now <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s dick<<if $PC.vagina == 1>> and eat <<if $PC.title == 1>>his<<else>>$his<</if>> pussy<</if>><<else>>eat the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s pussy<</if>>." The slave <<if _reactionType == 0>>only starts when you push $his head to your crotch<<elseif _reactionType == 1>>eagerly complies<<elseif _reactionType == 2>>reluctantly obeys<<else>>hurries to obey<</if>>. Enjoying the sight, $assistantName's avatar begins to furiously stroke its shaft.
 		<<elseif $assistantAppearance == "succubus">>
diff --git a/src/pregmod/managePersonalAffairs.tw b/src/pregmod/managePersonalAffairs.tw
index c46da7508ce..3bb86444fe9 100644
--- a/src/pregmod/managePersonalAffairs.tw
+++ b/src/pregmod/managePersonalAffairs.tw
@@ -281,7 +281,7 @@ On formal occasions, you are announced as $PCTitle. By slaves, however, you pref
 			<<set $rep -= 500>>
 			<<replace "#nameResult">>
 				<<set $PC.name = _PCNamet>>
-				You will now be known as <<PlayerName>>.
+				You will now be known as <<= PlayerName()>>.
 			<</replace>>
 		<</link>>
 	<</replace>>
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index 98fc8445765..a3ee5b57462 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -861,7 +861,7 @@ One morning, despite the fact that she is not allowed to speak without being spo
 	<</if>>
 	"I'm tired, can I have the day off?" She didn't even call you <<= WrittenMaster()>>.
 <<else>>
-	boldly, "I'm tired, can I have the day off, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>?"
+	boldly, "I'm tired, can I have the day off, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>?"
 <</if>>
 
 <<case "fearful humiliation">>
@@ -2471,7 +2471,7 @@ She's chosen to do it in a dark corner and looks like she's hurrying; she clearl
 <<if !canTalk($activeSlave)>>
 	She nervously gestures that she wasn't doing anything.
 <<else>>
-	"I wa<<s>>n't doing anything, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>!" she lies.
+	"I wa<<s>>n't doing anything, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>!" she lies.
 <</if>>
 
 <<case "hates oral">>
@@ -3424,7 +3424,7 @@ During her weekly inspection, <<EventNameLink $activeSlave>> has trouble followi
 <<case "chastity">>h-having my p-part<<s>> locked up in ch-cha<<s>>tity
 <<default>>n-never knowing what th-the p-punishment will be
 <</switch>>
-wh-when I'm bad, e-everything, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. Oh, oh, I'm <<s>>orry, p-plea<<s>>e, I'm <<s>>orry I, I'm like thi<<s>>, I'm crying, p-plea<<s>>e <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>, plea<<s>>e don't..." She trails off, giving you a look of supplication.
+wh-when I'm bad, e-everything, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. Oh, oh, I'm <<s>>orry, p-plea<<s>>e, I'm <<s>>orry I, I'm like thi<<s>>, I'm crying, p-plea<<s>>e <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>, plea<<s>>e don't..." She trails off, giving you a look of supplication.
 
 <<case "frightening dick">>
 
@@ -6098,21 +6098,21 @@ May I plea<<s>>e try out <<s>>omething <<s>>kimpier today?"
 	<<if $activeSlave.preg > 38 && $activeSlave.pregControl != "labor supressors">>
 		and I think it might be time <<s>>oon,
 	<</if>>
-	<<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>."
+	<<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>."
 	<br><br>
 	You then conduct a more thorough inspection, from the top of her $activeSlave.hColor-haired head on down. She complies submissively, obviously expecting to be abused at any moment. She obediently <<if ($activeSlave.boobs > 1000)>>lifts each of her massive breasts one by one to display each of them from all angles.<<elseif $activeSlave.belly >= 5000>> allows you to do as you will to her gravid stomach.<<else>>opens her mouth and sticks out her tongue on command.<</if>> She even obeys an instruction to <<if ($activeSlave.dick > 1)>>take herself by the dickhead and pull her member flat up against her abdomen.<<elseif ($activeSlave.dick > 0)>>take her little dickhead between a thumb and forefinger and hold herself out straight to reveal how tiny she really is.<<elseif ($activeSlave.clit > 1)>>push back her hood to reveal all of her enormous clit.<<elseif ($activeSlave.labia > 1)>>spread her meaty labia to reveal her cunt.<<elseif $activeSlave.vagina == -1>>really show off her smooth groin, displaying every bit of it, down to the tiny hole that's its only feature.<<else>>spread her pussylips to show off her cunt.<</if>>
 	<br><br>
 	Finally the inspection reaches her backdoor, so you tell her to turn around, bend over, and pull her buttocks apart as wide as she can. She tenses in fear, obviously expecting anal rape, but after a moment of hesitation, she obeys. She turns, <<if $activeSlave.belly >= 10000>>carefully bends<<else>>bends<</if>>, and <<if ($activeSlave.butt > 5)>>grabs a handful of buttcheek in both hands, trembling as she spreads her ass to reveal<<elseif ($activeSlave.butt > 2)>>harshly pulls her own buttcheeks apart, clearly hoping that if she treats herself this way, you won't. She reveals<<else>>even though her trim ass has already revealed everything, uses her hands to spread herself even wider to show off<</if>> her <<if ($activeSlave.anus > 2)>>poor, overused asshole, which despite her terror is still gaping a little.<<elseif ($activeSlave.anus > 1)>>her asshole, which is clenched tight in terror.<<else>>invitingly tight asshole, which is clenched hard in terror.<</if>> Maintaining your neutral tone, you ask her how she feels about anal sex.
 	<<if ($activeSlave.anus == 0)>>
-		"It'<<s>> <<s>>-<<s>>cary, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. I'm afraid it'll h-hurt," she gasps out.
+		"It'<<s>> <<s>>-<<s>>cary, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. I'm afraid it'll h-hurt," she gasps out.
 	<<elseif ($activeSlave.fetishKnown == 1) && ($activeSlave.fetish == "buttslut")>>
-		"It's o-okay, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. I d-don't hate it," she gasps out.
+		"It's o-okay, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. I d-don't hate it," she gasps out.
 	<<elseif ($activeSlave.sexualFlaw == "hates anal")>>
-		"I h-hate it, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. It'<<s>> d-dirty and it hurt<<s>>," she gasps out.
+		"I h-hate it, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. It'<<s>> d-dirty and it hurt<<s>>," she gasps out.
 	<<elseif ($activeSlave.anus > 2)>>
-		"It'<<s>> not that bad, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. I'm u<<s>>ed to getting a<<ss>>fucked, I gue<<ss>>," she <<say>>s haltingly.
+		"It'<<s>> not that bad, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. I'm u<<s>>ed to getting a<<ss>>fucked, I gue<<ss>>," she <<say>>s haltingly.
 	<<else>>
-		"I h-hate it, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. I'm n-not u<<s>>ed to it, and it hurt<<s>>," she gasps out.
+		"I h-hate it, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. I'm n-not u<<s>>ed to it, and it hurt<<s>>," she gasps out.
 	<</if>>
 	Without another word, you tell her she can go. She looks around to gape uncomprehendingly at you for a moment before letting go of her buttocks, straightening up, and <<if $activeSlave.belly >= 10000>>quickly waddling<<else>>fleeing<</if>>, feeling rather mystified that you @@.mediumaquamarine;didn't use her.@@
 	<<set $activeSlave.trust += 4>>
@@ -8604,7 +8604,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 	<<if !canTalk($activeSlave)>>
 		She slowly spells out a question with her hands, asking if she's a good slave.
 	<<else>>
-		She mumbles a hesitant question: "<<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>, am I a good <<s>>lave?"
+		She mumbles a hesitant question: "<<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>, am I a good <<s>>lave?"
 	<</if>>
 	You tell her that she is, running a hand <<if $activeSlave.hStyle == "shaved bald">>across her bald scalp<<else>>through her hair<</if>>. She seems @@.hotpink;reassured,@@ and thankful when you give her a cup of her proper rations from your own hand.
 	<<set $activeSlave.devotion += 4, $activeSlave.oralCount++, $oralTotal++>>
@@ -8617,13 +8617,13 @@ You tell her kindly that you understand, and that she'll be trained to address t
 	<<if !canTalk($activeSlave)>>
 		She sadly gestures at the spigot and then flicks her own head.
 	<<else>>
-		She <<say>>s sadly, "<<S>>orry <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>. I'm trying to be a good <<s>>lave but it'<<s>> hard."
+		She <<say>>s sadly, "<<S>>orry <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>. I'm trying to be a good <<s>>lave but it'<<s>> hard."
 	<</if>>
 	You kindly tell her that you know she's trying, and that that's what really matters.
 	<<if !canTalk($activeSlave)>>
 		Her hands awkwardly ask, "Really?"
 	<<else>>
-		"Really, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>?" she asks hopefully.
+		"Really, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>?" she asks hopefully.
 	<</if>>
 	You whisper into her ear that yes, she will be all right as long as she does her best. She wiggles her butt against you a little and giggles <<if $PC.dick == 1>>at the responding stiffness she feels between her buttocks<<else>>as you shove her to her knees<</if>>. She shimmies down and <<if $PC.dick == 1>>takes you into her mouth<<if $PC.vagina == 1>> and does her best to reach the top of your pussy with the tip of her tongue<</if>><<else>>eats you out<</if>>, <<if canSee($activeSlave)>>looking you in the eyes the whole time and <</if>>@@.hotpink;smiling@@ as much as she can manage with <<if $PC.dick == 1>>a dick in her mouth<<else>>her tongue working your clit<</if>>.
 	<<set $activeSlave.devotion += 4, $activeSlave.oralCount++, $oralTotal++>>
@@ -9205,7 +9205,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 	<<if !canTalk($activeSlave)>>
 		She frantically uses her hands to promise you perfect obedience if you'll only spare her from emasculation.
 	<<else>>
-		She begs through tears, "Plea<<s>>e no, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>! Plea<<s>>e let me keep them! Plea<<s>>e!"
+		She begs through tears, "Plea<<s>>e no, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>! Plea<<s>>e let me keep them! Plea<<s>>e!"
 	<</if>>
 	You patiently inform her that she can - for now, and so long as she is a good little girl. She flees from the room backwards, bowing, scraping, and profusely thanking you, repeating desperate @@.gold;promises of good behavior.@@
 	<<set $activeSlave.trust -= 5>>
@@ -18055,7 +18055,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 		<<else>>
 			into your shoulder,
 		<</if>>
-		stroking it reassuringly and murmuring kindness. She clings to you, mostly for lack of any other comfort in the whole world, and sobs convulsively, @@.mediumaquamarine;her terror flowing out of her@@ in a torrent as you gently rub her back. When she's mostly cried herself out, you tell her that she'll be all right. You're sure she'll be a good slave one day. You understand that her life is hard. She'll make mistakes, and you'll punish her for them, but that's part of slave training, and that's all right. If she does her best, she'll be all right. She sniffles, cuffing tears away. "Th-thank you, <<if $activeSlave.rudeTitle == 1>><<PoliteRudeTitle $activeSlave>><<else>><<Master>><</if>>, I'll d-do my b-be<<s>>t," she manages to <<say>>.
+		stroking it reassuringly and murmuring kindness. She clings to you, mostly for lack of any other comfort in the whole world, and sobs convulsively, @@.mediumaquamarine;her terror flowing out of her@@ in a torrent as you gently rub her back. When she's mostly cried herself out, you tell her that she'll be all right. You're sure she'll be a good slave one day. You understand that her life is hard. She'll make mistakes, and you'll punish her for them, but that's part of slave training, and that's all right. If she does her best, she'll be all right. She sniffles, cuffing tears away. "Th-thank you, <<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>><<else>><<Master>><</if>>, I'll d-do my b-be<<s>>t," she manages to <<say>>.
 		<<set $activeSlave.trust += 5>>
 	<</replace>>
 <</link>>
diff --git a/src/uncategorized/matchmaking.tw b/src/uncategorized/matchmaking.tw
index 5e90eda66f0..493ec1041fb 100644
--- a/src/uncategorized/matchmaking.tw
+++ b/src/uncategorized/matchmaking.tw
@@ -274,9 +274,9 @@ Despite her devotion and trust, she is still a slave, and probably knows that he
 		<<elseif $assistantAppearance == "schoolgirl">>
 			"To get this marriage started," $assistantName concludes, "$eventSlave.slaveName, the rules say you should now <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s dick<<if $PC.vagina == 1>> and eat <<if $PC.title == 1>>his<<else>>her<</if>> pussy<</if>><<else>>eat the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s pussy<</if>>." The slave complies eagerly. Pleased by the sight, $assistantName's avatar starts to jill off.
 		<<elseif $assistantAppearance == "angel">>
-			"To consummate the marriage," $assistantName concludes, "$eventSlave.slaveName, you must now join <<PlayerName>> in their bedroom and consummate this marriage." The slave looks confused. "After the wedding ends, would be the time." $assistantName says, covering her face in embarrassment at the thought.
+			"To consummate the marriage," $assistantName concludes, "$eventSlave.slaveName, you must now join <<= PlayerName()>> in their bedroom and consummate this marriage." The slave looks confused. "After the wedding ends, would be the time." $assistantName says, covering her face in embarrassment at the thought.
 		<<elseif $assistantAppearance == "cherub">>
-			"To consummate the marriage," $assistantName concludes, "$eventSlave.slaveName, you should <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s cock<<if $PC.vagina == 1>>and lick their pussy,<</if>><<else>>lick the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s pussy<</if>>, in the privacy of <<PlayerName>>'s bedroom, of course." $assistantName hides her face in her hands at the thought.
+			"To consummate the marriage," $assistantName concludes, "$eventSlave.slaveName, you should <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s cock<<if $PC.vagina == 1>>and lick their pussy,<</if>><<else>>lick the <<if $PC.title == 1>>groom<<else>>the bride<</if>>'s pussy<</if>>, in the privacy of <<= PlayerName()>>'s bedroom, of course." $assistantName hides her face in her hands at the thought.
 		<<elseif $assistantAppearance == "incubus">>
 			"To get this marriage started," $assistantName concludes, "$eventSlave.slaveName, you will now <<if $PC.dick == 1>>suck the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s dick<<if $PC.vagina == 1>> and eat <<if $PC.title == 1>>his<<else>>her<</if>> pussy<</if>><<else>>eat the <<if $PC.title == 1>>groom<<else>>bride<</if>>'s pussy<</if>>." The slave complies eagerly. Enjoying the sight, $assistantName's avatar begins to furiously stroke its shaft.
 		<<elseif $assistantAppearance == "succubus">>
diff --git a/src/uncategorized/pPeacekeepersDeficit.tw b/src/uncategorized/pPeacekeepersDeficit.tw
index a95c9610ca7..2151aa50c1a 100644
--- a/src/uncategorized/pPeacekeepersDeficit.tw
+++ b/src/uncategorized/pPeacekeepersDeficit.tw
@@ -6,7 +6,7 @@ General $peacekeepers.generalName's peacekeeping force has stabilized the neighb
 
 <br><br>
 
-It's a video link, and the general is in the field somewhere, wearing scuffed armor with his insignia of rank on the neck protector. He looks tired, and stress worse than simple fatigue is etched on his face, but he looks at you directly and gets on with it. "<<PlayerName>>," he says, "to start, I'd like to assure you this is a secure line from my end. We rely on structural security more than you in the Free Cities, with your cutting-edge computing power, but it's effective." He's in what looks like a field command post, in what's almost certainly an improvised secure communications booth. "The situation is this," he explains. "I have two problems, and I hope you may be able to solve them both at once in a way that will be beneficial to you."
+It's a video link, and the general is in the field somewhere, wearing scuffed armor with his insignia of rank on the neck protector. He looks tired, and stress worse than simple fatigue is etched on his face, but he looks at you directly and gets on with it. "<<= PlayerName()>>," he says, "to start, I'd like to assure you this is a secure line from my end. We rely on structural security more than you in the Free Cities, with your cutting-edge computing power, but it's effective." He's in what looks like a field command post, in what's almost certainly an improvised secure communications booth. "The situation is this," he explains. "I have two problems, and I hope you may be able to solve them both at once in a way that will be beneficial to you."
 
 <br><br>
 
diff --git a/src/uncategorized/pPeacekeepersIndependence.tw b/src/uncategorized/pPeacekeepersIndependence.tw
index 2ecf9872cce..e4047a07693 100644
--- a/src/uncategorized/pPeacekeepersIndependence.tw
+++ b/src/uncategorized/pPeacekeepersIndependence.tw
@@ -4,7 +4,7 @@
 
 <<set $peacekeepers.strength = -10>>
 
-General $peacekeepers.generalName contacts you again, looking more tired and battered than ever. There's a strange light in his eyes, though, as though he's resolved to make a big bet. And once he starts speaking, it turns out that he is. "<<PlayerName>>," he says, "<<if $peacekeepers.attitude > 10>>you've been supportive of my peacekeeping mission here in the past<<else>>I understand your attitude towards my peacekeeping mission here must be mixed<</if>>. But all that's about to change." He straightens up, falling back on a military bearing. "The support - funding, supply, everything - for my men and women here is ending, effective now. Right now, in fact. I'm not sure how I'm going to get everyone home." He looks through the video feed at you.
+General $peacekeepers.generalName contacts you again, looking more tired and battered than ever. There's a strange light in his eyes, though, as though he's resolved to make a big bet. And once he starts speaking, it turns out that he is. "<<= PlayerName()>>," he says, "<<if $peacekeepers.attitude > 10>>you've been supportive of my peacekeeping mission here in the past<<else>>I understand your attitude towards my peacekeeping mission here must be mixed<</if>>. But all that's about to change." He straightens up, falling back on a military bearing. "The support - funding, supply, everything - for my men and women here is ending, effective now. Right now, in fact. I'm not sure how I'm going to get everyone home." He looks through the video feed at you.
 
 <br><br>
 
diff --git a/src/uncategorized/pRivalryHostage.tw b/src/uncategorized/pRivalryHostage.tw
index 32a987532bd..cff5a9bba7b 100644
--- a/src/uncategorized/pRivalryHostage.tw
+++ b/src/uncategorized/pRivalryHostage.tw
@@ -222,7 +222,7 @@ Only a few days into your inter-arcology war, you receive a video message from y
 but you do remember her, and your rival knows it. This is obviously the best they could come up with to provoke an emotional reaction.
 
 <br><br>
-"Hello, <<PlayerName>>," your rival sneers. "Sorry to pull you away from
+"Hello, <<= PlayerName()>>," your rival sneers. "Sorry to pull you away from
 <<switch $rivalryFS>>
 <<case "Racial Subjugationism">>
 	whipping some poor $arcologies[0].FSSubjugationistRace girl's back bloody,
diff --git a/src/uncategorized/pRivalryPeacekeepers.tw b/src/uncategorized/pRivalryPeacekeepers.tw
index 2d2c01caeab..211f982dc27 100644
--- a/src/uncategorized/pRivalryPeacekeepers.tw
+++ b/src/uncategorized/pRivalryPeacekeepers.tw
@@ -2,7 +2,7 @@
 
 <<set $nextButton = "Continue", $nextLink = "P rivalry actions">>
 
-This is a busy time, and $assistantName's call prioritization functions are invaluable. You don't have time for everyone. General $peacekeepers.generalName is fairly high up the list, though. "<<PlayerName>>, thank you for taking the time to speak with me," he greets you. "I understand you've got a lot on your plate right now, so I'll be brief. My intel shop has discovered a slaving ring in the area under my control, run by your rival." He gestures to someone out of view, and a limited overview of his intelligence is delivered to $assistantName. The general has given you just enough to verify the ownership of the operation. It does indeed belong to the enemy.
+This is a busy time, and $assistantName's call prioritization functions are invaluable. You don't have time for everyone. General $peacekeepers.generalName is fairly high up the list, though. "<<= PlayerName()>>, thank you for taking the time to speak with me," he greets you. "I understand you've got a lot on your plate right now, so I'll be brief. My intel shop has discovered a slaving ring in the area under my control, run by your rival." He gestures to someone out of view, and a limited overview of his intelligence is delivered to $assistantName. The general has given you just enough to verify the ownership of the operation. It does indeed belong to the enemy.
 
 <br><br>
 
diff --git a/src/uncategorized/peConcubineInterview.tw b/src/uncategorized/peConcubineInterview.tw
index c809bea0769..73975d0d0c8 100644
--- a/src/uncategorized/peConcubineInterview.tw
+++ b/src/uncategorized/peConcubineInterview.tw
@@ -71,7 +71,7 @@ You receive an official communication from a popular talk show ehosted in one of
 	<</if>>
 	They seat themselves in comfortable leather chairs and the interview begins in earnest.
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
-	The host asks her some soft, nonjudgmental questions about her life and how she became your slave. Then he hits her: "So, $activeSlave.slaveName. Tell us about <<PlayerName>>."
+	The host asks her some soft, nonjudgmental questions about her life and how she became your slave. Then he hits her: "So, $activeSlave.slaveName. Tell us about <<= PlayerName()>>."
 	<<if $activeSlave.devotion > 95>>
 		@@.green;Without a moment's hesitation,@@ she <<if _lisps>>lisps<<else>>proclaims<</if>>, "I love <<if $PC.title != 0>>him. He'<<s>> so hand<<s>>ome, and," she manages to blush prettily, "he'<<s>> <<s>>o good to me."<<else>>her. <<Sh>>e'<<s>> <<s>>o pretty, and," she manages to blush cutely, "<<sh>>e'<<s>> <<s>>o good to me."<</if>>
 		<<set $rep += 100>>
@@ -107,7 +107,7 @@ You receive an official communication from a popular talk show ehosted in one of
 		<<else>>
 			giving it a good feel.
 		<</if>>
-		"Now I'm sure our viewers are wondering," He says, patting the firm dome. "Is it <<PlayerName>>'s?"
+		"Now I'm sure our viewers are wondering," He says, patting the firm dome. "Is it <<= PlayerName()>>'s?"
 		<<if $activeSlave.pregSource == -1>>
 			<<if $activeSlave.bellyPreg >= 450000>>
 				"Of cour<<s>>e they are!" She proclaims proudly as she runs her hands across her quivering mass. "All $activeSlave.pregType of them!"
diff --git a/src/utility/descriptionWidgetsStyle.tw b/src/utility/descriptionWidgetsStyle.tw
index 7ad2a3c6d5d..f2b15026381 100644
--- a/src/utility/descriptionWidgetsStyle.tw
+++ b/src/utility/descriptionWidgetsStyle.tw
@@ -326,7 +326,7 @@ $activeSlave.slaveName is
 	<<elseif ($activeSlave.pregKnown == 1)>>
 		"I'm Pregnant!" across the front in large letters.
 	<<else>>
-		"Property of <<PlayerName>>" across the front.
+		"Property of <<= PlayerName()>>" across the front.
 	<</if>>
 	<<if ($activeSlave.amp == 1)>>
 		/* no description yet */
diff --git a/src/utility/descriptionWidgetsTattoos.tw b/src/utility/descriptionWidgetsTattoos.tw
index bfff48142ea..45fa1a52c1e 100644
--- a/src/utility/descriptionWidgetsTattoos.tw
+++ b/src/utility/descriptionWidgetsTattoos.tw
@@ -79,7 +79,7 @@
 	<<case "sacrament">>
 		$His face is subtly tattooed to give $him a decidedly angelic appearance.
 	<<case "possessive">>
-		'Property of <<PlayerName>>' is tattooed across $his forehead.
+		'Property of <<= PlayerName()>>' is tattooed across $his forehead.
 	<<case "paternalist">>
 		'Beloved $desc' is tattooed across one of $his cheeks.
 	<<default>>
@@ -120,7 +120,7 @@
 	<<case "sacrament">>
 		Each of $his breasts is tattooed with a depiction of a crucifix, with $his nipples forming the center.
 	<<case "possessive">>
-		Your personal symbol is tattooed above $his left breast, '<<PlayerName>>' above $his right, leaving the rest of $his chest and breasts bare.
+		Your personal symbol is tattooed above $his left breast, '<<= PlayerName()>>' above $his right, leaving the rest of $his chest and breasts bare.
 	<<case "paternalist">>
 		'<<if $PC.title == 1>>Master<<else>>Mistress<</if>>'s' is tattooed across the top of $his right breast; 'Darling' is tattooed across the top of $his left.
 	<<default>>
diff --git a/src/utility/miscWidgets.tw b/src/utility/miscWidgets.tw
index 3140f743a2d..13e0542dc34 100644
--- a/src/utility/miscWidgets.tw
+++ b/src/utility/miscWidgets.tw
@@ -2020,9 +2020,6 @@ This experience
 <</widget>>
 
 /* see how they are on a single line? This permits "."s and other things to be appended directly onto the widget result */
-<<widget "PlayerName">><<if $surnameOrder != 1>><<switch $PC.nationality>><<case "Cambodian" "Chinese" "Hungarian" "Japanese" "Korean" "Mongolian" "Taiwanese" "Vietnamese">><<if $PC.surname>>$PC.surname <</if>>$PC.name<<default>>$PC.name<<if $PC.surname>> $PC.surname<</if>><</switch>><<else>>$PC.name<<if $PC.surname>> $PC.surname<</if>><</if>><</widget>>
-
-<<widget "PoliteRudeTitle">><<switch $args[0].nationality>><<case "Japanese">><<if $args[0].trust > 0>>$PC.name<<if $PC.title > 0>>kun<<else>>chan<</if>><<else>><<if $PC.surname>><<print $PC.surname>><<else>><<print $PC.name>><<s>>an<</if>><</if>><<default>><<if $args[0].intelligence < -2>><<Master>><<elseif $args[0].intelligence > 1>><<if $PC.title > 0>>Ma<<s>>ther<<else>>Mi<<s>>tre<<ss>><</if>><<elseif $args[0].trust > 0>>$PC.name<<else>><<if $PC.surname>>$PC.surname<<else>>$PC.name<</if>><</if>><</switch>><</widget>>
 
 /*
  Call as <<EventNameLink>>
-- 
GitLab