From f0bee099a27209d4976d683a9488ed1271b57b97 Mon Sep 17 00:00:00 2001 From: lowercase-donkey <lowercasedonkey@gmail.com> Date: Sun, 3 Feb 2019 12:30:51 -0500 Subject: [PATCH] MUCH better simpler fix for overflow issue --- src/uncategorized/reputation.tw | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw index af8abc79106..9090c345bd4 100644 --- a/src/uncategorized/reputation.tw +++ b/src/uncategorized/reputation.tw @@ -115,20 +115,12 @@ On formal occasions, you are announced as $PCTitle. <</if>> <</if>> - -<<run repX(forceNeg(_repLoss), "multiplier")>> /*play games with overflow. Gains are calculated (and then sadly rounded) on previous pages but losses are calculated here, after the overflow happened. Let's borrow from the past.*/ -<<if $lastWeeksRepExpenses.overflow == 0>> - /*No overflow to borrow*/ -<<elseif $lastWeeksRepExpenses.overflow < -Math.abs(_repLoss)>> - /*let's get that wasted reputation back and spend it here*/ - <<set $rep += _repLoss>> - <<set $lastWeeksRepExpenses.overflow += _repLoss>> -<<else>> - /*let's spend what wasted reputation we can*/ - <<set $rep += _repLoss + $lastWeeksRepExpenses.overflow>> +<<if $lastWeeksRepExpenses.overflow < 0>> + <<set $rep += Math.abs($lastWeeksRepExpenses.overflow)>> <<set $lastWeeksRepExpenses.overflow = 0>> <</if>> +<<run repX(forceNeg(_repLoss), "multiplier")>> <<if ($weatherAwareness == 0) && ($weatherCladding == 2)>> The public @@.green;is awestruck@@ of the beautiful weather hardening you have applied to the arcology's exterior, though they do not understand why you would waste so much money first ruining your arcology's appearance before doing this. -- GitLab