Skip to content

Commit 3296898

Browse files
authored
Merge pull request #21 from johnb432/dev
1.3.10.0
2 parents 2373980 + bbaaf35 commit 3296898

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+613
-419
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
releases/*
22
keys/*
33
*.biprivatekey
4+
.hemttprivatekey
45
.hemttout

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Changelog for AIMEE 7.2.2026
2+
3+
1.3.10.0
4+
- Added search light interactions to ground vehicles.
5+
- Added 4 copilot-related controls: 'Take Controls', 'Release Controls', 'Lock Controls' and 'Unlock Controls'.
6+
17
# Changelog for AIMEE 27.9.2025
28

39
1.3.9.0

addons/change_ammo/addon.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ enabled = true
33

44
[binarize]
55
enabled = true
6-
7-
[asc]
8-
enabled = true

addons/change_ammo/functions/fnc_loadMagazine.sqf

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* None
1717
*
1818
* Example:
19-
* [vehicle player, vehicle player, [_weapon, _muzzle, _magazine, _turret]] call AIMEE_change_ammo_fnc_loadMagazine
19+
* [vehicle player, vehicle player, [currentWeapon vehicle player, currentMuzzle vehicle player, currentMagazine vehicle player, vehicle player unitTurret player]] call AIMEE_change_ammo_fnc_loadMagazine
2020
*
2121
* Public: No
2222
*/
@@ -27,16 +27,8 @@ _args params ["_weapon", "_muzzle", "_magazine", "_turret"];
2727
// Don't change mags for currently unselected weapons
2828
if (((weaponState [_target, _turret]) select 1) != _muzzle) exitWith {};
2929

30-
private _magazinesAllTurrets = [];
31-
3230
// Get magazines that are of the correct type; Exclude empty mags
33-
{
34-
_x params ["_xMag", "_xTurret", "_xAmmo"];
35-
36-
if ((_xMag == _magazine) && {_xTurret isEqualTo _turret} && {_xAmmo > 0}) then {
37-
_magazinesAllTurrets pushBack _x;
38-
};
39-
} forEach (magazinesAllTurrets _target);
31+
private _magazinesAllTurrets = (magazinesAllTurrets _target) select {_x params ["_xMag", "_xTurret", "_xAmmo"]; (_xMag == _magazine) && {_xTurret isEqualTo _turret} && {_xAmmo > 0}};
4032

4133
// Get count of rounds in magazines, then select maximum
4234
private _magazinesCount = _magazinesAllTurrets apply {_x select 2};

addons/change_ammo/functions/fnc_magazinesUnitMenus.sqf

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,26 @@
77
* 0: Unit <OBJECT>
88
*
99
* Return Value:
10-
* Modified interaction menu <ARRAY>
10+
* Interaction menu <ARRAY>
1111
*
1212
* Example:
1313
* player call AIMEE_change_ammo_fnc_magazinesUnitMenus
1414
*
1515
* Public: No
1616
*/
1717

18-
(weaponState _this) params ["_weapon", "_muzzle", "", "_magazine"];
18+
params ["_unit"];
19+
20+
(weaponState _unit) params ["_weapon", "_muzzle", "", "_magazine"];
1921

2022
// Returns case correct magazines
21-
private _magazines = (magazines [_this, false]) call CBA_fnc_getArrayElements;
23+
private _magazines = (magazines [_unit, false]) call CBA_fnc_getArrayElements;
2224

23-
if (_magazines isEqualTo []) exitWith {[]};
25+
if (_magazines isEqualTo []) exitWith {
26+
[] // return
27+
};
2428

