forked from FatLurch/Ammocan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.cpp
490 lines (419 loc) · 14.9 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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
class CfgPatches
{
class Fat_Lurch_Ammocan
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Weapons_F_Mark"};
version="0.1";
author="Fat_Lurch";
};
};
//required for Zeus to see the item?
class CfgAddons
{
class PreloadAddons
{
class Fat_Lurch_Ammocan
{
list[] =
{
"Fat_Lurch_Ammocan"
};
};
};
};
class CfgFunctions
{
class fatLurch
{
class ammocan
{
//[_unit, _weapon]call fatLurch_fnc_getTurretIndex;
class getTurretIndex {file = "Ammocan\functions\getTurretIndex.sqf";};
//[_container, _magazine]call fatLurch_fnc_removeMagazine;
class removeMagazine {file = "Ammocan\functions\removeMagazine.sqf";};
//[_vehicle]call fatLurch_fnc_initAmmocan;
class initAmmocan {file = "Ammocan\functions\initAmmocan.sqf";};
//[_vehicle]call fatLurch_fnc_removeEmptyMagsTurret;
class removeEmptyMagsTurret {file = "Ammocan\functions\removeEmptyMagsTurret.sqf";};
//[_ammoType]call fatLurch_fnc_findAmmocanType;
class findAmmocanType {file = "Ammocan\functions\findAmmocanType.sqf";};
//[_vehicle]call fatLurch_fnc_convertTurretAmmo;
class convertTurretAmmo {file = "Ammocan\functions\convertTurretAmmo.sqf";};
//[_vehicle, _turretPath]call fatLurch_fnc_getTurretAmmo;
class getTurretAmmo {file = "Ammocan\functions\getTurretAmmo.sqf";};
//[_vehicle, _turretPath]call fatLurch_fnc_nonEmptyMagsTurret;
class nonEmptyMagsTurret {file = "Ammocan\functions\nonEmptyMagsTurret.sqf";};
//[_vehicle, _turretPath]call fatLurch_fnc_getTurretWeapons;
class getTurretWeapons {file = "Ammocan\functions\getTurretWeapons.sqf";};
//[_vehicle, _turretPath, _weapon]call fatLurch_fnc_getWeaponAmmo;
class getWeaponAmmo {file = "Ammocan\functions\getWeaponAmmo.sqf";};
//[_array]call fatLurch_fnc_toLowerArray;
class toLowerArray {file = "Ammocan\functions\toLowerArray.sqf";};
};
};
};
class Extended_Init_EventHandlers
{
class air
{
class Fat_Lurch_ammocan_air {init = "(_this select 0) call fatLurch_fnc_initAmmocan;";};
};
class car
{
class Fat_Lurch_ammocan_car {init = "(_this select 0) call fatLurch_fnc_initAmmocan;";};
};
class tank
{
class Fat_Lurch_ammocan_tank {init = "(_this select 0) call fatLurch_fnc_initAmmocan;";};
};
class ship
{
class Fat_Lurch_ammocan_ship {init = "(_this select 0) call fatLurch_fnc_initAmmocan;";};
};
};
// ##############################################################################################
// ###### IMPORTANT! In order for an ammocan type to show up in rifle magazines it must be listed in the array below
// ##############################################################################################
class cfgWeapons
{
class Rifle_Base_F;
class ammocan_fake_gun:Rifle_Base_F
{
magazines[] =
{
"Ammocan_200Rnd_127x99_mag",
"Ammocan_200Rnd_127x99_mag_Tracer_Red",
"Ammocan_200Rnd_127x99_mag_Tracer_Yellow",
"Ammocan_200Rnd_127x99_mag_Tracer_Green",
"Ammocan_200Rnd_127x99_mag_SLAP",
"Ammocan_200Rnd_127x99_mag_SLAP_Tracer_Red",
"Ammocan_100Rnd_127x99_mag",
"Ammocan_100Rnd_127x99_mag_Tracer_Red",
"Ammocan_100Rnd_127x99_mag_Tracer_Yellow",
"Ammocan_100Rnd_127x99_mag_Tracer_Green",
"Ammocan_100Rnd_127x99_mag_SLAP",
"Ammocan_100Rnd_127x99_mag_SLAP_Tracer_Red",
"Ammocan_130Rnd_338_mag",
"Ammocan_RHS_48Rnd_40mm_MK19_M430A1",
"Ammocan_RHS_48Rnd_40mm_MK19_M1001",
"Ammocan_96Rnd_40mm_G_belt",
"Ammocan_RHS_48Rnd_40mm_MK19_M1001",
"Ammocan_rhs_mag_762x51_M240_200_M80",
"Ammocan_rhs_mag_762x51_M240_200",
"Ammocan_rhs_mag_400rnd_127x99_mag",
"Ammocan_400Rnd_127x99_mag_Tracer_Red",
"Ammocan_400Rnd_127x99_mag_SLAP",
"Ammocan_400Rnd_127x99_mag_SLAP_Tracer_Red",
"Ammocan_rhs_mag_TOW",
"Ammocan_rhs_mag_TOWB",
"Ammocan_rhs_mag_ITOW",
"Ammocan_rhs_mag_TOW2",
"Ammocan_rhs_mag_TOW2A",
"Ammocan_rhs_mag_TOW2b",
"Ammocan_rhs_mag_TOW2b_aero",
"Ammocan_rhs_mag_TOW2bb",
"Ammocan_2000Rnd_762x51_Belt_T_Red",
"Ammocan_1Rnd_GAT_missiles"
};
};
};
class cfgVehicles
{
class Land_FireExtinguisher_F;
class Test_thing:Land_FireExtinguisher_F
{
ammocan = "true";
ammo = "";
author = "Fat_Lurch";
displayName = "M2A1 Ammocan";
picture = "\Ammocan\data\ammocan.paa";
model = "\Ammocan\M2A1.p3d";
hiddenSelections[] = {"camo"}; // List of model selections which can be changed with hiddenSelectionTextures[]
hiddenSelectionsTextures[] = {"Ammocan\data\Marking_100x_M2.paa"}; // The textures for the selections defined above.
};
};
class CfgMagazines
{
// Base Config Setup #############################################################################################
class 30Rnd_556x45_Stanag;
class ammocan_base:30Rnd_556x45_Stanag
{
ammocan = "true";
ammo = "";
author = "Fat_Lurch";
picture = "\Ammocan\data\ammocan.paa";
//model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d";
model = "\Ammocan\M2A1.p3d";
mass = 50;
};
// 400x 12.7x99 NATO aka .50 BMG =====================================================================================================
class Ammocan_rhs_mag_400rnd_127x99_mag:ammocan_base
{
//RHS
displayName = " Ammocan - 400x .50 Cal (12.7x99) M2 Ball";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm<br>400 Rounds";
magazines[] = {"rhs_mag_400rnd_127x99_mag"};
};
class Ammocan_400Rnd_127x99_mag_Tracer_Red:ammocan_base
{
//RHS
displayName = " Ammocan - 400x .50 Cal (12.7x99) M2 Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Red Tracer<br>400 Rounds";
magazines[] = {"rhs_mag_400rnd_127x99_mag_Tracer_Red"};
};
class Ammocan_400Rnd_127x99_mag_SLAP:ammocan_base
{
//RHS
displayName = " Ammocan - 400x .50 Cal (12.7x99) M903 SLAP";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm M903 SLAP<br>400 Rounds";
magazines[] = {"rhs_mag_400rnd_127x99_SLAP_mag"};
};
class Ammocan_400Rnd_127x99_mag_SLAP_Tracer_Red:ammocan_base
{
//RHS
displayName = " Ammocan - 400x .50 Cal (12.7x99) M903 SLAP Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm M903 SLAP Red Tracer<br>400 Rounds";
magazines[] = {"rhs_mag_400rnd_127x99_SLAP_mag_Tracer_Red"};
};
// 200x 12.7x99 NATO aka .50 BMG =====================================================================================================
class Ammocan_200Rnd_127x99_mag:ammocan_base
{
//Vanilla
//RHS
displayName = " Ammocan - 200x .50 Cal (12.7x99) M2 Ball";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm<br>200 Rounds";
magazines[] = {"200Rnd_127x99_mag", "rhs_mag_200rnd_127x99_mag"};
};
class Ammocan_200Rnd_127x99_mag_Tracer_Red:ammocan_base
{
//Vanilla
//RHS
displayName = " Ammocan - 200x .50 Cal (12.7x99) M2 Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Red Tracer<br>200 Rounds";
magazines[] = {"200Rnd_127x99_mag_Tracer_Red", "rhs_mag_200rnd_127x99_mag_Tracer_Red"};
};
class Ammocan_200Rnd_127x99_mag_Tracer_Yellow:ammocan_base
{
//Vanilla
displayName = " Ammocan - 200x .50 Cal (12.7x99) M2 Yellow Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Yellow Tracer<br>200 Rounds";
magazines[] = {"200Rnd_127x99_mag_Tracer_Yellow"};
};
class Ammocan_200Rnd_127x99_mag_Tracer_Green:ammocan_base
{
//Vanilla
displayName = " Ammocan - 200x .50 Cal (12.7x99) M2 Green Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Green Tracer<br>200 Rounds";
magazines[] = {"200Rnd_127x99_mag_Tracer_Green"};
};
class Ammocan_200Rnd_127x99_mag_SLAP:ammocan_base
{
//RHS
displayName = " Ammocan - 200x .50 Cal (12.7x99) M903 SLAP";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm M903 SLAP<br>200 Rounds";
magazines[] = {"rhs_mag_200rnd_127x99_SLAP_mag"};
};
class Ammocan_200Rnd_127x99_mag_SLAP_Tracer_Red:ammocan_base
{
//RHS
displayName = " Ammocan - 200x .50 Cal (12.7x99) M903 SLAP Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm M903 SLAP Red Tracer<br>200 Rounds";
magazines[] = {"rhs_mag_200rnd_127x99_SLAP_mag_Tracer_Red"};
};
// 100x 12.7x99 NATO aka .50 BMG =====================================================================================================
class Ammocan_100Rnd_127x99_mag:ammocan_base
{
//Vanilla
//RHS
//CUP
displayName = " Ammocan - 100x .50 Cal (12.7x99) M2 Ball";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm<br>100 Rounds";
magazines[] = {"100Rnd_127x99_mag", "rhs_mag_100rnd_127x99_mag","CUP_100Rnd_127x99_M"};
};
class Ammocan_100Rnd_127x99_mag_Tracer_Red:ammocan_base
{
//Vanilla
//RHS
//CUP
displayName = " Ammocan - 100x .50 Cal (12.7x99) M2 Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Red Tracer<br>100 Rounds";
magazines[] = {"100Rnd_127x99_mag_Tracer_Red", "rhs_mag_100rnd_127x99_mag_Tracer_Red","CUP_100Rnd_TE4_Red_Tracer_127x99_M"};
};
class Ammocan_100Rnd_127x99_mag_Tracer_Yellow:ammocan_base
{
//Vanilla
//CUP
displayName = " Ammocan - 100x .50 Cal (12.7x99) M2 Yellow Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Yellow Tracer<br>100 Rounds";
magazines[] = {"100Rnd_127x99_mag_Tracer_Yellow", "CUP_100Rnd_TE4_Yellow_Tracer_127x99_M"};
};
class Ammocan_100Rnd_127x99_mag_Tracer_Green:ammocan_base
{
//Vanilla
//CUP
displayName = " Ammocan - 100x .50 Cal (12.7x99) M2 Green Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm Green Tracer<br>100 Rounds";
magazines[] = {"100Rnd_127x99_mag_Tracer_Green","CUP_100Rnd_TE4_Green_Tracer_127x99_M"};
};
class Ammocan_100Rnd_127x99_mag_Tracer_White:ammocan_base
{
//CUP
displayName = " Ammocan - 100x .50 Cal (12.7x99) M2 White Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm White Tracer<br>100 Rounds";
magazines[] = {"CUP_100Rnd_TE4_White_Tracer_127x99_M"};
};
class Ammocan_100Rnd_127x99_mag_SLAP:ammocan_base
{
//RHS
displayName = " Ammocan - 100x .50 Cal (12.7x99) M903 SLAP";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm M903 SLAP<br>100 Rounds";
magazines[] = {"rhs_mag_100rnd_127x99_SLAP_mag"};
};
class Ammocan_100Rnd_127x99_mag_SLAP_Tracer_Red:ammocan_base
{
//RHS
displayName = " Ammocan - 100x .50 Cal (12.7x99) M903 SLAP Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 12.7x99 mm M903 SLAP Red Tracer<br>100 Rounds";
magazines[] = {"rhs_mag_100rnd_127x99_SLAP_mag_Tracer_Red"};
};
// 130x .338 Magnum =====================================================================================================
class Ammocan_130Rnd_338_mag:ammocan_base
{
//Vanilla
displayName = " Ammocan - 130x .338 Norma Magnum";
descriptionShort = "Ammocan<br>Caliber: .338 Norma Magnum<br>130 Rounds";
magazines[] = {"130Rnd_338_Mag"};
};
// 48x 40mm =====================================================================================================
class Ammocan_RHS_48Rnd_40mm_MK19_M430A1:ammocan_base
{
//RHS
displayName = " Ammocan - 48x 40mm M430A1 HEDP";
descriptionShort = "Ammocan<br>Caliber: 40mm M430A1 HEDP<br>48 Rounds";
magazines[] = {"RHS_48Rnd_40mm_MK19_M430A1"};
};
class Ammocan_RHS_48Rnd_40mm_MK19_M1001:ammocan_base
{
//RHS
displayName = " Ammocan - 48x 40mm M1001 Canister";
descriptionShort = "Ammocan<br>Caliber: 40mm M1001 Canister<br>48 Rounds";
magazines[] = {"RHS_48Rnd_40mm_MK19_M1001"};
};
class Ammocan_96Rnd_40mm_G_belt:ammocan_base
{
//Vanilla
//RHS
displayName = " Ammocan - 96x 40mm M430A1 HEDP";
descriptionShort = "Ammocan<br>Caliber: 40mm M430A1 HEDP<br>96 Rounds";
magazines[] = {"RHS_96Rnd_40mm_MK19_M430A1", "96Rnd_40mm_G_belt"};
};
class Ammocan_RHS_96Rnd_40mm_MK19_M1001:ammocan_base
{
//RHS
displayName = " Ammocan - 96x 40mm M1001 Canister";
descriptionShort = "Ammocan<br>Caliber: 40mm M1001 Canister<br>96 Rounds";
magazines[] = {"RHS_96Rnd_40mm_MK19_M1001",};
};
// 200x 7.62x51 NATO =====================================================================================================
class Ammocan_rhs_mag_762x51_M240_200:ammocan_base
{
//RHS
displayName = " Ammocan - 200x 7.62x51mm M80A1 EPR";
descriptionShort = "Ammocan<br>Caliber: 7.62x51mm M80A1 EPR<br>200 Rounds";
magazines[] = {"rhs_mag_762x51_M240_200"};
};
class Ammocan_rhs_mag_762x51_M240_200_M80:ammocan_base
{
//RHS
displayName = " Ammocan - 200x 7.62x51mm M80 Ball";
descriptionShort = "Ammocan<br>Caliber: 7.62x51mm M80 Ball<br>200 Rounds";
magazines[] = {"rhs_mag_762x51_M240_200_M80"};
};
// 2000x 7.62x51 NATO =================================================================================================
class Ammocan_2000Rnd_762x51_Belt_T_Red:ammocan_base
{
//Vanilla
//CUP (used in M134)
displayName = " Ammocan - 2000x 7.62x51mm Red Tracer";
descriptionShort = "Ammocan<br>Caliber: 7.62x51mm Red Tracer<br>2000 Rounds";
magazines[] = {"CUP_2000Rnd_TE1_Red_Tracer_762x51_M134_M","2000Rnd_762x51_Belt_T_Red"};
mass = 150;
};
// 1x TOW Missile =====================================================================================================
class Ammocan_rhs_mag_TOW:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71A TOW Missile";
descriptionShort = "Ammocan<br>BGM-71A";
magazines[] = {"rhs_mag_TOW"};
mass = 80;
};
class Ammocan_rhs_mag_TOWB:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71B TOW Missile";
descriptionShort = "Ammocan<br>BGM-71B";
magazines[] = {"rhs_mag_TOWB"};
mass = 80;
};
class Ammocan_rhs_mag_ITOW:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71C ITOW Missile";
descriptionShort = "Ammocan<br>BGM-71C";
magazines[] = {"rhs_mag_ITOW"};
mass = 80;
};
class Ammocan_rhs_mag_TOW2:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71D TOW-2 Missile";
descriptionShort = "Ammocan<br>BGM-71D";
magazines[] = {"rhs_mag_TOW2"};
mass = 80;
};
class Ammocan_rhs_mag_TOW2A:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71E TOW-2A Missile";
descriptionShort = "Ammocan<br>BGM-71E";
magazines[] = {"rhs_mag_TOW2a"};
mass = 80;
};
class Ammocan_rhs_mag_TOW2b:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71F TOW-2B Missile";
descriptionShort = "Ammocan<br>BGM-71F";
magazines[] = {"rhs_mag_TOW2b"};
mass = 80;
};
class Ammocan_rhs_mag_TOW2b_aero:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71F-3 TOW-2B Aero Missile";
descriptionShort = "Ammocan<br>BGM-71F-3";
magazines[] = {"rhs_mag_TOW2b_aero"};
mass = 80;
};
class Ammocan_rhs_mag_TOW2bb:ammocan_base
{
//RHS
displayName = "Ammocan - BGM-71H Bunker Buster Missile";
descriptionShort = "Ammocan<br>BGM-71H ";
magazines[] = {"rhs_mag_TOW2bb"};
mass = 80;
};
// 1x AT Missile =====================================================================================================
class Ammocan_1Rnd_GAT_missiles:ammocan_base
{
//Vanilla
displayName = "Ammocan - 1x Titan AT Missile";
descriptionShort = "Ammocan<br>Titan AT";
magazines[] = {"1Rnd_GAT_missiles"};
mass = 80;
};
};