Skip to content

Commit

Permalink
Merge branch 'acemod:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
VyMajoris authored Oct 27, 2023
2 parents 3731264 + d53bc62 commit 760083d
Show file tree
Hide file tree
Showing 230 changed files with 6,319 additions and 21,308 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
Expand All @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives
Expand All @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Python packages
run: |
pip3 install wheel
Expand All @@ -33,7 +33,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Extract Dependencies
run: python3 tools/extract_dependencies.py --markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout the source code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pboproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ jobs:
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: x\cba
ref: master
repository: CBATeam/CBA_A3.git
- name: Checkout ACE3
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: z\ace
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
Expand Down
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.0-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.16.1-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
10 changes: 9 additions & 1 deletion addons/advanced_fatigue/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
<English>Influences the amount of weapon sway. Higher means more sway.</English>
<Spanish>Afecta al la estabilidad de la mira. Más alto significa más balanceo</Spanish>
<German>Beeinflusst den Faktor, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung</German>
<German>Beeinflusst, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung.</German>
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害。</Chinesesimp>
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
Expand All @@ -187,18 +187,26 @@
<Key ID="STR_ACE_Advanced_Fatigue_RestedSwayFactor">
<English>Rested sway factor</English>
<French>Facteur de balancement au repos</French>
<Korean>휴식 시 손떨림 정도</Korean>
<German>Verwacklungsfaktor, wenn aufgelegt</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RestedSwayFactor_Description">
<English>Influences the amount of weapon sway while weapon is rested.</English>
<French>Influence le degré de balancement de l'arme au repos.</French>
<Korean>무기가 아무런 행동도 하지 않는 동안 무기가 흔들리는 정도를 정합니다.</Korean>
<German>Beeinflusst, wie ruhig man die Waffe hält, während sie aufgelegt ist.</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_DeployedSwayFactor">
<English>Deployed sway factor</English>
<French>Facteur de balancement déployé</French>
<Korean>거치 시 손떨림 정도</Korean>
<German>Verwacklungsfaktor, wenn Zweibein aufgestellt ist.</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_DeployedSwayFactor_Description">
<English>Influences the amount of weapon sway while weapon is deployed.</English>
<French>Influence le degré de balancement de l'arme déployée.</French>
<Korean>무기를 거치하는 동안 무기를 흔드는 정도를 정합니다.</Korean>
<German>Beeinflusst, wie ruhig man die Waffen hält, während das Zweibein aufgestellt ist.</German>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
<Italian>(Scorrere) Estendere</Italian>
<Chinese>(滾輪) 延長</Chinese>
<Chinesesimp>(滚轮)延长</Chinesesimp>
<Portuguese>(Roda do Mouse) Extender</Portuguese>
<Portuguese>(Roda do Mouse) Estender</Portuguese>
<Czech>(Scrollovat) Oddálit</Czech>
<Turkish>(Tekerlek) Uzat</Turkish>
</Key>
Expand Down
2 changes: 2 additions & 0 deletions addons/ai/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@
<Polish>Automatyczne zakładanie NVG</Polish>
<German>Automatisch NVGs ausrüsten</German>
<Korean>야투경 자동 창착</Korean>
<French>Equipement JVN automatique</French>
</Key>
<Key ID="STR_ACE_AI_AssignNVG_Description">
<English>Equips NVG in inventory during night time and unequips it during day time.\nDoes not add NVGs to inventory!</English>
<Polish>Zakłada NVG w nocy i zdejmuje je w ciągu dnia.\nNie dodaje NVG do ekwipunku!</Polish>
<German>Rüstet NVG nachts aus dem Inventar aus und entfernt es tagsüber.\nFügt keine NVGs zum Inventar hinzu!</German>
<Korean>야간에는 야투경을 소지품에 장착하고 주간에는 장착을 해제합니다.\n주의! 소지품에 야투경을 추가하는 것이 아닙니다!</Korean>
<French>Equipe des JVN pendant la nuit et les déséquipe le jour.\nN'ajoute pas les JVN dans l'intenvaire !</French>
</Key>
</Package>
</Project>
17 changes: 10 additions & 7 deletions addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,38 @@
* Arguments:
* 0: Arsenal display <DISPLAY>
* 1: Tab control <CONTROL>
* 2: Animate panel refresh <BOOL>
*
* Return Value:
* None
*
* Public: No
*/

params ["_display", "_control"];
params ["_display", "_control", ["_animate", true]];

// Fade old control background
if (!isNil QGVAR(currentLeftPanel)) then {
private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1);
_previousCtrlBackground ctrlSetFade 1;
_previousCtrlBackground ctrlCommit FADE_DELAY;
_previousCtrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);
};

// Show new control background
private _ctrlIDC = ctrlIDC _control;
private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1);
_ctrlBackground ctrlSetFade 0;
_ctrlBackground ctrlCommit FADE_DELAY;
_ctrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);

private _ctrlPanel = _display displayCtrl IDC_leftTabContent;

