Cleaned up Warning And Error Code
This commit is contained in:
@@ -26,7 +26,7 @@ class Chart {
|
||||
try {
|
||||
data = Json.parse(Assets.getText(path)).events;
|
||||
} catch(e) {
|
||||
Logs.trace('Failed to load song event data for ${songName} ($path): ${Std.string(e)}', ERROR);
|
||||
Logs.error('Failed to load song event data for ${songName} ($path): ${Std.string(e)}');
|
||||
}
|
||||
}
|
||||
return data;
|
||||
@@ -44,7 +44,7 @@ class Chart {
|
||||
try {
|
||||
data = Json.parse(Assets.getText(path));
|
||||
} catch(e) {
|
||||
Logs.trace('Failed to load song metadata for ${songName} ($path): ${Std.string(e)}', ERROR);
|
||||
Logs.error('Failed to load song metadata for ${songName} ($path): ${Std.string(e)}');
|
||||
}
|
||||
if (data != null) break;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ class Chart {
|
||||
|
||||
var valid:Bool = true;
|
||||
if (!Assets.exists(chartPath)) {
|
||||
Logs.trace('Chart for song ${songName} ($difficulty) at "$chartPath" was not found.', ERROR, RED);
|
||||
Logs.error('Chart for song ${songName} ($difficulty) at "$chartPath" was not found.');
|
||||
valid = false;
|
||||
}
|
||||
var data:Dynamic = null;
|
||||
@@ -113,7 +113,7 @@ class Chart {
|
||||
if (valid)
|
||||
data = Json.parse(Assets.getText(chartPath));
|
||||
} catch(e) {
|
||||
Logs.trace('Could not parse chart for song ${songName} ($difficulty): ${Std.string(e)}', ERROR, RED);
|
||||
Logs.error('Could not parse chart for song ${songName} ($difficulty): ${Std.string(e)}');
|
||||
}
|
||||
|
||||
if (data != null) {
|
||||
|
||||
@@ -132,10 +132,10 @@ class FNFLegacyParser {
|
||||
if ((swagSection.mustHitSection && strumLine.type == OPPONENT) ||
|
||||
(!swagSection.mustHitSection && strumLine.type == PLAYER))
|
||||
sectionNote[1] += 4;
|
||||
swagSection.sectionNotes.push(note);
|
||||
swagSection.sectionNotes.push(note);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {song: base};
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class PsychParser {
|
||||
for (note in strumLine.notes) {
|
||||
var section:Int = Math.floor(Conductor.getStepForTime(note.time) / Conductor.getMeasureLength());
|
||||
var swagSection:SwagSection = base.notes[section];
|
||||
|
||||
|
||||
if (section >= 0 && section < base.notes.length) {
|
||||
var sectionNote:Array<Dynamic> = [
|
||||
note.time, // TIME
|
||||
@@ -44,10 +44,10 @@ class PsychParser {
|
||||
if ((swagSection.mustHitSection && strumLine.type == OPPONENT) ||
|
||||
(!swagSection.mustHitSection && strumLine.type == PLAYER))
|
||||
sectionNote[1] += 4;
|
||||
swagSection.sectionNotes.push(sectionNote);
|
||||
swagSection.sectionNotes.push(sectionNote);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var groupedEvents:Array<Array<ChartEvent>> = [];
|
||||
var __last:Array<ChartEvent> = null;
|
||||
var __lastTime:Float = Math.NaN;
|
||||
@@ -91,7 +91,7 @@ class PsychParser {
|
||||
FlxMath.roundDecimal(event.params[1]/chart.scrollSpeed, 2), // SCROLL SPEED MULTIPLER
|
||||
FlxMath.roundDecimal( // TIME
|
||||
event.params[0] ? // IS TWEENED?
|
||||
(Conductor.getTimeForStep(eventStep+event.params[2]) - Conductor.getTimeForStep(eventStep))/1000
|
||||
(Conductor.getTimeForStep(eventStep+event.params[2]) - Conductor.getTimeForStep(eventStep))/1000
|
||||
: 0, 2)
|
||||
]);
|
||||
default:
|
||||
@@ -106,7 +106,7 @@ class PsychParser {
|
||||
|
||||
for (psychEvent in psychEvents)
|
||||
for (i in 1...3) // Turn both vals into strings
|
||||
if (!(psychEvent[i] is String))
|
||||
if (!(psychEvent[i] is String))
|
||||
psychEvent[i] = Std.string(psychEvent[i]);
|
||||
|
||||
base.events.push([events[0].time, psychEvents]);
|
||||
|
||||
Reference in New Issue
Block a user