Skip to content

Commit 0f718f8

Browse files
authored
Merge pull request #17 from johnb432/dev
1.3.6.0
2 parents 56e0fb2 + 02e8f69 commit 0f718f8

22 files changed

+467
-318
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Changelog for AIMEE 11.1.2025
2+
3+
1.3.6.0
4+
- Added ability to place explosives via very simple ACE interaction if `ace_explosives` isn't loaded.
5+
16
# Changelog for AIMEE 25.3.2024
27

38
1.3.5.0

addons/change_ammo/functions/fnc_magazinesVehicleMenus.sqf

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ for "_i" from 0 to (count _allAvailableMags) - 2 step 2 do {
3939
if (_class in _compatibleMags) then {
4040
_config = _cfgMagazines >> _class;
4141

42-
_menus pushBack [[
43-
format [QGVAR(magazineVehicle_%1), _class], // Action name
44-
getText (_config >> "displayName"), // Name of action shown in menu
45-
getText (_config >> "picture"), // Icon
46-
{[_player, _target, _this select 2] call FUNC(loadMagazine)}, // Statement
47-
{true}, // Condition
48-
nil,
49-
[_weapon, _muzzle, _class, _turret] // Action parameters
50-
] call ace_interact_menu_fnc_createAction, [], _target];
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+
];
5155
};
5256
};
5357

addons/change_ammo/stringtable.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
<Key ID="STR_AIMEE_change_ammo_settingAmmoClass">
55
<Original>Enable magazine switch menu</Original>
66
<English>Enable magazine switch menu</English>
7-
<German>Magazinwechselinteraktion zulassen</German>
87
<French>Permission du menu "changer magazines"</French>
8+
<German>Magazinwechselinteraktion zulassen</German>
99
</Key>
1010
<Key ID="STR_AIMEE_change_ammo_settingAmmoClass_ToolTip">
1111
<Original>Allows the player to switch magazine types using the ACE interaction menu.</Original>
1212
<English>Allows the player to switch magazine types using the ACE interaction menu.</English>
13-
<German>Erlaubt den Spieler Magazine mit einer ACE-Selbstinteraktion auszuwechseln.</German>
1413
<French>Permet au joueur de changer de magazine avec une interaction ACE sur soi-même.</French>
14+
<German>Erlaubt den Spieler Magazine mit einer ACE-Selbstinteraktion auszuwechseln.</German>
1515
</Key>
1616
<Key ID="STR_AIMEE_change_ammo_settingVehicleAmmoClass">
1717
<Original>Enable vehicle gunner magazine switch menu</Original>
1818
<English>Enable vehicle gunner magazine switch menu</English>
19-
<German>Fahrzeugmagazinwechsel-Menu zulassen</German>
2019
<French>Permission du menu "changer magazines" véhicule</French>
20+
<German>Fahrzeugmagazinwechsel-Menu zulassen</German>
2121
</Key>
2222
<Key ID="STR_AIMEE_change_ammo_settingVehicleAmmoClass_ToolTip">
2323
<Original>Allows the player to switch vehicle magazines using the ACE self-interaction menu.</Original>
2424
<English>Allows the player to switch vehicle magazines using the ACE self-interaction menu.</English>
25-
<German>Erlaubt den Spieler Fahrzeugmagazine mit einer ACE-Selbstinteraktion auszuwechseln.</German>
2625
<French>Permet au joueur de changer les magazines d'un véhicule avec une interaction ACE sur soi-même.</French>
26+
<German>Erlaubt den Spieler Fahrzeugmagazine mit einer ACE-Selbstinteraktion auszuwechseln.</German>
2727
</Key>
2828
</Package>
2929
</Project>

