ACE3/addons/vehiclelock/CfgVehicles.hpp

124 lines
5.3 KiB
C++
Raw Normal View History

2015-01-23 22:40:39 +00:00
#define MACRO_LOCK_ACTIONS \
class ACE_SelfActions { \
class ACE_unlockVehicle { \
displayName = CSTRING(Action_UnLock); \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
priority = 0.3; \
2015-03-23 19:02:35 +00:00
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
}; \
class ACE_lockVehicle { \
displayName = CSTRING(Action_Lock); \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
priority = 0.2; \
2015-03-23 19:02:35 +00:00
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
}; \
class ACE_lockpickVehicle { \
displayName = CSTRING(Action_Lockpick); \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
priority = 0.1; \
}; \
}; \
class ACE_Actions { \
class ACE_MainActions { \
class ACE_unlockVehicle { \
displayName = CSTRING(Action_UnLock); \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
priority = 0.3; \
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
}; \
class ACE_lockVehicle { \
displayName = CSTRING(Action_Lock); \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
priority = 0.2; \
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
}; \
class ACE_lockpickVehicle { \
displayName = CSTRING(Action_Lockpick); \
distance = 4; \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
priority = 0.1; \
}; \
}; \
};
2015-01-23 22:40:39 +00:00
class CfgVehicles {
class LandVehicle;
class Car: LandVehicle {
MACRO_LOCK_ACTIONS
2015-01-23 22:40:39 +00:00
};
class Tank: LandVehicle {
MACRO_LOCK_ACTIONS
2015-01-23 22:40:39 +00:00
};
class Air;
class Helicopter: Air {
MACRO_LOCK_ACTIONS
2015-01-23 22:40:39 +00:00
};
class Logic;
class Module_F: Logic {
class ModuleDescription;
2015-01-23 22:40:39 +00:00
};
class ACE_Module: Module_F {};
class ACE_VehicleLock_ModuleSetup: ACE_Module {
2015-05-27 20:04:41 +00:00
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(Module_DisplayName);
function = QFUNC(moduleInit);
scope = 2;
isGlobal = 0;
2015-03-23 19:02:35 +00:00
icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleLock_ca.paa));
functionPriority = 0;
class Arguments {
class LockVehicleInventory {
displayName = CSTRING(LockVehicleInventory_DisplayName);
description = CSTRING(LockVehicleInventory_Description);
typeName = "BOOL";
defaultValue = 0;
};
class VehicleStartingLockState {
displayName = CSTRING(VehicleStartingLockState_DisplayName);
description = CSTRING(VehicleStartingLockState_Description);
2015-05-09 18:43:55 +00:00
typeName = "NUMBER";
class values {
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;};
};
};
class DefaultLockpickStrength {
displayName = CSTRING(DefaultLockpickStrength_DisplayName);
description = CSTRING(DefaultLockpickStrength_Description);
2015-05-09 18:43:55 +00:00
typeName = "NUMBER";
defaultValue = "10";
};
};
class ModuleDescription {
description = CSTRING(Module_Description);
};
2015-01-23 22:40:39 +00:00
};
class ACE_VehicleLock_ModuleSyncedAssign: ACE_Module {
2015-05-27 20:04:41 +00:00
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(VehicleKeyAssign_Module_DisplayName);
function = QFUNC(moduleSync);
scope = 2;
isGlobal = 0;
2015-03-23 19:02:35 +00:00
icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleKey_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = CSTRING(VehicleKeyAssign_Module_Description);
sync[] = {"AnyPlayer", "AnyVehicle"};
};
2015-01-23 22:40:39 +00:00
};
};