From 5233ff60a73e358c3849ade528dd2ef60d59bdef Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Thu, 23 Jul 2020 23:32:20 -0400 Subject: [PATCH] Bugfixes --- .../nursery/reports/childrenReport.js | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/facilities/nursery/reports/childrenReport.js b/src/facilities/nursery/reports/childrenReport.js index 03dd0caccf0..2d67d1ffc4a 100644 --- a/src/facilities/nursery/reports/childrenReport.js +++ b/src/facilities/nursery/reports/childrenReport.js @@ -17,25 +17,25 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { if (child.actualAge >= 3) { if (Matron) { - r.push(matronFetishEffects()); - r.push(matronEducationEffects()); - r.push(matronFitnessEffects()); + r.push(matronFetishEffects(child)); + r.push(matronEducationEffects(child)); + r.push(matronFitnessEffects(child)); } if (nannies) { - r.push(nannyEducationEffects()); - r.push(nannyFitnessEffects()); - r.push(nannyFetishEffects()); + r.push(nannyEducationEffects(child)); + r.push(nannyFitnessEffects(child)); + r.push(nannyFetishEffects(child)); } if (CL > 1) { - r.push(childFriendshipRivalries()); + r.push(childFriendshipRivalries(child)); } // TODO: rework these entirely if (Matron || nannies) { - r.push(weightRulesEffects()); - r.push(musclesRulesEffects()); + r.push(weightRulesEffects(child)); + r.push(musclesRulesEffects(child)); } } else { // TODO: @@ -46,7 +46,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { // MARK: Matron Effects - function matronFetishEffects() { + function matronFetishEffects(child) { const { He } = getPronouns(child), chance = jsRandom(1, 100); @@ -68,33 +68,33 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { } } - function matronEducationEffects() { + function matronEducationEffects(child) { // TODO: expand this const - { he2, him2, his2 } = getPronouns(Matron).appendSuffix('2'), + { he, him, his } = getPronouns(Matron), theChildren = CL > 1 ? `the children` : `${child.slaveName}`; if (Matron.intelligence + Matron.intelligenceImplant > 65) { child.intelligenceImplant += 3; - return `${Matron.slaveName} is so intelligent and well-educated that ${he2} is able to teach ${theChildren} very effectively, and so ${CL > 1 ? `${child.slaveName} gradually grows` : `they gradually grow`} smarter. `; + return `${Matron.slaveName} is so intelligent and well-educated that ${he} is able to teach ${theChildren} very effectively, and so ${CL > 1 ? `they gradually grow` : `${child.slaveName} gradually grows`} smarter. `; } else if (Matron.intelligenceImplant > 30) { child.intelligenceImplant += 2; - return `${Matron.slaveName}'s education makes up for the fact that ${he2} isn't the brightest and allows ${him2} to teach ${theChildren} quite effectively, and so ${theChildren} grows a bit smarter. `; + return `${Matron.slaveName}'s education makes up for the fact that ${he} isn't the brightest and allows ${him} to teach ${theChildren} quite effectively, and so ${CL > 1 ? `they grow` : `${child.slaveName} grows`} a bit smarter. `; } else if (Matron.intelligence > 50) { child.intelligenceImplant += 2; - return `Though ${Matron.slaveName} has had little to no formal education, ${his2} natural brilliance allows ${him2} to teach ${theChildren} quite effectively, and so ${CL > 1 ? `${child.slaveName} grows` : `they grow`} a bit smarter. `; + return `Though ${Matron.slaveName} has had little to no formal education, ${his} natural brilliance allows ${him} to teach ${theChildren} quite effectively, and so ${CL > 1 ? `they grow` : `${child.slaveName} grows`} a bit smarter. `; } else { child.intelligenceImplant++; - return `${Matron.slaveName} isn't the brightest and is only somewhat effective at teaching ${theChildren}, so ${CL > 1 ? `${child.slaveName} grows` : `they grow`} just a little bit smarter. `; + return `${Matron.slaveName} isn't the brightest and is only somewhat effective at teaching ${theChildren}, so ${CL > 1 ? `they grow` : `${child.slaveName} grows`} just a little bit smarter. `; } } - function matronFitnessEffects() { + function matronFitnessEffects(child) { // TODO: return; } @@ -103,7 +103,9 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { // MARK: Nanny Effects - function nannyFetishEffects() { + function nannyFetishEffects(child) { + const { he } = getPronouns(child); + for (const slave of nannies) { if (slave.fetish !== "none") { if (chance > 85) { @@ -123,7 +125,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { } } - function nannyEducationEffects() { + function nannyEducationEffects(child) { // TODO: expand this let @@ -162,7 +164,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { } } - function nannyFitnessEffects() { + function nannyFitnessEffects(child) { // TODO: return; } @@ -171,7 +173,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { // MARK: Nursery Rules Effects - function weightRulesEffects() { + function weightRulesEffects(child) { let r = []; if (V.nurseryWeight) { @@ -208,7 +210,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { return r.join(' '); } - function musclesRulesEffects() { + function musclesRulesEffects(child) { let r = []; // TODO: rewrite these @@ -281,7 +283,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { } // TODO: add relation checks - function childFriendshipRivalries() { + function childFriendshipRivalries(child) { for (const target of V.cribs) { // alias for second child const chance = jsRandom(1, 100); -- GitLab