Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into JAM-add-FRF2,-Hec…
Browse files Browse the repository at this point in the history
…ate,-22mm-NATO
  • Loading branch information
Drofseh committed Mar 28, 2024
2 parents 676f8da + 18a1699 commit de659d9
Show file tree
Hide file tree
Showing 60 changed files with 124 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Rename build folder
run: mv .hemttout/build .hemttout/@CBA_A3
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: CBA_A3_${{ github.sha }}-nobin
path: .hemttout/@*
4 changes: 2 additions & 2 deletions .github/workflows/pboproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @cba_a3
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: '@cba_a3-${{ github.sha }}'
path: x\cba\release\@cba_a3
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
if: github.repository == 'CBATeam/CBA_A3'
steps:
- name: Release Drafter
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 0 additions & 4 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ git_hash = 0
enabled = true
exclude = [
".inc.sqf",
"diagnostic/fnc_isdebugconsoleallowed.sqf",
"xeh/fnc_initdisplay.sqf",
"xeh/fnc_startloadingscreen.sqf",
"xeh/fnc_endloadingscreen.sqf",
"/test_"
]

Expand Down
2 changes: 1 addition & 1 deletion addons/accessory/fnc_addAttachmentCondition.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Author:

params [["_item", "", [""]], ["_condition", {true}, [{}]]];

if (!isClass (configfile >> "CfgWeapons" >> _item)) exitWith { ERROR_1("Item not found [%1]", _item); };
if (!isClass (configfile >> "CfgWeapons" >> _item)) exitWith { ERROR_1("Item not found [%1]",_item); };

private _usageArray = GVAR(usageHash) getOrDefault [_item, [], true];
_usageArray pushBack _condition;
2 changes: 1 addition & 1 deletion addons/accessory/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Italian>Community Base Addons - Funzioni per Accessori</Italian>
<Czech>Community Base Addons - Funkce doplňků</Czech>
<Korean>커뮤니티 베이스 애드온 - 부착물 기능</Korean>
<Spanish>Community Base Addons - Funciones accesorias</Spanih>
<Spanish>Community Base Addons - Funciones accesorias</Spanish>
</Key>
<Key ID="STR_CBA_accessory_railNext">
<English>Next rail item state</English>
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/fnc_taskDefend.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if (_patrol isEqualType true) then {
};

if (_hold isEqualType true) then {
_hold = [0,1] select _hold;
_hold = parseNumber _hold;
};

