Merge branch 'medical-rewrite' into medical-rewrite-kill-ai

This commit is contained in:
Ľuboš Lendáč 2017-06-05 22:54:03 +02:00 committed by GitHub
commit b91e892710
283 changed files with 3751 additions and 2654 deletions

View File

@ -1,4 +1,4 @@
# ACE3 CONTRIBUTOR LIST
# ACE3 CONTRIBUTOR LIST
# If you contributed, but are not listed here, contact me:
# koffeinflummi@gmail.com
#
@ -38,6 +38,7 @@ Aggr094 <bastards4glory@gmail.com>
alef <alefor@gmail.com>
Aleksey EpMAK Yermakov <epmak777@gmail.com>
Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com>
Arcanum417 <lubos.len@gmail.com>
Arkhir <wonsz666@gmail.com >
@ -84,6 +85,7 @@ Harakhti <shadowdragonphd@gmail.com>
havena <silveredenis@gmail.com>
Hawkins
Head <brobergsebastian@gmail.com>
Hybrid V
Karneck <dschultz26@hotmail.com>
Kavinsky <nmunozfernandez@gmail.com>
Kllrt <kllrtik@gmail.com>

View File

@ -4,7 +4,7 @@
<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.9.1-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.9.2-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Advanced_Ballistics">
<Key ID="STR_ACE_Advanced_Ballistics_WindInfoKey">
@ -151,7 +151,7 @@
<French>Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs)</French>
<Hungarian>Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt)</Hungarian>
<Russian>Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере)</Russian>
<Italian>Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe degradare le prestazioni durante scontri intensi in multiplayer)</Italian>
<Italian>Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe ridurre le prestazioni durante scontri intensi in multiplayer)</Italian>
<Japanese>非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます)</Japanese>
<Korean>고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다)</Korean>
</Key>
@ -179,7 +179,7 @@
<French>Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu</French>
<Hungarian>Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel</Hungarian>
<Russian>Всегда включает продвинутую баллистику когда стреляет член группы</Russian>
<Italian>Abilita sempre Balistica Avanzata quando un Membro del Gruppo spara</Italian>
<Italian>Abilita sempre Balistica Avanzata quando un membro del gruppo spara</Italian>
<Japanese>グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します</Japanese>
<Korean>그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다</Korean>
</Key>
@ -235,7 +235,7 @@
<French>La température de la munition influe sur la vélocité intiale</French>
<Hungarian>A kezdősebesség a lőszer hőmérsékletétől függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от температуры</Russian>
<Italian>Velocità alla volata varia con la temperatura delle munizioni</Italian>
<Italian>La velocità dello sparo varia a seconda della temperatura delle munizioni</Italian>
<Japanese>弾薬の温度により初速値を変化させます</Japanese>
<Korean>탄약 온도에 비례해 총구 속도가 달라집니다</Korean>
</Key>
@ -263,7 +263,7 @@
<French>La longueur du canon influe sur la vélocité initale</French>
<Hungarian>A kezdősebesség a cső hosszától függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от длины ствола</Russian>
<Italian>Velocità alla volata varia con la lunghezza della canna</Italian>
<Italian>La velocità di sparo varia a seconda della lunghezza della canna</Italian>
<Japanese>銃身長により初速値を変化させます</Japanese>
<Korean>총구 속도가 총열에 비례해 달라집니다</Korean>
</Key>
@ -277,7 +277,7 @@
<French>Activer l'effet balle traçante</French>
<Hungarian>Nyomkövető-effekt engedélyezése</Hungarian>
<Russian>Следы пуль</Russian>
<Italian>Abilita effetto di tracciatura dei proiettili</Italian>
<Italian>Abilita effetto dei Proiettili Traccianti</Italian>
<Japanese>弾丸の痕跡表示を有効化</Japanese>
<Korean>예광탄 효과 적용</Korean>
</Key>
@ -291,7 +291,7 @@
<French>Active une tracante pour les munitions de gros calibre (seulement visible en utilisant des optiques avancées)</French>
<Hungarian>Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható)</Hungarian>
<Russian>Включает эффект следов пуль для больших калибров (видны только через мощную оптику)</Russian>
<Italian>Abilita effetto di tracciatura per proiettili di alto calibro (visibile solo attraverso ottiche ad alto potenziale)</Italian>
<Italian>Abilita effetto dei proiettili traccianti di alto calibro (visibile solo attraverso ottiche ad alto potenziale)</Italian>
<Japanese>大口径の銃弾による弾丸の痕跡表示を有効化します (高倍率スコープを介してでしか見れません)</Japanese>
<Korean>대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다)</Korean>
</Key>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Advanced_Fatigue">
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
@ -8,6 +8,7 @@
<Polish>Współczynnik wydolności</Polish>
<Korean>성능 요인</Korean>
<French>Facteur de performance</French>
<Italian>Fattore Prestazione</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_Description">
<English>Influences the overall performance of all players with no custom factor. Higher means better.</English>
@ -16,6 +17,7 @@
<Polish>Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej.</Polish>
<Korean>모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
<French>Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances.</French>
<Italian>Influenza qualsiasi prestazione di tutti i giocatori smuniti di un fattore personalizzato. Maggiore significa migliore.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_EdenDescription">
<English>Influences the overall performance of this unit. Higher means better.</English>
@ -24,6 +26,7 @@
<Polish>Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej.</Polish>
<Korean>모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
<French>Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances.</French>
<Italian>Influenza qualsiasi prestazione di questa unità. Maggiore significa migliore.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor">
<English>Recovery Factor</English>
@ -32,6 +35,7 @@
<Polish>Współczynnik regeneracji</Polish>
<Korean>회복 요인</Korean>
<French>Facteur de récupération</French>
<Italian>Fattore Recupero</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor_Description">
<English>Changes how fast the player recovers when resting. Higher is faster.</English>
@ -40,6 +44,7 @@
<Polish>Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej.</Polish>
<Korean>얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
<French>Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide.</French>
<Italian>Determina in quanto tempo il giocatore recupera quando rilassato. Maggiore significa migliore.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor">
<English>Load Factor</English>
@ -48,6 +53,7 @@
<Polish>Współczynnik masy ekwipunku</Polish>
<Korean>부담 요인</Korean>
<French>Facteur d'encombrement</French>
<Italian>Fattore Caricamento</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor_Description">
<English>Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence.</English>
@ -56,6 +62,7 @@
<Polish>Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność.</Polish>
<Korean>플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다.</Korean>
<French>Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence sur les performances.</French>
<Italian>Incrementa o decrementa quanto il peso influenza le prestazioni dei giocatori. Zero significa che il peso dell'equipaggiamento non ha alcuna influenza nelle prestazioni.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor">
<English>Terrain Gradient Factor</English>
@ -64,6 +71,7 @@
<Polish>Współczynnik terenu</Polish>
<Korean>지형 경사도 요인</Korean>
<French>Facteur d'inclinaison du terrain</French>
<Italian>Fattore Pendenza Terreno</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor_Description">
<English>Sets how much steep terrain increases stamina loss. Higher means higher stamina loss.</English>
@ -72,6 +80,7 @@
<Polish>Wpływa na to w jakim stopniu stromy teren wpływa na utratę wytrzymałości. Więcej oznacza szybszą utratę wytrzymałości.</Polish>
<Korean>경사도에 따라 얼마나 피로해지는지를 정합니다. 값이 클수록 더 많은 피로를 유발합니다.</Korean>
<French>Configure l'influence de l'inclinaison du terrain sur la perte d'endurance. Une valeur plus élevée implique une perte d'endurance plus importante.</French>
<Italian>Stabilisce quanto la pendenza del terreno incrementa la perdita della stamina. Maggiore significa più stamina persa.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
@ -80,6 +89,7 @@
<Polish>Włączone</Polish>
<Korean>활성화</Korean>
<French>Activé</French>
<Italian>Abilitato</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled_Description">
<English>Enables/disables Advanced Fatigue.</English>
@ -88,6 +98,7 @@
<Polish>Włącza/wyłącza zaawansowaną wytrzymałość</Polish>
<Korean>고급 피로도 활성화/비활성화</Korean>
<French>Active/désactive la fatigue avancée.</French>
<Italian>Abilita/disabilita la Fatica Avanzata.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar">
<English>Show stamina bar</English>
@ -96,6 +107,7 @@
<Polish>Pokaż pasek wytrzymałości</Polish>
<Korean>피로도 막대</Korean>
<French>Afficher la barre d'endurance</French>
<Italian>Mostra barra stamina</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar_Description">
<English>Shows the stamina bar.</English>
@ -104,6 +116,7 @@
<Polish>Pokazuje pasek wytrzymałości.</Polish>
<Korean>피로도 막대를 보여줍니다.</Korean>
<French>Affiche la barre d'endurance.</French>
<Italian>Mostra la barra della stamina.</Italian>
</Key>
</Package>
</Project>

View File

