format rep gain in hacking mission.

This commit is contained in:
Olivier Gagnon 2021-03-19 22:56:43 -04:00
parent e0745d7757
commit 670394ca2f

@ -5,6 +5,7 @@ import { Player } from "./Player";
import { dialogBoxCreate } from "../utils/DialogBox"; import { dialogBoxCreate } from "../utils/DialogBox";
import { formatNumber } from "../utils/StringHelperFunctions"; import { formatNumber } from "../utils/StringHelperFunctions";
import { numeralWrapper } from "./ui/numeralFormat";
import { addOffset } from "../utils/helpers/addOffset"; import { addOffset } from "../utils/helpers/addOffset";
import { getRandomInt } from "../utils/helpers/getRandomInt"; import { getRandomInt } from "../utils/helpers/getRandomInt";
@ -286,11 +287,8 @@ HackingMission.prototype.createPageDom = function() {
var gain = this.reward * Player.faction_rep_mult * favorMult; var gain = this.reward * Player.faction_rep_mult * favorMult;
var headerText = document.createElement("p"); var headerText = document.createElement("p");
headerText.innerHTML = "You are about to start a hacking mission! You will gain " + headerText.innerHTML = "You are about to start a hacking mission! You will gain " +
formatNumber(gain, 3) + " faction reputation with " + this.faction.name + numeralWrapper.format(gain, '0.000a') + " faction reputation with " + this.faction.name +
" if you win. For more information " + " if you win. Click the 'Start' button to begin.";
"about how hacking missions work, click one of the guide links " +
"below (one opens up an in-game guide and the other opens up " +
"the guide from the wiki). Click the 'Start' button to begin.";
headerText.style.display = "block"; headerText.style.display = "block";
headerText.classList.add("hack-mission-header-element"); headerText.classList.add("hack-mission-header-element");
headerText.style.width = "80%"; headerText.style.width = "80%";