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>
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
// by commy2
|
|
|
|
#include "script_component.hpp"
|
|
|
|
["ace_flashbangExploded", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
|
|
|
|
// Register fired event handlers
|
|
["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
|
["ace_firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
|
["ace_firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
|
|
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
|
|
|
// Add keybinds
|
|
["ACE3 Weapons", QGVAR(switchGrenadeMode), localize LSTRING(SwitchGrenadeMode), {
|
|
// Conditions: canInteract
|
|
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
// Conditions: specific
|
|
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
|
// Don't change mode or show hint if advanced throwing is active
|
|
if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false};
|
|
|
|
// Statement
|
|
[] call FUNC(nextMode);
|
|
}, {false}, [9, [false, false, false]], false] call CBA_fnc_addKeybind; //8 Key
|
|
|
|
["ace_settingsInitialized", {
|
|
if (GVAR(convertExplosives)) then {
|
|
[] call FUNC(addChangeFuseItemContextMenuOptions);
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|