@ -93,6 +93,7 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
// Set last thrown time on Vanilla Throwing and Advanced Throwing
["ace_firedPlayer", {
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon"];
if (_weapon == "Throw") then {
_unit setVariable [QGVAR(lastThrownTime), CBA_missionTime];
};

View File

@ -36,6 +36,11 @@ if (_throwable isEqualTo [] && {!_primed}) exitWith {
private _throwableMag = _throwable param [0, "#none"];
// If not primed, double check we actually have the magazine in inventory
if ((!_primed) && {!(_throwableMag in (magazines ACE_player))}) exitWith {
[ACE_player, "No valid throwable (glitched currentThrowable)"] call FUNC(exitThrowMode);
};
// Get correct throw power for primed grenade
if (_primed) then {
private _ammoType = typeOf _activeThrowable;

View File

@ -34,7 +34,8 @@ if !(_unit getVariable [QGVAR(primed), false]) then {
_activeThrowable setVelocity [0, 0, -0.1];
// Set thrower
[QEGVAR(common,setShotParents), [_activeThrowable, _unit, (getShotParents _activeThrowable) select 1]] call CBA_fnc_serverEvent;
private _instigator = (getShotParents _activeThrowable) param [1, _unit]; // getShotParents could be [] on replaced grenades (like IR chemlight)
[QEGVAR(common,setShotParents), [_activeThrowable, _unit, _instigator]] call CBA_fnc_serverEvent;
};
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Advanced_Throwing">
<Key ID="STR_ACE_Advanced_Throwing_Category">
@ -9,6 +9,7 @@
<German>Erweitertes Wurfsystem</German>
<Korean>고급 투척</Korean>
<French>Lancé amélioré</French>
<Italian>Lancio Avanzato</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Module_Description">
<English>Allows changing advanced throwing behaviour.</English>
@ -18,6 +19,7 @@
<German>Erlaubt es, das Verhalten des erweiterten Wurfsystems zu ändern.</German>
<Korean>고급 투척 행위를 허가합니다</Korean>
<French>Permet de changer la configuration du lancé amélioré.</French>
<Italian>Permette il cambiamento della modalità di tiro.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Enable_DisplayName">
<English>Enable Advanced Throwing</English>
@ -27,6 +29,7 @@
<German>Aktiviere erweitertes Wurfsystem</German>
<Korean>고급 투척 활성화 </Korean>
<French>Active le lancé amélioré</French>
<Italian>Abilita Lancio Avanzato</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Enable_Description">
<English>Enables advanced throwing system.</English>
@ -36,6 +39,7 @@
<German>Aktiviert das erweiterte Wurfsystem.</German>
<Korean>고급 투척을 활성화 합니다</Korean>
<French>Active le système de lancé amélioré.</French>
<Italian>Abilita il sistema di lancio avanzato.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowThrowArc_DisplayName">
<English>Show Throw Arc</English>
@ -45,6 +49,7 @@
<German>Zeige Wurfbogen</German>
<Korean>투척 궤적 표시</Korean>
<French>Afficher l'arc de lancé</French>
<Italian>Mostra Arco di Tiro</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowThrowArc_Description">
<English>Enables visualization of the throw arc (where throwable will fly).</English>
@ -54,6 +59,7 @@
<German>Aktiviert die Visualisierung des Wurfbogens (wohin das Objekt geworfen werden wird).</German>
<Korean>투척 궤도를 시각화 합니다(투척물이 어디로 갈지)</Korean>
<French>Active la visualisation de l'arc de lancé (où l'objet lancé va atterrir).</French>
<Italian>Abilita la visualizzazione dell'arco del tiro (dove l'oggetto lanciabile volerà).</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowMouseControls_DisplayName">
<English>Show Throwing Mouse Controls</English>
@ -63,6 +69,7 @@
<German>Zeige Maussteuerung beim Werfen</German>
<Korean>마우스 조작 표시</Korean>
<French>Afficher les contrôles à la souris du lancé</French>
<Italian>Mostra Comandi Mouse Lancio</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ShowMouseControls_Description">
<English>Enables visual cues for mouse controls when throwable is prepared.</English>
@ -72,6 +79,7 @@
<German>Aktiviert visuelle Hinweise zur Maussteuerung, wenn ein Objekt zum Werfen vorbereitet wird.</German>
<Korean>투척물을 준비시 마우스 조작을 시각화해서 보여줍니다</Korean>
<French>Active les aides visuels pour les controles à la souris lorsqu'un lancé est préparé.</French>
<Italian>Abilita la visualizzazione dei controlli del mouse quando l'oggetto lanciabile è pronto.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_DisplayName">
<English>Enable Throwables Pick Up</English>
@ -81,6 +89,7 @@
<German>Aktiviere Aufheben von Wurfobjekten</German>
<Korean>투척물 줍기 활성화</Korean>
<French>Active la récupération des objets lancés</French>
<Italian>Abilita Raccogli Oggetti</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_Description">
<English>Enables ability to pick up throwables from the ground.</English>
@ -90,6 +99,7 @@
<German>Aktiviert die Möglichkeit, geworfene Objekte wieder vom Boden aufzuheben.</German>
<Korean>땅에 떨어진 투척물을 주울 수 있게 해줍니다.</Korean>
<French>Active la capacité de récupérer les objets lancés sur le sol.</French>
<Italian>Abilita la possibilità di raccogliere un oggetto lanciabile da terra.</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_DisplayName">
<English>Enable Attached Throwables Pick Up</English>
@ -99,6 +109,7 @@
<German>Aktiviere erneute Aufnahme befestigter Wurfobjekte</German>
<Korean>부착 투척물 줍기 활성화</Korean>
<French>Active le ramassage d'objets lançables attachés</French>
<Italian>Abilita Raccogli Oggetti Lanciabili da altri Oggetti</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_Description">
<English>Enables ability to pick up throwables from attached objects.</English>
@ -108,6 +119,7 @@
<German>Aktiviert die Möglichkeit, befestigte Wurfobjekte erneut aufzunehmen.</German>
<Korean>부착된 투척물을 주울 수 있게 해줍니다.</Korean>
<French>Active la capacité à ramasser les objets lançables attaché à d'autres objets.</French>
<Italian>Abilita la possibilità di raccogliere gli oggetti lanciabili dagli altri oggetti. </Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Prepare">
<English>Prepare/Change Throwable</English>
@ -117,6 +129,7 @@
<German>Wurfobjekt vorbereiten/wechseln</German>
<Korean>투척물 준비/변경</Korean>
<French>Préparer/changer d'objet</French>
<Italian>Prepara/Cambia Oggetto lanciabile</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_dropModeHold">
<English>Throwable Drop Mode (Hold)</English>
@ -126,6 +139,7 @@
<German>Wurfobjekt Fallmodus (halten)</German>
<Korean>투척물 떨어뜨리기 모드(꾹눌러서)</Korean>
<French>Mode de lancé de l'objet (Tenir)</French>
<Italian>Modalità Oggetto Gettabile (Mantenere)</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_DropModeToggle">
<English>Throwable Drop Mode (Toggle)</English>
@ -135,6 +149,7 @@
<German>Wurfobjekt Fallmodus (umschalten)</German>
<Korean>투척물 떨어뜨리기 모드(토글)</Korean>
<French>Mode de lancé de l'objet (Basculer)</French>
<Italian>Modalità Oggetto lanciabile Gettabile (Interruttore)</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Primed">
<English>Primed</English>
@ -144,6 +159,7 @@
<German>Scharf gemacht</German>
<Korean>뇌관 작동</Korean>
<French>Amorcer</French>
<Italian>Armato</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Throw">
<English>Throw</English>
@ -153,6 +169,7 @@
<German>Werfen</German>
<Korean>던지기</Korean>
<French>Lancer</French>
<Italian>Lanciare</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_ChangeMode">
<English>(Scroll) Change Mode</English>
@ -162,6 +179,7 @@
<German>(Scrollen) Modus wechseln</German>
<Korean>(마우스 휠) 모드 변경</Korean>
<French>(Molette souris) Changer de mode</French>
<Italian>(Scorrere) Cambio Modalità</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Extend">
<English>(Scroll) Extend</English>
@ -171,6 +189,7 @@
<German>(Scrollen) Erweitern</German>
<Korean>(마우스 휠) 연장</Korean>
<French>(Molette souris) Etendre</French>
<Italian>(Scorrere) Estendere</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Cook">
<English>(Click) Cook</English>
@ -180,6 +199,7 @@
<German>(Klicken) Abkochen</German>
<Korean>(클릭) 예열</Korean>
<French>(Clique) Dégoupiller</French>
<Italian>(Click) Arma</Italian>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_PickUp">
<English>Pick Up</English>
@ -189,6 +209,7 @@
<German>Aufheben</German>
<Korean>줍기</Korean>
<French>Ramasser</French>
<Italian>Raccogli</Italian>
</Key>
</Package>
</Project>

View File

@ -39,29 +39,20 @@ class CfgAmmo {
// also adjust tracer, "muh lightshow"; also adjust splash damage radius
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
hit = 80;
indirectHit = 12;
indirectHitRange = 3; //2;
caliber = 1.4;
deflecting = 3;
fuseDistance = 3;
tracerStartTime = 0.02;
timeToLive = 40;
hit = 80; // default: 180
indirectHit = 12; // default: 4
indirectHitRange = 3; // default: 3
caliber = 1.4; // default: 5
deflecting = 3; // default: 5
fuseDistance = 3; // default: 10
tracerStartTime = 0.02; // default: 0.1
timeToLive = 40; // default: 6
};
// helper projectiles to simulate a rof > fps
class ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy: Gatling_30mm_HE_Plane_CAS_01_F {
simulation = "shotSubmunitions";
triggerTime = 0;
submunitionAmmo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Sub";
submunitionConeType[] = {"custom", {{0,0}, {0,0}, {0,0}} };
};
class ACE_Gatling_30mm_HE_Plane_CAS_01_Sub: Gatling_30mm_HE_Plane_CAS_01_F {};
// adjust damage and splash damage, closer to bluefor gatling with same caliber
class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {
hit = 70; //40;
indirectHit = 11; //14;
indirectHitRange = 3;
hit = 70; // default: 150
indirectHit = 11; // default: 4
indirectHitRange = 3; // default: 3
};
};

View File

@ -2,7 +2,6 @@ class CfgMagazines {
// shoot helper object to tripple rof
class VehicleMagazine;
class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine {
ammo = "ACE_Gatling_30mm_HE_Plane_CAS_01_Deploy";
count = 1170;
};

View File

@ -33,12 +33,10 @@ class CfgVehicles {
class Turrets: Turrets {
class CopilotTurret;
};
//class UserActions;
};
class Heli_Light_01_base_F: Helicopter_Base_H {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
incomingMissileDetectionSystem = 16; // Vanilla: 0
driverCanEject = 1;
class Turrets: Turrets {
@ -49,16 +47,8 @@ class CfgVehicles {
};
};
class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/
};
class Heli_Light_01_armed_base_F: Heli_Light_01_base_F {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
incomingMissileDetectionSystem = 16; // Vanilla: 0
driverCanEject = 1;
class Turrets: Turrets {
@ -67,13 +57,10 @@ class CfgVehicles {
};
};
};
class B_Heli_Light_01_armed_F: Heli_Light_01_armed_base_F {};
class Heli_Light_02_base_F: Helicopter_Base_H {
driverCanEject = 1;
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
incomingMissileDetectionSystem = 16; // Vanilla: 24
magazines[] = {"2000Rnd_762x51_Belt_T_Green", "12Rnd_PG_missiles", "168Rnd_CMFlare_Chaff_Magazine"}; // Switch gun magazine to 7.62mm from 6.5mm
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
@ -91,10 +78,8 @@ class CfgVehicles {
#include "Heli_Attack_01_base_F.hpp"
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
class Heli_Attack_02_base_F: Helicopter_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
incomingMissileDetectionSystem = 16; // Vanilla: 24
driverCanEject = 1;
class Turrets: Turrets {
@ -105,8 +90,7 @@ class CfgVehicles {
};
class Heli_Transport_01_base_F: Helicopter_Base_H {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
incomingMissileDetectionSystem = 16; // Vanilla: 24
driverCanEject = 1;
class Turrets: Turrets {
@ -116,35 +100,19 @@ class CfgVehicles {
};
class MainTurret: MainTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Red"};
magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm
canEject = 1;
};
class RightDoorGun: MainTurret {
magazines[] = {"2000Rnd_762x51_Belt_T_Red"};
magazines[] = {"2000Rnd_762x51_Belt_T_Red"}; // Switch gun magazine to 7.62mm from 6.5mm
canEject = 1;
};
};
/*class UserActions {
class DoorL1_Open {
available = 1;
condition = "((this doorPhase 'door_L') == 0) AND Alive(this) AND driver this != player AND gunner this != player";
};
class DoorR1_Open: DoorL1_Open {
condition = "((this doorPhase 'door_R') == 0) AND Alive(this) AND driver this != player AND gunner this != player";
};
class DoorL1_Close: DoorL1_Open {
condition = "((this doorPhase 'door_L') > 0) AND Alive(this) AND driver this != player AND gunner this != player";
};
class DoorR1_Close: DoorL1_Close {
condition = "((this doorPhase 'door_R') > 0) AND Alive(this) AND driver this != player AND gunner this != player";
};
};*/
};
class Heli_Transport_02_base_F: Helicopter_Base_H {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
incomingMissileDetectionSystem = 16; // Vanilla: 24
driverCanEject = 1;
class Turrets: Turrets {
@ -153,121 +121,51 @@ class CfgVehicles {
showHMD = 1;
};
};
/*class UserActions: UserActions {
class DoorL1_Open {
available = 1;
condition = "this animationPhase ""door_back_L"" < 0.5 AND Alive(this)";
};
class DoorR1_Open: DoorL1_Open {
condition = "this animationPhase ""door_back_R"" < 0.5 AND Alive(this)";
};
class DoorL1_Close: DoorL1_Open {
condition = "this animationPhase ""door_back_L"" > 0.5 AND Alive(this)";
};
class DoorR1_Close: DoorL1_Close {
condition = "this animationPhase ""door_back_R"" > 0.5 AND Alive(this)";
};
class CargoRamp_Open: DoorL1_Open {
userActionID = 52;
displayName = CSTRING(OpenCargoRamp);
textToolTip = CSTRING(OpenCargoRamp);
position = "action_cargoramp";
radius = 3.0;
condition = "this animationPhase ""cargoramp_open"" < 0.5 AND Alive(this)";
statement = "this animateDoor ['cargoramp_open', 1]";
};
class CargoRamp_Close: DoorL1_Close {
userActionID = 55;
displayName = CSTRING(CloseCargoRamp);
textToolTip = CSTRING(CloseCargoRamp);
position = "action_cargoramp";
radius = 3.0;
condition = "this animationPhase ""cargoramp_open"" > 0.5 AND Alive(this)";
statement = "this animateDoor ['cargoramp_open', 0]";
};
};*/
};
class Heli_light_03_base_F: Helicopter_Base_F {
lockDetectionSystem = 0; // Vanilla: 12
incomingMissileDetectionSystem = 16; // Vanilla: 24
driverCanEject = 1;
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
};
};
};
class I_Heli_light_03_F: Heli_light_03_base_F {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
weapons[] = {"M134_minigun", "missiles_DAR", "CMFlareLauncher", "ACE_AIR_SAFETY" };
magazines[] = {"5000Rnd_762x51_Yellow_Belt", "24Rnd_missiles", "168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {
class MainTurret: MainTurret {
showHMD = 1;
gunBeg = "commanderview";
gunEnd = "laserstart";
memoryPointGun = "laserstart";
stabilizedInAxes = 3;
weapons[] = {"Laserdesignator_mounted"};
soundServo[] = {"", 0.01, 1, 30};
weapons[] = {"Laserdesignator_mounted"}; // Add Laser Designator
magazines[] = {"Laserbatteries"};
inGunnerMayFire = 1;
};
};
};
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {};
class I_Heli_light_03_unarmed_F: Heli_light_03_unarmed_base_F {};
class Plane_CAS_01_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_thunderbolt.hpp>
class Plane_CAS_01_base_F: Plane_Base_F {
lockDetectionSystem = 12; // Vanilla: 8
incomingMissileDetectionSystem = 16; // Vanilla: 24
};
class Plane_CAS_02_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_yak.hpp>
lockDetectionSystem = 12; // Vanilla: 8
incomingMissileDetectionSystem = 16; // Vanilla: 24
};
class Plane_Fighter_03_base_F: Plane_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
class Turrets;
#include <flightmodel_alca.hpp>
};
class UAV_01_base_F: Helicopter_Base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
lockDetectionSystem = 12; // Vanilla: 8
incomingMissileDetectionSystem = 16; // Vanilla: 24
};
class UAV_02_base_F: UAV {
weapons[] = {};
weapons[] = {}; // Remove flare launcher
magazines[] = {};
class Turrets {
class MainTurret;
};
};
class UAV_02_CAS_base_F: UAV_02_base_F {
weapons[] = {};
weapons[] = {}; // Remove flare launcher
magazines[] = {};
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class Heli_Transport_03_base_F: Helicopter_Base_H {
incomingMissileDetectionSystem = 16; // Vanilla: 24
driverCanEject = 1;
class Turrets: Turrets {
@ -276,14 +174,8 @@ class CfgVehicles {
};
};
};
class B_Heli_Transport_03_F: Heli_Transport_03_base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
};
class Heli_Transport_04_base_F: Helicopter_Base_H {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
incomingMissileDetectionSystem = 16; // Vanilla: 24
driverCanEject = 1;
class Turrets: Turrets {
@ -296,28 +188,4 @@ class CfgVehicles {
};
};
};
class O_Heli_Transport_04_bench_F: Heli_Transport_04_base_F {
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
};
};
class O_Heli_Transport_04_covered_F: Heli_Transport_04_base_F {
class Turrets: Turrets {
class CopilotTurret: CopilotTurret {
canEject = 1;
};
class LoadmasterTurret: LoadmasterTurret {
canEject = 1;
};
};
};
};

View File

@ -1,5 +1,3 @@
class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;
class CfgWeapons {
@ -18,20 +16,6 @@ class CfgWeapons {
magazineReloadTime = 0.1;
};
// Manual Switching Of Flare Mode
class SmokeLauncher;
class CMFlareLauncher: SmokeLauncher {
modes[] = {"Single", "Burst", "AIBurst"};
class Single: Mode_SemiAuto {
reloadTime = 0.1;
};
class Burst: Mode_Burst {
displayName = CSTRING(CMFlareLauncher_Burst_Name);
};
};
// bigger mag for comanche
class CannonCore;
class gatling_20mm: CannonCore {
@ -127,22 +111,4 @@ class CfgWeapons {
class medium: LowROF {};
class far: medium {};
};
class Gatling_30mm_Plane_CAS_01_F: CannonCore {
autoFire = 1;
burst = 1;
class LowROF: Mode_FullAuto {
autoFire = 0;
burst = 22; //65;
reloadTime = 0.0462; //0.0154; //0.034;
multiplier = 3;
};
class close: LowROF {};
class near: close {};
class short: close {};
class medium: close {};
class far: close {};
};
};

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
ace_aircraft
============
Changes to air weaponry, flight models and HUDs.
Changes to air weaponry, ejection and HUDs.
- Contributions by Kimi (geraldbolso1899) for HUD updates

View File

@ -1,23 +0,0 @@
acceleration = 300;
maxSpeed = 936;
irScanRangeMin = 500;
irScanRangeMax = 5000;
aileronSensitivity = 0.64;
elevatorSensitivity = 0.682;
rudderInfluence = 0.001;
aileronControlsSensitivityCoef = 3;
elevatorControlsSensitivity = 2;
rudderControlsSensitivityoef = 4;
elevatorCoef[] = {0.6, 0.73, 0.62, 0.52, 0.39, 0.33, 0.28};
aileronCoef[] = {0.5, 0.68, 0.75, 0.86, 0.92, 0.96, 1};
rudderCoef[] = {0.9, 0.75, 0.58, 0.45, 0.38, 0.35, 0.3};
envelope[] = {0, 0.06, 1.2, 3, 3.6, 3.75, 3.65, 3.45, 3.3, 2.8, 2.4, 1.9, 1.5};
angleOfIndicence = 0.0523599; //determines velocity vector behaviour, how quickly it catches up with where your nose is pointing, I think
draconicForceXCoef = 7.5; //max angle of attack, lower value gives higher aoa
draconicForceYCoef = 0.2198; //Something to do with bleed off of speed, low values seem to increase bleed off
draconicForceZCoef = 5.12; //????
draconicTorqueXCoef = 0.18; //resistance to elevator input, also impacts speed degradation
draconicTorqueYCoef = 0.000017;
thrustCoef[] = {1.3, 1.27, 1.24, 1.2, 1.17, 1.15, 1.13, 1.1, 1.06, 1, 0.94, 0.72, 0.51, 0.4, 0.25, 0};
gunAimDown = 0.029;
flapsFrictionCoef = 0.32;

View File

@ -1,21 +0,0 @@
maxSpeed = 736;
aileronSensitivity = 0.85;
elevatorSensitivity = 0.75;
rudderInfluence = 0.001;
aileronControlsSensitivityCoef = 3;
elevatorControlsSensitivity = 2;
rudderControlsSensitivityoef = 4;
elevatorCoef[] = {0.7, 0.75, 0.75, 0.65, 0.55, 0.45, 0.35};
aileronCoef[] = {0.6, 0.85, 0.88, 0.92, 0.95, 0.97, 1};
rudderCoef[] = {0.8, 0.75, 0.65, 0.5, 0.4, 0.33, 0.3};
flapsFrictionCoef = 0.35;
angleOfIndicence = 0.0523599;
draconicForceXCoef = 9.5;
draconicForceYCoef = 0.56;
draconicForceZCoef = 0.1;
draconicTorqueXCoef = 0.58;
draconicTorqueYCoef = 0.00013;
envelope[] = {0, 0, 0.75, 2.4, 3.6, 3.8, 3.7, 3.2, 2.2, 1.7, 0.9};
thrustCoef[] = {1, 1.2, 1.3, 1.25, 1.06, 1.01, 1, 0.92, 0.75, 0.65, 0.5, 0.25, 0};
acceleration = 265;
landingSpeed = 220;

View File

@ -1,20 +0,0 @@
maxSpeed = 1059;
acceleration = 300;
aileronSensitivity = 0.635;
elevatorSensitivity = 0.814;
rudderInfluence = 0.001;
aileronControlsSensitivityCoef = 3;
elevatorControlsSensitivity = 2;
rudderControlsSensitivityoef = 4;
elevatorCoef[] = {0.6, 0.76, 0.7, 0.65, 0.58, 0.47, 0.43};
aileronCoef[] = {0.5, 0.85, 0.87, 0.89, 0.92, 0.95, 1};
rudderCoef[] = {0.8, 0.7, 0.6, 0.5, 0.4, 0.32, 0.27};
angleOfIndicence = 0.0523599;
draconicForceXCoef = 7.6;
draconicForceYCoef = 0.75;
draconicForceZCoef = 0.085;
draconicTorqueXCoef = 0.815;
draconicTorqueYCoef = 0.000152;
envelope[] = {0, 0.446, 1.5, 3.9, 5.2, 4.8, 4.2, 3.5, 2, 1, 0.5};
thrustCoef[] = {1, 1.2, 1.7, 1.7, 1.65, 1.54, 1.32, 1.1, 0.95, 0.75, 0.5, 0.35, 0};
flapsFrictionCoef = 0.32;

View File

@ -1,20 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Aircraft">
<Key ID="STR_ACE_Aircraft_CMFlareLauncher_Burst_Name">
<English>Burst</English>
<German>Feuerstoß</German>
<Spanish>Ráfaga</Spanish>
<Polish>Seria</Polish>
<Czech>Dávka</Czech>
<French>Rafale</French>
<Russian>Очередь</Russian>
<Hungarian>Sorozat</Hungarian>
<Portuguese>Rajada</Portuguese>
<Italian>Raffica</Italian>
<Japanese>バースト</Japanese>
<Korean>점사</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_gatling_20mm_Name">
<English>XM301</English>
<German>XM301</German>

37
addons/cargo/CfgEden.hpp Normal file
View File

@ -0,0 +1,37 @@
class Cfg3DEN {
class Object {
class AttributeCategories {
class ace_attributes {
class Attributes {
class GVAR(space) {
displayName = CSTRING(space_edenName);
tooltip = CSTRING(space_edenDesc);
property = QGVAR(space);
control = "Edit";
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace););
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0));
validate = "number";
condition = "objectHasInventoryCargo";
typeName = "NUMBER";
};
class GVAR(size) {
displayName = CSTRING(size_edenName);
tooltip = CSTRING(size_edenDesc);
property = QGVAR(size);
control = "Edit";
// Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!)
expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize););
defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1));
validate = "number";
condition = "1-objectBrain";
typeName = "NUMBER";
};
};
};
};
};
};

