diff --git a/AUTHORS.txt b/AUTHORS.txt index bcc4a5d40e..190b12bb6a 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -126,6 +126,7 @@ Keithen Kllrt KokaKolaA3 Krzyciu +LAxemann legman Legolasindar "Viper" licht-im-Norden87 diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 6af9efca24..4c01043875 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -53,7 +53,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa private _gridCenter = [_x + 25, _y + 25]; private _gridHeight = round(getTerrainHeightASL _gridCenter); private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]); - private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0}; + private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter); "ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater]; GVAR(currentGrid) = GVAR(currentGrid) + 1; if (GVAR(currentGrid) >= _gridCells) exitWith {}; diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index bf0e23f97c..c79aeaf2ea 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -21,7 +21,7 @@ private _weaponConfig = (configFile >> "CfgWeapons" >> _this); private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist"); -private _twistDirection = [0, 1] select (_barrelTwist != 0); +private _twistDirection = parseNumber (_barrelTwist != 0); if (isNumber (_weaponConfig >> "ACE_twistDirection")) then { _twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection"); if !(_twistDirection in [-1, 0, 1]) then { diff --git a/addons/aircraft/functions/fnc_droneSetWaypoint.sqf b/addons/aircraft/functions/fnc_droneSetWaypoint.sqf index 5c919564ce..5ffbbae825 100644 --- a/addons/aircraft/functions/fnc_droneSetWaypoint.sqf +++ b/addons/aircraft/functions/fnc_droneSetWaypoint.sqf @@ -29,7 +29,10 @@ private _currentLoiterRadius = waypointLoiterRadius _waypoint; private _currentLoiterType = waypointLoiterType _waypoint; // Set pos to ATL -_pos set [2, if (_currentHeight >= 50) then { _currentHeight } else { 0 }]; +_pos set [ + 2, + [0, _currentHeight] select (_currentHeight >= 50) +]; // [_group] call CBA_fnc_clearWaypoints; _waypoint = _group addWaypoint [_pos, 0]; diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index 97b08ed3e2..c0cef87756 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -29,7 +29,7 @@ Открыть грузовой отсек Apri la rampa di carico Abrir porta de carga - カーゴ ドアを開く + 貨物室ドアを 開く 화물칸 개방 開啟貨艙門 开启货舱门 @@ -46,7 +46,7 @@ Закрыть грузовой отсек Chiudi la rampa di carico Fechar porta de carga - カーゴ ドアを閉じる + 貨物室ドアを 閉じる 화물칸 폐쇄 關閉貨艙門 关闭货舱门 diff --git a/addons/arsenal/functions/fnc_addStat.sqf b/addons/arsenal/functions/fnc_addStat.sqf index 98dfe45213..40530262d7 100644 --- a/addons/arsenal/functions/fnc_addStat.sqf +++ b/addons/arsenal/functions/fnc_addStat.sqf @@ -109,11 +109,10 @@ private _tabToChange = []; { _x params ["_tab", "_tabSide"]; - _tabToChange = if (_tabSide == "R") then { + _tabToChange = [ + GVAR(statsListLeftPanel), GVAR(statsListRightPanel) - } else { - GVAR(statsListLeftPanel) - }; + ] select (_tabSide == "R"); _stats = _tabToChange select _tab; diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index effcc03d20..26f872dfdf 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -196,7 +196,7 @@ private _selectedItem = switch (true) do { _lbAdd = _ctrlPanel lbAdd _displayName; _ctrlPanel lbSetData [_lbAdd, _x]; _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]]; - _ctrlPanel lbSetPictureRight [_lbAdd, _modPicture]; + _ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)]; } forEach (uiNamespace getVariable QGVAR(faceCache)); GVAR(currentFace) diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index 346e07fa59..09f986708d 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -87,7 +87,7 @@ private _fnc_fillRightContainer = { _ctrlPanel lnbSetText [[_lbAdd, 1], _displayName]; _ctrlPanel lnbSetData [[_lbAdd, 0], _className]; _ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture]; - _ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select _isUnique]; + _ctrlPanel lnbSetValue [[_lbAdd, 2], parseNumber _isUnique]; _ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]]; if ((toLower _className) in GVAR(favorites)) then { _ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR]; diff --git a/addons/arsenal/functions/fnc_onKeyDown.sqf b/addons/arsenal/functions/fnc_onKeyDown.sqf index 24fbd624f6..4d62075f78 100644 --- a/addons/arsenal/functions/fnc_onKeyDown.sqf +++ b/addons/arsenal/functions/fnc_onKeyDown.sqf @@ -147,7 +147,7 @@ if (!isNull _loadoutsDisplay) then { // Right panel lnb + and - buttons case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): { if (GVAR(rightTabLnBFocus)) then { - [_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo); + [_display, parseNumber (_keyPressed != DIK_LEFT)] call FUNC(buttonCargo); }; }; }; diff --git a/addons/arsenal/functions/fnc_statTextStatement_illuminators.sqf b/addons/arsenal/functions/fnc_statTextStatement_illuminators.sqf index b677ec8210..3f982f575c 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_illuminators.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_illuminators.sqf @@ -31,9 +31,9 @@ if (_allItems isEqualTo []) then { _allItems = [configName _config] }; || {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}}; private _text = switch (true) do { // shorthand roughly based on PEQ-15 - case (_laser && _illum): { if (_isIR) then { "IR-DUAL" } else { "VIS-DUAL" } }; - case (_laser): { if (_isIR) then { "IR-AIM" } else { "VIS-AIM" } }; // AIM - case (_illum): { if (_isIR) then { "IR-ILM" } else { "VIS-ILM" } }; // ILLUMIATION + case (_laser && _illum): { ["VIS-DUAL", "IR-DUAL"] select _isIR }; // DUAL + case (_laser): { ["VIS-AIM", "IR-AIM"] select _isIR }; // AIM + case (_illum): { ["VIS-ILM", "IR-ILM"] select _isIR }; // ILLUMIATION default { "_" }; // there are some purely cosmetic attachements }; _allModes pushBackUnique _text; diff --git a/addons/arsenal/functions/fnc_verifyLoadout.sqf b/addons/arsenal/functions/fnc_verifyLoadout.sqf index b5425c2117..adc76f391a 100644 --- a/addons/arsenal/functions/fnc_verifyLoadout.sqf +++ b/addons/arsenal/functions/fnc_verifyLoadout.sqf @@ -46,11 +46,7 @@ private _fnc_toConfigCase = { // If item doesn't exist in config, "" is returned // Just return unaltered item name in that case, so it can be documented as being unavailable - if (_name != "") then { - _name - } else { - _x - }; + [_x, _name] select (_name != ""); } else { _x }; diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index 230795609f..f308765540 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -613,7 +613,7 @@ Le set d'équipement suivant a été supprimé : Folgende Ausrüstung wurde entfernt: Następujący zestaw został skasowany: - 次の装備は削除されました: + 装備を削除しました: Il seguente equipaggiamento è stato eliminato: 다음 로드아웃이 삭제됨 : 以下的裝備已被刪除: @@ -629,7 +629,7 @@ Le set d'équipement suivant n'est plus public : Folgende Ausrüstung ist nicht mehr öffentlich: Następujący zestaw nie jest już publiczny: - 次の装備は非公開になりました: + 装備を非公開にしました: Il seguente equipaggiamento non è più pubblico: 다음 로드아웃이 더이상 공용이 아님: 以下的裝備已不再被分享: @@ -645,7 +645,7 @@ Le champ "nom" est vide ! Das Feld "Name" ist leer! Pole nazwy jest puste! - 名前が空白です! + 名前が空欄です! Il campo del nome è vuoto! 이름칸이 비었습니다! 名稱欄位為空! @@ -677,7 +677,7 @@ Un de vos sets d'équipement ayant le même nom est public. Eine deiner Ausrüstungen mit dem gleichen Namen ist öffentlich Jeden z Twoich zestawów nazwany tak samo jest już publiczny - あなたの装備は既に公開されているものと同名です + あなたのものと同じ名前の装備が既に公開されています Un tuo equipaggiamento con lo stesso nome è pubblico 같은 이름의 로드아웃이 공용에 있습니다. 已有相同名稱的裝備在公用分享區 @@ -693,7 +693,7 @@ Le set d'équipement suivant a été enregistré : Folgende Ausrüstung wurde gespeichert: Następujący zestaw został zapisany: - 次の装備は保存されました: + 装備を保存しました: Il seguente equipaggiamento è stato salvato: 다음 로드아웃이 저장됨: 以下的裝備已被保存: @@ -709,7 +709,7 @@ Le set d'équipement suivant a été chargé : Folgene Ausrüstung wurde geladen: Następujący zestaw został wczytany: - 次の装備が読み込みされました: + 装備を読み込みました: Il seguente equipaggiamento è stato caricato: 다음 로드아웃을 불러옴: 以下的裝備已被載入: @@ -725,7 +725,7 @@ Un set d'équipement ayant le même nom existe déjà ! Eine Ausrüstung mit dem gleichen Namen existiert bereits! Zestaw z tą nazwą już istnieje! - 既にその名前は装備に使われています! + 既に同じ名前の装備が存在しています! Un equipaggiamento con lo stesso nome è gia esistente! 같은 이름의 로드아웃이 이미 존재합니다! 已有相同名稱的裝備! @@ -741,7 +741,7 @@ a été renommé en wurde umbenannt in zmienił nazwę na - 次の名前に変更されました + を次の名前に変更しました: È stato rinominato in 이름이 다음과 같이 변경됨: 已被改名為 @@ -1181,7 +1181,7 @@ Nightvision Support Soporte de visión nocturna Nachtsicht Unterstützung - 暗視装置への対応有無 + 暗視装置への対応 Wsparcie noktowizyjne Supporto visore notturno Поддержка ночного видения @@ -1240,9 +1240,11 @@ Thermal integrated + 熱画像装置内蔵 Thermal & Primary integrated + 熱画像装置内蔵・プライマリに内蔵 Not Supported @@ -1263,7 +1265,7 @@ Vision Mode Sichtmodus - ビジョン モード + 映像モード Modalità Visiva 視覺模式 视觉模式 @@ -1501,7 +1503,7 @@ Añade automáticamente accesorios o cargadores (de la categoría seleccionada) a todas las armas de la lista de objetos Es werden automatisch kompatible Aufsätze oder Magazine für alle ausgewählten Waffen hinzugefügt Automatycznie doda kompatybilne dodatki oraz magazynki (odpowiednio do każdej kategorii) dla wszystkich broni na liście - 現在のアイテムリスト内にある全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します + 現在のアイテムリスト内の全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します Добавляет совместимые приспособления или магазины (в зависимости от выбранной категории) для всего оружия в текущем списке предметов Irá automaticamente adicionar acessórios ou carregadores (baseado na categoria selecionada) para todas as armas na lista de itens atual Ajoute automatiquement des accessoires ou des chargeurs compatibles (en fonction de la catégorie sélectionnée), pour toutes les armes de la liste actuelle. diff --git a/addons/artillerytables/functions/fnc_rangeTableOpen.sqf b/addons/artillerytables/functions/fnc_rangeTableOpen.sqf index 97c8dfe435..327a2903a0 100644 --- a/addons/artillerytables/functions/fnc_rangeTableOpen.sqf +++ b/addons/artillerytables/functions/fnc_rangeTableOpen.sqf @@ -65,7 +65,7 @@ GVAR(magModeData) = []; { _x params ["_xDisplayNameShort", "_xDisplayName", "_xInitSpeed", "_xAirFriction"]; if (_allSameCharge) then { - _ctrlChargeList lbAdd format ["%1", _xDisplayNameShort]; + _ctrlChargeList lbAdd _xDisplayNameShort; _ctrlChargeList lbSetTooltip [count GVAR(magModeData), format ["%1\n%2 m/s\n%3", _xDisplayName, _xInitSpeed toFixed 1, _xAirFriction]]; GVAR(magModeData) pushBack [_xInitSpeed, _xAirFriction]; } else { diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index 4def2f87a6..cfd8f460a9 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -90,7 +90,7 @@ if (GVAR(showWind2)) then { _elevationAbs = Round(_elevationAbs * 100) / 100; if (_elevationAbs > 0) then { - ctrlSetText [400, format["%1", abs(_elevationAbs)]]; + ctrlSetText [400, str abs _elevationAbs]; } else { if (_elevationAbs < 0) then { ctrlSetText [400, format["%1D", abs(_elevationAbs)]]; @@ -100,7 +100,7 @@ if (_elevationAbs > 0) then { }; _elevationRel = Round(_elevationRel * 100) / 100; if (_elevationRel > 0) then { - ctrlSetText [401, format["%1", abs(_elevationRel)]]; + ctrlSetText [401, str abs _elevationRel]; } else { if (_elevationRel < 0) then { ctrlSetText [401, format["%1D", abs(_elevationRel)]]; @@ -110,7 +110,7 @@ if (_elevationRel > 0) then { }; _elevationCur = Round(_elevationCur * 100) / 100; if (_elevationCur > 0) then { - ctrlSetText [402, format["%1", abs(_elevationCur)]]; + ctrlSetText [402, str abs _elevationCur]; } else { if (_elevationCur < 0) then { ctrlSetText [402, format["%1D", abs(_elevationCur)]]; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 83325b4cde..7212d89c22 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -64,6 +64,8 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then { [objNull, _item, true] call EFUNC(common,claim); + [[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured); + // Fix cancelling loading a carried item if (!isNull attachedTo _item) then { detach _item; @@ -85,6 +87,9 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then { true // return } else { + // Unlock the object + [objNull, _item, true] call EFUNC(common,claim); + [[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured); // Fix cancelling loading a carried item diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 579f30d0a7..73a83ac387 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -48,7 +48,7 @@ Custom name has been cleared. - カスタムネームが削除されました。 + カスタム名が削除されました。 Le nom personnalisé a été supprimé. Пользовательское название удалено. Eigener Name wurde gelöscht. @@ -108,7 +108,7 @@ Carga Carico Cargaison - カーゴ + 貨物 화물 貨物 货物 @@ -124,7 +124,7 @@ Menu de carga Menù del Carico Menu de cargaison - カーゴ メニュー + 貨物メニュー 화물 메뉴 貨物選單 货物菜单 @@ -140,7 +140,7 @@ Espacio de carga restante: %1 Spazio di carico rimanente: %1 Espace de chargement restant : %1 - カーゴの空き容量: %1 + 貨物室の空き容量: %1 선적 공간 남음: %1 貨物剩餘空間: %1 货物剩余空间:%1 @@ -156,7 +156,7 @@ Habilitar carga Abilita Carico Activer la cargaison - カーゴを有効化 + 貨物を有効化 화물 활성화 啟用貨物裝載 启用货物装载 @@ -172,7 +172,7 @@ Umožňuje naložit předměty do nákladového prostoru vozidla Abilita il modulo di caricamento nel carico Active la possibilité de charger du matériel dans un module de fret (véhicule/container). - カーゴ モジュールで積み込みを有効化 + 貨物積載モジュールを有効化 화물 모듈을 활성화합니다 啟用貨物裝載功能 启用货物装载功能 @@ -187,7 +187,7 @@ Ajustes de carga Impostazioni Carico Paramètres de cargaison - カーゴ設定 + 貨物設定 화물 설정 貨物設定 货物设定 @@ -203,7 +203,7 @@ Konfigurace nákladního modulu Configura le impostazioni del modulo carico Configure les paramètres du module de cargaison. - カーゴ モジュールの設定を構成 + 貨物モジュールの設定を変更します 화물 모듈의 환경 설정을 바꿉니다 配置貨物模塊設定 配置货物模块设定 @@ -219,7 +219,7 @@ %1<br/>caricato su<br/>%2 %1<br/>berakodva ide:<br/>%2 %1<br/>загружен в<br/>%2 - %1 は<br/>%2 へ<br/>積み込まれました + %1 を<br/>%2 に<br/>積み込みました %1은(는)<br/>%2 에 실림 %1<br/>裝載至<br/>%2 %1<br/>装载至<br/>%2 @@ -235,7 +235,7 @@ Hai scaricato<br/>%1 da<br/>%2 1%<br/>kirakodva ebből:<br/>%2 %1<br/>разгружен из<br/>%2 - %1 が<br/>%2 から<br/>降ろされました + %1 を<br/>%2 から<br/>降ろしました %1은(는)<br/>%2에서 내려짐 從<br/>%2卸載<br/>%1 从<br/>%2卸载<br/>%1 @@ -243,10 +243,12 @@ Loading %1 into %2... Cargando %1 en %2... + %1 を %2 に積み込んでいます・・・ Unloading %1 from %2... Descargando %1 de %2... + %1 を %2 から降ろしています・・・ %1<br/>could not be loaded @@ -285,7 +287,7 @@ Kann nicht entladen werden Impossibile da scaricare Ne peut pas être déchargé - 降ろせません + 荷降ろし不可能です 하역할 수가 없습니다 @@ -293,12 +295,12 @@ Frachtgröße: %1 Dimensione Carico: %1 Encombrement fret: %1 - カーゴ サイズ: %1 + 貨物のサイズ: %1 화물 크기: %1 Custom Name - カスタムネーム + カスタム名 Nom personnalisé Eigener Name Nome Personalizzato @@ -311,7 +313,7 @@ Set a custom cargo name used in the cargo interface. - カーゴ一覧で使用されるカスタムネームを設定します。 + 貨物インターフェイスで使用されるカスタム名を設定します。 Définit un nom de fret personnalisé qui sera visible dans le menu de cargaison. Установить пользовательское имя груза, используемое в интерфейсе погрузки. Definiere eigenen Frachtnamen, welcher im Frachtraum genutzt wird. @@ -326,7 +328,7 @@ Cargo Space Frachtraum Spazio di Carico - カーゴ スペース + 貨物室の容量 貨物空間 货物空间 Przestrzeń ładunkowa @@ -342,7 +344,7 @@ The cargo space available in this vehicle/container Verfügbarer Frachtraum in diesem Fahrzeug/Container Lo spazio disponibile in questo veicolo/container - この車両/コンテナでカーゴ スペースを使えるようにします + この車両/コンテナで使用可能な貨物室の容量 設定此載具/集裝箱可裝載多少貨物 设定此载具/集装箱可装载多少货物 Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze @@ -357,7 +359,7 @@ Cargo Size Frachtgröße Dimensioni nel Carico - カーゴ サイズ + 貨物のサイズ 貨物的大小 货物的大小 Wielkość ładunku @@ -373,7 +375,7 @@ The cargo space required to hold this object (-1 for not loadable) Frachtraumgröße, welche zum Einladen dieses Objektes benötigt wird (-1 nicht einladbar) Lo spazio di carico necessario per contenere questo oggetto (-1 per non caricabile) - オブジェクトを積載するのに必要なカーゴ スペース (-1 で積載不可にします) + このオブジェクトの積載に必要な貨物室の容量 (-1 で積載不可に) 此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載) 此货物会占掉多少空间(设定 -1 的话此货物就不能被装载) Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania) @@ -432,7 +434,7 @@ Modifier for how long it takes to paradrop a cargo item. Beeinflusst die zusätzliche Zeit für Türlastabwürfe. - カーゴ アイテムを空中投下するまでの時間を変更します。 + 貨物の空中投下に掛かる時間を変更します。 Modifica quanto tempo viene impiegato per paracadutare oggetti dal carico. Modifie le temps nécessaire au paralargage d'une cargaison. 設定空投所需消耗的時間 @@ -447,7 +449,7 @@ Load Time Coefficient Ladezeitmultiplikator - 積載所要時間係数 + 積載の所要時間係数 Współczynnik czasu załadowania Coefficente Tempo Caricamento Коэф. времени погрузки @@ -462,7 +464,7 @@ Modifies how long it takes to load/unload items.\nTime, in seconds, is the size of the item multiplied by this value. Gibt an, wie lange das Laden / Entladen von Gegenständen dauern soll.\nZeit in Sekunden, die mit der Größe des Gegenstandes multipliziert wird. - アイテムのロード/アンロードに掛かる時間を変更します。\n時間 (秒) は、アイテムのサイズにこの値を掛けたものです。 + 貨物の積み込み/積み下ろしに掛かる時間を変更します。\n時間 (秒) は、貨物のサイズにこの値を掛けたものです。 Modyfikuje, jak długo zajmuje załadowywanie/wyładowywanie przedmiotów. \nCzasem, w sekundach, jest wielkość przedmiotu razy jego wartość. Modifica il tempo impiegato per caricare o scaricare gli oggetti.\nIl tempo, in secondi, equivale alla dimensione dell'oggetto moltiplicata per questo valore Изменяет время для загрузки/выгрузки предметов. \n Время (сек) - это размер предмета, умноженный на это значение. @@ -477,7 +479,7 @@ Reopen Cargo Menu Kargo Menüsünü Tekrar Aç - カーゴ メニューを再度開く + 貨物メニューを再度開く Rouvrir le menu de cargaison Переоткрыть меню погрузки Frachtmenü erneut öffnen @@ -491,7 +493,7 @@ Reopen the Cargo Menu after successful unload. Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster. - カーゴを降ろした後に再びカーゴ メニューを開きます。 + 貨物を降ろした後に再び貨物メニューを開きます。 Réouvre le menu de cargaison après un déchargement réussi. Переоткрыть меню погрузки после успешной выгрузки. Frachtmenü erneut öffnen, nach erfolgreichen Entladen. @@ -507,7 +509,7 @@ 화물 내린 후 운반 Нести после выгрузки Llevar encima tras la descarga - 荷降ろし後の運搬 + 荷降ろし後に持ち運ぶ Niesienie Po Rozładowaniu Nach dem Entladen tragen Trasporta dopo aver Scaricato @@ -519,7 +521,7 @@ 화물 아이템을 내린 후 들거나 끌지 여부를 결정합니다. Нужно ли переносить или тащить предметы после их выгрузки. Controla si los objetos de carga son llevados encima o arrastrados despues de la descarga. - 荷降ろし後、貨物アイテムを運ぶか引きずるかを制御する。 + 荷降ろし後、貨物を運ぶか引きずるかを制御する。 Kontroluje, czy przedmioty z ładunku są przenoszone lub ciągnięte po ich wyładowaniu. Steuert, ob Objekte nach dem Entladen getragen oder gezogen werden. Determina se un oggetto verrà subito trasportato o trascinato dopo essere stato scaricato. diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index c703591344..4c98e813b1 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -96,7 +96,7 @@ _object setVariable ["acre_sys_core_isDisabled", _set > 0, true]; }; if (["task_force_radio"] call FUNC(isModLoaded)) then { - _object setVariable ["tf_voiceVolume", [1, 0] select (_set > 0), true]; + _object setVariable ["tf_voiceVolume", parseNumber (_set == 0), true]; }; }] call CBA_fnc_addEventHandler; diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index 6c58954b13..3774a3fc29 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -219,7 +219,7 @@ if (_state) then { _keyPressedInfo set [1, ((_keyPressedInfo select 1) - 1) max 0]; if (_keyPressedInfo isEqualTo [false, 0]) then { - GVAR(keyboardInputMain) deleteAt _key, + GVAR(keyboardInputMain) deleteAt _key; }; }, _key, 0.5] call CBA_fnc_waitAndExecute; }]; diff --git a/addons/common/functions/fnc_getWeight.sqf b/addons/common/functions/fnc_getWeight.sqf index 8e048431c9..300a74d382 100644 --- a/addons/common/functions/fnc_getWeight.sqf +++ b/addons/common/functions/fnc_getWeight.sqf @@ -5,10 +5,10 @@ * * Arguments: * 0: The Unit (usually the player) - * 1: Force a return type + * 1: Return imperial units * * Return Value: - * The return value + * Weight string * * Example: * [player] call ace_common_fnc_getWeight diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf index 6c45fb8966..02a9379e6c 100644 --- a/addons/common/functions/fnc_receiveRequest.sqf +++ b/addons/common/functions/fnc_receiveRequest.sqf @@ -31,7 +31,7 @@ if (isLocalized _requestMessage) then { _requestMessage = format [_requestMessage, [_caller, false, true] call FUNC(getName)]; }; -hint format ["%1", _requestMessage]; // @todo ? +hint str _requestMessage; // @todo ? if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then { terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT); diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index bfce2cd510..64d5fc61f3 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1641,7 +1641,7 @@ Renommer Umbenennen Zmień nazwę - 改名 + 名前変更 Rinomina 이름 바꾸기 重新命名 diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/CfgWeapons.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/CfgWeapons.hpp index 994af4f667..4fda436d18 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/CfgWeapons.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/CfgWeapons.hpp @@ -1,7 +1,14 @@ class CfgWeapons { // Last update: RHSAFRF 0.5.6 - class rhs_acc_perst3; - class rhs_acc_perst3_2dp: rhs_acc_perst3 { - baseWeapon = "rhs_acc_perst3_2dp"; + class rhs_acc_perst3_2dp_light; + class rhs_acc_perst3_2dp_light_h: rhs_acc_perst3_2dp_light { + baseWeapon = "rhs_acc_perst3_2dp_h"; + }; + + class acc_pointer_IR; + class rhs_acc_perst1ik: acc_pointer_IR { + MRT_SwitchItemHintText = ""; // prevent false info for illuminator stat + MRT_SwitchItemNextClass = ""; + MRT_SwitchItemPrevClass = ""; }; }; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/config.cpp index bb2e1bf3a2..b544accac3 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/config.cpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_arsenal/config.cpp @@ -15,4 +15,4 @@ class CfgPatches { }; }; -//#include "CfgWeapons.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_arsenal/CfgWeapons.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_arsenal/CfgWeapons.hpp index 8dc735265c..b87223ae27 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_arsenal/CfgWeapons.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_arsenal/CfgWeapons.hpp @@ -3,6 +3,9 @@ class CfgWeapons { class acc_pointer_IR; class rhsusf_acc_anpeq15: acc_pointer_IR { baseWeapon = "rhsusf_acc_anpeq15"; + MRT_SwitchItemHintText = ""; // prevent false info for illuminator stat + MRT_SwitchItemNextClass = ""; + MRT_SwitchItemPrevClass = ""; }; class rhsusf_acc_anpeq15_bk: rhsusf_acc_anpeq15 { baseWeapon = "rhsusf_acc_anpeq15_bk"; @@ -28,8 +31,12 @@ class CfgWeapons { class rhsusf_acc_wmx_bk: rhsusf_acc_M952V { baseWeapon = "rhsusf_acc_wmx_bk"; }; + class rhsusf_acc_anpeq15A: acc_pointer_IR { baseWeapon = "rhsusf_acc_anpeq15A"; + MRT_SwitchItemHintText = ""; // prevent false info for illuminator stat + MRT_SwitchItemNextClass = ""; + MRT_SwitchItemPrevClass = ""; }; class rhsusf_acc_anpeq15_top: rhsusf_acc_anpeq15A { baseWeapon = "rhsusf_acc_anpeq15_top"; @@ -37,8 +44,12 @@ class CfgWeapons { class rhsusf_acc_anpeq15_bk_top: rhsusf_acc_anpeq15_top { baseWeapon = "rhsusf_acc_anpeq15_bk_top"; }; + class rhsusf_acc_anpeq15side: acc_pointer_IR { baseWeapon = "rhsusf_acc_anpeq15side"; + MRT_SwitchItemHintText = ""; // prevent false info for illuminator stat + MRT_SwitchItemNextClass = ""; + MRT_SwitchItemPrevClass = ""; }; class rhsusf_acc_anpeq15side_bk: rhsusf_acc_anpeq15side { baseWeapon = "rhsusf_acc_anpeq15side_bk"; diff --git a/addons/cookoff/CfgSounds.hpp b/addons/cookoff/CfgSounds.hpp new file mode 100644 index 0000000000..742fb589d9 --- /dev/null +++ b/addons/cookoff/CfgSounds.hpp @@ -0,0 +1,66 @@ +#define VOLUME 2 +#define PITCH 1 + +#define SHOTSOUND(type,dist,N,maxDistance)\ +class GVAR(TRIPLES(type,dist,N)) {\ + sound[] = {QPATHTOF(sounds\type\DOUBLES(dist,N).wss), VOLUME, PITCH, maxDistance};\ + titles[] = {};\ +} + +#define SHOTSOUNDCLASS(type,dist,maxDistance)\ +SHOTSOUND(type,dist,1,maxDistance);\ +SHOTSOUND(type,dist,2,maxDistance);\ +SHOTSOUND(type,dist,3,maxDistance) + +#define SHOTSOUNDCLASSTYPE(type,maxDistance)\ +SHOTSOUNDCLASS(type,close,maxDistance);\ +SHOTSOUNDCLASS(type,mid,maxDistance);\ +SHOTSOUNDCLASS(type,far,maxDistance) + +// Allows other mods to change sounds for cook-off +class CfgSounds { + // These macros set up the sounds for the various classes + SHOTSOUNDCLASSTYPE(shotbullet,1250); + SHOTSOUNDCLASSTYPE(shotrocket,1600); + SHOTSOUNDCLASSTYPE(shotshell,1300); + + // Missiles use the same sounds as rockets + class GVAR(shotmissile_close_1): GVAR(shotrocket_close_1) {}; + class GVAR(shotmissile_close_2): GVAR(shotrocket_close_2) {}; + class GVAR(shotmissile_close_3): GVAR(shotrocket_close_3) {}; + class GVAR(shotmissile_mid_1): GVAR(shotrocket_mid_1) {}; + class GVAR(shotmissile_mid_2): GVAR(shotrocket_mid_2) {}; + class GVAR(shotmissile_mid_3): GVAR(shotrocket_mid_3) {}; + class GVAR(shotmissile_far_1): GVAR(shotrocket_far_1) {}; + class GVAR(shotmissile_far_2): GVAR(shotrocket_far_2) {}; + class GVAR(shotmissile_far_3): GVAR(shotrocket_far_3) {}; + + // Submunitions have the same sound as bullets, but a higher maxDistance + class GVAR(shotsubmunitions_close_1): GVAR(shotbullet_close_1) { + sound[] = {QPATHTOF(sounds\shotbullet\close_1.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_close_2): GVAR(shotbullet_close_2) { + sound[] = {QPATHTOF(sounds\shotbullet\close_2.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_close_3): GVAR(shotbullet_close_3) { + sound[] = {QPATHTOF(sounds\shotbullet\close_3.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_mid_1): GVAR(shotbullet_far_1) { + sound[] = {QPATHTOF(sounds\shotbullet\mid_1.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_mid_2): GVAR(shotbullet_mid_2) { + sound[] = {QPATHTOF(sounds\shotbullet\mid_2.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_mid_3): GVAR(shotbullet_mid_3) { + sound[] = {QPATHTOF(sounds\shotbullet\mid_3.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_far_1): GVAR(shotbullet_far_1) { + sound[] = {QPATHTOF(sounds\shotbullet\far_1.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_far_2): GVAR(shotbullet_far_2) { + sound[] = {QPATHTOF(sounds\shotbullet\far_2.wss), VOLUME, PITCH, 1600}; + }; + class GVAR(shotsubmunitions_far_3): GVAR(shotbullet_far_3) { + sound[] = {QPATHTOF(sounds\shotbullet\far_3.wss), VOLUME, PITCH, 1600}; + }; +}; diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index b9c8101595..b33723619e 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -14,15 +14,15 @@ // handle cleaning up effects when vehicle is deleted mid-cookoff [QGVAR(addCleanupHandlers), { params ["_vehicle"]; - + // Don't add a new EH if cookoff is run multiple times if ((_vehicle getVariable [QGVAR(deletedEH), -1]) == -1) then { private _deletedEH = _vehicle addEventHandler ["Deleted", { params ["_vehicle"]; - + [QGVAR(cleanupEffects), [_vehicle]] call CBA_fnc_localEvent; }]; - + _vehicle setVariable [QGVAR(deletedEH), _deletedEH]; }; }] call CBA_fnc_addEventHandler; @@ -58,3 +58,42 @@ [FUNC(detonateAmmunition), [_vehicle, _mags, _total], _delay] call CBA_fnc_waitAndExecute; }; }, nil, ["Man","StaticWeapon"]] call CBA_fnc_addClassEventHandler; + +if (hasInterface) then { + // Plays a sound locally, so that different sounds can be used for various distances + [QGVAR(playCookoffSound), { + params ["_object", "_sound"]; + + if (isNull _object) exitWith {}; + + private _distance = _object distance (positionCameraToWorld [0, 0, 0]); + + TRACE_3("",_object,_sound,_maxDistance); + + // 3 classes of distances: close, mid and far, each having different sound files + private _classDistance = switch (true) do { + case (_distance < DISTANCE_CLOSE): {"close"}; + case (_distance < DISTANCE_MID): {"mid"}; + default {"far"}; + }; + + _sound = format [QGVAR(%1_%2_%3), _sound, _classDistance, floor (random 3) + 1]; + + TRACE_1("",_sound); + + // Allows other mods to change sounds for cook-off + _sound = getArray (configFile >> "CfgSounds" >> _sound >> "sound"); + + if (_sound isEqualTo []) exitWith {}; + + _sound params ["_sound", "_volume", "_pitch", "_maxDistance"]; + + if (_distance > _maxDistance) exitWith {}; + + // Make sure file exists, so RPT isn't spammed with non-existent entry errors + if (!fileExists _sound) exitWith {}; + + // Obeys speed of sound and takes doppler effects into account + playSound3D [_sound, objNull, insideBuilding _object >= 0.5, getPosASL _object, _volume, _pitch + (random 0.2) - 0.1, _maxDistance, 0, true]; + }] call CBA_fnc_addEventHandler; +}; diff --git a/addons/cookoff/config.cpp b/addons/cookoff/config.cpp index 4fba15f5e1..dc7a472855 100644 --- a/addons/cookoff/config.cpp +++ b/addons/cookoff/config.cpp @@ -21,4 +21,5 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgCloudlets.hpp" #include "CfgSFX.hpp" +#include "CfgSounds.hpp" #include "CfgVehicles.hpp" diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index b4d48f3120..c089982e31 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -32,90 +32,89 @@ private _magazineIndex = floor random(count _magazines); private _magazine = _magazines select _magazineIndex; _magazine params ["_magazineClassname", "_amountOfMagazines"]; -if (_amountOfMagazines > 0) exitWith { - private _removed = _amountOfMagazines min floor(1 + random(6 / GVAR(ammoCookoffDuration))); +if (_amountOfMagazines < 0) exitWith { + ERROR_1("mag with no ammo - %1", _magazine); +}; +private _removed = _amountOfMagazines min floor(1 + random(6 / GVAR(ammoCookoffDuration))); - _amountOfMagazines = _amountOfMagazines - _removed; - if (_amountOfMagazines <= 0) then { - _magazines deleteAt _magazineIndex; +_amountOfMagazines = _amountOfMagazines - _removed; +if (_amountOfMagazines <= 0) then { + _magazines deleteAt _magazineIndex; +} else { + _magazine set [1, _amountOfMagazines]; // clear out the magazine +}; +private _timeBetweenAmmoDetonation = (((random 10) / (sqrt _totalAmmo)) min MAX_TIME_BETWEEN_AMMO_DET) max 0.1; +TRACE_2("",_totalAmmo,_timeBetweenAmmoDetonation); +_totalAmmo = _totalAmmo - _removed; + +private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "ammo"); +private _ammoCfg = configFile >> "CfgAmmo" >> _ammo; + +private _speedOfAmmo = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "initSpeed"); +private _simType = getText (_ammoCfg >> "simulation"); + +private _effect2pos = _vehicle selectionPosition "destructionEffect2"; + +private _spawnProjectile = { + params ["_vehicle", "_ammo", "_speed", "_flyAway"]; + + private _spawnPos = _vehicle modelToWorld [-0.2 + (random 0.4), -0.2 + (random 0.4), random 3]; + if (_spawnPos select 2 < 0) then { + _spawnPos set [2, 0]; + }; + + private _projectile = createVehicle [_ammo, _spawnPos, [], 0, "CAN_COLLIDE"]; + if (_flyAway) then { + private _vectorAmmo = [(-1 + (random 2)), (-1 + (random 2)), -0.2 + (random 1)]; + private _velVec = _vectorAmmo vectorMultiply _speed; + _projectile setVectorDir _velVec; + _projectile setVelocity _velVec; } else { - _magazine set [1, _amountOfMagazines]; // clear out the magazine - }; - private _timeBetweenAmmoDetonation = (((random 10) / (sqrt _totalAmmo)) min MAX_TIME_BETWEEN_AMMO_DET) max 0.1; - TRACE_2("",_totalAmmo,_timeBetweenAmmoDetonation); - _totalAmmo = _totalAmmo - _removed; - - private _ammo = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "ammo"); - private _ammoCfg = configFile >> "CfgAmmo" >> _ammo; - - private _speedOfAmmo = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "initSpeed"); - private _simType = getText (_ammoCfg >> "simulation"); - - private _effect2pos = _vehicle selectionPosition "destructionEffect2"; - - private _spawnProjectile = { - params ["_vehicle", "_ammo", "_speed", "_flyAway"]; - - private _spawnPos = _vehicle modelToWorld [-0.2 + (random 0.4), -0.2 + (random 0.4), random 3]; - if (_spawnPos select 2 < 0) then { - _spawnPos set [2, 0]; - }; - - private _projectile = createVehicle [_ammo, _spawnPos, [], 0, "CAN_COLLIDE"]; - if (_flyAway) then { - private _vectorAmmo = [(-1 + (random 2)), (-1 + (random 2)), -0.2 + (random 1)]; - private _velVec = _vectorAmmo vectorMultiply _speed; - _projectile setVectorDir _velVec; - _projectile setVelocity _velVec; - } else { - _projectile setDamage 1; - }; - - _projectile; + _projectile setDamage 1; }; - private _speed = random (_speedOfAmmo / 10) max 1; - - if (toLower _simType == "shotbullet") then { - private _sound = selectRandom [QUOTE(PATHTO_R(sounds\light_crack_close.wss)), QUOTE(PATHTO_R(sounds\light_crack_close_filtered.wss)), QUOTE(PATHTO_R(sounds\heavy_crack_close.wss)), QUOTE(PATHTO_R(sounds\heavy_crack_close_filtered.wss))]; - playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1250]; + _projectile; +}; +private _speed = random (_speedOfAmmo / 10) max 1; +_simType = toLower _simType; +switch (_simType) do { + case ("shotbullet"): { + [QGVAR(playCookoffSound), [_vehicle, _simType]] call CBA_fnc_globalEvent; if (random 1 < 0.6) then { [_vehicle, _ammo, _speed, true] call _spawnProjectile; }; }; - if (toLower _simType == "shotshell") then { - private _sound = selectRandom [QUOTE(PATHTO_R(sounds\heavy_crack_close.wss)), QUOTE(PATHTO_R(sounds\heavy_crack_close_filtered.wss))]; - playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1300]; - + case ("shotshell"): { + [QGVAR(playCookoffSound), [_vehicle, _simType]] call CBA_fnc_globalEvent; if (random 1 < 0.15) then { [_vehicle, _ammo, _speed, true] call _spawnProjectile; }; }; - if (toLower _simType == "shotgrenade") then { + case ("shotgrenade"): { if (random 1 < 0.9) then { _speed = 0; }; [_vehicle, _ammo, _speed, random 1 < 0.5] call _spawnProjectile; }; - if (toLower _simType in ["shotrocket", "shotmissile", "shotsubmunitions"]) then { + case ("shotrocket"); + case ("shotmissile"); + case ("shotsubmunitions"): { if (random 1 < 0.1) then { - private _sound = selectRandom [QUOTE(PATHTO_R(sounds\cannon_crack_close.wss)), QUOTE(PATHTO_R(sounds\cannon_crack_close_filtered.wss))]; - playSound3D [_sound, objNull, false, (getPosASL _vehicle), 3, 1, 1600]; - + [QGVAR(playCookoffSound), [_vehicle, _simType]] call CBA_fnc_globalEvent; [_vehicle, _ammo, _speed, random 1 < 0.3] call _spawnProjectile; } else { createvehicle ["ACE_ammoExplosionLarge", (_vehicle modelToWorld _effect2pos), [], 0 , "CAN_COLLIDE"]; }; }; - if (toLower _simType in ["shotdirectionalbomb", "shotmine"]) then { + case ("shotmine"); + case ("shotdirectionalbomb"): { if (random 1 < 0.5) then { // Not all explosives detonate on destruction, some have scripted alternatives private _scripted = getNumber (_ammoCfg >> "triggerWhenDestroyed") == 1; if !(_scripted) then { _ammo = getText (_ammoCfg >> "ace_explosives_Explosive"); }; - // If a scripted alternative doesn't exist use generic explosion if (_ammo != "") then { [_vehicle, _ammo, 0, false] call _spawnProjectile; @@ -124,12 +123,10 @@ if (_amountOfMagazines > 0) exitWith { }; }; }; - if (toLower _simType == "shotilluminating") then { + case ("shotilluminating"): { if (random 1 < 0.15) then { [_vehicle, _ammo, _speed, random 1 < 0.3] call _spawnProjectile; }; }; - - [FUNC(detonateAmmunition), [_vehicle, _magazines, _totalAmmo], _timeBetweenAmmoDetonation] call CBA_fnc_waitAndExecute; }; -ERROR_1("mag with no ammo - %1", _magazine); +[FUNC(detonateAmmunition), [_vehicle, _magazines, _totalAmmo], _timeBetweenAmmoDetonation] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/script_component.hpp b/addons/cookoff/script_component.hpp index 03b3e5c5f5..d41b8f675c 100644 --- a/addons/cookoff/script_component.hpp +++ b/addons/cookoff/script_component.hpp @@ -37,3 +37,6 @@ // Common commander hatch defines for default vehicles #define DEFAULT_COMMANDER_HATCHES ["osa_poklop_commander", "hatch_commander_axis"] + +#define DISTANCE_CLOSE 235 +#define DISTANCE_MID 952 diff --git a/addons/cookoff/sounds/cannon_crack_close.wss b/addons/cookoff/sounds/cannon_crack_close.wss deleted file mode 100644 index b45ea96ab0..0000000000 Binary files a/addons/cookoff/sounds/cannon_crack_close.wss and /dev/null differ diff --git a/addons/cookoff/sounds/cannon_crack_close_filtered.wss b/addons/cookoff/sounds/cannon_crack_close_filtered.wss deleted file mode 100644 index 4ddb18539b..0000000000 Binary files a/addons/cookoff/sounds/cannon_crack_close_filtered.wss and /dev/null differ diff --git a/addons/cookoff/sounds/heavy_crack_close.wss b/addons/cookoff/sounds/heavy_crack_close.wss deleted file mode 100644 index 95cc68d90e..0000000000 Binary files a/addons/cookoff/sounds/heavy_crack_close.wss and /dev/null differ diff --git a/addons/cookoff/sounds/heavy_crack_close_filtered.wss b/addons/cookoff/sounds/heavy_crack_close_filtered.wss deleted file mode 100644 index 1b4520cd4a..0000000000 Binary files a/addons/cookoff/sounds/heavy_crack_close_filtered.wss and /dev/null differ diff --git a/addons/cookoff/sounds/light_crack_close.wss b/addons/cookoff/sounds/light_crack_close.wss deleted file mode 100644 index ef284f24ef..0000000000 Binary files a/addons/cookoff/sounds/light_crack_close.wss and /dev/null differ diff --git a/addons/cookoff/sounds/light_crack_close_filtered.wss b/addons/cookoff/sounds/light_crack_close_filtered.wss deleted file mode 100644 index b1c76fa8ed..0000000000 Binary files a/addons/cookoff/sounds/light_crack_close_filtered.wss and /dev/null differ diff --git a/addons/cookoff/sounds/shotbullet/close_1.wss b/addons/cookoff/sounds/shotbullet/close_1.wss new file mode 100644 index 0000000000..19f07503bf Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/close_1.wss differ diff --git a/addons/cookoff/sounds/shotbullet/close_2.wss b/addons/cookoff/sounds/shotbullet/close_2.wss new file mode 100644 index 0000000000..bf83c29599 Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/close_2.wss differ diff --git a/addons/cookoff/sounds/shotbullet/close_3.wss b/addons/cookoff/sounds/shotbullet/close_3.wss new file mode 100644 index 0000000000..dcf4198acd Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/close_3.wss differ diff --git a/addons/cookoff/sounds/shotbullet/far_1.wss b/addons/cookoff/sounds/shotbullet/far_1.wss new file mode 100644 index 0000000000..07cd30e15b Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/far_1.wss differ diff --git a/addons/cookoff/sounds/shotbullet/far_2.wss b/addons/cookoff/sounds/shotbullet/far_2.wss new file mode 100644 index 0000000000..795581517a Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/far_2.wss differ diff --git a/addons/cookoff/sounds/shotbullet/far_3.wss b/addons/cookoff/sounds/shotbullet/far_3.wss new file mode 100644 index 0000000000..d7e5538150 Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/far_3.wss differ diff --git a/addons/cookoff/sounds/shotbullet/mid_1.wss b/addons/cookoff/sounds/shotbullet/mid_1.wss new file mode 100644 index 0000000000..b02a481b42 Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/mid_1.wss differ diff --git a/addons/cookoff/sounds/shotbullet/mid_2.wss b/addons/cookoff/sounds/shotbullet/mid_2.wss new file mode 100644 index 0000000000..1e184cc1ef Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/mid_2.wss differ diff --git a/addons/cookoff/sounds/shotbullet/mid_3.wss b/addons/cookoff/sounds/shotbullet/mid_3.wss new file mode 100644 index 0000000000..10606bf138 Binary files /dev/null and b/addons/cookoff/sounds/shotbullet/mid_3.wss differ diff --git a/addons/cookoff/sounds/shotrocket/close_1.wss b/addons/cookoff/sounds/shotrocket/close_1.wss new file mode 100644 index 0000000000..31ff1cbe38 Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/close_1.wss differ diff --git a/addons/cookoff/sounds/shotrocket/close_2.wss b/addons/cookoff/sounds/shotrocket/close_2.wss new file mode 100644 index 0000000000..8ef09dcf04 Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/close_2.wss differ diff --git a/addons/cookoff/sounds/shotrocket/close_3.wss b/addons/cookoff/sounds/shotrocket/close_3.wss new file mode 100644 index 0000000000..5410c359e4 Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/close_3.wss differ diff --git a/addons/cookoff/sounds/shotrocket/far_1.wss b/addons/cookoff/sounds/shotrocket/far_1.wss new file mode 100644 index 0000000000..e71990476b Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/far_1.wss differ diff --git a/addons/cookoff/sounds/shotrocket/far_2.wss b/addons/cookoff/sounds/shotrocket/far_2.wss new file mode 100644 index 0000000000..bae24fa78e Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/far_2.wss differ diff --git a/addons/cookoff/sounds/shotrocket/far_3.wss b/addons/cookoff/sounds/shotrocket/far_3.wss new file mode 100644 index 0000000000..093e841277 Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/far_3.wss differ diff --git a/addons/cookoff/sounds/shotrocket/mid_1.wss b/addons/cookoff/sounds/shotrocket/mid_1.wss new file mode 100644 index 0000000000..f927d7f174 Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/mid_1.wss differ diff --git a/addons/cookoff/sounds/shotrocket/mid_2.wss b/addons/cookoff/sounds/shotrocket/mid_2.wss new file mode 100644 index 0000000000..785dd5b603 Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/mid_2.wss differ diff --git a/addons/cookoff/sounds/shotrocket/mid_3.wss b/addons/cookoff/sounds/shotrocket/mid_3.wss new file mode 100644 index 0000000000..7fb384421d Binary files /dev/null and b/addons/cookoff/sounds/shotrocket/mid_3.wss differ diff --git a/addons/cookoff/sounds/shotshell/close_1.wss b/addons/cookoff/sounds/shotshell/close_1.wss new file mode 100644 index 0000000000..aa9a0bc718 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/close_1.wss differ diff --git a/addons/cookoff/sounds/shotshell/close_2.wss b/addons/cookoff/sounds/shotshell/close_2.wss new file mode 100644 index 0000000000..355d061d01 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/close_2.wss differ diff --git a/addons/cookoff/sounds/shotshell/close_3.wss b/addons/cookoff/sounds/shotshell/close_3.wss new file mode 100644 index 0000000000..3847fa870f Binary files /dev/null and b/addons/cookoff/sounds/shotshell/close_3.wss differ diff --git a/addons/cookoff/sounds/shotshell/far_1.wss b/addons/cookoff/sounds/shotshell/far_1.wss new file mode 100644 index 0000000000..262b037c12 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/far_1.wss differ diff --git a/addons/cookoff/sounds/shotshell/far_2.wss b/addons/cookoff/sounds/shotshell/far_2.wss new file mode 100644 index 0000000000..38e0e1eb81 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/far_2.wss differ diff --git a/addons/cookoff/sounds/shotshell/far_3.wss b/addons/cookoff/sounds/shotshell/far_3.wss new file mode 100644 index 0000000000..781f86e4b8 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/far_3.wss differ diff --git a/addons/cookoff/sounds/shotshell/mid_1.wss b/addons/cookoff/sounds/shotshell/mid_1.wss new file mode 100644 index 0000000000..76c68cdee1 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/mid_1.wss differ diff --git a/addons/cookoff/sounds/shotshell/mid_2.wss b/addons/cookoff/sounds/shotshell/mid_2.wss new file mode 100644 index 0000000000..f84b579bc4 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/mid_2.wss differ diff --git a/addons/cookoff/sounds/shotshell/mid_3.wss b/addons/cookoff/sounds/shotshell/mid_3.wss new file mode 100644 index 0000000000..990a583a04 Binary files /dev/null and b/addons/cookoff/sounds/shotshell/mid_3.wss differ diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index 5bc757e295..fc05185638 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -541,7 +541,7 @@ GVAR(menuRun) = true; }; case "options": { (__dsp displayCtrl __Option0) ctrlSetText "Signal Delay"; - (__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" }); + (__dsp displayCtrl __Option1) ctrlSetText (["Direction: MIL", "Direction: Deg"] select GVAR(useDegrees)); (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa); if (GVAR(SEL)) then { GVAR(vectorConnected) = false; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index 21e19ff023..b7064ce248 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -65,10 +65,10 @@ GVAR(outputPFH) = [{ private _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; // Output - __gridControl ctrlSetText format ["%1", _dagrGrid]; - __speedControl ctrlSetText format ["%1", _dagrSpeed]; - __elevationControl ctrlSetText format ["%1", _dagrElevation]; - __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 �", _dagrHeading] }); - __timeControl ctrlSetText format ["%1", _dagrTime]; + __gridControl ctrlSetText _dagrGrid; + __speedControl ctrlSetText _dagrSpeed; + __elevationControl ctrlSetText _dagrElevation; + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { str _dagrHeading } else { format ["%1 �", _dagrHeading] }); + __timeControl ctrlSetText _dagrTime; }, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 5eb1b9bffa..e9bd0ea6c3 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -89,8 +89,8 @@ private _dagrDist = str GVAR(LAZDIST) + "m"; GVAR(vectorGrid) = _dagrGrid; // OUTPUT -__gridControl ctrlSetText format ["%1", _dagrGrid]; -__speedControl ctrlSetText format ["%1", _dagrDist]; -__elevationControl ctrlSetText format ["%1", _dagrElevation]; -__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1°", _bearing] }); -__timeControl ctrlSetText format ["%1", _dagrTime]; +__gridControl ctrlSetText _dagrGrid; +__speedControl ctrlSetText _dagrDist; +__elevationControl ctrlSetText _dagrElevation; +__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { str _bearing } else { format ["%1°", _bearing] }); +__timeControl ctrlSetText _dagrTime; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 2e0588ccc4..27944f0bb9 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -85,10 +85,10 @@ GVAR(outputPFH) = [{ }); // Output - __gridControl ctrlSetText format ["%1", _dagrGrid]; - __speedControl ctrlSetText format ["%1", _bearing]; - __elevationControl ctrlSetText format ["%1", _dagrGrid2]; - __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1°", _dagrHeading] }); - __timeControl ctrlSetText format ["%1", _dagrDistance]; + __gridControl ctrlSetText _dagrGrid; + __speedControl ctrlSetText str _bearing; + __elevationControl ctrlSetText _dagrGrid2; + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { str _dagrHeading } else { format ["%1°", _dagrHeading] }); + __timeControl ctrlSetText _dagrDistance; }, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/disarming/functions/fnc_showItemsInListbox.sqf b/addons/disarming/functions/fnc_showItemsInListbox.sqf index e05e27c87e..11d7bd470b 100644 --- a/addons/disarming/functions/fnc_showItemsInListbox.sqf +++ b/addons/disarming/functions/fnc_showItemsInListbox.sqf @@ -55,7 +55,7 @@ params ["_listBoxCtrl", "_itemsCountArray"]; }; }; - _listBoxCtrl lbAdd format ["%1", _displayName]; + _listBoxCtrl lbAdd _displayName; _listBoxCtrl lbSetData [((lbSize _listBoxCtrl) - 1), _classname]; _listBoxCtrl lbSetPicture [((lbSize _listBoxCtrl) - 1), _picture]; _listBoxCtrl lbSetTextRight [((lbSize _listBoxCtrl) - 1), str _count]; diff --git a/addons/field_rations/stringtable.xml b/addons/field_rations/stringtable.xml index 8a513a2926..78e1ebfe87 100644 --- a/addons/field_rations/stringtable.xml +++ b/addons/field_rations/stringtable.xml @@ -465,7 +465,7 @@ Scorta d'acqua 飲用水補給 饮用水补给 - 水資源 + 水資源量 Водные ресурсы Źródło wody 식수 보급량 @@ -478,7 +478,7 @@ La quantità di acqua disponibile per interazioni ACE Razioni da Campo di sorgenti d'acqua (-1 nessuna, -10 infinita) 水源可供補充飲用水的次數(-1為關閉,-10為無限次)。 水源可供取水的次数(-1为关闭,-10为无限次)。 - ACE フィールド レーションで利用できる水源の量を設定できます。(-1で無効化、-10で無限) + ACE フィールド レーションで利用できる水源の資源量を設定できます。(-1で無効化、-10で無限) Количество воды, доступной для использования в ACE Полевые рационы. (-1 - отключено, -10 - бесконечно) Ilość wody dostępnej dla Akcji ACE Źródła wody (-1 wyłączone, -10 nieskończone) ACE 전투식량 물 근처 행동에서 얼마나 물을 얻어 갈 수 있는지를 정합니다 (-1은 비활성화, -10은 무한대) diff --git a/addons/fortify/functions/fnc_createObjectMarker.sqf b/addons/fortify/functions/fnc_createObjectMarker.sqf index 185ae640eb..ce6fd279b0 100644 --- a/addons/fortify/functions/fnc_createObjectMarker.sqf +++ b/addons/fortify/functions/fnc_createObjectMarker.sqf @@ -29,7 +29,7 @@ private _direction = getDir _object; // Marker name unique to this object private _markerNameStr = format [QGVAR(marker_%1), hashValue _object]; -private _channel = if (GVAR(markObjectsOnMap) == 2) then { 0 } else { 1 }; +private _channel = parseNumber (GVAR(markObjectsOnMap) != 2); private _marker = createMarkerLocal [_markerNameStr, _object, _channel, _unit]; TRACE_2("created",_marker,_channel); diff --git a/addons/hearing/functions/fnc_addEarPlugs.sqf b/addons/hearing/functions/fnc_addEarPlugs.sqf index b73c94bf01..f467352410 100644 --- a/addons/hearing/functions/fnc_addEarPlugs.sqf +++ b/addons/hearing/functions/fnc_addEarPlugs.sqf @@ -48,7 +48,7 @@ _caliber = call { if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 }; if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 }; if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; - if (_caliber <= 0) then { 6.5 } else { _caliber }; + [_caliber, 6.5] select (_caliber <= 0); }; private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 98ee093381..0d8596f53b 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -27,7 +27,9 @@ params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"]; if (_weapon in ["Throw", "Put"]) exitWith {}; if (_distance > 50) exitWith {}; -private _vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)}; +private _vehAttenuation = [GVAR(playerVehAttenuation), 1] select ( + (ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player} +); private _distance = 1 max _distance; private _silencer = switch (_weapon) do { @@ -78,7 +80,7 @@ if (isNil "_loudness") then { if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 }; if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 }; if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; - if (_caliber <= 0) then { 6.5 } else { _caliber }; + [_caliber, 6.5] select (_caliber <= 0) }; _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5; diff --git a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf index fb12cad00f..14d89f82e3 100644 --- a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf +++ b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf @@ -31,11 +31,10 @@ private _configLaunchHeightClear = getNumber (_attackConfig >> QGVAR(launchHeigh private _startingStage = if (_configLaunchHeightClear > 0) then { STAGE_LAUNCH; // LOAL-HI / LO } else { - if (_seekerTargetPos isEqualTo [0,0,0]) then { - STAGE_SEEK_CRUISE; // LOAL-DIR - } else { - STAGE_ATTACK_CRUISE // LOBL - }; + [ + STAGE_ATTACK_CRUISE, + STAGE_SEEK_CRUISE + ] select (_seekerTargetPos isEqualTo [0,0,0]); }; // Set data in param array diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 54b6516fff..c306595fc7 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -145,7 +145,7 @@ GVAR(no_cams) sort true; GVAR(cam) camCommit 0; ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]]; - ctrlSetText [2, format["%1", GVAR(cur_cam) + 1]]; + ctrlSetText [2, str (GVAR(cur_cam) + 1)]; private _cam_time = CBA_missionTime - (GVAR(huntIR) getVariable [QGVAR(startTime), CBA_missionTime]); ctrlSetText [3, format["%1 s", round(_cam_time)]]; private _cam_pos = getPosVisual GVAR(huntIR); diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index d920922ddb..ae00f4fb82 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -49,7 +49,7 @@ _position = if (_position isEqualType "") then { } else { if (_position isEqualType []) then { // If the action is set to a array position, create the suitable code - compile format ["%1", _position]; + compile str _position; } else { _position; }; diff --git a/addons/interact_menu/functions/fnc_createVehiclesActions.sqf b/addons/interact_menu/functions/fnc_createVehiclesActions.sqf index 54f92967c2..3aef7b4552 100644 --- a/addons/interact_menu/functions/fnc_createVehiclesActions.sqf +++ b/addons/interact_menu/functions/fnc_createVehiclesActions.sqf @@ -30,6 +30,6 @@ _vehicles apply { _name = format ["%1 (%2m)", _name, _distanceStr]; }; private _icon = [_x] call EFUNC(common,getVehicleIcon); - private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction); + private _action = [str _x, _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction); [_action, [], _target] } diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index e7bb42b4cf..3aa8a05ab3 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -95,7 +95,7 @@ if (_useListMenu) then { _scaleX = _textSize * 0.17 * 1.1; _scaleY = 0.17 * 0.30 * 4/3; } else { - private _textSize = if (GVAR(textSize) > 2) then {1.3} else {1}; + private _textSIze = [1, 1.3] select (GVAR(textSize) > 2); _scaleX = _textSize * 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5); _scaleY = _textSize * 0.17 * 4/3 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5); }; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 75e92c02c9..a5f7170588 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -136,7 +136,7 @@ GVAR(isOpeningDoor) = false; if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false}; //Tap whichever shoulder is closest - private _shoulderNum = [0, 1] select (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180); + private _shoulderNum = parseNumber (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180); // Statement [ACE_player, cursorTarget, _shoulderNum] call FUNC(tapShoulder); diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 40ba9672ef..50b0d98a21 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -43,7 +43,7 @@ private _icon = ""; _actions pushBack [ [ - format ["%1", _unit], + str _unit, [_unit, true] call EFUNC(common,getName), [_icon, "#FFFFFF"], { diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index a03ca26c04..540712ef41 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -71,7 +71,7 @@ GVAR(usedScrollWheel) = false; // didn't use incremental opening. Just do animation normally. if !(GVAR(usedScrollWheel)) then { - private _phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5); + private _phase = parseNumber (_house animationPhase (_animations select 0) < 0.5); {_house animate [_x, _phase]; false} count _animations; }; diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 2143904f80..59bb3056dd 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -93,7 +93,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 1: { // Direction if (!GVAR(MinAvgMax)) then { - _textCenterBig = format["%1", format["%1 %2", GVAR(Directions) select GVAR(Direction), round(_playerDir)]]; + _textCenterBig = format["%1 %2", GVAR(Directions) select GVAR(Direction), round(_playerDir)]; } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index 46e38acb90..2176793aed 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -22,7 +22,10 @@ TRACE_2("Fence cutting started",_unit,_fence); if (_unit != ACE_player) exitWith {}; // Get cut time based on if unit is a engineer -private _cutTime = if (_unit call EFUNC(common,isEngineer)) then {CUT_TIME_ENGINEER} else {CUT_TIME_DEFAULT}; +private _cutTime = [ + CUT_TIME_DEFAULT, + CUT_TIME_ENGINEER +] select (_unit call EFUNC(common,isEngineer)); if !(_unit call EFUNC(common,isSwimming)) then { [_unit, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation); diff --git a/addons/maptools/CfgEventHandlers.hpp b/addons/maptools/CfgEventHandlers.hpp index db25394390..bff1c64e94 100644 --- a/addons/maptools/CfgEventHandlers.hpp +++ b/addons/maptools/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); diff --git a/addons/maptools/CfgVehicles.hpp b/addons/maptools/CfgVehicles.hpp index 3f59f23c6f..0757aafc51 100644 --- a/addons/maptools/CfgVehicles.hpp +++ b/addons/maptools/CfgVehicles.hpp @@ -92,7 +92,7 @@ class CfgVehicles { }; class ACE_PlottingBoard { displayName = CSTRING(ShowPlottingBoard); - condition = QUOTE(GVAR(plottingBoard_Shown) < 1 && {call FUNC(canUsePlottingBoard)}); + condition = QUOTE(GVAR(plottingBoard_Shown) == 0 && {call FUNC(canUsePlottingBoard)}); statement = QUOTE(GVAR(plottingBoard_Shown) = 1); EXCEPTIONS; showDisabled = 0; @@ -127,7 +127,7 @@ class CfgVehicles { }; class ACE_PlottingBoardAlign { displayName = CSTRING(AlignTo); - condition = QUOTE(GVAR(plottingBoard_Shown) > 0); + condition = QUOTE(GVAR(plottingBoard_Shown) != 0); statement = ""; EXCEPTIONS; showDisabled = 0; @@ -141,7 +141,7 @@ class CfgVehicles { class ACE_PlottingBoardAlignBoardMaptool { displayName = CSTRING(ToMapToolLabel); - condition = QUOTE(GVAR(mapTool_Shown) > 0 && GVAR(plottingBoard_angle) != GVAR(mapTool_angle)); + condition = QUOTE(GVAR(mapTool_Shown) != 0 && GVAR(plottingBoard_angle) != GVAR(mapTool_angle)); statement = QUOTE(GVAR(plottingBoard_angle) = GVAR(mapTool_angle)); EXCEPTIONS; showDisabled = 0; @@ -163,7 +163,7 @@ class CfgVehicles { class ACE_PlottingBoardAlignAcrylicMaptool { displayName = CSTRING(ToMapToolLabel); - condition = QUOTE(GVAR(mapTool_Shown) > 0 && GVAR(plottingBoard_acrylicAngle) != GVAR(mapTool_angle)); + condition = QUOTE(GVAR(mapTool_Shown) != 0 && GVAR(plottingBoard_acrylicAngle) != GVAR(mapTool_angle)); statement = QUOTE(GVAR(plottingBoard_acrylicAngle) = GVAR(mapTool_angle)); EXCEPTIONS; showDisabled = 0; @@ -185,7 +185,7 @@ class CfgVehicles { class ACE_PlottingBoardAlignRulerMaptool { displayName = CSTRING(ToMapToolLabel); - condition = QUOTE(GVAR(mapTool_Shown) > 0 && GVAR(plottingBoard_rulerAngle) != GVAR(mapTool_angle)); + condition = QUOTE(GVAR(mapTool_Shown) != 0 && GVAR(plottingBoard_rulerAngle) != GVAR(mapTool_angle)); statement = QUOTE(GVAR(plottingBoard_rulerAngle) = GVAR(mapTool_angle)); EXCEPTIONS; showDisabled = 0; diff --git a/addons/maptools/XEH_postInitClient.sqf b/addons/maptools/XEH_postInitClient.sqf index a1b8afd08d..5ce1e68892 100644 --- a/addons/maptools/XEH_postInitClient.sqf +++ b/addons/maptools/XEH_postInitClient.sqf @@ -25,13 +25,16 @@ GVAR(plottingBoard_isRotating) = -1; GVAR(plottingBoard_moveToMouse) = true; // used to display it in center of screen when opened GVAR(plottingBoard_markers) = createHashMap; -//Install the event handers for the map tools on the main in-game map -[{!isNull findDisplay 12}, -{ - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {call FUNC(updateMapToolMarkers); call FUNC(openMapGpsUpdate);}]; +// Install the event handers for the map tools on the main in-game map +[{ + !isNull findDisplay 12 +}, { + private _map = (findDisplay 12) displayCtrl 51; + + _map ctrlAddEventHandler ["MouseMoving", LINKFUNC(handleMouseMove)]; + _map ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}]; + _map ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}]; + _map ctrlAddEventHandler ["Draw", {call FUNC(updateMapToolMarkers); call FUNC(openMapGpsUpdate);}]; }, []] call CBA_fnc_waitUntilAndExecute; ["visibleMap", { diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf index 667ee5ff5d..7c868d200a 100644 --- a/addons/maptools/functions/fnc_calculateMapScale.sqf +++ b/addons/maptools/functions/fnc_calculateMapScale.sqf @@ -1,21 +1,22 @@ #include "..\script_component.hpp" /* * Author: esteldunedain - * Returns the equivalent of 100m in screen coordinates + * Returns the equivalent of 100m in screen coordinates. * * Arguments: * None * * Return Value: - * None + * Map scale * * Example: - * call ACE_maptools_fnc_calculateMapScale + * call ace_maptools_fnc_calculateMapScale * * Public: No */ -private _pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; -private _screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)]; +private _mapCtrl = (findDisplay 12) displayCtrl 51; +private _pos = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5]; +private _screenOffset = _mapCtrl posWorldToScreen (_pos vectorAdd [100, 0]); (_screenOffset select 0) - 0.5 diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 1d28af74f6..317eee6c42 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -1,16 +1,16 @@ #include "..\script_component.hpp" /* * Author: esteldunedain - * canUseMapGPS + * Returns if the GPS on the map can be used. * * Arguments: * None * * Return Value: - * Boolean + * GPS can be used * * Example: - * call ACE_maptools_fnc_canUseMapGPS + * call ace_maptools_fnc_canUseMapGPS * * Public: No */ diff --git a/addons/maptools/functions/fnc_canUseMapTools.sqf b/addons/maptools/functions/fnc_canUseMapTools.sqf index ef45c9a527..8eb918dfdc 100644 --- a/addons/maptools/functions/fnc_canUseMapTools.sqf +++ b/addons/maptools/functions/fnc_canUseMapTools.sqf @@ -1,23 +1,23 @@ #include "..\script_component.hpp" /* * Author: esteldunedain - * canUseMapTools + * Returns if the map tools can be used. * * Arguments: * None * * Return Value: - * Boolean + * Map tools can be used * * Example: - * call ACE_maptools_fnc_canUseMapTools + * call ace_maptools_fnc_canUseMapTools * * Public: No */ visibleMap && {alive ACE_player} && -{"ACE_MapTools" in (ACE_player call EFUNC(common,uniqueItems))} && {!GVAR(mapTool_isDragging)} && {!GVAR(mapTool_isRotating)} && -{getUnitLoadout ACE_player param [9, []] param [0, ""] != ""} +{ACE_player getSlotItemName TYPE_MAP != ""} && +{[ACE_player, "ACE_MapTools"] call EFUNC(common,hasItem)} diff --git a/addons/maptools/functions/fnc_canUsePlottingBoard.sqf b/addons/maptools/functions/fnc_canUsePlottingBoard.sqf index d3394916f1..9dfd2bf6b5 100644 --- a/addons/maptools/functions/fnc_canUsePlottingBoard.sqf +++ b/addons/maptools/functions/fnc_canUsePlottingBoard.sqf @@ -17,6 +17,6 @@ visibleMap && {alive ACE_player} && -{[ACE_player, "ACE_PlottingBoard"] call EFUNC(common,hasItem)} && {!GVAR(plottingBoard_isDragging)} && -{GVAR(plottingBoard_isRotating) == -1} +{GVAR(plottingBoard_isRotating) == -1} && +{[ACE_player, "ACE_PlottingBoard"] call EFUNC(common,hasItem)} diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index 722f96468e..782d8762a0 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -4,63 +4,71 @@ * Prevents the cursor from entering the roamer when drawing lines and records the positions * * Arguments: - * 0: The Map + * 0: Map control * 1: Roamer Width * * Return Value: * None * * Example: - * [map, 300] call ace_maptools_fnc_drawLinesOnRoamer + * [CONTROL, 300] call ace_maptools_fnc_drawLinesOnRoamer * * Public: No */ if (!GVAR(drawStraightLines)) exitWith {}; -params ["_theMap", "_roamerWidth"]; +params ["_mapCtrl", "_roamerWidth"]; GVAR(mapTool_pos) params ["_roamerPosX", "_roamerPosY"]; private _posCenter = [_roamerPosX, _roamerPosY, 0]; private _posTopRight = [ -_roamerPosX + (cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (-sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -0]; + _roamerPosX + (cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, + _roamerPosY + (-sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, + 0 +]; private _posTopLeft = [ -_roamerPosX + (-cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, -0]; + _roamerPosX + (-cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, + _roamerPosY + (sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_TOP_TO_CENTER_PERC * _roamerWidth, + 0 +]; private _posBottomLeft = [ -_roamerPosX + (-cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -0]; + _roamerPosX + (-cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, + _roamerPosY + (sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, + 0 +]; private _posBottomRight = [ -_roamerPosX + (cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -_roamerPosY + (-sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, -0]; + _roamerPosX + (cos GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (sin GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, + _roamerPosY + (-sin GVAR(mapTool_angle)) * DIST_LEFT_TO_CENTER_PERC * _roamerWidth + (cos GVAR(mapTool_angle)) * DIST_BOTTOM_TO_CENTER_PERC * _roamerWidth, + 0 +]; -private _fnc_Distance = { // Get distance point _p is from a line made from _a to _b (uses 3d array commands, but z should be 0) +private _fnc_distance = { // Get distance point _p is from a line made from _a to _b (uses 3d array commands, but z should be 0) // Ref: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Vector_formulation params ["_a", "_b", "_p"]; + private _n = _b vectorDiff _a; private _pa = _a vectorDiff _p; private _c = _n vectorMultiply ((_pa vectorDotProduct _n) / (_n vectorDotProduct _n)); private _d = _pa vectorDiff _c; - sqrt (_d vectorDotProduct _d); + + sqrt (_d vectorDotProduct _d) }; -private _currentMousePos = _theMap ctrlMapScreenToWorld getMousePosition; +private _currentMousePos = _mapCtrl ctrlMapScreenToWorld getMousePosition; _currentMousePos set [2, 0]; // Break the roamer rectangle into 4 triangle, one for each side switch (true) do { case (_currentMousePos inPolygon [_posCenter, _posTopLeft, _posBottomLeft]): { // Left - private _distanceToRoamerLine = ([_posTopLeft, _posBottomLeft, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) - 90) ,0] call CBA_fnc_polar2vect); + private _distanceToRoamerLine = [_posTopLeft, _posBottomLeft, _currentMousePos] call _fnc_distance; + + _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, GVAR(mapTool_angle) - 90, 0] call CBA_fnc_polar2vect); + if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line GVAR(freeDrawingData) = ["left", _currentMousePos, _currentMousePos]; } else { @@ -68,17 +76,21 @@ switch (true) do { if ((_currentMousePos distance2d _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posTopLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; + if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomLeft)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; + + private _screenPosOfCorrectedPos = _mapCtrl ctrlMapWorldToScreen _currentMousePos; setMousePosition _screenPosOfCorrectedPos; }; case (_currentMousePos inPolygon [_posCenter, _posTopLeft, _posTopRight]): { // Top - private _distanceToRoamerLine = ([_posTopLeft, _posTopRight, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) + 0) ,0] call CBA_fnc_polar2vect); + private _distanceToRoamerLine = [_posTopLeft, _posTopRight, _currentMousePos] call _fnc_distance; + + _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, GVAR(mapTool_angle), 0] call CBA_fnc_polar2vect); + if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line GVAR(freeDrawingData) = ["top", _currentMousePos, _currentMousePos]; } else { @@ -86,17 +98,21 @@ switch (true) do { if ((_currentMousePos distance2d _posTopLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posTopLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; + if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 2) distance2d _posTopRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; + + private _screenPosOfCorrectedPos = _mapCtrl ctrlMapWorldToScreen _currentMousePos; setMousePosition _screenPosOfCorrectedPos; }; case (_currentMousePos inPolygon [_posCenter, _posTopRight, _posBottomRight]): { // Right - private _distanceToRoamerLine = ([_posTopRight, _posBottomRight, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) + 90) ,0] call CBA_fnc_polar2vect); + private _distanceToRoamerLine = [_posTopRight, _posBottomRight, _currentMousePos] call _fnc_distance; + + _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, GVAR(mapTool_angle) + 90, 0] call CBA_fnc_polar2vect); + if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line GVAR(freeDrawingData) = ["right", _currentMousePos, _currentMousePos]; } else { @@ -104,17 +120,21 @@ switch (true) do { if ((_currentMousePos distance2d _posTopRight) < ((GVAR(freeDrawingData) select 1) distance2d _posTopRight)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; + if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; + + private _screenPosOfCorrectedPos = _mapCtrl ctrlMapWorldToScreen _currentMousePos; setMousePosition _screenPosOfCorrectedPos; }; case (_currentMousePos inPolygon [_posCenter, _posBottomLeft, _posBottomRight]): { // Bottom - private _distanceToRoamerLine = ([_posBottomLeft, _posBottomRight, _currentMousePos] call _fnc_Distance); - _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, (GVAR(mapTool_angle) + 180) ,0] call CBA_fnc_polar2vect); + private _distanceToRoamerLine = [_posBottomLeft, _posBottomRight, _currentMousePos] call _fnc_distance; + + _currentMousePos = _currentMousePos vectorAdd ([_distanceToRoamerLine, GVAR(mapTool_angle) + 180, 0] call CBA_fnc_polar2vect); + if (GVAR(freeDrawingData) isEqualTo []) then { // We start drawing on the line GVAR(freeDrawingData) = ["bottom", _currentMousePos, _currentMousePos]; } else { @@ -122,23 +142,26 @@ switch (true) do { if ((_currentMousePos distance2d _posBottomLeft) < ((GVAR(freeDrawingData) select 1) distance2d _posBottomLeft)) then { GVAR(freeDrawingData) set [1, _currentMousePos]; }; + if ((_currentMousePos distance2d _posBottomRight) < ((GVAR(freeDrawingData) select 2) distance2d _posBottomRight)) then { GVAR(freeDrawingData) set [2, _currentMousePos]; }; }; }; - private _screenPosOfCorrectedPos = _theMap ctrlMapWorldToScreen _currentMousePos; + + private _screenPosOfCorrectedPos = _mapCtrl ctrlMapWorldToScreen _currentMousePos; setMousePosition _screenPosOfCorrectedPos; }; }; #ifdef DEBUG_MODE_FULL -_theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopRight,24,24,getDir player,'1,1',1,0.03,'TahomaB','right']; -_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']; +_mapCtrl drawIcon ['iconStaticMG',[1,0,0,1],_posTopRight,24,24,getDir player,'1,1',1,0.03,'TahomaB','right']; +_mapCtrl drawIcon ['iconStaticMG',[1,0,0,1],_posTopLeft,24,24,getDir player,'-1,1',1,0.03,'TahomaB','right']; +_mapCtrl drawIcon ['iconStaticMG',[1,0,0,1],_posBottomLeft,24,24,getDir player,'-1,-1',1,0.03,'TahomaB','right']; +_mapCtrl drawIcon ['iconStaticMG',[1,0,0,1],_posBottomRight,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; + 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']; + _mapCtrl drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 1,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; + _mapCtrl drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 2,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; }; #endif diff --git a/addons/maptools/functions/fnc_handleMouseButton.sqf b/addons/maptools/functions/fnc_handleMouseButton.sqf index 796a84744a..5c35c699d7 100644 --- a/addons/maptools/functions/fnc_handleMouseButton.sqf +++ b/addons/maptools/functions/fnc_handleMouseButton.sqf @@ -8,7 +8,7 @@ * 1: Parameters of the mouse button event * * Return Value: - * True if event was handled + * None * * Example: * [0, []] call ace_maptools_fnc_handleMouseButton @@ -80,13 +80,11 @@ if (_dir != 1) then { if (GVAR(mapTool_isDragging) || GVAR(mapTool_isRotating)) then { GVAR(mapTool_isDragging) = false; GVAR(mapTool_isRotating) = false; - _handled = true; }; if (GVAR(plottingBoard_isDragging) || GVAR(plottingBoard_isRotating) > -1) then { GVAR(plottingBoard_isDragging) = false; GVAR(plottingBoard_isRotating) = -1; - _handled = true; }; } else { // If clicking @@ -125,8 +123,6 @@ if (_dir != 1) then { // Start dragging GVAR(mapTool_isDragging) = true; }; - - _handled = true; }; }; }; @@ -170,11 +166,7 @@ if (_dir != 1) then { // Start dragging GVAR(plottingBoard_isDragging) = true; }; - - _handled = true; }; }; }; }; - -_handled diff --git a/addons/maptools/functions/fnc_handleMouseMove.sqf b/addons/maptools/functions/fnc_handleMouseMove.sqf index 37c6cf4d21..3092d2d532 100644 --- a/addons/maptools/functions/fnc_handleMouseMove.sqf +++ b/addons/maptools/functions/fnc_handleMouseMove.sqf @@ -5,10 +5,11 @@ * * Arguments: * 0: Map control - * 1: Mouse position on screen coordinates + * 1: Mouse x position + * 2: Mouse y position * * Return Value: - * If the event was handled + * None * * Example: * [CONTROL, [0, 5]] call ace_maptools_fnc_handleMouseMove @@ -24,9 +25,7 @@ if (isNull ACE_player || { private _uniqueItems = ACE_player call EFUNC(common,uniqueItems); !(("ACE_MapTools" in _uniqueItems) || {"ACE_PlottingBoard" in _uniqueItems}) -}) exitWith { - false -}; +}) exitWith {}; // If map tools not shown, then exit if (GVAR(mapTool_Shown) == 0 && {GVAR(plottingBoard_Shown) == 0}) exitWith {false}; @@ -36,8 +35,6 @@ private _mousePosition = _mapCtrl ctrlMapScreenToWorld [_mousePosX, _mousePosY]; // Map tools - translation if (GVAR(mapTool_isDragging)) exitWith { GVAR(mapTool_pos) = GVAR(mapTool_startPos) vectorAdd _mousePosition vectorDiff GVAR(mapTool_startDragPos); - - true }; // Map tools - rotation @@ -47,15 +44,11 @@ if (GVAR(mapTool_isRotating)) exitWith { private _angle = (_pos select 0) atan2 (_pos select 1); GVAR(mapTool_angle) = ((GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle)) % 360 + 360) % 360; - - true }; // Plotting board - translation if (GVAR(plottingBoard_isDragging)) exitWith { GVAR(plottingBoard_pos) = GVAR(plottingBoard_startPos) vectorAdd _mousePosition vectorDiff GVAR(plottingBoard_startDragPos); - - true }; // Plotting board - rotation @@ -70,8 +63,4 @@ if (GVAR(plottingBoard_isRotating) > -1) exitWith { case 1: {GVAR(plottingBoard_acrylicAngle) = _returnAngle}; case 2: {GVAR(plottingBoard_rulerAngle) = _returnAngle}; }; - - true }; - -false diff --git a/addons/maptools/functions/fnc_handlePlottingBoardMarkers.sqf b/addons/maptools/functions/fnc_handlePlottingBoardMarkers.sqf index b73bfb7dc4..b7a0c7657a 100644 --- a/addons/maptools/functions/fnc_handlePlottingBoardMarkers.sqf +++ b/addons/maptools/functions/fnc_handlePlottingBoardMarkers.sqf @@ -30,7 +30,7 @@ if (_deleted) exitWith { }; // Do not process non-local or already processed markers, don't check if the plotting board isn't shown -if (!_local || {GVAR(plottingBoard_Shown) < 1} || {QUOTE(ADDON) in _marker}) exitWith {}; +if (!_local || {GVAR(plottingBoard_Shown) == 0} || {QUOTE(ADDON) in _marker}) exitWith {}; // Check if the channel the marker was made in can be marked on the plotting board private _continue = true; diff --git a/addons/maptools/functions/fnc_isInsideMapTool.sqf b/addons/maptools/functions/fnc_isInsideMapTool.sqf index f6c633d885..ad80357411 100644 --- a/addons/maptools/functions/fnc_isInsideMapTool.sqf +++ b/addons/maptools/functions/fnc_isInsideMapTool.sqf @@ -4,32 +4,32 @@ * Return true if the position is inside the map marker (to allow dragging). * * Arguments: - * 0: x Position (in meters) - * 1: y Position (in meters) + * 0: x position (in meters) + * 1: y position (in meters) * * Return Value: - * Boolean + * Is inside map tool * * Example: - * [0, 5] call ACE_maptools_fnc_isInsideMapTool + * [0, 5] call ace_maptools_fnc_isInsideMapTool * * Public: No */ if (GVAR(mapTool_Shown) == 0) exitWith {false}; + private _textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1); -private _pos = [_this select 0, _this select 1, 0]; -private _relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0]; -private _dirVector = [sin(GVAR(mapTool_angle)), cos(GVAR(mapTool_angle)), 0]; +private _relPos = _this vectorDiff GVAR(mapTool_pos); +private _dirVector = [sin GVAR(mapTool_angle), cos GVAR(mapTool_angle)]; // Projection of the relative position over the longitudinal axis of the map tool private _lambdaLong = _dirVector vectorDotProduct _relPos; + if (_lambdaLong < DIST_BOTTOM_TO_CENTER_PERC * _textureWidth) exitWith {false}; - -// Projection of the relative position over the trasversal axis of the map tool -private _lambdaTrasAbs = vectorMagnitude (_relPos vectorDiff (_dirVector vectorMultiply _lambdaLong)); if (_lambdaLong > DIST_TOP_TO_CENTER_PERC * _textureWidth) exitWith {false}; -if (_lambdaTrasAbs > DIST_LEFT_TO_CENTER_PERC * _textureWidth) exitWith {false}; -true +// Projection of the relative position over the transversal axis of the map tool +private _lambdaTransAbs = vectorMagnitude (_relPos vectorDiff (_dirVector vectorMultiply _lambdaLong)); + +_lambdaTransAbs <= DIST_LEFT_TO_CENTER_PERC * _textureWidth diff --git a/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf b/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf index 081615d1b7..e3e6467508 100644 --- a/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf +++ b/addons/maptools/functions/fnc_isInsidePlottingBoard.sqf @@ -4,8 +4,8 @@ * Return if the position is inside the map marker (to allow dragging) or not. * * Arguments: - * 0: x Position (in meters) - * 1: y Position (in meters) + * 0: x position (in meters) + * 1: y position (in meters) * * Return Value: * Where in the plotting board it is @@ -30,9 +30,11 @@ private _isRuler = if (GVAR(plottingBoard_Shown) == 2) then { private _dirRightVector = [_dirVector select 1, -(_dirVector select 0)]; private _rulerAng = acos (_rulerVector vectorCos _relPos); - if (cos _rulerAng > 0 && {tan (_rulerAng) * _dist < PLOTTINGBOARD_RULERHALFWIDTH}) exitWith {true}; + if (cos _rulerAng > 0 && {(tan _rulerAng) * _dist < PLOTTINGBOARD_RULERHALFWIDTH}) exitWith {true}; _dist > PLOTTINGBOARD_RULERINNERCIRCLE && {_dist < PLOTTINGBOARD_RULEROUTERCIRCLE && {abs (_rulerAng * DEGTOMILS) < PLOTTINGBOAR_RULEROUTERHALFANGLE}} +} else { + false }; if (_isRuler) exitWith {2}; diff --git a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf index 4cfd9be238..6d18436625 100644 --- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf +++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf @@ -1,34 +1,39 @@ #include "..\script_component.hpp" /* * Author: esteldunedain, PabstMirror - * update gps display, called from main map's draw + * Update GPS display, called from main map's draw. * * Arguments: - * 0: Map ctrl + * 0: Map control * * Return Value: * None * * Example: - * [findDisplay 12 displayCtrl 51] call ACE_maptools_fnc_openMapGpsUpdate; + * [findDisplay 12 displayCtrl 51] call ace_maptools_fnc_openMapGpsUpdate; * * Public: No */ params ["_mapCtrl"]; + private _mapDisplay = ctrlParent _mapCtrl; -if ((!GVAR(mapGpsShow)) || {!(call FUNC(canUseMapGPS))}) exitWith { +if (!GVAR(mapGpsShow) || {!(call FUNC(canUseMapGPS))}) exitWith { (_mapDisplay displayCtrl 913589) ctrlShow false; }; + (_mapDisplay displayCtrl 913589) ctrlShow true; if (CBA_missionTime < GVAR(mapGpsNextUpdate)) exitWith {}; + GVAR(mapGpsNextUpdate) = CBA_missionTime + 0.5; private _ctrl = _mapDisplay displayCtrl 913590; _ctrl ctrlSetText str (round (getDir ACE_player)); // Set Heading + _ctrl = _mapDisplay displayCtrl 913591; _ctrl ctrlSetText str (round ((getPosASL ACE_player) select 2) + EGVAR(common,mapAltitude)); // Set Altitude + _ctrl = _mapDisplay displayCtrl 913592; _ctrl ctrlSetText mapGridPosition ACE_player; // Set grid cords diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index 92bb481326..1a6d83b698 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -27,6 +27,7 @@ if (GVAR(plottingBoard_Shown) == 0) then { } forEach GVAR(plottingBoard_markers); } else { if !([ACE_player, "ACE_PlottingBoard"] call EFUNC(common,hasItem)) exitWith {}; + if (GVAR(plottingBoard_moveToMouse)) then { GVAR(plottingBoard_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition; GVAR(plottingBoard_moveToMouse) = false; // we only need to do this once after opening the map tool @@ -90,7 +91,7 @@ if (GVAR(plottingBoard_Shown) == 0) then { } forEach GVAR(plottingBoard_markers); }; -if ((GVAR(mapTool_Shown) > 0) && {[ACE_player, "ACE_MapTools"] call EFUNC(common,hasItem)}) then { +if ((GVAR(mapTool_Shown) != 0) && {[ACE_player, "ACE_MapTools"] call EFUNC(common,hasItem)}) then { // Open map tools in center of screen when toggled to be shown if (GVAR(mapTool_moveToMouse)) then { GVAR(mapTool_pos) = _mapCtrl ctrlMapScreenToWorld getMousePosition; diff --git a/addons/maptools/initSettings.inc.sqf b/addons/maptools/initSettings.inc.sqf index 5eaa778e32..172054ff77 100644 --- a/addons/maptools/initSettings.inc.sqf +++ b/addons/maptools/initSettings.inc.sqf @@ -1,4 +1,4 @@ -private _category = format ["ACE %1", localize LSTRING(Name)]; +private _category = format ["ACE %1", LLSTRING(Name)]; [ QGVAR(rotateModifierKey), "LIST", diff --git a/addons/maptools/script_component.hpp b/addons/maptools/script_component.hpp index 7c1c4757d2..adbc1fb3f6 100644 --- a/addons/maptools/script_component.hpp +++ b/addons/maptools/script_component.hpp @@ -18,17 +18,17 @@ #define DEGTOMILS 17.7777778 -#define TEXTURE_WIDTH_IN_M 6205 -#define CENTER_OFFSET_Y_PERC 0.1606 -#define CONSTANT_SCALE 0.2 +#define TEXTURE_WIDTH_IN_M 6205 +#define CENTER_OFFSET_Y_PERC 0.1606 +#define CONSTANT_SCALE 0.2 #define DIST_BOTTOM_TO_CENTER_PERC -0.33 -#define DIST_TOP_TO_CENTER_PERC 0.65 -#define DIST_LEFT_TO_CENTER_PERC 0.30 +#define DIST_TOP_TO_CENTER_PERC 0.65 +#define DIST_LEFT_TO_CENTER_PERC 0.30 -#define PLOTTINGBOARD_DRAWRANGE 3000 -#define PLOTTINGBOARD_TEXTUREWIDTH 6000 -#define PLOTTINGBOARD_RULERCENTER 450 -#define PLOTTINGBOARD_RULERHALFWIDTH 100 +#define PLOTTINGBOARD_DRAWRANGE 3000 +#define PLOTTINGBOARD_TEXTUREWIDTH 6000 +#define PLOTTINGBOARD_RULERCENTER 450 +#define PLOTTINGBOARD_RULERHALFWIDTH 100 #define PLOTTINGBOARD_RULERINNERCIRCLE 2900 #define PLOTTINGBOARD_RULEROUTERCIRCLE 3000 #define PLOTTINGBOARD_RULEROUTERHALFANGLE 100 diff --git a/addons/medical/dev/watchVariable.sqf b/addons/medical/dev/watchVariable.sqf index 0eb191e8dd..05cb094ba8 100644 --- a/addons/medical/dev/watchVariable.sqf +++ b/addons/medical/dev/watchVariable.sqf @@ -28,7 +28,7 @@ GVAR(dev_watchVariableRunning) = true; _return pushBack format ["State: %2", _color, _targetState]; private _hasStableVitals = ["N", "Y"] select ([_unit] call EFUNC(medical_status,hasStableVitals)); private _hasStableCondition = ["N", "Y"] select ([_unit] call EFUNC(medical_status,isInStableCondition)); - private _unconcFlag = if IS_UNCONSCIOUS(_unit) then {"[U]"} else {""}; + private _unconcFlag = ["", "[U]"] select IS_UNCONSCIOUS(_unit); private _timeLeft = _unit getVariable [QEGVAR(medical_statemachine,cardiacArrestTimeLeft), -1]; private _cardiactArrestFlag = if IN_CRDC_ARRST(_unit) then {format ["[CA %1]", _timeLeft toFixed 1]} else {""}; _return pushBack format ["[StableVitals: %1] [StableCon: %2] %3 %4", _hasStableVitals, _hasStableCondition, _unconcFlag, _cardiactArrestFlag]; @@ -38,7 +38,7 @@ GVAR(dev_watchVariableRunning) = true; private _woundBleeding = GET_WOUND_BLEEDING(_unit); private _bloodLoss = GET_BLOOD_LOSS(_unit); private _hemorrhage = GET_HEMORRHAGE(_unit); - private _isBleeding = if (IS_BLEEDING(_unit)) then {"Bleeding"} else {""}; + private _isBleeding = ["", "[Bleeding]"] select IS_BLEEDING(_unit); private _secondsToHeartstop = if (_bloodLoss != 0) then {format ["[Time Left: %1 sec]", (((_bloodVolume - BLOOD_VOLUME_CLASS_4_HEMORRHAGE) max 0) / _bloodLoss) toFixed 0]} else {""}; _return pushBack format ["Blood: %1 [Hemorrhage: %2] %3", _bloodVolume toFixed 3, _hemorrhage, _isBleeding]; _return pushBack format [" - [W: %1 T: %2] %3", _woundBleeding toFixed 4, _bloodLoss toFixed 4, _secondsToHeartstop]; @@ -60,7 +60,7 @@ GVAR(dev_watchVariableRunning) = true; // Damage: private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; - private _limping = if (_unit getVariable [QEGVAR(medical,isLimping), false]) then {"[ Limping ]"} else {""}; + private _limping = ["", "[ Limping ]"] select (_unit getVariable [QEGVAR(medical,isLimping), false]); _return pushBack format ["BodyPartDamage: [H: %1] [B: %2]", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2]; _return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2]; @@ -68,8 +68,8 @@ GVAR(dev_watchVariableRunning) = true; _return pushBack format ["[HHnd:%1] [HLeg: %2] %3", (_unit getHitPointDamage "HitHands") toFixed 2, (_unit getHitPointDamage "HitLegs") toFixed 2, _limping]; private _fractures = GET_FRACTURES(_unit); - private _canSprint = if (isSprintAllowed _unit) then {""} else {"[Sprint Blocked]"}; - private _forceWalk = if (isForcedWalk _unit) then {"[Forced Walking]"} else {""}; + private _canSprint = ["[Sprint Blocked]", ""] select (isSprintAllowed _unit); + private _forceWalk = ["", "[Forced Walking]"] select (isForcedWalk _unit); _return pushBack format ["Fractures: %1 %2%3", _fractures, _canSprint, _forceWalk]; diff --git a/addons/medical_ai/XEH_preStart.sqf b/addons/medical_ai/XEH_preStart.sqf index 52e3374924..b4d795cbbf 100644 --- a/addons/medical_ai/XEH_preStart.sqf +++ b/addons/medical_ai/XEH_preStart.sqf @@ -13,7 +13,7 @@ private _itemHash = createHashMap; private _items = getArray (configFile >> "ace_medical_treatment_actions" >> _x >> "items"); if (_items isEqualTo []) then { ERROR_1("bad action %1",_x); }; private _itemClassname = configName (configFile >> "CfgWeapons" >> _items # 0); - private _treatment = if ((count _treatments) > 1) then { _x } else { "" }; + private _treatment = ["", _x] select ((count _treatments) > 1); _typeHash set [_itemClassname, _treatment]; } forEach _treatments; _itemHash set [_itemType, _typeHash]; diff --git a/addons/medical_gui/functions/fnc_countTreatmentItems.sqf b/addons/medical_gui/functions/fnc_countTreatmentItems.sqf index 102d996bb3..6e8394c82f 100644 --- a/addons/medical_gui/functions/fnc_countTreatmentItems.sqf +++ b/addons/medical_gui/functions/fnc_countTreatmentItems.sqf @@ -38,7 +38,7 @@ if (ACE_player != GVAR(target)) then { // Vehicle private _medicVehicle = objectParent ACE_player; private _patientVehicle = objectParent GVAR(target); -private _vehicle = if (!isNull _medicVehicle) then {_medicVehicle} else {_patientVehicle}; +private _vehicle = [_patientVehicle, _medicVehicle] select (!isNull _medicVehicle); if (!isNull _vehicle) then { _vehicleCount = 0; diff --git a/addons/medical_gui/functions/fnc_handleToggle.sqf b/addons/medical_gui/functions/fnc_handleToggle.sqf index f0448fc3a3..48232790c1 100644 --- a/addons/medical_gui/functions/fnc_handleToggle.sqf +++ b/addons/medical_gui/functions/fnc_handleToggle.sqf @@ -19,15 +19,14 @@ if (!isNull findDisplay 312) exitWith {}; // Find new target to switch to -private _target = if ( +private _target = [ + ACE_player, + GVAR(previousTarget) +] select ( GVAR(target) == ACE_player && {[ACE_player, GVAR(previousTarget)] call EFUNC(common,canInteractWith)} && {[ACE_player, GVAR(previousTarget)] call FUNC(canOpenMenu)} -) then { - GVAR(previousTarget); -} else { - ACE_player; -}; +); // Exit if new target is same as old if (GVAR(target) == _target) exitWith {}; diff --git a/addons/medical_treatment/functions/fnc_checkPulseLocal.sqf b/addons/medical_treatment/functions/fnc_checkPulseLocal.sqf index 91c6bf038c..3798e64eb4 100644 --- a/addons/medical_treatment/functions/fnc_checkPulseLocal.sqf +++ b/addons/medical_treatment/functions/fnc_checkPulseLocal.sqf @@ -39,7 +39,7 @@ private _logOutput = LSTRING(Check_Pulse_None); if (_heartRate > 1) then { if (_medic call FUNC(isMedic)) then { _heartRateOutput = LSTRING(Check_Pulse_Output_1); - _logOutput = format ["%1", round _heartRate]; + _logOutput = str round _heartRate; } else { _heartRateOutput = LSTRING(Check_Pulse_Output_2); _logOutput = LSTRING(Check_Pulse_Weak); diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index da7374984d..bd6be9e1da 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -1390,7 +1390,7 @@ Définit s'il s'agit d'un véhicule sanitaire. Se o objeto será ou não um veículo médico Будет ли объект считаться медицинским транспортом. - 対象が医療車両であるかどうか。 + 車両をを医療車両として割り当てます 이 물체는 의료 차량이 됩니다. 是否使该载具为医疗载具? 是否使該載具為醫療載具? @@ -1491,7 +1491,7 @@ Est un véhicule sanitaire Orvosi jármű-e È Veicolo Medico - 医療車両に + 医療車両とする 의료 차량 是医疗载具 是醫療載具 @@ -1508,7 +1508,7 @@ Est une installation sanitaire Orvosi létesítmény-e È Struttura Medica - 医療施設に + 医療施設とする 의료시설 是医疗设施 是醫療設施 @@ -1525,7 +1525,7 @@ Définit l'objet comme étant une installation sanitaire. Egy objektum orvosi létesítményként való regisztrálása Registra un oggetto come struttura medica - オブジェクトを医療施設として割り当てる + オブジェクトを医療施設として割り当てます 물체를 의료시설로 등록합니다 指定一个物体作为医疗设施 指定一個物件作為醫療設施 diff --git a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf index 30a0c6ad6e..86415a1914 100644 --- a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf +++ b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf @@ -60,7 +60,7 @@ if (GVAR(currentApplicationPage) == 1) then { _size = 32 * _mapSize; { _x params ["_wpName", "_wpPos"]; - private _alpha = if (_forEachIndex == GVAR(currentWaypoint)) then {1} else {0.5}; + private _alpha = [0.5, 1] select (_forEachIndex == GVAR(currentWaypoint)); _theMap drawIcon [QUOTE(PATHTO_R(images\icon_mapWaypoints.paa)), [1,1,1,_alpha], _wpPos, _size, _size, 0, '', 0 ]; } forEach _waypoints; }; diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf index df431407da..c7fb19c9c1 100644 --- a/addons/optics/functions/fnc_onDrawScope2D.sqf +++ b/addons/optics/functions/fnc_onDrawScope2D.sqf @@ -80,11 +80,11 @@ if (_isPIP) then { // Calculate lighting private _dayOpacity = call EFUNC(common,ambientBrightness); -private _nightOpacity = [1, 0] select (_dayOpacity == 1); +private _nightOpacity = parseNumber (_dayOpacity == 1); // Apply lighting and make layers visible (_display displayCtrl 1713001) ctrlSetTextColor [1, 1, 1, 1]; -(_display displayCtrl 1713002) ctrlSetTextColor [1, 1, 1, [0, 1] select (_dayOpacity < 0.5)]; +(_display displayCtrl 1713002) ctrlSetTextColor [1, 1, 1, parseNumber (_dayOpacity < 0.5)]; (_display displayCtrl 1713005) ctrlSetTextColor [1, 1, 1, _dayOpacity]; (_display displayCtrl 1713006) ctrlSetTextColor [1, 1, 1, _nightOpacity]; diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index 47b014f4ab..d4533a7a6b 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -53,8 +53,8 @@ private _TimeText = _display displayCtrl 1001; }; _TimeText ctrlSetText (format ["%1:%2", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber]); - _HeightText ctrlSetText (format ["%1", floor _height]); - _DecendRate ctrlSetText (format ["%1", _descentRate max 0]); + _HeightText ctrlSetText str floor _height; + _DecendRate ctrlSetText str (_descentRate max 0); (_this select 0) set [1, _height]; (_this select 0) set [2, _curTime]; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index e8fb0f9c6c..999dfc5a2e 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -33,7 +33,7 @@ if (_ammoClass == "" || _magazineClass == "" || _weaponClass == "") exitWith {}; GVAR(controls) = []; for "_row" from 0 to 49 do { - private _offset = if (_row < 5) then {0} else {0.003}; + private _offset = [0.003, 0] select (_row < 5); private _control = (__dsp ctrlCreate ["RangeCard_RscText", 790000 + _row]); _control ctrlSetPosition [safeZoneX + 0.183, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.062, 0.025]; if (_row in [0, 8, 18, 28, 38, 48]) then { @@ -47,7 +47,7 @@ for "_row" from 0 to 49 do { }; for "_column" from 0 to 8 do { for "_row" from 0 to 49 do { - private _offset = if (_row < 5) then {0} else {0.003}; + private _offset = [0.003, 0] select (_row < 5); private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + _column * 100 + _row]); _control ctrlSetPosition [safeZoneX + 0.249 + _column * 0.055, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.052, 0.025]; _control ctrlCommit 0; @@ -57,7 +57,7 @@ for "_column" from 0 to 8 do { }; for "_column" from 0 to 2 do { for "_row" from 0 to 49 do { - private _offset = if (_row < 5) then {0} else {0.003}; + private _offset = [0.003, 0] select (_row < 5); private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + (9 +_column) * 100 + _row]); _control ctrlSetPosition [safeZoneX + 0.743 + _column * 0.049, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.047, 0.025]; _control ctrlCommit 0; @@ -67,7 +67,7 @@ for "_column" from 0 to 2 do { }; for "_column" from 0 to 2 do { for "_row" from 0 to 49 do { - private _offset = if (_row < 5) then {0} else {0.003}; + private _offset = [0.003, 0] select (_row < 5); private _control = (__dsp ctrlCreate ["RangeCard_RscText", 90000 + (12 +_column) * 100 + _row]); _control ctrlSetPosition [safeZoneX + 0.892 + _column * 0.049, safeZoneY + 0.374 + 0.027 * _row + _offset, 0.047, 0.025]; _control ctrlCommit 0; diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index 71802451b7..f41dff6ea9 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -54,7 +54,7 @@ private _maxMagazines = [_vehicle, _turretPath, _magazineClass] call FUNC(getMax private _ammoCounts = [_vehicle, _turretPath, _magazineClass] call FUNC(getTurretMagazineAmmo); TRACE_3("start",_magazineClass,_maxMagazines,_ammoCounts); -private _ammoToAdd = if (GVAR(level) == 2) then {_numRounds} else {_rounds}; +private _ammoToAdd = [_rounds, _numRounds] select (GVAR(level) == 2); private _ammoAdded = 0; private _arrayModified = false; // skip needing to remove and re-add mags, if we are only adding new ones diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index 7ddee1dc83..157be6eec2 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -651,7 +651,7 @@ Rearm Cargo Munitionsvorrat - 再武装用カーゴ + 再武装用資源積載量 Ładunek Dozbrajający Munizioni Caricate Боеприпасы для перевооружения @@ -666,7 +666,7 @@ The cargo for rearming (-1 disable) Der Munitionsvorrat, zum Aufmunitionieren von Fahrzeugen (-1 deaktiviert) - カーゴからの再武装 (-1 で無効化) + 再武装に使用する資源の積載量 (-1 で補給無効) Ładunek do dozbrajania (-1 wyłączy) Il carico di munizioni per poter riarmare (-1 per disabilitarlo) Объем боеприпасов для перевооружения (-1 для отмены) diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index ed9b139593..4752f83caf 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -553,7 +553,7 @@ Время взаимодействия со шлангом Tiempo de interacción con la Bomba/Manguera Tempo di interazione Pompa/Pistola - ポンプとホースのインタラクション所要時間 + ポンプ/ホースのインタラクション所要時間 Czas Interakcji z Pompą/Wężem Interaktionszeit zwischen Pumpe und Schlauch Temps d'interaction pompe/tuyau @@ -574,7 +574,7 @@ Fuel Cargo Volume Tankvolumen Объем топлива для заправки - 貯油量 + 給油用燃料積載量 Capacità di Carico Carburante 儲油量 储油量 @@ -591,7 +591,7 @@ The fuel volume available for refueling (-1 disable, -10 if infinite) Das Tankvolumen, welches zum Nachtanken verfügbar ist (-1 deaktiviert, -10 unendlich) Объем топлива, доступный для заправки других машин (-1 отключить, -10 если неограничен) - 給油用の貯油量を設定できます (-1で無効、-10で無限) + 給油に使用する燃料の積載量 (-1で補給無効、-10で無限補給) La capacità di carburante disponibile al rifornimento altrui (-1 disabilita, -10 se infinito) 設定有多少油料可供載具進行加油(-1時關閉,-10為無限油量) 设定有多少油料可供载具进行加油(-1时关闭,-10为无限油量) diff --git a/addons/repair/functions/fnc_isEngineer.sqf b/addons/repair/functions/fnc_isEngineer.sqf index 2a013bccda..2962e4f8ad 100644 --- a/addons/repair/functions/fnc_isEngineer.sqf +++ b/addons/repair/functions/fnc_isEngineer.sqf @@ -22,7 +22,7 @@ private _class = _unit getVariable ["ACE_IsEngineer", _unit getUnitTrait "engine // This if statement is here for copmatability with the common variant of isEngineer, which requires a bool. // We cannot move this function to common because we require the GVAR(engineerSetting_Repair), which only makes sense to include in the repair module. -if (_class isEqualType false) then {_class = [0, 1] select _class}; +if (_class isEqualType false) then {_class = parseNumber _class}; TRACE_3("isEngineer",_unit,_engineerN,_class); if (_class >= _engineerN) exitWith {true}; diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 48f2ca8a90..10a5fa3a0b 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -390,7 +390,7 @@ Přidat náhradní díly do vozidla (vyžaduje úložný prostor)? Aggiungi parti di ricambio ai veicoli (richiede spazio nel carico)? Ajoute des pièces de rechange aux véhicules (nécessite le système de cargaison). - 車両へ予備部品を追加しますか? (カーゴ コンポーネントが必要) + 車両へ予備部品を追加しますか? (貨物室が必要) 차량에 예비 부품을 더합니까?(짐칸 요소 필요) 添加载具备件(需相关货物组件)? 添加載具備件 (需相關貨物組件)? @@ -1622,7 +1622,7 @@ Přiřaďte opraváresnké vozidlo Assegna Veicolo Riparazioni Affecter véhicule(s) de réparation - 修理車両として指定 + 修理車両に割り当て 정비 차량 등록 指定维修载具 指定維修載具 @@ -1652,7 +1652,7 @@ Seznam vozidel, která budou klasifikována jako opravárenská, oddělit čárkami. Lista di Veicoli che verranno considerati veicoli riparazioni, separati da virgole. Liste de véhicules qui seront classés comme véhicules de réparation, séparés par des virgules. - 修理車両に指定される車両のリスト。カンマで区切ります。 + 修理車両に割り当てる車両のリスト。カンマで区切ります。 목록내 차량은 정비 차량으로 분류됩니다. 쉼표로 구분합니다. 载具名单,把载具名称输入在这边即可定义其为维修载具。每个载具使用逗号以做区隔。 載具名單,把載具名稱輸入在這邊即可定義其為維修載具。每個載具使用逗號以做區隔。 @@ -1667,7 +1667,7 @@ Opravárenské vozidlo È Veicolo Riparazioni Est un véhicule de réparation - 修理車両にする + 修理車両とする 은 정비 차량이다 是维修载具 是維修載具 @@ -1682,7 +1682,7 @@ Je vozidlo klasifikováno jako opravárenské? Il veicolo è classificato dome veicolo riparazioni? Définit s'il s'agit d'un véhicule de réparation. - 車両を修理車両に指定しますか? + 車両を修理車両として割り当てます 이 차량을 정비 차량으로 분류합니까? 此载具是维修载具吗? 此載具是維修載具嗎? @@ -1712,7 +1712,7 @@ Přiřaďte opravárenské zařízení Assegna Struttura Riparazioni Affecter atelier(s) de réparation - 修理施設とする + 修理施設に割り当て 정비 시설 등록 指定维修设施 指定維修設施 @@ -1742,7 +1742,7 @@ Seznam objektů, které budou klasifikovány jako opravárenské zařízení, oddělit čárkami. Lista di oggetti che verranno classificati come strutture riparazioni, separati da virgole. Liste d'objets qui seront classés comme ateliers de réparation, séparés par des virgules. - 修理施設に指定されるオブジェクトのリスト。カンマで区切ります。 + 修理施設に割り当てるオブジェクトのリスト。カンマで区切ります。 목록내 시설은 정비 시설으로 분류됩니다. 쉼표로 구분합니다. 设施名单,把设施名称输入在这边即可定义其为维修设施。每个设施使用逗号以做区隔。 設施名單,把設施名稱輸入在這邊即可定義其為維修設施。每個設施使用逗號以做區隔。 @@ -1772,7 +1772,7 @@ Je objekt klasifikován jako opravárenské zařízení? L'oggetto è classificato come struttura riparazioni? Définit l'objet comme étant un atelier de réparation. - オブジェクトを修理施設として指定しますか? + オブジェクトを修理施設として割り当てます 이 시설을 정비 시설로 분류합니까? 此设施是维修设施吗? 此設施是維修設施嗎? @@ -2054,7 +2054,7 @@ Number of spare tracks in cargo. Anzahl der Ersatzketten im Laderaum. - カーゴ内の予備履帯の数を指定 + 貨物室内の予備履帯の数を指定 Numero dei cingoli di scorta nel carico. 設定載具在貨艙內攜帶的備用履帶數量 设定载具在货舱内携带的备用履带数量。 @@ -2084,7 +2084,7 @@ Number of spare wheels in cargo. Anzahl der Ersatzreifen im Laderaum. - カーゴ内の予備タイヤの数を指定 + 貨物室内の予備タイヤの数を指定 Numero delle ruote di scorta nel cargo. 設定載具在貨艙內攜帶的備用輪胎數量 设定载具在货舱内携带的备用轮胎数量。 diff --git a/addons/respawn/functions/fnc_handlePlayerChanged.sqf b/addons/respawn/functions/fnc_handlePlayerChanged.sqf index f94e14d644..81dd5eb9a9 100644 --- a/addons/respawn/functions/fnc_handlePlayerChanged.sqf +++ b/addons/respawn/functions/fnc_handlePlayerChanged.sqf @@ -19,9 +19,9 @@ params ["_newUnit"]; private _side = side group _newUnit; -((GETMVAR(ACE_Rallypoint_West, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == west)); -((GETMVAR(ACE_Rallypoint_West_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == west)); -((GETMVAR(ACE_Rallypoint_East, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == east)); -((GETMVAR(ACE_Rallypoint_East_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == east)); -((GETMVAR(ACE_Rallypoint_Independent, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == independent)); -((GETMVAR(ACE_Rallypoint_Independent_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal ([0, 1] select (_side == independent)); +((GETMVAR(ACE_Rallypoint_West, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == west)); +((GETMVAR(ACE_Rallypoint_West_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == west)); +((GETMVAR(ACE_Rallypoint_East, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == east)); +((GETMVAR(ACE_Rallypoint_East_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == east)); +((GETMVAR(ACE_Rallypoint_Independent, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == independent)); +((GETMVAR(ACE_Rallypoint_Independent_Base, objNull)) getVariable [QGVAR(marker), ""]) setMarkerAlphaLocal (parseNumber (_side == independent)); diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index 50931a87f4..7e4651e1e9 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -53,7 +53,7 @@ if (hasInterface) then { private _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == ""); _marker setMarkerTypeLocal _type; - _marker setMarkerAlphaLocal ([0,1] select (_side == playerSide)); // playerSide to guarantee init + _marker setMarkerAlphaLocal (parseNumber (_side == playerSide)); // playerSide to guarantee init private _date = _rallypoint getVariable [QGVAR(markerDate), ""]; diff --git a/addons/tacticalladder/functions/fnc_deployTL.sqf b/addons/tacticalladder/functions/fnc_deployTL.sqf index 85804e091f..0f399536f4 100644 --- a/addons/tacticalladder/functions/fnc_deployTL.sqf +++ b/addons/tacticalladder/functions/fnc_deployTL.sqf @@ -23,7 +23,7 @@ removeBackpack _unit; private _pos = _unit modelToWorld [0,0,0]; -private _offset = if ((_unit call CBA_fnc_getUnitAnim select 0) == "prone") then { 1 } else {0.8}; +private _offset = [0.8, 1] select (_unit call CBA_fnc_getUnitAnim select 0 == "prone"); _pos set [0, (_pos select 0) + (sin getDir _unit) * _offset]; _pos set [1, (_pos select 1) + (cos getDir _unit) * _offset]; diff --git a/addons/towing/functions/fnc_addRopeToVehicle.sqf b/addons/towing/functions/fnc_addRopeToVehicle.sqf index 4ff0fce62d..9dec1257d0 100644 --- a/addons/towing/functions/fnc_addRopeToVehicle.sqf +++ b/addons/towing/functions/fnc_addRopeToVehicle.sqf @@ -20,8 +20,8 @@ params ["_vehicle"]; if (0 == getNumber (configOf _vehicle >> QEGVAR(cargo,hasCargo))) exitWith {}; -private _ropeType = if ( +private _ropeType = ["ACE_rope6", "ACE_rope12"] select ( -1 < ["Tank", "Wheeled_APC_F", "Truck_F"] findIf {_vehicle isKindOf _x} -) then {"ACE_rope12"} else {"ACE_rope6"}; +); _vehicle addItemCargoGlobal [_ropeType, 1]; diff --git a/addons/trenches/functions/fnc_blockTrench_place.sqf b/addons/trenches/functions/fnc_blockTrench_place.sqf index f602a871e0..4c0a218307 100644 --- a/addons/trenches/functions/fnc_blockTrench_place.sqf +++ b/addons/trenches/functions/fnc_blockTrench_place.sqf @@ -63,10 +63,10 @@ private _east = (abs (_ax - _bx)) >= (abs (_ay - _by)); private _origin2D = []; private _length = 0; if (_east) then { - _origin2D = if (_ax < _bx) then { _start2d } else { _end2d }; + _origin2D = [_end2d, _start2d] select (_ax < _bx); _length = (abs (_ax - _bx)) / _cellsize; } else { - _origin2D = if (_ay < _by) then { _start2d } else { _end2d }; + _origin2D = [_end2d, _start2d] select (_ay < _by); _length = (abs (_ay - _by)) / _cellsize; }; TRACE_3("",_east,_origin2D,_length); diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf index 3771bf840b..6751d9700c 100644 --- a/addons/ui/functions/fnc_setAdvancedElement.sqf +++ b/addons/ui/functions/fnc_setAdvancedElement.sqf @@ -68,7 +68,7 @@ if (!_force) then { }; private _displays = ((uiNamespace getVariable "IGUI_displays") + [findDisplay IDD_MISSION]) select {_idd == ctrlIDD _x}; -private _fade = [1, 0] select _show; +private _fade = parseNumber !_show; // Disable/Enable elements private _success = false; diff --git a/addons/weather/functions/fnc_getApproximateAirTemp.sqf b/addons/weather/functions/fnc_getApproximateAirTemp.sqf index 33227907a3..91b8af3fcc 100644 --- a/addons/weather/functions/fnc_getApproximateAirTemp.sqf +++ b/addons/weather/functions/fnc_getApproximateAirTemp.sqf @@ -18,7 +18,7 @@ params ["_unit"]; TRACE_1("params",_unit); -if (isNil (format ["%1", _unit getVariable "ACE_airTemperatureBias"])) then { +if (isNil {_unit getVariable "ACE_airTemperatureBias"}) then { _unit setVariable ["ACE_airTemperatureBias", [-(random(3) + 1), random(3) + 1]]; }; diff --git a/addons/xm157/functions/fnc_weaponInfo_draw.sqf b/addons/xm157/functions/fnc_weaponInfo_draw.sqf index ef9fd1d528..c03b575f4e 100644 --- a/addons/xm157/functions/fnc_weaponInfo_draw.sqf +++ b/addons/xm157/functions/fnc_weaponInfo_draw.sqf @@ -86,7 +86,7 @@ if (_retTex != ctrlText _ctrlScopeReticle) then { _ctrlScopeReticle ctrlSetText private _rangeInfo = _range call { if (_range == 0) exitWith { "" }; if (_range < 0) exitWith { // range error - blink if recent - if ((_timeSinceLastInput < 3) && {(floor (4*_timeSinceLastInput)) % 2 == 1}) then { "----" } else { "" }; + ["", "----"] select ((_timeSinceLastInput < 3) && {(floor (4*_timeSinceLastInput)) % 2 == 1}); }; format ["%1 m", _range toFixed 0] }; @@ -98,7 +98,7 @@ _ctrl ctrlSetText _rangeInfo; private _bearingInfo = call { private _bearingSetting = GVAR(data) getOrDefault ["bearing_show", 0]; if ((_bearingSetting == 2) && {_timeSinceLastInput > 2}) exitWith { "" }; - if ((_bearingSetting == 1)) exitWith { format ["%1", floor (17.777777 * _weaponDir)]; }; // (6400 Mils, not MRAD) + if ((_bearingSetting == 1)) exitWith { str floor (17.777777 * _weaponDir); }; // (6400 Mils, not MRAD) format ["%1°", floor _weaponDir]; }; private _ctrl = _display displayCtrl IDC_SCREEN_TEXT_UPPER_LEFT; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index c597955a23..ec04a12d24 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -257,7 +257,7 @@ if (_activated) then { //--- Player if (hasinterface) then { waituntil {local player}; - _serverCommand = if (_ownerVar == "#adminLogged") then {"#shutdown"} else {"#kick"}; + _serverCommand = ["#kick", "#shutdown"] select (_ownerVar == "#adminLogged"); //--- Black effect until the interface is open _forced = _logic getvariable ["forced",0] > 0; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index b2288be91c..2aa438be53 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -30,7 +30,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { //--- Get unit under cursor _unit = objnull; _mouseOver = missionnamespace getvariable ["bis_fnc_curatorObjectPlaced_mouseOver",[""]]; - if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;}; + if ((_mouseOver select 0) == "OBJECT") then {_unit = _mouseOver select 1;}; _unit = effectivecommander _unit; //--- Temp owner diff --git a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf index 9c34bc8f65..5c9a220615 100644 --- a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf @@ -53,7 +53,7 @@ if !(isNull _unit) then { if (isNull _unit) then { (_display displayCtrl 56220) lbDelete 0; } else { - (_display displayCtrl 56218) lbSetCurSel ([0, 1] select (_unit isFlashlightOn currentWeapon _unit)); + (_display displayCtrl 56218) lbSetCurSel (parseNumber (_unit isFlashlightOn currentWeapon _unit)); }; private _fnc_onUnload = { diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index 1e60a777ea..5d5747c7ca 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 isNotEqualTo "")); + (_display displayCtrl 92855) lbSetCurSel (parseNumber (hmd _unit isNotEqualTo "")); }; private _fnc_onUnload = { diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index d9401789a4..6f163b46be 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -998,7 +998,7 @@ Einheit muss ein Fahrzeug mit Ladekapazität sein La unidad debe ser un vehículo con espacio de carga L'unité doit être un véhicule muni d'un espace de stockage. - ユニットはカーゴのある車両である必要があります + ユニットは貨物室のある車両である必要があります 대상이 반드시 화물을 실을 수 있는 차량이어야 합니다 单位必须是载具且有载货空间 單位必須是載具且有載貨空間 @@ -1013,7 +1013,7 @@ Einheit muss freie Ladekapazität haben La unidad debe tener espacio de carga disponible L'unité doit avoir de l'espace de chargement disponible. - ユニットのカーゴには空きがありません + ユニットの貨物室に空きが必要です 대상의 화물공간이 남아 있어야 합니다 单位必须有剩余的载货空间 單位必須有剩餘的載貨空間 @@ -1180,7 +1180,7 @@ Cargaison : Груз: Náklad: - カーゴ: + 貨物: Ładunek: Ladung: 화물: @@ -1303,7 +1303,7 @@ Load into Cargo In Frachtraum laden Carica nel carico - カーゴへ積載 + 貨物室へ積載 裝載到貨物中 装载到货物中 화물 싣기 @@ -1318,7 +1318,7 @@ Unload from cargo Aus Frachtraum ausladen Scarica dal carico - カーゴから降ろす + 貨物室から降ろす 화물 내리기 @@ -1901,7 +1901,7 @@ Paradrop Cargo Ladung abwerfen (Fallschirm) - カーゴを空中投下 + 貨物を空中投下 Zrzut ładunku (cargo) Десантировать груз Soltar carga de paraquedas @@ -1917,7 +1917,7 @@ No cargo loaded Keine Ladung geladen - カーゴは積載されていません + 貨物は積載されていません Niczego nie załadowano do cargo Грузовой отсек пуст Nenhuma carga carregada diff --git a/extras/assets/CookoffSounds/ConvertWAVtoWSS.bat b/extras/assets/CookoffSounds/ConvertWAVtoWSS.bat new file mode 100644 index 0000000000..2db7169f14 --- /dev/null +++ b/extras/assets/CookoffSounds/ConvertWAVtoWSS.bat @@ -0,0 +1 @@ +forfiles /s /m *.wav /c "DeWSSDos -wss/0 -P -V -Y @path @FNAME.wss" diff --git a/extras/assets/CookoffSounds/shotbullet/close_1.wav b/extras/assets/CookoffSounds/shotbullet/close_1.wav new file mode 100644 index 0000000000..27e0c44dd3 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/close_1.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/close_2.wav b/extras/assets/CookoffSounds/shotbullet/close_2.wav new file mode 100644 index 0000000000..c51039cb73 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/close_2.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/close_3.wav b/extras/assets/CookoffSounds/shotbullet/close_3.wav new file mode 100644 index 0000000000..46955fa696 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/close_3.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/far_1.wav b/extras/assets/CookoffSounds/shotbullet/far_1.wav new file mode 100644 index 0000000000..bfccf1461b Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/far_1.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/far_2.wav b/extras/assets/CookoffSounds/shotbullet/far_2.wav new file mode 100644 index 0000000000..39b3e09dee Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/far_2.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/far_3.wav b/extras/assets/CookoffSounds/shotbullet/far_3.wav new file mode 100644 index 0000000000..5714da8440 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/far_3.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/mid_1.wav b/extras/assets/CookoffSounds/shotbullet/mid_1.wav new file mode 100644 index 0000000000..f757ca68f7 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/mid_1.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/mid_2.wav b/extras/assets/CookoffSounds/shotbullet/mid_2.wav new file mode 100644 index 0000000000..419e62e847 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/mid_2.wav differ diff --git a/extras/assets/CookoffSounds/shotbullet/mid_3.wav b/extras/assets/CookoffSounds/shotbullet/mid_3.wav new file mode 100644 index 0000000000..c2366ceb17 Binary files /dev/null and b/extras/assets/CookoffSounds/shotbullet/mid_3.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/close_1.wav b/extras/assets/CookoffSounds/shotrocket/close_1.wav new file mode 100644 index 0000000000..e76da3c464 Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/close_1.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/close_2.wav b/extras/assets/CookoffSounds/shotrocket/close_2.wav new file mode 100644 index 0000000000..82f5c2c657 Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/close_2.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/close_3.wav b/extras/assets/CookoffSounds/shotrocket/close_3.wav new file mode 100644 index 0000000000..29b447e502 Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/close_3.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/far_1.wav b/extras/assets/CookoffSounds/shotrocket/far_1.wav new file mode 100644 index 0000000000..ec019a7d5e Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/far_1.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/far_2.wav b/extras/assets/CookoffSounds/shotrocket/far_2.wav new file mode 100644 index 0000000000..640860b81f Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/far_2.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/far_3.wav b/extras/assets/CookoffSounds/shotrocket/far_3.wav new file mode 100644 index 0000000000..7481f3dfe9 Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/far_3.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/mid_1.wav b/extras/assets/CookoffSounds/shotrocket/mid_1.wav new file mode 100644 index 0000000000..b4e2c75259 Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/mid_1.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/mid_2.wav b/extras/assets/CookoffSounds/shotrocket/mid_2.wav new file mode 100644 index 0000000000..a21b529f07 Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/mid_2.wav differ diff --git a/extras/assets/CookoffSounds/shotrocket/mid_3.wav b/extras/assets/CookoffSounds/shotrocket/mid_3.wav new file mode 100644 index 0000000000..3fdffdbe0f Binary files /dev/null and b/extras/assets/CookoffSounds/shotrocket/mid_3.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/close_1.wav b/extras/assets/CookoffSounds/shotshell/close_1.wav new file mode 100644 index 0000000000..105d092a91 Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/close_1.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/close_2.wav b/extras/assets/CookoffSounds/shotshell/close_2.wav new file mode 100644 index 0000000000..899cde6505 Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/close_2.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/close_3.wav b/extras/assets/CookoffSounds/shotshell/close_3.wav new file mode 100644 index 0000000000..dbfeb32694 Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/close_3.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/far_1.wav b/extras/assets/CookoffSounds/shotshell/far_1.wav new file mode 100644 index 0000000000..5490655406 Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/far_1.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/far_2.wav b/extras/assets/CookoffSounds/shotshell/far_2.wav new file mode 100644 index 0000000000..f5cd390b60 Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/far_2.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/far_3.wav b/extras/assets/CookoffSounds/shotshell/far_3.wav new file mode 100644 index 0000000000..99fc796e7d Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/far_3.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/mid_1.wav b/extras/assets/CookoffSounds/shotshell/mid_1.wav new file mode 100644 index 0000000000..a911545a7f Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/mid_1.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/mid_2.wav b/extras/assets/CookoffSounds/shotshell/mid_2.wav new file mode 100644 index 0000000000..e8dc3e06de Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/mid_2.wav differ diff --git a/extras/assets/CookoffSounds/shotshell/mid_3.wav b/extras/assets/CookoffSounds/shotshell/mid_3.wav new file mode 100644 index 0000000000..ea6ddd94e6 Binary files /dev/null and b/extras/assets/CookoffSounds/shotshell/mid_3.wav differ diff --git a/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf b/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf index be5a9adb3e..09aba83b06 100644 --- a/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf +++ b/include/a3/ui_f_curator/ui/displays/RscDisplayAttributes.sqf @@ -54,7 +54,7 @@ switch _mode do { _control = _display displayctrl _idc; //--- Admin specific attribute - _show = if (getnumber (_cfgControl >> "adminOnly") > 0) then {_enableAdmin} else {true}; + _show = [true, _enableAdmin] select (getnumber (_cfgControl >> "adminOnly") > 0); if ((_allAttributes || {_x == configname _cfgControl} count _attributes > 0) && _show) then { _controlPos = ctrlposition _control; @@ -75,10 +75,10 @@ switch _mode do { _target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull]; _name = switch (typename _target) do { - case (typename objnull): {gettext (configfile >> "cfgvehicles" >> typeof _target >> "displayname")}; - case (typename grpnull): {groupid _target}; - case (typename []): {format ["%1: %3 #%2",groupid (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]}; - case (typename ""): {markertext _target}; + case ("OBJECT"): {gettext (configfile >> "cfgvehicles" >> typeof _target >> "displayname")}; + case ("GROUP"): {groupid _target}; + case ("ARRAY"): {format ["%1: %3 #%2",groupid (_target select 0),_target select 1,localize "str_a3_cfgmarkers_waypoint_0"]}; + case ("STRING"): {markertext _target}; }; _ctrlTitle ctrlsettext format [ctrltext _ctrlTitle,toupper _name]; @@ -115,19 +115,19 @@ switch _mode do { _display = _this select 0; _target = missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target",objnull]; switch (typename _target) do { - case (typename objnull): { + case ("OBJECT"): { _isAlive = alive _target; waituntil {isnull _display || (_isAlive && !alive _target)}; }; - case (typename grpnull): { + case ("GROUP"): { waituntil {isnull _display || isnull _target}; }; - case (typename []): { + case ("ARRAY"): { _grp = _target select 0; _wpCount = count waypoints _grp; waituntil {isnull _display || (count waypoints _grp != _wpCount)}; }; - case (typename ""): { + case ("STRING"): { waituntil {isnull _display || markertype _target == ""}; }; };