mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
overheating: cba keybinds
This commit is contained in:
parent
5a77e2c220
commit
7895173407
@ -4,6 +4,12 @@ class Extended_PreInit_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(Overheat) {
|
||||
|
25
addons/overheating/XEH_postInit.sqf
Normal file
25
addons/overheating/XEH_postInit.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
// by CAA-Picard
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(hasInterface) exitWith {};
|
||||
|
||||
// Add keybinds
|
||||
["ACE3",
|
||||
localize "STR_ACE_Overheating_UnjamWeapon",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
|
||||
{currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}
|
||||
) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[ACE_player, currentMuzzle ACE_player, false] call FUNC(clearJam);
|
||||
true
|
||||
},
|
||||
[19, [true, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
@ -14,18 +14,6 @@ class CfgPatches {
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
class ACE_Default_Keys {
|
||||
class clearJam {
|
||||
displayName = "$STR_ACE_Overheating_UnjamWeapon";
|
||||
condition = QUOTE( [_player] call EFUNC(common,canUseWeapon) && {currentWeapon _player in (_player getVariable [ARR_2(QUOTE(QGVAR(jammedWeapons)), [])])} );
|
||||
statement = QUOTE( [ARR_3(_player, currentMuzzle _player, false)] call FUNC(clearJam); );
|
||||
key = 19;
|
||||
shift = 1;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgSounds.hpp"
|
||||
|
||||
#include "CfgVehicles.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user