View File

@ -24,52 +24,3 @@ class Extended_Killed_EventHandlers {
};
};
};
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
class Extended_InitPost_EventHandlers {
class ThingX {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Land_PaperBox_closed_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class PlasticCase_01_base_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class LandVehicle {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Air {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Ship_F {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class ACE_ConcertinaWireCoil {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class Land_PortableLight_single_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class StaticWeapon {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
};

View File

@ -285,7 +285,7 @@ class CfgVehicles {
GVAR(space) = 4;
GVAR(hasCargo) = 1;
};
// autonomus
class UAV_01_base_F: Helicopter_Base_F {
GVAR(space) = 0;
@ -346,7 +346,7 @@ class CfgVehicles {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
GVAR(size) = 2; // 1 = small, 2 = large

View File

@ -1,9 +1,8 @@
PREP(addCargoItem);
PREP(canLoad);
PREP(addCargoVehiclesActions);
PREP(canLoadItemIn);
PREP(canUnloadItem);
PREP(findNearestVehicle);
PREP(getCargoSpaceLeft);
PREP(getSizeItem);
PREP(handleDestroyed);
@ -15,6 +14,8 @@ PREP(moduleMakeLoadable);
PREP(moduleSettings);
PREP(onMenuOpen);
PREP(paradropItem);
PREP(setSize);
PREP(setSpace);
PREP(startLoadIn);
PREP(startUnload);
PREP(unloadItem);

View File

@ -51,3 +51,28 @@
_item hideObjectGlobal false;
_item setPosASL (AGLtoASL _emptyPosAGL);
}] call CBA_fnc_addEventHandler;
// Private events to handle adding actions globally via public functions
[QGVAR(initObject), DFUNC(initObject)] call CBA_fnc_addEventHandler;
[QGVAR(initVehicle), DFUNC(initVehicle)] call CBA_fnc_addEventHandler;
// Add all the vehicle init EHs (require initPost for set/get variables)
["LandVehicle", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler;
["Air", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler;
["Ship_F", "initPost", DFUNC(initVehicle), nil, nil, true] call CBA_fnc_addClassEventHandler;
// Add all the object init EHs
["StaticWeapon", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler;
["Land_PortableLight_single_F", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler;
["ACE_ConcertinaWireCoil", "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler;
// Add all the vehicle/object init EHs
["ThingX", "initPost", {
_this call DFUNC(initObject); _this call DFUNC(initVehicle);
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
["Land_PaperBox_closed_F", "initPost", {
_this call DFUNC(initObject); _this call DFUNC(initVehicle);
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
["PlasticCase_01_base_F", "initPost", {
_this call DFUNC(initObject); _this call DFUNC(initVehicle);
}, nil, nil, true] call CBA_fnc_addClassEventHandler;

View File

@ -15,6 +15,7 @@ class CfgPatches {
};
#include "ACE_Settings.hpp"
#include "CfgEden.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "menu.hpp"

View File

@ -0,0 +1,45 @@
/*
* Author: Dystopian
* Create actions for nearest vehicles with cargo.
*
* Arguments:
* 0: Target <OBJECT>
* 1: Player <OBJECT>
*
* Return Value:
* Children actions <ARRAY>
*
* Example:
* [target, player] call ace_cargo_fnc_addCargoVehiclesActions
*
* Public: No
*/
#include "script_component.hpp"
params ["_target", "_player"];
private _statement = {
params ["_target", "_player", "_params"];
_params params ["_vehicle"];
[_player, _target, _vehicle] call FUNC(startLoadIn);
};
private _actions = [];
{
private _config = configFile >> "CfgVehicles" >> typeOf _x;
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1;
if ((_hasCargoPublic || _hasCargoConfig) && {_x != _target}) then {
private _name = getText (_config >> "displayName");
private _ownerName = [_x, true] call EFUNC(common,getName);
if ("" != _ownerName) then {
_name = format ["%1 (%2)", _name, _ownerName];
};
private _icon = (getText (_config >> "icon")) call BIS_fnc_textureVehicleIcon;
private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
} forEach (nearestObjects [_player, CARGO_VEHICLE_CLASSES, MAX_LOAD_DISTANCE]);
_actions

View File

@ -1,36 +0,0 @@
/*
* Author: Glowbal
* Check if player can load an item into the nearest vehicle.
*
* Arguments:
* 0: Player <OBJECT>
* 1: Object to load <OBJECT>
*
* Return Value:
* Can load <BOOL>
*
* Example:
* [player, object] call ace_cargo_fnc_canLoad
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_object"];
TRACE_2("params",_player,_object);
if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false};
private _nearestVehicle = [_player, _object] call FUNC(findNearestVehicle);
if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then {
{
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x};
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
};
if (isNull _nearestVehicle) exitWith {false};
if ((locked _nearestVehicle) >= 2) exitWith {false};
[_object, _nearestVehicle] call FUNC(canLoadItemIn)

View File

@ -1,41 +0,0 @@
/*
* Author: Glowbal
* Get nearest vehicle from unit that is not excluded, priority: Car-Air-Tank-Ship.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Object to exclude <OBJECT>
*
* Return Value:
* Vehicle in Distance <OBJECT>
*
* Example:
* [unit, object] call ace_cargo_fnc_findNearestVehicle
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit","_object"];
private _loadCar = nearestObjects [_unit, ["car"], MAX_LOAD_DISTANCE];
_loadCar deleteAt (_loadCar find _object);
if !(_loadCar isEqualTo []) exitWith {_loadCar select 0};
private _loadHelicopter = nearestObjects [_unit, ["air"], MAX_LOAD_DISTANCE];
_loadHelicopter deleteAt (_loadHelicopter find _object);
if !(_loadHelicopter isEqualTo []) exitWith {_loadHelicopter select 0};
private _loadTank = nearestObjects [_unit, ["tank"], MAX_LOAD_DISTANCE];
_loadTank deleteAt (_loadTank find _object);
if !(_loadTank isEqualTo []) exitWith {_loadTank select 0};
private _loadShip = nearestObjects [_unit, ["ship"], MAX_LOAD_DISTANCE];
_loadShip deleteAt (_loadShip find _object);;
if !(_loadShip isEqualTo []) exitWith {_loadShip select 0};
private _loadContainer = nearestObjects [_unit, ["Cargo_base_F"], MAX_LOAD_DISTANCE];
_loadContainer deleteAt (_loadContainer find _object);
if !(_loadContainer isEqualTo []) exitWith {_loadContainer select 0};
objNull

View File

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

View File

@ -1,5 +1,5 @@
/*
* Author: Glowbal
* Author: Glowbal, SilentSpike
* Get the cargo size of an object.
*
* Arguments:
@ -17,23 +17,13 @@
params ["_item"];
scopeName "return";
private _isVirtual = (_item isEqualType "");
private _itemClass = if (_isVirtual) then {_item} else {typeOf _item};
private _config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
if (_isVirtual) then {
if (isNumber _config) then {
(getNumber _config) breakOut "return";
};
// Virtual items are much easier to deal with
if (_item isEqualType "") then {
CARGO_SIZE(_item)
} else {
if (!isNil {_item getVariable QGVAR(size)}) then {
(_item getVariable QGVAR(size)) breakOut "return";
};
if (isNumber _config) then {
(getNumber _config) breakOut "return";
if (isNil {_item getVariable QGVAR(size)}) then {
CARGO_SIZE(typeOf _item)
} else {
_item getVariable QGVAR(size)
};
};
-1

View File

@ -1,5 +1,5 @@
/*
* Author: Glowbal
* Author: Glowbal, SilentSpike
* Initializes variables for loadable objects. Called from init EH.
*
* Arguments:
@ -19,20 +19,44 @@ params ["_object"];
private _type = typeOf _object;
TRACE_2("params",_object,_type);
if ((_object getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad))]) != 1) exitWith {};
// If object had size given to it via eden/public then override config canLoad setting
private _canLoadPublic = _object getVariable [QGVAR(canLoad), false];
private _canLoadConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad)) == 1;
// do nothing if the class is already initialized
// Nothing to do here if object can't be loaded
if !(_canLoadConfig || _canLoadPublic) exitWith {};
// Servers and HCs do not require action menus (beyond this point)
if !(hasInterface) exitWith {};
// Unnecessary to add actions to an object class that's already got them
if (_type in GVAR(initializedItemClasses)) exitWith {};
GVAR(initializedItemClasses) pushBack _type;
if (_object getVariable [QGVAR(initObject),false]) exitWith {};
TRACE_1("Adding load cargo action to class", _type);
// Objects given size via eden have their actions added to the object
// So this function may run for multiple of the same class in that case
if (_canLoadConfig) then {
GVAR(initializedItemClasses) pushBack _type;
TRACE_1("Adding load cargo action to class", _type);
} else {
_object setVariable [QGVAR(initObject),true];
TRACE_1("Adding load cargo action to object", _object);
};
// Vehicles with passengers inside are prevented from being loaded in `fnc_canLoadItemIn`
private _condition = {
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(enable) &&
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) == 1} &&
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad)) == 1])} &&
{locked _target < 2} &&
{alive _target} &&
{[_player, _target, []] call EFUNC(common,canInteractWith)}
{[_player, _target, []] call EFUNC(common,canInteractWith)} &&
{0 < {
private _type = typeOf _x;
private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false];
private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1;
(_hasCargoPublic || _hasCargoConfig) && {_x != _target}
} count (nearestObjects [_player, CARGO_VEHICLE_CLASSES, MAX_LOAD_DISTANCE])}
};
private _statement = {
params ["_target", "_player"];
@ -41,6 +65,10 @@ private _statement = {
private _text = localize LSTRING(loadObject);
private _icon = QPATHTOF(UI\Icon_load.paa);
private _action = [QGVAR(load), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
private _action = [QGVAR(load), _text, _icon, _statement, _condition, {call FUNC(addCargoVehiclesActions)}] call EFUNC(interact_menu,createAction);
if (_canLoadConfig) then {
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
} else {
[_object, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject);
};

View File

@ -20,8 +20,14 @@ TRACE_1("params", _vehicle);
private _type = typeOf _vehicle;
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
// If vehicle had space given to it via eden/public then override config hasCargo setting
private _hasCargoPublic = _vehicle getVariable [QGVAR(hasCargo), false];
private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1;
// Nothing to do here if vehicle has no cargo space
if !(_hasCargoConfig || _hasCargoPublic) exitWith {};
// Vehicle can have default ace cargo in its config
if (isServer) then {
{
if (isClass _x) then {
@ -33,19 +39,33 @@ if (isServer) then {
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
};
// do nothing if the class is already initialized
// Servers and HCs do not require action menus (beyond this point)
if !(hasInterface) exitWith {};
// Unnecessary to add actions to a vehicle class that's already got them
if (_type in GVAR(initializedVehicleClasses)) exitWith {};
// set class as initialized
GVAR(initializedVehicleClasses) pushBack _type;
if (_vehicle getVariable [QGVAR(initVehicle),false]) exitWith {};
if (!hasInterface) exitWith {};
TRACE_1("Adding unload cargo action to class", _type);
// Vehicles given cargo via eden have their actions added to the object
// So this function may run for multiple of the same class in that case
if (_hasCargoConfig) then {
GVAR(initializedVehicleClasses) pushBack _type;
TRACE_1("Adding unload cargo action to class", _type);
} else {
_vehicle setVariable [QGVAR(initVehicle),true];
TRACE_1("Adding unload cargo action to object", _vehicle);
};
private _condition = {
GVAR(enable) && {locked _target < 2} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)}
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(enable) &&
{(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} &&
{locked _target < 2} &&
{alive _target} &&
{[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)}
};
private _statement = {
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(interactionVehicle) = _target;
GVAR(interactionParadrop) = false;
createDialog QGVAR(menu);
@ -54,11 +74,16 @@ private _text = localize LSTRING(openMenu);
private _icon = "";
private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
if (_hasCargoConfig) then {
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);
} else {
[_vehicle, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject);
};
// Add the paradrop self interaction for planes and helicopters
if (_vehicle isKindOf "Air") then {
private _condition = {
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)} && {
private _turretPath = _player call CBA_fnc_turretPath;
(_player == (driver _target)) || // pilot
@ -66,6 +91,7 @@ if (_vehicle isKindOf "Air") then {
{_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config
};
private _statement = {
//IGNORE_PRIVATE_WARNING ["_target", "_player"];
GVAR(interactionVehicle) = _target;
GVAR(interactionParadrop) = true;
createDialog QGVAR(menu);
@ -74,5 +100,9 @@ if (_vehicle isKindOf "Air") then {
private _icon = "";
private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToClass); // self action on the vehicle
if (_hasCargoConfig) then {
[_type, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToClass); // self action on the vehicle
} else {
[_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
};
};

View File

@ -17,6 +17,13 @@
*/
#include "script_component.hpp"
// Only run this after the settings are initialized
if !(EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(makeLoadable), _this];
};
ACE_DEPRECATED(QFUNC(makeLoadable),"3.12.0",QFUNC(setSize));
params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]];
TRACE_3("params",_object,_canLoad,_setSize);
@ -25,7 +32,7 @@ private _type = typeOf _object;
private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad));
private _curSize = [_object] call FUNC(getSizeItem);
_canLoad = [0, 1] select _canLoad; //convert true/false to scalar
_canLoad = [0, 1] select _canLoad; // Convert true/false to scalar
if ((_canLoad == 1) && {_setSize <= 0}) exitWith {
ERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable");
@ -33,7 +40,7 @@ if ((_canLoad == 1) && {_setSize <= 0}) exitWith {
TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad);
if (_canLoad != _cfgCanLoad) then {
_object setVariable [QGVAR(canLoad), _canLoad];
_object setVariable [QGVAR(canLoad), _canLoad == 1];
};
TRACE_2("setVar if different from config",_setSize,_curSize);

View File

@ -20,6 +20,8 @@
params ["_logic", "_objects", "_activated"];
TRACE_3("params",_logic,_objects,_activated);
ACE_DEPRECATED(QFUNC(moduleMakeLoadable),"3.12.0","Eden editor object attributes");
if ((isNull _logic) || {!_activated}) exitWith {};
if (_objects isEqualTo []) exitWith {
WARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic);

View File

@ -32,9 +32,9 @@ private _itemSize = [_item] call FUNC(getSizeItem);
_vehicle setVariable [QGVAR(space), (_cargoSpace + _itemSize), true];
(boundingBoxReal _vehicle) params ["_bb1", "_bb2"];
private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 3; // 3 meters behind max bounding box
private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 4; // 4 meters behind max bounding box
TRACE_1("",_distBehind);
private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -1];
private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -2];
private _itemObject = if (_item isEqualType objNull) then {
@ -49,7 +49,7 @@ private _itemObject = if (_item isEqualType objNull) then {
_newItem
};
_itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply 10));
_itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5));
// open parachute and ir light effect
[{

View File

@ -0,0 +1,56 @@
/*
* Author: SilentSpike
* Set the cargo size of any object. Has global effect.
* Adds the load action menu if necessary.
* Negative size makes unloadable.
*
* Arguments:
* 0: Object <OBJECT>
* 1: Cargo size <NUMBER>
*
* Return Value:
* None
*
* Example:
* [cursorTarget, 3] call ace_cargo_fnc_setSize
*
* Public: Yes
*/
#include "script_component.hpp"
// Only run this after the settings are initialized
if !(EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSize), _this];
};
params [
["_object",objNull,[objNull]],
["_size",nil,[0]] // Default can't be a number since all are valid
];
TRACE_2("setSize",_object,_size);
// Nothing to do here
if (
(isNil "_size") ||
{isNull _object} ||
{_size == _object getVariable [QGVAR(size), CARGO_SIZE(typeOf _object)]}
) exitWith {};
// Apply new size globally
// Necessary to update value, even if unloadable, as API could be used again
_object setVariable [QGVAR(canLoad), _size >= 0, true];
_object setVariable [QGVAR(size), _size, true];
// If no size no need for load action
if (_size < 0) exitWith {};
// If an existing ID is present, load action has already been added globally
private _jipID = _object getVariable QGVAR(setSize_jipID);
// Actions should be added to all future JIP players too
if (isNil "_jipID") then {
_jipID = [QGVAR(initObject), [_object]] call CBA_fnc_globalEventJIP;
// Store the ID for any future calls to this function
_object setVariable [QGVAR(setSize_jipID), _jipID, true];
};

View File

@ -0,0 +1,55 @@
/*
* Author: SilentSpike
* Set the cargo space of any object. Has global effect.
* Adds the cargo action menu if necessary.
*
* Arguments:
* 0: Object <OBJECT>
* 1: Cargo space <NUMBER>
*
* Return Value:
* None
*
* Example:
* [vehicle player, 20] call ace_cargo_fnc_setSpace
*
* Public: Yes
*/
#include "script_component.hpp"
// Only run this after the settings are initialized
if !(EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSpace), _this];
};
params [
["_vehicle",objNull,[objNull]],
["_space",nil,[0]] // Default can't be a number since all are valid
];
TRACE_2("setSpace",_vehicle,_size);
// Nothing to do here
if (
(isNil "_space") ||
{isNull _vehicle} ||
{_space == _vehicle getVariable [QGVAR(space), CARGO_SPACE(typeOf _vehicle)]}
) exitWith {};
// Apply new space globally
// Necessary to update value, even if no space, as API could be used again
_vehicle setVariable [QGVAR(hasCargo), _space > 0, true];
_vehicle setVariable [QGVAR(space), _space, true];
// If no cargo space no need for cargo menu
if (_space <= 0) exitWith {};
// If an existing ID is present, cargo menu has already been added globally
private _jipID = _vehicle getVariable QGVAR(setSpace_jipID);
// Cargo menu should be added to all future JIP players too
if (isNil "_jipID") then {
_jipID = [QGVAR(initVehicle), [_vehicle]] call CBA_fnc_globalEventJIP;
// Store the ID for any future calls to this function
_vehicle setVariable [QGVAR(setSpace_jipID), _jipID, true];
};

View File

@ -5,6 +5,7 @@
* Arguments:
* 0: Player <OBJECT>
* 1: Object <OBJECT>
* 2: Vehicle <OBJECT> (Optional)
*
* Return Value:
* Load ProgressBar Started <BOOL>
@ -16,15 +17,14 @@
*/
#include "script_component.hpp"
params ["_player", "_object"];
TRACE_2("params",_player,_object);
params ["_player", "_object", ["_cargoVehicle", objNull]];
TRACE_3("params",_player,_object,_cargoVehicle);
private _vehicle = [_player, _object] call FUNC(findNearestVehicle);
if ((isNull _vehicle) || {_vehicle isKindOf "Cargo_Base_F"}) then {
private _vehicle = _cargoVehicle;
if (isNull _vehicle) then {
{
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
} forEach (nearestObjects [_player, CARGO_VEHICLE_CLASSES, MAX_LOAD_DISTANCE]);
};
if (isNull _vehicle) exitWith {

View File

@ -17,3 +17,11 @@
#include "\z\ace\addons\main\script_macros.hpp"
#define MAX_LOAD_DISTANCE 10
#define CARGO_VEHICLE_CLASSES ["Car", "Air", "Tank", "Ship", "Cargo_base_F", "Land_PaperBox_closed_F"]
#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default})
// Default cargo size is -1 as 0 is a valid size
#define CARGO_SIZE(classname) GET_NUMBER(configFile >> "CfgVehicles" >> (classname) >> QGVAR(size),-1)
#define CARGO_SPACE(classname) GET_NUMBER(configFile >> "CfgVehicles" >> (classname) >> QGVAR(space),0)

View File

@ -237,13 +237,26 @@
<Japanese>オブジェクトの大きさ</Japanese>
<Korean>물체 크기</Korean>
</Key>
<Key ID="STR_ACE_Cargo_space_edenName">
<English>Cargo Space</English>
</Key>
<Key ID="STR_ACE_Cargo_space_edenDesc">
<English>The cargo space available in this vehicle/container</English>
</Key>
<Key ID="STR_ACE_Cargo_size_edenName">
<English>Cargo Size</English>
</Key>
<Key ID="STR_ACE_Cargo_size_edenDesc">
<English>The cargo space required to hold this object (-1 for unloadable)</English>
</Key>
<Key ID="STR_ACE_Cargo_paradropButton">
<English>Airdrop</English>
<German>Türlast</German>
<Japanese>空中投下</Japanese>
<Polish>Zrzut zaopatrzenia</Polish>
<Korean>공중 투하</Korean>
<French>Largage aérien</French>
<French>Largage aérien</French>
<Italian>Lancio Aereo</Italian>
</Key>
<Key ID="STR_ACE_Cargo_unlevelFlightWarning">
<English>Unlevel Flight</English>
@ -251,15 +264,20 @@
<Japanese>機体が水平ではありません</Japanese>
<Polish>Nierówny lot</Polish>
<Korean>기체가 수평이 아닙니다</Korean>
<French>Rétablir l'assiette</French>
<French>Rétablir l'assiette</French>
<Italian>Volo non Livellato</Italian>
</Key>
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent">
<English>Paradrop Time Coffecient</English>
<Japanese>空中投下までの時間係数</Japanese>
<Italian>Coefficente Tempo Lancio Paracadute</Italian>
<French>Coefficient Temps de largage de cargaison</French>
</Key>
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent_description">
<English>Modifier for how long it takes to paradrop a cargo item.</English>
<Japanese>カーゴ アイテムを空中投下するまでの時間を変更します。</Japanese>
<Italian>Modificato per quanto tempo ci impiega a paracadutare un oggetto cargo.</Italian>
<French>Modifier le temps qu'il faut pour larguer la cargaison.</French>
</Key>
</Package>
</Project>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Chemlights">
<Key ID="STR_ACE_Chemlights_Action_Chemlights">
@ -8,6 +8,7 @@
<German>Knicklichter</German>
<Korean>켐라이트</Korean>
<French>Cyalumes</French>
<Italian>Luce chimica</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Action_Prepare">
<English>Prepare %1</English>
@ -16,6 +17,7 @@
<German>%1 vorbereiten</German>
<Korean>%1 준비</Korean>
<French>Prépare %1</French>
<Italian>Prepara %1</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Action_Prepare_Done">
<English>%1&lt;br/&gt;Prepared</English>
@ -24,6 +26,7 @@
<German>%1&lt;br/&gt;vorbereitet</German>
<Korean>%1&lt;br/&gt;준비됨</Korean>
<French>%1&lt;br/&gt;prêt</French>
<Italian>%1 &lt;br/&gt; Preparata</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Inventory_Full">
<English>No inventory space</English>
@ -33,7 +36,7 @@
<French>Pas de place</French>
<Czech>Nedostatek místa v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Non hai più spazio</Italian>
<Italian>Nessuno spazio nell'inventario</Italian>
<Hungarian>Nincs több hely</Hungarian>
<Russian>В инвентаре нет места</Russian>
<Japanese>インベントリに空きがありません</Japanese>
@ -46,6 +49,7 @@
<German>[ACE] Knicklichter</German>
<Korean>[ACE] 켐라이트</Korean>
<French>[ACE] Cyalume</French>
<Italian>[ACE] Luci chimiche</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Orange_DisplayName">
<English>Chemlight (Orange)</English>
@ -54,6 +58,7 @@
<German>Knicklicht (orange)</German>
<Korean>켐라이트 (주황)</Korean>
<French>Cyalume (orange)</French>
<Italian>Luce chimica (Arancione)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Orange_DisplayNameShort">
<English>Orange Light</English>
@ -62,6 +67,7 @@
<German>Oranges Knicklicht</German>
<Korean>주황색</Korean>
<French>Lum. orange </French>
<Italian>Luce Arancione</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Orange_DescriptionShort">
<English>Type: Light - Orange&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -70,6 +76,7 @@
<German>Typ: Licht - orange&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류:밝은 오렌지&lt;br /&gt;수량: 1&lt;br /&gt;사용처: 손</Korean>
<French>Type: Lumière - orange&lt;br /&gt;Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Arancione&lt;br/&gt;Rimanenti: 1&lt;br/&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_White_DisplayName">
<English>Chemlight (White)</English>
@ -78,6 +85,7 @@
<German>Knicklicht (weiß)</German>
<Korean>켐라이트 (하양)</Korean>
<French>Cyalume (blanc)</French>
<Italian>Luce chimica (Bianca)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_White_DisplayNameShort">
<English>White Light</English>
@ -86,6 +94,7 @@
<German>Weißes Knicklicht</German>
<Korean>하얀색</Korean>
<French>Lum. blanche </French>
<Italian>Luce Bianca</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_White_DescriptionShort">
<English>Type: Light - White&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -94,6 +103,7 @@
<German>Typ: Licht - weiß&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류:하얀색&lt;br /&gt;수량: 1&lt;br /&gt;사용처: 손</Korean>
<French>Type: Lumière - blanche&lt;br /&gt;Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Bianca&lt;br/&gt;Rimanenti: 1&lt;br/&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiRed_DisplayName">
<English>Chemlight (Hi Red)</English>
@ -102,6 +112,7 @@
<German>Knicklicht (rot, hell)</German>
<Korean>켐라이트 (밝은 빨간색)</Korean>
<French>Cyalume (Hi rouge)</French>
<Italian>Luce chimica (Hi Rossa)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiRed_DisplayNameShort">
<English>Red Hi Light</English>
@ -110,6 +121,7 @@
<German>Helles, rotes Knicklicht</German>
<Korean>밝은 빨간색</Korean>
<French>Lum. rouge haute intensité</French>
<Italian>Luce Hi Rossa</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiRed_DescriptionShort">
<English>Type: Light - Red Hi (5 minute)&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -118,6 +130,7 @@
<German>Typ: Licht - rot, hell (5 Minuten)&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류: 밝은 빨간색 (5분)&lt;br /&gt;수량: 1&lt;br /&gt;사용처: 손</Korean>
<French>Type: Lumière - rouge Hi (5 minutes)&lt;br /&gt;Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Rossa Hi (5 minuti)&lt;br /&gt;Rimanenti: 1&lt;br/&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiYellow_DisplayName">
<English>Chemlight (Hi Yellow)</English>
@ -126,6 +139,7 @@
<German>Knicklicht (gelb, hell)</German>
<Korean>켐라이트 (밝은 노란색)</Korean>
<French>Cyalume (Hi jaune)</French>
<Italian>Luce chimica (Hi Gialla)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiYellow_DisplayNameShort">
<English>Yellow Hi Light</English>
@ -134,6 +148,7 @@
<German>Helles, gelbes Knicklicht</German>
<Korean>밝은 노란색</Korean>
<French>Lum. jaune haute intensité</French>
<Italian>Luce Hi Gialla</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiYellow_DescriptionShort">
<English>Type: Light - Yellow Hi (5 minute)&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -142,6 +157,7 @@
<German>Typ: Licht - gelb, hell (5 Minuten)&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류:밝은 노란색 (5분)&lt;br /&gt;수량: 1&lt;br /&gt;사용처: Hand</Korean>
<French>Type: Lumière - Jaune Hi (5 minutes)Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Gialla Hi (5 minuti)&lt;br /&gt;Rimanenti: 1&lt;br/&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiOrange_DisplayName">
<English>Chemlight (Hi Orange)</English>
@ -150,6 +166,7 @@
<German>Knicklicht (orange, hell)</German>
<Korean>켐라이트 (밝은 주황색)</Korean>
<French>Cyalume (Hi orange)</French>
<Italian>Luce chimica (Hi Arancione)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiOrange_DisplayNameShort">
<English>Orange Hi Light</English>
@ -158,6 +175,7 @@
<German>Helles, oranges Knicklicht</German>
<Korean>밝은 주황색</Korean>
<French>Lum. orange haute intensité</French>
<Italian>Luce Hi Arancione</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiOrange_DescriptionShort">
<English>Type: Light - Orange Hi (5 minute)&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -166,6 +184,7 @@
<German>Typ: Licht - orange, hell (5 Minuten)&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류: 밝은 주황색 (5분)&lt;br /&gt;수량: 1&lt;br /&gt;사용처: 손</Korean>
<French>Type: Lumière - orange Hi (5 minutes)&lt;br /&gt;Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Arancione Hi (5 minuti)&lt;br /&gt;Rimanenti: 1&lt;br/&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiWhite_DisplayName">
<English>Chemlight (Hi White)</English>
@ -174,6 +193,7 @@
<German>Knicklicht (weiß, hell)</German>
<Korean>켐라이트 (밝은 하얀색)</Korean>
<French>Cyalume (Hi blanc)</French>
<Italian>Luce chimica (Hi Bianca)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiWhite_DisplayNameShort">
<English>White Hi Light</English>
@ -182,6 +202,7 @@
<German>Helles, weißes Knicklicht</German>
<Korean>밝은 하얀색</Korean>
<French>Lum. blanche haute intensité</French>
<Italian>Luce Hi Bianca</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_HiWhite_DescriptionShort">
<English>Type: Light - White Hi (5 minute)&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -190,6 +211,7 @@
<German>Typ: Licht - weiß, hell (5 Minuten)&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류: 밝은 하얀색 (5분)&lt;br /&gt;수량: 1&lt;br /&gt;사용처: 손</Korean>
<French>Type: Lumière - blanche Hi (5 minutes)&lt;br /&gt;Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Bianca Hi (5 minuti)&lt;br /&gt;Rimanenti: 1&lt;br/&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_IR_DisplayName">
<English>Chemlight (IR)</English>
@ -198,6 +220,7 @@
<German>Knicklicht (IR)</German>
<Korean>켐라이트 (적외선)</Korean>
<French>Cyalume (IR)</French>
<Italian>Luce chimica (IR)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_IR_DisplayNameShort">
<English>IR Light</English>
@ -206,6 +229,7 @@
<German>IR-Knicklicht</German>
<Korean>적외선 켐라이트</Korean>
<French>Lumière IR</French>
<Italian>Luce IR</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_IR_DescriptionShort">
<English>Type: Light - Infrared&lt;br /&gt;Rounds: 1&lt;br /&gt;Used in: Hand</English>
@ -214,6 +238,7 @@
<German>Typ: Licht - infrarot&lt;br /&gt;Anzahl: 1&lt;br /&gt;Benutzt in: Hand</German>
<Korean>종류: 적외선&lt;br /&gt;수량: 1&lt;br /&gt;사용처: 손</Korean>
<French>Type: Lumière - infrarouge&lt;br /&gt;Nbre: 1&lt;br /&gt; À main</French>
<Italian>Tipo: Luce - Infrarossi&lt;br /&gt;Usata in: Mano</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Empty_DisplayName">
<English>Chemlight Shield (Empty)</English>
@ -222,6 +247,7 @@
<German>Knicklicht-Abschirmung (leer)</German>
<Korean>켐라이트 쉴드 (비어있음)</Korean>
<French>Étui cyalume (vide)</French>
<Italian>Scudo Luce chimica (Vuoto)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Empty_DescriptionShort">
<English>Shield for chemlights. Combine with chemlight to prepare reading light.</English>
@ -230,6 +256,7 @@
<German>Abschirmung für Knicklichter. Mit Knicklicht kombinieren, um Leselicht zu erhalten.</German>
<Korean>켐라이트를 위한 가림막입니다. 켐라이트와 같이 사용하여 읽을 때 씁니다.</Korean>
<French>Étui pour cyalume. Combiné avec un cyalume pour obtennir un lampe de lecture.</French>
<Italian>Scudo per luci chimiche. Combina con una luce chimica per una luce da lettura.</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Green_DisplayName">
<English>Chemlight Shield (Green)</English>
@ -238,6 +265,7 @@
<German>Knicklicht-Abschirmung (grün)</German>
<Korean>켐라이트 쉴드 (초록)</Korean>
<French>Étui cyalume (vert)</French>
<Italian>Scudo Luce Chimica (Verde)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Green_DescriptionShort">
<English>Green reading light.</English>
@ -246,6 +274,7 @@
<German>Grünes Leselicht.</German>
<Korean>초록빛 조명</Korean>
<French>Lampe d'orientation verte.</French>
<Italian>Luce da lettura Verde.</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Red_DisplayName">
<English>Chemlight Shield (Red)</English>
@ -254,6 +283,7 @@
<German>Knicklicht-Abschirmung (rot)</German>
<Korean>켐라이트 쉴드 (빨강)</Korean>
<French>Étui cyalume (rouge)</French>
<Italian>Scudo Luce Chimica (Rossa)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Red_DescriptionShort">
<English>Red reading light.</English>
@ -262,6 +292,7 @@
<German>Rotes Leselicht.</German>
<Korean>빨간색 조명</Korean>
<French>Lampe d'orientation rouge.</French>
<Italian>Luce da lettura Rossa.</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Blue_DisplayName">
<English>Chemlight Shield (Blue)</English>
@ -270,6 +301,7 @@
<German>Knicklicht-Abschirmung (blau)</German>
<Korean>켐라이트 쉴드 (파랑)</Korean>
<French>Étui cyalume (bleu)</French>
<Italian>Scudo Luce Chimica (Blu)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Blue_DescriptionShort">
<English>Blue reading light.</English>
@ -278,6 +310,7 @@
<German>Blaues Leselicht.</German>
<Korean>파란색 조명</Korean>
<French>Lampe d'orientation bleue.</French>
<Italian>Luce da lettura Blu.</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Yellow_DisplayName">
<English>Chemlight Shield (Yellow)</English>
@ -286,6 +319,7 @@
<German>Knicklicht-Abschirmung (gelb)</German>
<Korean>켐라이트 쉴드 (노랑)</Korean>
<French>Étui cyalume (jaune)</French>
<Italian>Scudo Luce Chimica (Gialla)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Yellow_DescriptionShort">
<English>Yellow reading light.</English>
@ -294,6 +328,7 @@
<German>Gelbes Leselicht.</German>
<Korean>노란색 조명</Korean>
<French>Lampe d'orientation jaune.</French>
<Italian>Luce da lettura Gialla.</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Orange_DisplayName">
<English>Chemlight Shield (Orange)</English>
@ -302,6 +337,7 @@
<German>Knicklicht-Abschirmung (orange)</German>
<Korean>켐라이트 쉴드 (주황)</Korean>
<French>Étui cyalume (orange)</French>
<Italian>Scudo Luce Chimica (Arancione)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_Orange_DescriptionShort">
<English>Orange reading light.</English>
@ -310,6 +346,7 @@
<German>Oranges Leselicht.</German>
<Korean>주황색 조명</Korean>
<French>Lampe d'orientation orange.</French>
<Italian>Luce da lettura Arancione.</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_White_DisplayName">
<English>Chemlight Shield (White)</English>
@ -318,6 +355,7 @@
<German>Knicklicht-Abschirmung (weiß)</German>
<Korean>켐라이트 쉴드 (하양)</Korean>
<French>Étui cyalume (blanc)</French>
<Italian>Scudo Luce Chimica (Bianca)</Italian>
</Key>
<Key ID="STR_ACE_Chemlights_Shield_White_DescriptionShort">
<English>White reading light.</English>
@ -326,6 +364,7 @@
<German>Weißes Leselicht.</German>
<Korean>주황색 조명</Korean>
<French>Lampe d'orientation blanche.</French>
<Italian>Luce da lettura Bianca.</Italian>
</Key>
</Package>
</Project>

View File

@ -37,6 +37,7 @@ PREP(displayTextPicture);
PREP(displayTextStructured);
PREP(doAnimation);
PREP(doGesture);
PREP(dummy);
PREP(dropBackpack);
PREP(endRadioTransmission);
PREP(eraseCache);

View File

@ -15,6 +15,7 @@
params ["_client"];
[GVAR(syncedEvents), {
//IGNORE_PRIVATE_WARNING ["_key", "_value"];
_value params ["", "_eventLog"];
["ACEs", [_key, _eventLog], _client] call CBA_fnc_targetEvent;

View File

@ -33,11 +33,12 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then {
missionNamespace setVariable [_varName, _cacheList];
[_event, {
// _eventName is defined on the function that calls the event
#ifdef DEBUG_MODE_FULL
INFO_1("Clear cached variables on event: %1",_eventName);
#endif
// Get the list of caches to clear
//IGNORE_PRIVATE_WARNING ["_eventName"];
// _eventName is defined on the function that calls the event
private _varName = format [QGVAR(clearCache_%1), _eventName];
private _cacheList = missionNamespace getVariable [_varName, []];
// Erase all the cached results

View File

@ -41,18 +41,29 @@ private _addons = "true" configClasses (configFile >> "CfgPatches");//
_addons = _addons apply {toLower configName _x};//
_addons = _addons select {_x find "ace_" == 0};
private _oldCompats = [];
{
if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then {
private _errorMsg = format ["File %1.pbo is outdated.", _x];
ERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
if ((_x select [0, 10]) != "ace_compat") then {
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
} else {
_oldCompats pushBack _x; // Don't block game if it's just an old compat pbo
};
};
false
} count _addons;
if (!(_oldCompats isEqualTo [])) then {
[{
// Lasts for ~10 seconds
ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this);
}, _oldCompats, 1] call CBA_fnc_waitAndExecute;
};
///////////////
// check dlls

View File

@ -0,0 +1,12 @@
/*
* Author: SilentSpike
* A dummy function which does nothing. Can be useful.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Public: No
*/

View File

@ -21,11 +21,14 @@ if (_unit isKindOf "CAManBase") then {
_return = {_x == _magazine} count magazines _unit;
} else {
{
_return = _return + {_x == _magazine} count magazines _x;
_return = _return + ({_x == _magazine} count magazines _x);
false
} count crew _unit;
_return = _return + ({_x == _magazine} count getMagazineCargo _unit);
(getMagazineCargo _unit) params [["_magNames", []], ["_magCount", []]];
{
if (_magazine == _x) exitWith {_return = _return + (_magCount select _forEachIndex)};
} forEach _magNames;
};
_return

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", sideUnknown]];
private _previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []];

View File

@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_wirecoil,_unit);
params ["_wirecoil", "_unit"];
private _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0];
{

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_wire);
params ["_wire"];
{
_wire animate [_x, 1];

View File

@ -2,8 +2,12 @@
class CfgSFX {
class GVAR(CookOff) {
name = QGVAR(cookoff);
sounds[] = {QGVAR(cookoff)};
GVAR(cookoff)[] = {PATHTOF(sounds\cookoff.wss),6,1.8,400,1,0,0,0};
// Index 4 is percentage chance to play, in theory high pressure is way more likely
variant0[] = {PATHTOF(sounds\cookoff_low_pressure.ogg),6,1,400,0.1,0,0,0};
variant1[] = {PATHTOF(sounds\cookoff_mid_pressure.ogg),6,1,400,0.25,0,0,0};
variant2[] = {PATHTOF(sounds\cookoff_high_pressure.ogg),6,1,400,0.65,0,0,0};
sounds[] = {"variant0","variant1","variant2"};
titles[] = {};
empty[] = {"",0,0,0,0,0,0,0};
};
};

View File

@ -91,6 +91,7 @@ if (local _vehicle) then {
} forEach _positions;
if (isServer) then {
// TODO - Players in the vehicle hear no sound (even after exiting the vehicle)
private _sound = createSoundSource [QGVAR(Sound), position _vehicle, [], 0];
_effects pushBack _sound;
@ -107,11 +108,12 @@ if (local _vehicle) then {
DEC(_counter);
if (_counter > 0) then {
[_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], 0.4] call CBA_fnc_waitAndExecute
[_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], FLAME_EFFECT_DELAY] call CBA_fnc_waitAndExecute
};
};
[_vehicle, _fnc_FlameEffect, 12] call _fnc_FlameEffect; // recursive function
// Recursive function, occurs for duration of cookoff
[_vehicle, _fnc_FlameEffect, ceil(COOKOFF_TIME/FLAME_EFFECT_DELAY)] call _fnc_FlameEffect;
private _randomPosition = _vehicle getPos [100, random 360];
@ -132,6 +134,6 @@ if (local _vehicle) then {
if (local _vehicle) then {
_vehicle setDamage 1;
};
}, [_vehicle, _effects], 14] call CBA_fnc_waitAndExecute;
}, [_vehicle, _effects, _positions], 10.5] call CBA_fnc_waitAndExecute;
}, _vehicle, 3] call CBA_fnc_waitAndExecute;
}, [_vehicle, _effects], COOKOFF_TIME] call CBA_fnc_waitAndExecute; // TODO: Randomise cook off time with locality in mind
}, [_vehicle, _effects, _positions], SMOKE_TIME] call CBA_fnc_waitAndExecute;
}, _vehicle, IGNITE_TIME] call CBA_fnc_waitAndExecute;

