From 781cc811e70e044ea20d313c5587cf99efd030ea Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Tue, 23 Oct 2018 18:32:43 -0400
Subject: [PATCH] economy cleanup

---
 devNotes/twine JS.txt             |  3 ++
 src/events/intro/economyIntro.tw  | 52 +++++++++++++++---------------
 src/events/intro/introSummary.tw  | 53 +++++++++++++++----------------
 src/js/storyJS.tw                 |  3 ++
 src/uncategorized/storyCaption.tw | 12 +++----
 5 files changed, 64 insertions(+), 59 deletions(-)

diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index b7164111ab3..ba4b552af92 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -74,6 +74,9 @@ Mousetrap.bind("c", function () {
 Mousetrap.bind("p", function () {
 	$("#story-caption #managePenthouse a.macro-link").trigger("click");
 });
+Mousetrap.bind("n", function () {
+	$("#story-caption #manageEconomy a.macro-link").trigger("click");
+});
 Mousetrap.bind("left", function () {
 	$("#prevSlave a.macro-link").trigger("click");
 	$("#prevRule a").trigger("click");
diff --git a/src/events/intro/economyIntro.tw b/src/events/intro/economyIntro.tw
index b4e6663569c..4a1899d6ca0 100644
--- a/src/events/intro/economyIntro.tw
+++ b/src/events/intro/economyIntro.tw
@@ -21,34 +21,36 @@
 		<br>''This is the last dance.'' //Very Hard//
 		<br>[[Easier|Economy Intro][$economy = 80]]
 	<</if>>
+
+	/*Economy settings*/
+	<br><br>@@.orange;How fast is it crumbling?@@
 	<<if $difficultySwitch == 0>>
-		<br>
-		<br>[[Activate worsening economy|Economy Intro][$difficultySwitch = 1]]
+		<br>''Barely noticeable, for now.'' //Vanilla//
+		<br>[[Harder|Economy Intro][$econRate = 1, $difficultySwitch = 1]]
+	<<elseif $econRate == 1>>
+		<br>''A slow decline.'' //Easy//
+		<br>[[Harder|Economy Intro][$econRate = 2]] | [[Easier|Economy Intro][$difficultySwitch = 0]]
+	<<elseif $econRate == 2>>
+		<br>''It's visibly deteriorating before your eyes.'' //Default Difficulty//
+		<br>[[Easier|Economy Intro][$econRate = 1]] | [[Harder|Economy Intro][$econRate = 4]]
 	<<else>>
-		/*Economy settings*/
-		<br> The economy is
-		<<if $econRate == 1>>
-	   		''slowly declining''. //Easy//
-	   		<br>[[Harder|Economy Intro][$econRate = 2]]
-		<<elseif $econRate == 2>>
-			''visibly deteriorating'' around you. //Default Difficulty//
-			<br>[[Easier|Economy Intro][$econRate = 1]] | [[Harder|Economy Intro][$econRate = 4]]
-		<<else>>
-			''going to hell in a handbasket''. //Hard//
-			<br>[[Easier|Economy Intro][$econRate = 2]]
-		<</if>>
-		/* Not functional yet, place $incomeRate = 1 in storyInit when ready for use
-		<br> All the things you need to run your arcology are getting more expensive
-		<<if $incomeMod == 0>>
-			while all forms of income ''remain static''. [[Easier|Economy Intro][$incomeRate = 1]]
-		<<elseif $incomeMod == 1>>
-			while all forms of income ''rise but can not keep pace''. [[Easier|Economy Intro][$incomeRate = 2]] | [[Harder|Economy Intro][$incomeRate = 0]]
-		<<else>>
-			but luckily all forms of income ''rise in lockstep''. [[Harder|Economy Intro][$incomeRate = 1]]
-		<</if>> */
-			<br>	
-			<br>[[Play with static economy|Economy Intro][$difficultySwitch = 0]]
+		<br>''It's going to hell in a handbasket.'' //Hard//
+		<br>[[Easier|Economy Intro][$econRate = 2]]
 	<</if>>
+
+	/* Not functional yet, place $incomeRate = 1 in storyInit when ready for use
+	<br> All the things you need to run your arcology are getting more expensive
+	<<if $incomeMod == 0>>
+		while all forms of income ''remain static''. [[Easier|Economy Intro][$incomeRate = 1]]
+	<<elseif $incomeMod == 1>>
+		while all forms of income ''rise but can not keep pace''. [[Easier|Economy Intro][$incomeRate = 2]] | [[Harder|Economy Intro][$incomeRate = 0]]
+	<<else>>
+		but luckily all forms of income ''rise in lockstep''. [[Harder|Economy Intro][$incomeRate = 1]]
+	<</if>>
+	<br>	
+	<br>[[Play with static economy|Economy Intro][$difficultySwitch = 0]]
+	 */
+
 	<br>
 	<br>[[Next|Trade Intro]]
 	<br>
diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw
index 51f648fe39c..9df31a2d9d5 100644
--- a/src/events/intro/introSummary.tw
+++ b/src/events/intro/introSummary.tw
@@ -43,38 +43,35 @@ __''World Settings''__
 	''this is the last dance.'' //Very Hard//
 	<br>[[Easier|Intro Summary][$economy = 80]]
 <</if>>
+<<if $difficultySwitch == 1>><<set $econAdvantage = -2, $localEcon = $economy>><</if>>
+<br>Economic forecast: 
 <<if $difficultySwitch == 0>>
-	<br>[[Activate worsening economy|Intro Summary][$difficultySwitch = 1]]
+	''no change.'' //Vanilla//
+	<br>[[harder|Intro Summary][$difficultySwitch = 1, $econRate = 1]]
+<<elseif $econRate == 1>>
+	''slow decline''. //Easy//
+	<br>[[Harder|Intro Summary][$econRate = 2]] | [[Easier|Intro Summary][$difficultySwitch = 0]]
+<<elseif $econRate == 2>>
+	''noticable deterioration'' //Default Difficulty//
+	<br>[[Harder|Intro Summary][$econRate = 4]] | [[Easier|Intro Summary][$econRate = 1]]
 <<else>>
-
-	<<set $econAdvantage = -2>>
-	<<set $localEcon = $economy>>
-
-	<br>Economic forecast: 
-	<<if $econRate == 1>>
-	    ''slow decline''. //Easy//
-	    <br>[[Harder|Intro Summary][$econRate = 2]]
-	<<elseif $econRate == 2>>
-		''noticable deterioration'' //Default Difficulty//
-		<br>[[Harder|Intro Summary][$econRate = 4]] | [[Easier|Intro Summary][$econRate = 1]]
-	<<else>>
-		''going to hell in a handbasket''. //Hard//
-		<br>[[Easier|Intro Summary][$econRate = 2]]
-	<</if>>
-	/* Not functional yet
-	<br> All the things you need to run your arcology are getting more expensive
-	<<if $incomeMod == 0>>
-		while all forms of income ''remain static''.
+	''going to hell in a handbasket''. //Hard//
+	<br>[[Easier|Intro Summary][$econRate = 2]]
+<</if>>
+	
+/* Not functional yet
+<br> All the things you need to run your arcology are getting more expensive
+<<if $incomeMod == 0>>
+	while all forms of income ''remain static''.
 		[[Easier|Intro Summary][$incomeMod = 1]]
-	<<elseif $incomeMod == 1>>
-		while all forms of income ''rise but can not keep pace''.
-		[[Harder|Intro Summary][$incomeMod = 0]] | [[Easier|Intro Summary][$incomeMod = 2]]
-	<<else>>
-		but luckily all forms of income ''rise in lockstep''.
-		[[Harder|Intro Summary][$incomeMod = 1]]
-	<</if>> */
-	<br>[[Play with static economy|Intro Summary][$difficultySwitch = 0]]
+<<elseif $incomeMod == 1>>
+	while all forms of income ''rise but can not keep pace''.
+	[[Harder|Intro Summary][$incomeMod = 0]] | [[Easier|Intro Summary][$incomeMod = 2]]
+<<else>>
+	but luckily all forms of income ''rise in lockstep''.
+	[[Harder|Intro Summary][$incomeMod = 1]]
 <</if>>
+*/
 
 <<set $foodCost = Math.trunc(2500/$economy)>>
 <<set $drugsCost = Math.trunc(10000/$economy)>>
diff --git a/src/js/storyJS.tw b/src/js/storyJS.tw
index a7b467264b3..e66593f702c 100644
--- a/src/js/storyJS.tw
+++ b/src/js/storyJS.tw
@@ -71,6 +71,9 @@ Mousetrap.bind("c", function () {
 Mousetrap.bind("p", function () {
 	$("#story-caption #managePenthouse a.macro-link").trigger("click");
 });
+Mousetrap.bind("n", function () {
+	$("#story-caption #manageEconomy a.macro-link").trigger("click");
+});
 Mousetrap.bind("left", function () {
 	$("#prevSlave a.macro-link").trigger("click");
 	$("#prevRule a").trigger("click");
diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw
index a172c8b988b..b33fffa9024 100644
--- a/src/uncategorized/storyCaption.tw
+++ b/src/uncategorized/storyCaption.tw
@@ -525,8 +525,8 @@
 	<<else>>
 		<br><span id="manageArcology"><<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">><</link>></span> @@.cyan;[C]@@
 		<br><span id="managePenthouse"><<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>></span> @@.cyan;[P]@@
-		<<if $difficultySwitch ==  1>>
-			<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span>
+		<<if $difficultySwitch == 1>>
+			<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@
 		<</if>>
 		<br><span id="managePerson"><<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">><</link>></span> @@.cyan;[X]@@
 		<<if $secExp == 1>>
@@ -569,8 +569,8 @@
 <<elseif _Pass == "Manage Arcology">>
 	<br>
 	<br><span id="managePenthouse"><<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>></span> @@.cyan;[P]@@
-	<<if $difficultySwitch ==  1>>
-		<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span>
+	<<if $difficultySwitch == 1>>
+		<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@
 	<</if>>
 	<br><span id="managePerson"><<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">><</link>></span> @@.cyan;[X]@@
 	<<if $secExp == 1>>
@@ -610,7 +610,7 @@
 	<br>
 	<br><span id="manageArcology"><<link [[Manage Arcology|Manage Arcology]]>><</link>></span> @@.cyan;[C]@@
 	<<if $difficultySwitch ==  1>>
-		<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span>
+		<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@
 	<</if>>
 	<br><span id="managePerson"><<link [[Manage Personal Affairs|Manage Personal Affairs]]>><</link>></span> @@.cyan;[X]@@
 	<br>
@@ -661,7 +661,7 @@
 	<br><span id="manageArcology"><<link [[Manage Arcology|Manage Arcology]]>><</link>></span> @@.cyan;[C]@@
 	<br><span id="managePenthouse"><<link [[Manage Penthouse|Manage Penthouse]]>><</link>></span> @@.cyan;[X]@@
 	<<if $difficultySwitch ==  1>>
-		<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span>
+		<br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@
 	<</if>>	
 	<br>
 	<br><<link [[Wardrobe]]>><</link>>
-- 
GitLab