diff --git a/LuaRules/Gadgets/unit_supply_requirement.lua b/LuaRules/Gadgets/unit_supply_requirement.lua index 039fea60e..c8acc2ff0 100644 --- a/LuaRules/Gadgets/unit_supply_requirement.lua +++ b/LuaRules/Gadgets/unit_supply_requirement.lua @@ -34,7 +34,7 @@ local spSetTeamRulesParam = Spring.SetTeamRulesParam -------------------------------------------------------------------------------- -- Configuration -local SUPPLY_CAP = tonumber(Spring.GetModOptions().supplycap) or 200 +local SUPPLY_CAP = tonumber(Spring.GetModOptions().supplycap) or 400 local INTRINSIC_SUPPLY = tonumber(Spring.GetModOptions().intrinsicsupply) or 0 -------------------------------------------------------------------------------- diff --git a/LuaUI/Widgets_Evo/gui_resourceBar.lua b/LuaUI/Widgets_Evo/gui_resourceBar.lua index 0755d6eb1..6b12d2442 100644 --- a/LuaUI/Widgets_Evo/gui_resourceBar.lua +++ b/LuaUI/Widgets_Evo/gui_resourceBar.lua @@ -388,6 +388,7 @@ function generateDisplayList2() local metalIncomeColor = green local energyPosNeg = "+" local metalPosNeg = "+" + local supplyAvailableColor = white if displayList2 ~= nil then gl.DeleteList(displayList2) end @@ -450,7 +451,15 @@ function generateDisplayList2() supplyUsedColor = red end end - supplyStr = supplyUsedColor .. su .. white .. "/" .. sm .. " " + if sm < maxSupply * 0.50 then + supplyAvailableColor = orange + elseif sm < maxSupply then + supplyAvailableColor = yellow + elseif sm == maxSupply then + supplyAvailableColor = green + end + + supplyStr = supplyUsedColor .. su .. white .. "/" .. supplyAvailableColor .. sm .. " " else supplyStr = white .. su .. "/" .. sm .. " (" .. orange .. "±" .. tostring(sm - su) .. white .. "/" .. green .. maxSupply .. white .. ") " end