View File

@ -71,6 +71,6 @@ if (local _box) then {
if (local _box) then {
_box setDamage 1;
};
}, [_box, _effects], 82.5] call CBA_fnc_waitAndExecute; // Give signifcant time for ammo cookoff to occur (perhaps keep the box alive until all cooked off?)
}, [_box, _effects], 10.5] call CBA_fnc_waitAndExecute;
}, _box, 3] call CBA_fnc_waitAndExecute;
}, [_box, _effects], COOKOFF_TIME_BOX] call CBA_fnc_waitAndExecute; // TODO: Change so that box is alive until no ammo left, with locality in mind
}, [_box, _effects], SMOKE_TIME] call CBA_fnc_waitAndExecute;
}, _box, IGNITE_TIME] call CBA_fnc_waitAndExecute;

View File

@ -17,3 +17,13 @@
#include "\z\ace\addons\main\script_macros.hpp"
#define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5)
// Stages of cookoff in order (in seconds)
// Should be no un-synced randomness in these as the effects must be ran on each client
#define IGNITE_TIME 3
#define SMOKE_TIME 10.5
#define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files
#define COOKOFF_TIME_BOX 82.5 // Cook off time for boxes should be significant to allow time for ammo to burn
// Delay between flame effect for players in a cooking off vehicle
#define FLAME_EFFECT_DELAY 0.4

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -10,6 +10,7 @@
<Korean>쿡오프 현상 활성화</Korean>
<Polish>Aktywuj efekty samozapłonu amunicji</Polish>
<French>Active le cook-off</French>
<Italian>Abilita Esplosione</Italian>
</Key>
<Key ID="STR_ACE_CookOff_enable_tooltip">
<English>Enables cook off and related vehicle destruction effects.</English>
@ -20,6 +21,7 @@
<Korean>쿡오프 현상을 활성화 하고 관련된 차량에 폭발 이펙트를 적용합니다.</Korean>
<Polish>Aktywuje efekt samozapłonu amunicji na zniszczonych pojazdach.</Polish>
<French>Active le cook-off (autocombustion des munitions) et les effets de destruction liés.</French>
<Italian>Abilita l'esplosione e i relativi effetti di distruzione del veicolo.</Italian>
</Key>
<Key ID="STR_ACE_CookOff_generic_turret_wreck">
<Original>Wreck (Turret)</Original>
@ -42,6 +44,7 @@
<Korean>탄약 상자 쿡오프 현상 활성화</Korean>
<Polish>Aktywuj samozapłon skrzyń z amunicją</Polish>
<French>Cook-off caisses de munitions</French>
<Italian>Abilita esplosione cassa munizioni</Italian>
</Key>
<Key ID="STR_ACE_CookOff_enableBoxCookoff_tooltip">
<English>Enables cooking off of ammo boxes.</English>
@ -50,6 +53,7 @@
<Korean>탄약 상자에 쿡오프 현상을 적용합니다.</Korean>
<Polish>Aktywuje samozapłon skrzyń z amunicją</Polish>
<French>Active le cook-off sur toutes les caisses de munitions.</French>
<Italian>Abilita l'esplosione della cassa di munizioni. </Italian>
</Key>
<Key ID="STR_ACE_CookOff_enableAmmoCookoff_name">
<English>Enable Ammunition cook off</English>
@ -58,6 +62,7 @@
<Korean>탄약 쿡오프 현상 활성화</Korean>
<Polish>Aktywuj samozapłon amunicji</Polish>
<French>Active le cook-off des munitions</French>
<Italian>Abilita Esplosione munizioni</Italian>
</Key>
<Key ID="STR_ACE_CookOff_enableAmmoCookoff_tooltip">
<English>Enables Ammunition cook off. Fires ammunition projectiles while vehicle is on fire and has ammunition.</English>
@ -65,18 +70,21 @@
<German>Ermöglicht Selbstzündung von Munition. Feuert Projektile der Munition ab, solange das Fahrzeug brennt und Munition besitzt.</German>
<Polish>Aktywuje samozapłon amunicji. Wystrzeliwuje pociski podczas gdy pojazd płonie i posiada amunicję.</Polish>
<French>Mets à feu les munitions lorsqu'un véhicule est en feu et contient des munitions.</French>
<Italian>Abilita l'esplosione delle munizioni. Spara munizioni di proiettili quando il veicolo va a fuoco e contiene munizioni.</Italian>
</Key>
<Key ID="STR_ACE_CookOff_ammoCookoffDuration_name">
<English>Ammunition cook off duration</English>
<Polish>Czas trwania samozapłonu amunicji</Polish>
<Japanese>弾薬の誘爆持続時間</Japanese>
<French>Durée cook-off des munitions</French>
<Italian>Durata esplosione munizioni</Italian>
</Key>
<Key ID="STR_ACE_CookOff_ammoCookoffDuration_tooltip">
<English>Multiplier for how long cook off lasts [Setting to 0 will disable ammo cookoff]</English>
<French>Multiplicateur de la durée du cook-off des munitions [Une valeur de 0 désactive l'effet]</French>
<Polish>Mnożnik decydujący jak długo ma trwać samozapłon amunicji [Ustawienie na 0 spowoduje wyłącznie samozapłonu]</Polish>
<Japanese>誘爆の持続時間を乗数で設定。[0 に設定で誘爆を無効化]</Japanese>
<Italian>Moltiplicatore della durata dell'esplosione [Impostare 0 disabiliterà l'esplosione delle munizioni]</Italian>
</Key>
</Package>
</Project>

