-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grenades - Add throwable explosive charges (#7860)
* First pass on adding throwable explosives * Moved fnc call to postinit * Disabled gits auto CRLF bs * Changing fnc name and call * Move names to string table * Using vanilla icon and removing explosive depend * More stringtable conversions * Missing semi-colons causing RPT error * Update addons/grenades/stringtable.xml Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Remove empty strings * Update addons/grenades/stringtable.xml Co-authored-by: Elgin675 <elgin675@hotmail.com> * Add compatibility with "realistic names" modules, and add french translation * Fix little mistake * Update addons/grenades/stringtable.xml Co-authored-by: Elgin675 <elgin675@hotmail.com> * Add setting * Change setting name, use ace_settingsInitialized Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Elgin675 <elgin675@hotmail.com>
- Loading branch information
1 parent
311dcde
commit b215356
Showing
12 changed files
with
257 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ PREP_RECOMPILE_START; | |
#include "XEH_PREP.hpp" | ||
PREP_RECOMPILE_END; | ||
|
||
#include "initSettings.sqf" | ||
|
||
ADDON = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
addons/grenades/functions/fnc_addChangeFuseItemContextMenuOptions.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Cyruz | ||
* Allows conversion of explosive charges in to throwable versions | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* call ace_grenades_fnc_addChangeFuseItemContextMenuOptions | ||
* | ||
* Public: No | ||
*/ | ||
TRACE_1("addChangeFuseItemContextMenuOptions",_this); | ||
|
||
{ | ||
_x params ["_mag", "_throwableMag"]; | ||
|
||
[ | ||
_mag, | ||
"CONTAINER", | ||
LLSTRING(convert_fuse), | ||
nil, | ||
"\a3\ui_f\data\igui\cfg\simpletasks\types\destroy_ca.paa", | ||
[ | ||
{true}, | ||
{ | ||
params ["", "", "_item", "", "_magArr"]; | ||
_item isEqualTo (_magArr select 0); | ||
} | ||
], | ||
{ | ||
params ["_unit", "", "", "", "_magArr"]; | ||
_unit addMagazine (_magArr select 1); | ||
false; | ||
}, | ||
true, | ||
[_mag,_throwableMag] | ||
] call CBA_fnc_addItemContextMenuOption; | ||
|
||
[ | ||
_throwableMag, | ||
"CONTAINER", | ||
LLSTRING(remove_fuse), | ||
nil, | ||
"\a3\ui_f\data\igui\cfg\simpletasks\types\destroy_ca.paa", | ||
[ | ||
{true}, | ||
{ | ||
params ["", "", "_item", "", "_magArr"]; | ||
_item isEqualTo (_magArr select 1); | ||
} | ||
], | ||
{ | ||
params ["_unit", "", "", "", "_magArr"]; | ||
_unit addMagazine (_magArr select 0); | ||
false; | ||
}, | ||
true, | ||
[_mag,_throwableMag] | ||
] call CBA_fnc_addItemContextMenuOption; | ||
} forEach [ | ||
["SatchelCharge_Remote_Mag", "ACE_SatchelCharge_Remote_Mag_Throwable"], | ||
["DemoCharge_Remote_Mag", "ACE_DemoCharge_Remote_Mag_Throwable"] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
QGVAR(convertExplosives), "CHECKBOX", | ||
[LSTRING(convertExplosives_DisplayName), LSTRING(convertExplosives_Description)], | ||
LSTRING(Settings_DisplayName), | ||
true, | ||
true, | ||
{}, | ||
true | ||
] call CBA_fnc_addSetting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b215356
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there an intended way for other mods to call this event or patch the CBA forEach call?