Cycle expansion
Overhaul to the "cycle" weapon flag. Establishes the following firing pattern options for weapons:
- STANDARD: fires all bank firepoints simultaneously. Retail behavior.
- CYCLE FORWARD: fires
$shotsfirepoints at a time, starting at firepoint 0 and incrementing from there. Same behavior as old "cycle" flag. - CYCLE REVERSE: same as cycle-forward, but backwards.
- RANDOM EXHAUSTIVE: fires each firepoint in the bank once, in a random order,
$shotsat a time, then starts over. - RANDOM NONREPEATING: fires
$shotsrandomly-selected firepoints at a time, with the restriction that the same firepoint will never fire twice in a row (unless that's unavoidable because$shotsis greater than number-of-firepoints/2). - RANDOM REPEATING: fires
$shotsrandomly-selected firepoints at a time, no restrictions.
The "cycle" flag still exists and functions (sets weapon to use CYCLE FORWARD), but should probably be deprecated. A "cycle multishot" optional parameter is added, which allows weapons using non-standard firing patterns to exhibit shotgun behavior.
On a ship that has the "dynamic primary linking" flag, any combination of firing patterns can be listed as allowed for that ship. A new control allows the player to cycle through firing patterns, same as how an existing one allows cycling through fire rates. By default, only CYCLE FORWARD is allowed, preserving the existing dyn-primary-linking behavior.
If firepoints are rendered on the HUD, the brightening of the next firepoints to fire works correctly, even for random patterns. Unfortunately, there is no HUD element indicating which pattern is active. That should probably be fixed, but is outside the scope of this PR.