From 2d6c094eb64311ce9e99d1c3fa0a139d2ed36a2c Mon Sep 17 00:00:00 2001 From: Alar of Daggerspine Date: Fri, 30 Oct 2015 23:43:24 +0100 Subject: [PATCH] Was showing a negative number for resource over the cap Signed-off-by: Alar of Daggerspine --- MissionCompletion.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MissionCompletion.lua b/MissionCompletion.lua index 060272d..7edcecc 100644 --- a/MissionCompletion.lua +++ b/MissionCompletion.lua @@ -145,8 +145,8 @@ function module:MissionComplete(this,button,skiprescheck) print(name,current,qt,cap) --@end-debug@ current=current+qt - if current+qt > (cap*0.8) then - message=message.."\n"..format(L["Capped %1$s. Spend at least %2$d of them"],name,current-cap) + if current+qt > cap then + message=message.."\n"..format(L["Capped %1$s. Spend at least %2$d of them"],name,current+qt-cap) stop =true end end -- 1.7.9.5