diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index f05294145975afadded526be5f3453c60c7c24e3..395fdbfb9d4b303d449bba8d10cf347eee4a9587 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -2272,7 +2272,6 @@ window.predictCost = function(array) { getSFCosts() + getWeatherCosts() ); - totalCosts = Math.trunc(totalCosts); /* // clean up if(totalCosts > 0) { @@ -4167,13 +4166,9 @@ window.commaNum = function(s) { return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }; -window.cashNumFormat = function(s) { - if(!s) { s = 0; } - return commaNum(Math.round(s * 100) / 100); -}; - window.cashFormat = function(s) { - return "¤"+cashNumFormat(s); + if (!s) { s = 0; } + return "¤" + commaNum(Math.round(s * 100) / 100); }; window.isFloat = function(n){ diff --git a/src/js/utilJS.tw b/src/js/utilJS.tw index b1f8dba638ffacc060ac0bbd0cb18029f1c83e65..93e31243712dbb5ae06368716b8e3831596d6e0e 100644 --- a/src/js/utilJS.tw +++ b/src/js/utilJS.tw @@ -486,13 +486,9 @@ window.commaNum = function(s) { return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }; -window.cashNumFormat = function(s) { - if(!s) { s = 0; } - return commaNum(Math.round(s * 100) / 100); -}; - window.cashFormat = function(s) { - return "¤"+cashNumFormat(s); + if (!s) { s = 0; } + return "¤" + commaNum(Math.round(s * 100) / 100); }; window.isFloat = function(n){ diff --git a/src/uncategorized/costsBudget.tw b/src/uncategorized/costsBudget.tw index 13126c8a9effb2cef8fb8c5036623ac42888622b..510f667989a00f62c25b20514262124e67ae60f4 100644 --- a/src/uncategorized/costsBudget.tw +++ b/src/uncategorized/costsBudget.tw @@ -51,12 +51,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.whore || $lastWeeksCashExpenses.whore>> /* If it's not 0, it will return true. */ <tr> <td>Whores</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.whore))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.whore))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.whore) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.whore))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.whore))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.whore) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.whore))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.whore))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.whore = ($lastWeeksCashIncome.whore + $lastWeeksCashExpenses.whore)>> <<if $lastWeeksCashProfits.whore > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.whore) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>@@ <</if>> @@ -67,12 +81,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.rest || $lastWeeksCashExpenses.rest>> <tr> <td>Resting</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.rest))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rest))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.rest) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.rest))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.rest))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.rest) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rest))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.rest))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.rest = ($lastWeeksCashIncome.rest + $lastWeeksCashExpenses.rest)>> <<if $lastWeeksCashProfits.rest > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.rest) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>@@ <</if>> @@ -83,12 +111,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fucktoy || $lastWeeksCashExpenses.fucktoy>> <tr> <td>Fucktoys <<if $Concubine != 0>>including your concubine <</if>>($fuckSlaves slaves)</td> - <td>$lastWeeksCashIncome.fucktoy rep</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fucktoy))>>@@</td> + <td> + <<if $lastWeeksCashIncome.fucktoy > 0>> /* TODO: not sure what to do for these */ + @@.green;$lastWeeksCashIncome.fucktoy rep@@ + <<else>> + $lastWeeksCashIncome.fucktoy rep + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.fucktoy) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fucktoy))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.fucktoy))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.fucktoy = (+ $lastWeeksCashExpenses.fucktoy)>> <<if $lastWeeksCashProfits.fucktoy > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.fucktoy) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>@@ <</if>> @@ -99,12 +141,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.subordinateSlave || $lastWeeksCashExpenses.subordinateSlave>> <tr> <td>subordinateSlaves</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.subordinateSlave))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.subordinateSlave))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.subordinateSlave) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.subordinateSlave))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.subordinateSlave))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.subordinateSlave) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.subordinateSlave))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.subordinateSlave))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.subordinateSlave = ($lastWeeksCashIncome.subordinateSlave + $lastWeeksCashExpenses.subordinateSlave)>> <<if $lastWeeksCashProfits.subordinateSlave > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.subordinateSlave))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.subordinateSlave))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.subordinateSlave) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.subordinateSlave))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.subordinateSlave))>>@@ <</if>> @@ -115,12 +171,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.houseServant || $lastWeeksCashExpenses.houseServant>> <tr> <td>HouseServants</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.houseServant))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.houseServant))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.houseServant) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.houseServant))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.houseServant))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.houseServant) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.houseServant))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.houseServant))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.houseServant = ($lastWeeksCashIncome.houseServant + $lastWeeksCashExpenses.houseServant)>> <<if $lastWeeksCashProfits.houseServant > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.houseServant) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>@@ <</if>> @@ -131,12 +201,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.confined || $lastWeeksCashExpenses.confined>> <tr> <td>Confined</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.confined))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.confined))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.confined) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.confined))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.confined))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.confined) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.confined))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.confined))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.confined = ($lastWeeksCashIncome.confined + $lastWeeksCashExpenses.confined)>> <<if $lastWeeksCashProfits.confined > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.confined) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>@@ <</if>> @@ -147,12 +231,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.publicServant || $lastWeeksCashExpenses.publicServant>> <tr> <td>Public servants</td> - <td>$lastWeeksCashIncome.publicServant rep</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.publicServant))>>@@</td> + <td> + <<if $lastWeeksCashIncome.publicServant > 0>> /* TODO: not sure what to do for these */ + @@.green;$lastWeeksCashIncome.publicServant rep@@ + <<else>> + $lastWeeksCashIncome.publicServant rep + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.publicServant) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.publicServant))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.publicServant))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.publicServant = ($lastWeeksCashIncome.publicServant + $lastWeeksCashExpenses.publicServant)>> <<if $lastWeeksCashProfits.publicServant > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.publicServant) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>@@ <</if>> @@ -163,12 +261,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.classes || $lastWeeksCashExpenses.classes>> <tr> <td>Classes</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.classes))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.classes))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.classes) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.classes))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.classes))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.classes) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.classes))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.classes))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.classes = ($lastWeeksCashIncome.classes + $lastWeeksCashExpenses.classes)>> <<if $lastWeeksCashProfits.classes > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.classes) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>@@ <</if>> @@ -180,12 +292,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.milked || $lastWeeksCashExpenses.milked>> <tr> <td>Milked</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.milked))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.milked))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.milked) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.milked))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.milked))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.milked) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.milked))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.milked))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.milked = ($lastWeeksCashIncome.milked + $lastWeeksCashExpenses.milked)>> <<if $lastWeeksCashProfits.milked > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.milked) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>@@ <</if>> @@ -196,12 +322,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.gloryhole || $lastWeeksCashExpenses.gloryhole>> <tr> <td>Gloryhole</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryhole))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.gloryhole))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.gloryhole) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryhole))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryhole))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.gloryhole) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.gloryhole))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.gloryhole))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.gloryhole = ($lastWeeksCashIncome.gloryhole + $lastWeeksCashExpenses.gloryhole)>> <<if $lastWeeksCashProfits.gloryhole > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.gloryhole) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>@@ <</if>> @@ -219,12 +359,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $brothel > 0>> <tr> <td>[[$brothelNameCaps|Brothel][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($brothelSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothel))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothel))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.brothel) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothel))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.brothel))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.brothel) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothel))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothel))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.brothel = ($lastWeeksCashIncome.brothel + $lastWeeksCashExpenses.brothel)>> <<if $lastWeeksCashProfits.brothel > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.brothel) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>@@ <</if>> @@ -235,12 +389,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.brothelAds || $lastWeeksCashExpenses.brothelAds>> <tr> <td>[[Brothel Ads|Brothel Advertisement][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] also increase the income of whoring slaves in "jobs."</td> /* TODO: this is also weird */ - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothelAds))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothelAds))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.brothelAds) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothelAds))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.brothelAds))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.brothelAds) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothelAds))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothelAds))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.brothelAds = ($lastWeeksCashIncome.brothelAds + $lastWeeksCashExpenses.brothelAds)>> <<if $lastWeeksCashProfits.brothelAds > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.brothelAds) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>@@ <</if>> @@ -251,12 +419,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $club > 0>> <tr> <td>[[$clubNameCaps|Club][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clubSlaves slaves)</td> - <td>$lastWeeksCashIncome.club rep</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.club))>>@@</td> + <td> + <<if $lastWeeksCashIncome.club > 0>> /* TODO: not sure what to do for these */ + @@.green;$lastWeeksCashIncome.club rep@@ + <<else>> + $lastWeeksCashIncome.club rep + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.club) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.club))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.club))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.club = ($lastWeeksCashIncome.club + $lastWeeksCashExpenses.club)>> <<if $lastWeeksCashProfits.club > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.club) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>@@ <</if>> @@ -267,12 +449,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.clubAds || $lastWeeksCashExpenses.clubAds>> <tr> <td>[[Club Ads|Club Advertisement][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.clubAds))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clubAds))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.clubAds) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.clubAds))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.clubAds))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.clubAds) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clubAds))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.clubAds))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.clubAds = ($lastWeeksCashIncome.clubAds + $lastWeeksCashExpenses.clubAds)>> <<if $lastWeeksCashProfits.clubAds > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.clubAds) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>@@ <</if>> @@ -283,12 +479,24 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $arcade > 0>> <tr> <td>[[$arcadeNameCaps|Arcade][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($arcadeSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcade))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcade))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.arcade) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcade))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.arcade))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.arcade) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcade))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcade))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.arcade = ($lastWeeksCashIncome.arcade + $lastWeeksCashExpenses.arcade)>> <<if $lastWeeksCashProfits.arcade > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcade))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcade))>>@@ <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcade))>>@@ <</if>> @@ -299,12 +507,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $dairy > 0>> <tr> <td>[[$dairyNameCaps|Dairy][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($dairySlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.dairy))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.dairy))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.dairy) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.dairy))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.dairy))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.dairy) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.dairy))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.dairy))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.dairy = ($lastWeeksCashIncome.dairy + $lastWeeksCashExpenses.dairy)>> <<if $lastWeeksCashProfits.dairy > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.dairy) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>@@ <</if>> @@ -315,11 +537,29 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($servantsQuarters > 0) && ($servantsQuartersUpgradeMonitoring > 0)>> <tr> <td>[[Servants' Quarters][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($servantsQuartersSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.servantsQuarters))>>@@</td> /*Does not count servants who are serving, only what Stewardess makes. If I can find savings, perhaps show as negative expense? */ - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.servantsQuarters))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.servantsQuarters) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.servantsQuarters))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.servantsQuarters))>> + <</if>> + </td> /*Does not count servants who are serving, only what Stewardess makes. If I can find savings, perhaps show as negative expense? */ + <td> + <<if Math.trunc($lastWeeksCashExpenses.servantsQuarters) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.servantsQuarters))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.servantsQuarters))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.servantsQuarters = ($lastWeeksCashIncome.servantsQuarters + $lastWeeksCashExpenses.servantsQuarters)>> - //$lastWeeksCashProfits.servantsQuarters// + <<if $lastWeeksCashProfits.servantsQuarters > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.servantsQuarters))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.servantsQuarters) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.servantsQuarters))>> + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.servantsQuarters))>>@@ + <</if>> </td> </tr> <</if>> @@ -327,12 +567,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($masterSuiteUpgradePregnancy == 1)>> <tr> <td>[[Master Suite][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($masterSuiteSlaves slaves)</td> - <td>$lastWeeksCashIncome.masterSuite rep</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.masterSuite))>>@@</td> + <td> + <<if $lastWeeksCashIncome.masterSuite > 0>> /* TODO: not sure what to do for these */ + @@.green;$lastWeeksCashIncome.masterSuite rep@@ + <<else>> + $lastWeeksCashIncome.masterSuite rep + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.masterSuite) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.masterSuite))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.masterSuite))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.masterSuite = ($lastWeeksCashIncome.masterSuite + $lastWeeksCashExpenses.masterSuite)>> <<if $lastWeeksCashProfits.masterSuite > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.masterSuite) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>@@ <</if>> @@ -343,12 +597,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $schoolroom>> <tr> <td>[[$schoolroomNameCaps|Schoolroom][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($schoolroomSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.school))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.school))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.school) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.school))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.school))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.school) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.school))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.school))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.school = ($lastWeeksCashIncome.school + $lastWeeksCashExpenses.school)>> <<if $lastWeeksCashProfits.school > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.school) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>@@ <</if>> @@ -359,12 +627,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $spa>> <tr> <td>[[$spaNameCaps|Spa][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($spaSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.spa))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.spa))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.spa) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.spa))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.spa))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.spa) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.spa))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.spa))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.spa = ($lastWeeksCashIncome.spa + $lastWeeksCashExpenses.spa)>> <<if $lastWeeksCashProfits.spa > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.spa) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>@@ <</if>> @@ -375,12 +657,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $clinic>> <tr> <td>[[$clinicNameCaps|Clinic][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clinicSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.clinic))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clinic))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.clinic) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.clinic))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.clinic))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.clinic) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clinic))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.clinic))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.clinic = ($lastWeeksCashIncome.clinic + $lastWeeksCashExpenses.clinic)>> <<if $lastWeeksCashProfits.clinic > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.clinic) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>@@ <</if>> @@ -391,12 +687,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $cellblock>> <tr> <td>[[$cellblockNameCaps|Cellblock][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($cellblockSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.cellblock))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cellblock))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.cellblock) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.cellblock))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.cellblock))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.cellblock) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cellblock))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.cellblock))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.cellblock = ($lastWeeksCashIncome.cellblock + $lastWeeksCashExpenses.cellblock)>> <<if $lastWeeksCashProfits.cellblock > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.cellblock) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>@@ <</if>> @@ -407,15 +717,23 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $researchLab.built == "true">> <tr> <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] maintenance</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.lab))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.lab) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.lab))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.lab))>> + <</if>> + </td> <td> <<set $lastWeeksCashExpenses.lab = (100*$researchLab.maxSpace)>> - <<= cashNumFormat($lastWeeksCashExpenses.lab)>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.lab))>>@@ </td> <td> <<set $lastWeeksCashProfits.lab = ($lastWeeksCashIncome.lab + $lastWeeksCashExpenses.lab)>> <<if $lastWeeksCashProfits.lab > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.lab) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>@@ <</if>> @@ -427,16 +745,16 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <tr> <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($researchLab.hired scientists)</td> <td></td> - <td><<print cashNumFormat(300*$researchLab.hired)>></td> - <td><<print cashNumFormat(300*$researchLab.hired)>></td> + <td>@@.yellowgreen;+<<print cashFormat(Math.trunc(300*$researchLab.hired))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc(300*$researchLab.hired))>>@@</td> </tr> <</if>> <<if $researchLab.menials != 0>> <tr> <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($researchLab.menials menial Slaves)</td> <td></td> - <td><<print cashNumFormat(100*$researchLab.menials)>></td> - <td><<print cashNumFormat(100*$researchLab.menials)>></td> + <td>@@.yellowgreen;+<<print cashFormat(Math.trunc(100*$researchLab.menials))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc(100*$researchLab.menials))>>@@</td> </tr> <</if>> // @@ -448,12 +766,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.cyberMod || $lastWeeksCashExpenses.cyberMod>> <tr> <td>CyberMod</td> /* TODO: this doesn't fit in*/ - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.cyberMod))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cyberMod))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.cyberMod) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.cyberMod))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.cyberMod))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.cyberMod) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cyberMod))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.cyberMod))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.cyberMod = ($lastWeeksCashIncome.cyberMod + $lastWeeksCashExpenses.cyberMod)>> <<if $lastWeeksCashProfits.cyberMod > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cyberMod))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.cyberMod))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.cyberMod) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.cyberMod))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cyberMod))>>@@ <</if>> @@ -464,12 +796,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $incubator>> <tr> <td>[[$incubatorNameCaps|Incubator][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($incubatorSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.incubator))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.incubator))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.incubator) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.incubator))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.incubator))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.incubator) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.incubator))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.incubator))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.incubator = ($lastWeeksCashIncome.incubator + $lastWeeksCashExpenses.incubator)>> <<if $lastWeeksCashProfits.incubator > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.incubator) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>@@ <</if>> @@ -480,12 +826,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $nursery>> <tr> <td>[[$nurseryNameCaps|Nursery][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($nurserySlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.nursery))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.nursery))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.nursery) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.nursery))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.nursery))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.nursery) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.nursery))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.nursery))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.nursery = ($lastWeeksCashIncome.nursery + $lastWeeksCashExpenses.nursery)>> <<if $lastWeeksCashProfits.nursery > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.nursery) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>@@ <</if>> @@ -496,12 +856,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $farmyard>> <tr> <td>[[$farmyardNameCaps|Farmyard][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($farmyardSlaves slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.farmyard))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.farmyard))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.farmyard) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.farmyard))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.farmyard))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.farmyard) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.farmyard))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.farmyard))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.farmyard = ($lastWeeksCashIncome.farmyard + $lastWeeksCashExpenses.farmyard)>> <<if $lastWeeksCashProfits.farmyard > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.farmyard) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>@@ <</if>> @@ -512,12 +886,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $pit>> <tr> <td>[[$pitNameCaps|Pit][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($fighterIDs.length slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.pit))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.pit))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.pit) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.pit))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.pit))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.pit) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.pit))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.pit))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.pit = ($lastWeeksCashIncome.pit + $lastWeeksCashExpenses.pit)>> <<if $lastWeeksCashProfits.pit > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.pit) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>@@ <</if>> @@ -528,12 +916,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.arcologyImprovement || $lastWeeksCashExpenses.arcologyImprovement>> <tr> <td>Arcology construction and repair</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcologyImprovement))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcologyImprovement))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.arcologyImprovement) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcologyImprovement))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.arcologyImprovement))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.arcologyImprovement) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcologyImprovement))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcologyImprovement))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.arcologyImprovement = ($lastWeeksCashIncome.arcologyImprovement + $lastWeeksCashExpenses.arcologyImprovement)>> <<if $lastWeeksCashProfits.arcologyImprovement > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcologyImprovement))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcologyImprovement))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.arcologyImprovement) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.arcologyImprovement))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcologyImprovement))>>@@ <</if>> @@ -544,12 +946,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.environment || $lastWeeksCashExpenses.environment>> <tr> <td>Environment</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.environment))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.environment))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.environment) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.environment))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.environment))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.environment) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.environment))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.environment))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.environment = ($lastWeeksCashIncome.environment + $lastWeeksCashExpenses.environment)>> <<if $lastWeeksCashProfits.environment > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.environment) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>@@ <</if>> @@ -566,12 +982,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ Weather <</if>> </td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.weather))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.weather))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.weather) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.weather))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.weather))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.weather) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.weather))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.weather))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.weather = ($lastWeeksCashIncome.weather + $lastWeeksCashExpenses.weather)>> <<if $lastWeeksCashProfits.weather > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.weather) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>@@ <</if>> @@ -586,12 +1016,24 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <tr> <td>[[Slave maintenance|Costs Report][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($slaves.length slaves)</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveUpkeep))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveUpkeep))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.slaveUpkeep) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveUpkeep))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveUpkeep))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.slaveUpkeep) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveUpkeep))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveUpkeep))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.slaveUpkeep = ($lastWeeksCashIncome.slaveUpkeep + $lastWeeksCashExpenses.slaveUpkeep)>> <<if $lastWeeksCashProfits.slaveUpkeep > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveUpkeep))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveUpkeep))>>@@ <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveUpkeep))>>@@ <</if>> @@ -601,14 +1043,28 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.extraMilk || $lastWeeksCashExpenses.extraMilk>> <tr> <td>Extra Milk</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>>@@</td> <td> - <<set $lastWeeksCashProfits.extraMilk = ($lastWeeksCashIncome.extraMilk + $lastWeeksCashExpenses.extraMilk)>> - <<if $lastWeeksCashProfits.extraMilk > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <<if Math.trunc($lastWeeksCashIncome.extraMilk) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>>@@ <<else>> - @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.extraMilk) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>> + <</if>> + </td> + <td> + <<set $lastWeeksCashProfits.extraMilk = ($lastWeeksCashIncome.extraMilk + $lastWeeksCashExpenses.extraMilk)>> + <<if $lastWeeksCashProfits.extraMilk > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.extraMilk) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>> + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ <</if>> </td> </tr> @@ -617,12 +1073,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.extraMilk || $lastWeeksCashExpenses.extraMilk>> <tr> <td>Extra Milk</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.extraMilk) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.extraMilk) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.extraMilk = ($lastWeeksCashIncome.extraMilk + $lastWeeksCashExpenses.extraMilk)>> <<if $lastWeeksCashProfits.extraMilk > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.extraMilk) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ <</if>> @@ -632,12 +1102,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $marketAssistantLimit>> <tr> <td>Menials: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTradesTransfer))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTradesTransfer))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.menialTradesTransfer) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTradesTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTradesTransfer))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.menialTradesTransfer) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTradesTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTradesTransfer))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.menialTradesTransfer = ($lastWeeksCashIncome.menialTradesTransfer + $lastWeeksCashExpenses.menialTradesTransfer)>> <<if $lastWeeksCashProfits.menialTradesTransfer > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTradesTransfer))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTradesTransfer))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.menialTradesTransfer) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTradesTransfer))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTradesTransfer))>>@@ <</if>> @@ -648,12 +1132,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($lastWeeksCashIncome.menialTrades) || ($lastWeeksCashExpenses.menialTrades)>> <tr> <td>Menials: labor</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTrades))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTrades))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.menialTrades) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTrades))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTrades))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.menialTrades) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTrades))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTrades))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.menialTrades = ($lastWeeksCashIncome.menialTrades + $lastWeeksCashExpenses.menialTrades)>> <<if $lastWeeksCashProfits.menialTrades > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.menialTrades) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>@@ <</if>> @@ -664,12 +1162,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fuckdolls || $lastWeeksCashExpenses.fuckdolls>> <tr> <td>Fuckdolls</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdolls))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdolls))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.fuckdolls) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdolls))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdolls))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.fuckdolls) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdolls))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdolls))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.fuckdolls = ($lastWeeksCashIncome.fuckdolls + $lastWeeksCashExpenses.fuckdolls)>> <<if $lastWeeksCashProfits.fuckdolls > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.fuckdolls) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>@@ <</if>> @@ -680,12 +1192,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($lastWeeksCashIncome.menialBioreactors) || ($lastWeeksCashExpenses.menialBioreactors)>> <tr> <td>Menials: bioreactors</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactors))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactors))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.menialBioreactors) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactors))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactors))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.menialBioreactors) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactors))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactors))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.menialBioreactors = ($lastWeeksCashIncome.menialBioreactors + $lastWeeksCashExpenses.menialBioreactors)>> <<if $lastWeeksCashProfits.menialBioreactors > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.menialBioreactors) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>@@ <</if>> @@ -696,12 +1222,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($lastWeeksCashIncome.fuckDollBioFactory) || ($lastWeeksCashExpenses.fuckDollBioFactory)>> <tr> <td>Menials: labor</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckDollBioFactory))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckDollBioFactory))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.fuckDollBioFactory) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckDollBioFactory))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckDollBioFactory))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.fuckDollBioFactory) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckDollBioFactory))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckDollBioFactory))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.fuckDollBioFactory = ($lastWeeksCashIncome.fuckDollBioFactory + $lastWeeksCashExpenses.fuckDollBioFactory)>> <<if $lastWeeksCashProfits.fuckDollBioFactory > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckDollBioFactory))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckDollBioFactory))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.fuckDollBioFactory) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckDollBioFactory))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckDollBioFactory))>>@@ <</if>> @@ -714,12 +1254,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.porn || $lastWeeksCashExpenses.porn>> <tr> <td>Porn</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.porn))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.porn))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.porn) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.porn))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.porn))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.porn) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.porn))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.porn))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.porn = ($lastWeeksCashIncome.porn + $lastWeeksCashExpenses.porn)>> <<if $lastWeeksCashProfits.porn > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.porn) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>@@ <</if>> @@ -730,12 +1284,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.recruiter || $lastWeeksCashExpenses.recruiter>> <tr> <td>Recruiter</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.recruiter) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.recruiter) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.recruiter = ($lastWeeksCashIncome.recruiter + $lastWeeksCashExpenses.recruiter)>> <<if $lastWeeksCashProfits.recruiter > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.recruiter) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ <</if>> @@ -748,12 +1316,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.slaveTransfer || $lastWeeksCashExpenses.slaveTransfer>> <tr> <td>Buying/Selling Major Slaves</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveTransfer))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveTransfer))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.slaveTransfer) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveTransfer))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.slaveTransfer) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveTransfer))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.slaveTransfer = ($lastWeeksCashIncome.slaveTransfer + $lastWeeksCashExpenses.slaveTransfer)>> <<if $lastWeeksCashProfits.slaveTransfer > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.slaveTransfer) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>@@ <</if>> @@ -764,12 +1346,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fuckdollsTransfer || $lastWeeksCashExpenses.fuckdollsTransfer>> <tr> <td>Buying/Selling Fuckdolls</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.fuckdollsTransfer) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.fuckdollsTransfer = ($lastWeeksCashIncome.fuckdollsTransfer + $lastWeeksCashExpenses.fuckdollsTransfer)>> <<if $lastWeeksCashProfits.fuckdollsTransfer > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.fuckdollsTransfer) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@ <</if>> @@ -780,12 +1376,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.babyTransfer || $lastWeeksCashExpenses.babyTransfer>> <tr> <td>Buying/Selling Babies</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.babyTransfer))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.babyTransfer))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.babyTransfer) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.babyTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.babyTransfer))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.babyTransfer) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.babyTransfer))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.babyTransfer))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.babyTransfer = ($lastWeeksCashIncome.babyTransfer + $lastWeeksCashExpenses.babyTransfer)>> <<if $lastWeeksCashProfits.babyTransfer > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.babyTransfer) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>@@ <</if>> @@ -796,12 +1406,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.menialRetirement || $lastWeeksCashExpenses.menialRetirement>> <tr> <td>Menials retiring</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialRetirement))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialRetirement))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.menialRetirement) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialRetirement))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.menialRetirement))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.menialRetirement) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialRetirement))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialRetirement))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.menialRetirement = ($lastWeeksCashIncome.menialRetirement + $lastWeeksCashExpenses.menialRetirement)>> <<if $lastWeeksCashProfits.menialRetirement > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.menialRetirement) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>@@ <</if>> @@ -812,12 +1436,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.slaveMod || $lastWeeksCashExpenses.slaveMod>> <tr> <td>Slave Modification</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveMod))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveMod))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.slaveMod) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveMod))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveMod))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.slaveMod) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveMod))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveMod))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.slaveMod = ($lastWeeksCashIncome.slaveMod + $lastWeeksCashExpenses.slaveMod)>> <<if $lastWeeksCashProfits.slaveMod > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.slaveMod) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>@@ <</if>> @@ -828,12 +1466,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.slaveSurgery || $lastWeeksCashExpenses.slaveSurgery>> <tr> <td>Slave Surgery</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveSurgery))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveSurgery))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.slaveSurgery) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveSurgery))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveSurgery))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.slaveSurgery) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveSurgery))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveSurgery))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.slaveSurgery = ($lastWeeksCashIncome.slaveSurgery + $lastWeeksCashExpenses.slaveSurgery)>> <<if $lastWeeksCashProfits.slaveSurgery > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.slaveSurgery) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>@@ <</if>> @@ -844,12 +1496,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.birth || $lastWeeksCashExpenses.birth>> <tr> <td>Slave Surgery</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.birth))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.birth))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.birth) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.birth))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.birth))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.birth) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.birth))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.birth))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.birth = ($lastWeeksCashIncome.birth + $lastWeeksCashExpenses.birth)>> <<if $lastWeeksCashProfits.birth > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.birth) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>@@ <</if>> @@ -865,12 +1531,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.personalBusiness || $lastWeeksCashExpenses.personalBusiness>> <tr> <td>Personal Business</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalBusiness))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalBusiness))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.personalBusiness) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalBusiness))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.personalBusiness))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.personalBusiness) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalBusiness))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalBusiness))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.personalBusiness = ($lastWeeksCashIncome.personalBusiness + $lastWeeksCashExpenses.personalBusiness)>> <<if $lastWeeksCashProfits.personalBusiness > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.personalBusiness) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>@@ <</if>> @@ -886,12 +1566,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<else>> <td>Since you are used to a fairly normal life, your personal living expenses are:</td> <</if>> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalLivingExpenses))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalLivingExpenses))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.personalLivingExpenses) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalLivingExpenses))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.personalLivingExpenses))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.personalLivingExpenses) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalLivingExpenses))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalLivingExpenses))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.personalLivingExpenses = ($lastWeeksCashIncome.personalLivingExpenses + $lastWeeksCashExpenses.personalLivingExpenses)>> <<if $lastWeeksCashProfits.personalLivingExpenses > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.personalLivingExpenses) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>@@ <</if>> @@ -901,12 +1595,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.PCtraining || $lastWeeksCashExpenses.PCtraining>> <tr> <td>Your training</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.PCtraining) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.PCtraining) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.PCtraining = ($lastWeeksCashIncome.PCtraining + $lastWeeksCashExpenses.PCtraining)>> <<if $lastWeeksCashProfits.PCtraining > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.PCtraining) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ <</if>> @@ -917,12 +1625,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.PCmedical || $lastWeeksCashExpenses.PCmedical>> <tr> <td>Your medical expenses</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCmedical))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCmedical))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.PCmedical) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCmedical))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.PCmedical))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.PCmedical) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCmedical))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCmedical))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.PCmedical = ($lastWeeksCashIncome.PCmedical + $lastWeeksCashExpenses.PCmedical)>> <<if $lastWeeksCashProfits.PCmedical > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.PCmedical) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>@@ <</if>> @@ -933,12 +1655,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.PCskills || $lastWeeksCashExpenses.PCskills>> <tr> <td>Your skills</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCskills))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCskills))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.PCskills) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCskills))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.PCskills))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.PCskills) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCskills))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCskills))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.PCskills = ($lastWeeksCashIncome.PCskills + $lastWeeksCashExpenses.PCskills)>> <<if $lastWeeksCashProfits.PCskills > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.PCskills) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>@@ <</if>> @@ -950,26 +1686,58 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td> Your rents <<if $lastWeeksCashExpenses.rents > 0>> - (and bribes) + and bribes + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashIncome.rents) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.rents) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rents))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.rents))>> <</if>> </td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rents))>>@@</td> <td> <<set $lastWeeksCashProfits.rents = ($lastWeeksCashIncome.rents + $lastWeeksCashExpenses.rents)>> - $lastWeeksCashIncome.rents + <<if $lastWeeksCashIncome.rents > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>@@ + <<elseif Math.trunc($lastWeeksCashIncome.rents) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>> + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>@@ + <</if>> </td> </tr> <<if $lastWeeksCashIncome.stocks || $personalShares > 0>> <tr> <td>Stock dividends on ($personalShares/<<print ($publicShares + $personalShares)>> shares), paying <<print ($lastWeeksCashIncome.stocks/$personalShares*100)>>% per share.</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocks))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocks))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.stocks) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocks))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.stocks))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.stocks) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocks))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocks))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.stocks = ($lastWeeksCashIncome.stocks + $lastWeeksCashExpenses.stocks)>> <<if $lastWeeksCashProfits.stocks > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.stocks) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>@@ <</if>> @@ -980,12 +1748,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.stocksTraded|| $lastWeeksCashExpenses.stocksTraded>> <tr> <td>Stock trading</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocksTraded))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocksTraded))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.stocksTraded) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocksTraded))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.stocksTraded))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.stocksTraded) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocksTraded))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocksTraded))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.stocksTraded = ($lastWeeksCashIncome.stocksTraded + $lastWeeksCashExpenses.stocksTraded)>> <<if $lastWeeksCashProfits.stocksTraded > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.stocksTraded) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>@@ <</if>> @@ -996,12 +1778,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fines || $lastWeeksCashExpenses.fines>> <tr> <td>Fines</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fines))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fines))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.fines) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fines))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.fines))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.fines) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fines))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.fines))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.fines = ($lastWeeksCashIncome.fines + $lastWeeksCashExpenses.fines)>> <<if $lastWeeksCashProfits.fines > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.fines) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>@@ <</if>> @@ -1012,12 +1808,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.event || $lastWeeksCashExpenses.event>> <tr> <td>Events</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.event))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.event))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.event) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.event))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.event))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.event) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.event))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.event))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.event = ($lastWeeksCashIncome.event + $lastWeeksCashExpenses.event)>> <<if $lastWeeksCashProfits.event > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.event) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>@@ <</if>> @@ -1028,12 +1838,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.war || $lastWeeksCashExpenses.war>> <tr> <td>Archology conflict</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.war))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.war))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.war) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.war))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.war))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.war) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.war))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.war))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.war = ($lastWeeksCashIncome.war + $lastWeeksCashExpenses.war)>> <<if $lastWeeksCashProfits.war > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.war) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>@@ <</if>> @@ -1056,12 +1880,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ [[Medicine trainer|Personal Attention Select][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] fees <</if>> </td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.PCtraining) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.PCtraining) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.PCtraining = ($lastWeeksCashIncome.PCtraining + $lastWeeksCashExpenses.PCtraining)>> <<if $lastWeeksCashProfits.PCtraining > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.PCtraining) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ <</if>> @@ -1072,12 +1910,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.capEx || $lastWeeksCashExpenses.capEx>> <tr> <td>Capital Expenses</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.capEx))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.capEx))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.capEx) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.capEx))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.capEx))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.capEx) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.capEx))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.capEx))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.capEx = ($lastWeeksCashIncome.capEx + $lastWeeksCashExpenses.capEx)>> <<if $lastWeeksCashProfits.capEx > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.capEx) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>@@ <</if>> @@ -1088,12 +1940,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.cheating || $lastWeeksCashExpenses.cheating>> <tr> <td>CHEATING</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.cheating))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cheating))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.cheating) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.cheating))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.cheating))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.cheating) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cheating))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.cheating))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.cheating = ($lastWeeksCashIncome.cheating + $lastWeeksCashExpenses.cheating)>> <<if $lastWeeksCashProfits.cheating > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.cheating) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>@@ <</if>> @@ -1108,12 +1974,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.policies || $lastWeeksCashExpenses.policies>> <tr> <td>[[Policies|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.policies))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.policies))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.policies) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.policies))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.policies))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.policies) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.policies))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.policies))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.policies = ($lastWeeksCashIncome.policies + $lastWeeksCashExpenses.policies)>> <<if $lastWeeksCashProfits.policies > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.policies) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>@@ <</if>> @@ -1124,12 +2004,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $FSSpending != 0>> <tr> <td>[[Society Shaping|Future Society][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.futureSocieties))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.futureSocieties))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.futureSocieties) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.futureSocieties))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.futureSocieties))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.futureSocieties) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.futureSocieties))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.futureSocieties))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.futureSocieties = ($lastWeeksCashIncome.futureSocieties + $lastWeeksCashExpenses.futureSocieties)>> <<if $lastWeeksCashProfits.futureSocieties > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.futureSocieties) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>@@ <</if>> @@ -1158,12 +2052,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<else>> Unknown school expense <</if>> </td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.schoolBacking))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.schoolBacking))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.schoolBacking) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.schoolBacking))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.schoolBacking))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.schoolBacking) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.schoolBacking))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.schoolBacking))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.schoolBacking = ($lastWeeksCashIncome.schoolBacking + $lastWeeksCashExpenses.schoolBacking)>> <<if $lastWeeksCashProfits.schoolBacking > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.schoolBacking) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>@@ <</if>> @@ -1174,12 +2082,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $citizenOrphanageTotal > 0>> <tr> <td>Education of $citizenOrphanageTotal of your slaves' children in citizen schools</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.citizenOrphanage))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.citizenOrphanage))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.citizenOrphanage) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.citizenOrphanage))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.citizenOrphanage))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.citizenOrphanage) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.citizenOrphanage))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.citizenOrphanage))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.citizenOrphanage = ($lastWeeksCashIncome.citizenOrphanage + $lastWeeksCashExpenses.citizenOrphanage)>> <<if $lastWeeksCashProfits.citizenOrphanage > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.citizenOrphanage) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>@@ <</if>> @@ -1190,12 +2112,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $privateOrphanageTotal > 0>> <tr> <td>Private tutelage of $privateOrphanageTotal of your slaves' children</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.privateOrphanage))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.privateOrphanage))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.privateOrphanage) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.privateOrphanage))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.privateOrphanage))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.privateOrphanage) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.privateOrphanage))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.privateOrphanage))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.privateOrphanage = ($lastWeeksCashIncome.privateOrphanage + $lastWeeksCashExpenses.privateOrphanage)>> <<if $lastWeeksCashProfits.privateOrphanage > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.privateOrphanage) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>@@ <</if>> @@ -1209,12 +2145,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $barracks>><<else>><br>//@@.red;Cost increased by the lack of an armory to house them.@@//<</if>> <<if ($PC.warfare >= 100) || ($PC.career == "arcology owner")>><br>//Cost reduced by your @@.springgreen;mercenary contacts.@@//<</if>> </td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.mercenaries) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.mercenaries) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.mercenaries = ($lastWeeksCashIncome.mercenaries + $lastWeeksCashExpenses.mercenaries)>> <<if $lastWeeksCashProfits.mercenaries > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.mercenaries) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ <</if>> @@ -1225,12 +2175,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.securityExpansion || $lastWeeksCashExpenses.securityExpansion>> <tr> <td>Security Expansion</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.securityExpansion))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.securityExpansion))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.securityExpansion) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.securityExpansion))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.securityExpansion))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.securityExpansion) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.securityExpansion))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.securityExpansion))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.securityExpansion = ($lastWeeksCashIncome.securityExpansion + $lastWeeksCashExpenses.securityExpansion)>> <<if $lastWeeksCashProfits.securityExpansion > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.securityExpansion) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>@@ <</if>> @@ -1241,12 +2205,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.specialForces || $lastWeeksCashExpenses.specialForces>> <tr> <td>Special Forces</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.specialForces))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.specialForces))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.specialForces) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.specialForces))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.specialForces))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.specialForces) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.specialForces))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.specialForces))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.specialForces = ($lastWeeksCashIncome.specialForces + $lastWeeksCashExpenses.specialForces)>> <<if $lastWeeksCashProfits.specialForces > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.specialForces) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>@@ <</if>> @@ -1257,12 +2235,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $securityForceActive > 0>> <tr> <td>Acquisitions: [[$securityForceNameCaps|SFM Barracks][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.mercenaries) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.mercenaries) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.mercenaries = ($lastWeeksCashIncome.mercenaries + $lastWeeksCashExpenses.mercenaries)>> <<if $lastWeeksCashProfits.mercenaries > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.mercenaries) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ <</if>> @@ -1274,12 +2266,24 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $peacekeepers.undermining != 0>> <tr> <td>Undermine political support for the nearby old world peacekeeping mission.</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.peacekeepers))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.peacekeepers))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.peacekeepers) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.peacekeepers))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.peacekeepers))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.peacekeepers) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.peacekeepers))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.peacekeepers))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.peacekeepers = ($lastWeeksCashIncome.peacekeepers + $lastWeeksCashExpenses.peacekeepers)>> <<if $lastWeeksCashProfits.peacekeepers > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.peacekeepers))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.peacekeepers))>>@@ <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.peacekeepers))>>@@ <</if>> @@ -1291,12 +2295,26 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.recruiter || $lastWeeksCashExpenses.recruiter>> <tr> <td>__Recruiting__</td> - <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@</td> - <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>@@</td> + <td> + <<if Math.trunc($lastWeeksCashIncome.recruiter) > 0>> + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>> + <</if>> + </td> + <td> + <<if Math.trunc($lastWeeksCashExpenses.recruiter) < 0>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>@@ + <<else>> + <<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>> + <</if>> + </td> <td> <<set $lastWeeksCashProfits.recruiter = ($lastWeeksCashIncome.recruiter + $lastWeeksCashExpenses.recruiter)>> <<if $lastWeeksCashProfits.recruiter > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + <<elseif Math.trunc($lastWeeksCashProfits.recruiter) == 0>> + <<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>> <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ <</if>> @@ -1310,7 +2328,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td> <<set $lastWeeksCashIncome.Total = hashSum($lastWeeksCashIncome)>> <<if $lastWeeksCashIncome.Total > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.Total))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.Total))>>@@ <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashIncome.Total))>>@@ <</if>> @@ -1319,7 +2337,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td> <<set $lastWeeksCashExpenses.Total = hashSum($lastWeeksCashExpenses)>> <<if $lastWeeksCashExpenses.Total > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.Total))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashExpenses.Total))>>@@ <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.Total))>>@@ <</if>> @@ -1332,7 +2350,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ @@.red;Fix profit calc<br>@@ <</if>> <<if $lastWeeksCashProfits.Total > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.Total))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.Total))>>@@ <<else>> @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.Total))>>@@ <</if>> @@ -1345,7 +2363,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td>Expenses budget for week <<print ($week+1)>></td> <td></td> <td><<if $costs > 0>> - @@.yellowgreen;<<print cashFormat($costs)>>@@ + @@.yellowgreen;+<<print cashFormat($costs)>>@@ <<else>> @@.red;<<print cashFormat($costs)>>@@ <</if>></td> @@ -1360,7 +2378,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td></td> <td></td> <td><<if ($cash-$cashLastWeek) > 0>> - @@.yellowgreen;<<print cashFormat($cash-$cashLastWeek)>>@@ + @@.yellowgreen;+<<print cashFormat($cash-$cashLastWeek)>>@@ <<else>> @@.red;<<print cashFormat($cash-$cashLastWeek)>>@@ <</if>></td> @@ -1376,10 +2394,12 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td></td> <td>/*<<print ($lastWeeksCashExpenses.Total + $costs)>>*/</td> <td><<if (($cash-$cashLastWeek) - $lastWeeksCashProfits.Total) > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc(($cash-$cashLastWeek) - $lastWeeksCashProfits.Total))>>@@ + @@.yellowgreen;+<<print cashFormat(Math.trunc(($cash-$cashLastWeek) - $lastWeeksCashProfits.Total))>>@@ + <<elseif Math.trunc((($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)) == 0>> + <<print cashFormat(Math.trunc((($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)))>> <<else>> @@.red;<<print cashFormat(Math.trunc((($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)))>>@@ - <</if>></td> + <</if>></td> </tr> <</if>> </table> diff --git a/src/uncategorized/main.tw b/src/uncategorized/main.tw index 91b6341e2a9b6829b28e5b972ac432bf2baf9b8c..15a86ebf74830ad4b2324fb295e80af8178a4c4e 100644 --- a/src/uncategorized/main.tw +++ b/src/uncategorized/main.tw @@ -67,7 +67,7 @@ <<if (def _BG && $dojo > 1)>><<set $slavesVisible++>><</if>> <<set $nextButton = "END WEEK", $nextLink = "End Week", $showEncyclopedia = 1, $encyclopedia = "How to Play">> -<<set $costs = predictCost($slaves)>> +<<set $costs = Math.trunc(predictCost($slaves))>> <<run FacilityNameCleanup()>> <<if ($PC.customTitle == "")>>