[bug] Fixing the timestamp in Bladeburner logs.

This commit is contained in:
Steven Evans
2018-09-14 22:27:29 -04:00
committed by danielyxie
parent 6cb7704eed
commit a98dd66e45

View File

@ -24,6 +24,7 @@ import {Page, routing} from "./ui/navigationTrackin
import {exceptionAlert} from "../utils/helpers/exceptionAlert"; import {exceptionAlert} from "../utils/helpers/exceptionAlert";
import {formatNumber} from "../utils/StringHelperFunctions"; import {formatNumber} from "../utils/StringHelperFunctions";
import {getRandomInt} from "../utils/helpers/getRandomInt"; import {getRandomInt} from "../utils/helpers/getRandomInt";
import {getTimestamp} from "../utils/helpers/getTimestamp";
import {removeElement} from "../utils/uiHelpers/removeElement"; import {removeElement} from "../utils/uiHelpers/removeElement";
import {removeElementById} from "../utils/uiHelpers/removeElementById"; import {removeElementById} from "../utils/uiHelpers/removeElementById";
@ -2755,9 +2756,7 @@ Bladeburner.prototype.clearConsole = function() {
Bladeburner.prototype.log = function(input) { Bladeburner.prototype.log = function(input) {
//Adds a timestamp and then just calls postToConsole //Adds a timestamp and then just calls postToConsole
var d = new Date(); this.postToConsole(`[${getTimestamp()}] ${input}`);
var timestamp = d.getMonth() + "/" + d.getDay() + " " + d.getHours() + ":" + d.getMinutes();
this.postToConsole("[" + timestamp + "] " + input);
} }
//Handles a potential series of commands (comm1; comm2; comm3;) //Handles a potential series of commands (comm1; comm2; comm3;)