ACE3/addons/vehiclelock/CfgVehicles.hpp
2015-01-23 16:40:39 -06:00

101 lines
3.6 KiB
C++

#define MACRO_LOCK_ACTIONS \
class ACE_unlockVehicle { \
displayName = "$STR_ACE_Vehicle_Action_UnLock"; \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
statement = QUOTE([ARR_3('SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
showDisabled = 0; \
priority = 0.3; \
icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \
}; \
class ACE_lockVehicle { \
displayName = "$STR_ACE_Vehicle_Action_Lock"; \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
statement = QUOTE([ARR_3('SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
showDisabled = 0; \
priority = 0.2; \
icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \
}; \
class ACE_lockpickVehicle { \
displayName = "$STR_ACE_Vehicle_Action_Lockpick"; \
distance = 4; \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
showDisabled = 0; \
priority = 0.1; \
};
class CfgVehicles {
class LandVehicle;
class Car: LandVehicle {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Tank: LandVehicle {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Air;
class Helicopter: Air {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {};
class ModuleDescription {};
};
class ACE_VehicleLock_ModuleSetup: Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Vehicle Lock Setup";
function = "ACE_VehicleLock_fnc_moduleInit";
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(ui\IconLock_ca.paa));
functionPriority = 0;
class Arguments {
class SetLockState {
displayName = "Set Lock State"; // Argument label
description = "Set lock state for all vehicles on map at start"; // Tooltip description
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
class values {
class None {name = "As Is"; value = 0; default = 1;};
class Side {name = "Locked"; value = 1;};
class Unique {name = "Unlocked"; value = 2;};
};
};
class LockpickStrength {
displayName = "Global Lockpick Strength";
description = "Global Time to lockpick (in seconds). Default: 10";
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
defaultValue = "10"; // Default text filled in the input box
};
};
class ModuleDescription: ModuleDescription {
description = "Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br/>Source: vehiclelock.pbo";
};
};
class ACE_VehicleLock_ModuleSyncedAssign: Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Vehicle Key Assign";
function = "ACE_VehicleLock_fnc_moduleSync";
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(ui\IconLock_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = "Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start.<br/>Source: vehiclelock.pbo";
sync[] = {"AnyPlayer", "AnyVehicle"};
};
};
};