Merge branch 'master' into fire-refactor

This commit is contained in:
johnb432 2024-02-05 13:18:03 +01:00
commit e2f94afaa5
155 changed files with 518 additions and 367 deletions

View File

@ -126,6 +126,7 @@ Keithen <Keithen.Neu@gmail.com>
Kllrt <kllrtik@gmail.com>
KokaKolaA3
Krzyciu
LAxemann
legman <juicemelon@msn.com>
Legolasindar "Viper" <legolasindar@gmail.com>
licht-im-Norden87 <lichtimnorden87@gmail.com>

View File

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

View File

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

View File

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

View File

@ -29,7 +29,7 @@
<Russian>Открыть грузовой отсек</Russian>
<Italian>Apri la rampa di carico</Italian>
<Portuguese>Abrir porta de carga</Portuguese>
<Japanese>カーゴ ドアを開く</Japanese>
<Japanese>貨物室ドアを 開く</Japanese>
<Korean>화물칸 개방</Korean>
<Chinese>開啟貨艙門</Chinese>
<Chinesesimp>开启货舱门</Chinesesimp>
@ -46,7 +46,7 @@
<Russian>Закрыть грузовой отсек</Russian>
<Italian>Chiudi la rampa di carico</Italian>
<Portuguese>Fechar porta de carga</Portuguese>
<Japanese>カーゴ ドアを閉じる</Japanese>
<Japanese>貨物室ドアを 閉じる</Japanese>
<Korean>화물칸 폐쇄</Korean>
<Chinese>關閉貨艙門</Chinese>
<Chinesesimp>关闭货舱门</Chinesesimp>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -613,7 +613,7 @@
<French>Le set d'équipement suivant a été supprimé :</French>
<German>Folgende Ausrüstung wurde entfernt:</German>
<Polish>Następujący zestaw został skasowany:</Polish>
<Japanese>次の装備は削除されました:</Japanese>
<Japanese>装備を削除しました:</Japanese>
<Italian>Il seguente equipaggiamento è stato eliminato:</Italian>
<Korean>다음 로드아웃이 삭제됨 :</Korean>
<Chinese>以下的裝備已被刪除:</Chinese>
@ -629,7 +629,7 @@
<French>Le set d'équipement suivant n'est plus public :</French>
<German>Folgende Ausrüstung ist nicht mehr öffentlich:</German>
<Polish>Następujący zestaw nie jest już publiczny:</Polish>
<Japanese>次の装備は非公開になりました:</Japanese>
<Japanese>装備を非公開にしました:</Japanese>
<Italian>Il seguente equipaggiamento non è più pubblico:</Italian>
<Korean>다음 로드아웃이 더이상 공용이 아님:</Korean>
<Chinese>以下的裝備已不再被分享:</Chinese>
@ -645,7 +645,7 @@
<French>Le champ "nom" est vide !</French>
<German>Das Feld "Name" ist leer!</German>
<Polish>Pole nazwy jest puste!</Polish>
<Japanese>名前が空です!</Japanese>
<Japanese>名前が空です!</Japanese>
<Italian>Il campo del nome è vuoto!</Italian>
<Korean>이름칸이 비었습니다!</Korean>
<Chinese>名稱欄位為空!</Chinese>
@ -677,7 +677,7 @@
<French>Un de vos sets d'équipement ayant le même nom est public.</French>
<German>Eine deiner Ausrüstungen mit dem gleichen Namen ist öffentlich</German>
<Polish>Jeden z Twoich zestawów nazwany tak samo jest już publiczny</Polish>
<Japanese>あなたの装備は既に公開されているものと同名で</Japanese>
<Japanese>あなたのものと同じ名前の装備が既に公開されていま</Japanese>
<Italian>Un tuo equipaggiamento con lo stesso nome è pubblico</Italian>
<Korean>같은 이름의 로드아웃이 공용에 있습니다.</Korean>
<Chinese>已有相同名稱的裝備在公用分享區</Chinese>
@ -693,7 +693,7 @@
<French>Le set d'équipement suivant a été enregistré :</French>
<German>Folgende Ausrüstung wurde gespeichert:</German>
<Polish>Następujący zestaw został zapisany:</Polish>
<Japanese>次の装備は保存されました:</Japanese>
<Japanese>装備を保存しました:</Japanese>
<Italian>Il seguente equipaggiamento è stato salvato:</Italian>
<Korean>다음 로드아웃이 저장됨:</Korean>
<Chinese>以下的裝備已被保存:</Chinese>
@ -709,7 +709,7 @@
<French>Le set d'équipement suivant a été chargé :</French>
<German>Folgene Ausrüstung wurde geladen:</German>
<Polish>Następujący zestaw został wczytany:</Polish>
<Japanese>次の装備が読み込みされました:</Japanese>
<Japanese>装備を読み込みました:</Japanese>
<Italian>Il seguente equipaggiamento è stato caricato:</Italian>
<Korean>다음 로드아웃을 불러옴:</Korean>
<Chinese>以下的裝備已被載入:</Chinese>
@ -725,7 +725,7 @@
<French>Un set d'équipement ayant le même nom existe déjà !</French>
<German>Eine Ausrüstung mit dem gleichen Namen existiert bereits!</German>
<Polish>Zestaw z tą nazwą już istnieje!</Polish>
<Japanese>既にその名前は装備に使われています!</Japanese>
<Japanese>既に同じ名前の装備が存在しています!</Japanese>
<Italian>Un equipaggiamento con lo stesso nome è gia esistente!</Italian>
<Korean>같은 이름의 로드아웃이 이미 존재합니다!</Korean>
<Chinese>已有相同名稱的裝備!</Chinese>
@ -741,7 +741,7 @@
<French>a été renommé en</French>
<German>wurde umbenannt in</German>
<Polish>zmienił nazwę na</Polish>
<Japanese>次の名前に変更されました</Japanese>
<Japanese>を次の名前に変更しました:</Japanese>
<Italian>È stato rinominato in</Italian>
<Korean>이름이 다음과 같이 변경됨:</Korean>
<Chinese>已被改名為</Chinese>
@ -1181,7 +1181,7 @@
<English>Nightvision Support</English>
<Spanish>Soporte de visión nocturna</Spanish>
<German>Nachtsicht Unterstützung</German>
<Japanese>暗視装置への対応有無</Japanese>
<Japanese>暗視装置への対応</Japanese>
<Polish>Wsparcie noktowizyjne</Polish>
<Italian>Supporto visore notturno</Italian>
<Russian>Поддержка ночного видения</Russian>
@ -1240,9 +1240,11 @@
</Key>
<Key ID="STR_ACE_Arsenal_statVisionMode_ti">
<English>Thermal integrated</English>
<Japanese>熱画像装置内蔵</Japanese>
</Key>
<Key ID="STR_ACE_Arsenal_statVisionMode_intPrimTi">
<English>Thermal &amp; Primary integrated</English>
<Japanese>熱画像装置内蔵・プライマリに内蔵</Japanese>
</Key>
<Key ID="STR_ACE_Arsenal_statVisionMode_NoSup">
<English>Not Supported</English>
@ -1263,7 +1265,7 @@
<Key ID="STR_ACE_Arsenal_statVisionModeGeneric">
<English>Vision Mode</English>
<German>Sichtmodus</German>
<Japanese>ビジョン モード</Japanese>
<Japanese>映像モード</Japanese>
<Italian>Modalità Visiva</Italian>
<Chinese>視覺模式</Chinese>
<Chinesesimp>视觉模式</Chinesesimp>
@ -1501,7 +1503,7 @@
<Spanish>Añade automáticamente accesorios o cargadores (de la categoría seleccionada) a todas las armas de la lista de objetos</Spanish>
<German>Es werden automatisch kompatible Aufsätze oder Magazine für alle ausgewählten Waffen hinzugefügt</German>
<Polish>Automatycznie doda kompatybilne dodatki oraz magazynki (odpowiednio do każdej kategorii) dla wszystkich broni na liście</Polish>
<Japanese>現在のアイテムリスト内にある全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します</Japanese>
<Japanese>現在のアイテムリスト内全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します</Japanese>
<Russian>Добавляет совместимые приспособления или магазины (в зависимости от выбранной категории) для всего оружия в текущем списке предметов</Russian>
<Portuguese>Irá automaticamente adicionar acessórios ou carregadores (baseado na categoria selecionada) para todas as armas na lista de itens atual</Portuguese>
<French>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.</French>