25-
private _compatibleMagazines = compatibleMagazines [_weapon, _muzzle] - [_magazine];
29+
private _compatibleMagazines = (compatibleMagazines [_weapon, _muzzle]) - [_magazine];
2630
private _class = "";
2731
private _config = configNull;
2832
private _cfgMagazines = configFile >> "CfgMagazines";
@@ -32,23 +36,25 @@ for "_i" from 0 to (count _magazines) - 2 step 2 do {
3236
_class = _magazines select _i;
3337

3438
// Find compatible magazines
35-
if (_class in _compatibleMagazines) then {
36-
_config = _cfgMagazines >> _class;
37-
38-
_menus pushBack [
39-
[
40-
format [QGVAR(magazine_%1), _class], // Action name
41-
format [GVAR(numMagazines), getText (_config >> "displayName"), _magazines select (_i + 1)], // Name of action shown in menu
42-
getText (_config >> "picture"), // Icon
43-
{_player reload (_this select 2)}, // Statement
44-
{true}, // Condition
45-
nil,
46-
[_muzzle, _class] // Action parameters
47-
] call ace_interact_menu_fnc_createAction,
48-
[],
49-
_this
50-
];
39+
if !(_class in _compatibleMagazines) then {
40+
continue;
5141
};
42+
43+
_config = _cfgMagazines >> _class;
44+
45+
_menus pushBack [
46+
[
47+
format [QGVAR(magazine_%1), _class], // Action name
48+
format [GVAR(numMagazines), getText (_config >> "displayName"), _magazines select (_i + 1)], // Name of action shown in menu
49+
getText (_config >> "picture"), // Icon
50+
{_player reload (_this select 2)}, // Statement
51+
{true}, // Condition
52+
nil,
53+
[_muzzle, _class] // Action parameters
54+
] call ace_interact_menu_fnc_createAction,
55+
[],
56+
_unit
57+
];
5258
};
5359

54-
_menus
60+
_menus // return

addons/change_ammo/functions/fnc_magazinesVehicleMenus.sqf

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* 1: Vehicle <OBJECT>
99
*
1010
* Return Value:
11-
* Modified interaction menu <ARRAY>
11+
* Interaction menu <ARRAY>
1212
*
1313
* Example:
1414
* [player, vehicle player] call AIMEE_change_ammo_fnc_magazinesVehicleMenus
@@ -19,40 +19,49 @@
1919
params ["_unit", "_target"];
2020

2121
private _turret = _target unitTurret _unit;
22-
(weaponState [_target, _turret]) params ["_weapon", "_muzzle", "", "_magazine"];
2322

24-
// Do not allow menu creation for vanilla autocannons that use different firemodes to switch ammunition types instead of magazines
25-
if (_weapon in ["autocannon_40mm_CTWS", "autocannon_30mm_CTWS", "autocannon_30mm", "ACE_cannon_20mm_Rh202"]) exitWith {[]};
23+
if (_turret isEqualTo []) exitWith {
24+
[] // return
25+
};
26+
27+
(weaponState [_target, _turret]) params ["_weapon", "_muzzle", "", "_magazine"];
2628

2729
// Returns case correct magazines
28-
private _allAvailableMags = (_target magazinesTurret [_turret, false]) call CBA_fnc_getArrayElements;
29-
private _compatibleMags = compatibleMagazines [_weapon, _muzzle] - [_magazine];
30+
private _magazines = (_target magazinesTurret [_turret, false]) call CBA_fnc_getArrayElements;
31+
32+
if (_magazines isEqualTo []) exitWith {
33+
[] // return
34+
};
35+
36+
private _compatibleMags = (compatibleMagazines [_weapon, _muzzle]) - [_magazine];
3037
private _menus = [];
3138
private _class = "";
3239
private _config = "";
3340
private _cfgMagazines = configFile >> "CfgMagazines";
3441

35-
for "_i" from 0 to (count _allAvailableMags) - 2 step 2 do {
36-
_class = _allAvailableMags select _i;
42+
for "_i" from 0 to (count _magazines) - 2 step 2 do {
43+
_class = _magazines select _i;
3744

3845
// Find compatible magazines
39-
if (_class in _compatibleMags) then {
40-
_config = _cfgMagazines >> _class;
41-
42-
_menus pushBack [
43-
[
44-
format [QGVAR(magazineVehicle_%1), _class], // Action name
45-
getText (_config >> "displayName"), // Name of action shown in menu
46-
getText (_config >> "picture"), // Icon
47-
{[_player, _target, _this select 2] call FUNC(loadMagazine)}, // Statement
48-
{true}, // Condition
49-
nil,
50-
[_weapon, _muzzle, _class, _turret] // Action parameters
51-
] call ace_interact_menu_fnc_createAction,
52-
[],
53-
_target
54-
];
46+
if !(_class in _compatibleMags) then {
47+
continue;
5548
};
49+
50+
_config = _cfgMagazines >> _class;
51+
52+
_menus pushBack [
53+
[
54+
format [QGVAR(magazineVehicle_%1), _class], // Action name
55+
getText (_config >> "displayName"), // Name of action shown in menu
56+
getText (_config >> "picture"), // Icon
57+
{[_player, _target, _this select 2] call FUNC(loadMagazine)}, // Statement
58+
{true}, // Condition
59+
nil,
60+
[_weapon, _muzzle, _class, _turret] // Action parameters
61+
] call ace_interact_menu_fnc_createAction,
62+
[],
63+
_target
64+
];
5665
};
5766

58-
_menus
67+
_menus // return

addons/change_ammo/script_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// #define DEBUG_MODE_FULL
66
// #define DISABLE_COMPILE_CACHE
7-
// #define DEBUG_SYNCHRONOUS
7+
#define DEBUG_SYNCHRONOUS
88
// #define ENABLE_PERFORMANCE_COUNTERS
99

1010
#ifdef DEBUG_ENABLED_AIMEE_CHANGE_AMMO

addons/group/addon.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ enabled = true
33

44
[binarize]
55
enabled = true
6-
7-
[asc]
8-
enabled = true

addons/group/script_component.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// #define DEBUG_MODE_FULL
66
// #define DISABLE_COMPILE_CACHE
7-
// #define DEBUG_SYNCHRONOUS
7+
#define DEBUG_SYNCHRONOUS
88
// #define ENABLE_PERFORMANCE_COUNTERS
99

1010
#ifdef DEBUG_ENABLED_AIMEE_GROUP

addons/inventory/XEH_PREP.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
PREP(assemble);
22
PREP(assembleModify);
33
PREP(backpackPos);
4-
PREP(backpackType);
54
PREP(backpackUAVModify);
65
PREP(canAssemble);
76
PREP(canDisassemble);

0 commit comments

Comments
 (0)