From 865dadc70e008998b1bb3fafc5228dff44e977f6 Mon Sep 17 00:00:00 2001 From: Octav Sandulescu Date: Fri, 18 Mar 2016 05:06:27 +0000 Subject: [PATCH] Zero-pad the fractional part of 4-digit evo factor --- VERSION | 2 +- value_sensors/evolution_factor.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 5f749c1..75274d8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.11 +0.4.12 diff --git a/value_sensors/evolution_factor.lua b/value_sensors/evolution_factor.lua index 772ea18..2faebba 100644 --- a/value_sensors/evolution_factor.lua +++ b/value_sensors/evolution_factor.lua @@ -10,6 +10,7 @@ function sensor:get_line(player) local fractional_component = math.floor((percent_evo_factor - whole_number) * 10) if self.settings.extra_precision then fractional_component = math.floor((percent_evo_factor - whole_number) * 10000) + return {self.format_key, string.format("%d.%04d%%", whole_number, fractional_component)} end return {self.format_key, string.format("%d.%d%%", whole_number, fractional_component)}