diff --git a/src/004-base/facility.js b/src/004-base/facility.js index 3e685aa2e717768bc130ace40622142f7b75ab88..868496f2503f5e878bf79ede0d101adee0c4e6f2 100644 --- a/src/004-base/facility.js +++ b/src/004-base/facility.js @@ -552,7 +552,6 @@ App.Entity.Facilities.FacilitySingleJob = class extends App.Entity.Facilities.Jo callback(slave, assignment); } // Set up environment for the "Assign" passage - const V = State.variables; V.i = V.slaveIndices[slave.ID]; V.activeSlave = slave; V.assignTo = this.facility.genericName; @@ -562,7 +561,6 @@ App.Entity.Facilities.FacilitySingleJob = class extends App.Entity.Facilities.Jo /** @returns {number[]} */ employeesIndices() { - const V = State.variables; const si = V.slaveIndices; const ids = V[this._employeeIDsVariableName]; // updated by assignJob()/removeJob() return ids.map(id => si[id]); diff --git a/src/Mods/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js index 77f17dc9116b53dccde7725f78510e981426980b..510b93eb0f5de3e4c1e7d36aa79d6fa33f2bfd88 100644 --- a/src/Mods/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -1,6 +1,5 @@ // V=SugarCube.State.variables, T=SugarCube.State.temporary; App.SF.Init = function() { - const V = State.variables; V.SF.Toggle = V.SF.Toggle || 0; if (passage() === "init" || passage() === "New Game Plus") { V.SF = {Active: -1, Toggle:V.SF.Toggle}; @@ -72,7 +71,6 @@ App.SF.Init = function() { /* no-usedOnce */ App.SF.BC = function() { - const V = State.variables; function InitClean() { delete V.SFMODToggle; @@ -351,8 +349,7 @@ App.SF.BC = function() { /* usedOnce */ App.SF.fsIntegration = function(input = 'Menu', textDisplay = 100, text = `\n`) { - const Revivalisms = ['Arabian_Revivalism', 'Aztec_Revivalism', 'Chinese_Revivalism', 'Edo_Revivalism', 'Egyptian_Revivalism', 'Multiculturalism', 'Roman_Revivalism'], - V = State.variables; + const Revivalisms = ['Arabian_Revivalism', 'Aztec_Revivalism', 'Chinese_Revivalism', 'Edo_Revivalism', 'Egyptian_Revivalism', 'Multiculturalism', 'Roman_Revivalism']; let FS_OPTIONS = ['Asset_Expansionism', 'Body_Purism', 'Chattel_Religionism', 'Degradationism', 'Eugenics', 'Gender_radicalism', 'Gender_traditionalism', 'Hedonistic_Decadence', 'Maturity_Preferentialism', 'Paternalism', 'Physical_Idealism', 'Repopulation', 'Slave_Pastoralism', 'Slimness_Enthusiasm', 'Transformation_Fetishism', 'Youth_Preferentialism']; FS_OPTIONS = FS_OPTIONS.concat(Revivalisms); @@ -2250,7 +2247,7 @@ App.SF.fsIntegration = function(input = 'Menu', textDisplay = 100, text = `\n`) }; App.SF.AAR = function(endWeekCall = 1) { - const V = State.variables, + const T = State.temporary, S = V.SF.Squad, target = 50000, @@ -2637,7 +2634,7 @@ App.SF.AAR = function(endWeekCall = 1) { }; App.SF.Count = function() { - const V = State.variables, + const T = State.temporary, C = Math.clamp, // sure that's correct? // Yes it works as inteded. S = V.SF.Squad, @@ -2784,7 +2781,6 @@ App.SF.Count = function() { }; App.SF.NameCapsCheck = function() { - const V = State.variables; if (V.SF.Lower !== "the special force") { V.SF.Caps = capFirstChar(V.SF.Lower); } @@ -2792,7 +2788,7 @@ App.SF.NameCapsCheck = function() { App.SF.UpgradeCost = function(cost, unit) { "use strict"; - const V = State.variables, + const T = State.temporary, S = V.SF.Squad; let value = cost * T.Env * (1.15 + (V.SF.Size / 10)) * (1.15 + (unit / 100)); @@ -2843,7 +2839,6 @@ App.SF.progress = function(x, max) { }; App.SF.SFC = function() { - const V = State.variables; if (V.SF.MercCon.CanAttend === -1) { return `The Colonel`; } else { @@ -2855,7 +2850,7 @@ App.SF.SFC = function() { }; App.SF.ColonelStatus = function() { - const V = State.variables, + const C = V.SF.Colonel; if (C.Status <= 19) { return `boss`; @@ -2870,7 +2865,7 @@ App.SF.Interactions = function() { "use strict"; let choice = ``, time = ``; - const V = State.variables, + const C = V.SF.Colonel; if (V.SF.Gift > 0) { if (V.choice === 1) { @@ -2904,7 +2899,7 @@ App.SF.Interactions = function() { App.SF.UnitText = function(input) { "use strict"; - const V = State.variables, + const S = V.SF.Squad; // Sorted by case let appear = `is currently constructed in a haphazard fashion.`; diff --git a/src/SecExp/js/secExp.js b/src/SecExp/js/secExp.js index fe1a7fbe6fdadb903cd15b2733ee66d62e06b6f0..8d0c98ea617b9478d86fc7e986e8808b49b628ef 100644 --- a/src/SecExp/js/secExp.js +++ b/src/SecExp/js/secExp.js @@ -16,7 +16,6 @@ window.SecExpBase = function SecExpBase() { }; App.SecExp.upkeep = function(input = '') { - const V = State.variables; let value = 0; if (input === 'edictsCash') { const vars = ['slaveWatch', 'subsidyChurch', 'martialSchool', @@ -133,7 +132,6 @@ App.SecExp.conflict = (function() { }; function deployedUnits(input = '') { - const V = State.variables; let bots = 0, militiaC = 0, slavesC = 0, mercsC = 0, init = 0; if(V.slaveRebellion !== 1 && V.citizenRebellion !== 1) { if(V.secBots.isDeployed > 0) { @@ -227,7 +225,6 @@ App.SecExp.conflict = (function() { } function troopCount() { - const V = State.variables; let troops = 0; /* if (jsDef(V.SecExp.conflict) && jsDef(V.SecExp.conflict.type)) { @@ -334,7 +331,6 @@ App.SecExp.battle = (function() { }; function deploySpeed() { - const V = State.variables; let init = 1; if(V.readinessUpgrades.pathways > 0) { init += 1; @@ -355,7 +351,6 @@ App.SecExp.battle = (function() { } function deployableUnits() { - const V = State.variables; let init = 2 * App.SecExp.battle.deploySpeed(); if(V.secBots.isDeployed > 0) { init--; @@ -389,12 +384,10 @@ App.SecExp.battle = (function() { } function activeUnits() { - const V = State.variables; return V.secBots.isDeployed + V.militiaUnits.length + V.slaveUnits.length + V.mercUnits.length; } function maxUnits() { - const V = State.variables; let max = 8 + (V.SecExp.buildings.barracks.upgrades.size * 2); if(App.SecExp.battle.deploySpeed() === 10) { max += 2; @@ -403,7 +396,6 @@ App.SecExp.battle = (function() { } function recon() { - const V = State.variables; let recon = 0; if (V.intelUpgrades.sensors > 0) { recon++; @@ -418,7 +410,6 @@ App.SecExp.battle = (function() { } function bribeCost() { - const V = State.variables; let cost; const baseBribePerAttacker = 5; if (V.week <= 30) { cost = 5000 + baseBribePerAttacker * V.attackTroops; @@ -454,7 +445,6 @@ App.SecExp.Check = (function() { }; function general() { - const V = State.variables; /* function jsDel(input) { for(let i = 0; i < input.length; i++) { if (jsDef(input[i] === true)) { @@ -493,7 +483,6 @@ App.SecExp.Check = (function() { */ V.SecExp.core.trade = V.SecExp.core.trade || 0; if (passage() === "Acquisition" || V.SecExp.core.trade === 0) { - const V = State.variables; let init = jsRandom(20, 30); if (V.terrain === "urban") { init += jsRandom(10, 10); @@ -1449,7 +1438,6 @@ App.SecExp.Check = (function() { } // Closes general check function. function secRestPoint() { - const V = State.variables; let rest = 40; /* if (V.SecExp.security.hq.upgrades.security >= 0) { @@ -1482,7 +1470,6 @@ App.SecExp.Check = (function() { } function crimeCap() { - const V = State.variables; let cap = 100; /* if (V.SecExp.security.hq.upgrades.crime >= 0) { @@ -1515,7 +1502,6 @@ App.SecExp.Check = (function() { } function reqMenials() { - const V = State.variables; let Req = 20; /* if (V.SecExp.security.hq.upgrades.security >= 0) { @@ -1621,7 +1607,6 @@ App.SecExp.Check = (function() { /* function fixBrokenStats() { - const V = State.variables; if (!isInt(V.SecExp.army.totalKills)) { V.SecExp.army.totalKills = 0; } @@ -1651,7 +1636,6 @@ App.SecExp.Check = (function() { } function baseStats() { - const V = State.variables; for (let i = 0; i < V.SecExp.army.unitPool.length; i++) { if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]])) { V.SecExp.army.units[V.SecExp.army.unitPool[i]].base = V.SecExp.army.units[V.SecExp.army.unitPool[i]].base || {}; @@ -1718,7 +1702,6 @@ App.SecExp.Check = (function() { } function fixBrokenUnits(input) { TODO: Sync with latest layout. - const V = State.variables; let r=''; for (let i=0; i<input.length; i++) { if (input[i] === 'secBots') { @@ -1784,7 +1767,6 @@ App.SecExp.Check = (function() { } function Generator(mode = '') { - const V = State.variables; V.SecExp.conflict.type = 0 - 'slave rebellion' V.SecExp.conflict.type = 1 - 'citizen rebellion' V.SecExp.conflict.type = 2 - 'battle' @@ -2528,7 +2510,7 @@ App.SecExp.Check = (function() { })(); // Closes check function. /* App.SecExp.UnitUpgradeCosts = function(Unit) { - const V = State.variables, T = State.temporary, + const T = State.temporary, UpgradeCost = {equip:250, secBots:250}; T.cost = {}; T.cost.overall = 0; T.cost.size = 0; T.cost.equip=0; T.cost.commissars = 0; T.cost.cyber = 0; T.cost.medics = 0; T.cost.sf = 0; @@ -2564,8 +2546,7 @@ App.SecExp.report = (function() { }; function trade() { - let tradeChange = 0; - const V = State.variables; let r = ``; + let tradeChange = 0; let r = ``; if (V.week < 30) { r += `The world economy is in good enough shape to sustain economic growth. Trade flows liberally in all the globe.`; tradeChange += 1; @@ -2727,8 +2708,7 @@ App.SecExp.report = (function() { return r; } // Closes trade report function. - function security() { - const V = State.variables; let r = ``; + function security() { let r = ``; let emigration = 0, immigration = 0; if (V.ACitizens > V.oldACitizens) { immigration += V.ACitizens - V.oldACitizens; @@ -3493,8 +3473,7 @@ App.SecExp.report = (function() { } } // Closes security report function. - function authority() { - const V = State.variables; let r = ``; + function authority() { let r = ``; if (V.useTabs === 0) { r += `__Authority__`; } @@ -3672,8 +3651,7 @@ App.SecExp.report = (function() { return r; } // Closes authority report function. - function rebellionInit() { - const V = State.variables; let r = ``; + function rebellionInit() { let r = ``; r += `In the end it happened, the `; if (V.SecExp.conflict.type === 0) { r += `slaves`; @@ -3691,8 +3669,7 @@ App.SecExp.report = (function() { return r; } - function enemyTroops() { - const V = State.variables; let r = ``; + function enemyTroops() { let r = ``; if (V.SecExp.conflict.attacker.equip <= 0) { r += `<strong>poorly armed</strong>.`; if (V.SecExp.conflict.type >= 2) { @@ -3727,8 +3704,7 @@ App.SecExp.report = (function() { } } - function conflictEnd() { - const V = State.variables; let r = ``; + function conflictEnd() { let r = ``; let day = V.day + random(0, 7); let month = V.month; let year = V.year; @@ -3834,9 +3810,9 @@ App.SecExp.unit = (function() { idGen:generateUnitID,*/ }; - function description(input, unitType = '') { - const V = State.variables; let r = ``; - if (V.SecExp.settings.unitDescriptions === 0) { + function description(input, unitType = '') { + let r = ``; + if (V.SecExp.settings.unitDescriptions === 0) { if (unitType !== "Bots") { r += `\n<strong>${input.platoonName}</strong> `; } else { @@ -4000,7 +3976,6 @@ App.SecExp.unit = (function() { } /* function generateNew(input) { - const V = State.variables; if (V.SecExp.battle[input] === undefined) { V.SecExp.battle[input] = {created:0, squads:[]}; if (input !== "Bots") { @@ -4069,7 +4044,6 @@ App.SecExp.unit = (function() { } function remove(Unit) { - const V = State.variables; // args[0] is the array of IDs of units to be eliminated let newTarget=[]; for (let i=0; i < V.rawArray.length; i++) { @@ -4081,7 +4055,6 @@ App.SecExp.unit = (function() { } function generateUnitID(input) { - const V = State.variables; let newID = 0; for(let i = 0; i < V.SecExp.battle[input].squads.length; i++) { if (V.SecExp.battle[input].squads[i].ID >= newID) { diff --git a/src/art/artJS.js b/src/art/artJS.js index 369e3b6904e363352d8cf43b8ef74a92fffaef92..96c80000f6bf3a7deac8004500a49ee528d82965 100644 --- a/src/art/artJS.js +++ b/src/art/artJS.js @@ -70,7 +70,6 @@ window.CustomArt = function(slave, imageSize) { * @returns {HTMLElement} */ App.Art.renderedArtElement = function(slave, artSize) { - const V = State.variables; let fileName = "resources/renders/"; if (slave.belly > 1500) { diff --git a/src/art/assistantArt.js b/src/art/assistantArt.js index 9588a5dcfdb7330c280e0a90acc7373966577683..c20ef028817cd66a5eccca2dae4d1bb68cf3e0de 100644 --- a/src/art/assistantArt.js +++ b/src/art/assistantArt.js @@ -5,7 +5,6 @@ sizePlacement: Image size/center. 2: Medium, right. Example: random events. */ window.assistantArt = function assistantArt(sizePlacement) { - const V = State.variables; let fileName = ""; if (V.seeAvatar !== 1) { return; } diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js index bf93e2aac601dcaf643c94f5f4fde67ef1aa15c0..a727bec5e35eee6f9ae285a4f4333385b5a56e2b 100644 --- a/src/art/vector/VectorArtJS.js +++ b/src/art/vector/VectorArtJS.js @@ -8,7 +8,7 @@ window.LegacyVectorArt = function(slave, artSize) { App.Art.vectorArtElement = (function() { "use strict"; - let V, T, slave; + let T, slave; let leftArmType, rightArmType, legSize, torsoSize, buttSize, penisSize, hairLength, wearingLatex; let bellyScaleFactor, artBoobScaleFactor, heightScaleFactor; let artTranslationX, artTranslationY; @@ -18,7 +18,6 @@ App.Art.vectorArtElement = (function() { function VectorArt(artSlave, artSize) { /* set constants */ - V = State.variables; T = State.temporary; slave = artSlave; wearingLatex = slave.clothes === "a Fuckdoll suit" || slave.clothes === "restrictive latex" || slave.clothes === "a latex catsuit"; diff --git a/src/art/vector_revamp/vectorRevampedArtControl.js b/src/art/vector_revamp/vectorRevampedArtControl.js index 2f8e78c03ba1ee82ec5d64a7bc176021cdb840bc..777e24b26bebf37cd482239409468acb051138c8 100644 --- a/src/art/vector_revamp/vectorRevampedArtControl.js +++ b/src/art/vector_revamp/vectorRevampedArtControl.js @@ -38,8 +38,6 @@ App.Art.revampedVectorArtElement = function(slave) { return res; } - - const V = State.variables; const T = State.temporary; if (T.art_display_id > 0) { diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index 2e2b244b61f702c34bbff51f56ed9399a4efd1a0..eae783f873b0ef43d47d1362adf23b17d5152a1a 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -1,6 +1,6 @@ window.saChoosesOwnClothes = (function() { "use strict"; - let V; + let player; let r; /* eslint-disable no-unused-vars*/ @@ -19,7 +19,6 @@ window.saChoosesOwnClothes = (function() { * @returns {string} */ function saChoosesOwnClothes(slave) { - V = State.variables; player = V.PC; r = ""; if (slave.choosesOwnClothes !== 1) { return r; } diff --git a/src/endWeek/saNanny.js b/src/endWeek/saNanny.js index 228a103769518a9064e985b919d45d71ecdca7fa..fc3685f8c188545f7a1071d73726d07a4b700a7e 100644 --- a/src/endWeek/saNanny.js +++ b/src/endWeek/saNanny.js @@ -4,7 +4,7 @@ */ window.saNanny = function saNanny(slave) { "use strict"; - const V = State.variables, + const { // eslint-disable-next-line no-unused-vars he, him, his, hers, himself, boy, He, His diff --git a/src/endWeek/saRest.js b/src/endWeek/saRest.js index dd51002ce5a3b8401be01eefbfc54aeb3a50bdaa..0b449f83928cdd4500ef5464e03fa6a4020ebc18 100644 --- a/src/endWeek/saRest.js +++ b/src/endWeek/saRest.js @@ -3,7 +3,6 @@ * @returns {string} */ window.saRest = function saRest(slave) { - const V = State.variables; /* eslint-disable no-unused-vars*/ const { he, him, his, hers, himself, boy, diff --git a/src/endWeek/saRules.js b/src/endWeek/saRules.js index ab26cf855f3cf8413ac562de330c408ee7ad83c6..450a0d8ba932aef71f05b9c08abdf233925df66c 100644 --- a/src/endWeek/saRules.js +++ b/src/endWeek/saRules.js @@ -1,16 +1,12 @@ -window.saRules = (function() { +$(function() { "use strict"; const - V = State.variables, PC = V.PC, energy = V.freeSexualEnergy, averageDick = V.averageDick, slaves = V.slaves; - let - r; - /** * @param {App.Entity.SlaveState} slave * @returns {string} @@ -25,7 +21,7 @@ window.saRules = (function() { let release = slave.releaseRules; - r = ``; + let r = ``; // TODO: may need updating to detail effect of chastity @@ -1586,5 +1582,5 @@ window.saRules = (function() { return false; } - return saRules; -})(); + window.saRules = saRules; +}); diff --git a/src/endWeek/saServant.js b/src/endWeek/saServant.js index 3fca07d9db9fa3302eca81b996569dbd621cd1ca..d403f24a8d4f32bf8cb93bac9bb518410585a292 100644 --- a/src/endWeek/saServant.js +++ b/src/endWeek/saServant.js @@ -3,7 +3,6 @@ * @returns {string} */ window.saServant = function saServant(slave) { - const V = State.variables; /* eslint-disable no-unused-vars*/ const { he, him, his, hers, himself, boy, wife, diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js index e3689b524be2fb75f7c9d5744be4d627713776dd..c0d7675cf3db817b5c758b347f581bc2eff79f84 100644 --- a/src/endWeek/saServeThePublic.js +++ b/src/endWeek/saServeThePublic.js @@ -1,6 +1,6 @@ window.saServeThePublic = (function saServeThePublic() { "use strict"; - let V; + let T; let r; let arcology; @@ -23,7 +23,6 @@ window.saServeThePublic = (function saServeThePublic() { * @returns {string} */ function saServeThePublic(slave) { - V = State.variables; T = State.temporary; arcology = V.arcologies[0]; r = ` `; diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js index 7b77f387e5fc34deea5d243e2895141ccb979756..878fd6222c3a584aa91ba9726ead16d6c0b8634b 100644 --- a/src/endWeek/saStayConfined.js +++ b/src/endWeek/saStayConfined.js @@ -3,7 +3,6 @@ * @returns {string} */ window.saStayConfined = function saStayConfined(slave) { - const V = State.variables; /* eslint-disable no-unused-vars*/ const { he, him, his, hers, himself, boy, diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index 59f0b260f1b6c67178b52bc3f66a864474e379ed..fd25a072acd59e7ced23daa5260a81c3a1b3e4e4 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -1,6 +1,6 @@ window.saWhore = (function saWhore() { "use strict"; - let V; + let T; let r; let arcology; @@ -29,7 +29,6 @@ window.saWhore = (function saWhore() { * @returns {string} */ function saWhore(slave) { - V = State.variables; T = State.temporary; arcology = V.arcologies[0]; r = ` `; diff --git a/src/endWeek/saWorkAGloryHole.js b/src/endWeek/saWorkAGloryHole.js index 7b558c50a80df029715e055d6e267cac70a93b5d..470292cd2ae3bfcc196c53b4a4d6d4f600efeee9 100644 --- a/src/endWeek/saWorkAGloryHole.js +++ b/src/endWeek/saWorkAGloryHole.js @@ -1,6 +1,6 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() { "use strict"; - let V; + let T; let r; let beauty; @@ -23,7 +23,6 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() { * @returns {string} */ function saWorkAGloryHole(slave) { - V = State.variables; T = State.temporary; r = ``; ({ diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js index 3ef28f6270ee45dc48b8d777444abb4ac29859e9..1a1246023697a1f39521d8c26426809315c2be96 100644 --- a/src/endWeek/saWorkTheFarm.js +++ b/src/endWeek/saWorkTheFarm.js @@ -4,7 +4,6 @@ */ window.saWorkTheFarm = function saWorkTheFarm(slave) { "use strict"; - const V = State.variables; const arcology = V.arcologies[0]; /* eslint-disable no-unused-vars*/ const { diff --git a/src/facilities/clinic/clinicFramework.js b/src/facilities/clinic/clinicFramework.js index 7d7ec04e11eb4d5a7ba36261b70a956cc61709cd..614f439ebf68929ae35246a69ff3df7f887d3605 100644 --- a/src/facilities/clinic/clinicFramework.js +++ b/src/facilities/clinic/clinicFramework.js @@ -35,7 +35,6 @@ App.Entity.Facilities.ClinicPatientJob = class extends App.Entity.Facilities.Fac */ canEmploy(slave) { let r = super.canEmploy(slave); - const V = State.variables; if ((slave.health >= 20) && (V.Nurse === 0 || ((slave.chem <= 15 || this.facility.upgrade("Filters") !== 1) && diff --git a/src/facilities/dairy/dairyFramework.js b/src/facilities/dairy/dairyFramework.js index acb594e468ebdf1d95b2c9a58b830bb53fc9328f..d1e476bfa21cda890d0956b0254e2e6b079f8a2f 100644 --- a/src/facilities/dairy/dairyFramework.js +++ b/src/facilities/dairy/dairyFramework.js @@ -36,8 +36,6 @@ App.Entity.Facilities.DairyCowJob = class extends App.Entity.Facilities.Facility canEmploy(slave) { let r = super.canEmploy(slave); - const V = State.variables; - if ((slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) { r.push(`${slave.slaveName}'s indenture forbids extractive Dairy service.`); } @@ -81,7 +79,6 @@ App.Entity.Facilities.Dairy = class extends App.Entity.Facilities.SingleJobFacil } get hasFreeSpace() { - const V = State.variables; const dairySeed = V.bioreactorsXY + V.bioreactorsXX + V.bioreactorsHerm + V.bioreactorsBarren; return this.capacity > this.hostedSlaves + dairySeed; } diff --git a/src/facilities/farmyard/farmyard.tw b/src/facilities/farmyard/farmyard.tw index 4dd5d7e0b041ba3944294e761ea412fb358a32f0..ef500fcdddad9034de4d083fc3a5107efad3fd0d 100644 --- a/src/facilities/farmyard/farmyard.tw +++ b/src/facilities/farmyard/farmyard.tw @@ -300,7 +300,6 @@ $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and a couple different <<set $onlyDogs = 0>> <<run $canines.forEach(function(c) { - const V = State.variables; if (c.species == "dog") { V.onlyDogs = 1; } @@ -381,7 +380,6 @@ $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and a couple different <<set $onlyCats = 0>> <<run $felines.forEach(function(c) { - const V = State.variables; if (c.species == "cat") { V.onlyCats = 1; } diff --git a/src/facilities/nursery/nurseryDatatypeCleanup.js b/src/facilities/nursery/nurseryDatatypeCleanup.js index f31cc2872b98fe6e6379824a1d2e8c438f138745..f17db121f258d2f8a2d8a0e942d1fbfe111572db 100644 --- a/src/facilities/nursery/nurseryDatatypeCleanup.js +++ b/src/facilities/nursery/nurseryDatatypeCleanup.js @@ -24,7 +24,6 @@ App.Facilities.Nursery.ChildDatatypeCleanup = function(child) { generatePronouns(child); function childAgeDatatypeCleanup(child) { - const V = State.variables; child.birthWeek = Math.clamp(+child.birthWeek, 0, 51) || 0; if (child.age > 0) { @@ -537,7 +536,6 @@ App.Facilities.Nursery.InfantDatatypeCleanup = function(child) { generatePronouns(child); function ageDatatypeCleanup(child) { - const V = State.variables; child.birthWeek = Math.clamp(+child.birthWeek, 0, 51) || 0; child.actualAge = Math.clamp(+child.actualAge, V.minimumChildAge, Infinity) || 0; diff --git a/src/facilities/nursery/nurseryWidgets.js b/src/facilities/nursery/nurseryWidgets.js index 375bf2c8a00efc5138061a1d85e69975960fab1f..969ca6e48d36cc0e30a0aa1eb869dda2545be8a2 100644 --- a/src/facilities/nursery/nurseryWidgets.js +++ b/src/facilities/nursery/nurseryWidgets.js @@ -8,7 +8,6 @@ App.Facilities.Nursery.InfantSummary = function(child) { "use strict"; const - V = State.variables, weeksOwned = V.week - child.weekAcquired; let @@ -1822,7 +1821,6 @@ App.Facilities.Nursery.InfantSummary = function(child) { App.Facilities.Nursery.LongInfantDescription = function(child) { "use strict"; const - V = State.variables, PC = V.PC, arcology = V.arcologies[0], weeksOwned = V.week - child.weekAcquired; @@ -2439,8 +2437,6 @@ App.Facilities.Nursery.LongInfantDescription = function(child) { */ App.Facilities.Nursery.ChildSummary = function(child) { "use strict"; - const - V = State.variables; let r = ``; @@ -6967,7 +6963,6 @@ App.Facilities.Nursery.LongChildDescription = function(child) { // declarations const - V = State.variables, arcology = V.arcologies[0], PC = V.PC, slaves = V.slaves, @@ -15481,7 +15476,6 @@ App.Facilities.Nursery.LongChildDescription = function(child) { App.Facilities.Nursery.childList = function() { "use strict"; const - V = State.variables, cribs = V.cribs; let @@ -15907,7 +15901,6 @@ App.Facilities.Nursery.infantToChild = function infantToChild(child) { */ App.Facilities.Nursery.nameChild = function nameChild(child) { const - V = State.variables, PC = V.PC, arcology = V.arcologies[0], girl = child.genes === "XX" ? "girl" : "boy"; @@ -15948,7 +15941,6 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { function parentNames(parent, child) { const - V = State.variables, slaves = V.slaves; let @@ -16151,7 +16143,6 @@ App.Facilities.Nursery.nameChild = function nameChild(child) { * @param {App.Entity.ChildState} child */ App.Facilities.Nursery.newChild = function newChild(child) { - const V = State.variables; child.ID = V.nIDNumber++; @@ -16259,7 +16250,6 @@ App.Facilities.Nursery.removeChild = function removeChild(index) { App.Facilities.Nursery.nurserySort = function nurserySort() { "use strict"; const - V = State.variables, PC = V.PC, SL = V.slaves.length, arcology = V.arcologies[0]; @@ -18674,7 +18664,6 @@ App.Facilities.Nursery.childrenReport = function childrenReport() { "use strict"; const - V = State.variables, Matron = V.Matron, NL = V.NurseryiIDs.length, CL = V.cribs.length; @@ -19089,7 +19078,6 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { let r = ``; const - V = State.variables, Matron = getSlave(V.Matron.ID), arcology = V.arcologies[0]; diff --git a/src/facilities/nursery/scenes/fChildWidgets.js b/src/facilities/nursery/scenes/fChildWidgets.js index 7552e9b29212992d8327db73c04e704105566136..e0b3dc6a236464921e9f5290fff0a73c419db7a1 100644 --- a/src/facilities/nursery/scenes/fChildWidgets.js +++ b/src/facilities/nursery/scenes/fChildWidgets.js @@ -1,7 +1,5 @@ App.Facilities.Nursery.fChildOral = function fChildOral(child) { "use strict"; - const - V = State.variables; let r = ``; @@ -16,8 +14,6 @@ App.Facilities.Nursery.fChildOral = function fChildOral(child) { App.Facilities.Nursery.fChildVaginal = function fChildVaginal(child) { "use strict"; - const - V = State.variables; let r = ``; @@ -32,8 +28,6 @@ App.Facilities.Nursery.fChildVaginal = function fChildVaginal(child) { App.Facilities.Nursery.fChildAnal = function fChildAnal(child) { "use strict"; - const - V = State.variables; let r = ``; @@ -49,7 +43,6 @@ App.Facilities.Nursery.fChildAnal = function fChildAnal(child) { App.Facilities.Nursery.fChildImpreg = function fChildImpreg(child) { "use strict"; const - V = State.variables, bonus = jsRandom(6, 20); let diff --git a/src/facilities/pit/pitFramework.js b/src/facilities/pit/pitFramework.js index 8694f2301c70d6d893799f9d97b5e05e233abca3..86a3355bb950d3bcd03afc54afb9d9051881eb3c 100644 --- a/src/facilities/pit/pitFramework.js +++ b/src/facilities/pit/pitFramework.js @@ -38,7 +38,6 @@ App.Entity.Facilities.PitFighterJob = class extends App.Entity.Facilities.Facili } employeesIndices() { - const V = State.variables; const si = V.slaveIndices; return V.fighterIDs.map(id => si[id]); } diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js index 33e7bb2361e796ec84c9d295b778b70cb3b64c0e..ba03d63c83c30c13e7a52778f37fe8cdfc0c46eb 100644 --- a/src/interaction/main/mainLinks.js +++ b/src/interaction/main/mainLinks.js @@ -1,7 +1,6 @@ /* OPEN MAIN */ App.UI.View.MainLinks = function() { "use strict"; - const V = State.variables; const PA = Array.isArray(V.personalAttention) ? V.personalAttention.map(x => getSlave(x.ID)) : []; let r = ''; diff --git a/src/interaction/main/toychest.js b/src/interaction/main/toychest.js index 26747f7fe0c8d97c033210bb071697601f33762e..a38fde936e4709897a89eaecccb6543d9d2cdb5e 100644 --- a/src/interaction/main/toychest.js +++ b/src/interaction/main/toychest.js @@ -1,7 +1,6 @@ /* OPEN TOYCHEST */ App.Interact.ToyChest = function(slave) { "use strict"; - const V = State.variables; let r = ``; /* eslint-disable no-unused-vars*/ const { diff --git a/src/interaction/main/walkPast.js b/src/interaction/main/walkPast.js index e2fa450ae6bf6b6c4181ef7095bb815c2eb7afe6..7af03c2679ac50044c855e7ed6bd5fb120841a3f 100644 --- a/src/interaction/main/walkPast.js +++ b/src/interaction/main/walkPast.js @@ -3,7 +3,7 @@ window.walkPast = (function() { "use strict"; - let V; + // core string variables let t; @@ -35,7 +35,6 @@ window.walkPast = (function() { function walkPast(activeSlave, fixed) { output = ""; - V = State.variables; seed = jsRandom(1, 100); watchArray = []; name = activeSlave.slaveName; diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 17c173918ede86cb18c4e82e9e84755bbaf4a6ea..2d9f015bcc4d3d2b1c389bd26f945d8d15de77a7 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -2,7 +2,7 @@ window.DefaultRules = (function() { "use strict"; - let V; + let r; let he; let him; @@ -14,8 +14,6 @@ window.DefaultRules = (function() { */ function DefaultRules(slave) { if (slave.useRulesAssistant === 0) { return r; } // exempted - - V = State.variables; r = ""; ({he, him, his} = getPronouns(slave)); let rule = MergeRules(slave); diff --git a/src/js/PenthouseNaming.js b/src/js/PenthouseNaming.js index a894cd61a6bcee1c4e4a784d365d8662079a2c39..1397106c83636c43c8a1adf2a1b695e3d6b36fbe 100644 --- a/src/js/PenthouseNaming.js +++ b/src/js/PenthouseNaming.js @@ -2,7 +2,6 @@ * @returns {string} */ window.MasterSuiteUIName = function() { - const V = State.variables; const name = (V.masterSuiteNameCaps === "The Master Suite") ? "Master Suite" : V.masterSuiteNameCaps; return `<<link "${name}""Master Suite">><</link>> `; }; @@ -11,7 +10,6 @@ window.MasterSuiteUIName = function() { * @returns {string} */ window.HeadGirlSuiteUIName = function() { - const V = State.variables; const name = (V.HGSuiteNameCaps === "The Head Girl Suite") ? "Head Girl Suite" : V.HGSuiteNameCaps; return `<<link "${name}""Head Girl Suite">><</link>> `; }; @@ -20,7 +18,6 @@ window.HeadGirlSuiteUIName = function() { * @returns {string} */ window.ServantQuartersUIName = function() { - const V = State.variables; const name = (V.servantsQuartersNameCaps === "The Servants' Quarters") ? "Servants' Quarters" : V.servantsQuartersNameCaps; return `<<link "${name}""Servants' Quarters">><</link>> `; }; @@ -29,7 +26,6 @@ window.ServantQuartersUIName = function() { * @returns {string} */ window.SpaUIName = function() { - const V = State.variables; const name = (V.spaNameCaps === "The Spa") ? "Spa" : V.spaNameCaps; return `<<link "${name}""Spa">><</link>> `; }; @@ -38,7 +34,6 @@ window.SpaUIName = function() { * @returns {string} */ window.NurseryUIName = function() { - const V = State.variables; const name = (V.nurseryNameCaps === "The Nursery") ? "Nursery" : V.nurseryNameCaps; return `<<link "${name}""Nursery">><</link>> `; }; @@ -47,7 +42,6 @@ window.NurseryUIName = function() { * @returns {string} */ window.ClinicUIName = function() { - const V = State.variables; const name = (V.clinicNameCaps === "The Clinic") ? "Clinic" : V.clinicNameCaps; return `<<link "${name}""Clinic">><</link>> `; }; @@ -56,7 +50,6 @@ window.ClinicUIName = function() { * @returns {string} */ window.SchoolRoomUIName = function() { - const V = State.variables; const name = (V.schoolroomNameCaps === "The Schoolroom") ? "Schoolroom" : V.schoolroomNameCaps; return `<<link "${name}""Schoolroom">><</link>> `; }; @@ -65,7 +58,6 @@ window.SchoolRoomUIName = function() { * @returns {string} */ window.CellblockUIName = function() { - const V = State.variables; const name = (V.cellblockNameCaps === "The Cellblock") ? "Cellblock" : V.cellblockNameCaps; return `<<link "${name}""Cellblock">><</link>> `; }; @@ -74,7 +66,6 @@ window.CellblockUIName = function() { * @returns {string} */ window.IncubatorUIName = function() { - const V = State.variables; const name = (V.incubatorNameCaps === "The Incubator") ? "Incubator" : V.incubatorNameCaps; return `<<link "${name}""Incubator">><</link>> `; }; diff --git a/src/js/assayJS.js b/src/js/assayJS.js index 2df94d0d47cfb5d46a527cd08735461f90305fef..f23ff8f23fa59697e9a7f83839f69a17c7df547c 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -63,7 +63,6 @@ window.hasVisibleHeterochromia = function hasVisibleHeterochromia(slave) { * @returns {boolean} */ window.isLeaderP = function isLeaderP(slave) { - const V = State.variables; /** @type {App.Entity.SlaveState[]} */ const leaders = [V.HeadGirl, V.Bodyguard, V.Recruiter, V.Concubine, V.Nurse, V.Attendant, V.Matron, V.Madam, V.DJ, V.Milkmaid, V.Farmer, V.Stewardess, V.Schoolteacher, V.Wardeness]; return leaders.some(leader => leader.ID && leader.ID === slave.ID); @@ -73,7 +72,6 @@ window.isLeaderP = function isLeaderP(slave) { * @param {App.Entity.SlaveState} slave */ window.newSlave = function newSlave(slave) { - const V = State.variables; if (slave.override_Eye_Color !== 1) { switch (slave.eyeColor) { @@ -396,7 +394,6 @@ window.getPronouns = function(obj) { * @returns {string} */ window.WrittenMaster = function WrittenMaster(slave) { - const V = State.variables; if (slave !== undefined) { Enunciate(slave); } else if (V.titleEnunciate === undefined) { @@ -409,7 +406,6 @@ window.WrittenMaster = function WrittenMaster(slave) { * @param {App.Entity.SlaveState} slave */ window.Enunciate = function Enunciate(slave) { - const V = State.variables; if (SlaveStatsChecker.checkForLisp(slave)) { if (V.PC.customTitleLisp !== undefined) { V.titleEnunciate = V.PC.customTitleLisp; @@ -572,7 +568,6 @@ window.Enunciate = function Enunciate(slave) { * @returns {number} */ window.fetishChangeChance = function fetishChangeChance(slave) { - const V = State.variables; let chance = 0, sex = 0; @@ -593,7 +588,6 @@ window.fetishChangeChance = function fetishChangeChance(slave) { * @returns {string} */ window.SlaveFullName = function SlaveFullName(slave) { - const V = State.variables; const pair = slave.slaveSurname ? [slave.slaveName, slave.slaveSurname] : [slave.slaveName]; if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2)) { pair.reverse(); @@ -606,7 +600,6 @@ window.SlaveFullName = function SlaveFullName(slave) { * @returns {string} */ window.SlaveFullBirthName = function SlaveFullBirthName(slave) { - const V = State.variables; const pair = slave.birthSurname ? [slave.birthName, slave.birthSurname] : [slave.birthName]; if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2)) { pair.reverse(); @@ -619,7 +612,6 @@ window.SlaveFullBirthName = function SlaveFullBirthName(slave) { * @returns {string} */ window.PoliteRudeTitle = function PoliteRudeTitle(slave) { - const V = State.variables; const PC = V.PC; const s = V.sEnunciate; const ss = V.ssEnunciate; @@ -650,7 +642,6 @@ window.PoliteRudeTitle = function PoliteRudeTitle(slave) { * @returns {string} */ window.SlaveTitle = function SlaveTitle(slave) { - const V = State.variables; let r = ""; if (V.newDescriptions === 1) { if (slave.dick > 0 && slave.balls > 0 && slave.boobs > 300 && slave.vagina > -1 && slave.ovaries === 1) { @@ -1027,7 +1018,6 @@ window.SlaveTitle = function SlaveTitle(slave) { * @param {App.Entity.SlaveState} slave */ window.DegradingName = function DegradingName(slave) { - const V = State.variables; const leadershipPosition = [ "be the Attendant", "be the Matron", @@ -1455,7 +1445,6 @@ window.SlaveSort = function() { /** @param {App.Entity.SlaveState[]} [slaves] */ function sortSlaves(slaves) { - const V = State.variables; slaves = slaves || V.slaves; slaves.sort(_comparator()); if (slaves === V.slaves) { @@ -1488,7 +1477,6 @@ window.SlaveSort = function() { */ /** @returns {slaveComparator} */ function _comparator() { - const V = State.variables; return comparators[(V.sortSlavesOrder === "ascending" ? 'A' : 'D') + V.sortSlavesBy]; } }(); @@ -1501,7 +1489,6 @@ window.slaveSortMinor = function slaveSortMinor(slaves) { }; window.MenialPopCap = function MenialPopCap() { - const V = State.variables; let popCap = 500; let r = ""; @@ -1589,7 +1576,6 @@ window.faceIncrease = function faceIncrease(slave, amount) { * @returns {number} */ window.Deadliness = function Deadliness(slave) { - const V = State.variables; let deadliness = 2; if (slave.skill.combat > 0) { diff --git a/src/js/assignJS.js b/src/js/assignJS.js index 0ee8818349106b75310dd4b76d3c157304f01f6c..0c321c330a58562dfeaf1ac98977f696c8615679 100644 --- a/src/js/assignJS.js +++ b/src/js/assignJS.js @@ -1,7 +1,6 @@ /* eslint-disable no-case-declarations */ window.assignJob = function assignJob(slave, job) { "use strict"; - const V = State.variables; let r = ""; if (job === "Pit" || job === "Coursing Association") { return r; } @@ -339,7 +338,6 @@ window.assignJob = function assignJob(slave, job) { window.removeJob = function removeJob(slave, assignment) { "use strict"; - const V = State.variables; let r = ""; const idx = V.slaveIndices[slave.ID]; @@ -741,12 +739,11 @@ App.UI.SlaveInteract = { }; App.activeArcology = function() { - const V = State.variables; return V.arcologies[V.activeArcologyIdx]; }; App.currentAgent = function() { - const V = State.variables, T = State.temporary; + const T = State.temporary; for (let j = 0; j < V.leaders.length; j++) { if (V.arcologies[T.currentNeighbor].leaderID === V.leaders[j].ID) { T.Agent = V.leaders[j]; diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index c2e20a539a003f5e7e2a8aaae0f970b9f4305bc2..bae5e274a381dd5536ad338bff24c7418630eb9c 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -316,7 +316,7 @@ App.Entity.Utils.SlaveDataSchemeCleanup = (function() { */ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() { "use strict"; - let V; + return SlaveDatatypeCleanup; /** @@ -324,7 +324,6 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() { * @param {boolean} [isIncubatorSlave] */ function SlaveDatatypeCleanup(slave, isIncubatorSlave = false) { - V = State.variables; if (!isIncubatorSlave && !(slave.tankBaby > 0)) { slaveAgeDatatypeCleanup(slave); } @@ -1040,7 +1039,6 @@ window.ChildDatatypeCleanup = function ChildDatatypeCleanup(child) { }; window.childAgeDatatypeCleanup = function childAgeDatatypeCleanup(child) { - const V = State.variables; child.birthWeek = Math.clamp(+child.birthWeek, 0, 51) || 0; if (child.age > 0) { @@ -1530,7 +1528,6 @@ window.childMiscellaneousDatatypeCleanup = function childMiscellaneousDatatypeCl }; window.PCDatatypeCleanup = function PCDatatypeCleanup() { - const V = State.variables; const PC = V.PC; if (PC.title !== 0) { @@ -1619,7 +1616,6 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() { }; window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() { - const V = State.variables; V.ACitizens = Math.max(+V.ACitizens, 0) || 0; V.ASlaves = Math.max(+V.ASlaves, 0) || 0; @@ -1698,7 +1694,6 @@ window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() { }; window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { - const V = State.variables; V.arcologies[0].prosperity = Math.clamp(+V.arcologies[0].prosperity, 1, 300) || 1; V.AProsperityCap = Math.max(+V.AProsperityCap, 0) || 0; @@ -1754,11 +1749,10 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { window.FacilityDatatypeCleanup = (function() { "use strict"; - let V; + return FacilityDatatypeCleanup; function FacilityDatatypeCleanup() { - V = State.variables; /* common variables */ FacilityIDArrayCleanup(); FutureSocieties.DecorationCleanup(); diff --git a/src/js/describePiercings.js b/src/js/describePiercings.js index a527cf0037197db03853a5d3a5ec61a8e1de851e..e57c2f2e59847524a544f38eb12b3c31d4131b61 100644 --- a/src/js/describePiercings.js +++ b/src/js/describePiercings.js @@ -4,7 +4,6 @@ */ App.Desc.piercing = function(slave, surface) { "use strict"; - const V = State.variables; let r = ``; /* eslint-disable no-unused-vars*/ const { diff --git a/src/js/describeTattoos.js b/src/js/describeTattoos.js index fad61cceddf5116594f764e40019cd0b8fbbd01c..565bb096964b31942d7cdfbccbb2a5ce6f830a42 100644 --- a/src/js/describeTattoos.js +++ b/src/js/describeTattoos.js @@ -4,7 +4,6 @@ */ App.Desc.tattoo = function(slave, surface) { "use strict"; - const V = State.variables; let r = ``; /* eslint-disable no-unused-vars*/ const { diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index 201fe931617bf4ded8b5b4ab69175a96b19e91a9..8b7ef37e63ff3ba2e3ede180daa0174f29521923 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -4,7 +4,6 @@ */ App.Desc.eyes = function(slave) { "use strict"; - const V = State.variables; let r = ``; /* eslint-disable no-unused-vars*/ const { @@ -261,7 +260,6 @@ App.Desc.eyeColor = function(slave) { */ App.Desc.ageAndHealth = function(slave) { "use strict"; - const V = State.variables; let r = ``; let woman; /* eslint-disable no-unused-vars*/ @@ -581,7 +579,6 @@ App.Desc.ageAndHealth = function(slave) { * @returns {string} Slave's mods. */ App.Desc.mods = function(slave, surface) { - const V = State.variables; if (V.showBodyMods !== 1) { return; } @@ -1087,7 +1084,6 @@ App.Desc.limbs = function(slave) { * @returns {string} */ App.Desc.inscrip = function(slave) { - const V = State.variables; function fetishToObject() { switch (slave.fetish) { diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 06c866d0a9a49584d669b4894e12340822ee5781..4cc75717feaf129ca4ac2bdecd6539e063707217 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -159,7 +159,6 @@ window.calculateCosts = (function() { // facility expenses function getBrothelCosts() { - const V = State.variables; return (1 + 0.1 * V.brothelUpgradeDrugs) * (V.brothel * V.facilityCost); } @@ -168,12 +167,10 @@ window.calculateCosts = (function() { } function getArcadeCosts() { - const V = State.variables; return (0.05 + 0.02 * V.arcadeUpgradeInjectors + 0.05 * V.arcadeUpgradeCollectors + 0.02 * V.arcadeUpgradeHealth) * (V.arcade * V.facilityCost); } function getClubCosts() { - const V = State.variables; const initCosts = (V.club * V.facilityCost) + (0.2 * V.clubUpgradePDAs * V.club * V.facilityCost); return (V.club > 0) ? initCosts + V.clubAdsSpending : initCosts; } @@ -183,7 +180,6 @@ window.calculateCosts = (function() { } function getDairyCosts() { - const V = State.variables; const facDairyMultiplier = V.facilityCost * V.dairy; let costs = facDairyMultiplier + (0.2 * V.dairyFeedersUpgrade + 0.1 * V.dairyPregUpgrade) * facDairyMultiplier + (0.2 * V.dairyStimulatorsUpgrade * V.facilityCost); if (V.dairy > 0) { @@ -193,7 +189,6 @@ window.calculateCosts = (function() { } function getIncubatorCosts() { - const V = State.variables; const facIncMultiplier = V.facilityCost * V.incubator; let costs = (facIncMultiplier * 10); costs += (0.2 * V.incubatorUpgradeWeight + 0.2 * V.incubatorUpgradeMuscles + @@ -206,7 +201,6 @@ window.calculateCosts = (function() { } function getServantsQuartersCosts() { - const V = State.variables; return (0.2 * V.servantsQuartersUpgradeMonitoring * V.servantsQuarters * V.facilityCost); } @@ -231,7 +225,6 @@ window.calculateCosts = (function() { // security expansion function getSecurityExpansionCost() { - const V = State.variables; let secExpCost = 0, soldierMod = 0; if (V.secExpEnabled > 0) { secExpCost += App.SecExp.upkeep('edictsCash'); @@ -299,7 +292,6 @@ window.calculateCosts = (function() { } function getMercenariesCosts() { - const V = State.variables; let costs = 0; let mercCosts = V.mercenaries * 2000; if (V.mercenaries > 0) { @@ -413,7 +405,6 @@ window.calculateCosts = (function() { // player expenses function getPCTrainingCosts() { - const V = State.variables; const PA = Object.values(PersonalAttention); const currentPA = V.personalAttention; let costs = 0; @@ -887,7 +878,6 @@ window.menialSlaveCost = function(q = 0) { }; window.NPCSexSupply = function(LC) { - const V = State.variables; const NPCSexSupply = {lowerClass: V.NPCSexSupply.lowerClass}; // Lower class calculations @@ -905,7 +895,6 @@ window.NPCSexSupply = function(LC) { // The function for calculating and storing a slave's sexual interaction with citizens/'the outside' window.slaveJobValues = function() { - const V = State.variables; const slaveJobValues = {arcade: 0, club: 0, clubSP: 0}; let clubSpots = 0; const toTheClubTotal = 0; const AL = V.ArcadeiIDs.length; const CL = V.ClubiIDs.length; @@ -1300,7 +1289,6 @@ The third category, the "slave slot" is completely optional. Sometimes you just */ window.cashX = function(cost, what, who) { - const V = State.variables; if (!Number.isFinite(cost)) { V.lastWeeksCashErrors += `Expected a finite number for ${what}, but got ${cost}<br>`; @@ -1348,7 +1336,6 @@ window.cashX = function(cost, what, who) { }; window.repX = function(rep, what, who) { - const V = State.variables; if (!Number.isFinite(rep)) { V.lastWeeksRepErrors += `Expected a finite number for ${what}, but got ${rep}<br>`; diff --git a/src/js/food.js b/src/js/food.js index d92bffb1bb4642ba02958506a08e09c5fede630c..bf63c30c2d7d5437f08d279f4af37add2a23b2c8 100644 --- a/src/js/food.js +++ b/src/js/food.js @@ -3,7 +3,6 @@ * @returns {number} */ window.foodAmount = function(slave) { - const V = State.variables; let food = 400; // kg / food produced by base slave / week if (!slave) { return null; @@ -63,7 +62,6 @@ window.foodAmount = function(slave) { */ window.farmShowsIncome = function(slave) { // TODO: incorporate farmyardRestraints - const V = State.variables; let arcology = V.arcologies[0]; let cash = 100; // TODO: this is just a placeholder if (!slave) { diff --git a/src/js/futureSocietyJS.js b/src/js/futureSocietyJS.js index 319be8125c27b89714ed1ae23bd7352e4608c888..77722c33852f3b8804256722d0c02c28ccfba4d2 100644 --- a/src/js/futureSocietyJS.js +++ b/src/js/futureSocietyJS.js @@ -45,7 +45,6 @@ window.FutureSocieties = (function() { // call as FutureSocieties.remove(FS) // FS must be a string (e.g. "FSPaternalist" or "FSDegradationist"). function removeFS(FS) { - const V = State.variables; const arcology = V.arcologies[0]; const FSDecoration = `${FS}Decoration`; const FSSMR = `${FS}SMR`; @@ -142,7 +141,6 @@ window.FutureSocieties = (function() { /* helper function, not callable */ function resetFSCredits() { - const V = State.variables; const arcology = V.arcologies[0]; let activeFS = 0; for (let i = 0; i < SocietyList.length; i++) { @@ -183,7 +181,6 @@ window.FutureSocieties = (function() { /* helper function, not callable */ /* decoration should be passed as "facilityDecoration" in quotes. For example, ValidateFacilityDecoration("brothelDecoration"). The quotes are important, do not pass it as a story variable. */ function ValidateFacilityDecoration(decoration) { - const V = State.variables; const FSString = V[decoration].replace(/ /g, ''); // removes spaces const activeFS = FSString2Property[FSString]; // gets the property name @@ -205,7 +202,6 @@ window.FutureSocieties = (function() { /* call as FutureSocieties.Change() */ /* FSString should be in the FSString2Property object above */ function FSChange(FSString, magnitude, bonusMultiplier = 1) { - const V = State.variables; const arcology = V.arcologies[0]; const activeFS = FSString2Property[FSString]; diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index a4c0b60f498ffa55d6e035f1eb3cc00ade9a6489..2a208ea424b1aaad120bd91838d164cc82244363 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -7,7 +7,7 @@ window.generateGenetics = (function() { let activeMother; let father; let activeFather; - let V; + // intelligence and face parameters are the same so we can use the same distribution for both values // clamping makes edge values (-100, 100) more likely; this is expected behavior @@ -15,7 +15,6 @@ window.generateGenetics = (function() { const fuzzy = (a, b) => Math.clamp(normalRandInt((a+b)/2, 20), -100, 100); function generateGenetics(actor1, actor2, x) { - V = State.variables; genes = { gender: "XX", name: "blank", @@ -1061,7 +1060,6 @@ window.generateGenetics = (function() { })(); window.generateChild = function(mother, ova, destination) { - let V = State.variables; let genes = ova.genetics; // maybe just argument this? We'll see. let pregUpgrade = V.pregnancyMonitoringUpgrade; let child = {}; diff --git a/src/js/generateMarketSlave.js b/src/js/generateMarketSlave.js index 2cec348afabf88acc7ea0f16edde11fa4512e400..9170761628bc36a13c84b8872811f9b1121bcd29 100644 --- a/src/js/generateMarketSlave.js +++ b/src/js/generateMarketSlave.js @@ -1,6 +1,5 @@ /* eslint-disable camelcase */ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { - const V = State.variables; let r = ``; let sisterAge; let minHeight; diff --git a/src/js/generateNewSlaveJS.js b/src/js/generateNewSlaveJS.js index 57afc9c9f752472b8a765f79dc92e857b0330a55..6ace878e32ad0d2cf7425815a7ecde1bec5ac16a 100644 --- a/src/js/generateNewSlaveJS.js +++ b/src/js/generateNewSlaveJS.js @@ -1,14 +1,13 @@ /* eslint-disable camelcase */ window.GenerateNewSlave = (function() { "use strict"; - let V; + let chance; /** * @type {App.Entity.SlaveState} */ let slave; function GenerateNewSlave(sex) { - V = State.variables; slave = BaseSlave(); preGenCombinedStats(); diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 2cd20284985f8fcbef14d6a9fc58666773d6d7bf..0f74318a91c3ee05229740fe59ab73d17fd1e894 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -6,7 +6,6 @@ * @returns {boolean} */ window.isItemAccessible = function(string) { - const V = State.variables; if (V.cheatMode === 1) { return true; diff --git a/src/js/modification.js b/src/js/modification.js index 01f5bd00186e487c761e39faf74996068749ba64..994c0094cbbf40209384196492a8c3d5095c68a4 100644 --- a/src/js/modification.js +++ b/src/js/modification.js @@ -7,7 +7,7 @@ App.Medicine.Modification = {}; * @param {string} weight */ App.Medicine.Modification.addScar = function(slave, scar, design, weight) { - /* const V = State.variables; + /* V.scarApplied = 1; V.degradation += 10; slave.health -= 10; //dangerous to uncomment this as sometimes many scars are applied at once. @@ -32,7 +32,7 @@ App.Medicine.Modification.addScar = function(slave, scar, design, weight) { * @param {string} design */ App.Medicine.Modification.removeScar = function(slave, scar, design) { - /* const V = State.variables; + /* V.scarApplied = 1; V.degradation += 10; slave.health -= 10; //dangerous to uncomment this as sometimes many scars are applied at once. diff --git a/src/js/playerJS.js b/src/js/playerJS.js index 805e908896e6881043d317d11a529d800afb126f..ff30ba42e573fbd812f5453b68fb600f27af04a9 100644 --- a/src/js/playerJS.js +++ b/src/js/playerJS.js @@ -50,7 +50,6 @@ window.properMaster = function properMaster() { }; window.PlayerName = function PlayerName() { - const V = State.variables; const names = V.PC.surname ? [V.PC.name, V.PC.surname] : [V.PC.name]; if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(V.PC.nationality)) || (V.surnameOrder === 2)) { names.reverse(); @@ -59,7 +58,6 @@ window.PlayerName = function PlayerName() { }; window.PCTitle = function PCTitle() { - const V = State.variables; const titles = []; V.PCTitle = PlayerName(); diff --git a/src/js/pregJS.js b/src/js/pregJS.js index 5f0332dde4f904a3b42ecfd10f8648416a239483..70af3dd4caa999f7fced342a5a5a790652d67dc1 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -423,7 +423,6 @@ window.setPregType = function(actor) { displayOverride is an override if defined - fatherID must be defined in this case. */ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) { - const V = State.variables; let He; let r = ``; if (target.ID !== -1) { @@ -524,7 +523,6 @@ window.getNurseryReserved = function( /* slaves */ ) { window.findFather = function(fatherID) { let father; - let V = State.variables; father = V.slaves[V.slaveIndices[fatherID]]; if (father === undefined) { @@ -550,7 +548,6 @@ window.adjustFatherProperty = function(actor, property, newValue) { /* OLD window.adjustFatherProperty = function(actor, property, newValue) { - let V = State.variables; let fatherIndex; fatherIndex = V.slaves.findIndex(function(s) { return s.ID === actor.ID; }); diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index 9ba79e752902f63ce13633555112e7204ae420f2..e5ce66906de23fbd59c4ede720ea20765618796d 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -1,6 +1,5 @@ window.removeActiveSlave = function removeActiveSlave() { "use strict"; - const V = State.variables; const AS_ID = V.activeSlave.ID; let LENGTH = V.slaves.length; @@ -241,8 +240,6 @@ window.removeActiveSlave = function removeActiveSlave() { */ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { "use strict"; - - const V = State.variables; const ID = removedSlave.ID; let LENGTH = V.slaves.length; const INDEX = V.slaveIndices[ID]; diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js index ea427065e15edc54d05508e870147c967b3e02a3..8a492943876c6815cd0672e1721c966b7e33d1a8 100644 --- a/src/js/rulesAssistant.js +++ b/src/js/rulesAssistant.js @@ -91,7 +91,6 @@ window.ruleApplied = function(slave, rule) { * @returns {string} */ window.RAFacilityRemove = function RAFacilityRemove(slave, rule) { - const V = State.variables; let r = ""; if (!rule.facilityRemove) { return r; } switch (rule.setAssignment) { @@ -498,8 +497,6 @@ window.RASummaryCell = function() { } table.push(r); } - - const V = State.variables; /** @type {App.RA.Rule[]} */ const rules = V.defaultRules; let r = ""; diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 6b18e355fd4f9b561972c48375f6687d18d5347d..19b88c22cecdef63ab93518cc5165996d3c9990f 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -8,12 +8,11 @@ window.rulesAssistantOptions = (function() { "use strict"; const noDefaultSetting = {value: "!NDS!", text: "no default setting"}; - let V; + /** @type {App.RA.Rule} */ let current_rule; function rulesAssistantOptions(element) { - V = State.variables; V.nextButton = "Back to Main"; V.nextLink = "Main"; V.returnTo = "Main"; diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js index 7fe6f523304097baff49009c195d6184e1cb900e..42b7d81a2addf0d0b6a389cc7c9c3c64e6d690db 100644 --- a/src/js/rulesAutosurgery.js +++ b/src/js/rulesAutosurgery.js @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ window.rulesAutosurgery = (function() { "use strict"; - let V; + let r; return rulesAutoSurgery; @@ -10,7 +10,6 @@ window.rulesAutosurgery = (function() { * @returns {string} */ function rulesAutoSurgery(slave) { - V = State.variables; r = ""; const surgeries = []; const thisSurgery = ProcessHGTastes(slave); diff --git a/src/js/sexActsJS.js b/src/js/sexActsJS.js index 75f76bfd3f9ecc147ec584d1f4e82062547affac..499e18005d79f008714818a168862fd6a79f861b 100644 --- a/src/js/sexActsJS.js +++ b/src/js/sexActsJS.js @@ -30,7 +30,6 @@ window.VCheck = (function() { * @returns {string} */ function AnalVCheck(times = 1) { - const V = State.variables; const slave = V.activeSlave; let r = ''; setScopedPronouns(slave); @@ -77,7 +76,6 @@ window.VCheck = (function() { * @returns {string} */ function VaginalVCheck(times = 1) { - const V = State.variables; const slave = V.activeSlave; let r = ''; setScopedPronouns(slave); @@ -126,7 +124,6 @@ window.VCheck = (function() { * @returns {string} */ function BothVCheck(analTimes = 1, bothTimes = 1) { - const V = State.variables; const slave = V.activeSlave; let r = ''; setScopedPronouns(slave); @@ -260,7 +257,6 @@ window.VCheck = (function() { never know when someone might use the routine and forget to do such. */ function PartnerVCheck(analTimes = 1, bothTimes = 1) { - const V = State.variables; const partner = V.slaves[V.partner]; let r = ''; if (partner === undefined) { @@ -331,7 +327,6 @@ window.SimpleSexAct = (function() { * @returns {string} */ function SimpleSexActPlayer(slave, fuckCount = 1) { - const V = State.variables; let fuckTarget = 0; let r = ""; @@ -369,7 +364,6 @@ window.SimpleSexAct = (function() { * @param {number} fuckCount */ function SimpleSlaveFucking(slave, fuckCount = 1) { - const V = State.variables; let fuckTarget = 0; for (let i = 0; i < fuckCount; i++) { @@ -400,7 +394,6 @@ window.SimpleSexAct = (function() { * @returns {string} */ function SimpleSlaveSlaveFucking(subslave, domslave, fuckCount = 1) { - const V = State.variables; let fuckTarget = 0; let r = ""; diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index a822306a2a86f0b28d65a6f3fdc420a85a280046..92b008e286139182c2361d63f94ff140544fd317 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -1,6 +1,6 @@ window.Beauty = (function() { "use strict"; - let V; + let arcology; let beauty; @@ -9,7 +9,6 @@ window.Beauty = (function() { * @returns {number} */ function Beauty(slave) { - V = State.variables; arcology = V.arcologies[0]; V.modScore = SlaveStatsChecker.modScore(slave); @@ -1517,7 +1516,7 @@ window.FResult = (function() { // we can't initialize our global variables on load, because SugarCube.State isn't initialized // instead, declare them and initialize on run time // eslint-disable-next-line camelcase - let V; + let result; let incestBonus; /** @@ -1525,7 +1524,6 @@ window.FResult = (function() { * @returns {number} */ function FResult(slave, forSale = 0) { - V = State.variables; incestBonus = V.arcologies[0].FSEgyptianRevivalist > 20 || V.arcologies[0].FSEgyptianRevivalistIncestPolicy === 1; calcUseWeights(slave, forSale); @@ -1969,7 +1967,7 @@ window.FResult = (function() { window.slaveCost = (function() { "use strict"; - let V; + let arcology; let multiplier; let cost; @@ -1981,7 +1979,6 @@ window.slaveCost = (function() { * is a "starting slave" */ function slaveCost(slave, isStartingSlave) { - V = State.variables; arcology = V.arcologies[0]; multiplier = V.slaveCostFactor; cost = Beauty(slave) * FResult(slave, 1); diff --git a/src/js/slaveGenerationJS.js b/src/js/slaveGenerationJS.js index b765aa01035e99ff71a8c9c4c2c81c4a7b95cb39..783c33035fe400e89c9cefb5164c016bdfccb7ed 100644 --- a/src/js/slaveGenerationJS.js +++ b/src/js/slaveGenerationJS.js @@ -10,7 +10,6 @@ window.nationalityToRace = function nationalityToRace(slave) { */ window.raceToNationality = function raceToNationality(slave) { /* consider this placeholder until raceNationalities gets fixed up */ - const V = State.variables; slave.nationality = hashChoice(V.nationalities); /* Maximum of 100 attempts */ let i = 0; @@ -81,7 +80,6 @@ window.isMaleName = function isMaleName(name, nationality, race) { * @param {App.Entity.SlaveState} slave */ window.nationalityToName = function nationalityToName(slave) { - const V = State.variables; const male = (slave.genes === "XY"); slave.birthName = generateName(slave.nationality, slave.race, male); @@ -118,7 +116,6 @@ window.nationalityToName = function nationalityToName(slave) { * @param {App.Entity.SlaveState} slave */ window.nationalityToAccent = function nationalityToAccent(slave) { - const V = State.variables; const naturalAccent = jsEither([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]); switch (slave.nationality) { @@ -1319,7 +1316,6 @@ Backup and then apply gingering modifiers to $activeSlave - no changes should be Called from lawCompliance */ window.checkForGingering = function checkForGingering() { - const V = State.variables; let r = ""; const {he, him, his, He, His} = getPronouns(V.activeSlave); @@ -1443,7 +1439,6 @@ Call as removeGingering() Called from newSlaveIntro, bulkSlaveGenerate */ window.removeGingering = function removeGingering() { - const V = State.variables; if (V.gingering !== 0 && V.beforeGingering !== 0 && V.activeSlave !== 0 && V.beforeGingering.ID === V.activeSlave.ID) { /* extra checks to ensure gingering state is not left over from a different slave that was inspected but not purchased */ V.activeSlave = V.beforeGingering; diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index 6e19da7f11715b2d8711f91d5c4553e54daa2ded..83175eb5e59ffe27e0e378c6bb084cc9b5aaf358 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -23,7 +23,7 @@ App.UI.SlaveList = {}; App.UI.SlaveList.render = function() { 'use strict'; - let V; + /** @type {string} */ let passageName; /** @type {App.Entity.SlaveState[]} */ @@ -50,7 +50,6 @@ App.UI.SlaveList.render = function() { * @returns {DocumentFragment} */ function listDOM(indices, rejectedSlaves, interactionLink, postNote) { - V = State.variables; passageName = passage(); slaves = V.slaves; V.assignTo = passageName; // would be passed to the "Assign" passage @@ -500,7 +499,6 @@ App.UI.SlaveList.SlaveInteract.personalAttention = (slave) => * @param {number} id slave id */ App.UI.selectSlaveForPersonalAttention = function(id) { - const V = State.variables; if (!Array.isArray(V.personalAttention)) { /* first PA target */ @@ -534,7 +532,6 @@ App.UI.selectSlaveForPersonalAttention = function(id) { * @returns {string} */ App.UI.SlaveList.sortingLinks = function(passage) { - const V = State.variables; let r = ' Sort by: '; r += ["devotion", "name", "assignment", "seniority", "actualAge", "visualAge", "physicalAge"] .map(so => V.sortSlavesBy !== so ? @@ -557,7 +554,6 @@ App.UI.SlaveList.sortingLinks = function(passage) { * @returns {string} */ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, showTransfersTab = false, tabCaptions = undefined) { - const V = State.variables; const job = facility.job(); facilityPassage = facilityPassage || passage(); @@ -655,7 +651,6 @@ App.UI.SlaveList.makeNameDecorator = function(classNames) { * @returns {string} */ App.UI.SlaveList.listNGPSlaves = function() { - const V = State.variables; const thisPassage = 'New Game Plus'; let r = this.sortingLinks(thisPassage) + '<br>'; @@ -726,7 +721,6 @@ App.UI.SlaveList.stdFacilityPage = function(facility, showTransfersPage) { }; App.UI.SlaveList.penthousePage = function() { - const V = State.variables; const ph = App.Entity.facilities.penthouse; const listElementId = 'summarylist'; // for the untabbed mode only diff --git a/src/js/slaveStatsChecker.js b/src/js/slaveStatsChecker.js index a7af1e5eedef699e098316b47f181f9df5959d70..59279bf31bcae83384bd99667fb46ec17f8455ee 100644 --- a/src/js/slaveStatsChecker.js +++ b/src/js/slaveStatsChecker.js @@ -50,7 +50,6 @@ window.SlaveStatsChecker = (function() { * @returns {number} // I think */ function modScore(slave) { - const V = State.variables; V.piercingScore = piercingScore(slave); V.tatScore = tatScore(slave); V.brandScore = brandScore(slave); @@ -308,7 +307,6 @@ window.slimLawPass = function(slave) { * @returns {boolean} */ window.heightPass = function(slave) { - let V = State.variables; let arcology = V.arcologies[0]; if (arcology.FSPetiteAdmiration !== "unset") { @@ -370,7 +368,6 @@ window.heelLength = function(slave) { * @returns {number} */ window.bimboScore = function(slave) { - const V = State.variables; let degree = 0; let mods = SlaveStatsChecker.modScore(slave); diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index f595747a63fe206181c42a3b2452a2c351fad17d..26756f7809d38be388cd2756b0906eaa8c92ae4a 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -17,7 +17,6 @@ window.clearSummaryCache = function clearSummaryCache(slave) { * @returns {object} */ window.SlaveSummary = function SlaveSummary(slave) { - const V = State.variables; if (V.useSummaryCache) { if (setup.summaryCache[slave.ID] === undefined) { setup.summaryCache[slave.ID] = SlaveSummaryUncached(slave); @@ -30,7 +29,7 @@ window.SlaveSummary = function SlaveSummary(slave) { window.SlaveSummaryUncached = (function() { "use strict"; - let V; + /** @type {DocumentFragment} */ let res; @@ -38,7 +37,6 @@ window.SlaveSummaryUncached = (function() { * @param {App.Entity.SlaveState} slave * @returns {DocumentFragment} */ function SlaveSummaryUncached(slave) { - V = State.variables; res = document.createDocumentFragment(); let para = makeParagraph(res); diff --git a/src/js/storyJS.js b/src/js/storyJS.js index c642e6b55e20e77cb87757ce461938a7f3266dd0..65dd5669b0fe472727e5c246b5acf11a2ab89279 100644 --- a/src/js/storyJS.js +++ b/src/js/storyJS.js @@ -581,7 +581,6 @@ window.generatePlayerPronouns = function(PC) { }; window.generateAssistantPronouns = function() { - const V = State.variables; if (V.assistant === 0) { V.assistantPronouns.pronoun = App.Data.Pronouns.Kind.ai; } else if ((V.assistantAppearance === "incubus") && (V.diversePronouns === 1)) { diff --git a/src/js/surgery.js b/src/js/surgery.js index 84307a188b29cc79115085c5cbb534893c183a69..ce32040e35bcaf10ab43d1faec236b0082b6144e 100644 --- a/src/js/surgery.js +++ b/src/js/surgery.js @@ -75,7 +75,6 @@ App.Medicine.Keys = { * @param {App.Entity.SlaveState} slave */ App.Medicine.Surgery.commit = function(surgery, slave) { - const V = State.variables; V.surgeryType = surgery.surgeryType; surgery.action(slave); cashX(forceNeg(surgery.costs), "slaveSurgery", slave); @@ -278,7 +277,6 @@ App.Medicine.Surgery.sizingProcedures = function() { * @returns {App.Medicine.Surgery.Procedure[]} */ function boobSizingProcedures(slave, options = {}) { - const V = State.variables; const thisArcology = V.arcologies[0]; const largeImplantsAvailable = thisArcology.FSTransformationFetishistResearch === 1; const advancedFillableImplantsAvailable = V.ImplantProductionUpgrade === 1; @@ -387,7 +385,6 @@ App.Medicine.Surgery.sizingProcedures = function() { * @returns {App.Medicine.Surgery.Procedure[]} */ function buttSizingProcedures(slave, options = {}) { - const V = State.variables; const thisArcology = V.arcologies[0]; const largeImplantsAvailable = thisArcology.FSTransformationFetishistResearch === 1; const advancedFillableImplantsAvailable = V.ImplantProductionUpgrade === 1; diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 0469e83769993888f13eac4e5fe9c8afe5239120..93b31ad169b32b40a7c21a42c0ca7a7c8859d30e 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -950,7 +950,6 @@ window.Categorizer.prototype.cat = function(val, def) { * @returns {string} */ window.num = function(x) { - const V = State.variables; const max = V.showNumbersMax; const ONE_TO_NINETEEN = [ @@ -1263,7 +1262,6 @@ window.cashFormatColor = function(s, invert = false) { * @returns {string} */ window.repFormat = function(s) { - const V = State.variables; /* if (!s) { s = 0; }*/ if (V.cheatMode === 1 || V.debugMode === 1) { if (s > 0) { @@ -1777,7 +1775,6 @@ window.induceLactation = function induceLactation(slave) { return r; }; window.ResearchLabStockPile = function() { - const V = State.variables; return `__Prosthetics__ Prosthetics interfaces: ${num(V.prosthetics.interfaceP1.amount + V.prosthetics.interfaceP2.amount)} Basic: $prosthetics.interfaceP1.amount @@ -2263,7 +2260,6 @@ window.pronounReplacer = function(slavetext) { }; window.convertCareer = function(slave) { - const V = State.variables; let job = slave.career; if ((V.diversePronouns === 1) && (slave.pronoun === App.Data.Pronouns.Kind.male)) { switch (job) { @@ -2375,7 +2371,6 @@ App.UI.tabbar = function() { }; function openTab(evt, tabName) { - const V = State.variables; /* var passage = passage().trim().replace(/ /g,"+");*/ const tabcontent = document.getElementsByClassName("tabcontent"); for (let i = 0; i < tabcontent.length; i++) { @@ -2746,7 +2741,6 @@ window.SkillIncrease = (function() { })(); window.HackingSkillMultiplier = function() { - const V = State.variables; if (V.PC.hacking <= -100) { return 1.5; } else if (V.PC.hacking <= -75) { @@ -2775,7 +2769,6 @@ window.HackingSkillMultiplier = function() { }; window.upgradeMultiplierArcology = function() { - const V = State.variables; if (V.PC.career === "engineer" || (V.arcologies[0].FSRestartDecoration >= 100 && V.eugenicsFullControl === 0)) { return 0.6; } else if (V.PC.engineering <= -100) { @@ -2806,7 +2799,6 @@ window.upgradeMultiplierArcology = function() { }; window.upgradeMultiplierMedicine = function() { - const V = State.variables; if (V.PC.career === "medicine" || (V.arcologies[0].FSRestartDecoration >= 100 && V.eugenicsFullControl === 0)) { return 0.6; } else if (V.PC.medicine <= -100) { @@ -2837,7 +2829,6 @@ window.upgradeMultiplierMedicine = function() { }; window.upgradeMultiplierTrade = function() { - const V = State.variables; if (V.PC.trading <= -100) { return 1.5; } else if (V.PC.trading <= -75) { diff --git a/src/js/vignettes.js b/src/js/vignettes.js index b7e6a61b9cbab510762b5d7a4cd455e7611b8b3e..38d389480f2fe998a1870b7c4f0a799df709f085 100644 --- a/src/js/vignettes.js +++ b/src/js/vignettes.js @@ -3,7 +3,6 @@ * @returns {string} */ window.GetVignette = function GetVignette(slave) { - const V = State.variables; let vignettes = []; const {he, him, his, hers, himself, boy, He/* , His */} = getPronouns(slave); diff --git a/src/js/wombJS.js b/src/js/wombJS.js index 6d41042d2dea249be95d089fc05f15fde5720783..cfe92d9f784536301ac4eac0c1e52b38b4b2d7b9 100644 --- a/src/js/wombJS.js +++ b/src/js/wombJS.js @@ -733,7 +733,6 @@ window.WombCleanYYFetuses = function(actor) { window.FetusGlobalReserveCount = function(reserveType) { let cnt = 0; - let V = State.variables; if (typeof reserveType !== 'string') { return 0; diff --git a/src/npc/descriptions/boobs/boobs.js b/src/npc/descriptions/boobs/boobs.js index a5f3ff769c73f1f690a2c61c926a62764ea3dc0e..d2db6833e631ddf22f3d3876c7574ccd81965e8e 100644 --- a/src/npc/descriptions/boobs/boobs.js +++ b/src/npc/descriptions/boobs/boobs.js @@ -213,7 +213,7 @@ App.Desc.boobBits = function() { App.Desc.boobs = function() { 'use strict'; - let V; + /** @type {App.Utils.Pronouns} */ let pr; /** @type {string} */ @@ -230,7 +230,6 @@ App.Desc.boobs = function() { * @returns {string} */ function describe(slave, pronouns) { - V = State.variables; pr = pronouns || getPronouns(slave); ({he, his, him, He, His, girl} = pr); if ((V.showClothing === 1) && (V.saleDescription === 0)) { @@ -1397,7 +1396,6 @@ App.Desc.boobs = function() { * @returns {string} */ App.Desc.boobsExtra = function(slave, pronouns) { - const V = State.variables; const thisArcology = V.arcologies[0]; pronouns = pronouns || getPronouns(slave); const {he, his, him, He, His, girl} = pronouns; @@ -1538,7 +1536,6 @@ App.Desc.boobsExtra = function(slave, pronouns) { * @returns {string} */ App.Desc.nipples = function(slave, pronouns) { - const V = State.variables; pronouns = pronouns || getPronouns(slave); const {he, him, his, He, His} = pronouns; const nipColor = nippleColor(slave); @@ -1734,7 +1731,6 @@ App.Desc.nipples = function(slave, pronouns) { * @returns {string} */ App.Desc.areola = function(slave, pronouns) { - const V = State.variables; pronouns = pronouns || getPronouns(slave); const {his, His} = pronouns; const nipColor = nippleColor(slave); diff --git a/src/uncategorized/endWeek.tw b/src/uncategorized/endWeek.tw index 3f512e7ff7bcee987a7ee7ac3bff674ef7da7298..4a0323941878dc4a70a27b515876e48a8cb73e36 100644 --- a/src/uncategorized/endWeek.tw +++ b/src/uncategorized/endWeek.tw @@ -145,7 +145,6 @@ <<if $foodMarket > 0>> <<run $slaves.forEach(function(s) { - const V = State.variables; if (s.diet == "restricted") { V.foodConsumption += 1.8; } else if (s.diet == "slimming") { diff --git a/src/uncategorized/prestigiousSlave.tw b/src/uncategorized/prestigiousSlave.tw index 169e36f0cf82206a5f7a62e5873685f1fcf678ce..33b1d6463120d5c3ce7951d492148cec40e61244 100644 --- a/src/uncategorized/prestigiousSlave.tw +++ b/src/uncategorized/prestigiousSlave.tw @@ -8,7 +8,6 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres <<set $prestigeAuctioned = 1>> <<set _choice = (function() { - const V = State.variables; const options = [ "porn star", "trophy wife",