// Force a "refresh" animation of the panel
_ctrlPanel ctrlSetFade 1;
_ctrlPanel ctrlCommit 0;
_ctrlPanel ctrlSetFade 0;
_ctrlPanel ctrlCommit FADE_DELAY;
if (_animate) then {
_ctrlPanel ctrlSetFade 1;
_ctrlPanel ctrlCommit 0;
_ctrlPanel ctrlSetFade 0;
_ctrlPanel ctrlCommit FADE_DELAY;
};

_ctrlPanel lbSetCurSel -1;

Expand Down
17 changes: 10 additions & 7 deletions addons/arsenal/functions/fnc_fillRightPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,29 @@
* Arguments:
* 0: Arsenal display <DISPLAY>
* 1: Tab control <CONTROL>
* 2: Animate panel refresh <BOOL>
*
* Return Value:
* None
*
* Public: No
*/

params ["_display", "_control"];
params ["_display", "_control", ["_animate", true]];

// Fade old control background
if (!isNil QGVAR(currentRightPanel)) then {
private _previousCtrlBackground = _display displayCtrl (GVAR(currentRightPanel) - 1);
_previousCtrlBackground ctrlSetFade 1;
_previousCtrlBackground ctrlCommit FADE_DELAY;
_previousCtrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);
};

// Show new control background
private _ctrlIDC = ctrlIDC _control;
private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1);
_ctrlBackground ctrlShow true;
_ctrlBackground ctrlSetFade 0;
_ctrlBackground ctrlCommit FADE_DELAY;
_ctrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);

private _searchbarCtrl = _display displayCtrl IDC_rightSearchbar;

Expand Down Expand Up @@ -183,10 +184,12 @@ switch (GVAR(currentLeftPanel)) do {
};

// Force a "refresh" animation of the panel
_ctrlPanel ctrlSetFade 1;
_ctrlPanel ctrlCommit 0;
_ctrlPanel ctrlSetFade 0;
_ctrlPanel ctrlCommit FADE_DELAY;
if (_animate) then {
_ctrlPanel ctrlSetFade 1;
_ctrlPanel ctrlCommit 0;
_ctrlPanel ctrlSetFade 0;
_ctrlPanel ctrlCommit FADE_DELAY;
};

// Check if the left panel is a weapon. If so, right panel will be compatible items with weapon only
private _leftPanelState = GVAR(currentLeftPanel) in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon, IDC_buttonBinoculars];
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_handleSearchbar.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if ((ctrlIDC _control) == IDC_rightSearchbar) then {
} else {
// Left panel search bar
// Don't refill if there is no need
if (GVAR(lastSearchTextLeft) != "" && {(_searchString find GVAR(lastSearchTextRight)) != 0}) then {
if (GVAR(lastSearchTextLeft) != "" && {(_searchString find GVAR(lastSearchTextLeft)) != 0}) then {
[_display, _display displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel);
};

Expand Down
1 change: 1 addition & 0 deletions addons/arsenal/functions/fnc_onArsenalClose.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ GVAR(leftTabFocus) = nil;
GVAR(rightTabFocus) = nil;
GVAR(rightTabLnBFocus) = nil;
GVAR(ignoreFirstSortPanelCall) = nil;
GVAR(refreshing) = nil;

GVAR(selectedWeaponType) = nil;
GVAR(virtualItems) = nil;
Expand Down
1 change: 1 addition & 0 deletions addons/arsenal/functions/fnc_onArsenalOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ GVAR(leftTabFocus) = false;
GVAR(rightTabFocus) = false;
GVAR(rightTabLnBFocus) = false;
GVAR(ignoreFirstSortPanelCall) = false;
GVAR(refreshing) = false;

{
private _panel = _display displayCtrl _x;
Expand Down
19 changes: 10 additions & 9 deletions addons/arsenal/functions/fnc_onSelChangedLeft.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ private _display = ctrlParent _control;
private _item = [_control lbData _curSel, _control lnbData [_curSel, 0]] select (ctrlType _control == CT_LISTNBOX);

// When having chosen a new category, see if the current right panel can be kept open, otherwise take default
private _selectCorrectPanelWeapon = [_display displayCtrl IDC_buttonOptic, _display displayCtrl GVAR(currentRightPanel)] select (!isNil QGVAR(currentRightPanel) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]});
private _selectCorrectPanelContainer = [_display displayCtrl IDC_buttonMisc, _display displayCtrl GVAR(currentRightPanel)] select (!isNil QGVAR(currentRightPanel) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]});
private _currentRightPanel = _display displayCtrl GVAR(currentRightPanel);
private _selectCorrectPanelWeapon = [_display displayCtrl IDC_buttonOptic, _currentRightPanel] select (!isNil QGVAR(currentRightPanel) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]});
private _selectCorrectPanelContainer = [_display displayCtrl IDC_buttonMisc, _currentRightPanel] select (!isNil QGVAR(currentRightPanel) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]});

