From 4a665bd3a3ae74e6d5febef8806cff21c01084e0 Mon Sep 17 00:00:00 2001
From: lowercase-donkey <lowercasedonkey@gmail.com>
Date: Wed, 31 Jul 2019 16:11:49 -0400
Subject: [PATCH] Allow nasty scars to be applied quickly

---
 src/js/modification.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/js/modification.js b/src/js/modification.js
index ab6a0f33a0d..5e56cd04709 100644
--- a/src/js/modification.js
+++ b/src/js/modification.js
@@ -5,19 +5,22 @@ App.Medicine.Modification = {};
  * @param {string} scar
  *  @param {string} design
  */
-App.Medicine.Modification.addScar = function(slave, scar, design) {
+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.
 	cashX(forceNeg(surgery.costs), "slaveSurgery", slave);
 	slave.health -= (V.PC.medicine >= 100) ? Math.round(surgery.healthCosts / 2) : surgery.healthCosts;*/
+	if (!weight) {
+		weight = 1;
+	}
 	if (!slave.scar.hasOwnProperty(scar)) {
 		slave.scar[scar] = new App.Entity.scarState();
 	}
 	if (!slave.scar[scar].hasOwnProperty(design)) {
-		slave.scar[scar][design] = 1;
+		slave.scar[scar][design] = weight;
 	} else {
-		slave.scar[scar][design] += 1;
+		slave.scar[scar][design] += weight;
 	}
 };
-- 
GitLab