From 9e19a800ee507b7f6bd2461b56a8a095abde382a Mon Sep 17 00:00:00 2001 From: giantcavespider Date: Sun, 24 Nov 2024 17:16:21 -0600 Subject: [PATCH] fix misleading hunger information --- interface/scripted/statWindow/extraStatsWindow.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/interface/scripted/statWindow/extraStatsWindow.lua b/interface/scripted/statWindow/extraStatsWindow.lua index 050140034a9..000a6f8cd2d 100644 --- a/interface/scripted/statWindow/extraStatsWindow.lua +++ b/interface/scripted/statWindow/extraStatsWindow.lua @@ -48,12 +48,9 @@ function update() elseif type == "food" then local foodVal=status.isResource("food") and status.resourceMax("food") or 0 if foodVal~=0 then + if value > 0 then value=0 end value=math.abs(shorten(foodVal/(value*60.0))) - if value % 1 == 0 then - widget.setText(stat, tostring(math.floor(value))) - else - widget.setText(stat, tostring(value)) - end + widget.setText(stat, tostring(value)) else widget.setText(stat, "---") end