Skip to content

Commit

Permalink
Merge branch 'master' into fatigue-continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Feb 6, 2024
2 parents fb15693 + 5a3f3d3 commit a9bf200
Show file tree
Hide file tree
Showing 383 changed files with 2,126 additions and 1,278 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Keithen <[email protected]>
Kllrt <[email protected]>
KokaKolaA3
Krzyciu
LAxemann
legman <[email protected]>
Legolasindar "Viper" <[email protected]>
licht-im-Norden87 <[email protected]>
Expand Down Expand Up @@ -190,3 +191,4 @@ YetheSamartaka
xrufix
Zakant <[email protected]>
zGuba
Zman6258
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.16.1-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.16.3-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_ballistics/functions/fnc_handleFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);

if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (!alive _projectile) exitWith {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private _initStartTime = diag_tickTime;
private _mapSize = worldSize;

if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
INFO_1("Terrain already initialized [world: %1]", worldName);
INFO_1("Terrain already initialized [world: %1]",worldName);
#ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized";
#endif
Expand All @@ -33,14 +33,14 @@ private _gridCells = _mapGrids * _mapGrids;

GVAR(currentGrid) = 0;

INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldName);
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName);

[{
params ["_args","_idPFH"];
_args params ["_mapGrids", "_gridCells", "_initStartTime"];

if (GVAR(currentGrid) >= _gridCells) exitWith {
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", (diag_tickTime - _initStartTime) toFixed 2, worldName);
INFO_2("Finished terrain initialization in %1 seconds [world: %2]",(diag_tickTime - _initStartTime) toFixed 2,worldName);
#ifdef DEBUG_MODE_FULL
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
#endif
Expand All @@ -53,7 +53,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
private _gridCenter = [_x + 25, _y + 25];
private _gridHeight = round(getTerrainHeightASL _gridCenter);
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter);
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
GVAR(currentGrid) = GVAR(currentGrid) + 1;
if (GVAR(currentGrid) >= _gridCells) exitWith {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig,_parentSpeed);
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
_muzzleVelocityTable = [];
_ammoTempMuzzleVelocityShifts = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);

private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
private _twistDirection = [0, 1] select (_barrelTwist != 0);
private _twistDirection = parseNumber (_barrelTwist != 0);
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
if !(_twistDirection in [-1, 0, 1]) then {
Expand Down
14 changes: 7 additions & 7 deletions addons/ai/functions/fnc_garrison.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* 0: The building(s) nearest this position are used <POSITION>
* 1: Limit the building search to those type of building <ARRAY>
* 2: Units that will be garrisoned <ARRAY>
* 3: Radius to fill building(s) <SCALAR> (default: 50)
* 4: 0: even filling, 1: building by building, 2: random filling <SCALAR> (default: 0)
* 3: Radius to fill building(s) <NUMBER> (default: 50)
* 4: 0: even filling, 1: building by building, 2: random filling <NUMBER> (default: 0)
* 5: True to fill building(s) from top to bottom <BOOL> (default: false) (note: only works with filling mode 0 and 1)
* 6: Teleport units <BOOL> (default: false)
Expand Down Expand Up @@ -128,7 +128,7 @@ switch (_fillingType) do {
} else {
private _pos = _building select 0;
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);

if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
Expand Down Expand Up @@ -177,7 +177,7 @@ switch (_fillingType) do {
} else {
private _pos = _building select 0;
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);

if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
Expand Down Expand Up @@ -224,7 +224,7 @@ switch (_fillingType) do {
} else {
private _pos = selectRandom _building;
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);

if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
Expand Down Expand Up @@ -258,7 +258,7 @@ switch (_fillingType) do {
};
};

TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)], _teleport);
TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)],_teleport);

// Update the unit list and remove duplicate positions and units
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
Expand All @@ -279,5 +279,5 @@ if (_teleport) then {
[_unitMoveList] call FUNC(garrisonMove);
};

TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left", count _unitsArray, count _buildingsIndex)], _unitsArray);
TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left",count _unitsArray,count _buildingsIndex)],_unitsArray);
_unitsArray
4 changes: 2 additions & 2 deletions addons/ai/functions/fnc_garrisonMove.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
};

LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]);
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left",count _unitMoveList)]);
};