View File

@ -5,6 +5,7 @@ class CfgWeapons {
magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine
};
class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher
EGVAR(nlaw,enabled) = 0; // disable guidance for the disposabled tube
scope = 1;
ACE_isUsedLauncher = 1;
author = ECSTRING(common,ACETeam);

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Disposable">
<Key ID="STR_ACE_Disposable_UsedTube">
@ -10,7 +10,7 @@
<Spanish>Lanzador utilizado</Spanish>
<Hungarian>Elhasznált kilövőcső</Hungarian>
<Russian>Отстрелянная труба</Russian>
<Italian>Tubo usato</Italian>
<Italian>Lanciatore usato</Italian>
<Portuguese>Tubo utilizado</Portuguese>
<Japanese>使用済み</Japanese>
<Korean>사용함</Korean>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Dogtags">
<Key ID="STR_ACE_Dogtags_itemName">
@ -10,6 +10,7 @@
<German>Hundemarke</German>
<Korean>군번줄</Korean>
<French>Plaque d'identification</French>
<Italian>Piastrina</Italian>
</Key>
<Key ID="STR_ACE_Dogtags_checkItem">
<English>Check Dog Tag</English>
@ -20,6 +21,7 @@
<German>Hundemarke prüfen</German>
<Korean>군번줄 확인</Korean>
<French>Vérifier les plaques d'identification</French>
<Italian>Controlla Piastrina</Italian>
</Key>
<Key ID="STR_ACE_Dogtags_checkDogtag">
<English>Check</English>
@ -30,6 +32,7 @@
<German>Prüfen</German>
<Korean>확인</Korean>
<French>Vérifier</French>
<Italian>Controlla</Italian>
</Key>
<Key ID="STR_ACE_Dogtags_takeDogtag">
<English>Take</English>
@ -40,6 +43,7 @@
<German>Nehmen</German>
<Korean>회수</Korean>
<French>Prendre</French>
<Italian>Prendi</Italian>
</Key>
<Key ID="STR_ACE_Dogtags_takeDogtagSuccess">
<English>Dogtag taken from %1...</English>
@ -50,6 +54,7 @@
<German>Hundemarke von %1 genommen ...</German>
<Korean>%1로부터 군번줄을 회수했습니다...</Korean>
<French>Plaque d'identification pris sur %1...</French>
<Italian>Piastrina presa da %1...</Italian>
</Key>
<Key ID="STR_ACE_Dogtags_dogtagAlreadyTaken">
<English>Somebody else has already taken the dogtag...</English>
@ -60,7 +65,7 @@
<German>Jemand anderes hat bereits die Hundemarke genommen ...</German>
<Korean>누군가 이미 군번줄을 회수해갔습니다...</Korean>
<French>Quelqu'un d'autre a déjâ pris les plaques d'identification...</French>
<Italian>Qualcun altro ha già preso la piastrina...</Italian>
</Key>
</Package>
</Project>

