Skip to content

Commit aa07a22

Browse files
committed
Moved - Config features and fixes to separate files
Why ================= So that they are organised by their feature/fix rather than by CfgVehicles, CfgWeapons, etc. This should make the config file much easier to read through and work with. CfgPatches must stay in the central config.cpp file because trying to separate out the values of its properties means only the last version of them will be used, rather than the values being appended. Issue ID: N/A
1 parent 81b783a commit aa07a22

9 files changed

+325
-283
lines changed

addons/core/CfgVehicles.hpp

-200
This file was deleted.

addons/core/config.cpp

+7-63
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class CfgFunctions {
3131
class common {
3232
file = "\x\bnb_e\core\functions\common";
3333
class addFullHeal {};
34+
class connectToServer {};
3435
};
3536

3637
class zeus_modules {
@@ -46,11 +47,6 @@ class CfgFunctions {
4647
class strToArray {};
4748
class toBoolean {};
4849
};
49-
50-
class direct_connect {
51-
file = "\x\bnb_e\core\functions\direct_connect";
52-
class connectToServer {};
53-
};
5450
};
5551
};
5652

@@ -66,61 +62,9 @@ class Extended_PostInit_EventHandlers {
6662
};
6763
};
6864

69-
class CfgWeapons {
70-
class ACE_ItemCore;
71-
class CBA_MiscItem_ItemInfo;
72-
class tfw_rf3080Item: ACE_ItemCore {
73-
class ItemInfo: CBA_MiscItem_ItemInfo{};
74-
};
75-
76-
// ACE Barrel Swap fixes
77-
class Rifle_Long_Base_F;
78-
class UK3CB_BAF_L110_Base : Rifle_Long_Base_F {
79-
ace_overheating_allowSwapBarrel = 1;
80-
};
81-
class UK3CB_BAF_L7A2 : Rifle_Long_Base_F {
82-
ace_overheating_allowSwapBarrel = 1;
83-
};
84-
85-
class LMG_03_base_F;
86-
class LMG_03_F : LMG_03_base_F {
87-
ace_overheating_allowSwapBarrel = 1;
88-
};
89-
};
90-
91-
class CfgMagazines {
92-
// Register the m112(x4) explosive charges (RHS) with ACE Explosives
93-
class CA_Magazine;
94-
class rhsusf_m112_mag : CA_Magazine {
95-
ACE_Explosives_Placeable = 1;
96-
useAction = 0;
97-
ACE_Explosives_SetupObject = "rhsusf_explosive_m112";
98-
ACE_Explosives_DelayTime = 1.5;
99-
100-
class ACE_Triggers {
101-
SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"};
102-
class Timer {
103-
FuseTime = 0.5;
104-
};
105-
106-
class Command {
107-
FuseTime = 0.5;
108-
};
109-
110-
class MK16_Transmitter : Command {};
111-
class DeadmanSwitch : Command {};
112-
};
113-
};
114-
class rhsusf_m112x4_mag : rhsusf_m112_mag {
115-
ACE_Explosives_SetupObject = "rhsusf_explosive_m112x4";
116-
};
117-
};
118-
119-
class CfgVehicles {
120-
#include "CfgVehicles.hpp";
121-
};
122-
123-
// Add server direct connect tiles
124-
class CfgMainMenuSpotlight {
125-
#include "connectionData.hpp";
126-
};
65+
// Config features/fixes
66+
#include "configs\CfgBarrelSwaps.hpp";
67+
#include "configs\CfgDirectConnect.hpp";
68+
#include "configs\CfgExplosives.hpp";
69+
#include "configs\CfgSatcom.hpp";
70+
#include "configs\CfgSupplyCrates.hpp";
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* ----------------------------------------------------------------------------
2+
Config: Barrel Swaps
3+
4+
Description:
5+
Registers modded and vanilla machineguns to be able to use the
6+
ACE barrel swap framework.
7+
8+
Author:
9+
Arend
10+
---------------------------------------------------------------------------- */
11+
class CfgWeapons {
12+
class Rifle_Long_Base_F;
13+
class UK3CB_BAF_L110_Base : Rifle_Long_Base_F {
14+
ace_overheating_allowSwapBarrel = 1;
15+
};
16+
class UK3CB_BAF_L7A2 : Rifle_Long_Base_F {
17+
ace_overheating_allowSwapBarrel = 1;
18+
};
19+
20+
class LMG_03_base_F;
21+
class LMG_03_F : LMG_03_base_F {
22+
ace_overheating_allowSwapBarrel = 1;
23+
};
24+
};
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* ----------------------------------------------------------------------------
2+
Config: Direct Connect
3+
4+
Description:
5+
Registers direct connection tiles to the main menu spotlight.
6+
7+
Author:
8+
Arend
9+
---------------------------------------------------------------------------- */
10+
class CfgMainMenuSpotlight {
11+
class bnb_e_public_server {
12+
text = "2BNB 2nd Server";
13+
textIsQuote = 0;
14+
picture = "\x\bnb_e\core\2bnb-tile.paa";
15+
video = "\x\bnb_e\core\2bnb-tile.ogv";
16+
action = "[""2bnb.eu"", 2369] call compile preprocessFileLineNumbers '\x\bnb_e\core\functions\common\fn_connectToServer.sqf'";
17+
actionText = "Connect";
18+
condition = true;
19+
};
20+
21+
class bnb_e_operations_server {
22+
text = "2BNB Server";
23+
textIsQuote = 0;
24+
picture = "\x\bnb_e\core\2bnb-tile.paa";
25+
video = "\x\bnb_e\core\2bnb-tile.ogv";
26+
action = "[""2bnb.eu"", 2302] call compile preprocessFileLineNumbers '\x\bnb_e\core\functions\common\fn_connectToServer.sqf'";
27+
actionText = "Connect";
28+
condition = true;
29+
};
30+
};

addons/core/configs/CfgExplosives.hpp

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* ----------------------------------------------------------------------------
2+
Config: ACE Explosives
3+
4+
Description:
5+
Registers RHS explosives to ACE Explosives framework.
6+
7+
Author:
8+
Arend
9+
---------------------------------------------------------------------------- */
10+
class CfgMagazines {
11+
class CA_Magazine;
12+
class rhsusf_m112_mag : CA_Magazine {
13+
ACE_Explosives_Placeable = 1;
14+
useAction = 0;
15+
ACE_Explosives_SetupObject = "rhsusf_explosive_m112";
16+
ACE_Explosives_DelayTime = 1.5;
17+
18+
class ACE_Triggers {
19+
SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"};
20+
class Timer {
21+
FuseTime = 0.5;
22+
};
23+
24+
class Command {
25+
FuseTime = 0.5;
26+
};
27+
28+
class MK16_Transmitter : Command {};
29+
class DeadmanSwitch : Command {};
30+
};
31+
};
32+
class rhsusf_m112x4_mag : rhsusf_m112_mag {
33+
ACE_Explosives_SetupObject = "rhsusf_explosive_m112x4";
34+
};
35+
};
36+
37+
class CfgVehicles {
38+
class ACE_Explosives_Place;
39+
class rhsusf_explosive_m112 : ACE_Explosives_Place {};
40+
class rhsusf_explosive_m112x4 : ACE_Explosives_Place {};
41+
};

0 commit comments

Comments
 (0)