Commit 38acf9a
authored
Allow mods to easily tune 'Target Hostile Bomb or Bomber' control (#7048)
* Allow mods to easily tune 'Target Hostile Bomb or Bomber' control
The `Target Hostile Bomb or Bomber` control targets bombs or bombers, though in mods may want a way to easily set exactly what this control does while still leveraging the utility of the 'bomb' flag for weapons and/or 'bomber' flag for ships (both of which affect AI behavior in various ways).
For example, in Solaris, Darius wants a way a way to allow players to only target bombs, while still allowing ships to be classified as as 'bomber'. In this case, the 'only bombs' option can be used. This PR adds a `$Behavior for pressing 'Target Hostile Bomb or Bomber' control:` to allow mods to set the behavior to `default` `only bombs` or `only bombers`.
For example, in FotG we want to allow players to target just bombers, as bombs themselves are hard to shoot down (critically though we still want the player to be able to manually target a bomb via 'target object in reticle'. This allows players to prioritize and easily target bombers while allowing skilled pilots to retain the option of manually shooting down bombs if they want an extra challenge. In this case the 'only bomber' option can be used.
Tested and works as expected in all cases.
* update using cleaned up function
* extra alt option for default case
* warning cleanup
* update default message
* whitespace clang
* appease clang with brackets1 parent a0b4ae1 commit 38acf9a
File tree
6 files changed
+113
-60
lines changed- code
- hud
- io
- mod_table
6 files changed
+113
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
| 1029 | + | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1570 | 1570 | | |
1571 | 1571 | | |
1572 | 1572 | | |
1573 | | - | |
| 1573 | + | |
1574 | 1574 | | |
1575 | | - | |
| 1575 | + | |
1576 | 1576 | | |
1577 | | - | |
| 1577 | + | |
1578 | 1578 | | |
1579 | 1579 | | |
1580 | 1580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
2721 | | - | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
2725 | | - | |
2726 | | - | |
2727 | | - | |
2728 | | - | |
2729 | | - | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
2733 | | - | |
2734 | | - | |
2735 | | - | |
2736 | | - | |
2737 | | - | |
2738 | | - | |
2739 | | - | |
2740 | | - | |
2741 | | - | |
2742 | | - | |
2743 | | - | |
2744 | | - | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
2745 | 2739 | | |
2746 | | - | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
2747 | 2743 | | |
2748 | | - | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
2749 | 2749 | | |
2750 | | - | |
2751 | | - | |
2752 | | - | |
2753 | | - | |
2754 | | - | |
2755 | | - | |
2756 | | - | |
2757 | | - | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
2758 | 2757 | | |
2759 | | - | |
| 2758 | + | |
| 2759 | + | |
2760 | 2760 | | |
2761 | | - | |
2762 | | - | |
2763 | | - | |
2764 | | - | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
2765 | 2765 | | |
2766 | | - | |
2767 | | - | |
2768 | | - | |
2769 | | - | |
2770 | | - | |
2771 | | - | |
2772 | | - | |
2773 | | - | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
2774 | 2770 | | |
2775 | | - | |
2776 | | - | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
2777 | 2789 | | |
2778 | 2790 | | |
2779 | 2791 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
| 1284 | + | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
1564 | 1566 | | |
1565 | 1567 | | |
1566 | 1568 | | |
1567 | | - | |
| 1569 | + | |
1568 | 1570 | | |
1569 | 1571 | | |
1570 | 1572 | | |
1571 | | - | |
| 1573 | + | |
1572 | 1574 | | |
1573 | 1575 | | |
1574 | 1576 | | |
1575 | 1577 | | |
1576 | | - | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
1577 | 1607 | | |
1578 | 1608 | | |
1579 | 1609 | | |
| |||
1845 | 1875 | | |
1846 | 1876 | | |
1847 | 1877 | | |
1848 | | - | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
1849 | 1881 | | |
1850 | 1882 | | |
1851 | 1883 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
| |||
188 | 195 | | |
189 | 196 | | |
190 | 197 | | |
191 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
192 | 201 | | |
193 | 202 | | |
194 | 203 | | |
| |||
0 commit comments