Automatically enable / disable properties of units that are produced by factories
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
Description
-----------
This feature is inspired by https://github.com/FAForever/fa/pull/5495
When a unit is created there are properties from the factory that the unit can inherit. There are two examples that I am aware of:
- A unit can inherit the fire state of the factory
- A unit can inherit the control group of the factory
In this issue I propose we extend this feature through toggles. The reason for toggles as that they can be adjusted by the UI, and therefore we can update the toggle to match what is in the preference file of a user. A similar approach is done in https://github.com/FAForever/fa/issues/4524 by @haifron to automatically enable repeat build for a factory when you select it for the first time, except that it doesn't use a toggle 😃
Once the toggle exists we can interpret the toggle during the `OnStopBuild` event and update the properties of the unit that we're building. As an example of a few properties that may be interesting:
- (1) Automatically enable or disable the intel of a unit if it consumes maintenance (Cybran Mole, ASF, Strategic Bomber, ...)
- (2) Automatically enable or disable the construction of (strategic) missiles (strategic submarines, Seraphim battleship)
- (3) Automatically enable or disable the shield of a unit if it consumes maintenance
And I'm sure we can think of other examples in the (near) future. The goal of these changes is to reduce the 'initial maintenance' or the 'oh shit, I forgot' type of issues that players can perceive
Contributor guide
Assessment
This issue has not been assessed yet.