// Start of the actual function
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/fnc_taskSearchArea.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _args params ["_area", "_behaviour", "_combat", "_speed", "_formation", "_onComp
private _pos = [_area] call CBA_fnc_randPosArea;

// Exit if any bad input was used (has to run after all the above code)
if ((_pos isEqualTo []) || {_area isEqualTo ""} || {isNull _group}) exitWith {ERROR_3("Bad Input [_pos: %1][_area: %2][_group: %3]", _pos, _area, _group);};
if ((_pos isEqualTo []) || {_area isEqualTo ""} || {isNull _group}) exitWith {ERROR_3("Bad Input [_pos: %1][_area: %2][_group: %3]",_pos,_area,_group);};

// Prepare recursive function call statement
private _statements = ["[this] call CBA_fnc_taskSearchArea"];
Expand Down
1 change: 0 additions & 1 deletion addons/ai/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<German>Unsichtbares Ziel - Soldat</German>
<Chinese>隱形目標(士兵)</Chinese>
<French>Cible invisible - Soldat</French>
<Spanish>Soldado objetivo invisible</Spanish>
<Italian>Obiettivo invisibile - Soldato</Italian>
<Polish>Żołnierz - niewidoczny cel</Polish>
<Russian>Невидимая цель - солдат</Russian>
Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_addPlayerAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private _return = if (isDedicated) then {
};
GVAR(actionListUpdated) = false;
[GVAR(actionList), {
TRACE_3("Inside the code for the hashPair",(vehicle player),GVAR(actionIndexes), _value);
TRACE_3("Inside the code for the hashPair",(vehicle player),GVAR(actionIndexes),_value);
if ((!isNil "_value") && {_value isEqualType []}) then {
GVAR(actionIndexes) pushBack (_curVic addAction _value);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/common/init_addMiscItemsToArsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Author:

// We only need to directly add the items to the display list once per mission as we also modify the data array
if (missionNamespace getVariable [QGVAR(arsenalDataModified), false]) exitWith {
TRACE_1("Already set", bis_fnc_arsenal_data select 24);
TRACE_1("Already set",bis_fnc_arsenal_data select 24);
};


Expand Down
6 changes: 4 additions & 2 deletions addons/common/test_config.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ TEST_TRUE(_result isEqualTo [ARR_2("Single","FullAuto")],_funcName);
_result = ["arifle_MX_GL_F"] call CBA_fnc_getWeaponModes;
TEST_TRUE(_result isEqualTo [ARR_2("Single","FullAuto")],_funcName);

_result = ["arifle_MX_F", true] call CBA_fnc_getWeaponModes;
TEST_TRUE(_result isEqualTo [ARR_5("Single","FullAuto","fullauto_medium","single_medium_optics1","single_far_optics2")],_funcName);
if (!isClass (configFile >> "CfgPatches" >> "ace_ai")) then { // ace modifies config so don't bother when it's loaded
_result = ["arifle_MX_F", true] call CBA_fnc_getWeaponModes;
TEST_TRUE(_result isEqualTo [ARR_5("Single","FullAuto","fullauto_medium","single_medium_optics1","single_far_optics2")],_funcName);
};

_result = ["FirstAidKit", true] call CBA_fnc_getWeaponModes;
TEST_TRUE(_result isEqualTo ["FirstAidKit"],_funcName);
Expand Down
12 changes: 8 additions & 4 deletions addons/common/test_position.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ TEST_TRUE(_result isEqualTo EXPECTED,_funcName);

////////////////////////////////////////////////////////////////////////////////////////////////////
#undef EXPECTED
#define EXPECTED [1,2,0] // Pos 3D
// Pos 3D
#define EXPECTED [1,2,0]

_value = EXPECTED;
_result = _value call CBA_fnc_getPos;
Expand All @@ -51,7 +52,8 @@ TEST_TRUE(_result isEqualTo EXPECTED,_funcName);

////////////////////////////////////////////////////////////////////////////////////////////////////
#undef EXPECTED
#define EXPECTED [1,2] // Pos 2D
// Pos 2D
#define EXPECTED [1,2]

_value = EXPECTED;
_result = _value call CBA_fnc_getPos;
Expand All @@ -63,7 +65,8 @@ TEST_TRUE(_result isEqualTo EXPECTED,_funcName);

////////////////////////////////////////////////////////////////////////////////////////////////////
#undef EXPECTED
#define EXPECTED [1,1,0] //Pos nearest to [0,0,0]
//Pos nearest to [0,0,0]
#define EXPECTED [1,1,0]

_value = [[0,0,0], [[10,10,0],[1,1,0], [5,5,0]]];
_result = _value call CBA_fnc_getNearest;
Expand All @@ -72,7 +75,8 @@ TEST_TRUE(_result isEqualTo EXPECTED,_funcName);

////////////////////////////////////////////////////////////////////////////////////////////////////
#undef EXPECTED
#define EXPECTED [[1,1,0], [5,5,0]] //Pos within distance 10
//Pos within distance 10
#define EXPECTED [[1,1,0], [5,5,0]]

_value = [[0,0,0], [[30,30,0],[1,1,0], [5,5,0]], 10];
_result = _value call CBA_fnc_getNearest;
Expand Down
2 changes: 1 addition & 1 deletion addons/diagnostic/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CfgFunctions {
class A3 {
class Debug {
class isDebugConsoleAllowed {
file = QPATHTOF(fnc_isDebugConsoleAllowed.sqf);
file = QPATHTOF(fnc_isDebugConsoleAllowed.inc.sqf);
};
};
};
Expand Down
7 changes: 2 additions & 5 deletions addons/disposable/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,11 @@ private _cfgMagazines = configFile >> "CfgMagazines";
private _massUsedLauncher = getNumber (_cfgWeapons >> _usedLauncher >> "WeaponSlotsInfo" >> "mass");

if (_massLauncher != _massUsedLauncher) then {
WARNING_4("Mass of launcher %1 (%2) is different from mass of used launcher %3 (%4).", _launcher, _massLauncher, _usedLauncher, _massUsedLauncher);
WARNING_4("Mass of launcher %1 (%2) is different from mass of used launcher %3 (%4).",_launcher,_massLauncher,_usedLauncher,_massUsedLauncher);
};

if (_massLauncher + _massMagazine != _massLoadedLauncher) then {
WARNING_7("Sum of mass of launcher %1 and mass of magazine %2 (%3+%4=%5) is different from mass of loaded launcher %6 (%7).",
_launcher, _magazine, _massLauncher, _massMagazine, _massLauncher + _massMagazine,
_loadedLauncher, _massLoadedLauncher
);
WARNING_7("Sum of mass of launcher %1 and mass of magazine %2 (%3+%4=%5) is different from mass of loaded launcher %6 (%7).",_launcher,_magazine,_massLauncher,_massMagazine,_massLauncher + _massMagazine,_loadedLauncher,_massLoadedLauncher);
};
} forEach configProperties [configFile >> "CBA_DisposableLaunchers", "isArray _x"];

Expand Down
2 changes: 1 addition & 1 deletion addons/events/fnc_mouseWheelHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SCRIPT(mouseWheelHandler);

params ["_display", "_inputDirection"];

private _inputDirection = [0, 1] select (_inputDirection < 0);
private _inputDirection = parseNumber (_inputDirection < 0);

[_display, MOUSE_WHEEL_OFFSET + _inputDirection, GVAR(shift), GVAR(control), GVAR(alt)] call FUNC(keyHandlerDown);
[_display, MOUSE_WHEEL_OFFSET + _inputDirection, GVAR(shift), GVAR(control), GVAR(alt)] call FUNC(keyHandlerUp);
2 changes: 1 addition & 1 deletion addons/jr/fnc_compatibleItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (isNil QGVAR(namespace)) then {
};

// Get cached result, if it exists
private _cachekey = format ["%1#%2", _weapon, if (_typeFilterExists) then {_typefilter} else {"all"} ];
private _cachekey = format ["%1#%2", _weapon, ["all", _typefilter] select _typeFilterExists];
private _compatibleItems = GVAR(namespace) get _cachekey;

if (!isNil "_compatibleItems") exitWith {
Expand Down
5 changes: 3 additions & 2 deletions addons/loadout/fnc_setLoadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ if (count _loadout == 10) exitWith {

_loadout params ["_loadoutArray", "_extendedInfo"];

_unit setUnitLoadout [_loadoutArray, _fullMagazines];

if (_extendedInfo isEqualType []) then { _extendedInfo = createHashMapFromArray _extendedInfo; };
["CBA_preLoadoutSet", [_unit, _loadoutArray, _extendedInfo]] call CBA_fnc_localEvent;

_unit setUnitLoadout [_loadoutArray, _fullMagazines];

["CBA_loadoutSet", [_unit, _loadoutArray, _extendedInfo]] call CBA_fnc_localEvent;
2 changes: 1 addition & 1 deletion addons/music/fnc_getMusicData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ params [
if (_config isEqualTo "") exitWith {ERROR("Config not given"); _default};
if (IS_STRING(_config)) then {_config = [_config] call CBA_fnc_getMusicPath;};

if ((isNil "_config") || {!IS_CONFIG(_config)}) exitWith {ERROR_1("Config not found for %1", _config); nil};
if ((isNil "_config") || {!IS_CONFIG(_config)}) exitWith {ERROR_1("Config not found for %1",_config); nil};

//Now we have a config, grab the data
private _return = [_config, _dataType, nil] call BIS_fnc_returnConfigEntry;
Expand Down
2 changes: 1 addition & 1 deletion addons/optics/fnc_animateScriptedOptic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ _ctrlMagnification ctrlCommit 0;

// Calculate lighting.
private _dayOpacity = AMBIENT_BRIGHTNESS;
private _nightOpacity = [1,0] select (_dayOpacity == 1);
private _nightOpacity = parseNumber (_dayOpacity != 1);

private _useReticleNight = GVAR(useReticleNight);

Expand Down
2 changes: 1 addition & 1 deletion addons/settings/fnc_gui_settingOverwrite.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ _ctrlOverwriteMission ctrlAddEventHandler ["CheckedChanged", {
_ctrlOverwriteClient cbSetChecked _wasChecked;
_ctrlOverwriteClient ctrlEnable (_ctrlOverwriteClient getVariable [QGVAR(enabled), true]);

_state = [0, 1] select _wasChecked;
_state = parseNumber _wasChecked;
SET_TEMP_NAMESPACE_PRIORITY(_setting,_state,_source);
};

Expand Down
4 changes: 2 additions & 2 deletions addons/settings/fnc_set.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ switch (toLower _source) do {

if (_store) then {
if (!is3DEN) exitWith {
WARNING_1("Source is mission, but not in 3DEN editor. Setting: %1",_setting);
WARNING_1("Source is mission,but not in 3DEN editor. Setting: %1",_setting);
};

if (!isNil {GVAR(missionConfig) getVariable _setting}) exitWith {
Expand Down Expand Up @@ -135,7 +135,7 @@ switch (toLower _source) do {
if ([] call FUNC(whitelisted)) then {
[QGVAR(setSettingServer), [_setting, _value, _priority, _store]] call CBA_fnc_serverEvent;
} else {
WARNING_1("Source is server, but no admin access. Setting: %1",_setting);
WARNING_1("Source is server,but no admin access. Setting: %1",_setting);
_return = false;
};
};
Expand Down
2 changes: 2 additions & 0 deletions addons/settings/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,13 @@
<English>Changes will not persist after server restart</English>
<Polish>Zmiany nie zostaną zachowane po restarcie serwera</Polish>
<Japanese>サーバーの再起動後、変更は保持されません</Japanese>
<Korean>서버를 재시작한 후 변경 사항 유지 안함</Korean>
</Key>
<Key ID="STR_cba_settings_volatile_tooltip">
<English>The server is configured to not persist changes to settings between server restarts.\nChanges will persist between mission restarts.</English>
<Polish>Serwer jest skonfigurowany tak, aby odrzucać wszystkie zmiany w ustawieniach gdy zostanie zrestartowany.\nZmiany zostaną zachowane między restartami misji.</Polish>
<Japanese>このサーバーは、サーバーの再起動後に設定への変更が保持されないように構成されています。\n再起動無くミッションを再スタートする場合では変更は保持されます。</Japanese>
<Korean>서버가 다시 시작될 때까지 설정 변경 사항이 유지되지 않도록 서버가 구성어 있습니다.\n임무가 다시 시작될 때까지 변경 사항이 유지됩니다.</Korean>
</Key>
<Key ID="STR_cba_settings_overwrite_clients">
<English>Overwrite\nClients</English>
Expand Down
12 changes: 6 additions & 6 deletions addons/settings/test_parse.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _funcName = QFUNC(parse);
TEST_DEFINED(QFUNC(parse),"");

// Purposely weird formatting, must remain this way because newlines remain part of result
_settings = (preprocessFile "x\cba\addons\settings\test_settings_regular.sqf") call FUNC(parse);
_settings = (preprocessFile "x\cba\addons\settings\test_settings_regular.inc.sqf") call FUNC(parse);
_result = _settings isEqualTo [
["ace_advanced_ballistics_ammoTemperatureEnabled", true, 0],
["ace_advanced_ballistics_barrelLengthInfluenceEnabled", false, 2],
Expand All @@ -27,7 +27,7 @@ _result = _settings isEqualTo [
];
TEST_TRUE(_result,_funcName);

_settings = (preprocessFile "x\cba\addons\settings\test_settings_multiline.sqf") call FUNC(parse);
_settings = (preprocessFile "x\cba\addons\settings\test_settings_multiline.inc.sqf") call FUNC(parse);
_result = _settings isEqualTo [
["test1", "[
"" item_1 "",
Expand All @@ -51,11 +51,11 @@ _result = _settings isEqualTo [
];
TEST_TRUE(_result,_funcName);

_settings = (preprocessFile "x\cba\addons\settings\test_settings_unicode.sqf") call FUNC(parse);
_settings = (preprocessFile "x\cba\addons\settings\test_settings_unicode.inc.sqf") call FUNC(parse);
_result = _settings isEqualTo [["test1", "[Āā, Ăă, Ҙ, привет]", 1]];
TEST_TRUE(_result,_funcName);

_settings = (preprocessFile "x\cba\addons\settings\test_settings_strings.sqf") call FUNC(parse);
_settings = (preprocessFile "x\cba\addons\settings\test_settings_strings.inc.sqf") call FUNC(parse);
_result = _settings isEqualTo [
["test1", "", 0],
["test2", "", 0],
Expand All @@ -75,7 +75,7 @@ _result = _settings isEqualTo [
TEST_TRUE(_result,_funcName);

// Don't preprocess for testing comments
_settings = (loadFile "x\cba\addons\settings\test_settings_comments.sqf") call FUNC(parse);
_settings = (loadFile "x\cba\addons\settings\test_settings_comments.inc.sqf") call FUNC(parse);
_result = _settings isEqualTo [
["test2", "[true,false]", 1],
["test4", "[ ' t e s t ' , "" T E S T "" ]", 0],
Expand All @@ -85,7 +85,7 @@ _result = _settings isEqualTo [
];
TEST_TRUE(_result,_funcName);

_settings = (loadFile "x\cba\addons\settings\test_settings_comments_eof.sqf") call FUNC(parse);
_settings = (loadFile "x\cba\addons\settings\test_settings_comments_eof.inc.sqf") call FUNC(parse);
_result = _settings isEqualTo [
["test1", "[""item_1"",""item_2""]", 1]
];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/strings/fnc_prettyFormat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ params [
["_depth", 0, [0]]
];

private _indents = STRING_REPEAT(_indent, _depth);
private _indents = STRING_REPEAT(_indent,_depth);

if (_array isEqualTo []) exitWith {
_indents + "[]" // return
Expand Down
Loading

0 comments on commit de659d9

Please sign in to comment.