From 34ebe0c5b8ac480460a6677fd7705ba29a2ae636 Mon Sep 17 00:00:00 2001 From: wkwk <12408-wkwk@users.norepy.gitgud.io> Date: Fri, 4 Oct 2019 12:36:07 -0500 Subject: [PATCH] Run eslint fix on src --- src/002-config/fc-js-init.js | 2 +- src/SecExp/js/secExpState.js | 2 +- src/art/artJS.js | 2 +- src/js/DefaultRules.js | 4 +-- src/js/SlaveState.js | 2 +- src/js/extendedFamilyModeJS.js | 2 +- src/js/generateGenetics.js | 56 ++++++++++++++--------------- src/js/playerJS.js | 2 +- src/js/pregJS.js | 7 ++-- src/js/rulesAssistantOptions.js | 2 +- src/js/storyJS.js | 2 +- src/neighbor/arcologyOpinion.js | 2 -- src/npc/descriptions/boobs/boobs.js | 2 +- 13 files changed, 41 insertions(+), 46 deletions(-) diff --git a/src/002-config/fc-js-init.js b/src/002-config/fc-js-init.js index dfee0ce9b39..bb5da157f6e 100644 --- a/src/002-config/fc-js-init.js +++ b/src/002-config/fc-js-init.js @@ -44,4 +44,4 @@ App.SecExp = {}; Object.defineProperty(App, "activeSlave", { get: () => State.variables.activeSlave, set: (slave) => { State.variables.activeSlave = slave; } -}); \ No newline at end of file +}); diff --git a/src/SecExp/js/secExpState.js b/src/SecExp/js/secExpState.js index 9ef180c1454..1127a303cf2 100644 --- a/src/SecExp/js/secExpState.js +++ b/src/SecExp/js/secExpState.js @@ -137,4 +137,4 @@ App.SecExp.SecurityExpansionState = class SecurityExpansionState { proclamation: {}, }; } -}; \ No newline at end of file +}; diff --git a/src/art/artJS.js b/src/art/artJS.js index 9bd4d160a19..369e3b6904e 100644 --- a/src/art/artJS.js +++ b/src/art/artJS.js @@ -136,7 +136,7 @@ App.Art.renderedArtElement = function(slave, artSize) { res.setAttribute("height", sz); } return res; -} +}; /** * @param {App.Entity.SlaveState} slave diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 59c86e867ae..89a64249d48 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -2627,7 +2627,7 @@ window.DefaultRules = (function() { } else { slave.earPiercing = rule.earPiercing; cashX(forceNeg(V.modCost), "slaveMod", slave); - r += `<br>${slave.slaveName}'s ` + r += `<br>${slave.slaveName}'s `; if (hasBothEars(slave)) { r += `ears have`; } else { @@ -2873,7 +2873,6 @@ window.DefaultRules = (function() { slave.birthsTat = -1; } else if (slave.birthsTat > 0) { r += `<br>${slave.slaveName} will not be tattooed with each birth.`; - } else { r += `<br>${slave.slaveName} will be tattooed with each birth.`; } @@ -2892,7 +2891,6 @@ window.DefaultRules = (function() { slave.abortionTat = -1; } else if (slave.birthsTat > 0) { r += `<br>${slave.slaveName} will not be tattooed with each abortion and miscarriage.`; - } else { r += `<br>${slave.slaveName} will be tattooed with each abortion and miscarriage.`; } diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 9530af4bc8c..99cb7618fe4 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -413,7 +413,7 @@ App.Entity.EarState = class EarState { * * 2: heavy */ this.piercing = 0; - this.shape = "normal" + this.shape = "normal"; /** * level of damage * * 0: none diff --git a/src/js/extendedFamilyModeJS.js b/src/js/extendedFamilyModeJS.js index 34159b977d1..b9000e4042c 100644 --- a/src/js/extendedFamilyModeJS.js +++ b/src/js/extendedFamilyModeJS.js @@ -438,4 +438,4 @@ window.relativeTerm = } else { return "some unknown blood connection"; } - }; \ No newline at end of file + }; diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index aa66efec3f4..a4c0b60f498 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -862,9 +862,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.pFace; } - genetarget = Math.pow(2,mother.geneticQuirks.pFace + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.pFace + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.pFace = 2; } else if (chance <= 3*genetarget) { @@ -876,9 +876,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.uFace; } - genetarget = Math.pow(2,mother.geneticQuirks.uFace + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.uFace + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.uFace = 2; } else if (chance <= 3*genetarget) { @@ -890,9 +890,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.gigantism; } - genetarget = Math.pow(2,mother.geneticQuirks.gigantism + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.gigantism + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.gigantism = 2; } else if (chance <= 3*genetarget) { @@ -904,9 +904,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.dwarfism; } - genetarget = Math.pow(2,mother.geneticQuirks.dwarfism + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.dwarfism + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.dwarfism = 2; } else if (chance <= 3*genetarget) { @@ -918,9 +918,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.albinism; } - genetarget = Math.pow(2,mother.geneticQuirks.albinism + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.albinism + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.albinism = 2; } else if (chance <= 3*genetarget) { @@ -932,9 +932,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.heterochromia; } - genetarget = Math.pow(2,mother.geneticQuirks.heterochromia + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.heterochromia + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.heterochromia = 2; } else if (chance <= 3*genetarget) { @@ -946,9 +946,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.rearLipedema; } - genetarget = Math.pow(2,mother.geneticQuirks.rearLipedema + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.rearLipedema + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.rearLipedema = 2; } else if (chance <= 3*genetarget) { @@ -960,9 +960,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.gigantomastia; } - genetarget = Math.pow(2,mother.geneticQuirks.gigantomastia + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.gigantomastia + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.gigantomastia = 2; } else if (chance <= 3*genetarget) { @@ -974,9 +974,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.macromastia; } - genetarget = Math.pow(2,mother.geneticQuirks.macromastia + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.macromastia + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.macromastia = 2; } else if (chance <= 3*genetarget) { @@ -988,9 +988,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.mGain; } - genetarget = Math.pow(2,mother.geneticQuirks.mGain + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.mGain + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.mGain = 2; } else if (chance <= 3*genetarget) { @@ -1002,9 +1002,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.mLoss; } - genetarget = Math.pow(2,mother.geneticQuirks.mLoss + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.mLoss + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.mLoss = 2; } else if (chance <= 3*genetarget) { @@ -1016,9 +1016,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.wGain; } - genetarget = Math.pow(2,mother.geneticQuirks.wGain + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.wGain + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.wGain = 2; } else if (chance <= 3*genetarget) { @@ -1030,9 +1030,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.wLoss; } - genetarget = Math.pow(2,mother.geneticQuirks.wLoss + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.wLoss + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.wLoss = 2; } else if (chance <= 3*genetarget) { @@ -1044,9 +1044,9 @@ window.generateGenetics = (function() { if (father !== 0) { fathergenes = father.geneticQuirks.androgyny; } - genetarget = Math.pow(2,mother.geneticQuirks.androgyny + fathergenes); + genetarget = Math.pow(2, mother.geneticQuirks.androgyny + fathergenes); if (genetarget >= 2) { - chance = jsRandom(1,16); + chance = jsRandom(1, 16); if (chance <= genetarget) { quirks.androgyny = 2; } else if (chance <= 3*genetarget) { diff --git a/src/js/playerJS.js b/src/js/playerJS.js index 3a1b7d2dcc2..b51da427443 100644 --- a/src/js/playerJS.js +++ b/src/js/playerJS.js @@ -642,4 +642,4 @@ window.PCTitle = function PCTitle() { titles[titles.length - 1] = `and ${titles[titles.length - 1]}`; V.PCTitle += titles.join(", "); } -}; \ No newline at end of file +}; diff --git a/src/js/pregJS.js b/src/js/pregJS.js index b58e361c980..5f0332dde4f 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -392,11 +392,10 @@ window.setPregType = function(actor) { let freevol = maxvol - cmvol; let coeff = ((maxvol/actor.womb.length) / (freevol/ftvol)) / 2; // more divide to 2 is to balance for ensured 1 ova even if over limit. - if (coeff < 0) - coeff = 0; + if (coeff < 0) { coeff = 0; } if (State.variables.seeHyperPreg !== 0) { - coeff += jsRandom(0, fertilityStack/2); //this second chance for implantation. Should be affected only by chemical and genetic for easier implantation. Not directly related to ova count, only to body/womb condition. Raise successful implantation chance with already overfull womb. AFTER previous check. + coeff += jsRandom(0, fertilityStack/2); // this second chance for implantation. Should be affected only by chemical and genetic for easier implantation. Not directly related to ova count, only to body/womb condition. Raise successful implantation chance with already overfull womb. AFTER previous check. } if (ovum > coeff) { @@ -409,7 +408,7 @@ window.setPregType = function(actor) { */ if (ovum < 1) { ovum = 1; } - //console.log("Name: ", actor.slaveName, " ftvol:", ftvol, " cmvol:", cmvol, " maxvol:", maxvol, " freevol:", freevol, " coeff:", coeff, " fertilityStack: ", fertilityStack, " ovum: ", ovum); + // console.log("Name: ", actor.slaveName, " ftvol:", ftvol, " cmvol:", cmvol, " maxvol:", maxvol, " freevol:", freevol, " coeff:", coeff, " fertilityStack: ", fertilityStack, " ovum: ", ovum); } return Math.ceil(ovum); diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 49bfbd0a83f..6b18e355fd4 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -613,7 +613,7 @@ window.rulesAssistantOptions = (function() { } setValue(what) { - this.checkBox_.checked = this.values_[true] === what; + this.checkBox_.checked = this.values_.true === what; } inputEdited() { diff --git a/src/js/storyJS.js b/src/js/storyJS.js index accd4ab76c8..c642e6b55e2 100644 --- a/src/js/storyJS.js +++ b/src/js/storyJS.js @@ -830,4 +830,4 @@ window.pregNumberName = function(nmbr1, nmbr2) { } } return pt; -}; \ No newline at end of file +}; diff --git a/src/neighbor/arcologyOpinion.js b/src/neighbor/arcologyOpinion.js index 7bf1ef3da3e..b3f84077972 100644 --- a/src/neighbor/arcologyOpinion.js +++ b/src/neighbor/arcologyOpinion.js @@ -1,5 +1,4 @@ window.arcologyOpinion = function(activeArcology, targetArcology) { - if (typeof activeArcology.FSNull === "undefined") { activeArcology.FSNull = "unset"; } if (typeof targetArcology.FSNull === "undefined") { targetArcology.FSNull = "unset"; } @@ -365,5 +364,4 @@ window.arcologyOpinion = function(activeArcology, targetArcology) { } return opinion = Number(opinion) || 0; - }; diff --git a/src/npc/descriptions/boobs/boobs.js b/src/npc/descriptions/boobs/boobs.js index 2368ba5b0f1..3a68d6d5cad 100644 --- a/src/npc/descriptions/boobs/boobs.js +++ b/src/npc/descriptions/boobs/boobs.js @@ -1746,7 +1746,7 @@ App.Desc.areola = function(slave, pronouns) { r.push(`${His} motherly boobs point downward, though, leaving only the top of each ${slave.areolaeShape} visible.`); } } - } /*else { + } /* else { r.push(this.areolaePiercing(slave, pronouns)); }*/ } -- GitLab