From c12c792dfd35b3cf1a5f6eaac1c23fa487b01deb Mon Sep 17 00:00:00 2001
From: gheimhridh <gheimhridh@protonmail.ch>
Date: Fri, 15 Dec 2017 01:02:35 +0200
Subject: [PATCH] SFMBarracks.tw fix

---
 src/uncategorized/SFMBarracks.tw | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uncategorized/SFMBarracks.tw b/src/uncategorized/SFMBarracks.tw
index d56e863f8d5..dfc45521c52 100644
--- a/src/uncategorized/SFMBarracks.tw
+++ b/src/uncategorized/SFMBarracks.tw
@@ -47,7 +47,7 @@
 	<span id="result">
 		<<link "Ask _Name for some extra cash">><br>
 		<<replace "#result">>
-		<<set $CashGift = (Math.ceil(($cash*0.05)*(Math.max(0.99,$SFAO))))*$Env>>
+		<<set $CashGift = (Math.ceil((Math.abs($cash)*0.05)*(Math.max(0.99,$SFAO))))*$Env>>
 			<<if random(1,100) > 50>>
 				<<if random(1,100) > 50>>
 					_Name nods. "Sure boss," she says, "we had a bit of a haul this week. One of my sergeants convinced a woman to tell us where she had hidden her shit. Cut her up pretty bad, but she told us. Bunch of nice jewelry, I kept a nice piece for myself." She picks up a tablet on the table, tapping a few commands on it. "@@.green;There's your cut,@@ ¤<<print $CashGift>>."
@@ -113,7 +113,7 @@
 	<br>//The Colonel has already spent time with you this week or is unable able to find time in her busy week to <<if $securityForceSexedColonelToken == 1>>'relax'<<elseif $securityForceColonelToken == 1>>relax<</if>> with you.//
 <</if>>
 
-<<set _securityForceUpgradeResetTokenCurrentCost = $cash*.05>>
+<<set _securityForceUpgradeResetTokenCurrentCost = Math.abs($cash)*.05>>
 <<if $securityForceUpgradeToken == 1 && $securityForceUpgradeTokenReset >= 0 && $SFAO > 0>>
 	<br><br>_Name "says certainly <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, it is possible to upgrade $securityForceName more than once per week, however, it will cost you."
 	<br>
-- 
GitLab