mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
no more console log
This commit is contained in:
parent
fb37f6b94d
commit
7355f4212b
@ -120,7 +120,6 @@ function evaluateVersionCompatibility(ver) {
|
|||||||
if (ver <= "0.41.2") {
|
if (ver <= "0.41.2") {
|
||||||
// Player's company position is now a string
|
// Player's company position is now a string
|
||||||
if (Player.companyPosition != null && typeof Player.companyPosition !== "string") {
|
if (Player.companyPosition != null && typeof Player.companyPosition !== "string") {
|
||||||
console.log("Changed Player.companyPosition value to be compatible with v0.41.2");
|
|
||||||
Player.companyPosition = Player.companyPosition.data.positionName;
|
Player.companyPosition = Player.companyPosition.data.positionName;
|
||||||
if (Player.companyPosition == null) {
|
if (Player.companyPosition == null) {
|
||||||
Player.companyPosition = "";
|
Player.companyPosition = "";
|
||||||
@ -131,12 +130,10 @@ function evaluateVersionCompatibility(ver) {
|
|||||||
for (var companyName in Companies) {
|
for (var companyName in Companies) {
|
||||||
const company = Companies[companyName];
|
const company = Companies[companyName];
|
||||||
if ((company.name == null || company.name === 0 || company.name === "") && company.companyName != null) {
|
if ((company.name == null || company.name === 0 || company.name === "") && company.companyName != null) {
|
||||||
console.log("Changed company name property to be compatible with v0.41.2");
|
|
||||||
company.name = company.companyName;
|
company.name = company.companyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (company.companyPositions instanceof Array) {
|
if (company.companyPositions instanceof Array) {
|
||||||
console.log("Changed company companyPositions property to be compatible with v0.41.2");
|
|
||||||
const pos = {};
|
const pos = {};
|
||||||
|
|
||||||
for (let i = 0; i < company.companyPositions.length; ++i) {
|
for (let i = 0; i < company.companyPositions.length; ++i) {
|
||||||
@ -150,7 +147,6 @@ function evaluateVersionCompatibility(ver) {
|
|||||||
// This version allowed players to hold multiple jobs
|
// This version allowed players to hold multiple jobs
|
||||||
if (ver < "0.43.0") {
|
if (ver < "0.43.0") {
|
||||||
if (Player.companyName !== "" && Player.companyPosition != null && Player.companyPosition !== "") {
|
if (Player.companyName !== "" && Player.companyPosition != null && Player.companyPosition !== "") {
|
||||||
console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0");
|
|
||||||
Player.jobs[Player.companyName] = Player.companyPosition;
|
Player.jobs[Player.companyName] = Player.companyPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,14 +157,11 @@ function evaluateVersionCompatibility(ver) {
|
|||||||
function loadGame(saveString) {
|
function loadGame(saveString) {
|
||||||
if (saveString === "" || saveString == null || saveString === undefined) {
|
if (saveString === "" || saveString == null || saveString === undefined) {
|
||||||
if (!window.localStorage.getItem("bitburnerSave")) {
|
if (!window.localStorage.getItem("bitburnerSave")) {
|
||||||
console.log("No save file to load");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
saveString = decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave"))));
|
saveString = decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave"))));
|
||||||
console.log("Loading game from localStorage");
|
|
||||||
} else {
|
} else {
|
||||||
saveString = decodeURIComponent(escape(atob(saveString)));
|
saveString = decodeURIComponent(escape(atob(saveString)));
|
||||||
console.log("Loading game from IndexedDB");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var saveObj = JSON.parse(saveString, Reviver);
|
var saveObj = JSON.parse(saveString, Reviver);
|
||||||
@ -485,9 +478,7 @@ BitburnerSaveObject.prototype.deleteGame = function (db) {
|
|||||||
|
|
||||||
// Delete from indexedDB
|
// Delete from indexedDB
|
||||||
var request = db.transaction(["savestring"], "readwrite").objectStore("savestring").delete("save");
|
var request = db.transaction(["savestring"], "readwrite").objectStore("savestring").delete("save");
|
||||||
request.onsuccess = function () {
|
request.onsuccess = function () {};
|
||||||
console.log("Successfully deleted save from indexedDb");
|
|
||||||
};
|
|
||||||
request.onerror = function (e) {
|
request.onerror = function (e) {
|
||||||
console.error(`Failed to delete save from indexedDb: ${e}`);
|
console.error(`Failed to delete save from indexedDb: ${e}`);
|
||||||
};
|
};
|
||||||
|
@ -242,7 +242,6 @@ export class Terminal implements ITerminal {
|
|||||||
this.print("Cancelled");
|
this.print("Cancelled");
|
||||||
}
|
}
|
||||||
this.action = null;
|
this.action = null;
|
||||||
console.log("done");
|
|
||||||
TerminalEvents.emit();
|
TerminalEvents.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user