View File

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

View File

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

View File

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

View File

@ -48,7 +48,7 @@
</Key>
<Key ID="STR_ACE_Cargo_clearedCustomName">
<English>Custom name has been cleared.</English>
<Japanese>カスタムネームが削除されました。</Japanese>
<Japanese>カスタムが削除されました。</Japanese>
<French>Le nom personnalisé a été supprimé.</French>
<Russian>Пользовательское название удалено.</Russian>
<German>Eigener Name wurde gelöscht.</German>
@ -108,7 +108,7 @@
<Spanish>Carga</Spanish>
<Italian>Carico</Italian>
<French>Cargaison</French>
<Japanese>カーゴ</Japanese>
<Japanese>貨物</Japanese>
<Korean>화물</Korean>
<Chinese>貨物</Chinese>
<Chinesesimp>货物</Chinesesimp>
@ -124,7 +124,7 @@
<Spanish>Menu de carga</Spanish>
<Italian>Menù del Carico</Italian>
<French>Menu de cargaison</French>
<Japanese>カーゴ メニュー</Japanese>
<Japanese>貨物メニュー</Japanese>
<Korean>화물 메뉴</Korean>
<Chinese>貨物選單</Chinese>
<Chinesesimp>货物菜单</Chinesesimp>
@ -140,7 +140,7 @@
<Spanish>Espacio de carga restante: %1</Spanish>
<Italian>Spazio di carico rimanente: %1</Italian>
<French>Espace de chargement restant : %1</French>
<Japanese>カーゴの空き容量: %1</Japanese>
<Japanese>貨物室の空き容量: %1</Japanese>
<Korean>선적 공간 남음: %1</Korean>
<Chinese>貨物剩餘空間: %1</Chinese>
<Chinesesimp>货物剩余空间:%1</Chinesesimp>
@ -156,7 +156,7 @@
<Spanish>Habilitar carga</Spanish>
<Italian>Abilita Carico</Italian>
<French>Activer la cargaison</French>
<Japanese>カーゴを有効化</Japanese>
<Japanese>貨物を有効化</Japanese>
<Korean>화물 활성화</Korean>
<Chinese>啟用貨物裝載</Chinese>
<Chinesesimp>启用货物装载</Chinesesimp>
@ -172,7 +172,7 @@
<Czech>Umožňuje naložit předměty do nákladového prostoru vozidla</Czech>
<Italian>Abilita il modulo di caricamento nel carico</Italian>
<French>Active la possibilité de charger du matériel dans un module de fret (véhicule/container).</French>
<Japanese>カーゴ モジュールで積み込みを有効化</Japanese>
<Japanese>貨物積載モジュールを有効化</Japanese>
<Korean>화물 모듈을 활성화합니다</Korean>
<Chinese>啟用貨物裝載功能</Chinese>
<Chinesesimp>启用货物装载功能</Chinesesimp>
@ -187,7 +187,7 @@
<Spanish>Ajustes de carga</Spanish>
<Italian>Impostazioni Carico</Italian>
<French>Paramètres de cargaison</French>
<Japanese>カーゴ設定</Japanese>
<Japanese>貨物設定</Japanese>
<Korean>화물 설정</Korean>
<Chinese>貨物設定</Chinese>
<Chinesesimp>货物设定</Chinesesimp>
@ -203,7 +203,7 @@
<Czech>Konfigurace nákladního modulu</Czech>
<Italian>Configura le impostazioni del modulo carico</Italian>
<French>Configure les paramètres du module de cargaison.</French>
<Japanese>カーゴ モジュールの設定を構成</Japanese>
<Japanese>貨物モジュールの設定を変更します</Japanese>
<Korean>화물 모듈의 환경 설정을 바꿉니다</Korean>
<Chinese>配置貨物模塊設定</Chinese>
<Chinesesimp>配置货物模块设定</Chinesesimp>
@ -219,7 +219,7 @@
<Italian>%1&lt;br/&gt;caricato su&lt;br/&gt;%2</Italian>
<Hungarian>%1&lt;br/&gt;berakodva ide:&lt;br/&gt;%2</Hungarian>
<Russian>%1&lt;br/&gt;загружен в&lt;br/&gt;%2</Russian>
<Japanese>%1 &lt;br/&gt;%2 へ&lt;br/&gt;積み込まれました</Japanese>
<Japanese>%1 &lt;br/&gt;%2 に&lt;br/&gt;積み込みました</Japanese>
<Korean>%1은(는)&lt;br/&gt;%2 에 실림</Korean>
<Chinese>%1&lt;br/&gt;裝載至&lt;br/&gt;%2</Chinese>
<Chinesesimp>%1&lt;br/&gt;装载至&lt;br/&gt;%2</Chinesesimp>
@ -235,7 +235,7 @@
<Italian>Hai scaricato&lt;br/&gt;%1 da&lt;br/&gt;%2</Italian>
<Hungarian>1%&lt;br/&gt;kirakodva ebből:&lt;br/&gt;%2</Hungarian>
<Russian>%1&lt;br/&gt;разгружен из&lt;br/&gt;%2</Russian>
<Japanese>%1 &lt;br/&gt;%2 から&lt;br/&gt;降ろされました</Japanese>
<Japanese>%1 &lt;br/&gt;%2 から&lt;br/&gt;降ろしました</Japanese>
<Korean>%1은(는)&lt;br/&gt;%2에서 내려짐</Korean>
<Chinese>&lt;br/&gt;%2卸載&lt;br/&gt;%1</Chinese>
<Chinesesimp>&lt;br/&gt;%2卸载&lt;br/&gt;%1</Chinesesimp>
@ -243,10 +243,12 @@
<Key ID="STR_ACE_Cargo_LoadingItem">
<English>Loading %1 into %2...</English>
<Spanish>Cargando %1 en %2...</Spanish>
<Japanese>%1 を %2 に積み込んでいます・・・</Japanese>
</Key>
<Key ID="STR_ACE_Cargo_UnloadingItem">
<English>Unloading %1 from %2...</English>
<Spanish>Descargando %1 de %2...</Spanish>
<Japanese>%1 を %2 から降ろしています・・・</Japanese>
</Key>
<Key ID="STR_ACE_Cargo_LoadingFailed">
<English>%1&lt;br/&gt;could not be loaded</English>
@ -285,7 +287,7 @@
<German>Kann nicht entladen werden</German>
<Italian>Impossibile da scaricare</Italian>
<French>Ne peut pas être déchargé</French>
<Japanese>降ろせません</Japanese>
<Japanese>荷降ろし不可能です</Japanese>
<Korean>하역할 수가 없습니다</Korean>
</Key>
<Key ID="STR_ACE_Cargo_SizeMenu">
@ -293,12 +295,12 @@
<German>Frachtgröße: %1</German>
<Italian>Dimensione Carico: %1</Italian>
<French>Encombrement fret: %1</French>
<Japanese>カーゴ サイズ: %1</Japanese>
<Japanese>貨物のサイズ: %1</Japanese>
<Korean>화물 크기: %1</Korean>
</Key>
<Key ID="STR_ACE_Cargo_customName_edenName">
<English>Custom Name</English>
<Japanese>カスタムネーム</Japanese>
<Japanese>カスタム</Japanese>
<French>Nom personnalisé</French>
<German>Eigener Name</German>
<Italian>Nome Personalizzato</Italian>
@ -311,7 +313,7 @@
</Key>
<Key ID="STR_ACE_Cargo_customName_edenDesc">
<English>Set a custom cargo name used in the cargo interface.</English>
<Japanese>カーゴ一覧で使用されるカスタムネームを設定します。</Japanese>
<Japanese>貨物インターフェイスで使用されるカスタム名を設定します。</Japanese>
<French>Définit un nom de fret personnalisé qui sera visible dans le menu de cargaison.</French>
<Russian>Установить пользовательское имя груза, используемое в интерфейсе погрузки.</Russian>
<German>Definiere eigenen Frachtnamen, welcher im Frachtraum genutzt wird.</German>
@ -326,7 +328,7 @@
<English>Cargo Space</English>
<German>Frachtraum</German>
<Italian>Spazio di Carico</Italian>
<Japanese>カーゴ スペース</Japanese>
<Japanese>貨物室の容量</Japanese>
<Chinese>貨物空間</Chinese>
<Chinesesimp>货物空间</Chinesesimp>
<Polish>Przestrzeń ładunkowa</Polish>
@ -342,7 +344,7 @@
<English>The cargo space available in this vehicle/container</English>
<German>Verfügbarer Frachtraum in diesem Fahrzeug/Container</German>
<Italian>Lo spazio disponibile in questo veicolo/container</Italian>
<Japanese>この車両/コンテナでカーゴ スペースを使えるようにします</Japanese>
<Japanese>この車両/コンテナで使用可能な貨物室の容量</Japanese>
<Chinese>設定此載具/集裝箱可裝載多少貨物</Chinese>
<Chinesesimp>设定此载具/集装箱可装载多少货物</Chinesesimp>
<Polish>Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze</Polish>
@ -357,7 +359,7 @@
<English>Cargo Size</English>
<German>Frachtgröße</German>
<Italian>Dimensioni nel Carico</Italian>
<Japanese>カーゴ サイズ</Japanese>
<Japanese>貨物のサイズ</Japanese>
<Chinese>貨物的大小</Chinese>
<Chinesesimp>货物的大小</Chinesesimp>
<Polish>Wielkość ładunku</Polish>
@ -373,7 +375,7 @@
<English>The cargo space required to hold this object (-1 for not loadable)</English>
<German>Frachtraumgröße, welche zum Einladen dieses Objektes benötigt wird (-1 nicht einladbar)</German>
<Italian>Lo spazio di carico necessario per contenere questo oggetto (-1 per non caricabile)</Italian>
<Japanese>オブジェクトを積載するのに必要なカーゴ スペース (-1 で積載不可にします)</Japanese>
<Japanese>このオブジェクトの積載に必要な貨物室の容量 (-1 で積載不可に)</Japanese>
<Chinese>此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載)</Chinese>
<Chinesesimp>此货物会占掉多少空间(设定 -1 的话此货物就不能被装载)</Chinesesimp>
<Polish>Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania)</Polish>
@ -432,7 +434,7 @@
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent_description">
<English>Modifier for how long it takes to paradrop a cargo item.</English>
<German>Beeinflusst die zusätzliche Zeit für Türlastabwürfe.</German>
<Japanese>カーゴ アイテムを空中投下するまでの時間を変更します。</Japanese>
<Japanese>貨物の空中投下に掛かる時間を変更します。</Japanese>
<Italian>Modifica quanto tempo viene impiegato per paracadutare oggetti dal carico.</Italian>
<French>Modifie le temps nécessaire au paralargage d'une cargaison.</French>
<Chinese>設定空投所需消耗的時間</Chinese>
@ -447,7 +449,7 @@
<Key ID="STR_ACE_Cargo_loadTimeCoefficient">
<English>Load Time Coefficient</English>
<German>Ladezeitmultiplikator</German>
<Japanese>積載所要時間係数</Japanese>
<Japanese>積載所要時間係数</Japanese>
<Polish>Współczynnik czasu załadowania</Polish>
<Italian>Coefficente Tempo Caricamento</Italian>
<Russian>Коэф. времени погрузки</Russian>
@ -462,7 +464,7 @@
<Key ID="STR_ACE_Cargo_loadTimeCoefficient_description">
<English>Modifies how long it takes to load/unload items.\nTime, in seconds, is the size of the item multiplied by this value.</English>
<German>Gibt an, wie lange das Laden / Entladen von Gegenständen dauern soll.\nZeit in Sekunden, die mit der Größe des Gegenstandes multipliziert wird.</German>
<Japanese>アイテムのロード/アンロードに掛かる時間を変更します。\n時間 (秒) は、アイテムのサイズにこの値を掛けたものです。</Japanese>
<Japanese>貨物の積み込み/積み下ろしに掛かる時間を変更します。\n時間 (秒) は、貨物のサイズにこの値を掛けたものです。</Japanese>
<Polish>Modyfikuje, jak długo zajmuje załadowywanie/wyładowywanie przedmiotów. \nCzasem, w sekundach, jest wielkość przedmiotu razy jego wartość.</Polish>
<Italian>Modifica il tempo impiegato per caricare o scaricare gli oggetti.\nIl tempo, in secondi, equivale alla dimensione dell'oggetto moltiplicata per questo valore</Italian>
<Russian>Изменяет время для загрузки/выгрузки предметов. \n Время (сек) - это размер предмета, умноженный на это значение.</Russian>
@ -477,7 +479,7 @@
<Key ID="STR_ACE_Cargo_openAfterUnload">
<English>Reopen Cargo Menu</English>
<Turkish>Kargo Menüsünü Tekrar Aç</Turkish>
<Japanese>カーゴ メニューを再度開く</Japanese>
<Japanese>貨物メニューを再度開く</Japanese>
<French>Rouvrir le menu de cargaison</French>
<Russian>Переоткрыть меню погрузки</Russian>
<German>Frachtmenü erneut öffnen</German>
@ -491,7 +493,7 @@
<Key ID="STR_ACE_Cargo_openAfterUnload_description">
<English>Reopen the Cargo Menu after successful unload.</English>
<Turkish>Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster.</Turkish>
<Japanese>カーゴを降ろした後に再びカーゴ メニューを開きます。</Japanese>
<Japanese>貨物を降ろした後に再び貨物メニューを開きます。</Japanese>
<French>Réouvre le menu de cargaison après un déchargement réussi.</French>
<Russian>Переоткрыть меню погрузки после успешной выгрузки.</Russian>
<German>Frachtmenü erneut öffnen, nach erfolgreichen Entladen.</German>
@ -507,7 +509,7 @@
<Korean>화물 내린 후 운반</Korean>
<Russian>Нести после выгрузки</Russian>
<Spanish>Llevar encima tras la descarga</Spanish>
<Japanese>荷降ろし後の運搬</Japanese>
<Japanese>荷降ろし後に持ち運ぶ</Japanese>
<Polish>Niesienie Po Rozładowaniu</Polish>
<German>Nach dem Entladen tragen</German>
<Italian>Trasporta dopo aver Scaricato</Italian>
@ -519,7 +521,7 @@
<Korean>화물 아이템을 내린 후 들거나 끌지 여부를 결정합니다.</Korean>
<Russian>Нужно ли переносить или тащить предметы после их выгрузки.</Russian>
<Spanish>Controla si los objetos de carga son llevados encima o arrastrados despues de la descarga.</Spanish>
<Japanese>荷降ろし後、貨物アイテムを運ぶか引きずるかを制御する。</Japanese>
<Japanese>荷降ろし後、貨物を運ぶか引きずるかを制御する。</Japanese>
<Polish>Kontroluje, czy przedmioty z ładunku są przenoszone lub ciągnięte po ich wyładowaniu.</Polish>
<German>Steuert, ob Objekte nach dem Entladen getragen oder gezogen werden.</German>
<Italian>Determina se un oggetto verrà subito trasportato o trascinato dopo essere stato scaricato.</Italian>

