From 342ebeaaa4f47dee01b4d189d561beafd342c8f6 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Fri, 21 Aug 2020 16:24:08 -0700
Subject: [PATCH] Move SmartPiercing namespace from EndWeek to SlaveAssignment.

---
 src/endWeek/smartPiercingEffects.js    | 46 +++++++++++++-------------
 src/uncategorized/saLongTermEffects.tw |  2 +-
 2 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/endWeek/smartPiercingEffects.js b/src/endWeek/smartPiercingEffects.js
index 84ccca5436b..d99fd5db45e 100644
--- a/src/endWeek/smartPiercingEffects.js
+++ b/src/endWeek/smartPiercingEffects.js
@@ -1,8 +1,8 @@
-App.EndWeek.SmartPiercing = {};
+App.SlaveAssignment.SmartPiercing = {};
 
 /* -- Normal settings -- */
 
-App.EndWeek.SmartPiercing.BASE = class {
+App.SlaveAssignment.SmartPiercing.BASE = class {
 	/** Base class for smart piercing settings; encapsulates shared logic and interface
 	 * @param {App.Entity.SlaveState} slave */
 	constructor(slave) {
@@ -46,7 +46,7 @@ App.EndWeek.SmartPiercing.BASE = class {
 	}
 };
 
-App.EndWeek.SmartPiercing.none = class extends App.EndWeek.SmartPiercing.BASE {
+App.SlaveAssignment.SmartPiercing.none = class extends App.SlaveAssignment.SmartPiercing.BASE {
 	effect(magnitude) {
 		this.slave.devotion -= 1 + magnitude; // 2, 3, or 4
 		this.slave.energy -= 10 + 3 * magnitude; // 10, 13, or 16
@@ -58,7 +58,7 @@ App.EndWeek.SmartPiercing.none = class extends App.EndWeek.SmartPiercing.BASE {
 	}
 };
 
-App.EndWeek.SmartPiercing.all = class extends App.EndWeek.SmartPiercing.BASE {
+App.SlaveAssignment.SmartPiercing.all = class extends App.SlaveAssignment.SmartPiercing.BASE {
 	effect(magnitude) {
 		this.slave.energy += 1 + 2 * magnitude; // 3, 5, or 7
 	}
@@ -73,7 +73,7 @@ App.EndWeek.SmartPiercing.all = class extends App.EndWeek.SmartPiercing.BASE {
 	}
 };
 
-App.EndWeek.SmartPiercing.GENDERBASE = class extends App.EndWeek.SmartPiercing.BASE {
+App.SlaveAssignment.SmartPiercing.GENDERBASE = class extends App.SlaveAssignment.SmartPiercing.BASE {
 	/** Base class for gender settings; encapsulates shared logic for attraction modification
 	 * @param {App.Entity.SlaveState} slave
 	 * @param {string} property slave property to adjust
@@ -126,7 +126,7 @@ App.EndWeek.SmartPiercing.GENDERBASE = class extends App.EndWeek.SmartPiercing.B
 	}
 };
 
-App.EndWeek.SmartPiercing.women = class extends App.EndWeek.SmartPiercing.GENDERBASE {
+App.SlaveAssignment.SmartPiercing.women = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
 	constructor(slave) {
 		super(slave, "attrXX", true);
 	}
@@ -137,7 +137,7 @@ App.EndWeek.SmartPiercing.women = class extends App.EndWeek.SmartPiercing.GENDER
 	}
 };
 
-App.EndWeek.SmartPiercing["anti-women"] = class extends App.EndWeek.SmartPiercing.GENDERBASE {
+App.SlaveAssignment.SmartPiercing["anti-women"] = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
 	constructor(slave) {
 		super(slave, "attrXX", false);
 	}
@@ -148,7 +148,7 @@ App.EndWeek.SmartPiercing["anti-women"] = class extends App.EndWeek.SmartPiercin
 	}
 };
 
-App.EndWeek.SmartPiercing.men = class extends App.EndWeek.SmartPiercing.GENDERBASE {
+App.SlaveAssignment.SmartPiercing.men = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
 	constructor(slave) {
 		super(slave, "attrXY", true);
 	}
@@ -159,7 +159,7 @@ App.EndWeek.SmartPiercing.men = class extends App.EndWeek.SmartPiercing.GENDERBA
 	}
 };
 
-App.EndWeek.SmartPiercing["anti-men"] = class extends App.EndWeek.SmartPiercing.GENDERBASE {
+App.SlaveAssignment.SmartPiercing["anti-men"] = class extends App.SlaveAssignment.SmartPiercing.GENDERBASE {
 	constructor(slave) {
 		super(slave, "attrXY", false);
 	}
@@ -174,7 +174,7 @@ App.EndWeek.SmartPiercing["anti-men"] = class extends App.EndWeek.SmartPiercing.
 /* -- Fetish settings -- */
 
 // special pseudo-fetish setting, doesn't extend FETISHBASE
-App.EndWeek.SmartPiercing.vanilla = class extends App.EndWeek.SmartPiercing.BASE {
+App.SlaveAssignment.SmartPiercing.vanilla = class extends App.SlaveAssignment.SmartPiercing.BASE {
 	// FIXME: weirdly, there's no gradual decrease here...vanilla setting just suddenly makes the slave lose all interest in her fetish, if it fires
 	// also, it has no effect once the fetish is changed...never increases the strength.  not sure why this is, but I'm leaving it this way for now.
 	// if you want to make it behave like all the others, just make it extend FETISHBASE and construct it with super(slave, "none").
@@ -194,7 +194,7 @@ App.EndWeek.SmartPiercing.vanilla = class extends App.EndWeek.SmartPiercing.BASE
 	}
 };
 
-App.EndWeek.SmartPiercing.FETISHBASE = class extends App.EndWeek.SmartPiercing.BASE {
+App.SlaveAssignment.SmartPiercing.FETISHBASE = class extends App.SlaveAssignment.SmartPiercing.BASE {
 	/** Base class for fetish settings; encapsulates shared logic for fetishes
 	 * @param {App.Entity.SlaveState} slave
 	 * @param {string} fetishName name of fetish controlled by this class
@@ -233,7 +233,7 @@ App.EndWeek.SmartPiercing.FETISHBASE = class extends App.EndWeek.SmartPiercing.B
 	}
 };
 
-App.EndWeek.SmartPiercing.oral = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.oral = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "cumslut");
 	}
@@ -250,7 +250,7 @@ App.EndWeek.SmartPiercing.oral = class extends App.EndWeek.SmartPiercing.FETISHB
 	}
 };
 
-App.EndWeek.SmartPiercing.anal = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.anal = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "buttslut");
 	}
@@ -267,7 +267,7 @@ App.EndWeek.SmartPiercing.anal = class extends App.EndWeek.SmartPiercing.FETISHB
 	}
 };
 
-App.EndWeek.SmartPiercing.boobs = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.boobs = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "boobs");
 	}
@@ -284,7 +284,7 @@ App.EndWeek.SmartPiercing.boobs = class extends App.EndWeek.SmartPiercing.FETISH
 	}
 };
 
-App.EndWeek.SmartPiercing.submissive = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.submissive = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "submissive");
 	}
@@ -301,7 +301,7 @@ App.EndWeek.SmartPiercing.submissive = class extends App.EndWeek.SmartPiercing.F
 	}
 };
 
-App.EndWeek.SmartPiercing.humiliation = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.humiliation = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "humiliation");
 	}
@@ -318,7 +318,7 @@ App.EndWeek.SmartPiercing.humiliation = class extends App.EndWeek.SmartPiercing.
 	}
 };
 
-App.EndWeek.SmartPiercing.pregnancy = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.pregnancy = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "pregnancy");
 	}
@@ -345,7 +345,7 @@ App.EndWeek.SmartPiercing.pregnancy = class extends App.EndWeek.SmartPiercing.FE
 	}
 };
 
-App.EndWeek.SmartPiercing.dom = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.dom = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "dom");
 	}
@@ -362,7 +362,7 @@ App.EndWeek.SmartPiercing.dom = class extends App.EndWeek.SmartPiercing.FETISHBA
 	}
 };
 
-App.EndWeek.SmartPiercing.masochist = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.masochist = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "masochist");
 	}
@@ -379,7 +379,7 @@ App.EndWeek.SmartPiercing.masochist = class extends App.EndWeek.SmartPiercing.FE
 	}
 };
 
-App.EndWeek.SmartPiercing.sadist = class extends App.EndWeek.SmartPiercing.FETISHBASE {
+App.SlaveAssignment.SmartPiercing.sadist = class extends App.SlaveAssignment.SmartPiercing.FETISHBASE {
 	constructor(slave) {
 		super(slave, "sadist");
 	}
@@ -403,7 +403,7 @@ App.EndWeek.SmartPiercing.sadist = class extends App.EndWeek.SmartPiercing.FETIS
  * @param {App.Entity.SlaveState} slave
  * @returns {string}
  */
-App.EndWeek.saSmartPiercingEffects = function(slave) {
+App.SlaveAssignment.saSmartPiercingEffects = function(slave) {
 	const {he, his, His} = getPronouns(slave);
 	const hasBV = slave.vaginalAccessory === "bullet vibrator" || slave.dickAccessory === "bullet vibrator";
 	const hasSmartBV = slave.vaginalAccessory === "smart bullet vibrator" || slave.dickAccessory === "smart bullet vibrator";
@@ -456,11 +456,11 @@ App.EndWeek.saSmartPiercingEffects = function(slave) {
 		return ''; // no smart toys, nothing else to do here
 	}
 
-	const ctor = App.EndWeek.SmartPiercing[slave.clitSetting];
+	const ctor = App.SlaveAssignment.SmartPiercing[slave.clitSetting];
 	if (typeof ctor !== "function") { // uninstantiated classes are really just functions. JS is weird.
 		throw "Unrecognized smart clit/vibe setting";
 	}
-	/** @type {App.EndWeek.SmartPiercing.BASE} */
+	/** @type {App.SlaveAssignment.SmartPiercing.BASE} */
 	const setting = new ctor(slave);
 	let predicatePhrase = setting.trigger(magnitude, plural);
 	if (predicatePhrase === "") {
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 8e3a2b28763..50b95665855 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -1619,7 +1619,7 @@
 <</if>>
 
 /* SMART PIERCING EFFECTS */
-<<= App.EndWeek.saSmartPiercingEffects($slaves[$i])>>
+<<= App.SlaveAssignment.saSmartPiercingEffects($slaves[$i])>>
 
 /* ORGANIC FETISH DEVELOPMENTS */
 
-- 
GitLab