From 2ed42c1c966721362435db7b1921c015dadda715 Mon Sep 17 00:00:00 2001
From: ezsh <ezsh.junk@gmail.com>
Date: Thu, 1 Oct 2020 22:27:45 +0200
Subject: [PATCH] Split FC.d.ts, move all declarations inside the FC namespace

---
 .eslintrc.json                                |   9 +-
 devTools/types/FC.d.ts                        | 609 ------------------
 devTools/types/FC/RA.d.ts                     | 195 ++++++
 devTools/types/FC/SecExp.d.ts                 |  26 +
 devTools/types/FC/UI.d.ts                     |  34 +
 devTools/types/FC/arcology.d.ts               | 175 +++++
 devTools/types/FC/common.d.ts                 |  14 +
 devTools/types/FC/data.d.ts                   | 100 +++
 devTools/types/FC/gameState.d.ts              | 195 ++++++
 devTools/types/FC/global.d.ts                 |  21 +
 devTools/types/FC/human.d.ts                  | 439 +++++++++++++
 devTools/types/FC/medicine.d.ts               |   0
 devTools/types/FC/misc.d.ts                   |  30 +
 devTools/types/SugarCubeExtensions.d.ts       |   2 +-
 js/003-data/gameVariableData.js               |   2 +-
 src/004-base/facility.js                      |  12 +-
 .../backwardsCompatibility/datatypeCleanup.js |  14 +-
 src/data/utility/pronounsUtils.js             |   2 +-
 src/js/DefaultRules.js                        | 120 ++--
 src/js/pronouns.js                            |   2 +-
 src/js/rulesAssistant.js                      |  38 +-
 src/js/rulesAssistantOptions.js               |   6 +-
 src/js/rulesAutosurgery.js                    |   8 +-
 src/js/slaveSummaryHelpers.js                 |   6 +-
 src/js/utilsDOM.js                            |  13 +-
 25 files changed, 1348 insertions(+), 724 deletions(-)
 delete mode 100644 devTools/types/FC.d.ts
 create mode 100644 devTools/types/FC/RA.d.ts
 create mode 100644 devTools/types/FC/SecExp.d.ts
 create mode 100644 devTools/types/FC/UI.d.ts
 create mode 100644 devTools/types/FC/arcology.d.ts
 create mode 100644 devTools/types/FC/common.d.ts
 create mode 100644 devTools/types/FC/data.d.ts
 create mode 100644 devTools/types/FC/gameState.d.ts
 create mode 100644 devTools/types/FC/global.d.ts
 create mode 100644 devTools/types/FC/human.d.ts
 create mode 100644 devTools/types/FC/medicine.d.ts
 create mode 100644 devTools/types/FC/misc.d.ts

diff --git a/.eslintrc.json b/.eslintrc.json
index 40306b2f373..61718141ee6 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -24,12 +24,17 @@
 		"postdisplay": true
 	},
 	"parserOptions": {
-		"ecmaVersion": 2018,
-		"sourceType": "module",
+		"ecmaVersion": 2019,
+		"sourceType": "script",
 		"ecmaFeatures": {
 			"impliedStrict": true
 		}
 	},
