Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Quaver.API/Maps/Parsers/Stepmania/StepFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,15 @@ private static void AddRow(List<StepFileChartNoteType> row, Qua qua, float curre
if (longNote != null)
longNote.EndTime = (int)Math.Round(currentTime, MidpointRounding.AwayFromZero);
break;
// Create mines for Mine notes
case StepFileChartNoteType.Mine:
qua.HitObjects.Add(new HitObjectInfo
{
StartTime = (int)Math.Truncate(currentTime),
Lane = i + 1,
Type = Enums.HitObjectType.Mine
});
break;
}
}
}
Expand Down
12 changes: 10 additions & 2 deletions Quaver.API/Maps/Parsers/Stepmania/StepFileChartMeasure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ public static List<StepFileChartNoteType> ParseLine(string line)

foreach (var character in line)
{
int.TryParse(character.ToString(), out var value);
notes.Add((StepFileChartNoteType) value);
var value = character switch
{
'0' => StepFileChartNoteType.None,
'1' => StepFileChartNoteType.Normal,
'2' => StepFileChartNoteType.Head,
'3' => StepFileChartNoteType.Tail,
'M' => StepFileChartNoteType.Mine,
_ => StepFileChartNoteType.None
};
notes.Add(value);
}

return notes;
Expand Down
1 change: 1 addition & 0 deletions Quaver.API/Maps/Parsers/Stepmania/StepFileChartNoteType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ public enum StepFileChartNoteType
Normal,
Head,
Tail,
Mine,
}
}
Loading