From b048cb46d0bdcb7888d5cf210a7c6f29a02b0985 Mon Sep 17 00:00:00 2001
From: i107760 <13422-i107760@users.noreply.gitgud.io>
Date: Mon, 30 Mar 2020 20:25:17 +0200
Subject: [PATCH] Differentiate between incubator facility upkeep and per baby
 upkeep, also add `disobedience` category to 'repX' tracking

---
 src/interaction/budgets/recordTemplates.js |  3 ++-
 src/js/economyJS.js                        | 16 ++++++++++++----
 src/uncategorized/costsBudget.js           |  2 +-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/interaction/budgets/recordTemplates.js b/src/interaction/budgets/recordTemplates.js
index 13e329cbb98..69553ce253c 100644
--- a/src/interaction/budgets/recordTemplates.js
+++ b/src/interaction/budgets/recordTemplates.js
@@ -90,6 +90,7 @@ App.Data.Records.LastWeeksCash = function() {
 	this.dairy = 0,
 	this.farmyard = 0,
 	this.incubator = 0,
+	this.incubatorSlaves = 0,
 	this.nursery = 0,
 	this.pit = 0,
 	this.lab = 0,
@@ -140,7 +141,7 @@ App.Data.Records.LastWeeksRep = function() {
 	this.publicServant = 0,
 	this.gloryholeArcade = 0,
 	this.gloryhole = 0,
-
+	this.disobedience = 0,
 	this.concubine = 0,
 	this.headGirl = 0,
 	this.bodyguard = 0,
diff --git a/src/js/economyJS.js b/src/js/economyJS.js
index 47038af02f4..57f3a9380e4 100644
--- a/src/js/economyJS.js
+++ b/src/js/economyJS.js
@@ -133,7 +133,8 @@ window.CategoryAssociatedGroup = Object.freeze({
 		'slaveAssignmentFarmyardVign',
 		],
 	INCUBATOR: [
-		'incubator'
+		'incubator',
+		'incubatorSlaves'
 		],
 	NURSERY: [
 		'nursery',
@@ -240,6 +241,7 @@ window.calculateCosts = (function() {
 			getClubAdsCosts() +
 			getDairyCosts() +
 			getIncubatorCosts() +
+			getIncubatorSlavesCosts() +
 			getServantsQuartersCosts() +
 			getMasterSuiteCosts() +
 			getNurseryCosts() +
@@ -289,6 +291,7 @@ window.calculateCosts = (function() {
 		cashX(forceNeg(getClubAdsCosts()), "clubAds");
 		cashX(forceNeg(getDairyCosts()), "dairy");
 		cashX(forceNeg(getIncubatorCosts()), "incubator");
+		cashX(forceNeg(getIncubatorSlavesCosts()), "incubatorSlaves");
 		cashX(forceNeg(getServantsQuartersCosts()), "servantsQuarters");
 		cashX(forceNeg(getMasterSuiteCosts()), "masterSuite");
 		cashX(forceNeg(getNurseryCosts()), "nursery");
@@ -560,14 +563,19 @@ window.calculateCosts = (function() {
 	}
 
 	function getIncubatorCosts() {
+		let costs = 0;
+		if (V.incubator > 0) {
+			costs += ((V.incubatorWeightSetting + V.incubatorMusclesSetting + V.incubatorReproductionSetting + V.incubatorGrowthStimsSetting) * 500);
+		}
+		return costs;
+	}
+
+	function getIncubatorSlavesCosts() {
 		const facIncMultiplier = V.facilityCost * V.incubator;
 		let costs = (facIncMultiplier * 10);
 		costs += (0.2 * V.incubatorUpgradeWeight + 0.2 * V.incubatorUpgradeMuscles +
 			0.2 * V.incubatorUpgradeReproduction + 0.2 * V.incubatorUpgradeGrowthStims +
 			0.5 * V.incubatorUpgradeSpeed) * facIncMultiplier;
-		if (V.incubator > 0) {
-			costs += ((V.incubatorWeightSetting + V.incubatorMusclesSetting + V.incubatorReproductionSetting + V.incubatorGrowthStimsSetting) * 500);
-		}
 		return costs;
 	}
 
diff --git a/src/uncategorized/costsBudget.js b/src/uncategorized/costsBudget.js
index 606fc5ea5fd..65592d6d9d0 100644
--- a/src/uncategorized/costsBudget.js
+++ b/src/uncategorized/costsBudget.js
@@ -658,9 +658,9 @@ App.UI.Budget.Cost = function() {
 	generateRowCategory("Farmyard FarmhandsVign", "slaveAssignmentFarmyardVign");
 
 	// INCUBATOR
-	// TODO: Differentiate between standard upkeep, and slaves in incubator cost.
 	generateRowGroup(V.incubatorNameCaps, "INCUBATOR", V.incubator, "Incubator", V.incubatorSlaves);
 	generateRowCategory("Incubator Maintenance", "incubator");
+	generateRowCategory("Incubator Babies", "incubatorSlaves");
 
 	// NURSERY
 	generateRowGroup(V.nurseryNameCaps, "NURSERY", V.nursery, "Nursery", V.NurseryiIDs.length);
-- 
GitLab