From 35ed4abb8d6da1ae6acc716ba20a4debfa4707d6 Mon Sep 17 00:00:00 2001
From: i107760 <13422-i107760@users.noreply.gitgud.io>
Date: Mon, 9 Mar 2020 08:20:04 +0100
Subject: [PATCH] Fix `costsReport.tw` to check for ad spending instead of
 facility presence and fix indentation

---
 src/uncategorized/costsReport.tw | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 592a0da8e3d..fdadf1b7a48 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -118,19 +118,18 @@ your personal living expenses are @@.yellowgreen;<<print cashFormat(Math.trunc(_
 <<if $brothel > 0 || $club > 0 || $arcade > 0 || $dairy > 0 || $farmyard > 0>>
 	<br><br>__Arcology Building Maintenance__:
 	<<if $brothel > 0>>
-	<<set _advertising = 0>>
-	<<if $brothel > 0>>
-		<<set _advertising = $brothelAdsSpending>>
+		<<set _advertising = 0>>
+		<<if $brothelAdsSpending > 0>>
+			<<set _advertising = $brothelAdsSpending>>
+		<</if>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;
+		Brothel: @@.yellowgreen;<<print cashFormat(($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising)>>@@
+		<<set _arcologyCosts += ($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising>>
 	<</if>>
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;
-	Brothel: @@.yellowgreen;<<print cashFormat(($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising)>>@@
-	<<set _arcologyCosts += ($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising>>
-<</if>>
 	<<if $club > 0>>
 		<<set _advertising= 0>>
-		<<if $club > 0>>
+		<<if $clubAdsSpending > 0>>
 			<<set _advertising = $clubAdsSpending>>
-			<<set _arcologyCosts += $clubAdsSpending>>
 		<</if>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
 		Club: @@.yellowgreen;<<print cashFormat(($club*$facilityCost)+(0.2*$clubUpgradePDAs*$club*$facilityCost)+_advertising)>>@@
-- 
GitLab