From 4937c602469b34b161c20bd266c50aa353009f3f Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Sun, 31 May 2020 14:32:05 -0400 Subject: [PATCH] Span fixes in childSummary, grammar --- .../nursery/widgets/children/childSummary.js | 41 ++++++++++--------- .../nursery/widgets/infants/infantSummary.js | 16 ++++---- .../nursery/widgets/utils/nurseryUtils.js | 3 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/facilities/nursery/widgets/children/childSummary.js b/src/facilities/nursery/widgets/children/childSummary.js index 865343ccebc..86bd7924557 100644 --- a/src/facilities/nursery/widgets/children/childSummary.js +++ b/src/facilities/nursery/widgets/children/childSummary.js @@ -4,7 +4,6 @@ * @returns {string} */ App.Facilities.Nursery.ChildSummary = function(child) { - "use strict"; /** @type {App.UI.SlaveSummary.AbbreviationState} */ const abbreviate = V.UI.slaveSummary.abbreviation; @@ -101,7 +100,6 @@ App.Facilities.Nursery.ChildSummary = function(child) { shortImplants(child); shortLactation(child); // shortMods(child); - r += `</span> `; } else if (abbreviate.physicals === 2) { longAge(child); longFace(child); @@ -121,7 +119,6 @@ App.Facilities.Nursery.ChildSummary = function(child) { if (!jQuery.isEmptyObject(child.brand)) { r += `Branded. `; } - r += `</span> `; } if (abbreviate.hormoneBalance === 1) { if (child.hormoneBalance <= -21) { @@ -2012,6 +2009,7 @@ App.Facilities.Nursery.ChildSummary = function(child) { if (child.visualAge !== child.physicalAge) { r += ` Lks${child.visualAge}`; } + r += `</span>`; } /** @@ -2039,9 +2037,9 @@ App.Facilities.Nursery.ChildSummary = function(child) { * @param {App.Entity.SlaveState} child */ function shortEyes(child) { - if (!canSee(slave)) { + if (!canSee(child)) { r += `<span class="red">Blind</span> `; - } else if (!canSeePerfectly(slave)) { + } else if (!canSeePerfectly(child)) { r += `<span class="yellow">Sight-</span> `; } } @@ -2254,6 +2252,7 @@ App.Facilities.Nursery.ChildSummary = function(child) { } else { r += `Impl`; } + r += `</span>`; } /** @@ -2310,10 +2309,11 @@ App.Facilities.Nursery.ChildSummary = function(child) { } else { r += `Underage. `; } - /* - ** No NCS, then do the standard, However because of the wrinkes of Incubators, as long as visual age is greater - ** than or equal to physical age, we do the old physical body/Looks for fresh out of the can NCS slaves. - */ + r += `</span>`; + + // If no NCS, then do the standard - however, due to the wrinkles of the Incubator, as long as visual age is greater + // than or equal to physical age, we do the old physical body/Looks for fresh out of the can NCS slaves. + if (((child.geneMods.NCS === 0) || (child.visualAge >= child.physicalAge))) { if (child.actualAge !== child.physicalAge) { r += `${child.physicalAge}` + ` year old body. `; @@ -2322,15 +2322,15 @@ App.Facilities.Nursery.ChildSummary = function(child) { r += `Looks ` + `${child.visualAge}` + `. `; } } else { - /* - ** Now the rub. The use of physical Age for the year old body above, basically conflicts with the changes - ** that NCS introduces, so here to *distinguish* the changes, we use visual age with the 'year old body' - ** and appears, for exampChild release from incubator at age 10, Her summary would show, 'Age 0. 10 - ** year old body.' But if she's given NCS a few weeks after release, while she's still before her first - ** birthday, it'll appear the same. But once her birthday fires, if we ran with the above code it would - ** say: 'Age 1. 11 year old body.' -- this conflicts with the way NCS works though, because she hasn't - ** visually aged, so our change here makes it say 'Age 1. Appears to have a 10 year old body.' - */ + + // Now the rub. The use of physical Age for the year old body above, basically conflicts with the changes + // that NCS introduces, so here to *distinguish* the changes, we use visual age with the 'year old body' + // and appears, for exampChild release from incubator at age 10, Her summary would show, 'Age 0. 10 + // year old body.' But if she's given NCS a few weeks after release, while she's still before her first + // birthday, it'll appear the same. But once her birthday fires, if we ran with the above code it would + // say: 'Age 1. 11 year old body.' -- this conflicts with the way NCS works though, because she hasn't + // visually aged, so our change here makes it say 'Age 1. Appears to have a 10 year old body.' + r += `Appears to have a ` + `${child.visualAge}` + ` year old body. `; } if (child.geneMods.NCS === 1) { @@ -2364,9 +2364,9 @@ App.Facilities.Nursery.ChildSummary = function(child) { * @param {App.Entity.SlaveState} child */ function longEyes(child) { - if (!canSee(slave)) { + if (!canSee(child)) { r += `<span class="red">Blind.</span> `; - } else if (!canSeePerfectly(slave)) { + } else if (!canSeePerfectly(child)) { r += `<span class="yellow">Nearsighted.</span> `; } } @@ -2581,6 +2581,7 @@ App.Facilities.Nursery.ChildSummary = function(child) { } else { r += `All natural. `; } + r += `</span>`; } /** diff --git a/src/facilities/nursery/widgets/infants/infantSummary.js b/src/facilities/nursery/widgets/infants/infantSummary.js index 2919db2d859..95ef77777ec 100644 --- a/src/facilities/nursery/widgets/infants/infantSummary.js +++ b/src/facilities/nursery/widgets/infants/infantSummary.js @@ -1093,21 +1093,21 @@ App.Facilities.Nursery.InfantSummary = function(child) { * @param {App.Entity.InfantState} child */ function longFace(child) { - r += `Likely to have a `; + r += `Likely to have `; if (child.face < -95) { - r += `<span class="red">very ugly${V.summaryStats ? `[${child.face}]`: ''}</span>`; + r += `a <span class="red">very ugly${V.summaryStats ? `[${child.face}]`: ''}</span>`; } else if (child.face < -40) { - r += `<span class="red">ugly${V.summaryStats ? `[${child.face}]`: ''}</span>`; + r += `a <span class="red">ugly${V.summaryStats ? `[${child.face}]`: ''}</span>`; } else if (child.face < -10) { - r += `<span class="red">unattractive${V.summaryStats ? `[${child.face}]`: ''}</span>`; + r += `a <span class="red">unattractive${V.summaryStats ? `[${child.face}]`: ''}</span>`; } else if (child.face <= 10) { - r += `Average${V.summaryStats ? `[${child.face}]`: ''}`; + r += `an average${V.summaryStats ? `[${child.face}]`: ''}`; } else if (child.face <= 40) { - r += `<span class="pink">attractive${V.summaryStats ? `[${child.face}]`: ''}</span>`; + r += `an <span class="pink">attractive${V.summaryStats ? `[${child.face}]`: ''}</span>`; } else if (child.face <= 95) { - r += `<span class="pink">beautiful${V.summaryStats ? `[${child.face}]`: ''}</span>`; + r += `a <span class="pink">beautiful${V.summaryStats ? `[${child.face}]`: ''}</span>`; } else { - r += `<span class="pink">very beautiful${V.summaryStats ? `[${child.face}]`: ''}</span>`; + r += `a <span class="pink">very beautiful${V.summaryStats ? `[${child.face}]`: ''}</span>`; } r += `, ${child.faceShape} face. `; } diff --git a/src/facilities/nursery/widgets/utils/nurseryUtils.js b/src/facilities/nursery/widgets/utils/nurseryUtils.js index 3567248367f..b1be056d507 100644 --- a/src/facilities/nursery/widgets/utils/nurseryUtils.js +++ b/src/facilities/nursery/widgets/utils/nurseryUtils.js @@ -3,7 +3,6 @@ * @returns {string} */ App.Facilities.Nursery.childList = function () { - "use strict"; const cribs = V.cribs; @@ -32,7 +31,7 @@ App.Facilities.Nursery.childList = function () { if (child.actualAge >= 18) { V.nurseryOldID = child.ID; if (child.targetLocation === "freedom") { - V.freedSlaves.push(cribs[i]); + V.freedSlaves.push(child); } V.readySlave = cribs.pluck([i], [i]); r += `<<goto "Nursery Retrieval Workaround">>`; -- GitLab