View File

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

View File

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

View File

@ -5,10 +5,10 @@
*
* Arguments:
* 0: The Unit (usually the player) <OBJECT>
* 1: Force a return type <NUMBER, BOOLEAN>
* 1: Return imperial units <NUMBER, BOOLEAN>
*
* Return Value:
* The return value <NUMBER>
* Weight string <STRING>
*
* Example:
* [player] call ace_common_fnc_getWeight

View File

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

View File

@ -1641,7 +1641,7 @@
<French>Renommer</French>
<German>Umbenennen</German>
<Polish>Zmień nazwę</Polish>
<Japanese></Japanese>
<Japanese>前変更</Japanese>
<Italian>Rinomina</Italian>
<Korean>이름 바꾸기</Korean>
<Chinese>重新命名</Chinese>

View File

@ -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 = "";
};
};

View File

@ -15,4 +15,4 @@ class CfgPatches {
};
};
//#include "CfgWeapons.hpp"
#include "CfgWeapons.hpp"

View File

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

View File

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

View File

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

View File

@ -21,4 +21,5 @@ class CfgPatches {
#include "CfgAmmo.hpp"
#include "CfgCloudlets.hpp"
#include "CfgSFX.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"

View File

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

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -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 <20>", _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 <20>", _dagrHeading] });
__timeControl ctrlSetText _dagrTime;
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;

