From 988a507f4624496688ca55d37d861106bda70963 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 5 Mar 2020 17:25:32 -0500 Subject: [PATCH] more --- js/003-data/gameVariableData.js | 490 ++++++++++-------- .../BackwardsCompatibility.tw | 3 + .../backwardsCompatibility.js | 8 +- src/init/storyInit.tw | 4 + src/uncategorized/newGamePlus.tw | 6 +- 5 files changed, 303 insertions(+), 208 deletions(-) diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 8384df1ea27..64aca9be97d 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -182,125 +182,78 @@ App.Data.defaultGameStateVariables = { customRetirementAge: 45, customMenialRetirementAge: 65, FSCreditCount: 5, - targetArcology: {type: "New"}, - REFeminizationCheckinIDs: [], - REMILFCheckinIDs: [], - REOrientationCheckinIDs: [], - REUglyCheckinIDs: [], - REButtholeCheckinIDs: [], - REFutaSisterCheckinIDs: [], - REReductionCheckinIDs: [], - activeSlave: 0, - activeChild: 0, - reminders: [], - boomerangSlave: 0, - boomerangWeeks: 0, - boomerangBuyer: 0, - bioreactorPerfectedID: 0, - independenceDay: 0, - invasionVictory: 0, - daughtersVictory: 0, - startingGirlCopied: 0, - startingGirlRelation: 0, - archetyped: 0, - createRelatedSlave: 0, - slavesVisible: 0, - dormitory: 20, - dormitoryPopulation: 0, - rooms: 5, - roomsPopulation: 0, - brothelDecoration: "standard", - brothelUpgradeDrugs: 0, - brothelAdsSpending: 0, - brothelAdsOld: 0, - brothelAdsModded: 0, - brothelAdsImplanted: 0, - brothelAdsStacked: 0, - brothelAdsPreg: 0, - brothelAdsXX: 0, - brothelName: "the Brothel", - brothelNameCaps: "The Brothel", - brothel: 0, - dairyDecoration: "standard", - dairyPrepUpgrade: 0, - dairyStimulatorsUpgrade: 0, - dairyStimulatorsSetting: 0, - dairyStimulatorsSettingChanged: 0, - dairyFeedersUpgrade: 0, - dairyFeedersSetting: 0, - dairyFeedersSettingChanged: 0, - dairyPregUpgrade: 0, - dairyPregSetting: 0, - dairyPregSettingChanged: 0, - dairyRestraintsUpgrade: 0, - dairyRestraintsSetting: 0, - dairySlimMaintainUpgrade: 0, - dairySlimMaintain: 0, - dairyHyperPregRemodel: 0, - dairyWeightSetting: 0, - dairyImplantsSetting: 1, - dairyUpgradeMenials: 0, - createBioreactors: 0, - bioreactorsAnnounced: 0, - bioreactorsHerm: 0, - bioreactorsXX: 0, - bioreactorsXY: 0, - bioreactorsBarren: 0, - dairyName: "the Dairy", - dairyNameCaps: "The Dairy", - dairy: 0, - cumSlaves: 0, - clubDecoration: "standard", - clubUpgradePDAs: 0, - clubAdsSpending: 0, - clubAdsOld: 0, - clubAdsModded: 0, - clubAdsImplanted: 0, - clubAdsStacked: 0, - clubAdsPreg: 0, - clubAdsXX: 0, - clubName: "the Club", - clubNameCaps: "The Club", - club: 0, - servantsQuartersDecoration: "standard", - servantsQuartersUpgradeMonitoring: 0, - servantsQuarters: 0, - servantsQuartersName: "the Servants' Quarters", - servantsQuartersNameCaps: "The Servants' Quarters", - schoolroomDecoration: "standard", - schoolroomUpgradeSkills: 0, - schoolroomUpgradeLanguage: 0, - schoolroomUpgradeRemedial: 0, - schoolroomRemodelBimbo: 0, - schoolroom: 0, - schoolroomName: "the Schoolroom", - schoolroomNameCaps: "The Schoolroom", - spaDecoration: "standard", - spa: 0, - spaSpots: 0, - spaUpgrade: 0, - spaFix: 0, - spaName: "the Spa", - spaNameCaps: "The Spa", - // Incubator Subsection - incubator: 0, - incubatorSlaves: 0, - incubatorBulkRelease: 0, - incubatorOrgans: [], - incubatorOldID: 0, - incubatorUpgradeSpeed: 5, - incubatorUpgradeWeight: 0, - incubatorUpgradeMuscles: 0, - incubatorUpgradeGrowthStims: 0, - incubatorUpgradeReproduction: 0, - incubatorUpgradeOrgans: 0, - incubatorImprintSetting: 0, - incubatorWeightSetting: 0, - incubatorMusclesSetting: 0, - incubatorGrowthStimsSetting: 0, - incubatorReproductionSetting: 0, - incubatorName: "the Incubator", - incubatorNameCaps: "The Incubator", + corpAssetsDev: 0, + corpAssetsDevOld: 0, + corpAssetsSlave: 0, + corpAssetsSlaveOld: 0, + corpCash: 0, + corpDiv: 0, + corpDivArcadeFromMarket: 0, + corpDivArcadeSlaves: 0, + corpDivBreakFromMarket: 0, + corpDivBreakSlaves: 0, + corpDivBreakSlaves2: 0, + corpDivBreakToMarket: 0, + corpDivBreakToMenial: 0, + corpDivBreakToSurgery: 0, + corpDivBreakToTrain: 0, + corpDivDairyFromMarket: 0, + corpDivDairySlaves: 0, + corpDivExtraSlaves: 0, + corpDivExtraToArcade: 0, + corpDivExtraToBreak: 0, + corpDivExtraToMarket: 0, + corpDividend: 0, + corpDivLegalSlaves: 0, + corpDivLegalToMarket: 0, + corpDivLegalToMenial: 0, + corpDivLegalToSurgery: 0, + corpDivLegalToTrain: 0, + corpDivMenialFromMarket: 0, + corpDivMenialSlaves: 0, + corpDivSurgeryFromMarket: 0, + corpDivSurgerySlaves: 0, + corpDivSurgerySlaves2: 0, + corpDivSurgeryToDairy: 0, + corpDivSurgeryToMarket: 0, + corpDivSurgeryToTrain: 0, + corpDivTrainFromMarket: 0, + corpDivTrainSlaves: 0, + corpDivTrainSlaves2: 0, + corpDivTrainToMarket: 0, + corpDivTrainToWhore: 0, + corpDivWhoreFromMarket: 0, + corpDivWhoreSlaves: 0, + corpOpCostOld: 0, + corpOverheadOld: 0, + corpProfitOld: 0, + corpRev: 0, + corpRevOld: 0, + corpSpecAccent: 0, + corpSpecAge: 0, + corpSpecAmputee: 0, + corpSpecBalls: 0, + corpSpecDevotion: 0, + corpSpecDick: 0, + corpSpecEducation: 0, + corpSpecGender: 0, + corpSpecGenitalia: 0, + corpSpecHeight: 0, + corpSpecHormones: 0, + corpSpecImplants: 0, + corpSpecInjection: 0, + corpSpecIntelligence: 0, + corpSpecMilk: 0, + corpSpecMuscle: 0, + corpSpecPussy: 0, + corpSpecSexEd: 0, + corpSpecTrust: 0, + corpSpecVirgin: 0, + corpSpecWeight: 0, + dividendTimer: 0, + personalShares: 0, + publicShares: 0, + sortIncubatorList: "Unsorted", readySlaves: 0, reservedChildren: 0, @@ -1063,91 +1016,6 @@ App.Data.defaultGameStateVariables = { citizenOrphanageTotal: 0, privateOrphanageTotal: 0, breederOrphanageTotal: 0, - alwaysSubsidizeRep: 0, - alwaysSubsidizeGrowth: 0, - ProImmigrationCash: 0, - ProImmigrationRep: 0, - AntiImmigrationCash: 0, - AntiImmigrationRep: 0, - ProEnslavementCash: 0, - ProEnslavementRep: 0, - AntiEnslavementCash: 0, - AntiEnslavementRep: 0, - BasicSMR: 1, - HealthInspectionSMR: 0, - EducationSMR: 0, - FrigiditySMR: 0, - BasicBeautySMR: 0, - QualityBeautySMR: 0, - BasicWeightSMR: 0, - BasicIntelligenceSMR: 0, - QualityIntelligenceSMR: 0, - BasicHeightSMR: 0, - AdvancedHeightSMR: 0, - IntelligenceEugenicsSMR: 0, - HeightEugenicsSMR: 0, - FaceEugenicsSMR: 0, - HonestySMR: 0, - ProRefugees: 0, - ProRecruitment: 0, - OralEncouragement: 0, - VaginalEncouragement: 0, - AnalEncouragement: 0, - OralDiscouragement: 0, - VaginalDiscouragement: 0, - AnalDiscouragement: 0, - CashForRep: 0, - RepForCash: 0, - Cash4Babies: 0, - RegularParties: 0, - PAPublic: 0, - CoursingAssociation: 0, - Lurcher: 0, - coursed: 0, - RaidingMercenaries: 0, - raided: 0, - MixedMarriage: 0, - CulturalOpenness: 0, - goodImageCampaign: 0, - sexualOpeness: 0, - policyCost: 5000, - expiree: 0, - retiree: 0, - birthee: 0, - CustomRetirementAgePolicy: 0, - BioreactorRetirement: 0, - ArcadeRetirement: 0, - CitizenRetirement: 0, - citizenRetirementMenials: 0, - citizenRetirementTrigger: 0, - FSSupLawTrigger: 0, - FSSubLawTrigger: 0, - SexMilestoneRetirement: 0, - MilkMilestoneRetirement: 0, - CumMilestoneRetirement: 0, - BirthsMilestoneRetirement: 0, - KillsMilestoneRetirement: 0, - retirementSex: 10000, - retirementMilk: 50000, - retirementCum: 500000, - retirementBirths: 5, - retirementKills: 3, - nicaea: 0, - nicaeaAnnounceable: 0, - nicaeaAnnounced: 0, - nicaeaPreparation: 0, - nicaeaInvolvement: -2, - nicaeaPower: 0, - nicaeaHeld: 0, - nicaeaFocus: "", - nicaeaAssignment: "", - nicaeaAchievement: "", - peacekeepers: 0, - peacekeepersFate: 0, - mercRomeo: 0, - oralUseWeight: 5, - vaginalUseWeight: 5, - analUseWeight: 5, childProtectionAct: 1, niceWeather: [], lightWeather: [], @@ -1650,6 +1518,220 @@ App.Data.defaultGameStateVariables = { defaultRules: [], }; +App.Data.resetOnNGPlus = { + targetArcology: {type: "New"}, + + REFeminizationCheckinIDs: [], + REMILFCheckinIDs: [], + REOrientationCheckinIDs: [], + REUglyCheckinIDs: [], + REButtholeCheckinIDs: [], + REFutaSisterCheckinIDs: [], + REReductionCheckinIDs: [], + activeSlave: 0, + activeChild: 0, + reminders: [], + + boomerangSlave: 0, + boomerangWeeks: 0, + boomerangBuyer: 0, + + bioreactorPerfectedID: 0, + + independenceDay: 0, + invasionVictory: 0, + daughtersVictory: 0, + startingGirlCopied: 0, + startingGirlRelation: 0, + archetyped: 0, + createRelatedSlave: 0, + + slavesVisible: 0, + dormitory: 20, + dormitoryPopulation: 0, + rooms: 5, + roomsPopulation: 0, + + brothelDecoration: "standard", + brothelUpgradeDrugs: 0, + brothelAdsSpending: 0, + brothelAdsOld: 0, + brothelAdsModded: 0, + brothelAdsImplanted: 0, + brothelAdsStacked: 0, + brothelAdsPreg: 0, + brothelAdsXX: 0, + brothelName: "the Brothel", + brothelNameCaps: "The Brothel", + brothel: 0, + dairyDecoration: "standard", + dairyPrepUpgrade: 0, + dairyStimulatorsUpgrade: 0, + dairyStimulatorsSetting: 0, + dairyStimulatorsSettingChanged: 0, + dairyFeedersUpgrade: 0, + dairyFeedersSetting: 0, + dairyFeedersSettingChanged: 0, + dairyPregUpgrade: 0, + dairyPregSetting: 0, + dairyPregSettingChanged: 0, + dairyRestraintsUpgrade: 0, + dairyRestraintsSetting: 0, + dairySlimMaintainUpgrade: 0, + dairySlimMaintain: 0, + dairyHyperPregRemodel: 0, + dairyWeightSetting: 0, + dairyImplantsSetting: 1, + dairyUpgradeMenials: 0, + createBioreactors: 0, + bioreactorsAnnounced: 0, + bioreactorsHerm: 0, + bioreactorsXX: 0, + bioreactorsXY: 0, + bioreactorsBarren: 0, + dairyName: "the Dairy", + dairyNameCaps: "The Dairy", + dairy: 0, + cumSlaves: 0, + clubDecoration: "standard", + clubUpgradePDAs: 0, + clubAdsSpending: 0, + clubAdsOld: 0, + clubAdsModded: 0, + clubAdsImplanted: 0, + clubAdsStacked: 0, + clubAdsPreg: 0, + clubAdsXX: 0, + clubName: "the Club", + clubNameCaps: "The Club", + club: 0, + servantsQuartersDecoration: "standard", + servantsQuartersUpgradeMonitoring: 0, + servantsQuarters: 0, + servantsQuartersName: "the Servants' Quarters", + servantsQuartersNameCaps: "The Servants' Quarters", + schoolroomDecoration: "standard", + schoolroomUpgradeSkills: 0, + schoolroomUpgradeLanguage: 0, + schoolroomUpgradeRemedial: 0, + schoolroomRemodelBimbo: 0, + schoolroom: 0, + schoolroomName: "the Schoolroom", + schoolroomNameCaps: "The Schoolroom", + spaDecoration: "standard", + spa: 0, + spaSpots: 0, + spaUpgrade: 0, + spaFix: 0, + spaName: "the Spa", + spaNameCaps: "The Spa", + + // Incubator Subsection + incubator: 0, + incubatorSlaves: 0, + incubatorBulkRelease: 0, + incubatorOrgans: [], + incubatorOldID: 0, + incubatorUpgradeSpeed: 5, + incubatorUpgradeWeight: 0, + incubatorUpgradeMuscles: 0, + incubatorUpgradeGrowthStims: 0, + incubatorUpgradeReproduction: 0, + incubatorUpgradeOrgans: 0, + incubatorImprintSetting: 0, + incubatorWeightSetting: 0, + incubatorMusclesSetting: 0, + incubatorGrowthStimsSetting: 0, + incubatorReproductionSetting: 0, + incubatorName: "the Incubator", + incubatorNameCaps: "The Incubator", + +alwaysSubsidizeRep: 0, + alwaysSubsidizeGrowth: 0, + ProImmigrationCash: 0, + ProImmigrationRep: 0, + AntiImmigrationCash: 0, + AntiImmigrationRep: 0, + ProEnslavementCash: 0, + ProEnslavementRep: 0, + AntiEnslavementCash: 0, + AntiEnslavementRep: 0, + BasicSMR: 1, + HealthInspectionSMR: 0, + EducationSMR: 0, + FrigiditySMR: 0, + BasicBeautySMR: 0, + QualityBeautySMR: 0, + BasicWeightSMR: 0, + BasicIntelligenceSMR: 0, + QualityIntelligenceSMR: 0, + BasicHeightSMR: 0, + AdvancedHeightSMR: 0, + IntelligenceEugenicsSMR: 0, + HeightEugenicsSMR: 0, + FaceEugenicsSMR: 0, + HonestySMR: 0, + ProRefugees: 0, + ProRecruitment: 0, + OralEncouragement: 0, + VaginalEncouragement: 0, + AnalEncouragement: 0, + OralDiscouragement: 0, + VaginalDiscouragement: 0, + AnalDiscouragement: 0, + CashForRep: 0, + RepForCash: 0, + Cash4Babies: 0, + RegularParties: 0, + PAPublic: 0, + CoursingAssociation: 0, + Lurcher: 0, + coursed: 0, + RaidingMercenaries: 0, + raided: 0, + MixedMarriage: 0, + CulturalOpenness: 0, + goodImageCampaign: 0, + sexualOpeness: 0, + + policyCost: 5000, + expiree: 0, + retiree: 0, + birthee: 0, + CustomRetirementAgePolicy: 0, + BioreactorRetirement: 0, + ArcadeRetirement: 0, + CitizenRetirement: 0, + citizenRetirementMenials: 0, + citizenRetirementTrigger: 0, + FSSupLawTrigger: 0, + FSSubLawTrigger: 0, + SexMilestoneRetirement: 0, + MilkMilestoneRetirement: 0, + CumMilestoneRetirement: 0, + BirthsMilestoneRetirement: 0, + KillsMilestoneRetirement: 0, + retirementSex: 10000, + retirementMilk: 50000, + retirementCum: 500000, + retirementBirths: 5, + retirementKills: 3, + nicaea: 0, + nicaeaAnnounceable: 0, + nicaeaAnnounced: 0, + nicaeaPreparation: 0, + nicaeaInvolvement: -2, + nicaeaPower: 0, + nicaeaHeld: 0, + peacekeepers: 0, + peacekeepersFate: 0, + mercRomeo: 0, + + oralUseWeight: 5, + vaginalUseWeight: 5, + analUseWeight: 5, +}; + App.Data.ignoreGameStateVariables = [ // pronouns "Mothers", diff --git a/src/data/backwardsCompatibility/BackwardsCompatibility.tw b/src/data/backwardsCompatibility/BackwardsCompatibility.tw index 29f9e342cd8..29dd08a4e80 100644 --- a/src/data/backwardsCompatibility/BackwardsCompatibility.tw +++ b/src/data/backwardsCompatibility/BackwardsCompatibility.tw @@ -5,6 +5,9 @@ <<run App.Update.setNonexistantProperties(V, App.Data.defaultGameStateVariables)>> +/* resetOnNGPlus contains half of the variables we need, but we use it politely here instead of forcing it so it fills in holes instead of overwriting data */ +<<run App.Update.setNonexistantProperties(V, App.Data.resetOnNGPlus)>> + <div> <<= App.Update.oldVersions()>> </div> diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index c44dbec42c5..5b39dbbaf1e 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -1,9 +1,13 @@ App.Update.autoshred = function() { - const defaultGameStateVariables = new Set(Object.getOwnPropertyNames(App.Data.defaultGameStateVariables)); + const set = new Set( + Object.getOwnPropertyNames(App.Data.defaultGameStateVariables).concat( + Object.getOwnPropertyNames(App.Data.resetOnNGPlus) + ) + ); let extraCount = 0; for (const v in V) { - if (!defaultGameStateVariables.has(v)) { + if (!set.has(v)) { if (V.debugMode) { if (!App.Data.ignoreGameStateVariables.includes(v)) { console.log("Not on whitelist, removed:", "V."+v+":", V[v]); diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 0a1e8930f9f..36077c1b820 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -12,8 +12,12 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* Set up the game as politely as possible */ <<run App.Update.setNonexistantProperties(V, App.Data.defaultGameStateVariables)>> +/* These variables must be created AND set to default values NG+ or not */ +<<run V.assign(App.Data.resetOnNGPlus)>> + <<set $ver = App.Version.base, $pmodVer = App.Version.pmod, $releaseID = App.Version.release>> <<set _NGPOffset = 1200000>> diff --git a/src/uncategorized/newGamePlus.tw b/src/uncategorized/newGamePlus.tw index d396386253e..ccacf4a86b0 100644 --- a/src/uncategorized/newGamePlus.tw +++ b/src/uncategorized/newGamePlus.tw @@ -1,10 +1,12 @@ :: New Game Plus [nobr] <<set $ui = "start">> <<unset $SlaveSummaryFiler>> - +<<if ndef $slavesToImport>> + <<silently>><<include "Backwards Compatibility">><</silently>> +<</if>> <<if ndef $slavesToImport>><<set $slavesToImport = 0>><</if>> <<if ndef $slavesToImportMax>><<set $slavesToImportMax = 5>><</if>> -<<silently>><<include "Backwards Compatibility">><</silently>> + <<set _fee = 50000+($slavesToImportMax*10000)>> <<run setupLastWeeksCash()>> <<run setupLastWeeksRep()>> -- GitLab