Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
77243b7
Add missile widget from ZeroK-widgets
claude Jul 1, 2026
91c1f7b
Remove team messaging feature from missile widget
claude Jul 1, 2026
e7ecd5e
Add slow missile (Zeno) to command center widget
claude Jul 1, 2026
31f64c1
Add Missiles tab to command menu above Orders tab
claude Jul 1, 2026
b84a180
Remove floating window UI from missile widget
claude Jul 1, 2026
4e7be09
Add safety checks to prevent crashes after missile launch
claude Jul 1, 2026
dd3fe28
Hide Missiles tab until missile units are built
claude Jul 1, 2026
6d7a261
Add missile count display to command buttons
claude Jul 1, 2026
3d83d6b
Add missile build progress display to command buttons
claude Jul 1, 2026
d5f3a7d
Add visual progress bar support for missile commands
claude Jul 1, 2026
5606e56
Consolidate progress bar logic into missile widget
claude Jul 1, 2026
dd43a39
Add proper visual progress bar support via helper widget
claude Jul 1, 2026
608fac6
Merge progress bar logic into missile widget
claude Jul 1, 2026
3437dab
Add tab badge support with missile unit icon and count
claude Jul 1, 2026
da09486
Implement all 5 widget improvements
claude Jul 1, 2026
7173b99
Fix #4: Centralize missile command IDs to prevent duplication
claude Jul 1, 2026
812e693
Fix remaining 7 code review issues
claude Jul 1, 2026
908d1bb
Fix widget name: 'missle' → 'missile'
claude Jul 1, 2026
f083735
Improve missile configuration with metadata dictionary
claude Jul 1, 2026
757d44d
Refactor missile config: rename missileCmdIDs to missileCmds and embe…
claude Jul 1, 2026
5a70f50
Fix missile widget: crashes, tab layout, tooltips, count/progress bar
amnykon Jul 1, 2026
40349a3
Fix stockpile build progress source for missile buttons
amnykon Jul 1, 2026
fe9a8e8
Keep missiles tab visible and usable with no selection
amnykon Jul 1, 2026
1bfac14
Add second tab row for the missiles tab
amnykon Jul 2, 2026
afe7a9e
Fix missile launch order and command descriptor
amnykon Jul 2, 2026
7f56fb6
Missiles tab badge: per-type icons with count and build progress
amnykon Jul 2, 2026
dbfbda8
Remove misleading (N) hotkey label from tabs without their own hotkey
amnykon Jul 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 75 additions & 1 deletion LuaUI/Configs/integral_menu_config.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
local buildCmdFactory, buildCmdEconomy, buildCmdDefence, buildCmdSpecial, buildCmdUnits, cmdPosDef, factoryUnitPosDef = include("Configs/integral_menu_commands_processed.lua", nil, VFS.RAW_FIRST)

-- Row 1: Trinity and Reef (standalone, not silo missiles).
-- Row 2: the missile silo's missiles, in the silo's buildoptions order
-- (tacnuke, seismic, empmissile, napalmmissile, missileslow).
local missileCmds = {
{id = 39615, name = "Trinity", icon = "staticnuke", col = 1, row = 1, tooltip = "Launch Trinity (Strategic Nuke)\nLong-range nuclear missile."},
{id = 39614, name = "Reef Missile", icon = "shipcarrier", col = 2, row = 1, tooltip = "Launch Disarm Missile\nDisables units temporarily."},
{id = 39610, name = "EOS", icon = "tacnuke", col = 1, row = 2, tooltip = "Launch EOS (Tactical Nuke)\nTactical nuclear missile with high damage."},
{id = 39611, name = "Seismic", icon = "seismic", col = 2, row = 2, tooltip = "Launch Seismic\nArea denial seismic missile, slows units."},
{id = 39612, name = "Shockley", icon = "empmissile", col = 3, row = 2, tooltip = "Launch Shockley (EMP)\nElectromagnetic pulse missile disables units."},
{id = 39613, name = "Inferno", icon = "napalmmissile", col = 4, row = 2, tooltip = "Launch Inferno (Napalm)\nNapalm missile with persistent damage."},
{id = 39616, name = "Zeno", icon = "missileslow", col = 5, row = 2, tooltip = "Launch Zeno (Slow Missile)\nSlow homing missile with lingering damage."},
}

local missileCmdPos = {}
for _, missile in ipairs(missileCmds) do
missileCmdPos[missile.id] = {col = missile.col, row = missile.row}
end

local function isMissileCommand(cmdID)
return missileCmdPos[cmdID] ~= nil
end

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Tooltips
Expand Down Expand Up @@ -476,15 +498,67 @@ local factoryButtonLayoutOverride = {
}
}

for _, missile in ipairs(missileCmds) do
local unitDef = UnitDefNames[missile.icon]
local icon = unitDef and ("#" .. unitDef.id) or (imageDir .. 'Bold/attack.png')
commandDisplayConfig[missile.id] = {
texture = icon,
tooltip = missile.tooltip,
drawName = true, -- show the stockpile count / build progress string (set by the missile widget)
}
end

local function hasMissileUnits()
local teamUnits = Spring.GetTeamUnits(Spring.GetMyTeamID()) or {}
local missileUnitNames = {
["tacnuke"] = true,
["subtacmissile"] = true,
["seismic"] = true,
["empmissile"] = true,
["napalmmissile"] = true,
["missileslow"] = true,
["shipcarrier"] = true,
["staticnuke"] = true,
["staticmissilesilo"] = true,
}
for _, unitID in ipairs(teamUnits) do
local unitDefID = Spring.GetUnitDefID(unitID)
if unitDefID then
local unitDef = UnitDefs[unitDefID]
if unitDef and missileUnitNames[unitDef.name] then
return true
end
end
end
return false
end

local commandPanels = {
{
humanName = "Missiles",
name = "missiles",
inclusionFunction = function(cmdID)
if not hasMissileUnits() then return false end
local pos = missileCmdPos[cmdID]
return pos ~= nil, pos
end,
loiterable = true,
alwaysShowTab = true,
topRow = true,
buttonLayoutConfig = buttonLayoutConfig.command,
badgeIconsWG = "missileActiveIcons",
gridHotkeys = true,
returnOnClick = "orders",
},
{
humanName = "Orders",
name = "orders",
inclusionFunction = function(cmdID, factoryUnitDefID, forceOrdersCommand, unitMobilePanelSize)
return ((cmdID >= 0 or unitMobilePanelSize == 1) and
not buildCmdEconomy[cmdID] and not buildCmdFactory[cmdID] and
not buildCmdSpecial[cmdID] and not buildCmdDefence[cmdID] and
not plateCommandID[cmdID])
not plateCommandID[cmdID] and
not isMissileCommand(cmdID))
end,
loiterable = true,
buttonLayoutConfig = buttonLayoutConfig.command,
Expand Down
Loading