// Check if unit is alive or even existing
if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then {
_unitMoveList deleteAt (_unitMoveList find _x);
LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left", count _unitMoveList)]);
LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left",count _unitMoveList)]);

} else {
private _unitPos = getPos _unit;
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/functions/fnc_unGarrison.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _units = _units select {local _x};

private _leader = leader _unit;

TRACE_3("fnc_ungarrison: unit and leader",_unit , _leader, (_leader == _unit));
TRACE_3("fnc_ungarrison: unit and leader",_unit,_leader,(_leader == _unit));

_unit setVariable [QGVAR(garrisonned), false, true];

Expand Down
5 changes: 4 additions & 1 deletion addons/aircraft/functions/fnc_droneSetWaypoint.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ private _currentLoiterRadius = waypointLoiterRadius _waypoint;
private _currentLoiterType = waypointLoiterType _waypoint;

// Set pos to ATL
_pos set [2, if (_currentHeight >= 50) then { _currentHeight } else { 0 }];
_pos set [
2,
[0, _currentHeight] select (_currentHeight >= 50)
];

// [_group] call CBA_fnc_clearWaypoints;
_waypoint = _group addWaypoint [_pos, 0];
Expand Down
4 changes: 2 additions & 2 deletions addons/aircraft/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Russian>Открыть грузовой отсек</Russian>
<Italian>Apri la rampa di carico</Italian>
<Portuguese>Abrir porta de carga</Portuguese>
<Japanese>カーゴ ドアを開く</Japanese>
<Japanese>貨物室ドアを 開く</Japanese>
<Korean>화물칸 개방</Korean>
<Chinese>開啟貨艙門</Chinese>
<Chinesesimp>开启货舱门</Chinesesimp>
Expand All @@ -46,7 +46,7 @@
<Russian>Закрыть грузовой отсек</Russian>
<Italian>Chiudi la rampa di carico</Italian>
<Portuguese>Fechar porta de carga</Portuguese>
<Japanese>カーゴ ドアを閉じる</Japanese>
<Japanese>貨物室ドアを 閉じる</Japanese>
<Korean>화물칸 폐쇄</Korean>
<Chinese>關閉貨艙門</Chinese>
<Chinesesimp>关闭货舱门</Chinesesimp>
Expand Down
3 changes: 2 additions & 1 deletion addons/arsenal/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ GVAR(lastSortDirectionRight) = DESCENDING;
params ["_object"];

// If the arsenal is already open, refresh arsenal display
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) isEqualTo _object}) then {
// Deliberate == check, fail on objNull
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) == _object}) then {
[true, true] call FUNC(refresh);
};
}] call CBA_fnc_addEventHandler;
Expand Down
56 changes: 4 additions & 52 deletions addons/arsenal/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,10 @@ PREP_RECOMPILE_END;
#include "initSettings.inc.sqf"

// Arsenal events
[QGVAR(statsToggle), {
params ["_display", "_showStats"];

private _statsCtrlGroupCtrl = _display displayCtrl IDC_statsBox;
private _statsPreviousPageCtrl = _display displayCtrl IDC_statsPreviousPage;
private _statsNextPageCtrl = _display displayCtrl IDC_statsNextPage;
private _statsCurrentPageCtrl = _display displayCtrl IDC_statsCurrentPage;

{
_x ctrlShow (GVAR(showStats) && {_showStats});
} forEach [
_statsCtrlGroupCtrl,
_statsPreviousPageCtrl,
_statsNextPageCtrl,
_statsCurrentPageCtrl
];
}] call CBA_fnc_addEventHandler;

[QGVAR(statsChangePage), {
_this call FUNC(buttonStatsPage);
}] call CBA_fnc_addEventHandler;

[QGVAR(displayStats), {
_this call FUNC(handleStats);
}] call CBA_fnc_addEventHandler;

[QGVAR(actionsChangePage), {
_this call FUNC(buttonActionsPage);
}] call CBA_fnc_addEventHandler;

[QGVAR(displayActions), {
_this call FUNC(handleActions);
}] call CBA_fnc_addEventHandler;

[QGVAR(actionsToggle), {
params ["_display", "_showActions"];

private _actionsCtrlGroupCtrl = _display displayCtrl IDC_actionsBox;
private _actionsPreviousPageCtrl = _display displayCtrl IDC_actionsPreviousPage;
private _actionsNextPageCtrl = _display displayCtrl IDC_actionsNextPage;
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;

{
_x ctrlShow (GVAR(showActions) && {_showActions});
} forEach [
_actionsCtrlGroupCtrl,
_actionsPreviousPageCtrl,
_actionsNextPageCtrl,
_actionsCurrentPageCtrl
];
}] call CBA_fnc_addEventHandler;
[QGVAR(statsChangePage), LINKFUNC(buttonStatsPage)] call CBA_fnc_addEventHandler;
[QGVAR(displayStats), LINKFUNC(handleStats)] call CBA_fnc_addEventHandler;
[QGVAR(actionsChangePage), LINKFUNC(buttonActionsPage)] call CBA_fnc_addEventHandler;
[QGVAR(displayActions), LINKFUNC(handleActions)] call CBA_fnc_addEventHandler;

call FUNC(compileActions);
call FUNC(compileSorts);
Expand All @@ -86,5 +39,4 @@ call FUNC(compileStats);
// Setup Tools tab
[keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton);


ADDON = true;
6 changes: 3 additions & 3 deletions addons/arsenal/functions/fnc_addAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ call FUNC(compileActions);

