mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
b21535665b
* 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>
69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
#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"]
|
|
];
|