[Bug]: ACUs that are building do not fire TML when ordered to
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
### Describe the Bug
This code disables the weapons and doesn't react on time to engine signals that the weapon should be enabled, so when the engine stops the unit from building and then checks if it has any TML to fire, it doesn't because they're disabled.
https://github.com/FAForever/fa/blob/fc8037d0bebc7056a0c37e68c4ae45f8b9284fa6/lua/sim/units/ACUUnit.lua#L201-L219
https://github.com/FAForever/fa/blob/fc8037d0bebc7056a0c37e68c4ae45f8b9284fa6/lua/sim/units/ACUUnit.lua#L172-L184
### Reproduce the bug
Upgrade an ACU with TML, load it, and start building a structure. Then give a TML fire command without shift while the unit is building and it won't fire.
As a counterexample, TML SACU works correctly and does fire after issuing a fire command without shift.
```
CreateUnitAtMouse('uel0001', 0, -0.85, 1.97, -2.18294)
CreateUnitAtMouse('xab1401', 0, -0.46, -5.11, -0.00000)
CreateUnitAtMouse('xsl0301_missile', 0, 1.31, 3.14, 0.60447)
```
### Screenshots
_No response_
### Additional context
The code originates from a fix related to auto OC firing while the ACU is reclaiming/building/etc: https://github.com/FAForever/fa/commit/d8d35c71958ebc0eacbcfb312aabdb3b267e4ad3
So those things have to tested in the new fix.
Contributor guide
Assessment
This issue has not been assessed yet.