// Skip if not allowed in editor and in editor
if (is3DEN && {_scopeEditor != 2}) exitWith {
TRACE_1("Skipping action because in editor", _rootClass);
TRACE_1("Skipping action because in editor",_rootClass);
[]
};

// Class can't contain ~, because it's used for formatting result
if ("~" in _rootClass) exitWith {
TRACE_1("Classname can't contain '~'", _rootClass);
TRACE_1("Classname can't contain '~'",_rootClass);
[]
};

Expand All @@ -65,7 +65,7 @@ private _fnc_addToGroup = {

// Don't allow two of the same class
if (_group findIf {(_x select 0) == _class} != -1) then {
TRACE_1("An action with this ID already exists", _class);
TRACE_1("An action with this ID already exists",_class);
continue;
};

Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_addSort.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private _fnc_addToTabs = {
_currentTab pushBack _sort;
_return pushBack _sortName;
} else {
TRACE_1("A sort with this ID already exists", _sortName);
TRACE_1("A sort with this ID already exists",_sortName);
};
} forEach _tabsToAddTo;
};
Expand Down
9 changes: 4 additions & 5 deletions addons/arsenal/functions/fnc_addStat.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private _fnc_addToTabs = {

// Find if there is an entry with same ID
if (_currentTab findIf {_x select 5 == _statName} != -1) then {
TRACE_1("A stat with this ID already exists", _statName);
TRACE_1("A stat with this ID already exists",_statName);
} else {
_stat = +_finalArray;
_stat set [5, _statName];
Expand Down Expand Up @@ -109,11 +109,10 @@ private _tabToChange = [];
{
_x params ["_tab", "_tabSide"];

_tabToChange = if (_tabSide == "R") then {
_tabToChange = [
GVAR(statsListLeftPanel),
GVAR(statsListRightPanel)
} else {
GVAR(statsListLeftPanel)
};
] select (_tabSide == "R");

_stats = _tabToChange select _tab;

Expand Down
9 changes: 5 additions & 4 deletions addons/arsenal/functions/fnc_buttonActionsPage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#include "..\defines.hpp"
/*
* Author: Brett Mayson
* Handles the previous / next page buttons for actions
* Handles the previous / next page buttons for actions.
*
* Arguments:
* 0: Arsenal display <DISPLAY>
* 1: Actions control <CONTROL>
* 2: Previous or next <BOOL> (false = previous, true = next)
* 1: Actions page <CONTROL>
* 2: Previous (false) or next (true) page <BOOL>
*
* Return Value:
* None
Expand All @@ -17,10 +17,11 @@

params ["_display", "_control", "_nextPage"];

TRACE_1("control enabled", ctrlEnabled _control);
TRACE_1("control enabled",ctrlEnabled _control);
if !(ctrlEnabled _control) exitWith {};

GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage);

GVAR(actionsInfo) params ["_panelControl", "_curSel", "_itemCfg"];

[QGVAR(displayActions), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent;
16 changes: 13 additions & 3 deletions addons/arsenal/functions/fnc_buttonHide.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,20 @@ private _ctrl = controlNull;
IDC_buttonCurrentMag2,
IDC_iconBackgroundCurrentMag,
IDC_iconBackgroundCurrentMag2,
IDC_statsBox,
IDC_statsPreviousPage,
IDC_statsNextPage,
IDC_statsCurrentPage
IDC_statsCurrentPage,
IDC_actionsBox,
IDC_actionsPreviousPage,
IDC_actionsNextPage,
IDC_actionsCurrentPage
];

[QGVAR(statsToggle), [_display, _showToggle]] call CBA_fnc_localEvent;
[QGVAR(actionsToggle), [_display, _showToggle]] call CBA_fnc_localEvent;
if (!_showToggle) exitWith {};

// When showing the stats/actions again, update them to fit with currently selected item
GVAR(actionsInfo) params ["_control", "_curSel", "_itemCfg"];

[QGVAR(displayStats), [_display, _control, _curSel, _itemCfg]] call CBA_fnc_localEvent;
[QGVAR(displayActions), [_display, _control, _curSel, _itemCfg]] call CBA_fnc_localEvent;
6 changes: 3 additions & 3 deletions addons/arsenal/functions/fnc_buttonStatsPage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

params ["_display", "_control", "_nextPage"];

TRACE_1("control enabled", ctrlEnabled _control);
TRACE_1("control enabled",ctrlEnabled _control);
if !(ctrlEnabled _control) exitWith {};

GVAR(currentStatPage) = [GVAR(currentStatPage) - 1, GVAR(currentStatPage) + 1] select _nextPage;
GVAR(currentStatPage) = GVAR(currentStatPage) + ([-1, 1] select _nextPage);

GVAR(statsInfo) params ["_isLeftPanel", "_panelControl", "_curSel", "_itemCfg"];
GVAR(statsInfo) params ["", "_panelControl", "_curSel", "_itemCfg"];

[QGVAR(displayStats), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent;
Loading

0 comments on commit a9bf200

Please sign in to comment.