From 72e90dab0049800acd34e8342843c5113437998c Mon Sep 17 00:00:00 2001 From: DCoded <dcoded@live.com> Date: Sun, 31 May 2020 00:36:31 -0400 Subject: [PATCH] Formatting, replaced standard for loop to for of loops --- .../nursery/widgets/utils/nurseryUtils.js | 621 +++++++++--------- 1 file changed, 311 insertions(+), 310 deletions(-) diff --git a/src/facilities/nursery/widgets/utils/nurseryUtils.js b/src/facilities/nursery/widgets/utils/nurseryUtils.js index 99b68f0091d..a05643882a5 100644 --- a/src/facilities/nursery/widgets/utils/nurseryUtils.js +++ b/src/facilities/nursery/widgets/utils/nurseryUtils.js @@ -10,10 +10,10 @@ App.Facilities.Nursery.childList = function () { let r = ``; - for (let i = 0; i < cribs.length; i++) { + for (let child of cribs) { r += `<hr style="margin:0">`; + const - child = cribs[i], weeksOwned = V.week - child.weekAcquired, weeksLeft = (V.targetAgeNursery * 52) - weeksOwned, he = child.genes === "XX" ? `she` : `he`, @@ -57,317 +57,318 @@ App.Facilities.Nursery.childList = function () { /** * Converts the infant object into a new child object * @param {object} child + * @return {object} */ App.Facilities.Nursery.infantToChild = function infantToChild(child) { - child.abortionTat = -1, - child.accent = 0, - child.addict = 0, - child.ageImplant = 0, - child.arm = { - left: new App.Entity.LimbState(), - right: new App.Entity.LimbState() - }, - child.leg = { - left: new App.Entity.LimbState(), - right: new App.Entity.LimbState() - }, - child.analArea = 0, - child.anus = 0, - child.anusPiercing = 0, - child.anusTat = 0, - child.aphrodisiacs = 0, - child.areolae = 0, - child.areolaePiercing = 0, - child.areolaeShape = "circle", - child.armAccessory = "none", - child.armsTat = 0, - child.attrKnown = 0, - child.attrXX = 0, - child.attrXY = 0, - child.backAccessory = "none", - child.backTat = 0, - child.bald = 0, - child.balls = 0, - child.behavioralFlaw = "none", - child.belly = 0, - child.bellyAccessory = "none", - child.bellyFluid = 0, - child.bellyImplant = -1, - child.bellyPreg = 0, - child.bellySag = 0, - child.bellySagPreg = 0, - child.bellyTat = 0, - child.bodySwap = 0, - child.boobShape = "normal", - child.boobs = jsRandom(200, 500), - child.boobsImplant = 0, - child.boobsImplantType = "none", - child.boobsTat = 0, - child.brand = {}, - child.breastMesh = 0, - child.breedingMark = 0, - child.butt = jsRandom(0, 3), - child.buttImplant = 0, - child.buttImplantType = "none", - child.buttTat = 0, - child.buttplug = "none", - child.buttplugAttachment = "none", - child.canRecruit = 0, - child.chastityAnus = 0, - child.chastityPenis = 0, - child.chastityVagina = 0, - child.chem = 0, - child.childsFathered = 0, - child.childsKnockedUp = 0, - child.choosesOwnClothes = 0, - child.clit = jsRandom(0, 2), - child.clitPiercing = 0, - child.clone = 0, - child.clothes = "no clothing", - child.collar = "none", - child.corsetPiercing = 0, - child.counter = { - PCChildrenFathered: 0, - PCKnockedUp: 0, - anal: 0, - births: 0, - birthsTotal: 0, - cum: 0, - laborCount: 0, - mammary: 0, - milk: 0, - oral: 0, - penetrative: 0, - pitKills: 0, - publicUse: 0, - slavesFathered: 0, - slavesKnockedUp: 0, - vaginal: 0 - }, - child.curatives = 0, - child.custom = { - desc: "", - hairVector: "", - image: null, - label: "", - tattoo: "", - title: "", - titleLisp: "" - }, - child.daughters = 0, - child.devotion = 40, // TODO: - child.dick = 0, - child.dickAccessory = "none", - child.dickPiercing = 0, - child.dickTat = 0, - child.diet = "healthy", - child.dietCum = 0, - child.dietMilk = 0, - child.drugs = "no drugs", - child.earImplant = 0, - child.earPiercing = 0, - child.earShape = "normal", - child.earT = "none", - child.earTColor = "hairless", - child.earwear = "none", - child.electrolarynx = 0, - child.energy = 0, - child.eyebrowFullness = "natural", - child.eyebrowHStyle = "natural", - child.eyebrowPiercing = 0, - child.eyewear = "none", - child.faceImplant = 0, - child.fertKnown = 1, - child.fertPeak = 0, - child.fetishKnown = 0, - child.fetishStrength = 0, - child.foreskin = 0, - child.geneMods = { - NCS: 0, - rapidCellGrowth: 0 - }, - child.geneticQuirks = { - albinism: 0, - androgyny: 0, - dwarfism: 0, - fertility: 0, - gigantism: 0, - gigantomastia: 0, - heterochromia: 0, - hyperFertility: 0, - mGain: 0, - mLoss: 0, - macromastia: 0, - pFace: 0, - rearLipedema: 0, - superfetation: 0, - uFace: 0, - wGain: 0, - wLoss: 0, - wellHung: 0 - }, - child.genetics = {}, - child.hLength = jsRandom(30, 70), - child.hStyle = "long", - child.haircuts = 0, - child.headAccessory = "none", - child.health = {}; + child.abortionTat = -1; + child.accent = 0; + child.addict = 0; + child.ageImplant = 0; + child.arm = { + left: new App.Entity.LimbState(), + right: new App.Entity.LimbState() + }; + child.leg = { + left: new App.Entity.LimbState(), + right: new App.Entity.LimbState() + }; + child.analArea = 0; + child.anus = 0; + child.anusPiercing = 0; + child.anusTat = 0; + child.aphrodisiacs = 0; + child.areolae = 0; + child.areolaePiercing = 0; + child.areolaeShape = "circle"; + child.armAccessory = "none"; + child.armsTat = 0; + child.attrKnown = 0; + child.attrXX = 0; + child.attrXY = 0; + child.backAccessory = "none"; + child.backTat = 0; + child.bald = 0; + child.balls = 0; + child.behavioralFlaw = "none"; + child.belly = 0; + child.bellyAccessory = "none"; + child.bellyFluid = 0; + child.bellyImplant = -1; + child.bellyPreg = 0; + child.bellySag = 0; + child.bellySagPreg = 0; + child.bellyTat = 0; + child.bodySwap = 0; + child.boobShape = "normal"; + child.boobs = jsRandom(200, 500); + child.boobsImplant = 0; + child.boobsImplantType = "none"; + child.boobsTat = 0; + child.brand = {}; + child.breastMesh = 0; + child.breedingMark = 0; + child.butt = jsRandom(0, 3); + child.buttImplant = 0; + child.buttImplantType = "none"; + child.buttTat = 0; + child.buttplug = "none"; + child.buttplugAttachment = "none"; + child.canRecruit = 0; + child.chastityAnus = 0; + child.chastityPenis = 0; + child.chastityVagina = 0; + child.chem = 0; + child.childsFathered = 0; + child.childsKnockedUp = 0; + child.choosesOwnClothes = 0; + child.clit = jsRandom(0, 2); + child.clitPiercing = 0; + child.clone = 0; + child.clothes = "no clothing"; + child.collar = "none"; + child.corsetPiercing = 0; + child.counter = { + PCChildrenFathered: 0, + PCKnockedUp: 0, + anal: 0, + births: 0, + birthsTotal: 0, + cum: 0, + laborCount: 0, + mammary: 0, + milk: 0, + oral: 0, + penetrative: 0, + pitKills: 0, + publicUse: 0, + slavesFathered: 0, + slavesKnockedUp: 0, + vaginal: 0 + }; + child.curatives = 0; + child.custom = { + desc: "", + hairVector: "", + image: null, + label: "", + tattoo: "", + title: "", + titleLisp: "" + }; + child.daughters = 0; + child.devotion = 40; + child.dick = 0; + child.dickAccessory = "none"; + child.dickPiercing = 0; + child.dickTat = 0; + child.diet = "healthy"; + child.dietCum = 0; + child.dietMilk = 0; + child.drugs = "no drugs"; + child.earImplant = 0; + child.earPiercing = 0; + child.earShape = "normal"; + child.earT = "none"; + child.earTColor = "hairless"; + child.earwear = "none"; + child.electrolarynx = 0; + child.energy = 0; + child.eyebrowFullness = "natural"; + child.eyebrowHStyle = "natural"; + child.eyebrowPiercing = 0; + child.eyewear = "none"; + child.faceImplant = 0; + child.fertKnown = 1; + child.fertPeak = 0; + child.fetishKnown = 0; + child.fetishStrength = 0; + child.foreskin = 0; + child.geneMods = { + NCS: 0, + rapidCellGrowth: 0 + }; + child.geneticQuirks = { + albinism: 0, + androgyny: 0, + dwarfism: 0, + fertility: 0, + gigantism: 0, + gigantomastia: 0, + heterochromia: 0, + hyperFertility: 0, + mGain: 0, + mLoss: 0, + macromastia: 0, + pFace: 0, + rearLipedema: 0, + superfetation: 0, + uFace: 0, + wGain: 0, + wLoss: 0, + wellHung: 0 + }; + child.genetics = {}; + child.hLength = jsRandom(30, 70); + child.hStyle = "long"; + child.haircuts = 0; + child.headAccessory = "none"; + child.health = {}; setHealth(child, jsRandom(80, 100), 0, 0, 0, 0); - child.hears = 0, - child.heels = 0, - child.height = jsRandom(85, 105), - child.hips = 0, - child.hormoneBalance = 0, - child.hormones = 0, - child.horn = "none", - child.hornColor = "none", - child.induce = 0, - child.induceLactation = 0, - child.intelligence = 100, - child.intelligenceImplant = 0, - child.labia = jsRandom(0, 2), - child.labor = 0, - child.lactation = 0, - child.lactationAdaptation = 0, - child.lactationDuration = 0, - child.rules = new App.Entity.RuleState(), - child.rules.lactation = "none", - child.legAccessory = "none", - child.legsTat = 0, - child.lips = jsRandom(10, 30), - child.lipsImplant = 0, - child.lipsPiercing = 0, - child.lipsTat = 0, - child.rules.living = "normal", - child.makeup = 0, - child.markings = "none", - child.minorInjury = 0, - child.mpreg = 0, - child.muscles = jsRandom(-10, 10), - child.nails = 0, - child.navelPiercing = 0, - child.need = 0, - child.nipples = "cute", - child.nipplesAccessory = "none", - child.nipplesPiercing = 0, - child.nosePiercing = 0, - child.oldDevotion = 0, // TODO: - child.oldTrust = 0, // TODO: - child.onDiet = 0, - child.origRace = child.race, - child.eye = new App.Entity.EyeState(), - child.eye.origColor = child.eyeColor, - child.origHColor = child.hColor, - child.origSkin = child.skin, - child.ovaries = child.genes === "XX" ? 1 : 0, - child.ovaryAge = child.actualAge, - /* eslint-disable camelcase */ - child.override_Arm_H_Color = 0, - child.override_Brow_H_Color = 0, - child.override_Eye_Color = 0, - child.override_H_Color = 0, - child.override_Pubic_H_Color = 0, - child.override_Race = 0, - child.override_Skin = 0, - /* eslint-enable camelcase */ - child.physicalAge = child.actualAge, - child.porn = new App.Entity.SlavePornPerformanceState(), - child.pregAdaptation = 50, - child.pregControl = "none", - child.pregData = { - drugsEffect: 1, - fetusRate: [1, 1, 1, 0.64, 0.6513, 0.6459, 0.644, 0.6393, 0.58, 0.51], - fetusSize: [1, 3, 16, 25.6, 51, 60, 67.5, 71.6, 129.5, 130], - fetusWeek: [0, 9, 20, 20, 40, 52, 64, 80, 384, 99999], - minLiveBirth: 32, - normalBirth: 40, - normalOvaMax: 1, - normalOvaMin: 1, - sizeType: 0, - type: "human" - }, - child.pregKnown = 0, - child.pregSource = 0, - child.pregType = 0, - child.pregWeek = 0, - child.premature = 0, - child.prematureBirth = 0, - child.prestige = 0, - child.prostate = 0, - child.pubertyAgeXX = 10, - child.pubertyAgeXY = 12, - child.pubertyXX = 1, - child.pubicHColor = "black", - child.pubicHStyle = "bushy", - child.readyOva = 0, - child.rearAccessory = "none", - child.relationship = 0, - child.rules.relationship = "restrictive", // TODO: - child.relationshipTarget = 0, - child.rules.release = new App.Entity.ReleaseRulesState(), // TODO: - child.rivalry = 0, - child.rivalryTarget = 0, - child.rudeTitle = 0, - child.scars = 0, - child.scrotum = 0, - child.shoes = "none", - child.shoulders = 0, - child.shouldersTat = 0, - child.sisters = 0, - child.skill = { - DJ: 0, - anal: 0, - attendant: 0, - bodyguard: 0, - combat: 0, - entertainer: 0, - entertainment: 0, - farmer: 0, - headGirl: 0, - madam: 0, - matron: 0, - milkmaid: 0, - nurse: 0, - oral: 0, - recruiter: 0, - servant: 0, - stewardess: 0, - teacher: 0, - vaginal: 0, - wardeness: 0, - whore: 0, - whoring: 8 - }, - child.smells = 0, - child.rules.speech = "restrictive", // TODO: - child.stampTat = 0, - child.rules.punishment = "situational", // TODO: - child.rules.reward = "situational", // TODO: - child.tail = "none", - child.tailColor = "none", - child.tailShape = "none", - child.tastes = 0, - child.teeth = "baby", - child.tonguePiercing = 0, - child.training = 0, - child.trust = 0, // TODO: - child.underArmHStyle = "natural", - child.vagina = child.genes === "XX" ? 0 : -1, - child.vaginaLube = 0, - child.vaginaPiercing = 0, - child.vaginaTat = 0, - child.vaginalAccessory = "none", - child.vaginalAttachment = "none", - child.vaginalAttachments = "none", - child.vasectomy = 0, - child.visualAge = child.actualAge, - child.voice = 1, - child.voiceImplant = 0, - child.waist = 0, - child.weeksLeft = 0, - child.weight = jsRandom(-10, 10), - child.womb = [], - child.wombImplant = "none"; + child.hears = 0; + child.heels = 0; + child.height = jsRandom(85, 105); + child.hips = 0; + child.hormoneBalance = 0; + child.hormones = 0; + child.horn = "none"; + child.hornColor = "none"; + child.induce = 0; + child.induceLactation = 0; + child.intelligence = 100; + child.intelligenceImplant = 0; + child.labia = jsRandom(0, 2); + child.labor = 0; + child.lactation = 0; + child.lactationAdaptation = 0; + child.lactationDuration = 0; + child.rules = new App.Entity.RuleState(); + child.rules.lactation = "none"; + child.legAccessory = "none"; + child.legsTat = 0; + child.lips = jsRandom(10, 30); + child.lipsImplant = 0; + child.lipsPiercing = 0; + child.lipsTat = 0; + child.rules.living = "normal"; + child.makeup = 0; + child.markings = "none"; + child.minorInjury = 0; + child.mpreg = 0; + child.muscles = jsRandom(-10, 10); + child.nails = 0; + child.navelPiercing = 0; + child.need = 0; + child.nipples = "cute"; + child.nipplesAccessory = "none"; + child.nipplesPiercing = 0; + child.nosePiercing = 0; + child.oldDevotion = 0; + child.oldTrust = 0; + child.onDiet = 0; + child.origRace = child.race; + child.eye = new App.Entity.EyeState(); + child.eye.origColor = child.eyeColor; + child.origHColor = child.hColor; + child.origSkin = child.skin; + child.ovaries = child.genes === "XX" ? 1 : 0; + child.ovaryAge = child.actualAge; + /* eslint-disable camelcase */ + child.override_Arm_H_Color = 0; + child.override_Brow_H_Color = 0; + child.override_Eye_Color = 0; + child.override_H_Color = 0; + child.override_Pubic_H_Color = 0; + child.override_Race = 0; + child.override_Skin = 0; + /* eslint-enable camelcase */ + child.physicalAge = child.actualAge; + child.porn = new App.Entity.SlavePornPerformanceState(); + child.pregAdaptation = 50; + child.pregControl = "none"; + child.pregData = { + drugsEffect: 1, + fetusRate: [1, 1, 1, 0.64, 0.6513, 0.6459, 0.644, 0.6393, 0.58, 0.51], + fetusSize: [1, 3, 16, 25.6, 51, 60, 67.5, 71.6, 129.5, 130], + fetusWeek: [0, 9, 20, 20, 40, 52, 64, 80, 384, 99999], + minLiveBirth: 32, + normalBirth: 40, + normalOvaMax: 1, + normalOvaMin: 1, + sizeType: 0, + type: "human" + }; + child.pregKnown = 0; + child.pregSource = 0; + child.pregType = 0; + child.pregWeek = 0; + child.premature = 0; + child.prematureBirth = 0; + child.prestige = 0; + child.prostate = 0; + child.pubertyAgeXX = 10; + child.pubertyAgeXY = 12; + child.pubertyXX = 1; + child.pubicHColor = "black"; + child.pubicHStyle = "bushy"; + child.readyOva = 0; + child.rearAccessory = "none"; + child.relationship = 0; + child.rules.relationship = "restrictive"; + child.relationshipTarget = 0; + child.rules.release = new App.Entity.ReleaseRulesState(); + child.rivalry = 0; + child.rivalryTarget = 0; + child.rudeTitle = 0; + child.scars = 0; + child.scrotum = 0; + child.shoes = "none"; + child.shoulders = 0; + child.shouldersTat = 0; + child.sisters = 0; + child.skill = { + DJ: 0, + anal: 0, + attendant: 0, + bodyguard: 0, + combat: 0, + entertainer: 0, + entertainment: 0, + farmer: 0, + headGirl: 0, + madam: 0, + matron: 0, + milkmaid: 0, + nurse: 0, + oral: 0, + recruiter: 0, + servant: 0, + stewardess: 0, + teacher: 0, + vaginal: 0, + wardeness: 0, + whore: 0, + whoring: 8 + }; + child.smells = 0; + child.rules.speech = "restrictive"; + child.stampTat = 0; + child.rules.punishment = "situational"; + child.rules.reward = "situational"; + child.tail = "none"; + child.tailColor = "none"; + child.tailShape = "none"; + child.tastes = 0; + child.teeth = "baby"; + child.tonguePiercing = 0; + child.training = 0; + child.trust = 0; + child.underArmHStyle = "natural"; + child.vagina = child.genes === "XX" ? 0 : -1; + child.vaginaLube = 0; + child.vaginaPiercing = 0; + child.vaginaTat = 0; + child.vaginalAccessory = "none"; + child.vaginalAttachment = "none"; + child.vaginalAttachments = "none"; + child.vasectomy = 0; + child.visualAge = child.actualAge; + child.voice = 1; + child.voiceImplant = 0; + child.waist = 0; + child.weeksLeft = 0; + child.weight = jsRandom(-10, 10); + child.womb = []; + child.wombImplant = "none"; resetEyeColor(child, "both"); generatePronouns(child); -- GitLab