+	"settings": {
+		"jsdoc": {
+			"mode": "typescript"
+		}
+	},
 	"rules": {
 		"no-prototype-builtins": "off",
 		"semi": ["warn", "always"],
diff --git a/devTools/types/FC.d.ts b/devTools/types/FC.d.ts
deleted file mode 100644
index 4c7d40bd891..00000000000
--- a/devTools/types/FC.d.ts
+++ /dev/null
@@ -1,609 +0,0 @@
-declare global {
-	namespace App {
-		namespace Art {}
-
-		namespace Corporate {}
-
-		namespace Data {
-			namespace Pronouns {
-				class Definition {
-					pronoun: string;
-					possessive: string;
-					possessivePronoun: string;
-					object: string;
-					objectReflexive: string;
-					noun: string;
-				}
-			}
-
-			class JobDesc {
-				position: string;
-				assignment: string;
-				publicSexUse: boolean;
-				fuckdollAccepted: boolean;
-				broodmotherAccepted?: boolean;
-				/** workers can take part time jobs in addition to their main (full-time) one */
-				partTime?: boolean;
-			}
-
-			class ManagerJobDesc extends JobDesc {
-				shouldWalk: boolean;
-				shouldHold: boolean;
-				shouldSee: boolean;
-				shouldHear: boolean;
-				shouldTalk: boolean;
-				shouldThink: boolean;
-				requiredDevotion: number;
-				/** Applicable careers */
-				careers: string[];
-				/** Applicable skill name */
-				skill: string;
-			}
-		}
-
-		namespace Debug {}
-		namespace Desc {}
-
-		namespace Encyclopedia {
-			namespace Entries {}
-		}
-
-		namespace Facilities {}
-
-		namespace Interact {}
-
-		namespace Intro {}
-
-		namespace MainView {}
-
-		namespace RA {
-			class NumericTarget {
-				cond: string;
-				val: number;
-			}
-
-			class NumericRange {
-				min: number;
-				max: number;
-			}
-
-			class RuleConditions {
-				function: boolean | string;
-				data: any;
-				assignment: string[];
-				selectedSlaves: number[];
-				excludedSlaves: number[];
-			}
-
-			class RuleSurgerySettings {
-				eyes: number;
-				hears: number;
-				smells: number;
-				tastes: number;
-				lactation: number;
-				prostate: number;
-				cosmetic: number;
-				accent: number;
-				shoulders: number;
-				shouldersImplant: number;
-				boobs: NumericTarget;
-				hips: number;
-				hipsImplant: number;
-				butt: NumericTarget;
-				faceShape: string;
-				lips: NumericTarget;
-				holes: number;
-				hair: number;
-				bodyhair: number;
-				vasectomy: boolean;
-				bellyImplant: string;
-				tummy: number;
-				earShape: number;
-				horn: number;
-			}
-
-			class RuleGrowthSetters {
-				boobs: NumericTarget;
-				butt: NumericTarget;
-				lips: NumericTarget;
-				dick: NumericTarget;
-				balls: NumericTarget;
-				intensity: number;
-			}
-
-			class RuleReleaseSetters {
-				masturbation: number;
-				partner: number;
-				family: number;
-				slaves: number;
-				master: number;
-			}
-
-			class RuleSetters {
-				releaseRules: RuleReleaseSetters;
-				lactationRules: string;
-				mobilityRules: string;
-				restRules: string;
-				toyHole: string;
-				clitSetting: string;
-				clitSettingXY: number;
-				clitSettingXX: number;
-				clitSettingEnergy: number;
-				speechRules: string;
-				clothes: string;
-				collar: string;
-				faceAccessory: string;
-				mouthAccessory: string;
-				shoes: string;
-				armAccessory: string;
-				legAccessory: string;
-				chastityVagina: number;
-				chastityAnus: number;
-				chastityPenis: number;
-				virginAccessory: string;
-				aVirginAccessory: string;
-				vaginalAccessory: string;
-				aVirginDickAccessory: string;
-				dickAccessory: string;
-				bellyAccessory: string;
-				aVirginButtplug: string;
-				buttplug: string;
-				vaginalAttachment: string;
-				buttplugAttachment: string;
-				iris: string;
-				pupil: string;
-				sclera: string;
-				makeup: number;
-				nails: number;
-				hColor: string;
-				hLength: number;
-				haircuts: number;
-				hStyle: string;
-				eyebrowHColor: string;
-				eyebrowHStyle: string;
-				eyebrowFullness: string;
-				markings: string;
-				pubicHColor: string;
-				pubicHStyle: string;
-				nipplesPiercing: number;
-				areolaePiercing: number;
-				clitPiercing: number;
-				vaginaLube: number;
-				vaginaPiercing: number;
-				dickPiercing: number;
-				anusPiercing: number;
-				lipsPiercing: number;
-				tonguePiercing: number;
-				earPiercing: number;
-				nosePiercing: number;
-				eyebrowPiercing: number;
-				navelPiercing: number;
-				corsetPiercing: number;
-				boobsTat: string | number;
-				buttTat: string | number;
-				vaginaTat: string | number;
-				dickTat: string | number;
-				lipsTat: string | number;
-				anusTat: string | number;
-				shouldersTat: string | number;
-				armsTat: string | number;
-				legsTat: string | number;
-				backTat: string | number;
-				stampTat: string | number;
-				birthsTat: string | number;
-				abortionTat: string | number;
-				pitRules: number;
-				curatives: number;
-				livingRules: string;
-				relationshipRules: string;
-				standardPunishment: string;
-				standardReward: string;
-				weight: NumericRange;
-				diet: string;
-				dietCum: number;
-				dietMilk: number;
-				onDiet: number;
-				muscles: NumericTarget;
-				XY: number;
-				XX: number;
-				gelding: number;
-				preg: boolean;
-				abortion: string[];
-				growth: RuleGrowthSetters;
-				hyper_drugs: number;
-				aphrodisiacs: number;
-				autoSurgery: number;
-				autoBrand: number;
-				pornFeed: number;
-				pornFameSpending: number;
-				dietGrowthSupport: number;
-				eyewear: string;
-				earwear: string;
-				setAssignment: string;
-				facilityRemove: boolean;
-				removalAssignment: string;
-				surgery: RuleSurgerySettings;
-				underArmHColor: string;
-				underArmHStyle: string;
-				drug: string;
-				eyes: string;
-				pregSpeed: string;
-				bellyImplantVol: number;
-				teeth: string;
-				label: string;
-				removeLabel: string;
-				skinColor: string;
-				inflationType: string;
-				brandTarget: string;
-				brandDesign: string;
-				scarTarget: string;
-				scarDesign: string;
-				hornColor: string;
-				labelTagsClear: boolean;
-			}
-
-			interface Rule {
-				ID: string;
-				name: string;
-				condition: RuleConditions;
-				set: RuleSetters;
-			}
-		}
-
-		namespace SecExp {}
-		namespace SF {}
-
-		namespace UI {
-			namespace DOM {
-				namespace Widgets {}
-
-				function makeElement<K extends keyof HTMLElementTagNameMap>(tag: K, content: string | Node, classNames?: string | string[]): HTMLElementTagNameMap[K];
-				function appendNewElement<K extends keyof HTMLElementTagNameMap>(tag: K, parent: ParentNode, content?: string | Node, classNames?: string | string[]): HTMLElementTagNameMap[K];
-			}
-			namespace Hotkeys {}
-			namespace View {}
-			namespace SlaveSummary {
-				type AppendRenderer = (slave: FC.SlaveState, parentNode: Node) => void;
-
-				class AbbreviationState {
-					clothes: number;
-					devotion: number;
-					diet: number;
-					drugs: number;
-					genitalia: number;
-					health: number;
-					hormoneBalance: number;
-					mental: number;
-					nationality: number;
-					origins: number;
-					physicals: number;
-					race: number;
-					rules: number;
-					rulesets: number;
-					skills: number;
-				}
-				class State {
-					abbreviation: AbbreviationState;
-				}
-			}
-		}
-
-		namespace Update {}
-		namespace Utils {}
-
-		namespace Medicine {
-			namespace Surgery {
-				/**
-				 * Describes surgical procedure
-				 */
-				class Procedure {
-					/**
-					 * Type code that identifies this kind of procedure.
-					 * Currently unused, but planned for future use by RA for prioritizing procedures
-					 */
-					typeId: string;
-					/**
-					 * Short label for the procedure. Can be used as a link text.
-					 */
-					label: string;
-					/**
-					 * If procedure is targeted at changing object characteristic, this is the net change (signed)
-					 */
-					targetEffect: number;
-					/**
-					 * Description of the procedure, more or less detailed
-					 */
-					description: string;
-					/**
-					 * Money costs (positive when you pay for it)
-					 */
-					costs: number;
-					/**
-					 * Projected health loss (positive when health decreases)
-					 */
-					healthCosts: number;
-					/**
-					 * Function to perform the procedure
-					 * If action is undefined, the procedure can't be applied (and .description contains the reason)
-					 */
-					action: slaveOperation;
-					/**
-					 * surgery type for passages like "Surgery Degradation"
-					 */
-					surgeryType: string;
-				}
-
-				class SizingOptions {
-					/** include possible augmentation procedures */
-					augmentation?: boolean;
-					/** include possible reduction procedures */
-					reduction?: boolean;
-					/** include option to install string implants */
-					strings?: boolean;
-					/** include implant change options */
-					replace?: boolean;
-				}
-			}
-			namespace OrganFarm {
-				namespace Organs {
-				}
-			}
-		}
-	}
-
-	namespace FC {
-		// black magic to make TypeScript understand that App.Entity.SlaveState is a type
-		type SlaveState = InstanceType<typeof App.Entity.SlaveState>;
-
-		type FSPolicy = number | "unset";
-
-		interface ArcologyState {
-			name: string;
-			direction: string | NoObject;
-			government: string;
-			leaderID: number;
-			honeymoon: number;
-			prosperity: number;
-			ownership: number;
-			minority: number;
-			PCminority: number;
-			demandFactor: number;
-			FSSupremacist: FSPolicy;
-			FSSupremacistRace: string | NoObject;
-			FSSubjugationist: FSPolicy;
-			FSSubjugationistRace: string | NoObject;
-			FSGenderRadicalist: FSPolicy;
-			FSGenderFundamentalist: FSPolicy;
-			FSPaternalist: FSPolicy;
-			FSDegradationist: FSPolicy;
-			FSBodyPurist: FSPolicy;
-			FSTransformationFetishist: FSPolicy;
-			FSYouthPreferentialist: FSPolicy;
-			FSMaturityPreferentialist: FSPolicy;
-			FSSlimnessEnthusiast: FSPolicy;
-			FSAssetExpansionist: FSPolicy;
-			FSPastoralist: FSPolicy;
-			FSPhysicalIdealist: FSPolicy;
-			FSChattelReligionist: FSPolicy;
-			FSRomanRevivalist: FSPolicy;
-			FSAztecRevivalist: FSPolicy;
-			FSEgyptianRevivalist: FSPolicy;
-			FSEdoRevivalist: FSPolicy;
-			FSArabianRevivalist: FSPolicy;
-			FSChineseRevivalist: FSPolicy;
-			FSNeoImperialist: FSPolicy;
-			FSNull: FSPolicy;
-			embargo: number;
-			embargoTarget: number;
-			influenceTarget: number;
-			influenceBonus: number;
-			CyberEconomic: number;
-			CyberEconomicTarget: number;
-			CyberReputation: number;
-			CyberReputationTarget: number;
-			rival: number;
-			FSRestart: FSPolicy;
-			FSRepopulationFocus: FSPolicy;
-			FSHedonisticDecadence: FSPolicy;
-			FSIntellectualDependency: FSPolicy;
-			FSSlaveProfessionalism: FSPolicy;
-			FSPetiteAdmiration: FSPolicy;
-			FSStatuesqueGlorification: FSPolicy;
-			FSCummunism: FSPolicy;
-			FSIncestFetishist: FSPolicy;
-			FSGenderRadicalistResearch: number;
-			FSGenderFundamentalistResearch: number;
-			FSPaternalistResearch: number;
-			FSDegradationistResearch: number;
-			FSBodyPuristResearch: number;
-			FSTransformationFetishistResearch: number;
-			FSYouthPreferentialistResearch: number;
-			FSMaturityPreferentialistResearch: number;
-			FSSlimnessEnthusiastResearch: number;
-			FSAssetExpansionistResearch: number;
-			FSPastoralistResearch: number;
-			FSPhysicalIdealistResearch: number;
-			FSRepopulationFocusResearch: number;
-			FSRestartResearch: number;
-			FSHedonisticDecadenceResearch: number;
-			FSHedonisticDecadenceDietResearch: number;
-			FSIntellectualDependencyResearch: number;
-			FSSlaveProfessionalismResearch: number;
-			FSPetiteAdmirationResearch: number;
-			FSStatuesqueGlorificationResearch: number;
-			FSCummunismResearch: number;
-			FSIncestFetishistResearch: number;
-			FSSupremacistDecoration: number;
-			FSSubjugationistDecoration: number;
-			FSGenderRadicalistDecoration: number;
-			FSGenderFundamentalistDecoration: number;
-			FSPaternalistDecoration: number;
-			FSDegradationistDecoration: number;
-			FSBodyPuristDecoration: number;
-			FSTransformationFetishistDecoration: number;
-			FSYouthPreferentialistDecoration: number;
-			FSMaturityPreferentialistDecoration: number;
-			FSSlimnessEnthusiastDecoration: number;
-			FSAssetExpansionistDecoration: number;
-			FSPastoralistDecoration: number;
-			FSPhysicalIdealistDecoration: number;
-			FSChattelReligionistDecoration: number;
-			FSRomanRevivalistDecoration: number;
-			FSNeoImperialistDecoration: number;
-			FSAztecRevivalistDecoration: number;
-			FSEgyptianRevivalistDecoration: number;
-			FSEdoRevivalistDecoration: number;
-			FSArabianRevivalistDecoration: number;
-			FSChineseRevivalistDecoration: number;
-			FSRepopulationFocusDecoration: number;
-			FSRestartDecoration: number;
-			FSHedonisticDecadenceDecoration: number;
-			FSIntellectualDependencyDecoration: number;
-			FSSlaveProfessionalismDecoration: number;
-			FSPetiteAdmirationDecoration: number;
-			FSStatuesqueGlorificationDecoration: number;
-			FSCummunismDecoration: number;
-			FSIncestFetishistDecoration: number;
-			FSSupremacistLawME: number;
-			FSSupremacistSMR: number;
-			FSSubjugationistLawME: number;
-			FSSubjugationistSMR: number;
-			FSGenderRadicalistLawFuta: number;
-			FSGenderRadicalistLawBeauty: number;
-			FSGenderFundamentalistLawBimbo: number;
-			FSGenderFundamentalistSMR: number;
-			FSGenderFundamentalistLawBeauty: number;
-			FSPaternalistLaw: number;
-			FSPaternalistSMR: number;
-			FSDegradationistLaw: number;
-			FSDegradationistSMR: number;
-			FSBodyPuristLaw: number;
-			FSBodyPuristSMR: number;
-			FSTransformationFetishistSMR: number;
-			FSYouthPreferentialistLaw: number;
-			FSYouthPreferentialistSMR: number;
-			FSMaturityPreferentialistLaw: number;
-			FSMaturityPreferentialistSMR: number;
-			FSSlimnessEnthusiastSMR: number;
-			FSSlimnessEnthusiastLaw: number;
-			FSAssetExpansionistSMR: number;
-			FSPastoralistLaw: number;
-			FSPastoralistSMR: number;
-			FSPhysicalIdealistSMR: number;
-			FSPhysicalIdealistLaw: number;
-			FSPhysicalIdealistStrongFat: number;
-			FSChattelReligionistLaw: number;
-			FSChattelReligionistSMR: number;
-			FSChattelReligionistCreed: number;
-			FSRomanRevivalistLaw: number;
-			FSRomanRevivalistSMR: number;
-			FSNeoImperialistLaw1: number;
-			FSNeoImperialistLaw2: number;
-			FSNeoImperialistSMR: number;
-			FSAztecRevivalistLaw: number;
-			FSAztecRevivalistSMR: number;
-			FSEgyptianRevivalistLaw: number;
-			FSEgyptianRevivalistSMR: number;
-			FSEdoRevivalistLaw: number;
-			FSEdoRevivalistSMR: number;
-			FSArabianRevivalistLaw: number;
-			FSArabianRevivalistSMR: number;
-			FSChineseRevivalistLaw: number;
-			FSChineseRevivalistSMR: number;
-			FSRepopulationFocusLaw: number;
-			FSRepopulationFocusSMR: number;
-			FSRestartLaw: number;
-			FSRestartSMR: number;
-			FSHedonisticDecadenceLaw: number;
-			FSHedonisticDecadenceLaw2: number;
-			FSHedonisticDecadenceStrongFat: number;
-			FSHedonisticDecadenceSMR: number;
-			FSIntellectualDependencyLaw: number;
-			FSIntellectualDependencyLawBeauty: number;
-			FSIntellectualDependencySMR: number;
-			FSSlaveProfessionalismLaw: number;
-			FSSlaveProfessionalismSMR: number;
-			FSPetiteAdmirationLaw: number;
-			FSPetiteAdmirationLaw2: number;
-			FSPetiteAdmirationSMR: number;
-			FSStatuesqueGlorificationLaw: number;
-			FSStatuesqueGlorificationLaw2: number;
-			FSStatuesqueGlorificationSMR: number;
-			FSEgyptianRevivalistIncestPolicy: number;
-			FSEgyptianRevivalistInterest: number;
-			FSRepopulationFocusPregPolicy: number;
-			FSRepopulationFocusMilfPolicy: number;
-			FSRepopulationFocusInterest: number;
-			FSEugenicsChastityPolicy: number;
-			FSEugenicsSterilizationPolicy: number;
-			FSEugenicsInterest: number;
-			childhoodFertilityInducedNCSResearch: number;
-			hackingEconomic: number;
-			hackingEconomicTarget: number;
-			hackingReputationTarget: number;
-			hackingReputation: number;
-		}
-
-		enum NoObject {
-			Value = 0
-		}
-
-		type SlaveStateOrZero = SlaveState | NoObject;
-
-		type DefaultGameStateVariables = typeof App.Data.defaultGameStateVariables;
-		type ResetOnNGPVariables = typeof App.Data.resetOnNGPlus;
-		interface GameVariables extends DefaultGameStateVariables, ResetOnNGPVariables {}
-
-		namespace SlaveSummary {
-			interface SmartPiercing {
-				setting: {
-					off: string,
-					submissive: string,
-					lesbian: string,
-					oral: string,
-					humiliation: string,
-					anal: string,
-					boobs: string,
-					sadist: string,
-					masochist: string,
-					dom: string,
-					pregnancy: string,
-					vanilla: string,
-					all: string,
-					none: string,
-					monitoring: string,
-					men: string,
-					women: string,
-					"anti-men": string,
-					"anti-women": string,
-				}
-			}
-		}
-
-		namespace SecExp {
-			interface UnitData {
-				troops: number,
-				maxTroops: number,
-				equip: number
-			}
-			interface PlayerUnitData extends UnitData {
-				active: number,
-				ID: number,
-				isDeployed: number
-			}
-			interface PlayerHumanUnitData extends PlayerUnitData {
-				platoonName: string,
-				training: number,
-				loyalty: number,
-				cyber: number,
-				medics: number,
-				SF: number,
-				commissars: number
-			}
-		}
-	}
-
-	const V: FC.GameVariables;
-}
-
-export {};
diff --git a/devTools/types/FC/RA.d.ts b/devTools/types/FC/RA.d.ts
new file mode 100644
index 00000000000..5c95e440142
--- /dev/null
+++ b/devTools/types/FC/RA.d.ts
@@ -0,0 +1,195 @@
+declare namespace FC {
+	namespace RA {
+		interface NumericTarget {
+			cond: string;
+			val: number;
+		}
+
+		interface NumericRange {
+			min: number;
+			max: number;
+		}
+
+		interface RuleConditions {
+			function: boolean | string;
+			data: any;
+			assignment: Assignment[];
+			selectedSlaves: number[];
+			excludedSlaves: number[];
+		}
+
+		interface RuleSurgerySettings {
+			eyes: number;
+			hears: number;
+			smells: number;
+			tastes: number;
+			lactation: number;
+			prostate: number;
+			cosmetic: number;
+			accent: number;
+			shoulders: number;
+			shouldersImplant: number;
+			boobs: NumericTarget;
+			hips: number;
+			hipsImplant: number;
+			butt: NumericTarget;
+			faceShape: FaceShape;
+			lips: NumericTarget;
+			holes: number;
+			hair: number;
+			bodyhair: number;
+			vasectomy: boolean;
+			bellyImplant: string;
+			tummy: number;
+			earShape: number;
+			horn: number;
+		}
+
+		interface RuleGrowthSetters {
+			boobs: NumericTarget;
+			butt: NumericTarget;
+			lips: NumericTarget;
+			dick: NumericTarget;
+			balls: NumericTarget;
+			intensity: number;
+		}
+
+		interface RuleReleaseSetters {
+			masturbation: number;
+			partner: number;
+			family: number;
+			slaves: number;
+			master: number;
+		}
+
+		interface RuleSetters {
+			releaseRules: RuleReleaseSetters;
+			lactationRules: WithNone<"induce" | "maintain"> | null;
+			mobilityRules: Rules.Mobility;
+			restRules: string;
+			toyHole: FC.ToyHole;
+			clitSetting: SmartPiercingSetting;
+			clitSettingXY: number;
+			clitSettingXX: number;
+			clitSettingEnergy: number;
+			speechRules: Rules.Speech;
+			clothes: string;
+			collar: string;
+			faceAccessory: string;
+			mouthAccessory: string;
+			shoes: string;
+			armAccessory: string;
+			legAccessory: string;
+			chastityVagina: number;
+			chastityAnus: number;
+			chastityPenis: number;
+			virginAccessory: string;
+			aVirginAccessory: string;
+			vaginalAccessory: string;
+			aVirginDickAccessory: string;
+			dickAccessory: string;
+			bellyAccessory: string;
+			aVirginButtplug: string;
+			buttplug: string;
+			vaginalAttachment: string;
+			buttplugAttachment: string;
+			iris: string;
+			pupil: string;
+			sclera: string;
+			makeup: number;
+			nails: number;
+			hColor: string;
+			hLength: number;
+			haircuts: number;
+			hStyle: string;
+			eyebrowHColor: string;
+			eyebrowHStyle: string;
+			eyebrowFullness: FC.EyebrowThickness;
+			markings: "remove beauty marks" | "remove birthmarks" | "remove both";
+			pubicHColor: string;
+			pubicHStyle: string;
+			nipplesPiercing: FC.PiercingType;
+			areolaePiercing: FC.PiercingType;
+			clitPiercing: number;
+			vaginaLube: number;
+			vaginaPiercing: FC.PiercingType;
+			dickPiercing: number;
+			anusPiercing: FC.PiercingType;
+			lipsPiercing: number;
+			tonguePiercing: FC.PiercingType;
+			earPiercing: FC.PiercingType;
+			nosePiercing: FC.PiercingType;
+			eyebrowPiercing: FC.PiercingType;
+			navelPiercing: FC.PiercingType;
+			corsetPiercing: number;
+			boobsTat: string | number;
+			buttTat: string | number;
+			vaginaTat: string | number;
+			dickTat: string | number;
+			lipsTat: string | number;
+			anusTat: string | number;
+			shouldersTat: string | number;
+			armsTat: string | number;
+			legsTat: string | number;
+			backTat: string | number;
+			stampTat: string | number;
+			birthsTat: string | number;
+			abortionTat: string | number;
+			pitRules: number;
+			curatives: number;
+			livingRules: Rules.Living;
+			relationshipRules: Rules.Relationship;
+			standardPunishment: Rules.Punishment;
+			standardReward: Rules.Reward;
+			weight: NumericRange;
+			diet: string;
+			dietCum: number;
+			dietMilk: number;
+			onDiet: number;
+			muscles: NumericTarget;
+			XY: number;
+			XX: number;
+			gelding: number;
+			preg: boolean;
+			abortion: string[];
+			growth: RuleGrowthSetters;
+			hyper_drugs: number;
+			aphrodisiacs: number;
+			autoSurgery: number;
+			autoBrand: number;
+			pornFeed: number;
+			pornFameSpending: number;
+			dietGrowthSupport: number;
+			eyewear: string;
+			earwear: string;
+			setAssignment: Assignment;
+			facilityRemove: boolean;
+			removalAssignment: Assignment;
+			surgery: RuleSurgerySettings;
+			underArmHColor: string;
+			underArmHStyle: string;
+			drug: string;
+			eyes: string;
+			pregSpeed: string;
+			bellyImplantVol: number;
+			teeth: string;
+			label: string;
+			removeLabel: string;
+			skinColor: string;
+			inflationType: FC.InflationLiquid;
+			brandTarget: string;
+			brandDesign: string;
+			scarTarget: string;
+			scarDesign: string;
+			hornColor: string;
+			labelTagsClear: boolean;
+		}
+
+		interface Rule {
+			ID: string;
+			name: string;
+			condition: RuleConditions;
+			set: RuleSetters;
+		}
+	}
+}
diff --git a/devTools/types/FC/SecExp.d.ts b/devTools/types/FC/SecExp.d.ts
new file mode 100644
index 00000000000..145b963d8a5
--- /dev/null
+++ b/devTools/types/FC/SecExp.d.ts
@@ -0,0 +1,26 @@
+declare namespace FC {
+	namespace SecExp {
+
+		interface UnitData {
+			troops: number,
+			maxTroops: number,
+			equip: number
+		}
+
+		interface PlayerUnitData extends UnitData {
+			active: number,
+			ID: number,
+			isDeployed: number
+		}
+
+		interface PlayerHumanUnitData extends PlayerUnitData {
+			platoonName: string,
+			training: number,
+			loyalty: number,
+			cyber: number,
+			medics: number,
+			SF: number,
+			commissars: number
+		}
+	}
+}
diff --git a/devTools/types/FC/UI.d.ts b/devTools/types/FC/UI.d.ts
new file mode 100644
index 00000000000..75680e0ff63
--- /dev/null
+++ b/devTools/types/FC/UI.d.ts
@@ -0,0 +1,34 @@
+declare namespace FC {
+	namespace UI {
+		namespace DOM {
+			namespace Widgets {}
+		}
+		namespace Hotkeys {}
+		namespace View {}
+		namespace SlaveSummary {
+			type AppendRenderer = (slave: FC.SlaveState, parentNode: Node) => void;
+
+			interface AbbreviationState {
+				clothes: number;
+				devotion: number;
+				diet: number;
+				drugs: number;
+				genitalia: number;
+				health: number;
+				hormoneBalance: number;
+				mental: number;
+				nationality: number;
+				origins: number;
+				physicals: number;
+				race: number;
+				rules: number;
+				rulesets: number;
+				skills: number;
+			}
+
+			interface State {
+				abbreviation: AbbreviationState;
+			}
+		}
+	}
+}
diff --git a/devTools/types/FC/arcology.d.ts b/devTools/types/FC/arcology.d.ts
new file mode 100644
index 00000000000..14edfb60253
--- /dev/null
+++ b/devTools/types/FC/arcology.d.ts
@@ -0,0 +1,175 @@
+declare namespace FC {
+	type FutureSociety = "FSArabianRevivalist" | "FSAztecRevivalist" | "FSChattelReligionist" | "FSChineseRevivalist" | "FSNeoImperialist"
+		| "FSEdoRevivalist" | "FSEgyptianRevivalist" | "FSRomanRevivalist"
+		| "FSAssetExpansionist" | "FSTransformationFetishist" | "FSBodyPurist"
+		| "FSPaternalist" | "FSDegradationist"
+		| "FSGenderFundamentalist" | "FSGenderRadicalist"
+		| "FSPhysicalIdealist" | "FSSlimnessEnthusiast" | "FSHedonisticDecadence"
+		| "FSSlaveProfessionalism" | "FSIntellectualDependency"
+		| "FSMaturityPreferentialist" | "FSYouthPreferentialist"
+		| "FSPastoralist"
+		| "FSPetiteAdmiration" | "FSStatuesqueGlorification"
+		| "FSRepopulationFocus" | "FSRestart"
+		| "FSSubjugationist" | "FSSupremacist"
+		| "FSCummunism" | "FSIncestFetishist" | "FSNull";
+
+	type FSPolicyValue = number | "unset";
+
+	// direction with respect to the player's arcology
+	type ArcologyDirection = "east" | "north" | "northeast" | "northwest" | "south" | "southeast" | "southwest" | "west";
+
+	interface ArcologyState extends Record<FutureSociety, FSPolicyValue> {
+		name: string;
+		direction: Zeroable<ArcologyDirection>;
+		government: string;
+		leaderID: number;
+		honeymoon: number;
+		prosperity: number;
+		ownership: number;
+		minority: number;
+		PCminority: number;
+		demandFactor: number;
+		FSSupremacistRace: Zeroable<Race>;
+		FSSubjugationistRace: Zeroable<Race>;
+		embargo: number;
+		embargoTarget: Zeroable<ArcologyDirection>;
+		influenceTarget: Zeroable<ArcologyDirection>;
+		influenceBonus: number;
+		CyberEconomic: number;
+		CyberEconomicTarget: Zeroable<ArcologyDirection>;
+		CyberReputation: number;
+		CyberReputationTarget: Zeroable<ArcologyDirection>;
+		rival: number;
+		FSGenderRadicalistResearch: Bool;
+		FSGenderFundamentalistResearch: Bool;
+		FSPaternalistResearch: Bool;
+		FSDegradationistResearch: Bool;
+		FSBodyPuristResearch: Bool;
+		FSTransformationFetishistResearch: Bool;
+		FSYouthPreferentialistResearch: Bool;
+		FSMaturityPreferentialistResearch: Bool;
+		FSSlimnessEnthusiastResearch: Bool;
+		FSAssetExpansionistResearch: Bool;
+		FSPastoralistResearch: Bool;
+		FSPhysicalIdealistResearch: Bool;
+		FSRepopulationFocusResearch: Bool;
+		FSRestartResearch: Bool;
+		FSHedonisticDecadenceResearch: Bool;
+		FSHedonisticDecadenceDietResearch: Bool;
+		FSIntellectualDependencyResearch: Bool;
+		FSSlaveProfessionalismResearch: Bool;
+		FSPetiteAdmirationResearch: Bool;
+		FSStatuesqueGlorificationResearch: Bool;
+		FSCummunismResearch: Bool;
+		FSIncestFetishistResearch: Bool;
+		FSSupremacistDecoration: number;
+		FSSubjugationistDecoration: number;
+		FSGenderRadicalistDecoration: number;
+		FSGenderFundamentalistDecoration: number;
+		FSPaternalistDecoration: number;
+		FSDegradationistDecoration: number;
+		FSBodyPuristDecoration: number;
+		FSTransformationFetishistDecoration: number;
+		FSYouthPreferentialistDecoration: number;
+		FSMaturityPreferentialistDecoration: number;
+		FSSlimnessEnthusiastDecoration: number;
+		FSAssetExpansionistDecoration: number;
+		FSPastoralistDecoration: number;
+		FSPhysicalIdealistDecoration: number;
+		FSChattelReligionistDecoration: number;
+		FSRomanRevivalistDecoration: number;
+		FSNeoImperialistDecoration: number;
+		FSAztecRevivalistDecoration: number;
+		FSEgyptianRevivalistDecoration: number;
+		FSEdoRevivalistDecoration: number;
+		FSArabianRevivalistDecoration: number;
+		FSChineseRevivalistDecoration: number;
+		FSRepopulationFocusDecoration: number;
+		FSRestartDecoration: number;
+		FSHedonisticDecadenceDecoration: number;
+		FSIntellectualDependencyDecoration: number;
+		FSSlaveProfessionalismDecoration: number;
+		FSPetiteAdmirationDecoration: number;
+		FSStatuesqueGlorificationDecoration: number;
+		FSCummunismDecoration: number;
+		FSIncestFetishistDecoration: number;
+		FSSupremacistLawME: number;
+		FSSupremacistSMR: number;
+		FSSubjugationistLawME: number;
+		FSSubjugationistSMR: number;
+		FSGenderRadicalistLawFuta: number;
+		FSGenderRadicalistLawBeauty: number;
+		FSGenderFundamentalistLawBimbo: number;
+		FSGenderFundamentalistSMR: number;
+		FSGenderFundamentalistLawBeauty: number;
+		FSPaternalistLaw: number;
+		FSPaternalistSMR: Bool;
+		FSDegradationistLaw: number;
+		FSDegradationistSMR: Bool;
+		FSBodyPuristLaw: number;
+		FSBodyPuristSMR: Bool;
+		FSTransformationFetishistSMR: Bool;
+		FSYouthPreferentialistLaw: number;
+		FSYouthPreferentialistSMR: Bool;
+		FSMaturityPreferentialistLaw: number;
+		FSMaturityPreferentialistSMR: Bool;
+		FSSlimnessEnthusiastSMR: Bool;
+		FSSlimnessEnthusiastLaw: number;
+		FSAssetExpansionistSMR: Bool;
+		FSPastoralistLaw: number;
+		FSPastoralistSMR: Bool;
+		FSPhysicalIdealistSMR: number;
+		FSPhysicalIdealistLaw: number;
+		FSPhysicalIdealistStrongFat: number;
+		FSChattelReligionistLaw: number;
+		FSChattelReligionistSMR: Bool;
+		FSChattelReligionistCreed: number;
+		FSRomanRevivalistLaw: number;
+		FSRomanRevivalistSMR: Bool;
+		FSNeoImperialistLaw1: number;
+		FSNeoImperialistLaw2: number;
+		FSNeoImperialistSMR: number;
+		FSAztecRevivalistLaw: number;
+		FSAztecRevivalistSMR: Bool;
+		FSEgyptianRevivalistLaw: number;
+		FSEgyptianRevivalistSMR: Bool;
+		FSEdoRevivalistLaw: number;
+		FSEdoRevivalistSMR: Bool;
+		FSArabianRevivalistLaw: number;
+		FSArabianRevivalistSMR: Bool;
+		FSChineseRevivalistLaw: number;
+		FSChineseRevivalistSMR: Bool;
+		FSRepopulationFocusLaw: number;
+		FSRepopulationFocusSMR: Bool;
+		FSRestartLaw: number;
+		FSRestartSMR: Bool;
+		FSHedonisticDecadenceLaw: number;
+		FSHedonisticDecadenceLaw2: number;
+		FSHedonisticDecadenceStrongFat: number;
+		FSHedonisticDecadenceSMR: Bool;
+		FSIntellectualDependencyLaw: number;
+		FSIntellectualDependencyLawBeauty: number;
+		FSIntellectualDependencySMR: Bool;
+		FSSlaveProfessionalismLaw: number;
+		FSSlaveProfessionalismSMR: Bool;
+		FSPetiteAdmirationLaw: number;
+		FSPetiteAdmirationLaw2: number;
+		FSPetiteAdmirationSMR: Bool;
+		FSStatuesqueGlorificationLaw: number;
+		FSStatuesqueGlorificationLaw2: number;
+		FSStatuesqueGlorificationSMR: Bool;
+		FSEgyptianRevivalistIncestPolicy: number;
+		FSEgyptianRevivalistInterest: number;
+		FSRepopulationFocusPregPolicy: number;
+		FSRepopulationFocusMilfPolicy: number;
+		FSRepopulationFocusInterest: number;
+		FSEugenicsChastityPolicy: number;
+		FSEugenicsSterilizationPolicy: number;
+		FSEugenicsInterest: number;
+		childhoodFertilityInducedNCSResearch: Bool;
+		hackingEconomic: number;
+		hackingEconomicTarget: number;
+		hackingReputationTarget: number;
+		hackingReputation: number;
+	}
+}
diff --git a/devTools/types/FC/common.d.ts b/devTools/types/FC/common.d.ts
new file mode 100644
index 00000000000..aaa29fa7f20
--- /dev/null
+++ b/devTools/types/FC/common.d.ts
@@ -0,0 +1,14 @@
+declare namespace FC {
+	type WithNone<T> = T | "none";
+
+	const enum Bool {
+		False = 0,
+		True = 1
+	}
+
+	const enum NoObject {
+		Value = 0
+	}
+
+	type Zeroable<T> = T | NoObject;
+}
diff --git a/devTools/types/FC/data.d.ts b/devTools/types/FC/data.d.ts
new file mode 100644
index 00000000000..c6efdfe4f82
--- /dev/null
+++ b/devTools/types/FC/data.d.ts
@@ -0,0 +1,100 @@
+declare namespace FC {
+	namespace Data {
+
+		namespace Wardrobe {
+			interface ClothingOptionBase {
+				name: string;
+				fs?: string; // FSPolicy;
+			}
+			interface ClothingOption extends ClothingOptionBase {
+				value: string;
+			}
+
+			interface UpdatingClothingOption extends ClothingOptionBase {
+				updateSlave: DeepPartialSlaveState;
+			}
+		}
+		namespace Pronouns {
+			interface Definition {
+				pronoun: string;
+				possessive: string;
+				possessivePronoun: string;
+				object: string;
+				objectReflexive: string;
+				noun: string;
+			}
+		}
+
+		interface JobDesc {
+			position: string;
+			assignment: Assignment;
+			publicSexUse: boolean;
+			fuckdollAccepted: boolean;
+			broodmotherAccepted?: boolean;
+			/** workers can take part time jobs in addition to their main (full-time) one */
+			partTime?: boolean;
+		}
+
+		interface ManagerJobDesc extends JobDesc {
+			shouldWalk: boolean;
+			shouldHold: boolean;
+			shouldSee: boolean;
+			shouldHear: boolean;
+			shouldTalk: boolean;
+			shouldThink: boolean;
+			requiredDevotion: number;
+			/** Applicable careers */
+			careers: string[];
+			/** Applicable skill name */
+			skill: string;
+			positionAbbreviation?: string;
+		}
+
+		interface FacilityDesc {
+			/** Base name for state variables */
+			baseName: string;
+			/** Generic name for UI (Brothel, Club, etc.)
+			 * If null, baseName is used instead
+			 */
+			genericName: string | null;
+			jobs: Record<string, JobDesc>;
+			defaultJob: string;
+			manager: ManagerJobDesc | null;
+		}
+
+		interface ProstheticDefinition {
+			name: string;
+			adjust: number;
+			craft: number;
+			research: number;
+			level: number;
+			costs: number;
+		}
+
+		namespace SlaveSummary {
+			interface SmartPiercing {
+				setting: {
+					off: string,
+					submissive: string,
+					lesbian: string,
+					oral: string,
+					humiliation: string,
+					anal: string,
+					boobs: string,
+					sadist: string,
+					masochist: string,
+					dom: string,
+					pregnancy: string,
+					vanilla: string,
+					all: string,
+					none: string,
+					monitoring: string,
+					men: string,
+					women: string,
+					"anti-men": string,
+					"anti-women": string,
+				}
+			}
+		}
+	}
+}
diff --git a/devTools/types/FC/gameState.d.ts b/devTools/types/FC/gameState.d.ts
new file mode 100644
index 00000000000..a4c37a313dc
--- /dev/null
+++ b/devTools/types/FC/gameState.d.ts
@@ -0,0 +1,195 @@
+declare namespace FC {
+	/**@deprecated */
+	type SlaveStateOrZero = Zeroable<SlaveState>;
+	/**@deprecated */
+	type HumanStateOrZero = Zeroable<HumanState>;
+
+	type DefaultGameStateVariables = typeof App.Data.defaultGameStateVariables;
+	type ResetOnNGPVariables = typeof App.Data.resetOnNGPlus;
+
+	interface Enunciation {
+		title: string;
+		say: string;
+		s: string;
+		S: string;
+		ss: string;
+		c: string;
+		C: string;
+		cc: string;
+		z: string;
+		Z: string;
+		zz: string;
+		ch: string;
+		Ch: string;
+		ps: string;
+		Ps: string;
+		sh: string;
+		Sh: string;
+		sc: string;
+		Sc: string;
+		sch: string;
+		Sch: string;
+		x: string;
+		X: string;
+	}
+
+	interface PeacekeepersState {
+		generalName: string;
+		strength: number;
+		attitude: number;
+		independent: number;
+		undermining: number;
+		influenceAnnounced: number;
+		tastes: number;
+	}
+
+	interface DeprecatedGameVariables {
+		/** @deprecated */
+		events: string[];
+		/** @deprecated */
+		RESSevent: string[];
+		/** @deprecated */
+		RESSTRevent: string[];
+		/** @deprecated */
+		RETSevent: string[];
+		/** @deprecated */
+		RECIevent: string[];
+		/** @deprecated */
+		RecETSevent: string[];
+		/** @deprecated */
+		REFIevent: string[];
+		/** @deprecated */
+		REFSevent: string[];
+		/** @deprecated */
+		PESSevent: string[];
+		/** @deprecated */
+		PETSevent: string[];
+		/** @deprecated */
+		FSAcquisitionEvents: string[];
+		/** @deprecated */
+		FSNonconformistEvents: string[];
+		/** @deprecated */
+		REAnalCowgirlSubIDs: number[];
+		/** @deprecated */
+		RETasteTestSubIDs: number[];
+		/** @deprecated */
+		rebelSlaves: string[];
+		/** @deprecated */
+		REBoobCollisionSubIDs: string[];
+		/** @deprecated */
+		REIfYouEnjoyItSubIDs: string[];
+		/** @deprecated */
+		RESadisticDescriptionSubIDs: string[];
+		/** @deprecated */
+		REShowerForceSubIDs: string[];
+		/** @deprecated */
+		RESimpleAssaultIDs: string[];
+		/** @deprecated */
+		RECockmilkInterceptionIDs: number[];
+		/** @deprecated */
+		REInterslaveBeggingIDs: number[];
+		/** @deprecated */
+		bedSlaves: SlaveState[];
+		/** @deprecated */
+		eligibleSlaves: SlaveState[];
+		/** @deprecated */
+		RERepressedAnalVirginSubIDs: number[];
+
+		/** @deprecated */
+		surgeryType: string;
+
+		/** @deprecated */
+		i: number;
+
+		relationLinks?: Record<number, {father: number, mother: number}>;
+
+		spire: number;
+		customPronouns?: Record<number, Data.Pronouns.Definition>;
+	}
+
+	export type HeadGirlTraining = "health" | "paraphilia" | "soften" | "flaw" | "obedience" |
+		"entertain skill" | "oral skill" | "fuck skill" | "anal skill" | "whore skill";
+
+	export interface HeadGirlTrainee {
+		ID: number;
+		training: HeadGirlTraining;
+	}
+
+	/**
+	 * These variabels shall not be in the game state and there is a hope they will be exterminated in the future
+	 */
+	interface TemporaryVariablesInTheGameState {
+		gameover?: string;
+		slaveMarket?: "TSS" | "GRI" | "SCP" | "LDE" | "TGA" | "HA" | "TFS" | "TCR" | "NUL" | "corporate";
+		prisonCrime?: Zeroable<string>;
+		enunciate?: Enunciation;
+		activeSlaveOneTimeMinAge?: number;
+		activeSlaveOneTimeMaxAge?: number;
+		one_time_age_overrides_pedo_mode?: number;
+		fixedNationality?: string;
+		fixedRace?: string;
+		oneTimeDisableDisability?: number;
+		sortQuickList?: string;
+		slaveAfterRA?: SlaveState;
+
+		slavesToImportMax?: number;
+
+		brandApplied?: number;
+		degradation?: number;
+		partner?: number | "daughter" | "father" | "mother" | "sister" | "relation" | "relationship" | "rivalry" | "";
+
+		activeArcologyIdx?: number;
+
+		passageSwitchHandler?: () => void;
+		showAllEntries?: {
+			costsBudget: number;
+			repBudget: number;
+		};
+
+		brothelSpots?: number;
+		clubSpots?: number;
+		dairySpots?: number;
+		servantsQuartersSpots?: number;
+		clubBonuses?: number;
+		brothelSlavesGettingHelp?: number;
+		clubSlavesGettingHelp?: number;
+
+		lastWeeksRepErrors?: string;
+		lastWeeksCashErrors?: string;
+
+		slaveUsedRest?: 1;
+		arcadeDemandDegResult?: 1 | 2 | 3 | 4 | 5;
+
+		FarmerDevotionThreshold?: number;
+		FarmerDevotionBonus?: number;
+		FarmerTrustThreshold?: number;
+		FarmerTrustBonus?: number;
+		FarmerHealthBonus?: number;
+
+		milkmaidDevotionThreshold?: number;
+		milkmaidDevotionBonus?: number;
+		milkmaidTrustThreshold?: number;
+		milkmaidTrustBonus?: number;
+		milkmaidHealthBonus?: number;
+
+		HGTrainSlavesIDs?: HeadGirlTrainee[];
+		heroSlaveID?: number;
+		pornFameBonus?: number;
+		seed?: number;
+		applyCareerBonus?: Bool;
+		prostheticsConfig?: string;
+		nationalitiescheck?: object;
+		cellPath?: number[];
+		relation: number;
+
+		heroSlaves: SlaveTemplate[];
+
+		//#region FCTV
+		usedRemote: Bool;
+		//#endregion
+	}
+
+	export interface GameVariables extends DefaultGameStateVariables, ResetOnNGPVariables,
+		DeprecatedGameVariables, TemporaryVariablesInTheGameState {
+	}
+}
diff --git a/devTools/types/FC/global.d.ts b/devTools/types/FC/global.d.ts
new file mode 100644
index 00000000000..3a562c171ea
--- /dev/null
+++ b/devTools/types/FC/global.d.ts
@@ -0,0 +1,21 @@
+declare global {
+	// extensions
+	interface Array<T> {
+		toStringExt(delimiter?: string, lastDelimiter?: string): string;
+		includes(needle: any): boolean; // because we use silly unions with 0
+	}
+
+	interface Number {
+		toFixedHTML(fractionDigits?: number): string;
+	}
+
+	interface Window {
+		storyProxy?: object;
+	}
+
+	const V: FC.GameVariables;
+	function createReadonlyProxy<T>(target: T): Readonly<T>;
+	function createCheatProxy<T>(target: T): T;
+}
+
+export {}
diff --git a/devTools/types/FC/human.d.ts b/devTools/types/FC/human.d.ts
new file mode 100644
index 00000000000..775c8bc1b85
--- /dev/null
+++ b/devTools/types/FC/human.d.ts
@@ -0,0 +1,439 @@
+import {DeepPartial} from "ts-essentials";
+declare global {
+	export namespace FC {
+		export type SlaveState = InstanceType<typeof App.Entity.SlaveState>;
+		export type PlayerState = InstanceType<typeof App.Entity.PlayerState>;
+
+		export type DeepPartialSlaveState = DeepPartial<SlaveState>;
+
+		type SlaveStateRequiredAttributes = "ID" | "slaveName";
+		export interface SlaveTemplate extends DeepPartial<Omit<SlaveState, SlaveStateRequiredAttributes>>,
+			Pick<SlaveState, SlaveStateRequiredAttributes> {
+			removedLimbs?: number[];
+		}
+
+		export type SlaveUpdate = DeepPartialSlaveState;
+
+		//#region SlaveState types
+		namespace Rules {
+			type Living = "spare" | "normal" | "luxurious";
+			type Rest = "none" | "cruel" | "restrictive" | "permissive" | "mandatory";
+			type Mobility = "restrictive" | "permissive";
+			type Speech = "restrictive" | "permissive" | "accent elimination" | "language lessons";
+			type Relationship = "restrictive" | "just friends" | "permissive";
+			type Lactation = "none" | "induce" | "maintain";
+			type Punishment = "confinement" | "whipping" | "chastity" | "situational";
+			type Reward = "relaxation" | "drugs" | "orgasm" | "situational" | "confinement";
+
+			interface LivingFreezed extends Record<string, Living> {
+				LUXURIOUS: 'luxurious';
+				NORMAL: 'normal';
+				SPARE: 'spare';
+			}
+		}
+
+
+
+		type Assignment =
+			// Penthouse Assignments
+			'rest' | 'please you' | 'take classes' | 'be a servant' | 'whore' | 'serve the public' | 'be a subordinate slave' |
+			'get milked' | 'work a glory hole' | 'stay confined' |
+			// Leadership Assignments
+			'guard you' | 'be your Head Girl' | 'recruit girls' | 'be your agent' | 'live with your agent' |
+			// Facility Assignments
+			'be confined in the arcade' | 'be the Madam' | 'work in the brothel' | 'be the Wardeness' | 'be confined in the cellblock' |
+			'be the DJ' | 'serve in the club' | 'be the Nurse' | 'get treatment in the clinic' | 'be the Milkmaid' | 'work in the dairy' |
+			'be the Farmer' | 'work as a farmhand' | 'live with your Head Girl' | 'be your Concubine' | 'serve in the master suite' |
+			'be the Matron' | 'work as a nanny' | 'be the Schoolteacher' | 'learn in the schoolroom' | 'be the Stewardess' |
+			'work as a servant' | 'be the Attendant' | 'rest in the spa' |
+			// Does this one exist?
+			'labor in the production line' |
+			// Other
+			'choose her own job' |
+			// Pseudo-jobs
+			'@Lurcher' | '@Pit' | '@be imported' | '@lay in tank';
+
+		interface AssignmentFreeze extends Record<string, Assignment> {
+			// Penthouse Assignments
+			REST: 'rest';
+			FUCKTOY: 'please you';
+			CLASSES: 'take classes';
+			HOUSE: 'be a servant';
+			WHORE: 'whore';
+			PUBLIC: 'serve the public';
+			SUBORDINATE: 'be a subordinate slave';
+			MILKED: 'get milked';
+			GLORYHOLE: 'work a glory hole';
+			CONFINEMENT: 'stay confined';
+			// Leadership Assignments
+			BODYGUARD: 'guard you';
+			HEADGIRL: 'be your Head Girl';
+			RECRUITER: 'recruit girls';
+			AGENT: 'be your agent';
+			AGENTPARTNER: 'live with your agent';
+			// Facility Assignments
+			ARCADE: 'be confined in the arcade';
+			MADAM: 'be the Madam';
+			BROTHEL: 'work in the brothel';
+			WARDEN: 'be the Wardeness';
+			CELLBLOCK: 'be confined in the cellblock';
+			DJ: 'be the DJ';
+			CLUB: 'serve in the club';
+			NURSE: 'be the Nurse';
+			CLINIC: 'get treatment in the clinic';
+			MILKMAID: 'be the Milkmaid';
+			DAIRY: 'work in the dairy';
+			FARMER: 'be the Farmer';
+			FARMYARD: 'work as a farmhand';
+			HEADGIRLSUITE: 'live with your Head Girl';
+			CONCUBINE: 'be your Concubine';
+			MASTERSUITE: 'serve in the master suite';
+			MATRON: 'be the Matron';
+			NURSERY: 'work as a nanny';
+			TEACHER: 'be the Schoolteacher';
+			SCHOOL: 'learn in the schoolroom';
+			STEWARD: 'be the Stewardess';
+			QUARTER: 'work as a servant';
+			ATTENDANT: 'be the Attendant';
+			SPA: 'rest in the spa';
+			// Does this one exist?
+			BABY_FACTORY: 'labor in the production line';
+			// Other
+			CHOICE: 'choose her own job';
+			// Pseudo-jobs
+			LURCHER: '@Lurcher';
+			PIT: '@Pit';
+			IMPORTED: '@be imported';
+			TANK: '@lay in tank';
+		}
+		type Fetish = WithNone<"mindbroken" | "submissive" | "cumslut" | "humiliation" | "buttslut" | "boobs" | "sadist" |
+			"masochist" | "dom" | "pregnancy">;
+		type BehavioralFlaw = WithNone<
+			| "arrogant" // clings to her dignity, thinks slavery is beneath her
+			| "bitchy" // : can 't keep her opinions to herself
+			| "odd" // says and does odd things
+			| "hates men" // hates men
+			/** hates women */
+			| "hates women"
+			| "gluttonous" // likes eating, gains weight
+			| "anorexic" // dislikes eating and being forced to eat, loses weight
+			| "devout" // resistance through religious faith
+			| "liberated" // believes slavery is wrong
+		>;
+
+		type BehavioralQuirk = WithNone<
+			/** believes she has value as a slave */
+			| "confident"
+			/** often has as witty or cunning remark ready, knows when to say it */
+			| "cutting"
+			/** is funny */
+			| "funny"
+			/** loves working out */
+			| "fitness"
+			/** likes spending time with women */
+			| "adores women"
+			/** likes spending time with men */
+			| "adores men"
+			/** defines herself on the thoughts of others */
+			| "insecure"
+			/** breaks cultural norms */
+			| "sinful"
+			/** advocates slavery */
+			| "advocate">;
+
+		type SexualFlaw = WithNone<
+			/**  hates oral sex */
+			| "hates oral"
+			/** hates anal sex */
+			| "hates anal"
+			/** dislikes penetrative sex */
+			| "hates penetration"
+			/** nervous when naked */
+			| "shamefast"
+			/** believes sex should be based on love and consent */
+			| "idealistic"
+			/** dislikes sex */
+			| "repressed"
+			/** inert during sex */
+			| "apathetic"
+			/** sexually crude and has little sense of what partners find disgusting during sex */
+			| "crude"
+			/** sexually judgemental and often judges her sexual partners' performance */
+			| "judgemental"
+			/** disregards herself in sex */
+			| "neglectful"
+			/** addicted to cum */
+			| "cum addict"
+			/** addicted to anal */
+			| "anal addict"
+			/** addicted to being the center of attention */
+			| "attention whore"
+			/** addicted to her own breasts */
+			| "breast growth"
+			/** sexually abusive */
+			| "abusive"
+			/** loves causing pain and suffering */
+			| "malicious"
+			/** hates herself */
+			| "self hating"
+			/** addicted to being pregnant */
+			| "breeder">;
+
+		type SexualQuirk = WithNone<
+			/** can take a facefucking */
+			"gagfuck queen"
+			/** knows how far she can go without getting hurt */
+			| "painal queen"
+			/** knows how much resistance her partners want */
+			| "strugglefuck queen"
+			/** is a tease */
+			| "tease"
+			/** enjoys the closeness of sex */
+			| "romantic"
+			/** enjoys breaking sexual boundaries */
+			| "perverted"
+			/** enjoys bring her partners to orgasm */
+			| "caring"
+			/** willing to do anything */
+			| "unflinching"
+			/** prefers big cocks */
+			| "size queen">;
+
+		type BreastShape = "normal" | "perky" | "saggy" | "torpedo-shaped" | "downward-facing" | "wide-set" | "deflated";
+		type Diet = "healthy" | "restricted" | "corrective" | "muscle building" | "fattening" | "slimming" | "XX" | "XY" | "XXY" |
+			"cum production" | "cleansing" | "fertility";
+		type Drug = "no drugs" |
+			"breast injections" | "butt injections" | "lip injections" | "nipple enhancers" | "penis enhancement" | "testicle enhancement" |
+			"intensive breast injections" | "intensive butt injections" | "intensive penis enhancement"| "intensive testicle enhancement"|
+			"fertility drugs" |  "super fertility drugs" |
+			 "psychosuppressants" | "psychostimulants" | "steroids" |
+			"hyper breast injections" | "hyper butt injections" | "hyper penis enhancement" | "hyper testicle enhancement" |
+			"female hormone injections" | "male hormone injections" | "priapism agents" |
+			"anti-aging cream" | "appetite suppressors" |  "hormone enhancers" | "hormone blockers" |
+			"penis atrophiers" | "testicle atrophiers" | "clitoris atrophiers" | "labia atrophiers" | "nipple atrophiers" | "lip atrophiers" |
+			"breast redistributors" | "butt redistributors" | "sag-B-gone" | "growth stimulants";
+
+		type EarWear = WithNone<"hearing aids" | "muffling ear plugs" | "deafening ear plugs">;
+		type EarShape = WithNone<"damaged" | "normal" | "pointy" | "elven" | "ushi" | "robot">;
+		type EarTypeKemonomimi = WithNone<"normal" | "neko" | "inu" | "kit" | "tanuki" | "usagi">;
+		type EyebrowStyle = "bald" | "curved" | "elongated" | "high-arched" | "natural" | "rounded" | "shaved" | "shortened" |
+			"slanted inwards" | "slanted outwards" | "straight";
+		type EyebrowThickness = "pencil-thin" | "thin" | "threaded" | "natural" | "tapered" | "thick" | "bushy";
+		type EyeWear = WithNone<"glasses" | "blurring glasses" | "corrective glasses" | "blurring contacts" | "corrective contacts">;
+		type FaceShape = "masculine" | "androgynous" | "normal" | "cute" | "sensual" | "exotic";
+		type GenderGenes = "XX" | "XY" | "YY";
+		type GestationDrug = "slow gestation" | "speed up" | "labor suppressors";
+		type HornType = WithNone<"curved succubus horns" | "backswept horns" | "cow horns" | "one long oni horn" |
+			"two long oni horns" | "small horns">;
+		type InflationLiquid = WithNone<"water" | "cum" | "milk" | "food" | "aphrodisiac" | "curative" | "tightener" | "urine">;
+		type TailType = WithNone<"mod" | "combat" | "sex">;
+		type Markings = WithNone<"beauty mark" | "birthmark" | "freckles" | "heavily freckled">;
+		type TailShape = WithNone<"neko" | "inu" | "kit" | "kitsune" | "tanuki" | "ushi" | "usagi" | "risu" | "uma">;
+		type ToyHole = "all her holes" | "mouth" | "boobs" | "pussy" | "ass" | "dick";
+		type OvaryImplantType = 0 | "fertility" | "sympathy" | "asexual";
+		type NippleShape = "huge" | "puffy" | "inverted" | "tiny" | "cute" | "partially inverted" | "fuckable";
+		/**
+		 * 0: no; 1: yes; 2: heavy
+		 */
+		type PiercingType = 0 | 1 | 2;
+		type Race = "amerindian" | "asian" | "black" | "indo-aryan" | "latina" | "malay" | "middle eastern" | "mixed race" |
+			"pacific islander" | "semitic" | "southern european" | "white";
+		type SizingImplantType = WithNone<"normal" | "string" | "fillable" | "advanced fillable" | "hyper fillable">;
+		type SmartPiercingSetting = WithNone<"off" | "all" | "no default setting" | "women" | "men" | "vanilla" | "oral" | "anal" |
+			"boobs" | "submissive" | "humiliation" | "pregnancy" | "dom" | "masochist" | "sadist" | "anti-women" | "anti-men">;
+		type TeethType = "normal" | "crooked" | "gapped" | "straightening braces" | "cosmetic braces" | "removable" | "pointy" |
+			"fangs" | "fang" | "baby" | "mixed";
+		type MinorInjury = Zeroable<"black eye" | "bad bruise" | "split lip" | "sore ass">;
+
+		type AnimalKind = "human" | "dog" | "pig" | "horse" | "cow";
+		type SpermType = AnimalKind | "sterile";
+
+		type GeneticQuirk = 0 | 1 | 2;
+		interface GeneticQuirks {
+			/** Oversized breasts. Increased growth rate, reduced shrink rate. Breasts try to return to oversized state if reduced. */
+			macromastia: GeneticQuirk | 3;
+			/** Greatly oversized breasts. Increased growth rate, reduced shrink rate. Breasts try to return to oversized state if reduced.
+			 *
+			 * **macromastia + gigantomastia** - Breasts never stop growing. Increased growth rate, no shrink rate. */
+			gigantomastia: GeneticQuirk | 3;
+			/** is prone to having twins, shorter pregnancy recovery rate */
+			fertility: GeneticQuirk;
+			/** is prone to having multiples, even shorter pregnancy recovery rate
+			 *
+			 * **fertility + hyperFertility** - will have multiples, even shorter pregnancy recovery rate */
+			hyperFertility: GeneticQuirk;
+			/** pregnancy does not block ovulation, slave can become pregnant even while pregnant */
+			superfetation: GeneticQuirk;
+			/** Pleasurable pregnancy and orgasmic birth. Wider hips, looser and wetter vagina. High pregadaptation and low birth damage. */
+			uterineHypersensitivity: GeneticQuirk;
+			/** is abnormally tall. gigantism + dwarfism - is very average*/
+			gigantism: GeneticQuirk;
+			/** is abnormally short. gigantism + dwarfism - is very average*/
+			dwarfism: GeneticQuirk;
+			/** has a flawless face. pFace + uFace - Depends on carrier status, may swing between average and above/below depending on it */
+			pFace: GeneticQuirk;
+			/** has a hideous face. pFace + uFace - Depends on carrier status, may swing between average and above/below depending on it */
+			uFace: GeneticQuirk;
+			/** has pale skin, white hair and red eyes */
+			albinism: GeneticQuirk;
+			/** may have mismatched eyes, the eye color stored here is always the left eye */
+			heterochromia: GeneticQuirk | string;
+			/** ass never stops growing. Increased growth rate, reduced shrink rate. */
+			rearLipedema: GeneticQuirk;
+			/** has (or will have) a huge dong */
+			wellHung: GeneticQuirk;
+			/** constantly gains weight unless dieting, easier to gain weight. wGain + wLoss - weight gain/loss fluctuates randomly */
+			wGain: GeneticQuirk;
+			/** constantly loses weight unless gaining, easier to lose weight. wGain + wLoss - weight gain/loss fluctuates randomly */
+			wLoss: GeneticQuirk;
+			/** body attempts to normalize to an androgynous state */
+			androgyny: GeneticQuirk;
+			/** constantly gains muscle mass, easier to gain muscle. mGain + mLoss - muscle gain/loss amplified, passively lose muscle unless building */
+			mGain: GeneticQuirk;
+			/** constantly loses muscle mass, easier to gain muscle. mGain + mLoss - muscle gain/loss amplified, passively lose muscle unless building */
+			mLoss: GeneticQuirk;
+			/** slave can only ever birth girls */
+			girlsOnly: GeneticQuirk;
+		}
+		interface FetusGenetics {
+			gender: GenderGenes;
+			name: string;
+			surname: Zeroable<string>;
+			mother: number;
+			motherName: string;
+			father: number;
+			fatherName: string;
+			nationality: string;
+			race: Race;
+			intelligence: number;
+			face: number;
+			faceShape: FaceShape;
+			eyeColor: string
+			hColor: string;
+			skin: string;
+			markings: Markings;
+			behavioralFlaw: BehavioralFlaw;
+			sexualFlaw: SexualFlaw;
+			pubicHStyle: string;
+			underArmHStyle: string;
+			clone: Zeroable<string>;
+			cloneID: number;
+			geneticQuirks: Partial<GeneticQuirks>;
+			fetish: Fetish;
+			spermY: number;
+			inbreedingCoeff?: number;
+		}
+		interface Fetus {
+			ID: string;
+			/** initial age */
+			age: number;
+			/** initial real age (first week in mother) */
+			realAge: number;
+			motherID: number;
+			/** We can store who is father too. */
+			fatherID: number;
+			volume: number;
+			reserve: string;
+			identical: number;
+			splitted?: number;
+			twinID?: string;
+			genetics?: FetusGenetics;
+		}
+		//#endregion
+
+		type LimbState = InstanceType<typeof App.Entity.LimbState>;
+
+		interface LimbsState {
+			arm: {
+				left: LimbState;
+				right: LimbState;
+			};
+			leg: {
+				left: LimbState,
+				right: LimbState;
+			};
+			PLimb: number;
+		}
+
+		interface PregnancyData {
+			type: string;
+			normalOvaMin: number;
+			normalOvaMax: number;
+			normalBirth: number;
+			minLiveBirth: number;
+			drugsEffect: number;
+			fetusWeek: number[];
+			fetusSize: number[];
+			fetusRate: number[];
+			sizeType: number;
+		}
+
+		type HumanState = SlaveState | PlayerState;
+
+		export namespace Medicine {
+			export namespace Surgery {
+				/**
+				 * Describes surgical procedure
+				 */
+				export interface Procedure {
+					/**
+					 * Type code that identifies this kind of procedure.
+					 * Currently unused, but planned for future use by RA for prioritizing procedures
+					 */
+					typeId: string;
+					/**
+					 * Short label for the procedure. Can be used as a link text.
+					 */
+					label: string;
+					/**
+					 * If procedure is targeted at changing object characteristic, this is the net change (signed)
+					 */
+					targetEffect: number;
+					/**
+					 * Description of the procedure, more or less detailed
+					 */
+					description: string;
+					/**
+					 * Money costs (positive when you pay for it)
+					 */
+					costs: number;
+					/**
+					 * Projected health loss (positive when health decreases)
+					 */
+					healthCosts: number;
+					/**
+					 * Function to perform the procedure
+					 * If action is undefined, the procedure can't be applied (and .description contains the reason)
+					 */
+					action: slaveOperation;
+					/**
+					 * surgery type for passages like "Surgery Degradation"
+					 */
+					surgeryType: string;
+				}
+
+				export interface SizingOptions {
+					/** include possible augmentation procedures */
+					augmentation?: boolean;
+					/** include possible reduction procedures */
+					reduction?: boolean;
+					/** include option to install string implants */
+					strings?: boolean;
+					/** include implant change options */
+					replace?: boolean;
+				}
+			}
+			export namespace OrganFarm {
+				interface GrowingOrgan {
+					type: string;
+					weeksToCompletion: number;
+					ID: number;
+				}
+				export namespace Organs {
+				}
+			}
+		}
+	}
+}
+
+export {}
diff --git a/devTools/types/FC/medicine.d.ts b/devTools/types/FC/medicine.d.ts
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/devTools/types/FC/misc.d.ts b/devTools/types/FC/misc.d.ts
new file mode 100644
index 00000000000..482eb2f4e16
--- /dev/null
+++ b/devTools/types/FC/misc.d.ts
@@ -0,0 +1,30 @@
+declare namespace FC {
+	export type Gingering = "antidepressant" | "depressant" | "stimulant" | "vasoconstrictor" | "vasodilator" | "aphrodisiac" | "ginger" | number;
+	export type GingeringDetection = "slaver" | "mercenary" | "force" | number;
+
+	export namespace SlaveSummary {
+		export interface SmartPiercing {
+			setting: {
+				off: string,
+				submissive: string,
+				lesbian: string,
+				oral: string,
+				humiliation: string,
+				anal: string,
+				boobs: string,
+				sadist: string,
+				masochist: string,
+				dom: string,
+				pregnancy: string,
+				vanilla: string,
+				all: string,
+				none: string,
+				monitoring: string,
+				men: string,
+				women: string,
+				"anti-men": string,
+				"anti-women": string,
+			}
+		}
+	}
+}
diff --git a/devTools/types/SugarCubeExtensions.d.ts b/devTools/types/SugarCubeExtensions.d.ts
index a23a6887d5a..9c8d0bafddf 100644
--- a/devTools/types/SugarCubeExtensions.d.ts
+++ b/devTools/types/SugarCubeExtensions.d.ts
@@ -123,7 +123,7 @@ declare module "twine-sugarcube" {
 
 		baseNationalities: string[];
 		paraphiliaList: string[]; // actually FC.SexualFlaw[]
-		prosthetics: Record<string, FC.Data.ProsteticDefinition>;
+		prosthetics: Record<string, FC.Data.ProstheticDefinition>;
 	}
 
 	// These are SugarCube private APIs used in the project
diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index b67d37a0b26..69dd17da918 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -469,7 +469,7 @@ App.Data.resetOnNGPlus = {
 	averageDevotion: 0,
 	enduringTrust: 0,
 	enduringDevotion: 0,
-	/** @type {App.RA.Rule[]} */
+	/** @type {FC.RA.Rule[]} */
 	defaultRules: [],
 
 	REFeminizationCheckinIDs: [],
diff --git a/src/004-base/facility.js b/src/004-base/facility.js
index 250f93f6f1d..0aa30d72fa6 100644
--- a/src/004-base/facility.js
+++ b/src/004-base/facility.js
@@ -6,10 +6,10 @@ App.Data.FacilityDesc = class {
 		 * If null, baseName is used instead
 		 */
 		this.genericName = "";
-		/** @type {Object.<string, App.Data.JobDesc>} */
+		/** @type {Object.<string, FC.Data.JobDesc>} */
 		this.jobs = {};
 		this.defaultJob = "";
-		/** @type {App.Data.ManagerJobDesc} */
+		/** @type {FC.Data.ManagerJobDesc} */
 		this.manager = null;
 	}
 };
@@ -19,7 +19,7 @@ App.Entity.Facilities = {};
 
 App.Entity.Facilities.Job = class {
 	constructor() {
-		/** @type {App.Data.JobDesc} */
+		/** @type {FC.Data.JobDesc} */
 		this.desc = null;
 		/** @type {App.Entity.Facilities.Facility} */
 		this.facility = null;
@@ -164,7 +164,7 @@ App.Entity.Facilities.Job = class {
 App.Entity.Facilities.ManagingJob = class extends App.Entity.Facilities.Job {
 	constructor() {
 		super();
-		/** @type {App.Data.ManagerJobDesc} */
+		/** @type {FC.Data.ManagerJobDesc} */
 		this.desc = null;
 	}
 
@@ -227,7 +227,7 @@ App.Entity.Facilities.ManagingJob = class extends App.Entity.Facilities.Job {
 
 App.Entity.Facilities.Facility = class {
 	/**
-	 * @param {App.Data.FacilityDesc} desc defines state variable for this facility
+	 * @param {FC.Data.FacilityDesc} desc defines state variable for this facility
 	 * @param {Object.<string, App.Entity.Facilities.Job>} [jobs] job object that are not default
 	 * @param {App.Entity.Facilities.ManagingJob} [manager]
 	 */
@@ -525,7 +525,7 @@ App.Entity.Facilities.FacilitySingleJob = class extends App.Entity.Facilities.Jo
 
 App.Entity.Facilities.SingleJobFacility = class extends App.Entity.Facilities.Facility {
 	/**
-	 * @param {App.Data.FacilityDesc} desc defines state variable for this facility
+	 * @param {FC.Data.FacilityDesc} desc defines state variable for this facility
 	 * @param {Object.<string, App.Entity.Facilities.Job>} [jobs] job object that are not default
 	 * @param {App.Entity.Facilities.ManagingJob} [manager]
 	 */
diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js
index abd51e986ae..3eb76248063 100644
--- a/src/data/backwardsCompatibility/datatypeCleanup.js
+++ b/src/data/backwardsCompatibility/datatypeCleanup.js
@@ -1821,7 +1821,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 
 	return ruleCleanup;
 
-	/** @param {App.RA.Rule} rule */
+	/** @param {FC.RA.Rule} rule */
 	function ruleCleanup(rule) {
 		// ensure rule has all required properties
 		let newRule = App.RA.ruleDeepAssign(emptyDefaultRule(), rule);
@@ -1830,7 +1830,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 		return newRule;
 	}
 
-	/** @param {App.RA.RuleConditions} cond */
+	/** @param {FC.RA.RuleConditions} cond */
 	function cleanupConditions(cond) {
 		if (cond.excludeSpecialSlaves !== undefined) {
 			if (cond.excludeSpecialSlaves) {
@@ -1844,7 +1844,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 		if (cond.specialSlaves !== undefined) {
 			const f = App.Data.Facilities;
 			// facilities with heads
-			/** @type {App.Data.FacilityDesc[]} */
+			/** @type {FC.Data.FacilityDesc[]} */
 			const fwh = [
 				f.brothel,
 				f.cellblock,
@@ -1905,7 +1905,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 		}
 	}
 
-	/** @param {App.RA.RuleSetters} set */
+	/** @param {FC.RA.RuleSetters} set */
 	function settersSchemeCleanup(set) {
 		/**
 		 * Moves properties of the given object, whose names start with prefix to the subject newProp
@@ -1931,7 +1931,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 	}
 
 	/**
-	 * @param {App.RA.RuleSetters} set
+	 * @param {FC.RA.RuleSetters} set
 	 */
 	function correctStringValues(set) {
 		for (const [k, v] of Object.entries(set)) {
@@ -1957,7 +1957,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 	}
 
 	/**
-	 * @param {App.RA.RuleSetters} set
+	 * @param {FC.RA.RuleSetters} set
 	 */
 	function migrateReleaseRules(set) {
 		if (typeof set.releaseRules === 'string') {
@@ -2003,7 +2003,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() {
 		}
 	}
 
-	/** @param {App.RA.RuleSetters} set */
+	/** @param {FC.RA.RuleSetters} set */
 	function cleanupSetters(set) {
 		settersSchemeCleanup(set);
 		migrateReleaseRules(set);
diff --git a/src/data/utility/pronounsUtils.js b/src/data/utility/pronounsUtils.js
index 45197d0b940..98c54f3762d 100644
--- a/src/data/utility/pronounsUtils.js
+++ b/src/data/utility/pronounsUtils.js
@@ -22,7 +22,7 @@ App.Data.Pronouns.Kind = Object.freeze({
  * @param {string} object
  * @param {string} objectReflexive
  * @param {string} noun
- * @returns {App.Data.Pronouns.Definition}
+ * @returns {FC.Data.Pronouns.Definition}
  */
 App.Data.Pronouns.makePronounsData = function(
 	pronoun, possessive, possessivePronoun, object, objectReflexive, noun) {
diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js
index 0809b032d09..675af68a666 100644
--- a/src/js/DefaultRules.js
+++ b/src/js/DefaultRules.js
@@ -104,11 +104,11 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @returns {Map}
+	 * @returns {{ruleIds: string[], rule: FC.RA.RuleSetters}}}
 	 */
 	function ProcessSlaveRules(slave) {
 		// merge all rules applying on a slave into one big rule
-		/** @type {App.RA.Rule[]} */
+		/** @type {FC.RA.Rule[]} */
 		const rules = V.defaultRules.filter((x) => ruleAppliesP(x.condition, slave));
 		const ruleIds = [], assignments = [];
 		for (const rule of rules) {
@@ -120,8 +120,8 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
-	 * @returns {App.RA.RuleSetters}
+	 * @param {FC.RA.RuleSetters} rule
+	 * @returns {FC.RA.RuleSetters}
 	 */
 	function ProcessAssignments(slave, rule) {
 		// Before merging rules, we process assignments for each rule separately so we can remove slaves from facilities when they no longer qualify, even if the final "winning" rule assigns them elsewhere
@@ -164,7 +164,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function AssignJobToSlave(slave, rule) {
 		// place slave on assignment defined by the rule
@@ -178,7 +178,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessClothing(slave, rule) {
 		// apply clothes to slave
@@ -199,7 +199,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessCollar(slave, rule) {
 		// apply collar to slave
@@ -227,7 +227,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessMask(slave, rule) {
 		// apply faceAccessory to slave
@@ -246,7 +246,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessGag(slave, rule) {
 		// apply mouthAccessory to slave
@@ -270,7 +270,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessEyewear(slave, rule) {
 		// apply glasses, contacts to slave
@@ -364,7 +364,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessEarwear(slave, rule) {
 		// apply earplugs to slave
@@ -427,7 +427,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessDildos(slave, rule) {
 		// apply vaginal dildos to slave
@@ -443,7 +443,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessVVirginDildos(slave, rule) {
 		// apply vaginal dildos to vaginal virgins
@@ -504,7 +504,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessAVirginDildos(slave, rule) {
 		// apply vaginal dildos to anal virgins
@@ -565,7 +565,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessNonVirginDildos(slave, rule) {
 		// apply vaginal dildos to non-virgins
@@ -625,7 +625,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessVaginalAttachments(slave, rule) {
 		// apply vaginal accessories to slaves
@@ -665,7 +665,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessDickAccessories(slave, rule) {
 		// apply dick accessories to slave
@@ -698,7 +698,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessChastity(slave, rule) {
 		// apply chastity to slave
@@ -740,7 +740,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessShoes(slave, rule) {
 		// apply shoes to slave
@@ -756,7 +756,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessBellyAccessories(slave, rule) {
 		// apply belly accessories to slave
@@ -779,7 +779,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessArmAccessory(slave, rule) {
 		if (rule.armAccessory !== undefined && rule.armAccessory !== null && hasAnyArms(slave) && slave.armAccessory !== rule.armAccessory) {
@@ -790,7 +790,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessLegAccessory(slave, rule) {
 		if (rule.legAccessory !== undefined && rule.legAccessory !== null && hasAnyLegs(slave) && slave.legAccessory !== rule.legAccessory) {
@@ -801,7 +801,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessAnalAccessories(slave, rule) {
 		// apply buttplugs and buttplug accessories to slave
@@ -817,7 +817,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessAnalVirginButtplugs(slave, rule) {
 		// apply buttplugs to virgins
@@ -878,7 +878,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessNonVirginButtplugs(slave, rule) {
 		// apply buttplugs to non-virgins
@@ -939,7 +939,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessButtplugAttachments(slave, rule) {
 		// apply buttplug accessories to slaves
@@ -965,7 +965,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessBellyImplant(slave, rule) {
 		// Here is belly implant size control, it's used in Surgery Degradation passage to setup devotion and trust changes.
@@ -1047,7 +1047,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessContraceptives(slave, rule) {
 		if ((rule.preg !== undefined) && (rule.preg !== null)) {
@@ -1063,7 +1063,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessAbortions(slave, rule) {
 		function conditionalTermination(slave, predicate) {
@@ -1163,7 +1163,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessAssetGrowthDrugs(slave, rule) {
 		if ((slave.drugs === "super fertility drugs" || slave.drugs === "fertility drugs") && isFertile(slave)) {
@@ -1253,7 +1253,7 @@ globalThis.DefaultRules = (function() {
 		/**
 		 * @param {App.Entity.SlaveState} slave
 		 * @param {string} asset
-		 * @param {App.RA.NumericTarget} target
+		 * @param {FC.RA.NumericTarget} target
 		 * @param {Array} priorities
 		 * @param {number} step
 		 */
@@ -1314,7 +1314,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessOtherDrugs(slave, rule) {
 		// Other Drugs
@@ -1500,7 +1500,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessEnema(slave, rule) {
 		if ((rule.inflationType !== undefined) && (rule.inflationType !== null)) {
@@ -1536,7 +1536,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 
 	function ProcessPit(slave, rule) {
@@ -1560,7 +1560,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessDiet(slave, rule) {
 		// Diet Setting
@@ -1700,7 +1700,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessCuratives(slave, rule) {
 		if ((rule.curatives !== undefined) && (rule.curatives !== null)) {
@@ -1725,7 +1725,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessAphrodisiacs(slave, rule) {
 		if ((rule.aphrodisiacs !== undefined) && (rule.aphrodisiacs !== null)) {
@@ -1738,7 +1738,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessPenisHormones(slave, rule) {
 		if (slave.dick > 0) {
@@ -1780,7 +1780,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessFemaleHormones(slave, rule) {
 		if ((slave.vagina > -1) && (slave.dick === 0) && (rule.XX !== undefined) && (rule.XX !== null)) {
@@ -1799,7 +1799,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessPregnancyDrugs(slave, rule) {
 		if (slave.pregKnown === 1 && rule.pregSpeed !== null && (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset") && slave.indentureRestrictions < 1 && slave.broodmother === 0) {
@@ -1832,7 +1832,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessLivingStandard(slave, rule) {
 		if ((rule.livingRules !== undefined) && (rule.livingRules !== null)) {
@@ -1865,7 +1865,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessRest(slave, rule) {
 		if ((rule.restRules !== undefined) && (rule.restRules !== null)) {
@@ -1878,7 +1878,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessSpeech(slave, rule) {
 		if ((rule.speechRules !== undefined) && (rule.speechRules !== null) && (slave.rules.speech !== rule.speechRules)) {
@@ -1912,7 +1912,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessRelationship(slave, rule) {
 		if ((slave.fetish !== "mindbroken")) {
@@ -1927,7 +1927,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessRelease(slave, rule) {
 		if ((rule.releaseRules !== undefined) && (rule.releaseRules !== null)) {
@@ -1954,7 +1954,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessLactation(slave, rule) {
 		if ((rule.lactationRules !== undefined) && (rule.lactationRules !== null)) {
@@ -1969,7 +1969,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessMobility(slave, rule) {
 		if ((rule.mobilityRules !== undefined) && (rule.mobilityRules !== null)) {
@@ -1982,7 +1982,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessPunishment(slave, rule) {
 		if ((rule.standardPunishment !== undefined) && (rule.standardPunishment !== null)) {
@@ -1995,7 +1995,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessReward(slave, rule) {
 		if ((rule.standardReward !== undefined) && (rule.standardReward !== null)) {
@@ -2008,7 +2008,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessToyHole(slave, rule) {
 		if ((rule.toyHole !== undefined) && (rule.toyHole !== null)) {
@@ -2045,7 +2045,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessDietCum(slave, rule) {
 		if ((rule.dietCum !== undefined) && (rule.dietCum !== null)) {
@@ -2065,7 +2065,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessDietMilk(slave, rule) {
 		if ((rule.dietMilk !== undefined) && (rule.dietMilk !== null)) {
@@ -2085,7 +2085,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessSolidFood(slave, rule) {
 		if ((rule.onDiet !== undefined) && (rule.onDiet !== null)) {
@@ -2102,7 +2102,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessTeeth(slave, rule) {
 		if ((rule.teeth !== undefined) && (rule.teeth !== null)) {
@@ -2147,7 +2147,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessStyle(slave, rule) {
 		if (
@@ -2412,7 +2412,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessPiercings(slave, rule) {
 		if (rule.nipplesPiercing !== undefined && (rule.nipplesPiercing !== null)) {
@@ -2606,7 +2606,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessSmartPiercings(slave, rule) {
 		if (slave.clitPiercing === 3) {
@@ -2676,7 +2676,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessTattoos(slave, rule) {
 		if (rule.boobsTat !== undefined && (rule.boobsTat !== null)) {
@@ -2956,7 +2956,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessPornFeedEnabled(slave, rule) {
 		if (rule.pornFeed === undefined || rule.pornFeed == null) {
@@ -2987,7 +2987,7 @@ globalThis.DefaultRules = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters} rule
+	 * @param {FC.RA.RuleSetters} rule
 	 */
 	function ProcessLabel(slave, rule) {
 		// mass removal of old tags, variant from '*' mask.
diff --git a/src/js/pronouns.js b/src/js/pronouns.js
index 9b111984f2b..b90c0540243 100644
--- a/src/js/pronouns.js
+++ b/src/js/pronouns.js
@@ -3,7 +3,7 @@ App.Utils.Pronouns = class {
 	 * @param {{pronoun: number}} obj
 	 */
 	constructor(obj) {
-		/** @type {App.Data.Pronouns.Definition} */
+		/** @type {FC.Data.Pronouns.Definition} */
 		this._pronouns = obj.pronoun < App.Data.Pronouns.Kind.custom ?
 			App.Data.Pronouns.Std[obj.pronoun] :
 			V.customPronouns[obj.pronoun];
diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js
index 04ffbf3cd6b..ac88e556abc 100644
--- a/src/js/rulesAssistant.js
+++ b/src/js/rulesAssistant.js
@@ -30,7 +30,7 @@ globalThis.hasHColorRule = function(slave, rules) {
 
 /**
  * @param {App.Entity.SlaveState} slave
- * @param {App.RA.Rule[]} rules
+ * @param {FC.RA.Rule[]} rules
  * @returns {boolean}
  * */
 globalThis.hasHStyleRule = function(slave, rules) {
@@ -39,7 +39,7 @@ globalThis.hasHStyleRule = function(slave, rules) {
 
 /**
  * @param {App.Entity.SlaveState} slave
- * @param {App.RA.Rule[]} rules
+ * @param {FC.RA.Rule[]} rules
  * @returns {boolean}
  * */
 globalThis.hasEyeColorRule = function(slave, rules) {
@@ -49,7 +49,7 @@ globalThis.hasEyeColorRule = function(slave, rules) {
 /**
  * return if a rule is applied on a slave
  * @param {App.Entity.SlaveState} slave
- * @param {App.RA.Rule[]} rules
+ * @param {FC.RA.Rule[]} rules
  * @returns {boolean}
  */
 globalThis.lastPregRule = function(slave, rules) {
@@ -58,8 +58,8 @@ globalThis.lastPregRule = function(slave, rules) {
 };
 
 /**
- * @param {App.RA.RuleSetters[]} rules
- * @returns {App.RA.RuleSetters}
+ * @param {FC.RA.RuleSetters[]} rules
+ * @returns {FC.RA.RuleSetters}
  */
 globalThis.mergeRules = function(rules) {
 	if (rules.length === 0) {
@@ -77,7 +77,7 @@ globalThis.mergeRules = function(rules) {
 /**
  * return if a rule is applied on a slave
  * @param {App.Entity.SlaveState} slave
- * @param {App.RA.Rule} rule
+ * @param {FC.RA.Rule} rule
  * @returns {boolean}
  */
 globalThis.ruleApplied = function(slave, rule) {
@@ -102,7 +102,7 @@ globalThis.RAFacilityRemove = function(slave, rule) {
 
 /**
  * return whether the rule applies to the slave
- * @param {App.RA.RuleConditions} cond
+ * @param {FC.RA.RuleConditions} cond
  * @param {App.Entity.SlaveState} slave
  * @returns {boolean} flag */
 globalThis.ruleAppliesP = function(cond, slave) {
@@ -158,7 +158,7 @@ App.RA.newRule = function() {
 		surgery: emptySurgery
 	};
 
-	/** @returns {App.RA.Rule} */
+	/** @returns {FC.RA.Rule} */
 	function emptyRule() {
 		const id = generateNewID();
 		return {
@@ -170,7 +170,7 @@ App.RA.newRule = function() {
 		};
 	}
 
-	/** @returns {App.RA.RuleConditions} */
+	/** @returns {FC.RA.RuleConditions} */
 	function emptyConditions() {
 		return {
 			function: false,
@@ -180,7 +180,7 @@ App.RA.newRule = function() {
 			excludedSlaves: [],
 		};
 	}
-	/** @returns {App.RA.RuleSetters} */
+	/** @returns {FC.RA.RuleSetters} */
 	function emptySetters() {
 		return {
 			releaseRules: emptyRelease(),
@@ -307,7 +307,7 @@ App.RA.newRule = function() {
 		};
 	}
 
-	/** @returns {App.RA.RuleReleaseSetters} */
+	/** @returns {FC.RA.RuleReleaseSetters} */
 	function emptyRelease() {
 		return {
 			masturbation: null,
@@ -318,7 +318,7 @@ App.RA.newRule = function() {
 		};
 	}
 
-	/** @returns {App.RA.RuleGrowthSetters} */
+	/** @returns {FC.RA.RuleGrowthSetters} */
 	function emptyGrowth() {
 		return {
 			boobs: null,
@@ -330,7 +330,7 @@ App.RA.newRule = function() {
 		};
 	}
 
-	/** @returns {App.RA.RuleSurgerySettings} */
+	/** @returns {FC.RA.RuleSurgerySettings} */
 	function emptySurgery() {
 		return {
 			eyes: null,
@@ -362,7 +362,7 @@ App.RA.newRule = function() {
 }();
 
 /**
- * @returns {App.RA.Rule}
+ * @returns {FC.RA.Rule}
  */
 globalThis.emptyDefaultRule = App.RA.newRule.rule;
 
@@ -451,7 +451,7 @@ globalThis.RASummaryCell = function() {
 		}
 		table.push(r);
 	}
-	/** @type {App.RA.Rule[]} */
+	/** @type {FC.RA.Rule[]} */
 	const rules = V.defaultRules;
 	let r = "";
 
@@ -487,7 +487,7 @@ globalThis.RASummaryCell = function() {
  * Creates RA target object used in rules for body properties
  * @param {string} condition comparison condition. One of '==', '>=', '<=', '>', '<'
  * @param {number} val target value
- * @returns {App.RA.NumericTarget}
+ * @returns {FC.RA.NumericTarget}
  */
 App.RA.makeTarget = function(condition, val) {
 	return {
@@ -500,7 +500,7 @@ App.RA.makeTarget = function(condition, val) {
  * Creates RA range object used in rules
  * @param {number} minValue
  * @param {number} maxValue
- * @returns {App.RA.NumericRange}
+ * @returns {FC.RA.NumericRange}
  */
 App.RA.makeRange = function(minValue, maxValue) {
 	return {
@@ -511,7 +511,7 @@ App.RA.makeRange = function(minValue, maxValue) {
 /**
  * Shall the current value be increased according to the target and condition
  * @param {number} current
- * @param {App.RA.NumericTarget} target
+ * @param {FC.RA.NumericTarget} target
  * @param {number} [step=1] change step
  * @returns {boolean}
  */
@@ -524,7 +524,7 @@ App.RA.shallGrow = function(current, target, step = 1) {
 /**
  * Shall the current value be decreased according to the target and condition
  * @param {number} current
- * @param {App.RA.NumericTarget} target
+ * @param {FC.RA.NumericTarget} target
  * @param {number} [step=1]
  * @returns {boolean}
  */
diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js
index 85fdd83ad04..c38e19fc086 100644
--- a/src/js/rulesAssistantOptions.js
+++ b/src/js/rulesAssistantOptions.js
@@ -9,7 +9,7 @@ globalThis.rulesAssistantOptions = (function() {
 	"use strict";
 	const noDefaultSetting = {value: "!NDS!", text: "no default setting"};
 
-	/** @type {App.RA.Rule} */
+	/** @type {FC.RA.Rule} */
 	let current_rule, root;
 
 	function rulesAssistantOptions(element) {
@@ -1437,7 +1437,7 @@ globalThis.rulesAssistantOptions = (function() {
 	class AssignmentInclusionBase extends ButtonList {
 		/**
 		 * @param {string} label
-		 * @param {App.Data.JobDesc[]} [jobs]
+		 * @param {FC.Data.JobDesc[]} [jobs]
 		 * @param {App.Entity.Facilities.SingleJobFacility[]} [facilities]
 		 */
 		constructor(label, jobs, facilities) {
@@ -3900,7 +3900,7 @@ globalThis.rulesAssistantOptions = (function() {
 			const items = [];
 			const penthouseDesc = App.Data.Facilities.penthouse;
 			for (const jn in penthouseDesc.jobs) {
-				/** @type {App.Data.JobDesc} */
+				/** @type {FC.Data.JobDesc} */
 				const jd = penthouseDesc.jobs[jn];
 				items.push([jd.position, jd.assignment]);
 			}
diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js
index 8c6f7aed7cc..e0fec261a34 100644
--- a/src/js/rulesAutosurgery.js
+++ b/src/js/rulesAutosurgery.js
@@ -24,8 +24,8 @@ globalThis.rulesAutosurgery = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSetters[]} ruleset
-	 * @returns {App.RA.RuleSurgerySettings}
+	 * @param {FC.RA.RuleSetters[]} ruleset
+	 * @returns {FC.RA.RuleSurgerySettings}
 	 */
 	function autoSurgerySelector(slave, ruleset) {
 		const surgery = App.RA.newRule.surgery();
@@ -41,7 +41,7 @@ globalThis.rulesAutosurgery = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @returns {App.RA.RuleSurgerySettings}
+	 * @returns {FC.RA.RuleSurgerySettings}
 	 */
 	function ProcessHGTastes(slave) {
 		let thisSurgery = App.RA.newRule.surgery();
@@ -136,7 +136,7 @@ globalThis.rulesAutosurgery = (function() {
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
-	 * @param {App.RA.RuleSurgerySettings} thisSurgery
+	 * @param {FC.RA.RuleSurgerySettings} thisSurgery
 	 * @param {string[]} surgeries
 	 */
 	function CommitSurgery(slave, thisSurgery, surgeries) {
diff --git a/src/js/slaveSummaryHelpers.js b/src/js/slaveSummaryHelpers.js
index 8d744cf14d2..5f1786187ab 100644
--- a/src/js/slaveSummaryHelpers.js
+++ b/src/js/slaveSummaryHelpers.js
@@ -196,7 +196,7 @@ App.UI.SlaveSummaryImpl = function() {
 		function syncFSData(arcology) {
 			arcology = arcology || V.arcologies[0];
 			for (const fsp of App.Data.misc.FutureSocieties) {
-				/** @type {FC.FSPolicy} */
+				/** @type {FC.FSPolicyValue} */
 				const policy = arcology[fsp];
 				const p = fsp.slice(2);
 				FSData.policy[p] = {
@@ -288,7 +288,7 @@ App.UI.SlaveSummaryImpl = function() {
 
 		/**
 		 * @param {App.Entity.SlaveState} slave
-		 * @param {FC.SlaveSummary.SmartPiercing} spData
+		 * @param {FC.Data.SlaveSummary.SmartPiercing} spData
 		 * @returns {string}
 		 */
 		function smartFetishStr(slave, spData) {
@@ -318,7 +318,7 @@ App.UI.SlaveSummaryImpl = function() {
 
 		/**
 		 * @param {App.Entity.SlaveState} slave
-		 * @param {FC.SlaveSummary.SmartPiercing} spData
+		 * @param {FC.Data.SlaveSummary.SmartPiercing} spData
 		 * @returns {string}
 		 */
 		function smartAttractionStr(slave, spData) {
diff --git a/src/js/utilsDOM.js b/src/js/utilsDOM.js
index 76b9f1099bf..43f0377a278 100644
--- a/src/js/utilsDOM.js
+++ b/src/js/utilsDOM.js
@@ -121,12 +121,12 @@ App.UI.DOM.disabledLink = function(link, reasons) {
 
 
 /**
- * @param {string} tag - valid HTML tag
+ * @template {keyof HTMLElementTagNameMap} K
+ * @param {K} tag - valid HTML tag
  * @param {string|Node} [content]
  * @param {string|Array<string>} [classNames]
- * @returns {HTMLElement}
+ * @returns {HTMLElementTagNameMap[K]}
  */
-// @ts-ignore
 App.UI.DOM.makeElement = function(tag, content, classNames) {
 	const element = document.createElement(tag);
 	if (classNames !== undefined) {
@@ -143,15 +143,14 @@ App.UI.DOM.makeElement = function(tag, content, classNames) {
 };
 
 /**
- * @param {string} tag - valid HTML tag
+ * @template {keyof HTMLElementTagNameMap} K
+ * @param {K} tag - valid HTML tag
  * @param {ParentNode} parent
  * @param {string|Node} [content]
  * @param {string|Array<string>} [classNames]
- * @returns {HTMLElement}
+ * @returns {HTMLElementTagNameMap[K]}
  */
-// @ts-ignore
 App.UI.DOM.appendNewElement = function(tag, parent, content, classNames) {
-	// @ts-ignore
 	const element = App.UI.DOM.makeElement(tag, content, classNames);
 	parent.append(element);
 	return element;
-- 
GitLab