forked from acemod/ACE3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCfgVehicles.hpp
More file actions
62 lines (58 loc) · 1.9 KB
/
CfgVehicles.hpp
File metadata and controls
62 lines (58 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#define CONCAT(a,b) a##b
#define TOW_ACTION(length) \
class GVAR(CONCAT(startTow,length)) {\
displayName = CSTRING(CONCAT(start,length));\
condition = QUOTE([ARR_2(_player,'CONCAT(ACE_rope,length)')] call DEFUNC(common,hasItem));\
statement = QUOTE([ARR_3(_player,_target,'CONCAT(ACE_rope,length)')] call DFUNC(startTow));\
exceptions[] = { INTERACTION_EXCEPTIONS };\
}
#define TOW_ACTIONS \
class ACE_Actions {\
class ACE_MainActions {\
class ADDON {\
displayName = CSTRING(displayName);\
distance = TOW_ACTION_DISTANCE;\
condition = QUOTE(alive _target && {_target call DFUNC(isSuitableSimulation)});\
exceptions[] = { INTERACTION_EXCEPTIONS };\
insertChildren = QUOTE(_target call DFUNC(getDetachActions));\
TOW_ACTION(3);\
TOW_ACTION(6);\
TOW_ACTION(12);\
TOW_ACTION(15);\
TOW_ACTION(18);\
TOW_ACTION(27);\
TOW_ACTION(36);\
};\
};\
}
class CfgVehicles {
class LandVehicle;
class Car: LandVehicle {
TOW_ACTIONS;
};
class Tank: LandVehicle {
TOW_ACTIONS;
};
class Ship;
class Ship_F: Ship {
TOW_ACTIONS;
};
class ThingX;
class GVAR(helper): ThingX {
displayName = "helper"; // not publicly visible, no stringtable needed
scope = 1;
scopeCurator = 1;
model = "\A3\Weapons_f\empty";
destrType = "DestructNo";
};
class GVAR(hook): GVAR(helper) {
displayName = "hook";
class ACE_Actions {
class ACE_MainActions {
displayName = CSTRING(detach);
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(detachRope));
distance = TOW_ACTION_DISTANCE;
};
};
};
};