2015-01-23 22:40:39 +00:00
|
|
|
#define MACRO_LOCK_ACTIONS \
|
2015-04-28 05:08:28 +00:00
|
|
|
class ACE_SelfActions { \
|
2015-03-15 16:27:21 +00:00
|
|
|
class ACE_unlockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_UnLock); \
|
2015-03-15 16:27:21 +00:00
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
|
2016-05-25 00:37:24 +00:00
|
|
|
statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \
|
2016-06-28 16:29:51 +00:00
|
|
|
icon = QPATHTOF(ui\key_menuIcon_ca.paa); \
|
2015-03-15 16:27:21 +00:00
|
|
|
}; \
|
|
|
|
class ACE_lockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lock); \
|
2015-03-15 16:27:21 +00:00
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
|
2016-05-25 00:37:24 +00:00
|
|
|
statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \
|
2016-06-28 16:29:51 +00:00
|
|
|
icon = QPATHTOF(ui\key_menuIcon_ca.paa); \
|
2015-03-15 16:27:21 +00:00
|
|
|
}; \
|
|
|
|
class ACE_lockpickVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lockpick); \
|
2015-03-15 16:27:21 +00:00
|
|
|
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
|
|
|
|
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
|
|
|
|
}; \
|
2015-04-28 05:08:28 +00:00
|
|
|
}; \
|
|
|
|
class ACE_Actions { \
|
|
|
|
class ACE_MainActions { \
|
|
|
|
class ACE_unlockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_UnLock); \
|
2015-04-28 05:08:28 +00:00
|
|
|
distance = 4; \
|
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
|
2016-05-25 00:37:24 +00:00
|
|
|
statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \
|
2017-08-22 18:30:56 +00:00
|
|
|
exceptions[] = {"isNotSwimming"}; \
|
2016-06-28 16:29:51 +00:00
|
|
|
icon = QPATHTOF(ui\key_menuIcon_ca.paa); \
|
2015-04-28 05:08:28 +00:00
|
|
|
}; \
|
|
|
|
class ACE_lockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lock); \
|
2015-04-28 05:08:28 +00:00
|
|
|
distance = 4; \
|
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
|
2016-05-25 00:37:24 +00:00
|
|
|
statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \
|
2017-08-22 18:30:56 +00:00
|
|
|
exceptions[] = {"isNotSwimming"}; \
|
2016-06-28 16:29:51 +00:00
|
|
|
icon = QPATHTOF(ui\key_menuIcon_ca.paa); \
|
2015-04-28 05:08:28 +00:00
|
|
|
}; \
|
|
|
|
class ACE_lockpickVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lockpick); \
|
2015-04-28 05:08:28 +00:00
|
|
|
distance = 4; \
|
|
|
|
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
|
|
|
|
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
|
2017-08-22 18:30:56 +00:00
|
|
|
exceptions[] = {"isNotSwimming"}; \
|
2015-04-28 05:08:28 +00:00
|
|
|
}; \
|
|
|
|
}; \
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
|
|
|
|
class CfgVehicles {
|
2015-03-15 16:27:21 +00:00
|
|
|
class LandVehicle;
|
|
|
|
class Car: LandVehicle {
|
2015-04-28 05:08:28 +00:00
|
|
|
MACRO_LOCK_ACTIONS
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-03-15 16:27:21 +00:00
|
|
|
class Tank: LandVehicle {
|
2015-04-28 05:08:28 +00:00
|
|
|
MACRO_LOCK_ACTIONS
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-03-15 16:27:21 +00:00
|
|
|
class Air;
|
|
|
|
class Helicopter: Air {
|
2015-04-28 05:08:28 +00:00
|
|
|
MACRO_LOCK_ACTIONS
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2018-10-21 21:37:16 +00:00
|
|
|
class Plane: Air {
|
|
|
|
MACRO_LOCK_ACTIONS
|
|
|
|
};
|
2017-08-22 18:30:56 +00:00
|
|
|
class Motorcycle: LandVehicle {
|
|
|
|
MACRO_LOCK_ACTIONS
|
|
|
|
};
|
|
|
|
class Ship;
|
|
|
|
class Ship_F: Ship {
|
|
|
|
MACRO_LOCK_ACTIONS
|
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
|
2015-03-15 16:27:21 +00:00
|
|
|
class Logic;
|
|
|
|
class Module_F: Logic {
|
2015-05-30 05:31:07 +00:00
|
|
|
class ModuleDescription;
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-05-30 05:31:07 +00:00
|
|
|
class ACE_Module: Module_F {};
|
2015-05-30 04:37:41 +00:00
|
|
|
class ACE_VehicleLock_ModuleSetup: ACE_Module {
|
2015-05-27 20:04:41 +00:00
|
|
|
author = ECSTRING(common,ACETeam);
|
2015-03-15 16:27:21 +00:00
|
|
|
category = "ACE";
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Module_DisplayName);
|
2015-04-28 05:08:28 +00:00
|
|
|
function = QFUNC(moduleInit);
|
2017-11-11 19:21:55 +00:00
|
|
|
scope = 1;
|
|
|
|
isGlobal = 1;
|
2015-10-19 04:34:11 +00:00
|
|
|
isSingular = 1;
|
2016-06-28 16:29:51 +00:00
|
|
|
icon = QPATHTOF(ui\Icon_Module_VehicleLock_ca.paa);
|
2015-03-15 16:27:21 +00:00
|
|
|
functionPriority = 0;
|
|
|
|
class Arguments {
|
|
|
|
class LockVehicleInventory {
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(LockVehicleInventory_DisplayName);
|
|
|
|
description = CSTRING(LockVehicleInventory_Description);
|
2015-03-15 16:27:21 +00:00
|
|
|
typeName = "BOOL";
|
|
|
|
defaultValue = 0;
|
|
|
|
};
|
2015-04-28 05:08:28 +00:00
|
|
|
class VehicleStartingLockState {
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(VehicleStartingLockState_DisplayName);
|
|
|
|
description = CSTRING(VehicleStartingLockState_Description);
|
2015-05-09 18:43:55 +00:00
|
|
|
typeName = "NUMBER";
|
2015-03-15 16:27:21 +00:00
|
|
|
class values {
|
2015-05-27 17:04:25 +00:00
|
|
|
class None {name = CSTRING(VehicleStartingLockState_AsIs); value = 0; default = 1;};
|
|
|
|
class Side {name = CSTRING(VehicleStartingLockState_Locked); value = 1;};
|
|
|
|
class Unique {name = CSTRING(VehicleStartingLockState_Unlocked); value = 2;};
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
class DefaultLockpickStrength {
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(DefaultLockpickStrength_DisplayName);
|
|
|
|
description = CSTRING(DefaultLockpickStrength_Description);
|
2015-05-09 18:43:55 +00:00
|
|
|
typeName = "NUMBER";
|
|
|
|
defaultValue = "10";
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
|
|
|
};
|
2015-05-30 04:37:41 +00:00
|
|
|
class ModuleDescription {
|
2015-05-27 17:04:25 +00:00
|
|
|
description = CSTRING(Module_Description);
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
|
|
|
|
2015-05-30 04:37:41 +00:00
|
|
|
class ACE_VehicleLock_ModuleSyncedAssign: ACE_Module {
|
2015-05-27 20:04:41 +00:00
|
|
|
author = ECSTRING(common,ACETeam);
|
2015-03-15 16:27:21 +00:00
|
|
|
category = "ACE";
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(VehicleKeyAssign_Module_DisplayName);
|
2015-04-28 05:08:28 +00:00
|
|
|
function = QFUNC(moduleSync);
|
2015-03-15 16:27:21 +00:00
|
|
|
scope = 2;
|
|
|
|
isGlobal = 0;
|
2016-06-28 16:29:51 +00:00
|
|
|
icon = QPATHTOF(ui\Icon_Module_VehicleKey_ca.paa);
|
2015-03-15 16:27:21 +00:00
|
|
|
functionPriority = 0;
|
|
|
|
class Arguments {};
|
|
|
|
class ModuleDescription: ModuleDescription {
|
2015-05-27 17:04:25 +00:00
|
|
|
description = CSTRING(VehicleKeyAssign_Module_Description);
|
2015-03-15 16:27:21 +00:00
|
|
|
sync[] = {"AnyPlayer", "AnyVehicle"};
|
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-06-02 20:14:32 +00:00
|
|
|
};
|