addons/group/stringtable.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project name="AIMEE">
33
<Package name="group">
4+
<Key ID="STR_AIMEE_group_StepDown">
5+
<Original>Step down as leader</Original>
6+
<English>Step down as leader</English>
7+
<French>Renoncer à la position commandante</French>
8+
<German>Gruppenführerstatus abgeben</German>
9+
</Key>
410
<Key ID="STR_AIMEE_group_settingDropLeaderAction">
511
<Original>Allow players to step down as leader</Original>
612
<English>Allow players to step down as leader</English>
7-
<German>Gruppenführerabgebung zulassen</German>
813
<French>Permission du menu "changer magazines"</French>
14+
<German>Gruppenführerabgebung zulassen</German>
915
</Key>
1016
<Key ID="STR_AIMEE_group_settingDropLeaderAction_ToolTip">
1117
<Original>Allows the player step down as a leader using the ACE self-interaction menu.</Original>
1218
<English>Allows the player step down as a leader using the ACE self-interaction menu.</English>
13-
<German>Erlaubt den Spieler den Gruppenführerstatus mit einer ACE-Selbstinteraktion abzugeben.</German>
1419
<French>Permet au joueur de renoncer à la position commandante avec une interaction ACE sur soi-même.</French>
15-
</Key>
16-
<Key ID="STR_AIMEE_group_StepDown">
17-
<Original>Step down as leader</Original>
18-
<English>Step down as leader</English>
19-
<German>Gruppenführerstatus abgeben</German>
20-
<French>Renoncer à la position commandante</French>
20+
<German>Erlaubt den Spieler den Gruppenführerstatus mit einer ACE-Selbstinteraktion abzugeben.</German>
2121
</Key>
2222
</Package>
2323
</Project>