View File

@ -16,6 +16,8 @@
*/
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisID"]; // From CBA_fnc_addBISEventHandler;
params ["_unit", "_anim"];
_thisArgs params ["_realUnit"];
TRACE_4("params",_unit,_anim,_realUnit,_thisID);

View File

@ -18,7 +18,7 @@
*/
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_player", "_target");
//IGNORE_PRIVATE_WARNING ["_player", "_target"];
params ["_object", "_enableDrag", "_position", "_direction"];
if (isNil "_position") then {

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Explosives">
<Key ID="STR_ACE_Explosives_Menu">
@ -883,6 +883,7 @@
<German>Stolperdraht-Leuchtrakete</German>
<Korean>조명지뢰</Korean>
<French>Fusée éclairante avec fil de détente</French>
<Italian>Cavo d'innesco</Italian>
</Key>
<Key ID="STR_ACE_Explosives_TripFlare_Description">
<English>Type: Tripwire flare - Ignites a non-lethal flare when triggered.&lt;br /&gt;Rounds: 1&lt;br /&gt;Used on: Ground</English>
@ -892,6 +893,7 @@
<German>Typ: Stolperdraht-Leuchtrakete - Schießt bei Auslösung eine nicht-tödliche Leuchtrakete ab.&lt;br /&gt;Ladungen: 1&lt;br /&gt;Benutzt auf: Boden</German>
<Korean>종류: 조명지뢰 - 작동시 무해한 조명을 사출합니다.&lt;br /&gt;장탄수: 1&lt;br /&gt;사용처: 지면</Korean>
<French>Type : Fusée éclairante avec fil de détente - Allume une fusée éclairante lorsque déclenché. &lt;br /&gt;Coups : 1&lt;br /&gt;Utilisé sur : le sol</French>
<Italian>Tipo: Cavo d'innesco - Sfocio un abbaglio non letale quanto attivato. &lt;br /&gt;Rimanenti: 1&lt;br /&gt;Usato: A terra</Italian>
</Key>
</Package>
</Project>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Fastroping">
<Key ID="STR_ACE_Fastroping_Module_FRIES_DisplayName">
@ -7,7 +7,7 @@
<Polish>Wyposaż FRIES</Polish>
<French>Equiper le FRIES</French>
<Spanish>Equipar FRIES</Spanish>
<Italian>Equipaggia la FRIES</Italian>
<Italian>Equipaggia il FRIES</Italian>
<Czech>Vybavit FRIES</Czech>
<Portuguese>Equipar FRIES</Portuguese>
<Russian>Десантирование по канатам</Russian>
@ -20,7 +20,7 @@
<Polish>Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System.</Polish>
<French>Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System.</French>
<Spanish>Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope.</Spanish>
<Italian>Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System</Italian>
<Italian>Equipagga l'elicottero compatibile con il Fast Rope Insertion Extraction System</Italian>
<Czech>Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES).</Czech>
<Portuguese>Equipa um helicóptero compatível com o Fast Rope Insertion Exctraction System.</Portuguese>
<Russian>Снаряжает совместимые вертолеты оборудованием для спуска десанта по канатам.</Russian>
@ -59,7 +59,7 @@
<Polish>Zjedź na linie</Polish>
<French>Descendre à la corde</French>
<Spanish>Descender por la cuerda</Spanish>
<Italian>Scendi sulla corda</Italian>
<Italian>Scendi dalla corda</Italian>
<Czech>SLANIT</Czech>
<Portuguese>Descida rápida</Portuguese>
<Russian>Спуститься по канату</Russian>
@ -85,7 +85,7 @@
<Polish>Wyposaż helikopter w FRIES</Polish>
<French>Equiper l'hélicoptère avec le FRIES</French>
<Spanish>Equipar helicoptero con FRIES</Spanish>
<Italian>Equipaggia l'elicottero con FRIES</Italian>
<Italian>Equipaggia l'elicottero con il FRIES</Italian>
<Czech>Vybavit vrtulník pomocí FRIES</Czech>
<Portuguese>Equipar helicóptero com FRIES</Portuguese>
<Russian>Снарядить вертолет канатами для спуска</Russian>

View File

@ -11,110 +11,13 @@
h = 0; \
};
class RscText;
class RscControlsGroup;
class RscMapControl;
class RscInGameUI {
class RscUnitInfo;
class RscUnitInfo_AH64D_gunner {
controls[] = {"CA_Distance","ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscWeaponRangeFinder {
controls[] = {"CA_Distance","ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscWeaponRangeFinderPAS13 {
MACRO_RANGEFINDER
};
class RscOptics_Rangefinder: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscWeaponRangeFinderMAAWS {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscWeaponRangeFinderAbramsCom {
controls[] = {"CA_Distance","ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscWeaponRangeFinderAbramsGun {
controls[] = {"CA_Distance","ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscWeaponRangeFinderStrykerMGSGun {
controls[] = {"CA_Distance","ACE_CA_Distance"};
MACRO_RANGEFINDER
};
class RscOptics_crows: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_strider_commander {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscWeaponRangeZeroing: RscUnitInfo {
controls[] = {"CA_Zeroing", "CA_DistanceText", "CA_Distance","ACE_CA_Distance", "ACE_Rangehelper"};
MACRO_RANGEFINDER
};
class RscOptics_sos: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_nightstalker: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_tws: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_punisher {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_tws_sniper: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_SDV_periscope {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_Heli_Attack_02_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
@ -122,7 +25,7 @@ class RscInGameUI {
};
};
};
class Rsc_ACE_Helo_UI_Turret: RscUnitInfo {
class Rsc_ACE_Helo_UI_Turret: RscUnitInfo { // RscOptics_Heli_Attack_01_gunner
onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgRangefinder', _this select 0]; ((_this select 0) displayCtrl 151) ctrlSetTextColor [0, 0, 0, 0];";
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
@ -130,103 +33,30 @@ class RscInGameUI {
};
};
};
class RscOptics_Heli_Attack_01_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_UAV_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_UGV_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_APC_Tracked_01_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
class CA_Distance: RscText {};
};
};
};
class RscOptics_APC_Tracked_03_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_APC_Wheeled_01_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_APC_Wheeled_03_commander: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_APC_Wheeled_03_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_MBT_01_commander: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_MBT_01_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_MBT_02_commander: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_MBT_02_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
class RscOptics_MBT_03_gunner: RscUnitInfo {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
};
};
};
// marksmen
class RscOptics_LaserDesignator_02 {
class CA_IGUI_elements_group: RscControlsGroup {
class controls {
MACRO_RANGEFINDER
class ACE_RscOptics_APC_Tracked_01_gunner: RscOptics_APC_Tracked_01_gunner {
class CA_IGUI_elements_group: CA_IGUI_elements_group {
class controls: controls {
// MACRO_RANGEFINDER + modify IDC of CA_Distance
class CA_Distance: CA_Distance {
idc = 151;
};
class ACE_CA_Distance: CA_Distance {
idc = 1713151;
text = "----";
};
class ACE_Rangehelper: RscMapControl {
onDraw = "((ctrlParent (_this select 0)) displayCtrl 1713151) ctrlShow (cameraView == 'GUNNER');";
w = 0;
h = 0;
};
};
};
};

View File

@ -49,9 +49,6 @@ class CfgVehicles {
class Turrets {
class MainTurret: NewTurret {
GVAR(Enabled) = 1; // all tracked vehicles get one by default
class Turrets {
class CommanderOptics;
};
};
};
};
@ -60,231 +57,52 @@ class CfgVehicles {
class Turrets {
class MainTurret: NewTurret {
GVAR(Enabled) = 1; // all tracked vehicles get one by default
class Turrets {
class CommanderOptics;//: CommanderOptics {};
};
};
};
};
class Car_F: Car {
class Turrets {
class MainTurret;
};
};
class Wheeled_APC_F: Car_F {
class Turrets {
class MainTurret: NewTurret {
class Turrets {
class CommanderOptics;//: CommanderOptics {};
};
};
};
};
class MRAP_01_base_F: Car_F {};
class MRAP_01_gmg_base_F: MRAP_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class B_MRAP_01_F: MRAP_01_base_F {
class Turrets;
};
class MRAP_02_base_F: Car_F {};
class MRAP_02_hmg_base_F: MRAP_02_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class MRAP_02_gmg_base_F: MRAP_02_hmg_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class O_MRAP_02_F: MRAP_02_base_F {
class Turrets;
};
class MRAP_03_base_F: Car_F {
class Turrets: Turrets {
class CommanderTurret: MainTurret {
GVAR(Enabled) = 0;
};
};
};
class MRAP_03_hmg_base_F: MRAP_03_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
class CommanderTurret: CommanderTurret {
GVAR(Enabled) = 0;
};
};
};
class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
class CommanderTurret: CommanderTurret {};
};*/
};
class APC_Wheeled_01_base_F: Wheeled_APC_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
};
};*/
};
class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {};
class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class APC_Wheeled_02_base_F: Wheeled_APC_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
// class CommanderOptics: CommanderOptics {};
};
};
class APC_Wheeled_03_base_F: Wheeled_APC_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
/*class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};*/
};
};
};
class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {};
class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class APC_Tracked_01_base_F: Tank_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets;
};
};*/
};
class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
GVAR(Enabled) = 0;
};
class CommanderOptics: CommanderOptics {};
};
};
class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F {
//GVAR(Enabled) = 0; @todo
};
class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {};
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
turretinfotype = "ACE_RscOptics_APC_Tracked_01_gunner";
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Red"};
/*class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};*/
};
};
};
class APC_Tracked_02_base_F: Tank_F {
/*class Turrets: Turrets {
class Turrets: Turrets {
class MainTurret: MainTurret {
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};
GVAR(Enabled) = 0;
};
};*/
};
};
class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {};
class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class O_APC_Tracked_02_AA_F: O_APC_Tracked_02_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
turretinfotype = "ACE_RscOptics_APC_Tracked_01_gunner";
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
magazines[] += {"ACE_120Rnd_35mm_ABM_shells_Tracer_Green"};
/*class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};*/
};
};
};
@ -292,151 +110,31 @@ class CfgVehicles {
class APC_Tracked_03_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
/*class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};*/
GVAR(Enabled) = 0;
};
};
};
class MBT_01_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
/*class Turrets: Turrets {
class CommanderOptics: CommanderOptics {};
};*/
};
};
};
class B_MBT_01_base_F: MBT_01_base_F {};
class B_MBT_01_cannon_F: B_MBT_01_base_F {};
class B_MBT_01_TUSK_F: B_MBT_01_cannon_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {
GVAR(Enabled) = 1;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
};
};
class MBT_01_arty_base_F: MBT_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 0;
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
};
};
class MBT_01_mlrs_base_F: MBT_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 0;
//class Turrets;
};
};
};
class MBT_02_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {
GVAR(Enabled) = 1;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
};
};
class MBT_02_arty_base_F: MBT_02_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 0;
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {
GVAR(Enabled) = 1;
GVAR(MaxDistance) = 2000;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
};
};
class MBT_03_base_F: Tank_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
class Turrets: Turrets {
class CommanderOptics: CommanderOptics {
GVAR(Enabled) = 1;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
};
};
// SHIPS
class Ship: AllVehicles {
class Turrets {
class MainTurret;
};
};
class Ship_F: Ship {};
class Boat_F: Ship_F {};
class Boat_Armed_01_base_F: Boat_F {
class Turrets: Turrets {
class FrontTurret: NewTurret {
GVAR(enabled) = 1;
GVAR(minDistance) = 100;
GVAR(maxDistance) = 2000;
GVAR(distanceInterval) = 5;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
class RearTurret: FrontTurret {
discreteDistance[] = {100,200,300,400,600,800,1000,1200}; // Originally inherited from FrontTurret
discreteDistanceInitIndex = 4;
GVAR(Enabled) = 0;
};
};
};
@ -450,51 +148,7 @@ class CfgVehicles {
};
};
class Plane: Air {};
class Helicopter_Base_F: Helicopter {
class Turrets: Turrets {
class CopilotTurret;
};
};
class Helicopter_Base_H: Helicopter_Base_F {
class Turrets: Turrets {
class CopilotTurret;
};
};
class Heli_Light_01_base_F: Helicopter_Base_H {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/
};
class Heli_Light_01_unarmed_base_F: Heli_Light_01_base_F {};
class B_Heli_Light_01_F: Heli_Light_01_unarmed_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/
};
class Heli_Light_01_armed_base_F: Heli_Light_01_base_F {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/
};
class Heli_Light_02_base_F: Helicopter_Base_H {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/
};
class Plane_Base_F: Plane {
class Turrets {
class CopilotTurret;
};
};
class Helicopter_Base_F: Helicopter {};
class Heli_Attack_01_base_F: Helicopter_Base_F {
class Turrets: Turrets {
@ -515,80 +169,4 @@ class CfgVehicles {
};
};
};
class Heli_Transport_01_base_F: Helicopter_Base_H {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
class MainTurret: MainTurret {};
class RightDoorGun: MainTurret {};
};*/
};
class Heli_Transport_02_base_F: Helicopter_Base_H {
/*class Turrets: Turrets {
class CopilotTurret: CopilotTurret {};
};*/
};
class Heli_light_03_base_F;
class I_Heli_light_03_base_F: Heli_light_03_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class I_Heli_light_03_F: Heli_light_03_base_F {
/*class Turrets: Turrets {
class MainTurret: MainTurret {};
};*/
};
class Plane_CAS_01_base_F: Plane_Base_F {
class Turrets;
};
class Plane_CAS_02_base_F: Plane_Base_F {
class Turrets;
};
class Plane_Fighter_03_base_F: Plane_Base_F {
class Turrets;
};
// static weapons.
class StaticWeapon: LandVehicle {
class Turrets {
class MainTurret; //: NewTurret {};
};
};
class StaticMGWeapon: StaticWeapon {};
class HMG_01_base_F: StaticMGWeapon {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MinDistance) = 200;
GVAR(MaxDistance) = 2000;
GVAR(DistanceInterval) = 5;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
class StaticGrenadeLauncher: StaticWeapon {};
class GMG_TriPod: StaticGrenadeLauncher {};
class GMG_01_base_F: GMG_TriPod {
class Turrets: Turrets {
class MainTurret: MainTurret {
GVAR(Enabled) = 1;
GVAR(MinDistance) = 200;
GVAR(MaxDistance) = 2000;
GVAR(DistanceInterval) = 5;
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
};
};
};
};

View File

