diff --git a/src/js/backwardsCompatibility.js b/src/js/backwardsCompatibility.js new file mode 100644 index 0000000000000000000000000000000000000000..51d38bccdf36cb737be71ad3f62065cfa83eee62 --- /dev/null +++ b/src/js/backwardsCompatibility.js @@ -0,0 +1,4016 @@ +App.Utils.BC = {}; + +App.Utils.BC.generalBC = function() { + r = ""; + if (Array.isArray(V.nationalities)) { + V.nationalities = weightedArray2HashMap(V.nationalities); + } + + if (typeof V.brothelSlaves !== "undefined") { + delete V.brothelSlaves; + } + if (typeof V.clubSlaves !== "undefined") { + delete V.clubSlaves; + } + if (typeof V.arcadeSlaves !== "undefined") { + delete V.arcadeSlaves; + } + if (typeof V.dairySlaves !== "undefined") { + delete V.dairySlaves; + } + if (typeof V.servantsQuartersSlaves !== "undefined") { + delete V.servantsQuartersSlaves; + } + if (typeof V.masterSuiteSlaves !== "undefined") { + delete V.masterSuiteSlaves; + } + if (typeof V.HGSuiteSlaves !== "undefined") { + delete V.HGSuiteSlaves; + } + if (typeof V.farmyardSlaves !== "undefined") { + delete V.farmyardSlaves; + } + if (typeof V.cellblockSlaves !== "undefined") { + delete V.cellblockSlaves; + } + if (typeof V.schoolroomSlaves !== "undefined") { + delete V.schoolroomSlaves; + } + if (typeof V.spaSlaves !== "undefined") { + delete V.spaSlaves; + } + if (typeof V.spaSpots === "undefined") { + V.spaSpots = 0; + } + if (typeof V.nurserySlaves !== "undefined") { + delete V.nurserySlaves; + } + + if (typeof V.hostageCost !== "undefined") { + delete V.hostageCost; + } + + if (typeof V.youngCareers !== "undefined") { + delete V.youngCareers, V.educatedCareers, V.uneducatedCareers, V.gratefulCareers, V.menialCareers, V.entertainmentCareers, V.whoreCareers, V.HGCareers, V.madamCareers, V.DJCareers, V.bodyguardCareers, V.wardenessCareers, V.nurseCareers, V.attendantCareers, V.matronCareers, V.milkmaidCareers, V.farmerCareers, V.stewardessCareers, V.schoolteacherCareers; + + delete V.whiteNationalities, V.asianNationalities, V.latinaNationalities, V.middleeasternNationalities, V.blackNationalities, V.indoaryanNationalities, V.pacificislanderNationalities, V.malayNationalities, V.amerindianNationalities, V.southerneuropeanNationalities, V.semiticNationalities; + + delete V.whiteAmericanSlaveNames, V.africanAmericanSlaveNames, V.asianAmericanSlaveNames, V.latinaSlaveNames, V.russianSlaveNames, V.egyptianSlaveNames, V.brazilianSlaveNames, V.chineseSlaveNames, V.koreanSlaveNames, V.indianSlaveNames, V.indonesianSlaveNames, V.bangladeshiSlaveNames, V.japaneseSlaveNames, V.nigerianSlaveNames, V.pakistaniSlaveNames, V.mexicanSlaveNames, V.filipinaSlaveNames, V.ethiopianSlaveNames, V.germanSlaveNames, V.saudiSlaveNames, V.turkishSlaveNames, V.colombianSlaveNames, V.argentinianSlaveNames, V.vietnameseSlaveNames, V.iranianSlaveNames, V.congoleseSlaveNames, V.frenchSlaveNames, V.thaiSlaveNames, V.britishSlaveNames, V.italianSlaveNames, V.spanishSlaveNames, V.kenyanSlaveNames, V.ukrainianSlaveNames, V.canadianSlaveNames, V.peruvianSlaveNames, V.venezuelanSlaveNames, V.irishSlaveNames, V.icelandicSlaveNames, V.finnishSlaveNames, V.newZealanderSlaveNames, V.polishSlaveNames, V.greekSlaveNames, V.israeliSlaveNames, V.armenianSlaveNames, V.moroccanSlaveNames, V.romanianSlaveNames, V.swedishSlaveNames, V.lithuanianSlaveNames, V.bolivianSlaveNames, V.haitianSlaveNames, V.cubanSlaveNames, V.whiteSouthAfricanSlaveNames, V.blackSouthAfricanSlaveNames, V.chileanSlaveNames, V.belgianSlaveNames, V.danishSlaveNames, V.norwegianSlaveNames, V.hungarianSlaveNames, V.estonianSlaveNames, V.slovakSlaveNames, V.kazakhSlaveNames, V.zimbabweanSlaveNames, V.ugandanSlaveNames, V.tanzanianSlaveNames, V.dutchSlaveNames, V.austrianSlaveNames, V.swissSlaveNames, V.puertoRicanSlaveNames, V.czechSlaveNames, V.portugueseSlaveNames, V.jamaicanSlaveNames, V.malaysianSlaveNames, V.guatemalanSlaveNames, V.ghananSlaveNames, V.serbianSlaveNames, V.australianSlaveNames, V.burmeseSlaveNames, V.algerianSlaveNames, V.sudaneseSlaveNames, V.iraqiSlaveNames, V.uzbekSlaveNames, V.nepaleseSlaveNames, V.afghanSlaveNames, V.yemeniSlaveNames, V.lebaneseSlaveNames, V.tunisianSlaveNames, V.emiratiSlaveNames, V.libyanSlaveNames, V.jordanianSlaveNames, V.omaniSlaveNames, V.malianSlaveNames, V.sammarineseSlaveNames, V.marshalleseSlaveNames, V.syrianSlaveNames, V.bermudianSlaveNames, V.uruguayanSlaveNames, V.monegasqueSlaveNames, V.montenegrinSlaveNames, V.cambodianSlaveNames, V.cameroonianSlaveNames, V.gaboneseSlaveNames, V.djiboutianSlaveNames, V.greenlandicSlaveNames, V.tuvaluanSlaveNames, V.zambianSlaveNames, V.albanianSlaveNames, V.bruneianSlaveNames, V.singaporeanSlaveNames; + + delete V.cowSlaveNames, V.chattelReligionistSlaveNames, V.romanSlaveNames, V.aztecSlaveNames, V.ancientEgyptianSlaveNames, V.edoSlaveNames; + + delete V.ArcologyNamesSupremacistWhite, V.ArcologyNamesSupremacistAsian, V.ArcologyNamesSupremacistLatina, V.ArcologyNamesSupremacistMiddleEastern, V.ArcologyNamesSupremacistBlack, V.ArcologyNamesSupremacistIndoAryan, V.ArcologyNamesSupremacistPacificIslander, V.ArcologyNamesSupremacistMalay, V.ArcologyNamesSupremacistAmerindian, V.ArcologyNamesSupremacistSouthernEuropean, V.ArcologyNamesSupremacistSemitic, V.ArcologyNamesSupremacistMixedRace; + + delete V.ArcologyNamesSubjugationistWhite, V.ArcologyNamesSubjugationistAsian, V.ArcologyNamesSubjugationistLatina, V.ArcologyNamesSubjugationistMiddleEastern, V.ArcologyNamesSubjugationistBlack, V.ArcologyNamesSubjugationistIndoAryan, V.ArcologyNamesSubjugationistPacificIslander, V.ArcologyNamesSubjugationistMalay, V.ArcologyNamesSubjugationistAmerindian, V.ArcologyNamesSubjugationistSouthernEuropean, V.ArcologyNamesSubjugationistSemitic, V.ArcologyNamesSubjugationistMixedRace; + + delete V.ArcologyNamesGenderRadicalist, V.ArcologyNamesGenderFundamentalist, V.ArcologyNamesPaternalist, V.ArcologyNamesDegradationist, V.ArcologyNamesBodyPurist, V.ArcologyNamesTransformationFetishist, V.ArcologyNamesYouthPreferentialist, V.ArcologyNamesMaturityPreferentialist, V.ArcologyNamesSlimnessEnthusiast, V.ArcologyNamesAssetExpansionist, V.ArcologyNamesPastoralist, V.ArcologyNamesPhysicalIdealist, V.ArcologyNamesChattelReligionist, V.ArcologyNamesRomanRevivalist, V.ArcologyNamesAztecRevivalist, V.ArcologyNamesEgyptianRevivalist, V.ArcologyNamesEdoRevivalist, V.ArcologyNamesArabianRevivalist, V.ArcologyNamesChineseRevivalist; + + /* pregmod-exclusive variables below */ + delete V.veryYoungCareers, V.recruiterCareers; + delete V.northamericaNationalities, V.southamericaNationalities, V.europeNationalities, V.asiaNationalities, V.middleeastNationalities, V.africaNationalities, V.australiaNationalities; + delete V.belarusianSlaveNames, V.dominicanSlaveNames, V.scottishSlaveNames; + delete V.ArcologyNamesEugenics, V.ArcologyNamesRepopulationist, V.ArcologyNamesHedonisticDecadence; + delete V.drugs, V.harshCollars, V.shoes, V.bellyAccessories, V.vaginalAccessories, V.dickAccessories, V.buttplugs; + } + + if (typeof V.Flag !== "undefined") { + delete V.Flag; + } + + if (typeof V.brandTarget === "string") { + V.brandTarget = {primary: V.brandTarget, secondary: "buttock", local: "buttock"}; + } else if (typeof V.brandTarget !== "object") { + V.brandTarget = {primary: "buttock", secondary: "buttock", local: "buttock"}; + } + + if (typeof V.brandDesign === "string") { + V.brandDesign = {primary: V.brandDesign, official: V.brandDesign, local: V.brandDesign}; + } else if (typeof V.brandDesign !== "object") { + V.brandDesign = {primary: "your initials", official: "your initials", local: "your initials"}; + } + + if (typeof V.brandDesign.official === "undefined") { + V.brandDesign.official = "your personal symbol"; + } + + if (typeof V.scarTarget === "undefined") { + V.scarTarget = {primary: "left cheek", secondary: "left cheek", local: "left cheek"}; + } + if (typeof V.scarDesign === "undefined") { + V.scarDesign = {primary: "generic", local: "generic"}; + } + + if (typeof V.servantMilkersJobs !== "undefined") { + delete V.servantMilkersJobs; + } + + if (typeof V.fakeBellies !== "undefined") { + delete V.fakeBellies; + } + + if (typeof V.badWords !== "undefined") { + delete V.badWords; + } + + if (typeof V.badNames !== "undefined") { + delete V.badNames; + } + + if ((typeof V.origin !== "undefined") || (typeof V.origins !== "undefined")) { + delete V.origin, V.origins; + } + + if ((typeof V.hare1 !== "undefined") || (typeof V.hareSpeed1 !== "undefined")) { + delete V.hare1, V.hare2, V.hare3, V.hareSpeed, V.hareSpeed1, V.hareSpeed2, V.hareSpeed3, V.origin1, V.origin2, V.origin3, V.LurcherSpeed; + } + + if (typeof V.basenationalities !== "undefined") { + delete V.basenationalities; + } + + if (typeof V.marrying !== "object") { + V.marrying = []; + } + if ((typeof V.weddingPlanned === "undefined") || (V.marrying.length < 1)) { + V.weddingPlanned = 0; + } + + if (typeof V.weddingSlaveID !== "undefined") { + delete V.weddingSlaveID; + V.weddingPlanned = 0; + } + + if (typeof V.reminders === "undefined") { + V.reminders = []; + } else if (!Array.isArray(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.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); + } + } + + if (typeof V.bodyguardTrains === "undefined") { + V.bodyguardTrains = 1; + } + if (typeof V.recruiterIOUs === "undefined") { + V.recruiterIOUs = 0; + } + if (typeof V.summaryStats === "undefined") { + V.summaryStats = 0; + } + if (typeof V.verticalizeArcologyLinks === "undefined") { + V.verticalizeArcologyLinks = 0; + } + if (typeof V.positionMainLinks === "undefined") { + V.positionMainLinks = -1; + } + if (typeof V.seeImages === "undefined") { + V.seeImages = 0; + } + if (typeof V.imageChoice === "undefined") { + V.imageChoice = 0; + } + if (typeof V.seeMainFetishes === "undefined") { + V.seeMainFetishes = 0; + } + if (typeof V.seeSummaryImages === "undefined") { + V.seeSummaryImages = 1; + } + if (typeof V.seeReportImages === "undefined") { + V.seeReportImages = 1; + } + if (typeof V.universalRulesBirthing === "undefined") { + V.universalRulesBirthing = 0; + } + if (typeof V.HGSeverity === "undefined") { + V.HGSeverity = 0; + } + if (typeof V.recruiters !== "undefined") { + delete V.recruiters; + } + if (typeof V.fixedNationality === "undefined") { + V.fixedNationality = 0; + } + if (typeof V.fixedRace === "undefined") { + V.fixedRace = 0; + } + if (typeof V.RaidingMercenaries === "undefined") { + V.RaidingMercenaries = 0; + } + if (typeof V.raided === "undefined") { + V.raided = 0; + } + if (typeof V.slaveOrphanageTotal === "undefined") { + V.slaveOrphanageTotal = 0; + } + if (typeof V.citizenOrphanageTotal === "undefined") { + V.citizenOrphanageTotal = 0; + } + if (typeof V.privateOrphanageTotal === "undefined") { + V.privateOrphanageTotal = 0; + } + if (typeof V.peacekeepers === "undefined") { + V.peacekeepers = 0; + } + if (typeof V.modestClothes !== "undefined") { + delete V.modestClothes; + } + if (typeof V.completedOrgans === "undefined") { + V.completedOrgans = []; + } + if (typeof V.eventSlaves !== "undefined") { + delete V.eventSlaves; + } + if (typeof V.place !== "undefined") { + delete V.place; + } + if ((typeof V.assayedSlave !== "undefined") || (typeof V.assayedSlaveAvailable !== "undefined") || typeof V.assayType !== "undefined") { + delete V.assayedSlave, V.assayedSlaveAvailable, V.assayType; + } + if ((typeof V.RERepressedAnalVirginSub !== "undefined") || (typeof V.REBoobCollisionSub !== "undefined") || (typeof V.REIfYouEnjoyItSub !== "undefined") || (typeof V.RESadisticDescriptionSub !== "undefined") || typeof V.REShowerForceSub !== "undefined") { + delete V.RERepressedAnalVirginSub, V.REBoobCollisionSub, V.REIfYouEnjoyItSub, V.RESadisticDescriptionSub, V.REShowerForceSub; + } + if ((typeof V.unmodded !== "undefined") || (typeof V.modded !== "undefined") || (typeof V.XX !== "undefined") || (typeof V.XY !== "undefined") || (typeof V.old !== "undefined") || (typeof V.young !== "undefined") || (typeof V.pregYes !== "undefined") || (typeof V.pregNo !== "undefined") || (typeof V.implanted !== "undefined") || (typeof V.slimPass !== "undefined") || (typeof V.slim !== "undefined") || typeof V.stacked !== "undefined") { + delete V.unmodded, V.modded, V.XX, V.XY, V.old, V.young, V.pregYes, V.pregNo, V.implanted, V.slimPass, V.slim, V.stacked; + } + if ((typeof V.recruiterMother !== "undefined") || typeof V.recruiterSister !== "undefined") { + delete V.recruiterMother, V.recruiterSister; + } + if (typeof V.relations !== "undefined") { + delete V.relations; + } + if (typeof V.milfSlave !== "undefined") { + delete V.milfSlave; + } + if (typeof V.vignettes !== "undefined") { + delete V.vignettes; + } + if (typeof V.piercingLocation !== "undefined") { + delete V.piercingLocation; + } + if ((typeof V.target1 !== "undefined") || (typeof V.target2 !== "undefined") || typeof V.target3 !== "undefined") { + delete V.target1, V.target2, V.target3; + } + if ((typeof V.targetEscape1 !== "undefined") || (typeof V.targetEscape2 !== "undefined") || typeof V.targetEscape3 !== "undefined") { + delete V.targetEscape1, V.targetEscape2, V.targetEscape3; + } + if ((typeof V.oralCount !== "undefined") || (typeof V.vaginalCount !== "undefined") || typeof V.analCount !== "undefined") { + delete V.oralCount, V.vaginalCount, V.analCount; + } + if ((typeof V.fighterOne !== "undefined") || typeof V.fighterTwo !== "undefined") { + delete V.fighterOne, V.fighterTwo; + } + if ((typeof V.fighterOneDeadliness !== "undefined") || typeof V.fighterTwoDeadliness !== "undefined") { + delete V.fighterOneDeadliness, V.fighterTwoDeadliness; + } + if (typeof V.adopted !== "undefined") { + delete V.adopted; + } + if (typeof V.fetishChangeChance !== "undefined") { + delete V.fetishChangeChance; + } + if ((typeof V.titles !== "undefined") || (typeof V.schoolsPresent !== "undefined") || (typeof V.schoolsPerfected !== "undefined") || typeof V.schoolTitle !== "undefined") { + delete V.titles, V.schoolsPresent, V.schoolsPerfected, V.schoolTitle; + } + if (typeof V.appraiserGender !== "undefined") { + delete V.appraiserGender; + } + if ((typeof V.assetDirection !== "undefined") || typeof V.assetAffected !== "undefined") { + delete V.assetDirection, V.assetAffected; + } + if (typeof V.rents !== "undefined") { + delete V.rents; + } + if (typeof V.rent === "undefined") { + V.rent = {}; + } + if (typeof V.rentDefaults === "undefined") { + V.rentDefaults = {}; + } + if (typeof V.LCRent !== "undefined") { + V.rent.lowerClass = V.LCRent; + delete V.LCRent; + } + if (typeof V.MCRent !== "undefined") { + V.rent.middleClass = V.MCRent; + delete V.MCRent; + } + if (typeof V.UCRent !== "undefined") { + V.rent.upperClass = V.UCRent; + delete V.UCRent; + } + if (typeof V.TCRent !== "undefined") { + V.rent.topClass = V.TCRent; + delete V.TCRent; + } + if (typeof V.space !== "undefined") { + delete V.space; + } + if (typeof V.vaginaTotal !== "undefined") { + delete V.vaginaTotal; + } + V.enduringTrust = Number(V.enduringTrust) || 0; + V.enduringDevotion = Number(V.enduringDevotion) || 0; + V.averageTrust = Number(V.averageTrust) || 0; + V.averageDevotion = Number(V.averageDevotion) || 0; + if (typeof V.limbsComplete !== "undefined") { + delete V.limbsComplete; + } + if (typeof V.minimumChildAge !== "undefined") { + delete V.minimumChildAge; + } + if (typeof V.customValue !== "undefined") { + delete V.customValue; + } + if (typeof V.tabChoice === "undefined") { + V.tabChoice = {Main: "all"}; + } + + PCDatatypeCleanup(); + + BCReserveInit(); + + if (typeof V.universalRulesImmobileSlavesMaintainMuscles === "undefined") { + V.universalRulesImmobileSlavesMaintainMuscles = 0; + } + if (typeof V.universalRulesChildrenBecomeBreeders === "undefined") { + V.universalRulesChildrenBecomeBreeders = 0; + } + if (typeof V.surnamesForbidden === "undefined") { + V.surnamesForbidden = 0; + } + if (typeof V.FSNamePref === "undefined") { + V.FSNamePref = 0; + } + if (typeof V.meshImplants === "undefined") { + V.meshImplants = 0; + } + if (typeof V.BasicWeightSMR === "undefined") { + V.BasicWeightSMR = 0; + } + if (typeof V.BasicTallSMR !== "undefined") { + delete V.BasicTallSMR; + V.BasicHeightSMR = 1; + } + if (typeof V.BasicShortSMR !== "undefined") { + delete V.BasicShortSMR; + V.BasicHeightSMR = -1; + } + if (typeof V.BasicHeightSMR === "undefined") { + V.BasicHeightSMR = 0; + } + if (typeof V.AdvancedHeightSMR === "undefined") { + V.AdvancedHeightSMR = 0; + } + if (typeof V.toysBoughtDildos === "undefined") { + V.toysBoughtDildos = 0; + } + if (typeof V.toysBoughtGags === "undefined") { + V.toysBoughtGags = 0; + } + if (typeof V.toysBoughtVaginalAttachments === "undefined") { + V.toysBoughtVaginalAttachments = 0; + } + if (typeof V.toysBoughtButtPlugs === "undefined") { + V.toysBoughtButtPlugs = 0; + } + if (typeof V.toysBoughtButtPlugTails === "undefined") { + V.toysBoughtButtPlugTails = 0; + } + if (typeof V.toysBoughtSmartVibes === "undefined") { + V.toysBoughtSmartVibes = 0; + } + if (typeof V.buckets === "undefined") { + V.buckets = 0; + } + if (typeof V.menstruation === "undefined") { + V.menstruation = 0; + } + if (typeof V.FCTVenable === "undefined") { + V.FCTVenable = 1; + } + if (typeof V.FCTVreceiver === "undefined") { + V.FCTVreceiver = 0; + } + if (typeof V.receiverAvailable === "undefined") { + V.receiverAvailable = 0; + } + if (typeof V.FCTVshow === "undefined") { + V.FCTVshow = 0; + } + if (typeof V.FCTVremote === "undefined") { + V.FCTVremote = 0; + } + if (typeof V.FCTVrate === "undefined") { + V.FCTVrate = 2; + } + if (typeof V.FCTVcount === "undefined") { + V.FCTVcount = 0; + } + if (typeof V.lastShow === "undefined") { + V.lastShow = -1; + } + if (typeof V.purchasedSagBGone === "undefined") { + V.purchasedSagBGone = 0; + } + if (typeof V.FCNNstation === "undefined") { + V.FCNNstation = 0; + } + if (typeof V.breederOrphanageTotal === "undefined") { + V.breederOrphanageTotal = 0; + } + if (typeof V.newDescriptions === "undefined") { + V.newDescriptions = 0; + } + if (typeof V.specialSlavesPriceOverride === "undefined") { + V.specialSlavesPriceOverride = 0; + } + if (typeof V.pregAccessibility === "undefined") { + V.pregAccessibility = 0; + } + if (typeof V.dickAccessibility === "undefined") { + V.dickAccessibility = 0; + } + if (typeof V.ballsAccessibility === "undefined") { + V.ballsAccessibility = 0; + } + if (typeof V.buttAccessibility === "undefined") { + V.buttAccessibility = 0; + } + if (typeof V.loliGrow === "undefined") { + V.loliGrow = 0; + } + if (typeof V.ageMode === "undefined") { + V.ageMode = 0; + } + if (typeof V.enema === "undefined") { + V.enema = 0; + } + if (typeof V.medicalEnema === "undefined") { + V.medicalEnema = 0; + } + if (typeof V.dairyPiping === "undefined") { + V.dairyPiping = 0; + } + if (typeof V.inflatedSlavesMilk === "undefined") { + V.inflatedSlavesMilk = 0; + } + if (typeof V.inflatedSlavesCum === "undefined") { + V.inflatedSlavesCum = 0; + } + if (typeof V.milkPipeline === "undefined") { + V.milkPipeline = 0; + } + if (typeof V.cumPipeline === "undefined") { + V.cumPipeline = 0; + } + if (typeof V.wcPiping === "undefined") { + V.wcPiping = 0; + } + if (typeof V.burstee === "undefined") { + V.burstee = 0; + } + if (typeof V.slaveDeath === "undefined") { + V.slaveDeath = 0; + } + if (typeof V.playerBred === "undefined") { + V.playerBred = 0; + } + if (typeof V.propOutcome === "undefined") { + V.propOutcome = 0; + } + if (typeof V.EliteSires === "undefined") { + V.EliteSires = ["crazy", "futa", "moves", "preggo", "quick", "virgin"]; + } + if (typeof V.startingPoint === "undefined") { + V.startingPoint = -1; + } + if (typeof V.raped === "undefined") { + V.raped = -1; + } + if (typeof V.familyTesting === "undefined") { + V.familyTesting = 0; + } + if (typeof V.children === "undefined") { + V.children = []; + } + if (typeof V.missingParentID === "undefined") { + V.missingParentID = -10000; + } + if (typeof V.startingSlaveRelative !== "undefined") { + delete V.startingSlaveRelative; + } + if (typeof V.mom === "undefined") { + V.mom = 0; + } + if (typeof V.animalParts !== "undefined") { + delete V.animalParts; + } + if (typeof V.showBestiality !== "undefined") { + delete V.showBestiality; + } + if (typeof V.seeBestiality === "undefined") { + V.seeBestiality = 0; + } + if (typeof V.seePee === "undefined") { + V.seePee = 1; + } + if (typeof V.seeIncest === "undefined") { + V.seeIncest = 1; + } + if (typeof V.extremeUnderage === "undefined") { + V.extremeUnderage = 0; + } + if (typeof V.inbreeding === "undefined") { + V.inbreeding = 1; + } + if (typeof V.originOveride === "undefined") { + V.originOveride = 0; + } + if (typeof V.playerAging === "undefined") { + V.playerAging = 2; + } + if (typeof V.pregSpeedControl === "undefined") { + V.pregSpeedControl = 0; + } + if (typeof V.playerSurgery === "undefined") { + V.playerSurgery = 0; + } + if (typeof V.bodyswapAnnounced === "undefined") { + V.bodyswapAnnounced = 0; + } + if (typeof V.allowFamilyTitles === "undefined") { + V.allowFamilyTitles = 0; + } + if (typeof V.randShow === "undefined") { + V.randShow = 0; + } + if (typeof V.genePool === "undefined") { + V.genePool = []; + } + if (typeof V.useSummaryCache === "undefined") { + V.useSummaryCache = true; + } + if (typeof V.seeHyperPreg === "undefined") { + V.seeHyperPreg = 0; + } + if (typeof V.seePreg === "undefined") { + V.seePreg = 1; + } + if (typeof V.adamPrinciple === "undefined") { + V.adamPrinciple = 0; + } + if (typeof V.seeDicksAffectsPregnancy === "undefined") { + V.seeDicksAffectsPregnancy = 1; + } + if (typeof V.dangerousPregnancy === "undefined") { + V.dangerousPregnancy = 1; + } + if (typeof V.dangerousPregancy !== "undefined") { + delete V.dangerousPregancy; + } + if (typeof V.retainCareer === "undefined") { + V.retainCareer = 1; + } + if (typeof V.freshPC === "undefined") { + V.freshPC = 0; + } + if (typeof V.killChoice === "undefined") { + V.killChoice = -1; + } + if (typeof V.schoolroomRemodelBimbo === "undefined") { + V.schoolroomRemodelBimbo = 0; + } + if (typeof V.incubator === "undefined") { + V.incubator = 0; + } + if (typeof V.incubatorSlaves === "undefined") { + V.incubatorSlaves = 0; + } + if (typeof V.incubatorOrgans === "undefined") { + V.incubatorOrgans = []; + } + if (typeof V.incubatorOldID === "undefined") { + V.incubatorOldID = 0; + } + if (typeof V.incubatorUpgradeSpeed === "undefined") { + V.incubatorUpgradeSpeed = 5; + } + if (typeof V.incubatorUpgradeWeight === "undefined") { + V.incubatorUpgradeWeight = 0; + } + if (typeof V.incubatorUpgradeMuscles === "undefined") { + V.incubatorUpgradeMuscles = 0; + } + if (typeof V.incubatorUpgradeReproduction === "undefined") { + V.incubatorUpgradeReproduction = 0; + } + if (typeof V.incubatorUpgradeGrowthStims === "undefined") { + V.incubatorUpgradeGrowthStims = 0; + } + if (typeof V.incubatorUpgradeOrgans === "undefined") { + V.incubatorUpgradeOrgans = 0; + } + if (typeof V.incubatorImprintSetting === "undefined") { + V.incubatorImprintSetting = 0; + } + if (typeof V.incubatorWeightSetting === "undefined") { + V.incubatorWeightSetting = 0; + } + if (typeof V.incubatorMusclesSetting === "undefined") { + V.incubatorMusclesSetting = 0; + } + if (typeof V.incubatorReproductionSetting === "undefined") { + V.incubatorReproductionSetting = 0; + } + if (typeof V.incubatorGrowthStimsSetting === "undefined") { + V.incubatorGrowthStimsSetting = 0; + } + if (typeof V.reservedChildren === "undefined") { + V.reservedChildren = 0; + } + if (typeof V.tanks === "undefined") { + V.tanks = []; + } + // Nursery Subsection + if (typeof V.nursery === "undefined") { + V.nursery = 0; + } + if (typeof V.nIDNumber === "undefined") { + V.nIDNumber = 1; + } + if (typeof V.nurseryNannies === "undefined") { + V.nurseryNannies = 0; + } + if (typeof V.nurseryBabies === "undefined") { + V.nurseryBabies = 0; + } + if (typeof V.Matron === "undefined") { + V.Matron = 0; + } + if (typeof V.activeChild === "undefined") { + V.activeChild = 0; + } + if (typeof V.nannyInfluence === "undefined") { + V.nannyInfluence = 0; + } + if (typeof V.MatronInfluence === "undefined") { + V.MatronInfluence = 0; + } + if (typeof V.nurseryWeight === "undefined") { + V.nurseryWeight = 0; + } + if (typeof V.nurseryMuscles === "undefined") { + V.nurseryMuscles = 0; + } + if (typeof V.nurseryHormones === "undefined") { + V.nurseryHormones = 0; + } + if (typeof V.nurseryOrgans === "undefined") { + V.nurseryOrgans = 0; + } + if (typeof V.nurseryImprintSetting === "undefined") { + V.nurseryImprintSetting = 0; + } + if (typeof V.nurseryWeightSetting === "undefined") { + V.nurseryWeightSetting = 0; + } + if (typeof V.nurseryMusclesSetting === "undefined") { + V.nurseryMusclesSetting = 0; + } + if (typeof V.nurseryHormonesSetting === "undefined") { + V.nurseryHormonesSetting = 0; + } + if (typeof V.nurseryGrowthStimsSetting === "undefined") { + V.nurseryGrowthStimsSetting = 0; + } + if (typeof V.reservedChildrenNursery === "undefined") { + V.reservedChildrenNursery = 0; + } + if (typeof V.cribs === "undefined") { + V.cribs = []; + } + if (typeof V.cribsFreed === "undefined") { + V.cribsFreed = []; + } + if (typeof V.childSex === "undefined") { + V.childSex = 0; + } + if (typeof V.childProtectionAct === "undefined") { + V.childProtectionAct = 1; + } + + // Farmyard Subsection + if (typeof V.Farmer === "undefined") { + V.Farmer = 0; + } + if (typeof V.farmyard === "undefined") { + V.farmyard = 0; + } + if (typeof V.farmyardShowgirls === "undefined") { + V.farmyardShowgirls = []; + } + if (typeof V.farmyardFarmers === "undefined") { + V.farmyardFarmers = []; + } + if (typeof V.farmMenials === "undefined") { + V.farmMenials = 0; + } + if (typeof V.farmMenialsSpace === "undefined") { + V.farmMenialsSpace = 0; + } + if (typeof V.farmyardUpgrade === "undefined") { + V.farmyardUpgrade = { + pump: 0, + fertilizer: 0, + hydroponics: 0, + machinery: 0, + seeds: 0, + lab: 0 + }; + } + if (typeof V.farmyardUpgradeList !== "undefined") { + delete V.farmyardUpgradeList; + } + if (typeof V.farmyardCrops === "undefined") { + V.farmyardCrops = 0; + } + if (typeof V.farmyardKennels === "undefined") { + V.farmyardKennels = 0; + } + if (typeof V.farmyardStable === "undefined") { + V.farmyardStable = 0; + } + if (typeof V.farmyardCages === "undefined") { + V.farmyardCages = 0; + } + if (typeof V.farmyardLab === "undefined") { + V.farmyardLab = 0; + } + if (typeof V.farmyardLabUpgrades === "undefined") { + V.farmyardLabUpgrades = {animalOvaries: 0, animalTesticles: 0, animalMpreg: 0}; + } + 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; }); + if (typeof V.canines === "undefined") { + V.canines = []; + } + if (typeof V.hooved === "undefined") { + V.hooved = []; + } + if (typeof V.felines === "undefined") { + V.felines = []; + } + if (typeof V.boughtCanines !== "undefined") { + delete V.boughtCanines; + } + if (typeof V.boughtFelines !== "undefined") { + delete V.boughtFelines; + } + if (typeof V.defaultCanine !== "undefined") { + delete V.defaultCanine; + } + if (typeof V.defaultHooved !== "undefined") { + delete V.defaultHooved; + } + if (typeof V.defaultFeline !== "undefined") { + delete V.defaultFeline; + } + if (typeof V.defaultCaninePlural !== "undefined") { + delete V.defaultCaninePlural; + } + if (typeof V.defaultHoovedPlural !== "undefined") { + delete V.defaultHoovedPlural; + } + if (typeof V.defaultFelinePlural !== "undefined") { + delete V.defaultFelinePlural; + } + if (typeof V.activeCanine === "undefined") { + V.activeCanine = 0; + } + if (typeof V.activeHooved === "undefined") { + V.activeHooved = 0; + } + if (typeof V.activeFeline === "undefined") { + V.activeFeline = 0; + } + if (typeof V.boughtWolves !== "undefined") { + delete V.boughtWolves; + } + if (typeof V.boughtFoxes !== "undefined") { + delete V.boughtFoxes; + } + if (typeof V.boughtJackals !== "undefined") { + delete V.boughtJackals; + } + if (typeof V.boughtDingos !== "undefined") { + delete V.boughtDingos; + } + if (typeof V.boughtCougars !== "undefined") { + delete V.boughtCougars; + } + if (typeof V.boughtJaguars !== "undefined") { + delete V.boughtJaguars; + } + if (typeof V.boughtPumas !== "undefined") { + delete V.boughtPumas; + } + if (typeof V.boughtLynx !== "undefined") { + delete V.boughtLynx; + } + if (typeof V.boughtLeopards !== "undefined") { + delete V.boughtLeopards; + } + if (typeof V.boughtLions !== "undefined") { + delete V.boughtLions; + } + if (typeof V.boughtTigers !== "undefined") { + delete V.boughtTigers; + } + + if (typeof V.legendaryWombID === "undefined") { + V.legendaryWombID = 0; + } + if (typeof V.FSCreditCount === "undefined") { + V.FSCreditCount = 5; + } + if (typeof V.FSCreditCountString !== "undefined") { + delete V.FSCreditCountString; + } + if (typeof V.FSGotRepCredits === "undefined") { + if (V.FSGotRepCreditSix === 1) { + V.FSGotRepCredits = 7; + } else if (V.FSGotRepCreditFive === 1) { + V.FSGotRepCredits = 6; + } else if (V.FSGotRepCreditFour === 1) { + V.FSGotRepCredits = 5; + } else if (V.FSGotRepCreditThree === 1) { + V.FSGotRepCredits = 4; + } else if (V.FSGotRepCreditTwo === 1) { + V.FSGotRepCredits = 3; + } else if (V.FSGotRepCreditOne === 1) { + V.FSGotRepCredits = 2; + } else if (V.FSAnnounced === 1) { + V.FSGotRepCredits = 1; + } else { + V.FSGotRepCredits = 0; + } + } + if (typeof V.FSGotRepCreditSix !== "undefined") { + delete V.FSGotRepCreditSix; + } + if (typeof V.FSGotRepCreditFive !== "undefined") { + delete V.FSGotRepCreditFive; + } + if (typeof V.FSGotRepCreditFour !== "undefined") { + delete V.FSGotRepCreditFour; + } + if (typeof V.FSGotRepCreditThree !== "undefined") { + delete V.FSGotRepCreditThree; + } + if (typeof V.FSGotRepCreditTwo !== "undefined") { + delete V.FSGotRepCreditTwo; + } + if (typeof V.FSGotRepCreditOne !== "undefined") { + delete V.FSGotRepCreditOne; + } + if (typeof V.makeDicks === "undefined") { + V.makeDicks = 0; + } + if (typeof V.showEconomicDetails === "undefined") { + V.showEconomicDetails = 0; + } + if (typeof V.assignFilter !== "undefined") { + delete V.assignFilter; + } + if (typeof V.personalAttention === "undefined") { + V.personalAttention = "sex"; + } + if (typeof V.trainingRegimen !== "undefined") { + if (typeof V.personalAttention === "number") { + V.personalAttention = [{ID: V.personalAttention, trainingRegimen: V.trainingRegimen}]; + } + delete V.trainingRegimen, V.personalAttentionChanged; + } + + if (typeof V.huskSlaveOrdered === "undefined") { + V.huskSlaveOrdered = 0; + } + if (typeof V.huskSlave === "undefined") { + V.huskSlave = new App.Entity.CustomSlaveOrder(); + } + App.Update.CustomSlaveOrder(V.huskSlave); + App.Update.CustomSlaveOrder(V.customSlave); + + if (typeof V.pedo_mode === "undefined") { + // eslint-disable-next-line camelcase + V.pedo_mode = 0; + } + if (typeof V.one_time_age_overrides_pedo_mode === "undefined") { + // eslint-disable-next-line camelcase + V.one_time_age_overrides_pedo_mode = 0; + } + if (typeof V.minimumSlaveAge === "undefined") { + V.minimumSlaveAge = 16; + } + if (typeof V.fertilityAge === "undefined") { + V.fertilityAge = 13; + } + if (typeof V.potencyAge === "undefined") { + V.potencyAge = 13; + } + if (typeof slaveOneTimeMinAge === "undefined") { + V.slaveOneTimeMinAge = 0; + } + if (typeof slaveOneTimeMaxAge === "undefined") { + V.slaveOneTimeMaxAge = 999; + } + if (typeof V.oneTimeDisableDisability === "undefined") { + V.oneTimeDisableDisability = 0; + } + if (typeof V.AgePenalty === "undefined") { + V.AgePenalty = 1; + } + if (typeof V.precociousPuberty === "undefined") { + V.precociousPuberty = 0; + } + if (typeof V.targetAge === "undefined") { + V.targetAge = V.minimumSlaveAge; + } + if (typeof V.disableLisping === "undefined") { + V.disableLisping = 0; + } + if (typeof V.cheatModeM === "undefined") { + V.cheatModeM = 1; + } + if (typeof V.experimental === "undefined") { + V.experimental = { + nursery: 0, + food: 0, + animalOvaries: 0, + dinnerParty: 0 + }; + } + if (typeof V.MercenariesMessageSent === "undefined") { + V.MercenariesMessageSent = 0; + } + if (typeof V.SpecialForcesMessageSent === "undefined") { + V.SpecialForcesMessageSent = 0; + } + if (typeof V.BodyguardHasSucessfullyRecivedSignal === "undefined") { + V.BodyguardHasSucessfullyRecivedSignal = 0; + } + if (typeof V.finalChoice === "undefined") { + V.finalChoice = "none"; + } + if (typeof V.eliteTotal === "undefined") { + V.eliteTotal = 12; + } + if (typeof V.eliteDead === "undefined") { + V.eliteDead = 0; + } + if (typeof V.eliteVegetable === "undefined") { + V.eliteVegetable = 0; + } + if (typeof V.eliteFate === "undefined") { + V.eliteFate = 0; + } + if (typeof V.eliteFail === "undefined") { + V.eliteFail = 0; + } + if (typeof V.eliteFailTimer === "undefined") { + V.eliteFailTimer = 0; + } + if (typeof V.failedElite === "undefined") { + V.failedElite = 0; + } + if (typeof V.eugenicsFullControl === "undefined") { + V.eugenicsFullControl = 0; + } + if (typeof V.merchantFSWares === "undefined") { + V.merchantFSWares = ["AssetExpansionistResearch", "GenderRadicalistResearch", "HedonisticDecadenceResearch", "SlaveProfessionalismResearch", "SlimnessEnthusiastResearch", "TransformationFetishistResearch", "YouthPreferentialistResearch"]; + } else if (V.merchantFSWares.length === 0) { + V.merchantFSWares.push("AssetExpansionistResearch"); + V.merchantFSWares.push("GenderRadicalistResearch"); + V.merchantFSWares.push("HedonisticDecadenceResearch"); + V.merchantFSWares.push("SlaveProfessionalismResearch"); + V.merchantFSWares.push("SlimnessEnthusiastResearch"); + V.merchantFSWares.push("TransformationFetishistResearch"); + V.merchantFSWares.push("YouthPreferentialistResearch"); + } + if (typeof V.merchantIllegalWares === "undefined") { + V.merchantIllegalWares = ["asexualReproduction", "childhoodFertilityInducedNCS", "PGHack", "RapidCellGrowthFormula", "sympatheticOvaries", "UterineRestraintMesh"]; + } else if (V.merchantIllegalWares.length === 0) { + V.merchantIllegalWares.push("childhoodFertilityInducedNCS"); + V.merchantIllegalWares.push("UterineRestraintMesh"); + V.merchantIllegalWares.push("RapidCellGrowthFormula"); + V.merchantIllegalWares.push("PGHack"); + V.merchantIllegalWares.push("sympatheticOvaries"); + V.merchantIllegalWares.push("asexualReproduction"); + } + if (typeof V.arcologies[0].childhoodFertilityInducedNCSResearch === "undefined") { + V.arcologies[0].childhoodFertilityInducedNCSResearch = 0; + } + if (V.arcologies[0].childFertilityInducedNCSResearch) { + delete V.arcologies[0].childFertilityInducedNCSResearch; + } + if (typeof V.UterineRestraintMesh === "undefined") { + V.UterineRestraintMesh = 0; + } + if (typeof V.RapidCellGrowthFormula === "undefined") { + V.RapidCellGrowthFormula = 0; + } + if (typeof V.PGHack === "undefined") { + V.PGHack = 0; + } + if (typeof V.adamPrinciple === "undefined") { + V.adamPrinciple = 0; + } + if (typeof V.showInches || V.showInches === 0 === "undefined") { + V.showInches = 1; + } + if (typeof V.showNumbers === "undefined") { + V.showNumbers = 2; + } + if (typeof V.showNumbersMax === "undefined") { + V.showNumbersMax = 20; + } + if (typeof V.showWardrobe !== "undefined") { + delete V.showWardrobe; + } + if (typeof V.showMainClothing !== "undefined") { + delete V.showMainClothing; + } + if (typeof V.surnameOrder === "undefined") { + V.surnameOrder = 0; + } + if (typeof V.prisonCircuit === "undefined") { + V.prisonCircuit = ["low tier criminals", "gangs and smugglers", "white collar", "military prison"]; + V.prisonCircuitIndex = random(0, V.prisonCircuit.length - 1); + } + if (V.captureUpgradeRace === "") { + V.generalUpgradeBreaking = "unselected"; + V.generalUpgradeWeight = "unselected"; + V.generalUpgradeMuscle = "unselected"; + V.entrapmentUpgradeDevotionOne = "unselected"; + V.entrapmentUpgradeDevotionTwo = "unselected"; + V.entrapmentUpgradeIntelligence = "unselected"; + V.captureUpgradeGender = "unselected"; + V.surgicalUpgradeGenitalia = "unselected"; + V.captureUpgradeAge = "unselected"; + V.captureUpgradeRace = "unselected"; + V.trainingUpgradeAccent = "unselected"; + V.trainingUpgradeEducation = "unselected"; + V.trainingUpgradeSexEd = "unselected"; + V.surgicalUpgradeCosmetics = "unselected"; + V.surgicalUpgradeImplants = "unselected"; + V.drugUpgradeHormones = "unselected"; + V.drugUpgradeInjectionOne = "unselected"; + V.drugUpgradeInjectionTwo = "unselected"; + } + if (typeof V.traitorType === "undefined") { + V.traitorType = "standard"; + } + + App.SF.BC(); + + if (typeof V.useSlaveSummaryTabs === "undefined") { + V.useSlaveSummaryTabs = 0; + } + if (typeof V.useSlaveSummaryOverviewTab === "undefined") { + V.useSlaveSummaryOverviewTab = 0; + } + if (typeof V.useSlaveListInPageJSNavigation === "undefined") { + V.useSlaveListInPageJSNavigation = 0; + } + + 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; + } + 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; + } + V.arcologies[0].FSHedonisticDecadenceLaw = 0, V.arcologies[0].FSHedonisticDecadenceLaw2 = 0, V.arcologies[0].FSHedonisticDecadenceSMR = 0, V.arcologies[0].FSHedonisticDecadenceResearch = 0; + } + if (typeof V.arcologies[0].FSHedonisticDecadenceDietResearch === "undefined") { + V.arcologies[0].FSHedonisticDecadenceDietResearch = 0; + } + if (typeof V.arcologies[0].FSPhysicalIdealistStrongFat === "undefined") { + V.arcologies[0].FSPhysicalIdealistStrongFat = 0; + } + if (typeof V.arcologies[0].FSHedonisticDecadenceStrongFat === "undefined") { + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + } + if (typeof V.arcologies[0].FSPhysicalIdealistLaw === "undefined") { + V.arcologies[0].FSPhysicalIdealistLaw = 0; + } + + if (typeof V.FSPromenade === "undefined") { + V.FSPromenade = { + Subjugationist: 0, + Supremacist: 0, + GenderRadicalist: 0, + GenderFundamentalist: 0, + Paternalist: 0, + Degradationist: 0, + BodyPurist: 0, + TransformationFetishist: 0, + YouthPreferentialist: 0, + MaturityPreferentialist: 0, + SlimnessEnthusiast: 0, + AssetExpansionist: 0, + Pastoralist: 0, + PhysicalIdealist: 0, + ChattelReligionist: 0, + RomanRevivalist: 0, + AztecRevivalist: 0, + EgyptianRevivalist: 0, + EdoRevivalist: 0, + ArabianRevivalist: 0, + ChineseRevivalist: 0, + Repopulationist: 0, + Eugenics: 0, + Hedonism: 0, + IntellectualDependency: 0, + SlaveProfessionalism: 0, + PetiteAdmiration: 0, + StatuesqueGlorification: 0 + }; + } + + if (typeof V.arcologyUpgrade === "undefined") { + V.arcologyUpgrade = { + drones: 0, + hydro: 0, + apron: 0, + grid: 0, + spire: 0 + }; + V.arcologyUpgrade.drones = (V.AProsperityCap > 60) ? 1 : 0; + V.arcologyUpgrade.hydro = (V.AProsperityCap > 80) ? 1 : 0; + V.arcologyUpgrade.apron = (V.AProsperityCap > 100) ? 1 : 0; + V.arcologyUpgrade.grid = (V.AProsperityCap > 120) ? 1 : 0; + V.arcologyUpgrade.spire = (V.AProsperityCap > 240) ? 1 : 0; + } + + if (typeof V.AMenials !== "undefined") { + V.ASlaves += Math.trunc(V.AMenials / 2); + delete V.AMenials; + } + + if (typeof V.helots !== "undefined") { + V.menials = V.helots; + delete V.helots; + } + if (typeof V.TradeShowHelots !== "undefined") { + V.TradeShowMenials = V.TradeShowHelots; + delete V.TradeShowHelots; + } + + if (typeof V.seeBuilding === "undefined") { + V.seeBuilding = V.seeArcology; + } + + if (typeof V.year !== "undefined") { + delete V.year; + } + if (typeof V.day !== "undefined") { + delete V.day; + } + if (typeof V.month !== "undefined") { + delete V.month; + } + + if (typeof V.arcologies === "undefined") { + V.arcologies = []; + V.arcologies[0] = { + name: "Arcology X-", + direction: 0, + government: 1, + honeymoon: 0, + prosperity: 50, + FSSupremacist: "unset", + FSSupremacistRace: 0, + FSSubjugationist: "unset", + FSSubjugationistRace: 0, + FSGenderRadicalist: "unset", + FSGenderFundamentalist: "unset", + FSPaternalist: "unset", + FSDegradationist: "unset", + FSBodyPurist: "unset", + FSTransformationFetishist: "unset", + FSYouthPreferentialist: "unset", + FSMaturityPreferentialist: "unset", + FSSlimnessEnthusiast: "unset", + FSAssetExpansionist: "unset", + FSPastoralist: "unset", + FSPhysicalIdealist: "unset", + FSChattelReligionist: "unset", + FSRomanRevivalist: "unset", + FSEgyptianRevivalist: "unset", + FSEdoRevivalist: "unset", + FSArabianRevivalist: "unset", + FSChineseRevivalist: "unset", + FSNull: "unset", + FSRepopulationFocus: "unset", + FSRestart: "unset", + FSHedonisticDecadence: "unset", + FSIntellectualDependency: "unset", + FSSlaveProfessionalism: "unset", + FSPetiteAdmiration: "unset", + FSStatuesqueGlorification: "unset", + embargo: 1, + embargoTarget: -1, + influenceTarget: -1, + influenceBonus: 0, + rival: 0 + }; + } + + if (typeof V.arcologyName !== "undefined") { + V.arcologies[0].name = V.arcologyName; + delete V.arcologyName; + } else if (typeof V.arcologies[0].name === "undefined") { + V.arcologies[0].name = "Arcology X-4"; + } + + if (typeof V.arcologies[0].ownership === "undefined") { + V.arcologies[0].ownership = 50; + } + if (typeof V.arcologies[0].minority === "undefined") { + V.arcologies[0].minority = 20; + } + if (typeof V.arcologies[0].embargo === "undefined") { + V.arcologies[0].embargo = 1; + } + if (typeof V.arcologies[0].embargoTarget === "undefined") { + V.arcologies[0].embargoTarget = -1; + } + if (typeof V.arcologies[0].hackingEconomic === "undefined") { + V.arcologies[0].hackingEconomic = 1; + } + if (typeof V.arcologies[0].hackingEconomicTarget === "undefined") { + V.arcologies[0].hackingEconomicTarget = -1; + } + if (typeof V.arcologies[0].hackingReputationTarget === "undefined") { + V.arcologies[0].hackingReputationTarget = -1; + } + if (typeof V.arcologies[0].hackingReputation === "undefined") { + V.arcologies[0].hackingReputation = 1; + } + if (typeof V.arcologies[0].influenceTarget === "undefined") { + V.arcologies[0].influenceTarget = -1; + } + if (typeof V.arcologies[0].influenceBonus === "undefined") { + V.arcologies[0].influenceBonus = -1; + } + if (typeof V.arcologies[0].CyberEconomic === "undefined") { + V.arcologies[0].CyberEconomic = 1; + } + if (typeof V.arcologies[0].CyberEconomicTarget === "undefined") { + V.arcologies[0].CyberEconomicTarget = -1; + } + if (typeof V.arcologies[0].CyberReputation === "undefined") { + V.arcologies[0].CyberReputation = 1; + } + if (typeof V.arcologies[0].CyberReputationTarget === "undefined") { + V.arcologies[0].CyberReputationTarget = -1; + } + if (typeof V.arcologies[0].rival === "undefined") { + V.arcologies[0].rival = 0; + } + if (typeof V.arcologies[0].FSNull === "undefined") { + V.arcologies[0].FSNull = "unset"; + } + if (typeof V.arcologies[0].FSRepopulationFocus === "undefined") { + V.arcologies[0].FSRepopulationFocus = "unset"; + } + if (typeof V.arcologies[0].FSRepopulationFocusPregPolicy === "undefined") { + V.arcologies[0].FSRepopulationFocusPregPolicy = 0; + } + if (typeof V.arcologies[0].FSRepopulationFocusMilfPolicy === "undefined") { + V.arcologies[0].FSRepopulationFocusMilfPolicy = 0; + } + if (typeof V.arcologies[0].FSRepopulationFocusInterest === "undefined") { + V.arcologies[0].FSRepopulationFocusInterest = 0; + } + if (typeof V.arcologies[0].FSRestart === "undefined") { + V.arcologies[0].FSRestart = "unset"; + } + if (typeof V.arcologies[0].FSEugenicsChastityPolicy === "undefined") { + V.arcologies[0].FSEugenicsChastityPolicy = 0; + } + if (typeof V.arcologies[0].FSEugenicsSterilizationPolicy === "undefined") { + V.arcologies[0].FSEugenicsSterilizationPolicy = 0; + } + if (typeof V.arcologies[0].FSEugenicsInterest === "undefined") { + V.arcologies[0].FSEugenicsInterest = 0; + } + if (typeof V.arcologies[0].PCminority === "undefined") { + V.arcologies[0].PCminority = 0; + } + if (typeof V.arcologies[0].demandFactor === "undefined") { + V.arcologies[0].demandFactor = 250; + } + if (typeof V.arcologies[0].leaderID === "undefined") { + V.arcologies[0].leaderID = 0; + } + + if ((typeof V.FSSupremacist !== "undefined") && V.FSSupremacist !== "unset") { + V.arcologies[0].FSSupremacist = V.FSSupremacist; + V.arcologies[0].FSSupremacistRace = V.FSSupremacistRace; + delete V.FSSupremacist; + delete V.FSSupremacistRace; + } else if (typeof V.arcologies[0].FSSupremacist === "undefined") { + V.arcologies[0].FSSupremacist = "unset"; + } + if ((typeof V.FSSupremacistLawME !== "undefined") && V.FSSupremacistLawME !== 0) { + V.arcologies[0].FSSupremacistLawME = V.FSSupremacistLawME; + delete V.FSSupremacistLawME; + } else if (typeof V.arcologies[0].FSSupremacistLawME === "undefined") { + V.arcologies[0].FSSupremacistLawME = 0; + } + if (V.arcologies[0].FSSupremacistRace === "middle") { + V.arcologies[0].FSSupremacistRace = "middle eastern"; + } else if (V.arcologies[0].FSSupremacistRace === "pacific") { + V.arcologies[0].FSSupremacistRace = "pacific islander"; + } else if (V.arcologies[0].FSSupremacistRace === "southern") { + V.arcologies[0].FSSupremacistRace = "southern european"; + } else if (V.arcologies[0].FSSupremacistRace === "mixed") { + V.arcologies[0].FSSupremacistRace = "mixed race"; + } + + if ((typeof V.FSSubjugationist !== "undefined") && V.FSSubjugationist !== "unset") { + V.arcologies[0].FSSubjugationist = V.FSSubjugationist; + V.arcologies[0].FSSubjugationistRace = V.FSSubjugationistRace; + delete V.FSSubjugationist; + delete V.FSSubjugationistRace; + } else if (typeof V.arcologies[0].FSSubjugationist === "undefined") { + V.arcologies[0].FSSubjugationist = "unset"; + } + if ((typeof V.FSSubjugationistLawME !== "undefined") && V.FSSubjugationistLawME !== 0) { + V.arcologies[0].FSSubjugationistLawME = V.FSSubjugationistLawME; + delete V.FSSubjugationistLawME; + } else if (typeof V.arcologies[0].FSSubjugationistLawME === "undefined") { + V.arcologies[0].FSSubjugationistLawME = 0; + } + if (V.arcologies[0].FSSubjugationistRace === "middle") { + V.arcologies[0].FSSubjugationistRace = "middle eastern"; + } else if (V.arcologies[0].FSSubjugationistRace === "pacific") { + V.arcologies[0].FSSubjugationistRace = "pacific islander"; + } else if (V.arcologies[0].FSSubjugationistRace === "southern") { + V.arcologies[0].FSSubjugationistRace = "southern european"; + } else if (V.arcologies[0].FSSubjugationistRace === "mixed") { + V.arcologies[0].FSSubjugationistRace = "mixed race"; + } + + if ((typeof V.FSDegradationist !== "undefined") && V.FSDegradationist !== "unset") { + V.arcologies[0].FSDegradationist = V.FSDegradationist; + delete V.FSDegradationist; + } else if (typeof V.arcologies[0].FSDegradationist === "undefined") { + V.arcologies[0].FSDegradationist = "unset"; + } + + if ((typeof V.FSDegradationistLaw !== "undefined") && V.FSDegradationistLaw !== 0) { + V.arcologies[0].FSDegradationistLaw = V.FSDegradationistLaw; + delete V.FSDegradationistLaw; + } else if (typeof V.arcologies[0].FSDegradationistLaw === "undefined") { + V.arcologies[0].FSDegradationistLaw = 0; + } + + if ((typeof V.FSPaternalist !== "undefined") && V.FSPaternalist !== "unset") { + V.arcologies[0].FSPaternalist = V.FSPaternalist; + delete V.FSPaternalist; + } else if (typeof V.arcologies[0].FSPaternalist === "undefined") { + V.arcologies[0].FSPaternalist = "unset"; + } + + if ((typeof V.FSPaternalistLaw !== "undefined") && V.FSPaternalistLaw !== 0) { + V.arcologies[0].FSPaternalistLaw = V.FSPaternalistLaw; + delete V.FSPaternalistLaw; + } else if (typeof V.arcologies[0].FSPaternalistLaw === "undefined") { + V.arcologies[0].FSPaternalistLaw = 0; + } + + if ((typeof V.FSGenderFundamentalist !== "undefined") && V.FSGenderFundamentalist !== "unset") { + V.arcologies[0].FSGenderFundamentalist = V.FSGenderFundamentalist; + delete V.FSGenderFundamentalist; + } else if (typeof V.arcologies[0].FSGenderFundamentalist === "undefined") { + V.arcologies[0].FSGenderFundamentalist = "unset"; + } + + if ((typeof V.FSGenderFundamentalistSMR !== "undefined") && V.FSGenderFundamentalistSMR !== 0) { + V.arcologies[0].FSGenderFundamentalistSMR = V.FSGenderFundamentalistSMR; + delete V.FSGenderFundamentalistSMR; + } else if (typeof V.arcologies[0].FSGenderFundamentalistSMR === "undefined") { + V.arcologies[0].FSGenderFundamentalistSMR = 0; + } + if (typeof V.arcologies[0].FSGenderFundamentalistLaw !== "undefined") { + delete V.arcologies[0].FSGenderFundamentalistLaw; + } + + if ((typeof V.FSGenderRadicalist !== "undefined") && V.FSGenderRadicalist !== "unset") { + V.arcologies[0].FSGenderRadicalist = V.FSGenderRadicalist; + delete V.FSGenderRadicalist; + } else if (typeof V.arcologies[0].FSGenderRadicalist === "undefined") { + V.arcologies[0].FSGenderRadicalist = "unset"; + } + if (typeof V.FSGenderRadicalistLaw !== "undefined") { + delete V.FSGenderRadicalistLaw; + } + if (typeof V.arcologies[0].FSGenderRadicalistLawBeauty === "undefined") { + V.arcologies[0].FSGenderRadicalistLawBeauty = 0; + } + if (typeof V.arcologies[0].FSGenderRadicalistLawFuta === "undefined") { + V.arcologies[0].FSGenderRadicalistLawFuta = 0; + } + if (typeof V.arcologies[0].FSGenderRadicalistLawDicks !== "undefined") { + delete V.arcologies[0].FSGenderRadicalistLawDicks; + } + if (typeof V.arcologies[0].FSGenderRadicalistSMR !== "undefined") { + delete V.arcologies[0].FSGenderRadicalistSMR; + } + + if ((typeof V.FSBodyPurist !== "undefined") && V.FSBodyPurist !== "unset") { + V.arcologies[0].FSBodyPurist = V.FSBodyPurist; + delete V.FSBodyPurist; + } else if (typeof V.arcologies[0].FSBodyPurist === "undefined") { + V.arcologies[0].FSBodyPurist = "unset"; + } + + if ((typeof V.FSBodyPuristLaw !== "undefined") && V.FSBodyPuristLaw !== 0) { + V.arcologies[0].FSBodyPuristLaw = V.FSBodyPuristLaw; + delete V.FSBodyPuristLaw; + } else if (typeof V.arcologies[0].FSBodyPuristLaw === "undefined") { + V.arcologies[0].FSBodyPuristLaw = 0; + } + + if ((typeof V.FSPhysicalIdealist !== "undefined") && V.FSPhysicalIdealist !== "unset") { + V.arcologies[0].FSPhysicalIdealist = V.FSPhysicalIdealist; + delete V.FSPhysicalIdealist; + } else if (typeof V.arcologies[0].FSPhysicalIdealist === "undefined") { + V.arcologies[0].FSPhysicalIdealist = "unset"; + } + + if ((typeof V.FSPhysicalIdealistSMR !== "undefined") && V.FSPhysicalIdealistSMR !== 0) { + V.arcologies[0].FSPhysicalIdealistSMR = V.FSPhysicalIdealistSMR; + delete V.FSPhysicalIdealistSMR; + } else if (typeof V.arcologies[0].FSPhysicalIdealistSMR === "undefined") { + V.arcologies[0].FSPhysicalIdealistSMR = 0; + } + + if ((typeof V.FSTransformationFetishist !== "undefined") && V.FSTransformationFetishist !== "unset") { + V.arcologies[0].FSTransformationFetishist = V.FSTransformationFetishist; + delete V.FSTransformationFetishist; + } else if (typeof V.arcologies[0].FSTransformationFetishist === "undefined") { + V.arcologies[0].FSTransformationFetishist = "unset"; + } + + if ((typeof V.FSTransformationFetishistSMR !== "undefined") && V.FSTransformationFetishistSMR !== 0) { + V.arcologies[0].FSTransformationFetishistSMR = V.FSTransformationFetishistSMR; + delete V.FSTransformationFetishistSMR; + } else if (typeof V.arcologies[0].FSTransformationFetishistSMR === "undefined") { + V.arcologies[0].FSTransformationFetishistSMR = 0; + } + if (typeof V.arcologies[0].FSTransformationFetishistLaw !== "undefined") { + delete V.arcologies[0].FSTransformationFetishistLaw; + } + + if ((typeof V.FSAssetExpansionist !== "undefined") && V.FSAssetExpansionist !== "unset") { + V.arcologies[0].FSAssetExpansionist = V.FSAssetExpansionist; + delete V.FSAssetExpansionist; + } else if (typeof V.arcologies[0].FSAssetExpansionist === "undefined") { + V.arcologies[0].FSAssetExpansionist = "unset"; + } + + if ((typeof V.FSAssetExpansionistSMR !== "undefined") && V.FSAssetExpansionistSMR !== 0) { + V.arcologies[0].FSAssetExpansionistSMR = V.FSAssetExpansionistSMR; + delete V.FSAssetExpansionistSMR; + } else if (typeof V.arcologies[0].FSAssetExpansionistSMR === "undefined") { + V.arcologies[0].FSAssetExpansionistSMR = 0; + } + if (typeof V.arcologies[0].FSAssetExpansionistLaw !== "undefined") { + delete V.arcologies[0].FSAssetExpansionistLaw; + } + + if ((typeof V.FSSlimnessEnthusiast !== "undefined") && V.FSSlimnessEnthusiast !== "unset") { + V.arcologies[0].FSSlimnessEnthusiast = V.FSSlimnessEnthusiast; + delete V.FSSlimnessEnthusiast; + } else if (typeof V.arcologies[0].FSSlimnessEnthusiast === "undefined") { + V.arcologies[0].FSSlimnessEnthusiast = "unset"; + } + + if ((typeof V.FSSlimnessEnthusiastSMR !== "undefined") && V.FSSlimnessEnthusiastSMR !== 0) { + V.arcologies[0].FSSlimnessEnthusiastSMR = V.FSSlimnessEnthusiastSMR; + delete V.FSSlimnessEnthusiastSMR; + } else if (typeof V.arcologies[0].FSSlimnessEnthusiastSMR === "undefined") { + V.arcologies[0].FSSlimnessEnthusiastSMR = 0; + } + + if ((typeof V.FSMaturityPreferentialist !== "undefined") && V.FSMaturityPreferentialist !== "unset") { + V.arcologies[0].FSMaturityPreferentialist = V.FSMaturityPreferentialist; + delete V.FSMaturityPreferentialist; + } else if (typeof V.arcologies[0].FSMaturityPreferentialist === "undefined") { + V.arcologies[0].FSMaturityPreferentialist = "unset"; + } + + if ((typeof V.FSMaturityPreferentialistLaw !== "undefined") && V.FSMaturityPreferentialistLaw !== 0) { + V.arcologies[0].FSMaturityPreferentialistLaw = V.FSMaturityPreferentialistLaw; + delete V.FSMaturityPreferentialistLaw; + } else if (typeof V.arcologies[0].FSMaturityPreferentialistLaw === "undefined") { + V.arcologies[0].FSMaturityPreferentialistLaw = 0; + } + + if ((typeof V.FSYouthPreferentialist !== "undefined") && V.FSYouthPreferentialist !== "unset") { + V.arcologies[0].FSYouthPreferentialist = V.FSYouthPreferentialist; + delete V.FSYouthPreferentialist; + } else if (typeof V.arcologies[0].FSYouthPreferentialist === "undefined") { + V.arcologies[0].FSYouthPreferentialist = "unset"; + } + + if ((typeof V.FSYouthPreferentialistLaw !== "undefined") && V.FSYouthPreferentialistLaw !== 0) { + V.arcologies[0].FSYouthPreferentialistLaw = V.FSYouthPreferentialistLaw; + delete V.FSYouthPreferentialistLaw; + } else if (typeof V.arcologies[0].FSYouthPreferentialistLaw === "undefined") { + V.arcologies[0].FSYouthPreferentialistLaw = 0; + } + + if ((typeof V.FSPastoralist !== "undefined") && V.FSPastoralist !== "unset") { + V.arcologies[0].FSPastoralist = V.FSPastoralist; + delete V.FSPastoralist; + } else if (typeof V.arcologies[0].FSPastoralist === "undefined") { + V.arcologies[0].FSPastoralist = "unset"; + } + + if ((typeof V.FSPastoralistLaw !== "undefined") && V.FSPastoralistLaw !== 0) { + V.arcologies[0].FSPastoralistLaw = V.FSPastoralistLaw; + delete V.FSPastoralistLaw; + } else if (typeof V.arcologies[0].FSPastoralistLaw === "undefined") { + V.arcologies[0].FSPastoralistLaw = 0; + } + + if ((typeof V.FSChattelReligionist !== "undefined") && V.FSChattelReligionist !== "unset") { + V.arcologies[0].FSChattelReligionist = V.FSChattelReligionist; + delete V.FSChattelReligionist; + } else if (typeof V.arcologies[0].FSChattelReligionist === "undefined") { + V.arcologies[0].FSChattelReligionist = "unset"; + } + + if ((typeof V.FSChattelReligionistLaw !== "undefined") && V.FSChattelReligionistLaw !== 0) { + V.arcologies[0].FSChattelReligionistLaw = V.FSChattelReligionistLaw; + delete V.FSChattelReligionistLaw; + } else if (typeof V.arcologies[0].FSChattelReligionistLaw === "undefined") { + V.arcologies[0].FSChattelReligionistLaw = 0; + } + + if ((typeof V.FSRomanRevivalist !== "undefined") && V.FSRomanRevivalist !== "unset") { + V.arcologies[0].FSRomanRevivalist = V.FSRomanRevivalist; + delete V.FSRomanRevivalist; + } else if (typeof V.arcologies[0].FSRomanRevivalist === "undefined") { + V.arcologies[0].FSRomanRevivalist = "unset"; + } + + if ((typeof V.FSRomanRevivalistLaw !== "undefined") && V.FSRomanRevivalistLaw !== 0) { + V.arcologies[0].FSRomanRevivalistLaw = V.FSRomanRevivalistLaw; + delete V.FSRomanRevivalistLaw; + } else if (typeof V.arcologies[0].FSRomanRevivalistLaw === "undefined") { + V.arcologies[0].FSRomanRevivalistLaw = 0; + } + + if ((typeof V.FSEgyptianRevivalist !== "undefined") && V.FSEgyptianRevivalist !== "unset") { + V.arcologies[0].FSEgyptianRevivalist = V.FSEgyptianRevivalist; + delete V.FSEgyptianRevivalist; + } else if (typeof V.arcologies[0].FSEgyptianRevivalist === "undefined") { + V.arcologies[0].FSEgyptianRevivalist = "unset"; + } + + if ((typeof V.FSEgyptianRevivalistLaw !== "undefined") && V.FSEgyptianRevivalistLaw !== 0) { + V.arcologies[0].FSEgyptianRevivalistLaw = V.FSEgyptianRevivalistLaw; + delete V.FSEgyptianRevivalistLaw; + } else if (typeof V.arcologies[0].FSEgyptianRevivalistLaw === "undefined") { + V.arcologies[0].FSEgyptianRevivalistLaw = 0; + } + + if (typeof V.arcologies[0].FSEgyptianRevivalistIncestPolicy === "undefined") { + V.arcologies[0].FSEgyptianRevivalistIncestPolicy = 0; + } + if (typeof V.arcologies[0].FSEgyptianRevivalistInterest === "undefined") { + V.arcologies[0].FSEgyptianRevivalistInterest = 0; + } + + if ((typeof V.FSEdoRevivalist !== "undefined") && V.FSEdoRevivalist !== "unset") { + V.arcologies[0].FSEdoRevivalist = V.FSEdoRevivalist; + delete V.FSEdoRevivalist; + } else if (typeof V.arcologies[0].FSEdoRevivalist === "undefined") { + V.arcologies[0].FSEdoRevivalist = "unset"; + } + + if ((typeof V.FSEdoRevivalistLaw !== "undefined") && V.FSEdoRevivalistLaw !== 0) { + V.arcologies[0].FSEdoRevivalistLaw = V.FSEdoRevivalistLaw; + delete V.FSEdoRevivalistLaw; + } else if (typeof V.arcologies[0].FSEdoRevivalistLaw === "undefined") { + V.arcologies[0].FSEdoRevivalistLaw = 0; + } + + if ((typeof V.FSArabianRevivalist !== "undefined") && V.FSArabianRevivalist !== "unset") { + V.arcologies[0].FSArabianRevivalist = V.FSArabianRevivalist; + delete V.FSArabianRevivalist; + } else if (typeof V.arcologies[0].FSArabianRevivalist === "undefined") { + V.arcologies[0].FSArabianRevivalist = "unset"; + } + + if ((typeof V.FSArabianRevivalistLaw !== "undefined") && V.FSArabianRevivalistLaw !== 0) { + V.arcologies[0].FSArabianRevivalistLaw = V.FSArabianRevivalistLaw; + delete V.FSArabianRevivalistLaw; + } else if (typeof V.arcologies[0].FSArabianRevivalistLaw === "undefined") { + V.arcologies[0].FSArabianRevivalistLaw = 0; + } + + if ((typeof V.FSChineseRevivalist !== "undefined") && V.FSChineseRevivalist !== "unset") { + V.arcologies[0].FSChineseRevivalist = V.FSChineseRevivalist; + delete V.FSChineseRevivalist; + } else if (typeof V.arcologies[0].FSChineseRevivalist === "undefined") { + V.arcologies[0].FSChineseRevivalist = "unset"; + } + + if ((typeof V.FSChineseRevivalistLaw !== "undefined") && V.FSChineseRevivalistLaw !== 0) { + V.arcologies[0].FSChineseRevivalistLaw = V.FSChineseRevivalistLaw; + delete V.FSChineseRevivalistLaw; + } else if (typeof V.arcologies[0].FSChineseRevivalistLaw === "undefined") { + V.arcologies[0].FSChineseRevivalistLaw = 0; + } + + if (typeof V.arcologies[0].FSNullLaw !== "undefined") { + delete V.arcologies[0].FSNullLaw; + } + if (typeof V.masteredXP === "undefined") { + V.masteredXP = 200; + } + + if (V.clubAdsSpending > 0 && V.club === 0) { + V.clubAdsSpending = 0; + } + if (V.brothelAdsSpending > 0 && V.brothel === 0) { + V.brothelAdsSpending = 0; + } + + if (typeof V.missingTable === "undefined") { + V.missingTable = {}; + } + if (typeof V.showMissingSlaves === "undefined") { + V.showMissingSlaves = false; + } + if (typeof V.showMissingSlavesSD === "undefined") { + V.showMissingSlavesSD = false; + } + + if (typeof V.postSexCleanUp === "undefined") { + V.postSexCleanUp = 1; + } + + if (typeof V.individualCosts !== "undefined") { + delete V.individualCosts; + } + if (typeof V.sissy !== "undefined") { + delete V.sissy; + } + if (((typeof V.DefaultBirthDestination === "undefined") || (V.DefaultBirthDestination === "") || (V.DefaultBirthDestination === "anywhere"))) { + V.DefaultBirthDestination = "individually decided fates"; + } + if (typeof V.abbreviateHormoneBalance === "undefined") { + V.abbreviateHormoneBalance = 2; + } + if (typeof V.skillIncrease !== "undefined") { + delete V.skillIncrease; + } + + if (typeof V.activeArcology !== "undefined") { + delete V.activeArcology; + } + + V.HackingSkillMultiplier = upgradeMultiplier('hacking'); + V.upgradeMultiplierArcology = upgradeMultiplier('engineering'); + V.upgradeMultiplierMedicine = upgradeMultiplier('medicine'); + V.upgradeMultiplierTrade = upgradeMultiplier('trading'); + + if (typeof V.sideBarOptions === "undefined") { + V.sideBarOptions = { + compact: 1, + Cash: 1, + Upkeep: 1, + SexSlaveCount: 1, + roomPop: 1, + Rep: 1, + GSP: 1, + Authority: 1, + Security: 1, + Crime: 1 + }; + } + if (typeof V.sideBarOptions.roomPop === "undefined") { + V.sideBarOptions.roomPop = 1; + } + if (typeof V.sideBarOptions.compact === "undefined") { + V.sideBarOptions.compact = 1; + } + + V.JobIDArray = resetJobIDArray(); + + if (V.arcologies[0].FSSubjugationist !== "unset" && !Number.isFinite(V.arcologies[0].FSSubjugationist)) { + V.arcologies[0].FSSubjugationist = 10; + r += `<br>Fixed NaN FS value for FSSubjugationist`; + } + if (V.arcologies[0].FSGenderRadicalist !== "unset" && !Number.isFinite(V.arcologies[0].FSGenderRadicalist)) { + V.arcologies[0].FSGenderRadicalist = 10; + r += `<br>Fixed NaN FS value for FSGenderRadicalist`; + } + if (V.arcologies[0].FSRestart !== "unset" && !Number.isFinite(V.arcologies[0].FSRestart)) { + V.arcologies[0].FSRestart = 10; + r += `<br>Fixed NaN FS value for FSRestart`; + } + if (V.arcologies[0].FSRepopulationFocus !== "unset" && !Number.isFinite(V.arcologies[0].FSRepopulationFocus)) { + V.arcologies[0].FSRepopulationFocus = 10; + r += `<br>Fixed NaN FS value for FSRepopulationFocus`; + } + if (V.arcologies[0].FSSupremacist !== "unset" && !Number.isFinite(V.arcologies[0].FSSupremacist)) { + V.arcologies[0].FSSupremacist = 10; + r += `<br>Fixed NaN FS value for FSSupremacist`; + } + if (V.arcologies[0].FSBodyPurist !== "unset" && !Number.isFinite(V.arcologies[0].FSBodyPurist)) { + V.arcologies[0].FSBodyPurist = 10; + r += `<br>Fixed NaN FS value for FSBodyPurist`; + } + if (V.arcologies[0].FSPaternalist !== "unset" && !Number.isFinite(V.arcologies[0].FSPaternalist)) { + V.arcologies[0].FSPaternalist = 10; + r += `<br>Fixed NaN FS value for FSPaternalist`; + } + if (V.arcologies[0].FSSlimnessEnthusiast !== "unset" && !Number.isFinite(V.arcologies[0].FSSlimnessEnthusiast)) { + V.arcologies[0].FSSlimnessEnthusiast = 10; + r += `<br>Fixed NaN FS value for FSSlimnessEnthusiast`; + } + if (V.arcologies[0].FSGenderFundamentalist !== "unset" && !Number.isFinite(V.arcologies[0].FSGenderFundamentalist)) { + V.arcologies[0].FSGenderFundamentalist = 10; + r += `<br>Fixed NaN FS value for FSGenderFundamentalist`; + } + if (V.arcologies[0].FSMaturityPreferentialist !== "unset" && !Number.isFinite(V.arcologies[0].FSMaturityPreferentialist)) { + V.arcologies[0].FSMaturityPreferentialist = 10; + r += `<br>Fixed NaN FS value for FSMaturityPreferentialist`; + } + if (V.arcologies[0].FSYouthPreferentialist !== "unset" && !Number.isFinite(V.arcologies[0].FSYouthPreferentialist)) { + V.arcologies[0].FSYouthPreferentialist = 10; + r += `<br>Fixed NaN FS value for FSYouthPreferentialist`; + } + if (V.arcologies[0].FSTransformationFetishist !== "unset" && !Number.isFinite(V.arcologies[0].FSTransformationFetishist)) { + V.arcologies[0].FSTransformationFetishist = 10; + r += `<br>Fixed NaN FS value for FSTransformationFetishist`; + } + if (V.arcologies[0].FSHedonisticDecadence !== "unset" && !Number.isFinite(V.arcologies[0].FSHedonisticDecadence)) { + V.arcologies[0].FSHedonisticDecadence = 10; + r += `<br>Fixed NaN FS value for FSHedonisticDecadence`; + } + if (V.arcologies[0].FSPhysicalIdealist !== "unset" && !Number.isFinite(V.arcologies[0].FSPhysicalIdealist)) { + V.arcologies[0].FSPhysicalIdealist = 10; + r += `<br>Fixed NaN FS value for FSPhysicalIdealist`; + } + if (V.arcologies[0].FSPastoralist !== "unset" && !Number.isFinite(V.arcologies[0].FSPastoralist)) { + V.arcologies[0].FSPastoralist = 10; + r += `<br>Fixed NaN FS value for FSPastoralist`; + } + if (V.arcologies[0].FSAssetExpansionist !== "unset" && !Number.isFinite(V.arcologies[0].FSAssetExpansionist)) { + V.arcologies[0].FSAssetExpansionist = 10; + r += `<br>Fixed NaN FS value for FSAssetExpansionist`; + } + if (V.arcologies[0].FSDegradationist !== "unset" && !Number.isFinite(V.arcologies[0].FSDegradationist)) { + V.arcologies[0].FSDegradationist = 10; + r += `<br>Fixed NaN FS value for FSDegradationist`; + } + if (V.arcologies[0].FSRomanRevivalist !== "unset" && !Number.isFinite(V.arcologies[0].FSRomanRevivalist)) { + V.arcologies[0].FSRomanRevivalist = 10; + r += `<br>Fixed NaN FS value for FSRomanRevivalist`; + } + if (V.arcologies[0].FSChattelReligionist !== "unset" && !Number.isFinite(V.arcologies[0].FSChattelReligionist)) { + V.arcologies[0].FSChattelReligionist = 10; + r += `<br>Fixed NaN FS value for FSChattelReligionist`; + } + if (V.arcologies[0].FSChineseRevivalist !== "unset" && !Number.isFinite(V.arcologies[0].FSChineseRevivalist)) { + V.arcologies[0].FSChineseRevivalist = 10; + r += `<br>Fixed NaN FS value for FSChineseRevivalist`; + } + if (V.arcologies[0].FSArabianRevivalist !== "unset" && !Number.isFinite(V.arcologies[0].FSArabianRevivalist)) { + V.arcologies[0].FSArabianRevivalist = 10; + r += `<br>Fixed NaN FS value for FSArabianRevivalist`; + } + if (V.arcologies[0].FSEdoRevivalist !== "unset" && !Number.isFinite(V.arcologies[0].FSEdoRevivalist)) { + V.arcologies[0].FSEdoRevivalist = 10; + r += `<br>Fixed NaN FS value for FSEdoRevivalist`; + } + if (V.arcologies[0].FSEgyptianRevivalist !== "unset" && !Number.isFinite(V.arcologies[0].FSEgyptianRevivalist)) { + V.arcologies[0].FSEgyptianRevivalist = 10; + r += `<br>Fixed NaN FS value for FSEgyptianRevivalist`; + } + if (V.arcologies[0].FSAztecRevivalist !== "unset" && !Number.isFinite(V.arcologies[0].FSAztecRevivalist)) { + V.arcologies[0].FSAztecRevivalist = 10; + r += `<br>Fixed NaN FS value for FSAztecRevivalist`; + } + if (V.arcologies[0].FSIntellectualDependency !== "unset" && !Number.isFinite(V.arcologies[0].FSIntellectualDependency)) { + V.arcologies[0].FSIntellectualDependency = 10; + r += `<br>Fixed NaN FS value for FSIntellectualDependency`; + } + if (V.arcologies[0].FSSlaveProfessionalism !== "unset" && !Number.isFinite(V.arcologies[0].FSSlaveProfessionalism)) { + V.arcologies[0].FSSlaveProfessionalism = 10; + r += `<br>Fixed NaN FS value for FSSlaveProfessionalism`; + } + if (V.arcologies[0].FSPetiteAdmiration !== "unset" && !Number.isFinite(V.arcologies[0].FSPetiteAdmiration)) { + V.arcologies[0].FSPetiteAdmiration = 10; + r += `<br>Fixed NaN FS value for FSPetiteAdmiration`; + } + if (V.arcologies[0].FSStatuesqueGlorification !== "unset" && !Number.isFinite(V.arcologies[0].FSStatuesqueGlorification)) { + V.arcologies[0].FSStatuesqueGlorification = 10; + r += `<br>Fixed NaN FS value for FSStatuesqueGlorification`; + } + App.Corporate.Backcompat(); + + if (V.sortSlavesBy === "income" || V.sortSlavesBy === "lastWeeksCashIncome") { + V.sortSlavesBy = "weeklyIncome"; + } + + if (typeof V.tooltipsEnabled === "undefined") { + V.tooltipsEnabled = 0; + } + + 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}); + } else { + _newOrgans.push(o); + } + }); + V.organs = _newOrgans; + + _newOrgans = []; + V.completedOrgans.forEach(o => { + if (o.type === "eyes") { + _newOrgans.push({type: "leftEye", ID: o.ID}); + _newOrgans.push({type: "rightEye", ID: o.ID}); + } else { + _newOrgans.push(o); + } + }); + V.completedOrgans = _newOrgans; + + if (typeof V.organsCompleted !== "undefined") { + delete V.organsCompleted; + } + + if ((V.PC.customTitle === "")) { + V.PC.customTitle = undefined, V.PC.customTitleLisp = undefined; + } + + if (typeof V.building === "undefined") { + if (typeof V.sectors !== "undefined") { + App.Update.sectorsToBuilding(); + } else { + V.building = App.Arcology.defaultBuilding(); + } + } + if (typeof V.slavesOriginal !== "undefined") { + delete V.slavesOriginal; + } + + r += `<<silently>>`; + r += `<<include "MOD_Edit FS Cheat Datatype Cleanup">>`; + r += `<<include "MOD_Edit Neighbor Arcology Cheat Datatype Cleanup">>`; + r += `<</silently>>`; + return r; +}; + +App.Utils.BC.globalVariables = function() { + r = `Setting missing global variables... `; + + if (typeof V.assistant === "number") { + assistant.BC(); + } else { + assistant.object(); + } + + if (typeof V.CulturalOpenness === "undefined") { + V.CulturalOpenness = 0; + } + + if (typeof V.displayAssignments === "undefined") { + V.displayAssignments = 1; + } + + if (typeof V.universalRulesImpregnation === "undefined") { + V.universalRulesImpregnation = "none"; + } + + if (typeof V.abbreviateNationality === "undefined") { + V.abbreviateNationality = 0; + } + + if (typeof V.language === "undefined") { + V.language = "English"; + } + + if (typeof V.terrain === "undefined") { + V.terrain = "rural"; + } + + if (typeof V.nicaeaAnnounceable === "undefined") { + V.nicaeaAnnounceable = 0; + } + if (typeof V.nicaeaAnnounced === "undefined") { + V.nicaeaAnnounced = 0; + } + if (typeof V.nicaeaPreparation === "undefined") { + V.nicaeaPreparation = 0; + } + if (typeof V.nicaeaInvolvement === "undefined") { + V.nicaeaInvolvement = -1; + } + if (typeof V.nicaeaPower === "undefined") { + V.nicaeaPower = 0; + } + if (typeof V.nicaeaHeld === "undefined") { + V.nicaeaHeld = 0; + } + + if (typeof V.REFeminizationCheckinIDs === "undefined") { + V.REFeminizationCheckinIDs = []; + } + if (typeof V.REMILFCheckinIDs === "undefined") { + V.REMILFCheckinIDs = []; + } + if (typeof V.REOrientationCheckinIDs === "undefined") { + V.REOrientationCheckinIDs = []; + } + if (typeof V.REUglyCheckinIDs === "undefined") { + V.REUglyCheckinIDs = []; + } + if (typeof V.REButtholeCheckinIDs === "undefined") { + V.REButtholeCheckinIDs = []; + } + if (typeof V.REFutaSisterCheckinIDs === "undefined") { + V.REFutaSisterCheckinIDs = []; + } + if (typeof V.REReductionCheckinIDs === "undefined") { + V.REReductionCheckinIDs = []; + } + if (typeof V.RERelationshipSlave !== "undefined") { + delete V.RERelationshipSlave; + } + if (typeof V.dormitory === "undefined") { + V.dormitory = 20; + } + if (typeof V.dormitoryPopulation === "undefined") { + V.dormitoryPopulation = 0; + } + if (typeof V.rooms === "undefined") { + V.rooms = 5; + } + if (typeof V.roomsPopulation === "undefined") { + V.roomsPopulation = 0; + } + + if (typeof V.universalHGImpregnateMasterSuiteToggle === "undefined") { + V.universalHGImpregnateMasterSuiteToggle = 0; + } + + FacilityDatatypeCleanup(); + + if (typeof V.fighterIDs === "undefined") { + V.fighterIDs = []; + } + if (typeof V.pitVirginities === "undefined") { + V.pitVirginities = 0; + } + if (typeof V.pitBG === "undefined") { + V.pitBG = 0; + } + if (typeof V.slaveFightingBG === "undefined") { + V.slaveFightingBG = 0; + } + if (typeof V.pitAnimal === "undefined") { + V.pitAnimal = 0; + } + if (typeof V.pitAnimalType === "undefined") { + V.pitAnimalType = 0; + } + + if (typeof V.verboseDescriptions === "undefined") { + V.verboseDescriptions = 0; + } + if (typeof V.clothesBoughtBunny === "undefined") { + V.clothesBoughtBunny = 0; + } + if (typeof V.clothesBoughtConservative === "undefined") { + V.clothesBoughtConservative = 0; + } + if (typeof V.clothesBoughtChains === "undefined") { + V.clothesBoughtChains = 0; + } + if (typeof V.clothesBoughtWestern === "undefined") { + V.clothesBoughtWestern = 0; + } + if (typeof V.clothesBoughtOil === "undefined") { + V.clothesBoughtOil = 0; + } + if (typeof V.clothesBoughtHabit === "undefined") { + V.clothesBoughtHabit = 0; + } + if (typeof V.clothesBoughtToga === "undefined") { + V.clothesBoughtToga = 0; + } + if (typeof V.clothesBoughtKimono === "undefined") { + V.clothesBoughtKimono = 0; + } + if (typeof V.clothesBoughtHarem === "undefined") { + V.clothesBoughtHarem = 0; + } + if (typeof V.clothesBoughtQipao === "undefined") { + V.clothesBoughtQipao = 0; + } + if (typeof V.clothesBoughtEgypt === "undefined") { + V.clothesBoughtEgypt = 0; + } + if (typeof V.clothesBoughtBimbo === "undefined") { + V.clothesBoughtBimbo = 0; + } + if (typeof V.clothesBoughtCourtesan === "undefined") { + V.clothesBoughtCourtesan = 0; + } + if (typeof V.shoesBoughtHeels === "undefined") { + V.shoesBoughtHeels = 0; + } + if (typeof V.clothesBoughtPetite === "undefined") { + V.clothesBoughtPetite = 0; + } + if (typeof V.clothesBoughtMilitary === "undefined") { + V.clothesBoughtMilitary = 0; + } + if (typeof V.clothesBoughtCultural === "undefined") { + V.clothesBoughtCultural = 0; + } + if (typeof V.clothesBoughtMiddleEastern === "undefined") { + V.clothesBoughtMiddleEastern = 0; + } + if (typeof V.clothesBoughtPol === "undefined") { + V.clothesBoughtPol = 0; + } + if (typeof V.clothesBoughtCostume === "undefined") { + V.clothesBoughtCostume = 0; + } + if (typeof V.clothesBoughtPantsu === "undefined") { + V.clothesBoughtPantsu = 0; + } + if (typeof V.clothesBoughtCareer === "undefined") { + V.clothesBoughtCareer = 0; + } + if (typeof V.clothesBoughtDresses === "undefined") { + V.clothesBoughtDresses = 0; + } + if (typeof V.clothesBoughtBodysuits === "undefined") { + V.clothesBoughtBodysuits = 0; + } + if (typeof V.clothesBoughtCasual === "undefined") { + V.clothesBoughtCasual = 0; + } + if (typeof V.clothesBoughtUnderwear === "undefined") { + V.clothesBoughtUnderwear = 0; + } + if (typeof V.clothesBoughtSports === "undefined") { + V.clothesBoughtSports = 0; + } + if (typeof V.clothesBoughtPony === "undefined") { + V.clothesBoughtPony = 0; + } + if (typeof V.clothesBoughtSwimwear === "undefined") { + V.clothesBoughtSwimwear = 0; + } + if (typeof V.clothesBoughtMaternityDress === "undefined") { + V.clothesBoughtMaternityDress = 0; + } + if (typeof V.clothesBoughtMaternityLingerie === "undefined") { + V.clothesBoughtMaternityLingerie = 0; + } + if (typeof V.clothesBoughtLazyClothes === "undefined") { + V.clothesBoughtLazyClothes = 0; + } + if (typeof V.buckets === "undefined") { + V.buckets = 0; + } + + if (typeof V.universalRulesRest === "undefined") { + V.universalRulesRest = 0; + } + if (typeof V.universalRulesNewSlavesRA === "undefined") { + V.universalRulesNewSlavesRA = 1; + } + + if (typeof V.hormoneUpgradeMood === "undefined") { + V.hormoneUpgradeMood = 0; + } + if (typeof V.hormoneUpgradeShrinkage === "undefined") { + V.hormoneUpgradeShrinkage = 0; + } + if (typeof V.hormoneUpgradePower === "undefined") { + V.hormoneUpgradePower = 0; + } + + if (typeof V.schoolSuggestion === "undefined") { + V.schoolSuggestion = 0; + } + + if (typeof V.prostheticsUpgrade === "undefined") { + V.prostheticsUpgrade = 0; + } + if (typeof V.dispensaryUpgrade === "undefined") { + V.dispensaryUpgrade = 0; + } + if (typeof V.growthStim === "undefined") { + V.growthStim = 0; + } + if (typeof V.pubertyLength === "undefined") { + V.pubertyLength = 5; + } + if (typeof V.maxGrowthAge === "undefined") { + V.maxGrowthAge = 24; + } + if (typeof V.ImplantProductionUpgrade === "undefined") { + V.ImplantProductionUpgrade = 0; + } + if (typeof V.geneticMappingUpgrade === "undefined") { + V.geneticMappingUpgrade = 0; + } + if (typeof V.pregnancyMonitoringUpgrade === "undefined") { + V.pregnancyMonitoringUpgrade = 0; + } + if (typeof V.permaPregImplant === "undefined") { + V.permaPregImplant = 0; + } + if (typeof V.pubertyHormones === "undefined") { + V.pubertyHormones = 0; + } + if (typeof V.dietXXY === "undefined") { + V.dietXXY = 0; + } + if (typeof V.dietCleanse === "undefined") { + V.dietCleanse = 0; + } + if (typeof V.dietFertility === "undefined") { + V.dietFertility = 0; + } + if (typeof V.cumProDiet === "undefined") { + V.cumProDiet = 0; + } + if (typeof V.aphrodisiacUpgradeRefine === "undefined") { + V.aphrodisiacUpgradeRefine = 0; + } + if (typeof V.healthyDrugsUpgrade === "undefined") { + V.healthyDrugsUpgrade = 0; + } + if (typeof V.reproductionFormula === "undefined") { + V.reproductionFormula = 0; + } + if (typeof V.superFertilityDrugs === "undefined") { + V.superFertilityDrugs = 0; + } + if (typeof V.bellyImplants === "undefined") { + V.bellyImplants = 0; + } + if (typeof V.cervixImplants === "undefined") { + V.cervixImplants = 0; + } + if (typeof V.prostateImplants === "undefined") { + V.prostateImplants = 0; + } + if (typeof V.sympatheticOvaries === "undefined") { + V.sympatheticOvaries = 0; + } + if (typeof V.fertilityImplant === "undefined") { + V.fertilityImplant = 0; + } + if (typeof V.asexualReproduction === "undefined") { + V.asexualReproduction = 0; + } + if (typeof V.shelterSlaveGeneratedWeek || V.shelterSlaveGeneratedWeek > V.week === "undefined") { + V.shelterSlaveGeneratedWeek = 0; + } + if (typeof V.goodImageCampaign === "undefined") { + V.goodImageCampaign = 0; + } + if (typeof V.sexualOpeness === "undefined") { + V.sexualOpeness = 0; + } + if (typeof V.youngerOvaries === "undefined") { + V.youngerOvaries = 0; + } + if (typeof V.animalOvaries === "undefined") { + V.animalOvaries = 0; + } + if (typeof V.animalTesticles === "undefined") { + V.animalTesticles = 0; + } + if (typeof V.animalMpreg === "undefined") { + V.animalMpreg = 0; + } + if (typeof V.cloningSystem === "undefined") { + V.cloningSystem = 0; + } + if (typeof V.geneticFlawLibrary === "undefined") { + V.geneticFlawLibrary = 0; + } + + if (typeof V.pregInventor === "undefined") { + V.pregInventor = 0; + } + if (typeof V.pregInventorID === "undefined") { + V.pregInventorID = 0; + } + if (typeof V.pregInventions === "undefined") { + V.pregInventions = 0; + } + if (typeof V.traitorWeeks === "undefined") { + V.traitorWeeks = 0; + } + if (typeof V.taitorWeeks !== "undefined") { + V.traitorWeeks = V.taitorWeeks; + delete V.taitorWeeks; + } + if (typeof V.rivalGender === "undefined") { + if ((V.rivalOwner > 0)) { + if (random(0, 99) <= V.seeDicks) { + V.rivalGender = 2; + } else { + V.rivalGender = 1; + } + } else { + V.rivalGender = 0; + } + } + if (typeof V.realRoyalties === "undefined") { + V.realRoyalties = 0; + } + + /* Job Fulfillment Center */ + if (typeof V.JFCOrder === "undefined") { + V.JFCOrder = 0; + } + if (typeof V.Role === "undefined") { + V.Role = ""; + } + + if (typeof V.trinkets === "undefined") { + V.trinkets = []; + + if (V.PC.career === "wealth") { + V.trinkets.push("a collection of diplomas from expensive schools"); + } else if (V.PC.career === "capitalist") { + V.trinkets.push("a framed low denomination piece of paper money from your native country"); + } else if (V.PC.career === "mercenary") { + V.trinkets.push("a battered old assault rifle"); + } else if (V.PC.career === "slaver") { + V.trinkets.push("a framed picture of a slave with her sale price scrawled across the bottom"); + } else if (V.PC.career === "engineer") { + V.trinkets.push("an artist's impression of an early arcology design"); + } else if (V.PC.career === "medicine") { + V.trinkets.push("a framed postsurgical x-ray"); + } else if (V.PC.career === "celebrity") { + V.trinkets.push("a framed copy of the first news story featuring yourself"); + } else if (V.PC.career === "arcology owner") { + V.trinkets.push("a miniature model of your first arcology"); + } else if (V.PC.career === "escort") { + V.trinkets.push("a copy of the first porno you starred in"); + } else if (V.PC.career === "servant") { + V.trinkets.push("a framed picture of your late Master"); + } else if (V.PC.career === "gang") { + V.trinkets.push("your favorite handgun, whose sight has instilled fear in many"); + } else if (V.PC.career === "BlackHat") { + V.trinkets.push("a news clipping of your first successful live hack"); + } + } + + if (typeof V.TSS === "undefined") { + V.TSS = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.GRI === "undefined") { + V.GRI = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.SCP === "undefined") { + V.SCP = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.LDE === "undefined") { + V.LDE = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.TGA === "undefined") { + V.TGA = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.TCR === "undefined") { + V.TCR = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.TFS === "undefined") { + V.TFS = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0, + compromiseWeek: 0, + farmUpgrade: 0 + }; + } + if (typeof V.TFS.compromiseWeek === "undefined") { + V.TFS.compromiseWeek = 0; + } + if (typeof V.HA === "undefined") { + V.HA = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + if (typeof V.NUL === "undefined") { + V.NUL = { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }; + } + + if (typeof V.birthee === "undefined") { + V.birthee = 0; + } + + if (typeof V.alwaysSubsidizeRep === "undefined") { + V.alwaysSubsidizeRep = 0; + } + if (typeof V.alwaysSubsidizeGrowth === "undefined") { + V.alwaysSubsidizeGrowth = 0; + } + if (typeof V.ProImmigrationCash === "undefined") { + V.ProImmigrationCash = 0; + } + if (typeof V.ProImmigrationRep === "undefined") { + V.ProImmigrationRep = 0; + } + if (typeof V.AntiImmigrationCash === "undefined") { + V.AntiImmigrationCash = 0; + } + if (typeof V.AntiImmigrationRep === "undefined") { + V.AntiImmigrationRep = 0; + } + if (typeof V.ProEnslavementCash === "undefined") { + V.ProEnslavementCash = 0; + } + if (typeof V.ProEnslavementRep === "undefined") { + V.ProEnslavementRep = 0; + } + if (typeof V.AntiEnslavementCash === "undefined") { + V.AntiEnslavementCash = 0; + } + if (typeof V.AntiEnslavementRep === "undefined") { + V.AntiEnslavementRep = 0; + } + if (typeof V.BasicSMR === "undefined") { + V.BasicSMR = 1; + } + if (typeof V.HealthInspectionSMR === "undefined") { + V.HealthInspectionSMR = 0; + } + if (typeof V.EducationSMR === "undefined") { + V.EducationSMR = 0; + } + if (typeof V.FrigiditySMR === "undefined") { + V.FrigiditySMR = 0; + } + if (typeof V.BasicBeautySMR === "undefined") { + V.BasicBeautySMR = 0; + } + if (typeof V.QualityBeautySMR === "undefined") { + V.QualityBeautySMR = 0; + } + if (typeof V.BasicWeightSMR === "undefined") { + V.BasicWeightSMR = 0; + } + if (typeof V.BasicIntelligenceSMR === "undefined") { + V.BasicIntelligenceSMR = 0; + } + if (typeof V.QualityIntelligenceSMR === "undefined") { + V.QualityIntelligenceSMR = 0; + } + if (typeof V.BasicHeightSMR === "undefined") { + V.BasicHeightSMR = 0; + } + if (typeof V.AdvancedHeightSMR === "undefined") { + V.AdvancedHeightSMR = 0; + } + if (typeof V.IntelligenceEugenicsSMR === "undefined") { + V.IntelligenceEugenicsSMR = 0; + } + if (typeof V.HeightEugenicsSMR === "undefined") { + V.HeightEugenicsSMR = 0; + } + if (typeof V.FaceEugenicsSMR === "undefined") { + V.FaceEugenicsSMR = 0; + } + if (typeof V.HonestySMR === "undefined") { + V.HonestySMR = 0; + } + if (typeof V.ProRefugees === "undefined") { + V.ProRefugees = 0; + } + if (typeof V.ProRecruitment === "undefined") { + V.ProRecruitment = 0; + } + if (typeof V.OralEncouragement === "undefined") { + V.OralEncouragement = 0; + } + if (typeof V.VaginalEncouragement === "undefined") { + V.VaginalEncouragement = 0; + } + if (typeof V.AnalEncouragement === "undefined") { + V.AnalEncouragement = 0; + } + if (typeof V.OralDiscouragement === "undefined") { + V.OralDiscouragement = 0; + } + if (typeof V.VaginalDiscouragement === "undefined") { + V.VaginalDiscouragement = 0; + } + if (typeof V.AnalDiscouragement === "undefined") { + V.AnalDiscouragement = 0; + } + if (typeof V.CashForRep === "undefined") { + V.CashForRep = 0; + } + if (typeof V.RepForCash === "undefined") { + V.RepForCash = 0; + } + if (typeof V.Cash4Babies === "undefined") { + V.Cash4Babies = 0; + } + if (typeof V.PAPublic === "undefined") { + V.PAPublic = 0; + } + if (typeof V.CoursingAssociation === "undefined") { + V.CoursingAssociation = 0; + } + if (typeof V.Lurcher === "undefined") { + V.Lurcher = 0; + } + if (typeof V.coursed === "undefined") { + V.coursed = 0; + } + if (typeof V.MixedMarriage === "undefined") { + V.MixedMarriage = 0; + } + + if (typeof V.expiree === "undefined") { + V.expiree = 0; + } + if (typeof V.retiree === "undefined") { + V.retiree = 0; + } + if (typeof V.retirementAge === "undefined") { + V.retirementAge = 45; + } + if (typeof V.customRetirementAge === "undefined") { + V.customRetirementAge = 45; + } + if (typeof V.customMenialRetirementAge === "undefined") { + V.customMenialRetirementAge = 65; + } + if (typeof V.retirementCum === "undefined") { + V.retirementCum = 500000; + } + if (typeof V.CustomRetirementAgePolicy === "undefined") { + V.CustomRetirementAgePolicy = 0; + } + if (typeof V.PhysicalRetirementAgePolicy === "undefined") { + V.PhysicalRetirementAgePolicy = 0; + } + if (typeof V.CumMilestoneRetirement === "undefined") { + V.CumMilestoneRetirement = 0; + } + if (typeof V.BioreactorRetirement === "undefined") { + V.BioreactorRetirement = 0; + } + if (typeof V.ArcadeRetirement === "undefined") { + V.ArcadeRetirement = 0; + } + if (typeof V.CitizenRetirement === "undefined") { + V.CitizenRetirement = 0; + } + if (typeof V.citizenRetirementMenials === "undefined") { + V.citizenRetirementMenials = 0; + } + if (typeof V.citizenRetirementTrigger === "undefined") { + V.citizenRetirementTrigger = V.CitizenRetirementTrigger || 0; + delete V.CitizenRetirementTrigger; + } + if (typeof V.FSSupLawTrigger === "undefined") { + V.FSSupLawTrigger = 0; + } + if (typeof V.FSSubLawTrigger === "undefined") { + V.FSSubLawTrigger = 0; + } + if (typeof V.FSSlaveProfLawTrigger === "undefined") { + V.FSSlaveProfLawTrigger = 0; + } + if (typeof V.manuallyRetired !== "undefined") { + delete V.manuallyRetired; + } + + if (typeof V.justiceEvents === "undefined") { + V.justiceEvents = ["indenture deal", "majority deal", "slave deal", "slave training", "virginity deal"]; + } + + if (((V.ver.startsWith("0.6") && !V.ver.startsWith("10.6")) || (V.ver.startsWith("0.7")) || (V.ver.startsWith("0.8")) || (V.ver === "0.9"))) { + if (V.seeDicks === 2) { + V.seeDicks = 100; + } else if (V.seeDicks === 1) { + V.seeDicks = 25; + } + } + V.seeDicks = Math.clamp(V.seeDicks, 0, 100); + + if (typeof V.PC.ID === "undefined") { + V.PC.ID = -1; + } + if (typeof V.PC.counter.oral === "undefined") { + V.PC.counter.oral = 0; + } + if (typeof V.PC.counter.vaginal === "undefined") { + V.PC.counter.vaginal = 0; + } + if (typeof V.PC.counter.anal === "undefined") { + V.PC.counter.anal = 0; + } + if (typeof V.PC.counter.mammary === "undefined") { + V.PC.counter.mammary = 0; + } + if (typeof V.PC.counter.penetrative === "undefined") { + V.PC.counter.penetrative = 0; + } + + if (!(V.ver.startsWith("0.10"))) { + if (V.PC.refreshment === "cigar") { + V.PC.refreshmentType = 0; + } else { + V.PC.refreshmentType = 1; + } + } + WombInit(V.PC); + + if (typeof V.pornStars === "undefined") { + V.studioFeed = 0; + V.PCSlutContacts = 1; + + /* create but don't populate (that happens later) */ + V.pornStars = {}; + } + + /* migrate to new genre-driven pornstar object */ + if (typeof V.pornStars === "number") { + let _oldPornStars = V.pornStars; + + V.pornStars = {}; + 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}; + V.pornStars.BBW = {p1count: V.pornStarBBWs, p3ID: V.pornStarBBWID}; + V.pornStars.gainer = {p1count: V.pornStarGainers, p3ID: V.pornStarGainerID}; + V.pornStars.stud = {p1count: V.pornStarStuds, p3ID: V.pornStarStudID}; + V.pornStars.loli = {p1count: V.pornStarLolis, p3ID: V.pornStarLoliID}; + V.pornStars.deepThroat = {p1count: V.pornStarDeepThroats, p3ID: V.pornStarDeepThroatID}; + V.pornStars.struggleFuck = {p1count: V.pornStarStruggleFucks, p3ID: V.pornStarStruggleFuckID}; + V.pornStars.painal = {p1count: V.pornStarPainals, p3ID: V.pornStarPainalID}; + V.pornStars.tease = {p1count: V.pornStarTeases, p3ID: V.pornStarTeaseID}; + V.pornStars.romantic = {p1count: V.pornStarRomantics, p3ID: V.pornStarRomanticID}; + V.pornStars.pervert = {p1count: V.pornStarPerverts, p3ID: V.pornStarPervertID}; + V.pornStars.caring = {p1count: V.pornStarCarings, p3ID: V.pornStarCaringID}; + V.pornStars.unflinching = {p1count: V.pornStarUnflinchings, p3ID: V.pornStarUnflinchingID}; + V.pornStars.sizeQueen = {p1count: V.pornStarSizeQueens, p3ID: V.pornStarSizeQueenID}; + V.pornStars.neglectful = {p1count: V.pornStarNeglectfuls, p3ID: V.pornStarNeglectfulID}; + V.pornStars.cumAddict = {p1count: V.pornStarCumAddicts, p3ID: V.pornStarCumAddictID}; + V.pornStars.analAddict = {p1count: V.pornStarAnalAddicts, p3ID: V.pornStarAnalAddictID}; + V.pornStars.attentionWhore = {p1count: V.pornStarAttentionWhores, p3ID: V.pornStarAttentionWhoreID}; + V.pornStars.breastGrowth = {p1count: V.pornStarBreastGrowths, p3ID: V.pornStarBreastGrowthID}; + V.pornStars.abusive = {p1count: V.pornStarAbusives, p3ID: V.pornStarAbusiveID}; + V.pornStars.malicious = {p1count: V.pornStarMalicious, p3ID: V.pornStarMaliciousID}; + V.pornStars.selfHating = {p1count: V.pornStarSelfHatings, p3ID: V.pornStarSelfHatingID}; + V.pornStars.breeder = {p1count: V.pornStarBreeders, p3ID: V.pornStarBreederID}; + V.pornStars.sub = {p1count: V.pornStarSubs, p3ID: V.pornStarSubID}; + V.pornStars.cumSlut = {p1count: V.pornStarCumSluts, p3ID: V.pornStarCumSlutID}; + V.pornStars.anal = {p1count: V.pornStarAnals, p3ID: V.pornStarAnalID}; + V.pornStars.humiliation = {p1count: V.pornStarHumiliations, p3ID: V.pornStarHumiliationID}; + V.pornStars.boobs = {p1count: V.pornStarBoobs, p3ID: V.pornStarBoobsID}; + V.pornStars.dom = {p1count: V.pornStarDoms, p3ID: V.pornStarDomID}; + V.pornStars.sadist = {p1count: V.pornStarSadists, p3ID: V.pornStarSadistID}; + V.pornStars.masochist = {p1count: V.pornStarMasochists, p3ID: V.pornStarMasochistID}; + V.pornStars.pregnancy = {p1count: V.pornStarPregnancySluts, p3ID: V.pornStarPregnancyID}; + + /* Reset all the old porn type counts */ + delete V.pornStarFuckdolls; + delete V.pornStarRapees; + delete V.pornStarPreggos; + delete V.pornStarBBWs; + delete V.pornStarGainers; + delete V.pornStarStuds; + delete V.pornStarLolis; + delete V.pornStarDeepThroats; + delete V.pornStarStruggleFucks; + delete V.pornStarPainals; + delete V.pornStarTeases; + delete V.pornStarRomantics; + delete V.pornStarPerverts; + delete V.pornStarCarings; + delete V.pornStarUnflinchings; + delete V.pornStarSizeQueens; + delete V.pornStarNeglectfuls; + delete V.pornStarCumAddicts; + delete V.pornStarAnalAddicts; + delete V.pornStarAttentionWhores; + delete V.pornStarBreastGrowths; + delete V.pornStarAbusives; + delete V.pornStarMalicious; + delete V.pornStarSelfHatings; + delete V.pornStarBreeders; + delete V.pornStarSubs; + delete V.pornStarCumSluts; + delete V.pornStarAnals; + delete V.pornStarHumiliations; + delete V.pornStarBoobs; + delete V.pornStarDoms; + delete V.pornStarSadists; + delete V.pornStarMasochists; + delete V.pornStarPregnancySluts; + + /* Reset old level 3 prestige variables */ + delete V.pornStarID; + delete V.pornStarFuckdollID; + delete V.pornStarRapeID; + delete V.pornStarPreggoID; + delete V.pornStarBBWID; + delete V.pornStarGainerID; + delete V.pornStarStudID; + delete V.pornStarLoliID; + delete V.pornStarDeepThroatID; + delete V.pornStarStruggleFuckID; + delete V.pornStarPainalID; + delete V.pornStarTeaseID; + delete V.pornStarRomanticID; + delete V.pornStarPervertID; + delete V.pornStarCaringID; + delete V.pornStarUnflinchingID; + delete V.pornStarSizeQueenID; + delete V.pornStarNeglectfulID; + delete V.pornStarCumAddictID; + delete V.pornStarAnalAddictID; + delete V.pornStarAttentionWhoreID; + delete V.pornStarBreastGrowthID; + delete V.pornStarAbusiveID; + delete V.pornStarMaliciousID; + delete V.pornStarSelfHatingID; + delete V.pornStarBreederID; + delete V.pornStarSubID; + delete V.pornStarCumSlutID; + delete V.pornStarAnalID; + delete V.pornStarHumiliationID; + delete V.pornStarBoobsID; + delete V.pornStarDomID; + delete V.pornStarSadistID; + delete V.pornStarMasochistID; + delete V.pornStarPregnancyID; + } + + /* make sure that any new genres get added correctly (and populate V.pornStars for very old games) */ + for (let genre in App.Porn.getAllGenres()) { + if (typeof V.pornStars[genre.fameVar] === "undefined") { + V.pornStars[genre.fameVar] = {p1count: 0, p3ID: 0}; + } + } + + if (V.PCSlutContacts === 0) { + V.PCSlutContacts = 1; + } + + if (typeof V.seeVectorArtHighlights === "undefined") { + V.seeVectorArtHighlights = 1; + } + if (typeof V.seeFaces === "undefined") { + V.seeFaces = 1; + } + if (typeof V.seeAvatar === "undefined") { + V.seeAvatar = 1; + } + if (typeof V.seeHeight === "undefined") { + V.seeHeight = 0; + } + + /* Economy Mod */ + if (V.economy === 0.5) { + V.economy = 200; + } else if (V.economy === 1) { + V.economy = 100; + } else if (V.economy === 1.5) { + V.economy = 67; + } + /* if (typeof V.baseDifficulty === "undefined") { + if (V.economy > 125) { + V.baseDifficulty = 1; + } else if (V.economy > 100) { + V.baseDifficulty = 2; + } else if (V.economy > 80) { + V.baseDifficulty = 3; + } else if (V.economy > 67) { + V.baseDifficulty = 4; + } else { + V.baseDifficulty = 5; + } + } + */ + if (typeof V.NPCSlaves === "undefined") { + V.NPCSlaves = V.ASlaves; + V.ASlaves += V.menials + V.fuckdolls + V.menialBioreactors; + } + if ((typeof V.ACitizenLimit !== "undefined") || typeof V.ASlaveLimit !== "undefined") { + delete V.ACitizenLimit, V.ASlaveLimit; + } + if ((typeof V.welfare !== "undefined") || (typeof V.slaveDemandU !== "undefined") || typeof V.slaveDemandT !== "undefined" || (typeof V.slaveProductivity !== "undefined") || (typeof V.enslaveChance !== "undefined") || typeof V.slaveExpiration !== "undefined") { + delete V.welfare, V.slaveDemandU, V.slaveDemandT, V.slaveProductivity, V.enslaveChance, V.slaveExpiration; + } + + /* Corporation variables added*/ + if (typeof V.vanillaShareSplit === "undefined") { + V.vanillaShareSplit = 1; + } + if (typeof V.corpCashDividend === "undefined") { + V.corpCashDividend = 0; + } + if (typeof V.corpDiv === "undefined") { + V.corpDiv = 0; + } + if (typeof V.corpExpand !== "undefined") { + delete V.corpExpand; + } + if (typeof V.corpExpandToken === "undefined") { + V.corpExpandToken = 0; + } + if (V.corpExpandToken > 1) { + V.corpExpandToken = 1; + } + if (typeof V.corpSpec === "undefined") { + V.corpSpec = 0; + } + if (typeof V.corpSpecToken === "undefined") { + V.corpSpecToken = 0; + } + if (typeof V.corpDivExtra === "undefined") { + V.corpDivExtra = 0; + } + if (typeof V.corpDivLegal === "undefined") { + V.corpDivLegal = 0; + } + if (typeof V.corpDivBreak === "undefined") { + V.corpDivBreak = 0; + } + if (typeof V.corpDivSurgery === "undefined") { + V.corpDivSurgery = 0; + } + if (typeof V.corpDivTrain === "undefined") { + V.corpDivTrain = 0; + } + if (typeof V.corpDivArcade === "undefined") { + V.corpDivArcade = 0; + } + if (typeof V.corpDivMenial === "undefined") { + V.corpDivMenial = 0; + } + if (typeof V.corpDivDairy === "undefined") { + V.corpDivDairy = 0; + } + if (typeof V.corpDivWhore === "undefined") { + V.corpDivWhore = 0; + } + if (typeof V.corpDivExtraDev === "undefined") { + V.corpDivExtraDev = 0; + } + if (typeof V.corpDivLegalDev === "undefined") { + V.corpDivLegalDev = 0; + } + if (typeof V.corpDivBreakDev === "undefined") { + V.corpDivBreakDev = 0; + } + if (typeof V.corpDivSurgeryDev === "undefined") { + V.corpDivSurgeryDev = 0; + } + if (typeof V.corpDivTrainDev === "undefined") { + V.corpDivTrainDev = 0; + } + if (typeof V.corpDivArcadeDev === "undefined") { + V.corpDivArcadeDev = 0; + } + if (typeof V.corpDivMenialDev === "undefined") { + V.corpDivMenialDev = 0; + } + if (typeof V.corpDivDairyDev === "undefined") { + V.corpDivDairyDev = 0; + } + if (typeof V.corpDivWhoreDev === "undefined") { + V.corpDivWhoreDev = 0; + } + if (typeof V.corpSpecRaces === "undefined") { + V.corpSpecRaces = []; + } + if (typeof V.corpEasy !== "undefined") { + delete V.corpEasy; + } + V.dividendTimer = V.dividendTimer || 13; + if (typeof V.corpEcon === "undefined") { + V.corpEcon = 0; + } + + /* Removing the old Corp from save*/ + if (typeof V.newCorp === "undefined") { + V.newCorp = 1; + V.corpIncorporated = 0; + cashX(Math.min(Math.trunc((V.corpValue / (V.publicShares + V.personalShares)) * V.personalShares), 1000000), "stocksTraded"); + /* Paying the player for his old corporation, so they can get the new one started with haste. It should perhaps have a message going with it*/ + V.mercenariesHelpCorp = 0; + V.corpMarket = 0; + delete V.corpPeopleEnslaved, V.slaveAssets, V.slaveAssetPrice, V.corpProfit, V.corpCash, V.corpValue, V.sharePrice, V.oldSharePrice, V.personalShares, V.publicShares, V.generalAssetPrice, V.generalAssets, V.entrapmentAssets, V.entrapmentAssetPrice, V.captureAssets, V.captureAssetPrice, V.trainingAssets, V.trainingAssetPrice, V.surgicalAssets, V.surgicalAssetPrice, V.drugAssets, V.drugAssetPrice, V.generalUpgradeBreaking, V.generalUpgradeWeight, V.generalUpgradeMuscle, V.entrapmentUpgradeDevotionOne, V.entrapmentUpgradeDevotionTwo, V.entrapmentUpgradeIntelligence, V.captureUpgradeGender, V.surgicalUpgradeGenitalia, V.captureUpgradeAge, V.captureUpgradeRace, V.trainingUpgradeAccent, V.trainingUpgradeEducation, V.trainingUpgradeSexEd, V.surgicalUpgradeCosmetics, V.surgicalUpgradeImplants, V.drugUpgradeHormones, V.drugUpgradeInjectionOne, V.drugUpgradeInjectionTwo; + 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"; + break; + } + } + } + } + + /* Slave services and goods variables*/ + if (typeof V.publicFuckdolls === "undefined") { + V.publicFuckdolls = 0; + } + if (typeof V.lowerClassSexDemand !== "undefined") { + delete V.lowerClassSexDemand; + } + if (typeof V.classSatisfied === "undefined") { + V.classSatisfied = {}; + } + if (typeof V.lowerClassSatisfied !== "undefined") { + V.classSatisfied.lowerClass = V.lowerClassSatisfied; + delete V.lowerClassSatisfied; + } + if (typeof V.middleClassSexDemand !== "undefined") { + delete V.middleClassSexDemand; + } + if (typeof V.upperClassSexDemand !== "undefined") { + delete V.upperClassSexDemand; + } + if (typeof V.topClassSexDemand !== "undefined") { + delete V.topClassSexDemand; + } + if (typeof V.sexSubsidies === "undefined") { + V.sexSubsidies = {}; + } + if (typeof V.sexSubsidiesLC !== "undefined") { + V.sexSubsidies.lowerClass = V.sexSubsidiesLC; + delete V.sexSubsidiesLC; + } + if (typeof V.sexSupplyBarriers === "undefined") { + V.sexSupplyBarriers = {}; + } + if (typeof V.sexSupplyBarriersLC !== "undefined") { + V.sexSupplyBarriers.lowerClass = V.sexSupplyBarriersLC; + delete V.sexSupplyBarriersLC; + } + if (typeof V.arcadePrice === "undefined") { + V.arcadePrice = 2; + } + if (typeof V.clubSlaveSexAmount === "undefined") { + V.clubSlaveSexAmount = 0; + } + + if (typeof V.food === "undefined") { + V.food = 50000; + } + if (typeof V.foodLastWeek === "undefined") { + V.foodLastWeek = 0; + } + if (typeof V.foodTotal === "undefined") { + V.foodTotal = 0; + } + if (typeof V.foodProduced === "undefined") { + V.foodProduced = 0; + } + if (typeof V.foodStored === "undefined") { + V.foodStored = 0; + } + if (typeof V.foodCost === "undefined") { + V.foodCost = 25; + } + if (typeof V.foodMarket === "undefined") { + V.foodMarket = 0; + } + if (typeof V.foodRate === "undefined") { + V.foodRate = { + slave: 2, + lower: 1.8, + middle: 2, + upper: 2.2, + top: 2.4 + }; + } + if (typeof V.foodConsumption === "undefined") { + V.foodConsumption = ((V.lowerClass * V.foodRate.lower) + (V.middleClass * V.foodRate.middle) + (V.upperClass * V.foodRate.upper) + (V.topClass * V.foodRate.top)); /* total amount food consumed per week */ + } + if (typeof V.revealFoodEffects === "undefined") { + V.revealFoodEffects = 0; + } + if (typeof V.rations === "undefined") { + V.rations = 0; + } + if (typeof V.slaveRate !== "undefined") { + delete V.slaveRate; + } + if (typeof V.lowerRate !== "undefined") { + delete V.lowerRate; + } + if (typeof V.middleRate !== "undefined") { + delete V.middleRate; + } + if (typeof V.upperRate !== "undefined") { + delete V.upperRate; + } + if (typeof V.topRate !== "undefined") { + delete V.topRate; + } + + if (typeof V.lastWeeksCashIncome === "undefined") { + r += `setupLastWeeksCash`; + } + if (typeof V.lastWeeksRepIncome === "undefined") { + r += `setupLastWeeksRep`; + } + + EconomyDatatypeCleanup(); + ArcologyDatatypeCleanup(); + + r += ` Done!`; + + r += `<br><br>`; + 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]; + + if (typeof _Slave !== "object") { + V.slaves.deleteAt(_bci), _bci--; + continue; + } + + App.Update.Slave(_Slave); + + V.slaves[_bci] = _Slave; + } + r += ` Done!<br>`; + return r; +}; + +App.Utils.BC.slaveRecords = function() { + 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; + } + }); + + if (V.hostage !== 0) { + App.Update.Slave(V.hostage); + App.Entity.Utils.SlaveDataSchemeCleanup(V.hostage); + SlaveDatatypeCleanup(V.hostage); + } + if (typeof V.slaveAfterRA !== "undefined") { + App.Update.Slave(V.slaveAfterRA); + App.Entity.Utils.SlaveDataSchemeCleanup(V.slaveAfterRA); + SlaveDatatypeCleanup(V.slaveAfterRA); + } + if (V.boomerangSlave !== 0) { + App.Update.Slave(V.boomerangSlave); + App.Entity.Utils.SlaveDataSchemeCleanup(V.boomerangSlave); + SlaveDatatypeCleanup(V.boomerangSlave); + } + if (V.traitor !== 0) { + App.Update.Slave(V.traitor); + App.Entity.Utils.SlaveDataSchemeCleanup(V.traitor); + SlaveDatatypeCleanup(V.traitor); + } + if (typeof V.assignmentRecords === "undefined") { + V.assignmentRecords = {}; + } + + r += ` Done!<br>`; + + 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); + /* pass second argument as true so that slaveAgeDatatypeCleanup is not run */ + }); + r += ` Done!<br> `; + } + + 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); + } else { + App.Entity.Utils.SlaveDataSchemeCleanup(_Child, true); + App.Facilities.Nursery.ChildDatatypeCleanup(_Child); + } + }); + V.cribsIndices = App.Facilities.Nursery.cribsToIndices(); + r += ` Done!<br> `; + } + return r; +}; + +App.Utils.BC.specialSlaveRecords = function() { + r = ""; + if (V.heroSlaves.length > 0) { + r += `Checking and fixing special slave records... `; + V.heroSlaves.forEach((_Slave) => { + App.Entity.Utils.SlaveDataSchemeCleanup(_Slave); + /* No SlaveDatatypeCleanup() call as hero slaves are not SlaveState objects */ + }); + r += ` Done!<br> `; + } + return r; +}; + +App.Utils.BC.genePoolRecords = function() { + r = `Updating gene pool records... `; + for (let _bci = 0; _bci < V.genePool.length; _bci++) { + let _Slave = V.genePool[_bci]; + + App.Update.Slave(_Slave); + + 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--; + } + } + } + let _dontDeleteMe = 0; + if (typeof V.slaveIndices[_Slave.ID] !== "undefined") { + /* are we still in the V.slaves array? */ + _dontDeleteMe = 1; + } + if (V.traitor !== 0) { + if (isImpregnatedBy(V.traitor, _Slave) || V.traitor.ID === _Slave.ID) { + /* did we impregnate the traitor, or are we the traitor? */ + _dontDeleteMe = 1; + } + } + if (V.boomerangSlave !== 0) { + if (isImpregnatedBy(V.boomerangSlave, _Slave) || V.boomerangSlave.ID === _Slave.ID) { + /* did we impregnate the boomerang, or are we the boomerang? */ + _dontDeleteMe = 1; + } + } + if (isImpregnatedBy(V.PC, _Slave)) { + /* did we impregnate the PC */ + _dontDeleteMe = 1; + } + 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)) { + /* have we impregnated a slave on the slaves array? */ + _dontDeleteMe = 1; + break; + } + } + } + if (_dontDeleteMe === 0) { + V.genePool.deleteAt(_bci), _bci--; + continue; + } + + if (typeof _Slave.origSkin === "undefined") { + _Slave.origSkin = _Slave.skin; + } + 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; + + 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? + } + } + + V.AgeEffectOnTrainerPricingPC = 1; + V.AgeEffectOnTrainerEffectivenessPC = 1; + V.AgeTrainingUpperBoundPC = 14; + V.AgeTrainingLowerBoundPC = 12; + V.IsInPrimePC = 3; + V.IsPastPrimePC = 5000; + + r += `<<HeroSlavesCleanup>>`; + V.heroSlaves.forEach(function(s) { if (s.pregType > 0 && Array.isArray(s.womb)) { delete s.womb; } }); + let slave = BaseSlave(); + V.baseHeroSlave = clone(slave); + r += ` Done!<br>`; + return r; +}; + +App.Utils.BC.RAassistantData = function() { + r = `Updating Rules Assistant data...`; + V.defaultRules = V.defaultRules.map(rule => App.Entity.Utils.RARuleDatatypeCleanup(rule)); + r += ` Done!<br>`; + return r; +}; + +App.Utils.BC.secExp = function() { + /* Sec Exp */ + r = ""; + App.SecExp.Check.general(); + if (V.secExpEnabled === 1) { + r = `<br><<include "SecExpBackwardCompatibility">></br>`; + } + return r; +}; + +App.Utils.BC.oldVersions = function() { + if (V.releaseID === 1021 || V.releaseID === 1020 || V.releaseID === 1019 || V.releaseID === 2022) { + V.releaseID = 1022; + } + r = ""; + if (V.releaseID < 1043) { + V.defaultRules.forEach((_rule) => { + if (_rule.condition.excludeSpecialSlaves) { + _rule.condition.specialSlaves = 0; + } else { + _rule.condition.specialSlaves = -1; + } + delete _rule.condition.excludeSpecialSlaves; + }); + } + if (V.releaseID === 1043) { + V.slaves.forEach(s => { s.skill.whoring = s.skill.whore / 2; }); + V.tanks.forEach(s => { s.skill.whoring = s.skill.whore / 2; }); + V.cribs.forEach(s => { s.skill.whoring = s.skill.whore / 2; }); + V.heroSlaves.forEach(hs => { + if (hs.hasOwnProperty("skill") && hs.skill.hasOwnProperty("whore")) { + hs.skill.whoring = hs.skill.whore; + delete hs.skill.whore; + } + }); + } + /* unify cybermod & vanilla */ + /* limbs */ + if (V.releaseID < 1045) { + if (typeof V.limbs !== "undefined") { + V.adjustProsthetics = []; + V.limbs.forEach((_l) => { + switch (_l.type) { + case "simple": + 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}); + break; + case "beauty": + 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}); + break; + case "cyber": + V.adjustProsthetics.push({id: "cyberneticL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID}); + break; + } + }); + delete V.limbs; + } + if (typeof V.limbsCompleted !== "undefined") { + V.adjustProstheticsCompleted = V.limbsCompleted; + delete V.limbsCompleted; + } + + /* lab */ + if (typeof V.researchLab === "undefined") { + V.researchLab = { + aiModule: 1, + tasks: [], + maxSpace: 0, + hired: 0, + menials: 0, + }; + } + if (typeof V.researchLab.level === "undefined") { + V.researchLab.level = 0; + if (typeof V.researchLab.built !== "undefined") { + if (V.researchLab.built === "true") { + V.researchLab.level = 1; + if (V.prostheticsUpgrade === 0) { + V.prostheticsUpgrade = 1; + } + } + delete V.researchLab.built; + } + } + if (typeof V.researchLab.speed === "undefined") { + V.researchLab.speed = ((V.researchLab.hired * 3) + V.researchLab.menials) * V.researchLab.aiModule; + } + if (typeof V.researchLab.tasks === "undefined") { + V.researchLab.tasks = []; + } + if (typeof V.researchLab.research !== "undefined") { + if (V.researchLab.research !== "none") { + let _id; + switch (V.researchLab.research) { + case "Basic prosthetics interface": + _id = "interfaceP1"; + break; + case "Advanced prosthetics interface": + _id = "interfaceP2"; + break; + case "Basic prosthetic limbs": + _id = "basicL"; + break; + case "Advanced sex limbs": + _id = "sexL"; + break; + case "Advanced beauty limbs": + _id = "beautyL"; + break; + case "Advanced combat limbs": + _id = "combatL"; + break; + case "Cybernetic limbs": + _id = "cyberneticL"; + break; + case "Ocular implants": + _id = "ocular"; + break; + case "Cochlear implants": + _id = "cochlear"; + break; + case "Electrolarynx": + _id = "electrolarynx"; + break; + } + 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; + switch (V.researchLab.manufacture) { + case "Basic prosthetics interface": + _id = "interfaceP1"; + break; + case "Advanced prosthetics interface": + _id = "interfaceP2"; + break; + case "Basic prosthetic limbs": + _id = "basicL"; + break; + case "Advanced sex limbs": + _id = "sexL"; + break; + case "Advanced beauty limbs": + _id = "beautyL"; + break; + case "Advanced combat limbs": + _id = "combatL"; + break; + case "Cybernetic limbs": + _id = "cyberneticL"; + break; + case "Ocular implants": + _id = "ocular"; + break; + case "Cochlear implants": + _id = "cochlear"; + break; + case "Electrolarynx": + _id = "electrolarynx"; + break; + } + V.researchLab.tasks.push({type: "craft", id: _id, workLeft: V.researchLab.productionTime}); + } + delete V.researchLab.manufacture; + } + if (typeof V.researchLab.productionTime !== "undefined") { + delete V.researchLab.productionTime; + } + + /* stockpile */ + if (typeof V.prosthetics === "undefined") { + if (typeof V.stockpile === "undefined") { + V.prosthetics = {}; + setup.prostheticIDs.forEach(function(id) { + V.prosthetics[id] = {amount: 0, research: 0}; + }); + } else { + if (typeof V.stockpile.cochlearImplant === "undefined") { + V.stockpile.cochlearImplant = 0; + } + if (typeof V.stockpile.electrolarynx === "undefined") { + V.stockpile.electrolarynx = 0; + } + if (typeof V.stockpile.interfacePTail === "undefined") { + V.stockpile.interfacePTail = 0; + } + if (typeof V.stockpile.modPTail === "undefined") { + V.stockpile.modPTail = 0; + } + if (typeof V.stockpile.warPTail === "undefined") { + V.stockpile.warPTail = 0; + } + if (typeof V.stockpile.sexPTail === "undefined") { + V.stockpile.sexPTail = 0; + } + V.prosthetics = { + interfaceP1: {amount: V.stockpile.basicPLimbInterface, research: V.researchLab.basicPLimbInterface}, + interfaceP2: {amount: V.stockpile.advPLimbInterface, research: V.researchLab.advPLimbInterface}, + basicL: {amount: V.stockpile.basicPLimb, research: V.researchLab.basicPLimb}, + sexL: {amount: V.stockpile.advSexPLimb, research: V.researchLab.advSexPLimb}, + beautyL: {amount: V.stockpile.advGracePLimb, research: V.researchLab.advGracePLimb}, + combatL: {amount: V.stockpile.advCombatPLimb, research: V.researchLab.advCombatPLimb}, + cyberneticL: {amount: V.stockpile.cyberneticPLimb, research: V.researchLab.cyberneticPLimb}, + ocular: {amount: V.stockpile.ocularImplant, research: V.researchLab.ocularImplant}, + cochlear: {amount: V.stockpile.cochlearImplant, research: V.researchLab.cochlearImplant}, + electrolarynx: {amount: V.stockpile.electrolarynx, research: V.researchLab.electrolarynx}, + interfaceTail: {amount: V.stockpile.interfacePTail, research: 0}, + modT: {amount: V.stockpile.modPTail, research: 0}, + combatT: {amount: V.stockpile.warPTail, research: 0}, + sexT: {amount: V.stockpile.sexPTail, research: 0}, + erectile: {amount: V.stockpile.erectileImplant, research: V.researchLab.erectileImplant} + }; + delete V.stockpile; + delete V.researchLab.basicPLimbInterface; + delete V.researchLab.advPLimbInterface; + delete V.researchLab.basicPLimb; + delete V.researchLab.advSexPLimb; + delete V.researchLab.advGracePLimb; + delete V.researchLab.advCombatPLimb; + delete V.researchLab.cyberneticPLimb; + delete V.researchLab.ocularImplant; + delete V.researchLab.cochlearImplant; + delete V.researchLab.electrolarynx; + delete V.researchLab.erectileImplant; + } + } + if (typeof V.cyberMod !== "undefined") { + delete V.cyberMod; + } + /* unify cybermod & vanilla finished*/ + + if (typeof V.buyArcologyDirection !== "undefined") { + delete V.buyArcologyDirection; + } + if (typeof V.sellArcologyDirection !== "undefined") { + delete V.sellArcologyDirection; + } + if (typeof V.transaction !== "undefined") { + delete V.transaction; + } + + delete V.SlaveSummaryFiler; + } + if (V.releaseID < 1047) { + if (V.loliGrow > 0) { + V.loliGrow = 1; + } else { + V.loliGrow = 0; + } + } + if (V.releaseID < 1055) { + if (V.disableLisping === 0) { + V.disableLisping = 1; + } else { + V.disableLisping = 0; + } + } + + if (V.releaseID < 1057) { + if (typeof V.PC.actualAge === "undefined") { + if (V.PC.age === 1) { + V.PC.actualAge = 20; + } else if (V.PC.age === 3) { + V.PC.actualAge = 50; + } else { + V.PC.actualAge = 35; + } + } + if (typeof V.PC.markings === "undefined") { + V.PC.markings = "none"; + } + if (typeof V.PC.pronoun === "undefined") { + generatePlayerPronouns(V.PC); + } + if (typeof V.PC.pregKnown === "undefined") { + if (V.PC.preg > 0) { + V.PC.pregKnown = 1; + } else { + V.PC.pregKnown = 0; + } + } + if (typeof V.PC.pregWeek === "undefined") { + if (V.PC.preg > 0) { + V.PC.pregWeek = V.PC.preg; + } else { + V.PC.pregWeek = 0; + } + } + if (typeof V.PC.pregType === "undefined") { + if (V.PC.preg > 0) { + V.PC.pregType = 1; + } else { + V.PC.pregType = 0; + } + } + if (typeof V.PC.belly === "undefined") { + if (V.PC.preg > 0) { + V.PC.belly = getPregBellySize(V.PC); + } else { + V.PC.belly = 0; + } + } + if (typeof V.PC.skin === "undefined") { + V.PC.skin = "light"; + } + if (typeof V.PC.origSkin === "undefined") { + V.PC.origSkin = V.PC.skin; + } + if (typeof V.PC.eyeColor === "undefined") { + V.PC.eyeColor = "blue"; + } + if (typeof V.PC.origEye === "undefined") { + V.PC.origEye = V.PC.eyeColor; + } + if (typeof V.PC.pupil === "undefined") { + if (V.PC.eyeColor === "catlike") { + V.PC.pupil = "catlike"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "serpent-like") { + V.PC.pupil = "serpent-like"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "devilish") { + V.PC.pupil = "devilish"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "demonic") { + V.PC.pupil = "demonic"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "hypnotic") { + V.PC.pupil = "hypnotic"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "heart-shaped") { + V.PC.pupil = "heart-shaped"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "wide-eyed") { + V.PC.pupil = "wide-eyed"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "almond-shaped") { + V.PC.pupil = "almond-shaped"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "bright") { + V.PC.pupil = "bright"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "teary") { + V.PC.pupil = "teary"; + V.PC.eyeColor = "blue"; + } else if (V.PC.eyeColor === "vacant") { + V.PC.pupil = "vacant"; + V.PC.eyeColor = "blue"; + } else { + V.PC.pupil = "circular"; + } + } + if (typeof V.PC.sclerae === "undefined") { + V.PC.sclerae = "white"; + } + if (typeof V.PC.race === "undefined") { + V.PC.race = "white"; + } + if (typeof V.PC.origRace === "undefined") { + V.PC.origRace = V.PC.race; + } + if (typeof V.PC.hColor === "undefined") { + V.PC.hColor = "blonde"; + } + if (typeof V.PC.origHColor === "undefined") { + V.PC.origHColor = V.PC.hColor; + } + if (typeof V.PC.nationality === "undefined") { + V.PC.nationality = "Stateless"; + } + if (V.PC.boobsBonus === -0.5) { + V.PC.boobsBonus = -1; + } + if (typeof V.PC.sclerae === "undefined") { + V.PC.sclerae = "white"; + } + if (typeof V.PC.fetish === "undefined") { + V.PC.fetish = "none"; + } + if (typeof V.PC.behavioralFlaw === "undefined") { + V.PC.behavioralFlaw = "none"; + } + if (typeof V.PC.behavioralQuirk === "undefined") { + V.PC.behavioralQuirk = "none"; + } + if (typeof V.PC.sexualFlaw === "undefined") { + V.PC.sexualFlaw = "none"; + } + if (typeof V.PC.sexualQuirk === "undefined") { + V.PC.sexualQuirk = "none"; + } + if (typeof V.PC.pubicHStyle === "undefined") { + V.PC.pubicHStyle = "hairless"; + } + if (typeof V.PC.underArmHStyle === "undefined") { + V.PC.underArmHStyle = "hairless"; + } + if (typeof V.PC.eggType === "undefined") { + V.PC.eggType = "human"; + } + if (typeof V.PC.ballType === "undefined") { + V.PC.ballType = "human"; + } + if (typeof V.PC.geneticQuirks === "undefined") { + V.PC.geneticQuirks = { + macromastia: 0, + gigantomastia: 0, + fertility: 0, + hyperFertility: 0, + superfetation: 0, + gigantism: 0, + dwarfism: 0, + pFace: 0, + uFace: 0, + albinism: 0, + heterochromia: 0, + rearLipedema: 0, + wellHung: 1, + wGain: 0, + wLoss: 0, + mGain: 0, + mLoss: 0, + androgyny: 0, + girlsOnly: 0 + }; + if (V.PC.birthMaster > 0) { + V.PC.geneticQuirks.fertility = 2; + } else if (V.PC.career === "servant") { + V.PC.geneticQuirks.fertility = 1; + } + } else { + if (typeof V.PC.geneticQuirks.heterochromia === "undefined") { + V.PC.geneticQuirks.heterochromia = 0; + } + if (typeof V.PC.geneticQuirks.girlsOnly === "undefined") { + V.PC.geneticQuirks.girlsOnly = 0; + } + if (typeof V.PC.geneticQuirks.mGain === "undefined") { + V.PC.geneticQuirks.mGain = 0; + } + if (typeof V.PC.geneticQuirks.mLoss === "undefined") { + V.PC.geneticQuirks.mLoss = 0; + } + } + if (V.releaseID < 1032) { + if (V.PC.pregSource === -1) { + V.PC.pregSource = -6; + } else if (V.PC.pregSource === -2) { + V.PC.pregSource = -5; + } else if (V.PC.pregSource === -6) { + V.PC.pregSource = -1; + } else if (V.PC.pregSource === -5) { + V.PC.pregSource = -2; + } + } + if (typeof V.PC.genes === "undefined") { + if (V.PC.title === 1) { + V.PC.genes = "XY"; + } else { + V.PC.genes = "XX"; + } + } + + /* player object converter */ + 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; + } 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; + /* 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; + 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; + if (V.PC.dick === 1) { + _newPC.dick = 4; + _newPC.prostate = 1; + if (V.PC.ballsImplant === 4 || V.PC.balls === 4) { + _newPC.balls = 30; + _newPC.scrotum = 7; + } else if (V.PC.ballsImplant === 3 || V.PC.balls === 3) { + _newPC.balls = 14; + _newPC.scrotum = 6; + } else if (V.PC.ballsImplant === 2 || V.PC.balls === 2) { + _newPC.balls = 9; + _newPC.scrotum = 5; + } else if (V.PC.ballsImplant === 1 || V.PC.balls === 1) { + _newPC.balls = 5; + _newPC.scrotum = 4; + } else { + _newPC.balls = 3; + _newPC.scrotum = 3; + } + if (V.PC.ballsImplant > 0) { + _newPC.ballsImplant = _newPC.balls - 3; + } + } else { + _newPC.dick = 0; + _newPC.prostate = 0; + _newPC.balls = 0; + _newPC.scrotum = 0; + } + _newPC.newVag = V.PC.newVag; + if (V.PC.vagina === 1) { + _newPC.ovaries = 1; + _newPC.vaginaLube = 1; + if (V.PC.newVag === 1) { + _newPC.vagina = 1; + } else if (V.PC.career === "escort" || V.PC.birthsTotal >= 10 || V.PC.career === "servant") { + _newPC.vagina = 4; + } else if (V.PC.birthsTotal > 2) { + _newPC.vagina = 3; + } else if (V.PC.career === "gang" || V.PC.career === "celebrity" || V.PC.career === "wealth" || V.PC.birthsTotal > 0) { + _newPC.vagina = 2; + } else { + _newPC.vagina = 1; + } + } + if (V.PC.boobs === 1) { + if (V.PC.boobsBonus === -3) { + _newPC.boobs = 400; + } else if (V.PC.boobsBonus === -2) { + _newPC.boobs = 500; + } else if (V.PC.boobsBonus === -1) { + _newPC.boobs = 700; + } else if (V.PC.boobsBonus === 1) { + _newPC.boobs = 1100; + } else if (V.PC.boobsBonus === 2) { + _newPC.boobs = 1300; + } else if (V.PC.boobsBonus === 3) { + _newPC.boobs = 1500; + } else { + _newPC.boobs = 900; + } + } else if (V.PC.genes === "XX") { + _newPC.boobs = 200; + } else { + _newPC.boobs = 100; + } + if (V.PC.boobsImplant === 1) { + _newPC.boobsImplant = _newPC.boobs - 900; + } + _newPC.lactation = V.PC.lactation; + _newPC.lactationDuration = V.PC.lactationDuration; + _newPC.genes = V.PC.genes; + if (V.PC.butt === 3) { + _newPC.butt = 5; + } else if (V.PC.butt === 2) { + _newPC.butt = 4; + } else if (V.PC.butt === 1) { + _newPC.butt = 3; + } else { + _newPC.butt = 2; + } + if (V.PC.buttImplant === 1) { + _newPC.buttImplant = _newPC.butt - 2; + } + _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; + } else if (V.PC.title === 1) { + _newPC.muscles = 50; + } else { + _newPC.muscles = 30; + } + if (V.PC.title === 0) { + _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; + } else if (V.PC.career === "servant") { + _newPC.clothes = "a nice maid outfit"; + _newPC.intelligenceImplant = 0; + } + if (typeof V.PCWounded !== "undefined") { + _newPC.majorInjury = V.PCWounded; + delete V.PCWounded; + } + if (typeof V.girls !== "undefined") { + if (V.girls === 1) { + _newPC.rules.living = "spare"; + } else if (V.girls === 2) { + _newPC.rules.living = "normal"; + } else { + _newPC.rules.living = "luxurious"; + } + delete V.girls; + } + if (typeof V.playerGetsMilked !== "undefined") { + if (V.playerGetsMilked === 2) { + V.PC.rules.lactation = "sell"; + } else if (V.playerGetsMilked === 1) { + V.PC.rules.lactation = "maintain"; + } + delete V.playerGetsMilked; + } + + WombInit(_newPC); + + V.PC = clone(_newPC); + r += `Standardizing player object... Done!<br> `; + } + if (V.releaseID < 1057) { + if (typeof V.PC.name === "undefined") { + if (typeof V.PCName !== "undefined") { + V.PC.name = V.PCName; + delete V.PCName; + } + } + if (typeof V.PC.surname === "undefined") { + V.PC.surname = 0; + } + if (typeof V.PC.faceShape === "undefined") { + V.PC.faceShape = "normal"; + } + } + return r; +}; + +App.Utils.BC.cleanUp = function() { + /* leave this at the bottom of BC */ + if (V.releaseID < App.Version.release) { + V.releaseID = App.Version.release; + } + /* reset NaNArray after BC is run */ + V.NaNArray = findNaN(); +}; +