diff --git a/.eslintignore b/.eslintignore index fa36cb5df0e9986af6bfdccbd14747481d9c48bf..4b0e3da89a7c1a8fba6d4ab1f55cb7a48873eae7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,4 +4,7 @@ **/format.js **/bugReport.js **/displayVariables.js -**/dTree.min.js \ No newline at end of file +**/dTree.min.js +**/optionsMacro.js +temp.** +**.temp \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 592018b2b290d02ba67560e362cf52f9bbf8aabe..4cf4e8f5ea0df8da0d269ef337112ebd8de37bff 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,34 +28,34 @@ } }, "rules": { - "semi": ["error", "always"], + "semi": ["warn", "always"], "semi-spacing": "warn", "semi-style": "warn", "block-spacing": ["warn", "always"], "curly": ["warn", "all"], - "eqeqeq": "error", + "eqeqeq": "warn", "no-fallthrough": "error", - "space-before-function-paren": ["error", "never"], + "space-before-function-paren": ["warn", "never"], "no-trailing-spaces": "warn", - "no-unneeded-ternary": "error", + "no-unneeded-ternary": "warn", "camelcase": "warn", - "padded-blocks": ["error", "never"], - "comma-spacing": "error", - "comma-style": "error", - "object-curly-newline": ["warn", + "padded-blocks": ["warn", "never"], + "comma-spacing": "warn", + "comma-style": "warn", + "object-curly-newline": ["warn", { "minProperties": 4, "consistent": true } ], - "object-curly-spacing": "error", - "no-var": "error", + "object-curly-spacing": "warn", + "no-var": "warn", "spaced-comment": "warn", "no-undef": "off", "no-unused-vars": "error", - "block-scoped-var": "warn", - "dot-notation": "off", - "linebreak-style": ["error", "unix"], + "block-scoped-var": "error", + "dot-notation": "warn", + "linebreak-style": ["warn", "unix"], "eol-last": "warn", "unicode-bom": ["error", "never"], "valid-jsdoc": ["warn", @@ -64,6 +64,11 @@ "requireReturnDescription": false, "requireReturn": false } + ], + "brace-style": ["warn", "1tbs", + { + "allowSingleLine": true + } ] } } diff --git a/.gitignore b/.gitignore index cd29456af544f0c68a943e66c8eb98c24bb890c7..5c1ac625c0218db2bf10ab4fd4639c5fdd2f92ea 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,5 @@ fc-pregmod TODO.txt .vscode/settings.json *.code-workspace +temp.* +*.temp diff --git a/.jsbeautifyrc b/.jsbeautifyrc new file mode 100644 index 0000000000000000000000000000000000000000..b539d4ded37264320536e5efdde90a58d905da51 --- /dev/null +++ b/.jsbeautifyrc @@ -0,0 +1,8 @@ +{ + "eol": "\n", + "end_with_newline": true, + "indent_with_tabs": true, + "wrap_line_length": 0, + "space_around_combinator": true, + "brace_style": "collapse,preserve-inline" +} \ No newline at end of file diff --git a/src/art/assistantArt.js b/src/art/assistantArt.js index 7c7dc326b3410507756769250d67b1398df942f6..1b8b1175ce1d15172092b0c9335f72a6bf931862 100644 --- a/src/art/assistantArt.js +++ b/src/art/assistantArt.js @@ -8,7 +8,7 @@ window.assistantArt = function assistantArt(sizePlacement) { const V = State.variables; let fileName = ""; - if (V.seeAvatar !== 1) {return} + if (V.seeAvatar !== 1) {return;} if (V.imageChoice === 0 || V.imageChoice === 1) { if (V.imageChoice === 1) { @@ -126,4 +126,4 @@ window.assistantArt = function assistantArt(sizePlacement) { } } return fileName; -}; \ No newline at end of file +}; diff --git a/src/art/vector_revamp/vectorRevampedArtControl.js b/src/art/vector_revamp/vectorRevampedArtControl.js index 0b668da0af0a4cc7e6f75b73fd7f804fe725b996..cd88ec52e2bbb7e562cdd0355f8cd7f706cab5b8 100644 --- a/src/art/vector_revamp/vectorRevampedArtControl.js +++ b/src/art/vector_revamp/vectorRevampedArtControl.js @@ -1,5 +1,3 @@ -/* eslint-disable no-unused-vars */ -/* eslint-disable no-undef */ window.RevampedVectorArt = function(slave) { const V = State.variables; const T = State.temporary; @@ -11,7 +9,7 @@ window.RevampedVectorArt = function(slave) { T.art_display_id = 1; T.art_display_class = `ad${T.art_display_id}`; - /*Using JS from vectorRevampedArtControl.tw*/ + /* Using JS from vectorRevampedArtControl.tw*/ T.revampedVectorArtControl = getVectorArtRevampedControl(T.art_display_class, slave, V.seeVectorArtHighlights, V.showBodyMods); r = `<style>${T.revampedVectorArtControl.StylesCss}</style>`; @@ -38,21 +36,21 @@ class ArtStyleEntry { toString() { - var keys = Object.keys(this); - var styleArray = []; + let keys = Object.keys(this); + let styleArray = []; if (keys !== null && keys !== undefined) { - var styleObj = this; + let styleObj = this; keys.forEach(function(key) { if(key !== "name") { - var value = styleObj[key]; + let value = styleObj[key]; styleArray.push(key + ":" + value); } }); - var styleValue = styleArray.join(";") + ";"; + let styleValue = styleArray.join(";") + ";"; - var cssDef = "{" + styleValue + "}"; + let cssDef = "{ " + styleValue + " }"; // not sure if there should be padding here if (this.name.length > 0) cssDef = "." + this.name + cssDef; @@ -77,48 +75,48 @@ class ArtStyleControl { } applyMakeup() { - var lipsColor = this.lips.fill; - var lipsOpacity = this.lips["fill-opacity"]; + let lipsColor = this.lips.fill; + let lipsOpacity = this.lips["fill-opacity"]; switch(this.artSlave.makeup) { case 1: - //Nice + // Nice lipsColor = "#ff69b4"; lipsOpacity = 0.5; break; case 2: - //Gorgeous + // Gorgeous lipsColor = "#8b008b"; lipsOpacity = 0.7; break; case 3: - //Hair coordinated + // Hair coordinated lipsColor = this.hair.fill; lipsOpacity = 0.3; break; case 4: - //Slutty + // Slutty lipsColor = "#ff0000"; lipsOpacity = 1; break; case 5: - //Neon + // Neon lipsColor = "#DC143C"; lipsOpacity = 1; break; case 6: - //Neon hair coordinated + // Neon hair coordinated lipsColor = this.hair.fill; lipsOpacity = 1; break; case 7: - //Metallic + // Metallic lipsColor = "#b22222"; lipsOpacity = 0.7; break; case 8: - //Metallic hair coordinated + // Metallic hair coordinated lipsColor = this.hair.fill; lipsOpacity = 0.7; break; @@ -130,8 +128,8 @@ class ArtStyleControl { } applyCalcMuscleTone() { - var musclesValue = this.artSlave.muscles + 101; - var musclesVisibility = 0.910239*Math.log(0.02*musclesValue); + let musclesValue = this.artSlave.muscles + 101; + let musclesVisibility = 0.910239*Math.log(0.02*musclesValue); this.muscleTone["fill-opacity"] = musclesVisibility; } @@ -140,12 +138,12 @@ class ArtStyleControl { if (this.artSlave.eyeColor === null || this.artSlave.eyeColor === undefined) return; - var eyeColorSplit = this.artSlave.eyeColor.split(" "); + let eyeColorSplit = this.artSlave.eyeColor.split(" "); if (eyeColorSplit === 1) return; - var eyeLens = eyeColorSplit[0]; + let eyeLens = eyeColorSplit[0]; switch(eyeLens) { @@ -157,12 +155,13 @@ class ArtStyleControl { } } - /*currently unused, keeping for color reference - */ + /* currently unused, keeping for color reference - */ parseSkinColorFromName(colorName) { + // eslint-disable-next-line eqeqeq if (colorName == null) return "#000000"; - var skinPalette = [ + let skinPalette = [ ["light", "#feebe5"], ["white", "#feebe5"], ["fair", "#feebe5"], @@ -186,9 +185,9 @@ class ArtStyleControl { ["tiger striped", "#e2d75d"] ]; - var skinPaletteMap = new Map(skinPalette); + let skinPaletteMap = new Map(skinPalette); colorName = colorName.toLowerCase(); - var colorValue = skinPaletteMap.get(colorName); + let colorValue = skinPaletteMap.get(colorName); if (!colorValue) { return this.parseColorFromName(colorName); } @@ -198,7 +197,7 @@ class ArtStyleControl { /* - currently unused, keeping for color reference*/ initDefaultValues() { - var colorSlave = skinColorCatcher(this.artSlave); + let colorSlave = skinColorCatcher(this.artSlave); this.white = new ArtStyleEntry("white"); this.white.fill = "#FFFFFF"; @@ -322,7 +321,7 @@ class ArtStyleControl { } get StylesCss() { - var mainStyle = new ArtStyleEntry(""); + let mainStyle = new ArtStyleEntry(""); mainStyle.position = "absolute"; mainStyle.height= "100%"; mainStyle["margin-left"] = "auto"; @@ -368,9 +367,9 @@ class ArtStyleControl { this.styles.push(this.shadowBoobInnerLowerShadow); this.styles.push(this.shadowBoobInnerUpperShadow); this.styles.push(this.gag); - var stylesValues = []; + let stylesValues = []; - var artDisplayClass = this.artDisplayClass; + let artDisplayClass = this.artDisplayClass; stylesValues.push("." + artDisplayClass + " " + mainStyle.toString()); this.styles.forEach(function(style) { @@ -379,13 +378,12 @@ class ArtStyleControl { return stylesValues.join(" "); } - } class ClothingControl { get fuckdoll() { - var defaultOutfitColor = "#515351"; - var areolaColor = "#383838"; + let defaultOutfitColor = "#515351"; + let areolaColor = "#383838"; return { bodySettings: { showEyes: false, @@ -401,10 +399,10 @@ class ClothingControl { skin: { fill: defaultOutfitColor }, arm: { fill: defaultOutfitColor }, penis: { fill: defaultOutfitColor }, - legsSkin: {fill: defaultOutfitColor }, - feetSkin: {fill: defaultOutfitColor }, - torso: {fill: defaultOutfitColor }, - buttSkin: {fill: defaultOutfitColor }, + legsSkin: { fill: defaultOutfitColor }, + feetSkin: { fill: defaultOutfitColor }, + torso: { fill: defaultOutfitColor }, + buttSkin: { fill: defaultOutfitColor }, head: { fill: defaultOutfitColor }, neckSkin: { fill: defaultOutfitColor }, boob: { fill: defaultOutfitColor }, @@ -451,8 +449,8 @@ class ClothingControl { } get restrictiveLatex() { - var defaultOutfitColor = "#515351"; - var areolaColor = "#383838"; + let defaultOutfitColor = "#515351"; + let areolaColor = "#383838"; return { bodySettings: { showEyes: false, @@ -469,10 +467,10 @@ class ClothingControl { styleSettings: { skin: { fill: defaultOutfitColor }, arm: { fill: defaultOutfitColor }, - legsSkin: {fill: defaultOutfitColor }, - feetSkin: {fill: defaultOutfitColor }, - torso: {fill: defaultOutfitColor }, - buttSkin: {fill: defaultOutfitColor }, + legsSkin: { fill: defaultOutfitColor }, + feetSkin: { fill: defaultOutfitColor }, + torso: { fill: defaultOutfitColor }, + buttSkin: { fill: defaultOutfitColor }, head: { fill: defaultOutfitColor }, neckSkin: { fill: defaultOutfitColor }, bellySkin: { fill: defaultOutfitColor }, @@ -483,8 +481,8 @@ class ClothingControl { } get latexCatsuit() { - var defaultOutfitColor = "#515351"; - var areolaColor = "#383838"; + let defaultOutfitColor = "#515351"; + let areolaColor = "#383838"; return { bodySettings: { showPubic: false, @@ -503,10 +501,10 @@ class ClothingControl { scrotum: { fill: defaultOutfitColor }, arm: { fill: defaultOutfitColor }, penis: { fill: defaultOutfitColor }, - legsSkin: {fill: defaultOutfitColor }, - feetSkin: {fill: defaultOutfitColor }, - torso: {fill: defaultOutfitColor }, - buttSkin: {fill: defaultOutfitColor }, + legsSkin: { fill: defaultOutfitColor }, + feetSkin: { fill: defaultOutfitColor }, + torso: { fill: defaultOutfitColor }, + buttSkin: { fill: defaultOutfitColor }, neckSkin: { fill: defaultOutfitColor }, boob: { fill: defaultOutfitColor }, @@ -535,7 +533,7 @@ class ClothingControl { } get bodysuit() { - var defaultOutfitColor = "#162d50"; + let defaultOutfitColor = "#162d50"; return { bodySettings: { showPubic: false, @@ -551,10 +549,10 @@ class ClothingControl { scrotum: { fill: defaultOutfitColor }, arm: { fill: defaultOutfitColor }, penis: { fill: defaultOutfitColor }, - legsSkin: {fill: defaultOutfitColor }, - feetSkin: {fill: defaultOutfitColor }, - torso: {fill: defaultOutfitColor }, - buttSkin: {fill: defaultOutfitColor }, + legsSkin: { fill: defaultOutfitColor }, + feetSkin: { fill: defaultOutfitColor }, + torso: { fill: defaultOutfitColor }, + buttSkin: { fill: defaultOutfitColor }, boob: { fill: defaultOutfitColor }, areola: { fill: defaultOutfitColor }, bellySkin: { fill: defaultOutfitColor }, @@ -567,7 +565,7 @@ class ClothingControl { } get leotard() { - var defaultOutfitColor = "#d35f8d"; + let defaultOutfitColor = "#d35f8d"; return { bodySettings: { showPubic: false, @@ -583,7 +581,7 @@ class ClothingControl { skin: { fill: defaultOutfitColor }, scrotum: { fill: defaultOutfitColor }, penis: { fill: defaultOutfitColor }, - torso: {fill: defaultOutfitColor }, + torso: { fill: defaultOutfitColor }, boob: { fill: defaultOutfitColor }, areola: { fill: defaultOutfitColor }, bellySkin: { fill: defaultOutfitColor }, @@ -597,7 +595,6 @@ class ClothingControl { class RevampedArtControl { constructor(artDisplayClass, artSlave, globalShowHighlights, globalShowBodyMods) { - this.artDisplayClass = artDisplayClass; this.artSlave = artSlave; this.styleControl = new ArtStyleControl(artDisplayClass, artSlave); @@ -640,7 +637,7 @@ class RevampedArtControl { this.pubicTattooText = ""; - var clothing = this.getClothing(); + let clothing = this.getClothing(); if (clothing !== null) { if (clothing.bodySettings !== null) @@ -664,7 +661,6 @@ class RevampedArtControl { this.showNipplesPiercings = false; this.showHeadPiercings = false; } - } copyProperties(objTo, objFrom) { @@ -709,15 +705,14 @@ class RevampedArtControl { clothing = this.clothingControl.bodysuit; break; case "a leotard": - /*return this.clothingControl.leotard;*/ + /* return this.clothingControl.leotard;*/ break; - } return clothing; } get getHairLength() { - var result = "Short"; + let result = "Short"; if (this.artSlave.hLength >= 80) result = "Long"; @@ -730,7 +725,7 @@ class RevampedArtControl { } get getTorsoSize() { - var torsoSize = "Normal"; + let torsoSize = "Normal"; if (this.artSlave.waist < -40) { torsoSize = this.artSlave.weight > 30 ? "Hourglass" : "Unnatural"; @@ -746,7 +741,7 @@ class RevampedArtControl { } get getLeftArmPosition() { - var leftArmType = "Low"; + let leftArmType = "Low"; if (this.artSlave.devotion > 50) { leftArmType = "High"; @@ -768,7 +763,7 @@ class RevampedArtControl { } get getRightArmPosition() { - var rightArmType = "Low"; + let rightArmType = "Low"; if (this.artSlave.devotion > 50) { rightArmType = "High"; @@ -790,7 +785,7 @@ class RevampedArtControl { } get getBellyLevel() { - var bellyLevel = 0; + let bellyLevel = 0; if (this.artSlave.belly >= 120000) bellyLevel = 9; else if (this.artSlave.belly >= 90000) @@ -816,7 +811,7 @@ class RevampedArtControl { } get hairBackLayer() { - var result = []; + let result = []; if (!this.showHair) return result; @@ -871,10 +866,10 @@ class RevampedArtControl { } get armLayer() { - var result = []; + let result = []; - var leftArmType = ""; - var rightArmType = ""; + let leftArmType = ""; + let rightArmType = ""; if (this.artSlave.amp === 1) { result.push("Art_Vector_Revamp_Arm_Stump"); @@ -902,8 +897,8 @@ class RevampedArtControl { } get buttLayer() { - var result = []; - var buttSize = 0; + let result = []; + let buttSize = 0; if (this.artSlave.amp) return result; @@ -922,13 +917,13 @@ class RevampedArtControl { } get legLayer() { - var result = []; + let result = []; if (this.artSlave.amp === 1) { result.push("Art_Vector_Revamp_Stump"); } else { - var legSize = "Normal"; + let legSize = "Normal"; if (this.artSlave.hips < 0) { legSize = this.artSlave.weight > 95 ? "Normal" : "Narrow"; @@ -953,7 +948,7 @@ class RevampedArtControl { } get feetLayer() { - var result = []; + let result = []; if (this.artSlave.amp === 1) { return result; @@ -981,7 +976,7 @@ class RevampedArtControl { } get torsoLayer() { - var result = []; + let result = []; result.push("Art_Vector_Revamp_Torso_" + this.torsoSize); result.push("Art_Vector_Revamp_Clavicle"); @@ -1009,7 +1004,7 @@ class RevampedArtControl { } get pussyLayer() { - var result = []; + let result = []; if (this.showPussy && this.artSlave.vagina >= 0) result.push("Art_Vector_Revamp_Pussy"); @@ -1018,7 +1013,7 @@ class RevampedArtControl { } get pubicLayer() { - var result = []; + let result = []; if (!this.showPubic) return result; @@ -1054,7 +1049,7 @@ class RevampedArtControl { } get pussyPiercingsLayer() { - var result = []; + let result = []; if (!this.showPussyPiercings) return result; @@ -1075,13 +1070,13 @@ class RevampedArtControl { } get chastityBeltLayer() { - var result = []; + let result = []; - var isChastityAnalWorn = this.artSlave.chastityAnus === 1; + let isChastityAnalWorn = this.artSlave.chastityAnus === 1; isChastityAnalWorn = isChastityAnalWorn && this.showChastityAnal; - var isChastityVaginalWorn = this.artSlave.chastityVagina === 1; + let isChastityVaginalWorn = this.artSlave.chastityVagina === 1; isChastityVaginalWorn = isChastityVaginalWorn && this.showChastityVaginal; @@ -1098,7 +1093,7 @@ class RevampedArtControl { } get torsoOutfitLayer() { - var result = []; + let result = []; switch(this.artSlave.clothes) { @@ -1118,12 +1113,12 @@ class RevampedArtControl { } get ballsLayer() { - var result = []; + let result = []; if (!this.showBalls || this.artSlave.scrotum <= 0 || this.artSlave.balls <= 0) return result; - var ballsSize = 0; + let ballsSize = 0; if (this.artSlave.scrotum >= 6) ballsSize = 4; @@ -1142,7 +1137,7 @@ class RevampedArtControl { } get bellyLayer() { - var result = []; + let result = []; if (this.bellyLevel > 0) { @@ -1173,12 +1168,12 @@ class RevampedArtControl { } get penisLayer() { - var result = []; + let result = []; if (this.getBellyLevel >= 8) return result; - var penisSize = -1; + let penisSize = -1; if (this.artSlave.dick >= 8) penisSize = 6; @@ -1225,13 +1220,13 @@ class RevampedArtControl { } get boobLayer() { - var result = []; + let result = []; if (this.artSlave.boobs < 300) { if (this.showNipples) { - var areolaeShape = "Normal"; + let areolaeShape = "Normal"; switch(this.artSlave.areolae) { @@ -1262,24 +1257,23 @@ class RevampedArtControl { result.push("Art_Vector_Revamp_Boob_None_Areola_" + areolaeShape); } - } else { - var artScaleFactor = 0.804354*Math.log(0.00577801*this.artSlave.boobs); + let artScaleFactor = 0.804354*Math.log(0.00577801*this.artSlave.boobs); - var boobRightArtTranslationX = 270*((-1*artScaleFactor) + 1); - var boobLeftArtTranslationX = 320*((-1*artScaleFactor) + 1); - var artTranslationX = -283.841*artScaleFactor+285.349; - var artTranslationY = 198*((-1*artScaleFactor) + 1); - var artBoobTransform = "matrix(" + artScaleFactor +",0,0," + artScaleFactor + "," + artTranslationX + "," + artTranslationY + ")"; + let boobRightArtTranslationX = 270*((-1*artScaleFactor) + 1); + let boobLeftArtTranslationX = 320*((-1*artScaleFactor) + 1); + let artTranslationX = -283.841*artScaleFactor+285.349; + let artTranslationY = 198*((-1*artScaleFactor) + 1); + let artBoobTransform = "matrix(" + artScaleFactor +",0,0," + artScaleFactor + "," + artTranslationX + "," + artTranslationY + ")"; this.artTransform = artBoobTransform; if (!this.showBoobs) return result; - var size = "Small"; + let size = "Small"; if (this.artSlave.boobs < 600) { @@ -1349,11 +1343,11 @@ class RevampedArtControl { } get boobAddonLayer() { - var result = []; + let result = []; if (this.showNipplesPiercings) { - var size = "Small"; + let size = "Small"; if (this.artSlave.boobs < 600) { @@ -1401,8 +1395,8 @@ class RevampedArtControl { switch(this.artSlave.clothes) { case "uncomfortable straps": - //if (this.artSlave.boobs >= 300) - //result.push("Art_Vector_Revamp_Boob_Outfit_Straps"); + // if (this.artSlave.boobs >= 300) + // result.push("Art_Vector_Revamp_Boob_Outfit_Straps"); break; case "a nice maid outfit": if (this.artSlave.boobs >= 300) @@ -1411,7 +1405,7 @@ class RevampedArtControl { { let artScaleFactor = 0.288539*Math.log(0.106667*this.artSlave.boobs); let artTranslationX = 270*((-1*artScaleFactor) + 1); - let artTranslationY = 198*((-1*artScaleFactor) + 1);//-198.438*artScaleFactor+203.274; + let artTranslationY = 198*((-1*artScaleFactor) + 1);// -198.438*artScaleFactor+203.274; let artBoobTransform = "matrix(" + artScaleFactor +",0,0," + artScaleFactor + "," + artTranslationX + "," + artTranslationY + ")"; this.boobOutfitArtTransform = artBoobTransform; @@ -1422,7 +1416,7 @@ class RevampedArtControl { { let artScaleFactor = 0.155334*Math.log(1.04167*this.artSlave.boobs); let artTranslationX = 270*((-1.25*artScaleFactor) + 1.25); - let artTranslationY = 198*((-0.8*artScaleFactor) + 0.8);//-198.438*artScaleFactor+203.274; + let artTranslationY = 198*((-0.8*artScaleFactor) + 0.8);// -198.438*artScaleFactor+203.274; let artBoobTransform = "matrix(" + artScaleFactor +",0,0," + artScaleFactor + "," + artTranslationX + "," + artTranslationY + ")"; this.boobOutfitArtTransform = artBoobTransform; @@ -1431,13 +1425,12 @@ class RevampedArtControl { else { let artScaleFactor = 1.56609*Math.log(0.00017373*this.artSlave.boobs); let artTranslationX = 340*((-1*artScaleFactor) + 1); - let artTranslationY = 153*((-1*artScaleFactor) + 1);//-198.438*artScaleFactor+203.274; + let artTranslationY = 153*((-1*artScaleFactor) + 1);// -198.438*artScaleFactor+203.274; let artBoobTransform = "matrix(" + artScaleFactor +",0,0," + artScaleFactor + "," + artTranslationX + "," + artTranslationY + ")"; this.boobOutfitArtTransform = artBoobTransform; result.push("Art_Vector_Revamp_Boob_Huge_Outfit_Maid"); } - } break; @@ -1448,7 +1441,7 @@ class RevampedArtControl { } get clavicleLayer() { - var result = []; + let result = []; result.push("Art_Vector_Revamp_Clavicle"); @@ -1456,7 +1449,7 @@ class RevampedArtControl { } get collarLayer() { - var result = []; + let result = []; switch(this.artSlave.collar) { @@ -1497,7 +1490,7 @@ class RevampedArtControl { } get headLayer() { - var result = []; + let result = []; result.push("Art_Vector_Revamp_Head"); @@ -1521,7 +1514,7 @@ class RevampedArtControl { } get eyesLayer() { - var result = []; + let result = []; if (!this.showEyes) return result; @@ -1581,8 +1574,8 @@ class RevampedArtControl { } get mouthLayer() { - var result = []; - var lipsSize = "Normal"; + let result = []; + let lipsSize = "Normal"; if (!this.showMouth) return result; @@ -1630,7 +1623,7 @@ class RevampedArtControl { return result; } get headAddonLayer() { - var result = []; + let result = []; if (this.showEyes) { switch(this.artSlave.eyewear) @@ -1658,13 +1651,12 @@ class RevampedArtControl { result.push("Art_Vector_Revamp_Ball_Gag"); break; default: - } } return result; } get hairForeLayer() { - var result = []; + let result = []; if (!this.showHair) return result; @@ -1719,7 +1711,7 @@ class RevampedArtControl { } get Layers() { - var layers = []; + let layers = []; Array.prototype.push.apply(layers, this.hairBackLayer); Array.prototype.push.apply(layers, this.armLayer); diff --git a/src/debugging/debugJS.js b/src/debugging/debugJS.js index cc502b62a89adbb78af17f1dd187411fb8db57bf..dd29a88a2e75db3ab8635e1d5d3ca20c0c0f4478 100644 --- a/src/debugging/debugJS.js +++ b/src/debugging/debugJS.js @@ -1,5 +1,5 @@ /* eslint-disable no-empty */ -/* eslint-disable no-undef */ +/* eslint-disable no-var */ /* Given an object, this will return an array where for each property of the original object, we include the object {variable: property, oldVal: _oldDiff.property, newVal: _newDiff.property} @@ -24,7 +24,7 @@ window.difference = function difference(o1, o2) { diff[k] = o2[k]; } } else { - kDiff = difference(o1[k], o2[k]) + kDiff = difference(o1[k], o2[k]); if (kDiff) { diff[k] = kDiff; } @@ -54,8 +54,10 @@ window.diffFlatten = function diffFlatten(data) { if (Object(cur) !== cur) { 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" recurse(cur[i], prop + "[" + i + "]"); + // eslint-disable-next-line block-scoped-var if (l === 0) result[prop] = []; } else { diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index de9badc60f82c7d2cc776ed0effd76339b5fea0d..88df29d470329d5c24e93898f40618845f69998a 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -1051,7 +1051,7 @@ window.saChoosesOwnClothes = (function() { belly.push({text: "", bellyAccessory: slave.bellyAccessory}); /* compatibility for no output, will likely get deprecated in the future as content is added*/ } } else if (slave.devotion <= 20) { - if (slave.belly > 10000 && (slave.pregAdaptation*800 <= slave.belly) && slave.bellyAccessory !== "a support band") { + if (slave.belly > 10000 && (slave.pregAdaptation * 800 <= slave.belly) && slave.bellyAccessory !== "a support band") { belly.push({text: `slips a pregnancy support band around ${his} middle to help alleviate some of the discomfort,`, bellyAccessory: "a support band"}); } else if (slave.belly < 8000 && slave.bellyAccessory === "a support band") { belly.push({text: `removes ${his} support band since ${he} no longer needs it,`, bellyAccessory: "none"}); @@ -1073,7 +1073,7 @@ window.saChoosesOwnClothes = (function() { } else if (slave.fetishStrength > 95) { belly.push({text: `straps on the largest belly ${he} can find to satisfy ${his} pregnancy fetish,`, bellyAccessory: "a huge empathy belly"}); } - } else if (slave.belly > 10000 && (slave.pregAdaptation*1200 <= slave.belly) && slave.bellyAccessory !== "a support band") { + } else if (slave.belly > 10000 && (slave.pregAdaptation * 1200 <= slave.belly) && slave.bellyAccessory !== "a support band") { belly.push({text: `slips a pregnancy support band around ${his} middle to better handle ${his} fecund mound,`, bellyAccessory: "a support band"}); } else if (empathyBellies.includes(slave.bellyAccessory) && slave.fetish !== "pregnancy") { belly.push({text: `removes ${his} fake belly, since ${he} dislikes it,`, bellyAccessory: "none"}); diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index 413ec0d01b93fe678dac1e8639a71abeab552a92..67783593c4beb01ae3890baddbd16e77e20fec6a 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -1656,8 +1656,6 @@ window.DefaultRules = (function() { flag = false; } break; - - } if (flag) { slave.drugs = rule.drug; diff --git a/src/js/assayJS.js b/src/js/assayJS.js index fc76d34bc9d92a76052d837c016287425afef512..751d2bbd8086ba0ff5397b45858f0c1989a8d6fc 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -1569,7 +1569,6 @@ window.DegradingName = function DegradingName(slave) { case "mixed race": names.push("Mixed", "Mulatto", "Mutt"); break; - } } names.push(slave.hColor); @@ -1895,7 +1894,6 @@ window.DegradingName = function DegradingName(slave) { case "recruit girls": slave.slaveName = jsEither(["Cam", "Recruiter"]); break; - } } const surname = jsEither(suffixes); diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index cd503f1ab64be3e99df30b19e79387cfdbab47e7..038159d39660b0536c517e421550a597b42d2d0b 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -597,7 +597,7 @@ App.Desc.brand = function(slave) { } return r; } -} +}; /** * @param {App.Entity.SlaveState} slave @@ -636,7 +636,7 @@ App.Desc.amputee = function(slave) { } return r; } -} +}; /** * @param {App.Entity.SlaveState} slave @@ -937,9 +937,8 @@ App.Desc.waist = function(slave) { } } } - } else if (slave.waist > -40) { - r += `a nice <span class="pink">feminine waist</span> that gives ${him} a ` + r += `a nice <span class="pink">feminine waist</span> that gives ${him} a `; if (slave.visualAge > 25) { r += `girlish`; } else { @@ -1034,7 +1033,7 @@ App.Desc.waist = function(slave) { } } } else if (slave.belly < 750000) { - r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a ` + r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a `; if (V.showInches === 2) { r += `yard`; } else { @@ -1083,7 +1082,7 @@ App.Desc.waist = function(slave) { } } } else if (slave.belly < 750000) { - r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a ` + r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a `; if (V.showInches === 2) { r += `yard`; } else { @@ -1101,4 +1100,4 @@ App.Desc.waist = function(slave) { } return r; } -} +}; diff --git a/src/js/familyTreeJS.js b/src/js/familyTreeJS.js index aac1d0673715636891918a6fd318874016e72cd1..86fd4260f54d20ff3ff63cf9b7071aea879f49fc 100644 --- a/src/js/familyTreeJS.js +++ b/src/js/familyTreeJS.js @@ -47,7 +47,9 @@ window.renderFamilyTree = function(slaves, filterID) { ftreeHeight = 1200; } - margin = {top: 0, left: 0, bottom: 0, right: 0}; + margin = { + top: 0, left: 0, bottom: 0, right: 0 + }; chartWidth = ftreeWidth - (margin.left + margin.right); @@ -545,7 +547,9 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS function getSlave(id, expectedGenes) { if (id === -1) { - return {"slaveName": "YOU", "ID": id, "physicalAge": PC.physicalAge, "genes": PC.genes, "father": PC.father, "mother": PC.mother}; + return { +"slaveName": "YOU", "ID": id, "physicalAge": PC.physicalAge, "genes": PC.genes, "father": PC.father, "mother": PC.mother +}; } if (id === 0) { return {"slaveName": "-", "ID": id, "genes": expectedGenes}; @@ -635,7 +639,7 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS for (let key in spouseToChild) { if (spouseToChild.hasOwnProperty(key)) { let children = shouldAddChildren?spouseToChild[key]:[]; - let spouse = getSlave(key, (slaves.genes === "XX") ? "unknownXY" : (slaves.genes === "XY") ? "unknownXX" : "unknown"); // FIXME: nested ternary + let spouse = getSlave(key, (slaves.genes === "XX") ? "unknownXY" : (slaves.genes === "XY") ? "unknownXX" : "unknown"); let spouseName; if (spouse.ID !== slave.ID){ spouseName = spouse.slaveName + (spouse.physicalAge?(` (${ spouse.physicalAge })`):""); diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index 0326fd1d404cb246518578b7c25ab15be4ae3a1f..6d59b9863ab30cfc18e983b4e17dae3e8908c537 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -378,7 +378,6 @@ window.generateGenetics = (function() { case "implant": eyeColor = jsEither(["blue", "brown", "dark blue", "dark green", "green", "hazel", "light blue", "light green"]); break; - } return eyeColor; } @@ -419,7 +418,6 @@ window.generateGenetics = (function() { case "implant": hEyeColor = jsEither(["blue", "green", "brown", "hazel", "light blue", "light green", "dark green", "dark blue"]); break; - } return jsEither(eyeColorArray); } diff --git a/src/js/generateMarketSlave.js b/src/js/generateMarketSlave.js index c85962d6951f5cb9bf529eb82c89b24d2d1c93b3..01dbe4308c022e29a007cec820457efa5b966bd8 100644 --- a/src/js/generateMarketSlave.js +++ b/src/js/generateMarketSlave.js @@ -1,6 +1,9 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { const V = State.variables; - let r = ""; + let r = ``; + let sisterAge; + let minHeight; + let criminal; switch (market) { case "corporate": @@ -60,10 +63,10 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { } if (V.corpSpecAge === 1) { r += `Teenage slaves are strongly favored for training. `; - /*V.activeSlave.age = jsRandom(18,19)>>*/ + /* V.activeSlave.age = jsRandom(18,19)>>*/ } else if (V.corpSpecAge === 3) { r += `Newly enslaved MILFs are strongly favored for training. `; - /*V.activeSlave.age = jsRandom(36,V.retirementAge)>>*/ + /* V.activeSlave.age = jsRandom(36,V.retirementAge)>>*/ } else { r += `Promising slaves are trained without special sorting based on age. `; } @@ -488,7 +491,7 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { V.activeSlave.dick = 0; V.activeSlave.balls = 0; V.activeSlave.scrotum = 0; - V.activeSlave.preg = 0; /*removing contraception of default slave generation so isFertile can work right*/ + V.activeSlave.preg = 0; /* removing contraception of default slave generation so isFertile can work right*/ if (isFertile(V.activeSlave)) { V.activeSlave.vagina = jsRandom(1, 4); V.activeSlave.preg = jsRandom(21, 39); @@ -587,7 +590,7 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { } } else if (V.arcologies[market].FSGenderFundamentalist > 50) { r += `Fertile slaves from there almost never appear without swollen bellies and sensitive nipples. `; - V.activeSlave.preg = 0; /*removing contraception of default slave generation so isFertile can work right*/ + V.activeSlave.preg = 0; /* removing contraception of default slave generation so isFertile can work right*/ if (isFertile(V.activeSlave)) { V.activeSlave.preg = jsRandom(1, 40); V.activeSlave.pregType = setPregType(V.activeSlave); @@ -1665,7 +1668,7 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { V.activeSlave.career = "a Futanari Sister"; V.activeSlave.faceShape = jsEither(["exotic", "sensual"]); V.activeSlave.pubertyXY = 1; - var sisterAge = jsRandom(1, 5); + sisterAge = jsRandom(1, 5); if (sisterAge === 1) { V.activeSlave.intelligence = -60; V.activeSlave.hips = 0; @@ -1914,7 +1917,7 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { V.activeSlave.devotion = jsRandom(60, 75); V.activeSlave.trust = jsRandom(60, 75); V.activeSlave.health = jsRandom(60, 80); - var minHeight = jsRandom(170, 180); + minHeight = jsRandom(170, 180); if (V.HA.schoolUpgrade === 2) { V.activeSlave.height = Math.trunc(Math.clamp(Height.random(V.activeSlave, {limitMult: [2, 15], spread: .1}), minHeight, 274)); V.activeSlave.muscles = jsRandom(40, 80); @@ -1976,7 +1979,7 @@ window.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { V.oneTimeDisableDisability = 1; V.activeSlave = GenerateNewSlave("XY"); - var criminal = setup.gangCriminalPool.random(); + criminal = setup.gangCriminalPool.random(); switch (criminal) { case "mule": diff --git a/src/js/generateNewSlaveJS.js b/src/js/generateNewSlaveJS.js index d928bccf609fa592fc6501e699c33af75d36c239..548250a01afe75cb414361bf79c05068f67b83ab 100644 --- a/src/js/generateNewSlaveJS.js +++ b/src/js/generateNewSlaveJS.js @@ -1587,7 +1587,6 @@ window.GenerateNewSlave = (function() { slave.boobs = Math.clamp(slave.boobs, 300, 25000); } } - } return GenerateNewSlave; diff --git a/src/js/rbuttonJS.js b/src/js/rbuttonJS.js index b74200cf4d6c02b309548077699c21d3dd76b367..b7e820536b6b9de6ba9a098c88ff8c2b79fe11b1 100644 --- a/src/js/rbuttonJS.js +++ b/src/js/rbuttonJS.js @@ -70,7 +70,6 @@ Macro.add('rbutton', { Wikifier.setValue(varName, checkValue); if (replaceID.length > 0 && replaceText.length > 0) { - let replaceEl = document.getElementById(replaceID); // alert (replaceEl); if (replaceEl !== null) { @@ -82,7 +81,6 @@ Macro.add('rbutton', { .ready(function() { // alert ("DOM finished"); if (el.checked && replaceID.length > 0 && replaceText.length > 0) { - let replaceEl = document.getElementById(replaceID); // alert (replaceEl); if (replaceEl !== null) { diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index d271a6b8d8eb05f3e9548199359f85d5897d3206..230c2e16b5f50a41956094f295112e90c6e26982 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -364,6 +364,5 @@ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { } removeSlave(INDEX); - } }; diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 0dbd993aaf8efc0235888468c1263f03c6e8c82a..1cb7754af63af8b2a38dc95f5bf8a5174c012719 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -669,11 +669,11 @@ window.rulesAssistantOptions = (function() { this.show_custom_editor(CustomEditor, current_rule.condition.data); } else if (this.betweenP(value)) { current_rule.condition.function = "between"; - current_rule.condition.data = { attribute: value, value: [null, null] }; + current_rule.condition.data = {attribute: value, value: [null, null]}; this.show_custom_editor(RangeEditor, current_rule.condition.function, current_rule.condition.data); } else if (this.belongsP(value)) { current_rule.condition.function = "belongs"; - current_rule.condition.data = { attribute: value, value: [] }; + current_rule.condition.data = {attribute: value, value: []}; this.show_custom_editor(ItemEditor, current_rule.condition.function, current_rule.condition.data); } } @@ -971,7 +971,6 @@ window.rulesAssistantOptions = (function() { this.appendChild(new ButtplugsOtherList()); this.appendChild(new ButtplugAttachmentsList()); this.appendChild(new ImplantVolumeList()); - } } diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index b23a773c607ae3734bd9bb1e444a4bf976a55c86..21add638d260a1ce64f11f5eb746ad074f26f6fa 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -124,7 +124,6 @@ window.Beauty = (function() { case "cute": beauty += 8 / 3; break; - } } @@ -155,7 +154,6 @@ window.Beauty = (function() { case "mixed": beauty -= 1; break; - } } @@ -233,7 +231,6 @@ window.Beauty = (function() { } } break; - } } @@ -528,7 +525,6 @@ window.Beauty = (function() { beauty += 1; } break; - } } @@ -753,7 +749,6 @@ window.Beauty = (function() { beauty -= 2; } break; - } switch (slave.pubicHStyle) { case "hairless": @@ -782,7 +777,6 @@ window.Beauty = (function() { beauty -= 6; } break; - } } } @@ -963,7 +957,6 @@ window.Beauty = (function() { } } break; - } } @@ -1106,7 +1099,6 @@ window.Beauty = (function() { case -4: beauty -= 2; break; - } } diff --git a/src/js/vignettes.js b/src/js/vignettes.js index a0f3f4e947013318e603b628a222fe5fa7dc768d..9a0a02890bde0a0026a48e3d0f20ea09aa97656d 100644 --- a/src/js/vignettes.js +++ b/src/js/vignettes.js @@ -313,7 +313,6 @@ window.GetVignette = function GetVignette(slave) { effect: -1, }); break; - } } switch (slave.behavioralFlaw) { @@ -385,7 +384,6 @@ window.GetVignette = function GetVignette(slave) { effect: -1, }); break; - } switch (slave.sexualFlaw) { case "hates oral": @@ -510,7 +508,6 @@ window.GetVignette = function GetVignette(slave) { effect: 3, }); break; - } switch (slave.behavioralQuirk) { case "confident": @@ -596,7 +593,6 @@ window.GetVignette = function GetVignette(slave) { effect: 1, }); break; - } switch (slave.sexualQuirk) { case "gagfuck queen": @@ -663,7 +659,6 @@ window.GetVignette = function GetVignette(slave) { effect: 1, }); break; - } if (slave.counter.pitKills > 0) { @@ -2009,7 +2004,6 @@ window.GetVignette = function GetVignette(slave) { effect: -1, }); break; - } } switch (slave.behavioralFlaw) { @@ -2081,7 +2075,6 @@ window.GetVignette = function GetVignette(slave) { effect: -1, }); break; - } switch (slave.sexualFlaw) { case "hates oral": @@ -2206,7 +2199,6 @@ window.GetVignette = function GetVignette(slave) { effect: 3, }); break; - } switch (slave.behavioralQuirk) { case "confident": @@ -2292,7 +2284,6 @@ window.GetVignette = function GetVignette(slave) { effect: 1, }); break; - } switch (slave.sexualQuirk) { case "gagfuck queen": @@ -2359,7 +2350,6 @@ window.GetVignette = function GetVignette(slave) { effect: 1, }); break; - } if (slave.counter.pitKills > 0) { @@ -3428,7 +3418,6 @@ window.GetVignette = function GetVignette(slave) { effect: 1, }); break; - } } switch (slave.behavioralFlaw) { @@ -3446,7 +3435,6 @@ window.GetVignette = function GetVignette(slave) { effect: 1, }); break; - } if (slave.fetish === "mindbroken") { vignettes.push({ @@ -3656,7 +3644,6 @@ window.GetVignette = function GetVignette(slave) { effect: 0, }); break; - } switch (slave.behavioralQuirk) { case "fitness": diff --git a/src/js/walkPastJS.js b/src/js/walkPastJS.js index 6e0dbc0d0d254323723acc192e1e752aa24abde7..969673e34a61b55f7fb983fe2451f65bfdb7cefd 100644 --- a/src/js/walkPastJS.js +++ b/src/js/walkPastJS.js @@ -2,7 +2,6 @@ /* temporary container until the entire thing is complete. No point in not deploying the working functions, you know? */ window.primeSlave = function(activeSlave, seed) { - /* will be moved up once this becomes a single, contained function. */ const V = State.variables; const pronouns = getPronouns(activeSlave); @@ -52,7 +51,6 @@ window.rivalSlave = function(activeSlave, seed) { }; window.loverSlave = function(activeSlave) { - /* will be moved up once this becomes a single, contained function. */ let _target = ""; let t = ""; @@ -70,7 +68,6 @@ window.loverSlave = function(activeSlave) { let _fuckSpot; if (_partnerSlave !== undefined) { - let pronouns2 = getPronouns(_partnerSlave); let he2 = pronouns2.pronoun, him2 = pronouns2.object, his2 = pronouns2.possessive, hers2 = pronouns2.possessivePronoun, himself2 = pronouns2.objectReflexive, boy2 = pronouns2.noun; let He2 = capFirstChar(he2), His2 = capFirstChar(his2); @@ -96,7 +93,6 @@ window.loverSlave = function(activeSlave) { t += `trying their best to maintain their relationship with ${partnerName} being nothing more than a hole in ${V.arcadeName}.`; } } else if (_seed >= 66) { /* SEXY TIMES */ - if (_partnerSlave.ID === V.HeadGirl.ID && V.HGSuite === 1) { _fuckSpot = `in ${partnerName}'s suite`; } else if (activeSlave.livingRules === "luxurious") { @@ -1279,7 +1275,6 @@ window.relatedSlave = function(activeSlave) { }; window.walkPasts = function(slave, _seed) { - /* will be moved up once this becomes a single, contained function. */ const V = State.variables; const pronouns = getPronouns(slave); @@ -1863,7 +1858,6 @@ window.walkPasts = function(slave, _seed) { }; window.boobWatch = function(slave) { - /* will be moved up once this becomes a single, contained function. */ let t = ""; let V = State.variables; @@ -2281,7 +2275,6 @@ window.boobWatch = function(slave) { }; window.buttWatch = function(slave) { - /* will be moved up once this becomes a single, contained function. */ let t = ""; let V = State.variables; @@ -2618,7 +2611,6 @@ window.buttWatch = function(slave) { }; window.anusWatch = function(slave) { - /* will be moved up once this becomes a single, contained function. */ let t = ""; let V = State.variables; @@ -2927,7 +2919,6 @@ window.anusWatch = function(slave) { window.lipWatch = function(slave) { - /* will be moved up once this becomes a single, contained function. */ let t = ""; let V = State.variables; diff --git a/src/js/wombJS.js b/src/js/wombJS.js index 8c59bc22dab2981dea568dfdb56713045327ee45..fd6ce592c0bfa6068a24629b2706b9e427960195 100644 --- a/src/js/wombJS.js +++ b/src/js/wombJS.js @@ -115,7 +115,6 @@ window.WombImpregnate = function(actor, fCount, fatherID, age, surrogate) { actor.womb.push(tf); alert("WombImpregnate warning - " + actor.slaveName + " " + err); } - } MissingParentIDCorrection(actor); }; @@ -184,7 +183,6 @@ window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age actor.womb.push(tf); alert("WombImpregnate warning - " + actor.slaveName + " " + err); } - } }; @@ -240,8 +238,6 @@ window.WombBirthReady = function(actor, readyAge) { }; window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with minor adaptation. - - if (actor.pregData.sizeType === 0) return getVolByLen(actor); else if (actor.pregData.sizeType === 1) @@ -289,9 +285,7 @@ window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with let wombSize = 0; try { - actor.womb.forEach(ft => { - /* legacy block for debug only let gestastionWeek = ft.age; let oldLen; @@ -337,7 +331,6 @@ window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with wombSize = 0; return wombSize; - } @@ -346,11 +339,9 @@ window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with let wombSize = 0; actor.womb.forEach(ft => { - targetData = getCurData(actor, ft.age); wombSize += targetData.size * targetData.rate; - }); if (wombSize < 0) // catch for strange cases, to avoid messing with outside code. @@ -365,11 +356,9 @@ window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with let wombSize = 0; actor.womb.forEach(ft => { - targetData = getCurData(actor, ft.age); wombSize += targetData.size; - }); if (wombSize < 0) // catch for strange cases, to avoid messing with outside code. @@ -377,7 +366,6 @@ window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with return wombSize; } - }; window.WombUpdatePregVars = function(actor) { @@ -526,7 +514,6 @@ window.fetalSplit = function(actor, chance) { nft.twinID = s.twinID; actor.womb.push(nft); - } }); WombNormalizePreg(actor); @@ -651,13 +638,11 @@ window.WombSetGenericReserve = function(actor, type, count) { ft.reserve = type; count--; } - }); }; window.WombAddToGenericReserve = function(actor, type, count) { WombSetGenericReserve(actor, type, (WombReserveCount(actor, type) + count)); - }; window.WombChangeReserveType = function(actor, oldType, newType) { @@ -675,25 +660,20 @@ window.WombChangeReserveType = function(actor, oldType, newType) { window.WombCleanGenericReserve = function(actor, type, count) { actor.womb.forEach(function(ft) { - if (ft.reserve === type && count > 0) { ft.reserve = ""; count--; } - }); }; window.WombReserveCount = function(actor, type) { - let cnt = 0; actor.womb.forEach(function(ft) { - if (ft.reserve === type) /* the lazy equality will catch "" case */ { cnt++; } - }); return cnt; @@ -703,11 +683,9 @@ window.WombGetReservedFetuses = function(actor, type) { let reserved = []; actor.womb.forEach(function(ft) { - if (ft.reserve === type) { reserved.push(ft); } - }); return reserved; @@ -734,11 +712,9 @@ window.WombRemoveReservedFetuses = function(actor, type) { }; window.WombCleanAllReserve = function(actor) { - actor.womb.forEach(function(ft) { ft.reserve = ""; }); - }; /* @@ -768,7 +744,6 @@ window.WombGetLittersData = function(actor) { actor.womb.forEach(function(ft) { if (!unicLiters.includes(Math.ceil(ft.realAge))) unicLiters.push(Math.ceil(ft.realAge)); - }); // now we should find and store separate litters data (count of fetuses): @@ -809,7 +784,6 @@ window.BCReserveInit = function() { if (typeof ft.realAge !== 'number') // setting missing chronological age ft.realAge = ft.age; }); - }; /* alt diff --git a/src/npc/agent/agentFramework.js b/src/npc/agent/agentFramework.js index 7e540ac9ea32c966acca249ad8ce6360d80d6ac1..aa5e80c1b78cd8ffedd3b3894d2409dbbb048f97 100644 --- a/src/npc/agent/agentFramework.js +++ b/src/npc/agent/agentFramework.js @@ -25,7 +25,7 @@ App.Data.Facilities.arcologyAgent = { shouldThink: true, requiredDevotion: 21 } -} +}; App.Entity.Facilities.AgentJob = class extends App.Entity.Facilities.ManagingJob { /** @@ -39,7 +39,7 @@ App.Entity.Facilities.AgentJob = class extends App.Entity.Facilities.ManagingJob } return r; } -} +}; App.Entity.facilities.arcologyAgent = new App.Entity.Facilities.Facility( App.Data.Facilities.arcologyAgent,