From 8e19559d1f7fa0de392c6c9fdb4927ebb36e4490 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 10 Aug 2020 19:01:56 -0400 Subject: [PATCH] fixes --- .../backwardsCompatibility.js | 5 ++-- src/descriptions/familySummaries.js | 23 +++++++++++-------- src/endWeek/reports/childrenReport.js | 17 +++++++------- src/endWeek/reports/nurseryReport.js | 4 ++-- src/endWeek/saRules_old.js | 2 +- src/endWeek/saTakeClasses.js | 6 ++--- src/endWeek/sexualServices.js | 2 +- src/events/intro/introSummary.tw | 2 +- src/init/storyInit.tw | 2 +- 9 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index e7d0d77647a..7664422fff3 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -1,3 +1,4 @@ +// @ts-nocheck /* eslint-disable no-lone-blocks */ App.Update.autoshred = function(node) { const set = new Set( @@ -39,7 +40,7 @@ App.Update.setNonexistentProperties = function(obj, props) { return console.log(`Set up ${count} variables.`); }; -App.Update.setExistantProperties = function(obj, array) { +App.Update.setExistentProperties = function(obj, array) { for (let p in array) { if (Array.isArray(array[p])){ obj[p] = Array.from(array[p]); @@ -113,7 +114,7 @@ App.Update.backwardsCompatibility = function() { div.textContent = `Backwards compatibility has failed for your save. Please upload your save to https://gitgud.io/pregmodfan/fc-pregmod/ with notes on what went wrong so that we can fix the backwards compatibility process for everyone. Thank you!`; jQuery('#backwardsCompatibility').append(div); State.restore(); - throw (error); // rethrow the exception to Sugarcube so we get a fancy stack trace + throw (error); // rethrow the exception to SugarCube so we get a fancy stack trace } }; diff --git a/src/descriptions/familySummaries.js b/src/descriptions/familySummaries.js index f962d0a0760..9c0c80efc51 100644 --- a/src/descriptions/familySummaries.js +++ b/src/descriptions/familySummaries.js @@ -492,15 +492,17 @@ App.Desc.family = (function() { if (V.inbreeding && slave.inbreedingCoeff > 0) { r.push(`${He} is`); - if (slave.inbreedingCoeff >= 0.5) + if (slave.inbreedingCoeff >= 0.5) { r.push("extremely"); - else if (slave.inbreedingCoeff >= 0.25) + } else if (slave.inbreedingCoeff >= 0.25) { r.push("very"); - else if (slave.inbreedingCoeff >= 0.125); - else if (slave.inbreedingCoeff >= 0.0625) + } else if (slave.inbreedingCoeff >= 0.125) { + + } else if (slave.inbreedingCoeff >= 0.0625) { r.push("somewhat"); - else + } else { r.push("slightly"); + } r.push(`inbred, with a CoI of ${slave.inbreedingCoeff}.`); } @@ -691,15 +693,16 @@ App.Desc.family = (function() { if (V.inbreeding && V.PC.inbreedingCoeff > 0) { r.push(`You are`); - if (V.PC.inbreedingCoeff >= 0.5) + if (V.PC.inbreedingCoeff >= 0.5) { r.push("extremely"); - else if (V.PC.inbreedingCoeff >= 0.25) + } else if (V.PC.inbreedingCoeff >= 0.25) { r.push("very"); - else if (V.PC.inbreedingCoeff >= 0.125); // No adjective in this case - else if (V.PC.inbreedingCoeff >= 0.0625) + } else if (V.PC.inbreedingCoeff >= 0.125) { // No adjective in this case + } else if (V.PC.inbreedingCoeff >= 0.0625) { r.push("somewhat"); - else + } else { r.push("slightly"); + } r.push(`inbred, with a CoI of ${V.PC.inbreedingCoeff}.`); } diff --git a/src/endWeek/reports/childrenReport.js b/src/endWeek/reports/childrenReport.js index 5090f870b49..29f67ea80a0 100644 --- a/src/endWeek/reports/childrenReport.js +++ b/src/endWeek/reports/childrenReport.js @@ -62,7 +62,6 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { function matronFetishEffects(child) { const - { He } = getPronouns(child), chance = jsRandom(1, 100); if ((chance > 90 && child.fetish === "none") || chance > 95) { @@ -75,7 +74,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { function matronEducationEffects(child) { // TODO: expand this const - { he, him, his } = getPronouns(Matron), + {he, him, his} = getPronouns(Matron), theChildren = CL > 1 ? `the children` : `${child.slaveName}`; @@ -115,7 +114,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { function nannyFetishEffects(child, slave) { const - { he } = getPronouns(child), + {he} = getPronouns(child), chance = jsRandom(1, 100); if (chance > 85) { @@ -174,7 +173,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { // TODO: double check these classes, make sure they make sense const span = document.createElement("span"), - { he, He, His } = getPronouns(child); + {he, He, His} = getPronouns(child); if (V.nurseryWeight) { const @@ -237,7 +236,9 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { if (V.nurseryMuscles) { const caretaker = Matron ? Matron.slaveName : NL > 1 ? `A nanny` : firstNanny.slaveName, - firstNanny = NL > 0 ? nannies[0] : null; + firstNanny = NL > 0 ? nannies[0] : null, + {His, He, he} = getPronouns(child); + const muscleSpan = App.UI.DOM.makeElement("div", 'rapid muscle development.', "improvement"); @@ -301,7 +302,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { div = document.createElement("div"), - { his } = getPronouns(target), + {his} = getPronouns(target), chance = jsRandom(1, 100); let @@ -501,7 +502,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { case "dom": return `is now very sexually dominant`; case "pregnancy": - return `has developed a facination for all things pregnancy-related`; + return `has developed a fascination for all things pregnancy-related`; default: throw `<span class="error">Unexpected fetish value of "${fetish}" in newChildFetish(). Please report this.</span>`; } @@ -513,7 +514,7 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { limeSpan = App.UI.DOM.makeElement("span", 'ready for release.', "lime"), mainSpan = document.createElement("span"), - { He } = getPronouns(child); + {He} = getPronouns(child); if (child.growTime > 0) { mainSpan.append(nameSpan, ` is growing steadily. ${He} will be ready for release in about ${years(child.growTime)}. `); diff --git a/src/endWeek/reports/nurseryReport.js b/src/endWeek/reports/nurseryReport.js index a365777f6b1..a16fb07e58c 100644 --- a/src/endWeek/reports/nurseryReport.js +++ b/src/endWeek/reports/nurseryReport.js @@ -45,7 +45,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { function matronText() { if (S.Matron) { const - { He, he, His, his, him } = getPronouns(S.Matron); + {He, he, His, his, him} = getPronouns(S.Matron); let r = []; @@ -209,7 +209,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { if (V.showEWD) { const - { He } = getPronouns(slave), + {He} = getPronouns(slave), slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); if (V.seeImages && V.seeReportImages) { diff --git a/src/endWeek/saRules_old.js b/src/endWeek/saRules_old.js index 98cc22ed1c7..c42885ca8a2 100644 --- a/src/endWeek/saRules_old.js +++ b/src/endWeek/saRules_old.js @@ -133,6 +133,7 @@ } r += `${masturbationDrugEffects(slave)}`; } else { // hasNonassignmentSex is true + const whom = (release.slaves === 1) ? `other slaves` : `${his} family`; if (!App.Utils.hasFamilySex(slave) && release.slaves === 0) { // no family and no other slaves, so must be his partner r += `finds frequent sexual release with ${his} ${relationshipTerm(slave)} <span class="lightgreen">${getSlave(slave.relationshipTarget).slaveName},</span> which ${he} is <span class="mediumaquamarine">thankful for.</span> `; @@ -140,7 +141,6 @@ slave.need -= 20; // TODO: probably should be based on BOTH slaves' need, leaving the less needy partner slightly frustrated slave.trust++; } else if (!V.universalRulesConsent) { - const whom = (release.slaves === 1) ? `other slaves` : `${his} family`; if (slave.devotion <= 20) { if (slave.trust > -20) { if (release.masturbation === 1) { diff --git a/src/endWeek/saTakeClasses.js b/src/endWeek/saTakeClasses.js index a228e653b82..86fc1e635c6 100644 --- a/src/endWeek/saTakeClasses.js +++ b/src/endWeek/saTakeClasses.js @@ -499,11 +499,11 @@ App.SlaveAssignment.takeClasses = (function() { if (slave.skill.recruiter <= 10) { r += ` The tutor starts teaching ${him} the basics. ${He} is given lessons on conversing, pronunciation, style and fashion.`; } else if (slave.skill.recruiter <= 30) { - r += ` Having been taught the basics by ${his} tutor, ${he} is no longer awkard in conversation. But ${he} has a long way to go, the tutor teaches ${him} how to carry ${himself} and how to interpret others' non-verbal cues.`; + r += ` Having been taught the basics by ${his} tutor, ${he} is no longer awkward in conversation. But ${he} has a long way to go, the tutor teaches ${him} how to carry ${himself} and how to interpret others' non-verbal cues.`; } else if (slave.skill.recruiter <= 60) { - r += ` The tutor has ${him} practice convincing others. ${He} watches online lectures on slave pschyology, and applies it in practice by convincing others to make unfavorable deals.`; + r += ` The tutor has ${him} practice convincing others. ${He} watches online lectures on slave psychology, and applies it in practice by convincing others to make unfavorable deals.`; } else if (slave.skill.recruiter <= 100) { - r += ` Every move ${he} makes is practiced and calculated, yet looks entirely natural. He has ${him} continue attending lectures on pschyology, and sends ${him} out to convince free citizens to let themselves get voluntarily enslaved.`; + r += ` Every move ${he} makes is practiced and calculated, yet looks entirely natural. He has ${him} continue attending lectures on psychology, and sends ${him} out to convince free citizens to let themselves get voluntarily enslaved.`; } r += ` ${SkillIncrease.Recruiter(slave, skillIncrease)}`; break; diff --git a/src/endWeek/sexualServices.js b/src/endWeek/sexualServices.js index 03209ba3547..fe209c76ece 100644 --- a/src/endWeek/sexualServices.js +++ b/src/endWeek/sexualServices.js @@ -5,7 +5,7 @@ App.EndWeek.computeSexualServicesModel = function(renderContainer) { const arcology = V.arcologies[0]; /* Sexual services demand per class */ - /* We can add milk etc. to this as well, though this is a good that can be traded beyond the arcology and also needs its own market much like the slavemarket. TODO */ + /* We can add milk etc. to this as well, though this is a good that can be traded beyond the arcology and also needs its own market much like the slave market. TODO */ /* In the default scenario these numbers indicate the amount of money each individual citizen of a particular class is looking to spend on sex (and milk) every week Depending on the conditions they may derive more or less 'utility' out of their credits spent i.e. a highly paternalist arcology with little choice for its lower class but Fuckdolls may still put money into them but not get the same satisfaction out of it*/ diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index 35225adac6b..d0f644c5261 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -503,7 +503,7 @@ You may review your settings before clicking "Continue" to begin.<br> <<run _options.addOption("Your race is", "race", $PC).showTextBox() .addValueList([["White", "white"], ["Asian", "asian"], ["Latina", "latina"], ["Middle Eastern", "middle eastern"], - ["Black", "black"], ["Semetic", "semetic"], ["Southern European", "southern european"], ["Indo-Aryan", "indo-aryan"], + ["Black", "black"], ["Semitic", "semitic"], ["Southern European", "southern european"], ["Indo-Aryan", "indo-aryan"], ["Amerindian", "amerindian"], ["Pacific Islander", "pacific islander"], ["Malay", "malay"], ["Mixed Race", "mixed race"]])>> <<run _options.addOption("Your skin tone is", "skin", $PC).showTextBox() diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 7734e6ed20b..8dc2aa0e04a 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with thi <<run App.Update.setNonexistentProperties(V, App.Data.defaultGameStateVariables)>> /* These variables must be created AND set to default values, NG+ or not */ -<<run App.Update.setExistantProperties(V, App.Data.resetOnNGPlus)>> +<<run App.Update.setExistentProperties(V, App.Data.resetOnNGPlus)>> <<set $ver = App.Version.base, $pmodVer = App.Version.pmod, $releaseID = App.Version.release>> -- GitLab