From ab99126a7b7e47138e6e8c84bbb03b8a985ba595 Mon Sep 17 00:00:00 2001 From: James Melkonian Date: Thu, 25 Nov 2021 01:32:20 +0000 Subject: [PATCH] Floor merchant cost percentages and display as whole numbers --- CHANGELOG.md | 1 + server/src/sys/agent.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 097039c7f1..2627375115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Avoided black hexagons when bloom is enabled by suppressing NaN/Inf pixels during the first bloom blur pass - Many know water generation problems - Trading over long distances using ghost characters or client-side exploits is no longer possible +- Merchant cost percentages displayed as floored, whole numbers ## [0.11.0] - 2021-09-11 diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index d72c34d17b..7109af6102 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -1328,8 +1328,8 @@ impl<'a> AgentData<'a> { } else { if balance1 > 0.0 { let msg = format!( - "That only covers {:.1}% of my costs!", - balance0 / balance1 * 100.0 + "That only covers {:.0}% of my costs!", + (balance0 / balance1 * 100.0).floor() ); if let Some(tgt_data) = &agent.target { // If talking with someone in particular, "tell" it only to them