Describe the Bug
|
if curEnh.Back == 'TacticalMissile' or curEnh.Back == 'Missile' then |
|
return string.format('%d / %d', info.tacticalSiloStorageCount, info.tacticalSiloMaxStorageCount) |
|
, 'tactical' |
|
elseif curEnh.Back == 'TacticalNukeMissile' then |
|
return string.format('%d / %d', info.nukeSiloStorageCount, info.nukeSiloMaxStorageCount), |
|
'strategic' |
|
else |
These enhancement slots and names are hardcoded, which will cause issues for modded units that probably don't know about this convention.
Reproduce the bug
Code a missile enhancement that uses a different slot or enhancement name.
Screenshots
No response
Additional context
Can be fixed by first searching through weapons for tactical/nuke weapons with silo ammo capacity and an EnabledByEnhancement field, then checking if the unit has the required enhancement for that weapon.
Describe the Bug
fa/lua/ui/game/unitview.lua
Lines 230 to 236 in f2448be
These enhancement slots and names are hardcoded, which will cause issues for modded units that probably don't know about this convention.
Reproduce the bug
Code a missile enhancement that uses a different slot or enhancement name.
Screenshots
No response
Additional context
Can be fixed by first searching through weapons for tactical/nuke weapons with silo ammo capacity and an
EnabledByEnhancementfield, then checking if the unit has the required enhancement for that weapon.