diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 4d9bbdc92cafe3ccb95d4cdc497846484b117c5e..de0245286c5490640913c59fe7e816daff732078 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -4,31 +4,6 @@ App.Update.globalVariables = function() { V.nationalities = weightedArray2HashMap(V.nationalities); } - // Facilities - { - if (typeof V.spaSpots === "undefined") { - V.spaSpots = 0; - } - if (typeof V.killChoice === "undefined") { - V.killChoice = -1; - } - if (typeof V.schoolroomRemodelBimbo === "undefined") { - V.schoolroomRemodelBimbo = 0; - } - if (V.clubAdsSpending > 0 && V.club === 0) { - V.clubAdsSpending = 0; - } - if (V.brothelAdsSpending > 0 && V.brothel === 0) { - V.brothelAdsSpending = 0; - } - if (typeof V.milkPipeline === "undefined") { - V.milkPipeline = 0; - } - if (typeof V.cumPipeline === "undefined") { - V.cumPipeline = 0; - } - } - // Slave mods/surgery { if (typeof V.brandTarget === "string") { @@ -44,32 +19,17 @@ App.Update.globalVariables = function() { if (typeof V.brandDesign.official === "undefined") { V.brandDesign.official = "your personal symbol"; } - if (typeof V.scarTarget === "undefined") { + if (jQuery.isEmptyObject(V.scarTarget)) { V.scarTarget = {primary: "left cheek", secondary: "left cheek", local: "left cheek"}; } - if (typeof V.scarDesign === "undefined") { + if (jQuery.isEmptyObject(V.scarDesign)) { V.scarDesign = {primary: "generic", local: "generic"}; } - if (typeof V.meshImplants === "undefined") { - V.meshImplants = 0; - } - } - - // Marriage plans - { - if (typeof V.marrying !== "object") { - V.marrying = []; - } - if ((typeof V.weddingPlanned === "undefined") || (V.marrying.length < 1)) { - V.weddingPlanned = 0; - } } // Reminders { - if (typeof V.reminders === "undefined") { - V.reminders = []; - } else if (!Array.isArray(V.reminders)) { + if (!Array.isArray(V.reminders)) { let r = V.reminders; V.reminders = []; for (let i = 0; i < r.entries.length; i++) { @@ -84,106 +44,8 @@ App.Update.globalVariables = function() { } } - // Agents - { - if (typeof V.bodyguardTrains === "undefined") { - V.bodyguardTrains = 1; - } - if (typeof V.recruiterIOUs === "undefined") { - V.recruiterIOUs = 0; - } - if (typeof V.HGSeverity === "undefined") { - V.HGSeverity = 0; - } - if (typeof V.BodyguardHasSucessfullyRecivedSignal === "undefined") { - V.BodyguardHasSucessfullyRecivedSignal = 0; - } - } - // Display { - 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.seeMainFetishes === "undefined") { - V.seeMainFetishes = 0; - } - if (typeof V.tabChoice === "undefined") { - V.tabChoice = {Main: "all"}; - } - if (typeof V.newDescriptions === "undefined") { - V.newDescriptions = 0; - } - if (typeof V.useSummaryCache === "undefined") { - V.useSummaryCache = true; - } - if (typeof V.showEconomicDetails === "undefined") { - V.showEconomicDetails = 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.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.surnameOrder === "undefined") { - V.surnameOrder = 0; - } - 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.missingTable === "undefined") { - V.missingTable = {}; - } - if (typeof V.showMissingSlaves === "undefined") { - V.showMissingSlaves = false; - } - if (typeof V.showMissingSlavesSD === "undefined") { - V.showMissingSlavesSD = false; - } - if (typeof V.abbreviateHormoneBalance === "undefined") { - V.abbreviateHormoneBalance = 2; - } - 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; } @@ -193,591 +55,19 @@ App.Update.globalVariables = function() { if (V.sortSlavesBy === "income" || V.sortSlavesBy === "lastWeeksCashIncome") { V.sortSlavesBy = "weeklyIncome"; } - if (typeof V.tooltipsEnabled === "undefined") { - V.tooltipsEnabled = 0; - } - if (typeof V.seeBuilding === "undefined") { - V.seeBuilding = V.seeArcology; - } - if (typeof V.displayAssignments === "undefined") { - V.displayAssignments = 1; - } - if (typeof V.abbreviateNationality === "undefined") { - V.abbreviateNationality = 0; - } - // Art - { - if (typeof V.seeImages === "undefined") { - V.seeImages = 0; - } - if (typeof V.imageChoice === "undefined") { - V.imageChoice = 0; - } - if (typeof V.seeSummaryImages === "undefined") { - V.seeSummaryImages = 1; - } - if (typeof V.seeReportImages === "undefined") { - V.seeReportImages = 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; - } - } } - // Content / Policies - { - // See content - { - 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.seeBestiality === "undefined") { - V.seeBestiality = 0; - } - if (typeof V.seePee === "undefined") { - V.seePee = 1; - } - if (typeof V.menstruation === "undefined") { - V.menstruation = 0; // TODO: possibly unused - } - if (typeof V.seeIncest === "undefined") { - V.seeIncest = 1; - } - if (typeof V.seeHyperPreg === "undefined") { - V.seeHyperPreg = 0; - } - if (typeof V.seePreg === "undefined") { - V.seePreg = 1; - } - if (typeof V.seeDicksAffectsPregnancy === "undefined") { - V.seeDicksAffectsPregnancy = 1; - } - } - if (typeof V.surnamesForbidden === "undefined") { - V.surnamesForbidden = 0; - } - if (typeof V.FSNamePref === "undefined") { - V.FSNamePref = 0; - } - if (typeof V.ageMode === "undefined") { - V.ageMode = 0; - } - if (typeof V.inbreeding === "undefined") { - V.inbreeding = 1; - } - if (typeof V.bodyswapAnnounced === "undefined") { - V.bodyswapAnnounced = 0; - } - if (typeof V.adamPrinciple === "undefined") { - V.adamPrinciple = 0; - } - if (typeof V.dangerousPregnancy === "undefined") { - V.dangerousPregnancy = 1; - } - if (typeof V.makeDicks === "undefined") { - V.makeDicks = 0; - } - if (typeof V.pedo_mode === "undefined") { - // eslint-disable-next-line camelcase - V.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 V.AgePenalty === "undefined") { - V.AgePenalty = 1; - } - if (typeof V.targetAge === "undefined") { - V.targetAge = V.minimumSlaveAge; - } - if (typeof V.disableLisping === "undefined") { - V.disableLisping = 0; - } - if (typeof V.postSexCleanUp === "undefined") { - V.postSexCleanUp = 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; - } - // Universal Rules - { - if (typeof V.universalRulesBirthing === "undefined") { - V.universalRulesBirthing = 0; - } - if (typeof V.universalRulesImmobileSlavesMaintainMuscles === "undefined") { - V.universalRulesImmobileSlavesMaintainMuscles = 0; - } - if (typeof V.universalRulesChildrenBecomeBreeders === "undefined") { - V.universalRulesChildrenBecomeBreeders = 0; - } - if (typeof V.universalHGImpregnateMasterSuiteToggle === "undefined") { - V.universalHGImpregnateMasterSuiteToggle = 0; - } - if (typeof V.universalRulesRest === "undefined") { - V.universalRulesRest = 0; - } - if (typeof V.universalRulesNewSlavesRA === "undefined") { - V.universalRulesNewSlavesRA = 1; - } - if (typeof V.universalRulesImpregnation === "undefined") { - V.universalRulesImpregnation = "none"; - } - } - - // Outside of lore - { - if (typeof V.extremeUnderage === "undefined") { - V.extremeUnderage = 0; // TODO: Possibly unused - } - if (typeof V.loliGrow === "undefined") { - V.loliGrow = 0; - } - if (typeof V.precociousPuberty === "undefined") { - V.precociousPuberty = 0; - } - if (typeof V.pubertyLength === "undefined") { - V.pubertyLength = 5; - } - if (typeof V.maxGrowthAge === "undefined") { - V.maxGrowthAge = 24; - } - } - - // Policies - { - if (typeof V.goodImageCampaign === "undefined") { - V.goodImageCampaign = 0; - } - if (typeof V.sexualOpeness === "undefined") { - V.sexualOpeness = 0; - } - if (typeof V.CulturalOpenness === "undefined") { - V.CulturalOpenness = 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.BasicTallSMR !== "undefined") { - V.BasicHeightSMR = 1; - } - if (typeof V.BasicShortSMR !== "undefined") { - V.BasicHeightSMR = -1; - } - 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.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.FSSupLawTrigger === "undefined") { - V.FSSupLawTrigger = 0; - } - if (typeof V.FSSubLawTrigger === "undefined") { - V.FSSubLawTrigger = 0; - } - if (typeof V.FSSlaveProfLawTrigger === "undefined") { - V.FSSlaveProfLawTrigger = 0; - } - } - } - - // Slave Generation - { - 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.fixedNationality === "undefined") { - V.fixedNationality = 0; - } - if (typeof V.fixedRace === "undefined") { - V.fixedRace = 0; - } - if (typeof slaveOneTimeMinAge === "undefined") { - V.slaveOneTimeMinAge = 0; - } - if (typeof slaveOneTimeMaxAge === "undefined") { - V.slaveOneTimeMaxAge = 999; - } - if (typeof V.oneTimeDisableDisability === "undefined") { - V.oneTimeDisableDisability = 0; - } - } - - // Event - { - if (typeof V.burstee === "undefined") { - V.burstee = 0; - } - if (typeof V.slaveDeath === "undefined") { - V.slaveDeath = 0; - } - if (typeof V.legendaryWombID === "undefined") { - V.legendaryWombID = 0; - } - if (typeof V.traitorType === "undefined") { - V.traitorType = "standard"; - } - 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.schoolSuggestion === "undefined") { - V.schoolSuggestion = 0; - } - // Nicea - { - 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.shelterSlaveGeneratedWeek || V.shelterSlaveGeneratedWeek > V.week === "undefined") { - V.shelterSlaveGeneratedWeek = 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; - } - 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; - } - if (typeof V.birthee === "undefined") { - V.birthee = 0; - } - if (typeof V.expiree === "undefined") { - V.expiree = 0; - } - if (typeof V.retiree === "undefined") { - V.retiree = 0; - } - if (typeof V.justiceEvents === "undefined") { - V.justiceEvents = ["indenture deal", "majority deal", "slave deal", "slave training", "virginity deal"]; - } - } - - // FCTV - { - 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.randShow === "undefined") { - V.randShow = 0; - } - } - - // Mercenaries - { - if (typeof V.RaidingMercenaries === "undefined") { - V.RaidingMercenaries = 0; - } - if (typeof V.raided === "undefined") { - V.raided = 0; - } - if (typeof V.MercenariesMessageSent === "undefined") { - V.MercenariesMessageSent = 0; - } - if (typeof V.SpecialForcesMessageSent === "undefined") { - V.SpecialForcesMessageSent = 0; - } - } - - // Peacekeepers - { - if (typeof V.peacekeepers === "undefined") { - V.peacekeepers = 0; - } + if (typeof V.taitorWeeks !== "undefined") { + V.traitorWeeks = V.taitorWeeks; } // Orphanages - { - 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.breederOrphanageTotal === "undefined") { - V.breederOrphanageTotal = 0; - } - if ((typeof V.DefaultBirthDestination === "undefined") || (V.DefaultBirthDestination === "") || (V.DefaultBirthDestination === "anywhere")) { - V.DefaultBirthDestination = "individually decided fates"; - } + if ((typeof V.DefaultBirthDestination === "undefined") || (V.DefaultBirthDestination === "") || (V.DefaultBirthDestination === "anywhere")) { + V.DefaultBirthDestination = "individually decided fates"; } - // Organs - { - if (typeof V.completedOrgans === "undefined") { - V.completedOrgans = []; - } - } - - // Rent { - if (typeof V.rent === "undefined") { - V.rent = {}; - } - if (typeof V.rentDefaults === "undefined") { - V.rentDefaults = {}; - } if (typeof V.LCRent !== "undefined") { V.rent.lowerClass = V.LCRent; } @@ -799,27 +89,6 @@ App.Update.globalVariables = function() { V.enduringDevotion = Number(V.enduringDevotion) || 0; V.averageTrust = Number(V.averageTrust) || 0; V.averageDevotion = Number(V.averageDevotion) || 0; - if (typeof V.raped === "undefined") { - V.raped = -1; - } - if (typeof V.originOveride === "undefined") { - V.originOveride = 0; - } - if (typeof V.playerAging === "undefined") { - V.playerAging = 2; - } - if (typeof V.playerSurgery === "undefined") { - V.playerSurgery = 0; - } - if (typeof V.retainCareer === "undefined") { - V.retainCareer = 1; - } - if (typeof V.freshPC === "undefined") { - V.freshPC = 0; - } - 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}]; @@ -834,166 +103,22 @@ App.Update.globalVariables = function() { // Looks at all wombs, including PC. BCReserveInit(); - // Misc - if (typeof V.masteredXP === "undefined") { - V.masteredXP = 200; - } - - // Slaves - { - V.JobIDArray = resetJobIDArray(); - if (typeof V.inflatedSlavesMilk === "undefined") { - V.inflatedSlavesMilk = 0; - } - if (typeof V.inflatedSlavesCum === "undefined") { - V.inflatedSlavesCum = 0; - } - } - // Menials { - if (typeof V.AMenials !== "undefined") { - V.ASlaves += Math.trunc(V.AMenials / 2); - } - if (typeof V.helots !== "undefined") { - V.menials = V.helots; - } - if (typeof V.TradeShowHelots !== "undefined") { - V.TradeShowMenials = V.TradeShowHelots; - } - } - - // Items/upgrades purchased - { - // Wardrobe - { - 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.enema === "undefined") { - V.enema = 0; - } - if (typeof V.medicalEnema === "undefined") { - V.medicalEnema = 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.AMenials !== "undefined") { + V.ASlaves += Math.trunc(V.AMenials / 2); + } + if (typeof V.helots !== "undefined") { + V.menials = V.helots; + } + if (typeof V.TradeShowHelots !== "undefined") { + V.TradeShowMenials = V.TradeShowHelots; } - if (typeof V.merchantFSWares === "undefined") { - V.merchantFSWares = ["AssetExpansionistResearch", "GenderRadicalistResearch", "HedonisticDecadenceResearch", "SlaveProfessionalismResearch", "SlimnessEnthusiastResearch", "TransformationFetishistResearch", "YouthPreferentialistResearch"]; - } else if (V.merchantFSWares.length === 0) { + } + + // Items/upgrades purchased + { + if (V.merchantFSWares.length === 0) { V.merchantFSWares.push("AssetExpansionistResearch"); V.merchantFSWares.push("GenderRadicalistResearch"); V.merchantFSWares.push("HedonisticDecadenceResearch"); @@ -1002,9 +127,7 @@ App.Update.globalVariables = function() { 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) { + if (V.merchantIllegalWares.length === 0) { V.merchantIllegalWares.push("childhoodFertilityInducedNCS"); V.merchantIllegalWares.push("UterineRestraintMesh"); V.merchantIllegalWares.push("RapidCellGrowthFormula"); @@ -1016,332 +139,45 @@ App.Update.globalVariables = function() { V.arcologies[0].childhoodFertilityInducedNCSResearch = 0; } 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; - } } // Shopping for slaves - { - if (typeof V.specialSlavesPriceOverride === "undefined") { - V.specialSlavesPriceOverride = 0; - } - if (typeof V.huskSlaveOrdered === "undefined") { - V.huskSlaveOrdered = 0; - } - if (typeof V.huskSlave === "undefined") { - V.huskSlave = new App.Entity.CustomSlaveOrder(); - } - 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); - } - - App.Update.CustomSlaveOrder(V.huskSlave); - App.Update.CustomSlaveOrder(V.customSlave); - } - - // Elite - { - 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.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; - } - } - - // Families/relationships - { - 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.mom === "undefined") { - V.mom = 0; - } - if (typeof V.allowFamilyTitles === "undefined") { - V.allowFamilyTitles = 0; - } - } - - // Genepool - { - if (typeof V.genePool === "undefined") { - V.genePool = []; - } + if (jQuery.isEmptyObject(V.huskSlave)) { + V.huskSlave = new App.Entity.CustomSlaveOrder(); } - - // Incubator - { - 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 = []; - } + if (V.prisonCircuit.length === 0) { + V.prisonCircuit = ["low tier criminals", "gangs and smugglers", "white collar", "military prison"]; + V.prisonCircuitIndex = random(0, V.prisonCircuit.length - 1); } - // 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; - } - } + App.Update.CustomSlaveOrder(V.huskSlave); + App.Update.CustomSlaveOrder(V.customSlave); // 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.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 = {}; - } - const animalsBought = ["canines", "hooved", "felines", "labradorRetrievers", "germanShepherds", "goldenRetrievers", "frenchBulldogs", "bulldogs", "beagles", "poodles", "rottweilers", "yorkshireTerriers", "siberianHuskies", "horses", "bulls", "pigs", "siameses", "persians", "maineCoons", "ragdolls", "bengals", "abbysinians", "birmans", "orientalShorthairs", "sphynxes", "russianBlues", "wolves", "foxes", "jackals", "dingos", "zebras", "cougars", "jaguars", "pumas", "lynx", "leopards", "lions", "tigers"]; - animalsBought.forEach(function(species) { V.animalsBought[species] = V.animalsBought[species] || 0; }); - if (typeof V.canines === "undefined") { - V.canines = []; - } - if (typeof V.hooved === "undefined") { - V.hooved = []; - } - if (typeof V.felines === "undefined") { - V.felines = []; - } - if (typeof V.activeCanine === "undefined") { - V.activeCanine = 0; - } - if (typeof V.activeHooved === "undefined") { - V.activeHooved = 0; - } - if (typeof V.activeFeline === "undefined") { - V.activeFeline = 0; - } - } + const animalsBought = ["canines", "hooved", "felines", "labradorRetrievers", "germanShepherds", "goldenRetrievers", "frenchBulldogs", "bulldogs", "beagles", "poodles", "rottweilers", "yorkshireTerriers", "siberianHuskies", "horses", "bulls", "pigs", "siameses", "persians", "maineCoons", "ragdolls", "bengals", "abbysinians", "birmans", "orientalShorthairs", "sphynxes", "russianBlues", "wolves", "foxes", "jackals", "dingos", "zebras", "cougars", "jaguars", "pumas", "lynx", "leopards", "lions", "tigers"]; + animalsBought.forEach(function(species) { V.animalsBought[species] = V.animalsBought[species] || 0; }); // SF - { - App.SF.BC(); - } + App.SF.BC(); // FS { - if (typeof V.FSCreditCount === "undefined") { - V.FSCreditCount = 5; - } - 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 (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.arcologies[0].FSAztecRevivalist === "undefined") { for (let bci = 0; bci < V.arcologies.length; bci++) { @@ -1412,7 +248,7 @@ App.Update.globalVariables = function() { // Arcologies { - if (typeof V.arcologies === "undefined") { + if (jQuery.isEmptyObject(V.arcologies)) { V.arcologies = []; V.arcologies[0] = { name: "Arcology X-", @@ -1907,7 +743,7 @@ App.Update.globalVariables = function() { } else { assistant.object(); } - if (typeof V.FSPromenade === "undefined") { + if (jQuery.isEmptyObject(V.FSPromenade)) { V.FSPromenade = { Subjugationist: 0, Supremacist: 0, @@ -1939,7 +775,7 @@ App.Update.globalVariables = function() { StatuesqueGlorification: 0 }; } - if (typeof V.arcologyUpgrade === "undefined") { + if (jQuery.isEmptyObject(V.arcologyUpgrade)) { V.arcologyUpgrade = { drones: 0, hydro: 0, @@ -1953,149 +789,15 @@ App.Update.globalVariables = function() { V.arcologyUpgrade.grid = (V.AProsperityCap > 120) ? 1 : 0; V.arcologyUpgrade.spire = (V.AProsperityCap > 240) ? 1 : 0; } - if (typeof V.building === "undefined") { + if (jQuery.isEmptyObject(V.building)) { if (typeof V.sectors !== "undefined") { App.Update.sectorsToBuilding(); } else { V.building = App.Arcology.defaultBuilding(); } } - 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.prostheticsUpgrade === "undefined") { - V.prostheticsUpgrade = 0; - } - if (typeof V.dispensaryUpgrade === "undefined") { - V.dispensaryUpgrade = 0; - } - if (typeof V.growthStim === "undefined") { - V.growthStim = 0; - } - if (typeof V.ImplantProductionUpgrade === "undefined") { - V.ImplantProductionUpgrade = 0; - } - if (typeof V.geneticMappingUpgrade === "undefined") { - V.geneticMappingUpgrade = 0; - } - if (typeof V.pregnancyMonitoringUpgrade === "undefined") { - V.pregnancyMonitoringUpgrade = 0; - } - - // Implant Manufactory - { - if (typeof V.permaPregImplant === "undefined") { - V.permaPregImplant = 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; - } - } - - // Dispensery - { - 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; - } - } - // Penthouse upgrades - { - 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.dairyPiping === "undefined") { - V.dairyPiping = 0; - } - if (typeof V.wcPiping === "undefined") { - V.wcPiping = 0; - } - if (typeof V.pregSpeedControl === "undefined") { - V.pregSpeedControl = 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.language === "undefined") { - V.language = "English"; - } - if (typeof V.terrain === "undefined") { - V.terrain = "rural"; - } - if (typeof V.trinkets === "undefined") { + if (jQuery.isEmptyObject(V.trinkets)) { V.trinkets = []; if (V.PC.career === "wealth") { V.trinkets.push("a collection of diplomas from expensive schools"); @@ -2123,10 +825,6 @@ App.Update.globalVariables = function() { V.trinkets.push("a news clipping of your first successful live hack"); } } - if (typeof V.NPCSlaves === "undefined") { - V.NPCSlaves = V.ASlaves; - V.ASlaves += V.menials + V.fuckdolls + V.menialBioreactors; - } } // Clean up neighbor's arcologies @@ -2136,97 +834,15 @@ App.Update.globalVariables = function() { { App.Corporate.Backcompat(); /* 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.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 = []; - } 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; + if (V.corpValue) { 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; if (typeof V.sectors !== "undefined") { for (let i = 0; i < V.sectors.length; i++) { if (V.sectors[i].type === "CorporateMarket") { @@ -2236,27 +852,6 @@ App.Update.globalVariables = function() { } } } - // TODO: Corp, should captureUpgradeRace be removed? -LCD - 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"; - } } // Organs @@ -2286,159 +881,12 @@ App.Update.globalVariables = function() { FacilityDatatypeCleanup(); - // Pit - { - 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; - } - } - - // Job Fulfillment Center - { - if (typeof V.JFCOrder === "undefined") { - V.JFCOrder = 0; - } - if (typeof V.Role === "undefined") { - V.Role = ""; - } - } - - // Schools - { - 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.TFS.compromiseWeek === "undefined") { + V.TFS.compromiseWeek = 0; } // Pornstars { - 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") { const oldPornStars = V.pornStars; @@ -2494,73 +942,19 @@ App.Update.globalVariables = function() { // Slave services and goods variables { - if (typeof V.publicFuckdolls === "undefined") { - V.publicFuckdolls = 0; - } - if (typeof V.classSatisfied === "undefined") { - V.classSatisfied = {}; - } if (typeof V.lowerClassSatisfied !== "undefined") { V.classSatisfied.lowerClass = V.lowerClassSatisfied; } - if (typeof V.sexSubsidies === "undefined") { - V.sexSubsidies = {}; - } if (typeof V.sexSubsidiesLC !== "undefined") { V.sexSubsidies.lowerClass = V.sexSubsidiesLC; } - if (typeof V.sexSupplyBarriers === "undefined") { - V.sexSupplyBarriers = {}; - } if (typeof V.sexSupplyBarriersLC !== "undefined") { V.sexSupplyBarriers.lowerClass = 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; - } V.food = Math.max(+V.food, 0) || 0; - 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") { + if (V.foodConsumption === 0) { 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; - } } EconomyDatatypeCleanup(); @@ -2619,9 +1013,6 @@ App.Update.slaveRecords = function() { App.Entity.Utils.SlaveDataSchemeCleanup(V.traitor); SlaveDatatypeCleanup(V.traitor); } - if (typeof V.assignmentRecords === "undefined") { - V.assignmentRecords = {}; - } r += ` Done!<br>`; if (V.tanks.length > 0) { @@ -2834,15 +1225,6 @@ App.Update.oldVersions = function() { } /* 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") { @@ -2942,8 +1324,8 @@ App.Update.oldVersions = function() { delete V.researchLab.productionTime; /* stockpile */ - if (typeof V.prosthetics === "undefined") { - if (typeof V.stockpile === "undefined") { + if (jQuery.isEmptyObject(V.prosthetics)) { + if (jQuery.isEmptyObject(V.stockpile)) { V.prosthetics = {}; setup.prostheticIDs.forEach(function(id) { V.prosthetics[id] = {amount: 0, research: 0}; diff --git a/src/init/storyInit.js b/src/init/storyInit.js index 02432efabc6cffd57590146cd22201bc727c7ed2..27d45c0fa1015ac0164c839f9629fd056504fca7 100644 --- a/src/init/storyInit.js +++ b/src/init/storyInit.js @@ -171,7 +171,7 @@ App.Data.defaultGameStateVariables = { debugMode: 0, showNeighborDetails: 1, useTabs: 0, - tabChoice: {}, + tabChoice: {Main: "all"}, formatNumbers: 1, makeDicks: 0, showEconomicDetails: 0, @@ -192,7 +192,7 @@ App.Data.defaultGameStateVariables = { curativeSideEffects: 1, // eslint-disable-next-line camelcase pedo_mode: 0, - minimumSlaveAge: 18, + minimumSlaveAge: 16, fertilityAge: 13, potencyAge: 13, AgePenalty: 1, @@ -456,7 +456,14 @@ App.Data.defaultGameStateVariables = { farmMenials: 0, farmMenialsSpace: 0, farmyardDecoration: "standard", - farmyardUpgrade: {}, + farmyardUpgrade: { + pump: 0, + fertilizer: 0, + hydroponics: 0, + machinery: 0, + seeds: 0, + lab: 0 + }, farmyardCrops: 0, farmyardStable: 0, farmyardKennels: 0, @@ -465,7 +472,7 @@ App.Data.defaultGameStateVariables = { activeHooved: 0, activeFeline: 0, farmyardLab: 0, - farmyardLabUpgrades: {}, + farmyardLabUpgrades: {animalOvaries: 0, animalTesticles: 0, animalMpreg: 0}, animalsBought: {}, canines: [], hooved: [], @@ -624,7 +631,7 @@ App.Data.defaultGameStateVariables = { clinicInflateBelly: 0, playerBred: 0, propOutcome: 0, - EliteSires: [], + EliteSires: ["crazy", "futa", "moves", "preggo", "quick", "virgin"], startingPoint: -1, PhysicalRetirementAgePolicy: 0, raped: -1, @@ -665,16 +672,88 @@ App.Data.defaultGameStateVariables = { badC: 0, badB: 0, schoolSuggestion: 0, - TSS: {}, - GRI: {}, - SCP: {}, - LDE: {}, - TGA: {}, - TCR: {}, - TFS: {}, + TSS: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + GRI: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + SCP: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + LDE: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + TGA: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + TCR: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + TFS: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, futaAddiction: 0, - HA: {}, - NUL: {}, + HA: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, + NUL: { + schoolUpgrade: 0, + schoolPresent: 0, + schoolProsperity: 0, + subsidize: 0, + schoolAnnexed: 0, + studentsBought: 0, + schoolSale: 0 + }, IDNumber: 1, nIDNumber: 1, // tracks children in the nursery week: 1, @@ -714,7 +793,7 @@ App.Data.defaultGameStateVariables = { fixedNationality: 0, fixedRace: 0, ui: "start", - tooltipsEnabled: 0, + tooltipsEnabled: 1, brandTarget: {}, brandDesign: {}, scarTarget: {}, @@ -862,7 +941,13 @@ App.Data.defaultGameStateVariables = { foodStored: 0, foodCost: 25, foodMarket: 0, - foodRate: {}, + foodRate: { + slave: 2, + lower: 1.8, + middle: 2, + upper: 2.2, + top: 2.4 + }, foodConsumption: 0, // total amount food consumed per week revealFoodEffects: 0, rations: 0, @@ -984,7 +1069,12 @@ App.Data.defaultGameStateVariables = { Role: "", cheatMode: 0, cheatModeM: 1, - experimental: {}, + experimental: { + nursery: 0, + food: 0, + animalOvaries: 0, + dinnerParty: 0 + }, NaNArray: [], fcnn: [], // HACKY EVENT WORKAROUNDS @@ -1002,10 +1092,16 @@ App.Data.defaultGameStateVariables = { prostheticsUpgrade: 0, adjustProstheticsCompleted: 0, adjustProsthetics: [], - researchLab: {}, + researchLab: { + aiModule: 1, + tasks: [], + maxSpace: 0, + hired: 0, + menials: 0, + }, prosthetics: {}, - merchantFSWares: [], - merchantIllegalWares: [], + merchantFSWares: ["AssetExpansionistResearch", "GenderRadicalistResearch", "HedonisticDecadenceResearch", "SlaveProfessionalismResearch", "SlimnessEnthusiastResearch", "TransformationFetishistResearch", "YouthPreferentialistResearch"], + merchantIllegalWares: ["asexualReproduction", "childhoodFertilityInducedNCS", "PGHack", "RapidCellGrowthFormula", "sympatheticOvaries", "UterineRestraintMesh"], // "AnimalOrgans" for future use RapidCellGrowthFormula: 0, UterineRestraintMesh: 0, @@ -1022,7 +1118,18 @@ App.Data.defaultGameStateVariables = { econWeatherDamage: 0, disasterResponse: 0, postSexCleanUp: 1, - sideBarOptions: {}, + sideBarOptions: { + compact: 1, + Cash: 1, + Upkeep: 1, + SexSlaveCount: 1, + roomPop: 1, + Rep: 1, + GSP: 1, + Authority: 1, + Security: 1, + Crime: 1 + }, DefaultBirthDestination: "individually decided fates", abbreviateHormoneBalance: 2, // END OLD INIT VARIABLES SECTION, after this, variables were being created in other places in the game diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 7510522bae14ef3637d6f5122f7f9c9d0255a162..a301240cc87f33cb73b6c8ac6a7fc5e884928db1 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -3,6 +3,8 @@ /* no-usedOnce disabling checking for only used once instances in this file */ <<set $nextButton = "Continue", $nextLink = "Main", $returnTo = "Main">> +<<run App.Update.setNonexistantProperties(V, App.Data.defaultGameStateVariables)>> + <div> <<= App.Update.oldVersions()>> </div>