From 6f7158ebf0f64d45f47664f3a9f456678aa028ab Mon Sep 17 00:00:00 2001
From: Blank <blank@national.shitposting.agency>
Date: Tue, 14 May 2019 02:15:32 -0700
Subject: [PATCH] deHardCodeProsperity

---
 src/js/datatypeCleanupJS.js          | 2 +-
 src/uncategorized/buildingWidgets.tw | 4 +---
 src/uncategorized/nextWeek.tw        | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js
index 9a03dc6c272..0a425fdf3cc 100644
--- a/src/js/datatypeCleanupJS.js
+++ b/src/js/datatypeCleanupJS.js
@@ -1515,7 +1515,7 @@ window.EconomyDatatypeCleanup = function EconomyDatatypeCleanup() {
 	V.ASlaves = Math.max(+V.ASlaves, 0) || 0;
 	V.shelterAbuse = Math.max(+V.shelterAbuse, 0) || 0;
 
-	V.arcologies[0].prosperity = Math.clamp(+V.arcologies[0].prosperity, 1, 300) || 1;
+	V.arcologies[0].prosperity = Math.clamp(+V.arcologies[0].prosperity, 1, V.AProsperityCap) || 1;
 	V.AProsperityCap = Math.max(+V.AProsperityCap, 0) || 0;
 	V.arcologies[0].ownership = Math.clamp(+V.arcologies[0].ownership, 0, 100) || 0;
 	V.arcologies[0].minority = Math.clamp(+V.arcologies[0].minority, 0, 100) || 0;
diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw
index 835204499bb..207dc5f6a51 100644
--- a/src/uncategorized/buildingWidgets.tw
+++ b/src/uncategorized/buildingWidgets.tw
@@ -239,9 +239,7 @@ Updates $AProsperityCap, $Sweatshops.
 	<</for>>
 <</if>>
 <<for _i = 8; _i <= 19; _i++>>
-	<<if $sectors[_i].type == "DenseApartments">>
-		<<set $AProsperityCap += 10>>
-	<<elseif $sectors[_i].type == "LuxuryApartments">>
+	<<if $sectors[_i].type == "LuxuryApartments">>
 		<<set $AProsperityCap += 15>>
 	<<else>>
 		<<set $AProsperityCap += 10>>
diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw
index 158df4aacd9..1ef1c36ef9a 100644
--- a/src/uncategorized/nextWeek.tw
+++ b/src/uncategorized/nextWeek.tw
@@ -96,7 +96,7 @@
 	<<set $surgeryCost = Math.trunc(30000/$localEcon)>>
 <</if>>
 
-<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, 300)>>
+<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, $AProsperityCap)>>
 
 <<set $averageTrust = 0, $averageDevotion = 0, _slavesContributing = 0, _OldHG = -1, _NewHG = -1, _SL = $slaves.length>>
 <<if $studio == 1>>
-- 
GitLab