From 2c009ec3ca0fb4efb64419a3221916683c05a654 Mon Sep 17 00:00:00 2001 From: fohristiwhirl Date: Sat, 20 Oct 2018 13:29:41 +0100 Subject: [PATCH] pc_of_gathered --- fluorine_renderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fluorine_renderer.js b/fluorine_renderer.js index 946dfb6..c0d2fad 100644 --- a/fluorine_renderer.js +++ b/fluorine_renderer.js @@ -1783,6 +1783,7 @@ function make_renderer() { let spent = deposited + initial - current; let gathered = deposited + initial; let dead_ships = builds - (ships + dropoffs); + let pc_of_gathered = Math.round(10000 * current / gathered) / 100; if (renderer.game.game_statistics.player_statistics[pid].last_turn_alive < renderer.turn) { current = "dead"; // Set this after spent is calculated, above. @@ -1801,7 +1802,7 @@ function make_renderer() {
  • Initial: ${c}${initial}${z}, mined: ${c}${mined}${z}, absorbed: ${c}${absorbed}${z}
  • Burned: ${c}${burned}${z}, carrying ${c}${carrying}${z}, dropped: ${c}${scrapped}${z}
  • Gathered: ${c}${gathered}${z} – spent: ${c}${spent}${z}
  • -
  • Profit = ${c}${current}${z}
  • ` +
  • Profit = ${c}${current}${z} (${c}${pc_of_gathered}%${z} of gathered)
  • ` ); if (mined + absorbed - deposited - carrying - burned - scrapped !== 0) {