weaponselect: replace keybinds for cba 2

This commit is contained in:
Nicolás Badano 2015-01-18 11:57:23 -03:00
parent b867dc04ed
commit 415df07af4
2 changed files with 108 additions and 59 deletions

View File

@ -147,3 +147,111 @@ if !(hasInterface) exitWith {};
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_WeaponSelect_EngineOn",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {!isEngineOn vehicle ACE_player}) exitWith {false};
// Statement
(vehicle ACE_player) engineOn true;
true
},
[3, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_WeaponSelect_EngineOff",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {isEngineOn vehicle ACE_player}) exitWith {false};
// Statement
(vehicle ACE_player) engineOn false;
true
},
[2, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_WeaponSelect_SelectMainGun",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(ACE_player != vehicle ACE_player) exitWith {false};
// Statement
[ACE_player, vehicle ACE_player, 0] call FUNC(selectWeaponVehicle);
true
},
[4, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_WeaponSelect_SelectMachineGun",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(ACE_player != vehicle ACE_player) exitWith {false};
// Statement
[ACE_player, vehicle ACE_player, 1] call FUNC(selectWeaponVehicle);
true
},
[5, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_WeaponSelect_SelectMissiles",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(ACE_player != vehicle ACE_player) exitWith {false};
// Statement
[ACE_player, vehicle ACE_player, 2] call FUNC(selectWeaponVehicle);
true
},
[6, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_WeaponSelect_FireSmokeLauncher",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(ACE_player != vehicle ACE_player && {ACE_player == commander vehicle ACE_player}) exitWith {false};
// Statement
[vehicle ACE_player] call FUNC(fireSmokeLauncher);
true
},
[10, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;

View File

@ -13,62 +13,3 @@ class CfgPatches {
};
#include "CfgEventHandlers.hpp"
class ACE_Default_Keys {
class engineOn {
displayName = "$STR_ACE_WeaponSelect_EngineOn";
condition = QUOTE(_player != _vehicle && {_player == driver _vehicle} && {!isEngineOn _vehicle});
statement = QUOTE(_vehicle engineOn true;);
key = 3;
shift = 0;
control = 0;
alt = 0;
};
class engineOff {
displayName = "$STR_ACE_WeaponSelect_EngineOff";
condition = QUOTE(_player != _vehicle && {_player == driver _vehicle} && {isEngineOn _vehicle});
statement = QUOTE(_vehicle engineOn false;);
key = 2;
shift = 0;
control = 0;
alt = 0;
};
class selectMaingun {
displayName = "$STR_ACE_WeaponSelect_SelectMainGun";
condition = QUOTE(_player != _vehicle);
statement = QUOTE([ARR_3(_player, _vehicle, 0)] call FUNC(selectWeaponVehicle););
key = 4;
shift = 0;
control = 0;
alt = 0;
};
class selectMachineGun {
displayName = "$STR_ACE_WeaponSelect_SelectMachineGun";
condition = QUOTE(_player != _vehicle);
statement = QUOTE([ARR_3(_player, _vehicle, 1)] call FUNC(selectWeaponVehicle););
key = 5;
shift = 0;
control = 0;
alt = 0;
};
class selectMissile {
displayName = "$STR_ACE_WeaponSelect_SelectMissiles";
condition = QUOTE(_player != _vehicle);
statement = QUOTE([ARR_3(_player, _vehicle, 2)] call FUNC(selectWeaponVehicle););
key = 6;
shift = 0;
control = 0;
alt = 0;
};
class fireSmokeLauncher {
displayName = "$STR_ACE_WeaponSelect_FireSmokeLauncher";
condition = QUOTE(_player != _vehicle && {_player == commander _vehicle});
statement = QUOTE([_vehicle] call FUNC(fireSmokeLauncher););
key = 10;
shift = 0;
control = 0;
alt = 0;
};
};