Add decimal points

This commit is contained in:
ErrorNoInternet 2023-02-04 18:32:15 +08:00
parent affac858b7
commit d4fb8be963
Signed by untrusted user who does not match committer: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ pub async fn process_command(
let bot_status = state.bot_status.lock().unwrap().to_owned();
let metadata = client.metadata();
return format!(
"Health: {:.1}/20, Food: {}/20, Saturation: {:.1}/20, Score: {}, Air Supply: {}",
"Health: {:.1}/20.0, Food: {}/20, Saturation: {:.1}/20.0, Score: {}, Air Supply: {}",
bot_status.health,
bot_status.food,
bot_status.saturation,

View File

@ -569,7 +569,7 @@ async fn handle(mut client: Client, event: Event, state: Arc<State>) -> anyhow::
"msg {} {}",
player,
format!(
"Health: {:.1}/20, Food: {}/20, Saturation: {:.1}/20",
"Health: {:.1}/20.0, Food: {}/20, Saturation: {:.1}/20.0",
packet.health, packet.food, packet.saturation
),
))