Skip to content

Commit

Permalink
Loggong fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaNKtext committed May 9, 2021
1 parent e54bcff commit d373cad
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion scripts/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function startdownload(box) {
bar.value = e.loaded / e.total;
}
xhr.onerror = function () {
console.error("download failed");
console.error("Download failed");
alert("Beatmap download failed. Please retry later.")
box.downloading = false;
box.classList.remove("downloading");
Expand Down
2 changes: 1 addition & 1 deletion scripts/jsloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ window.beatmaplistLoadedCallback = function () {
window.liked_sid_set_callbacks[i]();
window.liked_sid_set_callbacks = [];
} else {
console.error("failed loading liked list");
console.error("Favorites list failed to load");
}
});
}
Expand Down
6 changes: 2 additions & 4 deletions scripts/launchgame.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function launchOSU(osu, beatmapid, version) {
console.log("launching", beatmapid, version)
if (trackid == -1) {
if (log_to_server) log_to_server("unmatch " + beatmapid + " " + version);
console.error("no suck track");
console.log("available tracks are:");
console.error("No such track");
console.log("Available tracks are:");
for (let i = 0; i < osu.tracks.length; ++i)
console.log(osu.tracks[i].metadata.BeatmapID, osu.tracks[i].mode, osu.tracks[i].metadata.Version);
return;
Expand Down Expand Up @@ -87,8 +87,6 @@ function launchOSU(osu, beatmapid, version) {
var gameLoop;
// set quit callback
window.quitGame = function () {
// this shouldn't be called before playback is cleaned up
// restore webpage state
pGameArea.setAttribute("hidden", "");
pMainPage.removeAttribute("hidden");
pNav.removeAttribute("style");
Expand Down
13 changes: 6 additions & 7 deletions scripts/loadlocal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// load beatmap from local
localforage.getItem("beatmapfilelist", function (err, names) {
if (!err && names && typeof names.length !== undefined) {
names = names.filter(function (t) {
Expand Down Expand Up @@ -35,15 +34,15 @@ localforage.getItem("beatmapfilelist", function (err, names) {
}
);
} else {
console.error("error while loading beatmap:", names[i], err);
console.error("Error while loading beatmap:", names[i], err);
}
});
}
} else {
if (!names)
console.log("no local beatmap list found.");
console.log("No local beatmap list found.");
else
console.error("error while loading beatmap list:", err, names);
console.error("Error while loading beatmap list:", err, names);
}
});

Expand All @@ -54,7 +53,7 @@ function addbeatmap(osz, f) {
var map = new BeatmapController();
map.osu = new Osu(osz.root);
map.filename = osz.filename;
console.log("adding beatmap filename:", osz.filename)
console.log("Adding beatmap filename:", osz.filename)

// ask sayobot of star ratings of beatmaps immediately when decoded
map.osu.ondecoded = function () {
Expand All @@ -76,15 +75,15 @@ function addbeatmap(osz, f) {
beatmapFileList.push(map.filename);
localforage.setItem("beatmapfilelist", beatmapFileList, function (err, val) {
if (!err) {
console.log("local beatmap list set to", val);
console.log("Local beatmap list set to", val);
} else {
console.error("Error while saving beatmap list");
}
});
}
};
map.osu.onerror = function (error) {
console.error("osu load error");
console.error("Osu load error");
};
map.osu.load();
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/osu-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ define([], function () {
let t = preprocAudio(filename, buffer);
if (t.startoffset) this.posoffset = t.startoffset;
if (t.newbuffer) buffer = t.newbuffer;
console.log("set start offset to", this.posoffset, "ms");
console.log("you've set global offset to", game.globalOffset || 0, "ms");
console.log("Set start offset to", this.posoffset, "ms");
console.log("You've set global offset to", game.globalOffset || 0, "ms");
this.posoffset += game.globalOffset || 0;

function decode(node) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/osu.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ define(["underscore", "osu-audio", "curves/LinearBezier", "curves/CircumscribedC
self.onerror("No .osu files found!");
} else {
_.each(self.raw_tracks, function (t) {
console.log("attemping loading track:", t.name)
console.log("Attempting to load track:", t.name)
t.getText(function (text) {
var track = new Track(this.zip, text);
self.tracks.push(track);
Expand Down
4 changes: 2 additions & 2 deletions scripts/overlay/score.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ define([], function () {
xhr.open("GET", url);
console.log(url);
xhr.onload = function () {
console.log("play record uploaded");
console.log("Score uploaded");
}
xhr.onerror = function () {
console.error("play record upload failed");
console.error("Score upload failed");
}
xhr.send();
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/playback.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ define(["osu", "playerActions", "SliderMesh", "overlay/score", "overlay/volume",
case 300:
return "great";
default:
throw "no such judgement";
throw "No judgement";
}
}

Expand All @@ -345,7 +345,7 @@ define(["osu", "playerActions", "SliderMesh", "overlay/score", "overlay/volume",
case 300:
return 0x66ccff;
default:
throw "no such judgement";
throw "No judgement";
}
}

Expand Down

0 comments on commit d373cad

Please sign in to comment.