From 94bd163d742b37f699f565f56e8401b576d2ee63 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 12 Mar 2020 11:22:56 -0400 Subject: [PATCH] Make sure JobIDArray is set up --- src/data/backwardsCompatibility/backwardsCompatibility.js | 8 ++++++-- src/init/storyInit.tw | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index a585ded98cd..466ef399d1c 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -90,6 +90,10 @@ App.Update.globalVariables = function() { } } + // Jobs + { + V.JobIDArray = resetJobIDArray(); + } // Reminders { if (!Array.isArray(V.reminders)) { @@ -1033,8 +1037,8 @@ App.Update.globalVariables = function() { 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 */ } } - - //Stud stuff + + // Stud stuff { V.Stud = V.Stud || 0; V.StudCum = Math.max(+V.StudCum, 0) || 0; diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index aa41a10086c..7857148221d 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -112,6 +112,7 @@ You should have received a copy of the GNU General Public License along with thi <<run setup.prostheticIDs.forEach(function(id) { $prosthetics[id] = {amount: 0, research: 0}; })>> +<<set $JobIDArray = resetJobIDArray()>> /*SFVAR*/ <<set $SF = Object.assign({}, $SF, {Toggle:0, Active: -1}), $SF.Facility = Object.assign({}, $SF.Facility, {Toggle:0, Active:0})>> -- GitLab