Skip to content

Commit e6e480b

Browse files
authored
General - Fix HEMTT lints (#1414)
1 parent 16cb2e8 commit e6e480b

39 files changed

+3422
-3455
lines changed

.hemtt/lints.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[config.file_type]
22
enabled = false
33

4+
[stringtables.usage]
5+
options.ignore_unused = true
6+
47
[sqf.banned_commands]
58
options.ignore = [
69
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax

addons/ace_interact/stringtable.xml

Lines changed: 190 additions & 190 deletions
Large diffs are not rendered by default.

addons/api/CfgModules.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ class CfgFactionClasses {
66
};
77
class CfgVehicles {
88
class Logic;
9-
class Module_F: Logic { class ArgumentsBaseUnits { class Units; }; class ModuleDescription { class AnyBrain; }; };
9+
class Module_F: Logic {
10+
class ModuleDescription;
11+
};
1012

1113
class GVAR(basicMissionSetup): Module_F {
1214
scope = 2;

addons/api/stringtable.xml

Lines changed: 427 additions & 427 deletions
Large diffs are not rendered by default.

addons/compat_spe/SPE_Tanks.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class SPE_Tank_base: Tank_F {
3838
intercom[] = {"intercom_1"}; // list of intercoms that can talk over the radio even if not a slot in allowedPositions
3939
};
4040
};
41-
42-
class Turrets;
4341
};
4442

4543
// American

addons/compat_spe/SPE_Wheeled.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class SPE_ArmoredCar_base: Wheeled_APC_F { // Get rid of any inherited values
3838

3939
class SPE_Halftrack_base;
4040

41-
class SPE_WheeledTracked_APC_base;
42-
4341
//American
4442
class SPE_M8_LAC_base: SPE_ArmoredCar_base {
4543
class AcreRacks {

addons/compat_spe/stringtable.xml

Lines changed: 172 additions & 172 deletions
Large diffs are not rendered by default.

addons/main/stringtable.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<Package name="Main">
44
<Key ID="STR_ACRE_Main_Author">
55
<English>ACRE2Team</English>
6-
<German>ACRE2Team</German>
7-
<Polish>ACRE2Team</Polish>
8-
<Portuguese>ACRE2Team</Portuguese>
9-
<Russian>ACRE2Team</Russian>
106
<Czech>ACRE2Team</Czech>
7+
<French>ACRE2Team</French>
118
<Spanish>ACRE2Team</Spanish>
129
<Italian>ACRE2Team</Italian>
13-
<French>ACRE2Team</French>
10+
<Polish>ACRE2Team</Polish>
11+
<Portuguese>ACRE2Team</Portuguese>
12+
<Russian>ACRE2Team</Russian>
13+
<German>ACRE2Team</German>
1414
<Korean>ACRE2Team</Korean>
1515
<Japanese>ACRE2チーム</Japanese>
1616
<Chinese>ACRE2製作組</Chinese>
@@ -19,14 +19,14 @@
1919
</Key>
2020
<Key ID="STR_ACRE_Main_URL">
2121
<English>https://github.com/IDI-Systems/acre2</English>
22-
<German>https://github.com/IDI-Systems/acre2</German>
23-
<Polish>https://github.com/IDI-Systems/acre2</Polish>
24-
<Portuguese>https://github.com/IDI-Systems/acre2</Portuguese>
25-
<Russian>https://github.com/IDI-Systems/acre2</Russian>
2622
<Czech>https://github.com/IDI-Systems/acre2</Czech>
23+
<French>https://github.com/IDI-Systems/acre2</French>
2724
<Spanish>https://github.com/IDI-Systems/acre2</Spanish>
2825
<Italian>https://github.com/IDI-Systems/acre2</Italian>
29-
<French>https://github.com/IDI-Systems/acre2</French>
26+
<Polish>https://github.com/IDI-Systems/acre2</Polish>
27+
<Portuguese>https://github.com/IDI-Systems/acre2</Portuguese>
28+
<Russian>https://github.com/IDI-Systems/acre2</Russian>
29+
<German>https://github.com/IDI-Systems/acre2</German>
3030
<Korean>https://github.com/IDI-Systems/acre2</Korean>
3131
<Japanese>https://github.com/IDI-Systems/acre2</Japanese>
3232
<Chinese>https://github.com/IDI-Systems/acre2</Chinese>
Lines changed: 134 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,134 @@
1-
#include "script_component.hpp"
2-
/*
3-
* Author: ACRE2Team
4-
* Draws debug information and hints about attenuation values
5-
*
6-
* Arguments:
7-
* None
8-
*
9-
* Return Value:
10-
* None
11-
*
12-
* Example:
13-
* [] call acre_sys_attenuate_fnc_debugDraw;
14-
*
15-
* Public: No
16-
*/
17-
18-
private _speakers = allUnits;
19-
private _vehicleSpeakers = (_speakers) select {_x in (crew (vehicle acre_player))};
20-
private _outsideSpeakers = (_speakers - _vehicleSpeakers);
21-
22-
private _hintMsg = [];
23-
_hintMsg pushBack "<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>ACRE Attenuation</t><br/><br />";
24-
25-
// Print player's vehicle role and compartment
26-
if (!isNull objectParent acre_player) then {
27-
_hintMsg pushBack "<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>Vehicle</t><br/>";
28-
{
29-
_hintMsg pushBack (format ["<t align='left' font='PuristaMedium'>%1</t><t align='right' font='PuristaBold'>%2</t><br/>",
30-
format ["%1 (%2, %3)", name _x select [0, 10], [_x] call CBA_fnc_vehicleRole, [_x] call acre_sys_core_fnc_getCompartment],
31-
([_x] call acre_sys_attenuate_fnc_getUnitAttenuate)
32-
]);
33-
} forEach _vehicleSpeakers;
34-
};
35-
36-
// Print speakers or outside speakers and their roles
37-
private _fnc_getSpeakerText = {
38-
params ["_unit"];
39-
40-
private _name = name _unit select [0, 10];
41-
if (!isNull objectParent _unit) then {
42-
_name = _name + format[" <t color='#0051a1'>(vehicle, %1)</t>", [_unit] call CBA_fnc_vehicleRole];
43-
};
44-
45-
format ["<t align='left' font='PuristaMedium'>%1</t><t align='right' font='PuristaBold'>%2</t><br/>",
46-
_name,
47-
([_unit] call acre_sys_attenuate_fnc_getUnitAttenuate)
48-
]
49-
};
50-
51-
if (count _outsideSpeakers > 0) then {
52-
_hintMsg pushBack (format["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", ["Outside", "Speakers"] select (isNull objectParent acre_player)]);
53-
{
54-
_hintMsg pushBack ([_x] call _fnc_getSpeakerText);
55-
} forEach _outsideSpeakers;
56-
};
57-
58-
_hintMsg pushBack "<br/>";
59-
60-
// Print vehicle classname and compartment config values
61-
private _type = typeOf (vehicle acre_player);
62-
private _config = configFile >> "CfgVehicles" >> (typeOf (vehicle acre_player));
63-
private _compartments = ["Compartment1","Compartment2","Compartment3","Compartment4"] apply {
64-
["", _x] select (isClass (_config >> "ACRE" >> "attenuation" >> _x))
65-
};
66-
_compartments = _compartments - [""];
67-
68-
private _compartmentsCount = count _compartments;
69-
if (_compartmentsCount > 0) then {
70-
_hintMsg pushBack (format["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", _type]);
71-
};
72-
73-
{
74-
private _rootAtt = _x;
75-
private _attConfig = _config >> "ACRE" >> "attenuation" >> _rootAtt;
76-
77-
_hintMsg pushBack (format ["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", _rootAtt]);
78-
79-
{
80-
private _attenuation = getNumber(_attConfig >> _x);
81-
if (_attenuation > 0) then {
82-
_hintMsg pushBack (format ["<t align='left' font='PuristaMedium'> %1 = %2", _x select [11], _attenuation]);
83-
84-
if (_forEachIndex == (_compartmentsCount - 1)) then {
85-
_hintMsg pushBack "</t>";
86-
} else {
87-
_hintMsg pushBack " | </t>";
88-
};
89-
};
90-
} forEach _compartments;
91-
_hintMsg pushBack "<br/>";
92-
} forEach _compartments;
93-
94-
_compartmentsTurnedOut = ["Compartment1","Compartment2","Compartment3","Compartment4"] apply {
95-
["", _x] select (isClass (_config >> "ACRE" >> "attenuationTurnedOut" >> _x))
96-
};
97-
_compartmentsTurnedOut = _compartmentsTurnedOut - [""];
98-
99-
private _compartmentsTurnedOutCount = count _compartmentsTurnedOut;
100-
if (_compartmentsTurnedOutCount > 0) then {
101-
_hintMsg pushBack (format ["<t align='left' size='1.15' color='#0051a1' font='PuristaMedium'>%1</t><br/>", "Turned Out"]);
102-
};
103-
104-
{
105-
private _rootAtt = _x;
106-
private _attConfig = _config >> "ACRE" >> "attenuationTurnedOut" >> _rootAtt;
107-
108-
_hintMsg pushBack (format ["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", _x]);
109-
110-
{
111-
private _attenuation = getNumber(_attConfig >> _x);
112-
if (_attenuation > 0) then {
113-
_hintMsg pushBack (format ["<t align='left' font='PuristaMedium'> %1 = %2", _x select [11], _attenuation]);
114-
115-
if (_forEachIndex == (_compartmentsCount - 1)) then {
116-
_hintMsg pushBack "</t>";
117-
} else {
118-
_hintMsg pushBack " | </t>";
119-
};
120-
};
121-
} forEach _compartmentsTurnedOut;
122-
_hintMsg pushBack "<br/>";
123-
} forEach _compartmentsTurnedOut;
124-
125-
hintSilent parseText (_hintMsg joinString "");
126-
127-
// Draw attenuation values for all speakers
128-
{
129-
private _dir = (getDir (missionNamespace getVariable ["BIS_DEBUG_CAM", acre_player])) - (getDir _x);
130-
private _atten = [_x] call acre_sys_attenuate_fnc_getUnitAttenuate;
131-
private _color = [0, 1 - _atten, _atten, _atten + .6];
132-
private _text = format ["%1: %2", (name _x) select [0,10], _atten];
133-
drawIcon3D ["\a3\ui_f\data\GUI\Cfg\Hints\icon_text\group_1_ca.paa", _color, _x modelToWorldVisual [0,0,0], 1, 1, _dir, _text, 1, 0.04, "RobotoCondensed"];
134-
} forEach _speakers;
1+
#include "script_component.hpp"
2+
/*
3+
* Author: ACRE2Team
4+
* Draws debug information and hints about attenuation values
5+
*
6+
* Arguments:
7+
* None
8+
*
9+
* Return Value:
10+
* None
11+
*
12+
* Example:
13+
* [] call acre_sys_attenuate_fnc_debugDraw;
14+
*
15+
* Public: No
16+
*/
17+
18+
private _speakers = allUnits;
19+
private _vehicleSpeakers = (_speakers) select {_x in (crew (vehicle acre_player))};
20+
private _outsideSpeakers = (_speakers - _vehicleSpeakers);
21+
22+
private _hintMsg = [];
23+
_hintMsg pushBack "<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>ACRE Attenuation</t><br/><br />";
24+
25+
// Print player's vehicle role and compartment
26+
if (!isNull objectParent acre_player) then {
27+
_hintMsg pushBack "<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>Vehicle</t><br/>";
28+
{
29+
_hintMsg pushBack (format ["<t align='left' font='PuristaMedium'>%1</t><t align='right' font='PuristaBold'>%2</t><br/>",
30+
format ["%1 (%2, %3)", name _x select [0, 10], [_x] call CBA_fnc_vehicleRole, [_x] call acre_sys_core_fnc_getCompartment],
31+
([_x] call acre_sys_attenuate_fnc_getUnitAttenuate)
32+
]);
33+
} forEach _vehicleSpeakers;
34+
};
35+
36+
// Print speakers or outside speakers and their roles
37+
private _fnc_getSpeakerText = {
38+
params ["_unit"];
39+
40+
private _name = name _unit select [0, 10];
41+
if (!isNull objectParent _unit) then {
42+
_name = _name + format[" <t color='#0051a1'>(vehicle, %1)</t>", [_unit] call CBA_fnc_vehicleRole];
43+
};
44+
45+
format ["<t align='left' font='PuristaMedium'>%1</t><t align='right' font='PuristaBold'>%2</t><br/>",
46+
_name,
47+
([_unit] call acre_sys_attenuate_fnc_getUnitAttenuate)
48+
]
49+
};
50+
51+
if (_outsideSpeakers isNotEqualTo []) then {
52+
_hintMsg pushBack (format["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", ["Outside", "Speakers"] select (isNull objectParent acre_player)]);
53+
{
54+
_hintMsg pushBack ([_x] call _fnc_getSpeakerText);
55+
} forEach _outsideSpeakers;
56+
};
57+
58+
_hintMsg pushBack "<br/>";
59+
60+
// Print vehicle classname and compartment config values
61+
private _type = typeOf (vehicle acre_player);
62+
private _config = configOf (vehicle acre_player);
63+
private _compartments = ["Compartment1","Compartment2","Compartment3","Compartment4"] apply {
64+
["", _x] select (isClass (_config >> "ACRE" >> "attenuation" >> _x))
65+
};
66+
_compartments = _compartments - [""];
67+
68+
private _compartmentsCount = count _compartments;
69+
if (_compartmentsCount > 0) then {
70+
_hintMsg pushBack (format["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", _type]);
71+
};
72+
73+
{
74+
private _rootAtt = _x;
75+
private _attConfig = _config >> "ACRE" >> "attenuation" >> _rootAtt;
76+
77+
_hintMsg pushBack (format ["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", _rootAtt]);
78+
79+
{
80+
private _attenuation = getNumber(_attConfig >> _x);
81+
if (_attenuation > 0) then {
82+
_hintMsg pushBack (format ["<t align='left' font='PuristaMedium'> %1 = %2", _x select [11], _attenuation]);
83+
84+
if (_forEachIndex == (_compartmentsCount - 1)) then {
85+
_hintMsg pushBack "</t>";
86+
} else {
87+
_hintMsg pushBack " | </t>";
88+
};
89+
};
90+
} forEach _compartments;
91+
_hintMsg pushBack "<br/>";
92+
} forEach _compartments;
93+
94+
_compartmentsTurnedOut = ["Compartment1","Compartment2","Compartment3","Compartment4"] apply {
95+
["", _x] select (isClass (_config >> "ACRE" >> "attenuationTurnedOut" >> _x))
96+
};
97+
_compartmentsTurnedOut = _compartmentsTurnedOut - [""];
98+
99+
private _compartmentsTurnedOutCount = count _compartmentsTurnedOut;
100+
if (_compartmentsTurnedOutCount > 0) then {
101+
_hintMsg pushBack (format ["<t align='left' size='1.15' color='#0051a1' font='PuristaMedium'>%1</t><br/>", "Turned Out"]);
102+
};
103+
104+
{
105+
private _rootAtt = _x;
106+
private _attConfig = _config >> "ACRE" >> "attenuationTurnedOut" >> _rootAtt;
107+
108+
_hintMsg pushBack (format ["<t align='left' size='1.15' color='#68bbff' font='PuristaMedium'>%1</t><br/>", _x]);
109+
110+
{
111+
private _attenuation = getNumber(_attConfig >> _x);
112+
if (_attenuation > 0) then {
113+
_hintMsg pushBack (format ["<t align='left' font='PuristaMedium'> %1 = %2", _x select [11], _attenuation]);
114+
115+
if (_forEachIndex == (_compartmentsCount - 1)) then {
116+
_hintMsg pushBack "</t>";
117+
} else {
118+
_hintMsg pushBack " | </t>";
119+
};
120+
};
121+
} forEach _compartmentsTurnedOut;
122+
_hintMsg pushBack "<br/>";
123+
} forEach _compartmentsTurnedOut;
124+
125+
hintSilent parseText (_hintMsg joinString "");
126+
127+
// Draw attenuation values for all speakers
128+
{
129+
private _dir = (getDir (missionNamespace getVariable ["BIS_DEBUG_CAM", acre_player])) - (getDir _x);
130+
private _atten = [_x] call acre_sys_attenuate_fnc_getUnitAttenuate;
131+
private _color = [0, 1 - _atten, _atten, _atten + .6];
132+
private _text = format ["%1: %2", (name _x) select [0,10], _atten];
133+
drawIcon3D ["\a3\ui_f\data\GUI\Cfg\Hints\icon_text\group_1_ca.paa", _color, _x modelToWorldVisual [0,0,0], 1, 1, _dir, _text, 1, 0.04, "RobotoCondensed"];
134+
} forEach _speakers;

addons/sys_components/CfgAcreComponents.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
class CfgAcreComponents {
2-
class Default;
3-
42
class ACRE_ComponentBase {
53
simple = 0;
64
type = ACRE_COMPONENT_GENERIC;

0 commit comments

Comments
 (0)