Edit by Meridian: original title was: [Suggestion] Add 'reloadingDisabled' to Craft Weapons
Motivation:
When using craft weapons that use clips (for example STR_CANNON using clips with 50 shots), entire clips will be reloaded even if only one shot has been fired. For example ammo count 199 will turn to 200 using a x50 item. Currently it's possible to click on the weapon in the craft screen to disable a weapon. This will do two things: It will disable the weapon by default for dogfighting and needs to be enabled on a per dogfight basis. Also it will stop the weapon from reloading. This suggestion is about turning the disabled state for weapons in dogfights as well as the reloading part into two different things.
---
Proposed Solution:
By adding a bool called 'reloadingDisabled' the currently existing bool 'disabled' will be limited to enable/disable weapons in the dogfight screen. Similar to the dogfight screen the weapon icon will change its palette (preferably looking 'inverted' or better said as it looks in the dogfighting screen). The 'reloadingDisabled' flag will take care of the reloading part and use the already existing *.
This will create four states:
Load in Base and Enabled for Dogfight (Standard Behaviour - * is not shown & Icon is not swapped)
Load and Disabled (Preferred use case for Missiles - * is not shown & Icon is swapped)
Don't load and Enabled (Preferred use case for Cannons with ammo packs x50 or other numbers - * is shown & Icon is not swapped
Don't load and Disabled (Previous second Behaviour - * is shown & Icon is swapped)
I have tried to implement this. See the
commit.
The palette swap does not use the correct palette/color combination as of now. Maybe you know which one to use. If not I can play around with the values.
The commit will turn the single clicking action into a left and a right click. Left click alters the disabled bool, right click the reloadingDisabled one.
I have played with it for a few days and it seems to work alright and as intended.
As a side effect the window "Not enough {ammo} to rearm {craft} at {base}" will not pop up, if one decides to keep the base inventory empty to prevent reloads.
Another side effect is that special missiles can be disabled by default and only used against specific UFOs. The player will not have to remember reloading the special missile weapon assuming they use the 'disabled' flag. Of course the player will have to remember the reload of the cannons.
---
Alternative solution would probably to only load full clips or keep the remainder stored as information in each base for each ammo type.