[Bug]: Unitview.lua hardcodes missile enhancement slots
Open
type: bug
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
### Describe the Bug
https://github.com/FAForever/fa/blob/f2448bebad7fced8b4f72b07cc7fc115de72405f/lua/ui/game/unitview.lua#L230-L236
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.
Contributor guide
Assessment
This issue has not been assessed yet.