Added star difficulty to conditional search filters.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
3214916d60
commit
14948846f5
|
@ -155,6 +155,8 @@ public class BeatmapSet {
|
||||||
case "hp": v = beatmap.HPDrainRate; break;
|
case "hp": v = beatmap.HPDrainRate; break;
|
||||||
case "bpm": v = beatmap.bpmMax; break;
|
case "bpm": v = beatmap.bpmMax; break;
|
||||||
case "length": v = beatmap.endTime / 1000; break;
|
case "length": v = beatmap.endTime / 1000; break;
|
||||||
|
case "star":
|
||||||
|
case "stars": v = Math.round(beatmap.starRating * 100) / 100f; break;
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class BeatmapSetList {
|
||||||
|
|
||||||
/** Search pattern for conditional expressions. */
|
/** Search pattern for conditional expressions. */
|
||||||
private static final Pattern SEARCH_CONDITION_PATTERN = Pattern.compile(
|
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. */
|
/** List containing all parsed nodes. */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user