diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 75d6d6f5337b9235f7689f51d7980f8ff1d674e6..6495168e52c320c6734e9ff418a2738d5e78ffca 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -2402,4 +2402,4 @@ App.Entity.SlaveState = class SlaveState { * @callback slaveTestCallback * @param {App.Entity.SlaveState} slave * @returns {boolean} - */ \ No newline at end of file + */ diff --git a/src/js/assignJS.js b/src/js/assignJS.js index 94f7c847c9cce24d41c17e0b6c8e1c10c5449a4d..71104c7abbfc7c38503cfaed1eb6e836a8379368 100644 --- a/src/js/assignJS.js +++ b/src/js/assignJS.js @@ -590,7 +590,7 @@ App.UI.jobLinks = function() { const assignment = "choose her own job"; if (slave.assignment !== assignment) { const linkAction = callback !== undefined ? callback(assignment) : ''; - penthouseJobs.push(`<<link "Let ${slave.object} choose" ${passage !== undefined ? '"' + passage + '"' : ''}>><<= assignJob(${App.Utils.slaveRefString(index)}, "${assignment}")>>${linkAction}<</link>>`); + penthouseJobs.push(`<<link "Let ${slave.object} choose" ${passage !== undefined ? `"${passage}"` : ''}>><<= assignJob(${App.Utils.slaveRefString(index)}, "${assignment}")>>${linkAction}<</link>>`); } } else { penthouseJobs.push(App.UI.disabledLink(`Let ${slave.object} choose`, ["Fuckdolls can't choose their job"])); @@ -664,12 +664,13 @@ 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; for (let j = 0; j < V.leaders.length; j++) { - if (V.arcologies[T.currentNeighbor].leaderID == V.leaders[j].ID) { + if (V.arcologies[T.currentNeighbor].leaderID === V.leaders[j].ID) { T.Agent = V.leaders[j]; } } -} \ No newline at end of file +}; diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 4dd22853b89cad2cd1d0336520ed0b95b90b1fb8..7cecca0938cfa2d605eb690e62959f1ce17f24af 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -175,7 +175,7 @@ App.Entity.Utils.SlaveDataSchemeCleanup = (function() { let brand = {}; if (slave.brandLocation !== 0) { brand[slave.brandLocation] = slave.brand; - } + } delete slave.brandLocation; slave.brand = brand; } else if (typeof slave.brand === "object") { // Make sure key and value are strings @@ -2043,7 +2043,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() { /** @param {App.RA.Rule} rule */ function ruleCleanup(rule) { // ensure rule has all required propertirs - let newRule = App.RA.ruleDeepAssign(emptyDefaultRule(), rule) + let newRule = App.RA.ruleDeepAssign(emptyDefaultRule(), rule); cleanupConditions(newRule.condition); cleanupSetters(newRule.set); return newRule; @@ -2116,7 +2116,7 @@ App.Entity.Utils.RARuleDatatypeCleanup = function() { case 'number': return Number.isNaN(val) ? null : App.RA.makeTarget('==', val); case 'string': - return App.RA.makeTarget('==', parseInt(val)); + return App.RA.makeTarget('==', parseInt(val)); case 'object': if (val.hasOwnProperty('val') && (val.val === null || Number.isNaN(val.val))) { return null; @@ -2158,7 +2158,7 @@ App.Entity.Utils.validateRules = function() { throw `Property ${path}.${p} is undefined`; } if (v !== null && typeof v === 'object') { - testObject(v, path + '.' + p); + testObject(v, `${path}.${p}`); } } } diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index eddab7de4fa316637178a194d09a95da8a87dd00..4f31a143868d853b25eaf0c50b6fdebf29432d61 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -1175,7 +1175,7 @@ window.generateGenetics = (function() { } } } - + // hypoleptinemia if (father !== 0) { if (mother.geneticQuirks.wLoss === 2 && father.geneticQuirks.wLoss === 2) { diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index d0cd69b637966f4de92a0cb7d261bee31e30457a..9e1708765a8c9be8402d7993d48ee08ed779a748 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -192,7 +192,7 @@ window.Beauty = (function() { beauty += Object.getOwnPropertyNames(slave.brand).length; } else if (V.rep < 5000) { beauty -= Object.getOwnPropertyNames(slave.brand).length; - } + } if (slave.minorInjury !== 0) { beauty -= 2; } diff --git a/src/js/surgery.js b/src/js/surgery.js index 88f7b60ff4e86fb5b0b09f4f8223e92d9de5fcb3..e728e596dfa269b014f6e57b6d5b70e0a9f5d7e7 100644 --- a/src/js/surgery.js +++ b/src/js/surgery.js @@ -123,7 +123,7 @@ App.Medicine.Surgery.ListHelpers = class { * @param {Object.<string, string>} keys * @param {App.Utils.Pronouns} pronouns * @param {boolean} showCCs - */ + */ constructor(slave, bodyPart, keys, pronouns, showCCs) { /** @private */ this._slave = slave; @@ -459,7 +459,7 @@ App.Medicine.Surgery.sizingProcedures = function() { */ window.surgeryAmp = function(slave, part) { - if (part === "left ear"){ + if (part === "left ear") { slave.earShape = "none"; slave.earT = "none"; delete slave.brand["left ear"]; @@ -543,8 +543,8 @@ window.surgeryAmp = function(slave, part) { } } if (["cloning", "ova"].includes(part)) { - cashX(forceNeg($surgeryCost*2), "slaveSurgery", slave); + cashX(forceNeg(State.variables.surgeryCost*2), "slaveSurgery", slave); } else { - cashX(forceNeg($surgeryCost), "slaveSurgery", slave); + cashX(forceNeg(State.variables.surgeryCost), "slaveSurgery", slave); } }; diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 5962f8d7a24ea7cc9c35423bc77be8ff779d825f..492fc657a95f35ee0caa61c545b91b95aaaaca6a 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1119,7 +1119,7 @@ window.yrsMosWks = function(weeks) { r += `${num(years)} year${years !== 1 ? `s` : ``}`; if ((weeks - 52) % 4.33 !== 0) { // not exactly x years, y months - r += `, `; + r += `, `; } else { if (weeks % 52 !== 0) { // not exactly x years r += ` and `;