diff --git a/src/js/pregJS.js b/src/js/pregJS.js index f9ddf6030ec983b663cea2838f5ae20140bee947..8b4d7eb1d511814346e5309ed7e4d556e5fa9fbf 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -7,12 +7,12 @@ window.getPregBellySize = function(s) { var fetuses = s.pregType; var phi = 1.618; - if(gestastionWeek <= 32) { + if (gestastionWeek <= 32) { targetLen = ((0.00006396 * Math.pow(gestastionWeek, 4)) - (0.005501 * Math.pow(gestastionWeek, 3)) + (0.161 * Math.pow(gestastionWeek, 2)) - (0.76 * gestastionWeek) + 0.208); - } else if(gestastionWeek <= 106) { + } else if (gestastionWeek <= 106) { targetLen = ((-0.0000004675 * Math.pow(gestastionWeek, 4)) + (0.0001905 * Math.pow(gestastionWeek, 3)) - (0.029 * Math.pow(gestastionWeek, 2)) + (2.132 * gestastionWeek) - 16.575); } else { - targetLen = ((-0.00003266 * Math.pow(gestastionWeek,2)) + (0.076 * gestastionWeek) + 43.843); + targetLen = ((-0.00003266 * Math.pow(gestastionWeek, 2)) + (0.076 * gestastionWeek) + 43.843); } var bellySize = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3)) * fetuses); @@ -22,38 +22,38 @@ window.getPregBellySize = function(s) { /** @param {App.Entity.SlaveState} slave */ window.bellyAdjective = function(slave) { slave = slave || State.variables.activeSlave; - if(slave.belly >= 1500) { - if(slave.belly >= 1000000) { - if(slave.preg > slave.pregData.normalBirth/4) { + if (slave.belly >= 1500) { + if (slave.belly >= 1000000) { + if (slave.preg > slave.pregData.normalBirth/4) { return 'unfathomably distended, brimming with life'; } else { return 'unfathomable'; } - } else if(slave.belly >= 750000) { - if(slave.preg > slave.pregData.normalBirth/4) { + } else if (slave.belly >= 750000) { + if (slave.preg > slave.pregData.normalBirth/4) { return 'monolithic bulging'; } else { return 'monolithic'; } - } else if(slave.belly >= 600000) { - if(slave.preg > slave.pregData.normalBirth/4) { + } else if (slave.belly >= 600000) { + if (slave.preg > slave.pregData.normalBirth/4) { return 'titanic bulging'; } else { return 'titanic'; } - } else if(slave.belly >= 450000) { - if(slave.preg > slave.pregData.normalBirth/4) { + } else if (slave.belly >= 450000) { + if (slave.preg > slave.pregData.normalBirth/4) { return 'gigantic bulgy'; } else { return 'gigantic'; } - } else if(slave.belly >= 300000) { + } else if (slave.belly >= 300000) { return 'massive'; - } else if(slave.belly >= 100000) { + } else if (slave.belly >= 100000) { return 'giant'; - } else if(slave.belly >= 15000) { + } else if (slave.belly >= 15000) { return 'huge'; - } else if(slave.belly >= 10000) { + } else if (slave.belly >= 10000) { return 'big'; } else { return 'swollen'; @@ -81,301 +81,301 @@ window.setPregType = function(actor) { */ - if(actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now. - if(typeof actor.readyOva === "number" && actor.readyOva !== 0) { + if (actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now. + if (typeof actor.readyOva === "number" && actor.readyOva !== 0) { ovum = actor.readyOva; //just single override; for delayed impregnation cases - } else if(actor.ID === -1) { - if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm - if(actor.fertDrugs === 1) { + } else if (actor.ID === -1) { + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm + if (actor.fertDrugs === 1) { ovum += jsEither([2, 3, 3, 3, 3, 4, 4, 5]); } else { ovum += jsEither([1, 1, 2, 2, 3, 3, 4]); } - if(actor.forcedFertDrugs > 0) { + if (actor.forcedFertDrugs > 0) { ovum += jsEither([3, 3, 4, 4, 5]); } - } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples - if(actor.fertDrugs === 1) { + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples + if (actor.fertDrugs === 1) { ovum += jsEither([1, 2, 2, 2, 2, 3, 3, 4]); } else { ovum += jsEither([0, 1, 1, 1, 1, 1, 2, 3]); } - if(actor.forcedFertDrugs > 0) { + if (actor.forcedFertDrugs > 0) { ovum += jsEither([2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]); } - } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins - if(actor.fertDrugs === 1) { + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins + if (actor.fertDrugs === 1) { ovum += jsEither([1, 1, 2, 2, 2, 2, 3, 3]); } else { ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 1, 1, 2]); } - if(actor.forcedFertDrugs > 0) { + if (actor.forcedFertDrugs > 0) { ovum += jsEither([1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4]); } } else { - if(actor.fertDrugs === 1) { + if (actor.fertDrugs === 1) { ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3]); } else { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); } - if(actor.forcedFertDrugs > 0) { + if (actor.forcedFertDrugs > 0) { ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]); } } ovum = Math.clamp(ovum, 0, 8); - } else if(actor.pregType === 0) { - if(actor.eggType === "horse" || actor.eggType === "cow") { - if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm + } else if (actor.pregType === 0) { + if (actor.eggType === "horse" || actor.eggType === "cow") { + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([0, 0, 0, 0, 0, 0, 1]); fertilityStack += .8; - } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples fertilityStack += .4; - } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins fertilityStack += .2; } - if(actor.ovaImplant === "fertility") { + if (actor.ovaImplant === "fertility") { fertilityStack += .3; } - if(actor.hormones === 2) { + if (actor.hormones === 2) { fertilityStack += .2; } - if(actor.hormoneBalance >= 200) { + if (actor.hormoneBalance >= 200) { fertilityStack += .3; } - if(actor.diet === "fertility") { + if (actor.diet === "fertility") { fertilityStack += .3; } - if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { + if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { fertilityStack += .5; } - if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { + if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack += .2; } - if(actor.drugs === "super fertility drugs") { + if (actor.drugs === "super fertility drugs") { fertilityStack += 1.6; - } else if(actor.drugs === "fertility drugs") { + } else if (actor.drugs === "fertility drugs") { fertilityStack += .6; } fertilityStack = Math.floor(fertilityStack); - if(State.variables.seeHyperPreg === 1) { - if(actor.drugs === "super fertility drugs") { + if (State.variables.seeHyperPreg === 1) { + if (actor.drugs === "super fertility drugs") { ovum += jsRandom(0, fertilityStack*2); } else { ovum += jsRandom(0, fertilityStack); } - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; - if(ovum > 4) { + if (ovum > 4) { ovum = 4; } - } else if(ovum > 3) { + } else if (ovum > 3) { ovum = 3; } } - } else if(actor.eggType === "dog") { - if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm + } else if (actor.eggType === "dog") { + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([1, 2, 2, 3]); fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsEither([0, 1, 1, 2]); fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } - if(actor.ovaImplant === "fertility") { + if (actor.ovaImplant === "fertility") { ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } - if(actor.hormones === 2) { + if (actor.hormones === 2) { ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 2]); fertilityStack++; } - if(actor.hormoneBalance >= 200) { + if (actor.hormoneBalance >= 200) { ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]); fertilityStack++; } - if(actor.diet === "fertility") { + if (actor.diet === "fertility") { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1]); fertilityStack++; } - if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { + if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]); fertilityStack++; fertilityStack++; } - if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { + if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack++; } - if(actor.drugs === "super fertility drugs") { + if (actor.drugs === "super fertility drugs") { ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.drugs === "fertility drugs") { + } else if (actor.drugs === "fertility drugs") { ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]); fertilityStack++; } - if(State.variables.seeHyperPreg === 1) { - if(actor.drugs === "super fertility drugs") { + if (State.variables.seeHyperPreg === 1) { + if (actor.drugs === "super fertility drugs") { ovum += jsRandom(0, fertilityStack*2); } else { ovum += jsRandom(0, fertilityStack); } - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; - if(ovum > 8) { + if (ovum > 8) { ovum = jsEither([6, 8]); } - } else if(ovum > 8) { + } else if (ovum > 8) { ovum = jsRandom(6, 8); } } - } else if(actor.eggType === "pig") { - if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm + } else if (actor.eggType === "pig") { + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsRandom(4, 8); fertilityStack += 16; - } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsRandom(2, 6); fertilityStack += 10; - } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsRandom(2, 4); fertilityStack += 6; } - if(actor.ovaImplant === "fertility") { + if (actor.ovaImplant === "fertility") { ovum += jsRandom(4, 12); fertilityStack += 6; } - if(actor.hormones === 2) { + if (actor.hormones === 2) { ovum += jsRandom(0, 4); fertilityStack += 3; } - if(actor.hormoneBalance >= 200) { + if (actor.hormoneBalance >= 200) { ovum += jsRandom(0, 4); fertilityStack += 3; } - if(actor.diet === "fertility") { + if (actor.diet === "fertility") { ovum += jsRandom(4, 10); fertilityStack += 6; } - if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { + if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { ovum += jsRandom(8, 16); fertilityStack += 10; } - if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { + if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack += 2; } - if(actor.drugs === "super fertility drugs") { + if (actor.drugs === "super fertility drugs") { ovum += jsRandom(10, 40); fertilityStack += 32; - } else if(actor.drugs === "fertility drugs") { + } else if (actor.drugs === "fertility drugs") { ovum += jsRandom(10, 20); fertilityStack += 16; } - if(State.variables.seeHyperPreg === 1) { - if(actor.drugs === "super fertility drugs") { + if (State.variables.seeHyperPreg === 1) { + if (actor.drugs === "super fertility drugs") { ovum += jsRandom(fertilityStack/2, fertilityStack*2); } else { ovum += jsRandom(fertilityStack/4, fertilityStack); } - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; - if(ovum > 76) { + if (ovum > 76) { ovum = jsEither([70, 72, 74, 76]); } - } else if(ovum > 75) { + } else if (ovum > 75) { ovum = jsRandom(60, 75); } } } else { - if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm + if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm ovum += jsEither([1, 2, 2, 3]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples + } else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples ovum += jsEither([0, 1, 1, 2]); fertilityStack++; fertilityStack++; - } else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins + } else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins ovum += jsEither([0, 0, 0, 0, 1]); fertilityStack++; } else { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); //base chance for twins } - if(actor.ovaImplant === "fertility") { + if (actor.ovaImplant === "fertility") { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); fertilityStack++; } - if(actor.hormones === 2) { + if (actor.hormones === 2) { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2]); fertilityStack++; } - if(actor.hormoneBalance >= 200) { + if (actor.hormoneBalance >= 200) { ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]); fertilityStack++; } - if(actor.diet === "fertility") { + if (actor.diet === "fertility") { ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); fertilityStack++; } - if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { + if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) { ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]); fertilityStack++; fertilityStack++; } - if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { + if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) { fertilityStack++; } - if(actor.drugs === "super fertility drugs") { + if (actor.drugs === "super fertility drugs") { ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]); fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; fertilityStack++; - } else if(actor.drugs === "fertility drugs") { + } else if (actor.drugs === "fertility drugs") { ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]); fertilityStack++; } - if(State.variables.seeHyperPreg === 1) { - if(actor.drugs === "super fertility drugs") { + if (State.variables.seeHyperPreg === 1) { + if (actor.drugs === "super fertility drugs") { ovum += jsRandom(0, fertilityStack*2); } else { ovum += jsRandom(0, fertilityStack); } - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; } } else { ovum += jsRandom(0, fertilityStack); - if(actor.ovaImplant === "sympathy") { + if (actor.ovaImplant === "sympathy") { ovum *= 2; - if(ovum > 12) { + if (ovum > 12) { ovum = jsEither([10, 12]); } - } else if(ovum > 12) { + } else if (ovum > 12) { ovum = jsRandom(6, 12); } } @@ -406,9 +406,8 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) { He = capFirstChar(pronouns.pronoun); } if (V.seePreg !== 0) { - if (jsRandom(0,99) < (chance + (V.reproductionFormula*((target.pregSource <= 0) ? ((target.ID === -1) ? 0 : 10) : 20)))) { + if (jsRandom(0, 99) < (chance + (V.reproductionFormula*((target.pregSource <= 0) ? ((target.ID === -1) ? 0 : 10) : 20)))) { if (target.mpreg === hole) { - if (target.pregWeek <= 0) { target.preg = 1; target.pregSource = (!fatherID ? 0 : fatherID); @@ -432,9 +431,7 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) { } else { target.pregKnown = 1; } - } else if (hole === 2) { - if (target.pregWeek <= 0) { target.preg = 1; target.pregSource = (!fatherID ? 0 : fatherID); @@ -479,12 +476,10 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) { }; window.getIncubatorReserved = function(/*slaves*/) { - return FetusGlobalReserveCount("incubator"); }; -window.getNurseryReserved = function (/*slaves*/) { - +window.getNurseryReserved = function(/*slaves*/) { return FetusGlobalReserveCount("nursery"); }; diff --git a/src/js/quickListJS.js b/src/js/quickListJS.js index 66f91135143c858f09bd7aef04c43d3156ba3168..60ad59a54442e5d5155b8b0f844f6c24a97dee38 100644 --- a/src/js/quickListJS.js +++ b/src/js/quickListJS.js @@ -1,7 +1,7 @@ /* eslint-disable no-undef */ -window.sortDomObjects = function (objects, attrName, reverse = 0) { +window.sortDomObjects = function(objects, attrName, reverse = 0) { reverse = (reverse) ? -1 : 1; - function sortingByAttr (a, b) { + function sortingByAttr(a, b) { var aVal = a.getAttribute(attrName); var bVal = b.getAttribute(attrName); var aInt = parseInt(aVal); @@ -14,21 +14,21 @@ window.sortDomObjects = function (objects, attrName, reverse = 0) { return objects.toArray().sort(sortingByAttr); }; -window.sortButtonsByDevotion = function () { +window.sortButtonsByDevotion = function() { var $sortedButtons = $('#qlWrapper button').remove(); $sortedButtons = sortDomObjects($sortedButtons, 'data-devotion'); $($sortedButtons).appendTo($('#qlWrapper')); quickListBuildLinks(); }; -window.sortButtonsByTrust = function () { +window.sortButtonsByTrust = function() { var $sortedButtons = $('#qlWrapper button').remove(); $sortedButtons = sortDomObjects($sortedButtons, 'data-trust'); $($sortedButtons).appendTo($('#qlWrapper')); quickListBuildLinks(); }; -window.quickListBuildLinks = function () { +window.quickListBuildLinks = function() { $("[data-scroll-to]").click(function() { var $this = $(this), $toElement = $this.attr('data-scroll-to'); // note the * 1 enforces $offset to be an integer, without @@ -42,31 +42,31 @@ window.quickListBuildLinks = function () { }); }; -window.sortIncubatorPossiblesByName = function () { +window.sortIncubatorPossiblesByName = function() { var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach(); $sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-name'); $($sortedIncubatorPossibles).appendTo($('#qlIncubator')); }; -window.sortIncubatorPossiblesByPregnancyWeek = function () { +window.sortIncubatorPossiblesByPregnancyWeek = function() { var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach(); $sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-preg-week'); $($sortedIncubatorPossibles).appendTo($('#qlIncubator')); }; -window.sortIncubatorPossiblesByPregnancyCount = function () { +window.sortIncubatorPossiblesByPregnancyCount = function() { var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach(); $sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-preg-count'); $($sortedIncubatorPossibles).appendTo($('#qlIncubator')); }; -window.sortIncubatorPossiblesByReservedSpots = function () { +window.sortIncubatorPossiblesByReservedSpots = function() { var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach(); $sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-reserved-spots'); $($sortedIncubatorPossibles).appendTo($('#qlIncubator')); }; -window.sortIncubatorPossiblesByPreviousSort = function () { +window.sortIncubatorPossiblesByPreviousSort = function() { var sort = State.variables.sortIncubatorList; if ('unsorted' !== sort) { if ('Name' === sort) { @@ -81,31 +81,31 @@ window.sortIncubatorPossiblesByPreviousSort = function () { } }; -window.sortNurseryPossiblesByName = function () { +window.sortNurseryPossiblesByName = function() { var $sortedNurseryPossibles = $('#qlNursery div.possible').detach(); $sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-name'); $($sortedNurseryPossibles).appendTo($('#qlNursery')); }; -window.sortNurseryPossiblesByPregnancyWeek = function () { +window.sortNurseryPossiblesByPregnancyWeek = function() { var $sortedNurseryPossibles = $('#qlNursery div.possible').detach(); $sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-preg-week'); $($sortedNurseryPossibles).appendTo($('#qlNursery')); }; -window.sortNurseryPossiblesByPregnancyCount = function () { +window.sortNurseryPossiblesByPregnancyCount = function() { var $sortedNurseryPossibles = $('#qlNursery div.possible').detach(); $sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-preg-count'); $($sortedNurseryPossibles).appendTo($('#qlNursery')); }; -window.sortNurseryPossiblesByReservedSpots = function () { +window.sortNurseryPossiblesByReservedSpots = function() { var $sortedNurseryPossibles = $('#qlNursery div.possible').detach(); $sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-reserved-spots'); $($sortedNurseryPossibles).appendTo($('#qlNursery')); }; -window.sortNurseryPossiblesByPreviousSort = function () { +window.sortNurseryPossiblesByPreviousSort = function() { var sort = State.variables.sortNurseryList; if ('unsorted' !== sort) { if ('Name' === sort) {