From 005a5501d86b5bc7e6bfdcec8532d07cb610afec Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 13 Feb 2025 00:06:06 +0900 Subject: [PATCH] . --- exp_legacy/module/modules/gui/production.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/exp_legacy/module/modules/gui/production.lua b/exp_legacy/module/modules/gui/production.lua index 85f239de..f7a6d92d 100644 --- a/exp_legacy/module/modules/gui/production.lua +++ b/exp_legacy/module/modules/gui/production.lua @@ -39,8 +39,7 @@ local function format_n(amount) break end end - local scaled_value = amount / scale - local formatted = string.format("%.2f", scaled_value) + local formatted = string.format("%.2f", amount / scale) -- Split into integer and fractional parts local integer_part, fractional_part = formatted:match("^(%-?%d+)%.(%d+)$") integer_part = integer_part or formatted @@ -50,10 +49,6 @@ local function format_n(amount) integer_part = integer_part:gsub("^,", ""):gsub("-,", "-") -- Handle numbers below 1000 without suffix if scale == 1 then - -- Remove trailing .00 for whole numbers - if fractional_part == "00" then - return integer_part - end return string.format("%s.%s", integer_part, fractional_part) end -- Combine parts and add suffix