Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CookieNoob authored and aeoncleanse committed Nov 27, 2017
1 parent e4c4da4 commit be40710
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lua/ui/game/unitview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ end

local statFuncs = {
function(info)
if info.massProduced > 0 or info.massConsumed > 0 then
local massUsed = info.massConsumed
if info.massRequested > 0 then
massUsed = info.massRequested
end
local massUsed = info.massConsumed
if info.massRequested > 0 then
massUsed = info.massRequested
end
if info.massProduced > 0 or massUsed > 0 then
return string.format('%+d', math.ceil(info.massProduced - massUsed)), UIUtil.UIFile('/game/unit_view_icons/mass.dds'), '00000000'
elseif info.armyIndex + 1 ~= GetFocusArmy() and info.kills == 0 and info.shieldRatio <= 0 then
local armyData = GetArmiesTable().armiesTable[info.armyIndex+1]
Expand All @@ -105,11 +105,11 @@ local statFuncs = {
end
end,
function(info)
if info.energyProduced > 0 or info.energyConsumed > 0 then
local energyUsed = info.energyConsumed
if info.energyRequested > 0 then
energyUsed = info.energyRequested
end
local energyUsed = info.energyConsumed
if info.energyRequested > 0 then
energyUsed = info.energyRequested
end
if info.energyProduced > 0 or energyUsed > 0 then
return string.format('%+d', math.ceil(info.energyProduced - energyUsed))
else
return false
Expand Down

0 comments on commit be40710

Please sign in to comment.