Added star difficulty to conditional search filters.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-09-03 21:00:02 -05:00
parent 3214916d60
commit 14948846f5
2 changed files with 3 additions and 1 deletions

View File

@ -155,6 +155,8 @@ public class BeatmapSet {
case "hp": v = beatmap.HPDrainRate; break;
case "bpm": v = beatmap.bpmMax; break;
case "length": v = beatmap.endTime / 1000; break;
case "star":
case "stars": v = Math.round(beatmap.starRating * 100) / 100f; break;
default: return false;
}

View File

@ -45,7 +45,7 @@ public class BeatmapSetList {
/** Search pattern for conditional expressions. */
private static final Pattern SEARCH_CONDITION_PATTERN = Pattern.compile(
"(ar|cs|od|hp|bpm|length)(=|==|>|>=|<|<=)((\\d*\\.)?\\d+)"
"(ar|cs|od|hp|bpm|length|stars?)(=|==|>|>=|<|<=)((\\d*\\.)?\\d+)"
);
/** List containing all parsed nodes. */