From 88878176acb885c8b999298d5e738006a8d98bda Mon Sep 17 00:00:00 2001
From: Blank <blank@national.shitposting.agency>
Date: Mon, 22 Jul 2019 12:18:42 -0700
Subject: [PATCH] ITTFixes

---
 devTools/DL-Loop.sh            | 30 ++++++++++++++++++++++++++++++
 devTools/PreCompile.sh         |  2 +-
 src/SecExp/secExpSmilingMan.tw |  3 ++-
 src/js/slaveSummaryWidgets.js  | 18 +++++++++++++-----
 4 files changed, 46 insertions(+), 7 deletions(-)
 create mode 100755 devTools/DL-Loop.sh

diff --git a/devTools/DL-Loop.sh b/devTools/DL-Loop.sh
new file mode 100755
index 00000000000..9f8e8e36eee
--- /dev/null
+++ b/devTools/DL-Loop.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+echo "Use temp?" && read varname1
+echo "Use upstream or origin? 1:0" && read varname2
+echo "Use master or current branch? 1:0" && read varname3
+echo "Dry run? 1:0" && read varname4
+
+if [[ $varname2 == 1 ]];then
+	varname2='pregmodfan'
+else
+	varname2=$(git remote show origin|grep -e /|head -n 1|sed s#git@ssh.gitgud.io:#https://gitgud.io/#|cut -c 32-|sed s#/fc-pregmod.git##)
+fi
+if [[ $varname3 == 1 ]];then
+	varname3='pregmod-master'
+else
+	varname3=$(git rev-parse --abbrev-ref HEAD)
+fi
+
+if [[ $varname4 == 1 ]];then
+ echo "https://gitgud.io/$varname2/fc-pregmod/raw/$varname3/"
+else
+	for ((i=0; i<=$#; i++))
+	do
+		if [[ $varname1 == y ]]; then
+			wget -q -P /tmp/ https://gitgud.io/$varname2/fc-pregmod/raw/$varname3/${!i}
+		else
+			#curl $varname3/raw/pregmod-master/${!i}
+			wget -q https://gitgud.io/$varname2/fc-pregmod/raw/$varname3/${!i}
+		fi 
+	done
+fi
\ No newline at end of file
diff --git a/devTools/PreCompile.sh b/devTools/PreCompile.sh
index 00c65c70264..521e454a78c 100755
--- a/devTools/PreCompile.sh
+++ b/devTools/PreCompile.sh
@@ -7,6 +7,6 @@ while true;do gen=0;cd $4;
 	git fetch -q && if [ `git rev-list ...origin|wc -l` -gt 0 ];then git pull -q&&gen=1;fi #stackoverflow.com/a/17192101
 	if [[ $gen > 0 ]];then rm bin/*;./compile.sh -q&&cd bin/
 		mv *.h* FC-`git log -1 --format=%cd --date=format:%m-%d-%Y-%H-%M`-`git log|head -1|cut -c8-11`.html
-		mega-put -c *.h* $3&&mega-rm $3`mega-ls GitFC/|head -n 1`
+		mega-put -c *.h* $3&&mega-rm $3`mega-ls $3head -n 1`
 	fi
 clear;sleep 15m;done
\ No newline at end of file
diff --git a/src/SecExp/secExpSmilingMan.tw b/src/SecExp/secExpSmilingMan.tw
index 4d2fc8a2a13..b58a8526c21 100644
--- a/src/SecExp/secExpSmilingMan.tw
+++ b/src/SecExp/secExpSmilingMan.tw
@@ -413,6 +413,7 @@
 		For such a criminal a simple execution is not enough. You order the $girl captured and crucified outside the city, with a mask resembling $his famous symbol. Your men quickly obey. $He never once shows sign of pain or fear, remaining stoic and proud to the end.
 		Once $his life ends, you order a statue erected in commemoration of the death of the Smiling Man. From this day forward the statue of the crucified criminal will adorn your arcology and his legend will be forever entangled with yours.
 		<br>Having dealt with the Smiling Man will provide @@.green;a large boost to your reputation, as well as a moderate amount of reputation each week.@@
+		<<run repX(10000, "architecture")>>
 	<<elseif $smilingManFate == 2>>
 		<<set $activeSlave.clothes = "no clothing">>
 		<<if $relationshipLM >= 4>>
@@ -426,4 +427,4 @@
 		<br>
 		<<include "New Slave Intro">>
 	<</if>>
-<</if>>
+<</if>>
\ No newline at end of file
diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js
index 365f311eaad..8ba81753fdd 100644
--- a/src/js/slaveSummaryWidgets.js
+++ b/src/js/slaveSummaryWidgets.js
@@ -722,8 +722,12 @@ window.SlaveSummaryUncached = (function() {
 		} else if (slave.health > 20) {
 			makeSpan(c, "H", ["green", "strong"], true, slave.health);
 		}
-		if (passage() === "Clinic" && V.clinicUpgradeScanner && slave.chem > 15) {
-			makeSpan(c, `C${Math.ceil(slave.chem/10)}`, ["cyan", "strong"]);
+		if (passage() === "Clinic" && V.clinicUpgradeScanner) {
+			if(slave.chem > 15) {
+				makeSpan(c, `C${Math.ceil(slave.chem/10)}`, ["cyan", "strong"]);
+			} else if (slave.chem <= 15 && slave.assignment === "get treatment in the clinic") {
+				makeSpan(c, `Discharged: ${slave.name}.`, ["green", "strong"]);
+			}
 		}
 	}
 
@@ -748,8 +752,12 @@ window.SlaveSummaryUncached = (function() {
 		} else {
 			makeSpan(c, "Unnaturally healthy", "green", true, slave.health);
 		}
-		if (passage() === "Clinic" && V.clinicUpgradeScanner && slave.chem > 15) {
-			makeSpan(c, `Carcinogen buildup: ${Math.ceil(slave.chem/10)}.`, "cyan");
+		if (passage() === "Clinic" && V.clinicUpgradeScanner) {
+			if(slave.chem > 15) {
+				makeSpan(c, `Carcinogen buildup: ${Math.ceil(slave.chem/10)}.`, "cyan");
+			} else if (slave.chem <= 15 && slave.assignment === "get treatment in the clinic") {
+				makeSpan(c, `Discharged: ${slave.name}.`, "green");
+			}
 		}
 	}
 
@@ -4628,4 +4636,4 @@ window.SlaveSummaryUncached = (function() {
 	}
 
 	return SlaveSummaryUncached;
-})();
+})();
\ No newline at end of file
-- 
GitLab