diff --git a/src/js/relationshipChecks.js b/src/js/relationshipChecks.js index 6507db75550936deff4929d2eed5760f90ca1a3b..79e936e38a450cbaf9aeecb6e9d1dd9d34cf0dcd 100644 --- a/src/js/relationshipChecks.js +++ b/src/js/relationshipChecks.js @@ -1,35 +1,49 @@ +/** + * @param {{ rivalry: number; }} id + * @returns {string} + */ window.rivalryTerm = function(id) { if (id.rivalry === 1) { - return `growing rival`; + return "growing rival"; } else if (id.rivalry === 2) { - return `rival`; + return "rival"; } else { - return `bitter rival`; + return "bitter rival"; } }; + +/** + * @param {{ relationship: number; }} id + * @returns {string} + */ window.relationshipTerm = function(id) { if (id.relationship === 1) { - return `friend`; + return "friend"; } else if (id.relationship === 2) { - return `best friend`; + return "best friend"; } else if (id.relationship === 3) { - return `friend with benefits`; + return "friend with benefits"; } else if (id.relationship === 4) { - return `lover`; + return "lover"; } else { - return `slave wife`; + return "slave wife"; } }; + +/** + * @param {{ relationship: number; }} id + * @returns {string} + */ window.relationshipTermShort = function(id) { if (id.relationship === 1) { - return `friend`; + return "friend"; } else if (id.relationship === 2) { - return `BFF`; + return "BFF"; } else if (id.relationship === 3) { - return `FWB`; + return "FWB"; } else if (id.relationship === 4) { - return `lover`; + return "lover"; } else { - return `wife`; + return "wife"; } }; diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index 230c2e16b5f50a41956094f295112e90c6e26982..d40f8b2ef19fd04320f2185b077241c728d11776 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -249,7 +249,9 @@ window.removeActiveSlave = function removeActiveSlave() { V.JobIDArray = resetJobIDArray(); /* need to call this once more to update count of resting slaves*/ } }; - +/** + * @param {App.Entity.SlaveState} removedSlave + */ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { "use strict"; diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js index 5cae9ede34fd5f1bb82770e3e78ac59d397f74bf..399d95b4a9ff85ec0b1e2bf609444c1c036bb8a1 100644 --- a/src/js/rulesAssistant.js +++ b/src/js/rulesAssistant.js @@ -93,7 +93,6 @@ window.ruleApplied = function(slave, rule) { * remove slave from the facility described by the rule * @param {App.Entity.SlaveState} slave * @param {Object} rule - * @returns {string} */ window.RAFacilityRemove = function RAFacilityRemove(slave, rule) { const V = State.variables; @@ -195,7 +194,7 @@ window.RAFacilityRemove = function RAFacilityRemove(slave, rule) { /** * return whether the rule applies to the slave - * @param {Object} cond + * @param {{function:boolean|string, data, specialSlaves, selectedSlaves, excludedSlaves, assignment}} cond * @param {App.Entity.SlaveState} slave * @returns {boolean} flag */ window.ruleAppliesP = function ruleAppliesP(cond, slave) { diff --git a/src/js/sexActsJS.js b/src/js/sexActsJS.js index ec5868851a98ef90bf7fcb191d0b65619f28b852..573f3b7ba71fc3218ebc36aba22c15708c6fac05 100644 --- a/src/js/sexActsJS.js +++ b/src/js/sexActsJS.js @@ -1,7 +1,7 @@ -/* - times is how many times to increment the anal counts. - if left undefined it will assume it to be 1. -*/ +/** + * @param {number} [times=1] is how many times to increment the anal counts. + * @returns {string} + */ window.AnalVCheck = function AnalVCheck(times = 1) { const V = State.variables; const slave = V.activeSlave; @@ -52,10 +52,10 @@ window.AnalVCheck = function AnalVCheck(times = 1) { return r; }; -/* - times is how many times to increment the vaginal counts. - if left undefined it will assume it to be 1. -*/ +/** + * @param {number} [times=1] is how many times to increment the vaginal counts. + * @returns {string} + */ window.VaginalVCheck = function VaginalVCheck(times = 1) { const V = State.variables; const slave = V.activeSlave; @@ -109,10 +109,10 @@ window.VaginalVCheck = function VaginalVCheck(times = 1) { return r; }; -/* - analTimes is how many times to increment the anal counts, if there is no vagina available. - bothTimes is how many times to increment both holes counts (usually it is half of analTimes). - In both cases if left undefined it will assume it to be 1. +/** + * @param {number} [analTimes=1] how many times to increment the anal counts, if there is no vagina available. + * @param {number} [bothTimes=1] how many times to increment both holes counts (usually it is half of analTimes). + * @returns {string} */ window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) { const V = State.variables; @@ -237,11 +237,11 @@ window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) { return r; }; -/* - times is how many times to increment either the Vaginal or the Anal counts, if there is no Vagina available. - If left undefined it will assume it to be 1. +/** + * @param {number} [times=1] how many times to increment either the Vaginal or the Anal counts, if there is no Vagina available. + * @returns {string} */ -window.SimpleVCheck = function SimpleVCheck(times) { +window.SimpleVCheck = function SimpleVCheck(times=1) { let r = ``; if (canDoVaginal(State.variables.activeSlave)) { r += VaginalVCheck(times); @@ -322,11 +322,11 @@ window.PartnerVCheck = function PartnerVCheck(analTimes = 1, bothTimes = 1) { }; /** - count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave. - If count is left undefined it will assume it to be 1. - Intended to be a simple "I want to fuck x and not have to code a bunch of logic for it". + * fuckCount is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave. + * If count is left undefined it will assume it to be 1. + * Intended to be a simple "I want to fuck x and not have to code a bunch of logic for it". * @param {App.Entity.SlaveState} slave - * @param {number} fuckCount + * @param {number} [fuckCount=1] * @returns {string} */ window.SimpleSexAct = function SimpleSexAct(slave, fuckCount = 1) { @@ -387,7 +387,6 @@ window.SimpleSlaveFucking = function SimpleSlaveFucking(slave, fuckCount = 1) { slave.counter.oral += 1; } } - return; }; /** diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index 21add638d260a1ce64f11f5eb746ad074f26f6fa..a4a571ffe939660eeb3162e3d41a1c9410d0545b 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -19,7 +19,7 @@ window.Beauty = (function() { beauty += 30; calcFaceBeauty(slave); calcTeethBeauty(slave); - calcModBeauty(slave); + calcModBeauty(); calcCosmeticsBeauty(slave); calcFSNotFuckdollBeauty(slave); calcMiscNotFuckdollBeauty(slave); @@ -1833,7 +1833,7 @@ window.slaveCost = (function() { calcMiscCost(slave); calcIndentureCost(slave); /* multipliers */ - calcCost(slave); + calcCost(); if (isStartingSlave) { calcStartingSlaveCost(slave); } diff --git a/src/js/slaveGenerationJS.js b/src/js/slaveGenerationJS.js index 867e78ee5e518ad36a98bdc985ace9680ba5ef0b..a5e7d3fdb7924f14125c5000f6fa841b5feead62 100644 --- a/src/js/slaveGenerationJS.js +++ b/src/js/slaveGenerationJS.js @@ -23,6 +23,12 @@ window.raceToNationality = function raceToNationality(slave) { } }; +/** + * @param {string | Object} nationality + * @param {string | Object} race + * @param {boolean} male + * @param {undefined} [filter] + */ window.generateName = function generateName(nationality, race, male, filter) { filter = filter || _.stubTrue; /* default: allow all */ const lookup = (male ? setup.malenamePoolSelector : setup.namePoolSelector); @@ -36,6 +42,12 @@ window.generateName = function generateName(nationality, race, male, filter) { return result; }; +/** + * @param {string | number} nationality + * @param {any} race + * @param {any} male + * @param {() => true} filter + */ window.generateSurname = function generateSurname(nationality, race, male, filter) { filter = filter || _.stubTrue; /* default: allow all */ const result = jsEither( @@ -52,6 +64,12 @@ window.generateSurname = function generateSurname(nationality, race, male, filte return result || 0; }; +/** + * @param {string} name + * @param {string | Object} nationality + * @param {any} race + * @returns {boolean} + */ window.isMaleName = function isMaleName(name, nationality, race) { const names = setup.malenamePoolSelector[`${nationality}.${race}`] || setup.malenamePoolSelector[nationality] || @@ -1511,6 +1529,9 @@ window.generatePronouns = function generatePronouns(slave) { } }; +/** + * @param {App.Entity.SlaveState} slave + */ window.generatePuberty = function(slave) { if ((slave.ovaries === 1 || slave.mpreg === 1) && slave.physicalAge >= slave.pubertyAgeXX) { slave.pubertyXX = 1; @@ -1524,6 +1545,9 @@ window.generatePuberty = function(slave) { } }; +/** + * @param {App.Entity.SlaveState} slave + */ window.ageImplantAdjustment = function(slave) { if (slave.visualAge > 80) { slave.visualAge -= 40; diff --git a/src/js/storyJS.js b/src/js/storyJS.js index 97f535d36db4fd072e7b47cd613fa78004f981d8..2b07b507e0b900097bcf36d41ba4b5049b8851d6 100644 --- a/src/js/storyJS.js +++ b/src/js/storyJS.js @@ -1,10 +1,17 @@ /* config.history.tracking = false;*/ // State.expired.disable; -window.variableAsNumber = function(x, defaultValue, minValue, maxValue) { +/** + * @param {number} x + * @param {number} defaultValue + * @param {number} minValue + * @param {number} maxValue + * @returns {number} + */ +window.variableAsNumber = function(x, defaultValue = 0, minValue, maxValue) { x = Number(x); - if (x !== x) { // NaN - return defaultValue || 0; // In case the default value was not supplied. + if (isNaN(x)) { + return defaultValue; } if (x < minValue) { // Works even if minValue is undefined. return minValue; @@ -39,6 +46,11 @@ if (typeof interpolate === "undefined") { window.interpolate = interpolate; } +/** + * @param {any[]} arr + * @param {any} val + * @returns {any[]} + */ window.removeFromArray = function(arr, val) { for (let i = 0; i < arr.length; i++) { if (val === arr[i]) { @@ -48,6 +60,11 @@ window.removeFromArray = function(arr, val) { return null; }; +/** + * @param {any[]} arr + * @param {any} callback + * @param {any} thisArg + */ window.filterInPlace = function(arr, callback, thisArg) { let j = 0; @@ -121,6 +138,11 @@ window.canImpreg = function(slave1, slave2) { } }; +/** + * Determines whether PC is fertile + * @param {{ preg: number; pregWeek: number; vagina: number; }} PC + * @returns {boolean} + */ window.isPlayerFertile = function(PC) { if (!PC) { return null; @@ -139,7 +161,7 @@ window.isPlayerFertile = function(PC) { /** * @param {App.Entity.SlaveState} slave - * @returns {null | string} + * @returns {string|number} */ window.relationTargetWord = function(slave) { if (!slave) { @@ -179,7 +201,7 @@ window.milkAmount = function(slave) { milk = (8 + ((calcs - 400) / 50)); } if (slave.boobsImplant > 0) { - milk *= Math.max(.25, (1 - (slave.boobsImplant / slave.boobs))); + milk *= Math.max(0.25, (1 - (slave.boobsImplant / slave.boobs))); } if (slave.lactation === 2) { milk *= 1.2; @@ -252,6 +274,10 @@ window.cumAmount = function(slave) { return cum; }; +/** + * @param {string} text + * @returns {string} + */ window.lispReplace = function(text) { text = text.replace(/Sh/g, "Th"); text = text.replace(/SS/g, "Th"); @@ -337,7 +363,7 @@ window.lispReplace = function(text) { /** * @param {App.Entity.SlaveState} slave - * @param {object} arcology // I think + * @param {Object} arcology // I think * @returns {number} */ window.repGainSacrifice = function(slave, arcology) { @@ -394,6 +420,10 @@ window.ngUpdateMissingTable = function(missingTable) { return newTable; }; +/** + * @param {any} obj + * @returns {string} + */ window.toJson = function(obj) { let jsontext = JSON.stringify(obj); jsontext = jsontext.replace(/^{/, ""); @@ -436,7 +466,7 @@ window.nippleColor = function(slave) { /** * @param {App.Entity.SlaveState} slave - * @param {object} PC + * @param {Object} PC * @returns {number} */ window.overpowerCheck = function(slave, PC) { @@ -498,7 +528,6 @@ window.jsConsoleInfo = function(obj) { /** * @param {App.Entity.SlaveState} slave - * */ window.SoftenBehavioralFlaw = function SoftenBehavioralFlaw(slave) { switch (slave.behavioralFlaw) { @@ -535,7 +564,6 @@ window.SoftenBehavioralFlaw = function SoftenBehavioralFlaw(slave) { /** * @param {App.Entity.SlaveState} slave - * */ window.SoftenSexualFlaw = function SoftenSexualFlaw(slave) { switch (slave.sexualFlaw) { @@ -570,6 +598,9 @@ window.SoftenSexualFlaw = function SoftenSexualFlaw(slave) { slave.sexualFlaw = "none"; }; +/** + * @param {{ title: number; pronoun: string; possessivePronoun: string; possessive: string; object: string; objectReflexive: string; noun: string; }} PC + */ window.generatePlayerPronouns = function(PC) { if (PC.title === 0) { PC.pronoun = "she"; diff --git a/src/js/utilJS.js b/src/js/utilJS.js index cd73d409bc223bd394580fa92e9f80072420177a..8ceaa342ce25b7533fe5c5ba70fae058ce4d85bd 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -63,7 +63,11 @@ window.Height = (function() { let minHeight = 0; let maxHeight = 999; - // Configuration method for the above values + /** + * Configuration method for the above values + * @param {any} [conf] + * @returns {{ limitMult: number[]; limitHeight: number[]; skew: number; spread: number; }} + */ const _config = function(conf) { if (_.isUndefined(conf)) { return { @@ -537,13 +541,24 @@ window.Height = (function() { "": 171.42, // defaults }; - // Helper method - table lookup for nationality/race combinations + /** + * Helper method - table lookup for nationality/race combinations + * @param {{ [table: string]: number; }} table + * @param {string|Object} nationality + * @param {string} race + * @param {undefined} [def] + */ const nationalityMeanHeight = function(table, nationality, race, def) { return table[`${nationality}.${race}`] || table[nationality] || table[`.${race}`] || table[""] || def; }; - // Helper method: Generate a skewed normal random variable with the skew s - // Reference: http://azzalini.stat.unipd.it/SN/faq-r.html + + /** + * Helper method: Generate a skewed normal random variable with the skew s + * Reference: http://azzalini.stat.unipd.it/SN/faq-r.html + * @param {number} s + * @returns {number} + */ const skewedGaussian = function(s) { let randoms = gaussianPair(); if (s === 0) { @@ -555,7 +570,10 @@ window.Height = (function() { return randoms[0] >= 0 ? result : -result; }; - // Height multiplier generator; skewed gaussian according to global parameters + /** + * Height multiplier generator; skewed gaussian according to global parameters + * @returns {number} + */ const multGenerator = function() { let result = skewedGaussian(skew); while (result < minMult || result > maxMult) { @@ -564,7 +582,11 @@ window.Height = (function() { return result; }; - // Helper method: Generate a height based on the mean one and limited according to config. + /** + * Helper method: Generate a height based on the mean one and limited according to config. + * @param {number} mean + * @returns {number} + */ const heightGenerator = function(mean) { let result = mean * (1 + multGenerator() * spread); while (result < minHeight || result > maxHeight) { @@ -573,7 +595,13 @@ window.Height = (function() { return Math.round(result); }; - // Helper method - apply age and genes to the adult height + /** + * Helper method - apply age and genes to the adult height + * @param {number} height + * @param {number} age + * @param {string} genes + * @returns {number} + */ const applyAge = function(height, age, genes) { if (!_.isFinite(age) || age < 2 || age >= 20) { return height; @@ -616,6 +644,13 @@ window.Height = (function() { } }; + /** + * @param {string|{nationality: string, race: string, genes: string, physicalAge: number, birthWeek: number}} nationality + * @param {string} race + * @param {string} genes + * @param {number} age + * @returns {number} + */ const _meanHeight = function(nationality, race, genes, age) { if (_.isObject(nationality)) { // We got called with a single slave as the argument @@ -659,6 +694,12 @@ window.Height = (function() { return applyAge(result, age, genes); }; + /** + * @param {any} nationality + * @param {any} race + * @param {string} genes + * @param {number} age + */ const _randomHeight = function(nationality, race, genes, age) { const mean = _meanHeight(nationality, race, genes, age); // If we got called with a slave object and options, temporarily modify @@ -673,6 +714,12 @@ window.Height = (function() { return heightGenerator(mean); }; + /** + * @param {number} height + * @param {number|{physicalAge:number, birthWeek:number, genes:string}} age + * @param {string} genes + * @returns {number} + */ const _forAge = function(height, age, genes) { if (_.isObject(age)) { // We got called with a slave as a second argument @@ -690,7 +737,7 @@ window.Height = (function() { }; })(); -/* +/** * Intelligence.random(options) - returns a random intelligence. If no options are passed, the generated number * will be on a normal distribution with mean 0 and standard deviation 45. * @@ -720,6 +767,7 @@ window.Height = (function() { * intelligences until one "fits". * * This was modeled using the Height generator above. For some more information, see the comments for that. +* @returns {{random: number, _config: Object}} */ window.Intelligence = (function() { "use strict"; @@ -733,7 +781,10 @@ window.Intelligence = (function() { let minIntelligence = -101; let maxIntelligence = 100; - // Configuration method for the above values + /** + * Configuration method for the above values + * @param {{ mean: number; limitMult: number[]; limitIntelligence: number[]; skew: number; spread: number; } | { limitMult: number[]; limitIntelligence: number[]; skew: number; spread: number; mean?: undefined; }} [conf] + */ const _config = function(conf) { if (_.isUndefined(conf)) { return { @@ -771,8 +822,12 @@ window.Intelligence = (function() { }; }; - // Helper method: Generate a skewed normal random variable with the skew s - // Reference: http://azzalini.stat.unipd.it/SN/faq-r.html + /** + * Helper method: Generate a skewed normal random variable with the skew s + * Reference: http://azzalini.stat.unipd.it/SN/faq-r.html + * @param {number} s + * @returns {number} + */ const skewedGaussian = function(s) { let randoms = gaussianPair(); if (s === 0) { @@ -802,6 +857,10 @@ window.Intelligence = (function() { return Math.ceil(result); }; + /** + * @param {{ mean: number; limitMult: number[]; limitIntelligence: number[]; skew: number; spread: number; } | { limitMult: number[]; limitIntelligence: number[]; skew: number; spread: number; mean?: undefined; }} settings + * @returns {number} + */ const _randomIntelligence = function(settings) { if (settings) { const currentConfig = _config(); @@ -819,7 +878,10 @@ window.Intelligence = (function() { }; })(); -// Helper method - generate two independent Gaussian numbers using Box-Muller transform +/** + * Helper method - generate two independent Gaussian numbers using Box-Muller transform + * @returns {number[]} +*/ window.gaussianPair = function() { let r = Math.sqrt(-2.0 * Math.log(1 - Math.random())); let sigma = 2.0 * Math.PI * (1 - Math.random()); @@ -1182,6 +1244,7 @@ window.isFloat = function(n) { }; /** + * Returns a random number between min and max * @param {number} min * @param {number} max * @returns {number} @@ -1561,6 +1624,10 @@ window.ordinalSuffix = function ordinalSuffix(i) { return `${i}th`; }; +/** + * @param {Iterable<any>} array + * @returns {Set<any>} + */ window.removeDuplicates = function removeDuplicates(array) { return [...new Set(array)]; }; @@ -2036,9 +2103,11 @@ window.jsDef = function(input) { } }; -/* Return a career at random that would be suitable for the given slave. - - Currently only considers their age +/** + * Return a career at random that would be suitable for the given slave. + * Currently only considers their age + * @param {App.Entity.SlaveState} slave + * @returns {string} */ window.randomCareer = function(slave) { if (slave.actualAge < 16) { @@ -2052,6 +2121,9 @@ window.randomCareer = function(slave) { } }; +/** + * @param {App.Entity.SlaveState} slave + */ window.resyncSlaveToAge = function(slave) { slave.height = Height.random(slave); slave.pubertyXX = slave.actualAge < slave.pubertyAgeXX ? 0 : 1; @@ -2093,6 +2165,11 @@ window.resyncSlaveToAge = function(slave) { slave.career = randomCareer(slave); }; +/** + * @param {string} input + * @param {number} [increase=1] + * @returns {string} + */ window.IncreasePCSkills = function(input, increase = 1) { const player = State.variables.PC; const oldSkill = player[input]; @@ -2116,6 +2193,10 @@ window.IncreasePCSkills = function(input, increase = 1) { } }; +/** + * @param {string} raceName + * @returns {string} + */ window.randomRaceSkin = function(raceName) { let skin; switch (raceName) { @@ -2149,6 +2230,10 @@ window.randomRaceSkin = function(raceName) { return skin; }; +/** + * @param {string} raceName + * @returns {string} + */ window.randomRaceEye = function(raceName) { let eye; switch (raceName) { @@ -2178,6 +2263,10 @@ window.randomRaceEye = function(raceName) { return eye; }; +/** + * @param {string} raceName + * @returns {string} + */ window.randomRaceHair = function(raceName) { let hair; switch (raceName) { @@ -2205,6 +2294,10 @@ window.randomRaceHair = function(raceName) { return hair; }; +/** + * @param {string} skinTone + * @returns {number} + */ window.skinToneLevel = function(skinTone) { if (!setup.naturalSkins.includes(skinTone)) { return undefined; @@ -2239,6 +2332,13 @@ window.skinToneLevel = function(skinTone) { return skinToMelanin[skinTone]; }; +/** + * Increase or decrease skinTone + * @param {string} skin + * @param {number} value + * @returns {string} + */ + window.changeSkinTone = function(skin, value) { if (!setup.naturalSkins.includes(skin)) { return skin; @@ -2284,6 +2384,11 @@ window.changeSkinTone = function(skin, value) { return prop; }; +/** + * Determines if FS Decor level is above or equal to value + * @param {number} value + * @returns {boolean} + */ window.FSDecorLevel = function(value) { const V = State.variables; if (!value) { @@ -2339,8 +2444,7 @@ window.FSDecorLevel = function(value) { } else { return false; } -} - +}; /** * Creates a span for an link with tooltip containing the reasons why it is disabled @@ -2352,7 +2456,7 @@ App.UI.disabledLink = function(link, reasons) { const tooltips = reasons.length === 1 ? `<span class="tooltip">${reasons}</span>`: `<div class="tooltip"><ul>${reasons.map(e => `<li>${e}</li>`).join('')}</ul></div>`; - return '<span class="textWithTooltip">' + link + tooltips + '</span>'; + return `<span class="textWithTooltip">${link}${tooltips}</span>`; }; /** @@ -2381,4 +2485,4 @@ App.Utils.setActiveSlaveByIndex = function(index) { if (index >= 0) { State.variables.activeSlave = State.variables.slaves[index]; } -} +}; diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index fa78401819aa701ec5638d3b9a3641a812f7286c..d356b58a95ece518d12c6492f77f4b1de11b2378 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -1,6 +1,8 @@ :: Next Week [nobr] -<<run delete $storedReturn>> +<<if def $storedReturn>> <<run delete $storedReturn>> <</if>> +<<run delete $storedLink>> +<<run delete $storedButton>> <<set $HackingSkillMultiplier = HackingSkillMultiplier()>> <<set $upgradeMultiplierArcology = upgradeMultiplierArcology()>> <<set $upgradeMultiplierMedicine = upgradeMultiplierMedicine()>> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index 7039c783092de2394071d311bfb2b0fb1a961e46..87ff5f61f9ef566ebef0d60a847c8e0e82850c59 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -1,23 +1,23 @@ :: Options [nobr] -<<if $storedReturn === undefined>> <<set $storedReturn = "">> <</if>> +<<if ndef $storedLink>> <<set $storedLink = "">> <</if>> +<<if ndef $storedButton>> <<set $storedButton = "">> <</if>> <<set $showEncyclopedia = 0>> <<if lastVisited("attackReport") === 1>> - <<set $storedReturn = "attackReport">> - <<set $nextButton = "Back", $nextLink = "attackReport" || $storedReturn>> + <<set $storedButton = "Back">> + <<set $storedLink = "attackReport">> <<elseif lastVisited("rebellionReport") === 1>> - <<set $storedReturn = "rebellionReport">> - <<set $nextButton = "Back", $nextLink = "rebellionReport" || $storedReturn>> + <<set $storedButton = "Back">> + <<set $storedLink = "rebellionReport">> <<elseif lastVisited("Slave Assignments Report") === 1>> - <<set $storedReturn = "Slave Assignments Report">> - <<set $nextButton = "Back", $nextLink = "Slave Assignments Report" || $storedReturn>> -<<elseif lastVisited("Economics") === 1>> - <<set $storedReturn = "Economics">> - <<set $nextButton = "Back", $nextLink = "Economics" || $storedReturn>> -<<elseif passage() === "Options" && $storedReturn === "">> - <<set $nextButton = "Back to Main", $nextLink = "Main">> + <<set $storedButton = "Back">> + <<set $storedLink = "Slave Assignments Report">> +<<elseif passage() === "Options" && $storedLink === "" && $storedButton === "">> + <<set $storedButton = "Back to Main">> + <<set $storedLink = "Main">> <</if>> +<<set $nextButton = $storedButton, $nextLink = $storedLink>> ''SAVES'' <br> This save was created using FC version $ver build $releaseID. diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index ebdc8e7d06eeaedb29bc9c49f009dea27afaceb8..46ef284601db7b682d80ea91e35c7b7a4f175662 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -72,12 +72,6 @@ <</if>> <br><br> -<<if $newModelUI == 0>> - <<if _Pass == "Main">> - <span id="manageArcology"><<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">><</link>></span> @@.cyan;[C]@@ - <</if>> - <br> -<</if>> <<set $cash = Math.trunc($cash)>> <span id="cash"> <<if $cash > 0>> @@ -458,6 +452,18 @@ <</if>> <<if (_Pass == "Main")>> <<if $newModelUI == 0>> + <br><span id="policyButton"><<link [[Policies]]>><<set $nextButton = "Back", $nextLink = "Manage Corporation">><</link>></span> @@.cyan;[Y]@@ + <br><span id="URButton"><<link [[Universal Rules]]>><</link>></span> @@.cyan;[V]@@ + <<if $FSAnnounced>> + <br><span id="FSButton"><<link [[Future Societies|Future Society]]>><<set $nextButton = "Back", $nextLink = "Main">><</link>></span> @@.cyan;[F]@@ <<if ($FSCredits > 0) || ($FSReminder)>>@@.yellow;[!]@@<</if>> + <</if>> + <br><span id="PAOButton"><<link [[Personal Assistant|Personal assistant options]]>><</link>></span> @@.cyan;[T]@@<br> + + <<if $corpAnnounced == 1>><br><span id="manageCorporation"><<link "Manage Corporation">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Corporation">><</link>><<if ($corpSpecToken > 0) && ($corpSpecTimer == 0)>>@@.yellow;[!]@@<</if>></span><</if>> + <br><span id="manageArcology"><<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">><</link>></span> @@.cyan;[C]@@ + <br><span id="managePenthouse"><<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>></span> @@.cyan;[P]@@ + <br><span id="managePerson"><<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">><</link>></span> @@.cyan;[X]@@<br> + <<if ($HGSuite)>> <br> <<link "$HGSuiteNameCaps""Head Girl Suite">><</link>> <<if $abbreviateSidebar == 2>> @@ -587,11 +593,7 @@ <</if>> <br> <</if>> - - <<if $SF.Toggle && $SF.Active >= 1>> - <br><span id="SFMButton"> <<link "$SF.Caps's firebase""Firebase">><</link>> </span> @@.cyan;[Z]@@ - <</if>> - <<else>> + <<else>> /* $newModelUI === 1 */ <br><span id="policyButton"><<link [[Policies]]>><<set $nextButton = "Back", $nextLink = "Manage Corporation">><</link>></span> @@.cyan;[Y]@@ <br><span id="URButton"><<link [[Universal Rules]]>><</link>></span> @@.cyan;[V]@@ <<if $FSAnnounced>> @@ -694,8 +696,8 @@ <br> <</if>> -<<if $nextButton !== "Continue" && _Pass !== "Options" || ["Economics","Slave Assignments Report","attackReport","rebellionReport"].includes(passage())>> - <br><br> +<<if $nextButton !== "Continue" && _Pass !== "Options" || ["attackReport","rebellionReport","Slave Assignments Report"].includes(passage())>> + <<if ["attackReport","rebellionReport","Slave Assignments Report","Main"].includes(passage())>> <br> <</if>> <br> <span id="optionsButton"> <<link "Game Options">> <<set $nextButton = "Back", $nextLink = _Pass>>