Skip to content

Commit

Permalink
Allow the upgrade hotkey to upgrade everything
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 committed Feb 13, 2024
1 parent 7cedaf1 commit 3760ac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/keymap/hotbuild.lua
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,11 @@ end
-- Does support upgrading T1 structures (facs, radars, etc.) that are currently upgrading to T2 to T3 when issued
function buildActionUpgrade()
local selectedUnits = GetSelectedUnits()
local availableOrders, availableToggles, buildableCategories = GetUnitCommandData(selectedUnits)
local result = true

for index, unit in selectedUnits do
local bp = unit:GetBlueprint()
local _, _, buildableCategories = GetUnitCommandDataOfUnit(unit)
-- If upgradeTab[bp.BlueprintId] returns a table, there are two or more possible upgrades, e.g. HQ and
-- support factory. If instead bp.General.UpgradesTo returns a string, then there is only one possible
-- upgrade, e.g. for a radar. For our helper function IssueUpgradeCommand we want a table, hence the { }
Expand Down

0 comments on commit 3760ac2

Please sign in to comment.