diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 06d1fad569161d7af2867e6f92b886bf318792bd..0e119117a35f8dbb5f0f2b24cec9a700852104b3 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -2233,6 +2233,58 @@ window.Job = Object.freeze({ }); window.PersonalAttention = Object.freeze({TRADE: 'trading', WAR: 'warfare', SLAVING: 'slaving', ENGINEERING: 'engineering', MEDICINE: 'medicine', MAID: 'upkeep', HACKING: 'hacking'}); +window.predictCost = function(array) { + var array2 = array; + var totalCosts = ( + getBrothelCosts() + + getBrothelAdsCosts() + + getArcadeCosts() + + getClubCosts() + + getClubAdsCosts() + + getDairyCosts() + + getIncubatorCosts() + + getServantsQuartersCosts() + + getMasterSuiteCosts() + + getNurseryCosts() + + getFarmyardCosts() + + getSecurityExpansionCost() + + getLifestyleCosts() + + getFSCosts() + + getCitizenOrphanageCosts() + + getPrivateOrphanageCosts() + + getPeacekeeperCosts() + + getMercenariesCosts() + + getMenialRetirementCosts() + + getRecruiterCosts() + + getSchoolCosts() + + getPolicyCosts() + + getCyberModCosts() + + getPCTrainingCosts() + + getPCCosts() + + predictTotalSlaveCosts(array2) + ); + + //these two apply a multiplicative effect to all costs so far. + totalCosts = getEnvironmentCosts(totalCosts); + totalCosts = getPCMultiplierCosts(totalCosts); + + //in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now. + totalCosts += ( + getSFCosts() + + getWeatherCosts() + ); + totalCosts = Math.trunc(totalCosts); +/* + // clean up + if(totalCosts > 0) { + totalCosts = 0; + } else { + totalCosts = Math.ceil(totalCosts); + } +*/ + return totalCosts; +}; + window.getCost = function(array) { var array2 = array; var oldCash = State.variables.cash; diff --git a/src/art/artJS.tw b/src/art/artJS.tw index 5d48153998e7eb2774adbf865ff5cef8e5b042da..6158abe9e11b38216e0f68fc413f9251a12d88f2 100644 --- a/src/art/artJS.tw +++ b/src/art/artJS.tw @@ -2841,7 +2841,8 @@ window.VectorArt = (function (artSlave) { if (slave.clothes !== "a schoolgirl outfit") /* file is there, but contains no artwork */ r += jsInclude(`Art_Vector_Leg_Outfit_${outfit}_${legSize}`); } else { - r += jsInclude(`Art_Vector_Leg_Outfit_${outfit}_Stump`); + if (outfit === "Shine") /* the only stump outfit that does not draw an empty svg */ + r += jsInclude(`Art_Vector_Leg_Outfit_${outfit}_Stump`); } } } diff --git a/src/art/vector_revamp/Vector_Revamped_Control_.tw b/src/art/vector_revamp/Vector_Revamped_Control_.tw index 94b634d1bc9e35d3790a56b4b6614c7adff9a98a..db73476bb2b1b8b5ae6d07008596671401d1f83b 100644 --- a/src/art/vector_revamp/Vector_Revamped_Control_.tw +++ b/src/art/vector_revamp/Vector_Revamped_Control_.tw @@ -26,8 +26,8 @@ <<set _boob_outfit_art_transform = _revampedVectorArtControl.boobOutfitArtTransform>> <<set _art_pussy_tattoo_text = _revampedVectorArtControl.pubicTattooText >> -<<for _vrc = 0; _vrc < _revampedArtLayers.length; _vrc++>> - <<include _revampedArtLayers[_vrc]>> -<</for>> +<<set _artString = "">> +<<run _revampedArtLayers.forEach(function(s) { _artString += jsInclude(s); })>> +<<print _artString>> <<unset _art_transform>> \ No newline at end of file diff --git a/src/uncategorized/completeCatalog.tw b/src/uncategorized/completeCatalog.tw index 01b4e6656c629280c51b92c70f4e2ae12062f855..198cccaed79c8caa83598be2522039c0edef6f72 100644 --- a/src/uncategorized/completeCatalog.tw +++ b/src/uncategorized/completeCatalog.tw @@ -102,6 +102,5 @@ The offered price is <<print cashFormat($slaveCost)>>. <<link "Buy $his slave contract" "New Slave Intro">> <<set $activeSlave.weekAcquired = $week, $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main", $specialSlave = 1>> - <<set _cashX = forceNeg($slaveCost)>> - <<run cashX(_cashX, "slaveTransfer", $activeSlave)>> + <<run cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave)>> <</link>> diff --git a/src/uncategorized/costsBudget.tw b/src/uncategorized/costsBudget.tw index f563b5a5b9a160252a5b6b27086706e9e1a24543..13126c8a9effb2cef8fb8c5036623ac42888622b 100644 --- a/src/uncategorized/costsBudget.tw +++ b/src/uncategorized/costsBudget.tw @@ -51,11 +51,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.whore)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.whore)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.whore))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.whore))>>@@</td> <td> <<set $lastWeeksCashProfits.whore = ($lastWeeksCashIncome.whore + $lastWeeksCashExpenses.whore)>> - <<= cashNumFormat($lastWeeksCashProfits.whore)>> + <<if $lastWeeksCashProfits.whore > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>@@ + <</if>> </td> </tr> <</if>> @@ -63,11 +67,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.rest || $lastWeeksCashExpenses.rest>> <tr> <td>Resting</td> - <td><<= cashNumFormat($lastWeeksCashIncome.rest)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.rest)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.rest))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rest))>>@@</td> <td> <<set $lastWeeksCashProfits.rest = ($lastWeeksCashIncome.rest + $lastWeeksCashExpenses.rest)>> - <<= cashNumFormat($lastWeeksCashProfits.rest)>> + <<if $lastWeeksCashProfits.rest > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>@@ + <</if>> </td> </tr> <</if>> @@ -75,11 +83,15 @@ 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>Rep: <<= cashNumFormat($lastWeeksCashIncome.fucktoy)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.fucktoy)>></td> + <td>$lastWeeksCashIncome.fucktoy rep</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fucktoy))>>@@</td> <td> <<set $lastWeeksCashProfits.fucktoy = (+ $lastWeeksCashExpenses.fucktoy)>> - <<= cashNumFormat($lastWeeksCashProfits.fucktoy)>> + <<if $lastWeeksCashProfits.fucktoy > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>@@ + <</if>> </td> </tr> <</if>> @@ -87,11 +99,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.subordinateSlave || $lastWeeksCashExpenses.subordinateSlave>> <tr> <td>subordinateSlaves</td> - <td><<= cashNumFormat($lastWeeksCashIncome.subordinateSlave)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.subordinateSlave)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.subordinateSlave))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.subordinateSlave))>>@@</td> <td> <<set $lastWeeksCashProfits.subordinateSlave = ($lastWeeksCashIncome.subordinateSlave + $lastWeeksCashExpenses.subordinateSlave)>> - <<= cashNumFormat($lastWeeksCashProfits.subordinateSlave)>> + <<if $lastWeeksCashProfits.subordinateSlave > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.subordinateSlave))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.subordinateSlave))>>@@ + <</if>> </td> </tr> <</if>> @@ -99,11 +115,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.houseServant || $lastWeeksCashExpenses.houseServant>> <tr> <td>HouseServants</td> - <td><<= cashNumFormat($lastWeeksCashIncome.houseServant)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.houseServant)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.houseServant))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.houseServant))>>@@</td> <td> <<set $lastWeeksCashProfits.houseServant = ($lastWeeksCashIncome.houseServant + $lastWeeksCashExpenses.houseServant)>> - <<= cashNumFormat($lastWeeksCashProfits.houseServant)>> + <<if $lastWeeksCashProfits.houseServant > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>@@ + <</if>> </td> </tr> <</if>> @@ -111,11 +131,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.confined || $lastWeeksCashExpenses.confined>> <tr> <td>Confined</td> - <td><<= cashNumFormat($lastWeeksCashIncome.confined)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.confined)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.confined))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.confined))>>@@</td> <td> <<set $lastWeeksCashProfits.confined = ($lastWeeksCashIncome.confined + $lastWeeksCashExpenses.confined)>> - <<= cashNumFormat($lastWeeksCashProfits.confined)>> + <<if $lastWeeksCashProfits.confined > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>@@ + <</if>> </td> </tr> <</if>> @@ -123,11 +147,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.publicServant || $lastWeeksCashExpenses.publicServant>> <tr> <td>Public servants</td> - <td>Rep: <<= cashNumFormat($lastWeeksCashIncome.publicServant)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.publicServant)>></td> + <td>$lastWeeksCashIncome.publicServant rep</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.publicServant))>>@@</td> <td> <<set $lastWeeksCashProfits.publicServant = ($lastWeeksCashIncome.publicServant + $lastWeeksCashExpenses.publicServant)>> - <<= cashNumFormat($lastWeeksCashProfits.publicServant)>> + <<if $lastWeeksCashProfits.publicServant > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>@@ + <</if>> </td> </tr> <</if>> @@ -135,11 +163,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.classes || $lastWeeksCashExpenses.classes>> <tr> <td>Classes</td> - <td><<= cashNumFormat($lastWeeksCashIncome.classes)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.classes)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.classes))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.classes))>>@@</td> <td> <<set $lastWeeksCashProfits.classes = ($lastWeeksCashIncome.classes + $lastWeeksCashExpenses.classes)>> - <<= cashNumFormat($lastWeeksCashProfits.classes)>> + <<if $lastWeeksCashProfits.classes > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>@@ + <</if>> </td> </tr> <</if>> @@ -147,12 +179,16 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.milked || $lastWeeksCashExpenses.milked>> <tr> - <td>Milked</td> - <td><<= cashNumFormat($lastWeeksCashIncome.milked)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.milked)>></td> + <td>Milked</td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.milked))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.milked))>>@@</td> <td> <<set $lastWeeksCashProfits.milked = ($lastWeeksCashIncome.milked + $lastWeeksCashExpenses.milked)>> - <<= cashNumFormat($lastWeeksCashProfits.milked)>> + <<if $lastWeeksCashProfits.milked > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>@@ + <</if>> </td> </tr> <</if>> @@ -160,17 +196,21 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.gloryhole || $lastWeeksCashExpenses.gloryhole>> <tr> <td>Gloryhole</td> - <td><<= cashNumFormat($lastWeeksCashIncome.gloryhole)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.gloryhole)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryhole))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.gloryhole))>>@@</td> <td> <<set $lastWeeksCashProfits.gloryhole = ($lastWeeksCashIncome.gloryhole + $lastWeeksCashExpenses.gloryhole)>> - <<= cashNumFormat($lastWeeksCashProfits.gloryhole)>> + <<if $lastWeeksCashProfits.gloryhole > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>@@ + <</if>> </td> </tr> <</if>> <tr> - <h2>Structures</h2> + <h2>Structures</h2> /* TODO: using h2s doesn't fit in with the rest of the game */ </tr> <tr> //Slaves working in these buildings have their profits reported in "jobs".// @@ -178,36 +218,48 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $brothel > 0>> <tr> - <td>[[$brothelName|Brothel][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($brothelSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.brothel)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.brothel)>></td> + <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> <<set $lastWeeksCashProfits.brothel = ($lastWeeksCashIncome.brothel + $lastWeeksCashExpenses.brothel)>> - <<= cashNumFormat($lastWeeksCashProfits.brothel)>> + <<if $lastWeeksCashProfits.brothel > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>@@ + <</if>> </td> </tr> <</if>> <<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> - <td><<= cashNumFormat($lastWeeksCashIncome.brothelAds)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.brothelAds)>></td> + <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> <<set $lastWeeksCashProfits.brothelAds = ($lastWeeksCashIncome.brothelAds + $lastWeeksCashExpenses.brothelAds)>> - <<= cashNumFormat($lastWeeksCashProfits.brothelAds)>> + <<if $lastWeeksCashProfits.brothelAds > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>@@ + <</if>> </td> </tr> <</if>> <<if $club > 0>> <tr> - <td>[[$clubName|Club][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clubSlaves slaves)</td> - <td>Rep:<<= cashNumFormat($lastWeeksCashIncome.club)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.club)>></td> + <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> <<set $lastWeeksCashProfits.club = ($lastWeeksCashIncome.club + $lastWeeksCashExpenses.club)>> - <<= cashNumFormat($lastWeeksCashProfits.club)>> + <<if $lastWeeksCashProfits.club > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>@@ + <</if>> </td> </tr> <</if>> @@ -215,35 +267,47 @@ 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><<= cashNumFormat($lastWeeksCashIncome.clubAds)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.clubAds)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.clubAds))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clubAds))>>@@</td> <td> <<set $lastWeeksCashProfits.clubAds = ($lastWeeksCashIncome.clubAds + $lastWeeksCashExpenses.clubAds)>> - <<= cashNumFormat($lastWeeksCashProfits.clubAds)>> + <<if $lastWeeksCashProfits.clubAds > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>@@ + <</if>> </td> </tr> <</if>> <<if $arcade > 0>> <tr> - <td>[[$arcadeName|Arcade][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($arcadeSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.arcade)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.arcade)>></td> + <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> <<set $lastWeeksCashProfits.arcade = ($lastWeeksCashIncome.arcade + $lastWeeksCashExpenses.arcade)>> - <<= cashNumFormat($lastWeeksCashProfits.arcade)>> + <<if $lastWeeksCashProfits.arcade > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcade))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcade))>>@@ + <</if>> </td> </tr> <</if>> <<if $dairy > 0>> <tr> - <td>[[$dairyName|Dairy][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($dairySlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.dairy)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.dairy)>></td> + <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> <<set $lastWeeksCashProfits.dairy = ($lastWeeksCashIncome.dairy + $lastWeeksCashExpenses.dairy)>> - <<= cashNumFormat($lastWeeksCashProfits.dairy)>> + <<if $lastWeeksCashProfits.dairy > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>@@ + <</if>> </td> </tr> <</if>> @@ -251,8 +315,8 @@ 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><<= cashNumFormat($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><<= cashNumFormat($lastWeeksCashExpenses.servantsQuarters)>></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> <<set $lastWeeksCashProfits.servantsQuarters = ($lastWeeksCashIncome.servantsQuarters + $lastWeeksCashExpenses.servantsQuarters)>> //$lastWeeksCashProfits.servantsQuarters// @@ -263,81 +327,105 @@ 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>Rep: <<= cashNumFormat($lastWeeksCashIncome.masterSuite)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.masterSuite)>></td> + <td>$lastWeeksCashIncome.masterSuite rep</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.masterSuite))>>@@</td> <td> <<set $lastWeeksCashProfits.masterSuite = ($lastWeeksCashIncome.masterSuite + $lastWeeksCashExpenses.masterSuite)>> - <<= cashNumFormat($lastWeeksCashProfits.masterSuite)>> + <<if $lastWeeksCashProfits.masterSuite > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>@@ + <</if>> </td> </tr> <</if>> <<if $schoolroom>> <tr> - <td>[[$schoolroomName|Schoolroom][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($schoolroomSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.school)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.school)>></td> + <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> <<set $lastWeeksCashProfits.school = ($lastWeeksCashIncome.school + $lastWeeksCashExpenses.school)>> - <<= cashNumFormat($lastWeeksCashProfits.school)>> + <<if $lastWeeksCashProfits.school > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>@@ + <</if>> </td> </tr> <</if>> <<if $spa>> <tr> - <td>[[$spaName|Spa][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($spaSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.spa)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.spa)>></td> + <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> <<set $lastWeeksCashProfits.spa = ($lastWeeksCashIncome.spa + $lastWeeksCashExpenses.spa)>> - <<= cashNumFormat($lastWeeksCashProfits.spa)>> + <<if $lastWeeksCashProfits.spa > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>@@ + <</if>> </td> </tr> <</if>> <<if $clinic>> <tr> - <td>[[$clinicName|Clinic][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clinicSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.clinic)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.clinic)>></td> + <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> <<set $lastWeeksCashProfits.clinic = ($lastWeeksCashIncome.clinic + $lastWeeksCashExpenses.clinic)>> - <<= cashNumFormat($lastWeeksCashProfits.clinic)>> + <<if $lastWeeksCashProfits.clinic > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>@@ + <</if>> </td> </tr> <</if>> <<if $cellblock>> <tr> - <td>[[$cellblockName|Cellblock][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($cellblockSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.cellblock)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.cellblock)>></td> + <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> <<set $lastWeeksCashProfits.cellblock = ($lastWeeksCashIncome.cellblock + $lastWeeksCashExpenses.cellblock)>> - <<= cashNumFormat($lastWeeksCashProfits.cellblock)>> + <<if $lastWeeksCashProfits.cellblock > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>@@ + <</if>> </td> </tr> <</if>> <<if $researchLab.built == "true">> <tr> - <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]: Maintenance</td> - <td><<= cashNumFormat($lastWeeksCashIncome.lab)>></td> + <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] maintenance</td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.lab))>>@@</td> <td> <<set $lastWeeksCashExpenses.lab = (100*$researchLab.maxSpace)>> <<= cashNumFormat($lastWeeksCashExpenses.lab)>> </td> <td> <<set $lastWeeksCashProfits.lab = ($lastWeeksCashIncome.lab + $lastWeeksCashExpenses.lab)>> - <<= cashNumFormat($lastWeeksCashProfits.lab)>> + <<if $lastWeeksCashProfits.lab > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>@@ + <</if>> </td> </tr> // <<if $researchLab.hired != 0>> <tr> - <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]: ($researchLab.hired scientists)</td> + <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> @@ -345,7 +433,7 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <</if>> <<if $researchLab.menials != 0>> <tr> - <td>[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]: ($researchLab.menials menial Slaves)</td> + <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> @@ -359,60 +447,80 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.cyberMod || $lastWeeksCashExpenses.cyberMod>> <tr> - <td>CyberMod</td> - <td><<= cashNumFormat($lastWeeksCashIncome.cyberMod)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.cyberMod)>></td> + <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> <<set $lastWeeksCashProfits.cyberMod = ($lastWeeksCashIncome.cyberMod + $lastWeeksCashExpenses.cyberMod)>> - <<= cashNumFormat($lastWeeksCashProfits.cyberMod)>> + <<if $lastWeeksCashProfits.cyberMod > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cyberMod))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cyberMod))>>@@ + <</if>> </td> </tr> <</if>> <<if $incubator>> <tr> - <td>[[$incubatorName|Incubator][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($incubatorSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.incubator)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.incubator)>></td> + <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> <<set $lastWeeksCashProfits.incubator = ($lastWeeksCashIncome.incubator + $lastWeeksCashExpenses.incubator)>> - <<= cashNumFormat($lastWeeksCashProfits.incubator)>> + <<if $lastWeeksCashProfits.incubator > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>@@ + <</if>> </td> </tr> <</if>> <<if $nursery>> <tr> - <td>[[$nurseryName|Nursery][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($nurserySlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.nursery)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.nursery)>></td> + <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> <<set $lastWeeksCashProfits.nursery = ($lastWeeksCashIncome.nursery + $lastWeeksCashExpenses.nursery)>> - <<= cashNumFormat($lastWeeksCashProfits.nursery)>> + <<if $lastWeeksCashProfits.nursery > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>@@ + <</if>> </td> </tr> <</if>> <<if $farmyard>> <tr> - <td>[[$farmyardName|Farmyard][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($farmyardSlaves slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.farmyard)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.farmyard)>></td> + <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> <<set $lastWeeksCashProfits.farmyard = ($lastWeeksCashIncome.farmyard + $lastWeeksCashExpenses.farmyard)>> - <<= cashNumFormat($lastWeeksCashProfits.farmyard)>> + <<if $lastWeeksCashProfits.farmyard > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>@@ + <</if>> </td> </tr> <</if>> <<if $pit>> <tr> - <td>[[$pitName|Pit][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($fighterIDs.length fighters)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.pit)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.pit)>></td> + <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> <<set $lastWeeksCashProfits.pit = ($lastWeeksCashIncome.pit + $lastWeeksCashExpenses.pit)>> - <<= cashNumFormat($lastWeeksCashProfits.pit)>> + <<if $lastWeeksCashProfits.pit > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>@@ + <</if>> </td> </tr> <</if>> @@ -420,11 +528,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.arcologyImprovement || $lastWeeksCashExpenses.arcologyImprovement>> <tr> <td>Arcology construction and repair</td> - <td><<= cashNumFormat($lastWeeksCashIncome.arcologyImprovement)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.arcologyImprovement)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcologyImprovement))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcologyImprovement))>>@@</td> <td> <<set $lastWeeksCashProfits.arcologyImprovement = ($lastWeeksCashIncome.arcologyImprovement + $lastWeeksCashExpenses.arcologyImprovement)>> - <<= cashNumFormat($lastWeeksCashProfits.arcologyImprovement)>> + <<if $lastWeeksCashProfits.arcologyImprovement > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcologyImprovement))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcologyImprovement))>>@@ + <</if>> </td> </tr> <</if>> @@ -432,16 +544,20 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.environment || $lastWeeksCashExpenses.environment>> <tr> <td>Environment</td> - <td><<= cashNumFormat($lastWeeksCashIncome.environment)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.environment)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.environment))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.environment))>>@@</td> <td> <<set $lastWeeksCashProfits.environment = ($lastWeeksCashIncome.environment + $lastWeeksCashExpenses.environment)>> - <<= cashNumFormat($lastWeeksCashProfits.environment)>> + <<if $lastWeeksCashProfits.environment > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>@@ + <</if>> </td> </tr> <</if>> - <<if $lastWeeksCashIncome.weather || $lastWeeksCashExpenses.weather>> + <<if $lastWeeksCashIncome.weather || $lastWeeksCashExpenses.weather>> /* TODO: this doesn't fit in */ <tr> <td> <<if $lastWeeksCashExpenses.weather > 0>> @@ -450,11 +566,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ Weather <</if>> </td> - <td><<= cashNumFormat($lastWeeksCashIncome.weather)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.weather)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.weather))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.weather))>>@@</td> <td> <<set $lastWeeksCashProfits.weather = ($lastWeeksCashIncome.weather + $lastWeeksCashExpenses.weather)>> - <<= cashNumFormat($lastWeeksCashProfits.weather)>> + <<if $lastWeeksCashProfits.weather > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>@@ + <</if>> </td> </tr> <</if>> @@ -465,23 +585,31 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ </tr> <tr> - <td>[[Slave maintenance|Costs Report][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] (food, hormones) ($slaves.length slaves)</td> - <td><<= cashNumFormat($lastWeeksCashIncome.slaveUpkeep)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.slaveUpkeep)>></td> + <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> <<set $lastWeeksCashProfits.slaveUpkeep = ($lastWeeksCashIncome.slaveUpkeep + $lastWeeksCashExpenses.slaveUpkeep)>> - $lastWeeksCashProfits.slaveUpkeep + <<if $lastWeeksCashProfits.slaveUpkeep > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveUpkeep))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveUpkeep))>>@@ + <</if>> </td> </tr> <<if $lastWeeksCashIncome.extraMilk || $lastWeeksCashExpenses.extraMilk>> <tr> <td>Extra Milk</td> - <td><<= cashNumFormat($lastWeeksCashIncome.extraMilk)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.extraMilk)>></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)>> - <<= cashNumFormat($lastWeeksCashProfits.extraMilk)>> + <<if $lastWeeksCashProfits.extraMilk > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <</if>> </td> </tr> <</if>> @@ -489,22 +617,30 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.extraMilk || $lastWeeksCashExpenses.extraMilk>> <tr> <td>Extra Milk</td> - <td><<= cashNumFormat($lastWeeksCashIncome.extraMilk)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.extraMilk)>></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)>> - <<= cashNumFormat($lastWeeksCashProfits.extraMilk)>> + <<if $lastWeeksCashProfits.extraMilk > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@ + <</if>> </td> </tr> <</if>> <<if $marketAssistantLimit>> <tr> <td>Menials: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping</td> - <td>$lastWeeksCashIncome.menialTransfer</td> - <td>$lastWeeksCashExpenses.menialTransfer</td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTradesTransfer))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTradesTransfer))>>@@</td> <td> - <<set $lastWeeksCashProfits.menialTransfer = ($lastWeeksCashIncome.menialTransfer + $lastWeeksCashExpenses.menialTransfer)>> - $lastWeeksCashProfits.menialTransfer + <<set $lastWeeksCashProfits.menialTradesTransfer = ($lastWeeksCashIncome.menialTradesTransfer + $lastWeeksCashExpenses.menialTradesTransfer)>> + <<if $lastWeeksCashProfits.menialTradesTransfer > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTradesTransfer))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTradesTransfer))>>@@ + <</if>> </td> </tr> <</if>> @@ -512,11 +648,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($lastWeeksCashIncome.menialTrades) || ($lastWeeksCashExpenses.menialTrades)>> <tr> <td>Menials: labor</td> - <td><<= cashNumFormat($lastWeeksCashIncome.menialTrades)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.menialTrades)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTrades))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTrades))>>@@</td> <td> <<set $lastWeeksCashProfits.menialTrades = ($lastWeeksCashIncome.menialTrades + $lastWeeksCashExpenses.menialTrades)>> - <<= cashNumFormat($lastWeeksCashProfits.menialTrades)>> + <<if $lastWeeksCashProfits.menialTrades > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>@@ + <</if>> </td> </tr> <</if>> @@ -524,11 +664,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fuckdolls || $lastWeeksCashExpenses.fuckdolls>> <tr> <td>Fuckdolls</td> - <td><<= cashNumFormat($lastWeeksCashIncome.fuckdolls)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.fuckdolls)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdolls))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdolls))>>@@</td> <td> <<set $lastWeeksCashProfits.fuckdolls = ($lastWeeksCashIncome.fuckdolls + $lastWeeksCashExpenses.fuckdolls)>> - <<= cashNumFormat($lastWeeksCashProfits.fuckdolls)>> + <<if $lastWeeksCashProfits.fuckdolls > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>@@ + <</if>> </td> </tr> <</if>> @@ -536,11 +680,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($lastWeeksCashIncome.menialBioreactors) || ($lastWeeksCashExpenses.menialBioreactors)>> <tr> <td>Menials: bioreactors</td> - <td><<= cashNumFormat($lastWeeksCashIncome.menialBioreactors)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.menialBioreactors)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactors))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactors))>>@@</td> <td> <<set $lastWeeksCashProfits.menialBioreactors = ($lastWeeksCashIncome.menialBioreactors + $lastWeeksCashExpenses.menialBioreactors)>> - <<= cashNumFormat($lastWeeksCashProfits.menialBioreactors)>> + <<if $lastWeeksCashProfits.menialBioreactors > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>@@ + <</if>> </td> </tr> <</if>> @@ -548,11 +696,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if ($lastWeeksCashIncome.fuckDollBioFactory) || ($lastWeeksCashExpenses.fuckDollBioFactory)>> <tr> <td>Menials: labor</td> - <td><<= cashNumFormat($lastWeeksCashIncome.fuckDollBioFactory)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.fuckDollBioFactory)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckDollBioFactory))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckDollBioFactory))>>@@</td> <td> <<set $lastWeeksCashProfits.fuckDollBioFactory = ($lastWeeksCashIncome.fuckDollBioFactory + $lastWeeksCashExpenses.fuckDollBioFactory)>> - <<= cashNumFormat($lastWeeksCashProfits.fuckDollBioFactory)>> + <<if $lastWeeksCashProfits.fuckDollBioFactory > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckDollBioFactory))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckDollBioFactory))>>@@ + <</if>> </td> </tr> <</if>> @@ -562,11 +714,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.porn || $lastWeeksCashExpenses.porn>> <tr> <td>Porn</td> - <td><<= cashNumFormat($lastWeeksCashIncome.porn)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.porn)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.porn))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.porn))>>@@</td> <td> <<set $lastWeeksCashProfits.porn = ($lastWeeksCashIncome.porn + $lastWeeksCashExpenses.porn)>> - <<= cashNumFormat($lastWeeksCashProfits.porn)>> + <<if $lastWeeksCashProfits.porn > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>@@ + <</if>> </td> </tr> <</if>> @@ -574,11 +730,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.recruiter || $lastWeeksCashExpenses.recruiter>> <tr> <td>Recruiter</td> - <td><<= cashNumFormat($lastWeeksCashIncome.recruiter)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.recruiter)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>@@</td> <td> <<set $lastWeeksCashProfits.recruiter = ($lastWeeksCashIncome.recruiter + $lastWeeksCashExpenses.recruiter)>> - <<= cashNumFormat($lastWeeksCashProfits.recruiter)>> + <<if $lastWeeksCashProfits.recruiter > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + <</if>> </td> </tr> <</if>> @@ -588,11 +748,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.slaveTransfer || $lastWeeksCashExpenses.slaveTransfer>> <tr> <td>Buying/Selling Major Slaves</td> - <td><<= cashNumFormat($lastWeeksCashIncome.slaveTransfer)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.slaveTransfer)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveTransfer))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveTransfer))>>@@</td> <td> <<set $lastWeeksCashProfits.slaveTransfer = ($lastWeeksCashIncome.slaveTransfer + $lastWeeksCashExpenses.slaveTransfer)>> - <<= cashNumFormat($lastWeeksCashProfits.slaveTransfer)>> + <<if $lastWeeksCashProfits.slaveTransfer > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>@@ + <</if>> </td> </tr> <</if>> @@ -600,11 +764,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fuckdollsTransfer || $lastWeeksCashExpenses.fuckdollsTransfer>> <tr> <td>Buying/Selling Fuckdolls</td> - <td><<= cashNumFormat($lastWeeksCashIncome.fuckdollsTransfer)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.fuckdollsTransfer)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer))>>@@</td> <td> <<set $lastWeeksCashProfits.fuckdollsTransfer = ($lastWeeksCashIncome.fuckdollsTransfer + $lastWeeksCashExpenses.fuckdollsTransfer)>> - <<= cashNumFormat($lastWeeksCashProfits.fuckdollsTransfer)>> + <<if $lastWeeksCashProfits.fuckdollsTransfer > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@ + <</if>> </td> </tr> <</if>> @@ -612,11 +780,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.babyTransfer || $lastWeeksCashExpenses.babyTransfer>> <tr> <td>Buying/Selling Babies</td> - <td><<= cashNumFormat($lastWeeksCashIncome.babyTransfer)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.babyTransfer)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.babyTransfer))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.babyTransfer))>>@@</td> <td> <<set $lastWeeksCashProfits.babyTransfer = ($lastWeeksCashIncome.babyTransfer + $lastWeeksCashExpenses.babyTransfer)>> - <<= cashNumFormat($lastWeeksCashProfits.babyTransfer)>> + <<if $lastWeeksCashProfits.babyTransfer > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>@@ + <</if>> </td> </tr> <</if>> @@ -624,11 +796,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.menialRetirement || $lastWeeksCashExpenses.menialRetirement>> <tr> <td>Menials retiring</td> - <td><<= cashNumFormat($lastWeeksCashIncome.menialRetirement)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.menialRetirement)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialRetirement))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialRetirement))>>@@</td> <td> <<set $lastWeeksCashProfits.menialRetirement = ($lastWeeksCashIncome.menialRetirement + $lastWeeksCashExpenses.menialRetirement)>> - <<= cashNumFormat($lastWeeksCashProfits.menialRetirement)>> + <<if $lastWeeksCashProfits.menialRetirement > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>@@ + <</if>> </td> </tr> <</if>> @@ -636,11 +812,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.slaveMod || $lastWeeksCashExpenses.slaveMod>> <tr> <td>Slave Modification</td> - <td><<= cashNumFormat($lastWeeksCashIncome.slaveMod)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.slaveMod)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveMod))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveMod))>>@@</td> <td> <<set $lastWeeksCashProfits.slaveMod = ($lastWeeksCashIncome.slaveMod + $lastWeeksCashExpenses.slaveMod)>> - <<= cashNumFormat($lastWeeksCashProfits.slaveMod)>> + <<if $lastWeeksCashProfits.slaveMod > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>@@ + <</if>> </td> </tr> <</if>> @@ -648,11 +828,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.slaveSurgery || $lastWeeksCashExpenses.slaveSurgery>> <tr> <td>Slave Surgery</td> - <td><<= cashNumFormat($lastWeeksCashIncome.slaveSurgery)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.slaveSurgery)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveSurgery))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveSurgery))>>@@</td> <td> <<set $lastWeeksCashProfits.slaveSurgery = ($lastWeeksCashIncome.slaveSurgery + $lastWeeksCashExpenses.slaveSurgery)>> - <<= cashNumFormat($lastWeeksCashProfits.slaveSurgery)>> + <<if $lastWeeksCashProfits.slaveSurgery > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>@@ + <</if>> </td> </tr> <</if>> @@ -660,11 +844,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.birth || $lastWeeksCashExpenses.birth>> <tr> <td>Slave Surgery</td> - <td><<= cashNumFormat($lastWeeksCashIncome.birth)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.birth)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.birth))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.birth))>>@@</td> <td> <<set $lastWeeksCashProfits.birth = ($lastWeeksCashIncome.birth + $lastWeeksCashExpenses.birth)>> - <<= cashNumFormat($lastWeeksCashProfits.birth)>> + <<if $lastWeeksCashProfits.birth > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>@@ + <</if>> </td> </tr> <</if>> @@ -677,11 +865,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.personalBusiness || $lastWeeksCashExpenses.personalBusiness>> <tr> <td>Personal Business</td> - <td><<= cashNumFormat($lastWeeksCashIncome.personalBusiness)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.personalBusiness)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalBusiness))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalBusiness))>>@@</td> <td> <<set $lastWeeksCashProfits.personalBusiness = ($lastWeeksCashIncome.personalBusiness + $lastWeeksCashExpenses.personalBusiness)>> - <<= cashNumFormat($lastWeeksCashProfits.personalBusiness)>> + <<if $lastWeeksCashProfits.personalBusiness > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>@@ + <</if>> </td> </tr> <</if>> @@ -694,22 +886,30 @@ 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><<= cashNumFormat($lastWeeksCashIncome.personalLivingExpenses)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.personalLivingExpenses)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalLivingExpenses))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalLivingExpenses))>>@@</td> <td> <<set $lastWeeksCashProfits.personalLivingExpenses = ($lastWeeksCashIncome.personalLivingExpenses + $lastWeeksCashExpenses.personalLivingExpenses)>> - <<= cashNumFormat($lastWeeksCashProfits.personalLivingExpenses)>> + <<if $lastWeeksCashProfits.personalLivingExpenses > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>@@ + <</if>> </td> </tr> <<if $lastWeeksCashIncome.PCtraining || $lastWeeksCashExpenses.PCtraining>> <tr> <td>Your training</td> - <td><<= cashNumFormat($lastWeeksCashIncome.PCtraining)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.PCtraining)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>@@</td> <td> <<set $lastWeeksCashProfits.PCtraining = ($lastWeeksCashIncome.PCtraining + $lastWeeksCashExpenses.PCtraining)>> - <<= cashNumFormat($lastWeeksCashProfits.PCtraining)>> + <<if $lastWeeksCashProfits.PCtraining > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + <</if>> </td> </tr> <</if>> @@ -717,11 +917,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.PCmedical || $lastWeeksCashExpenses.PCmedical>> <tr> <td>Your medical expenses</td> - <td><<= cashNumFormat($lastWeeksCashIncome.PCmedical)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.PCmedical)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCmedical))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCmedical))>>@@</td> <td> <<set $lastWeeksCashProfits.PCmedical = ($lastWeeksCashIncome.PCmedical + $lastWeeksCashExpenses.PCmedical)>> - <<= cashNumFormat($lastWeeksCashProfits.PCmedical)>> + <<if $lastWeeksCashProfits.PCmedical > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>@@ + <</if>> </td> </tr> <</if>> @@ -729,11 +933,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.PCskills || $lastWeeksCashExpenses.PCskills>> <tr> <td>Your skills</td> - <td><<= cashNumFormat($lastWeeksCashIncome.PCskills)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.PCskills)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCskills))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCskills))>>@@</td> <td> <<set $lastWeeksCashProfits.PCskills = ($lastWeeksCashIncome.PCskills + $lastWeeksCashExpenses.PCskills)>> - <<= cashNumFormat($lastWeeksCashProfits.PCskills)>> + <<if $lastWeeksCashProfits.PCskills > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>@@ + <</if>> </td> </tr> <</if>> @@ -745,8 +953,8 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ (and bribes) <</if>> </td> - <td><<= cashNumFormat($lastWeeksCashIncome.rents)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.rents)>></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 @@ -756,11 +964,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<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><<= cashNumFormat($lastWeeksCashIncome.stocks)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.stocks)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocks))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocks))>>@@</td> <td> <<set $lastWeeksCashProfits.stocks = ($lastWeeksCashIncome.stocks + $lastWeeksCashExpenses.stocks)>> - <<= cashNumFormat($lastWeeksCashProfits.stocks)>> + <<if $lastWeeksCashProfits.stocks > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>@@ + <</if>> </td> </tr> <</if>> @@ -768,11 +980,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.stocksTraded|| $lastWeeksCashExpenses.stocksTraded>> <tr> <td>Stock trading</td> - <td><<= cashNumFormat($lastWeeksCashIncome.stocksTraded)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.stocksTraded)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocksTraded))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocksTraded))>>@@</td> <td> <<set $lastWeeksCashProfits.stocksTraded = ($lastWeeksCashIncome.stocksTraded + $lastWeeksCashExpenses.stocksTraded)>> - <<= cashNumFormat($lastWeeksCashProfits.stocksTraded)>> + <<if $lastWeeksCashProfits.stocksTraded > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>@@ + <</if>> </td> </tr> <</if>> @@ -780,11 +996,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.fines || $lastWeeksCashExpenses.fines>> <tr> <td>Fines</td> - <td><<= cashNumFormat($lastWeeksCashIncome.fines)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.fines)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.fines))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fines))>>@@</td> <td> <<set $lastWeeksCashProfits.fines = ($lastWeeksCashIncome.fines + $lastWeeksCashExpenses.fines)>> - <<= cashNumFormat($lastWeeksCashProfits.fines)>> + <<if $lastWeeksCashProfits.fines > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>@@ + <</if>> </td> </tr> <</if>> @@ -792,11 +1012,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.event || $lastWeeksCashExpenses.event>> <tr> <td>Events</td> - <td><<= cashNumFormat($lastWeeksCashIncome.event)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.event)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.event))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.event))>>@@</td> <td> <<set $lastWeeksCashProfits.event = ($lastWeeksCashIncome.event + $lastWeeksCashExpenses.event)>> - <<= cashNumFormat($lastWeeksCashProfits.event)>> + <<if $lastWeeksCashProfits.event > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>@@ + <</if>> </td> </tr> <</if>> @@ -804,11 +1028,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.war || $lastWeeksCashExpenses.war>> <tr> <td>Archology conflict</td> - <td><<= cashNumFormat($lastWeeksCashIncome.war)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.war)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.war))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.war))>>@@</td> <td> <<set $lastWeeksCashProfits.war = ($lastWeeksCashIncome.war + $lastWeeksCashExpenses.war)>> - <<= cashNumFormat($lastWeeksCashProfits.war)>> + <<if $lastWeeksCashProfits.war > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>@@ + <</if>> </td> </tr> <</if>> @@ -828,11 +1056,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.PCtraining)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.PCtraining)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>@@</td> <td> <<set $lastWeeksCashProfits.PCtraining = ($lastWeeksCashIncome.PCtraining + $lastWeeksCashExpenses.PCtraining)>> - <<= cashNumFormat($lastWeeksCashProfits.PCtraining)>> + <<if $lastWeeksCashProfits.PCtraining > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@ + <</if>> </td> </tr> <</if>> @@ -840,11 +1072,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.capEx || $lastWeeksCashExpenses.capEx>> <tr> <td>Capital Expenses</td> - <td><<= cashNumFormat($lastWeeksCashIncome.capEx)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.capEx)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.capEx))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.capEx))>>@@</td> <td> <<set $lastWeeksCashProfits.capEx = ($lastWeeksCashIncome.capEx + $lastWeeksCashExpenses.capEx)>> - <<= cashNumFormat($lastWeeksCashProfits.capEx)>> + <<if $lastWeeksCashProfits.capEx > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>@@ + <</if>> </td> </tr> <</if>> @@ -852,11 +1088,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.cheating || $lastWeeksCashExpenses.cheating>> <tr> <td>CHEATING</td> - <td><<= cashNumFormat($lastWeeksCashIncome.cheating)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.cheating)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.cheating))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cheating))>>@@</td> <td> <<set $lastWeeksCashProfits.cheating = ($lastWeeksCashIncome.cheating + $lastWeeksCashExpenses.cheating)>> - <<= cashNumFormat($lastWeeksCashProfits.cheating)>> + <<if $lastWeeksCashProfits.cheating > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>@@ + <</if>> </td> </tr> <</if>> @@ -868,11 +1108,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.policies)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.policies)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.policies))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.policies))>>@@</td> <td> <<set $lastWeeksCashProfits.policies = ($lastWeeksCashIncome.policies + $lastWeeksCashExpenses.policies)>> - <<= cashNumFormat($lastWeeksCashProfits.policies)>> + <<if $lastWeeksCashProfits.policies > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>@@ + <</if>> </td> </tr> <</if>> @@ -880,11 +1124,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.futureSocieties)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.futureSocieties)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.futureSocieties))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.futureSocieties))>>@@</td> <td> <<set $lastWeeksCashProfits.futureSocieties = ($lastWeeksCashIncome.futureSocieties + $lastWeeksCashExpenses.futureSocieties)>> - <<= cashNumFormat($lastWeeksCashProfits.futureSocieties)>> + <<if $lastWeeksCashProfits.futureSocieties > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>@@ + <</if>> </td> </tr> <</if>> @@ -910,11 +1158,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<else>> Unknown school expense <</if>> </td> - <td><<= cashNumFormat($lastWeeksCashIncome.schoolBacking)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.schoolBacking)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.schoolBacking))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.schoolBacking))>>@@</td> <td> <<set $lastWeeksCashProfits.schoolBacking = ($lastWeeksCashIncome.schoolBacking + $lastWeeksCashExpenses.schoolBacking)>> - <<= cashNumFormat($lastWeeksCashProfits.schoolBacking)>> + <<if $lastWeeksCashProfits.schoolBacking > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>@@ + <</if>> </td> </tr> <</if>> @@ -922,11 +1174,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.citizenOrphanage)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.citizenOrphanage)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.citizenOrphanage))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.citizenOrphanage))>>@@</td> <td> <<set $lastWeeksCashProfits.citizenOrphanage = ($lastWeeksCashIncome.citizenOrphanage + $lastWeeksCashExpenses.citizenOrphanage)>> - <<= cashNumFormat($lastWeeksCashProfits.citizenOrphanage)>> + <<if $lastWeeksCashProfits.citizenOrphanage > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>@@ + <</if>> </td> </tr> <</if>> @@ -934,11 +1190,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.privateOrphanage)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.privateOrphanage)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.privateOrphanage))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.privateOrphanage))>>@@</td> <td> <<set $lastWeeksCashProfits.privateOrphanage = ($lastWeeksCashIncome.privateOrphanage + $lastWeeksCashExpenses.privateOrphanage)>> - <<= cashNumFormat($lastWeeksCashProfits.privateOrphanage)>> + <<if $lastWeeksCashProfits.privateOrphanage > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>@@ + <</if>> </td> </tr> <</if>> @@ -949,11 +1209,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.mercenaries)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.mercenaries)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>>@@</td> <td> <<set $lastWeeksCashProfits.mercenaries = ($lastWeeksCashIncome.mercenaries + $lastWeeksCashExpenses.mercenaries)>> - <<= cashNumFormat($lastWeeksCashProfits.mercenaries)>> + <<if $lastWeeksCashProfits.mercenaries > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + <</if>> </td> </tr> <</if>> @@ -961,11 +1225,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.securityExpansion || $lastWeeksCashExpenses.securityExpansion>> <tr> <td>Security Expansion</td> - <td><<= cashNumFormat($lastWeeksCashIncome.securityExpansion)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.securityExpansion)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.securityExpansion))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.securityExpansion))>>@@</td> <td> <<set $lastWeeksCashProfits.securityExpansion = ($lastWeeksCashIncome.securityExpansion + $lastWeeksCashExpenses.securityExpansion)>> - <<= cashNumFormat($lastWeeksCashProfits.securityExpansion)>> + <<if $lastWeeksCashProfits.securityExpansion > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>@@ + <</if>> </td> </tr> <</if>> @@ -973,23 +1241,31 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.specialForces || $lastWeeksCashExpenses.specialForces>> <tr> <td>Special Forces</td> - <td><<= cashNumFormat($lastWeeksCashIncome.specialForces)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.specialForces)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.specialForces))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.specialForces))>>@@</td> <td> <<set $lastWeeksCashProfits.specialForces = ($lastWeeksCashIncome.specialForces + $lastWeeksCashExpenses.specialForces)>> - <<= cashNumFormat($lastWeeksCashProfits.specialForces)>> + <<if $lastWeeksCashProfits.specialForces > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>@@ + <</if>> </td> </tr> <</if>> <<if $securityForceActive > 0>> <tr> - <td>Acquisitions: [[$securityForceName|SFM Barracks][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]</td> - <td><<= cashNumFormat($lastWeeksCashIncome.mercenaries)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.mercenaries)>></td> + <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> <<set $lastWeeksCashProfits.mercenaries = ($lastWeeksCashIncome.mercenaries + $lastWeeksCashExpenses.mercenaries)>> - <<= cashNumFormat($lastWeeksCashProfits.mercenaries)>> + <<if $lastWeeksCashProfits.mercenaries > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@ + <</if>> </td> </tr> <</if>> @@ -998,11 +1274,15 @@ 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><<= cashNumFormat($lastWeeksCashIncome.peacekeepers)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.peacekeepers)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.peacekeepers))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.peacekeepers))>>@@</td> <td> <<set $lastWeeksCashProfits.peacekeepers = ($lastWeeksCashIncome.peacekeepers + $lastWeeksCashExpenses.peacekeepers)>> - $lastWeeksCashProfits.peacekeepers + <<if $lastWeeksCashProfits.peacekeepers > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.peacekeepers))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.peacekeepers))>>@@ + <</if>> </td> </tr> <</if>> @@ -1011,11 +1291,15 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <<if $lastWeeksCashIncome.recruiter || $lastWeeksCashExpenses.recruiter>> <tr> <td>__Recruiting__</td> - <td><<= cashNumFormat($lastWeeksCashIncome.recruiter)>></td> - <td><<= cashNumFormat($lastWeeksCashExpenses.recruiter)>></td> + <td>@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@</td> + <td>@@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>@@</td> <td> <<set $lastWeeksCashProfits.recruiter = ($lastWeeksCashIncome.recruiter + $lastWeeksCashExpenses.recruiter)>> - <<= cashNumFormat($lastWeeksCashProfits.recruiter)>> + <<if $lastWeeksCashProfits.recruiter > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@ + <</if>> </td> </tr> <</if>> @@ -1025,31 +1309,47 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td>Tracked totals</td> <td> <<set $lastWeeksCashIncome.Total = hashSum($lastWeeksCashIncome)>> - <<= cashNumFormat($lastWeeksCashIncome.Total)>> + <<if $lastWeeksCashIncome.Total > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.Total))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashIncome.Total))>>@@ + <</if>> </td> <td> <<set $lastWeeksCashExpenses.Total = hashSum($lastWeeksCashExpenses)>> - <<= cashNumFormat($lastWeeksCashExpenses.Total)>> + <<if $lastWeeksCashExpenses.Total > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.Total))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashExpenses.Total))>>@@ + <</if>> </td> <td> <<set $lastWeeksCashProfits.Total = ($lastWeeksCashIncome.Total + $lastWeeksCashExpenses.Total)>> /* each "profit" item is calculated on this sheet, and there's two ways to generate a profit total: the difference of the income and expense totals, and adding all the profit items. If they aren't the same, I probably forgot to properly add an item's profit calculation to this sheet.*/ <<if $lastWeeksCashProfits.Total != hashSum($lastWeeksCashProfits) - $lastWeeksCashProfits.Total>>/* Profits includes the total number of profits, so we have to subtract it back out */ - <<print (hashSum($lastWeeksCashProfits)-$lastWeeksCashProfits.Total)>><br> + <<print (cashFormat(Math.trunc(hashSum($lastWeeksCashProfits)-$lastWeeksCashProfits.Total)))>><br> @@.red;Fix profit calc<br>@@ <</if>> - <<= cashNumFormat($lastWeeksCashProfits.Total)>> + <<if $lastWeeksCashProfits.Total > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.Total))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc($lastWeeksCashProfits.Total))>>@@ + <</if>> </td> </tr> <tr><td></td></tr> <tr> - <td>Expenses budget for week <<print ($week +1)>></td> - <td></td> - <td><<= cashNumFormat($costs)>></td> + <td>Expenses budget for week <<print ($week+1)>></td> <td></td> + <td><<if $costs > 0>> + @@.yellowgreen;<<print cashFormat($costs)>>@@ + <<else>> + @@.red;<<print cashFormat($costs)>>@@ + <</if>></td> + <td></td> </tr> @@ -1059,7 +1359,11 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td>Last week actuals</td> <td></td> <td></td> - <td><<print cashNumFormat($cash-$cashLastWeek)>></td> + <td><<if ($cash-$cashLastWeek) > 0>> + @@.yellowgreen;<<print cashFormat($cash-$cashLastWeek)>>@@ + <<else>> + @@.red;<<print cashFormat($cash-$cashLastWeek)>>@@ + <</if>></td> </tr> <<if ($cash-$cashLastWeek) == $lastWeeksCashProfits.Total>> @@ -1071,7 +1375,11 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <td>Transaction tracking off by:</td> <td></td> <td>/*<<print ($lastWeeksCashExpenses.Total + $costs)>>*/</td> - <td><<print cashNumFormat(($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)>></td> + <td><<if (($cash-$cashLastWeek) - $lastWeeksCashProfits.Total) > 0>> + @@.yellowgreen;<<print cashFormat(Math.trunc(($cash-$cashLastWeek) - $lastWeeksCashProfits.Total))>>@@ + <<else>> + @@.red;<<print cashFormat(Math.trunc((($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)))>>@@ + <</if>></td> </tr> <</if>> </table> @@ -1085,12 +1393,12 @@ for(var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){ <</if>> <<if ndef $lastWeeksErrors>> - <<set $lastWeeksErrors = "Errors:">> + <<set $lastWeeksErrors = "Errors: ">> <</if>> <<if $lastWeeksErrors !== "Errors:">> - <<link "Reset">> - <<set $lastWeeksErrors = "Errors:">> + <<link "Reset">> + <<set $lastWeeksErrors = "Errors: ">> <</link>> @@.red;<<print $lastWeeksErrors>>@@ <</if>> diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw index 7d37bec590e2d2dde16cf084cf7f868abe3e504a..61c36edd7e8b5ce64988f7a191185296fb254b13 100644 --- a/src/uncategorized/genericPlotEvents.tw +++ b/src/uncategorized/genericPlotEvents.tw @@ -1333,7 +1333,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your <<replace "#result">> <<for _genPlot = 0; _genPlot < _newSlaves.length; _genPlot++>> <<slaveCost _newSlaves[_genPlot]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <</for>> Prisoners @@.green;sold.@@ <</replace>> diff --git a/src/uncategorized/pCoupAttempt.tw b/src/uncategorized/pCoupAttempt.tw index 1891bd4f87267bff9188e1052f04d1777ba366cf..24788e6e0fe12203d88cbfd2b245ab0e1300c30c 100644 --- a/src/uncategorized/pCoupAttempt.tw +++ b/src/uncategorized/pCoupAttempt.tw @@ -262,7 +262,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc <<replace "#result">> <<for _pca = 0; _pca < _newSlaves.length; _pca++>> <<slaveCost _newSlaves[_pca]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <</for>> Prisoners sold. <</replace>> diff --git a/src/uncategorized/pInvasion.tw b/src/uncategorized/pInvasion.tw index fa4f2e798081303828e9ef2ea6b79dc267e7f75b..b24ed603aa04484455848d957d40daa80cda7b78 100644 --- a/src/uncategorized/pInvasion.tw +++ b/src/uncategorized/pInvasion.tw @@ -116,7 +116,7 @@ The loose militia lately organized by the arcology owners has been called out to <<replace "#result">> <<for _i = 0; _i < _newSlaves.length; _i++>> <<slaveCost _newSlaves[_i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <</for>> Prisoners sold. <</replace>> diff --git a/src/uncategorized/pRaidResult.tw b/src/uncategorized/pRaidResult.tw index efcd84e8e22335d01e821a5ddd2e88aba1a888c1..4e1460f643a9ba73f5c4c76736242f46f8d8fc65 100644 --- a/src/uncategorized/pRaidResult.tw +++ b/src/uncategorized/pRaidResult.tw @@ -50,7 +50,7 @@ Out ahead of the main body of refugees there is a small knot moving quickly and <<replace "#result">> <<for _prr = 0; _prr < _newSlaves.length; _prr++>> <<slaveCost _newSlaves[_prr]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <</for>> Prisoners sold. <</replace>> diff --git a/src/uncategorized/reBoomerang.tw b/src/uncategorized/reBoomerang.tw index 89405f94f27e2c3394b2c965ef60b78ef21f839a..a4e695dc1be235f66bcc389219a4245edf0a8eb5 100644 --- a/src/uncategorized/reBoomerang.tw +++ b/src/uncategorized/reBoomerang.tw @@ -468,7 +468,7 @@ It isn't obvious how $he managed to escape, though no doubt you could review the <</replace>> <</link>> //This will cost in <<print cashFormat($contractCost)>>.// <br><<link "Sell $him immediately">> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<replace "#result">> The penthouse opens, and $activeSlave.slaveName stumbles inside, sobbing $his thanks. $He's immediately conducted to the autosurgery for some quick cosmetic surgery, while you and $assistantName do the necessary work to falsify the arcology records and conceal $his origins. Before $he's even out from under anesthesia, $he's bundled off into one of the hundreds of slave shipments that move between arcologies every day. This time $he'll be sold far enough away that no matter how much of an escape artist $he is, you won't be seeing any more of $him. $He can whine elsewhere. <<set $boomerangStats = 0>> diff --git a/src/uncategorized/reFSAcquisition.tw b/src/uncategorized/reFSAcquisition.tw index ce9b69ac8ac2b83a8d04198f38552279fcad1ef0..99c4b4f90819af1508590d1331845f200a6f7769 100644 --- a/src/uncategorized/reFSAcquisition.tw +++ b/src/uncategorized/reFSAcquisition.tw @@ -1421,7 +1421,7 @@ The call comes in from an office, and you suppress the urge to check whether $as <</replace>> <</link>> //This will cost <<print cashFormat($contractCost)>>// <br><<link "Sell $him immediately">> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<replace "#result">> <<switch $FSAcquisitionEvents>> <<case "Pastoralist">> diff --git a/src/uncategorized/reMalefactor.tw b/src/uncategorized/reMalefactor.tw index a2a54aac5e629fae7378b40f733ed562c77b0b82..bf2ffeab58df0a25cb465c5d7d4f0344858499c9 100644 --- a/src/uncategorized/reMalefactor.tw +++ b/src/uncategorized/reMalefactor.tw @@ -590,7 +590,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin <</link>> <</if>> <br><<link "Sell $him immediately">> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<if $cash4Babies == 1 && $malefactor == "anchorBaby">> <<run cashX(random(20,30), "slaveTransfer")>> <</if>> diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw index 9fb73f5e57d0d8ae1a108438f8abb2a0b0795dc6..5a6796133f30c16037a4927fe925053a0e40b107 100644 --- a/src/uncategorized/reRecruit.tw +++ b/src/uncategorized/reRecruit.tw @@ -2674,7 +2674,7 @@ He explains that one of his servant <<= $girl>>s was impregnated by his fool of <<case "forbidden love">> <<default>> <br><<link "Sell $him immediately">> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<replace "#result">> <<switch $recruit>> <<case "held POW">> diff --git a/src/uncategorized/resFailure.tw b/src/uncategorized/resFailure.tw index 590353b311319c31974af0ad86a04df47e06e437..b5fd4e4e3caed6cdd823b17ba613b405841f8edd 100644 --- a/src/uncategorized/resFailure.tw +++ b/src/uncategorized/resFailure.tw @@ -804,56 +804,56 @@ The failure of a prominent organization within your arcology has @@.red;affected <<if $RESFailure == "TSS">> <<if ($slaves[$i].origin == "She was given to you by a failed branch campus of The Slavegirl School right after her majority.") || ($slaves[$i].origin == "She was given to you by a failed branch campus of The Slavegirl School after she was retrained as a slave girl.")>> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "GRI">> <<if $slaves[$i].origin == "She was given to you by a failed subsidiary lab of the Growth Research Institute right after her use as a test subject ended.">> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "SCP">> <<if $slaves[$i].origin == "She was given to you by a failed branch campus of St. Claver Preparatory after she served as a plastic surgeon's passing final exam.">> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "LDE">> <<if $slaves[$i].origin == "She was given to you by a failed branch campus of the innovative École des Enculées right after her graduation.">> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "TGA">> <<if $slaves[$i].origin == "She was given to you by a failed branch campus of the intense Gymnasium-Academy right after her majority.">> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "HA">> <<if $slaves[$i].origin == "She was given to you by a failed branch campus of the Hippolyta Academy right after her majority.">> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "TCR">> <<if $slaves[$i].origin == "She is a prized dairy cow given to you by a failed local pasture of The Cattle Ranch.">> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> <<else>> <<if ($slaves[$i].origin == "She was the leader of your arcology's Futanari Sisters until you engineered her community's failure and enslavement.") || ($slaves[$i].origin == "She was a Futanari Sister until you engineered her early enslavement.")>> <<slaveCost $slaves[$i]>> - <<run cashX(forceNeg($slaveCost), "slaveTransfer")>> + <<run cashX($slaveCost, "slaveTransfer")>> <<include "Remove activeSlave">> <<set $i -= 1>> <</if>> diff --git a/src/uncategorized/seRecruiterSuccess.tw b/src/uncategorized/seRecruiterSuccess.tw index 5dd8d366a6b51f880dca10b89a8c56c015f4431e..7411a622b220886313470b7c9ba5b6e7d361ee28 100644 --- a/src/uncategorized/seRecruiterSuccess.tw +++ b/src/uncategorized/seRecruiterSuccess.tw @@ -256,7 +256,7 @@ Your recruiter $Recruiter.slaveName has succeeded; $he's convinced a desperate o <</replace>> <</link>> //This will cost <<print cashFormat($contractCost)>>// <br><<link "Sell _him2 immediately">> - <<run cashX(forceNeg($slaveCost), "slaveTransfer", $Recruiter)>> + <<run cashX($slaveCost, "slaveTransfer", $Recruiter)>> <<replace "#result">> $activeSlave.slaveName accepts being resold without much fuss. _He2's merely exchanged one unknown owner for another. For all _he2 knows _his2 new buyer will be less abusive than you would have been. _He2 would be less complacent if _he2 knew who _his2 buyers are; _he2'll be immured in an arcade within the hour. <</replace>> diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 83be58b7c21aa0c16db4d7d8e5292e57808d8f78..d09d10d5dbd37c0c6bca40257f32894843e16307 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -1810,7 +1810,7 @@ __Financial__: <<elseif $activeSlave.accent > 3>> //$His lack of language and basic life skills is a red sign to most slave appraisers. $He must not act like a child to be sold without raising suspicion.// | <<else>> - <<link "Sell $him" "Sell Slave">><<run cashX(forceNeg(-500), "slaveTransfer", $activeSlave)>><</link>> //Listing $him for sale will cost <<print cashFormat(500)>>// | + <<link "Sell $him" "Sell Slave">><<run cashX(-500, "slaveTransfer", $activeSlave)>><</link>> //Listing $him for sale will cost <<print cashFormat(500)>>// | <<if ($seeAge != 0) && ($activeSlave.indenture < 1)>> <<link "Retire $him" "SE retirement">><<set $retiree = $activeSlave.ID, $retired = 1>><</link>> | <</if>>