From 280371349c00df3d0b19172fa933ec395763b4e5 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Sat, 27 Jun 2020 20:06:17 -0700 Subject: [PATCH] Fix types, don't cache V --- src/npc/surgery/surgery.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/npc/surgery/surgery.js b/src/npc/surgery/surgery.js index 6b47b41d0aa..7db885a87d4 100644 --- a/src/npc/surgery/surgery.js +++ b/src/npc/surgery/surgery.js @@ -131,7 +131,6 @@ App.Medicine.Surgery.ListHelpers = class { /** @private */ this._pronouns = pronouns; /** @private */ - this._V = V; this._showCCs = showCCs; } @@ -148,7 +147,7 @@ App.Medicine.Surgery.ListHelpers = class { slave[`${this._bodyPart}Implant`] = size; slave[`${this._bodyPart}ImplantType`] = implantType; slave[this._bodyPart] += size; - }, this._V.surgeryCost, 10, this._bodyPart + }, V.surgeryCost, 10, this._bodyPart ); } @@ -160,13 +159,13 @@ App.Medicine.Surgery.ListHelpers = class { slave[`${this._bodyPart}`] -= slave[`${this._bodyPart}Implant`]; slave[`${this._bodyPart}Implant`] = 0; slave[`${this._bodyPart}ImplantType`] = "none"; - }, this._V.surgeryCost, 5, `${this._bodyPart}Loss` + }, V.surgeryCost, 5, `${this._bodyPart}Loss` ); } /** * @param {string} name - * @param {number} implantType + * @param {string} implantType * @param {number} size * @param {number} [implantPrice=0] * @returns {App.Medicine.Surgery.Procedure} @@ -179,7 +178,7 @@ App.Medicine.Surgery.ListHelpers = class { slave[this._bodyPart] += size - slave[`${this._bodyPart}Implant`]; slave[`${this._bodyPart}Implant`] = size; slave[`${this._bodyPart}ImplantType`] = implantType; - }, this._V.surgeryCost + implantPrice, 10, this._bodyPart + }, V.surgeryCost + implantPrice, 10, this._bodyPart ); } @@ -194,7 +193,7 @@ App.Medicine.Surgery.ListHelpers = class { slave[`${this._bodyPart}Implant`] += volume; slave[this._bodyPart] += volume; }, - this._V.surgeryCost, 10, this._bodyPart + V.surgeryCost, 10, this._bodyPart ); } @@ -208,7 +207,7 @@ App.Medicine.Surgery.ListHelpers = class { slave => { slave[`${this._bodyPart}Implant`] -= volume; slave[this._bodyPart] -= volume; - }, this._V.surgeryCost, 5, `${this._bodyPart}Loss` + }, V.surgeryCost, 5, `${this._bodyPart}Loss` ); } @@ -223,7 +222,7 @@ App.Medicine.Surgery.ListHelpers = class { `${procedureName} ${this._pronouns.his} ${this._bodyPart}`, slave => { slave[this._bodyPart] -= sizeChange; - }, this._V.surgeryCost, 5, `${this._bodyPart}Loss` + }, V.surgeryCost, 5, `${this._bodyPart}Loss` ); } }; @@ -292,13 +291,12 @@ App.Medicine.Surgery.sizingProcedures = function() { function boobSizingProcedures(slave, options = {}) { const thisArcology = V.arcologies[0]; const largeImplantsAvailable = thisArcology.FSTransformationFetishistResearch === 1; - const advancedFillableImplantsAvailable = V.ImplantProductionUpgrade === 1; const advancedSurgeryAvailable = V.ImplantProductionUpgrade === 1; const pronouns = getPronouns(slave); const {he, His} = pronouns; const types = App.Medicine.Keys.Surgery.Target.breast; // shortcuts - const helper = new App.Medicine.Surgery.ListHelpers(slave, "boobs", types, pronouns, V.showBoobCCs); + const helper = new App.Medicine.Surgery.ListHelpers(slave, "boobs", types, pronouns, V.showBoobCCs > 0); const areStringsInstalled = slave.boobsImplantType === "string"; const areFillablesInstalled = ["fillable", "advanced fillable", "hyper fillable"].includes(slave.boobsImplantType); @@ -451,7 +449,6 @@ App.Medicine.Surgery.sizingProcedures = function() { function buttSizingProcedures(slave, options = {}) { const thisArcology = V.arcologies[0]; const largeImplantsAvailable = thisArcology.FSTransformationFetishistResearch === 1; - const advancedFillableImplantsAvailable = V.ImplantProductionUpgrade === 1; const advancedSurgeryAvailable = V.ImplantProductionUpgrade === 1; const pronouns = getPronouns(slave); const {he, His} = pronouns; -- GitLab