diff --git a/src/data/backwardsCompatibility/BackwardsCompatibility.tw b/src/data/backwardsCompatibility/BackwardsCompatibility.tw index a301240cc87f33cb73b6c8ac6a7fc5e884928db1..29f9e342cd8e7a049750350bf0a9d7f52f8f4096 100644 --- a/src/data/backwardsCompatibility/BackwardsCompatibility.tw +++ b/src/data/backwardsCompatibility/BackwardsCompatibility.tw @@ -13,13 +13,6 @@ <<= App.Update.globalVariables()>> </div> -<<if ndef $lastWeeksCashIncome>> - <<setupLastWeeksCash>> -<</if>> -<<if ndef $lastWeeksRepIncome>> - <<setupLastWeeksRep>> -<</if>> - <div> <<= App.Update.slaveVariables()>> </div> diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 27dc25d16f406938fe63327c79c695c54f660dce..c44dbec42c59117d907e6d6a5548a24803793e92 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -36,6 +36,15 @@ App.Update.globalVariables = function() { V.nationalities = weightedArray2HashMap(V.nationalities); } + // Records + if (jQuery.isEmptyObject(V.lastWeeksCashIncome)) { + setupLastWeeksCash(); + } + + if (jQuery.isEmptyObject(V.lastWeeksRepIncome)) { + setupLastWeeksRep(); + } + // Slave mods/surgery { if (typeof V.brandTarget === "string") { diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index b10831c1e2f0e5c2f21bb7779e57454cb2625521..0a1e8930f9f42dd732e3ab3d054a794c7816eadc 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -21,8 +21,8 @@ You should have received a copy of the GNU General Public License along with thi <<run App.Update.slaveLoopInit()>> /* 0 out the record books as we start a new game */ -<<setupLastWeeksCash>> -<<setupLastWeeksRep>> +<<run setupLastWeeksCash()>> +<<run setupLastWeeksRep()>> <<if $saveImported == 0>> /* new game (not NG+) */ diff --git a/src/interaction/budgets/recordTemplates.js b/src/interaction/budgets/recordTemplates.js new file mode 100644 index 0000000000000000000000000000000000000000..8a7cc9feb4692bcfdec3f4f7a8c458ea20c02a4a --- /dev/null +++ b/src/interaction/budgets/recordTemplates.js @@ -0,0 +1,152 @@ +App.Data.Records = {}; + +App.Data.Records.LastWeeksCash = function() { + this.whore = 0, + this.whoreBrothel = 0, + this.rest = 0, + this.houseServant = 0, + this.confined = 0, + this.publicServant = 0, + this.classes = 0, + this.milked = 0, + this.milkedDairy = 0, + this.extraMilk = 0, // milk from slaves doing other things + this.gloryhole = 0, + this.gloryholeArcade = 0, + this.porn = 0, + this.recruiter = 0, + // Slaves in general + this.fuckdolls = 0, + this.menialTrades = 0, + this.menialBioreactors = 0, + + this.slaveTransfer = 0, + this.fuckdollsTransfer = 0, + this.menialTransfer = 0, + this.menialBioreactorsTransfer = 0, + this.babyTransfer = 0, + this.menialRetirement = 0, + + this.slaveMod = 0, + this.slaveSurgery = 0, + this.slaveUpkeep = 0, + this.birth = 0, + + // Buildings + this.lab = 0, + this.brothel = 0, + this.brothelAds = 0, + this.club = 0, + this.clubAds = 0, + this.arcade = 0, + this.dairy = 0, + this.servantsQuarters = 0, + this.masterSuite = 0, + this.school = 0, + this.spa = 0, + this.clinic = 0, + this.cellblock = 0, + this.incubator = 0, + this.nursery = 0, + this.farmyard = 0, + this.pit = 0, + + this.environment = 0, + this.weather = 0, + + this.mercenaries = 0, + this.peacekeepers = 0, + this.specialForces = 0, + this.securityExpansion = 0, + + this.citizenOrphanage = 0, + this.privateOrphanage = 0, + + this.capEx = 0, + this.futureSocieties = 0, + this.schoolBacking = 0, + this.policies = 0, + this.edicts = 0, + + // Personal Finance + this.personalBusiness = 0, + this.personalLivingExpenses = 0, + this.PCtraining = 0, + this.PCmedical = 0, + this.PCskills = 0, + this.stocksTraded = 0, // trading + this.stocks = 0, // share growth + this.fines = 0, + this.event = 0, // poker night etc. Try to file things elsewhere if you can. + this.war = 0, + + this.rents = 0, + + this.cheating = 0, + this.total = 0; +}; + +App.Data.Records.LastWeeksRep = function() { + // Slave Jobs + this.fucktoy = 0, + this.publicServant = 0, + this.gloryholeArcade = 0, + this.gloryhole = 0, + + this.concubine = 0, + this.headGirl = 0, + this.bodyguard = 0, + this.recruiter = 0, + + // Slaves in general + this.fuckdolls = 0, + this.slaveTransfer = 0, + this.babyTransfer = 0, + this.birth = 0, + this.retirement = 0, + this.slavesViewOfPC = 0, + this.prestigiousSlave = 0, + this.vignette = 0, + this.porn = 0, + + // Buildings + this.arcade = 0, + this.brothel = 0, + this.club = 0, + this.publicServantClub = 0, + this.clubAds = 0, + this.pit = 0, + this.servantsQuarters = 0, + this.spa = 0, + + this.architecture = 0, + + // Policies + this.capEx = 0, + this.futureSocieties = 0, + this.policies = 0, + this.edicts = 0, + this.war = 0, + this.food = 0, + + // Forces + this.peacekeepers = 0, + this.specialForces = 0, + this.securityExpansion = 0, + + // Personal Finance + this.personalBusiness = 0, + this.PCappearance = 0, + this.PCactions = 0, // actions involving your body = becoming pregnant, etc. + this.PCRelationships = 0, + this.SlaveRelationships = 0, + this.event = 0, // poker night etc. Try to file things elsewhere if you can. + this.war = 0, + + // special + this.multiplier = 0, + this.overflow = 0, + this.cheating = 0, + + this.total = 0; +}; diff --git a/src/js/economyJS.js b/src/js/economyJS.js index eee48cab38b908f38af2fe96a1788959d523947c..e0f3b186c30a8a4413fdcb557a0fffc58c7f0bd0 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -2221,3 +2221,15 @@ window.ownershipReport = function({sidebar}) { return r += warrning ? `<span class="warning"> A dangerously narrow margin of control.</span>` : ``; } }; + +window.setupLastWeeksCash = function() { + V.lastWeeksCashIncome = new App.Data.Records.LastWeeksCash(); + V.lastWeeksCashExpenses = new App.Data.Records.LastWeeksCash(); + V.lastWeeksCashProfits = new App.Data.Records.LastWeeksCash(); +}; + +window.setupLastWeeksRep = function() { + V.lastWeeksRepIncome = new App.Data.Records.LastWeeksRep(); + V.lastWeeksRepExpenses = new App.Data.Records.LastWeeksRep(); + V.lastWeeksRepProfits = new App.Data.Records.LastWeeksRep(); +}; diff --git a/src/uncategorized/costsWidgets.tw b/src/uncategorized/costsWidgets.tw index 5aeede15d969b3803cb5fd8354bcaedd77d4bdb8..5b69bd2fa6c132cb49c48e662134f34ac6c0190a 100644 --- a/src/uncategorized/costsWidgets.tw +++ b/src/uncategorized/costsWidgets.tw @@ -143,176 +143,3 @@ </div> <</if>> <</widget>> - -<<widget "setupLastWeeksCash">> -/* Feel free to add categories. Just make sure to display them in costsBudget.tw as well! */ -<<set $lastWeeksCashIncome = { -/* Slave Jobs */ -whore: 0, -whoreBrothel: 0, -rest: 0, -houseServant: 0, -confined: 0, -publicServant: 0, -classes: 0, -milked: 0, -milkedDairy: 0, -extraMilk: 0, /*milk from slaves doing other things*/ -gloryhole: 0, -gloryholeArcade: 0, -porn: 0, - -recruiter: 0, - - -/* Slaves in general */ -fuckdolls: 0, -menialTrades: 0, -menialBioreactors: 0, - -slaveTransfer: 0, -fuckdollsTransfer: 0, -menialTransfer: 0, -menialBioreactorsTransfer: 0, -babyTransfer: 0, -menialRetirement: 0, - -slaveMod: 0, -slaveSurgery: 0, -slaveUpkeep: 0, -birth: 0, - -/*Buildings*/ -lab: 0, -brothel: 0, -brothelAds: 0, -club: 0, -clubAds: 0, -arcade: 0, -dairy: 0, -servantsQuarters: 0, -masterSuite: 0, -school: 0, -spa: 0, -clinic: 0, -cellblock: 0, -incubator: 0, -nursery: 0, -farmyard: 0, -pit: 0, - -environment: 0, -weather: 0, - -mercenaries: 0, -peacekeepers: 0, -specialForces: 0, -securityExpansion: 0, - - -citizenOrphanage: 0, -privateOrphanage: 0, - -capEx: 0, -futureSocieties: 0, -schoolBacking: 0, -policies: 0, -edicts: 0, - -/*Personal Finance*/ -personalBusiness: 0, -personalLivingExpenses: 0, -PCtraining: 0, -PCmedical: 0, -PCskills: 0, -stocksTraded: 0, /*trading*/ -stocks: 0, /*share growth*/ -fines: 0, -event: 0, /* poker night etc. Try to file things elsewhere if you can. */ -war: 0, - -rents: 0, - -cheating: 0, -total: 0 - -}>> - -<<set $lastWeeksCashExpenses = clone($lastWeeksCashIncome)>> -<<set $lastWeeksCashProfits = clone($lastWeeksCashIncome)>> - -<</widget>> - - -<<widget "setupLastWeeksRep">> -/* Feel free to add categories. Just make sure to display them in costsBudget.tw as well! */ -<<set $lastWeeksRepIncome = { -/*Slave Jobs*/ -fucktoy: 0, -publicServant: 0, -gloryholeArcade: 0, -gloryhole: 0, - -concubine: 0, -headGirl: 0, -bodyguard: 0, -recruiter: 0, - -/*Slaves in general*/ -fuckdolls: 0, -slaveTransfer: 0, -babyTransfer: 0, -birth: 0, -retirement: 0, -slavesViewOfPC: 0, -prestigiousSlave: 0, -vignette: 0, -porn: 0, - -/*Buildings*/ -arcade: 0, -brothel: 0, -club: 0, -publicServantClub: 0, -clubAds: 0, -pit: 0, -servantsQuarters: 0, -spa: 0, - -architecture: 0, - -/*Policies*/ -capEx: 0, -futureSocieties: 0, -policies: 0, -edicts: 0, -war: 0, -food: 0, - -/*Forces */ -peacekeepers: 0, -specialForces: 0, -securityExpansion: 0, - -/*Personal Finance*/ -personalBusiness: 0, -PCappearance: 0, -PCactions: 0, /* actions involving your body: becoming pregnant, etc. */ -PCRelationships: 0, -SlaveRelationships: 0, -event: 0, /*poker night etc. Try to file things elsewhere if you can.*/ -war: 0, - -/*special*/ -multiplier: 0, -overflow: 0, -cheating: 0, - -total: 0 - -}>> - -<<set $lastWeeksRepExpenses = clone($lastWeeksRepIncome)>> -<<set $lastWeeksRepProfits = clone($lastWeeksRepIncome)>> - -<</widget>> diff --git a/src/uncategorized/endWeek.tw b/src/uncategorized/endWeek.tw index 1bfc864e39a9f7a0a3d259e2dfc5e047905e0bec..cf6757fce58808b1c90b21a4d7d9b55d6edbd21a 100644 --- a/src/uncategorized/endWeek.tw +++ b/src/uncategorized/endWeek.tw @@ -2,8 +2,8 @@ <<set State.expired.length = 0>> -<<setupLastWeeksCash>> -<<setupLastWeeksRep>> +<<run setupLastWeeksCash()>> +<<run setupLastWeeksRep()>> <<set $gingering = 0, $oralUseWeight = 5, $vaginalUseWeight = 5, $analUseWeight = 5, $mammaryUseWeight = 1, $penetrativeUseWeight = 1, $inflatedSlavesMilk = 0, $inflatedSlavesCum = 0, $subSlaves = 0>> diff --git a/src/uncategorized/newGamePlus.tw b/src/uncategorized/newGamePlus.tw index 7d042a64219b2b0f02049ba593764c8e466edd07..d396386253eb87c2fe67df02d001cb5a568454ad 100644 --- a/src/uncategorized/newGamePlus.tw +++ b/src/uncategorized/newGamePlus.tw @@ -6,8 +6,8 @@ <<if ndef $slavesToImportMax>><<set $slavesToImportMax = 5>><</if>> <<silently>><<include "Backwards Compatibility">><</silently>> <<set _fee = 50000+($slavesToImportMax*10000)>> -<<setupLastWeeksCash>> -<<setupLastWeeksRep>> +<<run setupLastWeeksCash()>> +<<run setupLastWeeksRep()>> You have decided to start over and will be able to take a few things with you: a few slaves, a small fraction of your current reserves of money, and possibly even your experience as an arcology owner, which will give you a very powerful career background. Many of your other customizations and settings will be carried over as the defaults for your new game, but can be revised freely.