Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from remote #1

Merged
merged 74 commits into from
Dec 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
38baa8d
Check if vehicle has simEnabled before mounting (#7886)
Cyruz143 Sep 3, 2020
e384666
Compat RHS USAF - Fix CH-47 ramp actions (#7918)
Whigital Sep 29, 2020
e2e31ef
Arsenal - Remove launcher sorts (#7890)
Sep 29, 2020
5de9ef7
Documentation - Update packages (#7921)
jonpas Oct 1, 2020
d808e3a
remove useless file (#7922)
bux Oct 1, 2020
f06b3d5
fix more vulnaribilities in old docs node modules (#7923)
bux Oct 1, 2020
f25e023
Translations - Fix french translations (Fastroping) (#7910)
Elgin675 Oct 3, 2020
aa3d28e
Arsenal - Fix invalid usage of ARR macro (#7930)
Dahlgren Oct 3, 2020
2f37320
Fastroping - Fix invalid usage of ARR macro (#7931)
Dahlgren Oct 3, 2020
c4e7092
Hearing - Fix invalid usage of ARR macro (#7932)
Dahlgren Oct 3, 2020
8e7f9b6
Medical Treatment - Fix invalid usage of ARR macro (#7933)
Dahlgren Oct 3, 2020
74d74ed
Fixed casting const char* to char* in extension (#7925)
dedmen Oct 3, 2020
e27110a
Explosives - Add CBA settings for max/min/default timer values (#7916)
Freddo3000 Oct 3, 2020
6278b67
Frag - Add frag values to R_MRAAWS_HE_F (#7927)
Neviothr Oct 3, 2020
5fa490a
Update CfgVehicles.hpp (#7935)
PabstMirror Oct 4, 2020
e53bc23
Turkish Language Update (#7909)
tahakocal Oct 4, 2020
4e83b38
Tools - Set non zero exit code if any addons fail to build (#7937)
Dahlgren Oct 4, 2020
8651d4c
Fastroping - Fix inconsistent usage of ARR macro (#7936)
Dahlgren Oct 5, 2020
aa74178
Translation - add/fix french keys in 'explosives' module (#7942)
Elgin675 Oct 5, 2020
d19bdce
Grenades - Remove ref to missing audio (#7928)
Cyruz143 Oct 9, 2020
56baf2b
Fix engine fire position of Kamaz trucks (#7945)
BaerMitUmlaut Oct 9, 2020
4cfe26b
Disable damage for all cargo objects (#7946)
BaerMitUmlaut Oct 10, 2020
73e151e
Include only highest res mipmaps in maptools overlay textures (#7953)
veteran29 Oct 10, 2020
cab4d1d
Documentation - Fix typos and missing semi-colon in Arsenal (#7956)
Saborknight Oct 12, 2020
e07d2ae
Make refuel nozzle unbreakable (#7957)
BaerMitUmlaut Oct 21, 2020
25cc139
Vehicle Lock: add events (#7938)
BrettMayson Oct 21, 2020
153644b
Reload/Interaction - Fix 2 hemtt ingame errors (#7924)
jokoho48 Oct 21, 2020
8e999ae
Scopes - Weapons IronSightBaseAngle updated (#7958)
Laid3acK Oct 25, 2020
84b18d3
Slideshow - Add "SlideChanged" event (#7954)
Walthzer Oct 25, 2020
0f6a9ec
Zeus - Don't allow creating a new zeus module if we already are one …
PabstMirror Oct 25, 2020
a67d6ee
Arsenal - Provide reference to the current box (#7948)
BrettMayson Oct 26, 2020
78c3071
Medical - Show triage level in interaction (#7940)
BrettMayson Oct 29, 2020
2220822
Gunbag - Add BI Arsenal Compatibility (#7887)
mjc4wilton Oct 29, 2020
174223b
Medical - Add Treatment Time Addon Settings (#7900)
dgibso29 Oct 29, 2020
42f4edc
Documentation - Remove slideshow note (#7715)
jonpas Oct 29, 2020
afb3dad
Markers - Add timestamps (#7947)
Freddo3000 Oct 29, 2020
ef56a2d
Remove MAR-10 magazines from AWM magwell (#7777)
Drofseh Oct 29, 2020
9e3409f
Medical - Allow placing unconscious in a body bag (#7941)
BrettMayson Oct 29, 2020
2b0db19
Medical - Adjustable times for many treatment actions (#7951)
diwako Oct 29, 2020
b389740
Medical AI - Fix AI healing itself too fast when hit (#7955)
BaerMitUmlaut Oct 29, 2020
b991fe1
Arsenal - Sort by protection (helm, uniform, vest) (#7952)
PabstMirror Oct 29, 2020
aab8d8e
Medical Treatment - Title case autoinjector item names (#7974)
mharis001 Oct 30, 2020
2ca13fc
Medical - Cleanup preload debugging, bump to 2.00 (#7976)
PabstMirror Oct 30, 2020
171fbf1
Medical Treatment - Settings cleanup (#7973)
mharis001 Oct 31, 2020
260706c
Fix door opening for buildings with 10+ doors (#7975)
BaerMitUmlaut Nov 2, 2020
9226035
Arsenal - Conditional on sorts (#7889)
Nov 2, 2020
ff2136c
Update fnc_fillSort.sqf (#7981)
PabstMirror Nov 3, 2020
af2973a
Fix spare wheels receiving fall damage (#7978)
BaerMitUmlaut Nov 3, 2020
12ad406
Prep 3.13.5 Build 56
PabstMirror Nov 3, 2020
ae13438
Add Dahlgren to maintainers (#7985)
Dahlgren Nov 4, 2020
0a27a27
Update my GitHub link (#7991)
kymckay Nov 4, 2020
bc71949
Update fnc_sortStatement_protection.sqf (#7989)
PabstMirror Nov 5, 2020
712a277
Translations - Update / Fix French Translations (Medical Treatment) (…
Elgin675 Nov 7, 2020
95d4dc8
Translations - Update French Translations (Arsenal, Markers and Medic…
Elgin675 Nov 7, 2020
5d1aa28
Translations - Add French "Medical_Treatment_bodybagWhileStillAlive" …
Elgin675 Nov 7, 2020
119450f
DAGR / Interaction Menu / Repair - Fix overwriting globals (#7990)
BaerMitUmlaut Nov 8, 2020
0e64275
Medical Statemachine - Add setting to disallow bleedout in cardiac ar…
BaerMitUmlaut Nov 8, 2020
718d282
Ballistics - Update the B 556x45 dual (#7982)
Laid3acK Nov 8, 2020
d27122f
Medical Status - Fix unconscious AI aiming at enemies (#7977)
BaerMitUmlaut Nov 8, 2020
0c84cdd
Fix unconscious medics not being healed by other AI medics (#7995)
BaerMitUmlaut Nov 8, 2020
1efa25f
Explosives - Add `clackerAdded` event (#7994)
dedmen Nov 8, 2020
92cd367
Translations - Add French "Medical_Statemachine_CardiacArrestBleedout…
Elgin675 Nov 8, 2020
a621d2e
Medical Statemachine - Ensure bleedout condition string is code (#7998)
PabstMirror Nov 10, 2020
6299428
Fix players occasionally being invincible after respawning (#7999)
BaerMitUmlaut Nov 10, 2020
ad75c7c
Common / Medical - Fix loading patients into turret only seats (#7980)
BaerMitUmlaut Nov 15, 2020
d887b4a
Merge branch 'master' into release-3.13.5
PabstMirror Nov 16, 2020
109e12c
Prep 3.13.5 Build 57
PabstMirror Nov 16, 2020
b4e1909
add issue template alteration warnings (#8007)
bux Nov 20, 2020
137af79
Arsenal - Fix sort by load (#8011)
mharis001 Nov 24, 2020
9dc82ee
Fix fnc_common_addToInventory using (#8013)
Dystopian Nov 25, 2020
2ec28c5
Medical Engine - Hide actions that have ACE interactions (#8003)
Cyruz143 Nov 29, 2020
0e88479
Tagging - Remove useless isClass check in configClasses (#8017)
dedmen Nov 29, 2020
a64ba9f
Arsenal - Remove useless isClass check in configClasses (#8018)
dedmen Nov 29, 2020
5a6b21d
Map Gestures - Fix briefing mode group (#8025)
smitt14ua Dec 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@ about: Create a report to help us improve
title: ''
labels: kind/bug
assignees: ''

---

<!--
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template or parts of it and go my own path, the team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the team may close my issue without further explanation or engagement.
3. If I write an issue that has duplicates, the team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the team may close my issue without further explanation or engagement.
6. If I file an issue without collecting logs (RPT file, etc...), the team may close my issue without further explanation or engagement.

All good? Then proceed and fill out the items below.
-->

**Mods (complete and add to the following information):**
- **Arma 3:** `x.xx` [e.g. 1.00 stable, rc, dev]
- **CBA:** `3.x.x` [e.g. 3.0.0 stable, commit hash]
- **ACE3:** `3.x.x` [eg. 3.0.0 stable, commit hash]
_Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission!_
<!-- Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission! -->

**Description:**
A clear and concise description of what the bug is.

**Steps to reproduce:**
- _Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_
- Go to ...
- Click ...
- See ...
_Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_

1. _Go to ..._
2. _Click ..._
3. _See ..._

**Expected behavior:**
A clear and concise description of what you expected to happen.
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Brandon (TCVM) <brandondanyluk366@gmail.com>
bux578 <github@jonathandavid.de>
commy2
Dahlgren
esteldunedain <nicolas.d.badano@gmail.com>
Felix Wiegand <koffeinflummi@gmail.com>
Garth "L-H" de Wet <garthofhearts@gmail.com>
Expand Down Expand Up @@ -74,6 +75,7 @@ Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Drofseh <drofseh@gmail.com>
Dslyecxi <dslyecxi@gmail.com>
Eclipser <jms@modeemi.fi>
Elgin675
ElTyranos
eRazeri
evromalarkey <evromalarkey@gmail.com>
Expand Down Expand Up @@ -158,6 +160,7 @@ Tuupertunut
Valentin Torikian <valentin.torikian@gmail.com>
voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Walthzer <walthzer.69@gmail.com>
Winter <simon@agius-muscat.net>
xrufix
Zakant <Zakant@gmx.de>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.13.4-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.13.5-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
7 changes: 7 additions & 0 deletions addons/advanced_ballistics/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
<Russian>Имитирует небольшие изменения начальной скорости при каждом выстреле</Russian>
<Portuguese>Simula pequenas variações na velocidade do Freio de Boca entre cada tiro</Portuguese>
<Czech>Simuluje malé odchylky v úsťové rychlosti mezi jednotlivými výstřely</Czech>
<Turkish>Her atış arasında namlu çıkış hızındaki küçük değişiklikleri simüle eder</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
Expand Down Expand Up @@ -149,6 +150,7 @@
<Korean>탄약 온도에 비례해 총구 속도가 달라집니다</Korean>
<Chinese>子彈初速將隨彈藥溫度而有所變化</Chinese>
<Chinesesimp>子弹初速将随弹药温度而有所变化</Chinesesimp>
<Turkish>Mermi çıkış hızı cephane sıcaklığına göre değişir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
<English>Enable Barrel Length Simulation</English>
Expand All @@ -165,6 +167,7 @@
<Korean>총열 길이 구현 적용</Korean>
<Chinese>啟用槍管長度模擬系統</Chinese>
<Chinesesimp>启用枪管长度模拟系统</Chinesesimp>
<Turkish>Namlu Uzunluğu Simülasyonunu Etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
<English>Muzzle velocity varies with barrel length</English>
Expand All @@ -181,6 +184,7 @@
<Korean>총구 속도가 총열에 비례해 달라집니다</Korean>
<Chinese>子彈初速將隨槍管長度而有所變化</Chinese>
<Chinesesimp>子弹初速将随枪管长度而有所变化</Chinesesimp>
<Turkish>Mermi çıkış hızı namlu uzunluğuna göre değişir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
<English>Enable Bullet Trace Effect</English>
Expand All @@ -197,6 +201,7 @@
<Korean>예광탄 효과 적용</Korean>
<Chinese>啟用曳光彈效果</Chinese>
<Chinesesimp>启用曳光弹效果</Chinesesimp>
<Turkish>İzli Mermi Etkisini Etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_Description">
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
Expand All @@ -213,6 +218,7 @@
<Korean>대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다)</Korean>
<Chinese>啟用曳光彈效果給大口徑子彈 (只有透過高倍率光學瞄鏡才能看到)</Chinese>
<Chinesesimp>启用曳光弹效果给大口径子弹 (只有透过高倍率光学瞄镜才能看到)</Chinesesimp>
<Turkish>Yüksek kalibreli mermilere mermi izleme efekti sağlar (yalnızca yüksek güçlü optiklerden bakıldığında görülebilir)</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
<English>Simulation Interval</English>
Expand Down Expand Up @@ -278,6 +284,7 @@
<Korean>플레이어 주위의 발사체를 고급 탄도학으로 정의하는 범위를 정합니다(미터)</Korean>
<Chinese>以玩家的半徑距離(公尺)定義先進彈道系統啟用範圍</Chinese>
<Chinesesimp>以玩家的半径距离(公尺)定义先进弹道系统启用范围</Chinesesimp>
<Turkish>Mermilere gelişmiş balistik uygulandığı oyuncunun etrafındaki yarıçapı (metre cinsinden) tanımlar</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_Description">
<English>This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired.</English>
Expand Down
27 changes: 24 additions & 3 deletions addons/arsenal/ACE_Arsenal_Sorts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class GVAR(sorts) {
displayName = "";
tabs[] = {{}, {}};
statement = "";
condition = "true";
};

class ACE_alphabetically: sortBase {
Expand All @@ -27,24 +28,32 @@ class GVAR(sorts) {
statement = QUOTE(_this call FUNC(sortStatement_mass));
};

class ACE_amount: sortBase {
scope = 2;
displayName = CSTRING(sortByAmountText);
tabs[] = {{}, {0,1,2,3,4,5,6,7}};
statement = QUOTE(_this call FUNC(sortStatement_amount));
condition = QUOTE(_this select 0); // Only show for containers
};

class ACE_load: sortBase {
scope = 2;
displayName = CSTRING(sortByLoadText);
tabs[] = {{3,4,5}, {}};
statement = QUOTE(getContainerMaxLoad configName _this);
statement = QUOTE(getContainerMaxLoad (_this select 1));
};

class ACE_accuracy: sortBase {
scope = 2;
displayName = CSTRING(sortByAccuracyText);
tabs[] = {{0,1,2}, {}};
tabs[] = {{0,1}, {}};
statement = QUOTE(_this call FUNC(sortStatement_accuracy));
};

class ACE_rateOfFire: sortBase {
scope = 2;
displayName = CSTRING(sortByRateOfFireText);
tabs[] = {{0,1,2}, {}};
tabs[] = {{0,1}, {}};
statement = QUOTE(_this call FUNC(sortStatement_rateOfFire));
};

Expand All @@ -61,4 +70,16 @@ class GVAR(sorts) {
tabs[] = {{}, {4}};
statement = QUOTE(_this call FUNC(sortStatement_magCount));
};

class ACE_protectionBallistic: sortBase {
scope = 2;
displayName = CSTRING(sortByProtectionBallistic);
tabs[] = {{3,4,6}, {}};
statement = QUOTE([ARR_3(_this, 1000000, 1000)] call FUNC(sortStatement_protection));
};

class ACE_protectionExplosive: ACE_protectionBallistic {
displayName = CSTRING(sortByProtectionExplosive);
statement = QUOTE([ARR_3(_this, 1000, 1000000)] call FUNC(sortStatement_protection));
};
};
2 changes: 2 additions & 0 deletions addons/arsenal/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ PREP(scanConfig);
PREP(showItem);
PREP(sortPanel);
PREP(sortStatement_accuracy);
PREP(sortStatement_amount);
PREP(sortStatement_magCount);
PREP(sortStatement_mass);
PREP(sortStatement_mod);
PREP(sortStatement_protection);
PREP(sortStatement_rateOfFire);
PREP(sortStatement_scopeMag);
PREP(statBarStatement_accuracy);
Expand Down
2 changes: 2 additions & 0 deletions addons/arsenal/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "script_component.hpp"
#include "defines.hpp"

GVAR(currentBox) = objNull;

GVAR(EH_ID) = 0;
GVAR(lastSearchTextLeft) = "";
GVAR(lastSearchTextRight) = "";
Expand Down
8 changes: 5 additions & 3 deletions addons/arsenal/functions/fnc_addSort.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
* 1: Sort Class (a unique string for each algorithm) <STRING>
* 2: Display Name <STRING>
* 3: Algorithm <CODE>
* 4: Condition (Optional)<CODE>
*
* Return Value:
* 0: Array of IDs (ARRAY of STRINGS)
*
* Example:
* [[[0, 1]], "fireRateSort", "Sort by fire rate", {
* [[[0, 1], []], "fireRateSort", "Sort by fire rate", {
* params ["_itemCfg"];
* private _fireModes = getArray (_itemCfg >> "modes");
* private _fireRate = [];
Expand All @@ -35,7 +36,8 @@ params [
["_tabs", [[], []], [[]], 2],
["_class", "", [""]],
["_displayName", "", [""]],
["_statement", {}, [{}]]
["_statement", {}, [{}]],
["_condition", {true}, [{}]]
];

_tabs params [
Expand All @@ -57,7 +59,7 @@ private _fnc_addToTabs = {
} forEach _tabsToAddTo;
};

_finalArray = ["", _displayName, _statement];
_finalArray = ["", _displayName, _statement, _condition];

if !(_leftTabs isEqualTo []) then {
[GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
Expand Down
7 changes: 6 additions & 1 deletion addons/arsenal/functions/fnc_compileSorts.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,18 @@ private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (confi
private _class = configName _x;
private _displayName = getText (_x >> "displayName");
private _statement = getText (_x >> "statement");
private _condition = getText (_x >> "condition");
(getArray (_x >> "tabs")) params ["_leftTabsList", "_rightTabsList"];

if (_statement != "") then {
_statement = compile _statement;
};

_finalArray = ["", _displayName, _statement];
if (_condition != "") then {
_condition = compile _condition;
};

_finalArray = ["", _displayName, _statement, _condition];

if !(_leftTabsList isEqualTo []) then {
[_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
Expand Down
4 changes: 2 additions & 2 deletions addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ switch true do {
_ctrlPanel lbSetTooltip [_lbAdd,format ["%1\n%2",_displayName, _configName]];
_x call ADDMODICON;
};
} foreach ("isClass _x" configClasses _x);
} foreach ("isClass _x" configClasses (configfile >> "cfgfaces"));
} foreach ("true" configClasses _x);
} foreach ("true" configClasses (configfile >> "cfgfaces"));
};
case IDC_buttonVoice : {
private _voices = (configProperties [(configFile >> "CfgVoice"), "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [(configfile >> "CfgVoice" >> "NoVoice")];
Expand Down
10 changes: 7 additions & 3 deletions addons/arsenal/functions/fnc_fillSort.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ private _sortIndex = 0;

{
if (_x isEqualTo []) exitWith {};
_sortCtrl lbAdd (_x select 1);
if ((_x select 1) isEqualTo _lastSort) then {
_sortIndex = _forEachIndex;
_x params ["_sortName", "_displayName", "", "_condition"];
if ([_right] call _condition) then {
private _index = _sortCtrl lbAdd _displayName;
_sortCtrl lbSetData [_index, _sortName];
if (_displayName isEqualTo _lastSort) then {
_sortIndex = _index;
};
};
} forEach _sorts;

Expand Down
2 changes: 2 additions & 0 deletions addons/arsenal/functions/fnc_onArsenalClose.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ if (isMultiplayer) then {
[QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
};

GVAR(currentBox) = objNull;

GVAR(camera) = nil;
GVAR(cameraHelper) = nil;

Expand Down
2 changes: 2 additions & 0 deletions addons/arsenal/functions/fnc_openBox.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ if (isNil "_displayToUse" || {!isnil QGVAR(camera)}) exitWith {
[localize LSTRING(CantOpenDisplay), false, 5, 1] call EFUNC(common,displayText);
};

GVAR(currentBox) = _object;

if (_mode) then {
GVAR(virtualItems) = +(uiNamespace getVariable QGVAR(configItems));
} else {
Expand Down
14 changes: 10 additions & 4 deletions addons/arsenal/functions/fnc_sortPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ private _selected = if (_right) then {
_panel lbData _curSel
};

private _mode = 0 max lbCurSel _sortControl;
private _statement = _sorts select _mode select 2;
private _sortName = _sortControl lbData (0 max lbCurSel _sortControl);
private _sortConfig = _sorts select (0 max (_sorts findIf {(_x select 0) isEqualTo _sortName}));
private _statement = _sortConfig select 2;

missionNamespace setVariable [
[QGVAR(lastSortLeft), QGVAR(lastSortRight)] select _rightSort,
_sorts select _mode select 1
_sortConfig select 1
];

private _for = if (_right) then {
Expand All @@ -117,8 +118,13 @@ _for do {
} else {
_panel lbData _i
};
private _quantity = if (_right) then {
parseNumber (_panel lnbText [_i, 2])
} else {
0
};
private _itemCfg = _cfgClass >> _item;
private _value = _itemCfg call _statement;
private _value = [_itemCfg, _item, _quantity] call _statement;
if (_value isEqualType 0) then {
_value = [_value, 8] call CBA_fnc_formatNumber;
};
Expand Down
19 changes: 19 additions & 0 deletions addons/arsenal/functions/fnc_sortStatement_amount.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "script_component.hpp"
/*
* Author: SynixeBrett
* Statement to sort items by the amount in inventory.
*
* Arguments:
* 0: Item Config <CONFIG>
* 1: Item Name <STRING>
* 2: Quantity <NUMBER>
*
* Return Value:
* Sorting Value <NUMBER>
*
* Public: No
*/

params ["", "", "_quantity"];

10000 - _quantity
24 changes: 24 additions & 0 deletions addons/arsenal/functions/fnc_sortStatement_protection.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Statement to sort items by their protection (combination of ballistic and explosive).
*
* Arguments:
* 0: Item Config <CONFIG>
* 1: Ballistic (passthrough) coefficent <NUMBER>
* 2: Explosive (armor) coefficent <NUMBER>
*
* Return Value:
* Sorting Value <NUMBER>
*
* Public: No
*/

params ["_itemInfo", "_ballisticCo", "_explosiveCo"];
_itemInfo params ["_itemCfg"];

(([[_itemCfg], ["passthrough", "armor"]] call BIS_fnc_configExtremes) select 1) params [["_passthroughMax", 0], ["_armorMax", 0]];

private _protectionCombined = _passthroughMax * _ballisticCo + _armorMax * _explosiveCo;

_protectionCombined
Loading