FAForever / FAForever/fa

[Bug]: Unitview.lua hardcodes missile enhancement slots

Open
#6,951 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.