diff --git a/devNotes/AnatomyOfAFreeCitiesEvent.txt b/devNotes/AnatomyOfAFreeCitiesEvent.txt index d7585446903c2203e442590c217cf08d5a1d4f8e..bfd27d2daff4db7187491e5d6a9cc478057b46e5 100644 --- a/devNotes/AnatomyOfAFreeCitiesEvent.txt +++ b/devNotes/AnatomyOfAFreeCitiesEvent.txt @@ -93,7 +93,7 @@ Choice text This should be a short text describing the effects of your choice. Generally shorter than the main text, but all the other things mentioned there apply. Try to keep surprise buttsex to a minimum. -For example this cut up version of "paternalist encounter" from REFS (l:106-139). +For example this cut up version of "paternalist encounter" from REFS (lines 106-139). <span id="result"> <<link "Alert your drones and keep walking">> @@ -113,7 +113,7 @@ A choice doesn't need to have a specific effect. If your event has an immediate <span id="result"> <<link "Alert your drones and keep walking">> <<replace "#result">> - You inform $assistantName that you have a slave beater in need of detainment by your security drones, then continue on your way confident in your knowledge that the citizen will soon be in custody. + You inform $assistant.name that you have a slave beater in need of detainment by your security drones, then continue on your way confident in your knowledge that the citizen will soon be in custody. <</replace>> <</link>> <<if $cash >= 2000>> diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index f5b6d0ec4d9c533b559da8b06716eaea09bc2c1b..47a5bbe57824cb5bbaf768dfcb85fc5031ec9033 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -217,6 +217,8 @@ App.Data.CorpInitData = { // The other half of the above whitelist. However, entries in this array will be forced to the values set here upon starting NG+. App.Data.resetOnNGPlus = { + FCTV: {}, + assistant: {}, targetArcology: {fs: "New"}, readySlaves: 0, @@ -502,22 +504,6 @@ App.Data.resetOnNGPlus = { woundType: 0, /* 0:no wound, 1:mute, 2:blind, 3:amputee, 4<:health */ - showOne: 0, - showTwo: 0, - showThree: 0, - showFour: 0, - showFive: 0, - showSix: 0, - showSeven: 0, - showEight: 0, - showNine: 0, - showTen: 0, - showEleven: 0, - showTwelve: 0, - showThirteen: 0, - showFourteen: 0, - showFifteen: 0, - showSixteen: 0, reminderEntry: "", reminderWeek: "", lastWeeksCashIncome: {}, diff --git a/js/utils.js b/js/utils.js index b9e28061be09c68dcd7bb8a688202fc7de17a4f5..0f2594c5b465de848d6467e92182059ce22bb10a 100644 --- a/js/utils.js +++ b/js/utils.js @@ -4,12 +4,15 @@ */ /** - * Returns whether x is undefined. Port of SugarCube's def. + * Returns whether x is defined. Port of SugarCube's def. * @param {any} x * @returns {boolean} */ function jsDef(x) { - return (typeof x !== "undefined" && x !== null && x !== undefined); + if (typeof x === "undefined" || x === null || x === undefined) { + return false; + } + return true; } /** diff --git a/src/uncategorized/scheduledEvent.tw b/src/uncategorized/scheduledEvent.tw index e6233aefff37d82717c9b9a23c6340ca8063bc44..177f9ce538e14ee9665f463fc8805fc8047c5e79 100644 --- a/src/uncategorized/scheduledEvent.tw +++ b/src/uncategorized/scheduledEvent.tw @@ -127,7 +127,7 @@ <<elseif ($birthee != 0)>> <<set $birthed = 0>> <<goto "SE Birth">> -<<elseif ($FCTV.receiver > 0) && $FCTV.pcViewership.frequency != -1 && $FCTV.pcViewership.count == 0>> +<<elseif $FCTV.receiver > 0 && $FCTV.pcViewership.frequency != -1 && $FCTV.pcViewership.count == 0>> <<if $week > 50 && $FCTV.remote < 2>> <<goto "SE FCTV Remote">> <<else>> <<goto "SE FCTV Watch">> <</if>>