mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
Mission format rep earned with 0.000a
This commit is contained in:
parent
26149d5a01
commit
2507899762
@ -1515,7 +1515,8 @@ HackingMission.prototype.finishMission = function(win) {
|
||||
var favorMult = 1 + (this.faction.favor / 100);
|
||||
var gain = this.reward * Player.faction_rep_mult * favorMult;
|
||||
dialogBoxCreate("Mission won! You earned " +
|
||||
formatNumber(gain, 3) + " reputation with " + this.faction.name);
|
||||
numeralWrapper.format(gain, '0.000a') + " reputation with " + this.faction.name);
|
||||
console.log(`diff ${this.difficulty}`);
|
||||
Player.gainIntelligenceExp(this.difficulty * CONSTANTS.IntelligenceHackingMissionBaseExpGain);
|
||||
this.faction.playerReputation += gain;
|
||||
} else {
|
||||
|
@ -37,7 +37,6 @@ class NumeralFormatter {
|
||||
format(n: number, format: string): string {
|
||||
// numeraljs doesnt properly format numbers that are too big or too small
|
||||
if (Math.abs(n) < 1e-6) { n = 0; }
|
||||
console.log(`${n}: ${numeral(n).format(format)}`);
|
||||
const answer = numeral(n).format(format);
|
||||
if (answer === 'NaN') {
|
||||
return `${n}`;
|
||||
|
Loading…
Reference in New Issue
Block a user