-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.cpp
235 lines (213 loc) · 7.01 KB
/
config.cpp
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
#define GRRA_MOD_DESCRIPTION 3DEN module that allows creators to initialize an infinite amount of ACE arsenals restricted by player role and other attributes.
#define GRRA_MOD_LOGO grra\data\grra.paa
#define GRRA_MOD_ICON grra\data\grra_icon.paa
#define GRRA_MOD_AUTHOR Grom
#define GRRA_MOD_NAME Grom Restricted Arsenals
// #define GRRA_DEBUG 1 // Debug functions from a mission file
#ifdef GRRA_DEBUG
// running from mission folder
#define GRRA_FUNCTIONS_DIR functions
#else
// running as mod
#define GRRA_FUNCTIONS_DIR \GRRA\functions
#endif
class CfgPatches
{
class GRRA
{
name=GRRA_MOD_NAME;
author=GRRA_MOD_AUTHOR;
logo=GRRA_MOD_LOGO;
logoOver=GRRA_MOD_LOGO;
tooltip=GRRA_MOD_DESCRIPTION;
tooltipOwned=GRRA_MOD_DESCRIPTION;
picture=GRRA_MOD_LOGO;
url="https://github.com/a3r0id";
units[] = {"GRRA_ModuleRoleRestrictedArsenal", "GRRA_ModuleBaseArsenal", "GRRA_AceArsenalOverride"};
requiredVersion = 1.0;
requiredAddons[] = {"A3_Modules_F", "3DEN"};
};
};
class CfgFactionClasses
{
class NO_CATEGORY;
class GRRA_Modules: NO_CATEGORY
{
displayName = GRRA_MOD_NAME;
};
};
class CfgVehicles
{
class Logic;
class Module_F: Logic
{
class AttributesBase
{
class Default;
class Edit;
class Combo;
class Checkbox;
class CheckboxNumber;
class ModuleDescription;
class Units;
};
class ModuleDescription
{
class AnyBrain;
};
};
class GRRA_ModuleRoleRestrictedArsenal: Module_F
{
scope = 2;
displayName = "Restricted Arsenal";
icon = GRRA_MOD_ICON;
category = "GRRA_Modules";
function = "";
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
isDisposable = 1;
is3DEN = 1;
curatorInfoType = "";
class Attributes: AttributesBase
{
class Side: Combo
{
property = "GRRA_ModuleRoleRestrictedArsenal_Side"; // Unique property (use "<GRRA>_<moduleClass>_<attributeClass>" format to ensure that the name is unique)
displayName = "Side"; // Argument label
tooltip = "Side that can use the arsenal."; // Tooltip description
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
defaultValue = "0"; // Default attribute value. Warning: This is an expression, and its returned value will be used (50 in this case).
// Listbox items:
class Values
{
class opt0 { name = "ALL"; value = 0; };
class opt1 { name = "BLUFOR"; value = 1; };
class opt2 { name = "OPFOR"; value = 2; };
class opt3 { name = "INDEPENDENT"; value = 3; };
class opt4 { name = "CIVILIAN"; value = 4; };
};
};
class Owner: Edit
{
property = "GRRA_ModuleRoleRestrictedArsenal_Owner";
displayName = "Owner";
tooltip = "Variable or classname of the arsenal object.";
// Default text for the input box:
defaultValue = """"""; // Because this is an expression, one must have a string within a string to return a string
};
class Role: Edit
{
property = "GRRA_ModuleRoleRestrictedArsenal_Role";
displayName = "Role";
tooltip = "Role of the unit/s that can use the arsenal.";
// Default text for the input box:
defaultValue = """Alpha 1-1"""; // Because this is an expression, one must have a string within a string to return a string
};
class Player: Edit
{
property = "GRRA_ModuleRoleRestrictedArsenal_Player";
displayName = "Player";
tooltip = "Steam64ID of player that can use the arsenal. This will override the Role/Side attributes.";
// Default text for the input box:
defaultValue = """"""; // Because this is an expression, one must have a string within a string to return a string
}
class Items: Edit
{
property = "GRRA_ModuleRoleRestrictedArsenal_Items";
displayName = "Items";
tooltip = "Array/comma-seperated values of items that the unit/s can use. Also accepts file/s; IE: 'file://path\to\file.sqf' or 'file://path\to\file.sqf//path\to\file2.sqf'.";
// Default text for the input box:
defaultValue = """[]"""; // Because this is an expression, one must have a string within a string to return a string
};
};
};
class GRRA_ModuleBaseArsenal: Module_F
{
scope = 2;
displayName = "Base Arsenal";
icon = GRRA_MOD_ICON;
category = "GRRA_Modules";
function = "";
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
isDisposable = 1;
is3DEN = 1;
curatorInfoType = "";
class Attributes: AttributesBase
{
// Module-specific arguments:
class Side: Combo
{
property = "GRRA_ModuleBaseArsenal_Side";
displayName = "Side";
tooltip = "Side that has access to the base arsenal.";
typeName = "NUMBER";
defaultValue = "0";
class Values
{
class opt0 { name = "ALL"; value = 0; };
class opt1 { name = "BLUFOR"; value = 1; };
class opt2 { name = "OPFOR"; value = 2; };
class opt3 { name = "INDEPENDENT"; value = 3; };
class opt4 { name = "CIVILIAN"; value = 4; };
};
};
class Owner: Edit
{
property = "GRRA_ModuleBaseArsenal_Owner";
displayName = "Owner";
tooltip = "Variable or classname of the arsenal object.";
defaultValue = """""";
};
class Items: Edit
{
property = "GRRA_ModuleBaseArsenal_Items";
displayName = "Items";
tooltip = "Array/comma-seperated values of items that the unit/s can use. Also accepts file/s; IE: 'file://path\to\file.sqf' or 'file://path\to\file.sqf//path\to\file2.sqf'.";
defaultValue = """[]""";
};
};
};
class GRRA_AceArsenalOverride: Module_F
{
scope = 2;
displayName = "Force Vanilla Arsenal";
icon = GRRA_MOD_ICON;
category = "GRRA_Modules";
function = "";
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 1;
isDisposable = 1;
is3DEN = 1;
curatorInfoType = "";
class Attributes: AttributesBase {};
};
};
#include "CfgFunctions.hpp"
class ctrlMenuStrip;
class display3DEN
{
class Controls
{
class MenuStrip: ctrlMenuStrip
{
class Items
{
class Tools
{
items[] += {"GRRA_ArsenalEditor"};
};
class GRRA_ArsenalEditor
{
text = "Arsenal Formatter";
picture = GRRA_MOD_ICON;
action = "[] call GRRA_fnc_formatter;";
opensNewWindow = 1;
};
};
};
};
};