Skip to content

Commit e5fdccc

Browse files
authored
CSW - Add tripods stat (#10739)
1 parent fb4bd07 commit e5fdccc

6 files changed

+60
-0
lines changed

addons/csw/ACE_Arsenal_Stats.hpp

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class EGVAR(arsenal,stats) {
2+
class statBase;
3+
class GVAR(tripods): statBase {
4+
scope = 2;
5+
priority = -1.5;
6+
displayName = CSTRING(statTripods);
7+
condition = QUOTE((_this select 1) call FUNC(statTextCondition_tripods));
8+
showText = 1;
9+
textStatement = QUOTE((_this select 1) call FUNC(statTextStatement_tripods));
10+
tabs[] = {{0, 2}, {}};
11+
};
12+
};

addons/csw/XEH_PREP.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ PREP(reload_loadMagazine);
3434

3535
PREP(initVehicle);
3636
PREP(staticWeaponInit_unloadExtraMags);
37+
38+
PREP(statTextCondition_tripods);
39+
PREP(statTextStatement_tripods);

addons/csw/config.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ class CfgPatches {
2020
#include "CfgWeapons.hpp"
2121
#include "CfgMagazines.hpp"
2222
#include "CfgMagazineGroups.hpp"
23+
#include "ACE_Arsenal_Stats.hpp"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include "..\script_component.hpp"
2+
/*
3+
* Author: johnb43
4+
* Text condition for displaying which tripods are needed for a CSW.
5+
*
6+
* Arguments:
7+
* 0: Item config path <CONFIG>
8+
*
9+
* Return Value:
10+
* Whether to display stat or not <BOOL>
11+
*
12+
* Public: No
13+
*/
14+
15+
params ["_config"];
16+
17+
(configProperties [configFile >> "CfgWeapons" >> configName _config >> QUOTE(ADDON) >> "assembleTo", "true", true]) isNotEqualTo []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include "..\script_component.hpp"
2+
/*
3+
* Author: johnb43
4+
* Text statement for displaying which tripods are needed for a CSW.
5+
*
6+
* Arguments:
7+
* 0: Item config path <CONFIG>
8+
*
9+
* Return Value:
10+
* Stat Text <ARRAY of STRINGS>
11+
*
12+
* Public: No
13+
*/
14+
15+
params ["_config"];
16+
17+
private _cfgWeapons = configFile >> "CfgWeapons";
18+
private _cfgVehicles = configFile >> "CfgVehicles";
19+
20+
(configProperties [_cfgWeapons >> configName _config >> QUOTE(ADDON) >> "assembleTo", "true", true]) apply {
21+
private _tripod = getText (_cfgVehicles >> configName _x >> QUOTE(ADDON) >> "disassembleTo");
22+
23+
getText (_cfgWeapons >> _tripod >> "displayName")
24+
}

addons/csw/stringtable.xml

+3
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,9 @@
11191119
<Chinesesimp>[班组] SPG-9M 发射器包</Chinesesimp>
11201120
<Turkish>[CSW] SPG-9M Launcher Bag</Turkish>
11211121
</Key>
1122+
<Key ID="STR_ACE_CSW_statTripods">
1123+
<English>Mounts on:</English>
1124+
</Key>
11221125
<Key ID="STR_ACE_CSW_tow_tube">
11231126
<English>[CSW] BGM-71 TOW Launcher Bag</English>
11241127
<Czech>[CSW] BGM-71 TOW raketomet v pouzdře</Czech>

0 commit comments

Comments
 (0)