mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-20 01:08:55 +00:00
Tweak pp if-fc
This commit is contained in:
parent
fde913ebc4
commit
1c59873a8f
1 changed files with 12 additions and 8 deletions
|
@ -277,14 +277,18 @@ pub(crate) fn score_embed<'a>(
|
||||||
})
|
})
|
||||||
.map(|pp| format!("{:.2}pp [?]", pp))
|
.map(|pp| format!("{:.2}pp [?]", pp))
|
||||||
});
|
});
|
||||||
let pp = mode
|
let pp = if !s.perfect {
|
||||||
.to_oppai_mode()
|
mode.to_oppai_mode()
|
||||||
.and_then(|op| {
|
.and_then(|op| {
|
||||||
content
|
content
|
||||||
.get_pp_from(oppai_rs::Combo::FC(0), accuracy as f32, Some(op), s.mods)
|
.get_pp_from(oppai_rs::Combo::FC(0), accuracy as f32, Some(op), s.mods)
|
||||||
.ok()
|
.ok()
|
||||||
})
|
})
|
||||||
.and_then(|value| pp.map(|original| format!("{} ({:.2}pp if FC?)", original, value)));
|
.filter(|&v| s.pp.map(|origin| origin < v as f64).unwrap_or(false))
|
||||||
|
.and_then(|value| pp.map(|original| format!("{} ({:.2}pp if FC?)", original, value)))
|
||||||
|
} else {
|
||||||
|
pp
|
||||||
|
};
|
||||||
let score_line = pp
|
let score_line = pp
|
||||||
.map(|pp| format!("{} | {}", &score_line, pp))
|
.map(|pp| format!("{} | {}", &score_line, pp))
|
||||||
.unwrap_or(score_line);
|
.unwrap_or(score_line);
|
||||||
|
|
Loading…
Add table
Reference in a new issue