diff --git a/AUTHORS.txt b/AUTHORS.txt index 4781fdb531..402b13b8e6 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -47,6 +47,7 @@ Anthariel Arcanum417 Anton Arkhir +ARV187 aka Spark23 Asgar Serran BaerMitUmlaut Bamse diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 13b4692452..845045e1cb 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -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 { diff --git a/addons/advanced_fatigue/initSettings.sqf b/addons/advanced_fatigue/initSettings.sqf index fa90aa9a4b..7787fd3f5d 100644 --- a/addons/advanced_fatigue/initSettings.sqf +++ b/addons/advanced_fatigue/initSettings.sqf @@ -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; diff --git a/addons/advanced_throwing/functions/fnc_drawArc.sqf b/addons/advanced_throwing/functions/fnc_drawArc.sqf index bd7bc7a661..0782c4b46c 100644 --- a/addons/advanced_throwing/functions/fnc_drawArc.sqf +++ b/addons/advanced_throwing/functions/fnc_drawArc.sqf @@ -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 }; }; diff --git a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf index 5b7d2c9f0b..920f4d1781 100644 --- a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf +++ b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf @@ -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 { diff --git a/addons/aircraft/functions/fnc_initEjectAction.sqf b/addons/aircraft/functions/fnc_initEjectAction.sqf index 8ec9e33ade..b453ce7704 100644 --- a/addons/aircraft/functions/fnc_initEjectAction.sqf +++ b/addons/aircraft/functions/fnc_initEjectAction.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; if (unitIsUAV _vehicle) exitWith {}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _addAction = false; diff --git a/addons/arsenal/XEH_preInit.sqf b/addons/arsenal/XEH_preInit.sqf index 1aebf5040f..3fb6a7817c 100644 --- a/addons/arsenal/XEH_preInit.sqf +++ b/addons/arsenal/XEH_preInit.sqf @@ -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"]; diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index fd71c5eaee..5e1bda07d1 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -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 "∞" diff --git a/addons/arsenal/functions/fnc_addListBoxItem.sqf b/addons/arsenal/functions/fnc_addListBoxItem.sqf index 35cde798ee..53bf321baf 100644 --- a/addons/arsenal/functions/fnc_addListBoxItem.sqf +++ b/addons/arsenal/functions/fnc_addListBoxItem.sqf @@ -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; }; }; diff --git a/addons/arsenal/functions/fnc_addSort.sqf b/addons/arsenal/functions/fnc_addSort.sqf index 5ef5a8fc90..6d88713c10 100644 --- a/addons/arsenal/functions/fnc_addSort.sqf +++ b/addons/arsenal/functions/fnc_addSort.sqf @@ -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; }; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf index 17c89b5f36..0827ec2c31 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf @@ -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]; diff --git a/addons/arsenal/functions/fnc_compileSorts.sqf b/addons/arsenal/functions/fnc_compileSorts.sqf index e810f64a9b..a5a3e5693a 100644 --- a/addons/arsenal/functions/fnc_compileSorts.sqf +++ b/addons/arsenal/functions/fnc_compileSorts.sqf @@ -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; diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index 37cbd4e431..42c693615c 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -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; }; }; diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index ae675ffcdf..509f8b6a43 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -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; diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index 0d071740b7..16cdc1c7e1 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -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"]; diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf index 9132ea1bc2..2388986ba7 100644 --- a/addons/arsenal/functions/fnc_onArsenalClose.sqf +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -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; diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index b59d1b28a9..51dca2c08c 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -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; }; }; diff --git a/addons/arsenal/functions/fnc_onKeyDown.sqf b/addons/arsenal/functions/fnc_onKeyDown.sqf index 0c265873eb..2bd8e0ac7b 100644 --- a/addons/arsenal/functions/fnc_onKeyDown.sqf +++ b/addons/arsenal/functions/fnc_onKeyDown.sqf @@ -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); }; diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index 1e6c851f0f..3f1ca14b87 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -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]]; }; diff --git a/addons/arsenal/functions/fnc_removeVirtualItems.sqf b/addons/arsenal/functions/fnc_removeVirtualItems.sqf index d96d16e3d6..ad9ff7f89e 100644 --- a/addons/arsenal/functions/fnc_removeVirtualItems.sqf +++ b/addons/arsenal/functions/fnc_removeVirtualItems.sqf @@ -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; diff --git a/addons/arsenal/functions/fnc_sortPanel.sqf b/addons/arsenal/functions/fnc_sortPanel.sqf index e840b11c07..8ed3ec0fc7 100644 --- a/addons/arsenal/functions/fnc_sortPanel.sqf +++ b/addons/arsenal/functions/fnc_sortPanel.sqf @@ -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]; }; }; diff --git a/addons/arsenal/functions/fnc_sortStatement_mod.sqf b/addons/arsenal/functions/fnc_sortStatement_mod.sqf index 3fabb7f4ce..9a6e12c2d6 100644 --- a/addons/arsenal/functions/fnc_sortStatement_mod.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_mod.sqf @@ -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; }; }; diff --git a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf index 7405950631..617ffde6f4 100644 --- a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf +++ b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf @@ -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; diff --git a/addons/arsenal/functions/fnc_verifyLoadout.sqf b/addons/arsenal/functions/fnc_verifyLoadout.sqf index 12509333bb..bacd6a11b3 100644 --- a/addons/arsenal/functions/fnc_verifyLoadout.sqf +++ b/addons/arsenal/functions/fnc_verifyLoadout.sqf @@ -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, ""]; diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index ebb9d7a5c8..8c7731c7d9 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -419,10 +419,12 @@ Sort by ballistic protection Trier par protection balistique + 防弾性能で並び替え Sort by explosive protection Trier par résistance aux explosifs + 防爆性能で並び替え Share or stop sharing the selected loadout @@ -1092,7 +1094,6 @@ Niveles de potasio Kaliumspiegel Taux de potassium - カリウム レベル 钾水平 鉀水平 Ilvello di potassio @@ -1101,6 +1102,7 @@ Níveis de Potássio Úrovně draslíku Potasyum seviyeleri + カリウム含有量 Magnification diff --git a/addons/artillerytables/XEH_postInit.sqf b/addons/artillerytables/XEH_postInit.sqf index 2f31655814..b558fb1096 100644 --- a/addons/artillerytables/XEH_postInit.sqf +++ b/addons/artillerytables/XEH_postInit.sqf @@ -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)) diff --git a/addons/artillerytables/dev/checkConfigs.sqf b/addons/artillerytables/dev/checkConfigs.sqf index 91627edbf6..533aecf656 100644 --- a/addons/artillerytables/dev/checkConfigs.sqf +++ b/addons/artillerytables/dev/checkConfigs.sqf @@ -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)]}]; diff --git a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf index 849be932ce..8e396a0f13 100644 --- a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf +++ b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf @@ -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)) diff --git a/addons/artillerytables/initSettings.sqf b/addons/artillerytables/initSettings.sqf index c578901e2e..0a909ae41b 100644 --- a/addons/artillerytables/initSettings.sqf +++ b/addons/artillerytables/initSettings.sqf @@ -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; diff --git a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf index be6ebd1eda..e3dfe5b6a4 100644 --- a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf @@ -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); }; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 4d43cf47e9..0a13ed9afb 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -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;}; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 5ff12967ce..7c68831f36 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -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) diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 44af699017..831c4384e4 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -154,23 +154,6 @@ 已取下萤光棒 Işık Çubuğu Söküldü - - No inventory space - Kein Platz im Inventar - Sin espacio en inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Nedostatek místa v inventáři - Sem espaço no inventário - Non hai più spazio - Nincs több hely - В инвентаре нет места - インベントリに空きがない - 넣을 공간이 없음 - 無可用空間 - 无可用空间 - Envanter de alan yok - IR Strobe IR-Stroboskop diff --git a/addons/ballistics/ACE_Arsenal_Stats.hpp b/addons/ballistics/ACE_Arsenal_Stats.hpp index 34a8b561e5..9e4982656b 100644 --- a/addons/ballistics/ACE_Arsenal_Stats.hpp +++ b/addons/ballistics/ACE_Arsenal_Stats.hpp @@ -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 { diff --git a/addons/captives/functions/fnc_handleGetIn.sqf b/addons/captives/functions/fnc_handleGetIn.sqf index 96a32031af..3fc2db1711 100644 --- a/addons/captives/functions/fnc_handleGetIn.sqf +++ b/addons/captives/functions/fnc_handleGetIn.sqf @@ -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); diff --git a/addons/cargo/CfgEden.hpp b/addons/cargo/CfgEden.hpp index 9144ba458b..a342215290 100644 --- a/addons/cargo/CfgEden.hpp +++ b/addons/cargo/CfgEden.hpp @@ -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"; diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 7ea978dc73..0f2ab2bd2c 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -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} diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf index d3a66794db..2bec4f4df3 100644 --- a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf +++ b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf @@ -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} diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index f7bc696d35..469dc45c9d 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -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 }; diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index d9452d4b01..b03108066d 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -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 diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 60f204cb75..dac28a5ac9 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -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"]; diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 4c873d189e..4e314cdf37 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -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); diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 7cc7923696..ef5f543016 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -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); }; diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf index b83ccfe93a..4f996a30aa 100644 --- a/addons/cargo/functions/fnc_validateCargoSpace.sqf +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -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]; diff --git a/addons/cargo/initSettings.sqf b/addons/cargo/initSettings.sqf index cbf0a121e5..83bc2d6b31 100644 --- a/addons/cargo/initSettings.sqf +++ b/addons/cargo/initSettings.sqf @@ -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; diff --git a/addons/cargo/menu.hpp b/addons/cargo/menu.hpp index 7496298371..bdc9477ca1 100644 --- a/addons/cargo/menu.hpp +++ b/addons/cargo/menu.hpp @@ -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 { diff --git a/addons/chemlights/CfgVehicles.hpp b/addons/chemlights/CfgVehicles.hpp index 02856b99e7..e01fb79b87 100644 --- a/addons/chemlights/CfgVehicles.hpp +++ b/addons/chemlights/CfgVehicles.hpp @@ -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)); }; }; }; diff --git a/addons/chemlights/functions/fnc_initIR.sqf b/addons/chemlights/functions/fnc_initIR.sqf index 29532f41f1..b6be8cf5fe 100644 --- a/addons/chemlights/functions/fnc_initIR.sqf +++ b/addons/chemlights/functions/fnc_initIR.sqf @@ -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"); diff --git a/addons/chemlights/stringtable.xml b/addons/chemlights/stringtable.xml index 86deea0380..c1c6c930d8 100644 --- a/addons/chemlights/stringtable.xml +++ b/addons/chemlights/stringtable.xml @@ -49,23 +49,6 @@ %1<br/>Preparado %1<br/> Hazırlandı - - No inventory space - Kein Platz im Inventar - Sin espacio en inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Nedostatek místa v inventáři - Sem espaço no inventário - Nessuno spazio nell'inventario - Nincs több hely - В инвентаре нет места - インベントリに空きがありません - 소지품 공간이 없음 - 已無存放空間 - 已无存放空间 - Envanter de alan yok - [ACE] Chemlights [ACE] ケミライト diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index fa4f3dcacd..b8be2cc63a 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -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; }; }; diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index e3912e56f3..f647b7b1de 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -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; diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index 9b55ae33a3..8933fae6f9 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -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 { diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 181b7099c6..eec6bb45e2 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -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 diff --git a/addons/common/define.hpp b/addons/common/define.hpp index f25892b6d7..68f467d205 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -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; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index b8b5f93635..de5eb9b4af 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -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; }; }; diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index 22d885b38c..c8870cebd7 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -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; diff --git a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf index 8c892bcf13..6e7a4456c7 100644 --- a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf +++ b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf @@ -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); diff --git a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf index 7f6637f622..a28d419981 100644 --- a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf +++ b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf @@ -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 diff --git a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf index 703e0263dc..869668cc21 100644 --- a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf @@ -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); diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 3b6a02f33f..463ee20f0b 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -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); diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 3c30b8f28f..130bbac79b 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -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 { diff --git a/addons/common/functions/fnc_claimSafeServer.sqf b/addons/common/functions/fnc_claimSafeServer.sqf index f3017f5bed..e6520aad87 100644 --- a/addons/common/functions/fnc_claimSafeServer.sqf +++ b/addons/common/functions/fnc_claimSafeServer.sqf @@ -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 { diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf index 22e23c7f2b..50727b438f 100644 --- a/addons/common/functions/fnc_findUnloadPosition.sqf +++ b/addons/common/functions/fnc_findUnloadPosition.sqf @@ -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; }; diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index ac152cf5c9..e4f956dadb 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -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; diff --git a/addons/common/functions/fnc_getAwakeAnim.sqf b/addons/common/functions/fnc_getAwakeAnim.sqf index 7da2837759..f494db8c55 100644 --- a/addons/common/functions/fnc_getAwakeAnim.sqf +++ b/addons/common/functions/fnc_getAwakeAnim.sqf @@ -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 diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index f3d011c57a..a49664bcf2 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -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 diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index 732256b8a1..d1e86a9bd0 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -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 diff --git a/addons/common/functions/fnc_getDefinedVariableDefault.sqf b/addons/common/functions/fnc_getDefinedVariableDefault.sqf index edae4ef3ef..fc6108469a 100644 --- a/addons/common/functions/fnc_getDefinedVariableDefault.sqf +++ b/addons/common/functions/fnc_getDefinedVariableDefault.sqf @@ -19,7 +19,7 @@ params ["_varName"]; private _variableDefinition = _varName call FUNC(getDefinedVariableInfo); -if !(_variableDefinition isEqualTo []) exitWith { +if (_variableDefinition isNotEqualTo []) exitWith { _variableDefinition select 1; }; diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index 93b0360042..8fb872a6f7 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -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); diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index a45b5546a6..ef012a33b4 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -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 diff --git a/addons/common/functions/fnc_getLightProperties.sqf b/addons/common/functions/fnc_getLightProperties.sqf index 002868dd4e..635284ade4 100644 --- a/addons/common/functions/fnc_getLightProperties.sqf +++ b/addons/common/functions/fnc_getLightProperties.sqf @@ -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"); diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index f6ca81175b..cbea1511eb 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -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; }; diff --git a/addons/common/functions/fnc_getMarkerType.sqf b/addons/common/functions/fnc_getMarkerType.sqf index 1541074a07..7f44861769 100644 --- a/addons/common/functions/fnc_getMarkerType.sqf +++ b/addons/common/functions/fnc_getMarkerType.sqf @@ -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) diff --git a/addons/common/functions/fnc_getName.sqf b/addons/common/functions/fnc_getName.sqf index 0bcce9d2c8..7d9dd35803 100644 --- a/addons/common/functions/fnc_getName.sqf +++ b/addons/common/functions/fnc_getName.sqf @@ -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"); }; }; diff --git a/addons/common/functions/fnc_getPylonTurret.sqf b/addons/common/functions/fnc_getPylonTurret.sqf index b27e6eb582..cc6d3c6635 100644 --- a/addons/common/functions/fnc_getPylonTurret.sqf +++ b/addons/common/functions/fnc_getPylonTurret.sqf @@ -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 * 1: Pylon Index (starting at 0) * * Return Value: - * * Turret index (either [-1] or [0]) + * Turret Path (either [-1] or [0]) * * 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]] diff --git a/addons/common/functions/fnc_getReflectorsWithSelections.sqf b/addons/common/functions/fnc_getReflectorsWithSelections.sqf index 97feca6e19..8d40642ae5 100644 --- a/addons/common/functions/fnc_getReflectorsWithSelections.sqf +++ b/addons/common/functions/fnc_getReflectorsWithSelections.sqf @@ -21,7 +21,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _hitpoints = []; private _selections = []; diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index 45d151bc30..b1b1ae002e 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -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 diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index 90053f43d9..ab6a25035d 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -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}; diff --git a/addons/common/functions/fnc_isMedic.sqf b/addons/common/functions/fnc_isMedic.sqf index 9618a15548..43d7f6a7ea 100644 --- a/addons/common/functions/fnc_isMedic.sqf +++ b/addons/common/functions/fnc_isMedic.sqf @@ -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 diff --git a/addons/common/functions/fnc_lightIntensityFromObject.sqf b/addons/common/functions/fnc_lightIntensityFromObject.sqf index 246424ae4d..e2099def69 100644 --- a/addons/common/functions/fnc_lightIntensityFromObject.sqf +++ b/addons/common/functions/fnc_lightIntensityFromObject.sqf @@ -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 diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index 7135e9e302..8490bf70e9 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -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; diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index 97ce3833eb..2a9df4c591 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -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]; }; diff --git a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf index 83ed8ceb20..03a01cf395 100644 --- a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf +++ b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf @@ -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 diff --git a/addons/common/functions/fnc_registerItemReplacement.sqf b/addons/common/functions/fnc_registerItemReplacement.sqf index d70a718193..0e101b8b37 100644 --- a/addons/common/functions/fnc_registerItemReplacement.sqf +++ b/addons/common/functions/fnc_registerItemReplacement.sqf @@ -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; diff --git a/addons/common/functions/fnc_runTests.sqf b/addons/common/functions/fnc_runTests.sqf index 4e937d87b6..019055443c 100644 --- a/addons/common/functions/fnc_runTests.sqf +++ b/addons/common/functions/fnc_runTests.sqf @@ -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); }; diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf index 067765fc27..ba58308243 100644 --- a/addons/common/functions/fnc_setVariablePublic.sqf +++ b/addons/common/functions/fnc_setVariablePublic.sqf @@ -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); }; diff --git a/addons/common/functions/fnc_statusEffect_addType.sqf b/addons/common/functions/fnc_statusEffect_addType.sqf index 6be61967d9..2a1efdc9d8 100644 --- a/addons/common/functions/fnc_statusEffect_addType.sqf +++ b/addons/common/functions/fnc_statusEffect_addType.sqf @@ -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]; diff --git a/addons/common/initSettings.sqf b/addons/common/initSettings.sqf index fcaa242ac3..7546256d1b 100644 --- a/addons/common/initSettings.sqf +++ b/addons/common/initSettings.sqf @@ -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; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index fb94add8b6..4325f152bf 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1296,6 +1296,23 @@ 没有空间可卸载 언로드 할 공간이 없습니다. + + No inventory space + Kein Platz im Inventar + Sin espacio en inventario + Brak miejsca w ekwipunku + Pas de place dans l'inventaire + Nedostatek místa v inventáři + Sem espaço no inventário + Non hai più spazio + Nincs több hely + В инвентаре нет места + インベントリに空きがない + 넣을 공간이 없음 + 無可用空間 + 无可用空间 + Envanter de alan yok + Toggle переключить diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index b8beeb6a9e..58f04379fd 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -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? diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index 6482ea718a..baaa8efe06 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -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]; }; diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index 94fe8899de..f714a4c2f3 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -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; diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index 51f35ea813..aae23a3bd3 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -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; }; diff --git a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf index 810084fe71..232e8190a1 100644 --- a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf +++ b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf @@ -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 { diff --git a/addons/cookoff/functions/fnc_handleDamage.sqf b/addons/cookoff/functions/fnc_handleDamage.sqf index 88ea717d90..8e1cd8dd17 100644 --- a/addons/cookoff/functions/fnc_handleDamage.sqf +++ b/addons/cookoff/functions/fnc_handleDamage.sqf @@ -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"; diff --git a/addons/cookoff/initSettings.sqf b/addons/cookoff/initSettings.sqf index ce510a299d..42a4ac3397 100644 --- a/addons/cookoff/initSettings.sqf +++ b/addons/cookoff/initSettings.sqf @@ -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; diff --git a/addons/csw/CfgEventHandlers.hpp b/addons/csw/CfgEventHandlers.hpp index afe6392a7c..e90bed419e 100644 --- a/addons/csw/CfgEventHandlers.hpp +++ b/addons/csw/CfgEventHandlers.hpp @@ -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)); }; }; diff --git a/addons/csw/functions/fnc_ai_handleFired.sqf b/addons/csw/functions/fnc_ai_handleFired.sqf index f85c74fd20..2701b8cef8 100644 --- a/addons/csw/functions/fnc_ai_handleFired.sqf +++ b/addons/csw/functions/fnc_ai_handleFired.sqf @@ -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); diff --git a/addons/csw/functions/fnc_assemble_pickupTripod.sqf b/addons/csw/functions/fnc_assemble_pickupTripod.sqf index 0167254795..4f06b6e406 100644 --- a/addons/csw/functions/fnc_assemble_pickupTripod.sqf +++ b/addons/csw/functions/fnc_assemble_pickupTripod.sqf @@ -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 = { diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index eb70371b59..4763f646ad 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -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 [{ diff --git a/addons/csw/functions/fnc_reload_actionsUnload.sqf b/addons/csw/functions/fnc_reload_actionsUnload.sqf index 12d2cd2f9a..24e60b1a38 100644 --- a/addons/csw/functions/fnc_reload_actionsUnload.sqf +++ b/addons/csw/functions/fnc_reload_actionsUnload.sqf @@ -24,8 +24,8 @@ private _statement = { TRACE_5("starting unload",_target,_turretPath,_player,_carryMag,_vehMag); private _timeToUnload = 1; - if (!isNull(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime")) then { - _timeToUnload = getNumber(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime"); + if (!isNull(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime")) then { + _timeToUnload = getNumber(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime"); }; [ diff --git a/addons/csw/functions/fnc_reload_canLoadMagazine.sqf b/addons/csw/functions/fnc_reload_canLoadMagazine.sqf index 505c920333..69f8e6c93a 100644 --- a/addons/csw/functions/fnc_reload_canLoadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_canLoadMagazine.sqf @@ -26,7 +26,7 @@ if (!alive _vehicle) exitWith { [false, "", -1, false] }; // Verify unit has carry magazine if ((!isNull _unit) && {((_vehicle distance _unit) > 5) || {((magazines _unit) findIf {_x == _carryMag}) == -1}}) exitWith { [false, "", -2, false] }; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); if (_desiredAmmo == 0) then { _desiredAmmo = 100; }; private _ammoNeeded = _desiredAmmo min getNumber (configFile >> "CfgMagazines" >> _carryMag >> "count"); // assume it needs full carry mag private _loadedMag = ""; diff --git a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf index b6265852c9..2b28535f0a 100644 --- a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf +++ b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf @@ -20,7 +20,7 @@ params ["_vehicle", "_turret", "_carryMag"]; TRACE_3("reload_getVehicleMagazine",_vehicle,_turret,_carryMag); private _carryGroupCfg = configFile >> QGVAR(groups) >> _carryMag; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); if (_desiredAmmo == 0) then { _desiredAmmo = 100; }; private _bestMag = "#"; diff --git a/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf b/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf index 1a88c7f115..313e65dc9b 100644 --- a/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf +++ b/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf @@ -37,7 +37,7 @@ TRACE_1("",_magsInWeapon); // Remove any empty mags from start: private _ammoInFirstMag = 0; -while {(!(_magsInWeapon isEqualTo [])) && {_ammoInFirstMag = _magsInWeapon deleteAt 0; (_ammoInFirstMag == 0)}} do { +while {(_magsInWeapon isNotEqualTo []) && {_ammoInFirstMag = _magsInWeapon deleteAt 0; (_ammoInFirstMag == 0)}} do { TRACE_1("Removing empty mag",_ammoInFirstMag); _vehicle removeMagazineTurret [_vehMag, _turretPath]; }; diff --git a/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf b/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf index 1d288b863f..464a7fc65d 100644 --- a/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf +++ b/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf @@ -25,11 +25,11 @@ private _fullMagazines = floor (_ammo / _carryMaxAmmo); private _bulletsRemaining = _ammo % _carryMaxAmmo; if (_unloadTo isKindOf "CaManBase") then { - while {(_fullMagazines > 0) && {_unloadTo canAdd _carryMag}} do { + while {(_fullMagazines > 0) && {[_unloadTo, _carryMag] call CBA_fnc_canAddItem}} do { _unloadTo addMagazine [_carryMag, _carryMaxAmmo]; _fullMagazines = _fullMagazines - 1; }; - if ((_bulletsRemaining > 0) && {_unloadTo canAdd _carryMag}) then { + if ((_bulletsRemaining > 0) && {[_unloadTo, _carryMag] call CBA_fnc_canAddItem}) then { _unloadTo addMagazine [_carryMag, _bulletsRemaining]; _bulletsRemaining = 0; }; diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index 25032a08f4..2b34d38a24 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -22,8 +22,8 @@ params ["_vehicle", "_turret", "_carryMag", "_unit"]; TRACE_4("loadMagazine",_vehicle,_turret,_carryMag,_unit); private _timeToLoad = 1; -if (!isNull(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime")) then { - _timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime"); +if (!isNull(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime")) then { + _timeToLoad = getNumber(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime"); }; private _displayName = format [localize LSTRING(loadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")]; diff --git a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf index a1e7ca9715..e1cba376f4 100644 --- a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf +++ b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf @@ -20,7 +20,7 @@ params ["_staticWeapon", "_assemblyMode", "_emptyWeapon"]; TRACE_3("staticWeaponInit_unloadExtraMags",_staticWeapon,_assemblyMode,_emptyWeapon); if (!_assemblyMode) exitWith {}; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _staticWeapon >> QUOTE(ADDON) >> "desiredAmmo"); private _storeExtraMagazines = GVAR(handleExtraMagazines); if (_emptyWeapon) then { _desiredAmmo = 0; diff --git a/addons/csw/initSettings.sqf b/addons/csw/initSettings.sqf index 28397a6e9b..10030b68da 100644 --- a/addons/csw/initSettings.sqf +++ b/addons/csw/initSettings.sqf @@ -10,7 +10,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(defaultAssemblyMode), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(handleExtraMagazines), "CHECKBOX", @@ -20,7 +20,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(handleExtraMagazines), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(ammoHandling), "LIST", @@ -30,7 +30,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(ammoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(progressBarTimeCoefficent), "SLIDER", @@ -40,7 +40,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(progressBarTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(dragAfterDeploy), "CHECKBOX", @@ -50,4 +50,4 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; false, // isGlobal {[QGVAR(dragAfterDeploy), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp index 51b6c988b6..1b98263fe2 100644 --- a/addons/dagr/Dialog.hpp +++ b/addons/dagr/Dialog.hpp @@ -139,7 +139,7 @@ class DAGR_Menu_Text { class DAGR_Menu { idd = 266860; - movingEnable = false; + movingEnable = 0; duration = 100000; fadein = 0; fadeout = 0; diff --git a/addons/dagr/RscTitles.hpp b/addons/dagr/RscTitles.hpp index ab70517c9a..87230c7fc0 100644 --- a/addons/dagr/RscTitles.hpp +++ b/addons/dagr/RscTitles.hpp @@ -32,7 +32,7 @@ class RscTitles { class DAGR_Display { idd = 266850; - movingEnable = false; + movingEnable = 0; duration = 100000; fadein = 0; fadeout = 0; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index f46c06b280..8f358e8b43 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -219,7 +219,7 @@ if (_holderIsEmpty) then { }; //If we added a dummy item, remove it now - if (_holderIsEmpty && {!((getItemCargo _holder) isEqualTo [[DUMMY_ITEM],[1]])}) exitWith { + if (_holderIsEmpty && {(getItemCargo _holder) isNotEqualTo [[DUMMY_ITEM],[1]]}) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Holder should only have dummy item"] call FUNC(eventTargetFinish); }; @@ -237,7 +237,7 @@ if (_holderIsEmpty) then { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish); }; - if (_needToRemoveVest && {!((vestItems _target) isEqualTo [])}) exitWith { + if (_needToRemoveVest && {(vestItems _target) isNotEqualTo []}) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Vest Not Empty"] call FUNC(eventTargetFinish); }; @@ -245,7 +245,7 @@ if (_holderIsEmpty) then { _holder addItemCargoGlobal [(vest _target), 1]; removeVest _target; }; - if (_needToRemoveUniform && {!((uniformItems _target) isEqualTo [])}) exitWith { + if (_needToRemoveUniform && {(uniformItems _target) isNotEqualTo []}) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Uniform Not Empty"] call FUNC(eventTargetFinish); }; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index b5edbd800c..2483903eef 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -25,6 +25,6 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) -if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; +if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index dbae83521b..afc679e375 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -21,6 +21,6 @@ params ["_unit", "_target"]; if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) -if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; +if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index e3f8c2b61e..312f446c27 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -75,7 +75,7 @@ GVAR(currentHeightChange) = 0; // prevent UAVs from firing private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew); -if !(_UAVCrew isEqualTo []) then { +if (_UAVCrew isNotEqualTo []) then { {_target deleteVehicleCrew _x} count _UAVCrew; _target setVariable [QGVAR(isUAV), true, true]; }; diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index ae52838e9b..0aa56c2a1d 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -67,7 +67,7 @@ private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew); // fixes not being able to move when in combat pace [_unit, "forceWalk", "ACE_dragging", true] call EFUNC(common,statusEffect_set); -if !(_UAVCrew isEqualTo []) then { +if (_UAVCrew isNotEqualTo []) then { {_target deleteVehicleCrew _x} count _UAVCrew; _target setVariable [QGVAR(isUAV), true, true]; }; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 4ecc876afd..6218f4afec 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -84,5 +84,5 @@ if (_target getVariable [QGVAR(isUAV), false]) then { private _mass = _target getVariable [QGVAR(originalMass), 0]; if (_mass != 0) then { - [QEGVAR(common,setMass), [_target, _mass], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, _mass]] call CBA_fnc_globalEvent; // force global sync }; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index 5235b7e66d..fd10d64f95 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -81,7 +81,7 @@ if (_target getVariable [QGVAR(isUAV), false]) then { private _mass = _target getVariable [QGVAR(originalMass), 0]; if (_mass != 0) then { - [QEGVAR(common,setMass), [_target, _mass], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, _mass]] call CBA_fnc_globalEvent; // force global sync }; // reset temp direction diff --git a/addons/dragging/functions/fnc_initObject.sqf b/addons/dragging/functions/fnc_initObject.sqf index 8d35f52bb6..40665d6e34 100644 --- a/addons/dragging/functions/fnc_initObject.sqf +++ b/addons/dragging/functions/fnc_initObject.sqf @@ -17,7 +17,7 @@ params ["_object"]; -private _config = configFile >> "CfgVehicles" >> typeOf _object; +private _config = configOf _object; if (getNumber (_config >> QGVAR(canDrag)) == 1) then { private _position = [_config >> QGVAR(dragPosition), "ARRAY", [0,1.5,0]] call CBA_fnc_getConfigEntry; diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index a52afd1c27..7d1babf075 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -79,5 +79,5 @@ private _mass = getMass _target; if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; - [QEGVAR(common,setMass), [_target, 1e-12], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // force global sync }; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 7a4c8908d3..0b24bc4337 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -67,5 +67,5 @@ private _mass = getMass _target; if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; - [QEGVAR(common,setMass), [_target, 1e-12], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // force global sync }; diff --git a/addons/dragon/functions/fnc_onFired.sqf b/addons/dragon/functions/fnc_onFired.sqf index 78d9d15b91..1fa24c1925 100644 --- a/addons/dragon/functions/fnc_onFired.sqf +++ b/addons/dragon/functions/fnc_onFired.sqf @@ -23,7 +23,7 @@ _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"]; _shooter setVariable [QGVAR(fired), true, true]; _shooter animate ["missile_hide", 1]; -private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance"; +private _config = configOf _projectile >> "ace_missileguidance"; private _serviceInterval = [_config >> "serviceInterval", "NUMBER", 0.33] call CBA_fnc_getConfigEntry; private _serviceChargeCount = [_config >> "serviceCharges", "NUMBER", 60] call CBA_fnc_getConfigEntry; diff --git a/addons/explosives/functions/fnc_interactEH.sqf b/addons/explosives/functions/fnc_interactEH.sqf index 59ddaff432..950c376400 100644 --- a/addons/explosives/functions/fnc_interactEH.sqf +++ b/addons/explosives/functions/fnc_interactEH.sqf @@ -47,7 +47,7 @@ if ( if (_playerPos distanceSqr _setPosition > 25) then { private _cfgAmmo = configFile >> "CfgAmmo"; { - if (_x distanceSqr _player < 225 && {!(_x in _minesHelped)} && {!(getModelInfo _x select 0 isEqualTo "empty.p3d")}) then { + if (_x distanceSqr _player < 225 && {!(_x in _minesHelped)} && {getModelInfo _x select 0 isNotEqualTo "empty.p3d"}) then { private _config = _cfgAmmo >> typeOf _x; private _size = getNumber (_config >> QGVAR(size)); private _defuseClass = ["ACE_DefuseObject", "ACE_DefuseObject_Large"] select (_size == 1); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 96fc4820e4..2961c8d101 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -80,7 +80,7 @@ GVAR(TweakedAngle) = 0; #ifdef DEBUG_MODE_FULL drawLine3d [(eyePos _unit) call EFUNC(common,ASLToPosition), (_testPos) call EFUNC(common,ASLToPosition), [1,0,0,1]]; #endif - if !((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isEqualTo []) exitWith {_return = false;}; + if ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isNotEqualTo []) exitWith {_return = false;}; } forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]]; _return }; @@ -95,7 +95,7 @@ GVAR(TweakedAngle) = 0; { private _testPos = _testBase vectorAdd [0.1 * (_x select 0) * (cos _cameraAngle), 0.1 * (_x select 0) * (sin _cameraAngle), 0.1 * (_x select 1)]; private _intersectObject = ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) param [0, objNull]) param [3, objNull]; - if !(_intersectObject isEqualTo objNull) exitWith {_attachVehicle = _intersectObject}; + if (_intersectObject isNotEqualTo objNull) exitWith {_attachVehicle = _intersectObject}; } forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]]; if ((!isNull _attachVehicle) && {[PLACE_RANGE_MIN] call _testPositionIsValid} && {(_attachVehicle isKindOf "Car") || {_attachVehicle isKindOf "Tank"} || {_attachVehicle isKindOf "Air"} || {_attachVehicle isKindOf "Ship"}}) then { diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 684b0f8b1a..9185d46d56 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1115,26 +1115,32 @@ Minimum Time Durée minimale + 最短時間 Maximum Time Durée maximale + 最長時間 Default Time Durée par défaut + 標準時間 Minimum time value (in seconds) for the explosive timer. Définit la durée minimale paramétrable sur le minuteur. + 起爆タイマーの最低時間 (秒) を設定します。 Maximum time value (in seconds) for the explosive timer. Définit la durée maximale paramétrable sur le minuteur. + 起爆タイマーの最長時間 (秒) を設定します。 Default time value (in seconds) for the explosive timer. Définit la durée paramétrée par défaut sur le minuteur. + 起爆タイマーの標準時間 (秒) を設定します。 diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 2a130b37f9..24f996d825 100644 --- a/addons/fastroping/CfgVehicles.hpp +++ b/addons/fastroping/CfgVehicles.hpp @@ -75,8 +75,9 @@ class CfgVehicles { }; class ACE_cutRopes { displayName = CSTRING(Interaction_cutRopes); - condition = QUOTE(true); - statement = ""; + condition = QUOTE([_target] call FUNC(canCutRopes)); + // should not be empty to work with EGVAR(interact_menu,consolidateSingleChild) setting + statement = QUOTE(true); class confirmCutRopes { displayName = ECSTRING(common,confirm); condition = QUOTE([_target] call FUNC(canCutRopes)); diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 72ded1b267..43e5de24f9 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -35,7 +35,7 @@ #ifdef DRAW_FASTROPE_INFO addMissionEventHandler ["Draw3D", { if (!(cursorObject isKindOf "Helicopter")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _config = configOf cursorObject; private _enabled = getNumber (_config >> QGVAR(enabled)); drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; if (_enabled > 0) then { diff --git a/addons/fastroping/functions/fnc_canCutRopes.sqf b/addons/fastroping/functions/fnc_canCutRopes.sqf index 8107b8066b..f65f2ef89a 100644 --- a/addons/fastroping/functions/fnc_canCutRopes.sqf +++ b/addons/fastroping/functions/fnc_canCutRopes.sqf @@ -18,5 +18,5 @@ params ["_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; -!(_deployedRopes isEqualTo []) && +(_deployedRopes isNotEqualTo []) && {{(_x select 5)} count (_deployedRopes) == 0} diff --git a/addons/fastroping/functions/fnc_canDeployRopes.sqf b/addons/fastroping/functions/fnc_canDeployRopes.sqf index 26b514368b..4338ac0130 100644 --- a/addons/fastroping/functions/fnc_canDeployRopes.sqf +++ b/addons/fastroping/functions/fnc_canDeployRopes.sqf @@ -19,7 +19,7 @@ */ params ["_vehicle", "_player", "_ropeClass", ["_defaultOption", false]]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; (driver _vehicle != _player) && {getPos _vehicle select 2 > 2} && { diff --git a/addons/fastroping/functions/fnc_canFastRope.sqf b/addons/fastroping/functions/fnc_canFastRope.sqf index b4f5e20474..a071160821 100644 --- a/addons/fastroping/functions/fnc_canFastRope.sqf +++ b/addons/fastroping/functions/fnc_canFastRope.sqf @@ -20,6 +20,6 @@ params ["_unit", "_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; ((driver _vehicle != _unit) && -{!(_deployedRopes isEqualTo [])} && +{_deployedRopes isNotEqualTo []} && {{!(_x select 5) && !(_x select 6)} count (_deployedRopes) > 0} && {getPos _vehicle select 2 > 2}) diff --git a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf index 881996b5a1..b6068f5341 100644 --- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf @@ -16,7 +16,7 @@ */ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; ((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) && {(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} && diff --git a/addons/fastroping/functions/fnc_canStowFRIES.sqf b/addons/fastroping/functions/fnc_canStowFRIES.sqf index 6f26fc1ed5..462799eb01 100644 --- a/addons/fastroping/functions/fnc_canStowFRIES.sqf +++ b/addons/fastroping/functions/fnc_canStowFRIES.sqf @@ -16,7 +16,7 @@ */ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; (_vehicle getVariable [QGVAR(deploymentStage), 0]) == 2 && {getText (_config >> QGVAR(onCut)) != ""} diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index ae1b58638a..f17d08dc18 100644 --- a/addons/fastroping/functions/fnc_cutRopes.sqf +++ b/addons/fastroping/functions/fnc_cutRopes.sqf @@ -25,7 +25,7 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; private _attachedObjects = attachedObjects _dummy; //Rope is considered occupied when it's broken as well, so check if array is empty //Note: ropes are not considered attached objects by Arma - if !(_attachedObjects isEqualTo []) then { + if (_attachedObjects isNotEqualTo []) then { detach ((attachedObjects _dummy) select 0); }; }; @@ -40,5 +40,5 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; _vehicle setVariable [QGVAR(deployedRopes), [], true]; // Set new state (0 if no FRIES, 2 if FRIES for manual stowing) -private _newState = [0, 2] select (isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(onCut))); +private _newState = [0, 2] select (isText (configOf _vehicle >> QGVAR(onCut))); _vehicle setVariable [QGVAR(deploymentStage), _newState, true]; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf index 8101a99dae..d1546aad63 100644 --- a/addons/fastroping/functions/fnc_deployAI.sqf +++ b/addons/fastroping/functions/fnc_deployAI.sqf @@ -26,7 +26,7 @@ if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith { ERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.'); }; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _configEnabled = getNumber (_config >> QGVAR(enabled)); if (_configEnabled == 0) exitWith { if (hasInterface) then { @@ -75,7 +75,7 @@ DFUNC(deployAIRecursive) = { unassignVehicle _unit; [_unit, _vehicle] call FUNC(fastRope); - if !(_unitsToDeploy isEqualTo []) then { + if (_unitsToDeploy isNotEqualTo []) then { [{ [{ params ["_vehicle"]; diff --git a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf index 73dbee6ea4..273d148329 100644 --- a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf +++ b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf @@ -33,7 +33,7 @@ if (_vehicle distance2D _position > 50) then { // - Deployment --------------------------------------------------------------- [_vehicle] call FUNC(deployAI); -waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])}; +waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isNotEqualTo []}; waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []}; _group setSpeedMode _speedMode; diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index 27ad76a0f9..17627b63f2 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -20,7 +20,7 @@ params ["_vehicle", ["_player", objNull], ["_ropeClass", ""]]; TRACE_3("deployRopes",_vehicle,_player,_ropeClass); -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _ropeOrigins = getArray (_config >> QGVAR(ropeOrigins)); private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; diff --git a/addons/fastroping/functions/fnc_equipFRIES.sqf b/addons/fastroping/functions/fnc_equipFRIES.sqf index 002a32364c..6dcb29e3e7 100644 --- a/addons/fastroping/functions/fnc_equipFRIES.sqf +++ b/addons/fastroping/functions/fnc_equipFRIES.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if !(isNumber (_config >> QGVAR(enabled))) then { ["%1 has not been configured for ACE_Fastroping.", getText (_config >> "displayName")] call BIS_fnc_error; } else { diff --git a/addons/fastroping/functions/fnc_prepareFRIES.sqf b/addons/fastroping/functions/fnc_prepareFRIES.sqf index c5bac4deb1..9f1c1b941a 100644 --- a/addons/fastroping/functions/fnc_prepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_prepareFRIES.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed _vehicle setVariable [QGVAR(deploymentStage), 1, true]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _waitTime = 0; if (isText (_config >> QGVAR(onPrepare))) then { _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare)))); diff --git a/addons/fastroping/functions/fnc_stowFRIES.sqf b/addons/fastroping/functions/fnc_stowFRIES.sqf index 3b18a6dbe1..297cb925d1 100644 --- a/addons/fastroping/functions/fnc_stowFRIES.sqf +++ b/addons/fastroping/functions/fnc_stowFRIES.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed _vehicle setVariable [QGVAR(deploymentStage), 1, true]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _waitTime = 0; if (isText (_config >> QGVAR(onCut))) then { _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onCut)))); diff --git a/addons/fastroping/functions/fnc_unequipFRIES.sqf b/addons/fastroping/functions/fnc_unequipFRIES.sqf index 7fade927b6..540ebb2f3f 100644 --- a/addons/fastroping/functions/fnc_unequipFRIES.sqf +++ b/addons/fastroping/functions/fnc_unequipFRIES.sqf @@ -20,6 +20,6 @@ params ["_vehicle"]; deleteVehicle (_vehicle getVariable [QGVAR(FRIES), objNull]); _vehicle setVariable [QGVAR(FRIES), nil, true]; -if !(_vehicle getVariable [QGVAR(deployedRopes), []] isEqualTo []) then { +if (_vehicle getVariable [QGVAR(deployedRopes), []] isNotEqualTo []) then { [_vehicle] call FUNC(cutRopes); }; diff --git a/addons/fastroping/initSettings.sqf b/addons/fastroping/initSettings.sqf index eac47639c6..5888f49aa2 100644 --- a/addons/fastroping/initSettings.sqf +++ b/addons/fastroping/initSettings.sqf @@ -10,4 +10,4 @@ private _category = ["ACE Uncategorized", LLSTRING(setting_categoryMenu_displayN true, // isGlobal {[QGVAR(requireRopeItems), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // needRestart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/fcs/dev/test_debugConfigs.sqf b/addons/fcs/dev/test_debugConfigs.sqf index 89fa6b0d31..c373912363 100644 --- a/addons/fcs/dev/test_debugConfigs.sqf +++ b/addons/fcs/dev/test_debugConfigs.sqf @@ -30,7 +30,7 @@ private _problemUIs = []; }; } forEach _weapons; - if (!(_weapons isEqualTo [])) then { + if (_weapons isNotEqualTo []) then { private _fcsMsg = switch (true) do { // case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"}; // case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"}; diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf index cb0e00c9c1..30f9c86305 100644 --- a/addons/fcs/functions/fnc_adjustRange.sqf +++ b/addons/fcs/functions/fnc_adjustRange.sqf @@ -19,7 +19,7 @@ params ["_vehicle", "_turret", "_delta"]; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); private _min = getNumber (_turretConfig >> QGVAR(MinDistance)); private _max = getNumber (_turretConfig >> QGVAR(MaxDistance)); diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index 8ceb0c62cf..478b34f502 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -23,7 +23,7 @@ TRACE_4("params",_vehicle,_turret,_distance,_angleTarget); private _FCSInitSpeed = []; private _FCSMagazines = []; private _FCSElevation = []; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); { private _magazine = _x; diff --git a/addons/fcs/functions/fnc_canUseFCS.sqf b/addons/fcs/functions/fnc_canUseFCS.sqf index a246d51f0c..a5a1543de9 100644 --- a/addons/fcs/functions/fnc_canUseFCS.sqf +++ b/addons/fcs/functions/fnc_canUseFCS.sqf @@ -15,7 +15,7 @@ * Public: No */ -getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 +getNumber ([configOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 && {cameraView == "GUNNER"} && {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out && {cameraOn != (getConnectedUAV ACE_player)} //Not Controlling a UAV diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 0959708bb0..e432944855 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -39,7 +39,7 @@ private _initSpeed = 0; private _zeroDistance = currentZeroing _gunner; if (_zeroDistance > 0) then { private _weaponCombo = [_weapon, _magazine, _ammo, _zeroDistance]; - if !(_weaponCombo isEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then { + if (_weaponCombo isNotEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then { private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); private _antiOffset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, 0, _zeroDistance]; _antiOffset = parseNumber _antiOffset; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 0e141c0968..2e40b64a84 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -18,7 +18,7 @@ params ["_vehicle", "_turret"]; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); // Update display for infantry rangefinders if (_vehicle == ACE_player) exitWith {[5,5500,25,true] call FUNC(getRange)}; diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index fb3ce99974..d96b6d5307 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -19,7 +19,7 @@ params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]]; TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound); -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); if (isNil "_distance") then { _distance = [ diff --git a/addons/fcs/functions/fnc_vehicleInit.sqf b/addons/fcs/functions/fnc_vehicleInit.sqf index 3314228729..b6e8eff316 100644 --- a/addons/fcs/functions/fnc_vehicleInit.sqf +++ b/addons/fcs/functions/fnc_vehicleInit.sqf @@ -18,7 +18,7 @@ params ["_vehicle"]; { - private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath); + private _turretConfig = [configOf _vehicle, _x] call EFUNC(common,getTurretConfigPath); if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) then { if (isNil QGVAR(jipID)) then { diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index faef2f00a3..4278bec2cb 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -32,7 +32,7 @@ GVAR(lastFPTime) = diag_tickTime; private _originASL = AGLtoASL positionCameraToWorld [0, 0, 0]; private _fingerPosASL = AGLtoASL positionCameraToWorld [0, 0, FP_DISTANCE]; private _intersections = lineIntersectsSurfaces [_originASL, _fingerPosASL, ACE_player, vehicle ACE_player, true, 1]; -if !(_intersections isEqualTo []) then { +if (_intersections isNotEqualTo []) then { _fingerPosASL = _intersections select 0 select 0; }; diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml index 478b1da2c8..16aaea33e4 100644 --- a/addons/flashlights/stringtable.xml +++ b/addons/flashlights/stringtable.xml @@ -133,7 +133,7 @@ Torcia a LED ad alta potenza Silná LED svítilna. Puissante lampe torche à LED. - 協力な LED のフラッシュライト。 + 強力な LED のフラッシュライト。 Güçlü LED el feneri Linterna LED potente Мощный светодиодный фонарь. diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index 957bbd7def..aba24e1809 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -70,20 +70,6 @@ class MuzzleSlot_762: MuzzleSlot { }; class CfgWeapons { - class Rifle_Base_F; - class Rifle_Long_Base_F: Rifle_Base_F { - class WeaponSlotsInfo; - }; - /* Other */ - class LMG_Mk200_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot_65 { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; // uses array instead of inherited class - }; - }; - }; - - /* Flashsuppressors */ class ItemCore; diff --git a/addons/frag/functions/fnc_dev_trackTrace.sqf b/addons/frag/functions/fnc_dev_trackTrace.sqf index 6481b89310..5d8ee3dee0 100644 --- a/addons/frag/functions/fnc_dev_trackTrace.sqf +++ b/addons/frag/functions/fnc_dev_trackTrace.sqf @@ -18,7 +18,7 @@ params ["_args", "_pfhID"]; _args params ["_tracerObj", "_index"]; -if (alive _tracerObj && {!(GVAR(traces) isEqualTo [])}) then { +if (alive _tracerObj && {GVAR(traces) isNotEqualTo []}) then { private _data = GVAR(traces) select _index; private _positions = _data select 4; _positions pushBack [getPos _tracerObj, vectorMagnitude (velocity _tracerObj)]; diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 8c90445411..a2744d60fd 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -95,7 +95,7 @@ private _fragArcs = []; _fragArcs set [360, 0]; private _doRandom = true; -if (!(_objects isEqualTo [])) then { +if (_objects isNotEqualTo []) then { if (GVAR(reflectionsEnabled)) then { [_lastPos, _shellType] call FUNC(doReflections); }; diff --git a/addons/gforces/XEH_postInit.sqf b/addons/gforces/XEH_postInit.sqf index f7d532c288..f07249c38f 100644 --- a/addons/gforces/XEH_postInit.sqf +++ b/addons/gforces/XEH_postInit.sqf @@ -12,8 +12,8 @@ GVAR(playerIsVirtual) = false; ["unit", { // Add unit changed EH to check if player is either virtual (logic) or a UAV AI params ["_unit"]; - GVAR(playerIsVirtual) = ((getNumber (configFile >> "CfgVehicles" >> (typeOf _unit) >> "isPlayableLogic")) == 1) || - {(getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "simulation")) == "UAVPilot"}; + GVAR(playerIsVirtual) = ((getNumber (configOf _unit >> "isPlayableLogic")) == 1) || + {(getText (configOf _unit >> "simulation")) == "UAVPilot"}; TRACE_3("unit changed",_unit,typeOf _unit,GVAR(playerIsVirtual)); }, true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/goggles/CfgVehicles.hpp b/addons/goggles/CfgVehicles.hpp index c9cdf70293..68506d3269 100644 --- a/addons/goggles/CfgVehicles.hpp +++ b/addons/goggles/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { displayName = CSTRING(WipeGlasses); condition = QUOTE(GVAR(showClearGlasses) && {call FUNC(canWipeGlasses)}); statement = QUOTE(call FUNC(clearGlasses)); + exceptions[] = {"isNotInside", "isNotSitting", "isNotSwimming", "isNotEscorting"}; }; }; }; diff --git a/addons/goggles/RscTitles.hpp b/addons/goggles/RscTitles.hpp index 5544b9b132..7c62c6960c 100644 --- a/addons/goggles/RscTitles.hpp +++ b/addons/goggles/RscTitles.hpp @@ -7,7 +7,7 @@ class RscTitles{ onUnload = "uiNamespace setVariable ['ACE_Goggles_Display', displayNull]"; fadeIn=0.5; fadeOut=0.5; - movingEnable = false; + movingEnable = 0; duration = 10e10; name = "RscACE_Goggles_BaseTitle"; class controls; diff --git a/addons/goggles/functions/fnc_applyGlassesEffect.sqf b/addons/goggles/functions/fnc_applyGlassesEffect.sqf index f60eb79581..4c0b8dd1df 100644 --- a/addons/goggles/functions/fnc_applyGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_applyGlassesEffect.sqf @@ -24,7 +24,7 @@ TRACE_2("applyGlassesEffect",_player,_glasses); // remove old effect call FUNC(removeGlassesEffect); -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { +if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) }; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 39ad6fb706..07b5b64fd9 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -74,7 +74,7 @@ _affected = _affected - [ACE_player]; // Affect local player, independently of distance if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf ACE_player) >> "isPlayableLogic")) == 1) exitWith { + if ((getNumber (configOf ACE_player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf ACE_player); // VirtualMan_F (placeable logic zeus / spectator) }; // Do effects for player diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index d454001031..d6f689e4f2 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -196,7 +196,7 @@ private _vehicle = _position nearestObject "Car"; if (!local _vehicle) exitWith {}; -private _config = _vehicle call CBA_fnc_getObjectConfig; +private _config = configOf _vehicle; // --- burn tyres private _fnc_isWheelHitPoint = { diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 1c8066dec2..3a8c8ef5bf 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -31,7 +31,7 @@ private _config = configFile >> "CfgAmmo" >> _ammo; if (local _unit) then { // handle priming sound, if present private _soundConfig = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(pullPinSound)); - if !(_soundConfig isEqualTo []) then { + if (_soundConfig isNotEqualTo []) then { _soundConfig params ["_file", "_volume", "_pitch", "_distance"]; playSound3D [_file, objNull, false, getPosASL _projectile, _volume, _pitch, _distance]; }; diff --git a/addons/gunbag/XEH_preInit.sqf b/addons/gunbag/XEH_preInit.sqf index 582d64f7e5..63968a30f8 100644 --- a/addons/gunbag/XEH_preInit.sqf +++ b/addons/gunbag/XEH_preInit.sqf @@ -16,11 +16,11 @@ PREP_RECOMPILE_END; private _newBackpack = backpackContainer _unit; private _oldBackpack = backpackContainer _corpse; - if !(typeOf _newBackpack isEqualTo typeOf _oldBackpack) exitWith {}; + if (typeOf _newBackpack isNotEqualTo typeOf _oldBackpack) exitWith {}; private _state = _oldBackpack getVariable [QGVAR(gunbagWeapon), []]; - if !(_state isEqualTo []) then { + if (_state isNotEqualTo []) then { _newBackpack setVariable [QGVAR(gunbagWeapon), _state, true]; }; }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/gunbag/functions/fnc_canInteract.sqf b/addons/gunbag/functions/fnc_canInteract.sqf index 04313f6741..a003afce86 100644 --- a/addons/gunbag/functions/fnc_canInteract.sqf +++ b/addons/gunbag/functions/fnc_canInteract.sqf @@ -26,10 +26,10 @@ if ((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo [] && {_weapon != _result = 0; }; -if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon == ""}) then { +if ((_gunbag getVariable [QGVAR(gunbagWeapon), []] isNotEqualTo []) && {_weapon == ""}) then { _result = 1; }; -if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon != ""}) then { +if ((_gunbag getVariable [QGVAR(gunbagWeapon), []] isNotEqualTo []) && {_weapon != ""}) then { _result = 2; }; _result diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 17548a973b..3b35488568 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -60,7 +60,7 @@ GVAR(lastPlayerVehicle) = objNull; }; // Don't add a new EH if the unit respawned if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { + if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) }; private _firedEH = _player addEventHandler ["FiredNear", {call FUNC(firedNear)}]; diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index 5e8064e767..8399a3a84f 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -20,8 +20,8 @@ params ["_player", ["_displayHint", false, [false]]]; if (!GVAR(EnableCombatDeafness)) exitWith {}; -if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full - [localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured); +if !([_player, "ACE_EarPlugs"] call CBA_fnc_canAddItem) exitWith { // inventory full + [LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured); }; // Plugs already in and removing them. diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf index 9f33633462..76f685df81 100644 --- a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf +++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf @@ -22,10 +22,10 @@ if (isNull _vehicle) exitWith {}; private _newAttenuation = 1; if (ACE_player != _vehicle) then { private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex); - private _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType"); + private _effectType = getText (configOf _vehicle >> "attenuationEffectType"); - if (!(_turretPath isEqualTo [])) then { - private _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath); + if (_turretPath isNotEqualTo []) then { + private _turretConfig = [(configOf _vehicle), _turretPath] call EFUNC(common,getTurretConfigPath); if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then { _effectType = ""; @@ -40,7 +40,7 @@ if (ACE_player != _vehicle) then { case (_effectType == ""): {1}; case (_effectType == "CarAttenuation"); case (_effectType == "RHS_CarAttenuation"): { // Increase protection for armored cars - private _armor = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> "HitBody" >> "armor"); + private _armor = getNumber (configOf _vehicle >> "HitPoints" >> "HitBody" >> "armor"); linearConversion [2, 8, _armor, 0.5, 0.3, true];}; case (_effectType == "OpenCarAttenuation"): {1}; case (_effectType == "TankAttenuation"): {0.1}; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index e5a8ca2bab..b67f363b00 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -119,23 +119,6 @@ 你沒有耳塞 Kulak Tıkacın Yok - - No inventory space - Kein Platz im Inventar - Sin espacio en el inventario - Brak miejsca w ekwipunku - Il n'y a plus de place dans l'inventaire. - Není místo v inventáři - Non hai abbastanza spazio - Não há espaço no inventário - Nincs több hely - Нет места в инвентаре - インベントリに空きがありません - 넣을 공간이 없습니다 - 无可用空间 - 無可用空間 - Envanterin de alan yok - Disable ear ringing Désactiver les bourdonnements diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf index 7d4980a1b3..b2a08f24a3 100644 --- a/addons/hellfire/functions/fnc_attackProfile.sqf +++ b/addons/hellfire/functions/fnc_attackProfile.sqf @@ -56,7 +56,7 @@ switch (_attackStage) do { _returnTargetPos = _projectilePos getPos [100, getDir _projectile]; _returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight]; - if (!(_seekerTargetPos isEqualTo [0,0,0])) then { + if (_seekerTargetPos isNotEqualTo [0,0,0]) then { _attackProfileStateParams set [0, STAGE_ATTACK_CRUISE]; TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d); }; @@ -67,7 +67,7 @@ switch (_attackStage) do { private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos); // arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack - private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true]; + private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true]; _returnTargetPos = +_seekerTargetPos; _returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)]; diff --git a/addons/hellfire/functions/fnc_setupVehicle.sqf b/addons/hellfire/functions/fnc_setupVehicle.sqf index e824542021..cf0a17a2e7 100644 --- a/addons/hellfire/functions/fnc_setupVehicle.sqf +++ b/addons/hellfire/functions/fnc_setupVehicle.sqf @@ -41,7 +41,7 @@ if (!_enabled) exitWith {TRACE_3("Not enabled",_enabled,_vehicle,_turretPath);}; // Add laser if vehicle is configured for one: -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then { +if ((getNumber (configOf _vehicle >> QGVAR(addLaserDesignator))) == 1) then { [{ params ["_vehicle", "_turretPath"]; TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath); diff --git a/addons/huntir/Dialog.hpp b/addons/huntir/Dialog.hpp index 17578bbb3e..18c5ac1339 100644 --- a/addons/huntir/Dialog.hpp +++ b/addons/huntir/Dialog.hpp @@ -60,7 +60,7 @@ class GVAR(cam_dialog) { idd = 18880; - movingEnable = true; + movingEnable = 1; controlsBackground[] = { }; objects[] = { }; controls[] = { diff --git a/addons/huntir/RscTitles.hpp b/addons/huntir/RscTitles.hpp index e93eb9b508..7d2e06fa6b 100644 --- a/addons/huntir/RscTitles.hpp +++ b/addons/huntir/RscTitles.hpp @@ -3,7 +3,7 @@ class RscTitles { class GVAR(cam_rose) { idd=-1; - movingEnable = true; + movingEnable = 1; fadein = 0; fadeout = 1; duration = 1e+011; diff --git a/addons/interact_menu/CursorMenus.hpp b/addons/interact_menu/CursorMenus.hpp index 385c3a0f75..98f05082a9 100644 --- a/addons/interact_menu/CursorMenus.hpp +++ b/addons/interact_menu/CursorMenus.hpp @@ -12,7 +12,7 @@ class RscTitles { onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuBackground)),displayNull)]); fadeIn = 0.25; fadeOut = 0.25; - movingEnable = false; + movingEnable = 0; duration = 10e10; name = QGVAR(menuBackground); class controls {}; diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index e7fecfcac8..892c26f1d0 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -13,7 +13,7 @@ * Active children * * Example: - * [bob, [array], [array], 5] call ACE_interact_menu_fnc_collectActoveActionTree + * [bob, [array], [array], 5] call ACE_interact_menu_fnc_collectActiveActionTree * * Public: No */ @@ -25,13 +25,23 @@ private _target = _object; private _player = ACE_player; // Check if the function should be modified first -if !((_origActionData select 10) isEqualTo {}) then { +if ((_origActionData select 10) isNotEqualTo {}) then { // It should, so make a copy and pass it to the modifierFunction _origActionData = +_origActionData; [_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10); }; -_origActionData params ["_actionName", "", "", "_statementCode", "_conditionCode", "_insertChildrenCode", "_customParams", "", "_distance"]; +_origActionData params [ + "_actionName", + "_displayName", + "", + "_statementCode", + "_conditionCode", + "_insertChildrenCode", + "_customParams", + "_position", + "_distance" +]; // Return nothing if the action itself is not active if !([_target, ACE_player, _customParams] call _conditionCode) exitWith { @@ -48,7 +58,7 @@ _fullPath pushBack _actionName; private _activeChildren = []; // If there's a statement to dynamically insert children then execute it -if !({} isEqualTo _insertChildrenCode) then { +if (_insertChildrenCode isNotEqualTo {}) then { private _dynamicChildren = [_target, ACE_player, _customParams] call _insertChildrenCode; // Collect dynamic children class actions @@ -91,5 +101,23 @@ if ((_activeChildren isEqualTo []) && {_statementCode isEqualTo {}}) exitWith { [] }; +if (GVAR(consolidateSingleChild) && {count _activeChildren == 1} && {_statementCode isEqualTo {}}) then { + _activeChildren select 0 params ["_childActionData", "_childChildren", "_childObject"]; + _childActionData params ["", "_displayNameChild", "_iconChild", "_statementChild", "", "", "_customParamsChild", "", "", "_paramsChild"]; + _origActionData = [ + _actionName, + format ["%1 > %2", _displayName, _displayNameChild], + _iconChild, + _statementChild, + _conditionCode, + _insertChildrenCode, + _customParamsChild, + _position, + _distance, + _paramsChild + ]; + _activeChildren = _childChildren; + _object = _childObject; +}; [_origActionData, _activeChildren, _object] diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index 72857f3070..2a0cbe664b 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -24,7 +24,7 @@ if (count _shortPath > count _longPath) exitWith {false}; //IGNORE_PRIVATE_WARNING ["_i"]; for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do { - if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith { + if ((_longPath select _i) isNotEqualTo (_shortPath select _i)) exitWith { _isSubPath = false; }; }; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 36e86cd9b3..651aaef47d 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -62,7 +62,7 @@ if (GVAR(openedMenuType) >= 0) then { GVAR(selectedAction) = _action select 1; GVAR(selectedTarget) = (GVAR(selectedAction)) select 2; - private _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath); + private _misMatch = (GVAR(lastPath) isNotEqualTo _hoverPath); if(_misMatch && {diag_tickTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { GVAR(startHoverTime) = diag_tickTime; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index d51766548f..17f9ad5145 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -36,7 +36,7 @@ private _menuInSelectedPath = true; if (_forEachIndex >= (count GVAR(menuDepthPath))) exitWith { _menuInSelectedPath = false; }; - if !(_x isEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith { + if (_x isNotEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith { _menuInSelectedPath = false; }; } forEach _path; diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index 2497021e00..924e50758d 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -38,7 +38,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {}; //Make the common case fast (cursorTarget is looking at a door): if ((!isNull cursorTarget) && {cursorTarget isKindOf "Static"} && {!(cursorTarget in _housesScaned)}) then { - if (((count (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "UserActions")) > 0) || {(count (getArray (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "ladders"))) > 0}) then { + if (((count (configOf cursorTarget >> "UserActions")) > 0) || {(count (getArray (configOf cursorTarget >> "ladders"))) > 0}) then { _housesToScanForActions = [cursorTarget]; } else { _housesScaned pushBack cursorTarget; diff --git a/addons/interact_menu/initSettings.sqf b/addons/interact_menu/initSettings.sqf index 8d353906f6..f9395f69e6 100644 --- a/addons/interact_menu/initSettings.sqf +++ b/addons/interact_menu/initSettings.sqf @@ -6,7 +6,15 @@ [1, 0, 0], false, {GVAR(selectorColorHex) = _this call BIS_fnc_colorRGBtoHTML} // Stored in Hex to avoid constant conversion -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(consolidateSingleChild), + "CHECKBOX", + [LSTRING(consolidateSingleChild), LSTRING(consolidateSingleChild_Description)], + format ["ACE %1", LLSTRING(Category_InteractionMenu)], + false +] call CBA_fnc_addSetting; [ QGVAR(alwaysUseCursorInteraction), @@ -15,7 +23,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(cursorKeepCentered), @@ -24,7 +32,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(useListMenu), @@ -33,7 +41,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(menuBackground), @@ -42,7 +50,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(alwaysUseCursorSelfInteraction), @@ -51,7 +59,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], true, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(cursorKeepCenteredSelfInteraction), @@ -60,7 +68,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(useListMenuSelf), @@ -69,7 +77,7 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(menuBackgroundSelf), @@ -78,4 +86,4 @@ [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 106fb1aebc..de7be129ae 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -489,5 +489,15 @@ Selector de color Seçici Renk + + Consolidate single child actions + Объединять с единственным дочерним действием + サブ動作を統合 + + + Combines parent action with only one child action together. + Объединять родительское действие с единственным дочерним действием в одно. + メインの動作とサブ動作一つを統合して表示します。 + diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp index 3efb745a6b..67497ec23b 100644 --- a/addons/interaction/ACE_Settings.hpp +++ b/addons/interaction/ACE_Settings.hpp @@ -1,24 +1,12 @@ class ACE_Settings { class GVAR(enableTeamManagement) { - category = CSTRING(DisplayName); - displayName = CSTRING(EnableTeamManagement_DisplayName); - description = CSTRING(EnableTeamManagement_Description); - value = 1; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(enableMagazinePassing) { - category = CSTRING(DisplayName); - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(PassMagazineSetting); + movedToSQF = 1; }; class GVAR(disableNegativeRating) { - category = CSTRING(DisplayName); - displayName = CSTRING(DisableNegativeRating_DisplayName); - description = CSTRING(DisableNegativeRating_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; }; diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index c05b6fe973..8cc386fbc1 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -3,7 +3,7 @@ class ACE_ZeusActions { class ZeusUnits { displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 0))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 0)); class stance { displayName = "$STR_A3_RscAttributeUnitPos_Title"; @@ -49,7 +49,7 @@ class ACE_ZeusActions { class ZeusGroups { displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 1))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 1)); class behaviour { displayName = "$STR_Combat_Mode"; @@ -157,7 +157,7 @@ class ACE_ZeusActions { class ZeusWaypoints { displayName = "Waypoints"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 2))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 2)); class behaviour { displayName = "$STR_Combat_Mode"; @@ -265,6 +265,6 @@ class ACE_ZeusActions { class ZeusMarkers { displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 3))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 3)); }; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 3239badbdd..de80f3e1e1 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -312,6 +312,14 @@ class CfgVehicles { statement = ""; showDisabled = 1; icon = ""; // @todo + + class GVAR(weaponAttachments) { + displayName = "$STR_A3_CfgEditorSubcategories_EdSubcat_SideSlot0"; + condition = QGVAR(enableWeaponAttachments); + exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"}; + insertChildren = QUOTE(call DFUNC(getWeaponAttachmentsActions)); + modifierFunction = QUOTE(_this select 3 set [ARR_2(2, getText (configFile >> 'CfgWeapons' >> currentWeapon (_this select 0) >> 'picture'))];); + }; }; }; }; @@ -620,7 +628,7 @@ class CfgVehicles { condition = "true"; class ACE_OpenBox { displayName = CSTRING(OpenBox); - condition = QUOTE((alive _target) && {(getNumber (configFile >> 'CfgVehicles' >> (typeOf _target) >> 'disableInventory')) == 0}); + condition = QUOTE((alive _target) && {(getNumber (configOf _target >> 'disableInventory')) == 0}); statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)), _target)]); showDisabled = 0; }; diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index a63bfc48f8..8eada17e3d 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -33,6 +33,10 @@ PREP(pardon); PREP(canPullOutBody); PREP(pullOutBody); +// Weapon Attachments +PREP(getWeaponAttachmentsActions); +PREP(switchWeaponAttachment); + // interaction with doors PREP(getDoor); PREP(getGlassDoor); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 7a9f2b6572..933cead137 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -135,3 +135,9 @@ GVAR(isOpeningDoor) = false; }]; }; }] call CBA_fnc_addEventHandler; + +{ + [_x, { + [QGVAR(clearWeaponAttachmentsActionsCache)] call CBA_fnc_localEvent; + }] call CBA_fnc_addPlayerEventHandler; +} forEach ["loadout", "weapon"]; diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index dbc37e2bb6..855d651d55 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -6,6 +6,8 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + DFUNC(repair_Statement) = { // moved from config because of build problems TRACE_1("repair_Statement",_this); { diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 05e5ebfd55..b4efb97bfb 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -24,7 +24,7 @@ private _actions = []; { private _unit = _x; - if (_unit != _player && {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "simulation") != "UAVPilot"}) then { + if (_unit != _player && {getText (configOf _unit >> "simulation") != "UAVPilot"}) then { private _icon = [ "", "A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa", diff --git a/addons/interaction/functions/fnc_canPassMagazine.sqf b/addons/interaction/functions/fnc_canPassMagazine.sqf index 5cc1ed96e2..a76e7fb409 100644 --- a/addons/interaction/functions/fnc_canPassMagazine.sqf +++ b/addons/interaction/functions/fnc_canPassMagazine.sqf @@ -26,5 +26,5 @@ private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; (magazinesAmmoFull _player) findIf { _x params ["_className", "", "_loaded"]; - (_className in _compatibleMags) && {!_loaded} && {_target canAdd _className} + (_className in _compatibleMags) && {!_loaded} && {[_target, _className] call CBA_fnc_canAddItem} } > -1 diff --git a/addons/interaction/functions/fnc_canPullOutBody.sqf b/addons/interaction/functions/fnc_canPullOutBody.sqf index bb61cb2545..7b7d93418c 100644 --- a/addons/interaction/functions/fnc_canPullOutBody.sqf +++ b/addons/interaction/functions/fnc_canPullOutBody.sqf @@ -34,7 +34,7 @@ if ( ((fullCrew [_vehicle, ""] select {_body == _x select 0}) select 0) params ["", "", "_cargoIndex", "_turretPath"]; -private _locked = if (!(_turretPath isEqualTo [])) then { +private _locked = if (_turretPath isNotEqualTo []) then { _vehicle lockedTurret _turretPath; } else { if (_cargoIndex > -1) then { diff --git a/addons/interaction/functions/fnc_canPush.sqf b/addons/interaction/functions/fnc_canPush.sqf index 0032296a50..c8f82b65a5 100644 --- a/addons/interaction/functions/fnc_canPush.sqf +++ b/addons/interaction/functions/fnc_canPush.sqf @@ -18,5 +18,5 @@ params ["_target"]; alive _target && -{getMass _target <= 2600 || getNumber (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(canPush)) == 1} && +{getMass _target <= 2600 || getNumber (configOf _target >> QGVAR(canPush)) == 1} && {vectorMagnitude velocity _target < 3} diff --git a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf index 17f77922b9..a3ec0b46ee 100644 --- a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf +++ b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf @@ -22,7 +22,7 @@ TRACE_2("params",_target,_cameraPosASL); private _bb = boundingBoxReal _target; (_bb select 0) params ["_bbX", "_bbY", "_bbZ"]; -private _config = configFile >> "CfgVehicles" >> (typeOf _target); +private _config = configOf _target; if (isNumber (_config >> QGVAR(bodyWidth))) then {_bbX = getNumber (_config >> QGVAR(bodyWidth));}; if (isNumber (_config >> QGVAR(bodyLength))) then {_bbY = getNumber (_config >> QGVAR(bodyLength));}; diff --git a/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf b/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf new file mode 100644 index 0000000000..cd0e8f9730 --- /dev/null +++ b/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf @@ -0,0 +1,68 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Dystopian + * Returns children actions for weapon attachment switching. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Actions + * + * Example: + * player call ace_interaction_fnc_getWeaponAttachmentsActions + * + * Public: No + */ + +params ["_unit"]; + +[_unit, { + params ["_unit"]; + + private _currentWeapon = currentWeapon _unit; + if (_currentWeapon isEqualTo "") exitWith {[]}; + private _weaponItems = _unit weaponAccessories _currentWeapon; + private _cfgWeapons = configFile >> "CfgWeapons"; + private _actions = []; + + // "attach" actions + private _items = _unit call EFUNC(common,uniqueItems); + private _compatibleItems = _currentWeapon call CBA_fnc_compatibleItems; + { + private _config = _cfgWeapons >> _x; + private _name = format [LLSTRING(weaponAttachmentsAttach), getText (_config >> "displayName")]; + private _picture = getText (_config >> "picture"); + private _type = getNumber (_config >> "itemInfo" >> "type"); + private _oldAttachment = _weaponItems select ([TYPE_MUZZLE, TYPE_FLASHLIGHT, TYPE_OPTICS, TYPE_BIPOD] find _type); + + private _action = [ + _x, _name, _picture, + LINKFUNC(switchWeaponAttachment), + {true}, + {}, + [_currentWeapon, _x, _oldAttachment] + ] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _unit]; + } forEach ((_items arrayIntersect _compatibleItems) - _weaponItems); + + // "detach" actions + { + if (_x isEqualTo "") then {continue}; + + private _config = _cfgWeapons >> _x; + private _name = format [LLSTRING(weaponAttachmentsDetach), getText (_config >> "displayName")]; + private _picture = getText (_config >> "picture"); + + private _action = [ + _x, _name, _picture, + LINKFUNC(switchWeaponAttachment), + {true}, + {}, + [_currentWeapon, "", _x] + ] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _unit]; + } forEach _weaponItems; + + _actions +}, _unit, QGVAR(weaponAttachmentsActions), 5, QGVAR(clearWeaponAttachmentsActionsCache)] call EFUNC(common,cachedCall); diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 73cf4e0a37..cffb9e2410 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -23,7 +23,7 @@ TRACE_2("openDoor",_house,_door); if (isNull _house) exitWith {}; -if ((configProperties [configFile >> "CfgVehicles" >> (typeOf _house) >> "UserActions"]) isEqualTo []) exitWith { +if ((configProperties [configOf _house >> "UserActions"]) isEqualTo []) exitWith { TRACE_1("Ignore houses with no UserActions",typeOf _house); // Fix problem with Shoothouse Walls }; @@ -38,8 +38,8 @@ private _lockedVariable = format ["bis_disabled_%1", _door]; // Check if the door can be locked aka have locked variable, otherwhise cant lock it if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable, 0] == 1}) exitWith { private _lockedAnimation = format ["%1_locked_source", _door]; - TRACE_3("locked",_house,_lockedAnimation,isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)); - if (isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)) then { + TRACE_3("locked",_house,_lockedAnimation,isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)); + if (isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)) then { // from: a3\structures_f\scripts\fn_door.sqf: - wiggles the door handle (A3 buildings) _house animateSource [_lockedAnimation, (1 - (_house animationSourcePhase _lockedAnimation))]; }; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 07db3dba3c..f6438211fa 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -21,7 +21,7 @@ params ["_player", "_target", "_weapon"]; private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; private _filteredMags = magazinesAmmoFull _player select { _x params ["_className", "", "_loaded"]; - (_className in _compatibleMags) && {!_loaded} && {_target canAdd _className} + (_className in _compatibleMags) && {!_loaded} && {[_target, _className] call CBA_fnc_canAddItem} }; //select magazine with most ammo diff --git a/addons/interaction/functions/fnc_pullOutBody.sqf b/addons/interaction/functions/fnc_pullOutBody.sqf index 6f754eae67..0ab901c916 100644 --- a/addons/interaction/functions/fnc_pullOutBody.sqf +++ b/addons/interaction/functions/fnc_pullOutBody.sqf @@ -37,7 +37,7 @@ TRACE_3("",_cargoIndex,_cargoNumber,_turretPath); private _preserveEngineOn = false; // first get in to target seat -if (!(_turretPath isEqualTo [])) then { +if (_turretPath isNotEqualTo []) then { _unit action ["GetInTurret", _vehicle, _turretPath]; } else { if (_cargoIndex > -1) then { diff --git a/addons/interaction/functions/fnc_switchWeaponAttachment.sqf b/addons/interaction/functions/fnc_switchWeaponAttachment.sqf new file mode 100644 index 0000000000..4f9a9f2514 --- /dev/null +++ b/addons/interaction/functions/fnc_switchWeaponAttachment.sqf @@ -0,0 +1,59 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Dystopian + * Switches weapon attachment. + * + * Arguments: + * 0: Target + * 1: Player (not used) + * 2: Action params + * + * Return Value: + * None + * + * Example: + * [player, player, [currentWeapon player, "acc_flashlight", ""]] call ace_interaction_fnc_switchWeaponAttachment + * + * Public: No + */ + +params ["_unit", "", "_actionParams"]; +_actionParams params ["_weapon", "_newAttachment", "_oldAttachment"]; +TRACE_3("Switching attachment",_weapon,_newAttachment,_oldAttachment); + +[_unit, "Gear"] call EFUNC(common,doGesture); + +private _addNew = _newAttachment isNotEqualTo ""; +private _removeOld = _oldAttachment isNotEqualTo ""; + +if (_addNew) then { + _unit removeItem _newAttachment; +}; + +if (_removeOld && {!([_unit, _oldAttachment] call CBA_fnc_canAddItem)}) exitWith { + LOG("no space"); + [LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured); + if (_addNew) then { + _unit addItem _newAttachment; + }; +}; + +if (_removeOld) then { + [{ + params ["_unit", "_weapon", "_oldAttachment"]; + switch (_weapon) do { + case (primaryWeapon _unit): {_unit removePrimaryWeaponItem _oldAttachment;}; + case (handgunWeapon _unit): {_unit removeHandgunItem _oldAttachment;}; + default {_unit removeSecondaryWeaponItem _oldAttachment;}; + }; + _unit addItem _oldAttachment; + }, [_unit, _weapon, _oldAttachment], 0.3] call CBA_fnc_waitAndExecute; +}; + +if (!_addNew) exitWith {}; + +[{ + params ["_unit", "_weapon", "_newAttachment"]; + _unit addWeaponItem [_weapon, _newAttachment]; + [[getText (configFile >> "CfgWeapons" >> _newAttachment >> "picture"), 4], true] call CBA_fnc_notify; +}, [_unit, _weapon, _newAttachment], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/interaction/initSettings.sqf b/addons/interaction/initSettings.sqf new file mode 100644 index 0000000000..0500cd5c43 --- /dev/null +++ b/addons/interaction/initSettings.sqf @@ -0,0 +1,31 @@ +[ + QGVAR(enableTeamManagement), "CHECKBOX", + [LSTRING(EnableTeamManagement_DisplayName), LSTRING(EnableTeamManagement_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + true, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableMagazinePassing), "CHECKBOX", + LSTRING(PassMagazineSetting), + format ["ACE %1", LLSTRING(DisplayName)], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(disableNegativeRating), "CHECKBOX", + [LSTRING(DisableNegativeRating_DisplayName), LSTRING(DisableNegativeRating_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true, + {[QGVAR(disableNegativeRating), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableWeaponAttachments), "CHECKBOX", + ["str_a3_cfgeditorcategories_edcat_weaponattachments0", LSTRING(weaponAttachments_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + true +] call CBA_fnc_addSetting; diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 06c18cbaf0..fae143bde2 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -1203,5 +1203,20 @@ Romper parabrisas Ön camı parçala + + Attach %1 + Установить %1 + %1 を取り付け + + + Detach %1 + Снять %1 + %1 を外す + + + Enables attach/detach weapon attachment actions for current weapon. + Включает действия Установить/Снять для приспособлений текущего оружия. + インタラクションから使用中の武器に対してのアタッチメント取り外しを可能にします。 + diff --git a/addons/javelin/functions/fnc_getTarget.sqf b/addons/javelin/functions/fnc_getTarget.sqf index 7230aae64a..e51790e212 100644 --- a/addons/javelin/functions/fnc_getTarget.sqf +++ b/addons/javelin/functions/fnc_getTarget.sqf @@ -38,7 +38,7 @@ if (!isNull _lastTarget) then { private _testPosASL = AGLtoASL (_lastTarget modelToWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]); private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1]; // drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,1,1], [1,0,1,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"]; - if (!(_intersectionsToCursorTarget isEqualTo [])) then { + if (_intersectionsToCursorTarget isNotEqualTo []) then { (_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"]; if (_intersectedObject isKindOf "AllVehicles") then { _intersectedObject breakOut "main"; @@ -68,7 +68,7 @@ for "_xOffset" from -14 to 14 step 2 do { private _testPosASL = AGLtoASL (positionCameraToWorld [_xOffset, _yOffset, _maxRange]); private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1]; // drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,0,1], [1,0,0,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"]; - if (!(_intersectionsToCursorTarget isEqualTo [])) then { + if (_intersectionsToCursorTarget isNotEqualTo []) then { (_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"]; if (_intersectedObject isKindOf "AllVehicles") then { _intersectedObject breakOut "main"; diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml index 77b6d4a623..4200722da0 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -12,7 +12,7 @@ Aggangia il bersaglio Fijar objetivo (Mantener) Travar Alvo(Segurar) - 目標を捕捉 (押しっぱ) + 目標を捕捉 (長押し) 표적 획득 (누르기) 锁定目标 (按住) 鎖定目標 (按住) diff --git a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf index c619024ed4..3a797d28c8 100644 --- a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf +++ b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf @@ -42,7 +42,7 @@ TRACE_1("params",_this); if ((alive ACE_player) && {_vehicle != ACE_player}) then { private _turretPath = if (ACE_player == (driver _vehicle)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; TRACE_1("",_turretPath); - if (!(_turretPath isEqualTo [])) then { + if (_turretPath isNotEqualTo []) then { private _currentWeapon = _vehicle currentWeaponTurret _turretPath; TRACE_1("",_currentWeapon); if ((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 1) then { diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index 1fff8d5718..03c3afd69a 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -36,7 +36,7 @@ if (_intersects isEqualTo []) then { }; }; -if (!(_intersects isEqualTo [])) then { +if (_intersects isNotEqualTo []) then { (_intersects select 0) params ["_intersectPosASL", "", "_intersectObject"]; // Move back slightly to prevents issues with it going below terrain _distance = (_posASL vectorDistance _intersectPosASL) - 0.005; diff --git a/addons/logistics_wirecutter/CfgEventHandlers.hpp b/addons/logistics_wirecutter/CfgEventHandlers.hpp index 36c0fca8a3..0d3301d6e0 100644 --- a/addons/logistics_wirecutter/CfgEventHandlers.hpp +++ b/addons/logistics_wirecutter/CfgEventHandlers.hpp @@ -12,6 +12,6 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; diff --git a/addons/logistics_wirecutter/CfgVehicles.hpp b/addons/logistics_wirecutter/CfgVehicles.hpp index 7dd57f207f..ab27440384 100644 --- a/addons/logistics_wirecutter/CfgVehicles.hpp +++ b/addons/logistics_wirecutter/CfgVehicles.hpp @@ -80,4 +80,19 @@ class CfgVehicles { class Land_BackAlley_01_l_1m_F: Wall_F { GVAR(isFence) = 1; }; + class Land_GameProofFence_01_l_5m_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_3m_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_3m_corner_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_3m_hole_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_9m_F: Wall_F { + GVAR(isFence) = 1; + }; }; diff --git a/addons/logistics_wirecutter/XEH_PREP.hpp b/addons/logistics_wirecutter/XEH_PREP.hpp index 6ab95824ff..09cbc1c05d 100644 --- a/addons/logistics_wirecutter/XEH_PREP.hpp +++ b/addons/logistics_wirecutter/XEH_PREP.hpp @@ -1,3 +1,4 @@ PREP(cutDownFence); +PREP(destroyFence); PREP(interactEH); PREP(isFence); diff --git a/addons/logistics_wirecutter/XEH_clientInit.sqf b/addons/logistics_wirecutter/XEH_clientInit.sqf deleted file mode 100644 index 45e93bc6bd..0000000000 --- a/addons/logistics_wirecutter/XEH_clientInit.sqf +++ /dev/null @@ -1,5 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -["ace_interactMenuOpened", {_this call FUNC(interactEH)}] call CBA_fnc_addEventHandler; diff --git a/addons/logistics_wirecutter/XEH_postInit.sqf b/addons/logistics_wirecutter/XEH_postInit.sqf new file mode 100644 index 0000000000..a22479e7e1 --- /dev/null +++ b/addons/logistics_wirecutter/XEH_postInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +if (hasInterface) then { + ["ace_interactMenuOpened", {_this call FUNC(interactEH)}] call CBA_fnc_addEventHandler; +}; + +if (isServer) then { + [QGVAR(destroyFence), {_this call FUNC(destroyFence)}] call CBA_fnc_addEventHandler; +}; diff --git a/addons/logistics_wirecutter/XEH_preInit.sqf b/addons/logistics_wirecutter/XEH_preInit.sqf index b47cf6628d..cd05369d60 100644 --- a/addons/logistics_wirecutter/XEH_preInit.sqf +++ b/addons/logistics_wirecutter/XEH_preInit.sqf @@ -6,4 +6,28 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +if (isServer) then { + GVAR(replacements) = createHashMapFromArray [ + ["gameprooffence_01_l_5m_f.p3d", [["Land_GameProofFence_01_l_d_F", [0, 0, 0], 0]]], + ["indfnc_3_f.p3d", [["Land_IndFnc_3_D_F", [0.039, -0.221, 0], 0]]], + ["indfnc_3_hole_f.p3d", [["Land_IndFnc_3_D_F", [0.042, -0.252, 0], 0]]], + ["indfnc_9_f.p3d", [["Land_IndFnc_3_F", [-3, -0.06, 0], 0], ["Land_IndFnc_3_D_F", [0.039, -0.281, 0], 0], ["Land_IndFnc_3_F", [3, -0.06, 0], 0]]], + ["indfnc_corner_f.p3d", [["Land_IndFnc_3_D_F", [0.116, -0.223, 0], 0]]], + ["mil_wiredfence_f.p3d", [["Land_Mil_WiredFenceD_F", [0, 0, 0], 0]]], + ["net_fence_8m_f.p3d", [["Land_Net_FenceD_8m_F", [0, 0.1, 0], 0]]], + ["netfence_01_m_4m_f.p3d", [["Land_NetFence_01_m_d_F", [0, 0, 0], 0]]], + ["netfence_01_m_8m_f.p3d", [["Land_NetFence_01_m_4m_F", [-2, 0, 0], 0], ["Land_NetFence_01_m_d_F", [2, 0, 0], 0]]], + ["netfence_03_m_3m_corner_f.p3d", [["Land_NetFence_03_m_3m_d_F", [0.104, -0.183, 0], 0]]], + ["netfence_03_m_3m_f.p3d", [["Land_NetFence_03_m_3m_d_F", [0.042, -0.236, 0], 0]]], + ["netfence_03_m_3m_hole_f.p3d", [["Land_NetFence_03_m_3m_d_F", [0.045, -0.273, 0], 0]]], + ["netfence_03_m_9m_f.p3d", [["Land_NetFence_03_m_3m_F", [-3.006, -0.073, 0], 0], ["Land_NetFence_03_m_3m_d_F", [0.038, -0.309, 0], 0], ["Land_NetFence_03_m_3m_F", [2.995, -0.073, 0], 0]]], + ["plasticnetfence_01_long_f.p3d", [["Land_PlasticNetFence_01_long_d_F", [0, 0, -0.1], 0]]], + ["wired_fence_4m_f.p3d", [["Land_Wired_Fence_4mD_F", [0, 0, 0], 0]]], + ["wired_fence_8m_f.p3d", [["Land_Wired_Fence_4m_F", [-2, 0, 0], 0], ["Land_Wired_Fence_4mD_F", [3, 0, 0], 0]]], + ["wiredfence_01_16m_f.p3d", [["Land_WiredFence_01_4m_F", [-6, 0, 0], 0], ["Land_WiredFence_01_8m_d_F", [0.34, -0.1, 0], 0]]], + ["wiredfence_01_4m_f.p3d", [["Land_WiredFence_01_pole_F", [-2, 0, 0], 150]]], + ["wiredfence_01_8m_f.p3d", [["Land_WiredFence_01_4m_F", [-2, 0, 0], 0], ["Land_WiredFence_01_pole_F", [0, 0, 0], 0]]] + ]; +}; + ADDON = true; diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index 79da93cf79..170c628d18 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -35,7 +35,7 @@ if !(_unit call EFUNC(common,isSwimming)) then { TRACE_1("Fence cutting successful",_this); (_this select 0) params ["_unit", "_fence"]; - _fence setDamage 1; + [QGVAR(destroyFence), [_fence]] call CBA_fnc_serverEvent; if !(_unit call EFUNC(common,isSwimming)) then { [_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); }; diff --git a/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf b/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf new file mode 100644 index 0000000000..9098acb743 --- /dev/null +++ b/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf @@ -0,0 +1,42 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Destroys the given fence and replaces it with a destroyed fence if possible. + * + * Arguments: + * 0: Fence + * + * Return Value: + * None + * + * Example: + * [fence] call ace_logistics_wirecutter_fnc_destroyFence + * + * Public: No + */ + +params ["_fence"]; + +private _fenceModel = toLower ((getModelInfo _fence)#0); + +// If fence cannot be replaced with destroyed model, just knock it over +if !(_fenceModel in GVAR(replacements)) exitWith { + _fence setDamage 1; +}; + +// Remove old fence +if ([_fence] call CBA_fnc_isTerrainObject) then { + _fence setDamage 1; + _fence hideObjectGlobal true; +} else { + deleteVehicle _fence; +}; + +// Create replacement(s) +{ + _x params ["_type", "_position", "_dir"]; + + private _replacement = _type createVehicle [0, 0, 0]; + _replacement setPosWorld (_fence modelToWorldWorld _position); + _replacement setDir (direction _fence + _dir); +} forEach (GVAR(replacements) get _fenceModel); diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index be397a8519..38ed1dd077 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -70,6 +70,7 @@ "gm_gc_g501_sm70_02.p3d",\ "gm_gc_g501_sm70_03.p3d",\ "netfence_03_m_3m_f.p3d",\ + "netfence_03_m_3m_hole_f.p3d",\ "netfence_03_m_3m_corner_f.p3d",\ "netfence_03_m_9m_f.p3d",\ "vineyardfence_01_f.p3d",\ diff --git a/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf b/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf index 034de578be..f448b91b64 100644 --- a/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf @@ -25,5 +25,5 @@ private _maxAmmoCount = getNumber (configFile >> "CfgMagazines" >> _magazine >> _magazineType == _magazine // Magazine is of given type && {_ammoCount > 0 && {_ammoCount < _maxAmmoCount}} // Is a partial magazine - && {!_isLoaded || {_unit canAdd _magazineType}} // In inventory or can be moved into it + && {!_isLoaded || {[_unit, _magazineType] call CBA_fnc_canAddItem}} // In inventory or can be moved into it } count magazinesAmmoFull _unit > 1 diff --git a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf index b1cdef9829..3c87b434a7 100644 --- a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf +++ b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf @@ -27,7 +27,7 @@ private _unitMagCounts = []; private _xFullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _xClassname >> "count"); //for every partial magazine, that is either in inventory or can be moved there - if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then { + if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {[_player, _xClassname] call CBA_fnc_canAddItem}}) then { private _index = _unitMagazines find _xClassname; if (_index == -1) then { _unitMagazines pushBack _xClassname; diff --git a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index cd9df9b2a9..b776d4bcdb 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -39,7 +39,7 @@ private _startingAmmoCounts = []; if (_xClassname == _magazineClassname && {_xCount != _fullMagazineCount && {_xCount > 0}}) then { if (_xLoaded) then { //Try to Remove from weapon and add to inventory, otherwise ignore - if (_player canAdd _magazineClassname) then { + if ([_player, _magazineClassname] call CBA_fnc_canAddItem) then { switch (_xType) do { case (1): {_player removePrimaryWeaponItem _magazineClassname}; case (2): {_player removeHandgunItem _magazineClassname}; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index d3a54e131e..b8e9bcf69c 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,8 +10,8 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 2.00 -#define REQUIRED_CBA_VERSION {3,15,0} +#define REQUIRED_VERSION 2.02 +#define REQUIRED_CBA_VERSION {3,15,2} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 3da69a1216..181978551a 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -5,11 +5,9 @@ class CfgVehicles { class ACE_MapFlashlight { displayName = CSTRING(Action_Flashlights); icon = QUOTE(\a3\ui_f\data\IGUI\Cfg\VehicleToggles\lightsiconon_ca.paa); - condition = QUOTE(GVAR(mapIllumination) && visibleMap && {!([] isEqualTo (_player call FUNC(getUnitFlashlights)))}); - statement = "true"; + condition = QUOTE(GVAR(mapIllumination) && visibleMap); exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; - insertChildren = QUOTE(_this call DFUNC(compileFlashlightMenu)); - showDisabled = 0; + insertChildren = QUOTE(call DFUNC(compileFlashlightMenu)); }; }; }; diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index a30da81a40..3ff3567cef 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -47,7 +47,7 @@ GVAR(flashlights) = [] call CBA_fnc_createNamespace; private _unitLight = _player getVariable [QGVAR(flashlight), ["", objNull]]; _unitLight params ["_flashlight", "_glow"]; if (_mapOn) then { - if (!(_flashlight isEqualTo "") && {isNull _glow}) then { + if (_flashlight isNotEqualTo "" && {isNull _glow}) then { [_player, _flashlight] call FUNC(flashlightGlow); if ([_player, _flashlight] call FUNC(needPlaySound)) then {playSound QGVAR(flashlightClick)}; }; @@ -86,7 +86,7 @@ GVAR(vehicleLightColor) = [1,1,1,0]; ["vehicle", { params ["_unit", "_vehicle"]; if ((isNull _vehicle) || {_unit == _vehicle}) exitWith {}; - private _cfg = configfile >> "CfgVehicles" >> (typeOf _vehicle); + private _cfg = configOf _vehicle; GVAR(vehicleExteriorTurrets) = getArray (_cfg >> QGVAR(vehicleExteriorTurrets)); GVAR(vehicleLightColor) = [_cfg >> QGVAR(vehicleLightColor), "array", [1,1,1,0]] call CBA_fnc_getConfigEntry; diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index d6a0f09a08..f1844e95e5 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -48,7 +48,7 @@ private _vehicle = vehicle _unit; // Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination) if ((_vehicle != _unit) && {(!isTurnedOut _unit)} && GVAR(vehicleLightCondition) && {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))}) exitWith { TRACE_1("Player in a enclosed vehicle",GVAR(vehicleLightColor)); - [!(GVAR(vehicleLightColor) isEqualTo [1,1,1,0]), GVAR(vehicleLightColor)] + [GVAR(vehicleLightColor) isNotEqualTo [1,1,1,0], GVAR(vehicleLightColor)] }; // Player is not in a vehicle @@ -64,7 +64,7 @@ TRACE_1("Player is on foot or in an open vehicle",""); // Using chemlights private _nearObjects = (_unit nearObjects ["Chemlight_base", 4]) select {alive _x}; -if !(_nearObjects isEqualTo []) then { +if (_nearObjects isNotEqualTo []) then { private _nearestlight = _nearObjects select 0; private _lightLevelTemp = (1 - ((((_unit distance _nearestlight) - 2) / 2) max 0)) * 0.4; if (_lightLevelTemp > _lightLevel) then { diff --git a/addons/map/functions/fnc_flashlightGlow.sqf b/addons/map/functions/fnc_flashlightGlow.sqf index 32615d014b..9457865bc2 100644 --- a/addons/map/functions/fnc_flashlightGlow.sqf +++ b/addons/map/functions/fnc_flashlightGlow.sqf @@ -27,7 +27,7 @@ if (!isNull _glow) then { deleteVehicle _glow; }; -if !(_flashlightType isEqualTo "") then { +if (_flashlightType isNotEqualTo "") then { private _color = getText (configFile >> "CfgWeapons" >> _flashlightType >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour"); if !(_color in ["white", "red", "green", "blue", "yellow", "orange"]) then {_color = "white"}; private _class = format ["ACE_FlashlightProxy_%1", _color]; diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index a2ec5bfe78..334ecb4d5c 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -137,7 +137,7 @@ _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopRight,24,24,getDir player,'1,1 _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopLeft,24,24,getDir player,'-1,1',1,0.03,'TahomaB','right']; _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomLeft,24,24,getDir player,'-1,-1',1,0.03,'TahomaB','right']; _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomRight,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; -if !(GVAR(freeDrawingData) isEqualTo []) then { +if (GVAR(freeDrawingData) isNotEqualTo []) then { _theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 1,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; _theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 2,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; }; diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp index 3cf9dfc600..9d358e2f8a 100644 --- a/addons/markers/XEH_PREP.hpp +++ b/addons/markers/XEH_PREP.hpp @@ -17,3 +17,4 @@ PREP(movePFH); PREP(canTimestamp); PREP(onButtonClickConfirm); PREP(onCheckedChangedTimestamp); +PREP(removeTimestamp); diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 1560040bc9..2fc71c2a39 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\A3\ui_f\hpp\defineResincl.inc" /* * Author: BIS, commy2, Timi007 * Sets up the marker placement @@ -26,30 +25,28 @@ //Can't place markers when can't interact if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith { - _display closeDisplay 2; //emulate "Cancel" button + _display closeDisplay 2; //emulate "Cancel" button }; //BIS Controls: - private _text = _display displayctrl IDC_INSERT_MARKER; - private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; - private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; - private _buttonOK = _display displayctrl IDC_OK; - private _buttonCancel = _display displayctrl IDC_CANCEL; - private _description = _display displayctrl 1100; - private _title = _display displayctrl 1001; - private _descriptionChannel = _display displayctrl 1101; + private _text = _display displayctrl IDC_INSERT_MARKER; + private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; + private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; + private _buttonOK = _display displayctrl IDC_OK; + private _buttonCancel = _display displayctrl IDC_CANCEL; + private _description = _display displayctrl 1100; + private _title = _display displayctrl 1001; + private _descriptionChannel = _display displayctrl 1101; //ACE Controls: - // _sizeX = _display displayctrl 1200; - // _sizeY = _display displayctrl 1201; - private _aceTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; - private _aceTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; - private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; - private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; - private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; - private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + private _ctrlTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; + private _ctrlTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; + private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; + private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; + private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; + private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; - private _mapDisplay = displayParent _display; + private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; private _mapCtrl = _mapDisplay displayCtrl IDC_MAP; @@ -58,7 +55,7 @@ //check if entity under mouse is a user marker if (_mouseOverType isEqualTo "marker") then { - if (!((_marker find "_USER_DEFINED") isEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then { + if (((_marker find "_USER_DEFINED") isNotEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then { GVAR(editingMarker) = _marker; //hide marker which is being edited because if the user cancels editing, it will still exist unchanged GVAR(editingMarker) setMarkerAlphaLocal 0; @@ -74,7 +71,7 @@ //////////////////// // Calculate center position of the marker placement ctrl - if !(GVAR(editingMarker) isEqualTo "") then { + if (GVAR(editingMarker) isNotEqualTo "") then { //prevent changing the original marker position GVAR(currentMarkerPosition) = markerPos GVAR(editingMarker); } else { @@ -92,19 +89,11 @@ // prevent vanilla key input _display displayAddEventHandler ["KeyDown", {(_this select 1) in [200, 208]}]; - private _hasTimestamp = false; - if !((markerText GVAR(editingMarker)) isEqualTo "") then { + private _markerText = markerText GVAR(editingMarker); + if (_markerText != "") then { // fill text input with text from marker which is being edited - - private _originalText = markerText GVAR(editingMarker); - private _timeIndex = _originalText find (TIMESTAMP_SPACE + "["); - if (_timeIndex > 0 ) then { - // Shave off timestamp - _hasTimestamp = true; - _originalText = _originalText select [0,_timeIndex]; - }; - - _text ctrlSetText _originalText; + _markerText = _markerText call FUNC(removeTimestamp); + _text ctrlSetText _markerText; }; //Focus on the text input @@ -114,7 +103,7 @@ private _pos = ctrlposition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; - _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen + _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen _pos set [0, _posX]; _pos set [1, _posY]; _text ctrlSetPosition _pos; @@ -143,31 +132,33 @@ if (GVAR(timestampEnabled)) then { _timestampOffset = _posH + BORDER; - _pos set [0, _posX]; - _pos set [1, _posY + 1 * _posH + 2 * BORDER]; - _pos set [2, _posW - _posH]; - _pos set [3, _posH]; - _aceTimestampText ctrlSetStructuredText parseText format ["%1", LLSTRING(Timestamp)]; - _aceTimestampText ctrlSetPosition _pos; - _aceTimestampText ctrlCommit 0; + private _left = _posX; + private _top = _posY + 1 * _posH + 2 * BORDER; + private _width = _posH * safeZoneH / safeZoneW; + private _height = _posH; - _pos set [0, _posX + _posW - _posH]; - _pos set [2, _posH]; - _pos set [3, _posH]; - _aceTimestamp ctrlSetPosition _pos; - _aceTimestamp ctrlCommit 0; + _ctrlTimestamp ctrlSetPosition [_left, _top, _width, _height]; + _ctrlTimestamp ctrlCommit 0; + + _ctrlTimestampText ctrlSetStructuredText parseText format ["%1", LLSTRING(Timestamp)]; + + _left = _left + _width; + _width = _posW - _width; + _top = _top + 0.1 * _height; + _ctrlTimestampText ctrlSetPosition [_left, _top, _width, _height]; + _ctrlTimestampText ctrlCommit 0; if !([ACE_player] call FUNC(canTimestamp)) then { - _aceTimestamp ctrlEnable false; - _aceTimestamp ctrlSetTooltip LLSTRING(TimestampTooltipNoWatch); + _ctrlTimestamp ctrlEnable false; + _ctrlTimestamp ctrlSetTooltip LLSTRING(TimestampTooltipNoWatch); } else { - _aceTimestamp cbSetChecked (GETUVAR(GVAR(timestampChecked),false) || _hasTimestamp); + _ctrlTimestamp cbSetChecked (uiNamespace getVariable [QGVAR(timestampChecked), false]); }; } else { - _aceTimestampText ctrlEnable false; - _aceTimestampText ctrlShow false; - _aceTimestamp ctrlEnable false; - _aceTimestamp ctrlShow false; + _ctrlTimestampText ctrlEnable false; + _ctrlTimestampText ctrlShow false; + _ctrlTimestamp ctrlEnable false; + _ctrlTimestamp ctrlShow false; }; //--- Shape @@ -225,7 +216,7 @@ }; }; - private _selectChannel = if !(GVAR(editingMarker) isEqualTo "") then { + private _selectChannel = if (GVAR(editingMarker) isNotEqualTo "") then { //get the channel where the marker was placed in parseNumber ((GVAR(editingMarker) splitString "/") param [2, "3"]) } else { @@ -268,9 +259,8 @@ //////////////////// // init marker timestamp cb - - _buttonOK ctrlAddEventHandler ['ButtonClick', FUNC(onButtonClickConfirm)]; - _aceTimestamp ctrlAddEventHandler ['CheckedChanged', FUNC(onCheckedChangedTimestamp)]; + _buttonOK ctrlAddEventHandler ["ButtonClick", FUNC(onButtonClickConfirm)]; + _ctrlTimestamp ctrlAddEventHandler ["CheckedChanged", FUNC(onCheckedChangedTimestamp)]; //////////////////// // init marker shape lb @@ -320,7 +310,7 @@ // init marker angle slider _aceAngleSlider sliderSetRange [-180, 180]; - if !(GVAR(editingMarker) isEqualTo "") then { + if (GVAR(editingMarker) isNotEqualTo "") then { //get the original direction GVAR(currentMarkerAngle) = markerDir GVAR(editingMarker); }; diff --git a/addons/markers/functions/fnc_onButtonClickConfirm.sqf b/addons/markers/functions/fnc_onButtonClickConfirm.sqf index caa49a0e1c..12c6f37d06 100644 --- a/addons/markers/functions/fnc_onButtonClickConfirm.sqf +++ b/addons/markers/functions/fnc_onButtonClickConfirm.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* * Author: Freddo * When the confirm button is pressed. @@ -21,22 +20,34 @@ private _display = ctrlParent _buttonOk; private _description = _display displayctrl IDC_INSERT_MARKER; private _aceTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; -// Handle timestamp -if (cbChecked _aceTimestamp && {[ACE_player] call FUNC(canTimestamp)}) then { +// handle timestamp +if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { private _time = daytime; - private _ampm = switch (true) do { - case (GVAR(timestampHourFormat) == 24): {""}; - case (_time < 12): {" am"}; - case (_time > 12): {SUB(_time,12); " pm"}; + + // add timestamp suffix + private _periodPostfix = ""; + if (GVAR(timestampHourFormat) == 12) then { + if (floor _time == 0) exitWith { + _time = _time + 12; + _periodPostfix = " am"; + }; + + if (floor _time == 12) exitWith { + _periodPostfix = " pm"; + }; + + if (_time < 12) then { + _periodPostfix = " am"; + } else { + _time = _time - 12; + _periodPostfix = " pm"; + }; }; - _description ctrlSetText format [ // Add timestamp suffix - "%1%2[%2%3]", + _description ctrlSetText format [ + "%1 [%2%3]", ctrlText _description, - TIMESTAMP_SPACE, [_time, GVAR(timestampFormat)] call BIS_fnc_timeToString, - _ampm + _periodPostfix ]; }; - -nil diff --git a/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf b/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf index 23a3b8c73d..5980e875cd 100644 --- a/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf +++ b/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf @@ -1,8 +1,7 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* - * Author: Freddo - * When the timestamp checkbox is toggled + * Author: Freddo, commy2 + * When the timestamp checkbox is toggled. * * Arguments: * 0: Checkbox @@ -12,12 +11,10 @@ * None * * Example: - * [_cbTimestamp,1] call ACE_markers_fnc_onCheckedChangedTimestamp + * [controlNull, 1] call ACE_markers_fnc_onCheckedChangedTimestamp; * * Public: No */ -params ["_cbTimestamp", "_checked"]; +params ["", "_checked"]; -SETUVAR(GVAR(timestampChecked),(_checked == 1)); - -nil +uiNamespace setVariable [QGVAR(timestampChecked), _checked == 1] diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf index df45213b8e..ceb3cfe0b5 100644 --- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* * Author: commy2 * When the color list box is changed. diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf index 25e6b54468..5dfbbabd01 100644 --- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -#include "\a3\ui_f\hpp\defineResincl.inc" /* * Author: commy2 * When the shape list box is changed. diff --git a/addons/markers/functions/fnc_onMouseButtonDown.sqf b/addons/markers/functions/fnc_onMouseButtonDown.sqf index ce6f99ee00..df56154ad6 100644 --- a/addons/markers/functions/fnc_onMouseButtonDown.sqf +++ b/addons/markers/functions/fnc_onMouseButtonDown.sqf @@ -23,7 +23,7 @@ params ["_ctrlMap", "_button", "_x", "_y", "_shift", "_ctrl", "_alt"]; -if (_button != 0 || {!([_shift, _ctrl, _alt] isEqualTo [false, false, true])}) exitWith {}; +if (_button != 0 || {[_shift, _ctrl, _alt] isNotEqualTo [false, false, true]}) exitWith {}; ctrlMapMouseOver _ctrlMap params [["_type", ""], "_marker"]; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index a1b136aad5..61f18a30d8 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -19,7 +19,7 @@ params ["_display", "_closeNum"]; TRACE_2("params",_display,_closeNum); -private _editingMarker = !(GVAR(editingMarker) isEqualTo ""); +private _editingMarker = (GVAR(editingMarker) isNotEqualTo ""); if (_closeNum isEqualTo 1) then { if (_editingMarker) then { @@ -48,7 +48,7 @@ if (_closeNum isEqualTo 1) then { // provide hook for external scripts [QGVAR(markerPlaced),[_newestMarker, _editingMarker]] call CBA_fnc_localEvent; - + // Add to list of user placed markers, and then filter for deleted GVAR(userPlacedMarkers) pushBack _newestMarker; GVAR(userPlacedMarkers) = GVAR(userPlacedMarkers) select {!((getMarkerPos _x) isEqualTo [0,0,0])}; diff --git a/addons/markers/functions/fnc_removeTimestamp.sqf b/addons/markers/functions/fnc_removeTimestamp.sqf new file mode 100644 index 0000000000..9f9d6ab438 --- /dev/null +++ b/addons/markers/functions/fnc_removeTimestamp.sqf @@ -0,0 +1,70 @@ +#include "script_component.hpp" +/* + * Author: commy2 + * Removes timestamp from end of a string. + * + * Arguments: + * 0: Marker text string + * + * Return Value: + * Input with timestamp removed + * + * Example: + * "abc [12:00 am]" call ace_markers_fnc_removeTimestamp // "abc" + * "[13:37]" call ace_markers_fnc_removeTimestamp // "" + * "xyz [123]" call ace_markers_fnc_removeTimestamp // "xyz [123]" + * "xyz [12]" call ace_markers_fnc_removeTimestamp // "xyz" + * "xyz [12 pm]" call ace_markers_fnc_removeTimestamp // "xyz" + * + * Public: No + */ +#define DIGITS "0123456789" + +params ["_original"]; + +// @todo, 2.02 reverse command will support STRING types +private _string = toArray _original; +reverse _string; +_string = toString _string; + +if (_string select [0, 1] != "]") exitWith {_original}; + +private _timestampLength = (_string find "[") + 1; +_string = _string select [0, _timestampLength]; + +// @todo +_string = toArray _string; +reverse _string; +_string = toString _string; + +if (_string select [0, 1] != "[") exitWith {_original}; + +private _index = 1; +private _keepCheckingDigits = true; +private _validTimestamp = true; +while {_keepCheckingDigits} do { + if (!(_string select [_index, 1] in DIGITS)) exitWith { _validTimestamp = false; }; + if (!(_string select [_index+1, 1] in DIGITS)) exitWith { _validTimestamp = false; }; + switch (_string select [_index+2, 1]) do { + case (":"): { + _index = _index + 3; + }; + case ("]"): { + _keepCheckingDigits = false; + }; + case (" "): { + _keepCheckingDigits = false; + if (!(_string select [_index+3, 3] in ["am]", "pm]"])) then {_validTimestamp = false; }; + }; + default { + _keepCheckingDigits = false; + _validTimestamp = false; + }; + }; +}; + +if (_validTimestamp) then { + [_original select [0, count _original - _timestampLength], " "] call CBA_fnc_rightTrim // return +} else { + _original // return +} diff --git a/addons/markers/initSettings.sqf b/addons/markers/initSettings.sqf index 35d1cca4bb..ce8e8e0473 100644 --- a/addons/markers/initSettings.sqf +++ b/addons/markers/initSettings.sqf @@ -23,7 +23,7 @@ private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayNa ], 1 ] -] call cba_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(timestampEnabled), "CHECKBOX", @@ -37,14 +37,8 @@ private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayNa [LSTRING(TimestampHourFormat), LSTRING(TimestampHourFormatDescription)], [_categoryName, LLSTRING(Module_DisplayName)], [ - [ - 24, - 12 - ], - [ - LSTRING(TimestampHourFormat24), - LSTRING(TimestampHourFormat12) - ], + [24, 12], + [LSTRING(TimestampHourFormat24), LSTRING(TimestampHourFormat12)], 0 ] ] call CBA_fnc_addSetting; @@ -55,25 +49,15 @@ private _formatDescription = [ LLSTRING(TimestampFormatDescription2), LLSTRING(TimestampFormatDescription3), LLSTRING(TimestampFormatDescription4) -] joinString "\n"; +] joinString endl; [ QGVAR(timestampFormat), "LIST", [LSTRING(timestampFormat), _formatDescription], [_categoryName, LLSTRING(Module_DisplayName)], [ - [ - "HH", - "HH:MM", - "HH:MM:SS", - "HH:MM:SS:MM" - ], - [ - "HH", - "HH:MM", - "HH:MM:SS", - "HH:MM:SS:MM" - ], + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], 1 ] ] call CBA_fnc_addSetting; diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index a40e557135..ab0a10961b 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -15,6 +15,7 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" +#include "\a3\ui_f\hpp\defineResincl.inc" #define CHANNEL_NAMES [ \ localize "str_channel_global", \ @@ -24,19 +25,16 @@ localize "str_channel_vehicle" \ ] -// 129 just looks like a space -#define TIMESTAMP_SPACE (toString [129]) +#define MOVE_RESTRICTION_NOBODY -1 +#define MOVE_RESTRICTION_ALL 0 +#define MOVE_RESTRICTION_ADMINS 1 +#define MOVE_RESTRICTION_GROUP_LEADERS 2 +#define MOVE_RESTRICTION_GROUP_LEADERS_ADMINS 3 +#define MOVE_RESTRICTION_OWNER 4 -#define MOVE_RESTRICTION_NOBODY -1 -#define MOVE_RESTRICTION_ALL 0 -#define MOVE_RESTRICTION_ADMINS 1 -#define MOVE_RESTRICTION_GROUP_LEADERS 2 -#define MOVE_RESTRICTION_GROUP_LEADERS_ADMINS 3 -#define MOVE_RESTRICTION_OWNER 4 - -#define IDC_ACE_INSERT_MARKER_TIMESTAMP 1210 -#define IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT 1211 -#define IDC_ACE_INSERT_MARKER_SHAPE 1220 -#define IDC_ACE_INSERT_MARKER_COLOR 1221 -#define IDC_ACE_INSERT_MARKER_ANGLE 1230 -#define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 +#define IDC_ACE_INSERT_MARKER_TIMESTAMP 1210 +#define IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT 1211 +#define IDC_ACE_INSERT_MARKER_SHAPE 1220 +#define IDC_ACE_INSERT_MARKER_COLOR 1221 +#define IDC_ACE_INSERT_MARKER_ANGLE 1230 +#define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 3b0fed2a04..bf5fcb6d78 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -153,58 +153,72 @@ Allow Timestamps Permettre l'horodatage + タイムスタンプ許可 Whether to allow timestamps to be automatically applied to markers Active une interface permettant d'apposer un horodatage sur les marqueurs. + マーカーへ自動的にタイムスタンプを付与するかどうかを設定できます。 - Add Timestamp: - Ajouter l'horodatage + Timestamp + Horodatage + タイムスタンプ Watch Required Une montre est requise. + 時計の要求 Timestamp Format Horodatage - Format + タイムスタンプ形式 Changes the timestamp format Modifie le format de l'horodatage. + タイムスタンプの形式を変更します "HH" - Hour "HH" - Heures + "HH" - 時間 "MM" - Minute "MM" - Minutes + "MM" - 分 "SS" - Seconds "SS" - Secondes + "SS" - 秒 "MM" - Milliseconds "MS" - Millisecondes + "MM" - ミリ秒 Timestamp Hour Format Horodatage - Système horaire + タイムスタンプ時刻形式 24-Hour Clock Format 24 heures + 24 時間表記 12-Hour Clock Format 12 heures + 12 時間表記 Changes timestamp to use either 24-hour or 12-hour clock format Permet de choisir le système d'horodatage souhaité, au format 12 ou 24 heures. + タイムスタンプの時刻を 24 時間か 12 時間表記のどちらかに変更できます。 diff --git a/addons/medical/dev/reportSettings.sqf b/addons/medical/dev/reportSettings.sqf index 97350121a3..eb489fab6a 100644 --- a/addons/medical/dev/reportSettings.sqf +++ b/addons/medical/dev/reportSettings.sqf @@ -7,7 +7,7 @@ { private _currentValue = missionNamespace getVariable [_x, "$"]; private _defaultValue = (cba_settings_default getVariable [_x, []]) param [0, "#"]; - if !(_currentValue isEqualTo _defaultValue) then { + if (_currentValue isNotEqualTo _defaultValue) then { diag_log text format ["%1: [Current %2] [Default: %3]", _x, _currentValue, _defaultValue]; }; } forEach _medicalSettings; diff --git a/addons/medical/initSettings.sqf b/addons/medical/initSettings.sqf index 065314fcf9..3c54f47cee 100644 --- a/addons/medical/initSettings.sqf +++ b/addons/medical/initSettings.sqf @@ -7,7 +7,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fractures), @@ -18,7 +18,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fractureChance), @@ -27,7 +27,7 @@ LSTRING(Category), [0, 1, 0.8, 2, true], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(spontaneousWakeUpChance), @@ -36,7 +36,7 @@ LSTRING(Category), [0, 1, 0.05, 2, true], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(spontaneousWakeUpEpinephrineBoost), @@ -45,4 +45,4 @@ LSTRING(Category), [1, 30, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_ai/functions/fnc_wasRequested.sqf b/addons/medical_ai/functions/fnc_wasRequested.sqf index 479dc0c880..38efdd8121 100644 --- a/addons/medical_ai/functions/fnc_wasRequested.sqf +++ b/addons/medical_ai/functions/fnc_wasRequested.sqf @@ -16,4 +16,4 @@ */ private _healQueue = _this getVariable [QGVAR(healQueue), []]; -!(_healQueue isEqualTo []) +(_healQueue isNotEqualTo []) diff --git a/addons/medical_ai/initSettings.sqf b/addons/medical_ai/initSettings.sqf index 6fada00db5..7d583382d7 100644 --- a/addons/medical_ai/initSettings.sqf +++ b/addons/medical_ai/initSettings.sqf @@ -14,4 +14,4 @@ private _categoryArray = [ELSTRING(medical,Category), "STR_TEAM_SWITCH_AI"]; true, // isGlobal {[QGVAR(enabledFor), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_blood/initSettings.sqf b/addons/medical_blood/initSettings.sqf index c2c52f93b8..c4ad57d4d7 100644 --- a/addons/medical_blood/initSettings.sqf +++ b/addons/medical_blood/initSettings.sqf @@ -6,7 +6,7 @@ [[BLOOD_DISABLED, BLOOD_ONLY_PLAYERS, BLOOD_ENABLED], [ELSTRING(Common,Disabled), LSTRING(OnlyPlayers), ELSTRING(Common,Enabled)], 2], true, LINKFUNC(init) -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxBloodObjects), @@ -15,7 +15,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[50, 100, 200, 300, 400, 500, 1000, 2000, 3000, 4000, 5000], [/* settings function will auto create names */], 5], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(bloodLifetime), @@ -24,4 +24,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [1, 3600, 900], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_damage/functions/fnc_handleIncapacitation.sqf b/addons/medical_damage/functions/fnc_handleIncapacitation.sqf index bdfa3fe4de..4e87e749df 100644 --- a/addons/medical_damage/functions/fnc_handleIncapacitation.sqf +++ b/addons/medical_damage/functions/fnc_handleIncapacitation.sqf @@ -32,6 +32,6 @@ _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightA private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit); -if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < 0.1}}) then { +if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < EGVAR(medical,painUnconsciousChance)}}) then { [QEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent; }; diff --git a/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf b/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf index 8618a41b5d..af932581be 100644 --- a/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf @@ -38,7 +38,7 @@ private _classID = 0; private _causeLimping = GET_NUMBER(_entry >> "causeLimping",0) == 1; private _causeFracture = GET_NUMBER(_entry >> "causeFracture",0) == 1; - if !(_causes isEqualTo []) then { + if (_causes isNotEqualTo []) then { GVAR(woundClassNames) pushBack _className; GVAR(woundsData) pushBack [_classID, _selections, _bleeding, _pain, [_minDamage, _maxDamage], _causes, _className, _causeLimping, _causeFracture]; { diff --git a/addons/medical_damage/initSettings.sqf b/addons/medical_damage/initSettings.sqf index e508f74621..12806a46a2 100644 --- a/addons/medical_damage/initSettings.sqf +++ b/addons/medical_damage/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category)], [[0, 1, 2], [LSTRING(fatalDamageSource_vitalShotsOnly), LSTRING(fatalDamageSource_trauma), LSTRING(fatalDamageSource_both)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,playerDamageThreshold), @@ -14,7 +14,7 @@ ELSTRING(medical,Category), [0, 25, 1, 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,AIDamageThreshold), @@ -23,4 +23,13 @@ ELSTRING(medical,Category), [0, 25, 1, 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QEGVAR(medical,painUnconsciousChance), + "SLIDER", + [LSTRING(PainUnconsciousChance_DisplayName), LSTRING(PainUnconsciousChance_Description)], + ELSTRING(medical,Category), + [0, 1, 0.1, 2, true], + true +] call CBA_fnc_addSetting; diff --git a/addons/medical_damage/stringtable.xml b/addons/medical_damage/stringtable.xml index 1406ef4dbe..4c74c96db1 100644 --- a/addons/medical_damage/stringtable.xml +++ b/addons/medical_damage/stringtable.xml @@ -687,5 +687,15 @@ Ustawia próg obrażeń jakie może otrzymać jednostka przed utratą przytomności. (0 jako ustawienie domyślne misji) Bilinçsiz duruma geçmeden önce bir birimin alabileceği hasar miktarını ayarlar. (Görev varsayılanı için 0) + + Pain Unconscious Chance + Szansa na nieprzytomność przez ból + 気絶確立 + + + The probability of a person falling unconscious when their pain is above the tolerance threshold upon receiving damage. + Szansa że osoba straci przytomność gdy jej ból jest powyżej tolerowalnego progu podczas otrzymywania obrażeń. + ユニットがダメージを受けた時に痛みが許容しきい値を超えた場合、気絶をする確立を設定します。 + diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index 0467202b88..fec92ca620 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -15,7 +15,7 @@ reverse _allHitPoints; if (_allHitPoints param [0, ""] != "ACE_HDBracket") then { - private _config = [_unit] call CBA_fnc_getObjectConfig; + private _config = configOf _unit; if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)}; ERROR_1("Bad hitpoints for unit type ""%1""",typeOf _unit); @@ -53,7 +53,7 @@ ["Air", "Killed", { params ["_vehicle", "_killer"]; TRACE_3("air killed",_vehicle,typeOf _vehicle,velocity _vehicle); - if ((getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "destrType")) == "") exitWith {}; + if ((getText (configOf _vehicle >> "destrType")) == "") exitWith {}; if (unitIsUAV _vehicle) exitWith {}; private _lethality = linearConversion [0, 25, (vectorMagnitude velocity _vehicle), 0.5, 1]; diff --git a/addons/medical_engine/functions/fnc_getHitpointArmor.sqf b/addons/medical_engine/functions/fnc_getHitpointArmor.sqf index 1f6f3c0550..62954a1b56 100644 --- a/addons/medical_engine/functions/fnc_getHitpointArmor.sqf +++ b/addons/medical_engine/functions/fnc_getHitpointArmor.sqf @@ -21,7 +21,7 @@ params ["_unit", "_hitpoint"]; private _uniform = uniform _unit; // If unit is naked, use its underwear class instead if (_uniform isEqualTo "") then { - _uniform = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "nakedUniform"); + _uniform = getText (configOf _unit >> "nakedUniform"); }; private _gear = [ diff --git a/addons/medical_gui/initSettings.sqf b/addons/medical_gui/initSettings.sqf index e61dd647b2..c2a4831d8a 100644 --- a/addons/medical_gui/initSettings.sqf +++ b/addons/medical_gui/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[0, 1, 2], [LSTRING(Selections3D), LSTRING(Radial), ELSTRING(common,Disabled)], 0], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableSelfActions), @@ -14,7 +14,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableMedicalMenu), @@ -23,7 +23,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), ELSTRING(common,VehiclesOnly)], 1], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(openAfterTreatment), @@ -32,7 +32,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxDistance), @@ -41,7 +41,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 10, 3, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(interactionMenuShowTriage), @@ -50,4 +50,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(Medical_Treatment,Anyone), ELSTRING(Medical_Treatment,Medics)], 1], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_gui/stringtable.xml b/addons/medical_gui/stringtable.xml index 709b03fc25..7020c0fe99 100644 --- a/addons/medical_gui/stringtable.xml +++ b/addons/medical_gui/stringtable.xml @@ -192,10 +192,12 @@ Show Triage Level in Interaction Menu Couleur de triage dans le menu d'interaction + インタラクションにトリアージ レベル表示 Shows the patient's triage level by changing the color of the main and medical menu actions. Modifie la couleur du menu d'interactions et du sous-menu médical en fonction de la fiche de triage du patient. + メニューと医療メニューの色を変更し、患者のトリアージ レベルを表示します。 Medical diff --git a/addons/medical_statemachine/initSettings.sqf b/addons/medical_statemachine/initSettings.sqf index 75d93f19b2..c129223931 100644 --- a/addons/medical_statemachine/initSettings.sqf +++ b/addons/medical_statemachine/initSettings.sqf @@ -9,7 +9,7 @@ 0 ], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fatalInjuriesAI), @@ -22,7 +22,7 @@ 0 ], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(AIUnconsciousness), @@ -31,7 +31,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(cardiacArrestTime), @@ -40,7 +40,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [1, 3600, 300], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(cardiacArrestBleedoutEnabled), @@ -49,4 +49,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_statemachine/stringtable.xml b/addons/medical_statemachine/stringtable.xml index 31a91d1413..2518b25c96 100644 --- a/addons/medical_statemachine/stringtable.xml +++ b/addons/medical_statemachine/stringtable.xml @@ -13,6 +13,7 @@ Stavy Stany Devletler + Estados Player Fatal Injuries @@ -26,6 +27,7 @@ Oyuncu Ölümcül Yaralanmaları Tödliche Spielerverletzungen Смертельные травмы игрока + Heridas mortales del jugador Controls when players can receive fatal injuries. A fatal injury is caused by significant damage to the head or torso. @@ -39,6 +41,7 @@ Definiuje, kiedy gracze mogą otrzymać śmiertelne obrażenia. Śmiertelne obrażenia są spowodowane znacznym uszkodzeniem głowy lub torsu. Legt fest, wann Spieler tödliche Verletzungen erleiden können. Eine tödliche Verletzung wird bei erheblichem Schaden an Kopf oder Torso verursacht. Определяет, могут ли игроки получить смертельные травмы. Смертельная травма вызывается значительным повреждением головы или туловища. + Controla cuándo los jugadores pueden sufrir lesiones fatales. Una lesión fatal es causada por un daño significativo en la cabeza o el cuerpo. AI Fatal Injuries @@ -52,6 +55,7 @@ AI Ölümcül Yaralanmaları Tödliche KI-Verletzungen Смертельные травмы ИИ + Heridas mortales IA Controls when AI can receive fatal injuries. A fatal injury is caused by significant damage to the head or troso.\nWhen set to "Always", this effectively produces "AI Instant Death" behaviour as AI will immediately die from any fatal injury.\nNOTE: Any mode other than "Always" requires AI Unconsciousness to be enabled. @@ -65,6 +69,7 @@ Definiuje, kiedy AI może otrzymać śmiertelne obrażenia. Śmiertelne obrażenia są spowodowane znacznym uszkodzeniem głowy lub torsu.\n Ustawienie "Zawsze" powoduje "Natychmiastową śmierć AI", ponieważ AI natychmiast umiera z powodu śmiertelnych obrażeń.\n UWAGA: Każdy inny tryb niż "Zawsze" wymaga włączenia nieprzytomności AI. Legt fest, wann KI-Einheiten tödliche Verletzungen erleiden können. Eine tödliche Verletzung wird bei erheblichem Schaden an Kopf oder Körper verursacht.\nWenn "Immer" eingestellt ist, erzeugt diese Einstellung das "KI Sofort-Tod" Verhalten. KI-Einheiten sterben sofort durch jede tödliche Verletzung.\nBEACHTE: Eine andere Einstellung als "Immer" bedingt, dass "KI-Bewusstlosigkeit" verwendet wird. Определяет могут ли игроки получить смертельные травмы. Смертельная травма вызывается значительным повреждением головы или туловища.\nКогда установлено «Всегда», это вызывает поведение «Мгновенной смерти ИИ», так как ИИ немедленно умрет от любой смертельной травмы.\nПРИМЕЧАНИЕ: Любой режим, кроме «Всегда», требует включения функции «Потеря сознания». + Controla cuándo la IA puede sufrir lesiones fatales. Una lesión fatal es causada por un daño significativo en la cabeza o el cuerpo. \n Cuando se establece en "Siempre", esto produce efectivamente un comportamiento de "Muerte instantánea de IA", ya que la IA morirá inmediatamente por cualquier lesión fatal. \n NOTA: Cualquier modo que no sea "Siempre" requiere que la inconsciencia de la IA esté habilitada. AI Unconsciousness @@ -95,6 +100,7 @@ Kontrolliert, ob KI bewusstlos werden kann anstatt sofort zu sterben.\nDiese Einstellung funktioniert zusammen mit der Einstellung "Tödliche KI-Verletzungen". Denn wenn eine Einheit einen Herzstillstand erleiden soll, muss diese auch in der Lage sein, bewusstlos zu werden.\nDennoch sind diese beiden Einstellungen voneinander getrennt, da Einheiten auch durch kritische Vitalwerte bewusstlos werden können, die durch nicht tödliche Verletzungen aufgetreten sind.\nZusammengefasst bedeutet das, dass wenn KI-Einheiten einen Herzstillstand erleiden sollen, diese Einstellung aktiviert sein muss. Управляет тем, может ли ИИ потерять сознание, вместо того, чтобы немедленно умереть.\nЭтот параметр работает вместе с параметром «Смертельные раны ИИ», поскольку при остановке сердца требуется, чтобы юнит мог потерять сознание.\nОднако эти настройки разделены, потому что юниты могут потерять сознание из-за критических ранений жизненно важных органов, полученных в результате несмертельных травм.\nВ сущности, это означает, что для включения остановки сердца для ИИ этот параметр должен быть включен. Yapay zekanın hemen ölmek yerine bilinçsiz duruma geçip geçemeyeceğini kontrol eder. \ Bu ayar, "Yapay Zeka Ölümcül Yaralanmalar" ayarı ile birlikte çalışır, çünkü kalp durması, ünitenin bilinçsiz duruma geçebilmesini gerektirir. \ Özünde, bunun anlamı şudur: AI birimleri için kalp durmasını etkinleştirirseniz, bu ayar etkinleştirilmelidir. + Controla si la IA puede quedar inconsciente en lugar de morir de inmediato. \n Esta configuración funciona junto con la configuración de "Heridas mortales IA", ya que, sufrir un paro cardíaco requiere que la unidad pueda quedar inconsciente. \n Sin embargo, estas configuraciones están separadas porque las unidades pueden perder el conocimiento de los signos vitales críticos como resultado de lesiones no mortales. \n En esencia, esto significa que para habilitar el paro cardíaco en las unidades de IA, esta configuración debe estar habilitada. Cardiac Arrest Time @@ -108,6 +114,7 @@ Délka srdeční zástavy Czas Zatrzymania Akcji Serca Kalp Durma Süresi + Tiempo de paro cardíaco Controls how long it takes to die from cardiac arrest. @@ -121,6 +128,7 @@ Definiuje czas potrzebny na śmierć z powodu zatrzymania akcji serca. Bestimmt die Dauer bis zum Tod durch Herzstillstand. Ne kadar süre de kalbi durarak ölmesini belirleyin. + Controla cuanto tiempo dura el paro cardiaco antes de morir. In Cardiac Arrest @@ -134,16 +142,19 @@ V srdeční zástavě Zatrzymanie Akcji Serca Kalbi Durdu + En parada cardíaca Bleedout During Cardiac Arrest Ausbluten im Herzstillstand Saignement durant l'arrêt cardiaque + 心停止中の失血 Controls whether a person can die in cardiac arrest by blood loss before the cardiac arrest time runs out. Legt fest, ob man während des Herzstillstands durch Blutverlust sterben kann, auch wenn die Überlebenszeit im Herzstillstand noch nicht ausgelaufen ist. Définit si un joueur en arrêt cardiaque peut mourir par exsanguination, avant que la durée de l'arrêt cardiaque définie ci-dessus ne soit écoulée. + 心停止時間を超え死亡する前に、失血による心停止で死亡するかどうかを決定します。 diff --git a/addons/medical_status/XEH_preInit.sqf b/addons/medical_status/XEH_preInit.sqf index aab312470d..89386bf4fa 100644 --- a/addons/medical_status/XEH_preInit.sqf +++ b/addons/medical_status/XEH_preInit.sqf @@ -12,7 +12,7 @@ PREP_RECOMPILE_END; ["CAManBase", "init", { params ["_unit"]; - private _config = [_unit] call CBA_fnc_getObjectConfig; + private _config = configOf _unit; if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)}; @@ -25,4 +25,20 @@ PREP_RECOMPILE_END; addMissionEventHandler ["EntityKilled", {_this call FUNC(handleKilledMission)}]; +if (hasInterface) then { + //Add Inventory action to uncon units + ["CAManBase", "init", { + params ["_unit"]; + + private _id = _unit addAction ["", { + params ["_target", "_caller", "_actionId", "_arguments"]; + + _caller action ["Gear", _target]; + }, nil, 5.1, true, true, "gear", "_target getVariable ['ACE_isUnconscious',false] && {alive _target}", 3.5]; + + _unit setUserActionText [_id, localize "STR_ACTION_GEAR", ""]; + + }, nil, nil, true] call CBA_fnc_addClassEventHandler; +}; + ADDON = true; diff --git a/addons/medical_status/initSettings.sqf b/addons/medical_status/initSettings.sqf index 95231b0acc..743c55cc00 100644 --- a/addons/medical_status/initSettings.sqf +++ b/addons/medical_status/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 25, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,painCoefficient), @@ -14,7 +14,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 25, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,ivFlowRate), @@ -23,4 +23,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 25, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp index 1308f4bcea..d821fe5e16 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp @@ -150,6 +150,7 @@ class GVAR(actions) { medicRequired = QGVAR(medicIV); treatmentTime = QGVAR(treatmentTimeIV); items[] = {"ACE_bloodIV"}; + treatmentLocations = QGVAR(locationIV); condition = ""; callbackSuccess = QFUNC(ivBag); animationMedic = "AinvPknlMstpSnonWnonDnon_medic1"; diff --git a/addons/medical_treatment/functions/fnc_canStitch.sqf b/addons/medical_treatment/functions/fnc_canStitch.sqf index ea4318874d..a542de23f1 100644 --- a/addons/medical_treatment/functions/fnc_canStitch.sqf +++ b/addons/medical_treatment/functions/fnc_canStitch.sqf @@ -18,4 +18,4 @@ params ["", "_patient"]; -!(_patient call FUNC(getStitchableWounds) isEqualTo []) +(_patient call FUNC(getStitchableWounds) isNotEqualTo []) diff --git a/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf b/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf index fe144ea78a..d2789f5d38 100644 --- a/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf @@ -21,7 +21,7 @@ params ["_unit"]; private _fnc_check = { private _position = _unit modelToWorldVisual [0, 0, eyePos _unit select 2]; - CHECK_OBJECTS(ARR_5(lineIntersectsWith [_position, _position vectorAdd [0, 0, 10], _unit])) || {CHECK_OBJECTS(_unit nearObjects 7.5)} + CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position, _position vectorAdd [ARR_3(0, 0, 10)], _unit)]) || {CHECK_OBJECTS(_unit nearObjects 7.5)} }; [[], _fnc_check, _unit, QGVAR(inMedicalFacilityCache), IN_MEDICAL_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall); diff --git a/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf b/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf index 4b06ffdb55..dda930a4f4 100644 --- a/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf +++ b/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf @@ -17,4 +17,4 @@ params ["_vehicle"]; -_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") > 0] +_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configOf _vehicle >> "attendant") > 0] diff --git a/addons/medical_treatment/functions/fnc_loadUnit.sqf b/addons/medical_treatment/functions/fnc_loadUnit.sqf index 74e66d517b..8b556014e1 100644 --- a/addons/medical_treatment/functions/fnc_loadUnit.sqf +++ b/addons/medical_treatment/functions/fnc_loadUnit.sqf @@ -43,7 +43,7 @@ if (isNull _vehicle) exitWith { TRACE_1("no vehicle found",_vehicle); }; params ["_unit", "_vehicle"]; TRACE_2("success",_unit,_vehicle); private _patientName = [_unit, false, true] call EFUNC(common,getName); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[LSTRING(LoadedInto), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured); }, [_patient, _vehicle], 3, { params ["_unit", "_emptyPos"]; diff --git a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf index 1f9ef981dd..da2253ca18 100644 --- a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf @@ -41,7 +41,7 @@ if (_maxDosage > 0) then { }; } forEach _incompatibleMedication; -if !(_overdosedMedications isEqualTo []) then { +if (_overdosedMedications isNotEqualTo []) then { private _medicationConfig = (configFile >> "ace_medical_treatment" >> "Medication"); private _onOverDose = getText (_medicationConfig >> "onOverDose"); if (isClass (_medicationConfig >> _className)) then { diff --git a/addons/medical_treatment/functions/fnc_unloadUnit.sqf b/addons/medical_treatment/functions/fnc_unloadUnit.sqf index 6baeb005ca..07410493ad 100644 --- a/addons/medical_treatment/functions/fnc_unloadUnit.sqf +++ b/addons/medical_treatment/functions/fnc_unloadUnit.sqf @@ -36,7 +36,7 @@ if (_patient call EFUNC(common,isAwake)) exitWith { params ["_unit", "_vehicle"]; TRACE_2("success",_unit,_vehicle); private _patientName = [_unit, false, true] call EFUNC(common,getName); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[LSTRING(UnloadedFrom), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured); }, [_patient, vehicle _patient], 3, { params ["_unit", "_vehicle"]; diff --git a/addons/medical_treatment/initSettings.sqf b/addons/medical_treatment/initSettings.sqf index 54a83453e4..5352f7545f 100644 --- a/addons/medical_treatment/initSettings.sqf +++ b/addons/medical_treatment/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(advancedMedication), @@ -14,7 +14,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(advancedBandages), @@ -23,7 +23,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(AdvancedBandages_EnabledCanReopen)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(woundReopenChance), @@ -32,7 +32,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0, 5, 1, 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(clearTraumaAfterBandage), @@ -41,7 +41,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], false, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; // todo: should this setting differentiate between medical vehicles and facilities? [ @@ -51,7 +51,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], false, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowSharedEquipment), @@ -60,7 +60,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(AllowSharedEquipment_PriorityPatient), LSTRING(AllowSharedEquipment_PriorityMedic), ELSTRING(common,No)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(convertItems), @@ -69,7 +69,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [ELSTRING(common,Enabled), LSTRING(ConvertItems_RemoveOnly), ELSTRING(common,Disabled)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(treatmentTimeAutoinjector), @@ -78,7 +78,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 5, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(treatmentTimeTourniquet), @@ -87,7 +87,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 7, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(treatmentTimeSplint), @@ -96,7 +96,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 7, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(treatmentTimeBodyBag), @@ -105,7 +105,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 15, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(medicEpinephrine), @@ -114,7 +114,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(locationEpinephrine), @@ -123,7 +123,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(medicPAK), @@ -132,7 +132,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(locationPAK), @@ -141,7 +141,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 3], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumePAK), @@ -150,7 +150,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowSelfPAK), @@ -159,7 +159,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(timeCoefficientPAK), @@ -168,7 +168,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0, 5, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(medicSurgicalKit), @@ -177,7 +177,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(locationSurgicalKit), @@ -186,7 +186,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumeSurgicalKit), @@ -195,7 +195,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowSelfStitch), @@ -204,7 +204,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(woundStitchTime), @@ -213,7 +213,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 5, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(medicIV), @@ -222,7 +222,16 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(locationIV), + "LIST", + [LSTRING(LocationIV_DisplayName), LSTRING(LocationIV_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0], + 1 +] call CBA_fnc_addSetting; [ QGVAR(allowSelfIV), @@ -231,7 +240,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(treatmentTimeIV), @@ -240,7 +249,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 12, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(cprSuccessChance), @@ -249,7 +258,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0, 1, 0.4, 2, true], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(treatmentTimeCPR), @@ -258,7 +267,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0.1, 60, 15, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowBodyBagUnconscious), @@ -267,7 +276,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], false, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(holsterRequired), @@ -276,7 +285,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Disabled), LSTRING(HolsterRequired_Lowered), LSTRING(HolsterRequired_LoweredExam), LSTRING(HolsterRequired_Holstered), LSTRING(HolsterRequired_HolsteredExam)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowLitterCreation), @@ -285,7 +294,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Litter)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxLitterObjects), @@ -294,7 +303,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Litter)], [[50, 100, 200, 300, 400, 500, 1000, 2000, 3000, 4000, 5000], [/* settings function will auto create names */], 5], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(litterCleanupDelay), @@ -303,4 +312,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Litter)], [-1, 3600, 600, 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index 514a4795e6..70b361fd66 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -13,6 +13,7 @@ Léčba Leczenie Tedavi + Tratamiento Litter @@ -26,6 +27,7 @@ Śmieci Abfall Cöp + Basura Advanced Diagnose @@ -39,6 +41,7 @@ Pokročilá diagnóza Zaawansowana Diagnoza Gelişmiş Teşhis + Diagnóstico avanzado Enables the Check Pulse, Check Blood Pressure, and Check Response treatment actions instead of the generic Diagnose action.\nWhen disabled, the CPR action will only be shown when performing CPR is appropriate.\nThe actions this setting enables are needed to determine whether a person is unconscious or in cardiac arrest. @@ -52,6 +55,7 @@ Włącza opcje sprawdzania Pulsu, Ciśnienia Tętniczego Krwi i Reakcje Na Ból, zamiast bardziej ogólnej akcji Diagnozuj.\n Po wyłączeniu tej opcji akcja RKO będzie wyświetlana tylko wtedy, gdy jej wykonanie będzie odpowiednie.\n Opcja, która włącza to ustawienie jest potrzebna do ustalenia, czy osoba jest nieprzytomna lub ma zatrzymanie krążenia. Ermöglicht die 'Überprüfe Puls', 'Überprüfe Blutdruck' und 'Überprüfe Reaktionen' Behandlungsaktionen anstatt der einfachen 'Diagnose' Behandlungsaktion.\nWenn diese Einstellung nicht aktiviert ist, wird die "HLW"-Aktion nur angezeigt, wenn die Anwendung von HLW angemessen ist.\nDie Aktionen, die das Aktivieren dieser Einstellung ermöglicht, werden benötigt um zu bestimmen, ob eine Person bewusstlos ist oder einen Herzstillstand erleidet. Genel Teşhis eylemi yerine Nabzı Kontrol Et, Kan Basıncını Kontrol Et ve Yanıtı Kontrol Et tedavi eylemlerini etkinleştirir. \ Devre dışı bırakıldığında, CPR eylemi yalnızca CPR gerçekleştirilmesi uygun olduğunda gösterilecektir. + Habilita la comprobación del pulso, presión sanguinea y rsepuesta a las acciones del tratamiento en lugar de la acción de diagnóstico genérico. \n Cuando se deshabilita, la acción RCP solo se mostrará cuando realizar un RCP sea apropiado. \n Las acciones activadas de este ajuste son necesarias para determinar si una persona está inconsciente o en parada cardiaca. Advanced Medication @@ -90,6 +94,7 @@ Pokročilé obvazy Zaawansowane Bandaże Gelişmiş Bandajlar + Vendaje avanzado Enables treatment actions for different bandage types instead of the generic Bandage action.\nAdditionally, the reopening of bandaged wounds can also be enabled. @@ -103,6 +108,7 @@ Povoluje specifické obvazy s různými vlastnostmi namísto jednoho univerzálního obvazu. Umożliwia wybranie konkretnego rodzaju bandaża zamiast ogólnej akcji bandażowania. Genel Bandaj eylemi yerine farklı bandaj türleri için tedavi eylemlerini etkinleştirir. \ Ek olarak, bandajlı yaraların yeniden açılması da etkinleştirilebilir. + Habilita las acciones de ttratamiento para distintos tipos de vendajes en lugar de la acción de vendaje genérico Enabled & Can Reopen @@ -144,6 +150,7 @@ Entferne Trauma nach Bandagierung. Удалять травму после перевязки Bandaj Sonrası Travmayı Temizle + Quitar trauma despues de vendaje Controls whether fully bandaged body parts are healed. @@ -156,6 +163,7 @@ Nastavuje zda jsou plně obvázané části těla vyléčena. Контролирует то, что полностью перевязанные раны целиком исцеляют часть тела. Tamamen sargılı vücut kısımlarının iyileşip iyileşmediğini kontrol eder. + Controla si las partes del cuerpo completamente vendadas se curan. Locations Boost Training @@ -185,6 +193,7 @@ Zwiększ wyszkolenie medyczne w pojazdach lub obiektach medycznych. Niewytrenowana jednostka zostaje medykiem, medyk zostaje lekarzem. Verbessere 'Fähigkeiten-Level' in medizinischen Fahrzeugen oder Einrichtungen. Untrainiert wird zu Sanitäter, Sanitäter wird zu Arzt. Tıbbi araçlar veya tesislerdeyken tıbbi müdaheleyi artırın. Eğitimsizler sıhhiye olur, sıhhiyeler doktor olur. + Aumente la formación médica cuando se encuentre en vehículos o instalaciones médicas. Sin entrenamiento se convierte en médico, médico se convierte en médico. Allow Shared Equipment @@ -198,6 +207,7 @@ Zezwalaj na współdzielenie sprzętu Erlaube geteilte Ausrüstung Paylaşılan Ekipmana İzin Ver + Permite compartir material médico. Controls whether medical equipment can be shared between the patient and the medic. @@ -211,6 +221,7 @@ Kontroluje, czy sprzęt medyczny ma być dzielony między pacjentem a medykiem. Legt fest, ob medizinische Ausrüstung zwischen Patient und Sanitäter geteilt werden kann. Tıbbi ekipmanın hasta ve sağlık görevlisi arasında paylaşılıp paylaşılamayacağını kontrol eder. + Controla si el equipo médico se puede compartir entre el paciente y el médico. Patient's Equipment First @@ -224,6 +235,7 @@ Najpierw sprzęt pacjenta Ausrüstung des Patienten zuerst Önce Hastanın Ekipmanı + Usar equipo médico del paciente en primer lugar. Medic's Equipment First @@ -237,54 +249,65 @@ Najpierw sprzęt medyka Ausrüstung des Sanitäters zuerst İlk Sıhhiyenin Ekipmanı + Usar equipo médico del santiario en primer lugar. Autoinjector Treatment Time Durée d'interaction - Auto-injecteurs + 注射器の使用時間 Time, in seconds, required to administer medication using an autoinjector. Définit le temps nécessaire à l'administration d'une substance auto-injectable (en secondes). + 注射器の使用に掛かる時間 (秒) を決定します。 Tourniquet Treatment Time Durée d'interaction - Garrots Tourniquet-Behandlungszeit + 止血帯の使用時間 Time, in seconds, required to apply/remove a tourniquet. Définit le temps nécessaire à l'application ou au retrait d'un garrot (en secondes). Zeit in Sekunden, die benötigt wird, um ein Tourniquet anzuwenden. + 止血帯の使用/排除に掛かる時間 (秒) を決定します。 IV Bag Treatment Time Durée d'interaction - IVs IV Beutelbehandlungszeit + 点滴の使用時間 Time, in seconds, required to administer an IV bag. Définit le temps nécessaire à la pose d'une perfusion IV (en secondes). Zeit in Sekunden, die benötigt wird, um einen Infusionsbeutel aufzutragen. + 点滴の投与に掛かる時間 (秒) を決定します。 Splint Treatment Time Durée d'interaction - Attelles Schienenbehandlungszeit + 添え木の使用時間 Time, in seconds, required to apply a splint. Définit le temps nécessaire à l'application d'une attelle (en secondes). Zeit in Sekunden, die zum Anbringen einer Schiene benötigt wird. + 添え木の使用に掛かる時間 (秒) を決定します。 Body Bag Use Time Durée d'interaction - Housses mortuaires Anwendungszeit für Leichensack + 死体袋の使用時間 Time, in seconds, required to put a patient in a body bag. Définit le temps nécessaire à la mise en housse d'un corps (en secondes). Zeit in Sekunden, die benötigt wird, um einen Leichensack aufzutragen. + 死体袋の使用に掛かる時間 (秒) を決定します。 Allow Epinephrine @@ -314,6 +337,7 @@ Poziom wyszkolenia wymagany do korzystania z epinefryny. 'Fähigkeiten-Level', das benötigt wird, um Epinephrin zu nutzen. Epinefrin kullanmak için gerekli eğitim seviyesi. + Nivel de entrenamiento médico requerido para usar Epinefrina. Locations Epinephrine @@ -343,6 +367,7 @@ Kontroluje, gdzie można stosować epinefrynę. Legt fest, wo Epinephrin genutzt werden kann. Epinefrinin nerelerde kullanılabileceğini kontrol eder + Controla donde puede sr usada la Epinefrina. Allow PAK @@ -373,6 +398,7 @@ Poziom wyszkolenia wymagany do korzystania z apteczek osobistych. 'Fähigkeiten-Level', das benötigt wird, um ein Erste-Hilfe-Set zu nutzen. PAK kullanmak için gerekli eğitim seviyesi. + Nivel de entrenamiento requerido para usar EPA Locations PAK @@ -403,6 +429,7 @@ Kontroluje, gdzie można korzystać z apteczek osobistych. Kontrolliert, wo ein Erste-Hilfe-Set benutzt werden kann. PAK'ın nerelerde kullanılabileceğini kontrol eder + Controla donde puede usarse el EPA Consume PAK @@ -416,6 +443,7 @@ Zużycie apteczek osobistych Verbrauche Erste-Hilfe-Set PAK Tüketimi + Consumir EPA Controls whether a PAK should be consumed after use. @@ -429,6 +457,7 @@ Kontroluje, czy apteczka osobista powinna być zużyta po użyciu. Kontrolliert, ob ein Erste-Hilfe-Set nach der Benutzung verbraucht werden soll. Kullanımdan sonra bir PAK tüketilip tüketilmeyeceğini kontrol eder. + Controla si se debe consumir un EPA después de su uso. Self PAK Usage @@ -466,6 +495,7 @@ Współczynnik czasu apteczek osobistych Zeit-Koeffizient Erste-Hilfe-Set PAK Zaman Katsayısı + EPA coheficiente de tiempo Modifies how long a PAK takes to apply.\nThe treatment time is based on the total body part damage multiplied by this coefficient, with a minimum of 10 seconds. @@ -479,6 +509,7 @@ Zmienia czas potrzebny na zastosowanie apteczki osobistej.\n Czas leczenia jest oparty na całkowitym uszkodzeniu części ciała pomnożonym przez ten współczynnik, wynosi minimum 10 sekund. Modifiziert, wie lange ein Erste-Hilfe-Set für die Anwendung benötigt.\nDie Behandlungszeit basiert auf der Anzahl des Gesamtkörperschadens multipliziert mit diesem Koeffizienten, mit einen Minimum von 10 Sekunden. Bir PAK'ın uygulanmasının ne kadar süreceğini değiştirir. \ Tedavi süresi, toplam vücut parçası hasarının bu katsayı ile en az 10 saniye çarpımına dayanır. + Modifica el tiempo que tarda en aplicarse un EPA. \n El tiempo de tratamiento se basa en el daño total de la parte del cuerpo multiplicado por este coeficiente, con un mínimo de 10 segundos. Allow Surgical Kit @@ -492,6 +523,7 @@ Ograniczenia Użycia Zestawu Chirurgicznego Erlaube Operations-Set Cerrahi Kitine İzin Ver + Permitir kit quirúrjico Training level required to use a surgical kit. @@ -505,6 +537,7 @@ Poziom wyszkolenia wymagany do korzystania z Zestawu Chirurgicznego. 'Fähigkeiten-Level', das benötigt wird um ein Operations-Set zu nutzen. Cerrahi kit kullanmak için gerekli eğitim seviyesi. + Nivel de entrenamiento requerido para usar el kit quirúrgico Locations Surgical Kit @@ -518,6 +551,7 @@ Miejsca użycia Zestawu Chirurgicznego Orte für Operations-Set Cerrahi Kitin kullanılabileceği yerler + Localización de los kits quirúrgicos Controls where a surgical kit can be used. @@ -531,6 +565,7 @@ Kontroluje, gdzie można użyć Zestawu Chirurgicznego. Legt fest, wo ein Operations-Set genutzt werden kann. Cerrahi Kitin nerelerde kullanılabileceğini kontrol eder + Controla donde puede usarse un kit quirúrgico. Consume Surgical Kit @@ -543,6 +578,7 @@ Spotřebuj sešívací sadu Zużycie Zestawów Chirurgicznych Verbrauche Operations-Set + Consumir kit quirúrgico Controls whether a surgical kit should be consumed after use. @@ -555,6 +591,7 @@ Nastavuje Kontroluje, czy Zestaw Chirurgiczny powinien być zużyty po użyciu. Legt fest, ob ein Operations-Set nach der Anwendung verbraucht werden soll. + Controla si un kit quirúrgico debería ser consumido tras su uso Self Stitching @@ -567,6 +604,7 @@ Zszywanie własnych ran Selbstnähen Зашивание своей раны + Auto cosido Enables the use of surgical kits to stitch oneself. @@ -579,14 +617,17 @@ Permette l'uso di kit chirurgici per ricucirsi. Ermöglicht die Benutzung des Operations-Sets, um sich selbst zu nähen. Включает использование хирургического набора на себе. + Permite el uso de kits quirúrgicos sobre uno mismo Wound Stitch Time Durée d'interaction - Sutures + 縫合時間 Time, in seconds, required to stitch a single wound. Définit le temps nécessaire à la suture d'une plaie (en secondes). + 縫合に掛かる時間 (秒) を決定します。 Self IV Transfusion @@ -599,6 +640,7 @@ Samoaplikace IV transfuze Samotransfuzja IV Trasfusione endovena su se stessi + Autotransfusión intravenosa (IV) Enables the use of IV transfusions on oneself. @@ -611,14 +653,17 @@ Umožňuje aplikovat IV transfuze na sama sebe. Pozwala przetoczyć płyny IV samemu sobie Abilita la trasfusione in endovena su se stessi. + Habilita el uso de las transfusiones IV sobre uno mismo Allow Unconscious Body Bag Housse mortuaire - Autoriser patients inconscients + 無意識者を死体袋に Enables placing an unconscious patient in a body bag. Active la possibilité de placer des patients inconscients dans les housses mortuaires.\nAttention : le cas échéant cela provoquera la mort du patient. + 気絶しているプレイヤーを死体袋へ入れられるかどうかを決定します。 Allow IV Transfusion @@ -640,6 +685,14 @@ Úroveň výcviku nutná pro IV transfuzi. Уровень навыка требуемый для переливания крови IV группы. + + Locations IV Transfusion + IV 輸血の場所制限 + + + Controls where IV transfusions can be performed. + IV 輸血を行える場所を決定できます。 + Convert Vanilla Items Standard Arma-Equipment in ACE-Items umwandeln @@ -651,6 +704,7 @@ Converti oggetti vanilla Přeměnit zdravotnické předměty ze základní hry Konwertuj przedmioty z vanili + Convierte los objetos estándars de A3 en objetos ACE Controls whether vanilla medical items are converted to ACE Medical items, removed only, or ignored. @@ -663,6 +717,7 @@ Controlla se gli articoli medicali vanilla vengono convertiti in articoli medicali ACE, rimossi o ignorati. Nastavuje zda zdravotnické předměty ze základní hry budou přeměněny na ACE předměty, odstraněny nebo ignorovány. Kontroluje, czy podstawowe przedmioty medyczne z Arma są konwertowane na przedmioty medyczne ACE, tylko usuwane lub ignorowane. + Controla si los artículos médicos básicos se convierten en artículos médicos de ACE, solo se eliminan o se ignoran. Remove Only @@ -675,6 +730,7 @@ Pouze odstranit Tylko Usuwaj Nur Entfernen + Solo eliminar Enable Litter @@ -702,6 +758,7 @@ Umožňuje vytvořit odpadky při léčbě. Umożliwia tworzenie śmieci po przeprowadzaniu zabiegu. Ermöglicht das Produzieren von Abfall während einer Behandlung. + Habilita la opción de basura durante el tratamiento Max Litter Objects @@ -715,6 +772,7 @@ Maksymalna Ilość Śmieci Maximale Anzahl an Abfall-Objekten Maks. Çöp Objesi + Número máximo de objetos de basura Sets the maximum number of litter objects which can be spawned, excessive amounts can cause FPS lag. @@ -727,6 +785,7 @@ Nastavuje maximum odpadků, které se mohou objevit. Vysoká hodnota m§že negativně ovlivnit FPS. Definiuje maksymalną liczbę śmieci, które mogą zostać stworzone, nadmierne ilości mogą powodować spadki FPS. Bestimmt die maximal Anzahl an Abfall-Objekten, die erstellt werden können. Eine zu hohe Anzahl kann Lag verursachen. + Establece el número máximo de objetos de basura que se pueden generar, cantidades excesivas pueden causar saltos de FPS. Litter Lifetime @@ -740,6 +799,7 @@ Czas trwania Śmieci Abfall Anzeigedauer Cöp Silinme Süresi + Tiempo de vida de la basura Controls the lifetime of litter objects, in seconds. -1 is forever. @@ -752,6 +812,7 @@ Nastavuje za jak dlouho zdravotnické odpadky zmizí. -1 je navždy. Kontroluje czas trwania śmieci w sekundach. -1 pozostawia je na zawsze. Kontrolliert die Anzeigedauer von Abfall-Objekten in Sekunden. -1 ist für immer. + Controla el tiempo de vida de la basura (segundos). -1 es igual a permanentes Anyone @@ -782,6 +843,7 @@ Medycy Sanitäter Sıhhiye + Médicos Doctors @@ -795,6 +857,7 @@ Doktorzy Ärzte Doktor + Doctores Medical Facilities @@ -808,6 +871,7 @@ Obiekty Medyczne Medizinische Einrichtungen Tıbbi tesisler + Instalaciones médicas Vehicles & Facilities @@ -821,6 +885,7 @@ Pojazdy i Obiekty Fahrzeuge und Einrichtungen Araçlar ve Tesisler + Vehículos e instalaciones médicas CPR Success Chance @@ -834,6 +899,7 @@ Szansa powodzenia RKO HLW Erfolgsrate CPR Başarı Şansı + Probabilidad de éxito del RCP Probability that CPR will be successful in restoring heart rhythm. @@ -847,14 +913,17 @@ Prawdopodobieństwo przwyrócenia akcji serca poprzez wykonanie RKO Wahrscheinlichkeit, dass HLW bei der Wiederherstellung des Herzrhythmus erfolgreich sein wird. Kalp ritmini geri kazanmada CPR'nin başarılı olma olasılığı. + Probabilidad de que el RCP sea exitoso restaurando el ritmo cardíaco. CPR Treatment Time Durée d'interaction - RCP + CPR の動作時間 Time, in seconds, required to perform CPR on a patient. Définit le temps nécessaire à la mise en œuvre d'une RCP (en secondes). + 心肺蘇生にかかる時間 (秒) を決定します。 Holster Required @@ -866,6 +935,7 @@ Wymagana broń w kaburze Holstern benötigt Необходимость убирать оружие + Requiere enfundar Controls whether weapons must be holstered / lowered in order to perform medical actions.\nExcept Exam options allow examination actions (checking pulse, blood pressure, response) at all times regardless of this setting. @@ -877,6 +947,7 @@ Controlla se le armi devono essere tenute nella fondina / abbassate per poter eseguire le azioni mediche.\Except Exam - Permette azioni di esame (controllo del polso, della pressione sanguigna, della risposta) in ogni momento indipendentemente dall'impostazione della fondina richiesta. Kontrolliert, ob Waffen geholstert/gesenkt werden müssen, um medizinische Aktionen durchzuführen.\nAusgenommen die eingestellten Untersuchungsoptionen erlauben Diagnose-Aktionen (Überprüfung von Puls, Blutdruck, Reaktion) jederzeit. Нужно ли убирать оружие для проведения медицинских действий.\nОпция «Проверка разрешена» разрешает проверять пульс, кровяное давление или реакцию независимо от этого параметра. + Controla si las armas deben estar enfundadas / bajadas para realizar acciones médicas. \n Excepto Las opciones de examen permiten acciones de examen (control del pulso, presión arterial, respuesta) en todo momento, independientemente de esta configuración. Lowered or Holstered @@ -888,6 +959,7 @@ Opuszczona lub w kaburze Gesenkt oder Geholstert Опущено или убрано + Bajada o enfundada Lowered or Holstered (Except Exam) @@ -899,6 +971,7 @@ Opuszczona lub w kaburze (oprócz diagnozowania) Gesenkt oder Geholstert (Ausnahme Untersuchung) Опущено или убрано (Проверка разрешена) + Bajada o enfundada (excepto examen) Holstered Only @@ -910,6 +983,7 @@ Tylko w Kaburze Nur geholstert Только убрано + Solo enfundada Holstered Only (Except Exam) @@ -921,6 +995,7 @@ Tylko w Kaburze (oprócz diagnozowania) Nur geholstert (Ausnahme Untersuchung) Только убрано (Проверка разрешена) + Solo enfundada (excepto examen) [ACE] Medical Supply Crate (Basic) @@ -1355,6 +1430,7 @@ Schiene 夹板 Atel + Férula Stabilizes a fractured limb @@ -1369,6 +1445,7 @@ Stabilisiere einen Bruch 用于固定骨折的肢体 Kırık bir uzvu stabilize eder + Estabilizar un hueso roto Morphine Autoinjector @@ -2482,7 +2559,7 @@ Zárókötszer Bendaggio rapido Curativo de Campo - 緊急圧迫包帯 + 緊急圧迫包帯を巻く 필드 드레싱 绷带 (基础型) 基礎繃帶 @@ -2498,7 +2575,7 @@ Bandage compressif Bandagem de Compressão Obvaz Tlakový - 弾性包帯 + 弾性包帯を巻く 거즈 붕대 绷带 (包扎型) 包紮繃帶 @@ -2515,7 +2592,7 @@ Rögzitő kötszer Bendaggio elastico Bandagem Elástica - 伸縮包帯 + 伸縮包帯を巻く 압박 붕대 绷带 (弹性型) 彈性繃帶 @@ -2532,7 +2609,7 @@ QuikClot QuikClot (polvere emostatica) QuikClot - クイッククロット + クイッククロットを巻く 퀵 클롯 绷带 (止血型) 止血粉 @@ -3700,7 +3777,7 @@ Valamennyi vért vesztett Ztratil trochu krve Ele perdeu um pouco de sangue - 彼は出血している + 患者は出血している 적은 양의 피를 잃었다 他轻微失血 他流失一些血液 @@ -3717,7 +3794,7 @@ Ztratil hodně krve Ele perdeu muito sangue Ha perso molto sangue - 彼は大量失血している + 患者は大量失血している 많은 양의 피를 잃었다 他大量失血 他流失大量血液 @@ -3734,7 +3811,7 @@ Nem vesztett vért Neztratil žádnou krev Ele não perdeu sangue - 彼は失血していない + 患者は失血していない 피를 잃지 않았다 他没有失血 他並沒有失血 @@ -3751,7 +3828,7 @@ Fájdalmai vannak Je v bolestech Ele está com dor - 彼には痛みがあるようだ + 患者は痛いようだ 통증이 있다 他感到疼痛 他感到疼痛中 @@ -3768,7 +3845,7 @@ Nincsenek fájdalmai Nemá žádné bolesti Ele não está com dor - 彼には痛みがないようだ + 患者は痛くないようだ 통증이 없다 他没有感到疼痛 他沒感到疼痛中 @@ -4307,6 +4384,7 @@ The body twitched and may not be dead! L'unité a bougé et n'est peut-être pas morte ! + 身体が動き死んでないようだ! diff --git a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf index cdb57b3dfe..850ff41607 100644 --- a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf @@ -53,7 +53,7 @@ if (_hemorrhage != GET_HEMORRHAGE(_unit)) then { private _woundBloodLoss = GET_WOUND_BLEEDING(_unit); private _inPain = GET_PAIN_PERCEIVED(_unit) > 0; -if !(_inPain isEqualTo IS_IN_PAIN(_unit)) then { +if (_inPain isNotEqualTo IS_IN_PAIN(_unit)) then { _unit setVariable [VAR_IN_PAIN, _inPain, true]; }; @@ -75,7 +75,7 @@ private _painSupressAdjustment = 0; private _peripheralResistanceAdjustment = 0; private _adjustments = _unit getVariable [VAR_MEDICATIONS,[]]; -if !(_adjustments isEqualTo []) then { +if (_adjustments isNotEqualTo []) then { private _deleted = false; { _x params ["_medication", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", "_hrAdjust", "_painAdjust", "_flowAdjust"]; diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 877bbb2bcc..d4cc5000c3 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -70,7 +70,7 @@ case (APP_MODE_INFODISPLAY): { _aboveSeaLevelText = "----"; if (GVAR(currentWaypoint) == -2) then { - if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { + if (GVAR(rangeFinderPositionASL) isNotEqualTo []) then { private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); @@ -81,7 +81,7 @@ case (APP_MODE_INFODISPLAY): { _targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1; }; - if (!(_targetPosLocationASL isEqualTo [])) then { + if (_targetPosLocationASL isNotEqualTo []) then { private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo; _bearingText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; @@ -123,7 +123,7 @@ case (APP_MODE_COMPASS): { private _targetPosLocationASL = []; if (GVAR(currentWaypoint) == -2) then { - if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { + if (GVAR(rangeFinderPositionASL) isNotEqualTo []) then { private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); @@ -137,7 +137,7 @@ case (APP_MODE_COMPASS): { _bearingText = "---"; _rangeText = "---"; - if (!(_targetPosLocationASL isEqualTo [])) then { + if (_targetPosLocationASL isNotEqualTo []) then { private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo; _bearingText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; diff --git a/addons/microdagr/initSettings.sqf b/addons/microdagr/initSettings.sqf index 5138637645..85614c9821 100644 --- a/addons/microdagr/initSettings.sqf +++ b/addons/microdagr/initSettings.sqf @@ -8,7 +8,7 @@ true, // isGlobal {[QGVAR(mapDataAvailable), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // require mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(waypointPrecision), "LIST", @@ -18,4 +18,4 @@ true, // isGlobal {[QGVAR(waypointPrecision), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // require mission restart -] call cba_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index 63672ca1a2..f34315d59c 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -511,6 +511,7 @@ Précision des points de passage 微型軍用GPS接收器 - 導航精確度 MicroDAGR - přesnost Waypointů + Micro DAGR - precisión del waypoint Controls how precise the waypointdistance can be displayed @@ -523,6 +524,7 @@ Définit la précision d'affichage des points de passage. 控制顯示的導航點精確度為多少 Nastavuje jak přesně je vzdálenost waypointů zobrazena. + Controla cómo de precisa se mostrará la distancia al waypoint 100m @@ -536,6 +538,7 @@ 一百公尺 100 m 100m + 100m 10m @@ -549,6 +552,7 @@ 十公尺 10 m 10m + 10m 1m @@ -562,6 +566,7 @@ 一公尺 1 m 1m + 1m Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap. diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index 1c448794cc..0b8a521155 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -24,7 +24,7 @@ addMissionEventHandler ["Draw3D", { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,1,1], _detectorPointAGL, 1, 1, 0, "detector", 1, 0.02, "PuristaMedium"]; { private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> QGVAR(detectable))) == 1) then { + if ((getNumber (configOf _x >> QGVAR(detectable))) == 1) then { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; } else { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; diff --git a/addons/minedetector/functions/fnc_hasDetector.sqf b/addons/minedetector/functions/fnc_hasDetector.sqf index 4752284196..c7ebd5b9f0 100644 --- a/addons/minedetector/functions/fnc_hasDetector.sqf +++ b/addons/minedetector/functions/fnc_hasDetector.sqf @@ -17,4 +17,4 @@ params ["_unit"]; -!(([currentWeapon _unit] call FUNC(getDetectorConfig)) isEqualTo []); +([currentWeapon _unit] call FUNC(getDetectorConfig)) isNotEqualTo []; diff --git a/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf b/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf index 200e398133..10c3bd5892 100644 --- a/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf +++ b/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf @@ -18,7 +18,7 @@ params ["_firedEH", "", "", "", "_stateParams"]; _firedEH params ["_shooter","_weapon","","","","","_projectile"]; _stateParams params ["", "_seekerStateParams"]; -private _usePilotCamera = getNumber (([_shooter] call CBA_fnc_getObjectConfig) >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1; +private _usePilotCamera = getNumber (configOf _shooter >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1; private _turretPath = [_shooter, _weapon] call CBA_fnc_turretPathWeapon; private _turretConfig = [_shooter, _turretPath] call CBA_fnc_getTurret; diff --git a/addons/missileguidance/functions/fnc_ahr_onFired.sqf b/addons/missileguidance/functions/fnc_ahr_onFired.sqf index 331484f4a2..c7a3e5561c 100644 --- a/addons/missileguidance/functions/fnc_ahr_onFired.sqf +++ b/addons/missileguidance/functions/fnc_ahr_onFired.sqf @@ -30,7 +30,7 @@ if !(_target isKindOf "AllVehicles") then { _launchParams set [0, _target]; _projectile setMissileTarget objNull; // to emulate a no launch warning -private _projectileConfig = [_projectile] call CBA_fnc_getObjectConfig; +private _projectileConfig = configOf _projectile; private _config = _projectileConfig >> "ace_missileguidance"; private _isActive = false; diff --git a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf index 6d88197819..4f0324597f 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf @@ -41,7 +41,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith { if (_seekerTargetPos isEqualTo [0, 0, 0] || { _distanceToProjectile < _seekerMinRangeSqr }) exitWith { // cut wire if its caught on terrain - /*if !(lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isEqualTo []) then { + /*if (lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isNotEqualTo []) then { _attackProfileStateParams set [1, true]; };*/ // return position 50m infront of projectile diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index e107805496..de01b476b6 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -27,7 +27,7 @@ private _seekerFunction = getText (configFile >> QGVAR(SeekerTypes) >> _seekerTy private _seekerTargetPos = _this call (missionNamespace getVariable _seekerFunction); if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { // A return of nil or [0,0,0] indicates the seeker has no target - if (_seekLastTargetPos && {!(_lastKnownPos isEqualTo [0,0,0])}) then { // if enabled for the ammo, use last known position if we have one stored + if (_seekLastTargetPos && {_lastKnownPos isNotEqualTo [0,0,0]}) then { // if enabled for the ammo, use last known position if we have one stored TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos); _seekerTargetPos = _lastKnownPos; #ifdef DRAW_GUIDANCE_INFO diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index e218e27e54..8050dfcff5 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -56,7 +56,7 @@ private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStat // If we have no seeker target, then do not change anything // If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection -if ((_minDeflection != 0 || {_maxDeflection != 0}) && {!(_profileAdjustedTargetPos isEqualTo [0,0,0])}) then { +if ((_minDeflection != 0 || {_maxDeflection != 0}) && {_profileAdjustedTargetPos isNotEqualTo [0,0,0]}) then { private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos; private _adjustVector = _targetVector vectorDiff (vectorDir _projectile); diff --git a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf index 9f470c1960..2d0a1e9170 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf @@ -53,7 +53,7 @@ private _testDotProduct = (_lookDirection vectorDotProduct _testPointVector); private _testIntersections = lineIntersectsSurfaces [_shooterPos, _projPos, _shooter]; -if ((_testDotProduct < (cos _seekerAngle)) || { !(_testIntersections isEqualTo []) }) exitWith { +if ((_testDotProduct < (cos _seekerAngle)) || {_testIntersections isNotEqualTo []}) exitWith { // out of LOS of seeker [0, 0, 0] }; diff --git a/addons/missileguidance/functions/fnc_wire_onFired.sqf b/addons/missileguidance/functions/fnc_wire_onFired.sqf index 295d6a2b5a..cb4020bd0f 100644 --- a/addons/missileguidance/functions/fnc_wire_onFired.sqf +++ b/addons/missileguidance/functions/fnc_wire_onFired.sqf @@ -19,7 +19,7 @@ _firedEH params ["_shooter","_weapon","","","","","_projectile", "_gunner"]; _stateParams params ["", "", "_attackProfileStateParams"]; _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"]; -private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance"; +private _config = configOf _projectile >> "ace_missileguidance"; private _maxCorrectableDistance = [_config >> "correctionDistance", "NUMBER", DEFAULT_CORRECTION_DISTANCE] call CBA_fnc_getConfigEntry; private _distanceAheadOfMissile = [_config >> "missileLeadDistance", "NUMBER", DEFAULT_LEAD_DISTANCE] call CBA_fnc_getConfigEntry; private _maxDistanceSqr = _seekerMaxRange * _seekerMaxRange; diff --git a/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf b/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf index f6d11334b3..fd4804b98f 100644 --- a/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf +++ b/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf @@ -55,7 +55,7 @@ if (_proxyWeaponNeeded || GVAR(useAmmoHandling)) then { }; }; } else { - WARNING("unknown mag %1", _xMag); + WARNING_1("unknown mag %1", _xMag); }; }; } forEach (magazinesAllTurrets _mortar); diff --git a/addons/mk6mortar/initSettings.sqf b/addons/mk6mortar/initSettings.sqf index 1e48575b97..1b22600cbe 100644 --- a/addons/mk6mortar/initSettings.sqf +++ b/addons/mk6mortar/initSettings.sqf @@ -11,7 +11,7 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(airResistanceEnabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowComputerRangefinder), "CHECKBOX", @@ -21,7 +21,7 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(allowComputerRangefinder), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowCompass), "CHECKBOX", @@ -31,7 +31,7 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(allowCompass), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(useAmmoHandling), "CHECKBOX", @@ -41,4 +41,4 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(useAmmoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index dcf83627ca..15d8f0b4bc 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -82,6 +82,7 @@ Morteiro Mk6 Minomet Mk6 Mk6 Havan + Mortero MK6 Mk6 Settings diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index b400e2d6fa..a3d7f80ed2 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -56,7 +56,7 @@ if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { [{ private _oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false]; private _newSetting = (!(isNull findDisplay 55)); - if (!(_oldSetting isEqualTo _newSetting)) then { + if (_oldSetting isNotEqualTo _newSetting) then { ACE_player setVariable [QGVAR(isSpeakingInGame), _newSetting, true]; }; } , 0.1, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index fb5d29807a..3b348fa824 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -113,7 +113,7 @@ if (_enabledTagsNearby) then { private _centerOffsetFactor = 1; if (GVAR(showPlayerNames) == 5) then { private _screenPos = worldToScreen (_target modelToWorld (_target selectionPosition "head")); - if !(_screenPos isEqualTo []) then { + if (_screenPos isNotEqualTo []) then { // Distance from center / half of screen width _centerOffsetFactor = 1 - ((_screenPos distance2D [0.5, 0.5]) / (safezoneW / 3)); } else { diff --git a/addons/nametags/initSettings.sqf b/addons/nametags/initSettings.sqf index b2cf482ce1..edabaa002f 100644 --- a/addons/nametags/initSettings.sqf +++ b/addons/nametags/initSettings.sqf @@ -7,7 +7,7 @@ [0.77, 0.51, 0.08, 1], false, // isGlobal {[QGVAR(defaultNametagColor), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(nametagColorMain), "COLOR", @@ -16,7 +16,7 @@ [1.00, 1.00, 1.00, 1], false, // isGlobal {[QGVAR(nametagColorMain), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(nametagColorRed), "COLOR", @@ -25,7 +25,7 @@ [1.00, 0.67, 0.67, 1], false, // isGlobal {[QGVAR(nametagColorRed), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(nametagColorGreen), "COLOR", @@ -34,7 +34,7 @@ [0.67, 1.00, 0.67, 1], false, // isGlobal {[QGVAR(nametagColorGreen), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(nametagColorBlue), "COLOR", @@ -43,7 +43,7 @@ [0.67, 0.67, 1.00, 1], false, // isGlobal {[QGVAR(nametagColorBlue), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(nametagColorYellow), @@ -53,4 +53,4 @@ [1.00, 1.00, 0.67, 1], false, // isGlobal {[QGVAR(nametagColorYellow), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/nightvision/functions/fnc_pfeh.sqf b/addons/nightvision/functions/fnc_pfeh.sqf index 82e6a3cf34..794fe9b555 100644 --- a/addons/nightvision/functions/fnc_pfeh.sqf +++ b/addons/nightvision/functions/fnc_pfeh.sqf @@ -45,7 +45,7 @@ if (!GVAR(running)) then { // Scale Border / Hex BEGIN_COUNTER(borderScaling); private _scale = (call EFUNC(common,getZoom)) * 1.12513; -if (!(GVAR(defaultPositionBorder) isEqualTo [])) then { +if (GVAR(defaultPositionBorder) isNotEqualTo []) then { // Prevents issues when "zooming out" on ultra wide monitors - The square mask would be narrower than the screen if ((GVAR(defaultPositionBorder) select 2) * _scale < safeZoneW) then { _scale = safeZoneW / (GVAR(defaultPositionBorder) select 2); @@ -57,7 +57,7 @@ if (!(GVAR(defaultPositionBorder) isEqualTo [])) then { }; END_COUNTER(borderScaling); -if !(IS_MAGNIFIED isEqualTo GVAR(isUsingMagnification)) then { +if (IS_MAGNIFIED isNotEqualTo GVAR(isUsingMagnification)) then { GVAR(isUsingMagnification) = IS_MAGNIFIED; GVAR(nextEffectsUpdate) = -1; }; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf index c367d7a2f5..6bb9e35fdb 100644 --- a/addons/nightvision/functions/fnc_refreshGoggleType.sqf +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -31,7 +31,7 @@ if (alive ACE_player) then { // Test if we are using player's nvg or if sourced from vehicle: private _currentVehicle = vehicle ACE_player; - private _vehConfig = configFile >> "CfgVehicles" >> (typeOf _currentVehicle); + private _vehConfig = configOf _currentVehicle; if (cameraView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view if ([ACE_player] call CBA_fnc_canUseWeapon) exitWith {true}; // FFV diff --git a/addons/nightvision/initSettings.sqf b/addons/nightvision/initSettings.sqf index 9ccf2cc7f9..1a42c74863 100644 --- a/addons/nightvision/initSettings.sqf +++ b/addons/nightvision/initSettings.sqf @@ -44,14 +44,14 @@ }; }; } -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fogScaling), "SLIDER", [LSTRING(fogScaling_DisplayName), LSTRING(fogScaling_Description)], localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(noiseScaling), "SLIDER", @@ -59,7 +59,7 @@ localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(aimDownSightsBlur), "SLIDER", @@ -67,7 +67,7 @@ localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(disableNVGsWithSights), "CHECKBOX", @@ -75,7 +75,7 @@ localize LSTRING(Category), false, // default value true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(shutterEffects), "CHECKBOX", @@ -83,4 +83,4 @@ localize LSTRING(Category), true, // default value false // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 555f346c81..af3d048f1e 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -14,6 +14,7 @@ ACE Visão Noturna ACE Noční vidění ACE Gece Görüşü + ACE visión nocturna NV Goggles (Gen1) diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf index acc4330083..21f77f0ff5 100644 --- a/addons/nlaw/functions/fnc_attackProfile.sqf +++ b/addons/nlaw/functions/fnc_attackProfile.sqf @@ -24,7 +24,7 @@ _targetLaunchParams params ["", "", "_launchPos"]; _firedEH params ["","","","","","","_projectile"]; // Use seeker (if terminal) -if (!(_seekerTargetPos isEqualTo [0,0,0])) exitWith {_seekerTargetPos}; +if (_seekerTargetPos isNotEqualTo [0,0,0]) exitWith {_seekerTargetPos}; _attackProfileStateParams params ["_startTime", "_startLOS", "_yawChange", "_pitchChange"]; (_startLOS call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf index eeb2e0794c..af9b349cc2 100644 --- a/addons/nlaw/functions/fnc_seeker.sqf +++ b/addons/nlaw/functions/fnc_seeker.sqf @@ -54,7 +54,7 @@ if ((_projPos distance _launchPos) >= 20) then { // Limit scan to 5 meters directly down (shaped charge jet has a very limited range) private _res = lineIntersectsSurfaces [_virtualPos, (_virtualPos vectorAdd [0,0,-5]), _projectile]; - if (!(_res isEqualTo [])) then { + if (_res isNotEqualTo []) then { (_res select 0) params ["_targetPos", "", "_target"]; if ((_target isKindOf "Tank") || {_target isKindOf "Car"} || {_target isKindOf "Air"}) exitWith { TRACE_3("Firing shaped charge down",_target,_targetPos distance _virtualPos,_frameDistance); @@ -74,7 +74,7 @@ if ((_projPos distance _launchPos) >= 20) then { _shapedCharage setVelocity [0,0,-300]; _seekerStateParams set [1, true]; - + END_COUNTER(targetScan); breakOut "targetScan"; }; diff --git a/addons/nlaw/stringtable.xml b/addons/nlaw/stringtable.xml index a53d21050c..6ac169dcc8 100644 --- a/addons/nlaw/stringtable.xml +++ b/addons/nlaw/stringtable.xml @@ -15,6 +15,7 @@ NLAW suivre la cible (maintenir) NLAW sledování cíle (držet) NLAW Track Target (Basılı Tut) + NLAW Seguir objetivo (Mantener) Direct Attack @@ -30,6 +31,7 @@ Attaque directe Přímý útok Doğrudan Saldırı + Ataque directo Overfly Top Attack @@ -45,6 +47,7 @@ Attaque par le haut Útok zvrchu při přeletu Yüksek Uçuş Saldırı + Ataque desde arriba diff --git a/addons/noradio/XEH_preInit.sqf b/addons/noradio/XEH_preInit.sqf index 61492aa36d..48463b70ef 100644 --- a/addons/noradio/XEH_preInit.sqf +++ b/addons/noradio/XEH_preInit.sqf @@ -36,4 +36,4 @@ if (hasInterface) then { [ACE_player, "isPlayer"] call EFUNC(common,unmuteUnit); }; }, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/noradio/stringtable.xml b/addons/noradio/stringtable.xml index 7e788a9f3f..affc778e6a 100644 --- a/addons/noradio/stringtable.xml +++ b/addons/noradio/stringtable.xml @@ -14,6 +14,7 @@ Joueur en sourdine Ztlumit hráče Oyuncuyu Sustur + Ensordecer jugador Mutes the controlled player avatar. @@ -28,6 +29,7 @@ Met en sourdine l'avatar du joueur. Vypne hlas charakteru hráče. Oyuncuları Susturur + Ensordecer el avatar del jugador controlado diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index 5a10c0bd83..b01263d60b 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -16,6 +16,6 @@ PREP_RECOMPILE_END; true, false, {[QGVAR(hideAltimeter), _this, false] call EFUNC(common,cbaSettings_settingChanged)} -] call cba_settings_fnc_init; +] call CBA_fnc_addSetting; ADDON = true; diff --git a/addons/pylons/functions/fnc_onButtonLoad.sqf b/addons/pylons/functions/fnc_onButtonLoad.sqf index af3183073a..f689c8bf82 100644 --- a/addons/pylons/functions/fnc_onButtonLoad.sqf +++ b/addons/pylons/functions/fnc_onButtonLoad.sqf @@ -37,7 +37,7 @@ private _fnc_setSelections = { } forEach GVAR(comboBoxes); }; -private _pylonComponent = configFile >> "CfgVehicles" >> typeOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent"; +private _pylonComponent = configOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent"; private _loadoutFound = { if (getText (_x >> "displayName") isEqualTo _loadoutName) exitWith { // Get default turrets from config diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 119489f4d8..146238a1b7 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -48,7 +48,7 @@ if (GVAR(rearmNewPylons) || {_isCurator}) then { ctrlShow [ID_TEXT_BANNER, false]; }; -private _config = configFile >> "CfgVehicles" >> typeOf _aircraft; +private _config = configOf _aircraft; private _pylonComponent = _config >> "Components" >> "TransportPylonsComponent"; ctrlSetText [ID_PICTURE_AIRCRAFT, getText (_pylonComponent >> "uiPicture")]; diff --git a/addons/pylons/initSettings.sqf b/addons/pylons/initSettings.sqf index 57a2a79efb..70b158957f 100644 --- a/addons/pylons/initSettings.sqf +++ b/addons/pylons/initSettings.sqf @@ -5,7 +5,7 @@ LSTRING(Category_Pylons), [true], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enabledForZeus), @@ -14,7 +14,7 @@ LSTRING(Category_Pylons), [true], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(rearmNewPylons), @@ -23,7 +23,7 @@ LSTRING(Category_Pylons), [false], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(requireEngineer), @@ -32,7 +32,7 @@ LSTRING(Category_Pylons), [false], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(requireToolkit), @@ -41,7 +41,7 @@ LSTRING(Category_Pylons), [true], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(searchDistance), @@ -54,7 +54,7 @@ params ["_searchDistance"]; GVAR(searchDistanceSqr) = _searchDistance ^ 2; } -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(timePerPylon), @@ -63,4 +63,4 @@ LSTRING(Category_Pylons), [1, 10, 5, 0], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/quickmount/CfgVehicles.hpp b/addons/quickmount/CfgVehicles.hpp index a0b54df48b..a52f17cf5a 100644 --- a/addons/quickmount/CfgVehicles.hpp +++ b/addons/quickmount/CfgVehicles.hpp @@ -50,9 +50,9 @@ class CfgVehicles { class ACE_SelfActions { \ class GVAR(ChangeSeat) { \ displayName = CSTRING(ChangeSeat); \ + icon = QPATHTOF(UI\Seats_ca.paa); \ condition = QUOTE(call DFUNC(canShowFreeSeats)); \ - statement = ""; \ - insertChildren = QUOTE((_this select 2) param [ARR_2(0, [])]); \ + insertChildren = QUOTE(call DFUNC(addFreeSeatsActions)); \ }; \ } diff --git a/addons/quickmount/UI/Seats_ca.paa b/addons/quickmount/UI/Seats_ca.paa new file mode 100644 index 0000000000..8e4678d5ca Binary files /dev/null and b/addons/quickmount/UI/Seats_ca.paa differ diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index 422afece6d..a4ccc737e7 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -59,8 +59,8 @@ #define MOVE_IN_CODE(command) (_this select 0) command (_this select 1) private _fnc_move = { - (_this select 2) params ["_moveInCode", "_moveInParams", "_currentTurret", "_moveBackCode", "_moveBackParams", ["_enabledByAnimationSource", ""]]; - TRACE_7("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,_enabledByAnimationSource,call {GVAR(frame)=diag_frameno}); + (_this select 2) params ["_moveInCode", "_moveInParams", "_currentTurret", "_moveBackCode", "_moveBackParams"]; + TRACE_6("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,call {GVAR(frame)=diag_frameno}); // workaround getting damage when moveOut while vehicle is moving // also this helps with arma bug when unit is stuck in wrong anim when move in turret with configured enabledByAnimationSource @@ -94,7 +94,7 @@ scopeName "main"; params ["_vehicle", "_player"]; -private _vehicleConfig = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _vehicleConfig = configOf _vehicle; private _isInVehicle = _player in _vehicle; private _fullCrew = fullCrew [_vehicle, "", true]; @@ -208,7 +208,7 @@ private _cargoNumber = -1; private _gunnerCompartments = (_turretConfig >> "gunnerCompartments") call BIS_fnc_getCfgData; TO_COMPARTMENT_STRING(_gunnerCompartments); if (_compartment != _gunnerCompartments) then {breakTo "crewLoop"}; - _params = [{MOVE_IN_CODE(moveInTurret)}, [_vehicle, _turretPath], _currentTurret, _moveBackCode, _moveBackParams, _enabledByAnimationSource]; + _params = [{MOVE_IN_CODE(moveInTurret)}, [_vehicle, _turretPath], _currentTurret, _moveBackCode, _moveBackParams]; _statement = _fnc_move; }; _name = getText (_turretConfig >> "gunnerName"); diff --git a/addons/quickmount/functions/fnc_canShowFreeSeats.sqf b/addons/quickmount/functions/fnc_canShowFreeSeats.sqf index 506dbd78ac..94f5ff6de5 100644 --- a/addons/quickmount/functions/fnc_canShowFreeSeats.sqf +++ b/addons/quickmount/functions/fnc_canShowFreeSeats.sqf @@ -19,7 +19,6 @@ params ["_vehicle", "_unit", "_args"]; -_args set [0, []]; private _isInVehicle = _unit in _vehicle; GVAR(enabled) @@ -40,7 +39,12 @@ GVAR(enabled) || {_vehicle isKindOf "Air"} // except Air } && { - private _subActions = _this call FUNC(addFreeSeatsActions); - _args set [0, _subActions]; - !([] isEqualTo _subActions) + _isInVehicle + || { + // because Get In action has its own statement + // we have to cache subactions in args and reuse them in insertChildren code + private _subActions = _this call FUNC(addFreeSeatsActions); + _args set [0, _subActions]; + [] isNotEqualTo _subActions + } } diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index 7b1ac71868..f947765d78 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -72,12 +72,12 @@ if (!isNull _target && private _effectiveRole = toLower _role; if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner - if ((_effectiveRole == "driver") && {(getNumber (([_target] call CBA_fnc_getObjectConfig) >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) + if ((_effectiveRole == "driver") && {(getNumber (configOf _target >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) // Seats can be locked independently of the main vehicle if ((_role == "driver") && {lockedDriver _target}) exitWith {TRACE_1("lockedDriver",_x);}; if ((_cargoIndex >= 0) && {_target lockedCargo _cargoIndex}) exitWith {TRACE_1("lockedCargo",_x);}; - if ((!(_turretPath isEqualTo [])) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);}; + if ((_turretPath isNotEqualTo []) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);}; if (_effectiveRole == "turret") then { private _turretConfig = [_target, _turretPath] call CBA_fnc_getTurret; @@ -95,7 +95,7 @@ if (!isNull _target && TRACE_2("",_effectiveRole,_x); if (_effectiveRole != _desiredRole) exitWith {}; - if (!(_turretPath isEqualTo [])) then { + if (_turretPath isNotEqualTo []) then { // Using GetInTurret seems to solve problems with incorrect GetInEH params when gunner/commander ACE_player action ["GetInTurret", _target, _turretPath]; TRACE_3("Geting In Turret",_x,_role,_turretPath); diff --git a/addons/quickmount/initSettings.sqf b/addons/quickmount/initSettings.sqf index 742a45cb7e..88fa78bd64 100644 --- a/addons/quickmount/initSettings.sqf +++ b/addons/quickmount/initSettings.sqf @@ -5,7 +5,7 @@ format ["ACE %1", LLSTRING(Category)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(distance), @@ -14,7 +14,7 @@ format ["ACE %1", LLSTRING(Category)], [0, 10, DEFAULT_DISTANCE, 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(speed), @@ -23,7 +23,7 @@ format ["ACE %1", LLSTRING(Category)], [0, 30, DEFAULT_SPEED, 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(priority), @@ -32,7 +32,7 @@ format ["ACE %1", LLSTRING(Category)], [[0, 1, 2, 3], ["str_getin_pos_driver", "str_getin_pos_gunn", "str_getin_pos_comm", "str_getin_pos_passenger"], DEFAULT_PRIORITY], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableMenu), @@ -49,4 +49,4 @@ ], 3 ] -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/quickmount/stringtable.xml b/addons/quickmount/stringtable.xml index d53a4b2b10..58c4f56e09 100644 --- a/addons/quickmount/stringtable.xml +++ b/addons/quickmount/stringtable.xml @@ -14,6 +14,7 @@ Entrada Rápida Entrée rapide Rychlé nastoupení + Entrada rápida Vehicle quick mount @@ -28,6 +29,7 @@ Entrada Rápida em Veículo Entrée rapide véhicules Rychlé nastoupení do vozidla + Entrada rápida vehículo Quickly enter the vehicle you are directly looking at. @@ -43,6 +45,7 @@ Permet d'entrer rapidement dans le véhicule que vous regardez. Rychle nastoupit do vozidla na které se díváte. Doğrudan bakmakta olduğunuz araca hızla girin. + Entrar rápidamente al vehículo al que estás mirando Vehicle Full @@ -58,6 +61,7 @@ Véhicule plein Vozidlo je plné Araç Dolu + Vehículo completo This option allows quick entry into the vehicle you are directly looking at. @@ -70,6 +74,7 @@ Bu seçenek, doğrudan bakmakta olduğunuz araca hızlı giriş sağlar. Tato možnost umožňuje rychle nastoupit do vozidla na které se díváte. Эта опция разрешает быстро залезть в транспорт, на который вы смотрите. + Esta opción permite entrar rápidamente al vehículo al que estás mirando Distance @@ -85,6 +90,7 @@ Distance Vzdálenost Mesafe + Distancia Maximum distance to check for vehicles. @@ -100,6 +106,7 @@ Distance de vérification maximale des véhicules. Maximální vzdálenost od vozidel. Araçların kontrol edilmesi için maksimum mesafe. + Distancia máxima para comprobar vehículos Vehicle Locked @@ -115,6 +122,7 @@ Véhicule verrouillé Vozidlo je zamčeno Araç Kilitli + Vehículo bloqueado Maximum Speed (km/h) @@ -130,6 +138,7 @@ Vitesse maximale (km/h) Maximální rychlost (km/h) Yüksek Hız (km/h) + Velocidad máxima (km/h) Maximum vehicle speed (km/h) allowed for player entry @@ -145,6 +154,7 @@ Définit la vitesse maximale que peut avoir un véhicule en mouvement pour qu'un joueur réussisse à y entrer. Maximální rychlost vozidla (km/h) při které hráči mohou nastoupit do vozidla Oyuncu binmesi için izin verilen maksimum araç hızı (km / s) + Máxima velocidad del vehículo (km/h) para permitir la entrada de jugadores Prioritize Seat @@ -160,6 +170,7 @@ Place prioritaire Priorita sedadel Koltuğa Öncelik Ver + Asiento prioritario Seat priority on entry @@ -175,6 +186,7 @@ Définit à quel poste s'asseoir en priorité lors de l'embarquement. Priorita sedadla při nástupu Araça binerken koltuk önceliği + Asiento prioritario en entrada Change seat @@ -188,6 +200,7 @@ Changer de place Změnit sedadlo Koltuk Değiştir + Cambiar asiento diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 658868a026..0340620ff5 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1787,6 +1787,7 @@ Metis-M Metis-M Metis-M + Metis-M Metis-M (Brown) @@ -2885,6 +2886,7 @@ Jeep Wrangler (SPG-9) Jeep Wrangler (SPG-9) Jeep Wrangler (SPG-9) + Jeep Wrangler (SPG-9) Jeep Wrangler (LMG) @@ -2899,6 +2901,7 @@ Jeep Wrangler (LMG) Jeep Wrangler (LMG) Jeep Wrangler (LMG) + Jeep Wrangler (LMG) Cessna TTx diff --git a/addons/rearm/Cfg3DEN.hpp b/addons/rearm/Cfg3DEN.hpp index 05eb3c05ff..05581e7206 100644 --- a/addons/rearm/Cfg3DEN.hpp +++ b/addons/rearm/Cfg3DEN.hpp @@ -1,5 +1,5 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) -#define DEFAULT_REARMCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(defaultSupply),-1) +#define DEFAULT_REARMCARGO GET_NUMBER(configOf _this >> QQGVAR(defaultSupply),-1) class Cfg3DEN { diff --git a/addons/rearm/functions/fnc_addMagazineToSupply.sqf b/addons/rearm/functions/fnc_addMagazineToSupply.sqf index 1f646e3598..cb9156ef9a 100644 --- a/addons/rearm/functions/fnc_addMagazineToSupply.sqf +++ b/addons/rearm/functions/fnc_addMagazineToSupply.sqf @@ -49,7 +49,7 @@ if (GVAR(supply) == 2) then { private _magazineIdx = -1; { _x params ["_magazine", "_rounds"]; - if ((_magazine isEqualTo _magazineClass)) exitWith { + if (_magazine isEqualTo _magazineClass) exitWith { _magazineIdx = _forEachIndex; }; } forEach _magazineSupply; diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index 480cc90007..86db3eef78 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -43,8 +43,8 @@ private _vehicleActions = []; TRACE_2("can add",_x,_magazineHelper); - if (!(_magazineHelper isEqualTo [])) then { - private _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon"); + if (_magazineHelper isNotEqualTo []) then { + private _icon = getText(configOf _vehicle >> "Icon"); if !((_icon select [0, 1]) == "\") then { _icon = ""; }; @@ -52,7 +52,7 @@ private _vehicleActions = []; // [Level 0] adds a single action to rearm the entire vic private _action = [ _vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + getText(configOf _vehicle >> "displayName"), _icon, {_this call FUNC(rearmEntireVehicle)}, {true}, @@ -79,7 +79,7 @@ private _vehicleActions = []; private _action = [ _vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + getText(configOf _vehicle >> "displayName"), _icon, {}, {true}, @@ -92,7 +92,7 @@ private _vehicleActions = []; }; } forEach _vehicles; -if (!(_cswCarryMagazines isEqualTo [])) then { +if (_cswCarryMagazines isNotEqualTo []) then { _cswCarryMagazines = _cswCarryMagazines arrayIntersect _cswCarryMagazines; _cswCarryMagazines = _cswCarryMagazines select {[_truck, _x] call FUNC(hasEnoughSupply)}; private _baseAction = [QGVAR(cswTake), "CSW", "", {}, {true}] call EFUNC(interact_menu,createAction); diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf index 9dbcf463eb..2dce270741 100644 --- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf +++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf @@ -30,7 +30,7 @@ params ["_vehicle"]; private _magazineInfo = []; // 1.70 pylons -private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; +private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; { private _pylonConfig = _x; @@ -41,14 +41,14 @@ private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf private _pylonMagazine = (getPylonMagazines _vehicle) select (_pylonIndex - 1); // Only care about pylons that have a magazine. - if (!(_pylonMagazine isEqualTo "")) then { + if (_pylonMagazine isNotEqualTo "") then { private _maxRounds = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count"); private _currentRounds = _vehicle ammoOnPylon _pylonIndex; if (_currentRounds < _maxRounds) then { // getPylonTurret expects 0 based index, and returns driver turret as [-1] - private _pylonTurret = [_vehicle, (_pylonIndex - 1)] call EFUNC(common,getPylonTurret); + private _pylonTurret = [_vehicle, _forEachIndex] call EFUNC(common,getPylonTurret); _magazineInfo pushBack [_pylonMagazine, _pylonTurret, true, _pylonIndex, 1, 1, _maxRounds, [_currentRounds]]; }; diff --git a/addons/rearm/functions/fnc_getSupplyCount.sqf b/addons/rearm/functions/fnc_getSupplyCount.sqf index 892764b76f..87a1dd1ee8 100644 --- a/addons/rearm/functions/fnc_getSupplyCount.sqf +++ b/addons/rearm/functions/fnc_getSupplyCount.sqf @@ -25,8 +25,8 @@ if (GVAR(supply) != 1) exitWith { private _supply = _truck getVariable QGVAR(currentSupply); if (isNil "_supply") then { - if (isNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply))) then { - _supply = getNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply)); + if (isNumber (configOf _truck >> QGVAR(defaultSupply))) then { + _supply = getNumber (configOf _truck >> QGVAR(defaultSupply)); } else { _supply = 1200; }; diff --git a/addons/rearm/functions/fnc_isSource.sqf b/addons/rearm/functions/fnc_isSource.sqf index 175ab60f8e..c79c78308c 100644 --- a/addons/rearm/functions/fnc_isSource.sqf +++ b/addons/rearm/functions/fnc_isSource.sqf @@ -22,7 +22,7 @@ params [ if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false}; -private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target; +private _vehCfg = configOf _target; private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo"); private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply)); private _supplyVehicle = _target getVariable [QGVAR(isSupplyVehicle), false]; diff --git a/addons/rearm/functions/fnc_makeSource.sqf b/addons/rearm/functions/fnc_makeSource.sqf index c96c3a214a..36f3fba553 100644 --- a/addons/rearm/functions/fnc_makeSource.sqf +++ b/addons/rearm/functions/fnc_makeSource.sqf @@ -41,7 +41,7 @@ private _currentSupply = if (_addToCurrent) then { _source setVariable [QGVAR(currentSupply), _currentSupply + _rearmCargo, true]; -private _rearmCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(defaultSupply)); +private _rearmCargoConfig = getNumber (configOf _source >> QGVAR(defaultSupply)); // already initialized because this is a config rearm vehicle if (_rearmCargoConfig > 0 || _source getVariable [QGVAR(isSupplyVehicle), false]) exitWith {}; diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index 6b5a3da12c..779ebf2d51 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -43,7 +43,7 @@ private _magazineDisplayName = _magazineClass call FUNC(getMagazineName); [_target, _unit, _turretPath, _magazineCount, _magazineClass, (REARM_COUNT select _idx), _pylon], {(_this select 0) call FUNC(rearmSuccess)}, "", - format [localize LSTRING(RearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName"), _magazineDisplayName], + format [localize LSTRING(RearmAction), getText(configOf _target >> "displayName"), _magazineDisplayName], { param [0] params ["_target", "_unit"]; _player distance _target <= GVAR(distance); diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf index df06d384d4..945a0c0632 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf @@ -25,7 +25,7 @@ TRACE_3("rearmEntireVehicle",_truck,_player,_vehicle); [_truck, _vehicle, _player], {(_this select 0) call FUNC(rearmEntireVehicleSuccess)}, "", - format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], + format [localize LSTRING(BasicRearmAction), getText(configOf _vehicle >> "displayName")], { param [0] params ["", "_vehicle", "_player"]; _player distance _vehicle <= GVAR(distance); diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index 922d25b646..282a38b4e9 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -34,7 +34,7 @@ if (_pylon > 0) exitWith { _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; } else { // Fill only at most _numRounds if (_turretPath isEqualTo [-1]) then {_turretPath = [];}; // Convert back to pylon turret format @@ -45,7 +45,7 @@ if (_pylon > 0) exitWith { _vehicle setAmmoOnPylon [_pylon, _newCount]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; }; }; @@ -90,4 +90,4 @@ if (_ammoAdded == 0) exitWith {ERROR_1("could not load any ammo - %1",_this);}; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _ammoAdded, _magazineClass call FUNC(getMagazineName), -getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; +getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; diff --git a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf index b6e6c4d0d2..af18dd8c47 100644 --- a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf +++ b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf @@ -57,7 +57,7 @@ if (GVAR(supply) == 2) then { private _magazineIdx = -1; { _x params ["_magazine"]; - if ((_magazine isEqualTo _magazineClass)) exitWith { + if (_magazine isEqualTo _magazineClass) exitWith { _magazineIdx = _forEachIndex; }; } forEach _magazineSupply; diff --git a/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf b/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf index a8b83c723a..a999077d57 100644 --- a/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf +++ b/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf @@ -77,7 +77,7 @@ if (!_magLoadedInWeapon) then { { _x params ["_loopMagClass", "_loopAmmoCounts"]; - if (!(_loopMagClass isEqualTo _magazineClass)) then { + if (_loopMagClass isNotEqualTo _magazineClass) then { { _vehicle addMagazineTurret [_loopMagClass, _turretPath, _x]; } forEach _loopAmmoCounts; diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index 18b316d601..f693724323 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -33,7 +33,7 @@ private _magazineClass = _attachedDummy getVariable [QGVAR(magazineClass), "#noV [_unit, true, true] call FUNC(dropAmmo); }, "", - format [localize LSTRING(StoreAmmoAction), _magazineClass call FUNC(getMagazineName), getText(configFile >> "CfgVehicles" >> (typeOf _truck) >> "displayName")], + format [localize LSTRING(StoreAmmoAction), _magazineClass call FUNC(getMagazineName), getText(configOf _truck >> "displayName")], {true}, ["isnotinside"] ] call EFUNC(common,progressBar); diff --git a/addons/rearm/functions/fnc_takeAmmo.sqf b/addons/rearm/functions/fnc_takeAmmo.sqf index 1c1e325de8..12678b48c6 100644 --- a/addons/rearm/functions/fnc_takeAmmo.sqf +++ b/addons/rearm/functions/fnc_takeAmmo.sqf @@ -30,7 +30,7 @@ REARM_HOLSTER_WEAPON; private _targetName = if (_vehicle == _unit) then { "CSW" } else { - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName") + getText(configOf _vehicle >> "displayName") }; [ diff --git a/addons/rearm/initSettings.sqf b/addons/rearm/initSettings.sqf index 3cac2fead7..08494ae582 100644 --- a/addons/rearm/initSettings.sqf +++ b/addons/rearm/initSettings.sqf @@ -7,7 +7,7 @@ [[0,1,2],[LSTRING(RearmSettings_vehicle), LSTRING(RearmSettings_magazine), LSTRING(RearmSettings_caliber)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(level), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(supply), "LIST", @@ -16,7 +16,7 @@ [[0,1,2],[LSTRING(RearmSettings_unlimited), LSTRING(RearmSettings_limited), LSTRING(RearmSettings_magazineSupply)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(distance), "SLIDER", @@ -25,4 +25,4 @@ [10, 50, 20, 0], true, // isGlobal {[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index bed3517f83..4aae2a1aeb 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -13,6 +13,7 @@ Перевооружение Rearme Přezbrojení + Rearmar Rearm Settings @@ -132,6 +133,7 @@ Запас боеприпасов Suprimento de Munições Zásoba munice + Suministro de munición How much ammunition does an ammo truck carry? @@ -146,6 +148,7 @@ Какой боезапас перевозит грузовик с боеприпасами? Quanta munição um caminhão de munições carrega? Kolik munice naklaďák uveze? + ¿Cuánta munición carga el camión de armamento? Unlimited ammo supply @@ -160,6 +163,7 @@ Неограниченный боезапас Suprimento Ilimitado de Munição Nekonečná zásoba + Suministro de munición ilimitado Limited ammo supply based on caliber @@ -174,6 +178,7 @@ Ограниченный боезапас в зависимости от калибра Munição Limitada ao Calibre Konečná zásoba v závislosti na kalibru + Suministro de munición limitado en base al calibre Only specific Magazines @@ -188,6 +193,7 @@ Только определенные магазины Apenas carregadores específicos Pouze specifické zásobníky + Únicamente cargadores específicos Check remaining ammunition @@ -202,6 +208,7 @@ Проверить остаток БК Checar munição restante Zkontrolovat zbývající munici + Comprobar munición restante Checking remaining ammunition... @@ -216,6 +223,7 @@ Проверка остатка боекомплекта... Checando Munição... Kontroluji zbývající munici... + Comprobando munición restante... There is ammunition worth %1 points left. @@ -230,6 +238,7 @@ Остаток единиц БК: %1 Possui munição equivalente a %1 pontos restantes. Zbývá ještě %1 muničních bodů. + Queda munición equivalente a un 1% The following ammunition is left:%1 @@ -244,6 +253,7 @@ Оставшийся боекомплект: %1 A munição que restou: %1 Zbývá následující munice:%1 + Queda la siguiente munición: 1% There is no ammunition left. @@ -258,6 +268,7 @@ Запас боекомплекта пуст Não há munição sobrando. Už nezbývá žádná munice. + No queda munición Rearm @@ -647,6 +658,7 @@ 整裝用貨物 Stock de munitions Sklad munice + Cargar munición The cargo for rearming (-1 disable) @@ -659,6 +671,7 @@ 貨物可以提高多少次整裝(-1為停用) Le quantité de munitions (en points), qui est disponible pour du réarmement (-1 pour désactiver). Objekt pro přezbrojování (-1 pro vypnutí) + Cantidad de munición restante para rearmado (-1 para deshabilitar) Rearm distance @@ -671,6 +684,7 @@ Přezbrojovací vzdálenost Odległość przezbrojenia Дистанция перевооружения + Distancia de rearmado The maximum distance a vehicle can be rearmed at @@ -683,6 +697,7 @@ Maximální vzdálenost na jakou může být vozidlo přezbrojeno Maksymalna odległość na jakiej pojazd może zostać przezbrojony Максимальная дистанция для перевооружения + Máxima distancia a la que un vehículo puede ser rearmado diff --git a/addons/refuel/Cfg3DEN.hpp b/addons/refuel/Cfg3DEN.hpp index 3dbc91c2cf..3383107995 100644 --- a/addons/refuel/Cfg3DEN.hpp +++ b/addons/refuel/Cfg3DEN.hpp @@ -1,8 +1,8 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define GET_1ST_ARRAY(config) (if (isArray (config)) then {getArray (config) select 0} else {[ARR_3(0,0,0)]}) -#define DEFAULT_FUELCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL) -#define DEFAULT_HOOKS GET_1ST_ARRAY(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(hooks)) +#define DEFAULT_FUELCARGO GET_NUMBER(configOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL) +#define DEFAULT_HOOKS GET_1ST_ARRAY(configOf _this >> QQGVAR(hooks)) class Cfg3DEN { class Object { @@ -25,7 +25,7 @@ class Cfg3DEN { tooltip = CSTRING(hooks_edenDesc); property = QGVAR(hooks); control = "EditXYZ"; - expression = QUOTE(if !(_value isEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]}); + expression = QUOTE(if (_value isNotEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]}); defaultValue = QUOTE(DEFAULT_HOOKS); condition = "(1-objectBrain)*(1-objectAgent)"; }; diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf index e6c0ad5b93..14e9b439c9 100644 --- a/addons/refuel/XEH_postInit.sqf +++ b/addons/refuel/XEH_postInit.sqf @@ -86,7 +86,7 @@ _cacheRefuelClasses params [["_staticClasses", [], [[]]], ["_dynamicClasses", [] #ifdef DRAW_HOOKS_POS addMissionEventHandler ["Draw3D", { private _source = cursorObject; - private _cfgPos = getArray (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(hooks)); + private _cfgPos = getArray (configOf _source >> QGVAR(hooks)); private _dynPos = _source getVariable [QGVAR(hooks), []]; { drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,1,1,1], _source modelToWorldVisual _x, 1, 1, 0, format ["Hook %1", _forEachIndex]]; diff --git a/addons/refuel/functions/fnc_getFuel.sqf b/addons/refuel/functions/fnc_getFuel.sqf index ecba330363..a51b6df411 100644 --- a/addons/refuel/functions/fnc_getFuel.sqf +++ b/addons/refuel/functions/fnc_getFuel.sqf @@ -22,7 +22,7 @@ if (isNull _source) exitWith {0}; private _fuel = _source getVariable QGVAR(currentFuelCargo); if (isNil "_fuel") then { - _fuel = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(fuelCargo)); + _fuel = getNumber (configOf _source >> QGVAR(fuelCargo)); _source setVariable [QGVAR(currentFuelCargo), _fuel, true]; }; diff --git a/addons/refuel/functions/fnc_makeSource.sqf b/addons/refuel/functions/fnc_makeSource.sqf index 7b2179adab..5553e1a906 100644 --- a/addons/refuel/functions/fnc_makeSource.sqf +++ b/addons/refuel/functions/fnc_makeSource.sqf @@ -32,7 +32,7 @@ params [ ]; TRACE_3("makeSource",_source,_fuelCargo,_hooks); -private _fuelCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(fuelCargo)); +private _fuelCargoConfig = getNumber (configOf _source >> QGVAR(fuelCargo)); if ( isNull _source diff --git a/addons/refuel/functions/fnc_onMouseButtonDown.sqf b/addons/refuel/functions/fnc_onMouseButtonDown.sqf index 2111be99e8..184ede22eb 100644 --- a/addons/refuel/functions/fnc_onMouseButtonDown.sqf +++ b/addons/refuel/functions/fnc_onMouseButtonDown.sqf @@ -45,7 +45,7 @@ if (cameraView == "EXTERNAL") then { if ( !isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE} - && {1 == getNumber (configFile >> "CfgVehicles" >> (typeOf _cursorObject) >> QGVAR(canReceive))} + && {1 == getNumber (configOf _cursorObject >> QGVAR(canReceive))} && {isNull (_cursorObject getVariable [QGVAR(nozzle), objNull])} && {!lineIntersects [eyePos _unit, _virtualPosASL, _unit]} ) then { diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index f3e042cd56..0104c45a5c 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -20,7 +20,7 @@ params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]]; -private _config = configFile >> "CfgVehicles" >> typeOf _sink; +private _config = configOf _sink; private _rate = getNumber (_config >> QGVAR(flowRate)) * GVAR(rate); private _maxFuel = getNumber (_config >> QGVAR(fuelCapacity)); diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 9fae9abdab..7922a9cb91 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -38,7 +38,7 @@ TRACE_2("start",_unit,_nozzle); alive _unit && {"" isEqualTo currentWeapon _unit || {_unit call EFUNC(common,isSwimming)}} && {[_unit, objNull, [INTERACT_EXCEPTIONS, "notOnMap"]] call EFUNC(common,canInteractWith)} - && {!("unconscious" isEqualTo toLower animationState _unit)} + && {"unconscious" isNotEqualTo toLower animationState _unit} && {!(_unit getVariable ["ACE_isUnconscious", false])} ) exitWith { TRACE_3("stop dead/weapon/interact/uncon",_unit,alive _unit,currentWeapon _unit); @@ -71,7 +71,7 @@ TRACE_2("start",_unit,_nozzle); END_PFH }; - if !(_unit == vehicle _unit && {_unit isEqualTo ACE_player}) exitWith { + if (_unit == vehicle _unit && {_unit isNotEqualTo ACE_player}) exitWith { TRACE_2("stop vehicle/player",_unit,vehicle _unit); DROP_NOZZLE UNHOLSTER_WEAPON @@ -96,7 +96,7 @@ TRACE_2("start",_unit,_nozzle); getCursorObjectParams params ["_cursorObject", "", "_distance"]; if (!isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE}) then { if ( - 1 == getNumber (configFile >> "CfgVehicles" >> (typeOf _cursorObject) >> QGVAR(canReceive)) + 1 == getNumber (configOf _cursorObject >> QGVAR(canReceive)) && {isNull (_cursorObject getVariable [QGVAR(nozzle), objNull])} ) then { _hintLMB = localize LSTRING(Connect); @@ -107,7 +107,7 @@ TRACE_2("start",_unit,_nozzle); }; private _hint = [_hintLMB, _hintRMB]; - if !(_hint isEqualTo (_unit getVariable [QGVAR(hint), []])) then { + if (_hint isNotEqualTo (_unit getVariable [QGVAR(hint), []])) then { _unit setVariable [QGVAR(hint), _hint]; _hint call EFUNC(interaction,showMouseHint); }; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 83e38c1be6..7ce0a9d808 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -47,7 +47,7 @@ params [ if !(_source isKindOf "AllVehicles") then { private _helper = QGVAR(helper) createVehicle [0,0,0]; [QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent; - if ((getText (configFile >> "CfgVehicles" >> typeOf _source >> "simulation")) isEqualTo "thingX") then { + if ((getText (configOf _source >> "simulation")) isEqualTo "thingX") then { _helper attachTo [_source, [0,0,0]]; } else { _helper setPosWorld (getPosWorld _source); @@ -57,7 +57,7 @@ params [ _nozzle setVariable [QGVAR(helper), _helper, true]; _ropeTarget = _helper; }; - private _attachPos = _source getVariable [QGVAR(hooks), getArray (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(hooks))]; + private _attachPos = _source getVariable [QGVAR(hooks), getArray (configOf _source >> QGVAR(hooks))]; if (_attachPos isEqualTo []) then { _attachPos = [[0,0,0]]; }; diff --git a/addons/refuel/initSettings.sqf b/addons/refuel/initSettings.sqf index b16cff3230..deb6c2adee 100644 --- a/addons/refuel/initSettings.sqf +++ b/addons/refuel/initSettings.sqf @@ -7,7 +7,7 @@ [0,25,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(rate), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(hoseLength), "SLIDER", @@ -16,4 +16,4 @@ [0,50,12,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index eb6002c54e..01459451d2 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -303,6 +303,7 @@ Impossible de démarrer la pompe Nepodařilo se zapnout trysku Yakıt pompası başlatılamadı + No se pudo activar la boquilla de la manguera %1 Liters fueled @@ -494,6 +495,7 @@ Volume de la citerne Objem palivové cisterny Doldurma Hız + Volumen del depósito @@ -509,6 +511,7 @@ Quantidade de combustível disponível para abastecer (-1 para desativar, -10 para infinito) Le volume de carburant disponible pour le ravitaillement (-1 pour désactiver, -10 pour quantité illimitée). Objem paliva k tankování (-1 pro vypnutí, -10 pro nekonečno) + El volumen de combustible disponible para llenar (-1 desactivado, -10 es infinito) Refuel Hose attach coordinates @@ -523,6 +526,7 @@ Coords. do encaixe para Mangueira Coordonnées du pistolet Souřadnice pro připojení hadice na palivo + Coordenadas de la boquilla de la manguera Model coordinates used to attach refuel hose @@ -537,6 +541,7 @@ As coordenadas do modelo usado para conectar a mangueira ao veículo Coordonnées du modèle 3D où est attaché le tuyau ravitaillement. Souřadnice na modelu pro připojení hadice na palivo. + Coordenadas del modelo usado para la boquilla de la manguera diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index deecdd5cdd..07d8cd605a 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -43,6 +43,7 @@ Toujours afficher l'action de vérification des munitions Sempre mostrar a opção de checar a própria munição Всегда показывать проверку боеприпасов в меню взаимодействия с собой + Mostrar siempre la autointeracción de comprobar munición Shows check ammo self interaction even when not in static weapons. @@ -54,6 +55,7 @@ Permet d'afficher l'action de vérification des munitions du menu d'interaction personnel, même si le joueur n'utilise pas d'arme statique. Mostra a opção de ver sua própria munição mesmo quando não em armas estáticas. Показывать проверку боеприпасов даже вне стационарного орудия + Mostrar la comprobación de la munición incluso cuando no está en armas estáticas Check Ammo diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index 03614b3a2f..3edc9420b0 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,7 +1,7 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) -#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),0) +#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configOf _this >> QQGVAR(canRepair),0) class ctrlToolbox; diff --git a/addons/repair/dev/draw_showRepairInfo.sqf b/addons/repair/dev/draw_showRepairInfo.sqf index 3a1f0c8d0f..b5516d6b98 100644 --- a/addons/repair/dev/draw_showRepairInfo.sqf +++ b/addons/repair/dev/draw_showRepairInfo.sqf @@ -5,7 +5,7 @@ addMissionEventHandler ["Draw3D", { if !((cursorObject isKindOf "Car") || (cursorObject isKindOf "Tank") || (cursorObject isKindOf "Air")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _config = configOf cursorObject; private _hitpointPositions = getArray (_config >> QGVAR(hitpointPositions)); private _hitpointGroups = getArray (_config >> QGVAR(hitpointGroups)); diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 96eff28d4a..af9c78361e 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -92,7 +92,7 @@ private _turretPaths = ((fullCrew [_vehicle, "gunner", true]) + (fullCrew [_vehi { private _turretHitpointCfg = ([_vehCfg, _x] call CBA_fnc_getTurret) >> "HitPoints"; private _hitpointsCfg = "configName _x == _hitpoint" configClasses _turretHitpointCfg; - if (!(_hitpointsCfg isEqualTo [])) exitWith { + if (_hitpointsCfg isNotEqualTo []) exitWith { TRACE_2("turret hitpoint configFound",_hitpoint,_x); // only do turret hitpoints for now or we get some weird stuff if ((_hitpoint in ["hitturret", "hitgun"]) || {(getNumber (_hitpointsCfg # 0 >> "isGun")) == 1} || {(getNumber (_hitpointsCfg # 0 >> "isTurret")) == 1}) then { diff --git a/addons/repair/functions/fnc_canMiscRepair.sqf b/addons/repair/functions/fnc_canMiscRepair.sqf index b9fe842a19..2fc4c2b3d6 100644 --- a/addons/repair/functions/fnc_canMiscRepair.sqf +++ b/addons/repair/functions/fnc_canMiscRepair.sqf @@ -24,7 +24,7 @@ params ["_caller", "_target", "_hitPointIndex"]; if !([_caller, _target, ["isNotDragging", "isNotCarrying", "isNotSwimming", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Get hitpoint groups if available -private _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups); +private _hitpointGroupConfig = configOf _target >> QGVAR(hitpointGroups); private _hitpointGroup = []; if (isArray _hitpointGroupConfig) then { private _hitPointClassname = _allHitPoints select _hitPointIndex; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 2b9ac71364..e6873649cb 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -95,7 +95,7 @@ if (!_return) exitWith {false}; //Check that there are required objects nearby private _requiredObjects = getArray (_config >> "claimObjects"); -if (!(_requiredObjects isEqualTo [])) then { +if (_requiredObjects isNotEqualTo []) then { private _objectsAvailable = [_caller, 5, _requiredObjects] call FUNC(getClaimObjects); if (_objectsAvailable isEqualTo []) then { TRACE_2("Missing Required Objects",_requiredObjects,_objectsAvailable); diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf index c17858d8b3..1b6f497d8e 100644 --- a/addons/repair/functions/fnc_doRepair.sqf +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -39,7 +39,7 @@ if (_hitPointNewDamage < _hitPointCurDamage) then { }; // Get hitpoint groups if available -private _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(hitpointGroups); +private _hitpointGroupConfig = configOf _vehicle >> QGVAR(hitpointGroups); if (isArray _hitpointGroupConfig) then { // Retrieve hitpoint subgroup if current hitpoint is main hitpoint of a group { diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index d8ed7d3804..cf0ff923bd 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -21,7 +21,7 @@ TRACE_1("params",_unit); //If in facility or near vehicle then complete repair of hitpoint: if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0}; -private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")]; +private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configOf _unit >> "engineer")]; //If advanced or more qualified than min, then use engineer threshold: if ((_class isEqualTo 2) || {[_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)}) exitWith { (GVAR(repairDamageThreshold_Engineer) min GVAR(repairDamageThreshold)) diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index fe072859b2..9a5d32fdd9 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -20,7 +20,7 @@ params ["_vehicle"]; TRACE_1("params",_vehicle); // get the vehicles wheel config -private _wheels = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; +private _wheels = configOf _vehicle >> "Wheels"; // exit with nothing if the vehicle has no wheels class if !(isClass _wheels) exitWith {TRACE_1("No Wheels",_wheels); [[],[]]}; diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index dcbd141fb7..1693297494 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -23,7 +23,7 @@ private _isInBuilding = false; private _checkObject = { if ( - _x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0 + _x getVariable ["ACE_isRepairFacility", getNumber (configOf _x >> QGVAR(canRepair))] > 0 && {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle && {alive _x} ) exitWith { diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 6e7ddcab27..dd2f69f34c 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -21,5 +21,5 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; // Value can be integer or boolean -private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]; +private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configOf _vehicle >> QGVAR(canRepair))]; _value in [1, true] // return diff --git a/addons/repair/functions/fnc_normalizeHitPoints.sqf b/addons/repair/functions/fnc_normalizeHitPoints.sqf index 5a33151875..aef2b7ae21 100644 --- a/addons/repair/functions/fnc_normalizeHitPoints.sqf +++ b/addons/repair/functions/fnc_normalizeHitPoints.sqf @@ -23,7 +23,7 @@ if !(local _vehicle) exitWith {ERROR_1("Vehicle Not Local %1", _vehicle);}; (getAllHitPointsDamage _vehicle) params [["_allHitPoints", []]]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints"; +private _config = configOf _vehicle >> "HitPoints"; private _realHitPoints = []; private _dependentHitPoints = []; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 1c0707f7ed..6b5094fb28 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -99,7 +99,7 @@ if (!("All" in _repairLocations)) then { private _requiredObjects = getArray (_config >> "claimObjects"); private _claimObjectsAvailable = []; -if (!(_requiredObjects isEqualTo [])) then { +if (_requiredObjects isNotEqualTo []) then { _claimObjectsAvailable = [_caller, 5, _requiredObjects] call FUNC(getClaimObjects); if (_claimObjectsAvailable isEqualTo []) then { TRACE_2("Missing Required Objects",_requiredObjects,_claimObjectsAvailable); @@ -181,7 +181,7 @@ private _soundPosition = AGLToASL (_caller modelToWorldVisual (_caller selection // Get repair time private _repairTime = [ - configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(repairTimes) >> configName _config, + configOf _target >> QGVAR(repairTimes) >> configName _config, "number", -1 ] call CBA_fnc_getConfigEntry; diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index 0e8a805689..1bb98e702e 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -44,7 +44,7 @@ private _hitPointDamageRepaired = 0; //positive for repairs : newSum = (oldSum - if ((!isNil {_vehicle getHit _selectionName}) && {_x != ""}) then { _realHitpointCount = _realHitpointCount + 1; - if ((((toLower _x) find "glass") == -1) && {(getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { + if ((((toLower _x) find "glass") == -1) && {(getText (configOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { _hitPointDamageSumOld = _hitPointDamageSumOld + (_allHitPointDamages select _forEachIndex); if (_forEachIndex == _hitPointIndex) then { _hitPointDamageRepaired = (_allHitPointDamages select _forEachIndex) - _hitPointDamage; diff --git a/addons/repair/initSettings.sqf b/addons/repair/initSettings.sqf index 38e9e19e97..2e64f01208 100644 --- a/addons/repair/initSettings.sqf +++ b/addons/repair/initSettings.sqf @@ -5,7 +5,7 @@ true, // default value false, // isGlobal {[QGVAR(displayTextOnRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_repair), "LIST", @@ -14,7 +14,7 @@ [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],1], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_repair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_wheel), "LIST", @@ -23,7 +23,7 @@ [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_wheel), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(repairDamageThreshold), "SLIDER", @@ -32,7 +32,7 @@ [0,1,0.6,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(repairDamageThreshold), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(repairDamageThreshold_engineer), "SLIDER", @@ -41,7 +41,7 @@ [0,1,0.4,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(repairDamageThreshold_engineer), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumeItem_toolKit), "LIST", // fnc_repair expects number @@ -50,7 +50,7 @@ [[0,1],[ELSTRING(common,No), ELSTRING(common,Yes)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(consumeItem_toolKit), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fullRepairLocation), "LIST", @@ -59,7 +59,7 @@ [[0,1,2,3,4],[LSTRING(useAnywhere), LSTRING(repairVehicleOnly), LSTRING(repairFacilityOnly), LSTRING(vehicleAndFacility), ELSTRING(common,Disabled)],2], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(fullRepairLocation), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_fullRepair), "LIST", @@ -68,7 +68,7 @@ [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],2], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_fullRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(addSpareParts), "CHECKBOX", @@ -78,7 +78,7 @@ true, // isGlobal {[QGVAR(addSpareParts), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(wheelRepairRequiredItems), @@ -87,7 +87,7 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(miscRepairRequiredItems), @@ -96,7 +96,7 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fullRepairRequiredItems), @@ -105,7 +105,7 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(autoShutOffEngineWhenStartingRepair), "CHECKBOX", @@ -114,4 +114,4 @@ false, // default value true, // isGlobal {[QGVAR(autoShutOffEngineWhenStartingRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 9311f2a351..558a47df02 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -14,6 +14,7 @@ Réapparition Znovuzrození Yeniden Doğma + Reaparición Deploy in 5 seconds... @@ -304,6 +305,7 @@ Minuterie enlèvement corps Časovač odstranění mrtvol Bedenin Silinme Süresi + Temporizador para eliminar cuerpos This module enables you to configure ACE functionality specific to respawns. diff --git a/addons/safemode/functions/fnc_setWeaponSafety.sqf b/addons/safemode/functions/fnc_setWeaponSafety.sqf index 4ad0174b20..54732857af 100644 --- a/addons/safemode/functions/fnc_setWeaponSafety.sqf +++ b/addons/safemode/functions/fnc_setWeaponSafety.sqf @@ -31,6 +31,6 @@ _weapon = configName (configFile >> "CfgWeapons" >> _weapon); private _muzzle = currentMuzzle _unit; -if !(_state isEqualTo (_weapon in _safedWeapons)) then { +if (_state isNotEqualTo (_weapon in _safedWeapons)) then { [_unit, _weapon, _muzzle] call FUNC(lockSafety); }; diff --git a/addons/scopes/ACE_Arsenal_Stats.hpp b/addons/scopes/ACE_Arsenal_Stats.hpp index 1e2ebd91ea..06143be886 100644 --- a/addons/scopes/ACE_Arsenal_Stats.hpp +++ b/addons/scopes/ACE_Arsenal_Stats.hpp @@ -7,7 +7,7 @@ class EGVAR(arsenal,stats) { displayName = CSTRING(statHorizontalLimits); showText = 1; textStatement = QUOTE(params[ARR_2('_stat','_config')]; private _limits = getArray (_config >> _stat select 0); format [ARR_4('%1 / %2 MIL (∆ %3 MIL)', _limits select 0, _limits select 1, getNumber (_config >> _stat select 1))]); - condition = QUOTE(params[ARR_2('_stat', '_config')]; !((getArray (_config >> _stat select 0)) isEqualTo [])); + condition = QUOTE(params[ARR_2('_stat', '_config')]; (getArray (_config >> _stat select 0)) isNotEqualTo []); tabs[] = {{}, {0}}; }; class ACE_scopeVerticalLimits: ACE_scopeHorizontalLimits { diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 68a76e6ffe..f295103d03 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -74,8 +74,8 @@ private _newOptics = [_player] call FUNC(getOptics); (GVAR(scopeAdjust) select _forEachIndex) set [1, _verticalIncrement]; (GVAR(scopeAdjust) select _forEachIndex) set [2, _maxHorizontal]; (GVAR(scopeAdjust) select _forEachIndex) set [3, _horizontalIncrement]; - GVAR(canAdjustElevation) set [_forEachIndex, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; - GVAR(canAdjustWindage) set [_forEachIndex, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; + GVAR(canAdjustElevation) set [_forEachIndex, (_verticalIncrement > 0) && (_maxVertical isNotEqualTo [0, 0])]; + GVAR(canAdjustWindage) set [_forEachIndex, (_horizontalIncrement > 0) && (_maxHorizontal isNotEqualTo [0, 0])]; }; } forEach GVAR(Optics); @@ -112,8 +112,8 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo (GVAR(scopeAdjust) select _x) set [1, _verticalIncrement]; (GVAR(scopeAdjust) select _x) set [2, _maxHorizontal]; (GVAR(scopeAdjust) select _x) set [3, _horizontalIncrement]; - GVAR(canAdjustElevation) set [_x, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; - GVAR(canAdjustWindage) set [_x, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; + GVAR(canAdjustElevation) set [_x, (_verticalIncrement > 0) && (_maxVertical isNotEqualTo [0, 0])]; + GVAR(canAdjustWindage) set [_x, (_horizontalIncrement > 0) && (_maxHorizontal isNotEqualTo [0, 0])]; }; // The optic or the weapon changed, reset the adjustment @@ -123,7 +123,7 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo _persistentZero = 0; }; private _defaultElevation = [0, 300] select GVAR(simplifiedZeroing); - if (!((_adjustment select _forEachIndex) isEqualTo [_defaultElevation, 0, _persistentZero])) then { + if ((_adjustment select _forEachIndex) isNotEqualTo [_defaultElevation, 0, _persistentZero]) then { _adjustment set [_forEachIndex, [_defaultElevation, 0, _persistentZero]]; _updateAdjustment = true; }; @@ -131,11 +131,11 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo } forEach [0, 1, 2]; if (GVAR(correctZeroing) || GVAR(simplifiedZeroing)) then { - if (!(_unitBaseAngle isEqualTo (_player getVariable [QGVAR(baseAngle), [0,0,0]]))) then { + if (_unitBaseAngle isNotEqualTo (_player getVariable [QGVAR(baseAngle), [0,0,0]])) then { TRACE_2("syncing",_unitBaseAngle,_player getVariable QGVAR(baseAngle)); _player setVariable [QGVAR(baseAngle), _unitBaseAngle, true]; }; - if (!(_unitBoreHeight isEqualTo (_player getVariable [QGVAR(boreHeight), [0,0,0]]))) then { + if (_unitBoreHeight isNotEqualTo (_player getVariable [QGVAR(boreHeight), [0,0,0]])) then { TRACE_2("syncing",_unitBoreHeight,_player getVariable QGVAR(boreHeight)); _player setVariable [QGVAR(boreHeight), _unitBoreHeight, true]; }; diff --git a/addons/spectator/functions/fnc_cam_toggleSlow.sqf b/addons/spectator/functions/fnc_cam_toggleSlow.sqf index 47ad2a2106..e6b8732cdb 100644 --- a/addons/spectator/functions/fnc_cam_toggleSlow.sqf +++ b/addons/spectator/functions/fnc_cam_toggleSlow.sqf @@ -17,7 +17,7 @@ params ["_slowSpeed"]; -if !(GVAR(camSlow) isEqualTo _slowSpeed) then { +if (GVAR(camSlow) isNotEqualTo _slowSpeed) then { private _camera = GVAR(camera); if (GVAR(camMode) == MODE_FREE) then { diff --git a/addons/spectator/functions/fnc_ui_draw3D.sqf b/addons/spectator/functions/fnc_ui_draw3D.sqf index 744e1bfe5e..6affd3f8b6 100644 --- a/addons/spectator/functions/fnc_ui_draw3D.sqf +++ b/addons/spectator/functions/fnc_ui_draw3D.sqf @@ -30,7 +30,7 @@ private _end = AGLToASL screenToWorld getMousePosition; if ((_start distanceSqr _end) <= DISTANCE_NAMES_SQR) then { private _intersections = lineIntersectsSurfaces [_start, _end, _camTarget, _camTargetVeh]; - if !(_intersections isEqualTo []) then { + if (_intersections isNotEqualTo []) then { _cursorObject = effectiveCommander ((_intersections select 0) select 3); }; }; @@ -112,7 +112,7 @@ if !(GVAR(uiMapVisible)) then { private _oldLoc = []; { _x params ["_locNew", "_colorNew"]; - if !(_oldLoc isEqualTo []) then { + if (_oldLoc isNotEqualTo []) then { drawLine3D [_oldLoc, _locNew, _colorNew]; }; _oldLoc = _locNew; diff --git a/addons/spectator/functions/fnc_ui_updateListEntities.sqf b/addons/spectator/functions/fnc_ui_updateListEntities.sqf index 640f860ec0..228dd86a27 100644 --- a/addons/spectator/functions/fnc_ui_updateListEntities.sqf +++ b/addons/spectator/functions/fnc_ui_updateListEntities.sqf @@ -35,7 +35,7 @@ private _entities = [true] call FUNC(getTargetEntities); // Include the group if it contains valid entities private _entitiesGroup = units _group arrayIntersect _entities; - if !(_entitiesGroup isEqualTo []) then { + if (_entitiesGroup isNotEqualTo []) then { // Cache the info of valid units in the group private _unitsInfo = []; { @@ -81,7 +81,7 @@ private _entities = [true] call FUNC(getTargetEntities); } forEach allGroups; // Whether an update to the list is required (really only if something changed) -if !(GVAR(curList) isEqualTo _newList) then { +if (GVAR(curList) isNotEqualTo _newList) then { private _ctrl = CTRL_LIST; // Remove groups/units that are no longer there diff --git a/addons/spectator/functions/fnc_ui_updateWidget.sqf b/addons/spectator/functions/fnc_ui_updateWidget.sqf index 32337eae3d..68a0c1fe4f 100644 --- a/addons/spectator/functions/fnc_ui_updateWidget.sqf +++ b/addons/spectator/functions/fnc_ui_updateWidget.sqf @@ -32,7 +32,7 @@ private _unitTypePicture = ""; private _vehicleTypePicture = ""; private _vehiclePositionPicture = ""; if (_focus != vehicle _focus) then { - _vehicleTypePicture = getText (configFile >> "CfgVehicles" >> typeOf vehicle _focus >> "Picture"); + _vehicleTypePicture = getText (configOf vehicle _focus >> "Picture"); _vehiclePositionPicture = switch (_focus) do { case (commander vehicle _focus): {IMG_COMMANDER}; diff --git a/addons/spectator/initSettings.sqf b/addons/spectator/initSettings.sqf index c970fe77c7..6663d5a908 100644 --- a/addons/spectator/initSettings.sqf +++ b/addons/spectator/initSettings.sqf @@ -5,7 +5,7 @@ LSTRING(Settings_DisplayName), false, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(restrictModes), @@ -16,7 +16,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(restrictVisions), @@ -27,7 +27,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxFollowDistance), @@ -36,4 +36,4 @@ LSTRING(Settings_DisplayName), [5, 25, 5, 1], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 6c2eb0b0d9..2de13634e8 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -54,7 +54,7 @@ GVAR(AllMarkerNames) = []; _markerName setMarkerTextLocal (_x getVariable [QGVAR(PlayerControlledName), ""]); } else { _markerName setMarkerColorLocal _markerColor; - _markerName setMarkerTextLocal (getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayName")); + _markerName setMarkerTextLocal (getText (configOf _x >> "displayName")); }; GVAR(AllMarkerNames) pushBack _markerName; diff --git a/addons/tagging/functions/fnc_compileConfigTags.sqf b/addons/tagging/functions/fnc_compileConfigTags.sqf index be88a3df62..0fea0693b8 100644 --- a/addons/tagging/functions/fnc_compileConfigTags.sqf +++ b/addons/tagging/functions/fnc_compileConfigTags.sqf @@ -19,7 +19,7 @@ private _class = configName _x; private _result = [_x, false] call FUNC(parseConfigTag); - if !(_result isEqualTo []) then { + if (_result isNotEqualTo []) then { _result params ["_tagInfo", "_requiredItem"]; GVAR(cachedTags) pushBack _tagInfo; @@ -31,7 +31,7 @@ private _class = configName _x; private _result = [_x, true] call FUNC(parseConfigTag); - if !(_result isEqualTo []) then { + if (_result isNotEqualTo []) then { _result params ["_tagInfo", "_requiredItem"]; GVAR(cachedTags) pushBack _tagInfo; diff --git a/addons/tagging/functions/fnc_quickTag.sqf b/addons/tagging/functions/fnc_quickTag.sqf index 7c61dc7b37..0ba5cbb338 100644 --- a/addons/tagging/functions/fnc_quickTag.sqf +++ b/addons/tagging/functions/fnc_quickTag.sqf @@ -47,7 +47,7 @@ if (GVAR(quickTag) == 3) then { }; // Tag -if !(_possibleTags isEqualTo []) then { +if (_possibleTags isNotEqualTo []) then { private _availableTags = _possibleTags select {(_x select 2) in (_unit call EFUNC(common,uniqueItems))}; (selectRandom _availableTags) params ["", "", "", "_textures", "", "_materials", "_tagModel"]; diff --git a/addons/tagging/functions/fnc_tag.sqf b/addons/tagging/functions/fnc_tag.sqf index ce3aa86bbc..b476145c57 100644 --- a/addons/tagging/functions/fnc_tag.sqf +++ b/addons/tagging/functions/fnc_tag.sqf @@ -95,7 +95,7 @@ private _fnc_isOk = { // If there's no intersections if (_intersections isEqualTo []) exitWith {false;}; - if !(((_intersections select 0) select 3) isEqualTo _object) exitWith {false;}; + if (((_intersections select 0) select 3) isNotEqualTo _object) exitWith {false;}; true }; diff --git a/addons/tagging/initSettings.sqf b/addons/tagging/initSettings.sqf index c5d0fbfa42..72672032ff 100644 --- a/addons/tagging/initSettings.sqf +++ b/addons/tagging/initSettings.sqf @@ -6,4 +6,4 @@ false, // isGlobal {[QGVAR(quickTag), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index 951bfa9d21..95a1d914b0 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -25,7 +25,7 @@ if(_actualProgress == 1) exitWith {}; // Mark trench as being worked on _trench setVariable [QGVAR(digging), true, true]; -private _digTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration)), 20]; +private _digTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(diggingDuration)), 20]; private _digTimeLeft = _digTime * (1 - _actualProgress); private _placeData = _trench getVariable [QGVAR(placeData), [[], []]]; @@ -79,7 +79,7 @@ if(_actualProgress == 0) then { _cutterPos set [2, getTerrainHeightASL _cutterPos]; _trenchGrassCutter setPosASL _cutterPos; deleteVehicle _trenchGrassCutter; - } foreach getArray (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(grassCuttingPoints)); + } foreach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); }; private _progressLeft = (_actualProgress * 10) + 1; diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf index 868daa738c..2cdb874846 100644 --- a/addons/trenches/functions/fnc_removeTrench.sqf +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -25,7 +25,7 @@ if(_actualProgress == 0) exitWith {}; // Mark trench as being worked on _trench setVariable [QGVAR(digging), true, true]; -private _removeTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration)), 12]; +private _removeTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(removalDuration)), 12]; private _removeTimeLeft = _removeTime * _actualProgress; if (isNil {_trench getVariable QGVAR(placeData)}) then { diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index d2a837c89e..2dd6964768 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -30,6 +30,7 @@ GVAR(adjustPFH) = [{ [_unit, "DefaultAction", _unit getVariable [QGVAR(Adjust), -1]] call EFUNC(common,removeActionEventHandler); [_this select 1] call CBA_fnc_removePerFrameHandler; + GVAR(adjustPFH) = -1; }; { diff --git a/addons/vehiclelock/initSettings.sqf b/addons/vehiclelock/initSettings.sqf index 30de8a692c..6c71d6b24f 100644 --- a/addons/vehiclelock/initSettings.sqf +++ b/addons/vehiclelock/initSettings.sqf @@ -7,7 +7,7 @@ [-1,60,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(defaultLockpickStrength), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(lockVehicleInventory), "CHECKBOX", @@ -17,7 +17,7 @@ true, // isGlobal {[QGVAR(lockVehicleInventory), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(vehicleStartingLockState), "LIST", @@ -27,4 +27,4 @@ true, // isGlobal {[QGVAR(vehicleStartingLockState), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/weaponselect/initSettings.sqf b/addons/weaponselect/initSettings.sqf index d4fc725783..b39251d0b8 100644 --- a/addons/weaponselect/initSettings.sqf +++ b/addons/weaponselect/initSettings.sqf @@ -5,4 +5,4 @@ localize ELSTRING(common,ACEKeybindCategoryWeapons), true, // default value false, // isGlobal -{[QGVAR(displayText), _this] call EFUNC(common,cbaSettings_settingChanged)}] call CBA_settings_fnc_init; +{[QGVAR(displayText), _this] call EFUNC(common,cbaSettings_settingChanged)}] call CBA_fnc_addSetting; diff --git a/addons/weather/initSettings.sqf b/addons/weather/initSettings.sqf index 00aa324db0..fb11e31e75 100644 --- a/addons/weather/initSettings.sqf +++ b/addons/weather/initSettings.sqf @@ -8,7 +8,7 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; true, // isGlobal {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(updateInterval), "SLIDER", @@ -18,7 +18,7 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; true, // isGlobal {[QGVAR(updateInterval), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(windSimulation), "CHECKBOX", @@ -28,7 +28,7 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; true, // isGlobal {[QGVAR(windSimulation), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(showCheckAirTemperature), "CHECKBOX", @@ -36,4 +36,4 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; _category, true, // default value false // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 6b8866aaa4..40fce2d2ee 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { - _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configOf _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 4439ad3517..a450b105c0 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -31,7 +31,7 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configOf _logic >> "ammo")]; if (_ammo != "") then { _cfgAmmo = configfile >> "cfgammo" >> _ammo; //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf index 967edc9396..532d340416 100644 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf @@ -32,7 +32,7 @@ if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { if !(alive _mouseOverUnit) then { [LSTRING(OnlyAlive)] call FUNC(showMessage); } else { - private _config = configFile >> "CfgVehicles" >> typeOf _mouseOverUnit; + private _config = configOf _mouseOverUnit; private _displayName = getText (_config >> "displayName"); if !(isNumber (_config >> QEGVAR(fastroping,enabled))) then { [LSTRING(NotFastRopeCompatible), _displayName] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf index 47ada09c00..9e37b65389 100644 --- a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf +++ b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf @@ -61,7 +61,7 @@ if (_autoSeek) then { // Detonation private _nearObjects = (_unit nearObjects _activationRadius) select {side _x == _activationSide && {_x != _unit} && {alive _x}}; - if !(_nearObjects isEqualTo []) then { + if (_nearObjects isNotEqualTo []) then { createVehicle [EXPLOSIVES select _explosionSize, _unit, [], 0, "CAN_COLLIDE"]; [_pfhID] call CBA_fnc_removePerFrameHandler; LOG("Explosion created, PFH removed"); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index 1900e5a7a3..3c5a67de75 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -49,7 +49,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { private _targetASL = _mousePosASL vectorAdd [0,0,0.6]; // mouse pos is at ground level zero, raise up a bit; private _artilleryMag = ""; - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "artilleryScanner")) == 1) then { + if ((getNumber (configOf _vehicle >> "artilleryScanner")) == 1) then { // Artillery - Get mortar ammo type and verify in range if (isNull gunner _vehicle) exitWith {_targetASL = [];}; { diff --git a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf index 3f169028a5..331c458a07 100644 --- a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf @@ -25,10 +25,10 @@ TRACE_1("params",_this); private _units = []; if (_target == -1) then { - _units = (units attachedTo _logic) select {alive _x && {!([_x] call EFUNC(common,isPlayer))} && {!(currentWeapon _x isEqualTo "")}}; + _units = (units attachedTo _logic) select {alive _x && {!([_x] call EFUNC(common,isPlayer))} && {currentWeapon _x isNotEqualTo ""}}; } else { private _side = [west, east, independent, civilian] select _target; - _units = allUnits select {alive _x && {side _x == _side} && {!([_x] call EFUNC(common,isPlayer))} && {!(currentWeapon _x isEqualTo "")}}; + _units = allUnits select {alive _x && {side _x == _side} && {!([_x] call EFUNC(common,isPlayer))} && {currentWeapon _x isNotEqualTo ""}}; }; // Toggle flashlights for units @@ -38,7 +38,7 @@ if (_toggle) then { private _weapon = currentWeapon _x; private _pointer = (_x weaponAccessories _weapon) select 1; - if (!(_pointer isEqualTo "") && {getNumber (_cfgWeapons >> _pointer >> "ItemInfo" >> "FlashLight" >> "size") > 0}) then { + if ((_pointer isNotEqualTo "") && {getNumber (_cfgWeapons >> _pointer >> "ItemInfo" >> "FlashLight" >> "size") > 0}) then { [QEGVAR(ai,enableGunLights), [_x, "forceOn"], _x] call CBA_fnc_targetEvent; } else { if (_addGear) then { diff --git a/addons/zeus/functions/fnc_moduleToggleNvg.sqf b/addons/zeus/functions/fnc_moduleToggleNvg.sqf index f8627acfe6..68fda8edb3 100644 --- a/addons/zeus/functions/fnc_moduleToggleNvg.sqf +++ b/addons/zeus/functions/fnc_moduleToggleNvg.sqf @@ -31,24 +31,23 @@ if (_target == -1) then { }; // Add or remove NVGs from units -private _cfgVehicles = configFile >> "CfgVehicles"; private _cfgWeapons = configFile >> "CfgWeapons"; if (_toggle) then { { if (hmd _x isEqualTo "") then { // Get NVG item and helmet from unit config - private _linkedItems = getArray (_cfgVehicles >> typeOf _x >> "linkedItems"); + private _linkedItems = getArray (configOf _x >> "linkedItems"); private _nvgItem = _linkedItems select {_x isKindOf ["NVGoggles", _cfgWeapons]}; - private _nvgHelmet = _linkedItems select {!(getArray (_cfgWeapons >> _x >> "subItems") isEqualTo [])}; + private _nvgHelmet = _linkedItems select {getArray (_cfgWeapons >> _x >> "subItems") isNotEqualTo []}; // Add NVG helmet if defined - if !(_nvgHelmet isEqualTo []) exitWith { + if (_nvgHelmet isNotEqualTo []) exitWith { _x addHeadgear (_nvgHelmet select 0); }; // Add NVGs if defined - if !(_nvgItem isEqualTo []) exitWith { + if (_nvgItem isNotEqualTo []) exitWith { _x linkItem (_nvgItem select 0); }; @@ -67,7 +66,7 @@ if (_toggle) then { removeHeadgear _x; }; - if !(_nvgItem isEqualTo "") then { + if (_nvgItem isNotEqualTo "") then { _x unlinkItem _nvgItem; }; } forEach _units; diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index b4fc156127..d2345e8a96 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -60,7 +60,7 @@ private _fnc_onButtonUnload = { private _class = if (_item isEqualType "") then {_item} else {typeOf _item}; private _itemName = getText (configFile >> "CfgVehicles" >> _class >> "displayName"); if ([_item, _vehicle] call EFUNC(cargo,unloadItem)) then { - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); private _message = [localize ELSTRING(cargo,UnloadedItem), "
", " "] call CBA_fnc_replace; [_message, _itemName, _vehicleName] call FUNC(showMessage); } else { diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index 037c216205..e32ee9f715 100644 --- a/addons/zeus/functions/fnc_ui_toggleNvg.sqf +++ b/addons/zeus/functions/fnc_ui_toggleNvg.sqf @@ -53,7 +53,7 @@ if !(isNull _unit) then { if (isNull _unit) then { (_display displayCtrl 92856) lbDelete 0; } else { - (_display displayCtrl 92855) lbSetCurSel ([0, 1] select !(hmd _unit isEqualTo "")); + (_display displayCtrl 92855) lbSetCurSel ([0, 1] select (hmd _unit isNotEqualTo "")); }; private _fnc_onUnload = { diff --git a/addons/zeus/initSettings.sqf b/addons/zeus/initSettings.sqf index 1db3fe5205..a9645b5917 100644 --- a/addons/zeus/initSettings.sqf +++ b/addons/zeus/initSettings.sqf @@ -19,4 +19,4 @@ 0 ], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 081ee545aa..350fa15856 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -15,6 +15,7 @@ Zeus Zeus Zeus + Zeus
Zeus Settings diff --git a/docs/_config.yml b/docs/_config.yml index c5871f0f5d..533a2e325d 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,9 +8,9 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 14 - patch: 3 - build: 55 + minor: 13 + patch: 5 + build: 57 acex: githubUrl: https://github.com/acemod/ACEX diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index 7d920e0108..ffdf6c5d9a 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -495,7 +495,7 @@ {% endif %} {% if include.component == "compat_r3f" %} -`r3f_armes_c`, `R3F_G17_addons`, `r3f_acc` +`r3f_armes_c`, `r3f_acc`, `R3F_G17_addons`, `R3F_G_SCAR`, `R3F_SCAR_H`, `R3F_SCAR_L`, `R3F_FN_MAG` {% endif %} {% if include.component == "compat_rh_acc" %} diff --git a/docs/wiki/framework/advanced-throwing-framework.md b/docs/wiki/framework/advanced-throwing-framework.md new file mode 100644 index 0000000000..925b9c9779 --- /dev/null +++ b/docs/wiki/framework/advanced-throwing-framework.md @@ -0,0 +1,20 @@ +--- +layout: wiki +title: Advanced Throwing Framework +description: Explains how to interact with the Advanced Throwing API. +group: framework +parent: wiki +mod: ace +version: + major: 3 + minor: 7 + patch: 0 +--- + +## 1. Disabling pick up of ammo attached to an object + +Pick-up interaction can be disabled for ammo (e.g. chemlights) attached to an object. + +```js +OBJECT setVariable ["ace_advanced_throwing_disablePickUp", true, true]; +``` diff --git a/optionals/compat_r3f/CfgAmmo.hpp b/optionals/compat_r3f/CfgAmmo.hpp index 1145e9ab0f..085d15edd2 100644 --- a/optionals/compat_r3f/CfgAmmo.hpp +++ b/optionals/compat_r3f/CfgAmmo.hpp @@ -1,9 +1,7 @@ class CfgAmmo { class Default; class BulletBase; - class R3F_9x19_Ball: BulletBase { // https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L370 - hit = 6; // R3F default value 13, BI default value 5 - typicalSpeed = 350; // R3F config + class R3F_9x19_Ball: BulletBase { // https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L495 airFriction = -0.00201185; // ACE3 value, default -0.001413 ACE_caliber = 9.017; ACE_bulletLength = 15.494; @@ -13,12 +11,10 @@ class CfgAmmo { ACE_velocityBoundaries[] = {}; ACE_standardAtmosphere = "ASM"; ACE_dragModel = 1; - ACE_muzzleVelocities[] = {340, 370, 400}; - ACE_barrelLengths[] = {101.6, 127.0, 228.6}; + ACE_muzzleVelocities[] = {341, 371, 401}; // at 21°C, at 15°C 400 m/s according with the R3F_MP5A5 initSpeed + ACE_barrelLengths[] = {101.6, 127, 225}; }; - class R3F_556x45_Ball: BulletBase { // M855 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L9 - typicalSpeed = 930; // R3F config - airFriction = -0.00130094; // ACE3 value, default -0.001625 + class R3F_556x45_Ball: BulletBase { // M855 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L117 ACE_caliber = 5.69; ACE_bulletLength = 23.012; ACE_bulletMass = 4.0176; @@ -30,12 +26,10 @@ 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 R3F_762x51_Ball: BulletBase { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L155 - typicalSpeed = 820; // R3F config - airFriction = -0.00103711; // ACE3 value, default -0.00095 - ACE_caliber = 7.823; - ACE_bulletLength = 28.956; - ACE_bulletMass = 9.4608; + class R3F_762x51_Ball: BulletBase { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L280 + ACE_caliber = 7.82; + ACE_bulletLength = 28.96; + ACE_bulletMass = 9.46; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.2}; ACE_velocityBoundaries[] = {}; @@ -44,12 +38,10 @@ class CfgAmmo { ACE_muzzleVelocities[] = {700, 800, 820, 833, 845}; ACE_barrelLengths[] = {254.0, 406.4, 508.0, 609.6, 660.4}; }; - class R3F_762x51_Ball2: R3F_762x51_Ball { // M993 AP https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L226 - typicalSpeed = 850; // R3F config - airFriction = -0.00110718; // ACE3 value, default -0.00095 - ACE_caliber = 7.823; - ACE_bulletLength = 31.496; - ACE_bulletMass = 8.22946157; + class R3F_762x51_Ball2: R3F_762x51_Ball { // M993 AP https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L351 + ACE_caliber = 7.82; + ACE_bulletLength = 31.5; + ACE_bulletMass = 8.23; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.359}; ACE_velocityBoundaries[] = {}; @@ -58,15 +50,22 @@ class CfgAmmo { ACE_muzzleVelocities[] = {850}; ACE_barrelLengths[] = {650}; }; - class R3F_762x51_Minimi_Ball: R3F_762x51_Ball { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L155 - airFriction = -0.00103711; // ACE3 value, default -0.002000 + class R3F_762x51_Ball_SCAR: BulletBase { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L280 + ACE_caliber = 7.82; + ACE_bulletLength = 28.96; + ACE_bulletMass = 9.46; + ACE_ammoTempMuzzleVelocityShifts[] = {-26.55, -25.47, -22.85, -20.12, -16.98, -12.8, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[] = {0.2}; + ACE_velocityBoundaries[] = {}; + ACE_standardAtmosphere = "ICAO"; + ACE_dragModel = 7; + ACE_muzzleVelocities[] = {708, 808, 828, 841, 853}; // at 21°C, at 15°C 820 m/s according with the R3F SCAR-H initSpeed + ACE_barrelLengths[] = {254.0, 406.4, 508.0, 609.6, 660.4}; }; - class R3F_127x99_Ball: BulletBase { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 780; // R3F config - airFriction = -0.00062115; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; + class R3F_127x99_Ball: BulletBase { // PGM Hécate 2 M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L635 + ACE_caliber = 12.95; + ACE_bulletLength = 58.67; + ACE_bulletMass = 41.93; ACE_muzzleVelocityVariationSD = 0.35; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.670}; @@ -76,27 +75,11 @@ class CfgAmmo { ACE_muzzleVelocities[] = {780}; ACE_barrelLengths[] = {700}; }; - class R3F_127x99_PEI: R3F_127x99_Ball { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 780; // R3F config - airFriction = -0.00062115; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; - ACE_muzzleVelocityVariationSD = 0.4; - ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; - ACE_ballisticCoefficients[] = {0.670}; - ACE_velocityBoundaries[] = {}; - ACE_standardAtmosphere = "ASM"; - ACE_dragModel = 1; - ACE_muzzleVelocities[] = {780}; - ACE_barrelLengths[] = {700}; - }; - class R3F_127x99_Ball2: BulletBase { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 850; // R3F config - airFriction = -0.000601; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; + class R3F_127x99_Ball2: BulletBase { // BARRETT M107 M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L635 + airFriction = -0.000618; // ACE3 value, default -0.00086 + ACE_caliber = 12.95; + ACE_bulletLength = 58.67; + ACE_bulletMass = 41.93; ACE_muzzleVelocityVariationSD = 0.35; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.670}; @@ -106,34 +89,19 @@ class CfgAmmo { ACE_muzzleVelocities[] = {850}; ACE_barrelLengths[] = {736.6}; }; - class R3F_127x99_PEI2: R3F_127x99_Ball2 { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 850; // R3F config - airFriction = -0.000601; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; - ACE_muzzleVelocityVariationSD = 0.4; - ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; - ACE_ballisticCoefficients[] = {0.670}; + class R3F_127x99_Ball3: BulletBase { // McMillan TAC-50 AMAX https://web.archive.org/web/20080527201619/http://mcmfamily.com/pdfs/Tac-50%20Technical%20Data.pdf + typicalSpeed = 823; // R3F default value 820 + airFriction = -0.000388; // R3F default value -0.00086 + ACE_caliber = 12.98; + ACE_bulletLength = 64.52; + ACE_bulletMass = 48.6; + ACE_muzzleVelocityVariationSD = 0.2; + ACE_ammoTempMuzzleVelocityShifts[] = {-26.55, -25.47, -22.85, -20.12, -16.98, -12.8, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[] = {1.05}; ACE_velocityBoundaries[] = {}; - ACE_standardAtmosphere = "ASM"; + ACE_standardAtmosphere = "ICAO"; ACE_dragModel = 1; - ACE_muzzleVelocities[] = {850}; - ACE_barrelLengths[] = {736.6}; - }; - class R3F_127x99_Ball3: BulletBase { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 820; // R3F config - airFriction = -0.00060964; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; - ACE_muzzleVelocityVariationSD = 0.35; - ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; - ACE_ballisticCoefficients[] = {0.670}; - ACE_velocityBoundaries[] = {}; - ACE_standardAtmosphere = "ASM"; - ACE_dragModel = 1; - ACE_muzzleVelocities[] = {820}; + ACE_muzzleVelocities[] = {831}; // at 21°C, at 15°C 823 m/s (2700 fps) according with the R3F_TAC50 initSpeed ACE_barrelLengths[] = {736.6}; }; }; diff --git a/optionals/compat_r3f/CfgMagazines.hpp b/optionals/compat_r3f/CfgMagazines.hpp index 3a36eadfed..ea20d8c06d 100644 --- a/optionals/compat_r3f/CfgMagazines.hpp +++ b/optionals/compat_r3f/CfgMagazines.hpp @@ -4,59 +4,15 @@ class CfgMagazines { scope = 1; // Game Update 1.84: "Tweaked: Magazines can now be hidden in Virtual Arsenal by setting their scope to 1", R3F default value 2 }; class R3F_15Rnd_9x19_PAMAS: CA_magazine { - initSpeed = 350; // R3F config + initSpeed = 368; // according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 350 }; class R3F_15Rnd_9x19_HKUSP: CA_magazine { - initSpeed = 350; // R3F config + initSpeed = 363; // according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 350 }; class R3F_17Rnd_9x19_G17: CA_magazine { - initSpeed = 350; // R3F config + initSpeed = 355; // according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 350 }; - class R3F_30Rnd_9x19_MP5: CA_magazine { - initSpeed = 400; // R3F config - }; - class R3F_25Rnd_556x45_FAMAS: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 960; // R3F config - }; - class R3F_25Rnd_556x45_TRACER_FAMAS: R3F_25Rnd_556x45_FAMAS {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_30Rnd_556x45_FAMAS: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 925; // R3F config - }; - class R3F_30Rnd_556x45_TRACER_FAMAS: R3F_30Rnd_556x45_FAMAS {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_30Rnd_556x45_HK416: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 850; // R3F config - }; - class R3F_30Rnd_556x45_TRACER_HK416: R3F_30Rnd_556x45_HK416 {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_30Rnd_556x45_SIG551: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 850; // R3F config - }; - class R3F_30Rnd_556x45_TRACER_SIG551: R3F_30Rnd_556x45_SIG551 {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_10Rnd_762x51_FRF2: CA_magazine { // AtragMx GunList: R3F FRF2 M993 - initSpeed = 850; // R3F config - }; - class R3F_200Rnd_556x45_MINIMI: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 915; // R3F config - }; - class R3F_100Rnd_762x51_MINIMI: CA_magazine { // AtragMx GunList: 7.62x51mm M80 - initSpeed = 820; // R3F config - }; - class R3F_20Rnd_762x51_HK417: CA_magazine { // AtragMx GunList: 7.62x51mm M80 / HK417L 20": R3F HK417L M80 - initSpeed = 820; // R3F config - }; - class R3F_20Rnd_762x51_TRACER_HK417: R3F_20Rnd_762x51_HK417 {}; // AtragMx GunList: 7.62x51mm M80 / HK417L 20": R3F HK417L M80 - class R3F_7Rnd_127x99_PGM: CA_magazine { // AtragMx GunList: R3F PGM M33 - initSpeed = 780; // R3F config - }; - class R3F_7Rnd_127x99_PEI_PGM: R3F_7Rnd_127x99_PGM { // AtragMx GunList: R3F PGM M33 - initSpeed = 780; // R3F config - }; - class R3F_10Rnd_127x99_M107: CA_magazine { // AtragMx GunList: R3F M107 M33 - initSpeed = 850; // R3F config - }; - class R3F_10Rnd_127x99_PEI_M107: R3F_10Rnd_127x99_M107 { // AtragMx GunList: R3F M107 M33 - initSpeed = 850; // R3F config - }; - class R3F_5Rnd_127x99_TAC50: CA_magazine { // AtragMx GunList: R3F TAC50 M33 - initSpeed = 820; // R3F config + class R3F_5Rnd_127x99_TAC50: CA_magazine { // AtragMx GunList: R3F TAC50 AMAX + initSpeed = 823; // 2700 fps according with the McMillan Tactical Products specification and the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 820 }; }; diff --git a/optionals/compat_r3f/CfgWeapons.hpp b/optionals/compat_r3f/CfgWeapons.hpp index e25f959009..1f8523f802 100644 --- a/optionals/compat_r3f/CfgWeapons.hpp +++ b/optionals/compat_r3f/CfgWeapons.hpp @@ -1,31 +1,21 @@ class Mode_SemiAuto; -class Mode_Burst; -class Mode_FullAuto; class CfgWeapons { class Pistol_Base_F; class Rifle_Base_F; + class Rifle_Long_Base_F; class R3F_Famas_F1: Rifle_Base_F { ACE_RailHeightAboveBore = 10.1796; ACE_barrelTwist = 304.8; // 1:12" ACE_barrelLength = 488.0; muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class Burst: Mode_Burst { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.0035 (12 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; class R3F_Famas_F1_M203: R3F_Famas_F1 { muzzles[] = {"this","Lance_Grenades"}; }; class R3F_Famas_surb: R3F_Famas_F1 { // R3F FAMAS Surbaissé, should be FAMAS Valorisé : http://narval34.free.fr/fiche_tech_famas.pdf ACE_RailHeightAboveBore = 5.08219; - ACE_barrelTwist = 228.6; // 1:9" FAMAS Surbaissé, should be 1:7" FAMAS Valorisé + ACE_barrelTwist = 177.8; // 1:7" FAMAS Valorisé ACE_barrelLength = 450.0; // 3D model with Beretta barrel : FAMAS Valorisé }; class R3F_Famas_surb_M203: R3F_Famas_surb { @@ -35,15 +25,6 @@ class CfgWeapons { ACE_RailHeightAboveBore = 10.1808; ACE_barrelTwist = 228.6; // 1:9" ACE_barrelLength = 488.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class Burst: Mode_Burst { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.0035 (12 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; class R3F_Famas_G2_M203: R3F_Famas_G2 { muzzles[] = {"this","Lance_Grenades"}; @@ -70,160 +51,126 @@ class CfgWeapons { ACE_RailHeightAboveBore = 1.79013; ACE_barrelTwist = 294.6; ACE_barrelLength = 650.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.88); // 1.56 MOA*0.562, R3F default value 9.9999997e-005 (0.34 MOA) - }; muzzles[] = {"this"}; }; class R3F_PGM_Hecate_II: Rifle_Base_F { ACE_RailHeightAboveBore = 1.84858; ACE_barrelTwist = 381.0; ACE_barrelLength = 700.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.58); // 1.04 MOA*0.562, R3F default value 0.00018 (0.62 MOA) - }; muzzles[] = {"this"}; }; class R3F_M107: Rifle_Base_F { ACE_RailHeightAboveBore = 3.13099; ACE_barrelTwist = 381.0; ACE_barrelLength = 736.6; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.5); // 0.9 MOA*0.562, R3F default value 0.00030 (1.03 MOA) - }; muzzles[] = {"this"}; }; class R3F_TAC50: Rifle_Base_F { ACE_RailHeightAboveBore = 2.99563; ACE_barrelTwist = 381.0; ACE_barrelLength = 736.6; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.53); // 0.95 MOA*0.562, R3F default value 0.00015 (0.52 MOA) - }; muzzles[] = {"this"}; }; - class R3F_Minimi: Rifle_Base_F { + class R3F_Minimi: Rifle_Base_F { // FN HERSTAL Minimi 5.56 Mk3 https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-minimi-556-mk3.pdf ACE_RailHeightAboveBore = 3.81385; ACE_barrelTwist = 177.8; - ACE_barrelLength = 347.98; + ACE_barrelLength = 349; muzzles[] = {"this"}; - initSpeed = 915; // R3F config - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.92); // 3.41 MOA*0.562, R3F default value 0.0008 (2.75 MOA) - }; }; - class R3F_Minimi_HG: R3F_Minimi { - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.92); // 3.41 MOA*0.562, R3F default value 0.0008 (2.75 MOA) - }; - }; - class R3F_Minimi_762: R3F_Minimi { + class R3F_Minimi_762: R3F_Minimi { // FN HERSTAL Minimi 7.62 Mk3 https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-minimi-762-mk3.pdf ACE_RailHeightAboveBore = 3.80834; ACE_barrelTwist = 304.8; - ACE_barrelLength = 502.92; - initSpeed = 820; // R3F config - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.56); // 2.77 MOA*0.562, R3F default value 0.002 (6.88 MOA) - }; + ACE_barrelLength = 422; }; - class R3F_Minimi_762_HG: R3F_Minimi_762 { - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.56); // 2.77 MOA*0.562, R3F default value 0.002 (6.88 MOA) - }; - }; - class R3F_HK417M: Rifle_Base_F { + class R3F_HK417M: Rifle_Base_F { // https://www.heckler-koch.com/ ACE_RailHeightAboveBore = 3.23377; ACE_barrelTwist = 279.4; - ACE_barrelLength = 406.0; + ACE_barrelLength = 406.4; muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.62); // 2.89 MOA*0.562, R3F default value 0.001 (3.44 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.62); // 2.89 MOA*0.562, R3F default value 0.0025 (8.6 MOA) - }; }; class R3F_HK417S_HG: R3F_HK417M { - ACE_barrelLength = 305.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.9); // 3.4 MOA*0.562, R3F default value 0.002 (6.88 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.9); // 3.4 MOA*0.562, R3F default value 0.007 (24.06 MOA) - }; + ACE_barrelLength = 304.8; }; class R3F_HK417L: R3F_HK417M { ACE_barrelLength = 508.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.93); // 1.66 MOA*0.562, R3F default value 0.0002 (0.69 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(0.93); // 1.66 MOA*0.562, R3F default value 0.0025 (8.6 MOA) - }; }; class R3F_HK416M: Rifle_Base_F { ACE_RailHeightAboveBore = 2.84776; ACE_barrelTwist = 177.8; ACE_barrelLength = 368.3; muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.87); // 3.32 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.87); // 3.32 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; class R3F_HK416M_M203: R3F_HK416M { muzzles[] = {"this","Lance_Grenades"}; }; - class R3F_HK416S_HG: R3F_HK416M { + class R3F_HK416M_HG: R3F_HK416M {}; + class R3F_HK416S_HG: R3F_HK416M_HG { ACE_barrelLength = 279.4; - class Single: Single { - dispersion = MOA_TO_RAD(2.12); // 3.78 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class FullAuto: FullAuto { - dispersion = MOA_TO_RAD(2.12); // 3.78 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; - class R3F_SIG551: Rifle_Base_F { + class R3F_SIG551: Rifle_Base_F { // http://www.sigsauer.swiss ACE_RailHeightAboveBore = 3.95288; ACE_barrelTwist = 177.8; - ACE_barrelLength = 363.0; + ACE_barrelLength = 363.5; // SG551 SB http://www.sigsauer.swiss/en/accessories-conversion-kits.php muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.88); // 3.34 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.88); // 3.34 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; - class R3F_MP5SD: Rifle_Base_F { + class R3F_MP5SD: Rifle_Base_F { // https://www.heckler-koch.com/en/products/military/submachine-guns/mp5/mp5sd/overview.html ACE_RailHeightAboveBore = 4.21816; ACE_barrelTwist = 254.0; - ACE_barrelLength = 144.78; + ACE_barrelLength = 146; + initSpeed = -0.94; // 400*0.94= 376 m/s according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 0 muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.004 (13.75 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.007 (24.06 MOA) - }; }; - class R3F_MP5A5: R3F_MP5SD { - ACE_barrelLength = 226.06; + class R3F_MP5A5: R3F_MP5SD { // https://www.heckler-koch.com/en/products/military/submachine-guns/mp5/mp5/overview.html + ACE_barrelLength = 225; + initSpeed = -1; // 400 m/s according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 0 muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.004 (13.75 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.007 (24.06 MOA) - }; }; - class R3F_M4S90: Rifle_Base_F { + class R3F_M4S90: Rifle_Base_F { // https://www.benelli.it ACE_RailHeightAboveBore = 1.86213; ACE_twistDirection = 0; ACE_barrelTwist = 0; - ACE_barrelLength = 144.78; + ACE_barrelLength = 470; + }; + class R3F_SCAR_H_PR_20cps_base: Rifle_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-scar-h-pr_0.pdf + ACE_barrelTwist = 279.4; + ACE_barrelLength = 508; + muzzles[] = {"this"}; + }; + class R3F_SCAR_H_PR_20cps_recup_base: Rifle_Base_F { + ACE_barrelTwist = 279.4; + ACE_barrelLength = 508; + muzzles[] = {"this"}; + }; + class R3F_SCAR_H_CAM_base: Rifle_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-scar-h_0.pdf + ACE_barrelTwist = 304.8; + ACE_barrelLength = 330.2; + muzzles[] = {"this"}; + }; + class R3F_SCAR_H_CAM_LG_GHILLIE: R3F_SCAR_H_CAM_base { + muzzles[] = {"this", "EGLM"}; + }; + class R3F_SCAR_H_CAM_LG: R3F_SCAR_H_CAM_base { + muzzles[] = {"this", "EGLM"}; + }; + class R3F_SCAR_L_CAM_base: Rifle_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-scar-l_1.pdf + ACE_barrelTwist = 177.8; + ACE_barrelLength = 368.3; + muzzles[] = {"this"}; + }; + class R3F_SCAR_L_CAM_ghillie_LG: R3F_SCAR_L_CAM_base { + muzzles[] = {"this", "EGLM"}; + }; + class R3F_SCAR_L_CQC_CAM: R3F_SCAR_L_CAM_base { + ACE_barrelLength = 254; + }; + class R3F_SCAR_L_CQC_LG_CAM: R3F_SCAR_L_CAM_base { + ACE_barrelLength = 254; + muzzles[] = {"this", "EGLM"}; + }; + class R3F_FN_MAG58: Rifle_Long_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-10/technical-data-fn-mag-1.pdf + ACE_barrelTwist = 304.8; + ACE_barrelLength = 630; + muzzles[] = {"this"}; }; class R3F_PAMAS: Pistol_Base_F { ACE_barrelTwist = 250.0; @@ -248,9 +195,6 @@ class CfgWeapons { ACE_barrelLength = 114.0; muzzles[] = {"this"}; initSpeed = -1.0; // default 410 - class Single: Mode_SemiAuto { - dispersion=0.0029; // R3F default value, 9.97 MOA (a square of 7.25/7.25cm at 25 meters) - }; }; class ItemCore; class InventoryOpticsItem_Base_F; @@ -284,48 +228,38 @@ class CfgWeapons { class OpticsModes { class Felin {}; class Oeilleton: Felin { - opticsID=2; - opticsDisplayName=""; - useModelOptics=0; - opticsPPEffects[]={}; - opticsFlare=0; - opticsDisablePeripherialVision=0; - opticsZoomMin=0.25; - opticsZoomMax=1.25; - opticsZoomInit=0.75; - memoryPointCamera="eye_Oeilleton"; - visionMode[]={}; - discretefov[]={}; - discreteDistance[]={200}; - discreteDistanceInitIndex=0; - distanceZoomMin=200; - distanceZoomMax=200; - discreteInitIndex=0; - cameraDir=""; + opticsID = 2; + opticsDisplayName = ""; + useModelOptics = 0; + opticsPPEffects[] = {}; + opticsFlare = 0; + opticsDisablePeripherialVision = 0; + opticsZoomMin = 0.25; + opticsZoomMax = 1.25; + opticsZoomInit = 0.75; + memoryPointCamera = "eye_Oeilleton"; + visionMode[] = {}; + discretefov[] = {}; + discreteDistance[] = {200}; + discreteDistanceInitIndex = 0; + distanceZoomMin = 200; + distanceZoomMax = 200; + discreteInitIndex = 0; + cameraDir = ""; }; }; }; }; class R3F_J8: ItemCore { // http://www.scrome.com/assets/templates/flexibility/pdf/Scrome_Marksman_Scope_LTE_Datasheet_GB.pdf - ACE_ScopeHeightAboveRail = 4.474; // Inaccurate BDC reticle, designed to work with the vanilla ballistic and R3F values. + ACE_ScopeHeightAboveRail = -2.237; // Off-center BDC reticle designed to work with the vanilla ballistic and R3F values only. ACE_ScopeAdjust_Vertical[] = {-10, 10}; ACE_ScopeAdjust_Horizontal[] = {-10, 10}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo: InventoryOpticsItem_Base_F { - class OpticsModes { - class J8 { - discreteDistance[] = {100}; - discreteDistanceInitIndex = 0; - }; - }; - }; }; class R3F_J8_MILDOT: R3F_J8 { + ACE_ScopeHeightAboveRail = 4.474; ACE_ScopeAdjust_Vertical[] = {0, 20}; - ACE_ScopeAdjust_Horizontal[] = {-10, 10}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class J8_MILDOT { @@ -336,27 +270,14 @@ class CfgWeapons { }; }; class R3F_J10: ItemCore { // http://www.scrome.com/assets/templates/flexibility/pdf/Scrome_Marksman_Scope_LTE_Datasheet_GB.pdf - ACE_ScopeZeroRange = 1400; // Inaccurate BDC reticle, designed to work with the vanilla ballistic and R3F values. - ACE_ScopeHeightAboveRail = 4.474; + ACE_ScopeHeightAboveRail = 4.474; // BDC reticle designed to work with the vanilla ballistic and R3F values only. ACE_ScopeAdjust_Vertical[] = {-10, 10}; ACE_ScopeAdjust_Horizontal[] = {-10, 10}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo: InventoryOpticsItem_Base_F { - class OpticsModes { - class J10 { - discreteDistance[] = {100}; - discreteDistanceInitIndex = 0; - }; - }; - }; }; class R3F_J10_MILDOT: R3F_J10 { - ACE_ScopeZeroRange = 100; ACE_ScopeAdjust_Vertical[] = {0, 20}; - ACE_ScopeAdjust_Horizontal[] = {-10, 10}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class J10_MILDOT { @@ -414,6 +335,34 @@ class CfgWeapons { class R3F_OB50: ItemCore { ACE_ScopeHeightAboveRail = 4.13217; }; + class R3F_SB_PM: ItemCore { // Off-center BDC reticle designed to work with the vanilla ballistic and R3F values only. + ACE_ScopeAdjust_Vertical[] = {0, 12}; // https://www.schmidtundbender.de/en/products/police-military-forces/1-8x24-pm-ii-shortdot-dual-cc.html + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class SB_PM { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + distanceZoomMin = 100; + distanceZoomMax = 1200; + }; + }; + }; + }; + class R3F_SB_PM_BLACK: R3F_SB_PM { + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class SB_PM { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + distanceZoomMin = 100; + distanceZoomMax = 1200; + }; + }; + }; + }; class InventoryMuzzleItem_Base_F; class R3F_SILENCIEUX_HK416: ItemCore { class ItemInfo: InventoryMuzzleItem_Base_F { @@ -511,27 +460,59 @@ class CfgWeapons { }; }; }; + class R3F_SILENCIEUX_SCAR_H_PR: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.95f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "0.95f"; + recoilProneCoef = "0.95f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; }; class ACE_ATragMX_Presets { class R3F_PGM_Hecate_II { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F PGM M33", 780, 100, 0.0845596, -0.00062115, 6.35, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM", {{-15, 761},{0, 768},{10, 775},{15, 780},{25, 794},{30, 803},{35, 814}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; + preset[] = {"R3F PGM M33", 780, 100, 0.0845596, -0.00086, 6.35, 0, 2, 10, 120, 0, 0, 41.92, 12.18, 38.10, 0.670, 1, "ASM", {{-15, 761},{0, 768},{10, 775},{15, 780},{25, 794},{30, 803},{35, 814}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; }; class R3F_M107 { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F M107 M33", 850, 100, 0.0841653, -0.000601, 7.62, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; + preset[] = {"R3F M107 M33", 850, 100, 0.0841653, -0.00061813, 7.62, 0, 2, 10, 120, 0, 0, 41.92, 12.19, 38.10, 0.670, 1, "ASM", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; }; class R3F_TAC50 { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F TAC50 M33", 820, 100, 0.0872461, -0.00060964, 7.62, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; + preset[] = {"R3F TAC50 AMAX", 823, 100, 0.0848384, -0.00038793, 7.37, 0, 2, 10, 120, 0, 0, 48.6, 12.44, 38.10, 1.050, 1, "ICAO", {{-15, 804},{0, 811},{10, 818},{15, 823},{25, 837},{30, 846},{35, 857}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; }; class R3F_FRF2 { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F FRF2 M993", 850, 100, 0.0783702, -0.00110718, 6.35, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 29.46, 0.359, 1, "ICAO", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}; + preset[] = {"R3F FRF2 M993", 850, 100, 0.0783702, -0.00095, 6.35, 0, 2, 10, 120, 0, 0, 8.23, 7.35, 29.46, 0.359, 1, "ICAO", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}; }; class R3F_HK417L { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F HK417L M80", 820, 100, 0.0884448, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 27.94, 0.398, 1, "ICAO", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{200, 0.398}, {400, 0.398}, {600, 0.398}, {800, 0.39}, {1000, 0.383}, {1200, 0.379}, {1400, 0.378}}}; + preset[] = {"R3F HK417L M80", 820, 100, 0.0884758, -0.00095, 7.62, 0, 2, 10, 120, 0, 0, 9.46, 8.02, 27.94, 0.394, 1, "ICAO", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{0, 0.394}, {700, 0.394}, {800, 0.391}, {900, 0.386}, {1000, 0.383}, {1100, 0.381}, {1300, 0.379}}}; }; }; diff --git a/optionals/compat_r3f/config.cpp b/optionals/compat_r3f/config.cpp index 90218d7f04..2790068152 100644 --- a/optionals/compat_r3f/config.cpp +++ b/optionals/compat_r3f/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"r3f_armes_c", "R3F_G17_addons", "r3f_acc"}; + requiredAddons[] = {"r3f_armes_c", "r3f_acc", "R3F_G17_addons", "R3F_G_SCAR", "R3F_SCAR_H", "R3F_SCAR_L", "R3F_FN_MAG"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf b/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf index b43a530728..ada3609895 100644 --- a/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf +++ b/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf @@ -27,8 +27,8 @@ private _baseClasses = []; } count ( ("!isNull (_x >> 'modelSides') &&" + "{(_x >> 'modelSides') in (configProperties [_x, 'true', false])} &&" + - "{!(getArray (_x >> 'modelSides') isEqualTo [6])} &&" + - "{!(getArray (_x >> 'modelSides') isEqualTo [0,1,2,3])}") + "{getArray (_x >> 'modelSides') isNotEqualTo [6]} &&" + + "{getArray (_x >> 'modelSides') isNotEqualTo [0,1,2,3]}") configClasses (configFile >> "CfgVehicles") ); diff --git a/tools/build.py b/tools/build.py index 9151daa095..257fbff224 100644 --- a/tools/build.py +++ b/tools/build.py @@ -9,6 +9,17 @@ MAINPREFIX = "z" PREFIX = "ace_" ########################## +def tryHemttBuild(projectpath): + hemttExe = os.path.join(projectpath, "hemtt.exe") + if os.path.isfile(hemttExe): + os.chdir(projectpath) + ret = subprocess.call([hemttExe, "pack"], stderr=subprocess.STDOUT) + print("Using hemtt: {}".format(ret)); + return True + else: + print("hemtt not installed"); + return False + def mod_time(path): if not os.path.isdir(path): return os.path.getmtime(path) @@ -40,6 +51,8 @@ def main(): projectpath = os.path.dirname(os.path.dirname(scriptpath)) addonspath = os.path.join(projectpath, "addons") + if (tryHemttBuild(projectpath)): return + os.chdir(addonspath) made = 0 diff --git a/tools/make.py b/tools/make.py index 5078cdda60..ca37369638 100644 --- a/tools/make.py +++ b/tools/make.py @@ -227,6 +227,17 @@ def find_bi_tools(work_drive): else: raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.") +def mikero_windows_registry(path, access=winreg.KEY_READ): + try: + return winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(path), access=access) + except FileNotFoundError: + try: + return winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(path), access=access) + except FileNotFoundError: + try: + return winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Wow6432Node\Mikero\{}".format(path), access=access) + except FileNotFoundError: + return winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Wow6432Node\Mikero\{}".format(path), access=access) def find_depbo_tools(): """Use registry entries to find DePBO-based tools.""" @@ -235,20 +246,8 @@ def find_depbo_tools(): for tool in requiredToolPaths: try: - try: - k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] - except FileNotFoundError: - try: - k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] - except FileNotFoundError: - try: - k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Wow6432Node\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] - except FileNotFoundError: - k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Wow6432Node\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] + k = mikero_windows_registry(tool) + path = winreg.QueryValueEx(k, "exe")[0] except FileNotFoundError: print_error("Could not find {}".format(tool)) failed = True @@ -264,6 +263,17 @@ def find_depbo_tools(): return requiredToolPaths +def pboproject_settings(): + """Use registry entries to configure needed pboproject settings.""" + value_exclude = "thumbs.db,*.txt,*.h,*.dep,*.cpp,*.bak,*.png,*.log,*.pew,source,*.tga" + + try: + k = mikero_windows_registry(r"pboProject\Settings", access=winreg.KEY_SET_VALUE) + winreg.SetValueEx(k, "m_exclude", 0, winreg.REG_SZ, value_exclude) + winreg.SetValueEx(k, "m_exclude2", 0, winreg.REG_SZ, value_exclude) + except: + raise Exception("BadDePBO", "pboProject not installed correctly, make sure to run it at least once") + def color(color): """Set the color. Works on Win32 and normal terminals.""" @@ -1031,6 +1041,8 @@ See the make.cfg file for additional build options. pboproject = depbo_tools["pboProject"] rapifyTool = depbo_tools["rapify"] makepboTool = depbo_tools["MakePbo"] + + pboproject_settings() except: raise print_error("Could not find dePBO tools. Download the needed tools from: https://dev.withsix.com/projects/mikero-pbodll/files") @@ -1268,7 +1280,7 @@ See the make.cfg file for additional build options. cmd = [makepboTool, "-P","-A","-X=*.backup", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")] else: - cmd = [pboproject, "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"] + cmd = [pboproject, "-B", "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "-Warnings", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"] color("grey") if quiet: