Skip to content

Commit e9e980c

Browse files
committed
Add mock gl for testing
1 parent 35fe493 commit e9e980c

File tree

6 files changed

+40
-0
lines changed

6 files changed

+40
-0
lines changed

addons/xm157/CfgAmmo.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifdef CREATE_MOCK_PLATFORMS
2+
class CfgAmmo {
3+
class G_40mm_HE;
4+
class GVAR(mock_airburst): G_40mm_HE {
5+
class Eventhandlers {
6+
fired = QUOTE(call ace_xm157_fnc_airburst_ammoFired);
7+
};
8+
};
9+
};
10+
#endif

addons/xm157/CfgMagazines.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifdef CREATE_MOCK_PLATFORMS
2+
class CfgMagazines {
3+
class 1Rnd_HE_Grenade_shell;
4+
class GVAR(mock_airburst_mag): 1Rnd_HE_Grenade_shell {
5+
displayName = "Mock Airburst Grenade";
6+
ammo = QGVAR(mock_airburst);
7+
count = 5;
8+
initSpeed = 210;
9+
scope = 1;
10+
};
11+
};
12+
#endif

addons/xm157/CfgWeapons.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,16 @@ class CfgWeapons {
4646
};
4747
};
4848
};
49+
#ifdef CREATE_MOCK_PLATFORMS
50+
class arifle_MX_Black_F;
51+
class GVAR(mock_gl): arifle_MX_Black_F {
52+
scope = 1;
53+
scopeArsenal = 1;
54+
magazineWell[] = {};
55+
magazines[] = { QGVAR(mock_airburst_mag) };
56+
modes[] = {"Single"};
57+
discreteDistance[] = {100};
58+
discreteDistanceInitIndex = 0;
59+
};
60+
#endif
4961
};

addons/xm157/XEH_postInit.sqf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ GVAR(data) set ["latitude", EGVAR(common,mapLatitude)];
4040

4141

4242
#ifdef ENABLE_QUICK_TESTING
43+
#ifdef CREATE_MOCK_PLATFORMS
44+
[player, "ace_xm157_mock_gl", 5] call bis_fnc_addWeapon;
45+
#endif
4346
player addPrimaryWeaponItem "ace_xm157_prototype";
4447
[player] call CBA_fnc_addUnitTrackProjectiles;
4548
player addItem "ACE_ATragMX";

addons/xm157/config.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class CfgPatches {
1414
};
1515
};
1616

17+
#include "CfgAmmo.hpp"
1718
#include "CfgEventHandlers.hpp"
19+
#include "CfgMagazines.hpp"
1820
#include "CfgSounds.hpp"
1921
#include "CfgWeapons.hpp"
2022
#include "RscInGameUI.hpp"

addons/xm157/script_component.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// #define DISABLE_COMPILE_CACHE
77
// #define ENABLE_PERFORMANCE_COUNTERS
88
// #define ENABLE_QUICK_TESTING
9+
// #define CREATE_MOCK_PLATFORMS
910

1011
#include "\z\ace\addons\main\script_macros.hpp"
1112

0 commit comments

Comments
 (0)