diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 0f7e5e9e9afcd06cb96b511854591aeb73439801..dad3cc6845157c88fecc95448d8e2df7b4edc3bb 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -631,16 +631,16 @@ App.Update.globalVariables = function() { if (typeof V.reminders === "undefined") { V.reminders = []; } else if (!Array.isArray(V.reminders)) { - let _r = V.reminders; + let r = V.reminders; V.reminders = []; - for (let _i = 0; _i < _r.entries.length; _i++) { - App.Reminders.add(_r.entries[_i], V.week + Number(_r.weeks[_i])); + for (let i = 0; i < r.entries.length; i++) { + App.Reminders.add(r.entries[i], V.week + Number(r.weeks[i])); } - for (let _i = 0; _i < _r.overdue.length; _i++) { - let _s = _r.overdue[_i].split(" "); - _s.splice(_s.length - 5, 5); - _s = _s.join(" "); - App.Reminders.add(_s, V.week - 1); + for (let i = 0; i < r.overdue.length; i++) { + let s = r.overdue[i].split(" "); + s.splice(s.length - 5, 5); + s = s.join(" "); + App.Reminders.add(s, V.week - 1); } } } @@ -1853,8 +1853,8 @@ App.Update.globalVariables = function() { if (typeof V.animalsBought === "undefined") { V.animalsBought = {}; } - let _animalsBought = ["canines", "hooved", "felines", "labradorRetrievers", "germanShepherds", "goldenRetrievers", "frenchBulldogs", "bulldogs", "beagles", "poodles", "rottweilers", "yorkshireTerriers", "siberianHuskies", "horses", "bulls", "pigs", "siameses", "persians", "maineCoons", "ragdolls", "bengals", "abbysinians", "birmans", "orientalShorthairs", "sphynxes", "russianBlues", "wolves", "foxes", "jackals", "dingos", "zebras", "cougars", "jaguars", "pumas", "lynx", "leopards", "lions", "tigers"]; - _animalsBought.forEach(function(species) { V.animalsBought[species] = V.animalsBought[species] || 0; }); + const animalsBought = ["canines", "hooved", "felines", "labradorRetrievers", "germanShepherds", "goldenRetrievers", "frenchBulldogs", "bulldogs", "beagles", "poodles", "rottweilers", "yorkshireTerriers", "siberianHuskies", "horses", "bulls", "pigs", "siameses", "persians", "maineCoons", "ragdolls", "bengals", "abbysinians", "birmans", "orientalShorthairs", "sphynxes", "russianBlues", "wolves", "foxes", "jackals", "dingos", "zebras", "cougars", "jaguars", "pumas", "lynx", "leopards", "lions", "tigers"]; + animalsBought.forEach(function(species) { V.animalsBought[species] = V.animalsBought[species] || 0; }); if (typeof V.canines === "undefined") { V.canines = []; } @@ -1905,14 +1905,14 @@ App.Update.globalVariables = function() { } } if (typeof V.arcologies[0].FSAztecRevivalist === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSAztecRevivalist = "unset", V.arcologies[_bci].FSAztecRevivalistDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSAztecRevivalist = "unset", V.arcologies[bci].FSAztecRevivalistDecoration = 0; } V.arcologies[0].FSAztecRevivalistLaw = 0, V.arcologies[0].FSAztecRevivalistSMR = 0; } if (typeof V.arcologies[0].FSHedonisticDecadence === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSHedonisticDecadence = "unset", V.arcologies[_bci].FSHedonisticDecadenceDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSHedonisticDecadence = "unset", V.arcologies[bci].FSHedonisticDecadenceDecoration = 0; } V.arcologies[0].FSHedonisticDecadenceLaw = 0, V.arcologies[0].FSHedonisticDecadenceLaw2 = 0, V.arcologies[0].FSHedonisticDecadenceSMR = 0, V.arcologies[0].FSHedonisticDecadenceResearch = 0; } @@ -1926,44 +1926,44 @@ App.Update.globalVariables = function() { V.arcologies[0].FSHedonisticDecadenceStrongFat = 0; } if (typeof V.arcologies[0].FSIntellectualDependency === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSIntellectualDependency = "unset", V.arcologies[_bci].FSIntellectualDependencyDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSIntellectualDependency = "unset", V.arcologies[bci].FSIntellectualDependencyDecoration = 0; } V.arcologies[0].FSIntellectualDependencyLaw = 0, V.arcologies[0].FSIntellectualDependencyLawBeauty = 0, V.arcologies[0].FSIntellectualDependencySMR = 0, V.arcologies[0].FSIntellectualDependencyResearch = 0; } if (typeof V.arcologies[0].FSSlaveProfessionalism === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSSlaveProfessionalism = "unset", V.arcologies[_bci].FSSlaveProfessionalismDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSSlaveProfessionalism = "unset", V.arcologies[bci].FSSlaveProfessionalismDecoration = 0; } V.arcologies[0].FSSlaveProfessionalismLaw = 0, V.arcologies[0].FSSlaveProfessionalismSMR = 0, V.arcologies[0].FSSlaveProfessionalismResearch = 0; } if (typeof V.arcologies[0].FSPetiteAdmiration === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSPetiteAdmiration = "unset", V.arcologies[_bci].FSPetiteAdmirationDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSPetiteAdmiration = "unset", V.arcologies[bci].FSPetiteAdmirationDecoration = 0; } V.arcologies[0].FSPetiteAdmirationLaw = 0, V.arcologies[0].FSPetiteAdmirationLaw2 = 0, V.arcologies[0].FSPetiteAdmirationSMR = 0, V.arcologies[0].FSPetiteAdmirationResearch = 0; } if (typeof V.arcologies[0].FSStatuesqueGlorification === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSStatuesqueGlorification = "unset", V.arcologies[_bci].FSStatuesqueGlorificationDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSStatuesqueGlorification = "unset", V.arcologies[bci].FSStatuesqueGlorificationDecoration = 0; } V.arcologies[0].FSStatuesqueGlorificationLaw = 0, V.arcologies[0].FSStatuesqueGlorificationLaw2 = 0, V.arcologies[0].FSStatuesqueGlorificationSMR = 0, V.arcologies[0].FSStatuesqueGlorificationResearch = 0; } if (typeof V.arcologies[0].FSCummunism === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSCummunism = "unset", V.arcologies[_bci].FSCummunismDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSCummunism = "unset", V.arcologies[bci].FSCummunismDecoration = 0; } V.arcologies[0].FSCummunismResearch = 0; } if (typeof V.arcologies[0].FSIncestFetishist === "undefined") { - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - V.arcologies[_bci].FSIncestFetishist = "unset", V.arcologies[_bci].FSIncestFetishistDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + V.arcologies[bci].FSIncestFetishist = "unset", V.arcologies[bci].FSIncestFetishistDecoration = 0; } V.arcologies[0].FSIncestFetishistResearch = 0; } - for (let _bci = 0; _bci < V.arcologies.length; _bci++) { - if (V.arcologies[_bci].FSHedonisticDecadence === 0) { - V.arcologies[_bci].FSHedonisticDecadence = "unset", V.arcologies[_bci].FSHedonisticDecadenceDecoration = 0; + for (let bci = 0; bci < V.arcologies.length; bci++) { + if (V.arcologies[bci].FSHedonisticDecadence === 0) { + V.arcologies[bci].FSHedonisticDecadence = "unset", V.arcologies[bci].FSHedonisticDecadenceDecoration = 0; } } if (typeof V.arcologies[0].FSPhysicalIdealistLaw === "undefined") { @@ -2789,9 +2789,9 @@ App.Update.globalVariables = function() { V.mercenariesHelpCorp = 0; V.corpMarket = 0; if (typeof V.sectors !== "undefined") { - for (let _i = 0; _i < V.sectors.length; _i++) { - if (V.sectors[_i].type === "CorporateMarket") { - V.sectors[_i].type = "Markets"; + for (let i = 0; i < V.sectors.length; i++) { + if (V.sectors[i].type === "CorporateMarket") { + V.sectors[i].type = "Markets"; break; } } @@ -2822,27 +2822,27 @@ App.Update.globalVariables = function() { // Organs { - let _newOrgans = []; + let newOrgans = []; V.organs.forEach(o => { if (o.type === "eyes") { - _newOrgans.push({type: "leftEye", weeksToCompletion: o.weeksToCompletion, ID: o.ID}); - _newOrgans.push({type: "rightEye", weeksToCompletion: o.weeksToCompletion, ID: o.ID}); + newOrgans.push({type: "leftEye", weeksToCompletion: o.weeksToCompletion, ID: o.ID}); + newOrgans.push({type: "rightEye", weeksToCompletion: o.weeksToCompletion, ID: o.ID}); } else { - _newOrgans.push(o); + newOrgans.push(o); } }); - V.organs = _newOrgans; + V.organs = newOrgans; - _newOrgans = []; + newOrgans = []; V.completedOrgans.forEach(o => { if (o.type === "eyes") { - _newOrgans.push({type: "leftEye", ID: o.ID}); - _newOrgans.push({type: "rightEye", ID: o.ID}); + newOrgans.push({type: "leftEye", ID: o.ID}); + newOrgans.push({type: "rightEye", ID: o.ID}); } else { - _newOrgans.push(o); + newOrgans.push(o); } }); - V.completedOrgans = _newOrgans; + V.completedOrgans = newOrgans; } FacilityDatatypeCleanup(); @@ -3002,10 +3002,10 @@ App.Update.globalVariables = function() { /* migrate to new genre-driven pornstar object */ if (typeof V.pornStars === "number") { - let _oldPornStars = V.pornStars; + const oldPornStars = V.pornStars; V.pornStars = {}; - V.pornStars.general = {p1count: _oldPornStars, p3ID: V.pornStarID}; + V.pornStars.general = {p1count: oldPornStars, p3ID: V.pornStarID}; V.pornStars.fuckdoll = {p1count: V.pornStarFuckdolls, p3ID: V.pornStarFuckdollID}; V.pornStars.rape = {p1count: V.pornStarRapees, p3ID: V.pornStarRapeID}; V.pornStars.preggo = {p1count: V.pornStarPreggos, p3ID: V.pornStarPreggoID}; @@ -3158,17 +3158,17 @@ App.Update.globalVariables = function() { App.Update.slaveVariables = function() { let r = `Setting missing slave variables... `; /* Adding a new variable? Consider putting it in datatypeCleanupJS.tw instead of here */ - for (let _bci = 0; _bci < V.slaves.length; _bci++) { - let _Slave = V.slaves[_bci]; + for (let bci = 0; bci < V.slaves.length; bci++) { + let Slave = V.slaves[bci]; - if (typeof _Slave !== "object") { - V.slaves.deleteAt(_bci), _bci--; + if (typeof Slave !== "object") { + V.slaves.deleteAt(bci), bci--; continue; } - App.Update.Slave(_Slave); + App.Update.Slave(Slave); - V.slaves[_bci] = _Slave; + V.slaves[bci] = Slave; } r += ` Done!<br>`; return r; @@ -3176,12 +3176,12 @@ App.Update.slaveVariables = function() { App.Update.slaveRecords = function() { let r = `Checking and fixing slave records...`; - V.slaves.forEach((_Slave) => { - App.Entity.Utils.SlaveDataSchemeCleanup(_Slave); - SlaveDatatypeCleanup(_Slave); - let _leaderIdx = V.leaders.findIndex(function(s) { return s.ID === _Slave.ID; }); - if (_leaderIdx !== -1) { - V.leaders[_leaderIdx] = _Slave; + V.slaves.forEach((slave) => { + App.Entity.Utils.SlaveDataSchemeCleanup(slave); + SlaveDatatypeCleanup(slave); + let leaderIdx = V.leaders.findIndex(function(s) { return s.ID === slave.ID; }); + if (leaderIdx !== -1) { + V.leaders[leaderIdx] = slave; } }); if (V.hostage !== 0) { @@ -3211,10 +3211,10 @@ App.Update.slaveRecords = function() { if (V.tanks.length > 0) { r += `Checking and fixing records for incubator tanks... `; - V.tanks.forEach((_Slave) => { - App.Update.Slave(_Slave); - App.Entity.Utils.SlaveDataSchemeCleanup(_Slave); - SlaveDatatypeCleanup(_Slave, true); + V.tanks.forEach((slave) => { + App.Update.Slave(slave); + App.Entity.Utils.SlaveDataSchemeCleanup(slave); + SlaveDatatypeCleanup(slave, true); /* pass second argument as true so that slaveAgeDatatypeCleanup is not run */ }); r += ` Done!<br> `; @@ -3222,12 +3222,12 @@ App.Update.slaveRecords = function() { if (V.cribs.length > 0) { r += `Checking and fixing records for nursery cribs... `; - V.cribs.forEach((_Child) => { - if (_Child.actualAge < 3) { - App.Facilities.Nursery.InfantDatatypeCleanup(_Child); + V.cribs.forEach((child) => { + if (child.actualAge < 3) { + App.Facilities.Nursery.InfantDatatypeCleanup(child); } else { - App.Entity.Utils.SlaveDataSchemeCleanup(_Child, true); - App.Facilities.Nursery.ChildDatatypeCleanup(_Child); + App.Entity.Utils.SlaveDataSchemeCleanup(child, true); + App.Facilities.Nursery.ChildDatatypeCleanup(child); } }); V.cribsIndices = App.Facilities.Nursery.cribsToIndices(); @@ -3240,8 +3240,8 @@ App.Update.specialSlaveRecords = function() { let r = ""; if (V.heroSlaves.length > 0) { r += `Checking and fixing special slave records... `; - V.heroSlaves.forEach((_Slave) => { - App.Entity.Utils.SlaveDataSchemeCleanup(_Slave); + V.heroSlaves.forEach((slave) => { + App.Entity.Utils.SlaveDataSchemeCleanup(slave); /* No SlaveDatatypeCleanup() call as hero slaves are not SlaveState objects */ }); r += ` Done!<br> `; @@ -3251,97 +3251,98 @@ App.Update.specialSlaveRecords = function() { App.Update.genePoolRecords = function() { let r = `Updating gene pool records... `; - for (let _bci = 0; _bci < V.genePool.length; _bci++) { - let _Slave = V.genePool[_bci]; + for (let bci = 0; bci < V.genePool.length; bci++) { + let slave = V.genePool[bci]; - App.Update.Slave(_Slave); + App.Update.Slave(slave); - if (V.genePool.map(function(s) { return s.ID; }).count(_Slave.ID) > 1) { + if (V.genePool.map(function(s) { return s.ID; }).count(slave.ID) > 1) { /* first check for duplicate IDs, keep the first entry and delete the others */ - for (let _bci2 = _bci + 1; _bci2 < V.genePool.length; _bci2++) { - if (V.genePool[_bci2].ID === _Slave.ID) { - V.genePool.deleteAt(_bci2), _bci2--; + for (let bci2 = bci + 1; bci2 < V.genePool.length; bci2++) { + if (V.genePool[bci2].ID === slave.ID) { + V.genePool.deleteAt(bci2), bci2--; } } } - let _dontDeleteMe = 0; - if (typeof V.slaveIndices[_Slave.ID] !== "undefined") { + let dontDeleteMe = 0; + if (typeof V.slaveIndices[slave.ID] !== "undefined") { /* are we still in the V.slaves array? */ - _dontDeleteMe = 1; + dontDeleteMe = 1; } if (V.traitor !== 0) { - if (isImpregnatedBy(V.traitor, _Slave) || V.traitor.ID === _Slave.ID) { + if (isImpregnatedBy(V.traitor, slave) || V.traitor.ID === slave.ID) { /* did we impregnate the traitor, or are we the traitor? */ - _dontDeleteMe = 1; + dontDeleteMe = 1; } } if (V.boomerangSlave !== 0) { - if (isImpregnatedBy(V.boomerangSlave, _Slave) || V.boomerangSlave.ID === _Slave.ID) { + if (isImpregnatedBy(V.boomerangSlave, slave) || V.boomerangSlave.ID === slave.ID) { /* did we impregnate the boomerang, or are we the boomerang? */ - _dontDeleteMe = 1; + dontDeleteMe = 1; } } - if (isImpregnatedBy(V.PC, _Slave)) { + if (isImpregnatedBy(V.PC, slave)) { /* did we impregnate the PC */ - _dontDeleteMe = 1; + dontDeleteMe = 1; } - if (_dontDeleteMe === 0) { + if (dontDeleteMe === 0) { /* avoid going through this loop if possible */ - for (let _bci2 = 0; _bci2 < V.slaves.length; _bci2++) { - if (isImpregnatedBy(V.slaves[_bci2], _Slave)) { + for (let bci2 = 0; bci2 < V.slaves.length; bci2++) { + if (isImpregnatedBy(V.slaves[bci2], slave)) { /* have we impregnated a slave on the slaves array? */ - _dontDeleteMe = 1; + dontDeleteMe = 1; break; } } } - if (_dontDeleteMe === 0) { - V.genePool.deleteAt(_bci), _bci--; + if (dontDeleteMe === 0) { + V.genePool.deleteAt(bci), bci--; continue; } - if (typeof _Slave.origSkin === "undefined") { - _Slave.origSkin = _Slave.skin; + if (typeof slave.origSkin === "undefined") { + slave.origSkin = slave.skin; } - if (typeof _Slave.origRace === "undefined") { - _Slave.origRace = _Slave.race; + if (typeof slave.origRace === "undefined") { + slave.origRace = slave.race; } if (V.releaseID < 1059) { - if (typeof _Slave.eyesImplant === "undefined") { - _Slave.eyesImplant = 0; - } - if (_Slave.origEye === "implant") { - _Slave.eyesImplant = 1; - _oldEyes = V.genePool.find(function(s) { return s.ID = _Slave.ID; }); - _Slave.origEye = _oldEyes.origEye; - } - if (_Slave.origEye === "none") { - _Slave.eyes = -3; - _oldEyes = V.genePool.find(function(s) { return s.ID = _Slave.ID; }); - _Slave.origEye = _oldEyes.origEye; - } - if (_Slave.eyeColor === "empty") { - _Slave.eyeColor = _Slave.origEye; - _Slave.eyes = -4; - } - } - if (typeof _Slave.custom === "undefined") { - _Slave.custom = {}; - } - _Slave.custom.tattoo = _Slave.customTat || ""; - _Slave.custom.label = _Slave.custom.label || ""; - _Slave.custom.desc = _Slave.custom.desc || ""; - _Slave.custom.title = _Slave.custom.title || ""; - _Slave.custom.titleLisp = _Slave.custom.titleLisp || ""; - _Slave.custom.hairVector = _Slave.custom.hairVector || 0; - _Slave.custom.image = _Slave.custom.image || null; + if (typeof slave.eyesImplant === "undefined") { + slave.eyesImplant = 0; + } + let oldEyes; + if (slave.origEye === "implant") { + slave.eyesImplant = 1; + oldEyes = V.genePool.find(function(s) { return s.ID = slave.ID; }); + slave.origEye = oldEyes.origEye; + } + if (slave.origEye === "none") { + slave.eyes = -3; + oldEyes = V.genePool.find(function(s) { return s.ID = slave.ID; }); + slave.origEye = oldEyes.origEye; + } + if (slave.eyeColor === "empty") { + slave.eyeColor = slave.origEye; + slave.eyes = -4; + } + } + if (typeof slave.custom === "undefined") { + slave.custom = {}; + } + slave.custom.tattoo = slave.customTat || ""; + slave.custom.label = slave.custom.label || ""; + slave.custom.desc = slave.custom.desc || ""; + slave.custom.title = slave.custom.title || ""; + slave.custom.titleLisp = slave.custom.titleLisp || ""; + slave.custom.hairVector = slave.custom.hairVector || 0; + slave.custom.image = slave.custom.image || null; - App.Entity.Utils.GenePoolRecordCleanup(_Slave); - V.genePool[_bci] = _Slave; + App.Entity.Utils.GenePoolRecordCleanup(slave); + V.genePool[bci] = slave; } if (V.nurseryNannies > 0) { - for (let _bci = 0; _bci < V.cribs.length; _bci++) { - App.Update.Slave(V.cribs[_bci]); - // let _nurseryChild = V.cribs[_bci]; TODO: on importing this to JS, what is this even supposed to do? + for (let bci = 0; bci < V.cribs.length; bci++) { + App.Update.Slave(V.cribs[bci]); + // let _nurseryChild = V.cribs[bci]; TODO: on importing this to JS, what is this even supposed to do? } } @@ -3368,13 +3369,13 @@ App.Update.oldVersions = function() { } let r = ""; if (V.releaseID < 1043) { - V.defaultRules.forEach((_rule) => { - if (_rule.condition.excludeSpecialSlaves) { - _rule.condition.specialSlaves = 0; + V.defaultRules.forEach((rule) => { + if (rule.condition.excludeSpecialSlaves) { + rule.condition.specialSlaves = 0; } else { - _rule.condition.specialSlaves = -1; + rule.condition.specialSlaves = -1; } - delete _rule.condition.excludeSpecialSlaves; + delete rule.condition.excludeSpecialSlaves; }); } if (V.releaseID === 1043) { @@ -3393,22 +3394,22 @@ App.Update.oldVersions = function() { if (V.releaseID < 1045) { if (typeof V.limbs !== "undefined") { V.adjustProsthetics = []; - V.limbs.forEach((_l) => { - switch (_l.type) { + V.limbs.forEach((l) => { + switch (l.type) { case "simple": - V.adjustProsthetics.push({id: "basicL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID}); + V.adjustProsthetics.push({id: "basicL", workLeft: l.weeksToCompletion * 10, slaveID: l.ID}); break; case "sex": - V.adjustProsthetics.push({id: "sexL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID}); + V.adjustProsthetics.push({id: "sexL", workLeft: l.weeksToCompletion * 10, slaveID: l.ID}); break; case "beauty": - V.adjustProsthetics.push({id: "beautyL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID}); + V.adjustProsthetics.push({id: "beautyL", workLeft: l.weeksToCompletion * 10, slaveID: l.ID}); break; case "combat": - V.adjustProsthetics.push({id: "combatL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID}); + V.adjustProsthetics.push({id: "combatL", workLeft: l.weeksToCompletion * 10, slaveID: l.ID}); break; case "cyber": - V.adjustProsthetics.push({id: "cyberneticL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID}); + V.adjustProsthetics.push({id: "cyberneticL", workLeft: l.weeksToCompletion * 10, slaveID: l.ID}); break; } }); @@ -3447,79 +3448,79 @@ App.Update.oldVersions = function() { } if (typeof V.researchLab.research !== "undefined") { if (V.researchLab.research !== "none") { - let _id; + let id; switch (V.researchLab.research) { case "Basic prosthetics interface": - _id = "interfaceP1"; + id = "interfaceP1"; break; case "Advanced prosthetics interface": - _id = "interfaceP2"; + id = "interfaceP2"; break; case "Basic prosthetic limbs": - _id = "basicL"; + id = "basicL"; break; case "Advanced sex limbs": - _id = "sexL"; + id = "sexL"; break; case "Advanced beauty limbs": - _id = "beautyL"; + id = "beautyL"; break; case "Advanced combat limbs": - _id = "combatL"; + id = "combatL"; break; case "Cybernetic limbs": - _id = "cyberneticL"; + id = "cyberneticL"; break; case "Ocular implants": - _id = "ocular"; + id = "ocular"; break; case "Cochlear implants": - _id = "cochlear"; + id = "cochlear"; break; case "Electrolarynx": - _id = "electrolarynx"; + id = "electrolarynx"; break; } - V.researchLab.tasks.push({type: "research", id: _id, workLeft: V.researchLab.productionTime}); + V.researchLab.tasks.push({type: "research", id: id, workLeft: V.researchLab.productionTime}); } delete V.researchLab.research; } if (typeof V.researchLab.manufacture !== "undefined") { if (V.researchLab.manufacture !== "none") { - let _id; + let id; switch (V.researchLab.manufacture) { case "Basic prosthetics interface": - _id = "interfaceP1"; + id = "interfaceP1"; break; case "Advanced prosthetics interface": - _id = "interfaceP2"; + id = "interfaceP2"; break; case "Basic prosthetic limbs": - _id = "basicL"; + id = "basicL"; break; case "Advanced sex limbs": - _id = "sexL"; + id = "sexL"; break; case "Advanced beauty limbs": - _id = "beautyL"; + id = "beautyL"; break; case "Advanced combat limbs": - _id = "combatL"; + id = "combatL"; break; case "Cybernetic limbs": - _id = "cyberneticL"; + id = "cyberneticL"; break; case "Ocular implants": - _id = "ocular"; + id = "ocular"; break; case "Cochlear implants": - _id = "cochlear"; + id = "cochlear"; break; case "Electrolarynx": - _id = "electrolarynx"; + id = "electrolarynx"; break; } - V.researchLab.tasks.push({type: "craft", id: _id, workLeft: V.researchLab.productionTime}); + V.researchLab.tasks.push({type: "craft", id: id, workLeft: V.researchLab.productionTime}); } delete V.researchLab.manufacture; } @@ -3803,208 +3804,208 @@ App.Update.oldVersions = function() { } /* player object converter */ - let _newPC = basePlayer(); - _newPC.slaveName = V.PC.name; - _newPC.slaveSurname = V.PC.surname; - _newPC.birthName = V.PC.name; + let newPC = basePlayer(); + newPC.slaveName = V.PC.name; + newPC.slaveSurname = V.PC.surname; + newPC.birthName = V.PC.name; if (V.PC.slaveSurname) { - _newPC.birthSurname = V.PC.surname; + newPC.birthSurname = V.PC.surname; } else { - _newPC.birthSurname = ""; - } - _newPC.title = V.PC.title; - _newPC.genes = V.PC.genes; - _newPC.career = V.PC.career; - _newPC.rumor = V.PC.rumor; - _newPC.birthWeek = V.PC.birthWeek; - _newPC.refreshment = V.PC.refreshment; - _newPC.refreshmentType = V.PC.refreshmentType; - _newPC.actualAge = V.PC.actualAge; - _newPC.physicalAge = V.PC.physicalAge; - _newPC.visualAge = V.PC.visualAge; - _newPC.ovaryAge = V.PC.ovaryAge; - _newPC.ageImplant = V.PC.ageImplant; - _newPC.nationality = V.PC.nationality; - _newPC.race = V.PC.race; - _newPC.origRace = V.PC.origRace; - _newPC.skin = V.PC.skin; - _newPC.origSkin = V.PC.origSkin; - _newPC.markings = V.PC.markings; - _newPC.hColor = V.PC.hColor; - _newPC.origHColor = V.PC.origHColor; - _newPC.origEye = V.PC.origEye; + newPC.birthSurname = ""; + } + newPC.title = V.PC.title; + newPC.genes = V.PC.genes; + newPC.career = V.PC.career; + newPC.rumor = V.PC.rumor; + newPC.birthWeek = V.PC.birthWeek; + newPC.refreshment = V.PC.refreshment; + newPC.refreshmentType = V.PC.refreshmentType; + newPC.actualAge = V.PC.actualAge; + newPC.physicalAge = V.PC.physicalAge; + newPC.visualAge = V.PC.visualAge; + newPC.ovaryAge = V.PC.ovaryAge; + newPC.ageImplant = V.PC.ageImplant; + newPC.nationality = V.PC.nationality; + newPC.race = V.PC.race; + newPC.origRace = V.PC.origRace; + newPC.skin = V.PC.skin; + newPC.origSkin = V.PC.origSkin; + newPC.markings = V.PC.markings; + newPC.hColor = V.PC.hColor; + newPC.origHColor = V.PC.origHColor; + newPC.origEye = V.PC.origEye; /* needed for compatibility currently */ - _newPC.eye.origColor = V.PC.origEye; - _newPC.eye.left.iris = V.PC.eyeColor; - _newPC.eye.left.pupil = V.PC.pupil; - _newPC.eye.left.sclera = V.PC.sclerae; - _newPC.eye.right.iris = V.PC.eyeColor; - _newPC.eye.right.pupil = V.PC.pupil; - _newPC.eye.right.sclera = V.PC.sclerae; - _newPC.faceShape = V.PC.faceShape; - _newPC.skill.trading = V.PC.trading; - _newPC.skill.warfare = V.PC.warfare; - _newPC.skill.hacking = V.PC.hacking; - _newPC.skill.slaving = V.PC.slaving; - _newPC.skill.engineering = V.PC.engineering; - _newPC.skill.medicine = V.PC.medicine; - _newPC.skill.cumTap = V.PC.cumTap; - _newPC.father = V.PC.father; - _newPC.mother = V.PC.mother; - _newPC.sisters = V.PC.sisters; - _newPC.daughters = V.PC.daughters; - _newPC.counter.birthsTotal = V.PC.births; - _newPC.counter.birthElite = V.PC.birthElite; - _newPC.counter.birthMaster = V.PC.birthMaster; - _newPC.counter.birthDegenerate = V.PC.birthDegenerate; - _newPC.counter.birthClient = V.PC.birthClient; - _newPC.counter.birthArcOwner = V.PC.birthArcOwner; - _newPC.counter.birthCitizen = V.PC.birthCitizen; - _newPC.counter.birthFutaSis = V.PC.birthFutaSis; - _newPC.counter.birthSelf = V.PC.birthSelf; - _newPC.counter.birthLab = V.PC.birthLab; - _newPC.counter.birthOther = V.PC.birthOther; + newPC.eye.origColor = V.PC.origEye; + newPC.eye.left.iris = V.PC.eyeColor; + newPC.eye.left.pupil = V.PC.pupil; + newPC.eye.left.sclera = V.PC.sclerae; + newPC.eye.right.iris = V.PC.eyeColor; + newPC.eye.right.pupil = V.PC.pupil; + newPC.eye.right.sclera = V.PC.sclerae; + newPC.faceShape = V.PC.faceShape; + newPC.skill.trading = V.PC.trading; + newPC.skill.warfare = V.PC.warfare; + newPC.skill.hacking = V.PC.hacking; + newPC.skill.slaving = V.PC.slaving; + newPC.skill.engineering = V.PC.engineering; + newPC.skill.medicine = V.PC.medicine; + newPC.skill.cumTap = V.PC.cumTap; + newPC.father = V.PC.father; + newPC.mother = V.PC.mother; + newPC.sisters = V.PC.sisters; + newPC.daughters = V.PC.daughters; + newPC.counter.birthsTotal = V.PC.births; + newPC.counter.birthElite = V.PC.birthElite; + newPC.counter.birthMaster = V.PC.birthMaster; + newPC.counter.birthDegenerate = V.PC.birthDegenerate; + newPC.counter.birthClient = V.PC.birthClient; + newPC.counter.birthArcOwner = V.PC.birthArcOwner; + newPC.counter.birthCitizen = V.PC.birthCitizen; + newPC.counter.birthFutaSis = V.PC.birthFutaSis; + newPC.counter.birthSelf = V.PC.birthSelf; + newPC.counter.birthLab = V.PC.birthLab; + newPC.counter.birthOther = V.PC.birthOther; if (typeof V.PC.laborCount !== "undefined") { - _newPC.counter.laborCount = V.PC.laborCount; - } - _newPC.counter.slavesFathered = V.PC.slavesFathered; - _newPC.counter.slavesKnockedUp = V.PC.slavesKnockedUp; - _newPC.sexualEnergy = V.PC.sexualEnergy; - _newPC.staminaPills = V.PC.staminaPills; - _newPC.preg = V.PC.preg; - _newPC.pregType = V.PC.pregType; - _newPC.pregWeek = V.PC.pregWeek; - _newPC.pregKnown = V.PC.pregKnown; - _newPC.fertKnown = V.PC.fertKnown; - _newPC.fertPeak = V.PC.fertPeak; - _newPC.fertDrugs = V.PC.fertDrugs; - _newPC.forcedFertDrugs = V.PC.forcedFertDrugs; - _newPC.belly = V.PC.belly; - _newPC.bellyPreg = V.PC.bellyPreg; - _newPC.pregSource = V.PC.pregSource; - _newPC.pregMood = V.PC.pregMood; - _newPC.labor = V.PC.labor; - _newPC.degeneracy = V.PC.degeneracy; - _newPC.pubicHStyle = V.PC.pubicHStyle; - _newPC.underArmHStyle = V.PC.underArmHStyle; + newPC.counter.laborCount = V.PC.laborCount; + } + newPC.counter.slavesFathered = V.PC.slavesFathered; + newPC.counter.slavesKnockedUp = V.PC.slavesKnockedUp; + newPC.sexualEnergy = V.PC.sexualEnergy; + newPC.staminaPills = V.PC.staminaPills; + newPC.preg = V.PC.preg; + newPC.pregType = V.PC.pregType; + newPC.pregWeek = V.PC.pregWeek; + newPC.pregKnown = V.PC.pregKnown; + newPC.fertKnown = V.PC.fertKnown; + newPC.fertPeak = V.PC.fertPeak; + newPC.fertDrugs = V.PC.fertDrugs; + newPC.forcedFertDrugs = V.PC.forcedFertDrugs; + newPC.belly = V.PC.belly; + newPC.bellyPreg = V.PC.bellyPreg; + newPC.pregSource = V.PC.pregSource; + newPC.pregMood = V.PC.pregMood; + newPC.labor = V.PC.labor; + newPC.degeneracy = V.PC.degeneracy; + newPC.pubicHStyle = V.PC.pubicHStyle; + newPC.underArmHStyle = V.PC.underArmHStyle; if (V.PC.dick === 1) { - _newPC.dick = 4; - _newPC.prostate = 1; + newPC.dick = 4; + newPC.prostate = 1; if (V.PC.ballsImplant === 4 || V.PC.balls === 4) { - _newPC.balls = 30; - _newPC.scrotum = 7; + newPC.balls = 30; + newPC.scrotum = 7; } else if (V.PC.ballsImplant === 3 || V.PC.balls === 3) { - _newPC.balls = 14; - _newPC.scrotum = 6; + newPC.balls = 14; + newPC.scrotum = 6; } else if (V.PC.ballsImplant === 2 || V.PC.balls === 2) { - _newPC.balls = 9; - _newPC.scrotum = 5; + newPC.balls = 9; + newPC.scrotum = 5; } else if (V.PC.ballsImplant === 1 || V.PC.balls === 1) { - _newPC.balls = 5; - _newPC.scrotum = 4; + newPC.balls = 5; + newPC.scrotum = 4; } else { - _newPC.balls = 3; - _newPC.scrotum = 3; + newPC.balls = 3; + newPC.scrotum = 3; } if (V.PC.ballsImplant > 0) { - _newPC.ballsImplant = _newPC.balls - 3; + newPC.ballsImplant = newPC.balls - 3; } } else { - _newPC.dick = 0; - _newPC.prostate = 0; - _newPC.balls = 0; - _newPC.scrotum = 0; + newPC.dick = 0; + newPC.prostate = 0; + newPC.balls = 0; + newPC.scrotum = 0; } - _newPC.newVag = V.PC.newVag; + newPC.newVag = V.PC.newVag; if (V.PC.vagina === 1) { - _newPC.ovaries = 1; - _newPC.vaginaLube = 1; + newPC.ovaries = 1; + newPC.vaginaLube = 1; if (V.PC.newVag === 1) { - _newPC.vagina = 1; + newPC.vagina = 1; } else if (V.PC.career === "escort" || V.PC.birthsTotal >= 10 || V.PC.career === "servant") { - _newPC.vagina = 4; + newPC.vagina = 4; } else if (V.PC.birthsTotal > 2) { - _newPC.vagina = 3; + newPC.vagina = 3; } else if (V.PC.career === "gang" || V.PC.career === "celebrity" || V.PC.career === "wealth" || V.PC.birthsTotal > 0) { - _newPC.vagina = 2; + newPC.vagina = 2; } else { - _newPC.vagina = 1; + newPC.vagina = 1; } } if (V.PC.boobs === 1) { if (V.PC.boobsBonus === -3) { - _newPC.boobs = 400; + newPC.boobs = 400; } else if (V.PC.boobsBonus === -2) { - _newPC.boobs = 500; + newPC.boobs = 500; } else if (V.PC.boobsBonus === -1) { - _newPC.boobs = 700; + newPC.boobs = 700; } else if (V.PC.boobsBonus === 1) { - _newPC.boobs = 1100; + newPC.boobs = 1100; } else if (V.PC.boobsBonus === 2) { - _newPC.boobs = 1300; + newPC.boobs = 1300; } else if (V.PC.boobsBonus === 3) { - _newPC.boobs = 1500; + newPC.boobs = 1500; } else { - _newPC.boobs = 900; + newPC.boobs = 900; } } else if (V.PC.genes === "XX") { - _newPC.boobs = 200; + newPC.boobs = 200; } else { - _newPC.boobs = 100; + newPC.boobs = 100; } if (V.PC.boobsImplant === 1) { - _newPC.boobsImplant = _newPC.boobs - 900; + newPC.boobsImplant = newPC.boobs - 900; } - _newPC.lactation = V.PC.lactation; - _newPC.lactationDuration = V.PC.lactationDuration; - _newPC.genes = V.PC.genes; + newPC.lactation = V.PC.lactation; + newPC.lactationDuration = V.PC.lactationDuration; + newPC.genes = V.PC.genes; if (V.PC.butt === 3) { - _newPC.butt = 5; + newPC.butt = 5; } else if (V.PC.butt === 2) { - _newPC.butt = 4; + newPC.butt = 4; } else if (V.PC.butt === 1) { - _newPC.butt = 3; + newPC.butt = 3; } else { - _newPC.butt = 2; + newPC.butt = 2; } if (V.PC.buttImplant === 1) { - _newPC.buttImplant = _newPC.butt - 2; + newPC.buttImplant = newPC.butt - 2; } - _newPC.reservedChildren = V.PC.reservedChildren; - _newPC.reservedChildrenNursery = V.PC.reservedChildrenNursery; - _newPC.geneticQuirks = clone(V.PC.geneticQuirks); + newPC.reservedChildren = V.PC.reservedChildren; + newPC.reservedChildrenNursery = V.PC.reservedChildrenNursery; + newPC.geneticQuirks = clone(V.PC.geneticQuirks); if (V.arcologies[0].FSPhysicalIdealist !== "unset") { - _newPC.muscles = 100; + newPC.muscles = 100; } else if (V.PC.title === 1) { - _newPC.muscles = 50; + newPC.muscles = 50; } else { - _newPC.muscles = 30; + newPC.muscles = 30; } if (V.PC.title === 0) { - _newPC.hLength = 15; - _newPC.waist = -20; - _newPC.voice = 2; - _newPC.shoulders = -1; - _newPC.hips = 1; + newPC.hLength = 15; + newPC.waist = -20; + newPC.voice = 2; + newPC.shoulders = -1; + newPC.hips = 1; } if (V.PC.career === "escort") { - _newPC.anus = 1; - _newPC.clothes = "a slutty outfit"; - _newPC.intelligenceImplant = 15; + newPC.anus = 1; + newPC.clothes = "a slutty outfit"; + newPC.intelligenceImplant = 15; } else if (V.PC.career === "servant") { - _newPC.clothes = "a nice maid outfit"; - _newPC.intelligenceImplant = 0; + newPC.clothes = "a nice maid outfit"; + newPC.intelligenceImplant = 0; } if (typeof V.PCWounded !== "undefined") { - _newPC.majorInjury = V.PCWounded; + newPC.majorInjury = V.PCWounded; } if (typeof V.girls !== "undefined") { if (V.girls === 1) { - _newPC.rules.living = "spare"; + newPC.rules.living = "spare"; } else if (V.girls === 2) { - _newPC.rules.living = "normal"; + newPC.rules.living = "normal"; } else { - _newPC.rules.living = "luxurious"; + newPC.rules.living = "luxurious"; } } if (typeof V.playerGetsMilked !== "undefined") { @@ -4015,9 +4016,9 @@ App.Update.oldVersions = function() { } } - WombInit(_newPC); + WombInit(newPC); - V.PC = clone(_newPC); + V.PC = clone(newPC); if (typeof V.PC.name === "undefined") { if (typeof V.PCName !== "undefined") {