// Remove all magazines from the current weapon that aren't compatible with the new weapon
private _fnc_clearCurrentWeaponMags = {
Expand Down Expand Up @@ -115,7 +116,7 @@ switch (GVAR(currentLeftPanel)) do {

TOGGLE_RIGHT_PANEL_WEAPON

[_display, _selectCorrectPanelWeapon] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelWeapon, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelWeapon}] call FUNC(fillRightPanel);
};

// Make unit switch to new item
Expand Down Expand Up @@ -191,7 +192,7 @@ switch (GVAR(currentLeftPanel)) do {

TOGGLE_RIGHT_PANEL_WEAPON

[_display, _selectCorrectPanelWeapon] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelWeapon, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelWeapon}] call FUNC(fillRightPanel);
};

// Make unit switch to new item
Expand Down Expand Up @@ -273,7 +274,7 @@ switch (GVAR(currentLeftPanel)) do {
_this call FUNC(fillRightPanel);
}, [_display, _selectCorrectPanelWeapon]] call CBA_fnc_execNextFrame;
} else {
[_display, _selectCorrectPanelWeapon] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelWeapon, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelWeapon}] call FUNC(fillRightPanel);
};
};

Expand Down Expand Up @@ -347,7 +348,7 @@ switch (GVAR(currentLeftPanel)) do {

TOGGLE_RIGHT_PANEL_CONTAINER

[_display, _selectCorrectPanelContainer] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelContainer, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelContainer}] call FUNC(fillRightPanel);
};

// Make unit switch to new item
Expand Down Expand Up @@ -385,7 +386,7 @@ switch (GVAR(currentLeftPanel)) do {

TOGGLE_RIGHT_PANEL_CONTAINER

[_display, _selectCorrectPanelContainer] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelContainer, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelContainer}] call FUNC(fillRightPanel);
};

// Make unit switch to new item
Expand Down Expand Up @@ -423,7 +424,7 @@ switch (GVAR(currentLeftPanel)) do {

TOGGLE_RIGHT_PANEL_CONTAINER

[_display, _selectCorrectPanelContainer] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelContainer, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelContainer}] call FUNC(fillRightPanel);
};

// Make unit switch to new item
Expand Down Expand Up @@ -538,7 +539,7 @@ switch (GVAR(currentLeftPanel)) do {

TOGGLE_RIGHT_PANEL_WEAPON

[_display, _selectCorrectPanelWeapon] call FUNC(fillRightPanel);
[_display, _selectCorrectPanelWeapon, !GVAR(refreshing) && {_currentRightPanel isNotEqualTo _selectCorrectPanelWeapon}] call FUNC(fillRightPanel);
};

// Make unit switch to new item
Expand Down
17 changes: 14 additions & 3 deletions addons/arsenal/functions/fnc_refresh.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Arguments:
* 0: Update current and unique items lists <BOOL> (default: true)
* 1: Update virtual items list <BOOL> (default: false)
* 2: Use panel refresh animation <BOOL> (default: false)
*
* Return Value:
* None
Expand All @@ -16,8 +17,7 @@
*
* Public: Yes
*/
params [["_updateItems", true, [true]], ["_updateVirtualItems", false, [false]]];

params [["_updateItems", true, [true]], ["_updateVirtualItems", false, [false]], ["_animate", false, [false]]];
TRACE_2("",_updateItems,_updateVirtualItems);

// Don't execute in scheduled environment
Expand All @@ -36,6 +36,12 @@ if (_updateItems) then {
};

private _virtualItems = GVAR(currentBox) getVariable QGVAR(virtualItems);

if (is3DEN) then {
_virtualItems = uiNamespace getVariable QGVAR(configItems); // GVAR(currentBox) is nil in 3DEN
_animate = true; // CBA frame functions are disabled during preInit
};

if (isNil "_virtualItems") exitWith {
[LLSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);
// Delay a frame in case this is running on display open
Expand All @@ -53,6 +59,11 @@ if (_updateVirtualItems) then {
// Don't refresh left panel if in loadout tab
if (!isNull findDisplay IDD_loadouts_display) exitWith {};

if (!_animate) then {
GVAR(refreshing) = true;
[{GVAR(refreshing) = false}, nil, 3] call CBA_fnc_execAfterNFrames;
};

private _display = findDisplay IDD_ace_arsenal;

[_display, _display displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel);
[_display, _display displayCtrl GVAR(currentLeftPanel), _animate] call FUNC(fillLeftPanel);
1 change: 1 addition & 0 deletions addons/arsenal/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,7 @@
<Key ID="STR_ACE_Arsenal_statIlluminators">
<English>Illuminators</English>
<French>Illuminateurs</French>
<Korean>조명</Korean>
</Key>
<Key ID="STR_ACE_Arsenal_defaultToFavoritesSetting">
<English>Default to Favorites</English>
Expand Down
Loading

0 comments on commit 760083d

Please sign in to comment.