Skip to content

Commit 337fc32

Browse files
committed
feat: include ppysb features
1 parent 8f9d0e4 commit 337fc32

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ crate-type = ["cdylib"]
1515
[dependencies]
1616
pyo3 = { version = "0.24", features = ["extension-module", "macros"] }
1717
rosu-mods = { version = "0.3.0", default-features = false, features = ["serde"] }
18-
rosu-pp = { version = "3.0.0", features = ["sync"] }
18+
rosu-pp = { git = "https://github.com/ppy-sb/rosu-pp", features = ["sync"] }
1919
serde = { version = "1.0.203" }
2020

2121
[profile.release]

src/attributes/difficulty.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ define_class! {
2222
pub aim_difficult_strain_count: f64?,
2323
pub speed_difficult_strain_count: f64?,
2424
pub hp: f64?,
25+
pub cs: f64?,
2526
pub n_circles: u32?,
2627
pub n_sliders: u32?,
2728
pub n_large_ticks: u32?,
@@ -60,6 +61,7 @@ impl From<OsuDifficultyAttributes> for PyDifficultyAttributes {
6061
ok_hit_window,
6162
meh_hit_window,
6263
hp,
64+
cs,
6365
n_circles,
6466
n_sliders,
6567
n_large_ticks,
@@ -85,6 +87,7 @@ impl From<OsuDifficultyAttributes> for PyDifficultyAttributes {
8587
ok_hit_window: Some(ok_hit_window),
8688
meh_hit_window: Some(meh_hit_window),
8789
hp: Some(hp),
90+
cs: Some(cs),
8891
n_circles: Some(n_circles),
8992
n_sliders: Some(n_sliders),
9093
n_large_ticks: Some(n_large_ticks),
@@ -204,6 +207,7 @@ impl TryFrom<PyDifficultyAttributes> for DifficultyAttributes {
204207
aim_difficult_strain_count,
205208
speed_difficult_strain_count,
206209
hp,
210+
cs,
207211
n_circles,
208212
n_sliders,
209213
n_large_ticks,
@@ -241,6 +245,7 @@ impl TryFrom<PyDifficultyAttributes> for DifficultyAttributes {
241245
Some(ok_hit_window),
242246
Some(meh_hit_window),
243247
Some(hp),
248+
Some(cs),
244249
Some(n_circles),
245250
Some(n_sliders),
246251
Some(n_large_ticks),
@@ -259,6 +264,7 @@ impl TryFrom<PyDifficultyAttributes> for DifficultyAttributes {
259264
ok_hit_window,
260265
meh_hit_window,
261266
hp,
267+
cs,
262268
n_circles,
263269
n_sliders,
264270
n_large_ticks,
@@ -278,6 +284,7 @@ impl TryFrom<PyDifficultyAttributes> for DifficultyAttributes {
278284
ok_hit_window,
279285
meh_hit_window,
280286
hp,
287+
cs,
281288
n_circles,
282289
n_sliders,
283290
n_large_ticks,

src/strains.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ define_class! {
1414
pub mode: PyGameMode!,
1515
pub section_length: f64!,
1616
pub aim: DoubleList?,
17+
pub relax: DoubleList?,
1718
pub aim_no_sliders: DoubleList?,
1819
pub speed: DoubleList?,
1920
pub flashlight: DoubleList?,
@@ -31,6 +32,7 @@ impl From<OsuStrains> for PyStrains {
3132
fn from(strains: OsuStrains) -> Self {
3233
let OsuStrains {
3334
aim,
35+
relax,
3436
aim_no_sliders,
3537
speed,
3638
flashlight,
@@ -40,6 +42,7 @@ impl From<OsuStrains> for PyStrains {
4042
mode: PyGameMode::Osu,
4143
section_length: OsuStrains::SECTION_LEN,
4244
aim: Some(aim),
45+
relax: Some(relax),
4346
aim_no_sliders: Some(aim_no_sliders),
4447
speed: Some(speed),
4548
flashlight: Some(flashlight),

0 commit comments

Comments
 (0)