Merge remote-tracking branch 'upstream/master' into patch-3

This commit is contained in:
Vdauphin 2021-03-29 21:37:25 +02:00
commit 3bfda9364d
426 changed files with 2071 additions and 1357 deletions

View File

@ -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.

View File

@ -3,11 +3,7 @@ name: Extensions
on:
pull_request:
paths:
- 'extensions/*'
- 'extensions/*/*'
- 'extensions/*/*/*'
- 'extensions/*/*/*/*'
- 'extensions/*/*/*/*/*'
- 'extensions/**'
jobs:
build:

View File

@ -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>
@ -46,6 +47,7 @@ Anthariel <Contact@storm-simulation.com>
Arcanum417 <lubos.len@gmail.com>
Anton
Arkhir <wonsz666@gmail.com >
ARV187 aka Spark23
Asgar Serran <piechottaf@web.de>
BaerMitUmlaut
Bamse <bamsis@gmail.com>

View File

@ -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.6-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">

View File

@ -60,8 +60,8 @@ private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
private _inheritedBarrelConfig = (_muzzleVelocityTable isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (_ammoTempMuzzleVelocityShifts isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
@ -73,7 +73,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
private _linearMuliplier = _typicalSpeed / _parentSpeed;
if (_inheritedBarrelConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
} else {
@ -82,7 +82,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
};
if (_inheritedTempConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
} else {

View File

@ -13,7 +13,7 @@
[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)
},
true // Needs mission restart
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(enableStaminaBar),
@ -28,7 +28,7 @@
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(fadeStaminaBar),
@ -43,7 +43,7 @@
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(performanceFactor),
@ -52,7 +52,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(recoveryFactor),
@ -61,7 +61,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(loadFactor),
@ -70,7 +70,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(terrainGradientFactor),
@ -79,7 +79,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(swayFactor),
@ -88,4 +88,4 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

View File

@ -53,7 +53,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
_cross = 2; // 2: View LOD Block (Red)
} else {
if !((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo []) then {
if ((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isNotEqualTo []) then {
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
};
};

View File

@ -31,7 +31,7 @@
_nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]);
{
if (!(_x in _throwablesHelped) &&
if (!(_x in _throwablesHelped) && {!((attachedTo _x) getVariable [QGVAR(disablePickUp), false])} &&
{!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell"
{GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}}
) then {

View File

@ -19,7 +19,7 @@ params ["_vehicle"];
if (unitIsUAV _vehicle) exitWith {};
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _addAction = false;

View File

@ -40,7 +40,7 @@ class GVAR(sorts) {
scope = 2;
displayName = CSTRING(sortByLoadText);
tabs[] = {{3,4,5}, {}};
statement = QUOTE(getContainerMaxLoad configName _this);
statement = QUOTE(getContainerMaxLoad (_this select 1));
};
class ACE_accuracy: sortBase {

View File

@ -8,15 +8,15 @@ PREP_RECOMPILE_START;
PREP_RECOMPILE_END;
// Arsenal
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init;
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init;
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_fnc_addSetting;
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_fnc_addSetting;
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_fnc_addSetting;
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
// Arsenal loadouts
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_Settings_fnc_init;
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_fnc_addSetting;
[QGVAR(statsToggle), {
params ["_display", "_showStats"];

View File

@ -165,6 +165,18 @@
#define IDC_ATTRIBUTE_IMPORT_BUTTON 8109
#define IDC_ATTRIBUTE_ADD_COMPATIBLE 8110
// Indexes of virtual items array
#define IDX_VIRT_WEAPONS 0
#define IDX_VIRT_ATTACHEMENTS 1
#define IDX_VIRT_ITEMS_ALL 2
#define IDX_VIRT_HEADGEAR 3
#define IDX_VIRT_UNIFORM 4
#define IDX_VIRT_VEST 5
#define IDX_VIRT_BACKPACK 6
#define IDX_VIRT_GOGGLES 7
#define SYMBOL_ITEM_NONE ""
#define SYMBOL_ITEM_REMOVE "×"
#define SYMBOL_ITEM_VIRTUAL "∞"

View File

@ -32,9 +32,9 @@ if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into
//get name of DLC
private _dlcName = "";
private _addons = configsourceaddonlist _configPath;
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0);
if !(_mods isEqualTo []) then {
if (_mods isNotEqualTo []) then {
_dlcName = _mods select 0;
};
};

View File

@ -61,11 +61,11 @@ private _fnc_addToTabs = {
_finalArray = ["", _displayName, _statement, _condition];
if !(_leftTabs isEqualTo []) then {
if (_leftTabs isNotEqualTo []) then {
[GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs;
};
if !(_rightTabs isEqualTo []) then {
if (_rightTabs isNotEqualTo []) then {
[GVAR(sortListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs;
};

View File

@ -124,7 +124,7 @@ switch (GVAR(currentLoadoutsTab)) do {
};
};
if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith {
if (GVAR(shiftState) && {is3DEN} && {_loadoutName isNotEqualTo ""} && {_cursSelRow != -1} && {_loadoutIndex isNotEqualTo -1}) exitwith {
private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName};
if (_defaultLoadoutsSearch isEqualto -1) then {
GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout];

View File

@ -77,11 +77,11 @@ private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (confi
_finalArray = ["", _displayName, _statement, _condition];
if !(_leftTabsList isEqualTo []) then {
if (_leftTabsList isNotEqualTo []) then {
[_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
};
if !(_rightTabsList isEqualTo []) then {
if (_rightTabsList isNotEqualTo []) then {
[_sortListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs;
};
} foreach _configEntries;

View File

@ -51,7 +51,7 @@ switch true do {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach ((GVAR(virtualItems) select 0) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC));
} foreach ((GVAR(virtualItems) select IDX_VIRT_WEAPONS) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC));
};
case (_ctrlIDC in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) : {
@ -65,19 +65,19 @@ switch true do {
case IDC_buttonUniform : {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 4);
} foreach (GVAR(virtualItems) select IDX_VIRT_UNIFORM);
};
case IDC_buttonVest : {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 5);
} foreach (GVAR(virtualItems) select IDX_VIRT_VEST);
};
case IDC_buttonBackpack : {
{
["CfgVehicles", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 6);
} foreach (GVAR(virtualItems) select IDX_VIRT_BACKPACK);
};
};
};
@ -96,12 +96,12 @@ switch true do {
case IDC_buttonHeadgear: {
{
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 3);
} foreach (GVAR(virtualItems) select IDX_VIRT_HEADGEAR);
};
case IDC_buttonGoggles : {
{
["CfgGlasses", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach (GVAR(virtualItems) select 7);
} foreach (GVAR(virtualItems) select IDX_VIRT_GOGGLES);
};
case IDC_buttonNVG : {
{
@ -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")];
@ -199,7 +199,7 @@ private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace)
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
private _currentData = _ctrlPanel lbData _lbIndex;
if (!(_currentData isEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
if ((_currentData isNotEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith {
_ctrlPanel lbSetCurSel _lbIndex;
};
};

View File

@ -224,7 +224,7 @@ switch (_ctrlIDC) do {
if (_leftPanelState) then {
{
["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsPrimaryMuzzle);
} foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _compatibleMagsPrimaryMuzzle);
};
};
@ -232,14 +232,14 @@ switch (_ctrlIDC) do {
if (_leftPanelState) then {
{
["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem);
} foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsSecondaryMuzzle);
} foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _compatibleMagsSecondaryMuzzle);
};
};
case IDC_buttonMag : {
{
["CfgMagazines", _x, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 2) arrayIntersect _allCompatibleMags);
} foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _allCompatibleMags);
{
["CfgMagazines", _x, true, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 19) arrayIntersect _allCompatibleMags);
@ -248,7 +248,7 @@ switch (_ctrlIDC) do {
case IDC_buttonMagALL : {
{
["CfgMagazines", _x, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 2);
} foreach (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL);
{
["CfgMagazines", _x, true, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 19);
@ -289,13 +289,13 @@ switch (_ctrlIDC) do {
{
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 18);
} foreach ((GVAR(virtualItems) select 18) select {!((toLower _x) in _blockItems)});
{
["CfgVehicles", _x, false, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 23);
} foreach ((GVAR(virtualItems) select 23) select {!((toLower _x) in _blockItems)});
{
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
} foreach (GVAR(virtualItems) select 24);
} foreach ((GVAR(virtualItems) select 24) select {!((toLower _x) in _blockItems)});
};
default {
@ -308,6 +308,16 @@ switch (_ctrlIDC) do {
{
["CfgWeapons", _x, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 17) select {(toLower _x) in _items});
{
["CfgWeapons", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 18) select {(toLower _x) in _items});
{
["CfgVehicles", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 23) select {(toLower _x) in _items});
{
["CfgGlasses", _x, false, true] call _fnc_fill_right_Container;
} foreach ((GVAR(virtualItems) select 24) select {(toLower _x) in _items});
};
};
};
@ -356,7 +366,7 @@ private _sortRightCtrl = _display displayCtrl IDC_sortRightTab;
[_sortRightCtrl] call FUNC(sortPanel);
// Select current data if not in a container
if !(_itemsToCheck isEqualTo []) then {
if (_itemsToCheck isNotEqualTo []) then {
for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do {
private _currentData = _ctrlPanel lbData _lbIndex;

View File

@ -64,7 +64,7 @@ if (!isNil "_itemCfg") then {
// Handle titles, bars and text
_statsList = _statsList select [0, 5];
if !(_statsList isEqualTo []) then {
if (_statsList isNotEqualTo []) then {
{
_x params ["_ID", "_configEntry", "_title", "_bools", "_statements"];
_bools params ["_showBar", "_showText"];

View File

@ -59,7 +59,6 @@ if (is3DEN) then {
curatorcamera cameraEffect ["internal","back"];
} else {
GVAR(camera) cameraEffect ["terminate","back"];
ACE_player switchCamera GVAR(cameraView);
};
};
@ -71,6 +70,8 @@ if (!isNil QGVAR(moduleUsed)) then {
objNull remoteControl GVAR(center);
};
ACE_player switchCamera GVAR(cameraView);
if (isMultiplayer) then {
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;

View File

@ -64,24 +64,24 @@ GVAR(statsInfo) = [true, 0, controlNull, nil, nil];
for "_index" from 0 to 10 do {
switch (_index) do {
// primary, secondary, handgun weapons
case 0: {
case IDX_VIRT_WEAPONS: {
private _array = LIST_DEFAULTS select _index;
if !((_array select 0) isEqualTo "") then {
if ((_array select 0) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0);
};
if !((_array select 1) isEqualTo "") then {
if ((_array select 1) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1);
};
if !((_array select 2) isEqualTo "") then {
if ((_array select 2) isNotEqualTo "") then {
((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2);
};
};
// Accs for the weapons above
case 1: {
case IDX_VIRT_ATTACHEMENTS: {
private _array = LIST_DEFAULTS select _index;
_array params ["_accsArray", "_magsArray"];
@ -96,28 +96,28 @@ for "_index" from 0 to 10 do {
} forEach _accsArray;
{
if !(_x isEqualTo []) then {
if (_x isNotEqualTo []) then {
if (_x select 0 != "") then {
(GVAR(virtualItems) select 2) pushBackUnique (_x select 0);
(GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) pushBackUnique (_x select 0);
};
if (count _x > 1 && {_x select 1 != ""}) then {
(GVAR(virtualItems) select 2) pushBackUnique (_x select 1);
(GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) pushBackUnique (_x select 1);
};
};
} forEach _magsArray;
};
// Inventory items
case 2: {
case IDX_VIRT_ITEMS_ALL: {
call FUNC(updateUniqueItemsList);
};
// The rest
default {
private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")};
if !(_array isEqualTo []) then {
private _array = (LIST_DEFAULTS select _index) select {_x isNotEqualTo ""};
if (_array isNotEqualTo []) then {
{(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array;
};
};

View File

@ -25,7 +25,7 @@ GVAR(shiftState) = _shiftState;
private _return = true;
private _loadoutsDisplay = findDisplay IDD_loadouts_display;
if !(_loadoutsDisplay isEqualTo displayNull) then {
if (_loadoutsDisplay isNotEqualTo displayNull) then {
if !(GVAR(loadoutsSearchbarFocus)) then {
switch true do {
// Close button

View File

@ -60,7 +60,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};
@ -102,7 +102,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};
@ -143,7 +143,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if !(_compatibleMags isEqualTo []) then {
if (_compatibleMags isNotEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};

View File

@ -68,9 +68,9 @@ if (_items isEqualType true) then {
private _itemCount = {
if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then {
!(_x isEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
(_x isNotEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]})
} else {
!(_x isEqualTo [])
(_x isNotEqualTo [])
};
} count _cargo;

View File

@ -134,7 +134,7 @@ _for do {
if (_right) then {
_panel lnbSetText [[_i, 1], format ["%1%2", _value, _panel lnbText [_i, 1]]];
} else {
if !(_item isEqualTo "") then {
if (_item isNotEqualTo "") then {
_panel lbSetText [_i, format ["%1%2", _value, _panel lbText _i]];
};
};
@ -159,7 +159,7 @@ if (_right) then {
if (_data == _selected) then {_panel lbSetCurSel _i};
};
private _name = getText (_cfgClass >> _data >> "displayName");
if !(_name isEqualTo "") then {
if (_name isNotEqualTo "") then {
_panel lbSetText [_i, _name];
};
};

View File

@ -16,9 +16,9 @@ params ["_config"];
private _dlc = "";
private _addons = configSourceAddonList _config;
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _mods = configSourceModList (configfile >> "CfgPatches" >> _addons select 0);
if !(_mods isEqualTo []) then {
if (_mods isNotEqualTo []) then {
_dlc = _mods select 0;
};
};

View File

@ -14,7 +14,8 @@
* Public: No
*/
params ["_itemCfg", "_ballisticCo", "_explosiveCo"];
params ["_itemInfo", "_ballisticCo", "_explosiveCo"];
_itemInfo params ["_itemCfg"];
(([[_itemCfg], ["passthrough", "armor"]] call BIS_fnc_configExtremes) select 1) params [["_passthroughMax", 0], ["_armorMax", 0]];

View File

@ -21,7 +21,7 @@ GVAR(virtualItems) set [22, [[], [], [], []]];
GVAR(virtualItems) set [23, []];
GVAR(virtualItems) set [24, []];
private _array = LIST_DEFAULTS select 2;
private _array = LIST_DEFAULTS select IDX_VIRT_ITEMS_ALL;
private _itemsCache = uiNamespace getVariable QGVAR(configItems);
private _configCfgWeapons = configFile >> "CfgWeapons";
@ -35,7 +35,7 @@ private _configGlasses = configFile >> "CfgGlasses";
case (
isClass (_configMagazines >> _x) &&
{_x in (_itemsCache select 2)} &&
{!(_x in (GVAR(virtualItems) select 2))}
{!(_x in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL))}
): {
(GVAR(virtualItems) select 19) pushBackUnique _x;
};
@ -61,7 +61,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 0))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 0))} &&
{_x in ((_itemsCache select 1) select 0)}
): {
((GVAR(virtualItems) select 22) select 0) pushBackUnique _x;
@ -70,7 +70,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 1))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 1))} &&
{_x in ((_itemsCache select 1) select 1)}
): {
((GVAR(virtualItems) select 22) select 1) pushBackUnique _x;
@ -79,7 +79,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 2))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 2))} &&
{_x in ((_itemsCache select 1) select 2)}
): {
((GVAR(virtualItems) select 22) select 2) pushBackUnique _x;
@ -87,7 +87,7 @@ private _configGlasses = configFile >> "CfgGlasses";
// acc
case (
isClass (_configCfgWeapons >> _x) &&
{!(_x in ((GVAR(virtualItems) select 1) select 3))} &&
{!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 3))} &&
{_x in ((_itemsCache select 1) select 3)}
): {
((GVAR(virtualItems) select 22) select 3) pushBackUnique _x;

View File

@ -19,8 +19,8 @@ private _weaponCfg = configFile >> "CfgWeapons";
private _magCfg = configFile >> "CfgMagazines";
private _vehcCfg = configFile >> "CfgVehicles";
private _glassesCfg = configFile >> "CfgGlasses";
private _weaponsArray = GVAR(virtualItems) select 0;
private _accsArray = GVAR(virtualItems) select 1;
private _weaponsArray = GVAR(virtualItems) select IDX_VIRT_WEAPONS;
private _accsArray = GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS;
private _nullItemsAmount = 0;
private _unavailableItemsAmount = 0;
@ -58,7 +58,7 @@ private _fnc_weaponCheck = {
private _mag = _x select 0;
if (isClass (_magCfg >> _mag)) then {
if !(_mag in (GVAR(virtualItems) select 2)) then {
if !(_mag in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL)) then {
_unavailableItemsList pushBackUnique _mag;
_dataPath set [_forEachIndex, []];
@ -137,7 +137,7 @@ for "_dataIndex" from 0 to 9 do {
if (isClass (_magCfg >> _item)) then {
if !(
_item in (GVAR(virtualItems) select 2) ||
_item in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) ||
_item in (GVAR(virtualItems) select 15) ||
_item in (GVAR(virtualItems) select 16)
) then {
@ -173,7 +173,7 @@ for "_dataIndex" from 0 to 9 do {
if (isClass (_weaponCfg >> _item)) then {
if !(_item in (GVAR(virtualItems) select 3)) then {
if !(_item in (GVAR(virtualItems) select IDX_VIRT_HEADGEAR)) then {
_unavailableItemsList pushBackUnique _item;
_loadout set [_dataIndex, ""];
@ -195,7 +195,7 @@ for "_dataIndex" from 0 to 9 do {
if (isClass (_glassesCfg >> _item)) then {
if !(_item in (GVAR(virtualItems) select 7)) then {
if !(_item in (GVAR(virtualItems) select IDX_VIRT_GOGGLES)) then {
_unavailableItemsList pushBackUnique _item;
_loadout set [_dataIndex, ""];

View File

@ -418,9 +418,13 @@
</Key>
<Key ID="STR_ACE_Arsenal_sortByProtectionBallistic">
<English>Sort by ballistic protection</English>
<French>Trier par protection balistique</French>
<Japanese>防弾性能で並び替え</Japanese>
</Key>
<Key ID="STR_ACE_Arsenal_sortByProtectionExplosive">
<English>Sort by explosive protection</English>
<French>Trier par résistance aux explosifs</French>
<Japanese>防爆性能で並び替え</Japanese>
</Key>
<Key ID="STR_ACE_Arsenal_buttonShareTooltip">
<English>Share or stop sharing the selected loadout</English>
@ -1090,7 +1094,6 @@
<Spanish>Niveles de potasio</Spanish>
<German>Kaliumspiegel</German>
<French>Taux de potassium</French>
<Japanese>カリウム レベル</Japanese>
<Chinesesimp>钾水平</Chinesesimp>
<Chinese>鉀水平</Chinese>
<Italian>Ilvello di potassio</Italian>
@ -1099,6 +1102,7 @@
<Portuguese>Níveis de Potássio</Portuguese>
<Czech>Úrovně draslíku</Czech>
<Turkish>Potasyum seviyeleri</Turkish>
<Japanese>カリウム含有量</Japanese>
</Key>
<Key ID="STR_ACE_Arsenal_statMagnification">
<English>Magnification</English>

View File

@ -15,7 +15,7 @@
if (GVAR(advancedCorrections)) then {
["LandVehicle", "init", {
params ["_vehicle"];
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _vehicleCfg = configOf _vehicle;
// config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner
private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then {
getNumber (_vehicleCfg >> QGVAR(applyCorrections))

View File

@ -4,7 +4,7 @@ class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
weapons[] = {"ACE_artilleryTable"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author = ECSTRING(common,ACETeam);

View File

@ -7,7 +7,7 @@ private _fnc_showPropertyDefined = {
params ["_configBase", "_configProperty"];
private _customAll = configProperties [_configBase, 'isClass _x && {isNumber (_x >> _configProperty)}', true];
private _customExplicit = _customAll select {!([] isEqualTo configProperties [_x, 'configName _x == _configProperty', false])};
private _customExplicit = _customAll select {[] isNotEqualTo configProperties [_x, 'configName _x == _configProperty', false]};
diag_log text format ["%1 with custom %2: %3 Explicit, %4 Total]", configName _configBase, _configProperty, count _customExplicit, count _customAll];
diag_log text format [" - Defined: %1", _customExplicit apply {configName _x}];
diag_log text format [" - Inherited: %1", _customAll apply {[configName _x, getNumber (_x >> _configProperty)]}];

View File

@ -26,7 +26,7 @@ private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []]
TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown);
{
private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _x;
private _vehicleCfg = configOf _x;
// config "ace_artillerytables_showRangetable" [0 disabled, 1 enabled] falls back to artilleryScanner
private _showRangetable = if (isNumber (_vehicleCfg >> QGVAR(showRangetable))) then {
getNumber (_vehicleCfg >> QGVAR(showRangetable))

View File

@ -10,7 +10,7 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
true, // isGlobal
{[QGVAR(advancedCorrections), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(disableArtilleryComputer), "CHECKBOX",
@ -20,4 +20,4 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
true, // isGlobal
{[QGVAR(disableArtilleryComputer), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

View File

@ -60,7 +60,7 @@ if (_parseInput) then {
_subsonicDrop = _transonicDrop max _subsonicDrop;
};
if ((GVAR(truingDropDropData) select 0) == 0 || {!([_transonicRange, _subsonicRange] isEqualTo GVAR(truingDropRangeData))}) then {
if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRange] isNotEqualTo GVAR(truingDropRangeData)}) then {
if (isNil QGVAR(targetSolutionInput)) then {
call FUNC(calculate_target_solution);
};

View File

@ -74,7 +74,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0]));
};
private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition);
private _lineInterection = !((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isEqualTo []);
private _lineInterection = ((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isNotEqualTo []);
//Don't allow placing in a bad position:
if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};

View File

@ -46,8 +46,8 @@ if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find
private _isChemlight = _attachedObject isKindOf "Chemlight_base";
// Exit if can't add the item
if (!(_unit canAdd _itemName) && {!_isChemlight}) exitWith {
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
if (!([_unit, _itemName] call CBA_fnc_canAddItem) && {!_isChemlight}) exitWith {
[LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured);
};
// Add item to inventory (unless it's a chemlight)

View File

@ -154,23 +154,6 @@
<Chinesesimp>已取下萤光棒</Chinesesimp>
<Turkish>ık Çubuğu Söküldü</Turkish>
</Key>
<Key ID="STR_ACE_Attach_Inventory_Full">
<English>No inventory space</English>
<German>Kein Platz im Inventar</German>
<Spanish>Sin espacio en inventario</Spanish>
<Polish>Brak miejsca w ekwipunku</Polish>
<French>Pas de place dans l'inventaire</French>
<Czech>Nedostatek místa v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Non hai più spazio</Italian>
<Hungarian>Nincs több hely</Hungarian>
<Russian>В инвентаре нет места</Russian>
<Japanese>インベントリに空きがない</Japanese>
<Korean>넣을 공간이 없음</Korean>
<Chinese>無可用空間</Chinese>
<Chinesesimp>无可用空间</Chinesesimp>
<Turkish>Envanter de alan yok</Turkish>
</Key>
<Key ID="STR_ACE_Attach_IrStrobe_Name">
<English>IR Strobe</English>
<German>IR-Stroboskop</German>

View File

@ -34,7 +34,7 @@ class EGVAR(arsenal,stats) {
displayName= CSTRING(statBallisticCoef);
showText= 1;
textStatement = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); private _ballisticCoef = getArray (_ammoCfg >> _stat select 1); _ballisticCoef sort false; format [ARR_4('%1 G%2 (%3)', _ballisticCoef select 0 ,getNumber (_ammoCfg >> _stat select 0), getText (_ammoCfg >> _stat select 2))]);
condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); !(getArray (_ammoCfg >> _stat select 1) isEqualTo []));
condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); (getArray (_ammoCfg >> _stat select 1) isNotEqualTo []));
tabs[] ={{}, {4}};
};
class ACE_bulletMass: statBase {

View File

@ -130,6 +130,14 @@ class CfgAmmo {
ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900};
ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
};
class B_556x45_dual: B_556x45_Ball {
airFriction = -0.00055;
ACE_ammoTempMuzzleVelocityShifts[] = {-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
ACE_muzzleVelocities[] = {268}; // at 21°C, at 15°C 267 m/s according with the 20Rnd_556x45_UW_mag initSpeed
ACE_barrelLengths[] = {457.2}; // according with the SDAR barrel length: https://en.wikipedia.org/wiki/Kel-Tec_RFB
};
class ACE_556x45_Ball_Mk262 : B_556x45_Ball {
airFriction=-0.00111805;
ACE_caliber=5.69;

View File

@ -67,6 +67,15 @@ class CfgMagazineWells {
};
};
class CBA_556x45_SCAR_EGLM {
ADDON[] = {
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",
"ACE_30Rnd_556x45_Stanag_Mk262_mag",
"ACE_30Rnd_556x45_Stanag_Mk318_mag",
"ACE_30Rnd_556x45_Stanag_Tracer_Dim"
};
};
class STANAG_556x45 { //Vanilla magwell
ADDON[] = {
"ACE_30Rnd_556x45_Stanag_M995_AP_mag",

View File

@ -22,4 +22,4 @@ private _statement = {
[_player, _target, _vehicle] call FUNC(doLoadCaptive);
};
[_target call EFUNC(common,nearestVehiclesFreeSeat), _statement, _target] call EFUNC(interact_menu,createVehiclesActions)
[[_target, nil, true] call EFUNC(common,nearestVehiclesFreeSeat), _statement, _target] call EFUNC(interact_menu,createVehiclesActions)

View File

@ -34,7 +34,7 @@ if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [
if (isNull _vehicle) then {
// Looking at a captive unit, get nearest vehicle with valid seat:
_vehicle = (_target call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull];
_vehicle = ([_target, nil, true] call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull];
} else {
// We have a vehicle picked, make sure it has empty seats:
if (_vehicle emptyPositions "cargo" == 0 && {_vehicle emptyPositions "gunner" == 0}) then {

View File

@ -31,7 +31,7 @@ if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [
if (isNull _vehicle) then {
// Looking at a captive unit, get nearest vehicle with valid seat:
_vehicle = (_target call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull];
_vehicle = ([_target, nil, true] call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull];
} else {
// We have a vehicle picked, make sure it has empty seats:
if (_vehicle emptyPositions "cargo" == 0 && {_vehicle emptyPositions "gunner" == 0}) then {

View File

@ -36,7 +36,7 @@ if (local _unit) then {
_x params ["_xUnit", "", "", "_xTurretPath"];
if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath};
} forEach (fullCrew (vehicle _unit));
if (!(_turretPath isEqualTo [])) then {
if (_turretPath isNotEqualTo []) then {
TRACE_1("Setting FFV Handcuffed Animation",_turretPath);
[_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation);
[_unit, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation);

View File

@ -10,7 +10,7 @@ class Cfg3DEN {
control = "Edit";
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace););
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0));
defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(space),0));
validate = "number";
condition = "objectHasInventoryCargo";
@ -24,7 +24,7 @@ class Cfg3DEN {
// Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!)
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize););
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1));
defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(size),-1));
validate = "number";
condition = "1-objectBrain";

View File

@ -11,8 +11,8 @@
// Show hint as feedback
private _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded;
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
private _itemName = getText (configOf _item >> "displayName");
private _vehicleName = getText (configOf _vehicle >> "displayName");
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
@ -33,7 +33,7 @@
// Show hint as feedback
private _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
private _vehicleName = getText (configOf _vehicle >> "displayName");
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
@ -70,7 +70,7 @@ GVAR(vehicleAction) = [
{
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(enable) &&
{(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} &&
{(_target getVariable [QGVAR(hasCargo), getNumber (configOf _target >> QGVAR(hasCargo)) == 1])} &&
{locked _target < 2} &&
{([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} &&
{alive _target} &&
@ -99,12 +99,12 @@ GVAR(objectAction) = [
{
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(enable) &&
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) in [true, 1]} &&
{(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} &&
{locked _target < 2} &&
{alive _target} &&
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
{((nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) findIf {
private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo));
private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo));
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
(_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} &&
{([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE}

View File

@ -23,7 +23,7 @@ private _statement = {
};
private _vehicles = (nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) select {
private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo));
private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo));
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
(_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} &&
{([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE}

View File

@ -21,7 +21,7 @@ params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]];
if ((!_ignoreInteraction) && {speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}}) exitWith {TRACE_1("vehicle not stable",_vehicle); false};
if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith {
if (_item isEqualType objNull && {{alive _x && {getText (configOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith {
TRACE_1("item is occupied",_item);
false
};

View File

@ -18,4 +18,4 @@
params ["_object"];
// TRACE_1("params",_object);
(_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]) max 0
(_object getVariable [QGVAR(space), getNumber (configOf _object >> QGVAR(space))]) max 0

View File

@ -76,7 +76,7 @@ if (_vehicle isKindOf "Air") then {
private _turretPath = _player call CBA_fnc_turretPath;
(_player == (driver _target)) || // pilot
{(getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1} || // coPilot
{_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config
{_turretPath in (getArray (configOf _target >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config
};
private _statement = {
//IGNORE_PRIVATE_WARNING ["_target", "_player"];

View File

@ -99,8 +99,8 @@ if (_showHint) then {
[
[
LSTRING(UnloadedItem),
getText (configFile >> "CfgVehicles" >> typeOf _itemObject >> "displayName"),
getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName")
getText (configOf _itemObject >> "displayName"),
getText (configOf _vehicle >> "displayName")
],
3
] call EFUNC(common,displayTextStructured);

View File

@ -60,7 +60,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
] call EFUNC(common,progressBar);
_return = true;
} else {
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
private _displayName = getText (configOf _object >> "displayName");
[[LSTRING(LoadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured);
};

View File

@ -34,4 +34,4 @@ if (count _loaded != count _newLoaded) then {
_vehicle setVariable [QGVAR(loaded), _newLoaded, true];
};
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
_vehicle setVariable [QGVAR(space), getNumber (configOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];

View File

@ -5,7 +5,7 @@
true,
true,
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(loadTimeCoefficient), "SLIDER",
@ -14,7 +14,7 @@
[0, 10, 5, 1],
true,
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(paradropTimeCoefficent), "SLIDER",
@ -23,6 +23,7 @@
[0, 10, 2.5, 1],
true,
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
[
@ -32,4 +33,4 @@
[["CargoNet_01_box_F", "Land_WoodenBox_02_F"], [LSTRING(cargoNetType_modernStyle), LSTRING(cargoNetType_ww2)], 0],
true,
{[QGVAR(cargoNetType), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

View File

@ -2,7 +2,7 @@
class GVAR(menu) {
idd = 314614;
movingEnable = true;
movingEnable = 1;
onLoad = QUOTE([_this select 0] call FUNC(onMenuOpen));
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];);
class controlsBackground {

View File

@ -9,11 +9,8 @@ class CfgVehicles {
class ACE_Chemlights {
displayName = CSTRING(Action_Chemlights);
icon = "\a3\ui_f\data\gui\cfg\Hints\chemlights_ca.paa";
condition = QUOTE(count ([ACE_player] call FUNC(getShieldComponents)) > 0);
statement = "true";
exceptions[] = {"isNotDragging", "isNotSwimming", "notOnMap", "isNotInside", "isNotSitting"};
insertChildren = QUOTE(_this call DFUNC(compileChemlightMenu));
showDisabled = 0;
insertChildren = QUOTE(call DFUNC(compileChemlightMenu));
};
};
};

View File

@ -17,7 +17,7 @@
params ["_dummy"];
private _chemlightClass = getText (configFile >> "CfgVehicles" >> typeOf _dummy >> "ACE_Attachable");
private _chemlightClass = getText (configOf _dummy >> "ACE_Attachable");
private _config = configFile >> "CfgAmmo" >> _chemlightClass;
private _delay = getNumber (_config >> "explosionTime");
private _lifeTime = getNumber (_config >> "timeToLive");

View File

@ -49,23 +49,6 @@
<Spanish>%1&lt;br/&gt;Preparado</Spanish>
<Turkish>%1&lt;br/&gt; Hazırlandı</Turkish>
</Key>
<Key ID="STR_ACE_Chemlights_Inventory_Full">
<English>No inventory space</English>
<German>Kein Platz im Inventar</German>
<Spanish>Sin espacio en inventario</Spanish>
<Polish>Brak miejsca w ekwipunku</Polish>
<French>Pas de place dans l'inventaire</French>
<Czech>Nedostatek místa v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Nessuno spazio nell'inventario</Italian>
<Hungarian>Nincs több hely</Hungarian>
<Russian>В инвентаре нет места</Russian>
<Japanese>インベントリに空きがありません</Japanese>
<Korean>소지품 공간이 없음</Korean>
<Chinese>已無存放空間</Chinese>
<Chinesesimp>已无存放空间</Chinesesimp>
<Turkish>Envanter de alan yok</Turkish>
</Key>
<Key ID="STR_ACE_Chemlights_Box_DisplayName">
<English>[ACE] Chemlights</English>
<Japanese>[ACE] ケミライト</Japanese>

View File

@ -8,14 +8,12 @@ class Extended_PreStart_EventHandlers {
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
disableModuload = true;
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
disableModuload = true;
};
};

View File

@ -23,7 +23,7 @@ class RscTitles {
class ACE_RscHint {
idd = -1;
onLoad = "uiNamespace setVariable ['ACE_ctrlHint', (_this select 0) displayCtrl 1];";
movingEnable = false;
movingEnable = 0;
duration = 4;
fadeIn = 0.2;
fadeOut = 0.2;
@ -48,7 +48,7 @@ class RscTitles {
class ACE_RscErrorHint {
idd = -1;
onLoad = "uiNamespace setVariable ['ACE_ctrlErrorHint', (_this select 0) displayCtrl 1];";
movingEnable = false;
movingEnable = 0;
duration = 999999;
fadeIn = 0.2;
fadeOut = 0.2;

View File

@ -1,6 +1,6 @@
class GVAR(ProgressBar_Dialog) {
idd = -1;
movingEnable = false;
movingEnable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBG)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 2)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 3)];);
objects[] = {};
@ -52,7 +52,7 @@ class GVAR(ProgressBar_Dialog) {
class GVAR(DisableMouse_Dialog) {
idd = -1;
movingEnable = false;
movingEnable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),_this select 0)];);
objects[] = {};
class controlsBackground {

View File

@ -253,7 +253,7 @@ enableCamShake true;
//FUNC(showHud) needs to be refreshed if it was set during mission init
["ace_infoDisplayChanged", {
GVAR(showHudHash) params ["", "", "_masks"];
if !(_masks isEqualTo []) then {
if (_masks isNotEqualTo []) then {
[] call FUNC(showHud);
};
}] call CBA_fnc_addEventHandler;
@ -397,21 +397,31 @@ addMissionEventHandler ["PlayerViewChanged", {
//////////////////////////////////////////////////
GVAR(isReloading) = false;
GVAR(reloadMutex_lastMagazines) = [];
// When reloading, the new magazine is removed from inventory, an animation plays and then the old magazine is added
// If the animation is interrupted, the new magazine will be lost
["loadout", {
params ["_unit", "_newLoadout"];
private _mags = magazines _unit;
// if our magazine count dropped by 1, we might be reloading
if ((count GVAR(reloadMutex_lastMagazines)) - (count _mags) == 1) then {
private _weapon = currentWeapon _unit;
private _muzzle = currentMuzzle _unit;
if (_weapon == "") exitWith {};
private _wpnMzlConfig = configFile >> "CfgWeapons" >> _weapon;
if (_muzzle != _weapon) then { _wpnMzlConfig = _wpnMzlConfig >> _muzzle; };
["keyDown", {
if ((_this select 1) in actionKeys "ReloadMagazine" && {alive ACE_player}) then {
//Ignore mounted (except ffv)
if (!(player call CBA_fnc_canUseWeapon)) exitWith {};
private _weapon = currentWeapon ACE_player;
private _compatMags = [_wpnMzlConfig] call CBA_fnc_compatibleMagazines;
private _lastCompatMagCount = {_x in _compatMags} count GVAR(reloadMutex_lastMagazines);
private _curCompatMagCount = {_x in _compatMags} count _mags;
TRACE_3("",_wpnMzlConfig,_lastCompatMagCount,_curCompatMagCount);
if (_lastCompatMagCount - _curCompatMagCount != 1) exitWith {}; // check if magazines for our specific muzzle dropped by 1
if (_weapon != "") then {
private _muzzle = currentMuzzle ACE_player;
private _wpnConfig = configFile >> "CfgWeapons" >> _weapon;
private _gesture = getText ([_wpnConfig >> _muzzle, _wpnConfig] select (_weapon isEqualTo _muzzle) >> "reloadAction");
private _gesture = getText (_wpnMzlConfig >> "reloadAction");
if (_gesture == "") exitWith {}; //Ignore weapons with no reload gesture (binoculars)
private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
private _animConfig = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
private _duration = getNumber (configfile >> _animConfig >> "States" >> _gesture >> "speed");
if (_duration != 0) then {
_duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
@ -432,10 +442,8 @@ GVAR(isReloading) = false;
}] call CBA_fnc_waitUntilAndExecute;
};
};
};
false
}] call CBA_fnc_addDisplayHandler;
GVAR(reloadMutex_lastMagazines) = _mags;
}, true] call CBA_fnc_addPlayerEventHandler;
//////////////////////////////////////////////////
// Set up PlayerJIP eventhandler

View File

@ -159,7 +159,7 @@ class ACE_gui_buttonBase {
colorBackgroundFocused[] = {1,1,1,1};
periodFocus = 1.2;
periodOver = 0.8;
default = false;
default = 0;
class HitZone {
left = 0.00;
top = 0.00;

View File

@ -28,16 +28,16 @@ private _addedToUnit = false;
switch (_container) do {
case "vest": {
_canAdd = _unit canAddItemToVest _classname;
_canAdd = [_unit, _classname, 1, false, true, false] call CBA_fnc_canAddItem;
};
case "backpack": {
_canAdd = _unit canAddItemToBackpack _classname;
_canAdd = [_unit, _classname, 1, false, false, true] call CBA_fnc_canAddItem;
};
case "uniform": {
_canAdd = _unit canAddItemToUniform _classname;
_canAdd = [_unit, _classname, 1, true, false, false] call CBA_fnc_canAddItem;
};
default {
_canAdd = _unit canAdd _classname;
_canAdd = [_unit, _classname] call CBA_fnc_canAddItem;
};
};

View File

@ -31,7 +31,7 @@ if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
private ["_selectionPosition", "_selectionPosition2"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _turret = [];
private _radius = 0;

View File

@ -110,7 +110,6 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x
private _gvarName = _varName select [_addonSearchCount];
_output pushBack "";
_output pushBack format ["["];
_output pushBack format [" QGVAR(%1), ""%2"",", _gvarName, _cbaSettingType];
_output pushBack format [" [LSTRING(), LSTRING()], // %1, %2", _localizedName, _localizedDescription]; //IGNORE_STRING_WARNING(str_ace_common_);
@ -123,7 +122,8 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x
_output pushBack format [" {[""%1"", _this] call ace_common_fnc_cbaSettings_settingChanged},", _varName];
};
_output pushBack format [" %1 // Needs mission restart", _warnIfChangedMidMission];
_output pushBack "] call CBA_settings_fnc_init;";
_output pushBack "] call CBA_fnc_addSetting;";
_output pushBack "";
} forEach _settings;
copyToClipboard (_output joinString endl);

View File

@ -98,8 +98,8 @@ private _code = compile format ['["%1", _this] call FUNC(cbaSettings_settingChan
TRACE_2("setting",_cbaSettingType,_cbaValueInfo);
TRACE_4("",_isForced,_cbaIsGlobal,_category,_cbaValueInfo);
private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_settings_fnc_init;
private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_fnc_addSetting;
TRACE_1("returned",_return);
if ((isNil "_return") || {_return != 0}) then {ERROR_1("Setting [%1] - CBA Error",_varName);};
if ((isNil "_return") || {!_return}) then {ERROR_1("Setting [%1] - CBA Error",_varName);};
_return

View File

@ -31,7 +31,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass
if (!isNil "_profileVar") then {
private _currentValue = [_settingName, "client"] call CBA_settings_fnc_get;
if (_isClientSettable && {!(_currentValue isEqualTo _profileVar)}) then {
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
// CBA_settings_fnc_set will do type checking for the old profile var
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret);

View File

@ -57,7 +57,7 @@ private _oldCompats = [];
};
false
} count _addons;
if (!(_oldCompats isEqualTo [])) then {
if (_oldCompats isNotEqualTo []) then {
[{
// Lasts for ~10 seconds
ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this);
@ -138,7 +138,7 @@ if (isMultiplayer) then {
};
_addons = _addons - GVAR(ServerAddons);
if !(_addons isEqualTo []) then {
if (_addons isNotEqualTo []) then {
private _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
ERROR(_errorMsg);

View File

@ -30,7 +30,7 @@ _target setVariable [QGVAR(owner), _unit, true];
// lock target object
if (_lockTarget) then {
private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
if (!isNull _unit) then {
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
if (_canBeDisassembled) then {

View File

@ -36,7 +36,7 @@ _target setVariable [QGVAR(owner), _unit, true];
// lock target object
if (_lockTarget) then {
private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) };
if (!isNull _unit) then {
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
if (_canBeDisassembled) then {

View File

@ -78,7 +78,7 @@ while {_rangeToCheck < _maxDistance} do {
//Shoot a ray down, and make sure we hit something solid like a building or the ground:
private _belowRoundArray = lineIntersectsSurfaces [(AGLtoASL _roundAGL) vectorAdd [0,0,0.5], (AGLtoASL _roundAGL) vectorAdd [0,0,-1]];
TRACE_4("Testing for solid",_roundDistance,_roundAngle,_roundAGL,_belowRoundArray);
if (!(_belowRoundArray isEqualTo [])) then {
if (_belowRoundArray isNotEqualTo []) then {
private _aboveBuilding = (_belowRoundArray select 0) select 2;
//Point is above something: Terrain(null) or Building
if ((isNull _aboveBuilding) || {_aboveBuilding isKindOf "Building"}) then {
@ -110,14 +110,14 @@ while {_rangeToCheck < _maxDistance} do {
_testIntersections = [];
};
};
if (!(_testIntersections isEqualTo [])) exitWith {
if (_testIntersections isNotEqualTo []) exitWith {
TRACE_2("collision low/high",_roundAGL,_testIntersections);
_roundPointIsValid = false;
};
_point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5];
_point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1];
_testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL];
if (!(_testIntersections isEqualTo [])) exitWith {
if (_testIntersections isNotEqualTo []) exitWith {
TRACE_2("collision mid",_roundAGL,_testIntersections);
_roundPointIsValid = false;
};

View File

@ -19,7 +19,7 @@
if (!local _this) exitWith {};
// Objects with disabled simulation and objects with simulation type "house" don't have gravity/physics, so make sure they are not floating
private _hasGravity = simulationEnabled _this && {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"};
private _hasGravity = simulationEnabled _this && {getText (configOf _this >> "simulation") != "house"};
if (!_hasGravity) then {
private _positionASL = getPosASL _this;

View File

@ -23,7 +23,7 @@ private _vehicle = vehicle _unit;
if (_vehicle isEqualTo _unit) exitWith {""};
// --- driver
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
if (_unit == driver _vehicle) exitWith {
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_config >> "driverAction")) // return
@ -32,7 +32,7 @@ if (_unit == driver _vehicle) exitWith {
// --- turret
private _turret = _unit call CBA_fnc_turretPath;
if !(_turret isEqualTo []) exitWith {
if (_turret isNotEqualTo []) exitWith {
private _turretConfig = [_vehicle, _turret] call CBA_fnc_getTurret;
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_turretConfig >> "gunnerAction")) // return

View File

@ -17,7 +17,7 @@
params ["_vehicle"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _turret = _vehicle call FUNC(getTurretCommander);
[_config, _turret] call FUNC(getTurretConfigPath) // return

View File

@ -17,7 +17,7 @@
params ["_vehicle"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _turret = _vehicle call FUNC(getTurretGunner);
[_config, _turret] call FUNC(getTurretConfigPath) // return

View File

@ -19,7 +19,7 @@ params ["_varName"];
private _variableDefinition = _varName call FUNC(getDefinedVariableInfo);
if !(_variableDefinition isEqualTo []) exitWith {
if (_variableDefinition isNotEqualTo []) exitWith {
_variableDefinition select 1;
};

View File

@ -22,7 +22,7 @@ private _turrets = allTurrets [_vehicle, true];
private _doorTurrets = [];
{
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);

View File

@ -28,7 +28,7 @@ _position = toLower _position;
// general
if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _turret = [];
private _isInside = vehicle _unit == _vehicle;
@ -206,7 +206,7 @@ switch (_position) do {
// this will execute all config based event handlers. Not script based ones unfortunately, but atleast we don't use any.
private _fnc_getInEH = {
// config based getIn EHs are assigned to the soldier, not the vehicle. Why Bis? Why?
private _config = configFile >> "CfgVehicles" >> typeOf _unit >> "EventHandlers";
private _config = configOf _unit >> "EventHandlers";
if (isClass _config) then {
//getIn is local effects with global arguments. It doesn't trigger if the unit was already inside and only switched seats

View File

@ -22,7 +22,7 @@
params ["_vehicle", "_light"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light;
private _config = configOf _vehicle >> "Reflectors" >> _light;
private _intensity = getNumber (_config >> "intensity");
private _position = getText (_config >> "position");

View File

@ -26,7 +26,7 @@ private _lat = -1 * getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
private _mapData = _map call FUNC(getMapData);
if (!(_mapData isEqualTo [])) then {
if (_mapData isNotEqualTo []) then {
_lat = _mapData select 0;
_altitude = _mapData select 1;
};

View File

@ -23,9 +23,9 @@ private _side = side _leader;
if (_vehicle == _leader) exitWith {
if (
getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "detectSkill") > 20 ||
getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "camouflage") < 1 ||
getText (configFile >> "CfgVehicles" >> typeOf _leader >> "textsingular") == "diver"
getNumber (configOf _leader >> "detectSkill") > 20 ||
getNumber (configOf _leader >> "camouflage") < 1 ||
getText (configOf _leader >> "textsingular") == "diver"
) then {
["n_recon", "b_recon", "o_recon"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
} else {
@ -33,16 +33,16 @@ if (_vehicle == _leader) exitWith {
};
};
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1) exitWith {
if (getNumber (configOf _vehicle >> "attendant") == 1) exitWith {
["n_med", "b_med", "o_med"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
};
if (
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportRepair") > 0 ||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportFuel") > 0 ||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportAmmo") > 0 ||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_canRepair") > 0 ||
getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_fuelCapacityCargo") > 0
getNumber (configOf _vehicle >> "transportRepair") > 0 ||
getNumber (configOf _vehicle >> "transportFuel") > 0 ||
getNumber (configOf _vehicle >> "transportAmmo") > 0 ||
getNumber (configOf _vehicle >> "ACE_canRepair") > 0 ||
getNumber (configOf _vehicle >> "ACE_fuelCapacityCargo") > 0
) exitWith {
["n_maint", "b_maint", "o_maint"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
};
@ -59,7 +59,7 @@ if (_vehicle isKindOf "StaticMortar") exitWith {
["n_mortar", "b_mortar", "o_mortar"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
};
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "artilleryScanner") == 1) exitWith {
if (getNumber (configOf _vehicle >> "artilleryScanner") == 1) exitWith {
["n_art", "b_art", "o_art"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
};
@ -68,7 +68,7 @@ if (_vehicle isKindOf "Car") exitWith {
};
if (_vehicle isKindOf "Tank") exitWith {
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportSoldier") > 0) then {
if (getNumber (configOf _vehicle >> "transportSoldier") > 0) then {
["n_mech_inf", "b_mech_inf", "o_mech_inf"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)
} else {
["n_armor", "b_armor", "o_armor"] select ((["GUER", "WEST", "EAST"] find str _side) max 0)

View File

@ -27,7 +27,7 @@ if (_unit isKindOf "CAManBase") then {
if (_showEffective) then {
_name = [effectiveCommander _unit, false, _useRaw] call FUNC(getName);
} else {
_name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
_name = getText (configOf _unit >> "displayName");
};
};

View File

@ -1,14 +1,14 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Finds turret owner of a pylon.
* Returns the turret path that owns the given pylon.
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Pylon Index (starting at 0) <NUMBER>
*
* Return Value:
* * Turret index (either [-1] or [0]) <ARRAY>
* Turret Path (either [-1] or [0]) <ARRAY>
*
* Example:
* [cursorObject, 0] call ace_common_fnc_getPylonTurret
@ -18,46 +18,4 @@
params ["_vehicle", "_pylonIndex"];
// See if index is in ace_pylonTurrets setVar on vehicle
private _pylonTurrets = _vehicle getVariable ["ace_pylonTurrets", []];
private _returnValue = _pylonTurrets param [_pylonIndex, []];
if (!(_returnValue isEqualTo [])) then {
TRACE_1("Using ace_pylonTurrets value",_returnValue);
} else {
// Attempt to determine turret owner based on magazines in the vehicle
private _pyMags = getPylonMagazines _vehicle;
private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"];
if (_pylonIndex >= (count _pyMags)) exitWith {ERROR("out of bounds");};
if (_pylonIndex >= (count _pylonConfigs)) exitWith {ERROR("out of bounds");};
private _targetMag = _pyMags select _pylonIndex;
private _inPilot = _targetMag in (_vehicle magazinesTurret [-1]);
private _inGunner = _targetMag in (_vehicle magazinesTurret [0]);
if (_inPilot) then {
if (_inGunner) then {
TRACE_3("ambiguous - in both",_targetMag,_inPilot,_inGunner);
} else {
TRACE_3("Pilot Mag",_targetMag,_inPilot,_inGunner);
_returnValue = [-1];
};
} else {
if (_inGunner) then {
TRACE_3("Gunner Mag",_targetMag,_inPilot,_inGunner);
_returnValue = [0];
} else {
TRACE_3("ambiguous - in neither",_targetMag,_inPilot,_inGunner);
};
};
if (_returnValue isEqualTo []) then { // If not sure, just use config value
_returnValue = getArray ((_pylonConfigs select _pylonIndex) >> "turret");
if (_returnValue isEqualTo []) then {
_returnValue = [-1];
};
};
};
TRACE_3("",_vehicle,_pylonIndex,_returnValue);
_returnValue
getAllPylonsInfo _vehicle param [_pylonIndex, []] param [2, [-1]]

View File

@ -21,7 +21,7 @@
params ["_vehicle"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
private _hitpoints = [];
private _selections = [];

View File

@ -17,4 +17,4 @@
params [["_vehicle", objNull, [objNull]]];
crew _vehicle select {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") == "UAVPilot"} // return
crew _vehicle select {getText (configOf _x >> "simulation") == "UAVPilot"} // return

View File

@ -21,7 +21,7 @@ private _vehicle = vehicle _unit;
if (_unit == _vehicle) exitWith {false};
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _config = configOf _vehicle;
if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false};

View File

@ -17,6 +17,6 @@
params ["_unit"];
private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")];
private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configOf _unit >> "attendant")];
_isMedic > 0

View File

@ -82,7 +82,7 @@ if (_lightSource isKindOf "CAManBase") then {
if (isCollisionLightOn _lightSource) then {
private _markerLights = [
_lightSource,
{configProperties [configFile >> "CfgVehicles" >> typeOf _this >> "MarkerLights", "isClass _x", true]},
{configProperties [configOf _this >> "MarkerLights", "isClass _x", true]},
uiNamespace,
format [QEGVAR(cache,MarkerLights_%1), typeOf _lightSource],
1E11

View File

@ -21,11 +21,30 @@ params ["_unit", "_vehicle", ["_caller", objNull]];
TRACE_3("loadPersonLocal",_unit,_vehicle,_caller);
private _slotsOpen = false;
if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false])} || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "ejectDeadCargo")) == 0}) then {
if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false]) || {(getNumber (configOf _vehicle >> "ejectDeadCargo")) == 0}}) then {
_unit moveInCargo _vehicle;
TRACE_1("moveInCargo",_vehicle);
_slotsOpen = true;
} else {
if (_vehicle emptyPositions "gunner" > 0) then {
// Check if an empty turret is available
// This already excludes FFV seats, which count as cargo positions
private _turrets = fullCrew [_vehicle, "turret", true];
private _index = _turrets findIf {isNull (_x#0)};
if (_index >= 0) exitWith {
_unit moveInTurret [_vehicle, _turrets#_index#3];
TRACE_2("moveInTurret",_vehicle,_turrets#_index#3);
_slotsOpen = true;
};
// Check if the commander seat is available
if (_vehicle emptyPositions "commander" > 0) exitWith {
_unit moveInCommander _vehicle;
TRACE_1("moveInCommander",_vehicle);
_slotsOpen = true;
};
// Lastly, check if the gunner seat is available
if (_vehicle emptyPositions "gunner" > 0) exitWith {
_unit moveInGunner _vehicle;
_slotsOpen = true;
};

View File

@ -24,7 +24,7 @@ if (isNil QGVAR(LSD_Vehicles)) then {
};
{
_hSCount = count (getArray (configFile >> "CfgVehicles" >> typeOf _x >> "hiddenSelections"));
_hSCount = count (getArray (configOf _x >> "hiddenSelections"));
if (_hSCount > 0) then {
GVAR(LSD_Vehicles) pushBack [_x, _hSCount];
};

View File

@ -5,22 +5,29 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Distance <NUMBER>
* 1: Distance <NUMBER><OPTIONAL>
* 2: Restriceted to cargo only <BOOL><OPTIONAL>
*
* Return Value:
* Nearest vehicles with a free seat <ARRAY>
*
* Example:
* [bob] call ace_common_fnc_nearestVehiclesFreeSeat
* [cursorObject] call ace_common_fnc_nearestVehiclesFreeSeat
*
* Public: Yes
*/
params ["_unit", ["_distance", 10]];
params ["_unit", ["_distance", 10], ["_cargoOnly", false]];
private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F", "Pod_Heli_Transport_04_crewed_base_F"], _distance];
_nearVehicles select {
// Filter cargo seats that will eject unconscious units (e.g. quad bike)
((_x emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false])} || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 0})
|| {_x emptyPositions "gunner" > 0}
private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configOf _x >> "ejectDeadCargo")) == 0};
((fullCrew [_x, "", true]) findIf {
_x params ["_body", "_role", "_cargoIndex"];
(isNull _body) // seat empty
&& {_role != "DRIVER"} // not driver seat
&& {_canSitInCargo || {_cargoIndex == -1}} // won't be ejected (uncon)
&& {(!_cargoOnly) || {_cargoIndex != -1}} // not restricted (captive)
}) > -1
}

View File

@ -62,7 +62,7 @@ private _fnc_replaceItems = {
};
// Replace all items of current class in list
if !(_replacements isEqualTo []) then {
if (_replacements isNotEqualTo []) then {
TRACE_3("replace",_item,_count,_replacements);
_unit removeItems _item;

View File

@ -31,7 +31,7 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
private _testFile = getText _x;
diag_log text format ["----- Starting Testing %1 [%2] -----", _testName, _testFile];
private _return = ([nil] apply (compile preProcessFileLineNumbers _testFile)) select 0;
if ((isNil "_return") || {!(_return isEqualTo true)}) then {
if ((isNil "_return") || {_return isNotEqualTo true}) then {
systemChat format ["Test [%1] Failed", _testName];
diag_log text format ["----- Finished Testing %1 [Failed] -----", _testName];
_fails pushBack _testName;
@ -43,6 +43,6 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
INFO_1("ace_common_fnc_runTests finished in %1 ms", (1000 * (diag_tickTime - _startTime)) toFixed 1);
INFO_2("[%1 / %2] Tests Passed", (_total - (count _fails)), _total);
if (!(_fails isEqualTo [])) then {
if (_fails isNotEqualTo []) then {
INFO_1("Failed: %1", _fails);
};

View File

@ -46,7 +46,7 @@ TRACE_2("Starting Embargo", _varName, _delay);
TRACE_4("End of embargo", _object, _varName, _value, _curValue);
//If value at start of embargo doesn't equal current, then broadcast and start new embargo
if (!(_value isEqualTo _curValue)) then {
if (_value isNotEqualTo _curValue) then {
_this set [2, _curValue];
_this call FUNC(setVariablePublic);
};

View File

@ -27,7 +27,7 @@ GVAR(statusEffect_Names) pushBack _name;
GVAR(statusEffect_isGlobal) pushBack _isGlobal;
//We add reasons at any time, but more efficenet to add all common ones at one time during init
if (isServer && {!(_commonReasonsArray isEqualTo [])}) then {
if (isServer && {_commonReasonsArray isNotEqualTo []}) then {
//Switch case to lower:
_commonReasonsArray = _commonReasonsArray apply { toLower _x };
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];

View File

@ -49,6 +49,16 @@ unassignVehicle _unit;
TRACE_1("Ejecting", alive _unit);
_unit action ["Eject", vehicle _unit];
// Failsafe - sometimes eject alone doesn't work, but moveOut does
[{
params ["_unit"];
if (vehicle _unit != _unit) then {
WARNING_1("UnloadPersonLocal [%1] did not eject normally",_unit);
moveOut _unit;
};
}, [_unit], 1] call CBA_fnc_waitAndExecute;
[{
params ["_unit", "_emptyPos"];
(alive _unit) && {(vehicle _unit) != _unit}

View File

@ -6,7 +6,7 @@
false,
false,
LINKFUNC(switchPersistentLaser)
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(allowFadeMusic),
@ -15,4 +15,4 @@
localize LSTRING(ACEKeybindCategoryCommon),
true,
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

Some files were not shown because too many files have changed in this diff Show More