View File

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

View File

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

View File

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

View File

@ -465,7 +465,7 @@
<Italian>Scorta d'acqua</Italian>
<Chinese>飲用水補給</Chinese>
<Chinesesimp>饮用水补给</Chinesesimp>
<Japanese>水資源</Japanese>
<Japanese>水資源</Japanese>
<Russian>Водные ресурсы</Russian>
<Polish>Źródło wody</Polish>
<Korean>식수 보급량</Korean>
@ -478,7 +478,7 @@
<Italian>La quantità di acqua disponibile per interazioni ACE Razioni da Campo di sorgenti d'acqua (-1 nessuna, -10 infinita)</Italian>
<Chinese>水源可供補充飲用水的次數(-1為關閉-10為無限次</Chinese>
<Chinesesimp>水源可供取水的次数(-1为关闭-10为无限次</Chinesesimp>
<Japanese>ACE フィールド レーションで利用できる水源の量を設定できます。(-1で無効化、-10で無限)</Japanese>
<Japanese>ACE フィールド レーションで利用できる水源の資源量を設定できます。(-1で無効化、-10で無限)</Japanese>
<Russian>Количество воды, доступной для использования в ACE Полевые рационы. (-1 - отключено, -10 - бесконечно)</Russian>
<Polish>Ilość wody dostępnej dla Akcji ACE Źródła wody (-1 wyłączone, -10 nieskończone)</Polish>
<Korean>ACE 전투식량 물 근처 행동에서 얼마나 물을 얻어 갈 수 있는지를 정합니다 (-1은 비활성화, -10은 무한대)</Korean>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -43,7 +43,7 @@ private _icon = "";
_actions pushBack [
[
format ["%1", _unit],
str _unit,
[_unit, true] call EFUNC(common,getName),
[_icon, "#FFFFFF"],
{

View File

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

View File

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

View File

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

View File

@ -1,4 +1,3 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));

View File

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

View File

@ -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", {

View File

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

View File

@ -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 <BOOL>
* GPS can be used <BOOL>
*
* Example:
* call ACE_maptools_fnc_canUseMapGPS
* call ace_maptools_fnc_canUseMapGPS
*
* Public: No
*/

View File

@ -1,23 +1,23 @@
#include "..\script_component.hpp"
/*
* Author: esteldunedain
* canUseMapTools
* Returns if the map tools can be used.
*
* Arguments:
* None
*
* Return Value:
* Boolean <BOOL>
* Map tools can be used <BOOL>
*
* 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)}

View File

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

View File

@ -4,63 +4,71 @@
* Prevents the cursor from entering the roamer when drawing lines and records the positions
*
* Arguments:
* 0: The Map <CONTROL>
* 0: Map control <CONTROL>
* 1: Roamer Width <NUMBER>
*
* 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

View File

@ -8,7 +8,7 @@
* 1: Parameters of the mouse button event <ARRAY>
*
* Return Value:
* True if event was handled <BOOL>
* 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

View File

@ -5,10 +5,11 @@
*
* Arguments:
* 0: Map control <CONTROL>
* 1: Mouse position on screen coordinates <ARRAY>
* 1: Mouse x position <NUMBER>
* 2: Mouse y position <NUMBER>
*
* Return Value:
* If the event was handled <BOOL>
* 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

View File

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

View File

@ -4,32 +4,32 @@
* Return true if the position is inside the map marker (to allow dragging).
*
* Arguments:
* 0: x Position (in meters) <NUMBER>
* 1: y Position (in meters) <NUMBER>
* 0: x position (in meters) <NUMBER>
* 1: y position (in meters) <NUMBER>
*
* Return Value:
* Boolean <BOOL>
* Is inside map tool <BOOL>
*
* 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

View File

@ -4,8 +4,8 @@
* Return if the position is inside the map marker (to allow dragging) or not.
*
* Arguments:
* 0: x Position (in meters) <NUMBER>
* 1: y Position (in meters) <NUMBER>
* 0: x position (in meters) <NUMBER>
* 1: y position (in meters) <NUMBER>
*
* Return Value:
* Where in the plotting board it is <NUMBER>
@ -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};

View File

@ -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 <CONTROL>
* 0: Map control <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

View File

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

View File

@ -1,4 +1,4 @@
private _category = format ["ACE %1", localize LSTRING(Name)];
private _category = format ["ACE %1", LLSTRING(Name)];
[
QGVAR(rotateModifierKey), "LIST",

View File

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

View File

@ -28,7 +28,7 @@ GVAR(dev_watchVariableRunning) = true;
_return pushBack format ["<t color='#%1'>State: %2</t>", _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 {"[<t color='#BBFFBB'>U</t>]"} else {""};
private _unconcFlag = ["", "[<t color='#BBFFBB'>U</t>]"] select IS_UNCONSCIOUS(_unit);
private _timeLeft = _unit getVariable [QEGVAR(medical_statemachine,cardiacArrestTimeLeft), -1];
private _cardiactArrestFlag = if IN_CRDC_ARRST(_unit) then {format ["[<t color='#BBBBFF'>CA</t> %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 {"<t color ='#FF9999'>Bleeding</t>"} else {""};
private _isBleeding = ["", "[<t color ='#FF9999'>Bleeding</t>]"] select IS_BLEEDING(_unit);
private _secondsToHeartstop = if (_bloodLoss != 0) then {format ["[<t color ='#FF9999'>Time Left:</t> %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 {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
private _limping = ["", "[<t color ='#FFCC22'> Limping </t>]"] 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 {"[<t color ='#FFCC22'>Sprint Blocked</t>]"};
private _forceWalk = if (isForcedWalk _unit) then {"[<t color ='#FF9922'>Forced Walking</t>]"} else {""};
private _canSprint = ["[<t color ='#FFCC22'>Sprint Blocked</t>]", ""] select (isSprintAllowed _unit);
private _forceWalk = ["", "[<t color ='#FF9922'>Forced Walking</t>]"] select (isForcedWalk _unit);
_return pushBack format ["Fractures: %1 %2%3", _fractures, _canSprint, _forceWalk];

View File

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

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