@ -1,15 +1,6 @@
class CfgWeapons {
// disable locking, so it doesn't interfere with our system
class CannonCore;
class cannon_120mm: CannonCore {
canLock = 0;
ballisticsComputer = 0;
};
class autocannon_Base_F: CannonCore {
canLock = 0;
ballisticsComputer = 0;
};
class autocannon_35mm: CannonCore {
canLock = 0;
ballisticsComputer = 4; //was "4 + 2", 2 is for manual zeroing, 4 is for the lead indicator - https://community.bistudio.com/wiki/A3_Locking_Review#ballisticsComputer

View File

@ -21,3 +21,7 @@ if (!hasInterface) exitWith {};
// Register event for global updates
[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler;
#ifdef DEBUG_MODE_FULL
call compile preprocessFileLineNumbers QPATHTOF(functions\dev_debugConfigs.sqf);
#endif

View File

@ -0,0 +1,88 @@
// PabstMirror
#include "script_component.hpp"
diag_log text format ["[ACE_FCS] ---------------"];
private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {2 == getNumber (_x >> 'scope')}", true];
private _problemUIs = [];
{
private _vehicleType = configName _x;
{
private _turret = _x;
private _config = [_vehicleType, _turret] call CBA_fnc_getTurret;
if (!isNull _config) then {
private _aceFCS = (getNumber (_config >> "ACE_FCS_Enabled")) == 1;
private _vanillaFCS = false;
private _weapons = getArray (_config >> "weapons");
{
private _weapon = _x;
private _ballisticComputer = getNumber (configFile >> "CfgWeapons" >> _weapon >> "ballisticsComputer");
_ballisticComputer = [_ballisticComputer, 5] call ace_common_fnc_toBin;
if ((_ballisticComputer select [(count _ballisticComputer) - 5, 1]) == "1") then {
_vanillaFCS = true;
if (_aceFCS) then {diag_log text format ["%1 -> %2: ACE FCS Enabled CONFLICTS with vanilla FCS [%3]", _vehicleType, _weapon, _ballisticComputer];};
};
} forEach _weapons;
if (!(_weapons isEqualTo [])) then {
private _fcsMsg = switch (true) do {
// case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"};
// case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"};
// case (_vanillaFCS): {"Vanilla FCS"};
// case (_aceFCS): {"ACE FCS"};
default {""};
};
if (_fcsMsg != "") then {diag_log text format ["%1: %2", _vehicleType, _fcsMsg];};
};
if (_vanillaFCS) then {
private _dd = getArray (_config >> "discreteDistance");
if (_dd isEqualTo []) exitWith {diag_log format ["%1->%2: discreteDistance with vanillaFCS [%3]", _vehicleType, _turret, _config];};
};
if (true) then {
private _turretInfo = getText (_config >> "turretInfoType");
private _infoConfig = configFile >> "RscInGameUI" >> _turretInfo;
if (!isNull _infoConfig) then {
private _idcList = [];
private _fncGetIDCS = {
params ["_subConfig"];
if (!isClass _subConfig) exitWith {diag_log "err";};
private _controlsArray = getArray (_subConfig >> "controls");
{
[_subConfig >> _x] call _fncGetIDCS;
} forEach _controlsArray;
private _controlsConfig = configProperties [(_subConfig >> "controls"), "isClass _x", true];
{
[_x] call _fncGetIDCS;
} forEach _controlsConfig;
_idcList pushBack getNumber (_subConfig >> "idc");
};
[_infoConfig] call _fncGetIDCS;
if (_aceFCS && {!(1713151 in _idcList)}) then {
_problemUIs pushBackUnique format ["%1: ACE_FCS, but missing ACE_CA_DIST", _turretInfo];
};
if (_aceFCS && {(198 in _idcList)}) then {
_problemUIs pushBackUnique format ["%1: ACE_FCS, but NEW Lazr CA_DIST", _turretInfo, _vehicleType];
};
if ((!_aceFCS) && {(1713151 in _idcList)}) then {
_problemUIs pushBackUnique format ["%1: Not ACE but has ACE_CA_DIST", _turretInfo, _vehicleType];
};
if (_vanillaFCS && {!(198 in _idcList)}) then {
_problemUIs pushBackUnique format ["%1: vanillaFCS but missing NEW Lazr CA_DIST [just a warning]", _turretInfo, _vehicleType];
};
};
};
};
} forEach [[0],[0,0]];
} forEach _vehicles;
_problemUIs sort true;
diag_log text format ["[ACE_FCS] ------- Problem UIs --------"];
{
diag_log text format ["- %1", _x];
} forEach _problemUIs;
diag_log text format ["[ACE_FCS] ---------------"];

View File

@ -24,6 +24,7 @@ if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "Stat
private _iconSize = BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom));
[+GVAR(fingersHash), {
//IGNORE_PRIVATE_WARNING ["_key", "_value"];
_value params ["_lastTime", "_pos", "_name"];
private _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime;
if (_timeLeftToShow <= 0) then {

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Gestures">
<Key ID="STR_ACE_Gestures_Name">
@ -8,7 +8,7 @@
<Czech>ACE Posunky</Czech>
<French>ACE Gestes</French>
<Hungarian>ACE Kézjelek</Hungarian>
<Italian>ACE Gesti</Italian>
<Italian>Gesti ACE</Italian>
<Portuguese>ACE Gestos</Portuguese>
<Russian>ACE Жесты</Russian>
<Spanish>ACE Gestos</Spanish>
@ -236,7 +236,7 @@
<German>Zeige Gesten im Selbst-Interkationsmenü, lege sie auf Schnelltasten, oder deaktiviere sie vollständig.</German>
<Czech>Zobrazit posunky pro vlastní interakční menu, nebo prostě použít klávesové zkratky, nebo to zakázat úplně</Czech>
<Polish>Pokaż listę gestów w menu własnej interakcji, użyj tylko skrótów na klawiaturze lub wyłącz całkowicie</Polish>
<Italian>Mostra Gesti nel Menù Interazione Personale, o usa solamente Hotkey, o disabilita completamente</Italian>
<Italian>Mostra Gesti nel Menù Interazione Personale, o usa solamente tasti di scelta rapida, o disabilita completamente</Italian>
<Spanish>Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente</Spanish>
<French>Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement.</French>
<Portuguese>Mostra gestos no menu de interação, ou utilize um dos atalhos de teclado ou desative completamente</Portuguese>
@ -249,7 +249,7 @@
<German>Nur Schnelltasten</German>
<Czech>Pouze klávesové zkratky</Czech>
<Polish>Tylko skróty klaw.</Polish>
<Italian>Solo Hotkey</Italian>
<Italian>Solo tasti di scelta rapida</Italian>
<Spanish>Solo mediante teclas</Spanish>
<French>Seulement les touches</French>
<Portuguese>Somente atalhos de teclado</Portuguese>
@ -262,7 +262,7 @@
<German>Schnelltasten+ Interaktionsmenü</German>
<Czech>Klávesové zkratky + interakční menu</Czech>
<Polish>Skróty klaw. + menu interakcji</Polish>
<Italian>Hotkey + Menù Interazione</Italian>
<Italian>Tasti di scelta rapida + Menù Interazione</Italian>
<Spanish>Teclas y Menú de Interacción</Spanish>
<French>Touches + menu d'interaction</French>
<Portuguese>Atalhos + Menu de Interação</Portuguese>

View File

@ -69,7 +69,7 @@ private _gBlackOut = MAXVIRTUALG / _classCoef + MAXVIRTUALG / _suitCoef - MAXVIR
// Unconsciousness
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
[ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious);
[ACE_player, true, (10 + floor(random 5)), true] call EFUNC(medical,setUnconscious);
};
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="gforces">
<Key ID="STR_ACE_gforces_enabledFor_displayName">
@ -12,6 +12,7 @@
<Japanese>G による効果</Japanese>
<Polish>Efekty przeciążeń</Polish>
<Korean>중력가속도 효과</Korean>
<Italian>Effetti forza G</Italian>
</Key>
<Key ID="STR_ACE_gforces_enabledFor_onlyAircraft">
<English>Only Aircraft</English>
@ -24,6 +25,7 @@
<Japanese>航空機のみ</Japanese>
<Polish>Tylko samoloty</Polish>
<Korean>비행기에만 적용</Korean>
<Italian>Solo Aerei</Italian>
</Key>
</Package>
</Project>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Goggles">
<Key ID="STR_ACE_Goggles_ShowInThirdPerson">
@ -37,6 +37,7 @@
<German>Brilleneffekt</German>
<Korean>고글 효과</Korean>
<French>Effets des lunettes</French>
<Italian>Effetto Occhiali</Italian>
</Key>
<Key ID="STR_ACE_Goggles_effects_tintOnly">
<English>Tint</English>
@ -46,6 +47,7 @@
<German>Tönung</German>
<Korean>색조</Korean>
<French>Teinte</French>
<Italian>Colore</Italian>
</Key>
<Key ID="STR_ACE_Goggles_enabled_tintAndEffects">
<English>Tint + Effects</English>
@ -55,7 +57,7 @@
<German>Tönung + Effekte</German>
<Korean>색조+효과</Korean>
<French>Teinte + effets</French>
<Italian>Colore + Effetti</Italian>
</Key>
</Package>
</Project>

View File

@ -2,40 +2,40 @@
class CfgVehicles {
class NATO_Box_Base;
class Box_NATO_Grenades_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_White,12);
MACRO_ADDITEM(ACE_HandFlare_Green,12);
MACRO_ADDITEM(ACE_M84,12);
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_HandFlare_White,12);
MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12);
MACRO_ADDMAGAZINE(ACE_M84,12);
};
};
class EAST_Box_Base;
class Box_East_Grenades_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_Yellow,12);
MACRO_ADDITEM(ACE_HandFlare_Red,12);
MACRO_ADDITEM(ACE_M84,12);
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12);
MACRO_ADDMAGAZINE(ACE_HandFlare_Red,12);
MACRO_ADDMAGAZINE(ACE_M84,12);
};
};
class IND_Box_Base;
class Box_IND_Grenades_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_Yellow,12);
MACRO_ADDITEM(ACE_HandFlare_Green,12);
MACRO_ADDITEM(ACE_M84,12);
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12);
MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12);
MACRO_ADDMAGAZINE(ACE_M84,12);
};
};
class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_White,12);
MACRO_ADDITEM(ACE_HandFlare_Red,12);
MACRO_ADDITEM(ACE_HandFlare_Green,12);
MACRO_ADDITEM(ACE_HandFlare_Yellow,12);
MACRO_ADDITEM(ACE_M84,12);
MACRO_ADDITEM(ACE_M14,12);
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_HandFlare_White,12);
MACRO_ADDMAGAZINE(ACE_HandFlare_Red,12);
MACRO_ADDMAGAZINE(ACE_HandFlare_Green,12);
MACRO_ADDMAGAZINE(ACE_HandFlare_Yellow,12);
MACRO_ADDMAGAZINE(ACE_M84,12);
MACRO_ADDMAGAZINE(ACE_M14,12);
};
};
};

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Grenades">
<Key ID="STR_ACE_Grenades_SwitchGrenadeMode">
@ -303,6 +303,7 @@
<Polish>Granat zapalający AN-M14</Polish>
<Korean>AN-M14 소이 수류탄</Korean>
<French>Grenade incendiaire AN-M14</French>
<Italian>AN-M14 Granata Incendiaria</Italian>
</Key>
<Key ID="STR_ACE_Grenades_Incendiary_NameShort">
<English>AN-M14</English>
@ -312,6 +313,7 @@
<Polish>AN-M14</Polish>
<Korean>AN-M14</Korean>
<French>AN-M14</French>
<Italian>AN-M14</Italian>
</Key>
<Key ID="STR_ACE_Grenades_Incendiary_Description">
<English>Incendiary grenade used to destroy weapons, ammunition and other equipment.</English>
@ -321,6 +323,7 @@
<Polish>Granat zapalający, używany do niszczenia broni, amunicji i innego sprzętu.</Polish>
<Korean>소이 수류탄은 무기나 탄약 그리고 장비를 파괴할때 쓰입니다.</Korean>
<French>Grenade incendiaire utilisé pour détruire des armes, munitions et autres équipements.</French>
<Italian>Granata incendiaria usata per distruggere armi, munizioni e altri equipaggiamenti.</Italian>
</Key>
</Package>
</Project>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Gunbag">
<Key ID="STR_ACE_Gunbag_DisplayName">
@ -10,6 +10,7 @@
<Japanese>ガンバッグ</Japanese>
<Polish>Torba na broń</Polish>
<Korean>총가방</Korean>
<Italian>Borsa per Armi</Italian>
</Key>
<Key ID="STR_ACE_Gunbag_DisplayName_Tan">
<English>Gunbag (Tan)</English>
@ -20,6 +21,7 @@
<Japanese>ガンバッグ (タン)</Japanese>
<Polish>Torba na broń (jasnobrązowa)</Polish>
<Korean>총가방 (황갈색)</Korean>
<Italian>Borsa per Armi (Tan)</Italian>
</Key>
<Key ID="STR_ACE_Gunbag_ToGunbag">
<English>Put weapon into gunbag</English>
@ -30,6 +32,7 @@
<Japanese>ガンバッグへ武器を入れる</Japanese>
<Polish>Włóż broń do torby</Polish>
<Korean>무기를 총가방에 넣기</Korean>
<Italian>Metti l'arma nella borsa per armi</Italian>
</Key>
<Key ID="STR_ACE_Gunbag_OffGunbag">
<English>Get weapon out of gunbag</English>
@ -40,6 +43,7 @@
<Japanese>ガンバッグから武器を出す</Japanese>
<Polish>Wyciągnij broń z torby</Polish>
<Korean>무기를 총가방에서 꺼내기</Korean>
<Italian>Prendi l'arma dalla borsa per armi</Italian>
</Key>
<Key ID="STR_ACE_Gunbag_Status">
<English>Status</English>
@ -50,6 +54,7 @@
<Japanese>中身</Japanese>
<Polish>Status</Polish>
<Korean>상태</Korean>
<Italian>Stato</Italian>
</Key>
<Key ID="STR_ACE_Gunbag_Empty">
<English>Gunbag Empty</English>
@ -60,6 +65,7 @@
<Japanese>ガンバッグは空</Japanese>
<Polish>Torba jest pusta</Polish>
<Korean>총가방 비어있음</Korean>
<Italian>Borsa per armi vuota</Italian>
</Key>
</Package>
</Project>

View File

@ -13,42 +13,42 @@ class CfgWeapons {
};
};
#define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6;
#define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5;
#define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0;
class H_HelmetB;
class H_HelmetCrew_B: H_HelmetB {
GVAR(protection) = 1;
GVAR(lowerVolume) = 0.80;
HEARING_PROTECTION_VICCREW
};
class H_CrewHelmetHeli_B: H_HelmetB {
GVAR(protection) = 0.85;
GVAR(lowerVolume) = 0.75;
HEARING_PROTECTION_VICCREW
};
class H_PilotHelmetHeli_B: H_HelmetB {
GVAR(protection) = 0.85;
GVAR(lowerVolume) = 0.75;
HEARING_PROTECTION_VICCREW
};
class H_PilotHelmetFighter_B: H_HelmetB {
GVAR(protection) = 1;
GVAR(lowerVolume) = 0.80;
HEARING_PROTECTION_VICCREW
};
class HelmetBase;
class H_Cap_headphones: HelmetBase {
GVAR(protection) = 0.5;
GVAR(lowerVolume) = 0.60;
HEARING_PROTECTION_EARMUFF
};
class H_HelmetB_light: H_HelmetB {
GVAR(protection) = 0.8;
GVAR(lowerVolume) = 0.20;
HEARING_PROTECTION_PELTOR
};
class H_HelmetB_camo: H_HelmetB {
HEARING_PROTECTION_PELTOR
};
class H_HelmetB_plain_mcamo;
class H_HelmetSpecB: H_HelmetB_plain_mcamo {
GVAR(protection) = 0.8;
GVAR(lowerVolume) = 0.20;
HEARING_PROTECTION_PELTOR
};
};

View File

@ -0,0 +1 @@
z\ace\addons\hellfire

View File

@ -0,0 +1,17 @@
class EGVAR(missileguidance,AttackProfiles) {
class hellfire {
// LOBL and LOAL-DIR behaive the same
name = "LOAL-DIR";
nameLocked = "LOBL";
functionName = QFUNC(attackProfile);
GVAR(launchHeightClear) = 0;
};
class hellfire_hi: hellfire {
name = "LOAL-HI";
GVAR(launchHeightClear) = 304.8; // clear 1000 ft by 1500m
};
class hellfire_lo: hellfire_hi {
name = "LOAL-LO";
GVAR(launchHeightClear) = 91.5; // clear 300 ft by 600m
};
};

View File

@ -0,0 +1,57 @@
class CfgAmmo {
class M_PG_AT;
class ACE_Hellfire_AGM114K: M_PG_AT {
displayName = "AGM-114K";
displayNameShort = "AGM-114K";
description = "AGM-114K";
descriptionShort = "AGM-114K";
model = "\A3\Weapons_F\Ammo\Missile_AT_03_fly_F";
proxyShape = "\A3\Weapons_F\Ammo\Missile_AT_03_F";
hit = 1400;
indirectHit = 71;
indirectHitRange = 4.5;
effectsMissile = "missile2";
irLock = 0;
laserLock = 0;
manualControl = 0;
maxSpeed = 450;
thrustTime = 2.5; // motor burn 2-3 sec
thrust = 250;
timeToLive = 40;
EGVAR(rearm,caliber) = 178;
class ace_missileguidance {
enabled = 1;
minDeflection = 0.0005; // Minium flap deflection for guidance
maxDeflection = 0.01; // Maximum flap deflection for guidance
incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
// Guidance type for munitions
defaultSeekerType = "SALH";
seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" };
defaultSeekerLockMode = "LOAL";
seekerLockModes[] = { "LOAL", "LOBL" };
seekLastTargetPos = 1; // seek last target position [if seeker loses LOS of target, continue to last known pos]
seekerAngle = 70; // Angle in front of the missile which can be searched
seekerAccuracy = 1; // seeker accuracy multiplier
seekerMinRange = 1;
seekerMaxRange = 5000; // Range from the missile which the seeker can visually search
// Attack profile type selection
defaultAttackProfile = "hellfire";
attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"};
};
};
};