addons/inventory/CfgVehicles.hpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class CfgVehicles {
106106
class CAManBase: Man {
107107
class ACE_Actions {
108108
class GVAR(backpackAction3D) {
109-
condition = QUOTE(GVAR(settingBackpackAction) && {GVAR(settingOpenAction)} && {isNull objectParent _target} && {!isNull unitBackpack _target} && {(unitBackpack _target) call FUNC(hasInventory)});
109+
condition = QUOTE(GVAR(settingBackpackAction) && GVAR(settingOpenAction) && {isNull objectParent _target} && {!isNull unitBackpack _target} && {(unitBackpack _target) call FUNC(hasInventory)});
110110
displayName = DEFAULT_TEXT;
111111
distance = DISTANCE_INTERACTION_BACKPACK_3D;
112112
exceptions[] = {"isNotSwimming"};
@@ -118,7 +118,7 @@ class CfgVehicles {
118118

119119
class ACE_MainActions {
120120
class GVAR(backpackAction) {
121-
condition = QUOTE(!GVAR(settingBackpackAction) && {GVAR(settingOpenAction)} && {isNull objectParent _target} && {!isNull unitBackpack _target} && {(unitBackpack _target) call FUNC(hasInventory)});
121+
condition = QUOTE(!GVAR(settingBackpackAction) && GVAR(settingOpenAction) && {isNull objectParent _target} && {!isNull unitBackpack _target} && {(unitBackpack _target) call FUNC(hasInventory)});
122122
displayName = DEFAULT_TEXT;
123123
exceptions[] = {"isNotSwimming"};
124124
icon = ICON_INVENTORY;
@@ -138,12 +138,27 @@ class CfgVehicles {
138138
};
139139

140140
class GVAR(assembleActionUAV) {
141-
condition = QUOTE(GVAR(settingAssembleAction) && {_player call FUNC(UAVType) != ''} && {!(_player call EFUNC(main,operatingUAV))});
141+
condition = QUOTE(GVAR(settingAssembleUavAction) && {_player call FUNC(UAVType) != ''} && {!(_player call EFUNC(main,operatingUAV))});
142142
displayName = DEFAULT_TEXT;
143143
icon = ICON_REPAIR;
144144
modifierFunction = QUOTE(call FUNC(backpackUAVModify));
145145
statement = QUOTE(_player call FUNC(UAVAssemble));
146146
};
147+
148+
class GVAR(explosives) {
149+
condition = QUOTE(GVAR(settingExplosivesAction) && {isNil 'ace_explosives'});
150+
displayName = CQSTRING(STR_A3_RscDisplayArsenal_tab_CargoPut);
151+
icon = ICON_EXPLOSION;
152+
insertChildren = QUOTE(_player call FUNC(explosiveMenus));
153+
154+
class GVAR(explosivesDetonateAll) {
155+
condition = QUOTE(getAllOwnedMines _player isNotEqualTo []);
156+
displayName = DEFAULT_TEXT;
157+
icon = ICON_EXPLOSION;
158+
modifierFunction = QUOTE((_this select 3) set [ARR_2(1,FORMAT_1(localize 'str_action_touch_off',count getAllOwnedMines _player))]);
159+
statement = QPACTION('TouchOff',_player);
160+
};
161+
};
147162
};
148163
};
149164
};

addons/inventory/XEH_PREP.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PREP(backpackUAVModify);
66
PREP(canAssemble);
77
PREP(canDisassemble);
88
PREP(canPickup);
9+
PREP(explosiveMenus);
910
PREP(hasInventory);
1011
PREP(holderModify);
1112
PREP(locateBackpack);

addons/inventory/XEH_preInit.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ SETTING(settingOpenAction,"CHECKBOX",true);
99
SETTING(settingBackpackAction,"CHECKBOX",true);
1010
SETTING(settingHolderAction,"CHECKBOX",true);
1111
SETTING(settingAssembleAction,"CHECKBOX",true);
12+
SETTING(settingAssembleUavAction,"CHECKBOX",true);
13+
SETTING(settingExplosivesAction,"CHECKBOX",true);
1214

1315
ADDON = true;
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#include "..\script_component.hpp"
2+
/*
3+
* Author: johnb43
4+
* Makes all interaction menus for all explosive types for a unit.
5+
*
6+
* Arguments:
7+
* 0: Unit <OBJECT>
8+
*
9+
* Return Value:
10+
* Modified interaction menu <ARRAY>
11+
*
12+
* Example:
13+
* player call AIMEE_inventory_fnc_explosiveMenus
14+
*
15+
* Public: No
16+
*/
17+
18+
19+
// Returns case correct magazines
20+
private _magazines = (magazines [_this, false]) call CBA_fnc_getArrayElements;
21+
22+
if (_magazines isEqualTo []) exitWith {[]};
23+
24+
private _explosives = uiNamespace getVariable ["ace_arsenal_putCache", createHashMap];
25+
private _class = "";
26+
private _config = configNull;
27+
private _cfgMagazines = configFile >> "CfgMagazines";
28+
private _menus = [];
29+
30+
for "_i" from 0 to (count _magazines) - 2 step 2 do {
31+
_class = _magazines select _i;
32+
33+
// Find compatible magazines
34+
if (_class in _explosives) then {
35+
_config = _cfgMagazines >> _class;
36+
37+
_menus pushBack [
38+
[
39+
format [QGVAR(explosive_%1), _class], // Action name
40+
format [LQSTRING(str_action_putbomb), getText (_config >> "displayName"), _magazines select (_i + 1)], // Name of action shown in menu
41+
getText (_config >> "picture"), // Icon
42+
{
43+
_player playAction "PutDown";
44+
45+
[{
46+
params ["_unit", "_mineData"];
47+
48+
// If magazine couldn't be removed, it means it was deleted before; Don't continue
49+
if !([_unit, _mineData select 0] call CBA_fnc_removeMagazine) exitWith {};
50+
51+
private _mine = createVehicle [_mineData select 1, _unit, [], 0];
52+
_mine setDir (getDir _unit);
53+
_mine setPosWorld getPosWorld _mine; // mine direction needs to be synchronised
54+
55+
_unit addOwnedMine _mine;
56+
(side group _unit) revealMine _mine;
57+
}, [_player, _this select 2], 1] call CBA_fnc_waitAndExecute;
58+
}, // Statement
59+
{true}, // Condition
60+
nil,
61+
[_class, getText (_config >> "ammo")] // Action parameters
62+
] call ace_interact_menu_fnc_createAction,
63+
[],
64+
_this
65+
];
66+
};
67+
};
68+
69+
_menus

addons/inventory/functions/fnc_playerPickUpMagazine.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ private _index = -1;
5656
// If an item doesn't have a reload animation, add it instantly
5757
if (_gesture != "") then {
5858
if (_weapon isKindOf ["Launcher", configFile >> "CfgWeapons"]) then {
59-
_duration = getNumber (configfile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed");
59+
_duration = getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed");
6060
};
6161

6262
if (_duration == 0) then {
63-
_duration = getNumber (configfile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed");
63+
_duration = getNumber (configFile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed");
6464
};
6565

6666
_duration = if (_duration != 0) then {

0 commit comments

Comments
 (0)