Quantcast

Was showing a negative number for resource over the cap

Alar of Daggerspine [10-30-15 - 22:43]
Was showing a negative number for resource over the cap

Signed-off-by: Alar of Daggerspine <alar@aspide.it>
Filename
MissionCompletion.lua
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