View File

@ -0,0 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

View File

@ -0,0 +1,47 @@
class CfgMagazines {
class 12Rnd_PG_missiles;
class 6Rnd_ACE_Hellfire_AGM114K: 12Rnd_PG_missiles { // Old style vehicle magazine
count = 6;
ammo = "ACE_Hellfire_AGM114K";
displayName = "AGM-114K [ACE]";
displayNameShort = "AGM-114K";
descriptionShort = "AGM-114K";
};
// 1.70 pylon magazines:
class PylonMissile_1Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // Bare missle
displayName = "1x AGM-114K [ACE]";
count = 1;
mass = 70;
pylonWeapon = QGVAR(launcher);
hardpoints[] = {"SCALPEL_1RND"};
model = "\A3\Weapons_F\DynamicLoadout\PylonMissile_1x_Bomb_04_F.p3d";
};
class PylonRack_1Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack
displayName = "1x AGM-114K [ACE]";
count = 1;
mass = 85;
pylonWeapon = QGVAR(launcher);
hardpoints[] = {"B_MISSILE_PYLON", "SCALPEL_1RND_EJECTOR", "B_ASRRAM_EJECTOR", "UNI_SCALPEL"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_1x_Missile_AA_04_F.p3d";
};
class PylonRack_3Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack
displayName = "3x AGM-114K [ACE]";
count = 3;
mass = 250;
pylonWeapon = QGVAR(launcher);
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 3};
};
class PylonRack_4Rnd_ACE_Hellfire_AGM114K: 6Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack
displayName = "4x AGM-114K [ACE]";
count = 4;
mass = 340;
pylonWeapon = QGVAR(launcher);
hardpoints[] = {"UNI_SCALPEL"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};
};

View File

@ -0,0 +1,6 @@
class CfgVehicles {
class Heli_Attack_01_base_F;
class Heli_Attack_01_dynamicLoadout_base_F: Heli_Attack_01_base_F {
GVAR(addLaserDesignator) = 1;
};
};

View File

@ -0,0 +1,13 @@
class CfgWeapons {
class missiles_SCALPEL;
class GVAR(launcher): missiles_SCALPEL {
displayName = CSTRING(Hellfire);
GVAR(enabled) = 1; // show attack profile / lock on hud
EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code)
canLock = 0;
weaponLockSystem = 0;
magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"};
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
};

10
addons/hellfire/README.md Normal file
View File

@ -0,0 +1,10 @@
ace_hellfire
==========
Adds AGM-114K Hellfire missiles.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [PabstMirror](https://github.com/PabstMirror)

View File

@ -0,0 +1,57 @@
class RscControlsGroupNoScrollbars;
class RscPictureKeepAspect;
class RscText;
class RscTitles {
class GVAR(modeDisplay) {
idd = -1;
onLoad = QUOTE(with uiNameSpace do { GVAR(display) = _this select 0 };);
movingEnable = 0;
duration = 60;
fadeIn = "false";
fadeOut = "false";
class controls {
class ModeControlGroup: RscControlsGroupNoScrollbars {
idc = IDC_MODECONTROLGROUP;
x = "3.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_X',((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40))])";
y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getVariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
class controls {
class AttackMode: RscText {
idc = IDC_ATTACKMODE;
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};
x = "0";
y = "0";
w = "(2.6) * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class LaserCode: RscText {
idc = IDC_LASERCODE;
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};
x = "(3.6) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
y = "0";
w = "(2.5) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
sizeEx = "0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class LaserIcon: RscPictureKeepAspect {
idc = IDC_LASERICON;
colorText[] = {1, 0, 0, 1};
colorBackground[] = {0, 0, 0, 0};
text = "\a3\Ui_F_Curator\Data\CfgCurator\laser_ca.paa";
x = "(6.1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
y = "0";
w = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
h = "(1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
};
};
};

View File

@ -0,0 +1,5 @@
LOG("prep");
PREP(attackProfile);
PREP(getAttackProfileSettings);
PREP(setupVehicle);
PREP(showHud);

View File

@ -0,0 +1,10 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
GVAR(pfID) = -1;
["ace_settingsInitialized", {
["turret", LINKFUNC(showHud), false] call CBA_fnc_addPlayerEventHandler;
["vehicle", LINKFUNC(showHud), true] call CBA_fnc_addPlayerEventHandler; // only one of these needs the retro flag
}] call CBA_fnc_addEventHandler;

View File

@ -0,0 +1,9 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -0,0 +1,23 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction", "ace_missileguidance"};
author = ECSTRING(common,ACETeam);
authors[] = {"PabstMirror"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "ACE_GuidanceConfig.hpp"
#include "CfgAmmo.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "RscTitles.hpp"

View File

@ -0,0 +1,85 @@
/*
* Author: PabstMirror
* Hellfire attack profile. Handles all 4 modes LOBL, LOAL-DIR, LOAL-HI, LOAL-LO
*
* Arguments:
* 0: Seeker Target PosASL <ARRAY>
* 1: Guidance Arg Array <ARRAY>
* 2: Attack Profile State <ARRAY>
*
* Return Value:
* Missile Aim PosASL <ARRAY>
*
* Example:
* [[1,2,3], [], []] call ace_hellfire_fnc_attackProfile
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
_args params ["_firedEH", "_launchParams"];
_launchParams params ["","_targetLaunchParams"];
_targetLaunchParams params ["", "", "_launchPos"];
_firedEH params ["","","","","","","_projectile"];
// Get state params:
if (_attackProfileStateParams isEqualTo []) then {
_this call FUNC(getAttackProfileSettings);
};
_attackProfileStateParams params ["_attackStage", "_configLaunchHeightClear"];
private _projectilePos = getPosASL _projectile;
private _distanceFromLaunch2d = _launchPos distance2d _projectilePos;
private _heightAboveLaunch = (_projectilePos select 2) - (_launchPos select 2);
// Add height depending on distance for compensate
private _returnTargetPos = nil;
switch (_attackStage) do {
case STAGE_LAUNCH: { // Gain height quickly to pass terrain mask
_returnTargetPos = _projectilePos getPos [100, getDir _projectile];
_returnTargetPos set [2, (_projectilePos select 2) + 36.4]; // 100 and 36.4 gives a 20 deg angle
if (_heightAboveLaunch > _configLaunchHeightClear) then {
_attackProfileStateParams set [0, STAGE_SEEK_CRUISE];
TRACE_2("New Stage: STAGE_SEEK_CRUISE",_distanceFromLaunch2d,_heightAboveLaunch);
};
};
case STAGE_SEEK_CRUISE: { // Slowly gain altitude while searching for target
// Before 4000 cruise at 5.7 degrees up, then level out
private _cruiseHeight = linearConversion [3000, 5000, _distanceFromLaunch2d, 10, 0, true];
_returnTargetPos = _projectilePos getPos [100, getDir _projectile];
_returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight];
if (!(_seekerTargetPos isEqualTo [0,0,0])) then {
_attackProfileStateParams set [0, STAGE_ATTACK_CRUISE];
TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d);
};
};
case STAGE_ATTACK_CRUISE: {
private _currentHeightOverTarget = (_projectilePos select 2) - (_seekerTargetPos select 2);
private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos;
private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos);
// arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack
private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true];
_returnTargetPos = +_seekerTargetPos;
_returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)];
if ((_distanceToTarget2d < 500) || {(_currentHeightOverTarget atan2 _distanceToTarget2d) > 15}) then { // Wait until we can come down at a sharp angle
_attackProfileStateParams set [0, STAGE_ATTACK_TERMINAL];
TRACE_2("New Stage: STAGE_ATTACK_TERMINAL",_distanceToTarget2d,_currentHeightOverTarget);
};
};
case STAGE_ATTACK_TERMINAL: {
private _distanceToTarget2d = _seekerTargetPos distance2d _projectilePos;
_returnTargetPos = _seekerTargetPos vectorAdd [0, 0, _distanceToTarget2d * 0.02];
};
};
// TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;

View File

@ -0,0 +1,46 @@
/*
* Author: PabstMirror
* Gets attack profile parameters for first run of hellfire attack profile function
*
* Arguments:
* 0: Seeker Target PosASL <ARRAY>
* 1: Guidance Arg Array <ARRAY>
* 2: Attack Profile State <ARRAY>
*
* Return Value:
* Nothing
*
* Example:
* [[], [], []] call ace_hellfire_fnc_getAttackProfileSettings;
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
_args params ["_firedEH", "_launchParams"];
_launchParams params ["", "", "", "_attackProfile"];
_firedEH params ["","","","","","","_projectile"];
private _attackConfig = configFile >> QEGVAR(missileguidance,AttackProfiles) >> _attackProfile;
// Launch (clearing terrain mask for LO/HI):
private _configLaunchHeightClear = getNumber (_attackConfig >> QGVAR(launchHeightClear));
// Get starting stage
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
};
};
// Set data in param array
_attackProfileStateParams set [0, _startingStage];
_attackProfileStateParams set [1, _configLaunchHeightClear];
TRACE_1("new shot settings",_attackProfileStateParams);

View File

@ -0,0 +1,76 @@
/*
* Author: PabstMirror
* Adds interaction menu actions to switch the firemode to a vehicle.
* Also adds a Laser Designator if vehicle is configured for one.
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Player's Turret Path <ARRAY>
*
* Return Value:
* Nothing
*
* Example:
* [(vehicle player), [0]] call ace_hellfire_fnc_setupVehicle
*
* Public: No
*/
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_vehicle", "_turretPath"];
TRACE_2("setupVehicle",_vehicle,_turretPath);
// Add laser if vehicle is configured for one:
if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then {
[{
params ["_vehicle", "_turretPath"];
TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath);
if (!alive _vehicle) exitWith {};
if (!(_vehicle turretLocal _turretPath)) then {WARNING("Turret not local");};
private _hasLaser = false;
{
// Most addons just use "Laserdesignator_mounted", but this should cover custom ones
if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Laser")) == 1) exitWith {
_hasLaser = true;
};
} forEach (_vehicle weaponsTurret _turretPath);
if (!_hasLaser) then {
TRACE_1("Adding Laser Designator",typeOf _vehicle);
_vehicle addWeaponTurret ["Laserdesignator_mounted", _turretPath];
_vehicle addMagazineTurret ["Laserbatteries", _turretPath];
};
}, _this, 1] call CBA_fnc_waitAndExecute; // Need to delay slightly for turret to become local (probably only needs a single frame)
};
// Add interaction menu actions:
if (_vehicle getVariable [QGVAR(actionsAdded), false]) exitWith {};
_vehicle setVariable [QGVAR(actionsAdded), true];
private _action = [QUOTE(ADDON), localize LSTRING(hellfireModeAction), "", {}, {true}] call EFUNC(interact_menu,createAction);
private _basePath = [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
private _fnc_statement = {
params ["_target", "", "_attackProfile"];
TRACE_2("statement",_target,_attackProfile);
_target setVariable [QEGVAR(missileguidance,attackProfile), _attackProfile];
};
private _fnc_condition = {
params ["_target", "_player", "_attackProfile"];
private _turretPath = if (ACE_player == (driver _target)) then {[-1]} else {ACE_player call CBA_fnc_turretPath};
private _hasWeapon = ({QGVAR(launcher) == _x} count (_target weaponsTurret _turretPath)) > 0;
(_hasWeapon) &&
{(_target getVariable [QEGVAR(missileguidance,attackProfile), "hellfire"]) != _attackProfile};
};
{
private _displayName = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _x >> "name");
private _action = [format [QGVAR(%1),_x], _displayName, "", _fnc_statement, _fnc_condition, {}, _x] call EFUNC(interact_menu,createAction);
[_vehicle, 1, _basePath, _action] call EFUNC(interact_menu,addActionToObject);
} forEach ["hellfire", "hellfire_hi", "hellfire_lo"];
TRACE_2("interactions added",_vehicle,typeOf _vehicle);

View File

@ -0,0 +1,124 @@
/*
* Author: PabstMirror
* Shows the hellfire hud when vehicle is equiped with the weapon.
* Shows laser code, fire mode and seeker status.
*
* Arguments:
* 0: Player <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [player] call ace_hellfire_fnc_showHud
*
* Public: No
*/
#include "script_component.hpp"
params ["_player"];
TRACE_1("showHud",_player);
private _enabled = false;
private _vehicle = vehicle _player;
private _turretPath = [-1];
if ((alive _player) && {_player != _vehicle}) then {
if (_player != (driver _vehicle)) then {
_turretPath = _player call CBA_fnc_turretPath
};
{
if ((getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled))) == 1) then {
TRACE_1("enabled",_x);
_enabled = true;
};
} forEach (_vehicle weaponsTurret _turretPath);
};
if ((!_enabled) && (GVAR(pfID) < 0)) exitWith {TRACE_2("Disabled - No Change",_enabled,GVAR(pfID));};
TRACE_2("Cleaning up old pfeh and display",_enabled,GVAR(pfID));
[GVAR(pfID)] call CBA_fnc_removePerFrameHandler;
if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
};
GVAR(pfID) = -1;
if (!_enabled) exitWith {TRACE_2("Disabled - Now Off",_enabled,GVAR(pfID));};
TRACE_2("Enabled - Adding actions and PFEH",_enabled,GVAR(pfID));
[_vehicle, _turretPath] call FUNC(setupVehicle);
private _adjustDown = false; // Flares display will block ours, if present just move ours down a bit
{
if ((getText (configFile >> "CfgWeapons" >> _x >> "simulation")) == "cmlauncher") exitWith {_adjustDown = true};
} forEach (_vehicle weaponsTurret _turretPath);
private _turretConfig = [_vehicle, _turretPath] call CBA_fnc_getTurret;
private _seekerSource = getText (_turretConfig >> "memoryPointGunnerOptics");
TRACE_3("",_adjustDown,_seekerSource,_vehicle selectionPosition _seekerSource);
GVAR(pfID) = [{
params ["_args", "_pfID"];
_args params ["_vehicle", "_turretPath", "_seekerSource", "_adjustDown"];
// Restart display if null (not just at start, this will happen periodicly)
if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then {
TRACE_1("creating display",_this);
([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false];
if (_adjustDown) then {
private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP;
private _pos = ctrlPosition _ctrl;
_pos set [1, (_pos select 1) + ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)];
_ctrl ctrlSetPosition _pos;
_ctrl ctrlCommit 0;
};
};
private _currentWeapon = _vehicle currentWeaponTurret _turretPath;
private _showLockMode = (getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(enabled))) == 1;
private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000;
if (!_showLockMode) exitWith {
_ctrlGroup ctrlShow false;
};
_ctrlGroup ctrlShow true;
private _ctrlText = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_ATTACKMODE;
private _ctrlCode = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_LASERCODE;
private _ctrlIcon = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_LASERICON;
// Do Laser Scan:
private _laserSource = AGLtoASL (_vehicle modelToWorld (_vehicle selectionPosition _seekerSource));
private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE];
private _laserResult = [_laserSource, vectorDir _vehicle, 70, 5000, [ACE_DEFAULT_LASER_WAVELENGTH,ACE_DEFAULT_LASER_WAVELENGTH], _laserCode, _vehicle] call EFUNC(laser,seekerFindLaserSpot);
private _foundTargetPos = _laserResult select 0;
private _haveLock = !isNil "_foundTargetPos";
private _modeShort = "ERR";
private _vehicleLockMode = _vehicle getVariable [QEGVAR(missileguidance,attackProfile), ""];
switch (_vehicleLockMode) do { // note: missileguidance is case sensitive
case ("hellfire_hi"): {
_modeShort = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name");
};
case ("hellfire_lo"): {
_modeShort = getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name");
};
default {
_vehicleLockMode = "hellfire";
_modeShort = if (_haveLock) then {
getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "nameLocked");
} else {
getText (configFile >> QEGVAR(missileguidance,AttackProfiles) >> _vehicleLockMode >> "name");
};
};
};
_ctrlIcon ctrlSetTextColor ([[0,0,0,0.25],[1,0,0,0.75]] select _haveLock);
_ctrlText ctrlSetText _modeShort;
_ctrlCode ctrlSetText format ["CODE: %1", _laserCode];
}, 0.1, [_vehicle, _turretPath, _seekerSource, _adjustDown]] call CBA_fnc_addPerFrameHandler;

View File

@ -0,0 +1 @@
#include "\z\ace\addons\hellfire\script_component.hpp"

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