Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion luaui/Widgets/unit_smart_select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ for udid, udef in pairs(UnitDefs) do
local building = (isMobile == false)
local combat = (not builder) and isMobile and (#udef.weapons > 0)

if string.find(udef.name, 'armspid') or string.find(udef.name, 'leginfestor') then
local selectableAsCombat = udef.customParams and udef.customParams.selectable_as_combat_unit
if selectableAsCombat then
Comment on lines +93 to +94
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customParams is never nil

Suggested change
local selectableAsCombat = udef.customParams and udef.customParams.selectable_as_combat_unit
if selectableAsCombat then
if udef.customParams.selectable_as_combat_unit then

builder = false
end

combatFilter[udid] = combat
builderFilter[udid] = builder
buildingFilter[udid] = building
Expand Down
1 change: 1 addition & 0 deletions units/ArmBots/T2/armspid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ return {
model_author = "Kaiser",
normaltex = "unittextures/Arm_normal.dds",
paralyzemultiplier = 0.2,
selectable_as_combat_unit = true,
subfolder = "ArmBots/T2",
techlevel = 2,
unitgroup = "emp",
Expand Down
1 change: 1 addition & 0 deletions units/Legion/Bots/T2 Bots/leginfestor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ return {
model_author = "Zath (model), Tuerk (animation)",
normaltex = "unittextures/leg_normal.dds",
paralyzemultiplier = 0.2,
selectable_as_combat_unit = true,
subfolder = "CorBots/T2",
techlevel = 2,
selectionscalemult = 1,
Expand Down
Loading