diff --git a/src/004-base/facility.js b/src/004-base/facility.js index daad5234e2973bf1f27c1501e7885de3a19c6351..f65205771c54210ec1301432260f0a97ecb0a7c0 100644 --- a/src/004-base/facility.js +++ b/src/004-base/facility.js @@ -340,7 +340,9 @@ App.Entity.Facilities.Facility = class { */ isHosted(slave) { for (const j in this._jobs) { - if (this._jobs[j].isEmployed(slave)) return true; + if (this._jobs[j].isEmployed(slave)) { + return true; + } } return false; diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js index accfb9ada6eeb858346a161a135cf56c0facff49..90813924360ea43a9648ede0cc29b1f383317a69 100644 --- a/src/art/vector/VectorArtJS.js +++ b/src/art/vector/VectorArtJS.js @@ -303,8 +303,8 @@ window.VectorArt = (function() { case "a penitent nuns habit": if ((canAchieveErection(slave)) && (slave.chastityPenis !== 1)) { penisArtString = jsInclude(`Art_Vector_Bulge_Outfit_Hard_${penisSize}`); - break; /* IN CASE OF NO ERECTION, SKIP TO A NORMAL BULGE */ // FIXME: having a break in an if is bad code } + // break; /* IN CASE OF NO ERECTION, SKIP TO A NORMAL BULGE */ /* BULGE OUTFITS LONG OUTFITS */ // eslint-disable-next-line no-fallthrough case "a cheerleader outfit": diff --git a/src/debugging/debugJS.js b/src/debugging/debugJS.js index dd29a88a2e75db3ab8635e1d5d3ca20c0c0f4478..9c519d0edc6ad03930d0c04d76885d03d8a8d253 100644 --- a/src/debugging/debugJS.js +++ b/src/debugging/debugJS.js @@ -55,19 +55,20 @@ window.diffFlatten = function diffFlatten(data) { result[prop] = cur; } else if (Array.isArray(cur)) { // eslint-disable-next-line no-var - for (var i=0, l=cur.length; i<l; i++) // don't change the "var" to "let" + for (var i=0, l=cur.length; i<l; i++) { // don't change the "var" to "let" recurse(cur[i], prop + "[" + i + "]"); + } // eslint-disable-next-line block-scoped-var - if (l === 0) + if (l === 0) { result[prop] = []; + } } else { let isEmpty = true; for (let p in cur) { isEmpty = false; recurse(cur[p], prop ? prop+"."+p : p); } - if (isEmpty && prop) - result[prop] = {}; + if (isEmpty && prop) { result[prop] = {}; } } } recurse(data, ""); diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index 1b3792e2cc2f9e692a6f89d20e4e52c771f78eb4..3e63065be5086b305e48472c4a3d1e1eea3a1815 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -23,7 +23,7 @@ window.saChoosesOwnClothes = (function() { V = State.variables; player = V.PC; r = ""; - if (slave.choosesOwnClothes !== 1) return r; + if (slave.choosesOwnClothes !== 1) { return r; } pronouns = getPronouns(slave); he = pronouns.pronoun; him = pronouns.object; @@ -219,9 +219,8 @@ window.saChoosesOwnClothes = (function() { } else { if (V.arcologies[0].FSChattelReligionist > 0) { clothing.push({text: `and wears a chattel habit to conform to your arcology's culture.`, clothes: "a chattel habit"}); - } /* Chooses clothes according to assignment (no exceptions)*/ - else if (slave.assignment === "be the Nurse") { + } else if (slave.assignment === "be the Nurse") { if (slave.energy > 95 || slave.need > 100) { wardrobeAssignment.push({text: `and wears a slutty nurse outfit to make it clear just how much this nurse needs ${his} daily lay.`, clothes: "a slutty nurse outfit"}); } else if (slave.energy > 80) { diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js index 32554adc37994a6deaa31ccc97d459cfcf05f850..1cfae417864cef1774a75b5788a710cd9b8b96f8 100644 --- a/src/interaction/main/mainLinks.js +++ b/src/interaction/main/mainLinks.js @@ -125,8 +125,7 @@ App.UI.View.MainLinks = function() { for (let i = 0; i < V.slaves.length; i++) { let slaveOrgans = 0; V.completedOrgans.forEach(organ => { - if (organ.ID === V.slaves[i].ID) - slaveOrgans++; + if (organ.ID === V.slaves[i].ID) { slaveOrgans++; } }); /* if the interrogated slave has one or more organs ready: */ if (slaveOrgans > 0) { diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 364f14241e46f71ab56fa5b1ce41f63f4f7bcd96..90ed3d4ce5e15732d65c95663fee18ee48d31239 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -14,7 +14,7 @@ window.DefaultRules = (function() { * @returns {object} */ function DefaultRules(slave) { - if (slave.useRulesAssistant === 0) return r; // exempted + if (slave.useRulesAssistant === 0) { return r; } // exempted V = State.variables; r = ""; @@ -23,7 +23,7 @@ window.DefaultRules = (function() { him = pronouns.object; his = pronouns.possessive; let rule = MergeRules(slave); - if (Object.keys(rule).length === 0) return r; // no rules apply + if (Object.keys(rule).length === 0) { return r; } // no rules apply AssignJobToSlave(slave, rule); if (slave.fuckdoll === 0) { diff --git a/src/js/accordianJS.js b/src/js/accordianJS.js index 34158aa86d151a03748c25af995f13ab36e4994d..f65b7d736a4efbe0f5d739b5043cea6e39cc8cb9 100644 --- a/src/js/accordianJS.js +++ b/src/js/accordianJS.js @@ -13,7 +13,7 @@ * 000-250-006 03092017 */ -postdisplay["doAccordionSet"] = function() { +postdisplay.doAccordionSet = function() { if (variables().useAccordion === 1) { Array.prototype.slice.call(document.querySelectorAll(".macro-include")) .forEach(function(element) { @@ -22,7 +22,7 @@ postdisplay["doAccordionSet"] = function() { } }; -postdisplay["doAccordion"] = function() { +postdisplay.doAccordion = function() { const acc = document.getElementsByClassName("accordion"); for (let i = 0; i < acc.length; i += 1) { @@ -30,7 +30,7 @@ postdisplay["doAccordion"] = function() { this.classList.toggle("active"); let panel = this.nextElementSibling; if (panel === null || panel === undefined) { - panel = document.getElementById(`${this.id }accHidden`); + panel = document.getElementById(`${this.id}accHidden`); if (panel.style.display === "none") { panel.style.display = ""; } else { @@ -40,7 +40,7 @@ postdisplay["doAccordion"] = function() { if (panel.style.maxHeight) { panel.style.maxHeight = null; } else { - panel.style.maxHeight = `${2 * panel.scrollHeight }px`; + panel.style.maxHeight = `${2 * panel.scrollHeight}px`; } } };