Merge remote-tracking branch 'upstream/master' into add-drag-objects

This commit is contained in:
Dystopian 2021-03-07 03:29:36 +03:00
commit 9d40f40e3d
378 changed files with 1701 additions and 1225 deletions

View File

@ -47,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

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

@ -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 : {
{
@ -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);
@ -282,32 +282,42 @@ switch (_ctrlIDC) do {
};
} forEach GVAR(customRightPanelButtons);
};
{
["CfgWeapons", _x, false] call _fnc_fill_right_Container;
} forEach ((GVAR(virtualItems) select 17) select {!((toLower _x) in _blockItems)});
{
["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 {
private _index = [RIGHT_PANEL_CUSTOM_BUTTONS] find _ctrlIDC;
if (_index != -1) then {
private _data = GVAR(customRightPanelButtons) param [_index];
if (!isNil "_data") then {
private _items = _data select 0;
{
["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
@ -171,7 +171,7 @@ if !(_loadoutsDisplay isEqualTo displayNull) then {
case (_keyPressed == DIK_RETURN): {
if (GVAR(leftSearchbarFocus)) then {
[_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar);
};
};
if (GVAR(rightSearchbarFocus)) then {
[_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar);
};

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

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

@ -419,10 +419,12 @@
<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>
@ -1092,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>
@ -1101,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

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

@ -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} &&
@ -87,12 +87,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,4 +23,4 @@
[0, 10, 2.5, 1],
true,
{[QGVAR(paradropTimeCoefficent), _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,45 +397,53 @@ 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");
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 _gesture = getText (_wpnMzlConfig >> "reloadAction");
if (_gesture == "") exitWith {}; //Ignore weapons with no reload gesture (binoculars)
private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
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 };
} else {
_duration = 3;
};
if (_duration != 0) then {
_duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
} else {
_duration = 3;
};
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
GVAR(reloadingETA) = CBA_missionTime + _duration;
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
GVAR(reloadingETA) = CBA_missionTime + _duration;
if (!GVAR(isReloading)) then {
GVAR(isReloading) = true;
if (!GVAR(isReloading)) then {
GVAR(isReloading) = true;
[{
CBA_missionTime > GVAR(reloadingETA)
},{
GVAR(isReloading) = false;
}] call CBA_fnc_waitUntilAndExecute;
};
[{
CBA_missionTime > GVAR(reloadingETA)
},{
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,7 +21,7 @@ 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;

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

@ -22,7 +22,7 @@ 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)
private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 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

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

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

View File

@ -1296,6 +1296,23 @@
<Chinesesimp>没有空间可卸载</Chinesesimp>
<Korean>언로드 할 공간이 없습니다.</Korean>
</Key>
<Key ID="STR_ACE_Common_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_Common_KeybindToggle">
<English>Toggle</English>
<Polish>переключить</Polish>

View File

@ -25,7 +25,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exit
};
params ["_wire", "_unit"];
private _config = (configFile >> "CfgVehicles" >> typeOf _unit);
private _config = (configOf _unit);
private _delay = [45, 30] select ([_unit] call EFUNC(common,isEngineer) || {[_unit] call EFUNC(common,isEOD)});
// TODO: Animation?

View File

@ -96,8 +96,8 @@ if (_mode == 1) then {
if (canMove _vehicle) then {
{
private _selectionPart = "hit" + _x;
if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
private _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
if (isText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
private _selection = getText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
// TODO: Only the tires that have touched the wire should burst.
_vehicle setHit [_selection, 1];
};

View File

@ -73,8 +73,11 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace;
// secondary explosions
["AllVehicles", "killed", {
params ["_vehicle"];
if (_vehicle getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)]) then {
params ["_vehicle", "", "", "_useEffects"];
if (
_useEffects &&
_vehicle getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)]
) then {
if (GVAR(ammoCookoffDuration) == 0) exitWith {};
([_vehicle] call FUNC(getVehicleAmmo)) params ["_mags", "_total"];
[_vehicle, _mags, _total] call FUNC(detonateAmmunition);
@ -83,9 +86,13 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace;
// blow off turret effect
["Tank", "killed", {
if ((_this select 0) getVariable [QGVAR(enable), GVAR(enable)] in [1, 2, true]) then {
params ["_vehicle", "", "", "_useEffects"];
if (
_useEffects &&
_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [1, 2, true]
) then {
if (random 1 < 0.15) then {
(_this select 0) call FUNC(blowOffTurret);
_vehicle call FUNC(blowOffTurret);
};
};
}] call CBA_fnc_addClassEventHandler;

View File

@ -28,7 +28,7 @@ if (local _vehicle) then {
params ["_vehicle"];
private _config = _vehicle call CBA_fnc_getObjectConfig;
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])};
private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {(_vehicle selectionPosition _x) isNotEqualTo [0,0,0]};
if (_positions isEqualTo []) then {
WARNING_1("no valid selection for cookoff found. %1", typeOf _vehicle);
@ -48,7 +48,7 @@ if (local _vehicle) then {
{
private _position = [0,-2,0];
if !(_x isEqualTo "#noselection") then {
if (_x isNotEqualTo "#noselection") then {
_position = _vehicle selectionPosition _x;
};
@ -79,7 +79,7 @@ if (local _vehicle) then {
{
private _position = [0,-2,0];
if !(_x isEqualTo "#noselection") then {
if (_x isNotEqualTo "#noselection") then {
_position = _vehicle selectionPosition _x;
};

View File

@ -46,7 +46,7 @@ private _totalAmmo = 0;
} forEach (magazinesAmmoCargo _vehicle);
// Get ammo from transportAmmo / ace_rearm
private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _vehCfg = configOf _vehicle;
private _configSupply = (getNumber (_vehCfg >> "transportAmmo")) max (getNumber (_vehCfg >> QEGVAR(rearm,defaultSupply)));
if (_vehicle getVariable [QEGVAR(rearm,isSupplyVehicle), (_configSupply > 0)]) then {

View File

@ -25,7 +25,11 @@ if (damage _vehicle >= 1) exitWith {};
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {};
// Check for players and exit if none found and the enable for players only setting is true
if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}) exitWith {};
if (
_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1
&& {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}
&& {_simulationType isNotEqualTo "box"}
) exitWith {};
// get hitpoint name
private _hitpoint = "#structural";

View File

@ -8,7 +8,7 @@
true, // isGlobal
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(enableAmmobox), "CHECKBOX",
@ -18,7 +18,7 @@
true, // isGlobal
{[QGVAR(enableAmmobox), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(enableAmmoCookoff), "CHECKBOX",
@ -28,7 +28,7 @@
true, // isGlobal
{[QGVAR(enableAmmoCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(ammoCookoffDuration), "SLIDER",
@ -38,7 +38,7 @@
true, // isGlobal
{[QGVAR(ammoCookoffDuration), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
[
QGVAR(probabilityCoef), "SLIDER",
@ -48,4 +48,4 @@
true, // isGlobal
{[QGVAR(probabilityCoef), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

View File

@ -10,6 +10,6 @@ class Extended_PreInit_EventHandlers {
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

View File

@ -81,8 +81,8 @@ if (_reloadSource isKindOf "CaManBase") then {
};
private _timeToLoad = 1;
if (!isNull(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime")) then {
_timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime");
if (!isNull(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime")) then {
_timeToLoad = getNumber(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime");
};
TRACE_1("Reloading in progress",_timeToLoad);

View File

@ -20,7 +20,7 @@
params ["_tripod", "_player"];
TRACE_2("assemble_pickupTripod",_tripod,_player);
private _tripodClassname = getText(configFile >> "CfgVehicles" >> (typeof _tripod) >> QUOTE(ADDON) >> "disassembleTo");
private _tripodClassname = getText(configOf _tripod >> QUOTE(ADDON) >> "disassembleTo");
private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _tripodClassname >> QUOTE(ADDON) >> "pickupTime");
private _onFinish = {

View File

@ -19,14 +19,14 @@
params ["_staticWeapon", "_player"];
TRACE_2("assemble_pickupWeapon",_staticWeapon,_player);
private _onDisassembleFunc = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleFunc");
private _carryWeaponClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleWeapon");
private _turretClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleTurret");
private _onDisassembleFunc = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleFunc");
private _carryWeaponClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleWeapon");
private _turretClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleTurret");
private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "pickupTime");
TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime);
if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith {ERROR_1("bad weapon classname [%1]",_carryWeaponClassname);};
// Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs
if (!(_turretClassname isEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);};
if ((_turretClassname isNotEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);};
private _onFinish = {
params ["_args"];
@ -54,7 +54,7 @@
};
} forEach (magazinesAllTurrets _staticWeapon);
if !(_turretClassname isEqualTo "") then {
if (_turretClassname isNotEqualTo "") then {
private _cswTripod = createVehicle [_turretClassname, [0, 0, 0], [], 0, "NONE"];
// Delay a frame so weapon has a chance to be deleted
[{

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