diff --git a/AUTHORS.txt b/AUTHORS.txt index a6227478ed..737bfb590b 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -18,6 +18,7 @@ Kieran NouberNou PabstMirror Ruthberg +SilentSpike tpM ViperMaul VKing @@ -65,7 +66,7 @@ Hamburger SV Harakhti havena Hawkins -jokoho48 +jokoho482 ` Jonpas Kavinsky Kllrt @@ -89,9 +90,9 @@ Raspu86 Riccardo Petricca Robert Boklahánics ruPaladin -SilentSpike simon84 Sniperwolf572 +SzwedzikPL Tachi Toaster Tonic diff --git a/README.md b/README.md index a5d1d57306..72b1336b57 100644 --- a/README.md +++ b/README.md @@ -3,26 +3,24 @@ height="112">

- + - BIF thread - ACE license

diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll index 9d3708959c..dd19f1d0d4 100644 Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ diff --git a/ace_medical.dll b/ace_medical.dll index cab14d4a19..1f4f71d5ca 100644 Binary files a/ace_medical.dll and b/ace_medical.dll differ diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 5c72c9c06c..eed6e20be3 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -30,136 +30,166 @@ Zaawansowana balistyka Balística avanzada Erweiterte Ballistik + Pokročilá balistika Advanced Ballistics Zaawansowana balistyka Balística avanzada Erweiterte Ballistik + Pokročilá balistika Enables advanced ballistics Aktywuje zaawansowaną balistykę Activa la balística avanzada Aktiviert die erweiterte Ballistik + Aktivuje pokročilou balistiku Enabled For Snipers Activada para francotiradores + Akt. dla snajperów Für Scharfschützen aktiviert + Povoleno pro odstřelovače Enables advanced ballistics for non local snipers (when using high power optics) Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica) + Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki) Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung) + Aktivuje pokročilou balistiku pro nelokální odstřelovače (když používá výkonnou optiku) Enabled For Group Members Activada para miembros de grupo + Akt. dla czł. grupy Für Gruppenmitglieder aktiviert + Povoleno pro členy skupiny Enables advanced ballistics for non local group members Activada la balística avanzada para miembros de grupo no locales + Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder + Aktivuje pokročilou balistiku pro nelokální členy skupiny Enabled For Everyone Activada para todos + Akt. dla wszystkich Für jeden aktiviert + Povoleno pro všechny Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer) Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador). + Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia) Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen) + Aktivovat pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles snímu za sekundu během těžké přestřelky v multiplayeru) Always Enabled For Group Members Zawsze akt. dla czł. grupy Siempre activada para miembros de grupo Für Gruppenmitglieder immer aktiviert + Vždy povoleno pro členy skupiny Always enables advanced ballistics when a group member fires Aktywuje zaawansowaną balistykę dla wszystkich członków grupy Activada la balística avanzada siempre cuando miembros de grupo disparan Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt + Aktivuje pokročilou balistiku pro členy skupiny Disabled In FullAuto Mode Wył. podczas ognia auto. Desactivada en modo automático Beim vollautomatischen Feuern deaktiviert + Zakázáno v automatickém režimu střelby Disables the advanced ballistics during full auto fire Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego Desactivada la balística avanzada durante el fuego automático Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern + Zákáže pokročilou balistiku během střelby v režimu automat Enable Ammo Temperature Simulation Symulacja temp. amunicji Activar simulación de temperatura de munición Simulation der Munitionstemperatur aktivieren + Povolit simulaci teploty munice Muzzle velocity varies with ammo temperature Prędkość wylotowa pocisku jest zależna od temperatury amunicji La velocidad de salida varía con la temperatura de la munición Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit + Úsťová rychlost je závislá na teplotě munice Enable Barrel Length Simulation Symulacja długości lufy Habilitar la simulación de longitud del cañón Simulation der Lauflänge aktivieren + Povolit simulaci délky hlavně Muzzle velocity varies with barrel length Prędkość wylotowa pocisku jest zależna od długości lufy La velocidad de salidal varía con la longitud del cañón Lauflänge beeinflusst Mündungsgeschwindigkeit + Úsťová rychlost je závislá na délce hlavně Enable Bullet Trace Effect Efekt smugi pocisku Activar el efecto trazador de la bala Geschossspureffekt aktivieren + Povolit efekt trasírek Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics) Aktywuje efekt smugi pocisku dla pocisków wysokokalibrowych (widoczne tylko podczas patrzenia przez optykę) Activa el efecto trazador de la balas de gran calibre (solo visible cuando se mira a través de una mira telescópica) Aktiviere Geschossspureffekt für hohe Kaliber (bei Benutzung von Optiken mit starker Vergrößerung) + Aktivuje efekt trasírek z vysokokaliberních zbraní (viditelné pouze skrze výkonnou optiku) Simulation Interval Interwał symulacji Intervalo de simulación Simulationsintervall + Interval simulace Defines the interval between every calculation step Określa interwał pomiędzy każdym krokiem kalkulacji Define el intervalo entre cada cálculo Legt das Intervall zwischen den Berechnungsschritten fest + Určuje interval mezi každým výpočtem Simulation Radius Zasięg symulacji Radio de simulación Simulationsradius + Rozsah simulace Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles Określa obszar naokoło gracza (w metrach), na którym zaawansowana balistyka jest aplikowana dla pocisków Define el radio alrededor del jugador (en metros) en el cual se aplica la balística avanzada a los proyectiles Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird + Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki. + Tento modul umožňuje aktivovat pokročilou balistiku, která vypočítává trajektorii kulky a bere do úvahy věci jako je teplota vzduchu, atmosférický tlak, vlhkost vzduchu, gravitaci, typ munice a zbraň, ze které je náboj vystřelen. To vše přispívá k velmi přesné balistice. - + \ No newline at end of file diff --git a/addons/apl/data/Jezek_kov.rvmat b/addons/apl/data/Jezek_kov.rvmat new file mode 100644 index 0000000000..d2133e6b5a --- /dev/null +++ b/addons/apl/data/Jezek_kov.rvmat @@ -0,0 +1,79 @@ +ambient[]={1.000000,1.000000,1.000000,1.000000}; +diffuse[]={1.000000,1.000000,1.000000,1.000000}; +forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; +emmisive[]={0.000000,0.000000,0.000000,1.000000}; +specular[]={1.000000,1.000000,1.000000,1.000000}; +specularPower=83.900002; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 { + texture="z\ace\addons\apl\data\jezek_texture_NOHQ.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage2 { + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage4 { + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage5 { + texture="z\ace\addons\apl\data\jezek_texture_SMDI.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage6 { + texture="#(ai,32,128,1)fresnel(1.85,0.64)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage7 { + texture="a3\data_f\env_land_co.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; diff --git a/addons/apl/data/barbwire_a_co.paa b/addons/apl/data/barbwire_a_co.paa new file mode 100644 index 0000000000..1809c2c08e Binary files /dev/null and b/addons/apl/data/barbwire_a_co.paa differ diff --git a/addons/apl/data/barbwire_a_nohq.paa b/addons/apl/data/barbwire_a_nohq.paa new file mode 100644 index 0000000000..5612dc460a Binary files /dev/null and b/addons/apl/data/barbwire_a_nohq.paa differ diff --git a/addons/apl/data/barbwire_a_ns.rvmat b/addons/apl/data/barbwire_a_ns.rvmat new file mode 100644 index 0000000000..0a6ad7c316 --- /dev/null +++ b/addons/apl/data/barbwire_a_ns.rvmat @@ -0,0 +1,78 @@ +ambient[]={1.000000,1.000000,1.000000,1.000000}; +diffuse[]={1.000000,1.000000,1.000000,1.000000}; +forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; +emmisive[]={0.000000,0.000000,0.000000,1.000000}; +specular[]={1.000000,1.000000,1.000000,0.000000}; +specularPower=16.000000; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 { + texture="z\ace\addons\apl\data\BarbWire_A_NOHQ.tga"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage2 { + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage4 { + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage5 { + texture="#(argb,8,8,3)color(0,0,1,1,SMDI)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage6 { + texture="#(ai,32,128,1)fresnel(0.01,0.01)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage7 { + texture="#(argb,8,8,3)color(0,0,0,1,CO)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; diff --git a/addons/apl/data/default_vehicle_ti_ca.paa b/addons/apl/data/default_vehicle_ti_ca.paa new file mode 100644 index 0000000000..53ca8a62b7 Binary files /dev/null and b/addons/apl/data/default_vehicle_ti_ca.paa differ diff --git a/addons/apl/data/glass_House.bisurf b/addons/apl/data/glass_House.bisurf new file mode 100644 index 0000000000..b8b91bb2a6 --- /dev/null +++ b/addons/apl/data/glass_House.bisurf @@ -0,0 +1,10 @@ +Density=2400; +rough=0; +dust=0; +bulletPenetrability=50; +soundEnviron=Empty; +isWater=false; +friction=0.1; +restitution=0.1; +impact = Hit_Glass; +soundHit = glass; \ No newline at end of file diff --git a/addons/apl/data/glass_house.rvmat b/addons/apl/data/glass_house.rvmat new file mode 100644 index 0000000000..004fd8c6e5 --- /dev/null +++ b/addons/apl/data/glass_house.rvmat @@ -0,0 +1 @@ +surfaceInfo="z\ace\addons\apl\data\glass_House.bisurf"; \ No newline at end of file diff --git a/addons/apl/data/jezek_texture_co.paa b/addons/apl/data/jezek_texture_co.paa new file mode 100644 index 0000000000..7b2e16d0e7 Binary files /dev/null and b/addons/apl/data/jezek_texture_co.paa differ diff --git a/addons/apl/data/jezek_texture_nohq.paa b/addons/apl/data/jezek_texture_nohq.paa new file mode 100644 index 0000000000..6a34328e5f Binary files /dev/null and b/addons/apl/data/jezek_texture_nohq.paa differ diff --git a/addons/apl/data/jezek_texture_smdi.paa b/addons/apl/data/jezek_texture_smdi.paa new file mode 100644 index 0000000000..415d98a09f Binary files /dev/null and b/addons/apl/data/jezek_texture_smdi.paa differ diff --git a/addons/apl/data/metal4_weapons_vehicles_int_512_dt.paa b/addons/apl/data/metal4_weapons_vehicles_int_512_dt.paa new file mode 100644 index 0000000000..a023628a55 Binary files /dev/null and b/addons/apl/data/metal4_weapons_vehicles_int_512_dt.paa differ diff --git a/addons/apl/data/plastic.bisurf b/addons/apl/data/plastic.bisurf new file mode 100644 index 0000000000..84984886ec --- /dev/null +++ b/addons/apl/data/plastic.bisurf @@ -0,0 +1,10 @@ +Density=1380; +rough=0.1; +dust=0; +bulletPenetrability=150; +soundEnviron=Empty; +isWater=false; +friction=0.7; +restitution=0.3; +impact = default_Mat; +soundHit = plastic; \ No newline at end of file diff --git a/addons/apl/data/plastic.rvmat b/addons/apl/data/plastic.rvmat new file mode 100644 index 0000000000..6cf20f3d7f --- /dev/null +++ b/addons/apl/data/plastic.rvmat @@ -0,0 +1,4 @@ +surfaceInfo="z\ace\addons\apl\data\plastic.bisurf"; + +diffuse[]={0.5,0.5,1.0,1.000000}; +ambient[]={0.5,0.5,1.0,1.000000}; \ No newline at end of file diff --git a/addons/apl/data/plastic_512_dt.paa b/addons/apl/data/plastic_512_dt.paa new file mode 100644 index 0000000000..62c48c90a4 Binary files /dev/null and b/addons/apl/data/plastic_512_dt.paa differ diff --git a/addons/apl/data/plech.paa b/addons/apl/data/plech.paa new file mode 100644 index 0000000000..240e1ce03f Binary files /dev/null and b/addons/apl/data/plech.paa differ diff --git a/addons/apl/data/vehicle_destr1024_1024_mc.paa b/addons/apl/data/vehicle_destr1024_1024_mc.paa new file mode 100644 index 0000000000..68dfc1b977 Binary files /dev/null and b/addons/apl/data/vehicle_destr1024_1024_mc.paa differ diff --git a/addons/apl/data/vehicle_destr1024_1024_smdi.paa b/addons/apl/data/vehicle_destr1024_1024_smdi.paa new file mode 100644 index 0000000000..2a2cfc0357 Binary files /dev/null and b/addons/apl/data/vehicle_destr1024_1024_smdi.paa differ diff --git a/addons/apl/sounds/padak_let.wss b/addons/apl/sounds/padak_let.wss new file mode 100644 index 0000000000..19476becd8 Binary files /dev/null and b/addons/apl/sounds/padak_let.wss differ diff --git a/addons/atragmx/CfgVehicles.hpp b/addons/atragmx/CfgVehicles.hpp index 9e70047013..65ef589d0f 100644 --- a/addons/atragmx/CfgVehicles.hpp +++ b/addons/atragmx/CfgVehicles.hpp @@ -10,7 +10,7 @@ class CfgVehicles { showDisabled = 0; priority = 2; icon = PATHTOF(UI\ATRAG_Icon.paa); - exceptions[] = {"notOnMap", "isNotInside"}; + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; }; diff --git a/addons/atragmx/initKeybinds.sqf b/addons/atragmx/initKeybinds.sqf index a000a106f4..51d2338292 100644 --- a/addons/atragmx/initKeybinds.sqf +++ b/addons/atragmx/initKeybinds.sqf @@ -1,7 +1,7 @@ ["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; if (GVAR(active)) exitWith { closeDialog 0; false @@ -11,4 +11,26 @@ false }, {false}, -[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) \ No newline at end of file +[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) + + +//Add deviceKey entry: +private ["_conditonCode", "_toggleCode", "_closeCode"]; +_conditonCode = { + [] call FUNC(can_show); +}; +_toggleCode = { + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {}; + if (GVAR(active)) exitWith { + closeDialog 0; + }; + // Statement + [] call FUNC(create_dialog); +}; +_closeCode = { + if (GVAR(active)) exitWith { + closeDialog 0; + }; +}; +[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 90c305329b..92df83b5c1 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -60,7 +60,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then detach _attachedObject; _attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]); // Delete attached item after 0.5 seconds - [{deleteVehicle (_this select 0)}, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute); + [{deleteVehicle (_this select 0)}, [_attachedObject], 2] call EFUNC(common,waitAndExecute); } else { // Delete attached item deleteVehicle _attachedObject; diff --git a/addons/ballistics/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp index 622dd7d0d1..bb50dcdc2e 100644 --- a/addons/ballistics/CfgVehicles.hpp +++ b/addons/ballistics/CfgVehicles.hpp @@ -225,5 +225,27 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4); }; + class AnimationSources { + class Ammo_source { + source = "user"; + animPeriod = 1; + initPhase = 0; + }; + class AmmoOrd_source { + source = "user"; + animPeriod = 1; + initPhase = 1; + }; + class Grenades_source { + source = "user"; + animPeriod = 1; + initPhase = 1; + }; + class Support_source { + source = "user"; + animPeriod = 1; + initPhase = 1; + }; + }; }; }; diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index 96e4f720a6..171d7936b8 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1597,6 +1597,7 @@ [ACE] Skrzynka z amunicją [ACE] Caja de suministros de munición [ACE] Munitionskiste + [ACE] Bedna s municí - + \ No newline at end of file diff --git a/addons/captives/ACE_Settings.hpp b/addons/captives/ACE_Settings.hpp new file mode 100644 index 0000000000..73bafbab41 --- /dev/null +++ b/addons/captives/ACE_Settings.hpp @@ -0,0 +1,14 @@ +class ACE_Settings { + class GVAR(allowHandcuffOwnSide) { + displayName = CSTRING(ModuleSettings_handcuffSide_name); + description = CSTRING(ModuleSettings_handcuffSide_description); + typeName = "BOOL"; + value = 1; + }; + class GVAR(allowSurrender) { + displayName = CSTRING(ModuleSettings_allowSurrender_name); + description = CSTRING(ModuleSettings_allowSurrender_description); + typeName = "BOOL"; + value = 1; + }; +}; diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index a90d1ce478..746a1c4b63 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -56,15 +56,12 @@ class CfgVehicles { priority = 2.2; hotkey = "L"; }; - class ACE_FriskPerson { - displayName = CSTRING(FriskPerson); - distance = 2; - condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson)); - statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson)); - showDisabled = 0; - //icon = ""; //@todo - priority = 3; - hotkey = "F"; + class GVAR(UnloadCaptive) { + displayName = CSTRING(UnloadCaptive); + distance = 4; + condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); + statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); + priority = 1.2; }; }; }; @@ -86,6 +83,7 @@ class CfgVehicles { exceptions[] = {}; showDisabled = 0; priority = 0; + icon = QUOTE(PATHTOF(UI\Surrender_ca.paa)); }; class ACE_StopSurrenderingSelf { displayName = CSTRING(StopSurrendering); @@ -94,6 +92,7 @@ class CfgVehicles { exceptions[] = {"isNotSurrendering"}; showDisabled = 0; priority = 0; + icon = QUOTE(PATHTOF(UI\Surrender_ca.paa)); }; }; }; @@ -109,13 +108,6 @@ class CfgVehicles { exceptions[] = {"isNotEscorting"}; \ priority = 1.2; \ }; \ - class GVAR(UnloadCaptive) { \ - displayName = CSTRING(UnloadCaptive); \ - distance = 4; \ - condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \ - statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \ - priority = 1.2; \ - }; \ }; \ }; @@ -162,7 +154,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(ModuleSurrender_DisplayName); //Make Unit Surrender - function = QUOTE(DFUNC(moduleSurrender)); + function = QFUNC(moduleSurrender); scope = 2; //show in editor isGlobal = 1; //run global isTriggerActivated = 1; //Wait for triggers @@ -174,4 +166,33 @@ class CfgVehicles { sync[] = {"AnyAI"}; }; }; + + class ACE_Module: Module_F {}; + class GVAR(moduleSettings): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE"; + displayName = CSTRING(ModuleSettings_DisplayName); + function = QFUNC(moduleSettings); + scope = 2; + icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa)); + isGlobal = 1; + class Arguments { + class allowHandcuffOwnSide { + displayName = CSTRING(ModuleSettings_handcuffSide_name); + description = CSTRING(ModuleSettings_handcuffSide_description); + typeName = "BOOL"; + defaultValue = 1; + }; + class allowSurrender { + displayName = CSTRING(ModuleSettings_allowSurrender_name); + description = CSTRING(ModuleSettings_allowSurrender_description); + typeName = "BOOL"; + defaultValue = 1; + }; + }; + class ModuleDescription: ModuleDescription { + description = CSTRING(ModuleSettings_Description); + sync[] = {}; + }; + }; }; diff --git a/addons/captives/UI/Icon_Module_settings_ca.paa b/addons/captives/UI/Icon_Module_settings_ca.paa new file mode 100644 index 0000000000..365f02cb21 Binary files /dev/null and b/addons/captives/UI/Icon_Module_settings_ca.paa differ diff --git a/addons/captives/UI/Surrender_ca.paa b/addons/captives/UI/Surrender_ca.paa new file mode 100644 index 0000000000..6ddabf4d56 Binary files /dev/null and b/addons/captives/UI/Surrender_ca.paa differ diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index bc6a61bc4f..31bcbe8e02 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -24,6 +24,7 @@ PREP(handlePlayerChanged); PREP(handleRespawn); PREP(handleUnitInitPost); PREP(handleZeusDisplayChanged); +PREP(moduleSettings); PREP(moduleSurrender); PREP(setHandcuffed); PREP(setSurrendered); diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp index 57de6ee970..cdaf6dc4e4 100644 --- a/addons/captives/config.cpp +++ b/addons/captives/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - units[] = {QGVAR(ModuleSurrender)}; + units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender)}; weapons[] = {"ACE_CableTie"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_Interaction"}; @@ -12,6 +12,7 @@ class CfgPatches { }; }; +#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" #include "CfgMoves.hpp" #include "CfgVehicles.hpp" diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index f69bb2544d..e42b5455ff 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -18,8 +18,9 @@ PARAMS_2(_unit,_target); -//Player has cableTie, target is alive and not already handcuffed +//Check sides, Player has cableTie, target is alive and not already handcuffed +(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && ("ACE_CableTie" in (items _unit)) && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index 85bd8bbd3e..1d9480fd0b 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -23,4 +23,6 @@ PARAMS_2(_unit,_target); (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && {alive _target} && -{!(_target getVariable ["ACE_isUnconscious", false])} +{!(_target getVariable ["ACE_isUnconscious", false])} && +{(vehicle _unit) == _unit} && +{(vehicle _target) == _target} diff --git a/addons/captives/functions/fnc_canSurrender.sqf b/addons/captives/functions/fnc_canSurrender.sqf index 9ba7cf6de0..059fb98d03 100644 --- a/addons/captives/functions/fnc_canSurrender.sqf +++ b/addons/captives/functions/fnc_canSurrender.sqf @@ -22,7 +22,7 @@ private "_returnValue"; _returnValue = if (_newSurrenderState) then { //no weapon equiped AND not currently surrendering and - (currentWeapon _unit == "") && {!(_unit getVariable [QGVAR(isSurrendering), false])} + GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])} } else { //is Surrendering (_unit getVariable [QGVAR(isSurrendering), false]) diff --git a/addons/captives/functions/fnc_canUnloadCaptive.sqf b/addons/captives/functions/fnc_canUnloadCaptive.sqf index a86bdae588..59e798a24c 100644 --- a/addons/captives/functions/fnc_canUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_canUnloadCaptive.sqf @@ -3,15 +3,14 @@ * Check if the unit can unload a captive from the vehicle. * * Arguments: - * 0: Unit that wants to unload a captive - * 1: A captive. ObjNull for the first escorted captive - * 2: Vehicle to unload a captive from + * 0: Unit that wants to unload a captive (player) + * 1: A captive loaded in a vehicle * * Return Value: * The return value * * Example: - * [player, bob, car1] call ACE_captives_fnc_canUnloadCaptive; + * [player, bob] call ACE_captives_fnc_canUnloadCaptive; * * Public: No */ @@ -19,10 +18,6 @@ private ["_cargo"]; -PARAMS_2(_unit,_vehicle); +PARAMS_2(_player,_unit); -_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway. - -_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter); - -count _cargo > 0 +((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]} diff --git a/addons/captives/functions/fnc_doUnloadCaptive.sqf b/addons/captives/functions/fnc_doUnloadCaptive.sqf index b7fa57a7bb..5d95189742 100644 --- a/addons/captives/functions/fnc_doUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_doUnloadCaptive.sqf @@ -4,29 +4,18 @@ * * Arguments: * 0: Unit that wants to unload a captive - * 1: Vehicle to unload a captive from. + * 1: A captive loaded in a vehicle * * Return Value: * Nothing * * Example: - * [bob, car] call ACE_captives_fnc_doUnloadCaptive + * [bob, prisoner] call ACE_captives_fnc_doUnloadCaptive * * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_vehicle); +PARAMS_2(_unit,_target); -private ["_cargo", "_target"]; - -_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway. - -_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter); - -if ((count _cargo) > 0) then { - _target = _cargo select 0; - ["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent); -} else { - ERROR("No captive to unload"); -}; +["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent); diff --git a/addons/captives/functions/fnc_moduleSettings.sqf b/addons/captives/functions/fnc_moduleSettings.sqf new file mode 100644 index 0000000000..c12ac80b99 --- /dev/null +++ b/addons/captives/functions/fnc_moduleSettings.sqf @@ -0,0 +1,19 @@ +/* + * Author: PabstMirror + * Module for captivity settings + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +PARAMS_1(_logic); + +[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule); diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 4e329675d1..19ab9050a3 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -140,7 +140,7 @@ Rendirse Render-se Vzdát se - Poddaj się + Kapituluj Сдаться Megadás Arrenditi @@ -159,15 +159,53 @@ Make Unit Surrender - Poddaj się! + Skapituluj jednostkę Hacer que la unidad se rinda Einheit kapitulieren lassen + Vzdávající se jednotka Sync a unit to make them surrender.<br />Source: ace_captives - Zsynchronizuj z jednostką aby sprawić by się poddała<br />Źródło: ace_captives + Zsynchronizuj z jednostką, aby skapitulowała.<br />Źródło: ace_captives Sincroniza una unidad para hacer que se rinda.<br />Fuente: ace_captives Einheit synchronisieren, um sie kapitulieren zu lassen.<br />Quelle: ace_captives + Synchronizuj s jednotkou, která se má vzdát.<br />Zdroj: ace_captives + + + Captives Settings + Ustawienia więźniów + Ajustes de prisioneros + Nastavení zajatce + + + Controls settings for surrender and cable ties + Moduł ten kontroluje ustawienia kapitulacji oraz opasek zaciskowych + Ajustes de control para rendición y precintos + Toto kontroluje nastavení kapitulace a pout + + + Can handcuff own side + Skuwanie sojuszników + Se puede esposar el bando propio + Může spoutat spolubojovníky + + + Can players cabletie units on their own side + Czy gracze mogą skuwać sojuszników? + Pueden los jugadores esposar unidades en su propio bando + Mohou hráči spoutat jednotky na své straně + + + Allow surrendering + Pozwól kapitulować + Permitir rendición + Povolit vzdávání + + + Players can surrender after holstering their weapon + Gracze mogą skapitulować po schowaniu swojej broni do kabury + Los jugadores pueden rendirse después de enfundar su arma + Hráč se může vzdát poté, co si skryje zbraň - + \ No newline at end of file diff --git a/addons/common/ACE_Settings.hpp b/addons/common/ACE_Settings.hpp new file mode 100644 index 0000000000..d6226fd0ab --- /dev/null +++ b/addons/common/ACE_Settings.hpp @@ -0,0 +1,75 @@ +class ACE_Settings { + /* + * class GVAR(sampleSetting) { + * value = 1; // Value + * typeName = "SCALAR"; // Type (SCALAR, BOOL, STRING, ARRAY, COLOR) + * force = 0; // Force the setting? + * isClientSettable = 1; // Does it appear on the options menu? + * + * // The following settings only apply when isClientSettable == 1 + * displayName = "$STR_ACE_Common_SettingName"; // Stringtable entry with the setting name + * description = "$STR_ACE_Common_SettingDescription"; // Stringtable entry with the setting description + * + * // Only applies if typeName == "SCALAR"; + * values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; // Stringtable entries that describe the options + * }; + */ + class GVAR(forceAllSettings) { + value = 0; + typeName = "BOOL"; + }; + class GVAR(checkPBOsAction) { + value = 0; + typeName = "SCALAR"; + isClientSettable = 0; + values[] = {CSTRING(CheckPBO_Action_WarnOnce), CSTRING(CheckPBO_Action_WarnPerm), CSTRING(CheckPBO_Action_Kick)}; + }; + class GVAR(checkPBOsCheckAll) { + value = 0; + typeName = "BOOL"; + isClientSettable = 0; + }; + class GVAR(checkPBOsWhitelist) { + value = "[]"; + typeName = "STRING"; + isClientSettable = 0; + }; + /*class GVAR(enableNumberHotkeys) { + value = 1; + typeName = "BOOL"; + isClientSettable = 1; + displayName = CSTRING(EnableNumberHotkeys); + };*/ + class GVAR(settingFeedbackIcons) { + value = 1; + typeName = "SCALAR"; + force = 0; + isClientSettable = 1; + displayName = CSTRING(SettingFeedbackIconsName); + description = CSTRING(SettingFeedbackIconsDesc); + values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)}; + }; + class GVAR(SettingProgressBarLocation) { + value = 0; + typeName = "SCALAR"; + force = 0; + isClientSettable = 1; + displayName = CSTRING(SettingProgressbarLocationName); + description = CSTRING(SettingProgressbarLocationDesc); + values[] = {ECSTRING(optionsmenu,Top), ECSTRING(optionsmenu,Bottom)}; + }; + class GVAR(displayTextColor) { + value[] = {0,0,0,0.1}; + typeName = "COLOR"; + isClientSettable = 1; + displayName = CSTRING(SettingDisplayTextColorName); + description = CSTRING(SettingDisplayTextColorDesc); + }; + class GVAR(displayTextFontColor) { + value[] = {1,1,1,1}; + typeName = "COLOR"; + isClientSettable = 1; + displayName = CSTRING(SettingDisplayTextFontColorName); + description = CSTRING(SettingDisplayTextFontColorDesc); + }; +}; diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index eb50bc9f5a..767822f4ea 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -1,111 +1,109 @@ class CfgVehicles { - /*class Man; - class CAManBase: Man { - // @todo - class UserActions { - class ACE_Fire { - displayName = ""; - priority = -99; - available = 1; - radius = 2.5; - radiusView = 0; - position = ""; - showWindow = 0; - showIn3D = 0; - onlyForPlayer = 1; - shortcut = "DefaultAction"; - condition = QUOTE(call GVAR(UserActionFireCondition)); - statement = QUOTE(call GVAR(UserActionFire)); - userActionID = 100; - }; - }; - };*/ + /*class Man; + class CAManBase: Man { + // @todo + class UserActions { + class ACE_Fire { + displayName = ""; + priority = -99; + available = 1; + radius = 2.5; + radiusView = 0; + position = ""; + showWindow = 0; + showIn3D = 0; + onlyForPlayer = 1; + shortcut = "DefaultAction"; + condition = QUOTE(call GVAR(UserActionFireCondition)); + statement = QUOTE(call GVAR(UserActionFire)); + userActionID = 100; + }; + }; + };*/ - // += needs a non inherited entry in that class, otherwise it simply overwrites - //#include + // += needs a non inherited entry in that class, otherwise it simply overwrites + //#include class Logic; class Module_F: Logic { class ModuleDescription; }; class ACE_Module: Module_F {}; class ACE_ModuleCheckPBOs: ACE_Module { - author = CSTRING(ACETeam); - category = "ACE"; - displayName = CSTRING(CheckPBO_DisplayName); - function = QFUNC(moduleCheckPBOs); - scope = 2; - isGlobal = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa)); - class Arguments { - class Action { - displayName = CSTRING(CheckPBO_Action_DisplayName); - description = CSTRING(CheckPBO_Action_Description); - class values { - class WarnOnce { - default = 1; - name = CSTRING(CheckPBO_Action_WarnOnce); - value = 0; - }; - class Warn { - name = CSTRING(CheckPBO_Action_WarnPerm); - value = 1; - }; - class Kick { - name = CSTRING(CheckPBO_Action_Kick); - value = 2; - }; + author = CSTRING(ACETeam); + category = "ACE"; + displayName = CSTRING(CheckPBO_DisplayName); + function = QFUNC(moduleCheckPBOs); + scope = 2; + isGlobal = 1; + icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa)); + class Arguments { + class Action { + displayName = CSTRING(CheckPBO_Action_DisplayName); + description = CSTRING(CheckPBO_Action_Description); + typeName = "NUMBER"; + class values { + class WarnOnce { + default = 1; + name = CSTRING(CheckPBO_Action_WarnOnce); + value = 0; + }; + class Warn { + name = CSTRING(CheckPBO_Action_WarnPerm); + value = 1; + }; + class Kick { + name = CSTRING(CheckPBO_Action_Kick); + value = 2; + }; + }; + }; + class CheckAll { + displayName = CSTRING(CheckPBO_CheckAll_DisplayName); + description = CSTRING(CheckPBO_CheckAll_Description); + typeName = "BOOL"; + defaultValue = 0; + }; + class Whitelist { + displayName = CSTRING(CheckPBO_Whitelist_DisplayName); + description = CSTRING(CheckPBO_Whitelist_Description); + typeName = "STRING"; + defaultValue = "[]"; + }; }; - }; - class CheckAll { - displayName = CSTRING(CheckPBO_CheckAll_DisplayName); - description = CSTRING(CheckPBO_CheckAll_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - class Whitelist { - displayName = CSTRING(CheckPBO_Whitelist_DisplayName); - description = CSTRING(CheckPBO_Whitelist_Description); - typeName = "STRING"; - class values { - default = "[]"; + class ModuleDescription: ModuleDescription { + description = CSTRING(CheckPBO_Description); }; - }; }; - class ModuleDescription: ModuleDescription { - description = CSTRING(CheckPBO_Description); - }; - }; - class ACE_ModuleLSDVehicles: ACE_Module { - author = CSTRING(ACETeam); - category = "ACE"; - displayName = CSTRING(LSDVehicles_DisplayName); - function = "ACE_Common_fnc_moduleLSDVehicles"; - scope = 2; - icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa)); - isGlobal = 1; - class Arguments { + class ACE_ModuleLSDVehicles: ACE_Module { + author = CSTRING(ACETeam); + category = "ACE"; + displayName = CSTRING(LSDVehicles_DisplayName); + function = "ACE_Common_fnc_moduleLSDVehicles"; + scope = 2; + icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa)); + isGlobal = 1; + class Arguments {}; + class ModuleDescription: ModuleDescription { + description = CSTRING(LSDVehicles_Description); + sync[] = {"AnyVehicle"}; + }; }; - class ModuleDescription: ModuleDescription { - description = CSTRING(LSDVehicles_Description); - sync[] = {"AnyVehicle"}; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + author = CSTRING(ACETeam); + displayName = CSTRING(MiscItems); + transportMaxWeapons = 9001; + transportMaxMagazines = 9001; + transportMaxItems = 9001; + maximumload = 9001; + + class TransportWeapons {}; + class TransportMagazines {}; + class TransportItems {}; + class TransportBackpacks {}; }; - }; - - class Box_NATO_Support_F; - class ACE_Box_Misc: Box_NATO_Support_F { - author = CSTRING(ACETeam); - displayName = CSTRING(MiscItems); - transportMaxWeapons = 9001; - transportMaxMagazines = 9001; - transportMaxItems = 9001; - maximumload = 9001; - - class TransportWeapons {}; - class TransportMagazines {}; - class TransportItems {}; - class TransportBackpacks {}; - }; class Item_Base_F; class ACE_bananaItem: Item_Base_F { @@ -114,10 +112,8 @@ class CfgVehicles { displayName = CSTRING(bananaDisplayName); author = CSTRING(ACETeam); vehicleClass = "Items"; - class TransportItems - { - class ACE_banana - { + class TransportItems { + class ACE_banana { name = "ACE_banana"; count = 1; }; diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index 9fd402f081..bad8a2b427 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -15,8 +15,12 @@ class RscInGameUI { class RscUnitInfoTank: RscUnitInfo { onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent);); }; + + class RscUnitInfoAirNoWeapon: RscUnitInfo { + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent);); + }; - class RscUnitInfoAir: RscUnitInfo { + class RscUnitInfoAir: RscUnitInfoAirNoWeapon { onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent);); }; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 643d4cb9d3..3796a4fdc8 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -3,6 +3,27 @@ //IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent"); +//Singe PFEH to handle execNextFrame and waitAndExec: +[{ + private ["_entry"]; + + //Handle the waitAndExec array: + while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do { + _entry = GVAR(waitAndExecArray) deleteAt 0; + (_entry select 2) call (_entry select 1); + }; + + //Handle the execNextFrame array: + { + (_x select 0) call (_x select 1); + } forEach GVAR(nextFrameBufferA); + //Swap double-buffer: + GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB); + GVAR(nextFrameBufferB) = []; + GVAR(nextFrameNo) = diag_frameno + 1; +}, 0, []] call CBA_fnc_addPerFrameHandler; + + // Listens for global "SettingChanged" events, to update the force status locally ["SettingChanged", { PARAMS_2(_name,_value); @@ -20,6 +41,8 @@ ["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler); ["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler); +["unloadPersonEvent", DFUNC(unloadPersonLocal)] call FUNC(addEventhandler); + ["lockVehicle", { _this setVariable [QGVAR(lockStatus), locked _this]; _this lock 2; @@ -80,6 +103,52 @@ if(!isServer) then { call FUNC(checkFiles); + +// Create a pfh to wait until all postinits are ready and settings are initialized +[{ + PARAMS_1(_args); + EXPLODE_1_PVT(_args,_waitingMsgSent); + // If post inits are not ready then wait + if !(SLX_XEH_MACHINE select 8) exitWith {}; + + // If settings are not initialized then wait + if (isNil QGVAR(settings) || {(!isServer) && (isNil QEGVAR(modules,serverModulesRead))}) exitWith { + if (!_waitingMsgSent) then { + _args set [0, true]; + diag_log text format["[ACE] Waiting on settings from server"]; + }; + }; + + [(_this select 1)] call cba_fnc_removePerFrameHandler; + + diag_log text format["[ACE] Settings received from server"]; + + // Event so that ACE_Modules have their settings loaded: + ["InitSettingsFromModules", []] call FUNC(localEvent); + + // Load user settings from profile + if (hasInterface) then { + call FUNC(loadSettingsFromProfile); + call FUNC(loadSettingsLocalizedText); + }; + + diag_log text format["[ACE] Settings initialized"]; + + //Event that settings are safe to use: + ["SettingsInitialized", []] call FUNC(localEvent); + +}, 0, [false]] call cba_fnc_addPerFrameHandler; + + +["SettingsInitialized", { + [ + GVAR(checkPBOsAction), + GVAR(checkPBOsCheckAll), + call compile GVAR(checkPBOsWhitelist) + ] call FUNC(checkPBOs) +}] call FUNC(addEventHandler); + + /***************************************************************/ /***************************************************************/ /***************************************************************/ @@ -248,39 +317,41 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then { }, 0, []] call cba_fnc_addPerFrameHandler; }; +//Device Handler: +GVAR(deviceKeyHandlingArray) = []; +GVAR(deviceKeyCurrentIndex) = -1; + +["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"), +{ + [] call FUNC(deviceKeyFindValidIndex); + if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false}; + [] call ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 3); + true +}, +{false}, +[0xC7, [false, false, false]], false] call cba_fnc_addKeybind; //Home Key + +["ACE3 Equipment", QGVAR(closeDevice), (localize "STR_ACE_Common_closeHandheldDevice"), +{ + [] call FUNC(deviceKeyFindValidIndex); + if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false}; + [] call ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 4); + true +}, +{false}, +[0xC7, [false, true, false]], false] call cba_fnc_addKeybind; //CTRL + Home Key + +["ACE3 Equipment", QGVAR(cycleDevice), (localize "STR_ACE_Common_cycleHandheldDevices"), +{ + [1] call FUNC(deviceKeyFindValidIndex); + if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false}; + _displayName = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 0); + _iconImage = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 1); + [_displayName, _iconImage] call FUNC(displayTextPicture); + true +}, +{false}, +[0xC7, [true, false, false]], false] call cba_fnc_addKeybind; //SHIFT + Home Key + + GVAR(commonPostInited) = true; - -// Create a pfh to wait until all postinits are ready and settings are initialized -[{ - PARAMS_1(_args); - EXPLODE_1_PVT(_args,_waitingMsgSent); - // If post inits are not ready then wait - if !(SLX_XEH_MACHINE select 8) exitWith {}; - - // If settings are not initialized then wait - if (isNil QGVAR(settings)) exitWith { - if (!_waitingMsgSent) then { - _args set [0, true]; - diag_log text format["[ACE] Waiting on settings from server"]; - }; - }; - - [(_this select 1)] call cba_fnc_removePerFrameHandler; - - diag_log text format["[ACE] Settings received from server"]; - - // Event so that ACE_Modules have their settings loaded: - ["InitSettingsFromModules", []] call FUNC(localEvent); - - // Load user settings from profile - if (hasInterface) then { - call FUNC(loadSettingsFromProfile); - call FUNC(loadSettingsLocalizedText); - }; - - diag_log text format["[ACE] Settings initialized"]; - - //Event that settings are safe to use: - ["SettingsInitialized", []] call FUNC(localEvent); - -}, 0, [false]] call cba_fnc_addPerFrameHandler; diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 4d93705898..72e85e4b6b 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -11,7 +11,6 @@ PREP(addCanInteractWithCondition); PREP(addLineToDebugDraw); PREP(addSetting); PREP(addToInventory); -PREP(adminKick); PREP(ambientBrightness); PREP(applyForceWalkStatus); PREP(ASLToPosition); @@ -35,6 +34,8 @@ PREP(currentChannel); PREP(debug); PREP(debugModule); PREP(defineVariable); +PREP(deviceKeyFindValidIndex); +PREP(deviceKeyRegisterNew); PREP(disableAI); PREP(disableUserInput); PREP(displayIcon); @@ -287,7 +288,12 @@ PREP(_handleRequestSyncedEvent); PREP(_handleRequestAllSyncedEvents); GVAR(syncedEvents) = HASH_CREATE; + +//GVARS for execNextFrame and waitAndExec GVAR(waitAndExecArray) = []; +GVAR(nextFrameNo) = diag_frameno; +GVAR(nextFrameBufferA) = []; +GVAR(nextFrameBufferB) = []; // @TODO: Generic local-managed global-synced objects (createVehicleLocal) diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 6237e047fd..f1bca395f8 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -57,77 +57,7 @@ class ACE_Rsc_Control_Base { h = 0; }; -class ACE_Settings { - /* - *class GVAR(sampleSetting) { - * Value - * value = 1; - * - * Type (SCALAR, BOOL, STRING, ARRAY, COLOR) - * typeName = "SCALAR"; - * - * Force the setting? - * force = 0; - * - * Does it appear on the options menu? - * isClientSettable = 1; - * - * The following settings only apply when isClientSettable == 1 - * Stringtable entry with the setting name - * displayName = CSTRING(SettingName); - * - * Stringtable entry with the setting description - * description = CSTRING(SettingDescription); - * - * Stringtable entries that describe the options - * Only applies if typeName == "SCALAR"; - * values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; - *}; - */ - class GVAR(forceAllSettings) { - value = 0; - typeName = "BOOL"; - }; - /*class GVAR(enableNumberHotkeys) { - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(EnableNumberHotkeys); - };*/ - class GVAR(settingFeedbackIcons) { - value = 1; - typeName = "SCALAR"; - force = 0; - isClientSettable = 1; - displayName = CSTRING(SettingFeedbackIconsName); - description = CSTRING(SettingFeedbackIconsDesc); - values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)}; - }; - class GVAR(SettingProgressBarLocation) { - value = 0; - typeName = "SCALAR"; - force = 0; - isClientSettable = 1; - displayName = CSTRING(SettingProgressbarLocationName); - description = CSTRING(SettingProgressbarLocationDesc); - values[] = {ECSTRING(optionsmenu,Top), ECSTRING(optionsmenu,Bottom)}; - }; - class GVAR(displayTextColor) { - value[] = {0,0,0,0.1}; - typeName = "COLOR"; - isClientSettable = 1; - displayName = CSTRING(SettingDisplayTextColorName); - description = CSTRING(SettingDisplayTextColorDesc); - }; - class GVAR(displayTextFontColor) { - value[] = {1,1,1,1}; - typeName = "COLOR"; - isClientSettable = 1; - displayName = CSTRING(SettingDisplayTextFontColorName); - description = CSTRING(SettingDisplayTextFontColorDesc); - }; -}; - +#include "ACE_Settings.hpp" #include "define.hpp" #include #include diff --git a/addons/common/functions/fnc_adminKick.sqf b/addons/common/functions/fnc_adminKick.sqf deleted file mode 100644 index bc9afd9fcb..0000000000 --- a/addons/common/functions/fnc_adminKick.sqf +++ /dev/null @@ -1,8 +0,0 @@ -// by commy2 -#include "script_component.hpp" - -private "_name"; - -_name = name (_this select 0); - -[_name, "{if (serverCommandAvailable '#kick') then {serverCommand format['#kick %1', _this]}}"] call FUNC(execRemoteFnc); diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index cce3dccab0..4733f1a81f 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -1,38 +1,97 @@ /* * Author: commy2 - * * Used to execute the checkPBOs module without placing the module. Don't use this together with the module. + * Checks PBO versions and compares to the one running on server. * - * Argument: - * 0: Mode (Number) + * Arguments: + * 0: Mode * 0: Warn once * 1: Warn permanently * 2: Kick - * 1: Check all PBOs? (Boolean, optional default: "[]") - * 2: Whitelist (String, optinal default: false) + * 1: Check all PBOs? (Optional - default: "[]") + * 2: Whitelist (Optinal - default: false) * * Return value: - * None. + * None */ #include "script_component.hpp" -private ["_logic"]; +private ["_mode", "_checkAll", "_whitelist"]; -_this resize 3; +_mode = _this select 0; +_checkAll = if (count _this > 1) then {_this select 1} else {false}; +_whitelist = if (count _this > 2) then {_this select 2} else {"[]"}; -PARAMS_3(_mode,_checkAll,_whitelist); +_whitelist = [_whitelist, {toLower _this}] call FUNC(map); -if (isNil "_checkAll") then { - _checkAll = false; +ACE_Version_CheckAll = _checkAll; +ACE_Version_Whitelist = _whitelist; + +if (!isServer) then { + [_mode, _checkAll, _whitelist] spawn { + private ["_missingAddon", "_missingAddonServer", "_oldVersionClient", "_oldVersionServer", "_text", "_error", "_rscLayer", "_ctrlHint"]; + PARAMS_3(_mode,_checkAll,_whitelist); + + waitUntil { + sleep 1; + !isNil "ACE_Version_ClientErrors" + }; + + _missingAddon = ACE_Version_ClientErrors select 0; + _missingAddonServer = ACE_Version_ClientErrors select 1; + _oldVersionClient = ACE_Version_ClientErrors select 2; + _oldVersionServer = ACE_Version_ClientErrors select 3; + + // Display error message. + if (_missingAddon || {_missingAddonServer} || {_oldVersionClient} || {_oldVersionServer}) then { + _text = "[ACE] Version mismatch:

"; + _error = format ["ACE version mismatch: %1: ", profileName]; + + if (_missingAddon) then { + _text = _text + "Detected missing addon on client
"; + _error = _error + "Missing file(s); "; + }; + if (_missingAddonServer) then { + _text = _text + "Detected missing addon on server
"; + _error = _error + "Additional file(s); "; + }; + if (_oldVersionClient) then { + _text = _text + "Detected old client version
"; + _error = _error + "Older version; "; + }; + if (_oldVersionServer) then { + _text = _text + "Detected old server version
"; + _error = _error + "Newer version; "; + }; + + //[_error, "{systemChat _this}"] call FUNC(execRemoteFnc); + diag_log text _error; + + if (_mode < 2) then { + _text = composeText [lineBreak, parseText format ["%1", _text]]; + + _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer; + _rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true]; + + disableSerialization; + _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint"; + _ctrlHint ctrlSetStructuredText _text; + + if (_mode == 0) then { + sleep 10; + _rscLayer cutFadeOut 0.2; + }; + }; + + if (_mode == 2) then { + waitUntil {alive player}; // To be able to show list if using checkAll + _text = composeText [parseText format ["%1", _text]]; + ["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); + }; + }; + }; }; -if (isNil "_whitelist") then { - _whitelist = "[]"; +if (_checkAll) then { + 0 spawn COMPILE_FILE(scripts\Version\checkVersionNumber); }; - -_logic = "Logic" createVehicleLocal [0,0,0]; -_logic setVariable ["Action", _mode]; -_logic setVariable ["CheckAll", _checkAll]; -_logic setVariable ["Whitelist", _whitelist]; -[_logic, [], true] call FUNC(moduleCheckPBOs); -deleteVehicle _logic; diff --git a/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf b/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf new file mode 100644 index 0000000000..a8418cd4cd --- /dev/null +++ b/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf @@ -0,0 +1,45 @@ +/* + * Author: PabstMirror + * Finds next valid index for the device array. + * + * Arguments: + * 0: Offset from currentIndex (use 1 to find next valid after current) or a displayName string or + * + * Return Value: + * The new index (-1 if no valid) + * + * Example: + * [] call ace_common_fnc_deviceKeyFindValidIndex + * ["kestral4500"] call ace_common_fnc_deviceKeyFindValidIndex + * + * Public: No + */ +#include "script_component.hpp" + +DEFAULT_PARAM(0,_searchOffsetOrName,0); + +private ["_validIndex", "_offsetBy", "_realIndex", "_offset"]; + +_validIndex = -1; + +if ((typeName _searchOffsetOrName) == "STRING") then { + { + if ((_x select 0) == _searchOffsetOrName) exitWith { + _validIndex = _forEachIndex; + }; + } forEach GVAR(deviceKeyHandlingArray); +} else { + if ((count GVAR(deviceKeyHandlingArray)) > 0) then { + _baseIndex = if (GVAR(deviceKeyCurrentIndex) == -1) then {0} else {GVAR(deviceKeyCurrentIndex) + _searchOffsetOrName}; + for "_offset" from _baseIndex to ((count GVAR(deviceKeyHandlingArray)) - 1 + _baseIndex) do { + _realIndex = _offset % (count GVAR(deviceKeyHandlingArray)); + if ([] call ((GVAR(deviceKeyHandlingArray) select _realIndex) select 2)) exitWith { + _validIndex = _realIndex; + }; + }; + }; +}; + +GVAR(deviceKeyCurrentIndex) = _validIndex; + +GVAR(deviceKeyCurrentIndex) diff --git a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf new file mode 100644 index 0000000000..88ffa84af7 --- /dev/null +++ b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf @@ -0,0 +1,25 @@ +/* + * Author: PabstMirror + * Finds next valid index for the device array. + * + * Arguments: + * 0: Localized Device Display Name + * 1: Image + * 2: Condtion Code (do they have the device) + * 3: Toggle Code (on home press) + * 4: Close Code (on ctrl-home press) + * + * Return Value: + * Nothing + * + * Example: + * [(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditionCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_5(_displayName,_iconImage,_conditionCode,_toggleCode,_closeCode); + +GVAR(deviceKeyHandlingArray) pushBack [_displayName,_iconImage,_conditionCode,_toggleCode,_closeCode]; +[] call FUNC(deviceKeyFindValidIndex); diff --git a/addons/common/functions/fnc_execNextFrame.sqf b/addons/common/functions/fnc_execNextFrame.sqf index 39fef16519..ddd36be073 100644 --- a/addons/common/functions/fnc_execNextFrame.sqf +++ b/addons/common/functions/fnc_execNextFrame.sqf @@ -14,21 +14,8 @@ PARAMS_2(_func,_params); -[ - { - EXPLODE_2_PVT(_this,_params,_pfhId); - EXPLODE_2_PVT(_params,_delayedExecParams,_startFrame); - EXPLODE_2_PVT(_delayedExecParams,_func,_funcParams); - - // Exit if we are still on the same frame - if (diag_frameno == _startFrame) exitWith {}; - - // Remove the PFH - [_pfhId] call cba_fnc_removePerFrameHandler; - - // Execute the function - _funcParams call _func; - }, - 0, - [_this, diag_frameno] -] call CBA_fnc_addPerFrameHandler +if (diag_frameno != GVAR(nextFrameNo)) then { + GVAR(nextFrameBufferA) pushBack [_params, _func]; +} else { + GVAR(nextFrameBufferB) pushBack [_params, _func]; +}; diff --git a/addons/common/functions/fnc_isPlayer.sqf b/addons/common/functions/fnc_isPlayer.sqf index 772fae1746..91e54a51c1 100644 --- a/addons/common/functions/fnc_isPlayer.sqf +++ b/addons/common/functions/fnc_isPlayer.sqf @@ -1,15 +1,21 @@ /* - * Author: bux578, commy2 + * Author: bux578, commy2, akalegman * * Checks if a unit is a player / curator controlled unit. * Currently returns false for non-local remote controlled zeus units. (Remotes from another zeus machine) * * Arguments: * 0: unit to be checked (object) + * 1: exclude remote controlled units (boolean) * * Return Value: * Bool: is unit a player? */ #include "script_component.hpp" -isPlayer (_this select 0) || {_this select 0 == call FUNC(player)} +private ["_unit", "_excludeRemoteControlled"]; + +_unit = _this select 0; +_excludeRemoteControlled = if (count _this > 1) then {_this select 1} else {false}; + +isPlayer _unit || (!_excludeRemoteControlled && {_unit == call FUNC(player)}) diff --git a/addons/common/functions/fnc_moduleCheckPBOs.sqf b/addons/common/functions/fnc_moduleCheckPBOs.sqf index 05e1037028..9543b3a5c9 100644 --- a/addons/common/functions/fnc_moduleCheckPBOs.sqf +++ b/addons/common/functions/fnc_moduleCheckPBOs.sqf @@ -1,6 +1,5 @@ /* * Author: KoffeinFlummi - * * Initializes the check-PBOs module. * * Arguments: @@ -11,92 +10,14 @@ */ #include "script_component.hpp" -PARAMS_3(_logic,_units,_activated); +if !(isServer) exitWith {}; -private ["_mode", "_checkAll", "_whitelist"]; +PARAMS_3(_logic,_units,_activated); if !(_activated) exitWith {}; -_mode = parseNumber (_logic getVariable "Action"); -_checkAll = _logic getVariable ["CheckAll", false]; -_whitelist = call compile (_logic getVariable ["Whitelist", "[]"]); +[_logic, QGVAR(checkPBOsAction), "Action" ] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(checkPBOsCheckAll), "CheckAll" ] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(checkPBOsWhitelist), "Whitelist" ] call EFUNC(common,readSettingFromModule); -if (isNil "_whitelist") then { - _whitelist = []; -}; - -_whitelist = [_whitelist, {toLower _this}] call FUNC(map); - -ACE_Version_CheckAll = _checkAll; -ACE_Version_Whitelist = _whitelist; - -if (!isServer) then { - [_mode, _checkAll, _whitelist] spawn { - private ["_mode", "_checkAll", "_whitelist", "_missingAddon", "_missingAddonServer", "_oldVersionClient", "_oldVersionServer", "_text", "_error", "_rscLayer", "_ctrlHint"]; - _mode = _this select 0; - _checkAll = _this select 1; - _whitelist = _this select 2; - - waitUntil { - sleep 1; - !isNil "ACE_Version_ClientErrors" - }; - - _missingAddon = ACE_Version_ClientErrors select 0; - _missingAddonServer = ACE_Version_ClientErrors select 1; - _oldVersionClient = ACE_Version_ClientErrors select 2; - _oldVersionServer = ACE_Version_ClientErrors select 3; - - // Display error message. - if (_missingAddon || {_missingAddonServer} || {_oldVersionClient} || {_oldVersionServer}) then { - _text = "[ACE] Version mismatch:

"; - _error = format ["ACE version mismatch: %1: ", profileName]; - - if (_missingAddon) then { - _text = _text + "Detected missing addon on client
"; - _error = _error + "Missing file(s); "; - }; - if (_missingAddonServer) then { - _text = _text + "Detected missing addon on server
"; - _error = _error + "Additional file(s); "; - }; - if (_oldVersionClient) then { - _text = _text + "Detected old client version
"; - _error = _error + "Older version; "; - }; - if (_oldVersionServer) then { - _text = _text + "Detected old server version
"; - _error = _error + "Newer version; "; - }; - - //[_error, "{systemChat _this}"] call FUNC(execRemoteFnc); - diag_log text _error; - - _text = composeText [lineBreak, parseText format ["%1", _text]]; - - _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer; - _rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true]; - - disableSerialization; - _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint"; - _ctrlHint ctrlSetStructuredText _text; - - if (_mode == 0) then { - sleep 10; - _rscLayer cutFadeOut 0.2; - }; - - if (_mode == 2) then { - sleep 10; - waitUntil {alive player}; - [player] call FUNC(adminKick); - }; - }; - }; -}; - -diag_log text format ["[ACE]: Check-PBOs Module Initialized. Mode: %1.", _mode]; - -if (_checkAll) then { - 0 spawn COMPILE_FILE(scripts\Version\checkVersionNumber); -}; +diag_log text format ["[ACE]: Check-PBOs Module Initialized. Mode: %1.", GVAR(checkPBOsAction)]; diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index a927858f9a..23d33e4bfe 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -15,21 +15,41 @@ #define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) -private ["_vehicle", "_loaded", "_emptyPos"]; -PARAMS_1(_unit); -_vehicle = vehicle _unit; +private ["_loaded", "_emptyPos"]; +PARAMS_2(_unit,_vehicle); -if (_vehicle == _unit) exitwith {false;}; -if !(speed _vehicle <1 && (((getpos _vehicle) select 2) < 2)) exitwith {false;}; +if (driver _vehicle == _unit) exitwith {TRACE_1("Exiting on Failed Driver Check", driver _vehicle == _unit); false;}; +TRACE_1("Vehicle Check", driver _vehicle == _unit); +if !(speed _vehicle <1 && (((getPos _vehicle) select 2) < 2)) exitwith {TRACE_1("Exiting on Failed speed check", getPosASL _vehicle == _unit); false;}; +TRACE_1("getPosASL Vehicle Check", getPos _vehicle); -_emptyPos = ((getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]); -if (count _emptyPos == 0) exitwith {false}; +_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); +if (count _emptyPos == 0) exitwith {false}; //consider displaying text saying there are no safe places to exit the vehicle -_unit setPos _emptyPos; unassignVehicle _unit; -if (!alive _unit) then { - _unit action ["Eject", vehicle _unit]; -}; +[_unit] orderGetIn false; +TRACE_1("Ejecting", alive _unit); +_unit action ["Eject", vehicle _unit]; +[ { + private "_anim"; + PARAMS_2(_unit,_emptyPos); + _unit setPosASL (_emptyPos call EFUNC(common,PositiontoASL)); + if (!([_unit] call FUNC(isAwake))) then { + TRACE_1("Check if isAwake", [_unit] call FUNC(isAwake)); + if (driver _unit == _unit) then { + _anim = [_unit] call EFUNC(common,getDeathAnim); + [_unit, _anim, 1, true] call EFUNC(common,doAnimation); + [{ + _unit = _this select 0; + _anim = _this select 1; + if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then { + [_unit, _anim, 2, true] call EFUNC(common,doAnimation); + }; + }, [_unit, _anim], 0.5, 0] call EFUNC(common,waitAndExecute); + }; + }; +},[_unit,_emptyPos], 0.5, 0] call EFUNC(common,waitAndExecute); + [_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide); @@ -37,8 +57,4 @@ _loaded = _vehicle getvariable [QGVAR(loaded_persons),[]]; _loaded = _loaded - [_unit]; _vehicle setvariable [QGVAR(loaded_persons),_loaded,true]; -if (!([_unit] call FUNC(isAwake))) then { - [_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation); -}; - -true; +true \ No newline at end of file diff --git a/addons/common/functions/fnc_waitAndExecute.sqf b/addons/common/functions/fnc_waitAndExecute.sqf index f7318ac1c8..977e4f146d 100644 --- a/addons/common/functions/fnc_waitAndExecute.sqf +++ b/addons/common/functions/fnc_waitAndExecute.sqf @@ -22,16 +22,3 @@ PARAMS_3(_func,_params,_delay); GVAR(waitAndExecArray) pushBack [(ACE_time + _delay), _func, _params]; GVAR(waitAndExecArray) sort true; - -if ((count GVAR(waitAndExecArray)) == 1) then { - [{ - while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do { - private ["_entry"]; - _entry = GVAR(waitAndExecArray) deleteAt 0; - (_entry select 2) call (_entry select 1); - }; - if ((count GVAR(waitAndExecArray)) == 0) then { - [(_this select 1)] call cba_fnc_removePerFrameHandler; - }; - }, 0, []] call CBA_fnc_addPerFrameHandler; -}; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index c773c1f4a2..7d0de1b584 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -475,78 +475,103 @@ Sprawdzaj PBO Comprobar PBOs Überprüfe PBOs + Zkontrolovat PBO Sprawdzaj spójność addonów z serwerem Este módulo verifica la integridad de los addons con los que iniciamos el simulador Dieses Modul überprüft ob jeder Spieler die richtigen PBO-Dateien hat. + Zjistit addon který je v souladu se serverem Action Akcja Acción Aktion + Akce What to do with people who do not have the right PBOs? Co zrobić z graczami, którzy nie mają właściwych PBO? ¿Qué hacer con la gente que no tiene correctamente los PBOs? Was soll mit Leuten passieren, die nicht die richtigen PBOs haben? + Co udělat s lidmi, co nemají správné addony? Warn once Ostrzeż raz Avisar una vez Einmal verwarnen + Upozornit jednou Warn (permanent) Ostrzeżenie (permanentne) Avisar (permanente) Immer verwarnen + Upozornit (permanentně) Kick Kick Expulsar Kicken + Vyhodit Check all addons Sprawdź wsz. addony Comprobar todos los addons Alle Addons überprüfen + Zkontrolovat všechny addony Check all addons instead of only those of ACE? Sprawdzaj wszystkie addony czy tylko te z ACE? Comprobar todos los addons en vez de solo los del ACE Alle Addons anstatt nur ACE überprüfen? + Zkontrolovat všechny addony namísto jen těch od ACE? Whitelist Biała lista Lista blanca Whitelist + Seznam povolených What addons are allowed regardless? Jakie addony są dozwolone? Qué addons están permitidos igualmente Welche Addons werden dennoch erlaubt? + Jaké addony jsou povoleny? LSD Vehicles Pojazdy LSD Vehículos LSD LSD-Fahrzeuge + LSD vozidla Adds LSD effect to synchronized vehicle Dodaje efekt LSD pod zsynchronizowany pojazd Añade el efecto LSD al vehículo sincronizado Fügt einen LSD-Effekt zum synchronisierten Fahrzeug hinzu + Přidá LSD efekt pro synchronizované vozidla + + + Toggle Handheld Device + Seleccionar dispositivo de mano + + + Close Handheld Device + Cerrar dispositivo de mano + + + Cycle Handheld Devices + Cambiar dispositivos de mano - + \ No newline at end of file diff --git a/addons/concertina_wire/$PBOPREFIX$ b/addons/concertina_wire/$PBOPREFIX$ new file mode 100644 index 0000000000..0ca718ad15 --- /dev/null +++ b/addons/concertina_wire/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\concertina_wire \ No newline at end of file diff --git a/addons/concertina_wire/CfgEventHandlers.hpp b/addons/concertina_wire/CfgEventHandlers.hpp new file mode 100644 index 0000000000..026afb4e2d --- /dev/null +++ b/addons/concertina_wire/CfgEventHandlers.hpp @@ -0,0 +1,44 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; + +class Extended_Killed_EventHandlers { + // TODO: Probably needs handledamage eh for better tracking what killed the wire + // Also disallow wire becoming destroyed by small explosives e.g. 40mm + class ACE_ConcertinaWire { + class ADDON { + killed = QUOTE(call FUNC(handleKilled)); + }; + }; + class Land_Razorwire_F { + class ADDON { + killed = QUOTE(call FUNC(handleKilled)); + }; + }; +}; + +class Extended_Init_EventHandlers { + class ACE_ConcertinaWireCoil { + class ADDON { + init = QUOTE(_this call DEFUNC(dragging,initObject)); + }; + }; + class ACE_ConcertinaWire { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_init)); + }; + }; + class Land_Razorwire_F { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_init)); + }; + }; +}; diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp new file mode 100644 index 0000000000..2592bf5b77 --- /dev/null +++ b/addons/concertina_wire/CfgVehicles.hpp @@ -0,0 +1,139 @@ + +class CfgVehicles { + class Fence; + class thingX; + class NonStrategic; + + class ACE_ConcertinaWireNoGeo: Fence { + XEH_ENABLED; + scope = 1; + displayName = ""; + model = PATHTOF(data\ACE_ConcertinaWireNoGeo.p3d); + destrType = "DestructTent"; + accuracy = 0.3; + mapSize = 2.8; + animated = 1; + autocenter = 0; + armor = 200; + class AnimationSources { + class fix1 { + source = "user"; + animPeriod = 1e-007; + initPhase = 0; + }; + class fix2: fix1 {}; + class fix3: fix1 {}; + class fix4: fix1 {}; + class rotate { + source = "user"; + animPeriod = 1e-007; + }; + class wire_2 { + source = "user"; + animPeriod = 1e-007; + }; + class wire_3: wire_2{}; + class wire_4: wire_2{}; + class wire_5: wire_2{}; + class wire_6: wire_2{}; + class wire_7: wire_2{}; + class wire_8: wire_2{}; + class wire_9: wire_2{}; + class wire_10: wire_2{}; + class wire_11: wire_2{}; + class wire_12: wire_2{}; + class wire_13: wire_2{}; + class wire_14: wire_2{}; + class wire_15: wire_2{}; + class wire_16: wire_2{}; + class wire_17: wire_2{}; + class wire_18: wire_2{}; + + class wire_2_1: wire_2 { + animPeriod = 8; + }; + class wire_3_1: wire_2_1 {}; + class wire_4_1: wire_2_1 {}; + class wire_5_1: wire_2_1 {}; + class wire_6_1: wire_2_1 {}; + class wire_7_1: wire_2_1 {}; + class wire_8_1: wire_2_1 {}; + class wire_9_1: wire_2_1 {}; + class wire_10_1: wire_2_1 {}; + class wire_11_1: wire_2_1 {}; + class wire_12_1: wire_2_1 {}; + class wire_13_1: wire_2_1 {}; + class wire_14_1: wire_2_1 {}; + class wire_15_1: wire_2_1 {}; + class wire_16_1: wire_2_1 {}; + class wire_17_1: wire_2_1 {}; + class wire_18_1: wire_2_1 {}; + }; + }; + class ACE_ConcertinaWire: ACE_ConcertinaWireNoGeo { + scope = 2; + displayName = $STR_ACE_CONCERTINA_WIRE; + model = PATHTOF(data\ACE_ConcertinaWire.p3d); + class ACE_Actions { + class ACE_MainActions { + selection = ""; + distance = 5; + condition = "true"; + class ACE_Dismount { + selection = ""; + displayName = "$STR_ACE_UNROLLWIRE"; + distance = 5; + condition = "true"; + statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\icon_sandbag_ca.paa); + }; + }; + }; + }; + class ACE_ConcertinaWireCoil: thingX { + XEH_ENABLED; + scope = 2; + displayName = $STR_ACE_CONCERTINA_WIRECOIL; + model = PATHTOF(data\ACE_ConcertinaWireCoil.p3d); + mapsize = 0.5; + animated = 0; + nameSound = "fence"; + typicalCargo[] = {}; + transportAmmo = 0; + transportRepair = 0; + transportFuel = 0; + cost = 0; + armor = 1000; + destrType = "DestructNo"; + accuracy = 1000; + autocenter = 0; + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition[]) = {0,0.5,0.5}; + EGVAR(dragging,dragDirection) = 0; + class ACE_Actions { + class ACE_MainActions { + selection = ""; + distance = 4; + condition = "true"; + class ACE_Deploy { + selection = ""; + displayName = "$STR_ACE_ROLLWIRE"; + distance = 4; + condition = "true"; + statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\icon_sandbag_ca.paa); + }; + }; + }; + }; + + class Land_Razorwire_F: NonStrategic { + XEH_ENABLED; + }; +}; diff --git a/addons/concertina_wire/README.md b/addons/concertina_wire/README.md new file mode 100644 index 0000000000..ab62458de9 --- /dev/null +++ b/addons/concertina_wire/README.md @@ -0,0 +1,10 @@ +ace_concertina_wire +=============== + +Adds concertina wire. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/concertina_wire/UI/icon_sandbag_ca.paa b/addons/concertina_wire/UI/icon_sandbag_ca.paa new file mode 100644 index 0000000000..5d6ea6d4d9 Binary files /dev/null and b/addons/concertina_wire/UI/icon_sandbag_ca.paa differ diff --git a/addons/concertina_wire/XEH_init.sqf b/addons/concertina_wire/XEH_init.sqf new file mode 100644 index 0000000000..dbce4a9b92 --- /dev/null +++ b/addons/concertina_wire/XEH_init.sqf @@ -0,0 +1,4 @@ +#include "script_component.hpp" + +PARAMS_1(_wire); +_wire addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; \ No newline at end of file diff --git a/addons/concertina_wire/XEH_postInit.sqf b/addons/concertina_wire/XEH_postInit.sqf new file mode 100644 index 0000000000..ff3b5c5167 --- /dev/null +++ b/addons/concertina_wire/XEH_postInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +GVAR(placer) = objNull; +GVAR(deployPFH) = -1; + +// Deploy concertina wire if interact menu is opened +["interactMenuOpened", { + if (GVAR(deployPFH) != -1) then { + GVAR(placer) setVariable [QGVAR(wireDeployed), true]; + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf new file mode 100644 index 0000000000..f15feb48bd --- /dev/null +++ b/addons/concertina_wire/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(deploy); +PREP(dismount); +PREP(dismountSuccess); +PREP(handleDamage); +PREP(handleKilled); + +ADDON = true; diff --git a/addons/concertina_wire/config.cpp b/addons/concertina_wire/config.cpp new file mode 100644 index 0000000000..06b7bf5d86 --- /dev/null +++ b/addons/concertina_wire/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_ConcertinaWire", "ACE_ConcertinaWireNoGeo", "ACE_ConcertinaWireCoil"}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_apl", "ace_interaction"}; + author[] = {"Rocko", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file diff --git a/addons/concertina_wire/data/ACE_ConcertinaWire.p3d b/addons/concertina_wire/data/ACE_ConcertinaWire.p3d new file mode 100644 index 0000000000..3e1c9c881c Binary files /dev/null and b/addons/concertina_wire/data/ACE_ConcertinaWire.p3d differ diff --git a/addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d b/addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d new file mode 100644 index 0000000000..24f6ebf0fe Binary files /dev/null and b/addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d differ diff --git a/addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d b/addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d new file mode 100644 index 0000000000..3af6a40a15 Binary files /dev/null and b/addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d differ diff --git a/addons/concertina_wire/data/model.cfg b/addons/concertina_wire/data/model.cfg new file mode 100644 index 0000000000..20845cfacb --- /dev/null +++ b/addons/concertina_wire/data/model.cfg @@ -0,0 +1,290 @@ +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + class ACE_SB_Skeleton: Default {}; + class ACE_ConcertinaSkeleton { + isDiscrete = 0; + skeletonInherit = ""; + skeletonBones[] = { + "1","", + "2","1", + "3","2", + "4","3", + "5","4", + "6","5", + "7","6", + "8","7", + "9","8", + "10","9", + "11","10", + "12","11", + "13","12", + "14","13", + "15","14", + "16","15", + "17","16", + "18","17", + "fix1","", + "fix2","", + "fix3","", + "fix4","" + }; + }; + class ace_tacticalladder_skeleton: Default { + isDiscrete = 0; + skeletonInherit = ""; + skeletonBones[] = { + "base","", + "1","base", + "2","1", + "3","2", + "4","3", + "5","4", + "6","5", + "7","6", + "8","7", + "9","8", + "10","9", + "11","10", + "step","11" + }; + }; +}; + +class CfgModels { + class Default { + sectionsInherit=""; + sections[] = {""}; + skeletonName = ""; + }; + class ace_sandbag_build { + sectionsInherit = "Default"; + sections[] = {"zbytek"}; + skeletonName = "ACE_SB_Skeleton"; + }; + class ACE_ConcertinaWire { + skeletonName = "ACE_ConcertinaSkeleton"; + sections[] = {}; + sectionsInherit = ""; + class Animations { + class fix1 { + type="hide"; + source="user"; + selection="fix1"; + minValue = 0; + maxValue = 1; + minPhase = 0; + maxPhase = 1; + hideValue = 1; + }; + class fix2: fix1 { + selection="fix2"; + }; + class fix3: fix1 { + selection="fix3"; + }; + class fix4: fix1 { + selection="fix4"; + }; + class rotate { + type = "rotation"; + source = ""; + sourceAddress = "loop"; + selection = "1"; + axis = "rotate_axis"; + minValue = 0; + maxValue = 360; + + angle0="rad -360"; + angle1="rad +360"; + }; + class wire_2 { + type = "translation"; + source = ""; + selection = "2"; + axis = "2_axis"; + animPeriod = 0; + minValue = 0; + maxValue = 1; + minPhase = 0; + maxPhase = 1; + offset0 = 0; + offset1 = -1; + }; + class wire_3: wire_2 { + selection = "3"; axis = "3_axis"; + }; + class wire_4: wire_2 { + selection = "4"; axis = "4_axis"; + }; + class wire_5: wire_2 { + selection = "5"; axis = "5_axis"; + }; + class wire_6: wire_2 { + selection = "6"; axis = "6_axis"; + }; + class wire_7: wire_2 { + selection = "7"; axis = "7_axis"; + }; + class wire_8: wire_2 { + selection = "8"; axis = "8_axis"; + }; + class wire_9: wire_2 { + selection = "9"; axis = "9_axis"; + }; + class wire_10: wire_2 { + selection = "10"; axis = "10_axis"; + }; + class wire_11: wire_2 { + selection = "11"; axis = "11_axis"; + }; + class wire_12: wire_2 { + selection = "12"; axis = "12_axis"; + }; + class wire_13: wire_2 { + selection = "13"; axis = "13_axis"; + }; + class wire_14: wire_2 { + selection = "14"; axis = "14_axis"; + }; + class wire_15: wire_2 { + selection = "15"; axis = "15_axis"; + }; + class wire_16: wire_2 { + selection = "16"; axis = "16_axis"; + }; + class wire_17: wire_2 { + selection = "17"; axis = "17_axis"; + }; + class wire_18: wire_2 { + selection = "18"; axis = "18_axis"; + }; + class wire_2_1: wire_2 { + selection = "2";axis = "2_axis";offset1 = -1; + }; + class wire_3_1: wire_2_1 { + selection = "3"; axis = "3_axis"; + }; + class wire_4_1: wire_2_1 { + selection = "4"; axis = "4_axis"; + }; + class wire_5_1: wire_2_1 { + selection = "5"; axis = "5_axis"; + }; + class wire_6_1: wire_2_1 { + selection = "6"; axis = "6_axis"; + }; + class wire_7_1: wire_2_1 { + selection = "7"; axis = "7_axis"; + }; + class wire_8_1: wire_2_1 { + selection = "8"; axis = "8_axis"; + }; + class wire_9_1: wire_2_1 { + selection = "9"; axis = "9_axis"; + }; + class wire_10_1: wire_2_1 { + selection = "10"; axis = "10_axis"; + }; + class wire_11_1: wire_2_1 { + selection = "11"; axis = "11_axis"; + }; + class wire_12_1: wire_2_1 { + selection = "12"; axis = "12_axis"; + }; + class wire_13_1: wire_2_1 { + selection = "13"; axis = "13_axis"; + }; + class wire_14_1: wire_2_1 { + selection = "14"; axis = "14_axis"; + }; + class wire_15_1: wire_2_1 { + selection = "15"; axis = "15_axis"; + }; + class wire_16_1: wire_2_1 { + selection = "16"; axis = "16_axis"; + }; + class wire_17_1: wire_2_1 { + selection = "17"; axis = "17_axis"; + }; + class wire_18_1: wire_2_1 { + selection = "18"; axis = "18_axis"; + }; + }; + }; + class ACE_ConcertinaWireNoGeo: ACE_ConcertinaWire {}; + class ace_tacticalladder { + skeletonName = "ace_tacticalladder_skeleton"; + sections[] = { "roadway" }; + sectionsInherit = ""; + class Animations { + class rotate { + type = "rotation"; + source = ""; + sourceAddress = "clamp"; + selection = "base"; + axis = "axis_rotate"; + minValue = 0; + maxValue = 90; + angle0="rad 0"; + angle1="rad +90"; + }; + class extract_1 { + type = "translation"; + source = ""; + selection = "1"; + axis = "axis_1"; + animPeriod = 0; + minValue = 0; + maxValue = 1; + minPhase = 0; + maxPhase = 1; + offset0 = 0; + offset1 = 0.82; + }; + class extract_2: extract_1 { + selection = "2"; + axis = "axis_2"; + }; + class extract_3: extract_1 { + selection = "3"; + axis = "axis_3"; + }; + class extract_4: extract_1 { + selection = "4"; + axis = "axis_4"; + }; + class extract_5: extract_1 { + selection = "5"; + axis = "axis_5"; + }; + class extract_6: extract_1 { + selection = "6"; + axis = "axis_6"; + }; + class extract_7: extract_1 { + selection = "7"; + axis = "axis_7"; + }; + class extract_8: extract_1 { + selection = "8"; + axis = "axis_8"; + }; + class extract_9: extract_1 { + selection = "9"; + axis = "axis_9"; + }; + class extract_10: extract_1 { + selection = "10"; + axis = "axis_10"; + }; + class extract_11: extract_1 { + selection = "11"; + axis = "axis_11"; + }; + }; + }; +}; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf new file mode 100644 index 0000000000..c30e767266 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -0,0 +1,84 @@ +/* + * Author: Rocko, Ruthberg + * + * Deploys the concertina wire + * + * Arguments: + * 0: wire coil + * 1: unit + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_wirecoil,_unit); + +private ["_wireNoGeo", "_dir", "_pos", "_wireNoGeoPos"]; + +_wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0]; +{ + _wireNoGeo animate [_x, 1]; +} foreach WIRE_FAST; + +GVAR(placer) = _unit; +_dir = getDir _unit; +_pos = getPosASL _unit; +_wireNoGeoPos = _pos vectorAdd [1.1 * sin(_dir), 1.1 * cos(_dir), 0]; + +_wireNoGeo setDir _dir; +_wireNoGeo setPosASL _wireNoGeoPos; + +deleteVehicle _wirecoil; + +_unit setVariable [QGVAR(wireDeployed), false]; + +GVAR(deployPFH) = [{ + EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action); + + private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"]; + _posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL); + _posEnd = (getPosASL _unit) vectorAdd (vectorDir _unit); + _dirVect = _posStart vectorDiff _posEnd; + _dir = _dirVect call CBA_fnc_vectDir; + _range = vectorMagnitude _dirVect; + _anim = 0 max (1 - (_range / 12)); + + if (!(alive _unit) || _range >= 12 || (_unit getVariable [QGVAR(wireDeployed), false])) exitWith { + _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0]; + { + _wire animate [_x, _anim]; + } foreach WIRE_FAST; + + [{ + EXPLODE_5_PVT(_this select 0,_wireNoGeo,_wire,_anim,_dir,_wireNoGeoPos); + if (_wire animationPhase "wire_2" == _anim) then { + deleteVehicle _wireNoGeo; + _wire setDir _dir; + _wire setPosASL _wireNoGeoPos; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + }, 0, [_wireNoGeo, _wire, _anim, _dir, _wireNoGeoPos]] call CBA_fnc_addPerFrameHandler; + + [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); + call EFUNC(interaction,hideMouseHint); + + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + _wireNoGeo setDir _dir; + { + _wireNoGeo animate [_x, _anim]; + } foreach WIRE_FAST; +}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler; + +[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint); + +GVAR(placer) setVariable [QGVAR(Deploy), + [GVAR(placer), "DefaultAction", + {GVAR(deployPFH) != -1}, + {GVAR(placer) setVariable [QGVAR(wireDeployed), true]} +] call EFUNC(common,AddActionEventHandler)]; diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf new file mode 100644 index 0000000000..c9a5d1f9ff --- /dev/null +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -0,0 +1,41 @@ +/* + * Author: Ruthberg + * + * Start dismounting the concertina wire + * + * Arguments: + * 0: wire + * 1: unit + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +// If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine +if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith { + [{ + _this call FUNC(dismount); + }, _this] call EFUNC(common,execNextFrame); +}; + +PARAMS_2(_wire,_unit); + +private ["_config", "_delay"]; +_config = (configFile >> "CfgVehicles" >> typeOf _unit); +_delay = if (getNumber(_config >> "engineer") == 1 || getNumber(_config >> "canDeactivateMines") == 1) then {60} else {120}; + +// TODO: Animation? + +[ + _delay, + [_wire], + {(_this select 0) call FUNC(dismountSuccess)}, + {}, + localize "STR_ACE_UNROLLWIRE", + {true}, + ["isnotinside"] +] call EFUNC(common,progressBar); diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf new file mode 100644 index 0000000000..a6e34fe44f --- /dev/null +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -0,0 +1,42 @@ +/* + * Author: Rocko, Ruthberg + * + * Dismounts the concertina wire + * + * Arguments: + * 0: wire + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_1(_wire); + +{ + _wire animate [_x, 1]; +} foreach WIRE_FAST; + +[{ + EXPLODE_1_PVT(_this select 0,_wire); + + if (_wire animationPhase "wire_2" == 1) then { + private ["_dir", "_pos", "_wirecoil"]; + + _dir = getDir _wire; + _pos = getPosASL _wire; + + _wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0]; + + deleteVehicle _wire; + + _wirecoil setDir _dir; + _wirecoil setPosASL _pos; + _wirecoil setVelocity [0, 0, 0]; + + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; +}, 0, [_wire]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/concertina_wire/functions/fnc_handleDamage.sqf b/addons/concertina_wire/functions/fnc_handleDamage.sqf new file mode 100644 index 0000000000..61cd1c4e7c --- /dev/null +++ b/addons/concertina_wire/functions/fnc_handleDamage.sqf @@ -0,0 +1,29 @@ +/* + * Author: Ruthberg + * + * Handles wire damage + * + * Arguments: + * 0: wire + * 1: selectionName + * 2: damage + * 3: source + * 4: projectile + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_5(_wire,_selectionName,_damage,_source,_projectile); + +if (_damage < 0.5) exitWith { 0 }; + +if (!(isNull _source)) then { + _wire setVariable [QGVAR(lastDamager), _source]; +}; + +_damage diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf new file mode 100644 index 0000000000..2d2cd7f789 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -0,0 +1,135 @@ +/* + * Author: Rocko + * + * Handles wire and vehicle damage + * + * Arguments: + * 0: wire + * 1: killer (vehicle) + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_wire,_killer); + +if (isNull _killer) then { + _killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull]; + if (isNull _killer) then { + _killer = nearestObject [_wire, "car"]; + }; +}; +if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {}; + +private ["_type", "_mode", "_distance", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w", "_vehicle"]; +_type = typeOf _wire; +_mode = switch (_type) do { + case "ACE_ConcertinaWire": { 0 }; + case "Land_Razorwire_F": { 1 }; + default { -1 }; +}; + +if (_mode == -1) exitWith {}; + +// _mode = 0 = Single Coil +// _mode = 1 = Triple Coil + +// -------------------------------- +// L M R +// 4.54929 (4) +// 6.13564 (6) +//9.78744 (10) + +_distance = _wire distance _killer; +if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire + +_type = typeOf _wire; +_anim = _wire animationPhase "wire_2"; +_pos_w = getPos _wire; +_dir_w = getDir _wire; +_vehicle = vehicle _killer; + +if (_mode == 0) then { + private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"]; + _x = _pos_w select 0; + _y = _pos_w select 1; + // Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle) + _wireCheckPosAr = [ + [_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)], + [(_x-(sin _dir_w)) + (sin (_dir_w+90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w+90) * 1.5)], + [_x + (sin (_dir_w-90) * 1.5),_y + (cos (_dir_w-90) * 1.5)], + [(_x-(sin _dir_w)) + (sin (_dir_w-90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w-90) * 1.5)] + ]; + { + _found = false; + _no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log "....."; + _no = _no - [_wire]; //diag_log _no; + if (count _no > 0) exitWith { + _found = true; //diag_log "found"; + }; + } foreach _wireCheckPosAr; + // Double coil found! + if (_found) then { + _mode = 1; + } else { + // Randomly make a single coil also catch tanks, if speed is high + if (_vehicle isKindOf "Tank" && {20 > random 100} && {speed _vehicle > 30}) then { + _mode = 1; + } else { + if !(_vehicle isKindOf "Tank") then { + _mode = 1; + }; + }; + }; +}; + +if (_mode == 1) then { + switch (true) do { + case (_vehicle isKindOf "Tank"): { + _parts = ["ltrack","rtrack"]; + }; + case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): { + _parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"]; + }; + }; +} else { + switch (true) do { + case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): { + _parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"]; + }; + }; +}; + +if (canMove _vehicle) then { + { + _selectionPart = "hit" + _x; + if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { + _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); + // TODO: Only the tires that have touched the wire should burst. + _vehicle setHit [_selection, 1]; + }; + } forEach _parts; +}; + +if (_mode == 1) then { + if (_vehicle isKindOf "StaticWeapon") exitWith {}; + [{ + PARAMS_2(_vehicle,_wire); + + _vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75); + + private ["_vPos", "_vDir"]; + // Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable + _vPos = getPosASL _vehicle; + _vDir = getDir _vehicle; + _vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]); + // TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires + }, [_vehicle, _wire], 0.1, 0] call EFUNC(common,waitAndExecute); +}; + +//TODO: Create broken geoless wire (two version) +//TODO: Make wire remains stop vehicles diff --git a/addons/concertina_wire/functions/script_component.hpp b/addons/concertina_wire/functions/script_component.hpp new file mode 100644 index 0000000000..5ec20093ef --- /dev/null +++ b/addons/concertina_wire/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\concertina_wire\script_component.hpp" \ No newline at end of file diff --git a/addons/concertina_wire/script_component.hpp b/addons/concertina_wire/script_component.hpp new file mode 100644 index 0000000000..f3f353f181 --- /dev/null +++ b/addons/concertina_wire/script_component.hpp @@ -0,0 +1,15 @@ +#define COMPONENT concertina_wire +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_CONCERTINA_WIRE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_CONCERTINA_WIRE + #define DEBUG_SETTINGS DEBUG_SETTINGS_CONCERTINA_WIRE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define WIRE_FAST ["wire_2","wire_3","wire_4","wire_5","wire_6","wire_7","wire_8","wire_9","wire_10","wire_11","wire_12","wire_13","wire_14","wire_15","wire_16","wire_17","wire_18"] +#define WIRE_SLOW ["wire_2_1","wire_3_1","wire_4_1","wire_5_1","wire_6_1","wire_7_1","wire_8_1","wire_9_1","wire_10_1","wire_11_1","wire_12_1","wire_13_1","wire_14_1","wire_15_1","wire_16_1","wire_17_1","wire_18_1"] diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml new file mode 100644 index 0000000000..0583a9448d --- /dev/null +++ b/addons/concertina_wire/stringtable.xml @@ -0,0 +1,49 @@ + + + + + Concertina Wire + NATO-Draht + Проволочная спираль + Drut kolczasty + Concertina wire + Concertina wire + Ostnatý drát + Concertina wire + Concertina wire + + + Concertina Wire Coil + NATO-Draht Rolle + Проволочная спираль (моток) + Zwój drutu kolczastego + Concertina wire coil + Concertina wire coil + Smyčka ostnatého drátu + Concertina wire coil + Concertina wire coil + + + Dismount Concertina Wire + NATO-Draht abbauen + Демонтировать проволочную спираль + Zwiń drut kolczasty + Dismount Concertina wire + Dismount Concertina wire + Svinout ostnatý drát + Dismount Concertina wire + Dismount Concertina wire + + + Deploy Concertina Wire + NATO-Draht verlegen + Монтировать проволочную спираль + Rozwiń drut kolczasty + Deploy Concertina wire + Deploy Concertina wire + Rozvinout ostnatý drát + Deploy Concertina wire + Deploy Concertina wire + + + \ No newline at end of file diff --git a/addons/dagr/$PBOPREFIX$ b/addons/dagr/$PBOPREFIX$ new file mode 100644 index 0000000000..98e51ae9ea --- /dev/null +++ b/addons/dagr/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\dagr \ No newline at end of file diff --git a/addons/dagr/CfgEventHandlers.hpp b/addons/dagr/CfgEventHandlers.hpp new file mode 100644 index 0000000000..2a05b72298 --- /dev/null +++ b/addons/dagr/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; \ No newline at end of file diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp new file mode 100644 index 0000000000..f26d8841ae --- /dev/null +++ b/addons/dagr/CfgVehicles.hpp @@ -0,0 +1,49 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(menu) { + displayName = "Configure DAGR"; + condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem)); + statement = QUOTE(call FUNC(menuInit)); + showDisabled = 0; + priority = 0.1; + icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa)); + exceptions[] = {"isNotInside", "isNotSitting"}; + class GVAR(toggle) { + displayName = "Toggle DAGR"; + condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem)); + statement = QUOTE(call FUNC(toggleOverlay)); + showDisabled = 0; + priority = 0.2; + icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa)); + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + }; + }; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_DAGR: Item_Base_F { + author[] = {"Rosuto", "Ruthberg"}; + scope = 2; + scopeCurator = 2; + displayName = "DAGR"; + vehicleClass = "Items"; + class TransportItems { + class ACE_DAGR { + name = "ACE_DAGR"; + count = 1; + }; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_DAGR,6); + }; + }; +}; diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp new file mode 100644 index 0000000000..31b0603ff2 --- /dev/null +++ b/addons/dagr/CfgWeapons.hpp @@ -0,0 +1,19 @@ + +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_DAGR: ACE_ItemCore { + author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; + scope = 2; + displayName = "DAGR"; + descriptionShort = ""; + picture = PATHTOF(UI\DAGR_Icon.paa); + icon = "iconObject_circle"; + mapSize = 0.034; + + class ItemInfo: InventoryItem_Base_F { + mass = 10; + }; + }; +}; diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp new file mode 100644 index 0000000000..2faeb03879 --- /dev/null +++ b/addons/dagr/Dialog.hpp @@ -0,0 +1,424 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button + +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_List_N_Box 102 // Arma 2 - N columns list box + + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0c +#define ST_TYPE 0xF0 +#define ST_SINGLE 0 +#define ST_MULTI 16 +#define ST_TITLE_BAR 32 +#define ST_PICTURE 48 +#define ST_FRAME 64 +#define ST_BACKGROUND 80 +#define ST_GROUP_BOX 96 +#define ST_GROUP_BOX2 112 +#define ST_HUD_BACKGROUND 128 +#define ST_TILE_PICTURE 144 +#define ST_WITH_RECT 160 +#define ST_LINE 176 +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 +#define ST_TITLE ST_TITLE_BAR + ST_CENTER + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 +#define SL_TEXTURES 0x10 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 +#define FontM "PuristaMedium" + +class RscText; + +class DAGR_Button { + idc = -1; + type = CT_BUTTON; + style = ST_LEFT; + font = "PuristaMedium"; + sizeEx = 0.02; + colorText[] = { 0, 1, 0, 1 }; + colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state + colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state + colorBackground[] = { 0, 0, 0, 0 }; + colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state + colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state + offsetX = 0; + offsetY = 0; + offsetPressedX = 0; + offsetPressedY = 0; + colorShadow[] = { 0, 0, 0, 0 }; + colorBorder[] = { 0, 0, 0, 0 }; + borderSize = 0; + soundEnter[] = { "", 0, 1 }; // no sound + soundPush[] = { "", 0, 1 }; + soundClick[] = { "", 0, 1 }; // no sound + soundEscape[] = { "", 0, 1 }; // no sound + x = 0.5; + y = 0.5; + w = 0.07; + h = 0.05; + text = ""; + action = ""; +}; +class DAGR_Menu_Pic { + type = 0; + idc = -1; + style = 48; + x = 0; + y = 0; + w = 0.7; + h = 1.4; + text = ""; + colorBackground[] = {}; + colorText[] = {}; + font = "PuristaMedium"; + sizeEx = 0.04; + waitForLoad = 0; +}; + +class DAGR_Menu_Text { + type = 0; + idc = -1; + style = 0x00; + x = 0.5; + y = 0.5; + w = 0.15; + h = 0.15; + colorBackground[] = { 0, 0, 0, 0 }; + colorText[] = { 0.239, 0.216, 0.153, 1 }; + font = "PuristaMedium"; + sizeEx = 0.03; + waitForLoad = 0; + text = ""; +}; + +class DAGR_Menu { + idd = 266860; + movingEnable = false; + duration = 100000; + fadein = 0; + fadeout = 0; + name = "Dagr_Menu"; + onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]"; + onUnload = QUOTE(GVAR(PWR) = true); // Simulate pressing the power button + controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button", + "DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0", + "DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2", + "DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3", + "DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"}; + + class DAGR_MENU_UI : DAGR_Menu_Pic { + idc = 266861; + x = 0.175; + y = -0.173; + text = QUOTE(PATHTOF(UI\dagr_menu.paa)); + sizeEx = 0.1; + }; + + class DAGR_PWR_Button : DAGR_Button { + idc = 266863; + action = QUOTE(GVAR(PWR) = true); + x = 0.40; + y = 0.65; + }; + + class DAGR_UP_Button : DAGR_Button { + idc = 266864; + action = QUOTE(GVAR(UP) = true); + x = 0.50; + y = 0.675; + }; + + class DAGR_DOWN_Button : DAGR_Button { + idc = 266865; + action = QUOTE(GVAR(DOWN) = true); + x = 0.50; + y = 0.81; + }; + + class DAGR_LEFT_Button : DAGR_Button { + idc = 266866; + action = QUOTE(GVAR(LEFT) = true); + x = 0.40; + y = 0.735; + w = 0.05; + h = 0.07; + }; + + class DAGR_RIGHT_Button : DAGR_Button { + idc = 266867; + action = QUOTE(GVAR(RIGHT) = true); + x = 0.62; + y = 0.735; + w = 0.05; + h = 0.07; + }; + + class DAGR_NEXT_Button : DAGR_Button { + idc = 266868; + action = QUOTE(DAGR_NEXT = true); + x = 0.60; + y = 0.65; + }; + + class DAGR_SEL_Button : DAGR_Button { + idc = 266869; + action = QUOTE(GVAR(SEL) = true); + x = 0.54; + y = 0.735; + w = 0.06; + h = 0.06; + }; + + class DAGR_MENU_Button : DAGR_Button { + idc = 266870; + action = QUOTE(GVAR(MENU_B) = true); + x = 0.46; + y = 0.735; + w = 0.06; + h = 0.06; + }; + + class DAGR_F1_Button : DAGR_Button { + idc = 266871; + action = QUOTE(GVAR(F1) = true); + x = 0.40; + y = 0.575; + }; + + class DAGR_F2_Button : DAGR_Button { + idc = 266872; + action = QUOTE(GVAR(F2) = true); + x = 0.495; + y = 0.575; + }; + + class DAGR_F3_Button : DAGR_Button { + idc = 266873; + action = QUOTE(GVAR(F3) = true); + x = 0.59; + y = 0.575; + }; + + class DAGR_F1_Text : DAGR_Menu_Text { + idc = 266874; + x = 0.388; + y = 0.38; + text = ""; + }; + + class DAGR_F2_Text : DAGR_Menu_Text { + idc = 266875; + x = 0.506; + y = 0.38; + }; + + class DAGR_F3_Text : DAGR_Menu_Text { + idc = 266876; + x = 0.612; + y = 0.38; + }; + + class DAGR_MENU_OPTION0 : DAGR_Menu_Text { + idc = 2668777; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.19; + }; + + class DAGR_MENU_OPTION1 : DAGR_Menu_Text { + idc = 2668778; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.225; + }; + + class DAGR_MENU_OPTION2 : DAGR_Menu_Text { + idc = 2668779; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.26; + }; + + class DAGR_MENU_OPTION3 : DAGR_Menu_Text { + idc = 2668780; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.295; + }; + + class DAGR_MENU_OPTION4 : DAGR_Menu_Text { + idc = 2668781; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.33; + }; + class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic { + idc = 2668783; + x = 0.42; + y = 0.246; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; + + class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic { + idc = 2668784; + x = 0.42; + y = 0.281; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; + + class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic { + idc = 2668785; + x = 0.42; + y = 0.316; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; + + class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic { + idc = 2668786; + x = 0.42; + y = 0.351; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; + + class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic { + idc = 2668787; + x = 0.42; + y = 0.386; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; + + class DAGR_MENU_Main_Text : DAGR_Menu_Text { + idc = 2668782; + style = ST_CENTER; + x = 0.38; + y = 0.32; + w = 0.25; + h = 0.035; + sizeEx = 0.04; + }; + + class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic { + idc = 2668788; + x = 0.451; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic { + idc = 2668789; + x = 0.465; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic { + idc = 2668790; + x = 0.479; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic { + idc = 2668791; + x = 0.493; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic { + idc = 2668792; + x = 0.507; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic { + idc = 2668793; + x = 0.521; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic { + idc = 2668794; + x = 0.535; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic { + idc = 2668795; + x = 0.549; + y = 0.352; + w = 0.01; + h = 0.003; + }; +}; diff --git a/addons/dagr/README.md b/addons/dagr/README.md new file mode 100644 index 0000000000..33d095dca4 --- /dev/null +++ b/addons/dagr/README.md @@ -0,0 +1,10 @@ +ace_dagr +=============== + +Defense Advanced GPS Receiver + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/dagr/RscTitles.hpp b/addons/dagr/RscTitles.hpp new file mode 100644 index 0000000000..8467c70f66 --- /dev/null +++ b/addons/dagr/RscTitles.hpp @@ -0,0 +1,95 @@ +class RscTitles { + class DAGR_Text { + type = 0; + idc = -1; + style = 0x01; + x = 0; + y = 0; + w = 0.15; + h = 0.050; + text = ""; + colorBackground[] = { 0, 0, 0, 0 }; + colorText[] = { 0.239, 0.216, 0.153, 1 }; + font = "PuristaMedium"; + sizeEx = 0.04; + waitForLoad = 0; + }; + class DAGR_Pic { + type = 0; + idc = -1; + style = 48; + x = 0; + y = 0; + w = 0.50; + h = 0.50; + text = ""; + colorBackground[] = {}; + colorText[] = {}; + font = "PuristaMedium"; + sizeEx = 0.02; + waitForLoad = 0; + }; + + class DAGR_Display { + idd = 266850; + movingEnable = false; + duration = 100000; + fadein = 0; + fadeout = 0; + name = "Dagr_Display"; + onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]"; + controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"}; + + class DAGR_UI : DAGR_Pic { + idc = 266856; + x = "(SafeZoneW + SafeZoneX) - 0.45"; + y = "(SafeZoneH + SafeZoneY) - 0.47"; + }; + + class DAGR_Grid : DAGR_Text { + idc = 266851; + x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830 + y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845 + w = 0.25; + h = 0.06; + sizeEx = 0.07; + }; + class DAGR_Speed : DAGR_Text { + idc = 266852; + x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + class DAGR_Elevation : DAGR_Text { + idc = 266853; + x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + class DAGR_Heading : DAGR_Text { + idc = 266854; + x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 + y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656 + }; + class DAGR_Time : DAGR_Text { + idc = 266855; + x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925 + y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 + }; + + class DAGR_WP : DAGR_Text { + idc = 266857; + x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + + class DAGR_Bearing : DAGR_Text { + idc = 266858; + x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + class DAGR_DIST : DAGR_Text { + idc = 266859; + x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935 + y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 + }; + }; +}; diff --git a/addons/dagr/UI/DAGR_Button.paa b/addons/dagr/UI/DAGR_Button.paa new file mode 100644 index 0000000000..f81a8cef4a Binary files /dev/null and b/addons/dagr/UI/DAGR_Button.paa differ diff --git a/addons/dagr/UI/DAGR_GPS.paa b/addons/dagr/UI/DAGR_GPS.paa new file mode 100644 index 0000000000..b0e05a5a65 Binary files /dev/null and b/addons/dagr/UI/DAGR_GPS.paa differ diff --git a/addons/dagr/UI/DAGR_GPS_SHOW.paa b/addons/dagr/UI/DAGR_GPS_SHOW.paa new file mode 100644 index 0000000000..71f93e5f01 Binary files /dev/null and b/addons/dagr/UI/DAGR_GPS_SHOW.paa differ diff --git a/addons/dagr/UI/DAGR_Icon.paa b/addons/dagr/UI/DAGR_Icon.paa new file mode 100644 index 0000000000..be4afe7b51 Binary files /dev/null and b/addons/dagr/UI/DAGR_Icon.paa differ diff --git a/addons/dagr/UI/DAGR_MENU.paa b/addons/dagr/UI/DAGR_MENU.paa new file mode 100644 index 0000000000..311e2a607a Binary files /dev/null and b/addons/dagr/UI/DAGR_MENU.paa differ diff --git a/addons/dagr/UI/DAGR_PSelection.paa b/addons/dagr/UI/DAGR_PSelection.paa new file mode 100644 index 0000000000..9e1eb679fa Binary files /dev/null and b/addons/dagr/UI/DAGR_PSelection.paa differ diff --git a/addons/dagr/UI/DAGR_Selection.paa b/addons/dagr/UI/DAGR_Selection.paa new file mode 100644 index 0000000000..16ecf82593 Binary files /dev/null and b/addons/dagr/UI/DAGR_Selection.paa differ diff --git a/addons/dagr/UI/DAGR_Vector.paa b/addons/dagr/UI/DAGR_Vector.paa new file mode 100644 index 0000000000..c414cbd7e7 Binary files /dev/null and b/addons/dagr/UI/DAGR_Vector.paa differ diff --git a/addons/dagr/UI/DAGR_WP.paa b/addons/dagr/UI/DAGR_WP.paa new file mode 100644 index 0000000000..e8e541a36f Binary files /dev/null and b/addons/dagr/UI/DAGR_WP.paa differ diff --git a/addons/dagr/XEH_postInit.sqf b/addons/dagr/XEH_postInit.sqf new file mode 100644 index 0000000000..39f2a7ea28 --- /dev/null +++ b/addons/dagr/XEH_postInit.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +#include "initKeybinds.sqf" + +GVAR(outputPFH) = -1; + +GVAR(run) = false; +GVAR(hidden) = true; +GVAR(menuRun) = false; +GVAR(useDegrees) = true; +GVAR(updateInterval) = 0.5; + +GVAR(numWaypoints) = 0; +GVAR(wpString0) = ""; +GVAR(wpString1) = ""; +GVAR(wpString2) = ""; +GVAR(wpString3) = ""; +GVAR(wpString4) = ""; +GVAR(wp0) = 0; +GVAR(wp1) = 0; +GVAR(wp2) = 0; +GVAR(wp3) = 0; +GVAR(wp4) = 0; + +GVAR(displaySelection) = "DATA"; + +GVAR(vectorConnected) = false; +GVAR(noVectorData) = true; +GVAR(vectorGrid) = "00000000"; + +["RangerfinderData", {_this call FUNC(handleRangeFinderData)}] call EFUNC(common,addEventHandler); diff --git a/addons/dagr/XEH_preInit.sqf b/addons/dagr/XEH_preInit.sqf new file mode 100644 index 0000000000..7c61d71775 --- /dev/null +++ b/addons/dagr/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(handleRangeFinderData); +PREP(menuInit); +PREP(outputData); +PREP(outputVector); +PREP(outputWP); +PREP(toggleOverlay); + +ADDON = true; diff --git a/addons/dagr/config.cpp b/addons/dagr/config.cpp new file mode 100644 index 0000000000..9f46660aaa --- /dev/null +++ b/addons/dagr/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_DAGR"}; + weapons[] = {"ACE_DAGR"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_weather"}; + author[] = {"Rosuto", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "Dialog.hpp" +#include "RscTitles.hpp" diff --git a/addons/dagr/functions/fnc_handleRangeFinderData.sqf b/addons/dagr/functions/fnc_handleRangeFinderData.sqf new file mode 100644 index 0000000000..59e10a1711 --- /dev/null +++ b/addons/dagr/functions/fnc_handleRangeFinderData.sqf @@ -0,0 +1,30 @@ +/* + * Author: Rosuto, Ruthberg + * Handles incoming data packets from the Vectronix Vector LRF + * + * Arguments: + * 0: Slope distance (Meters) + * 1: Azimuth (Degrees) + * 2: Inclination (Degrees) + * + * Return Value: + * Nothing + * + * Example: + * [1000, 45, 1] call ace_dagr_fnc_handleRangeFinderData + * + * Public: No + */ +#include "script_component.hpp" + +#define EMP_RF_ACC 5 // Rangefinder Accuracy + +PARAMS_3(_slopeDistance,_azimuth,_inclination); + +if (GVAR(vectorConnected)) then { + GVAR(LAZPOS) = (eyePos player) vectorAdd ([_slopeDistance, _azimuth, _inclination] call CBA_fnc_polar2vect); + GVAR(LAZDIST) = _slopeDistance * cos(_inclination); + GVAR(LAZDIST) = floor (GVAR(LAZDIST) / EMP_RF_ACC) * EMP_RF_ACC; + GVAR(LAZHEADING) = _azimuth; + GVAR(noVectorData) = false; +}; diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf new file mode 100644 index 0000000000..739f41df0b --- /dev/null +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -0,0 +1,607 @@ +/* + * Author: Rosuto, Ruthberg + * Creates the DAGR menu dialog + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "DAGR_MENU") +#define __F1 266874 +#define __F2 266875 +#define __F3 266876 +#define __Option0 2668777 +#define __Option1 2668778 +#define __Option2 2668779 +#define __Option3 2668780 +#define __Option4 2668781 +#define __Selection0 2668783 +#define __Selection1 2668784 +#define __Selection2 2668785 +#define __Selection3 2668786 +#define __Selection4 2668787 +#define __mainText 2668782 +#define __PSelection1 2668788 +#define __PSelection2 2668789 +#define __PSelection3 2668790 +#define __PSelection4 2668791 +#define __PSelection5 2668792 +#define __PSelection6 2668793 +#define __PSelection7 2668794 +#define __PSelection8 2668795 + +135471 cutText ["", "PLAIN"]; +closeDialog 0; +createDialog "DAGR_MENU"; + +GVAR(menu) = "main"; +GVAR(selection) = 0; +GVAR(numSelections) = 5; +GVAR(tmpUpdateRate) = GVAR(updateInterval); +GVAR(edit) = false; +GVAR(add) = false; +GVAR(pointer) = 0; +GVAR(digit1) = 0; +GVAR(digit2) = 0; +GVAR(digit3) = 0; +GVAR(digit4) = 0; +GVAR(digit5) = 0; +GVAR(digit6) = 0; +GVAR(digit7) = 0; +GVAR(digit8) = 0; + +GVAR(busy) = false; +GVAR(busyTimer) = 0; + +GVAR(showNoWaypointsFound) = false; +GVAR(showInfoUpdatin) = false; +GVAR(showDeleting) = false; +GVAR(showOutOfSpace) = false; + +GVAR(PWR) = false; +GVAR(menuRun) = true; +[{ + if (!dialog || GVAR(PWR) || !GVAR(menuRun)) exitWith { + closeDialog 266860; + GVAR(menuRun) = false; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + if (GVAR(MENU_B)) then { + GVAR(menu) = "main"; + GVAR(selection) = 0; + GVAR(numSelections) = 5; + }; + + if (!GVAR(add) && !GVAR(edit)) then { + if (GVAR(DOWN)) then { + GVAR(selection) = (GVAR(numSelections) + GVAR(selection) + 1); + }; + if (GVAR(UP)) then { + GVAR(selection) = (GVAR(numSelections) + GVAR(selection) - 1); + }; + GVAR(selection) = if (GVAR(numSelections) > 0) then { GVAR(selection) % GVAR(numSelections) } else { 0 }; + }; + + if (GVAR(LEFT)) then { + GVAR(pointer) = (8 + GVAR(pointer) - 1); + }; + if (GVAR(RIGHT)) then { + GVAR(pointer) = (8 + GVAR(pointer) + 1); + }; + GVAR(pointer) = GVAR(pointer) % 8; + + (__dsp displayCtrl __PSelection1) ctrlSetText ""; + (__dsp displayCtrl __PSelection2) ctrlSetText ""; + (__dsp displayCtrl __PSelection3) ctrlSetText ""; + (__dsp displayCtrl __PSelection4) ctrlSetText ""; + (__dsp displayCtrl __PSelection5) ctrlSetText ""; + (__dsp displayCtrl __PSelection6) ctrlSetText ""; + (__dsp displayCtrl __PSelection7) ctrlSetText ""; + (__dsp displayCtrl __PSelection8) ctrlSetText ""; + + (__dsp displayCtrl __Selection0) ctrlSetText ""; + (__dsp displayCtrl __Selection1) ctrlSetText ""; + (__dsp displayCtrl __Selection2) ctrlSetText ""; + (__dsp displayCtrl __Selection3) ctrlSetText ""; + (__dsp displayCtrl __Selection4) ctrlSetText ""; + + (__dsp displayCtrl __F1) ctrlSetText ""; + (__dsp displayCtrl __F2) ctrlSetText ""; + (__dsp displayCtrl __F3) ctrlSetText ""; + + (__dsp displayCtrl __mainText) ctrlSetText ""; + (__dsp displayCtrl __Option0) ctrlSetText ""; + (__dsp displayCtrl __Option1) ctrlSetText ""; + (__dsp displayCtrl __Option2) ctrlSetText ""; + (__dsp displayCtrl __Option3) ctrlSetText ""; + (__dsp displayCtrl __Option4) ctrlSetText ""; + + switch (GVAR(menu)) do { + case "main": { + if (GVAR(SEL)) then { + switch (GVAR(selection)) do { + case 0: { + GVAR(displaySelection) = "DATA"; + GVAR(vectorConnected) = false; + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data."; + if (ACE_time - GVAR(busyTimer) > 0.5) then { + (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.0) then { + (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.5) then { + (__dsp displayCtrl __mainText) ctrlSetText "Position Acquired"; + }; + if (ACE_time - GVAR(busyTimer) > 3.0) then { + GVAR(busy) = false; + }; + }; + case 1: { + if (GVAR(numWaypoints) < 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "No Waypoints Found"; + if (!GVAR(busy)) then { + GVAR(showNoWaypointsFound) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + } else { + GVAR(menu) = "goto_wp"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0; + }; + }; + case 2: { GVAR(menu) = "wp_list"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0 }; + case 3: { GVAR(menu) = "connect"; GVAR(numSelections) = 1; }; + case 4: { GVAR(menu) = "options"; GVAR(numSelections) = 2; }; + }; + }; + if (GVAR(busy) && GVAR(showNoWaypointsFound)) then { + if (ACE_time - GVAR(busyTimer) > 2) then { + GVAR(showNoWaypointsFound) = false; + GVAR(busy) = false; + }; + }; + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText "DATA VIEW"; + (__dsp displayCtrl __Option1) ctrlSetText "GOTO WP"; + (__dsp displayCtrl __Option2) ctrlSetText "WP LIST"; + (__dsp displayCtrl __Option3) ctrlSetText "CONNECT TO"; + (__dsp displayCtrl __Option4) ctrlSetText "OPTIONS"; + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + }; + case "goto_wp": { + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0); + (__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1); + (__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2); + (__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3); + (__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4); + if (GVAR(numSelections) > 0) then { + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + }; + if (GVAR(SEL)) then { + GVAR(vectorConnected) = false; + GVAR(displaySelection) = "WP"; + switch (GVAR(selection)) do { + case 0: { DAGR_WP_INFO = GVAR(wp0); }; + case 1: { DAGR_WP_INFO = GVAR(wp1); }; + case 2: { DAGR_WP_INFO = GVAR(wp2); }; + case 3: { DAGR_WP_INFO = GVAR(wp3); }; + case 4: { DAGR_WP_INFO = GVAR(wp4); }; + }; + if (!GVAR(busy)) then { + GVAR(showInfoUpdating) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + }; + if (GVAR(busy) && GVAR(showInfoUpdating)) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Update."; + if (ACE_time - GVAR(busyTimer) > 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Update.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Update..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Updated"; + }; + if (ACE_time - GVAR(busyTimer) > 2.9) then { + GVAR(showInfoUpdating) = false; + GVAR(busy) = false; + }; + }; + }; + case "wp_list": { + if (!GVAR(add) && !GVAR(edit)) then { + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0); + (__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1); + (__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2); + (__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3); + (__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4); + (__dsp displayCtrl __F1) ctrlSetText "Add"; + (__dsp displayCtrl __F2) ctrlSetText "Edit"; + (__dsp displayCtrl __F3) ctrlSetText "Delete"; + if (GVAR(numSelections) > 0) then { + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + }; + if (GVAR(F3) && GVAR(numWaypoints) > 0) then { + if (!GVAR(busy)) then { + switch (GVAR(selection)) do { + case 0: { + GVAR(wpString0) = GVAR(wpString1); + GVAR(wp0) = GVAR(wp1); + GVAR(wpString1) = GVAR(wpString2); + GVAR(wp1) = GVAR(wp2); + GVAR(wpString2) = GVAR(wpString3); + GVAR(wp2) = GVAR(wp3); + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 1: { + GVAR(wpString1) = GVAR(wpString2); + GVAR(wp1) = GVAR(wp2); + GVAR(wpString2) = GVAR(wpString3); + GVAR(wp2) = GVAR(wp3); + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 2: { + GVAR(wpString2) = GVAR(wpString3); + GVAR(wp2) = GVAR(wp3); + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 3: { + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 4: { + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + }; + GVAR(numWaypoints) = GVAR(numWaypoints) - 1; + GVAR(numSelections) = GVAR(numWaypoints); + GVAR(showDeleting) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + }; + if (GVAR(busy) && GVAR(showDeleting)) then { + (__dsp displayCtrl __mainText) ctrlSetText "Deleting."; + if (ACE_time - GVAR(busyTimer) > 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "Deleting.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Deleting..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Waypoint Deleted"; + }; + if (ACE_time - GVAR(busyTimer) > 2.9) then { + GVAR(showDeleting) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(F1)) then { + if (GVAR(numWaypoints) == 5) then { + if (!GVAR(busy)) then { + GVAR(showOutOfSpace) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + } else { + GVAR(digit1) = 0; + GVAR(digit2) = 0; + GVAR(digit3) = 0; + GVAR(digit4) = 0; + GVAR(digit5) = 0; + GVAR(digit6) = 0; + GVAR(digit7) = 0; + GVAR(digit8) = 0; + GVAR(pointer) = 0; + GVAR(add) = true; + }; + }; + if (GVAR(busy) && GVAR(showOutOfSpace)) then { + (__dsp displayCtrl __mainText) ctrlSetText "Out of Space"; + if (ACE_time - GVAR(busyTimer) > 2.5) then { + GVAR(showOutOfSpace) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(F2) && GVAR(numWaypoints) > 0) then { + GVAR(pointer) = 0; + GVAR(edit) = true; + GVAR(add) = false; + switch (GVAR(selection)) do { + case 0: { + GVAR(digit1) = floor (GVAR(wp0) / 10000000); + GVAR(digit2) = floor (GVAR(wp0) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp0) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp0) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp0) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp0) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp0) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp0) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 1: { + GVAR(digit1) = floor (GVAR(wp1) / 10000000); + GVAR(digit2) = floor (GVAR(wp1) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp1) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp1) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp1) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp1) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp1) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp1) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 2: { + GVAR(digit1) = floor (GVAR(wp2) / 10000000); + GVAR(digit2) = floor (GVAR(wp2) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp2) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp2) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp2) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp2) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp2) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp2) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 3: { + GVAR(digit1) = floor (GVAR(wp3) / 10000000); + GVAR(digit2) = floor (GVAR(wp3) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp3) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp3) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp3) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp3) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp3) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp3) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 4: { + GVAR(digit1) = floor (GVAR(wp4) / 10000000); + GVAR(digit2) = floor (GVAR(wp4) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp4) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp4) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp4) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp4) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp4) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp4) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + }; + }; + } else { + if (!GVAR(busy)) then { + (__dsp displayCtrl __F1) ctrlSetText "Save"; + (__dsp displayCtrl __F2) ctrlSetText "Vector"; + (__dsp displayCtrl __F3) ctrlSetText "Cancel"; + GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8); + (__dsp displayCtrl __mainText) ctrlSetText GVAR(output); + (__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QUOTE(PATHTOF(UI\DAGR_PSelection.paa)); + }; + if (GVAR(F1)) then { + if (!GVAR(busy)) then { + if (GVAR(add)) then { + switch (GVAR(numWaypoints)) do { + case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); }; + case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); }; + case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); }; + case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); }; + case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); }; + }; + GVAR(numWaypoints) = GVAR(numWaypoints) + 1; + GVAR(numSelections) = GVAR(numWaypoints); + GVAR(selection) = 0; + }; + if (GVAR(edit)) then { + switch (GVAR(selection)) do { + case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); }; + case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); }; + case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); }; + case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); }; + case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); }; + }; + }; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __F1) ctrlSetText ""; + (__dsp displayCtrl __F2) ctrlSetText ""; + (__dsp displayCtrl __F3) ctrlSetText ""; + (__dsp displayCtrl __mainText) ctrlSetText "Saving."; + if (ACE_time - GVAR(busyTimer) > 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "Saving.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Saving..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Waypoint Saved"; + }; + if (ACE_time - GVAR(busyTimer) > 2.9) then { + GVAR(edit) = false; + GVAR(add) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(F2)) then { + private ["_grid", "_gridVector"]; + _grid = toArray GVAR(vectorGrid); + _grid deleteAt 4; + _grid = toString _grid; + _gridVector = parseNumber _grid; + GVAR(digit1) = floor(_gridVector / 10000000); + GVAR(digit2) = floor(_gridVector / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor(_gridVector / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor(_gridVector / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor(_gridVector / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor(_gridVector / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor(_gridVector / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor(_gridVector - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + if (GVAR(F3)) then { + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + } else { + (__dsp displayCtrl __F1) ctrlSetText "Save"; + (__dsp displayCtrl __F2) ctrlSetText "Vector"; + (__dsp displayCtrl __F3) ctrlSetText "Cancel"; + GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8); + (__dsp displayCtrl __mainText) ctrlSetText GVAR(output); + }; + if (ACE_time - GVAR(busyTimer) > 0.1) then { + GVAR(add) = false; + GVAR(edit) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(UP)) then { + switch (GVAR(pointer) + 1) do { + case 1: { GVAR(digit1) = (10 + GVAR(digit1) + 1) % 10 }; + case 2: { GVAR(digit2) = (10 + GVAR(digit2) + 1) % 10 }; + case 3: { GVAR(digit3) = (10 + GVAR(digit3) + 1) % 10 }; + case 4: { GVAR(digit4) = (10 + GVAR(digit4) + 1) % 10 }; + case 5: { GVAR(digit5) = (10 + GVAR(digit5) + 1) % 10 }; + case 6: { GVAR(digit6) = (10 + GVAR(digit6) + 1) % 10 }; + case 7: { GVAR(digit7) = (10 + GVAR(digit7) + 1) % 10 }; + case 8: { GVAR(digit8) = (10 + GVAR(digit8) + 1) % 10 }; + }; + }; + if (GVAR(DOWN)) then { + switch (GVAR(pointer) + 1) do { + case 1: { GVAR(digit1) = (10 + GVAR(digit1) - 1) % 10 }; + case 2: { GVAR(digit2) = (10 + GVAR(digit2) - 1) % 10 }; + case 3: { GVAR(digit3) = (10 + GVAR(digit3) - 1) % 10 }; + case 4: { GVAR(digit4) = (10 + GVAR(digit4) - 1) % 10 }; + case 5: { GVAR(digit5) = (10 + GVAR(digit5) - 1) % 10 }; + case 6: { GVAR(digit6) = (10 + GVAR(digit6) - 1) % 10 }; + case 7: { GVAR(digit7) = (10 + GVAR(digit7) - 1) % 10 }; + case 8: { GVAR(digit8) = (10 + GVAR(digit8) - 1) % 10 }; + }; + }; + }; + }; + case "connect": { + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText "Vector 21"; + (__dsp displayCtrl __Selection0) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + if (GVAR(SEL)) then { + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __mainText) ctrlSetText "Connecting."; + if (ACE_time - GVAR(busyTimer) > 0.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Connecting.."; + }; + if (ACE_time - GVAR(busyTimer) > 0.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Connecting..."; + }; + if (ACE_time - GVAR(busyTimer) > 0.6) then { + if (ACE_player hasWeapon "ACE_Vector") then { + GVAR(displaySelection) = "VECTOR"; + (__dsp displayCtrl __mainText) ctrlSetText "Vector Connected"; + GVAR(vectorConnected) = true; + } else { + (__dsp displayCtrl __mainText) ctrlSetText "No Device Found"; + GVAR(vectorConnected) = false; + }; + }; + if (ACE_time - GVAR(busyTimer) > 3.1) then { + GVAR(busy) = false; + if (GVAR(vectorConnected)) then { + GVAR(menu) = "main"; GVAR(numSelections) = 5; + }; + }; + }; + }; + case "options": { + (__dsp displayCtrl __Option0) ctrlSetText "Signal Delay"; + (__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" }); + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + if (GVAR(SEL)) then { + GVAR(vectorConnected) = false; + switch (GVAR(selection)) do { + case 0: { GVAR(menu) = "update_rate"; GVAR(numSelections) = 1; GVAR(tmpUpdateRate) = GVAR(updateInterval); }; + case 1: { GVAR(useDegrees) = !GVAR(useDegrees); }; + }; + } + }; + case "update_rate": { + if (GVAR(F1)) then { + GVAR(updateInterval) = GVAR(tmpUpdateRate); + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __mainText) ctrlSetText "Updating."; + if (ACE_time - GVAR(busyTimer) > 0.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Updating.."; + }; + if (ACE_time - GVAR(busyTimer) > 0.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Updating..."; + }; + if (ACE_time - GVAR(busyTimer) > 0.6) then { + (__dsp displayCtrl __mainText) ctrlSetText "Update Success"; + }; + if (ACE_time - GVAR(busyTimer) > 2.1) then { + GVAR(busy) = false; + GVAR(menu) = "options"; GVAR(numSelections) = 2; + }; + }; + if (GVAR(F3)) then { + GVAR(menu) = "options"; GVAR(numSelections) = 2; + }; + if (GVAR(DOWN)) then { + GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) - 0.1; + }; + if (GVAR(UP)) then { + GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) + 0.1; + }; + GVAR(tmpUpdateRate) = 0.1 max GVAR(tmpUpdateRate) min 2.0; + if (!GVAR(busy)) then { + (__dsp displayCtrl __mainText) ctrlSetText (Str(GVAR(tmpUpdateRate) * 1000) + "ms"); + (__dsp displayCtrl __F1) ctrlSetText "Save"; + (__dsp displayCtrl __F3) ctrlSetText "Cancel"; + }; + }; + }; + + if (!GVAR(busy)) then { + GVAR(F3) = false; + GVAR(F2) = false; + GVAR(F1) = false; + GVAR(MENU_B) = false; + GVAR(SEL) = false; + DAGR_NEXT = false; + GVAR(RIGHT) = false; + GVAR(LEFT) = false; + GVAR(UP) = false; + GVAR(DOWN) = false; + GVAR(PWR) = false; + }; +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf new file mode 100644 index 0000000000..ff7429fa0a --- /dev/null +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -0,0 +1,120 @@ +/* + * Author: Rosuto + * DAGR data output loop + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +135471 cutRsc ["DAGR_DISPLAY", "plain down"]; + +#define __display (uiNameSpace getVariable "DAGR_DISPLAY") + +#define __gridControl (__display displayCtrl 266851) +#define __speedControl (__display displayCtrl 266852) +#define __elevationControl (__display displayCtrl 266853) +#define __headingControl (__display displayCtrl 266854) +#define __timeControl (__display displayCtrl 266855) +#define __background (__display displayCtrl 266856) + +__background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa)); + +if (GVAR(outputPFH) != -1) exitWith {}; + +GVAR(outputPFH) = [{ + private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xgrid", "_ygrid", "_xcoord", "_ycoord", "_speed", "_dagrHeading", "_dagrGrid", "_dagrElevation", "_dagrSpeed", "_dagrTime", "_elevation"]; + + // Abort Condition + if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { + GVAR(outputPFH) = -1; + 135471 cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + // GRID + _pos = getPosASL ACE_player; + + _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); + _gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid"); + _offsetX = getNumber (_gridConfig >> "offsetX"); + _offsetY = getNumber (_gridConfig >> "offsetY"); + _stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX"); + _stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY"); + + if (_stepY >= 0) then { + _pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY]; + }; + + // Incase grids go neg due to 99-00 boundry + if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];}; + if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];}; + + _xGrid = toArray Str(round(_pos select 0)); + while {count _xGrid < 5} do { + _xGrid = [48] + _xGrid; + }; + _xGrid resize 4; + _xGrid = toString _xGrid; + _xGrid = parseNumber _xGrid; + + _yGrid = toArray Str(round(_pos select 1)); + while {count _yGrid < 5} do { + _yGrid = [48] + _yGrid; + }; + _yGrid resize 4; + _yGrid = toString _yGrid; + _yGrid = parseNumber _yGrid; + + _xCoord = switch true do { + case (_xGrid >= 1000): { "" + Str(_xGrid) }; + case (_xGrid >= 100): { "0" + Str(_xGrid) }; + case (_xGrid >= 10): { "00" + Str(_xGrid) }; + default { "000" + Str(_xGrid) }; + }; + + _yCoord = switch true do { + case (_yGrid >= 1000): { "" + Str(_yGrid) }; + case (_yGrid >= 100): { "0" + Str(_yGrid) }; + case (_yGrid >= 10): { "00" + Str(_yGrid) }; + default { "000" + Str(_yGrid) }; + }; + + _dagrGrid = _xcoord + " " + _ycoord; + + // SPEED + _speed = speed (vehicle ACE_player); + _speed = floor (_speed * 10) / 10; + _speed = abs(_speed); + _dagrspeed = str _speed + "kph"; + + // Elevation + _elevation = getPosASL ACE_player; + _elevation = floor ((_elevation select 2) + EGVAR(weather,altitude)); + _dagrElevation = str _elevation + "m"; + + // Heading + _dagrHeading = if (!GVAR(useDegrees)) then { + floor (DEG_TO_MIL(direction (vehicle ACE_player))) + } else { + floor (direction (vehicle ACE_player)) + }; + + // Time + _dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; + + // Output + __gridControl ctrlSetText format ["%1", _dagrGrid]; + __speedControl ctrlSetText format ["%1", _dagrSpeed]; + __elevationControl ctrlSetText format ["%1", _dagrElevation]; + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 ", _dagrHeading] }); + __timeControl ctrlSetText format ["%1", _dagrTime]; + +}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf new file mode 100644 index 0000000000..660e678a82 --- /dev/null +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -0,0 +1,98 @@ +/* + * Author: Rosuto + * DAGR vector output loop + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +private ["_pos", "_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"]; + +135471 cutRsc ["DAGR_DISPLAY", "plain down"]; + +#define __display (uiNameSpace getVariable "DAGR_DISPLAY") + +#define __gridControl (__display displayCtrl 266851) +#define __speedControl (__display displayCtrl 266858) +#define __elevationControl (__display displayCtrl 266853) +#define __headingControl (__display displayCtrl 266854) +#define __timeControl (__display displayCtrl 266855) +#define __background (__display displayCtrl 266856) + +__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa)); + +if (GVAR(noVectorData)) exitwith {}; + +_pos = [GVAR(LAZPOS) select 0, GVAR(LAZPOS) select 1]; + +// Incase grids go neg due to 99-00 boundry +if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];}; +if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];}; + +// Find laser position +_xGrid = toArray Str(round(_pos select 0)); + +while {count _xGrid < 5} do { + _xGrid = [48] + _xGrid; +}; +_xGrid resize 4; +_xGrid = toString _xGrid; +_xGrid = parseNumber _xGrid; + +_yGrid = toArray Str(round(_pos select 1)); +while {count _yGrid < 5} do { + _yGrid = [48] + _yGrid; +}; +_yGrid resize 4; +_yGrid = toString _yGrid; +_yGrid = parseNumber _yGrid; + +_xCoord = switch true do { + case (_xGrid >= 1000): { "" + Str(_xGrid) }; + case (_xGrid >= 100): { "0" + Str(_xGrid) }; + case (_xGrid >= 10): { "00" + Str(_xGrid) }; + default { "000" + Str(_xGrid) }; +}; + +_yCoord = switch true do { + case (_yGrid >= 1000): { "" + Str(_yGrid) }; + case (_yGrid >= 100): { "0" + Str(_yGrid) }; + case (_yGrid >= 10): { "00" + Str(_yGrid) }; + default { "000" + Str(_yGrid) }; +}; + +_dagrGrid = _xCoord + " " + _yCoord; + +// Find target elevation +_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(weather,altitude)); +_dagrElevation = str _elevation + "m"; + +// Time +_dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString; + +// Bearing +_bearing = GVAR(LAZHEADING); +if (_bearing >= 360) then {_bearing = _bearing - 360;}; +if (!GVAR(useDegrees)) then {_bearing = DEG_TO_MIL(_bearing)}; +_bearing = floor (_bearing); + +// Distance +_dagrDist = str GVAR(LAZDIST) + "m"; + +// Put grid into variable so DAGR menu can access it +GVAR(vectorGrid) = _dagrGrid; + +// OUTPUT +__gridControl ctrlSetText format ["%1", _dagrGrid]; +__speedControl ctrlSetText format ["%1", _dagrDist]; +__elevationControl ctrlSetText format ["%1", _dagrElevation]; +__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1", _bearing] }); +__timeControl ctrlSetText format ["%1", _dagrTime]; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf new file mode 100644 index 0000000000..d1fc2a47f2 --- /dev/null +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -0,0 +1,136 @@ +/* + * Author: Rosuto + * DAGR waypoint output loop + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +135471 cutRsc ["DAGR_DISPLAY", "plain down"]; + +#define __display (uiNameSpace getVariable "DAGR_DISPLAY") + +#define __gridControl (__display displayCtrl 266851) +#define __speedControl (__display displayCtrl 266858) +#define __elevationControl (__display displayCtrl 266857) +#define __headingControl (__display displayCtrl 266854) +#define __timeControl (__display displayCtrl 266859) +#define __background (__display displayCtrl 266856) + +__background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa)); + +if (GVAR(outputPFH) != -1) exitWith {}; + +GVAR(outputPFH) = [{ + private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xGrid", "_yGrid", "_xCoord", "_yCoord", "_dagrHeading", "_dagrGrid", "_bearing", "_MYpos", "_WPpos", "_dagrDistance", "_distance"]; + + // Abort Condition + if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { + GVAR(outputPFH) = -1; + 135471 cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + // GRID + _pos = getPosASL ACE_player; + + _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); + _gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid"); + _offsetX = getNumber (_gridConfig >> "offsetX"); + _offsetY = getNumber (_gridConfig >> "offsetY"); + _stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX"); + _stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY"); + + if (_stepY >= 0) then { + _pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY]; + }; + + // Incase grids go neg due to 99-00 boundry + if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];}; + if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];}; + + _xGrid = toArray Str(round(_pos select 0)); + while {count _xGrid < 5} do { + _xGrid = [48] + _xGrid; + }; + _xGrid resize 4; + _xGrid = toString _xGrid; + _xGrid = parseNumber _xGrid; + + _yGrid = toArray Str(round(_pos select 1)); + while {count _yGrid < 5} do { + _yGrid = [48] + _yGrid; + }; + _yGrid resize 4; + _yGrid = toString _yGrid; + _yGrid = parseNumber _yGrid; + + _xCoord = switch true do { + case (_xGrid >= 1000): { "" + Str(_xGrid) }; + case (_xGrid >= 100): { "0" + Str(_xGrid) }; + case (_xGrid >= 10): { "00" + Str(_xGrid) }; + default { "000" + Str(_xGrid) }; + }; + + _yCoord = switch true do { + case (_yGrid >= 1000): { "" + Str(_yGrid) }; + case (_yGrid >= 100): { "0" + Str(_yGrid) }; + case (_yGrid >= 10): { "00" + Str(_yGrid) }; + default { "000" + Str(_yGrid) }; + }; + + _dagrGrid = _xCoord + " " + _yCoord; + + // WP Grid + _xGrid2 = floor (DAGR_WP_INFO / 10000); + _yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000; + + _xCoord2 = switch true do { + case (_xGrid2 >= 1000): { "" + Str(_xGrid2) }; + case (_xGrid2 >= 100): { "0" + Str(_xGrid2) }; + case (_xGrid2 >= 10): { "00" + Str(_xGrid2) }; + default { "000" + Str(_xGrid2) }; + }; + + _yCoord2 = switch true do { + case (_yGrid2 >= 1000): { "" + Str(_yGrid2) }; + case (_yGrid2 >= 100): { "0" + Str(_yGrid2) }; + case (_yGrid2 >= 10): { "00" + Str(_yGrid2) }; + default { "000" + Str(_yGrid2) }; + }; + + _dagrGrid2 = _xCoord2 + " " + _yCoord2; + + // Distance + _WPpos = [[_xCoord2, _yCoord2], true] call CBA_fnc_mapGridToPos; + _MYpos = [[_xCoord, _yCoord], true] call CBA_fnc_mapGridToPos; + _distance = _MYpos distance _WPpos; + _distance = floor (_distance * 10) / 10; + _dagrDistance = str _distance + "m"; + + // Heading + _dagrHeading = floor (if (GVAR(useDegrees)) then { + direction (vehicle ACE_player) + } else { + DEG_TO_MIL(direction (vehicle ACE_player)) + }); + + // WP Heading + _bearing = floor ((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir); + + // Output + __gridControl ctrlSetText format ["%1", _dagrGrid]; + __speedControl ctrlSetText format ["%1", _bearing]; + __elevationControl ctrlSetText format ["%1", _dagrGrid2]; + __headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1", _dagrHeading] }); + __timeControl ctrlSetText format ["%1", _dagrDistance]; + +}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_toggleOverlay.sqf b/addons/dagr/functions/fnc_toggleOverlay.sqf new file mode 100644 index 0000000000..1fcb87d0ff --- /dev/null +++ b/addons/dagr/functions/fnc_toggleOverlay.sqf @@ -0,0 +1,54 @@ +/* + * Author: Rosuto, Ruthberg + * Toggles the DAGR overlay + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(run) = !GVAR(run); + +if (GVAR(run)) then { + if (GVAR(menuRun) && dialog) then { + GVAR(menuRun) = false; + closeDialog 0; + }; + GVAR(hidden) = true; + [{ + EXPLODE_1_PVT(_this select 0,_vehicle); + if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith { + GVAR(run) = false; + 135471 cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + if (cameraView == "GUNNER") then { + if (!GVAR(hidden)) then { + GVAR(hidden) = true; + 135471 cutText ["", "PLAIN"]; + }; + } else { + if (GVAR(hidden)) then { + GVAR(hidden) = false; + switch (toUpper GVAR(displaySelection)) do { + case "WP" : { + call FUNC(outputWP); + }; + case "VECTOR" : { + call FUNC(outputVector); + }; + case "DATA" : { + call FUNC(outputData); + }; + }; + }; + }; + }, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/dagr/functions/script_component.hpp b/addons/dagr/functions/script_component.hpp new file mode 100644 index 0000000000..18b02deaee --- /dev/null +++ b/addons/dagr/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\dagr\script_component.hpp" \ No newline at end of file diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf new file mode 100644 index 0000000000..4575401feb --- /dev/null +++ b/addons/dagr/initKeybinds.sqf @@ -0,0 +1,59 @@ + +["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false}; + + // Statement + if (!GVAR(menuRun)) then { + [] call FUNC(menuInit); + } else { + GVAR(PWR) = true; // Simulate pressing the power button + }; + true +}, +{false}, +[0, [false, true, false]], false] call cba_fnc_addKeybind; // (empty default key) + +["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false}; + + // Statement + [] call FUNC(toggleOverlay); + true +}, +{false}, +[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key) + +//Add deviceKey entry: +private ["_conditonCode", "_toggleCode", "_closeCode"]; +_conditonCode = { + ([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)); +}; +_toggleCode = { + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {}; + + // Statement + [] call FUNC(toggleOverlay); + if (!GVAR(run)) then { + [] call FUNC(menuInit); + }; +}; +_closeCode = { + // Statement + if (GVAR(run)) then { + //If dispaly is open, close it: + [] call FUNC(toggleOverlay); + }; + if (dialog && GVAR(menuRun)) then { + //If dialog is open, close it: + GVAR(menuRun) = false; + closeDialog 0; + }; +}; +["DAGR", QUOTE(PATHTOF(UI\DAGR_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); diff --git a/addons/dagr/script_component.hpp b/addons/dagr/script_component.hpp new file mode 100644 index 0000000000..f7a723e533 --- /dev/null +++ b/addons/dagr/script_component.hpp @@ -0,0 +1,15 @@ +#define COMPONENT dagr +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_DAGR + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_DAGR + #define DEBUG_SETTINGS DEBUG_SETTINGS_DAGR +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define DEG_TO_MIL(d) (d / 360 * 6400) +#define MIL_TO_DEG(d) (d / 6400 * 360) diff --git a/addons/dagr/stringtable.xml b/addons/dagr/stringtable.xml new file mode 100644 index 0000000000..7da844d614 --- /dev/null +++ b/addons/dagr/stringtable.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 956f004635..d1eb18d6b4 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -50,4 +50,4 @@ Нести - + \ No newline at end of file diff --git a/addons/explosives/ACE_Settings.hpp b/addons/explosives/ACE_Settings.hpp index 038f06291d..ef6a723d5b 100644 --- a/addons/explosives/ACE_Settings.hpp +++ b/addons/explosives/ACE_Settings.hpp @@ -7,4 +7,10 @@ class ACE_Settings { value = 1; typeName = "BOOL"; }; + class GVAR(ExplodeOnDefuse) { + displayName = CSTRING(ExplodeOnDefuse_DisplayName); + description = CSTRING(ExplodeOnDefuse_Description); + value = 1; + typeName = "BOOL"; + }; }; diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index 9c33246cd8..5df3d005bc 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -9,45 +9,45 @@ onSetup parameters: 0: STRING - Magazine Classname */ class Command { - displayName = $STR_ACE_Explosives_clacker_displayName; + displayName = CSTRING(clacker_displayName); picture = PATHTOF(Data\UI\Clacker.paa); onPlace = QUOTE(_this call FUNC(AddClacker);false); requires[] = {"ACE_Clacker"}; }; class MK16_Transmitter:Command { - displayName = $STR_ACE_Explosives_MK16_displayName; + displayName = CSTRING(MK16_displayName); picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa); requires[] = {"ACE_M26_Clacker"}; }; class DeadManSwitch:Command { - displayName = $STR_ACE_Explosives_DeadManSwitch_displayName; + displayName = CSTRING(DeadManSwitch_displayName); picture = PATHTOF(Data\UI\DeadmanSwitch.paa); requires[] = {"ACE_DeadManSwitch"}; }; class Cellphone:Command { - displayName = $STR_ACE_Explosives_cellphone_displayName; + displayName = CSTRING(cellphone_displayName); picture = PATHTOF(Data\UI\Cellphone_UI.paa); onPlace = QUOTE(_this call FUNC(addCellphoneIED);false); requires[] = {"ACE_Cellphone"}; }; class PressurePlate { - displayName = $STR_ACE_Explosives_PressurePlate; + displayName = CSTRING(PressurePlate); picture = PATHTOF(Data\UI\PressurePlate.paa); onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'ACE_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false"; }; class IRSensor { - displayName = $STR_ACE_Explosives_IRSensor; + displayName = CSTRING(IRSensor); picture = PATHTOF(Data\UI\PressurePlate.paa); onPlace = "false"; }; class Timer { - displayName = $STR_ACE_Explosives_timerName; + displayName = CSTRING(timerName); picture = PATHTOF(data\UI\Timer.paa); onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false); onSetup = QUOTE(_this call FUNC(openTimerSetUI);true); }; class Tripwire { - displayName = $STR_ACE_Explosives_TripWire; + displayName = CSTRING(TripWire); picture = PATHTOF(Data\UI\Tripwire.paa); onPlace = "false"; }; diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index c6d70bc64a..8299a979b3 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -69,25 +69,52 @@ class CfgAmmo { /*class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo; class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo;*/ - + class IEDUrbanBig_Remote_Ammo: PipeBombBase { - mineTrigger = "RangeTrigger"; triggerWhenDestroyed = 1; - soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40}; + ACE_explodeOnDefuse = 0.02; + soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; }; - class IEDLandBig_Remote_Ammo: PipeBombBase { + class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo { + mineTrigger = "RemoteTrigger"; + }; + class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo { mineTrigger = "RangeTrigger"; - triggerWhenDestroyed = 1; - soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40}; }; + class IEDUrbanSmall_Remote_Ammo: PipeBombBase { - mineTrigger = "RangeTrigger"; triggerWhenDestroyed = 1; - soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40}; + ACE_explodeOnDefuse = 0.02; + soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; + }; + class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo { + mineTrigger = "RemoteTrigger"; }; - class IEDLandSmall_Remote_Ammo: PipeBombBase { + class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo { mineTrigger = "RangeTrigger"; + }; + + class IEDLandBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; - soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40}; + ACE_explodeOnDefuse = 0.02; + soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; + }; + class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo { + mineTrigger = "RemoteTrigger"; + }; + class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo { + mineTrigger = "RangeTrigger"; + }; + + class IEDLandSmall_Remote_Ammo: PipeBombBase { + triggerWhenDestroyed = 1; + ACE_explodeOnDefuse = 0.02; + soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40}; + }; + class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo { + mineTrigger = "RemoteTrigger"; + }; + class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo { + mineTrigger = "RangeTrigger"; }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 248ee12640..39d08917c3 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -44,10 +44,11 @@ class CfgMagazines { ACE_SetupObject = "ACE_Explosives_Place_Claymore"; ACE_DelayTime = 1.5; class ACE_Triggers { - SupportedTriggers[] = {"Command"}; + SupportedTriggers[] = {"Command", "MK16_Transmitter"}; class Command { - FuseTime = 0.5; + FuseTime = 0.5; }; + class MK16_Transmitter: Command {}; }; }; @@ -78,13 +79,13 @@ class CfgMagazines { class ACE_Triggers { SupportedTriggers[] = {"IRSensor","PressurePlate","Timer","Command"}; class PressurePlate{ - displayName = $STR_ACE_Explosives_SLAME_Magnetic; + displayName = CSTRING(SLAME_Magnetic); digDistance = 0; ammo = "SLAMDirectionalMine_Magnetic_Ammo"; pitch = 90; }; class IRSensor{ - displayName = $STR_ACE_Explosives_SLAME_IRSensor; + displayName = CSTRING(SLAME_IRSensor); }; class Timer { ammo = "SLAMDirectionalMine_Timer_Ammo"; @@ -95,45 +96,51 @@ class CfgMagazines { }; }; }; - + class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag { ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig"; class ACE_Triggers { - SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"}; + SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { FuseTime = 0.5; + ammo = "IEDUrbanBig_Command_Ammo"; }; class DeadmanSwitch:Command {}; class Cellphone:Command {}; class PressurePlate { - displayName = $STR_ACE_Explosives_SLAME_Magnetic; + displayName = CSTRING(PressurePlate); digDistance = 0; - ammo = "IEDUrbanBig_Remote_Ammo"; + ammo = "IEDUrbanBig_Range_Ammo"; pitch = 0; }; - }; + }; }; + class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag { ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig"; class ACE_Triggers: ACE_Triggers { + class Command: Command { + ammo = "IEDLandBig_Command_Ammo"; + }; class PressurePlate: PressurePlate { - ammo = "IEDLandBig_Remote_Ammo"; + ammo = "IEDLandBig_Range_Ammo"; }; }; }; class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall"; class ACE_Triggers { - SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"}; + SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { FuseTime = 0.5; + ammo = "IEDUrbanSmall_Command_Ammo"; }; class DeadmanSwitch: Command {}; class Cellphone: Command {}; class PressurePlate { - displayName = $STR_ACE_Explosives_SLAME_Magnetic; + displayName = CSTRING(PressurePlate); digDistance = 0; - ammo = "IEDUrbanSmall_Remote_Ammo"; + ammo = "IEDUrbanSmall_Range_Ammo"; pitch = 0; }; }; @@ -141,8 +148,11 @@ class CfgMagazines { class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag { ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall"; class ACE_Triggers: ACE_Triggers { + class Command: Command { + ammo = "IEDLandSmall_Command_Ammo"; + }; class PressurePlate: PressurePlate { - ammo = "IEDLandSmall_Remote_Ammo"; + ammo = "IEDLandSmall_Range_Ammo"; }; }; }; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index d5bad207a5..239ecd4e17 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -20,6 +20,12 @@ class ACE_ModuleExplosive: ACE_Module { typeName = "BOOL"; defaultValue = 1; }; + class ExplodeOnDefuse { + displayName = "$STR_ACE_Explosive_ExplodeOnDefuse_DisplayName"; + description = "$STR_ACE_Explosive_ExplodeOnDefuse_Description"; + typeName = "BOOL"; + defaultValue = 1; + }; }; class ModuleDescription { description = CSTRING(Module_Description); diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 3cc63fb36a..7a51a7d765 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -3,28 +3,28 @@ class CfgVehicles { class CAManBase: Man { class ACE_SelfActions { class ACE_Explosives { - displayName = $STR_ACE_Explosives_Menu; + displayName = CSTRING(Menu); condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)])); statement = ""; - exceptions[] = {"isNotSwimming", "isNotInside"}; + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 4; icon = PATHTOF(UI\Explosives_Menu_ca.paa); hotkey = "X"; //Sub-menu items class ACE_Detonate { - displayName = $STR_ACE_Explosives_Detonate; + displayName = CSTRING(Detonate); condition = QUOTE([_player] call FUNC(canDetonate)); statement = ""; insertChildren = QUOTE([_player] call FUNC(addTransmitterActions);); - exceptions[] = {"isNotSwimming", "isNotInside"}; + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 1; icon = PATHTOF(UI\Explosives_Menu_ca.paa); priority = 2; hotkey = "T"; }; class ACE_Place { - displayName = $STR_ACE_Explosives_Place; + displayName = CSTRING(Place); condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)}); statement = ""; insertChildren = QUOTE([_player] call FUNC(addExplosiveActions);); @@ -35,10 +35,10 @@ class CfgVehicles { hotkey = "P"; }; class ACE_Cellphone { - displayName = $STR_ACE_Explosives_cellphone_displayName; + displayName = CSTRING(cellphone_displayName); condition = "('ACE_Cellphone' in (items ace_player))"; statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';"; - exceptions[] = {"isNotSwimming", "isNotInside"}; + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = PATHTOF(Data\UI\Cellphone_UI.paa); priority = 0.8; @@ -65,7 +65,7 @@ class CfgVehicles { distance = 5; condition = "true"; class ACE_Defuse { - displayName = $STR_ACE_Explosives_Defuse; + displayName = CSTRING(Defuse); condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse);); exceptions[] = {"isNotSwimming"}; @@ -103,7 +103,7 @@ class CfgVehicles { statement = ""; insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions);); showDisabled = 0; - exceptions[] = {}; + exceptions[] = {"isNotSwimming"}; priority = 5; icon = QUOTE(PATHTOF(UI\Explosives_Menu_ca.paa)); }; @@ -114,7 +114,7 @@ class CfgVehicles { condition = "true"; statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;); showDisabled = 0; - exceptions[] = {}; + exceptions[] = {"isNotSwimming"}; priority = 5; icon = "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_takemine_ca.paa"; }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index a90b4d515f..7768515953 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -9,8 +9,8 @@ class CfgWeapons { class ACE_Clacker: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Explosives_clacker_displayName; - descriptionShort = $STR_ACE_Explosives_clacker_description; + displayName = CSTRING(clacker_displayName); + descriptionShort = CSTRING(clacker_description); picture = PATHTOF(Data\UI\Clacker.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; ACE_Range = 250; @@ -22,14 +22,14 @@ class CfgWeapons { }; }; class ACE_M26_Clacker: ACE_Clacker { - displayName = $STR_ACE_Explosives_M26_displayName; + displayName = CSTRING(M26_displayName); picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); ACE_Range = 5000; }; class ACE_DefusalKit: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Explosives_DefusalKit_displayName; - descriptionShort = $STR_ACE_Explosives_DefusalKit_description; + displayName = CSTRING(DefusalKit_displayName); + descriptionShort = CSTRING(DefusalKit_description); picture = PATHTOF(Data\UI\Pliers.paa); model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; @@ -40,8 +40,8 @@ class CfgWeapons { }; class ACE_DeadManSwitch: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Explosives_DeadManSwitch_displayName; - descriptionShort = $STR_ACE_Explosives_DeadManSwitch_description; + displayName = CSTRING(DeadManSwitch_displayName); + descriptionShort = CSTRING(DeadManSwitch_description); picture = PATHTOF(Data\UI\DeadmanSwitch.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; ACE_Range = 100; @@ -54,8 +54,8 @@ class CfgWeapons { }; class ACE_Cellphone: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Explosives_cellphone_displayName; - descriptionShort = $STR_ACE_Explosives_cellphone_description; + displayName = CSTRING(cellphone_displayName); + descriptionShort = CSTRING(cellphone_description); picture = PATHTOF(Data\UI\Cellphone_UI.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; ACE_Range = 15000; diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index 46fe2e9f85..6e6374af12 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -15,7 +15,7 @@ class RscEdit; class Rsc_ACE_CallScreen_Edit:RscEdit { canModify = 1; - colorBackground[] = {0,0,0,1}; + colorBackground[] = {0,0,0,0}; colorText[] = {0,0,0,1}; colorDisabled[] = {1,1,1,0.25}; colorSelection[] = { @@ -89,7 +89,7 @@ class RscACE_SelectTimeUI { h = 0.1; y = 0.09; style = ST_CENTER; - text = $STR_ACE_Explosives_Cancel; + text = CSTRING(Cancel); action = "closeDialog 0;"; }; class approveBtn: RscButton { @@ -99,7 +99,7 @@ class RscACE_SelectTimeUI { h = 0.1; w = 0.15; style = ST_CENTER; - text = $STR_ACE_Explosives_SetTime; + text = CSTRING(SetTime); action = "closeDialog 0;"; }; }; diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index 28a14b25a5..e0c7f7c85d 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" EXPLODE_2_PVT(_this,_unit,_explosive); -if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith { +if (GVAR(ExplodeOnDefuse) && (random 1.0) < getNumber(ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse")) exitWith { [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); }; diff --git a/addons/explosives/functions/fnc_module.sqf b/addons/explosives/functions/fnc_module.sqf index 4080b41bde..56225d8ca8 100644 --- a/addons/explosives/functions/fnc_module.sqf +++ b/addons/explosives/functions/fnc_module.sqf @@ -27,5 +27,7 @@ if !(_activated) exitWith {}; call EFUNC(Common,readSettingFromModule); [_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"] call EFUNC(Common,readSettingFromModule); +[_logic, QGVAR(ExplodeOnDefuse),"ExplodeOnDefuse"] + call EFUNC(Common,readSettingFromModule); diag_log text "[ACE]: Explosive Module Initialized."; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 839f8a1582..abd6d83e26 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -510,35 +510,47 @@ System ładunków wybuchowych Sistema de explosivos Sprengstoffsystem + Systém výbušnin Require specialists? Wymagaj specjalistów? ¿Requiere especialista? Benötigt Sprengstoffexperten? + Vyžadovat specialistu? Require explosive specialists to disable explosives? Default: No Wymagać saperów do rozbrajania ładunków wybuchowych? Domyślnie: Nie Requiere especialista en explosivos para desactivar explosivos?. Por defecto: No Benötige Sprengstoffexperte um Sprengladungen zu entschärfen? Standard: Nein + Vyžadovat specialistu na zneškodnění výbušniny? Výchozí: Ne Punish non-specialists? Karaj nie-specjalistów? ¿Penalizar a los no especialistas? Bestrafe Nicht-Sprengstoffexperten? + Potrestat, pokud není specialista? Increase the time it takes to complete actions for non-specialists? Default: Yes Zwiększyć ilość wymaganego czasu do ukończenia akcji dla nie-specjalistów? Domyślnie: Tak Aumenta el tiempo que lleva completar acciones para los no especialstas?. Por defecto: Si Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja + Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano + + + Explode on defusal? + + + Enable certain explosives to explode on defusal? Default: Yes Moduł ten pozwala dostosować opcje związane z ładunkami wybuchowymi, ich podkładaniem oraz rozbrajaniem. Dieses Modul erlaubt die Einstellungen für Sprengstoffe zu verändern. + Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin. diff --git a/addons/fcs/CfgVehicles.hpp b/addons/fcs/CfgVehicles.hpp index 5f357c9005..10cb868ca0 100644 --- a/addons/fcs/CfgVehicles.hpp +++ b/addons/fcs/CfgVehicles.hpp @@ -25,7 +25,7 @@ class CfgVehicles { class Car: LandVehicle { class ACE_SelfActions { class ResetFCS { - displayName = $STR_ACE_FCS_ResetFCS; + displayName = CSTRING(ResetFCS); condition = QUOTE(call FUNC(canResetFCS)); statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset);); showDisabled = 0; @@ -38,7 +38,7 @@ class CfgVehicles { class Tank: LandVehicle { class ACE_SelfActions { class ResetFCS { - displayName = $STR_ACE_FCS_ResetFCS; + displayName = CSTRING(ResetFCS); condition = QUOTE(call FUNC(canResetFCS)); statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset);); showDisabled = 0; diff --git a/addons/flashsuppressors/config.cpp b/addons/flashsuppressors/config.cpp index 10b9622d17..b8e0c1e120 100644 --- a/addons/flashsuppressors/config.cpp +++ b/addons/flashsuppressors/config.cpp @@ -4,13 +4,13 @@ class CfgPatches { class ADDON { units[] = {}; weapons[] = { - "ACE_muzzle_mzls_H", - "ACE_muzzle_mzls_B", - "ACE_muzzle_mzls_L", - "ACE_muzzle_mzls_smg_01", - "ACE_muzzle_mzls_smg_02", - "ACE_muzzle_mzls_338", - "ACE_muzzle_mzls_93mmg" + "ACE_muzzle_mzls_H", + "ACE_muzzle_mzls_B", + "ACE_muzzle_mzls_L", + "ACE_muzzle_mzls_smg_01", + "ACE_muzzle_mzls_smg_02", + "ACE_muzzle_mzls_338", + "ACE_muzzle_mzls_93mmg" }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index fa1a680e92..fb25760e94 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -3,51 +3,72 @@ Fragmentation Simulation + Symulacja fragmentacji Simulación de fragmentación Splittersimulation + Simulace fragmentace Enable the ACE Fragmentation Simulation Activa la simulación de fragmentación ACE + Aktywuje symulację fragmentacji ACE Aktiviere die ACE-Splittersimulation + Povolit ACE simulaci fragmentace Spalling Simulation Simulación de astillamiento + Symulacja odprysków Explosionssimulation + Simulace úlomků Enable the ACE Spalling Simulation Activa la simulación de astillamiento ACE + Aktywuje symulację odprysków ACE Aktiviere ACE-Explosionssimulation + Povolit ACE simulaci úlomků Maximum Projectiles Tracked Máximos proyectiles rastreados + Maks. liczba śledzonych pocisków Maximalzahl der verfolgten Projektile + Maximální počet sledovaných projektilů This setting controls the maximum amount of projectiles the fragmentation and spalling system will track at any given time. If more projectiles are fired, they will not be tracked. Lower this setting if you do not want FPS drops at high-count projectile scenarios ( >200 rounds in the air at once) Este ajuste controla la cantidad máxima de proyectiles del sistema de fragmentación y astillamiento de los que se hará un seguimiento en cualquier momento dado. Si se disparan más proyectiles, no serán rastreados. Baja esta opción si no deseas una bajada de FPS en escenarios con muchos proyectiles (>200 proyectiles en el aire a la vez) + To ustawienie kontroluje maksymalną ilość pocisków, jakie fragmentacja i odpryski symulują w danym momencie. Jeżeli więcej pocisków będzie wystrzelonych, wtedy nie będą one śledzone. Zmniejsz tą opcję jeżeli nie chcesz odczuwać spadków FPS podczas ciężkiej wymiany ognia (więcej niż 200 pocisków w powietrzu na raz). Diese Einstellung steuert die maximale Anzahl an Projektilen, die das Splitter- und Explosionssystem gleichzeitig verfolgen wird. Wenn mehr Projektile abgefeuert werden, werden sie nicht verfolgt werden. Diese Einstellung zu verringern, kann FPS-Einbrüche bei Szenarien mit vielen Projektilen verhindern (>200 Objekte gleichzeitig in der Luft) + Toto nastavení kontroluje maximální množství projektilů z fragmentace a úlomků, která jsou sledována v dané době. Pokud je vystřeleno více projektilů, tak nebudou sledovány. Snižte toto nastavení pokud si nepřejete propady FPS v situacích, kde je velké množství projektilů ( >200 nábojů najednou ve vzduchu) Maximum Projectiles Per Frame Máximos proyectiles por cuadro Maximale Anzahl an Projektilen pro Frame + Maks. liczba pocisków na klatkę + Maximální počet projektilů ze jeden snímek The number of spall track calculations to perform in any given frame. This helps spread the FPS impact of tracking spall rounds across multiple frames, limiting its impact even further. + Ilość obliczeń wykonywanych przez symulację odprysków w danej klatce. Ta opcja pomaga rozprzestrzenić obliczenia odprysków na więcej klatek, zmniejszając spadek FPS jeszcze bardziej. Gibt die Anzahl der Explosionverfolgungsberechnungen an, die gleichzeitig ausgeführt werden. Das kann dabei helfen den FPS-Einfluss abzuschwächen, wenn Teile über mehrere Frames hinweg verfolgt werden. + El número de cálculos de esquirlas que se hará en cualquier cuadro. Esto ayuda a dispersar el impacto en FPS del seguimiento de esquirlas de balas a través de múltiples cuadros, lo que limita aún más su impacto. + Počet úlomků v daném snímku. Toto pomáhá rozšířit FPS dopad sledovaného úlomku napříč více snímky, omezuje jeho vliv ještě více. (SP Only) Frag/Spall Debug Tracing (Solo SP) Seguimiento de depuración de Fragmentación/Astillamiento + (Tylko SP) Wizualny debug odł./odpr. + (Pouze SP) Debug sledování Frag/Úlomků (SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only. (Solo SP) Requiere un reinicio misión/editor. Permite el seguimiento visual de la fragmentación y astillamientos de los proyectiles en modo SP. + (Tylko SP) Wymaga restartu misji/edytora. Aktywuje wizualne śledzenie odłamków oraz odprysków w trybie gry Single Player. (nur SP) Splitter-/Explosions-Debugging + (Pouze SP) Vyžaduje restart mise/editoru. Aktivuje vizuální stopování fragmentace a úlomů pouze v režimu jednoho hráče. - + \ No newline at end of file diff --git a/addons/grenades/CfgAmmo.hpp b/addons/grenades/CfgAmmo.hpp index 0c74f33940..61f20eb935 100644 --- a/addons/grenades/CfgAmmo.hpp +++ b/addons/grenades/CfgAmmo.hpp @@ -3,6 +3,7 @@ class CfgAmmo { class FlareBase: FlareCore { intensity = 20000; flareSize = 12; + timeToLive = 60; }; class F_40mm_White: FlareBase { intensity = 40000; @@ -10,7 +11,7 @@ class CfgAmmo { }; class F_20mm_White: FlareBase { intensity = 20000; - flareSize = 12; + flareSize = 6; }; class F_Signal_Green: FlareBase { intensity = 20000; @@ -19,6 +20,7 @@ class CfgAmmo { class Flare_82mm_AMOS_White: FlareCore { intensity = 80000; flareSize = 12; + timeToLive = 60; }; class F_20mm_Red: F_20mm_White {}; diff --git a/addons/hearing/CfgSounds.hpp b/addons/hearing/CfgSounds.hpp index ac64f42c4e..2d757041be 100644 --- a/addons/hearing/CfgSounds.hpp +++ b/addons/hearing/CfgSounds.hpp @@ -11,4 +11,12 @@ class CfgSounds { sound[] = {QUOTE(PATHTOF(sounds\ACE_earringing_heavy.wav)),8,1.7}; titles[] = {}; }; + class ACE_Combat_Deafness { + sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),3,1}; + titles[] = {}; + }; + class ACE_Ring_Backblast { + sound[] = {QUOTE(PATHTOF(sounds\backblast_ring.ogg)),1,1}; + titles[] = {}; + }; }; diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index b0ef46faa0..1cf06910b0 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -6,7 +6,7 @@ class CfgVehicles { class ACE_PutInEarplugs { displayName = CSTRING(EarPlugs_On); condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} ); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE( [_player] call FUNC(putInEarPlugs) ); showDisabled = 0; priority = 2.5; @@ -16,7 +16,7 @@ class CfgVehicles { class ACE_RemoveEarplugs { displayName = CSTRING(EarPlugs_Off); condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) ); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE( [_player] call FUNC(removeEarPlugs) ); showDisabled = 0; priority = 2.5; diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 7b584f8397..ad7fddcd98 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -6,9 +6,30 @@ GVAR(currentDeafness) = 0; GVAR(newStrength) = 0; GVAR(playerVehAttenuation) = 1; +GVAR(beep) = false; +GVAR(beep2) = false; +GVAR(time2) = 0; +GVAR(time3) = 0; +GVAR(time4) = 0; +GVAR(earRingingPFH) = -1; + // Spawn volume updating process [FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler; //Update veh attunation when player veh changes ["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler); ["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler); + +//Reset deafness on respawn (or remote control player switch) +["playerChanged", { + ACE_player setVariable [QGVAR(dv), 0]; + ACE_player setVariable [QGVAR(prior), 0]; + ACE_player setvariable [QGVAR(deaf), false]; + GVAR(beep) = false; + GVAR(beep2) = false; + GVAR(time2) = 0; + GVAR(time3) = 0; + GVAR(time4) = 0; + GVAR(currentDeafness) = 0; + GVAR(newStrength) = 0; +}] call EFUNC(common,addEventhandler); diff --git a/addons/hearing/config.cpp b/addons/hearing/config.cpp index 777c44dd8f..1007b2095d 100644 --- a/addons/hearing/config.cpp +++ b/addons/hearing/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_EarPlugs"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2"}; + author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2", "Rocko", "Rommel", "Ruthberg"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 2460e0fd5c..96482f5b79 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -1,56 +1,92 @@ /* - * Author: KoffeinFlummi, commy2 - * Creates ear ringing effect with set strength. + * Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg + * Ear ringing PFH * * Arguments: - * 0: Unit (player) + * 0: unit * 1: strength of ear ringing (Number between 0 and 1) * * Return Value: * None * * Example: - * [clientExplosionEvent] call ace_hearing_fnc_earRinging + * [_unit, _strength] call ace_hearing_fnc_earRinging * * Public: No */ #include "script_component.hpp" -private ["_unit", "_strength"]; +if (GVAR(DisableEarRinging)) exitWith {}; -_unit = _this select 0; -_strength = _this select 1; +PARAMS_2(_unit,_strength); + +if (isNull _unit) exitWith {}; +if (_strength < 0.05) exitWith {}; if (_unit getVariable ["ACE_hasEarPlugsin", false]) then { _strength = _strength / 4; }; -GVAR(newStrength) = GVAR(newStrength) max _strength; +_unit setVariable [QGVAR(dv), (_unit getVariable [QGVAR(dv), 0]) + _strength]; -if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {}; +if (GVAR(earRingingPFH) != -1) exitWith {}; +GVAR(earRingingPFH) = [{ + EXPLODE_1_PVT(_this select 0,_unit); + private ["_prior"]; + _prior = (_unit getvariable [QGVAR(dv), 0]) min 20; + + if (!alive _unit || _prior <= 0) exitWith { + _unit setVariable [QGVAR(dv), 0]; + _unit setVariable [QGVAR(prior), 0]; + GVAR(beep) = false; + GVAR(beep2) = false; + GVAR(time2) = 0; + GVAR(time3) = 0; + GVAR(time4) = 0; + GVAR(earRingingPFH) = -1; + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + if (((_unit getvariable [QGVAR(dv), 0]) - (_unit getvariable [QGVAR(prior), 0])) > 2) then { + if (ACE_time > GVAR(time3)) then { + GVAR(beep2) = false; + }; + if (!GVAR(beep2)) then { + playSound "ACE_Combat_Deafness"; + GVAR(beep2) = true; + GVAR(time3) = ACE_time + 5; + }; + }; + + _unit setvariable [QGVAR(prior), _prior]; + GVAR(volume) = (1 - (_prior / 20)) max 0; + + if (_prior > 19.75) then { + _unit setvariable [QGVAR(deaf), true]; + } else { + _unit setvariable [QGVAR(deaf), false]; + }; + + if ((_unit getvariable [QGVAR(deaf), false]) && {ACE_time > GVAR(time4)}) then { + playSound "ACE_Combat_Deafness"; + GVAR(beep2) = true; + GVAR(time3) = ACE_time + 10; + GVAR(time4) = ACE_time + 30; + }; -if (GVAR(DisableEarRinging)) exitWith {}; - -if (_strength > 0.75) exitWith { - playSound "ACE_EarRinging_Heavy"; - GVAR(isEarRingingPlaying) = true; - [ - {GVAR(isEarRingingPlaying) = false;}, [], 7.0, 0.25 - ] call EFUNC(common,waitAndExecute); -}; -if (_strength > 0.5) exitWith { - playSound "ACE_EarRinging_Medium"; - GVAR(isEarRingingPlaying) = true; - [ - {GVAR(isEarRingingPlaying) = false;}, [], 5.0, 0.25 - ] call EFUNC(common,waitAndExecute); -}; -if (_strength > 0.2) exitWith { - playSound "ACE_EarRinging_Weak"; - GVAR(isEarRingingPlaying) = true; - GVAR(isEarRingingPlaying) = true; - [ - {GVAR(isEarRingingPlaying) = false;}, [], 3.0, 0.25 - ] call EFUNC(common,waitAndExecute); -}; + // Hearing takes longer to return to normal after it hits rock bottom + _unit setvariable [QGVAR(dv), _prior - (0.5 * (GVAR(volume) max 0.1))]; + + if (_prior > 10) then { + //check if the ringing is already being played + if (ACE_time > GVAR(time2)) then { + GVAR(beep) = false; + }; + if (!GVAR(beep)) then { + playSound "ACE_Ring_Backblast"; + GVAR(time2) = ACE_time + 22; + GVAR(beep) = true; + }; + }; +}, 1, [_unit]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf index b213a1304a..cb9202618f 100644 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ b/addons/hearing/functions/fnc_explosionNear.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, commy2 + * Author: KoffeinFlummi, commy2, Ruthberg * Handles deafness due to explosions going off near the player. * * Arguments: @@ -16,12 +16,10 @@ */ #include "script_component.hpp" -private ["_unit", "_damage", "_strength"]; +PARAMS_2(_unit,_damage); -_unit = _this select 0; -_damage = _this select 1; - -_strength = (_damage * 2) min 1; +private ["_strength"]; +_strength = 0 max _damage; if (_strength < 0.01) exitWith {}; [{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index b456b3b872..4164f81b33 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -21,7 +21,7 @@ */ #include "script_component.hpp" -private ["_silencer", "_audibleFireCoef", "_audibleFire", "_loudness", "_strength", "_vehAttenuation"]; +private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"]; PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo); @@ -30,10 +30,11 @@ if (!GVAR(enableCombatDeafness)) exitWith {}; //Only run if firedNear object is player or player's vehicle: if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {}; if (_weapon in ["Throw", "Put"]) exitWith {}; +if (_distance > 50) exitWith {}; _vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)}; -if (_distance < 1) then {_distance = 1;}; +_distance = 1 max _distance; _silencer = switch (_weapon) do { case (primaryWeapon _firer) : {(primaryWeaponItems _firer) select 0}; @@ -47,10 +48,51 @@ if (_silencer != "") then { _audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire"); }; -_audibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire"); +_weaponMagazines = missionNamespace getVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], []]; +if (count _weaponMagazines == 0) then { + _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles"); + _weaponMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); + { + if (_x != "this") then { + _muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines"); + _weaponMagazines append _muzzleMagazines; + }; + } forEach _muzzles; + { + _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo"); + _weaponMagazines set [_forEachIndex, [_x, _ammoType]]; + } forEach _weaponMagazines; + missionNamespace setVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], _weaponMagazines]; +}; -_loudness = _audibleFireCoef * _audibleFire / 64; -_strength = _vehAttenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off +_magazine = ""; +{ + EXPLODE_2_PVT(_x,_magazineType,_ammoType) + if (_ammoType == _ammo) exitWith { + _magazine = _magazineType; + }; +} forEach _weaponMagazines; + +if (_magazine == "") exitWith {}; + +_initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); +_ammoConfig = (configFile >> "CfgAmmo" >> _ammo); +_parentClasses = [_ammoConfig, true] call BIS_fnc_returnParents; +_caliber = getNumber(_ammoConfig >> "ACE_caliber"); +_caliber = switch (true) do { + case ("ShellBase" in _parentClasses): { 80 }; + case ("RocketBase" in _parentClasses): { 200 }; + case ("MissileBase" in _parentClasses): { 600 }; + case ("SubmunitionBase" in _parentClasses): { 80 }; + default { + if (_caliber <= 0) then { 6.5 } else { _caliber }; + }; +}; +_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5; +_strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off + +//systemChat format["%1 : %2 : %3", _strength, _initSpeed, _parentClasses]; +//systemChat format["%1 : %2 : %3", _weapon, _magazine, _initSpeed]; if (_strength < 0.01) exitWith {}; diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf index a7285d5e2b..7d48ca7b34 100644 --- a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf +++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf @@ -15,6 +15,8 @@ */ #include "script_component.hpp" +private ["_effectType", "_newAttenuation", "_turretConfig", "_turretPath", "_vehicle"]; + _vehicle = vehicle ACE_player; if (isNull _vehicle) exitWith {}; diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index 2e1db5c770..cfec318dc0 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and esteldunedain + * Author: commy2 and esteldunedain and Ruthberg * Updates and applys the current deafness. Called every 0.1 sec from a PFEH. * * Arguments: @@ -15,19 +15,16 @@ */ #include "script_component.hpp" -#define STRENGHTODEAFNESS 3 -#define MAXDEAFNESS 1.1 - private ["_recoverRate", "_volume"]; // Exit if combat deafness is disabled if !(GVAR(enableCombatDeafness)) exitWith {}; // Check if new noises increase deafness -if (GVAR(newStrength) * STRENGHTODEAFNESS > GVAR(currentDeafness)) then { - GVAR(currentDeafness) = GVAR(newStrength) * STRENGHTODEAFNESS min MAXDEAFNESS; +GVAR(newStrength) = (((ACE_player getvariable [QGVAR(dv), 0]) min 20) / 20) ^ 2; +if (GVAR(newStrength) > GVAR(currentDeafness)) then { + GVAR(currentDeafness) = GVAR(newStrength); }; -GVAR(newStrength) = 0; // Recover rate is slower if deafness is severe _recoverRate = 0.01; diff --git a/addons/hearing/sounds/backblast_ring.ogg b/addons/hearing/sounds/backblast_ring.ogg new file mode 100644 index 0000000000..8d6207e326 Binary files /dev/null and b/addons/hearing/sounds/backblast_ring.ogg differ diff --git a/addons/hearing/sounds/deafness.ogg b/addons/hearing/sounds/deafness.ogg new file mode 100644 index 0000000000..52314e374e Binary files /dev/null and b/addons/hearing/sounds/deafness.ogg differ diff --git a/addons/hearing/sounds/flashbang_ring.ogg b/addons/hearing/sounds/flashbang_ring.ogg new file mode 100644 index 0000000000..0374cb413c Binary files /dev/null and b/addons/hearing/sounds/flashbang_ring.ogg differ diff --git a/addons/hearing/sounds/muzzleblast_ring1.ogg b/addons/hearing/sounds/muzzleblast_ring1.ogg new file mode 100644 index 0000000000..c164e93c02 Binary files /dev/null and b/addons/hearing/sounds/muzzleblast_ring1.ogg differ diff --git a/addons/hearing/sounds/muzzleblast_ring2.ogg b/addons/hearing/sounds/muzzleblast_ring2.ogg new file mode 100644 index 0000000000..3b6331e011 Binary files /dev/null and b/addons/hearing/sounds/muzzleblast_ring2.ogg differ diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 7a3d3d785a..35b847c5d1 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -114,23 +114,27 @@ Słuch Audición Gehör + Sluch Enable combat deafness? Wł. głuchotę bojową ¿Habilitar sordera de combate? Aktiviere Taubheit im Gefecht? + Povolit ztrátu sluchu? Enable combat deafness? Możliwość chwilowej utraty słuchu przy głośnych wystrzałach i jednoczesnym braku włożonych stoperów Habilita la sordera de combate Aktiviere Taubheit im Gefecht? + Povolit ztrátu sluchu? Głuchota bojowa pojawia się w momentach, kiedy stoimy w pobliżu broni wielkokalibrowej bez ochrony słuchu, lub np. podczas ostrzału artyleryjskiego. Moduł ten pozwala na włączenie lub wyłączenie tego efektu. Dieses Modul aktiviert/deaktiviert die Taubheit im Gefecht. Wenn aktiviert, können Spieler ohne Gehörschutz taub werden, wenn eine Waffe in ihrer Nähe abgefeuert wird oder eine Explosion stattfindet. + Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat. - + \ No newline at end of file diff --git a/addons/huntir/$PBOPREFIX$ b/addons/huntir/$PBOPREFIX$ new file mode 100644 index 0000000000..b19f9d28e8 --- /dev/null +++ b/addons/huntir/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\huntir \ No newline at end of file diff --git a/addons/huntir/CfgAmmo.hpp b/addons/huntir/CfgAmmo.hpp new file mode 100644 index 0000000000..fac4d6fe60 --- /dev/null +++ b/addons/huntir/CfgAmmo.hpp @@ -0,0 +1,45 @@ +class CfgAmmo { + class FlareBase; + class F_HuntIR: FlareBase { + model = PATHTOF(data\ace_m1070_armed.p3d); + lightColor[] = {0, 0, 0, 0}; + smokeColor[] = {0, 0, 0, 0}; + timeToLive = 6; + }; + + class ShellBase; + class ACE_HuntIR_Propell: ShellBase { + supersonicCrackNear[] = {"",0.316228,1,50}; + supersonicCrackFar[] = {"",0.223872,1,150}; + CraterEffects = ""; + CraterWaterEffects = ""; + ExplosionEffects = "ACE_HuntIR_Propell_Fx"; + visibleFire = 1; + audibleFire = 1; + dangerRadiusHit = -1; + suppressionRadiusHit = 0; + soundHit1[] = {"",3.16228,1,2000}; + soundHit2[] = {"",3.16228,1,2000}; + soundHit3[] = {"",3.16228,1,2000}; + soundHit4[] = {"",3.16228,1,2000}; + soundHit5[] = {"",3.16228,1,2000}; + soundHit6[] = {"",3.16228,1,2000}; + soundHit7[] = {"",3.16228,1,2000}; + soundHit8[] = {"",3.16228,1,2000}; + multiSoundHit[] = {}; + class HitEffects {}; + soundFakeFall0[] = {"",3.16228,1,1000}; + soundFakeFall1[] = {"",3.16228,1,1000}; + soundFakeFall2[] = {"",3.16228,1,1000}; + soundFakeFall3[] = {"",3.16228,1,1000}; + soundFakeFall[] = {}; + hit = 0; + indirectHit = 0; + indirectHitRange = 0; + explosive = 1; + model = "\A3\weapons_f\empty"; + airFriction = 0; + timeToLive = 1; + explosionTime = 0.001; + }; +}; diff --git a/addons/huntir/CfgCloudlets.hpp b/addons/huntir/CfgCloudlets.hpp new file mode 100644 index 0000000000..4ff0ff2f6f --- /dev/null +++ b/addons/huntir/CfgCloudlets.hpp @@ -0,0 +1,92 @@ +class ACE_HuntIR_Propell_Fx { + class ACE_HuntIR_ExploAmmoFlash { + simulation = "particles"; + type = "ACE_HuntIR_ExploAmmoFlash"; + position[] = { 0, 0, 0 }; + intensity = 1; + interval = 1; + lifeTime = 1; + }; + class ACE_HuntIR_ExploAmmoSmoke { + simulation = "particles"; + type = "ACE_HuntIR_ExploAmmoSmoke"; + position[] = { 0, 0, 0 }; + intensity = 1; + interval = 1; + lifeTime = 0.8; + }; +}; + +class CfgCloudlets { + class Default; + class ACE_HuntIR_ExploAmmoFlash: Default { + interval = 0.1; + circleRadius = 0; + circleVelocity[] = { 0, 0, 0 }; + particleShape = "\A3\data_f\ParticleEffects\Universal\Universal"; + particleFSNtieth = 16; + particleFSIndex = 0; + particleFSFrameCount = 32; + particleFSLoop = 0; + angleVar = 1; + animationName = ""; + particleType = "Billboard"; + timerPeriod = 1; + lifeTime = 0.5; + moveVelocity[] = { 0, 1, 0 }; + rotationVelocity = 1; + weight = 10; + volume = 7.9; + rubbing = 0.1; + size[] = { "0.0125 * intensity + 0.25", "0.0125 * intensity + 0.125" }; + color[] = { { 1, 1, 1, -1 }, { 1, 1, 1, 0 } }; + animationSpeed[] = { 2 }; + randomDirectionPeriod = 0.2; + randomDirectionIntensity = 0.2; + onTimerScript = ""; + beforeDestroyScript = ""; + lifeTimeVar = 0; + positionVar[] = { 0, 0.1, 0 }; + MoveVelocityVar[] = { 0.2, 0.5, 0.2 }; + rotationVelocityVar = 1; + sizeVar = 0.5; + colorVar[] = { 0, 0, 0, 0 }; + randomDirectionPeriodVar = 0; + randomDirectionIntensityVar = 0; + }; + class ACE_HuntIR_ExploAmmoSmoke: Default { + interval = "0.02 * interval + 0.02"; + circleRadius = 0; + circleVelocity[] = { 0, 0, 0 }; + particleShape = "\A3\data_f\ParticleEffects\Universal\Universal"; + particleFSNtieth = 16; + particleFSIndex = 7; + particleFSFrameCount = 48; + particleFSLoop = 1; + angleVar = 1; + animationName = ""; + particleType = "Billboard"; + timerPeriod = 1; + lifeTime = 0.25; + moveVelocity[] = { 0, 1, 0 }; + rotationVelocity = 1; + weight = 0.053; + volume = 0.04; + rubbing = 0.2; + size[] = { "0.0125 * intensity + 0.25", "0.0125 * intensity + 1.25", "0.0125 * intensity + 2.75", "0.0125 * intensity + 3.75" }; + color[] = { { 0.6, 0.6, 0.6, 1 }, { 0.7, 0.7, 0.7, 0.5 }, { 0.78, 0.78, 0.78, 0.25 } }; + animationSpeed[] = { 1.7, 0.6, 0.4, 0.3, 0.3 }; + randomDirectionPeriod = 0.2; + randomDirectionIntensity = 0.2; + onTimerScript = ""; + beforeDestroyScript = ""; + lifeTimeVar = 2; + positionVar[] = { 0.5, 0.3, 0.5 }; + MoveVelocityVar[] = { 1.5, 2, 1.5 }; + rotationVelocityVar = 1; + sizeVar = 0.5; + colorVar[] = { 0, 0, 0, 0 }; + randomDirectionPeriodVar = 0; + randomDirectionIntensityVar = 0; + }; +}; diff --git a/addons/huntir/CfgEventhandlers.hpp b/addons/huntir/CfgEventhandlers.hpp new file mode 100644 index 0000000000..308df09c1b --- /dev/null +++ b/addons/huntir/CfgEventhandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; + +class Extended_FiredBIS_EventHandlers { + class CAManBase { + class ADDON { + clientFiredBIS = QUOTE(_this call FUNC(handleFired)); + }; + }; +}; \ No newline at end of file diff --git a/addons/huntir/CfgMagazines.hpp b/addons/huntir/CfgMagazines.hpp new file mode 100644 index 0000000000..c11f81a98c --- /dev/null +++ b/addons/huntir/CfgMagazines.hpp @@ -0,0 +1,11 @@ + +class CfgMagazines { + class 1Rnd_HE_Grenade_shell; + class ACE_HuntIR_M203: 1Rnd_HE_Grenade_shell { + displayName = CSTRING(magazine_displayName); + displayNameShort = "HuntIR"; + descriptionShort = ""; + picture = PATHTOF(data\m_m1070_ca.paa); + ammo = "F_HuntIR"; + }; +}; diff --git a/addons/huntir/CfgVehicles.hpp b/addons/huntir/CfgVehicles.hpp new file mode 100644 index 0000000000..bc8ed4fc83 --- /dev/null +++ b/addons/huntir/CfgVehicles.hpp @@ -0,0 +1,98 @@ + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(open) { + displayName = CSTRING(activateMonitor); + condition = QUOTE([ARR_2(ACE_player,'ACE_HuntIR_monitor')] call EFUNC(common,hasItem)); + statement = QUOTE(call FUNC(huntir)); + showDisabled = 0; + priority = 2; + icon = PATHTOF(UI\w_huntir_monitor_ca.paa); + exceptions[] = {}; + }; + }; + }; + }; + + class Parachute_02_base_F; + class ACE_HuntIR: Parachute_02_base_F { + author = ECSTRING(common,ACETeam); + castDriverShadow = 0; + destrType = "DestructDefault"; + displayName = "HuntIR"; + model = PATHTOF(data\huntir.p3d); + scope = 1; + soundCrash[] = {"", db-30, 1 }; + soundEnviron[] = {"z\ace\addons\apl\sounds\padak_let", 0.316228, 1, 80}; + soundLandCrash[] = {"", db-30, 1 }; + soundWaterCrash[] = {"", db10, 1 }; + class HitPoints { + class HitEngine { + armor = 0; + material = -1; + name = ""; + visual = ""; + radius = 0; + passThrough = 0; + explosionShielding = 0; + }; + class HitParachute { + armor = 0.0001; + material = -1; + name = "parachute"; + visual = ""; + radius = 0.2; + passThrough = 1; + explosionShielding = 0; + }; + class HitCamera { + armor = 0.001; + material = -1; + name = "camera"; + visual = ""; + radius = 0.025; + passThrough = 1; + explosionShielding = 1; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_HuntIR_monitor: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(monitor_displayName); + vehicleClass = "Items"; + class TransportItems { + class ACE_HuntIR_monitor { + name = "ACE_HuntIR_monitor"; + count = 1; + }; + }; + }; + + class ReammoBox_F; + class ACE_HuntIR_Box: ReammoBox_F { + model = PATHTOF(data\ace_huntirbox.p3d); + displayName = $STR_DN_ACE_HUNTIRBOX; + class TransportItems { + MACRO_ADDITEM(ACE_HuntIR_monitor,5); + }; + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_HuntIR_M203,20); + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_HuntIR_monitor,5); + }; + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_HuntIR_M203,20); + }; + }; +}; diff --git a/addons/huntir/CfgWeapons.hpp b/addons/huntir/CfgWeapons.hpp new file mode 100644 index 0000000000..6ff271d604 --- /dev/null +++ b/addons/huntir/CfgWeapons.hpp @@ -0,0 +1,34 @@ + +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_HuntIR_monitor: ACE_ItemCore { + scope = 2; + displayName = CSTRING(monitor_displayName); + picture = PATHTOF(UI\w_huntir_monitor_ca.paa); + descriptionShort = CSTRING(monitor_displayName); + model = PATHTOF(data\ace_huntir_monitor.p3d); + + class ItemInfo: InventoryItem_Base_F { + mass = 20; + }; + }; + + class GrenadeLauncher; + class UGL_F: GrenadeLauncher { + magazines[] += {"ACE_HuntIR_M203"}; + }; + class GL_3GL_F: UGL_F { + //magazines[] += {"ACE_HuntIR_M203"}; + magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell","ACE_HuntIR_M203"}; + }; + + class Rifle_Base_F; + class arifle_MX_Base_F: Rifle_Base_F { + class GL_3GL_F: UGL_F { + //magazines[] += {"ACE_HuntIR_M203"}; + magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell","ACE_HuntIR_M203"}; + }; + }; +}; diff --git a/addons/huntir/Dialog.hpp b/addons/huntir/Dialog.hpp new file mode 100644 index 0000000000..97058394a5 --- /dev/null +++ b/addons/huntir/Dialog.hpp @@ -0,0 +1,401 @@ +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0c +#define ST_TYPE 0xF0 +#define ST_SINGLE 0 +#define ST_MULTI 16 +#define ST_TITLE_BAR 32 +#define ST_PICTURE 48 +#define ST_FRAME 64 +#define ST_BACKGROUND 80 +#define ST_GROUP_BOX 96 +#define ST_GROUP_BOX2 112 +#define ST_HUD_BACKGROUND 128 +#define ST_TILE_PICTURE 144 +#define ST_WITH_RECT 160 +#define ST_LINE 176 +#define FontM "PuristaMedium" +#define __XA SafeZoneXAbs +#define __X SafeZoneX +#define __Y SafeZoneY +#define __WA SafeZoneWAbs +#define __W SafeZoneW +#define __H SafeZoneH + +class ace_huntir_cam_dialog { + idd = 18880; + movingEnable = true; + controlsBackground[] = { }; + objects[] = { }; + controls[] = { + TOP_BORDER, + BOTTOM_BORDER, + LEFT_BORDER, + RIGHT_BORDER, + //HELP_DIALOG, + CAM_BG, + CAM_HEIGHT, + CAM_ALT, + CAM_No, + CAM_NO_x, + CAM_TIME_REMAIN, + CAM_TIME, + CAM_ZOOM, + ZOOM_X, + CAM_POS, + CAM_POS_X, + CAM_DIR, + CAM_DIR_x + }; + + class TOP_BORDER { + idc = -1; + type = CT_STATIC; + style = ST_CENTER; + x = __XA; + y = __Y; + w = __WA; + h = 0.08; + font = FontM; + sizeEx = 0.04; + colorText[] = { 1, 1, 1, 1 }; + colorBackground[] = {0,0,0,1}; + text = ""; + blinkingPeriod = 0; + }; + class BOTTOM_BORDER: TOP_BORDER { + y = __Y + __H - 0.05; + h = 0.05; + }; + class LEFT_BORDER: TOP_BORDER { + w = (abs(__XA) - abs(__X)) + 0.05; + h = __H; + }; + class RIGHT_BORDER: TOP_BORDER { + x = __X + __W - 0.05; + w = (__WA - __W) + 0.05; + h = __H; + }; + class HELP_DIALOG { + idc = -1; + type = CT_BUTTON; + style = ST_CENTER; + font = FontM; + sizeEx = 0.025; + colorText[] = { 1, 1, 1, 1 }; + colorFocused[] = { 0.31, 0.31, 0.31, 0.31 }; + colorDisabled[] = { 0, 0, 1, 0.7 }; + colorBackground[] = { 0, 0, 0, 0 }; + colorBackgroundDisabled[] = { 1, 1, 1, 0.5 }; + colorBackgroundActive[] = { 0.5, 0.5, 0.5, 0.5 }; + offsetX = 0.003; + offsetY = 0.003; + offsetPressedX = 0.002; + offsetPressedY = 0.002; + colorShadow[] = { 0, 0, 0, 0.5 }; + colorBorder[] = { 0, 0, 0, 0 }; + borderSize = 0; + soundEnter[] = { "", 0, 1 }; + soundPush[] = { "buttonpushed.ogg", 0.1, 1 }; + soundClick[] = { "", 0, 1 }; + soundEscape[] = { "", 0, 1 }; + x = __X + (2*0.8); y = __Y + 0.045; + w = 0.05; h = 0.02; + text = CSTRING(HELP); + action = "createDialog 'ace_huntir_help_dialog'"; + }; + class CAM_BG { + idc = -1; + type = 0; + style = 48; + colorText[ ]={ 1,1,1,1 }; + colorBackground[ ]={ 0.4,0.4,0.4,1 }; + font = "PuristaMedium"; + sizeEx = 0.021; + lineSpacing = 1; + x = __X; + y = __Y + 0.08; + w = __W; + h = __H + 0.2; + border = 0; + text = PATHTOF(UI\ace_huntir_monitor_on.paa); + }; + class CAM_HEIGHT { + type = CT_STATIC; + idc = 1; + style = ST_LEFT; + colorBackground[] = {0, 0, 0, 0}; + colorText[] = {1, 1, 1, 1}; + font = FontM; + sizeEx = 0.02; + x = __X + 0.42; + y = __Y + 0.32; + w = 0.08; + h = 0.04; + text = ""; + blinkingPeriod = 0; + }; + class CAM_ALT: CAM_HEIGHT { + x = __X + 0.35; + text = CSTRING(ALT); + }; + class CAM_No: CAM_HEIGHT { + x = __X + __W - 0.64; + text = CSTRING(CAM); + }; + class CAM_NO_x: CAM_HEIGHT { + idc = 2; + x = __X + __W - 0.56; + y = __Y + 0.32; + text = ""; + }; + class CAM_TIME: CAM_HEIGHT { + x = __X + 0.35; + y = __Y + __H - 0.65; + w = 0.12; + text = CSTRING(TIME); + }; + class CAM_TIME_REMAIN: CAM_TIME { + idc = 3; + x = __X + 0.46; + text = ""; + }; + class CAM_ZOOM: CAM_No { + y = __Y + 0.36; + text = "Zoom:"; + }; + class ZOOM_X: CAM_ZOOM { + idc = 4; + x = __X + __W - 0.56; + text = ""; + }; + class CAM_POS: CAM_HEIGHT { + x = __X + 0.35; + y = __Y + 0.36; + text = "GPS Pos:"; + }; + class CAM_POS_X: CAM_POS { + idc = 5; + x = __X + 0.42; + w = 0.16; + text = ""; + }; + class CAM_DIR: CAM_POS { + y = __Y + 0.4; + text = ""; //"Az:"; + }; + class CAM_DIR_x: CAM_DIR { + idc = 6; + x = __X + 0.42; + w = 0.16; + text = ""; + }; +}; + +class ace_huntir_cam_dialog_inactive: ace_huntir_cam_dialog { + idd = 18881; + controls[] = { + TOP_BORDER, + BOTTOM_BORDER, + LEFT_BORDER, + RIGHT_BORDER, + //HELP_DIALOG, + //PRESS_HELP, + CAM_BG, + SEARCHING_CAM + }; + + class TOP_BORDER: TOP_BORDER {}; + class BOTTOM_BORDER: BOTTOM_BORDER {}; + class LEFT_BORDER: LEFT_BORDER {}; + class RIGHT_BORDER: RIGHT_BORDER {}; + class PRESS_HELP { + idc = -1; + type = CT_STATIC; + style = ST_LEFT; + x = __X + (__W - 0.2); + y = __Y + 0.06; + w = 0.4; + h = 0.02; + font = FontM; + sizeEx = 0.02; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0,0,0,0}; + text = ""; + blinkingPeriod = 0; + }; + class HELP_DIALOG { + idc = -1; + type = CT_STATIC; + style = ST_LEFT; + x = __X + (__W - 0.2); + y = __Y + 0.03; + w = 0.4; + h = 0.02; + font = FontM; + sizeEx = 0.02; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0,0,0,0}; + text = CSTRING(ESC); + blinkingPeriod = 0; + }; + class CAM_BG: CAM_BG {}; + class SEARCHING_CAM { + idc = 1; + type = CT_STATIC; + style = ST_LEFT; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0,0,0,0}; + x = __X + (__W/2) - 0.07; + y = __Y + (__H/2); + w = 0.6; + h = 0.08; + font = FontM; + sizeEx = 0.04; + text = ""; + blinkingPeriod = 0; + }; +}; + +class ace_huntir_cam_dialog_off: ace_huntir_cam_dialog_inactive { + idd = 18882; + controls[] = { + TOP_BORDER, + BOTTOM_BORDER, + LEFT_BORDER, + RIGHT_BORDER, + //HELP_DIALOG, + //PRESS_HELP, + CAM_BG + }; + + class TOP_BORDER: TOP_BORDER {}; + class BOTTOM_BORDER: BOTTOM_BORDER {}; + class LEFT_BORDER: LEFT_BORDER {}; + class RIGHT_BORDER: RIGHT_BORDER {}; + class PRESS_HELP: PRESS_HELP {}; + class HELP_DIALOG: HELP_DIALOG {}; + class CAM_BG: CAM_BG { text = PATHTOF(UI\ace_huntir_monitor_off.paa); }; +}; +//ACTIVE PARA CAMERA DIALOG +class ace_huntir_help_dialog: ace_huntir_cam_dialog { + idd = -1; + controls[] = { + TOP_BORDER, + BOTTOM_BORDER, + LEFT_BORDER, + RIGHT_BORDER, + CAM_BG, + CAM_HEIGHT, + CAM_ALT, + CAM_TIME_REMAIN, + CAM_TIME, + CAM_ZOOM, + ZOOM_X, + CAM_POS, + CAM_POS_x, + CAM_No, + CAM_No_X, + CAM_DIR, + CAM_DIR_x, + HELP0, + HELP1, + HELP2, + HELP3, + HELP4, + HELP5, + HELP6 + }; + class TOP_BORDER: TOP_BORDER {}; + class BOTTOM_BORDER: BOTTOM_BORDER {}; + class LEFT_BORDER: LEFT_BORDER {}; + class RIGHT_BORDER: RIGHT_BORDER {}; + class CAM_BG: CAM_BG {}; + class CAM_HEIGHT: CAM_HEIGHT {}; + class CAM_ALT: CAM_ALT {}; + class CAM_No: CAM_No {}; + class CAM_NO_x: CAM_NO_x {}; + class CAM_TIME_REMAIN: CAM_TIME_REMAIN {}; + class CAM_TIME: CAM_TIME {}; + class CAM_ZOOM: CAM_ZOOM {}; + class ZOOM_X: ZOOM_X {}; + class CAM_POS: CAM_POS {}; + class CAM_POS_X: CAM_POS_X {}; + class CAM_DIR: CAM_DIR {}; + class CAM_DIR_x: CAM_DIR_x {}; + class HELP0 { + idc = -1; + type = CT_STATIC; + style = ST_LEFT; + x = __X + (__W - 0.3); + y = __Y + 0.03; + w = 0.4; + h = 0.03; + font = FontM; + sizeEx = 0.022; + colorText[] = { 1, 1, 1, 1 }; + colorBackground[] = {0,0,0,1}; + text = CSTRING(HELP_EXIT); + blinkingPeriod = 0; + }; + class HELP1: HELP0 { + y = __Y + 0.06; + text = CSTRING(HELP_ZOOM); + }; + class HELP2: HELP0 { + y = __Y + 0.09; + text = CSTRING(HELP_CAM); + }; + class HELP3: HELP0 { + y = __Y + 0.12; + text = CSTRING(HELP_ROT); + }; + class HELP4: HELP0 { + y = __Y + 0.15; + text = CSTRING(HELP_ELV); + }; + class HELP5: HELP0 { + y = __Y + 0.18; + text = CSTRING(HELP_MOD); + }; + class HELP6: HELP0 { + y = __Y + 0.21; + text = CSTRING(HELP_RES); + }; +}; diff --git a/addons/huntir/RscTitles.hpp b/addons/huntir/RscTitles.hpp new file mode 100644 index 0000000000..de94f17a5e --- /dev/null +++ b/addons/huntir/RscTitles.hpp @@ -0,0 +1,41 @@ +#define __FONTHEIGHT 0.02 + +class RscTitles { + class ace_huntir_cam_rose { + idd=-1; + movingEnable = true; + fadein = 0; + fadeout = 1; + duration = 1e+011; + name="ace_huntir_cam_rose"; + onLoad = "uiNamespace setVariable ['ace_huntir_cam_rose', _this select 0]"; + class controls { + class CHAR_N { + type = 0; + idc = 64432; + style = 0; + x = 0.497;y = 0.297;w = 0.2;h = 0.2; + font = "PuristaMedium"; + sizeEx = __FONTHEIGHT; + colorText[] = {1, 1, 1, 1}; + colorBackground[]={0,0,0,0}; + text = "N"; + }; + class CHAR_E: CHAR_N { + idc = 64433; + x = 0.697;y = 0.497; + text = "E"; + }; + class CHAR_S: CHAR_N { + idc = 64434; + x = 0.497;y = 0.697; + text = "S"; + }; + class CHAR_W: CHAR_N { + idc = 64435; + x = 0.297;y = 0.497; + text = "W"; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/huntir/UI/ace_huntir_monitor_off.paa b/addons/huntir/UI/ace_huntir_monitor_off.paa new file mode 100644 index 0000000000..be37d17b99 Binary files /dev/null and b/addons/huntir/UI/ace_huntir_monitor_off.paa differ diff --git a/addons/huntir/UI/ace_huntir_monitor_on.paa b/addons/huntir/UI/ace_huntir_monitor_on.paa new file mode 100644 index 0000000000..a2941a8b94 Binary files /dev/null and b/addons/huntir/UI/ace_huntir_monitor_on.paa differ diff --git a/addons/huntir/UI/w_huntir_monitor_ca.paa b/addons/huntir/UI/w_huntir_monitor_ca.paa new file mode 100644 index 0000000000..7ecb6f1338 Binary files /dev/null and b/addons/huntir/UI/w_huntir_monitor_ca.paa differ diff --git a/addons/huntir/XEH_postInit.sqf b/addons/huntir/XEH_postInit.sqf new file mode 100644 index 0000000000..c5526500ac --- /dev/null +++ b/addons/huntir/XEH_postInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +GVAR(ZOOM) = 0; +GVAR(NV) = 0; +GVAR(IRON) = false; +GVAR(TI) = 0; +GVAR(cur_cam) = 0; +GVAR(ROTATE) = 0; +GVAR(ELEVAT) = 0.01; diff --git a/addons/huntir/XEH_preInit.sqf b/addons/huntir/XEH_preInit.sqf new file mode 100644 index 0000000000..0ae45c1540 --- /dev/null +++ b/addons/huntir/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(cam); +PREP(handleFired); +PREP(huntir); +PREP(huntirCompass); +PREP(keypressed); + +ADDON = true; diff --git a/addons/huntir/config.cpp b/addons/huntir/config.cpp new file mode 100644 index 0000000000..5fb106ad2d --- /dev/null +++ b/addons/huntir/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_HuntIR", "ACE_HuntIRBox"}; + weapons[] = {"ACE_HuntIR_monitor"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Norrin", "Rocko", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventhandlers.hpp" +#include "CfgCloudlets.hpp" +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "Dialog.hpp" +#include "RscTitles.hpp" diff --git a/addons/huntir/data/ace_huntir_monitor.p3d b/addons/huntir/data/ace_huntir_monitor.p3d new file mode 100644 index 0000000000..059e7050ed Binary files /dev/null and b/addons/huntir/data/ace_huntir_monitor.p3d differ diff --git a/addons/huntir/data/ace_huntirbox.p3d b/addons/huntir/data/ace_huntirbox.p3d new file mode 100644 index 0000000000..d26bd85c22 Binary files /dev/null and b/addons/huntir/data/ace_huntirbox.p3d differ diff --git a/addons/huntir/data/ace_m1070.p3d b/addons/huntir/data/ace_m1070.p3d new file mode 100644 index 0000000000..e110e6291d Binary files /dev/null and b/addons/huntir/data/ace_m1070.p3d differ diff --git a/addons/huntir/data/ace_m1070_armed.p3d b/addons/huntir/data/ace_m1070_armed.p3d new file mode 100644 index 0000000000..cf4da73533 Binary files /dev/null and b/addons/huntir/data/ace_m1070_armed.p3d differ diff --git a/addons/huntir/data/bedna_ammo2.rvmat b/addons/huntir/data/bedna_ammo2.rvmat new file mode 100644 index 0000000000..b56d21c650 --- /dev/null +++ b/addons/huntir/data/bedna_ammo2.rvmat @@ -0,0 +1,31 @@ +ambient[] = {1.0, 1.0, 1.0, 1.0}; +diffuse[] = {1.0, 1.0, 1.0, 1.0}; +forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {0.0, 0.0, 0.0, 1.0}; +specular[] = {1.0, 1.0, 1.0, 1.0}; +specularPower = 71.9; +PixelShaderID = "NormalMapSpecularDIMap"; +VertexShaderID = "NormalMap"; +class Stage1 { + texture = "z\ace\addons\huntir\data\bedna_ammo2_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage2 { + texture = "z\ace\addons\huntir\data\bedna_ammo2_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class StageTI { + texture = "z\ace\addons\apl\data\default_vehicle_ti_ca.paa"; +}; diff --git a/addons/huntir/data/bedna_ammo2_co.paa b/addons/huntir/data/bedna_ammo2_co.paa new file mode 100644 index 0000000000..fa759b6140 Binary files /dev/null and b/addons/huntir/data/bedna_ammo2_co.paa differ diff --git a/addons/huntir/data/bedna_ammo2_nohq.paa b/addons/huntir/data/bedna_ammo2_nohq.paa new file mode 100644 index 0000000000..4df88e4b91 Binary files /dev/null and b/addons/huntir/data/bedna_ammo2_nohq.paa differ diff --git a/addons/huntir/data/bedna_ammo2_smdi.paa b/addons/huntir/data/bedna_ammo2_smdi.paa new file mode 100644 index 0000000000..60fc404720 Binary files /dev/null and b/addons/huntir/data/bedna_ammo2_smdi.paa differ diff --git a/addons/huntir/data/camchute_co.paa b/addons/huntir/data/camchute_co.paa new file mode 100644 index 0000000000..9d927ccce1 Binary files /dev/null and b/addons/huntir/data/camchute_co.paa differ diff --git a/addons/huntir/data/huntir.p3d b/addons/huntir/data/huntir.p3d new file mode 100644 index 0000000000..a1c5b94e99 Binary files /dev/null and b/addons/huntir/data/huntir.p3d differ diff --git a/addons/huntir/data/huntir_monitor_co.paa b/addons/huntir/data/huntir_monitor_co.paa new file mode 100644 index 0000000000..7ecb6f1338 Binary files /dev/null and b/addons/huntir/data/huntir_monitor_co.paa differ diff --git a/addons/huntir/data/m_M1070_ca.paa b/addons/huntir/data/m_M1070_ca.paa new file mode 100644 index 0000000000..e3d342ccf0 Binary files /dev/null and b/addons/huntir/data/m_M1070_ca.paa differ diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf new file mode 100644 index 0000000000..264c0c74b6 --- /dev/null +++ b/addons/huntir/functions/fnc_cam.sqf @@ -0,0 +1,147 @@ +/* + * Author: Norrin, Rocko, Ruthberg + * + * Handles HuntIR camera + * + * Arguments: + * 0: HuntIR + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_huntIR); + +GVAR(huntIR) = _huntIR; +GVAR(pos) = getPosVisual GVAR(huntIR); + +GVAR(ZOOM) = 0; +GVAR(NV) = 0; +GVAR(TI) = 0; +GVAR(cur_cam) = 0; +GVAR(ROTATE) = 0; +GVAR(ELEVAT) = 0.01; + +HUNTIR_BACKGROUND_LAYER_ID cutText["","PLAIN"]; + +closedialog 0; +createDialog "ace_huntir_cam_dialog"; +uiNameSpace setVariable ["ace_huntir_monitor", findDisplay 18880]; +(uiNameSpace getVariable "ace_huntir_monitor") displaySetEventHandler ["Keydown", QUOTE(_this call FUNC(keyPressed))]; + +ctrlSetText [4, "0X"]; + +GVAR(logic) = "Logic" createVehicleLocal [0, 0, 0]; +GVAR(logic) setPosATL (GVAR(pos) vectorAdd [0, 0, -5]); +GVAR(logic) setVectorUp [0.001, 0.001, 1]; + +GVAR(cam) = "camera" camCreate GVAR(pos); +GVAR(cam) camSetTarget GVAR(logic); +GVAR(cam) cameraEffect ["internal", "BACK"]; +GVAR(cam) camSetRelPos [0, 0, 2]; +GVAR(cam) camCommit 0; +showCinemaBorder false; +camUseNVG false; + +GVAR(pphandle) = ppEffectCreate ["colorCorrections", 135522]; +GVAR(pphandle) ppEffectAdjust [1, 1, 0, [0.01, 0.02, 0.04, 0.01], [0.87, 1.08, 1.196, 0.3], [0.399, 0.287, 0.014, 0.0]]; +GVAR(pphandle) ppEffectCommit 0; +GVAR(pphandle) ppEffectEnable true; + +GVAR(stop) = false; +call FUNC(huntirCompass); + +GVAR(no_cams) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; +{ + GVAR(no_cams) set [_forEachIndex, [(getPosVisual ACE_player) vectorDistance (getPosVisual _x), _x]]; +} forEach GVAR(no_cams); +GVAR(no_cams) sort true; +{ + GVAR(no_cams) set [_forEachIndex, _x select 1]; +} forEach GVAR(no_cams); +[{ + GVAR(nearHuntIRs) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; + { + if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then { + GVAR(no_cams) pushBack _x; + }; + } forEach GVAR(nearHuntIRs); + { + if (((getPosVisual _x) select 2) <= 20 || {!(_x in GVAR(nearHuntIRs))} || {_x getHitPointDamage "HitCamera" >= 0.25}) then { + GVAR(no_cams) deleteAt _forEachIndex; + if (_forEachIndex < GVAR(cur_cam)) then { + GVAR(cur_cam) = GVAR(cur_cam) - 1; + }; + }; + } forEach GVAR(no_cams); + + GVAR(cur_cam) = 0 max GVAR(cur_cam) min ((count GVAR(no_cams)) - 1); + if (count GVAR(no_cams) > 0) then { + GVAR(huntIR) = GVAR(no_cams) select GVAR(cur_cam); + }; + + GVAR(pos) = getPosVisual GVAR(huntIR); + + if ((!dialog) || (count GVAR(no_cams) == 0) || ((GVAR(pos) select 2) <= 20)) exitWith { + [_this select 1] call cba_fnc_removePerFrameHandler; + + GVAR(stop) = true; + + GVAR(pphandle) ppEffectEnable true; + ppEffectDestroy GVAR(pphandle); + + GVAR(NV) = 0; + setAperture -1; + closedialog 0; + titletext [" ", "BLACK IN", 4]; + ACE_player switchCamera "INTERNAL"; + GVAR(cam) CameraEffect ["Terminate", "Back"]; + CamDestroy GVAR(cam); + deleteVehicle GVAR(logic); + if (player != ACE_player) then { + player remoteControl ACE_player; + }; + }; + + switch (GVAR(ZOOM)) do { + case 0: { + GVAR(cam) camsetFOV 0.7; + GVAR(cam) camSetFocus [GVAR(pos) select 2, 1]; + }; + case 1: { + GVAR(cam) camsetFOV 0.35; + GVAR(cam) camSetFocus [(GVAR(pos) select 2)/2, 1]; + }; + case 2: { + GVAR(cam) camsetFOV 0.17; + GVAR(cam) camSetFocus [(GVAR(pos) select 2)/4, 1]; + }; + case 3: { + GVAR(cam) camsetFOV 0.1; + GVAR(cam) camSetFocus [(GVAR(pos) select 2)/8, 1]; + }; + }; + + private ["_cam_coord_y", "_cam_coord_x", "_cam_time", "_cam_pos"]; + + GVAR(logic) setPosATL (GVAR(pos) vectorAdd [0, 0, -5]); + GVAR(logic) setDir GVAR(ROTATE); + GVAR(logic) setVectorUp [0.0001, 0.0001, 1]; + GVAR(cam) CameraEffect ["internal", "BACK"]; + _cam_coord_y = GVAR(ELEVAT) * cos(GVAR(ROTATE)); + _cam_coord_x = GVAR(ELEVAT) * sin(GVAR(ROTATE)); + GVAR(cam) camSetRelPos [_cam_coord_x, _cam_coord_y, 2]; + GVAR(cam) camCommit 0; + + ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]]; + ctrlSetText [2, format["%1", GVAR(cur_cam) + 1]]; + _cam_time = ACE_time - (GVAR(huntIR) getVariable [QGVAR(startTime), ACE_time]); + ctrlSetText [3, format["%1 s", round(_cam_time)]]; + _cam_pos = getPosVisual GVAR(huntIR); + _cam_pos = format ["X = %1, Y = %2", round (_cam_pos select 0), round (_cam_pos select 1)]; + ctrlSetText [5, _cam_pos]; + ctrlSetText [6, ""]; +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf new file mode 100644 index 0000000000..23c7df04f0 --- /dev/null +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -0,0 +1,50 @@ +/* + * Author: Norrin, Rocko, Ruthberg + * + * Handles HuntIR projectiles + * + * Arguments: + * 0: unit - Object the event handler is assigned to + * 1: weapon - Fired weapon + * 2: muzzle - Muzzle that was used + * 3: mode - Current mode of the fired weapon + * 4: ammo - Ammo used + * 5: magazine - magazine name which was used + * 6: projectile - Object of the projectile that was shot + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_7(_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); + +if (_ammo != "F_HuntIR") exitWith {}; + +[{ + PARAMS_1(_projectile); + "ACE_HuntIR_Propell" createVehicle (getPosATL _projectile); + [{ + PARAMS_1(_position); + private ["_huntir"]; + _huntir = createVehicle ["ACE_HuntIR", _position, [], 0, "FLY"]; + _huntir setPosATL _position; + _huntir setVariable [QGVAR(startTime), ACE_time, true]; + [{ + EXPLODE_1_PVT(_this select 0,_huntir); + if (isNull _huntir) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + private ["_parachuteDamage", "_velocity"]; + _parachuteDamage = _huntir getHitPointDamage "HitParachute"; + if (_parachuteDamage > 0) then { + _velocity = velocity _huntir; + _velocity set [2, -1 min -20 * sqrt(_parachuteDamage)]; + _huntir setVelocity _velocity; + _huntir setVectorUp [0, 0, 1]; + }; + }, 0, [_huntir]] call CBA_fnc_addPerFrameHandler; + }, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call EFUNC(common,waitAndExecute); +}, [_projectile], 5, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf new file mode 100644 index 0000000000..f8aed93880 --- /dev/null +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -0,0 +1,93 @@ +/* + * Author: Norrin, Rocko, Ruthberg + * + * HuntIR monitor system + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +#define __TYPE_WRITER_DELAY 0.05 + +if ((ACE_player call CBA_fnc_getUnitAnim) select 0 == "stand") then { + ACE_player playMove "AmovPercMstpSrasWrflDnon_diary"; +}; + +HUNTIR_BACKGROUND_LAYER_ID cutText ["", "BLACK", 0]; +createDialog "ace_huntir_cam_dialog_off"; + +[{ + if (!dialog) exitWith { + HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN", 0]; + }; + closeDialog 0; + createDialog "ace_huntir_cam_dialog_inactive"; + uiNameSpace setVariable ["ace_huntir_monitor", findDisplay 18881]; + [{ + GVAR(startTime) = ACE_time; + GVAR(done) = false; + GVAR(connectionDelay) = 5; + GVAR(state) = "searching"; + GVAR(message) = []; + GVAR(messageSearching) = toArray "Searching....."; + GVAR(messageConnecting) = toArray "Connecting....."; + [{ + private ["_elapsedTime", "_nearestHuntIRs"]; + _elapsedTime = ACE_time - GVAR(startTime); + _nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; + + if ((!dialog) || GVAR(done)) exitWith { + [_this select 1] call cba_fnc_removePerFrameHandler; + + if (dialog && GVAR(state) == "connected") then { + [_nearestHuntIRs select 0] call FUNC(cam); + } else { + HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; + }; + }; + switch (GVAR(state)) do { + case "searching": { + if (count GVAR(message) < count GVAR(messageSearching)) then { + GVAR(message) pushBack (GVAR(messageSearching) select (count GVAR(message))); + ctrlSetText [1, toString GVAR(message)]; + } else { + GVAR(message) = []; + if (_elapsedTime > 10) then { + GVAR(state) = "noGDS"; + }; + if (_elapsedTime > 5 && {{_x getHitPointDamage "HitCamera" < 0.25} count _nearestHuntIRs > 0}) then { + GVAR(state) = "connecting"; + }; + }; + }; + case "connecting": { + if (count GVAR(message) < count GVAR(messageConnecting)) then { + GVAR(message) pushBack (GVAR(messageConnecting) select (count GVAR(message))); + ctrlSetText [1, toString GVAR(message)]; + } else { + GVAR(message) = []; + GVAR(connectionDelay) = GVAR(connectionDelay) - 1; + if (GVAR(connectionDelay) <= 0) then { + GVAR(done) = true; + GVAR(state) = "connected"; + }; + }; + }; + case "noGDS": { + ctrlSetText [1, "No GDS System detected"]; + [{ + GVAR(done) = true; + closedialog 0; + HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; + }, [], 3, 0] call EFUNC(common,waitAndExecute); + }; + }; + }, __TYPE_WRITER_DELAY, []] call CBA_fnc_addPerFrameHandler; + }, [], 0.5, 0] call EFUNC(common,waitAndExecute); +}, [], 1, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/huntir/functions/fnc_huntirCompass.sqf b/addons/huntir/functions/fnc_huntirCompass.sqf new file mode 100644 index 0000000000..30fcf45900 --- /dev/null +++ b/addons/huntir/functions/fnc_huntirCompass.sqf @@ -0,0 +1,88 @@ +/* + * Author: Norrin, Rocko, Ruthberg + * + * HuntIR monitor compass + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +disableSerialization; + +#define __DSP (uiNamespace getVariable "ace_huntir_cam_rose") +#define __CHAR_N (__DSP displayCtrl 64432) +#define __CHAR_E (__DSP displayCtrl 64433) +#define __CHAR_S (__DSP displayCtrl 64434) +#define __CHAR_W (__DSP displayCtrl 64435) + +#define __OFFSET_X 0.003 +#define __OFFSET_Y 0.003 +#define __WIDTH 0.1 +#define __HEIGHT 0.1 +#define __RADIUS 0.05 +#define __CENTER_X 0.70 +#define __CENTER_Y 0.65 + +private ["_fnc_correctIt"]; + +_fnc_correctIt = { + PARAMS_2(_pos,_dir); + if (_dir >= 270 || {_dir <= 90}) then { + _pos set [1, (_pos select 1) + __OFFSET_Y] + }; + if (_dir >= 0 && {_dir <= 180}) then { + _pos set [0, (_pos select 0) - __OFFSET_X] + }; + if (_dir >= 90 && {_dir <= 270}) then { + _pos set [1, (_pos select 1) - __OFFSET_Y] + }; + if (_dir >= 180 && {_dir <= 360}) then { + _pos set [0, (_pos select 0) + __OFFSET_X] + }; + _pos +}; + +HUNTIR_CAM_ROSE_LAYER_ID cutRsc ["ace_huntir_cam_rose", "PLAIN"]; + +[{ + EXPLODE_1_PVT(_this select 0,_fnc_correctIt); + + if (GVAR(stop)) exitWith { + HUNTIR_CAM_ROSE_LAYER_ID cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + private ["_dir", "_x1", "_y1", "_pos"]; + _dir = getDir GVAR(cam); // direction player; + + _x1 = __CENTER_X - (__RADIUS * sin(_dir)); + _y1 = __CENTER_Y - (__RADIUS * cos(_dir)); + _pos = [[_x1, _y1], _dir] call _fnc_correctIt; + __CHAR_N ctrlSetPosition [_pos select 0, _pos select 1, __WIDTH, __HEIGHT]; + __CHAR_N ctrlCommit 0; + + _x1 = __CENTER_X - (__RADIUS * sin(_dir + 90)); + _y1 = __CENTER_Y - (__RADIUS * cos(_dir + 90)); + _pos = [[_x1, _y1], _dir] call _fnc_correctIt; + __CHAR_W ctrlSetPosition [_pos select 0, _pos select 1, __WIDTH, __HEIGHT]; + __CHAR_W ctrlCommit 0; + + _x1 = __CENTER_X - (__RADIUS * sin(_dir + 180)); + _y1 = __CENTER_Y - (__RADIUS * cos(_dir + 180)); + _pos = [[_x1, _y1], _dir] call _fnc_correctIt; + __CHAR_S ctrlSetPosition [_pos select 0, _pos select 1, __WIDTH, __HEIGHT]; + __CHAR_S ctrlCommit 0; + + _x1 = __CENTER_X - (__RADIUS * sin(_dir + 270)); + _y1 = __CENTER_Y - (__RADIUS * cos(_dir + 270)); + _pos = [[_x1, _y1], _dir] call _fnc_correctIt; + __CHAR_E ctrlSetPosition [_pos select 0, _pos select 1, __WIDTH, __HEIGHT]; + __CHAR_E ctrlCommit 0; + +}, 0.01, [_fnc_correctIt]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/huntir/functions/fnc_keyPressed.sqf b/addons/huntir/functions/fnc_keyPressed.sqf new file mode 100644 index 0000000000..509dcb9de5 --- /dev/null +++ b/addons/huntir/functions/fnc_keyPressed.sqf @@ -0,0 +1,113 @@ +/* + * Author: Norrin, Rocko + * Handles the HuntIR monitor key interaction + * + * Arguments: + * 0: ? + * 1: keycode + * + * Return Value: + * handled? + * + * Example: + * [] call ace_huntir_fnc_keyPressed + * + * Public: No + */ +#include "script_component.hpp" + +private ["_ret"]; +_ret = false; + +switch (_this select 1) do { + // A = Lower zoom level + case 30: { + if (GVAR(ZOOM) > 0) then { + GVAR(ZOOM) = GVAR(ZOOM) - 1; + }; + switch (GVAR(ZOOM)) do { + case 0: { ctrlSetText [4, "0X"];}; + case 1: { ctrlSetText [4, "2X"];}; + case 2: { ctrlSetText [4, "4X"];}; + case 3: { ctrlSetText [4, "8X"];}; + }; + _ret = true; + }; + // D = Increase zoom level + case 32: { + if (GVAR(ZOOM) < 3) then { + GVAR(ZOOM) = GVAR(ZOOM) + 1; + }; + switch (GVAR(ZOOM)) do { + case 0: { ctrlSetText [4, "0X"];}; + case 1: { ctrlSetText [4, "2X"];}; + case 2: { ctrlSetText [4, "4X"];}; + case 3: { ctrlSetText [4, "8X"];}; + }; + _ret = true; + }; + //N key ( Toggle NV and TI modes ) + case 49: { + if (GVAR(NV) == 0) then { + setAperture -1; + camUseNVG true; + GVAR(NV) = 1; + if (!GVAR(IRON)) then { + GVAR(IRON) = true; + }; + } else { + setAperture -1; + camUseNVG false; + GVAR(NV) = 0; + GVAR(IRON) = false; + }; + _ret = true; + }; + // S = Next camera + case 31: { + GVAR(cur_cam) = GVAR(cur_cam) + 1; + _ret = true; + }; + // W = Previous camera + case 17: { + GVAR(cur_cam) = GVAR(cur_cam) - 1; + _ret = true; + }; + // Rotate camera anticlockwise + case 203: { + GVAR(ROTATE) = GVAR(ROTATE) - 3; + _ret = true; + }; + // Rotate camera clockwise + case 205: { + GVAR(ROTATE) = GVAR(ROTATE) + 3; + _ret = true; + }; + // Raise camera + case 200: { + if (GVAR(ELEVAT) < 4.01) then { + GVAR(ELEVAT) = GVAR(ELEVAT) + 0.12; + }; + _ret = true; + }; + // Lower camera + case 208: { + if (GVAR(ELEVAT) > -3.99) then { + GVAR(ELEVAT) = GVAR(ELEVAT) - 0.12; + }; + _ret = true; + }; + // Reset camera + case 19: { + GVAR(ROTATE) = 0; + GVAR(ELEVAT) = 0.01; + GVAR(ZOOM) = 0; + ctrlSetText [4, "0X"]; + GVAR(NV) = 0; + camUseNVG false; + setAperture -1; + _ret = true; + }; +}; + +_ret diff --git a/addons/huntir/functions/script_component.hpp b/addons/huntir/functions/script_component.hpp new file mode 100644 index 0000000000..29e0fbff41 --- /dev/null +++ b/addons/huntir/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\huntir\script_component.hpp" \ No newline at end of file diff --git a/addons/huntir/script_component.hpp b/addons/huntir/script_component.hpp new file mode 100644 index 0000000000..9f99437f67 --- /dev/null +++ b/addons/huntir/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT huntir +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_HUNTIR + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_HUNTIR + #define DEBUG_SETTINGS DEBUG_SETTINGS_HUNTIR +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define HUNTIR_BACKGROUND_LAYER_ID 13521 +#define HUNTIR_CAM_ROSE_LAYER_ID 13522 + +#define HUNTIR_MAX_TRANSMISSION_RANGE 1600 diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml new file mode 100644 index 0000000000..45c6b19392 --- /dev/null +++ b/addons/huntir/stringtable.xml @@ -0,0 +1,181 @@ + + + + + HuntIR Transport Box + HuntIR Transportkiste + HuntIR Transport Box + Trasnportní bedna HuntIR + Ящик с HuntIR + HuntIR Transport Box + Skrzynia HuntIR + HuntIR Transport Box + HuntIR Transport Box + + + HuntIR Round + HuntIR Granate + HuntIR Round + HuntIR Round + HuntIR снаряд + HuntIR Round + Nabój HuntIR + Munition HuntIR + HuntIR lövedék + + + HuntIR monitor + HuntIR Monitor + HuntIR monitor + HuntIR monitor + HuntIR монитор + HuntIR monitor + Odbiornik HuntIR + Ecran HuntIR + HuntIR monitor + + + Activate HuntIR monitor + HuntIR Monitor aktivieren + Activate HuntIR monitor + Zapnout HuntIR monitor + Включить HuntIR монитор + Activate HuntIR monitor + Włącz odbiornik HuntIR + Allumer écran HuntIR + HuntIR monitor aktiválása + + + Camera: + Kamera: + Camera: + Kamera: + Камера: + Camera: + Kamera: + Caméra: + Kamera: + + + Altitude: + Höhe: + Altitude: + Výška: + Высота: + Altitude: + Wysokość: + Altitude: + Magasság: + + + Recording Time: + Aufnahmezeit: + Recording Time: + Čas nahrávání: + Время записи: + Recording Time: + Czas nagrywania: + Temps d'enregistrement: + Felvételi idő: + + + Press ESC to quit camera + Zum Verlassen ESC drücken + Press ESC to quit camera + Stiskni ESC pro opustění kamery + Нажмите ESC чтобы выйти из режима камеры + Press ESC to quit camera + Wciśnij ESC by wyjść z widoku kamery + Appuyer sur ESC pour quitter camera + Nyomj ESC-ket a kamerából való kilépéshez + + + Help + Hilfe + Help + Pomoc + Помощь + Help + Pomoc + Aide + Súgó + + + A/D - Cycle zoom + A/D - Zoom + A/D - Cycle zoom + A/D - Změna přiblížení + A/D - Приближение + A/D - Cycle zoom + A/D - powiększenie + A/D - Changement zoom + A/D - Nagyítás + + + W/S - Select camera + W/S - Wähle Kamera + W/S - Select camera + W/S - Výběr kamery + W/S - Выбрать камеру + W/S - Select camera + W/S - wybór kamery + W/S - Sélectionner caméra + W/S - Kamera váltás + + + Left/Right - Rotate camera + Links/Rechts - Rotiere Kamera + Left/Right - Rotate camera + Levá/Pravá - Rotace kamery + Влево/Вправо - Вращать камеру + Left/Right - Rotate camera + Lewo/Prawo - obrót kamery w poziomie + Gauche/Droite - Rotation caméra + Jobb/Bal - Kamera forgatás + + + Up/Down - Elevate/lower camera + Hoch/Runter - Neige Kamera + Up/Down - Elevate/lower camera + Nahoru/Dolu - Zvýšít/snížit úhel pohledu kamery + Вверх/Вниз - Поднять/Опустить камеру + Up/Down - Elevate/lower camera + Góra/Dół - obrót kamery w pionie + Haut/Bas - Monter/descendre caméra + Fel/Le - Kamera döntése/süllyesztése + + + N - Cycle IT modes + N - Sichtmodi + N - Cycle IT modes + N - Změna režimů kamery + N - Режимы камеры + N - Cycle IT modes + N - wybór trybu IT + N - Changement de modes IT + N - Hőkép módok + + + R - Reset camera + R - Reset + R - Reset camera + R - Reset kamery + R - Сбросить настройки камеры + R - Reset camera + R - resetuj kamerę + R - Reset caméra + R - Kamera visszaállítása + + + Esc - Exit help + ESC - Hilfe verlassen + Esc - Exit help + Esc - Ukončit pomoc + Esc - Выйти из помощи + Esc - Exit help + Esc - wyjście z ekranu Pomocy + Esc - Sortir de l'aide + Exit - Kilépés a súgóból + + + \ No newline at end of file diff --git a/addons/interact_menu/CursorMenus.hpp b/addons/interact_menu/CursorMenus.hpp index 4da3dcf7d7..7705f3fcd2 100644 --- a/addons/interact_menu/CursorMenus.hpp +++ b/addons/interact_menu/CursorMenus.hpp @@ -7,7 +7,6 @@ class GVAR(cursorMenu) { onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(cursorMenuOpened)),false)]); }; class RscTitles { - class RscPicture; class GVAR(menuBackground) { idd = -1; onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuBackground)),_this select 0)]); @@ -17,11 +16,7 @@ class RscTitles { movingEnable = false; duration = 10e10; name = QGVAR(menuBackground); - class controls { - class GVAR(menuBackground)_picutre: RscPicture { - idc = -1; - }; - }; + class controls {}; class controlsBackground { class background { idc = -1; diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 7efc4ffba9..27f841c505 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -122,7 +122,7 @@ _actions = if (_isMan) then { // Dummy statement so it's not collapsed when there's no available actions true }, - {[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)}, + {[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)}, {}, {}, "Spine3", diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 6533f0785f..5bf156b69e 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -18,7 +18,7 @@ if (GVAR(openedMenuType) == _menuType) exitWith {true}; // Conditions: canInteract (these don't apply to zeus) if ((isNull curatorCamera) && { - !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) + !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)) }) exitWith {false}; while {dialog} do { diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index f589a8c1da..31fab217b2 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -222,15 +222,27 @@ Interaction menu background + Tło menu interakcji + Fondo del menú de interacción + Pozadí menu interakce Blur the background while the interaction menu is open. + Rozmywa lub przyciemnia tło na czas otwarcia menu interakcji + Desenfocar el fondo mientras el menú de interacción está abierto. + Rozmazat obraz pokud je interakční menu otevřené. Blur screen + Rozmycie ekranu + Pantalla de desenfoque + Rozmazaný obraz Black + Przyciemnienie ekranu + Negra + Černý obraz diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index f83fd26344..9e9dc4bc76 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -191,7 +191,7 @@ class CfgVehicles { class ACE_TeamManagement { displayName = CSTRING(TeamManagement); condition = QUOTE(GVAR(EnableTeamManagement)); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = ""; showDisabled = 1; priority = 3.2; @@ -201,7 +201,7 @@ class CfgVehicles { class ACE_JoinTeamRed { displayName = CSTRING(JoinTeamRed); condition = QUOTE(true); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.4; @@ -211,7 +211,7 @@ class CfgVehicles { class ACE_JoinTeamGreen { displayName = CSTRING(JoinTeamGreen); condition = QUOTE(true); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.3; @@ -221,7 +221,7 @@ class CfgVehicles { class ACE_JoinTeamBlue { displayName = CSTRING(JoinTeamBlue); condition = QUOTE(true); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.2; @@ -231,7 +231,7 @@ class CfgVehicles { class ACE_JoinTeamYellow { displayName = CSTRING(JoinTeamYellow); condition = QUOTE(true); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.1; @@ -242,7 +242,7 @@ class CfgVehicles { class ACE_LeaveTeam { displayName = CSTRING(LeaveTeam); condition = QUOTE(assignedTeam _player != 'MAIN'); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.5; @@ -252,7 +252,7 @@ class CfgVehicles { class ACE_BecomeLeader { displayName = CSTRING(BecomeLeader); condition = QUOTE(_this call DFUNC(canBecomeLeader)); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE(_this call DFUNC(doBecomeLeader)); showDisabled = 1; priority = 1.0; @@ -262,7 +262,7 @@ class CfgVehicles { class ACE_LeaveGroup { displayName = CSTRING(LeaveGroup); condition = QUOTE(count (units group _player) > 1); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;); showDisabled = 1; priority = 1.2; @@ -379,7 +379,7 @@ class CfgVehicles { class ACE_Equipment { displayName = CSTRING(Equipment); condition = QUOTE(true); - exceptions[] = {"isNotInside","notOnMap"}; + exceptions[] = {"isNotInside","notOnMap", "isNotSitting"}; statement = ""; showDisabled = 1; priority = 4.5; @@ -548,6 +548,30 @@ class CfgVehicles { }; }; }; + + class StaticMGWeapon: StaticWeapon {}; + class HMG_01_base_F: StaticMGWeapon {}; + class HMG_01_high_base_F: HMG_01_base_F { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.172852,0.164063,-0.476091]"; + }; + }; + }; + class AA_01_base_F: StaticMGWeapon { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0,0.515869,-0.200671]"; + }; + }; + }; + class AT_01_base_F: StaticMGWeapon { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0,0.515869,-0.200671]"; + }; + }; + }; class thingX; class ReammoBox_F: thingX { diff --git a/addons/interaction/Menu_Config.hpp b/addons/interaction/Menu_Config.hpp index 790874a1ac..8359ee560a 100644 --- a/addons/interaction/Menu_Config.hpp +++ b/addons/interaction/Menu_Config.hpp @@ -105,7 +105,7 @@ class RscACE_SelectAnItem { h = 0.1; y = 0.605; style = 2; - text = $STR_ACE_Interaction_Back; //$STR_ACE_Interaction_CancelSelection; + text = CSTRING(Back); action = "call ACE_Interaction_fnc_hideMenu;"; //'Default' call ACE_Interaction_fnc_openMenu; 'Default' call ACE_Interaction_fnc_openMenuSelf; colorBackground[] = {0,0,0,0}; colorBackgroundDisabled[] = {0,0,0,0}; @@ -119,7 +119,7 @@ class RscACE_SelectAnItem { h = 0.1; w = 0.15; style = 2; - text = $STR_ACE_Interaction_MakeSelection; + text = CSTRING(MakeSelection); action = "call ACE_Interaction_fnc_hideMenu;"; colorBackground[] = {0,0,0,0}; colorBackgroundDisabled[] = {0,0,0,0}; @@ -170,7 +170,7 @@ class RscTitles { class SelectText: RscInteractionText{ idc = 1000; y = 17 * GUI_GRID_H; - text = $STR_ACE_Interaction_MakeSelection; + text = CSTRING(MakeSelection); }; class GoBackIcon: RscInteractionHelperIcon{ idc = 1201; @@ -180,7 +180,7 @@ class RscTitles { class GoBackText: RscInteractionText{ idc = 1001; y = 19 * GUI_GRID_H; - text = $STR_ACE_Interaction_Back; + text = CSTRING(Back); }; class ScrollIcon: RscInteractionHelperIcon{ idc = 1202; @@ -190,7 +190,7 @@ class RscTitles { class ScrollText: RscInteractionText{ idc = 1002; y = 18 * GUI_GRID_H; - text = $STR_ACE_Interaction_ScrollHint; + text = CSTRING(ScrollHint); }; }; }; diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 7ee56415bf..fe557e7ada 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -23,15 +23,24 @@ private ["_actions"]; _actions = []; { - private ["_unit"]; + private ["_unit", "_icon"]; _unit = _x; if ((_unit != _player) && {(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"}) then { + _icon = switch _unit do { + case (driver _vehicle): { QUOTE(A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa) }; + case (gunner _vehicle): { QUOTE(A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_gunner_ca.paa) }; + case (commander _vehicle): { QUOTE(A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_commander_ca.paa) }; + default { "" }; + }; + if (_unit getVariable [QEGVAR(captives,isHandcuffed), false]) then { + _icon = QUOTE(PATHTOEF(captives,UI\handcuff_ca.paa)); + }; _actions pushBack [ [ str(_unit), [_unit, true] call EFUNC(common,getName), - "", + _icon, {}, {true}, {_this call FUNC(addPassengerActions);}, diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 9e743d2cb4..624e63a424 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -77,7 +77,7 @@ Right Leg Rechtes Bein Pierna derecha - Pravá hona + Pravá noha Prawa noga Jambe droite Правая нога @@ -632,7 +632,7 @@ Dołącz do zielonych Entrar em Verde Belépés a Zöldbe - Připojit k zeleným + Připojit k zeleným Присоединиться к Зеленой группе Rejoindre vert Unirsi al team verde @@ -691,7 +691,7 @@ Has dejado el equipo Tu as quitté l'équipe Opuściłeś drużynę - Opustil si tým + Opustil jsi tým Вы покинули группу Você deixou a Equipe Hai lasciato il team @@ -798,23 +798,27 @@ System interakcji Sistema de interacción Interaktionssystem + Systém interakce Enable Team Management Wł. zarządzanie drużyną Habilitar gestión de equipos Aktiviere Gruppenverwaltung + Povolit správu týmu Should players be allowed to use the Team Management Menu? Default: Yes Czy gracze mogą korzystać z menu zarządzania drużyną? Domyślnie: Tak ¿Deben tener permitido los jugadores el uso del menu de gestión de equipos? Por defecto: Si Sollen Spieler das Gruppenverwaltungsmenü verwenden dürfen? Standard: Ja + Mohou hráči použít menu správy týmu? Výchozí: Ano Team management allows color allocation for team members, taking team command and joining/leaving teams. Na zarządzanie drużyną składa się: przydział kolorów dla członków drużyny, przejmowanie dowodzenia, dołączanie/opuszczanie drużyn. Die Gruppenverwaltung erlaubt die Zuweisung von Farben für Einheiten, die Kommandierung und das Beitreten/Verlassen einer Gruppe. + Správa týmu se skládá z: přidělení barev pro členy týmu, převzetí velení, připojení/odpojení. Behaviour diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index 36da24d2d2..3e293fcb9c 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -7,7 +7,7 @@ TRACE_1("enter", _this); private["_apos", "_aposX", "_aposY", "_args", "_boundsInput", "_bpos", "_canFire", "_constraintBottom"]; private["_constraintLeft", "_constraintRight", "_constraintTop", "_currentTarget", "_fireDisabledEH"]; -private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX", "_minY", "_newTarget"]; +private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX", "_minY", "_newTarget"]; private["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"]; private["_runTime", "_soundTime", "_targetArray", "_zamerny", "_currentShooter"]; @@ -44,24 +44,24 @@ _magazineConfig = if ((currentMagazine _currentShooter) != "") then { [] }; -//Only enable if both weapon and currentMagazine are enabled (bandaid to allow firing the "AP" missle) -if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1} || {(count _magazineConfig) < 1} || {(getNumber ((_magazineConfig select 0) >> "enabled")) != 1}) exitWith { +//If weapon does not have "javelin enabled", then exit PFEH +if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1}) exitWith { __JavelinIGUITargeting ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; __JavelinIGUITargetingConstraints ctrlShow false; - + if(!isNil "_fireDisabledEH") then { _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); }; - + [(_this select 1)] call cba_fnc_removePerFrameHandler; uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil]; }; // Find a target within the optic range _newTarget = objNull; - + // Bail on fast movement if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} && {cameraOn == ACE_player}) exitWith { // keep it steady. ACE_player switchCamera "INTERNAL"; @@ -69,19 +69,20 @@ if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} && // Refresh the firemode [] call FUNC(showFireMode); - - -// bail on not loaded -if( (vehicle ACE_player) != ACE_player) then { - if( (vehicle player) magazineTurretAmmo ["1Rnd_GAT_missiles", [0]] < 1) exitWith { - TRACE_1("No turret ammo, exit", ""); + +_ammo = _currentShooter ammo (currentWeapon _currentShooter); +// not loaded or not "javelin enabled" for magazine, hide targeting and enable firing +if ((_ammo == 0) || {(count _magazineConfig) < 1} || {(getNumber ((_magazineConfig select 0) >> "enabled")) != 1}) exitWith { + __JavelinIGUITargeting ctrlShow false; + __JavelinIGUITargetingGate ctrlShow false; + __JavelinIGUITargetingLines ctrlShow false; + __JavelinIGUITargetingConstraints ctrlShow false; + + if(!isNil "_fireDisabledEH") then { + _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); }; -} else { - if (ACE_player ammo (currentWeapon ACE_player) < 1 ) exitWith { - TRACE_1("No ammo, exit", ""); - }; }; - + _range = parseNumber (ctrlText __JavelinIGUIRangefinder); TRACE_1("Viewing range", _range); if (_range > 50 && {_range < 2500}) then { @@ -113,7 +114,7 @@ _zamerny = if (_currentTarget isKindOf "CAManBase") then {_currentTarget selecti _randomPosWithinBounds = [(_zamerny select 0) + 1 - (random 2.0),(_zamerny select 1) + 1 - (random 2.0),(_zamerny select 2) + 0.5 - (random 1.0)]; _apos = worldToScreen (_currentTarget modelToWorld _randomPosWithinBounds); - + _aposX = 0; _aposY = 0; if (count _apos < 2) then { @@ -124,7 +125,7 @@ if (count _apos < 2) then { _aposY = (_apos select 1) + _offsetY; }; -if((call CBA_fnc_getFoV) select 1 > 9) then { +if((call CBA_fnc_getFoV) select 1 > 9) then { __JavelinIGUINFOV ctrlSetTextColor __ColorGreen; __JavelinIGUIWFOV ctrlSetTextColor __ColorGray; } else { @@ -134,9 +135,9 @@ if((call CBA_fnc_getFoV) select 1 > 9) then { FUNC(disableFire) = { _firedEH = _this select 0; - + if(_firedEH < 0 && difficulty > 0) then { - _firedEH = [ACE_player, "DefaultAction", {true}, { + _firedEH = [ACE_player, "DefaultAction", {true}, { _canFire = (_this select 1) getVariable["ace_missileguidance_target", nil]; if(!isNil "_canFire") exitWith { false }; true @@ -146,7 +147,7 @@ FUNC(disableFire) = { }; FUNC(enableFire) = { _firedEH = _this select 0; - + if(_firedEH > 0 && difficulty > 0) then { [ACE_player, "DefaultAction", _firedEH] call EFUNC(common,removeActionEventHandler); }; @@ -157,38 +158,38 @@ if (isNull _newTarget) then { // No targets found _currentTarget = objNull; _lockTime = 0; - + __JavelinIGUISeek ctrlSetTextColor __ColorGray; __JavelinIGUITargeting ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; __JavelinIGUITargetingConstraints ctrlShow false; - - _currentShooter setVariable ["ace_missileguidance_target",nil, false]; - + + _currentShooter setVariable ["ace_missileguidance_target",nil, false]; + // Disallow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); } else { _fov = [] call CBA_fnc_getFoV; TRACE_1("FOV", _fov); if (_newTarget distance ACE_player < 2500 - && {(call CBA_fnc_getFoV) select 1 > 9} - && { (currentVisionMode ACE_player == 2)} - && GVAR(isLockKeyDown) - ) then { + && {(call CBA_fnc_getFoV) select 1 > 9} + && { (currentVisionMode ACE_player == 2)} + && GVAR(isLockKeyDown) + ) then { // Lock on after 3 seconds - if(_currentTarget != _newTarget) then { + if(_currentTarget != _newTarget) then { TRACE_1("New Target, reseting locking", _newTarget); _lockTime = ACE_diagTime; _currentTarget = _newTarget; - + playSound "ACE_Javelin_Locking"; } else { if(ACE_diagTime - _lockTime > __LOCKONTIME + _randomLockInterval) then { TRACE_2("LOCKED!", _currentTarget, _lockTime); - + __JavelinIGUISeek ctrlSetTextColor __ColorGreen; - + __JavelinIGUITargeting ctrlShow true; __JavelinIGUITargetingConstrains ctrlShow false; __JavelinIGUITargetingGate ctrlShow true; @@ -198,34 +199,34 @@ if (isNull _newTarget) then { //__JavelinIGUITargetingLineV ctrlSetPosition [_aposX,ctrlPosition __JavelinIGUITargetingLineV select 1]; //__JavelinIGUITargetingLineH ctrlSetPosition [ctrlPosition __JavelinIGUITargetingLineH select 0,_aposY]; //{_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingLineH,__JavelinIGUITargetingLineV]; - + _boundsInput = if (_currentTarget isKindOf "CAManBase") then { [_currentTarget,[-1,-1,-2],_currentTarget selectionPosition "body"]; } else { [_currentTarget,[-1,-1,-2],_currentTarget selectionPosition "zamerny"]; }; - + _bpos = _boundsInput call EFUNC(common,worldToScreenBounds); _minX = ((_bpos select 0) + _offsetX) max _constraintLeft; _minY = ((_bpos select 1) + _offsetY) max _constraintTop; _maxX = ((_bpos select 2) + _offsetX) min (_constraintRight - 0.025*(3/4)*SafezoneH); _maxY = ((_bpos select 3) + _offsetY) min (_constraintBottom - 0.025*SafezoneH); - + TRACE_4("", _boundsInput, _bpos, _minX, _minY); - + __JavelinIGUITargetingGateTL ctrlSetPosition [_minX,_minY]; __JavelinIGUITargetingGateTR ctrlSetPosition [_maxX,_minY]; __JavelinIGUITargetingGateBL ctrlSetPosition [_minX,_maxY]; __JavelinIGUITargetingGateBR ctrlSetPosition [_maxX,_maxY]; - + {_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL,__JavelinIGUITargetingGateTR,__JavelinIGUITargetingGateBL,__JavelinIGUITargetingGateBR]; - + _currentShooter setVariable["ace_missileguidance_target", _currentTarget, false]; - + // Allow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); - + if(ACE_diagTime > _soundTime) then { playSound "ACE_Javelin_Locked"; _soundTime = ACE_diagTime + 0.25; @@ -233,31 +234,31 @@ if (isNull _newTarget) then { } else { __JavelinIGUITargeting ctrlShow true; __JavelinIGUITargetingGate ctrlShow true; - __JavelinIGUITargetingConstrains ctrlShow true; + __JavelinIGUITargetingConstrains ctrlShow true; __JavelinIGUITargetingLines ctrlShow false; _currentShooter setVariable["ace_missileguidance_target", nil, false]; - + _boundsInput = if (_currentTarget isKindOf "CAManBase") then { [_newTarget,[-1,-1,-2],_currentTarget selectionPosition "body"]; } else { [_newTarget,[-1,-1,-1],_currentTarget selectionPosition "zamerny"]; }; - + _bpos = _boundsInput call EFUNC(common,worldToScreenBounds); - + _minX = ((_bpos select 0) + _offsetX) max _constraintLeft; _minY = ((_bpos select 1) + _offsetY) max _constraintTop; _maxX = ((_bpos select 2) + _offsetX) min (_constraintRight - 0.025*(3/4)*SafezoneH); _maxY = ((_bpos select 3) + _offsetY) min (_constraintBottom - 0.025*SafezoneH); - + TRACE_4("", _boundsInput, _bpos, _minX, _minY); - + __JavelinIGUITargetingGateTL ctrlSetPosition [_minX,_minY]; __JavelinIGUITargetingGateTR ctrlSetPosition [_maxX,_minY]; __JavelinIGUITargetingGateBL ctrlSetPosition [_minX,_maxY]; __JavelinIGUITargetingGateBR ctrlSetPosition [_maxX,_maxY]; - + {_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL,__JavelinIGUITargetingGateTR,__JavelinIGUITargetingGateBL,__JavelinIGUITargetingGateBR]; if(ACE_diagTime > _soundTime) then { @@ -265,25 +266,25 @@ if (isNull _newTarget) then { _soundTime = ACE_diagTime + 0.25; }; // Disallow fire - _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); + _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); }; }; - } else { + } else { // No targets found _currentTarget = objNull; _lockTime = 0; - + __JavelinIGUISeek ctrlSetTextColor __ColorGray; __JavelinIGUITargeting ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; __JavelinIGUITargetingConstraints ctrlShow false; - + _currentShooter setVariable ["ace_missileguidance_target",nil, false]; - + // Disallow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); - }; + }; }; //TRACE_2("", _newTarget, _currentTarget); diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf index f5fab59497..0332c132e9 100644 --- a/addons/javelin/functions/fnc_onOpticLoad.sqf +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -20,7 +20,7 @@ __JavelinIGUITargetingLines ctrlShow false; uiNameSpace setVariable [QGVAR(arguments), [ - 0, // Last runtime + ACE_diagTime, // Last runtime objNull, // currentTargetObject 0, // Run Time 0, // Lock Time diff --git a/addons/kestrel4500/CfgVehicles.hpp b/addons/kestrel4500/CfgVehicles.hpp index 6e2fc1cba5..776bd8dcf5 100644 --- a/addons/kestrel4500/CfgVehicles.hpp +++ b/addons/kestrel4500/CfgVehicles.hpp @@ -10,25 +10,25 @@ class CfgVehicles { showDisabled = 0; priority = 0.1; icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); - exceptions[] = {"notOnMap"}; - }; - class GVAR(show) { - displayName = CSTRING(ShowKestrel); - condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay)); - statement = QUOTE(call FUNC(displayKestrel)); - showDisabled = 0; - priority = 0.2; - icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); - exceptions[] = {"notOnMap", "isNotInside"}; - }; - class GVAR(hide) { - displayName = CSTRING(HideKestrel); - condition = QUOTE(GVAR(Overlay)); - statement = QUOTE(call FUNC(displayKestrel)); - showDisabled = 0; - priority = 0.3; - icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); - exceptions[] = {"notOnMap", "isNotInside"}; + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + class GVAR(show) { + displayName = CSTRING(ShowKestrel); + condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay)); + statement = QUOTE(call FUNC(displayKestrel)); + showDisabled = 0; + priority = 0.2; + icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + }; + class GVAR(hide) { + displayName = CSTRING(HideKestrel); + condition = QUOTE(GVAR(Overlay)); + statement = QUOTE(call FUNC(displayKestrel)); + showDisabled = 0; + priority = 0.3; + icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + }; }; }; }; diff --git a/addons/kestrel4500/CfgWeapons.hpp b/addons/kestrel4500/CfgWeapons.hpp index c12fbcba28..c31b736ac6 100644 --- a/addons/kestrel4500/CfgWeapons.hpp +++ b/addons/kestrel4500/CfgWeapons.hpp @@ -4,11 +4,11 @@ class CfgWeapons { class InventoryItem_Base_F; class ACE_Kestrel4500: ACE_ItemCore { - author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; + author = ECSTRING(common,ACETeam); scope = 2; displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - model = PATHTOF(kestrel4500.p3d); + model = PATHTOF(data\kestrel4500.p3d); picture = PATHTOF(UI\Kestrel4500.paa); icon = "iconObject_circle"; mapSize = 0.034; diff --git a/addons/kestrel4500/config.cpp b/addons/kestrel4500/config.cpp index 8e558af44f..95a533fd9f 100644 --- a/addons/kestrel4500/config.cpp +++ b/addons/kestrel4500/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_Kestrel4500"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_common", "ACE_weather"}; - author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; + author[] = {ECSTRING(common,ACETeam), "Ruthberg"}; VERSION_CONFIG; }; }; diff --git a/addons/kestrel4500/data/Kestrel4500.p3d b/addons/kestrel4500/data/Kestrel4500.p3d new file mode 100644 index 0000000000..8166e552f2 Binary files /dev/null and b/addons/kestrel4500/data/Kestrel4500.p3d differ diff --git a/addons/kestrel4500/data/Kestrel4500.rvmat b/addons/kestrel4500/data/Kestrel4500.rvmat new file mode 100644 index 0000000000..256b6b86bb --- /dev/null +++ b/addons/kestrel4500/data/Kestrel4500.rvmat @@ -0,0 +1,82 @@ +class StageTI { + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.3,0.3,0.3,1}; +specularPower = 50; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 { + texture = "z\ace\addons\kestrel4500\data\Kestrel4500_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 { + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 { + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 { + texture = "#(ai,32,128,1)fresnel(0.85,0.36)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 { + useWorldEnvMap = "true"; + texture = "a3\data_f\env_interier_car_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/kestrel4500/data/Kestrel4500_co.paa b/addons/kestrel4500/data/Kestrel4500_co.paa new file mode 100644 index 0000000000..c34d195a7e Binary files /dev/null and b/addons/kestrel4500/data/Kestrel4500_co.paa differ diff --git a/addons/kestrel4500/data/Kestrel4500_nohq.paa b/addons/kestrel4500/data/Kestrel4500_nohq.paa new file mode 100644 index 0000000000..7c8886d688 Binary files /dev/null and b/addons/kestrel4500/data/Kestrel4500_nohq.paa differ diff --git a/addons/kestrel4500/data/arrow1.paa b/addons/kestrel4500/data/arrow1.paa deleted file mode 100644 index 8edb257ead..0000000000 Binary files a/addons/kestrel4500/data/arrow1.paa and /dev/null differ diff --git a/addons/kestrel4500/data/body.paa b/addons/kestrel4500/data/body.paa deleted file mode 100644 index dfaa44723e..0000000000 Binary files a/addons/kestrel4500/data/body.paa and /dev/null differ diff --git a/addons/kestrel4500/data/gpstemp.paa b/addons/kestrel4500/data/gpstemp.paa deleted file mode 100644 index ef45fe406c..0000000000 Binary files a/addons/kestrel4500/data/gpstemp.paa and /dev/null differ diff --git a/addons/kestrel4500/data/rad.paa b/addons/kestrel4500/data/rad.paa deleted file mode 100644 index 13a3ffe6f7..0000000000 Binary files a/addons/kestrel4500/data/rad.paa and /dev/null differ diff --git a/addons/kestrel4500/data/tasten.paa b/addons/kestrel4500/data/tasten.paa deleted file mode 100644 index 8a140ec5f0..0000000000 Binary files a/addons/kestrel4500/data/tasten.paa and /dev/null differ diff --git a/addons/kestrel4500/data/tasten1.paa b/addons/kestrel4500/data/tasten1.paa deleted file mode 100644 index af441a51de..0000000000 Binary files a/addons/kestrel4500/data/tasten1.paa and /dev/null differ diff --git a/addons/kestrel4500/initKeybinds.sqf b/addons/kestrel4500/initKeybinds.sqf index f6ad1e8a17..5793d36976 100644 --- a/addons/kestrel4500/initKeybinds.sqf +++ b/addons/kestrel4500/initKeybinds.sqf @@ -1,7 +1,7 @@ ["ACE3 Equipment", QGVAR(KestrelDialogKey), localize LSTRING(KestrelDialogKey), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; if (GVAR(Kestrel4500)) exitWith { closeDialog 0; false @@ -16,7 +16,7 @@ ["ACE3 Equipment", QGVAR(DisplayKestrelKey), localize LSTRING(DisplayKestrelKey), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Statement [] call FUNC(displayKestrel); @@ -24,3 +24,36 @@ }, {false}, [0, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) + + +//Add deviceKey entry: +private ["_conditonCode", "_toggleCode", "_closeCode"]; +_conditonCode = { + [] call FUNC(canShow); +}; +_toggleCode = { + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {}; + + // Statement + if (!GVAR(Overlay)) then { + //If no overlay, show it: + [] call FUNC(displayKestrel); + } else { + //If overlay is up, switch to dialog: + [] call FUNC(createKestrelDialog); + }; +}; +_closeCode = { + // Statement + if (GVAR(Overlay)) then { + //If dispaly is open, close it: + GVAR(Overlay) = false; + }; + if (dialog && {!isNull (uiNamespace getVariable ["Kestrel4500_Display", displayNull])}) then { + //If dialog is open, close it: + GVAR(Kestrel4500) = false; + closeDialog 0; + }; +}; +[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\Kestrel4500.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); diff --git a/addons/kestrel4500/kestrel4500.p3d b/addons/kestrel4500/kestrel4500.p3d deleted file mode 100644 index bb4edd2706..0000000000 Binary files a/addons/kestrel4500/kestrel4500.p3d and /dev/null differ diff --git a/addons/laserpointer/ACE_Settings.hpp b/addons/laserpointer/ACE_Settings.hpp new file mode 100644 index 0000000000..0536db730d --- /dev/null +++ b/addons/laserpointer/ACE_Settings.hpp @@ -0,0 +1,6 @@ +class ACE_Settings { + class GVAR(enabled) { + typeName = "BOOL"; + value = 1; + }; +}; diff --git a/addons/laserpointer/XEH_postInit.sqf b/addons/laserpointer/XEH_postInit.sqf index 38fc35f262..133931578a 100644 --- a/addons/laserpointer/XEH_postInit.sqf +++ b/addons/laserpointer/XEH_postInit.sqf @@ -1,33 +1,41 @@ // by commy2 #include "script_component.hpp" -// fixes laser when being captured. Needed, because the selectionpsoition of the right hand is used +// fixes laser when being captured. Needed, because the selectionPosition of the right hand is used ["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler); +//If user has ASDG JR without the compat patch, then ace's' laser pointers won't be compatible with anything +if ((isClass (configFile >> "CfgPatches" >> "asdg_jointrails")) && {!(isClass (configFile >> "CfgPatches" >> "ace_asdg_comp"))}) then { + diag_log text format ["[ACE_laserpointer] - ASDG Joint Rails but no ace_asdg_comp"]; +}; + + if !(hasInterface) exitWith {}; GVAR(nearUnits) = []; -// @todo. Maybe move to common? -[{ - private "_nearUnits"; - _nearUnits = []; - - { - _nearUnits append crew _x; - - if (count _nearUnits > 10) exitWith { - _nearUnits resize 10; - }; - - } forEach nearestObjects [positionCameraToWorld [0,0,0], ["AllVehicles"], 50]; // when moving this, search also for units inside vehicles. currently breaks the laser in FFV - - GVAR(nearUnits) = _nearUnits; - -} , 5, []] call CBA_fnc_addPerFrameHandler; - -addMissionEventHandler ["Draw3D", { - call FUNC(onDraw); -}]; - #include "initKeybinds.sqf" + +["SettingsInitialized", { + //If not enabled, dont't add draw eventhandler or PFEH (for performance) + if (!GVAR(enabled)) exitWith {}; + + // @todo. Maybe move to common? + [{ + private "_nearUnits"; + _nearUnits = []; + { + _nearUnits append crew _x; + if (count _nearUnits > 10) exitWith { + _nearUnits resize 10; + }; + } forEach nearestObjects [positionCameraToWorld [0,0,0], ["AllVehicles"], 50]; // when moving this, search also for units inside vehicles. currently breaks the laser in FFV + + GVAR(nearUnits) = _nearUnits; + + } , 5, []] call CBA_fnc_addPerFrameHandler; + + addMissionEventHandler ["Draw3D", { + call FUNC(onDraw); + }]; +}] call EFUNC(common,addEventHandler); diff --git a/addons/laserpointer/config.cpp b/addons/laserpointer/config.cpp index 5ca5ce3470..d368512257 100644 --- a/addons/laserpointer/config.cpp +++ b/addons/laserpointer/config.cpp @@ -12,6 +12,7 @@ class CfgPatches { }; }; +#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf index 93a421a094..e69fc5e271 100644 --- a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf +++ b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf @@ -1,6 +1,8 @@ // by commy2 and esteldunedain #include "script_component.hpp" +private ["_p0", "_p1", "_p0Pos", "_offV1", "_offV2", "_offV3", "_camPos", "_intermediatePos", "_iteration", "_light", "_line", "_pL", "_pL2", "_pX", "_size", "_units", "_fnc_getDistanceToTerrain", "_fnc_doesIntersectWithMan"]; + // init object /*if (isNil QGVAR(laserdot)) then { _light = "#lightpoint" createVehicleLocal [0,0,0]; @@ -14,7 +16,7 @@ GVAR(laserdot) = _light; };*/ -EXPLODE_3_PVT(_this,_unit,_range,_isGreen); +EXPLODE_4_PVT(_this,_unit,_range,_isGreen,_brightness); _p0Pos = _unit modelToWorldVisual (_unit selectionPosition "righthand"); @@ -47,7 +49,7 @@ _p1 = _p0 vectorAdd (_v1 vectorMultiply _range); //Debugaaa = lineIntersectsObjs [_p0, _p1, objNull, _unit, false, 2]; _fnc_getDistanceToTerrain = { - private "_distance"; + private ["_distance"]; _pX = + _p0; _line = [_p0, _pX]; @@ -55,9 +57,7 @@ _fnc_getDistanceToTerrain = { _distance = _this; _iteration = _distance; - while { - _iteration > 0.05 / 2 - } do { + while {_iteration > 0.05 / 2} do { _iteration = _iteration / 2; _pX = _p0 vectorAdd (_v1 vectorMultiply _distance); diff --git a/addons/laserpointer/functions/fnc_onDraw.sqf b/addons/laserpointer/functions/fnc_onDraw.sqf index c1e955d028..09663f9ecf 100644 --- a/addons/laserpointer/functions/fnc_onDraw.sqf +++ b/addons/laserpointer/functions/fnc_onDraw.sqf @@ -1,18 +1,19 @@ // by commy2 #include "script_component.hpp" -_brightness = 2 - call EFUNC(common,ambientBrightness); -_isIR = currentVisionMode ACE_player; +private ["_brightness", "_cacheName", "_isIR", "_laser", "_laserID", "_weapon"]; +_isIR = currentVisionMode ACE_player; if (_isIR == 2) exitWith {}; _isIR = _isIR == 1; +_brightness = 2 - call EFUNC(common,ambientBrightness); + { _weapon = currentWeapon _x; _laser = switch (_weapon) do { - case (""): {""}; case (primaryWeapon _x): { primaryWeaponItems _x select 1; }; @@ -34,7 +35,7 @@ _isIR = _isIR == 1; }; if (_laserID > 0 && {_x isFlashlightOn _weapon}) then { - [_x, 50, _laserID == 2 || _isIR] call FUNC(drawLaserpoint); + [_x, 50, (_laserID == 2 || _isIR), _brightness] call FUNC(drawLaserpoint); }; }; diff --git a/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf index 423090796f..99549ec18f 100644 --- a/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf +++ b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf @@ -1,7 +1,7 @@ // by commy2 #include "script_component.hpp" -private ["_unit", "_weapon"]; +private ["_unit", "_weapon", "_error"]; _unit = _this select 0; _weapon = _this select 1; @@ -37,6 +37,11 @@ _nextPointer = getText (_config >> "ACE_nextModeClass"); if (_nextPointer == "") exitWith {}; +//If system disabled, don't switch to a laser: +private "_nextPointerIsLaser"; +_nextPointerIsLaser = getNumber (configFile >> "CfgWeapons" >> _nextPointer >> "ACE_laserpointer"); +if ((!GVAR(enabled)) && {_nextPointerIsLaser == 1}) exitWith {}; + // disable inheritance for this entry, because addons claim this as a base class for convenience if !((_config >> "ACE_nextModeClass") in configProperties [_config, "true", false]) exitWith {}; @@ -44,21 +49,41 @@ private ["_description", "_picture"]; _description = getText (configFile >> "CfgWeapons" >> _nextPointer >> "ACE_modeDescription"); _picture = getText (configFile >> "CfgWeapons" >> _nextPointer >> "picture"); +_error = false; switch (_currentWeaponType) do { - case 1: { - _unit removePrimaryWeaponItem _pointer; - _unit addPrimaryWeaponItem _nextPointer; - }; - case 2: { - _unit removeSecondaryWeaponItem _pointer; - _unit addSecondaryWeaponItem _nextPointer; - }; - case 3: { - _unit removeHandgunItem _pointer; - _unit addHandgunItem _nextPointer; - }; + case 1: { + _unit removePrimaryWeaponItem _pointer; + _unit addPrimaryWeaponItem _nextPointer; + if (((primaryWeaponItems _unit) select 1) != _nextPointer) then { + ERROR("NextPointer not compatible"); + _unit addPrimaryWeaponItem _pointer; + _error = true; + }; + }; + case 2: { + _unit removeSecondaryWeaponItem _pointer; + _unit addSecondaryWeaponItem _nextPointer; + if (((secondaryWeaponItems _unit) select 1) != _nextPointer) then { + ERROR("NextPointer not compatible"); + _unit addSecondaryWeaponItem _pointer; + _error = true; + }; + }; + case 3: { + _unit removeHandgunItem _pointer; + _unit addHandgunItem _nextPointer; + if (((handgunItems _unit) select 1) != _nextPointer) then { + ERROR("NextPointer not compatible"); + _unit addHandgunItem _pointer; + _error = true; + }; + }; }; -[_description, _picture] call EFUNC(common,displayTextPicture); +if (!_error) then { + [_description, _picture] call EFUNC(common,displayTextPicture); +} else { + diag_log text format ["Failed to add %1 to %2 - reverting to %3", _nextPointer, _weapon, _pointer]; +}; playSound "ACE_Sound_Click"; diff --git a/addons/laserpointer/initKeybinds.sqf b/addons/laserpointer/initKeybinds.sqf index da53da8a20..a4164d420e 100644 --- a/addons/laserpointer/initKeybinds.sqf +++ b/addons/laserpointer/initKeybinds.sqf @@ -3,7 +3,7 @@ ["ACE3 Weapons", QGVAR(switchLaserLightMode), localize LSTRING(switchLaserLight), { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; diff --git a/addons/logistics_wirecutter/functions/fnc_isFence.sqf b/addons/logistics_wirecutter/functions/fnc_isFence.sqf index 1ab97a67af..4c247b268a 100644 --- a/addons/logistics_wirecutter/functions/fnc_isFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_isFence.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" //find is case sensitive, so keep everything lowercase -#define FENCE_TYPENAMES ["land_net_fence_4m_f", "land_net_fence_8m_f", "land_net_fenced_8m_f", "land_new_wiredfence_5m_f", "land_new_wiredfence_10m_dam_f", "land_new_wiredfence_10m_f", "land_pipe_fence_4m_f", "land_pipe_fence_4mnolc_f", "land_sportground_fence_f", "land_wired_fence_4m_f", "land_wired_fence_4md_f", "land_wired_fence_8m_f", "land_wired_fence_8md_f", "land_razorwire_f"] +#define FENCE_TYPENAMES ["land_net_fence_4m_f", "land_net_fence_8m_f", "land_net_fenced_8m_f", "land_new_wiredfence_5m_f", "land_new_wiredfence_10m_dam_f", "land_new_wiredfence_10m_f", "land_pipe_fence_4m_f", "land_pipe_fence_4mnolc_f", "land_sportground_fence_f", "land_wired_fence_4m_f", "land_wired_fence_4md_f", "land_wired_fence_8m_f", "land_wired_fence_8md_f", "land_razorwire_f", "ace_concertinawire"] #define FENCE_P3DS ["mil_wiredfence_f.p3d","wall_indfnc_3.p3d", "wall_indfnc_9.p3d", "wall_indfnc_corner.p3d", "pletivo_wired.p3d", "wall_fen1_5.p3d"] diff --git a/addons/magazinerepack/CfgVehicles.hpp b/addons/magazinerepack/CfgVehicles.hpp index f94d8f2b06..78af19bcfe 100644 --- a/addons/magazinerepack/CfgVehicles.hpp +++ b/addons/magazinerepack/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_RepackMagazines { displayName = CSTRING(RepackMagazines); condition = QUOTE(true); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; insertChildren = QUOTE(_this call FUNC(getMagazineChildren)); priority = -2; icon = QUOTE(PATHTOF(UI\repack_ca.paa)); diff --git a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf index 4c985e3d36..1f5be8f72a 100644 --- a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf +++ b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf @@ -26,7 +26,7 @@ EXPLODE_2_PVT(_args,_magazineClassname,_lastAmmoCount); _fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count"); //Don't show anything if player can't interact: -if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {}; +if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; _structuredOutputText = if (_errorCode == 0) then { format ["%1
", (localize LSTRING(RepackComplete))]; diff --git a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index a2947a0106..e0621a41be 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -31,7 +31,7 @@ _fullMagazineCount = getNumber (_magazineCfg >> "count"); _isBelt = (isNumber (_magazineCfg >> "ACE_isBelt")) && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1}; //Check canInteractWith: -if (!([_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {}; +if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; [_player] call EFUNC(common,goKneeling); @@ -69,5 +69,5 @@ _totalTime, {_this call FUNC(magazineRepackFinish)}, (localize LSTRING(RepackingMagazine)), {_this call FUNC(magazineRepackProgress)}, -["isNotInside"] +["isNotInside", "isNotSitting"] ] call EFUNC(common,progressBar); diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index e51d4450a4..1fb4a0b622 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -22,10 +22,13 @@ #define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) -#define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) -#define LESTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) -#define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) -#define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) +#ifndef STRING_MACROS_GUARD +#define STRING_MACROS_GUARD + #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) + #define LESTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) + #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) +#endif #define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)] #define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)] diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 707ec21b63..b94cde4b31 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -4,8 +4,8 @@ #define PREFIX ace #define MAJOR 3 -#define MINOR 0 -#define PATCHLVL 1 +#define MINOR 1 +#define PATCHLVL 2 #define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 88e6fffc1a..d1b7e38dba 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -49,6 +49,12 @@ class CfgVehicles { isGlobal = 1; icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { + class Enabled { + displayName = CSTRING(BFT_Enabled_DisplayName); + description = CSTRING(BFT_Enabled_Description); + typeName = "BOOL"; + defaultValue = 0; + }; class Interval { displayName = CSTRING(BFT_Interval_DisplayName); description = CSTRING(BFT_Interval_Description); diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index baca42a510..a3f377544b 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -1,6 +1,8 @@ #include "script_component.hpp" -ADDON = false; +// Exit on Headless as well +if !(hasInterface) exitWith {}; + LOG(MSG_INIT); // Calculate the maximum zoom allowed for this map @@ -19,4 +21,10 @@ call FUNC(determineZoom); ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}]; }; -ADDON = true; +["SettingsInitialized", { + // Start Blue Force Tracking if Enabled + if (GVAR(BFT_Enabled)) then { + GVAR(BFT_markers) = []; + [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index c156c9527d..bab776c9ab 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -18,13 +18,9 @@ PARAMS_3(_logic,_units,_activated); if !(_activated) exitWith {}; -GVAR(BFT_Enabled) = true; +[_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); diag_log text "[ACE]: Blue Force Tracking Module initialized."; -TRACE_2("[ACE]: Blue Force Tracking Module initialized.",GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); - -//start BFT: -GVAR(BFT_markers) = []; -[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; +TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 4bcdb69269..514d2af034 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -10,6 +10,8 @@ */ #include "script_component.hpp" +if !(isServer) exitWith {}; + PARAMS_3(_logic,_units,_activated); if !(_activated) exitWith {}; @@ -19,4 +21,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Interaction Module Initialized."; +diag_log text "[ACE]: Map Module Initialized."; diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 373275d6b9..930baf7835 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -6,94 +6,116 @@ Mapa Mapa Karte + Mapa
Map illumination? Oświetlenie mapy ¿Iluminación de mapa? Kartenausleuchtung + Osvětlení mapy Calculate dynamic map illumination based on light conditions? Oblicza dynamiczne oświetlenie mapy bazujące na warunkach oświetleniowych Calcula la iluminación dinámica del mapa basandose en las condiciones de luz Berechne die Kartenauslichtung anhand des Umgebungslichts? + Vypočítat dynamické osvětlení mapy na základně světelných podmínek? Map shake? Drżenie mapy ¿Temblor de mapa? Kamerawackeln + Třesení mapy? Make map shake when walking? Ekran mapy drży podczas ruchu Hace que el mapa tiemble cuando caminas Kamerawackeln beim Gehen? + Umožnit třesení mapy za pochodu? Limit map zoom? Ograniczony zoom ¿Limitar el zoom de mapa? Kartenzoom einschränken + Omezit přiblížení mapy? Limit the amount of zoom available for the map? Ogranicza maksymalny stopień przybliżenia mapy Limita la cantidad de zoom disponible para el mapa Zoomstufe der Karte einschränken? + Omezit stupeň přiblížení pro mapu? Show cursor coordinates? Koordynaty pod kursorem ¿Mostrar coordenadas de cursor? Zeige Cursor-Koordinaten? + Zobrazit souřadnice u kurzoru? Show the grid coordinates on the mouse pointer? Pokazuje pod kursorem koordynaty wskazanego kwadratu mapy Muestra las coordenadas de la cuadricula en el puntero del ratón Gitter-Koordinaten auf dem Mauszeiger anzeigen? + Zobrazit souřadnice u kurzoru v mapě? Moduł ten pozwala dostosować opcje widoku ekranu mapy. Dieses Modul erweitert die Kartenfunktionen. + Tento modul umožňuje přizpůsobit mapu s obrazem. Blue Force Tracking Blue Force Tracking Seguimiento de fuerzas amigas Blue Force Tracking + Blue Force Tracking + + + BFT Enable + + + Enable Blue Force Tracking. Default: No Interval Interwał Intervalo Intervall + Interval How often the markers should be refreshed (in seconds) Jak często markery powinny być odświeżane (w sekundach) Frecuencia de actualización de los marcadores (en segundos) Wie oft sollen die Markierungen aktualisiert werden (in Sekunden) + Jak často budou značky aktualizovány (v sekundách) Hide AI groups? Ukryj grupy AI ¿Ocultar grupos de IA? KI-Gruppen verstecken? + Skrýt AI skupiny? Hide markers for 'AI only' groups? Ukrywa markery dla grup złożonych tylko z AI Oculta las marcas de grupos 'solo IA' Verstecke Marker für "nur KI"-Gruppen? + Skrýt značky pouze pro AI skupiny? Pozwala śledzić na mapie pozycje sojuszniczych jednostek za pomocą markerów BFT. Dieses Modul ermöglicht es verbündete Einheiten mit dem BFT auf der Karte zu verfolgen. + Umožňuje sledovat přátelské jednokty na mapě v rámci BFT. - + \ No newline at end of file diff --git a/addons/maptools/CfgVehicles.hpp b/addons/maptools/CfgVehicles.hpp index 3046ec0ec1..5c3266d2d6 100644 --- a/addons/maptools/CfgVehicles.hpp +++ b/addons/maptools/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { displayName = CSTRING(MapTools_Menu); condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)})); statement = ""; - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 0; priority = 100; @@ -15,7 +15,7 @@ class CfgVehicles { displayName = CSTRING(MapToolsHide); condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 5; }; @@ -23,7 +23,7 @@ class CfgVehicles { displayName = CSTRING(MapToolsShowNormal); condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1})); statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 4; }; @@ -31,7 +31,7 @@ class CfgVehicles { displayName = CSTRING(MapToolsShowSmall); condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2})); statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 3; }; @@ -39,7 +39,7 @@ class CfgVehicles { displayName = CSTRING(MapToolsAlignNorth); condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 2; }; @@ -47,7 +47,7 @@ class CfgVehicles { displayName = CSTRING(MapToolsAlignCompass); condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}})); statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 1; }; @@ -55,7 +55,7 @@ class CfgVehicles { displayName = CSTRING(MapGpsShow); condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)})); statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 0; priority = 0; }; @@ -63,7 +63,7 @@ class CfgVehicles { displayName = CSTRING(MapGpsHide); condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)})); statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps)); - exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; showDisabled = 0; priority = 0; }; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 6c5160c031..c55e07c360 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -25,7 +25,7 @@ PARAMS_1(_display); //Can't place markers when can't interact - if (!([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith))) exitWith { + if (!([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith { _display closeDisplay 2; //emulate "Cancel" button }; diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp index e0c1f4ccf8..0f85930f51 100644 --- a/addons/medical/ACE_Medical_SelfActions.hpp +++ b/addons/medical/ACE_Medical_SelfActions.hpp @@ -2,7 +2,7 @@ class Medical { displayName = CSTRING(Actions_Medical); runOnHover = 1; hotkey = "M"; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); condition = "true"; icon = PATHTOF(UI\icons\medical_cross.paa); @@ -10,7 +10,7 @@ class Medical { class ACE_Head { displayName = CSTRING(Head); icon = PATHTOF(UI\icons\medical_cross.paa); - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; @@ -79,7 +79,7 @@ class Medical { distance = 5.0; condition = "true"; runOnHover = 1; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction)); showDisabled = 1; @@ -148,7 +148,7 @@ class Medical { class ACE_ArmLeft { displayName = ECSTRING(interaction,ArmLeft); runOnHover = 1; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; @@ -250,7 +250,7 @@ class Medical { class ACE_ArmRight { displayName = ECSTRING(interaction,ArmRight); runOnHover = 1; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; @@ -348,7 +348,7 @@ class Medical { class ACE_LegLeft { displayName = ECSTRING(interaction,LegLeft); runOnHover = 1; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; @@ -435,7 +435,7 @@ class Medical { class ACE_LegRight { displayName = ECSTRING(interaction,LegRight); runOnHover = 1; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 8e7a98fd16..8eacf39006 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -219,7 +219,7 @@ class ACE_Medical_Actions { items[] = {"ACE_personalAidKit"}; treatmentLocations[] = {QGVAR(useLocation_PAK)}; requiredMedic = QGVAR(medicSetting_PAK); - treatmentTime = 10; + treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime)); callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal)); itemConsumed = QGVAR(consumeItem_PAK); animationPatient = ""; @@ -328,6 +328,7 @@ class ACE_Medical_Advanced { class Large { name = CSTRING(Wounds_Abrasion_Large); minDamage = 0.3; + maxDamage = 0.5; bleedingRate = 0.0002; }; }; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 606b63dec8..2b28e91882 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -59,6 +59,10 @@ class ACE_Settings { typeName = "SCALAR"; values[] = {"Disabled", "50/50", "Enabled"}; }; + class GVAR(remoteControlledAI) { + typeName = "BOOL"; + value = 1; + }; class GVAR(preventInstaDeath) { typeName = "BOOL"; value = 0; @@ -134,6 +138,12 @@ class ACE_Settings { value = 1; }; class GVAR(healHitPointAfterAdvBandage) { + displayName = CSTRING(healHitPointAfterAdvBandage); + typeName = "BOOL"; + value = 0; + }; + class GVAR(painIsOnlySuppressed) { + displayName = CSTRING(painIsOnlySuppressed); typeName = "BOOL"; value = 1; }; @@ -141,7 +151,7 @@ class ACE_Settings { displayName = CSTRING(painEffectType); typeName = "SCALAR"; value = 0; - values[] = {"$STR_ACE_Medical_painEffect_Flash", "$STR_ACE_Medical_painEffect_Chroma"}; + values[] = {CSTRING(painEffect_Flash), CSTRING(painEffect_Chroma)}; isClientSettable = 1; }; class GVAR(allowUnconsciousAnimationOnTreatment) { @@ -158,7 +168,7 @@ class ACE_Settings { description = CSTRING(menuTypeDescription); typeName = "SCALAR"; value = 0; - values[] = {"$STR_ACE_Medical_useSelection"/*, "$STR_ACE_Medical_useRadial"*/}; + values[] = {CSTRING(useSelection)/*, CSTRING(useRadial)*/}; // isClientSettable = 1; }; }; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index a098394cbd..c8a4528ca5 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -22,7 +22,7 @@ class CfgVehicles { class Arguments { class level { displayName = CSTRING(MedicalSettings_level_DisplayName); - description = CSTRING(MedicalSettings_); + description = CSTRING(MedicalSettings_level_Description); typeName = "NUMBER"; class values { class normal { @@ -106,6 +106,12 @@ class CfgVehicles { }; }; }; + class remoteControlledAI { + displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName); + description = CSTRING(MedicalSettings_remoteControlledAI_Description); + typeName = "BOOL"; + defaultValue = 1; + }; class preventInstaDeath { displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName); description = CSTRING(MedicalSettings_preventInstaDeath_Description); @@ -221,7 +227,18 @@ class CfgVehicles { displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName); description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description); }; - + class healHitPointAfterAdvBandage { + displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName); + description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description); + typeName = "BOOL"; + defaultValue = 0; + }; + class painIsOnlySuppressed { + displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName); + description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description); + typeName = "BOOL"; + defaultValue = 1; + }; }; class ModuleDescription { description = CSTRING(AdvancedMedicalSettings_Module_Description); @@ -660,13 +677,13 @@ class CfgVehicles { side = -1; model = QUOTE(PATHTOEF(apl,bodybag.p3d)); icon = ""; - displayName = $STR_ACE_Medical_Bodybag_Display; + displayName = CSTRING(Bodybag_Display); EGVAR(dragging,canDrag) = 1; EGVAR(dragging,dragPosition[]) = {0,1.2,0}; EGVAR(dragging,dragDirection) = 0; class ACE_Actions { class ACE_MainActions { - displayName = CSTRING(MainAction); + displayName = ECSTRING(interaction,MainAction); distance = 5; condition = QUOTE(true); statement = ""; @@ -713,7 +730,7 @@ class CfgVehicles { class ACE_fieldDressingItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Bandage_Basic_Display; + displayName = CSTRING(Bandage_Basic_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -726,7 +743,7 @@ class CfgVehicles { class ACE_packingBandageItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Packing_Bandage_Display; + displayName = CSTRING(Packing_Bandage_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -739,7 +756,7 @@ class CfgVehicles { class ACE_elasticBandageItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Bandage_Elastic_Display; + displayName = CSTRING(Bandage_Elastic_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -752,7 +769,7 @@ class CfgVehicles { class ACE_tourniquetItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Tourniquet_Display; + displayName = CSTRING(Tourniquet_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -765,7 +782,7 @@ class CfgVehicles { class ACE_morphineItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Morphine_Display; + displayName = CSTRING(Morphine_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -778,7 +795,7 @@ class CfgVehicles { class ACE_atropineItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Atropine_Display; + displayName = CSTRING(Atropine_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -791,7 +808,7 @@ class CfgVehicles { class ACE_epinephrineItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Epinephrine_Display; + displayName = CSTRING(Epinephrine_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -804,7 +821,7 @@ class CfgVehicles { class ACE_plasmaIVItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Plasma_IV; + displayName = CSTRING(Plasma_IV); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -818,7 +835,7 @@ class CfgVehicles { class ACE_bloodIVItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Blood_IV; + displayName = CSTRING(Blood_IV); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -831,7 +848,7 @@ class CfgVehicles { class ACE_salineIVItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Saline_IV; + displayName = CSTRING(Saline_IV); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -844,7 +861,7 @@ class CfgVehicles { class ACE_quikClotItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_QuikClot_Display; + displayName = CSTRING(QuikClot_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -857,7 +874,7 @@ class CfgVehicles { class ACE_personalAidKitItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Aid_Kit_Display; + displayName = CSTRING(Aid_Kit_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -870,7 +887,7 @@ class CfgVehicles { class ACE_surgicalKitItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_SurgicalKit_Display; + displayName = CSTRING(SurgicalKit_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { @@ -883,7 +900,7 @@ class CfgVehicles { class ACE_bodyBagItem: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_Medical_Bodybag_Display; + displayName = CSTRING(Bodybag_Display); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 31a53a6eba..ef6c702604 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -24,64 +24,64 @@ class CfgWeapons { scope = 2; model = QUOTE(PATHTOF(data\bandage.p3d)); picture = QUOTE(PATHTOF(ui\items\fieldDressing_x_ca.paa)); - displayName = $STR_ACE_Medical_Bandage_Basic_Display; - descriptionShort = $STR_ACE_Medical_Bandage_Basic_Desc_Short; - descriptionUse = $STR_ACE_Medical_Bandage_Basic_Desc_Use; + displayName = CSTRING(Bandage_Basic_Display); + descriptionShort = CSTRING(Bandage_Basic_Desc_Short); + descriptionUse = CSTRING(Bandage_Basic_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_packingBandage: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Packing_Bandage_Display; + displayName = CSTRING(Packing_Bandage_Display); picture = QUOTE(PATHTOF(ui\items\packingBandage_x_ca.paa)); model = QUOTE(PATHTOF(data\packingbandage.p3d)); - descriptionShort = $STR_ACE_Medical_Packing_Bandage_Desc_Short; - descriptionUse = $STR_ACE_Medical_Packing_Bandage_Desc_Use; + descriptionShort = CSTRING(Packing_Bandage_Desc_Short); + descriptionUse = CSTRING(Packing_Bandage_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_elasticBandage: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Bandage_Elastic_Display; + displayName = CSTRING(Bandage_Elastic_Display); picture = QUOTE(PATHTOF(ui\items\elasticBandage_x_ca.paa)); model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; - descriptionShort = $STR_ACE_Medical_Bandage_Elastic_Desc_Short; - descriptionUse = $STR_ACE_Medical_Bandage_Elastic_Desc_Use; + descriptionShort = CSTRING(Bandage_Elastic_Desc_Short); + descriptionUse = CSTRING(Bandage_Elastic_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_tourniquet: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Tourniquet_Display; + displayName = CSTRING(Tourniquet_Display); picture = QUOTE(PATHTOF(ui\items\tourniquet_x_ca.paa)); model = QUOTE(PATHTOF(data\tourniquet.p3d)); - descriptionShort = $STR_ACE_Medical_Tourniquet_Desc_Short; - descriptionUse = $STR_ACE_Medical_Tourniquet_Desc_Use; + descriptionShort = CSTRING(Tourniquet_Desc_Short); + descriptionUse = CSTRING(Tourniquet_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_morphine: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Morphine_Display; + displayName = CSTRING(Morphine_Display); picture = QUOTE(PATHTOF(ui\items\morphine_x_ca.paa)); model = QUOTE(PATHTOF(data\morphine.p3d)); - descriptionShort = $STR_ACE_Medical_Morphine_Desc_Short; - descriptionUse = $STR_ACE_Medical_Morphine_Desc_Use; + descriptionShort = CSTRING(Morphine_Desc_Short); + descriptionUse = CSTRING(Morphine_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_atropine: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Atropine_Display; + displayName = CSTRING(Atropine_Display); picture = QUOTE(PATHTOF(ui\items\atropine_x_ca.paa)); model = QUOTE(PATHTOF(data\atropine.p3d)); - descriptionShort = $STR_ACE_Medical_Atropine_Desc_Short; - descriptionUse = $STR_ACE_Medical_Atropine_Desc_Use; + descriptionShort = CSTRING(Atropine_Desc_Short); + descriptionUse = CSTRING(Atropine_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; @@ -89,33 +89,33 @@ class CfgWeapons { }; class ACE_epinephrine: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Epinephrine_Display; + displayName = CSTRING(Epinephrine_Display); picture = QUOTE(PATHTOF(ui\items\epinephrine_x_ca.paa)); model = QUOTE(PATHTOF(data\epinephrine.p3d)); - descriptionShort = $STR_ACE_Medical_Epinephrine_Desc_Short; - descriptionUse = $STR_ACE_Medical_Epinephrine_Desc_Use; + descriptionShort = CSTRING(Epinephrine_Desc_Short); + descriptionUse = CSTRING(Epinephrine_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_plasmaIV: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Plasma_IV; + displayName = CSTRING(Plasma_IV); picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_Plasma_IV_Desc_Short; - descriptionUse = $STR_ACE_Medical_Plasma_IV_Desc_Use; + descriptionShort = CSTRING(Plasma_IV_Desc_Short); + descriptionUse = CSTRING(Plasma_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 10; }; }; class ACE_plasmaIV_500: ACE_plasmaIV { - displayName = $STR_ACE_Medical_Plasma_IV_500; + displayName = CSTRING(Plasma_IV_500); class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_plasmaIV_250: ACE_plasmaIV { - displayName = $STR_ACE_Medical_Plasma_IV_250; + displayName = CSTRING(Plasma_IV_250); class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -123,86 +123,86 @@ class CfgWeapons { class ACE_bloodIV: ACE_ItemCore { scope = 2; model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d"; - displayName = $STR_ACE_Medical_Blood_IV; + displayName = CSTRING(Blood_IV); picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_Blood_IV_Desc_Short; - descriptionUse = $STR_ACE_Medical_Blood_IV_Desc_Use; + descriptionShort = CSTRING(Blood_IV_Desc_Short); + descriptionUse = CSTRING(Blood_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 10; }; }; class ACE_bloodIV_500: ACE_bloodIV { - displayName = $STR_ACE_Medical_Blood_IV_500; + displayName = CSTRING(Blood_IV_500); class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_bloodIV_250: ACE_bloodIV { - displayName = $STR_ACE_Medical_Blood_IV_250; + displayName = CSTRING(Blood_IV_250); class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; }; class ACE_salineIV: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Saline_IV; + displayName = CSTRING(Saline_IV); picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_Saline_IV_Desc_Short; - descriptionUse = $STR_ACE_Medical_Saline_IV_Desc_Use; + descriptionShort = CSTRING(Saline_IV_Desc_Short); + descriptionUse = CSTRING(Saline_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 10; }; }; class ACE_salineIV_500: ACE_salineIV { - displayName = $STR_ACE_Medical_Saline_IV_500; + displayName = CSTRING(Saline_IV_500); class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_salineIV_250: ACE_salineIV { - displayName = $STR_ACE_Medical_Saline_IV_250; + displayName = CSTRING(Saline_IV_250); class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; }; class ACE_quikclot: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_QuikClot_Display; + displayName = CSTRING(QuikClot_Display); picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_QuikClot_Desc_Short; - descriptionUse = $STR_ACE_Medical_QuikClot_Desc_Use; + descriptionShort = CSTRING(QuikClot_Desc_Short); + descriptionUse = CSTRING(QuikClot_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; class ACE_personalAidKit: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_Medical_Aid_Kit_Display; + displayName = CSTRING(Aid_Kit_Display); picture = QUOTE(PATHTOF(ui\items\personal_aid_kit_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_Aid_Kit_Desc_Short; - descriptionUse = $STR_ACE_Medical_Aid_Kit_Desc_Use; + descriptionShort = CSTRING(Aid_Kit_Desc_Short); + descriptionUse = CSTRING(Aid_Kit_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 10; }; }; class ACE_surgicalKit: ACE_ItemCore { scope=2; - displayName= $STR_ACE_Medical_SurgicalKit_Display; + displayName= CSTRING(SurgicalKit_Display); model = QUOTE(PATHTOF(data\surgical_kit.p3d)); picture = QUOTE(PATHTOF(ui\items\surgicalKit_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_SurgicalKit_Desc_Short; - descriptionUse = $STR_ACE_Medical_SurgicalKit_Desc_Use; + descriptionShort = CSTRING(SurgicalKit_Desc_Short); + descriptionUse = CSTRING(SurgicalKit_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 15; }; }; class ACE_bodyBag: ACE_ItemCore { scope=2; - displayName= $STR_ACE_Medical_Bodybag_Display; + displayName= CSTRING(Bodybag_Display); model = QUOTE(PATHTOF(data\bodybagItem.p3d)); picture = QUOTE(PATHTOF(ui\items\bodybag_x_ca.paa)); - descriptionShort = $STR_ACE_Medical_Bodybag_Desc_Short; - descriptionUse = $STR_ACE_Medical_Bodybag_Desc_Use; + descriptionShort = CSTRING(Bodybag_Desc_Short); + descriptionUse = CSTRING(Bodybag_Desc_Use); class ItemInfo: InventoryItem_Base_F { mass = 20; }; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index a45662ef51..0b51f57165 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -6,9 +6,9 @@ GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "A GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; -["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler; -["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler; -["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler; +["medical_propagateWound", FUNC(onPropagateWound)] call EFUNC(common,addEventHandler); +["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call EFUNC(common,addEventHandler); +["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call EFUNC(common,addEventHandler); ["medical_onUnconscious", { if (local (_this select 0)) then { @@ -30,7 +30,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; }; }; }; -}] call ace_common_fnc_addEventHandler; +}] call EFUNC(common,addEventHandler); // Initialize all effects @@ -164,55 +164,63 @@ GVAR(lastHeartBeatSound) = ACE_time; if (_heartRate <= 0) exitwith {}; _interval = 60 / (_heartRate min 50); - if (ACE_time > GVAR(lastHeartBeat) + _interval) then { - GVAR(lastHeartBeat) = ACE_time; - - // Pain effect - _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; - _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); + if ((ACE_player getVariable ["ACE_isUnconscious", false])) then { if (GVAR(painEffectType) == 1) then { + GVAR(effectPainCA) ppEffectEnable false; + } else { GVAR(effectPainCC) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { - _strength = _strength * 0.15; - GVAR(effectPainCA) ppEffectEnable true; - GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; - GVAR(effectPainCA) ppEffectCommit 0.01; - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; - GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + }; + } else { + if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then { + GVAR(lastHeartBeat) = ACE_time; + + // Pain effect + _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; + _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); + if (GVAR(painEffectType) == 1) then { + GVAR(effectPainCC) ppEffectEnable false; + if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + _strength = _strength * 0.15; + GVAR(effectPainCA) ppEffectEnable true; + GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; GVAR(effectPainCA) ppEffectCommit 0.01; - }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; - GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit 0.01; + }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + } else { + GVAR(effectPainCA) ppEffectEnable false; + }; } else { GVAR(effectPainCA) ppEffectEnable false; - }; - } else { - GVAR(effectPainCA) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { - _strength = _strength * 0.9; - GVAR(effectPainCC) ppEffectEnable true; - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; - GVAR(effectPainCC) ppEffectCommit 0.01; - [{ - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; - GVAR(effectPainCC) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + _strength = _strength * 0.9; + GVAR(effectPainCC) ppEffectEnable true; + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; GVAR(effectPainCC) ppEffectCommit 0.01; - }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; - GVAR(effectPainCC) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); - } else { - GVAR(effectPainCC) ppEffectEnable false; + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit 0.01; + }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + } else { + GVAR(effectPainCC) ppEffectEnable false; + }; }; }; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index d3c2275751..a932ee5c9d 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -40,6 +40,7 @@ PREP(handleDamage_caching); PREP(handleDamage_fractures); PREP(handleDamage_internalInjuries); PREP(handleDamage_wounds); +PREP(handleDamage_woundsOld); PREP(handleUnitVitals); PREP(handleKilled); PREP(handleLocal); @@ -76,6 +77,7 @@ PREP(treatmentAdvanced_CPR); PREP(treatmentAdvanced_CPRLocal); PREP(treatmentAdvanced_fullHeal); PREP(treatmentAdvanced_fullHealLocal); +PREP(treatmentAdvanced_fullHealTreatmentTime); PREP(treatmentAdvanced_medication); PREP(treatmentAdvanced_medicationLocal); PREP(treatmentAdvanced_surgicalKit_onProgress); @@ -111,6 +113,8 @@ PREP(handleCreateLitter); GVAR(injuredUnitCollection) = []; GVAR(IVBags) = []; +DFUNC(handleDamage_assignWounds) = if ("ace_medical" callExtension "version" == "") then { DFUNC(handleDamage_woundsOld) } else { DFUNC(handleDamage_wounds)}; + call FUNC(parseConfigForInjuries); GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index 701be65f2d..19bd75caad 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -33,22 +33,23 @@ if ([_caller] call FUNC(isMedic)) then { } else { if (_bloodPressureHigh > 20) then { _output = LSTRING(Check_Bloodpressure_Output_2); - _logOutPut = localize LSTRING(Check_Bloodpressure_Low); + _logOutPut = LSTRING(Check_Bloodpressure_Low); if (_bloodPressureHigh > 100) then { _output = LSTRING(Check_Bloodpressure_Output_3); - _logOutPut = localize LSTRING(Check_Bloodpressure_Normal); + _logOutPut = LSTRING(Check_Bloodpressure_Normal); if (_bloodPressureHigh > 160) then { _output = LSTRING(Check_Bloodpressure_Output_4); - _logOutPut = localize LSTRING(Check_Bloodpressure_High); + _logOutPut = LSTRING(Check_Bloodpressure_High); }; }; } else { if (random(10) > 3) then { _output = LSTRING(Check_Bloodpressure_Output_5); - _logOutPut = localize LSTRING(Check_Bloodpressure_NoBloodpressure); + _logOutPut = LSTRING(Check_Bloodpressure_NoBloodpressure); } else { _output = LSTRING(Check_Bloodpressure_Output_6); + //Fail to find pressure, no logoutput }; }; }; @@ -56,5 +57,5 @@ if ([_caller] call FUNC(isMedic)) then { ["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_target,"activity", localize LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); + [_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index 09d275d07d..9af18d0a6d 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -24,7 +24,7 @@ if (!alive _unit) then { _heartRate = 0; }; _heartRateOutput = LSTRING(Check_Pulse_Output_5); -_logOutPut = localize LSTRING(Check_Pulse_None); +_logOutPut = LSTRING(Check_Pulse_None); if (_heartRate > 1.0) then { if ([_caller] call FUNC(isMedic)) then { @@ -33,14 +33,14 @@ if (_heartRate > 1.0) then { } else { // non medical personel will only find a pulse/HR _heartRateOutput = LSTRING(Check_Pulse_Output_2); - _logOutPut = localize LSTRING(Check_Pulse_Weak); + _logOutPut = LSTRING(Check_Pulse_Weak); if (_heartRate > 60) then { if (_heartRate > 100) then { _heartRateOutput = LSTRING(Check_Pulse_Output_3); - _logOutPut = localize LSTRING(Check_Pulse_Strong); + _logOutPut = LSTRING(Check_Pulse_Strong); } else { _heartRateOutput = LSTRING(Check_Pulse_Output_4); - _logOutPut = localize LSTRING(Check_Pulse_Normal); + _logOutPut = LSTRING(Check_Pulse_Normal); }; }; }; @@ -49,5 +49,5 @@ if (_heartRate > 1.0) then { ["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_unit,"activity", localize LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); + [_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf index 96c7251d6b..a73f32265a 100644 --- a/addons/medical/functions/fnc_actionUnloadUnit.sqf +++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf @@ -24,4 +24,4 @@ _drag = if (count _this > 2) then {_this select 2} else {false}; if (vehicle _target == _target) exitwith {}; if (([_target] call EFUNC(common,isAwake))) exitwith {}; -[_target] call EFUNC(common,unloadPerson) \ No newline at end of file +["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent) \ No newline at end of file diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 4c55cdabf6..f4516a100c 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -25,4 +25,4 @@ _callBack = [_this, 3, {}, [{}]] call BIS_fnc_Param; _adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; _adjustment pushback [_value, _time, _callBack]; _unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; -["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call ace_common_fnc_localEvent; +["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 46bacf2349..af7d9f3170 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -47,7 +47,7 @@ if (count _log >= 8) then { _log pushback [_message,_moment,_type, _arguments]; _unit setvariable [_logVarName, _log, true]; -["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call ace_common_fnc_localEvent; +["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent); _logs = _unit getvariable [QGVAR(allLogs), []]; if !(_logVarName in _logs) then { diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 4f08cf5c1e..7495c04a8a 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -42,4 +42,4 @@ if (!_inList) then { _log pushback [_newItem, 1, ACE_time]; }; _unit setvariable [QGVAR(triageCard), _log, true]; -["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call ace_common_fnc_localEvent; +["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 96b56c57f9..cd61550152 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -50,7 +50,7 @@ if (_show) then { _genericMessages = []; if (GVAR(level) >= 2) then { - _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(ArmLeft) ,LSTRING(ArmRight) ,LSTRING(LegLeft), LSTRING(LegRight)] select _selectionN; + _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN; _genericMessages pushback [localize _partText, [1, 1, 1, 1]]; }; diff --git a/addons/medical/functions/fnc_getTypeOfDamage.sqf b/addons/medical/functions/fnc_getTypeOfDamage.sqf index 4dd517679a..d51131ce0c 100644 --- a/addons/medical/functions/fnc_getTypeOfDamage.sqf +++ b/addons/medical/functions/fnc_getTypeOfDamage.sqf @@ -13,22 +13,23 @@ #include "script_component.hpp" -private ["_typeOfProjectile","_typeOfInjury"]; -_typeOfProjectile = _this select 0; -_typeOfInjury = switch (true) do { - case (_typeOfProjectile iskindof "BulletBase"): {"Bullet"}; - case (_typeOfProjectile iskindof "GrenadeCore"): {"Grenade"}; - case (_typeOfProjectile iskindof "TimeBombCore"): {"Explosive"}; - case (_typeOfProjectile iskindof "MineCore"): {"Explosive"}; - case (_typeOfProjectile iskindof "FuelExplosion"): {"Explosive"}; - case (_typeOfProjectile iskindof "ShellBase"): {"Shell"}; - case (_typeOfProjectile iskindof "RocketBase"): {"Explosive"}; - case (_typeOfProjectile iskindof "MissileBase"): {"Explosive"}; - case (_typeOfProjectile iskindof "LaserBombCore"): {"Explosive"}; - case (_typeOfProjectile iskindof "BombCore"): {"Explosive"}; - case (_typeOfProjectile iskindof "Grenade"): {"Grenade"}; - case (_typeOfProjectile == "VehicleCrash"): {"VehicleCrash"}; - default {_typeOfProjectile}; +PARAMS_1(_typeOfProjectile); + +private ["_typeOfDamage"]; + +_typeOfDamage = switch (true) do { + case (_typeOfProjectile isKindOf "BulletBase"): {"bullet"}; + case (_typeOfProjectile isKindOf "GrenadeCore"): {"grenade"}; + case (_typeOfProjectile isKindOf "TimeBombCore"): {"explosive"}; + case (_typeOfProjectile isKindOf "MineCore"): {"explosive"}; + case (_typeOfProjectile isKindOf "FuelExplosion"): {"explosive"}; + case (_typeOfProjectile isKindOf "ShellBase"): {"shell"}; + case (_typeOfProjectile isKindOf "RocketBase"): {"explosive"}; + case (_typeOfProjectile isKindOf "MissileBase"): {"explosive"}; + case (_typeOfProjectile isKindOf "LaserBombCore"): {"explosive"}; + case (_typeOfProjectile isKindOf "BombCore"): {"explosive"}; + case (_typeOfProjectile isKindOf "Grenade"): {"grenade"}; + default {toLower _typeOfProjectile}; }; -// TODO replace the capitalization on the switch results instead.. -toLower _typeOfInjury; + +_typeOfDamage diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 5e58772a36..ab6e6f2a68 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -52,6 +52,8 @@ if (GVAR(level) < 2) then { _damageReturn = _this call FUNC(handleDamage_basic); }; _newDamage = _this call FUNC(handleDamage_caching); + // handleDamage_caching may have modified the projectile string + _projectile = _this select 4; _typeOfDamage = [_projectile] call FUNC(getTypeOfDamage); _typeIndex = (GVAR(allAvailableDamageTypes) find _typeOfDamage); diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 8bd0267d3f..9da0d065ed 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -12,7 +12,7 @@ * 6: Type of Damage * * Return Value: - * Damage To Be Inflicted + * Nothing * * Public: No */ @@ -28,10 +28,7 @@ _typeOfProjectile = _this select 4; _newDamage = _this select 5; // Most likely taking exessive fire damage. Lets exit. -if (isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) exitwith { - 0 -}; -_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); +if (isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) exitwith {}; _part = [_selectionName] call FUNC(selectionNameToNumber); if (_part < 0) exitwith {}; @@ -44,7 +41,8 @@ _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; [_unit] call FUNC(handleDamage_advancedSetDamage); -[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds); +_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); +[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_assignWounds); // TODO Disabled until implemented fully //if (GVAR(enableAirway)) then { @@ -63,5 +61,3 @@ if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { [_unit] call FUNC(setUnconscious); }; }; - -_amountOfDamage; diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf index f464ef5a94..3df8a5ce0c 100644 --- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf @@ -13,42 +13,22 @@ #include "script_component.hpp" -private ["_unit", "_bodyStatus", "_headDamage", "_torsoDamage", "_handsDamage", "_legsDamage"]; -_unit = _this select 0; +PARAMS_1(_unit); if (!local _unit) exitwith {}; -_bodyStatus = _unit getvariable [QGVAR(bodyPartStatus),[0,0,0,0,0,0]]; +private ["_bodyStatus", "_headDamage", "_torsoDamage", "_handsDamage", "_legsDamage"]; + // ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"] -_headDamage = _bodyStatus select 0; -if (_headDamage > 0.95) then { - _unit setHitPointDamage ["hitHead", 0.95]; -} else { - _unit setHitPointDamage ["hitHead", _headDamage]; -}; +_bodyStatus = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; -_torsoDamage = _bodyStatus select 1; -if (_torsoDamage > 0.95) then { - _unit setHitPointDamage ["hitBody", 0.95]; -} else { - _unit setHitPointDamage ["hitBody", _torsoDamage]; -}; +EXPLODE_6_PVT(_bodyStatus,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL); +_unit setHitPointDamage ["hitHead", _headDamage min 0.95]; +_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95]; +_unit setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95]; +_unit setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95]; -_handsDamage = (_bodyStatus select 2) + (_bodyStatus select 3); -if (_handsDamage > 0.95) then { - _unit setHitPointDamage ["hitHands", 0.95]; -} else { - _unit setHitPointDamage ["hitHands", _handsDamage]; -}; - -_legsDamage = (_bodyStatus select 4) + (_bodyStatus select 5); -if (_legsDamage > 0.95) then { - _unit setHitPointDamage ["hitLegs", 0.95]; -} else { - _unit setHitPointDamage ["hitLegs", _legsDamage]; -}; - -if ({_x > 0} count _bodyStatus == 0) then { +if (_bodyStatus isEqualTo [0,0,0,0,0,0]) then { _unit setDamage 0; }; diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 95d750843d..9760770d71 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -18,7 +18,7 @@ #include "script_component.hpp" -private ["_unit", "_selectionName","_damage", "_source","_projectile","_hitSelections","_hitPoints","_newDamage","_cache_hitpoints","_cache_projectiles","_cache_params","_cache_damages"]; +private ["_unit", "_selectionName", "_damage", "_source", "_projectile", "_hitSelections", "_hitPoints", "_impactVelocity", "_newDamage", "_cache_hitpoints", "_cache_projectiles", "_cache_params", "_cache_damages"]; _unit = _this select 0; _selectionName = _this select 1; _damage = _this select 2; @@ -41,18 +41,33 @@ if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isN if (GVAR(enableVehicleCrashes)) then { _selectionName = _hitSelections select (floor(random(count _hitSelections))); _projectile = "vehiclecrash"; + _this set [1, _selectionName]; + _this set [4, _projectile]; }; }; -// From AGM medical: -// Exclude falling damage to everything other than legs; reduce structural damage. -if (((velocity _unit) select 2 < -5) && {(vehicle _unit == _unit)}) then { - _unit setVariable [QGVAR(isFalling), True]; +// Handle falling damage +_impactVelocity = (velocity _unit) select 2; +if (_impactVelocity < -5 && {vehicle _unit == _unit}) then { + _unit setVariable [QGVAR(isFalling), true]; + _unit setVariable [QGVAR(impactVelocity), _impactVelocity]; }; - -if (_unit getVariable [QGVAR(isFalling), false] && {!(_selectionName in ["", "leg_l", "leg_r"])}) exitWith {}; if (_unit getVariable [QGVAR(isFalling), false]) then { - _newDamage = _newDamage * 0.7; + if !(_selectionName in ["", "leg_l", "leg_r"]) then { + if (_selectionName == "body") then { + _newDamage = _newDamage * abs(_unit getVariable [QGVAR(impactVelocity), _impactVelocity]) / 50; + } else { + _newDamage = _newDamage * 0.5; + }; + } else { + if (_selectionName == "") then { + _selectionName = ["leg_l", "leg_r"] select (floor(random 2)); + _this set [1, _selectionName]; + }; + _newDamage = _newDamage * 0.7; + }; + _projectile = "falling"; + _this set [4, "falling"]; }; // Finished with the current frame, reset variables @@ -88,7 +103,7 @@ if (_selectionName != "") then { private ["_index","_otherDamage"]; _index = _cache_projectiles find _projectile; // Check if the current projectile has already been handled once - if (_index >= 0) exitwith { + if (_index >= 0 && {_projectile != "falling"}) exitwith { _cache_damages = _unit getVariable QGVAR(cachedDamages); // Find the previous damage this projectile has done _otherDamage = (_cache_damages select _index); diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf new file mode 100644 index 0000000000..1034ba9cae --- /dev/null +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -0,0 +1,143 @@ +/* + * Author: Glowbal + * Handling of the open wounds & injuries upon the handleDamage eventhandler. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Name Of Hit Selection + * 2: Amount Of Damage + * 3: Shooter or source of the damage + * 4: Type of the damage done + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage", "_bodyPartn", "_injuryTypeInfo", "_allInjuriesForDamageType", "_allPossibleInjuries", "_highestPossibleDamage", "_highestPossibleSpot", "_minDamage", "_openWounds", "_woundID", "_toAddInjury", "_painToAdd", "_bloodLoss", "_bodyPartNToAdd", "_classType", "_damageLevels", "_foundIndex", "_i", "_injury", "_maxDamage", "_pain", "_painLevel", "_selections", "_toAddClassID", "_woundsCreated"]; +_unit = _this select 0; +_selectionName = _this select 1; +_damage = _this select 2; +_typeOfProjectile = _this select 3; +_typeOfDamage = _this select 4; + +// Convert the selectionName to a number and ensure it is a valid selection. +_bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); +if (_bodyPartn < 0) exitwith {}; + +// Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes] +_injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]]; + +// This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..] +_allInjuriesForDamageType = _injuryTypeInfo select 2; +// It appears we are dealing with an unknown type of damage. + +if (count _allInjuriesForDamageType == 0) then { + // grabbing the configuration for unknown damage type + _injuryTypeInfo = missionNamespace getvariable [QGVAR(woundInjuryType_unknown),[[], false, []]]; + _allInjuriesForDamageType = _injuryTypeInfo select 2; +}; + +// find the available injuries for this damage type and damage amount +_highestPossibleSpot = -1; +_highestPossibleDamage = -1; +_allPossibleInjuries = []; +{ + _damageLevels = _x select 4; + _minDamage = _damageLevels select 0; + _maxDamage = _damageLevels select 1; + + // Check if the damage is higher as the min damage for the specific injury + if (_damage >= _minDamage && {_damage <= _maxDamage || _maxDamage < 0}) then { + //_classType = _x select 0; + _selections = _x select 1; + //_bloodLoss = _x select 2; + //_pain = _x select 3; + + // Check if the injury can be applied to the given selection name + if ("All" in _selections || _selectionName in _selections) then { + + // Find the wound which has the highest minimal damage, so we can use this later on for adding the correct injuries + if (_minDamage > _highestPossibleDamage) then { + _highestPossibleSpot = _foreachIndex; + _highestPossibleDamage = _minDamage; + }; + + // Store the valid possible injury for the damage type, damage amount and selection + _allPossibleInjuries pushback _x; + }; + }; +}foreach _allInjuriesForDamageType; + +// No possible wounds available for this damage type or damage amount. +if (_highestPossibleSpot < 0) exitwith {}; + +// Administration for open wounds and ids +_openWounds = _unit getvariable[QGVAR(openWounds), []]; +_woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1]; + +_painToAdd = 0; +_woundsCreated = []; +{ + if (_x select 0 <= _damage) exitwith { + for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do { + + // Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage] + _toAddInjury = if (random(1) >= 0.85) then {_allInjuriesForDamageType select _highestPossibleSpot} else {_allPossibleInjuries select (floor(random (count _allPossibleInjuries)));}; + _toAddClassID = _toAddInjury select 0; + _foundIndex = -1; + + _bodyPartNToAdd = if (_injuryTypeInfo select 1) then {_bodyPartn} else {floor(random(6))}; + // If the injury type is selection part specific, we will check if one of those injury types already exists and find the spot for it.. + if ((_injuryTypeInfo select 1)) then { + { + // Check if we have an id of the given class on the given bodypart already + if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitwith { + _foundIndex = _foreachIndex; + }; + }foreach _openWounds; + }; + + _injury = []; + if (_foundIndex < 0) then { + // Create a new injury. Format [ID, classID, bodypart, percentage treated, bloodloss rate] + _injury = [_woundID, _toAddInjury select 0, _bodyPartNToAdd, 1, _toAddInjury select 2]; + + // Since it is a new injury, we will have to add it to the open wounds array to store it + _openWounds pushback _injury; + + // New injuries will also increase the wound ID + _woundID = _woundID + 1; + } else { + // We already have one of these, so we are just going to increase the number that we have of it with a new one. + _injury = _openWounds select _foundIndex; + _injury set [3, (_injury select 3) + 1]; + }; + // Store the injury so we can process it later correctly. + _woundsCreated pushback _injury; + + // Collect the pain that is caused by this injury + _painToAdd = _painToAdd + (_toAddInjury select 3); + }; + }; +}foreach (_injuryTypeInfo select 0); // foreach damage thresholds + +_unit setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; + +// Only update if new wounds have been created +if (count _woundsCreated > 0) then { +// _unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true]; +}; + +if (USE_WOUND_EVENT_SYNC) then { + // Broadcast the new injuries across the net in parts. One broadcast per injury. Prevents having to broadcast one massive array of injuries. + { + // ["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent); + }foreach _woundsCreated; +}; + +_painLevel = _unit getvariable [QGVAR(pain), 0]; +_unit setvariable [QGVAR(pain), _painLevel + _painToAdd]; diff --git a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf index cf884e0ab0..5263044583 100644 --- a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf @@ -33,3 +33,5 @@ if !(_activated) exitWith {}; [_logic, QGVAR(consumeItem_SurgicalKit), "consumeItem_SurgicalKit"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(useLocation_PAK), "useLocation_PAK"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(useLocation_SurgicalKit), "useLocation_SurgicalKit"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(healHitPointAfterAdvBandage), "healHitPointAfterAdvBandage"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(painIsOnlySuppressed), "painIsOnlySuppressed"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical/functions/fnc_moduleMedicalSettings.sqf b/addons/medical/functions/fnc_moduleMedicalSettings.sqf index 296b4f1d56..00b7a15fcf 100644 --- a/addons/medical/functions/fnc_moduleMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleMedicalSettings.sqf @@ -30,6 +30,7 @@ if !(_activated) exitWith {}; [_logic, QGVAR(playerDamageThreshold), "playerDamageThreshold"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(AIDamageThreshold), "AIDamageThreshold"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(enableUnconsciousnessAI), "enableUnconsciousnessAI"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(remoteControlledAI), "remoteControlledAI"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(preventInstaDeath), "preventInstaDeath"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(painCoefficient), "painCoefficient"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 0ff6eaccd4..c33d83bb40 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -21,7 +21,7 @@ if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitwith {}; _unit setvariable [QGVAR(inCardiacArrest), true,true]; _unit setvariable [QGVAR(heartRate), 0]; -["Medical_onEnteredCardiacArrest", [_unit]] call ace_common_fnc_localEvent; +["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent); [_unit, true] call FUNC(setUnconscious); _timeInCardiacArrest = 120 + round(random(600)); diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 6cf82b32bd..fe18ac581f 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -74,5 +74,8 @@ _unit setvariable ["ACE_isDead", true, true]; if (isPLayer _unit) then { _unit setvariable ["isDeadPlayer", true, true]; }; + +["medical_onSetDead", [_unit]] call EFUNC(common,localEvent); + _unit setdamage 1; true; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 28ee530797..3298c0a869 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -17,7 +17,7 @@ #define DEFAULT_DELAY (round(random(10)+5)) -private ["_unit", "_set", "_animState", "_originalPos", "_startingTime","_minWaitingTime", "_force"]; +private ["_unit", "_set", "_animState", "_originalPos", "_startingTime","_minWaitingTime", "_force", "_isDead"]; _unit = _this select 0; _set = if (count _this > 1) then {_this select 1} else {true}; _minWaitingTime = if (count _this > 2) then {_this select 2} else {DEFAULT_DELAY}; @@ -47,12 +47,15 @@ if (_unit == ACE_player) then { }; // if we have unconsciousness for AI disabled, we will kill the unit instead -if (!([_unit] call EFUNC(common,isPlayer)) && !_force) then { +_isDead = false; +if (!([_unit, GVAR(remoteControlledAI)] call EFUNC(common,isPlayer)) && !_force) then { _enableUncon = _unit getVariable [QGVAR(enableUnconsciousnessAI), GVAR(enableUnconsciousnessAI)]; - if (_enableUncon == 0 or {_enableUncon == 1 and (random 1) < 0.5}) exitWith { + if (_enableUncon == 0 or {_enableUncon == 1 and (random 1) < 0.5}) then { [_unit, true] call FUNC(setDead); + _isDead = true; }; }; +if (_isDead) exitWith {}; // If a unit has the launcher out, it will sometimes start selecting the primairy weapon while unconscious, // therefor we force it to select the primairy weapon before going unconscious diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf new file mode 100644 index 0000000000..108bdd4a5d --- /dev/null +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf @@ -0,0 +1,26 @@ +/* + * Author: Ruthberg + * Calculates the personal aid kit treatment time based on amount of damage to heal + * + * Arguments: + * unit + * + * Return Value: + * treatment time + * + * Example: + * [_target] call ace_medical_fnc_treatmentAdvanced_fullHealTreatmentTime + * + * Public: No + */ +#include "script_component.hpp" + +private ["_target", "_totalDamage"]; +_target = _this; +_totalDamage = 0; + +{ + _totalDamage = _totalDamage + _x; +} forEach (_target getVariable [QGVAR(bodyPartStatus), []]); + +(10 max (_totalDamage * 10) min 120) diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index 4936d0e412..c4ba840398 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -60,21 +60,25 @@ _heartRate = _target getvariable [QGVAR(heartRate), 70]; if (alive _target) then { if (_heartRate > 0) then { if (_heartRate <= 45) then { - [_target, ((_hrIncreaseLow select 0) + random((_hrIncreaseLow select 1))), (_hrIncreaseLow select 2), _hrCallback] call FUNC(addHeartRateAdjustment); + [_target, ((_hrIncreaseLow select 0) + random ((_hrIncreaseLow select 1) - (_hrIncreaseLow select 0))), (_hrIncreaseLow select 2), _hrCallback] call FUNC(addHeartRateAdjustment); } else { if (_heartRate > 120) then { - [_target, ((_hrIncreaseHigh select 0) + random((_hrIncreaseHigh select 1))), (_hrIncreaseHigh select 2), _hrCallback] call FUNC(addHeartRateAdjustment); + [_target, ((_hrIncreaseHigh select 0) + random ((_hrIncreaseHigh select 1) - (_hrIncreaseHigh select 0))), (_hrIncreaseHigh select 2), _hrCallback] call FUNC(addHeartRateAdjustment); } else { - [_target, ((_hrIncreaseNorm select 0) + random((_hrIncreaseNorm select 1))), (_hrIncreaseNorm select 2), _hrCallback] call FUNC(addHeartRateAdjustment); + [_target, ((_hrIncreaseNorm select 0) + random ((_hrIncreaseNorm select 1) - (_hrIncreaseNorm select 0))), (_hrIncreaseNorm select 2), _hrCallback] call FUNC(addHeartRateAdjustment); }; }; }; }; if (_painReduce > 0) then { - // Reduce the pain level + // Reduce pain _painSuppress = _target getvariable [QGVAR(painSuppress), 0]; _target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0]; + if (!GVAR(painIsOnlySuppressed)) then { + _pain = _target getvariable [QGVAR(pain), 0]; + _target setvariable [QGVAR(pain), (_pain - _painReduce) max 0, true]; + }; }; _resistance = _target getvariable [QGVAR(peripheralResistance), 100]; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index 89330377c6..5b1ca04d2d 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -30,6 +30,10 @@ _hasMovedOut = _args select 4; _parachuteCheck = _args select 5; if (!alive _unit) exitwith { + if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { + TRACE_1("Removing fake weapon [on death]",_unit); + _unit removeWeapon "ACE_FakePrimaryWeapon"; + }; if (GVAR(moveUnitsFromGroupOnUnconscious)) then { [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); }; @@ -49,6 +53,11 @@ if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith { // TODO, handle this with carry instead, so we can remove the PFH here. // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then { + if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { + TRACE_1("Removing fake weapon [on wakeup]",_unit); + _unit removeWeapon "ACE_FakePrimaryWeapon"; + }; + if (vehicle _unit == _unit) then { if (animationState _unit == "AinjPpneMstpSnonWrflDnon") then { [_unit,"AinjPpneMstpSnonWrflDnon_rolltofront", 2] call EFUNC(common,doAnimation); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index b866afe0b6..6fa58bb759 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1585,6 +1585,14 @@ %1 zkontroloval srdeční tep: %2 %1 verificou a frequência cardíaca: %2 + + None + Нет + Żadna + Nada + Keine + Žádný + Weak Schwach @@ -2197,6 +2205,20 @@ Pravá noha Perna Direita + + Bandaging removes bloodstains + Bandagieren entfernt Blutflecken + Bandażowanie usuwa ślady krwi + Obvázání odstraňuje skvrny od krve + El vendaje elimina las manchas de sangre + + + Pain is only temporarily suppressed + Schmerzen werden nur vorübergehend unterdrückt + Ból jest tymczasowo zwalczany + Bolest je potlačena pouze dočasně + El dolor se suprime solo temporalmente + Pain Effect Type Schmerzeffekt-Typ @@ -2703,547 +2725,765 @@ ACE Medical + ACE: медицина ACE Opcje medyczne Médico ACE ACE-Medicsystem + ACE Zdravotnické Medical Settings [ACE] + Настройки медицины [ACE] Ustawienia medyczne [ACE] Ajustes médicos [ACE] Medizinische Einstellungen [ACE] + Lékařské nastavení [ACE] Medical Level + Сложность медицины Poziom medyczny Nivel médico Medizinisches Level + Úroveň medického What is the medical simulation level? + Каков уровень сложности медицинской системы? Jaki jest poziom symulacji medycznej? ¿Cuál es el nivel de simulación médica? Wie hoch soll das medizinische Simulationslevel sein? + Jaká je úroveň lékařské simulace? Basic + Базовый Podstawowy Básico Standard + Základní Advanced + Усложненный Zaawansowany Avanzado Erweitert + Pokročilé Medics setting + Настройки медиков Poziom medyków Configuración médica Medizinische Einstellungen + Úroveň zdravotníků What is the level of detail prefered for medics? + Каков уровень подробностей для медиков? Jaki jest poziom detali medycznych wyświetlanych dla medyków? ¿Cuál es el nivel de detalle preferido para los médicos? + Jaká úroveň detailů je preferována pro zdravotníky? Disable medics + Отключить медиков Wyłącz medyków Desactivar médicos Sanitäter deaktivieren + Zakázat zdravotníky Enable Litter + Включить мусор Aktywuj odpadki Activar restos médicos Abfälle aktivieren + Povolit odpadky Enable litter being created upon treatment + Включить появление мусора после лечения Twórz odpadki medyczne podczas leczenia Activar los restos médicos que se crean en el tratamiento Aktiviere Abfälle, wenn eine Behandlung durchgeführt wurde + Vytváří odpad zdravotnického materiálu pří léčení Life time of litter objects + Время удаления мусора Długość życia odpadków Tiempo de vida de los restos médicos Dauer des angezeigten Abfalls + Životnost pro odpadky How long should litter objects stay? In seconds. -1 is forever. + Как долго мусор будет оставаться на земле? В секундах. -1 означает бесконечное время. Ile czasu musi upłynąć, aby odpadki zaczęły znikać? W sekundach. -1 dla nieskończoności. ¿Por cuánto tiempo deben permanecer los restos médicos? En segundos. -1 es para siempre. Wie lange sollen Abfälle am Boden liegen (in Sekunden)? -1 ist für immer. + Za jak dlouho začnou odpadky mizet? V sekundách. -1 navždy. Enable Screams + Включить крики Aktywuj wrzaski Activar gritos Schreie aktivieren + Povolit křik Enable screaming by injuried units + Включить крики раненных бойцов Aktywuj wrzeszczenie z bólu przez ranne jednostki Activar gritos para unidades heridas Aktiviere Schreie bei verletzten Einheiten + Povolit křičení zraněných jednotek Player Damage + Урон игроку Próg obrażeń graczy Daño de jugador Spielerschaden + Poškození hráče What is the damage a player can take before being killed? + Какой уровень урона необходим, чтобы убить игрока? Jaki jest próg obrażeń, jakie gracz może otrzymać zanim zostanie zabity? ¿Cuál es el daño que un jugador puede sufrir antes de morir? Wie viel Schaden kann ein Spieler erleiden, bevor er getötet wird? + Jaké poškození může hráč dostat než bude zabit? AI Damage + Урон ботам Próg obrażeń AI Daño IA KI-Schaden + Poškození AI What is the damage an AI can take before being killed? + Какой уровень урона необходим, чтобы убить бота? Jaki jest próg obrażeń, jakie AI może otrzymać zanim zostanie zabite? ¿Cuál es el daño que la IA puede sufrir antes de morir? Wie viel Schaden kann eine KI erleiden, bis sie getötet wird? + Jaké poškození může AI dostat než bude zabito? AI Unconsciousness + Потеря сознания ботами Nieprzytomność AI Inconsciencia IA KI-Bewusstlosigkeit + Bezvědomí AI Allow AI to go unconscious + Позволить ботам терять сознание Czy AI może być nieprzytomne od odniesionych obrażeń? Permita a la IA caer inconsciente KI kann bewusstlos werden + Umožňuje AI upadnout do bezvědomí + + + Remote Controlled AI + IA controlada remotamente + + + Treat remote controlled units as AI not players? + ¿Tratar unidades remotamente controladas como IA? Disabled + Отключено Wyłączone Activado Deaktiviert + Zakázáno Enabled + Включено Włączone Desactivado Aktiviert + Povoleno Prevent instant death + Отключить мгновенную смерть Wył. natychmiast. śmierć Prevenir muerte instantánea Verhindere direkten Tod + Zabránit okamžité smrti Have a unit move to unconscious instead of death + Бойцы теряют сознание вместо того, чтобы умирать Spraw, aby jednostka została przeniesiona do stanu nieprzytomności zamiast ginąć na miejscu od śmiertelnych obrażeń Mover una unidad a inconsciente en vez de a muerta Lässt eine Einheit bewusstlos werden anstatt zu sterben + Jednotka upadne do bezvědomí namísto smrti Bleeding coefficient + Коэффициент потери крови Mnożnik krwawienia Coeficiente de sangrado Verblutungsmultiplikator + Koeficient krvácení Coefficient to modify the bleeding speed + Коэффициент, изменяющий скорость кровопотери Mnożnik modyfikujący prędkość wykrwawiania się Coeficiente para modificar la velocidad de sangrado Multiplikator um die Verblutungsgeschwindigkeit zu verändern + Koeficient rychlosti krvácení Pain coefficient + Коэффициент боли Mnożnik bólu Coeficiente de dolor Schmerzmultiplikator + Koeficient bolesti Coefficient to modify the pain intensity + Коэффициент, изменяющий уровень боли Mnożnik modyfikujący intensywność bólu Coeficiente para modificar la intensidad del dolor Multiplikator um den Schmerzintensität zu verändern + Koeficient intenzity bolesti Sync status + Синхронизация статуса Synchronizuj status Sincronizador estado Status synchronisieren + Synchronizovat status Keep unit status synced. Recommended on. + Синхронизировать статус юнитов. Рекомендуется включить. Utrzymuj synchronizację statusu jednostek. Zalecane zostawienie tej opcji włączonej. Mantener el estado de la unidad sincronizado. Recomendado activado Status der Einheit synchron halten. Sollte aktiviert bleiben. + Udržuje status jednotky synchronizovaný. Doporučeno zapnout. Provides a medical system for both players and AI. + Включает медицинскую систему как для игроков, так и для ботов. Moduł ten dostarcza system medyczny dla graczy oraz AI. Proporciona un sistema médico para jugadores e IA. Aktiviert ein medizinisches System für Spieler und KI. + Poskytuje zdravotní systém pro hráče a AI. - + Advanced Medical Settings [ACE] + Настройки усложненной медицины [ACE] Zaawansowane ustawienia medyczne [ACE] Ajustes médicos avanzados [ACE] Erweiterte medizinische Einstellungen [ACE] + Pokročilé zdravotnické nastavení [ACE] - + Enabled for + Включено для Aktywne dla Hablitado para Aktiviert für + Povoleno pro - + Select what units the advanced medical system will be enabled for + Выберите, на кого будет распространяться усложненная система медицины Wybierz dla kogo zaawansowany system medyczny będzie aktywny Seleccione para qué unidades será habilitado el sistema médico avanzado Wähle aus welche Einheiten das erweiterte medizinische System haben + Vyberte, pro jaké jednotky bude pokročilý zdravotní systém povolen Players only + Игроков Tylko dla graczy Solo jugadores Nur Spieler + Pouze hráči Players and AI + Игроков и ботов Gracze oraz AI Jugadors e IA Spieler und KI + Hráči a AI Enable Advanced wounds + Включить усложненные ранения Akt. zaawansowane rany Activa heridas avanzadas Aktiviere erweiterte Wunden + Povolit pokročilé zranění Allow reopening of bandaged wounds? + Будут ли открываться уже перевязанные раны? Pozwól na otwieranie się zabandażowanych ran? Permitir la reapertura de las heridas vendadas? Erlaube das Öffnen von bandagierten Wunden? + Umožnit znovuotevření zavázané rány? Vehicle Crashes + Аварии транспорта Obrażenia od kolizji Accidentes de vehículos Fahrzeugunfälle + Poškození z kolize Do units take damage from a vehicle crash? + Должны ли юниты получать повреждения от аварий на транспорте? Czy jednostki otrzymują obrażenia w wyniku kolizji pojazdów? ¿Las unidades reciben daño de un accidente de tráfico? Bekommen Einheiten von Fahrzeugunfällen Schaden? + Dostane jednotka poškození při autonehodě? Allow PAK + Использование аптечки Ust. apteczek osobistych Permitir EPA Erlaube Erstehilfekasten + Povolit osobní lékárničky Who can use the PAK for full heal? + Кому разрешено выполнять полное лечение с помощью аптечки? Kto może skorzystać z apteczki osobistej w celu pełnego uleczenia? ¿Quién puede utilizar el EPA para una cura completa? Wer kann den Erstehilfekasten für eine Endheilung verwenden? + Kdo může použít osobní lékárničku pro plné vyléčení? Anyone + Кем угодно Wszyscy Nadie Jeder + Kdokoliv Medics only + Только медиками Tylko medycy Solo médicos Nur Sanitäter + Pouze zdravotník Doctors only + Только врачами Tylko doktorzy Solo doctores Nur Ärzte + Pouze doktor Remove PAK on use + Удалять аптечки после использования Usuń apteczkę po użyciu Eliminar EPA después del uso Entferne Erstehilfekasten bei Verwendung + Odebrat osobní lékárničku po použití Should PAK be removed on usage? + Нужно ли удалять аптечки после использования? Czy apteczka osobista powinna zniknąć z ekwipunku po jej użyciu? El EPA será eliminado después de usarlo Sollen Erstehilfekästen bei Verwendung entfernt werden? + Má se osobní lékárnička odstranit po použití? Locations PAK + Место использования аптечки Ogr. apteczek osobistych Ubicacions del EPA Orte für Erstehilfekasten + Lokace osobní lékárničky Where can the personal aid kit be used? + Где может использоваться аптечка? Gdzie można korzystać z apteczek osobistych? ¿Dónde se puede utilizar el equipo de primeros auxilios? Wo kann der Erstehilfekasten verwendet werden? + Kde může být osobní lékárnička použita? Anywhere + Где угодно Wszędzie Donde sea Überall + Kdekoliv Medical vehicles + В медицинском транспорте Pojazdy medyczne Vehiculos médicos Medizinische Fahrzeuge + Zdravotnická vozidla Medical facility + В госпитале Budynki medyczne Centro médico Medizinische Einrichtungen + Zdravotnické zařízení Vehicles & facility + В транспорте и госпитале Pojazdy i budynki medyczne Vehículos y centros Fahrzeuge & Einrichtungen + Vozidla a zařízení Disabled + Отключено Wyłączone Desactivado Deaktiviert + Zakázáno Allow Surgical kit (Adv) + Разрешить хирургический набор (усл.) Ust. zestawu chirurg. Permitir equipo quirúrgico (Avanzado) Erlaube Operationskasten + Povolit chirurgickou soupravu (Pokr.) Who can use the surgical kit? + Кто может использовать хирургический набор? Kto może skorzystać z zestawu chirurgicznego w celu zszycia ran? ¿Quién puede utilizar el equipo quirúrgico? Wer kann den Operationskasten verwenden? + Kdo může použít chirurgickou soupravu? Remove Surgical kit (Adv) + Удалять хирургический набор (усл.) Usuń zest. chir. po użyciu Eliminar equipo quirúrgico (Avanzado) Enrtferne Operationskasten (erweitert) + Odebrat chirurgickou soupravu (Pokr.) Should Surgical kit be removed on usage? + Нужно ли удалять хирургический набор после использования? Czy zestaw chirurgiczny powinien zniknąć z ekwipunku po jego użyciu? Eliminar el equipo quirúrgico después del uso Entferne Operationskästen bei Verwendung? + Odebrat chirurgickou soupravu po použití? Locations Surgical kit (Adv) + Место использования хирургического набора (усл.) Ogr. zestawu chirurg. Ubicaciones del equipo quirúrgico (Avanzado) Orte für Operationskästen (erweitert) + Lokace chirurgické soupravy (Pokr.) Where can the Surgical kit be used? + Где может использоваться хирургический набор? Gdzie można korzystać z zestawu chirurgicznego? Dónde se puede utilizar el equipo quirúrgico Wo kann der Operationskasten verwendet werden? + Kde může být použita chirurgická souprava? + + + Bloodstains + Blutflecken + Plamy krwi + Skvrny od krve + Manchas de sangre + + + Bandaging removes bloodstains + Bandagieren entfernt Blutflecken + Bandażowanie usuwa ślady krwi + Obvázání odstraňuje skvrny od krve + El vendaje elimina las manchas de sangre + + + Pain suppression + Schmerzunterdrückung + Zwalczanie bólu + Potlačení bolesti + Supresión del dolor + + + Pain is only temporarily suppressed, not removed + Schmerzen werden nur vorübergehend unterdrückt, nicht entfernt + Ból jest tylko tymczasowo zwalczany, nie jest usuwany trwale + Bolest je potlačena, ale jen dočastně + El dolor se suprime solo temporalmente, no se elimina. Configure the treatment settings from ACE Medical + Настройка лечения в медицинской системе ACE Skonfiguruj zaawansowane ustawienia leczenia systemu medycznego ACE Configure las opciones de tratamiento del ACE Médico Behandlungseinstellungen vom ACE-Medical konfigurieren + Konfigurace nastavení léčby ze zdravotnické systému ACE Revive Settings [ACE] + Настройки реанимации [ACE] Ustawienia wskrzeszania [ACE] Sistema de resucitado [ACE] Wiederbelebungseinstellungen [ACE] + Nastavení oživení [ACE] Enable Revive + Включить реанимацию Aktywuj wskrzeszanie Habilitar resucitado Erlaube Wiederbelebung + Povolit oživení Enable a basic revive system + Включить базовую систему реанимации Aktywuj podstawowy system wskrzeszania Habilitar un sistema básico de resucitado Aktiviere Standard-Wiederbelebungssystem + Povolit základní systém oživení Max Revive time + Макс. время реанимации Maks. czas agonii Tiempo máximo de resucitado Maximale Wiederbelebungszeit + Maximální čas pro oživení Max amount of seconds a unit can spend in revive state + Максимальное время в секундах, в течение которого бойца можно реанимировать Maksymalna długość agonii w sekundach (czas na wskrzeszenie) Cantidad máxima de segundos que una unidad puede gastar en estado de resucitación Maximale Zeitspanne in Sekunden die eine Einheit im Wiederbelebungszustand verbringen kann + Maximální doba v agónii v sekundách Max Revive lives + Макс. кол-во жизней Maks. ilość wskrzeszeń Vidas máximas de resucitado Maximale Leben bei Wiederbelebung + Maximální počet oživení Max amount of lives a unit. 0 or -1 is disabled. + Максимальное количество жизней у бойца. Чтобы отключить, укажите 0 или -1. Maksymalna ilość wskrzeszeń. Wpisz 0 lub -1 aby wyłączyć. Cantidad máxima de vidas por unidad. 0 o -1 es desactivado. Maximale Anzahl von Leben einer Einheit. 0 or -1 bedeutet deaktiviert. + Maximální počet životu pro jednotku. 0 nebo -1 je zakázáno. Provides a medical system for both players and AI. + Включает медицинскую систему как для игроков, так и для ботов. Moduł ten aktywuje podstawowy system wskrzeszania. Jednostka po otrzymaniu śmiertelnych obrażeń przechodzi do stanu agonii, która trwa określoną długość czasu. W tym czasie aby wskrzesić i jednocześnie odratować jednostkę należy opatrzeć jej rany i wykonać RKO. Proporciona un sistema médico para jugadores e IA. Aktiviert das Medicsystem für Spieler und KI. + Poskytuje zdravotní systém pro hráče a AI. Set Medic Class [ACE] + Сделать медиком [ACE] Ustaw klasę medyka [ACE] Establecer case médica [ACE] Setze Sanitäterklassen [ACE] + Určit třídu medika [ACE] List + Список Lista Lista Liste + Seznam List of unit names that will be classified as medic, separated by commas. + Список имен юнитов, которые будут считаться медиками (через запятую). Lista nazw jednostek, które są sklasyfikowane jako medycy, oddzielone przecinkami. Lista de los nombres de las unidades que se clasifican como médico, separados por comas. Liste von Namen, die als Sanitäter verwendet werden. Wird durch Kommas getrennt. + Seznam osob které budou klasifikovány jako zdravotník, oddělené čárkami. Is Medic + Является медиком Klasa medyczna Es médico Ist Sanitäter + Je zdravotník + Dieses Modul legt fest welche Einheit ein Sanitäter ist. + Tento modul určuje, která jednotka je zdravotník. None + Нет Żadna Nada Keine + Žádný Regular medic + Обычный медик Zwykły medyk Médico regular Normaler Sanitäter + Řadový zdravotník Doctor (Only Advanced Medics) + Врач (только усложн.) Doktor (tylko zaawansowani medycy) Doctor (Solo medicina avanzada) Arzt (nur erweiterte Sanitäter) + Doktor (Pouze pokročilý zdravotníci) Assigns the ACE medic class to a unit + Задает юниту класс медика Moduł ten przypisuje klasę medyka ACE do jednostek. Asigna la clase médico ACE a una unidad Weise die ACE-Sanitäterklasse einer Einheit zu + Přiřadí ACE třídu zdravotníka do jednotky Set Medical Vehicle [ACE] + Сделать мед. транспортом [ACE] Ustaw pojazd medyczny [ACE] Establecer vehículos médicos [ACE] Setze medizinisches Fahrzeug [ACE] + Určit zdravotnické vozidlo [ACE] List + Список Lista Lista Liste + Seznam List of vehicles that will be classified as medical vehicle, separated by commas. + Список транспортных средств, которые будут считаться медицинским транспортом (через запятую). Lista nazw pojazdów, które są sklasyfikowane jako pojazdy medyczne, oddzielone przecinkami. Lista de los vehículos que se clasifican como vehículo médicos, separados por comas. Liste ovn Fahrzeugen, die als medizinische Fahrzeuge verwendet werden. Wird durch Kommas getrennt. + Seznam vozidel které budou klasifikovány jako zdravotnická vozidla, oddělené čárkami. Is Medical Vehicle + Является мед. транспортом Jest pojazdem med. Es vehículo médico Ist medizinisches Fahrzeug + Je zdravotnické vozidlo Whatever or not the objects in the list will be a medical vehicle. + Будут ли объекты в списке считаться медицинским транспортом. Czy pojazdy z tej listy są pojazdami medycznymi. Cualquiera de la lista o fuera de ella será un vehículo médico. Leg fest ob das Objekt in der Liste ein medizinisches Fahrzeug ist. + Ať už jsou nebo nejsou objekty v seznamu budou zdravotnická vozidla. Assigns the ACE medic class to a unit + Задает юниту класс медика Moduł ten pozwala na przypisanie danym pojazdom statusu pojazdów medycznych. Wewnątrz takiego pojazdu można wykonywać zaawansowane zabiegi medyczne. Asigna la clase médico ACE a una unidad Weist die ACE-Sanitäterklasse einer Einheit zu + Přiřadí ACE třídu zdravotníka do jednotky Set Medical Facility [ACE] + Сделать госпиталем [ACE] Ustaw budynek medyczny [ACE] Establece el centro médico [ACE] Setze medizinische Einrichtung [ACE] + Určit zdravotnické zařízení [ACE] Is Medical Facility + Является госпиталем Jest budynkiem med. Es centro médico Ist eine medizinische Einrichtung + Je zdravotnické zařízení Registers an object as a medical facility + Определяет объект в качестве госпиталя Przypisuje danemu obiektowi status budynku medycznego Registra un objeto como un centro médico Definiert ein Objekt als medizinische Einrichtung + Registruje objekt jako zdravotnické zařízení Defines an object as a medical facility. This allows for more advanced treatments. Can be used on buildings and vehicles. + Определяет объект в качестве госпиталя. Позволяет оказывать более сложную помощь. Может применяться к зданиям и технике. Moduł ten pozwala przypisać status budynku medycznego danemu obiektowi. Budynek taki pozwala na wykonywanie zaawansowanych zabiegów medycznych. Może być użyte na pojazdach i budynkach. Define un objeto como un centro médico. Esto permite tratamientos más avanzados. Se puede utilizar en edificios y vehículos. Definiert ein Objekt als medizinische Einrichtung. Das ermöglicht weitere Behandlungen. Kann bei Gebäuden und Fahrzeugen verwendet werden. + Definuje objekt jako zdravotnické zařízení. To umožňuje více pokročilé léčení. Může být použito na budovy nebo na vozidla. [ACE] Medical Supply Crate (Basic) + [ACE] Ящик с медикаментами (базовая медицина) [ACE] Skrzynka z zapasami medycznymi (podstawowa) [ACE] Caja de suministros médicos (Básica) [ACE] Medizinische Kiste (standard) + [ACE] Zdravotnické zásoby (základní) [ACE] Medical Supply Crate (Advanced) + [ACE] Ящик с медикаментами (усложн. медицина) [ACE] Skrzynka z zapasami medycznymi (zaawansowana) [ACE] Caja de suministros médicos (Avanzada) [ACE] Medizinische Kiste (erweitert) + [ACE] Zdravotnické zásoby (pokročilé) Yes @@ -3270,4 +3510,4 @@ No - + \ No newline at end of file diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp index 332bfada27..f8b0b21a71 100644 --- a/addons/medical/ui/triagecard.hpp +++ b/addons/medical/ui/triagecard.hpp @@ -103,7 +103,7 @@ class GVAR(triageCard) { y = 0; w = 0; h = 0; - text = $STR_ACE_Medical_Triage_Status_None; + text = CSTRING(Triage_Status_None); style = 0x02; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; @@ -121,7 +121,7 @@ class GVAR(triageCard) { y = 0; w = 0; h = 0; - text = $STR_ACE_Medical_Triage_Status_Minor; + text = CSTRING(Triage_Status_Minor); style = 0x02; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; @@ -139,7 +139,7 @@ class GVAR(triageCard) { y = 0; w = 0; h = 0; - text = $STR_ACE_Medical_Triage_Status_Delayed; + text = CSTRING(Triage_Status_Delayed); style = 0x02; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; @@ -157,7 +157,7 @@ class GVAR(triageCard) { y = 0; w = 0; h = 0; - text = $STR_ACE_Medical_Triage_Status_Immediate; + text = CSTRING(Triage_Status_Immediate); style = 0x02; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; @@ -175,7 +175,7 @@ class GVAR(triageCard) { y = 0; w = 0; h = 0; - text = $STR_ACE_Medical_Triage_Status_Deceased; + text = CSTRING(Triage_Status_Deceased); style = 0x02; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp index d07903dbc1..49f7a0e65c 100644 --- a/addons/microdagr/CfgVehicles.hpp +++ b/addons/microdagr/CfgVehicles.hpp @@ -3,34 +3,28 @@ class CfgVehicles { class CAManBase: Man { class ACE_SelfActions { class ACE_Equipment { - class GVAR(show) { - //Opens the mini map - displayName = CSTRING(show); - condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY}); - statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay)); - showDisabled = 0; - priority = 0.2; - icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); - exceptions[] = {"notOnMap", "isNotInside"}; - }; class GVAR(configure) { //Opens the dialog displayName = CSTRING(configure); condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG}); statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay)); - showDisabled = 0; - priority = 0.1; icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); - exceptions[] = {"notOnMap", "isNotInside"}; - }; - class GVAR(close) { - displayName = CSTRING(closeUnit); - condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED); - statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay)); - showDisabled = 0; - priority = 0.3; - icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); - exceptions[] = {"notOnMap", "isNotInside"}; + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + class GVAR(show) { + //Opens the mini map + displayName = CSTRING(show); + condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY}); + statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay)); + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + }; + class GVAR(close) { + displayName = CSTRING(closeUnit); + condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED); + statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay)); + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; + }; }; }; }; diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index 3b77a6bc33..2d33969b56 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -3,33 +3,21 @@ if (!hasInterface) exitWith {}; -//Add Keybinds: -["ACE3 Equipment", QGVAR(openGPS), (localize LSTRING(toggleUnit)), -{ - // canInteractWith (can use on map) - if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!("ACE_microDAGR" in (items ace_player))) exitWith {false}; - +//Add deviceKey entry: +private ["_conditonCode", "_toggleCode", "_closeCode"]; +_conditonCode = { + ("ACE_microDAGR" in (items ACE_player)) +}; +_toggleCode = { + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {}; [] call FUNC(openDisplay); //toggle display mode - true; -}, -{false}, -[0xC7, [false, false, false]], false] call cba_fnc_addKeybind; //Home Key +}; +_closeCode = { + if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {}; + [DISPLAY_MODE_CLOSED] call FUNC(openDisplay); +}; +[(localize LSTRING(itemName)), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); -["ACE3 Equipment", QGVAR(closeGPS), (localize LSTRING(closeUnit)), -{ - // canInteractWith (can use on map) - if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if (!("ACE_microDAGR" in (items ace_player))) exitWith {false}; - if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {false}; - - [DISPLAY_MODE_CLOSED] call FUNC(openDisplay); //close unit - true; -}, -{false}, -[0xC7, [false, true, false]], false] call cba_fnc_addKeybind; //CTRL + Home Key //Add Eventhandler: ["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler); diff --git a/addons/microdagr/functions/fnc_canShow.sqf b/addons/microdagr/functions/fnc_canShow.sqf index b251a65c10..9e54f927e0 100644 --- a/addons/microdagr/functions/fnc_canShow.sqf +++ b/addons/microdagr/functions/fnc_canShow.sqf @@ -26,11 +26,11 @@ case (DISPLAY_MODE_CLOSED): {_returnValue = true}; //Can always close case (DISPLAY_MODE_HIDDEN): {_returnValue = true}; //Can always hide case (DISPLAY_MODE_DIALOG): { - _returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)}; + _returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}; }; case (DISPLAY_MODE_DISPLAY): { //Can't have minimap up while zoomed in - _returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)}; + _returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}; }; }; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf index 5ab054732c..3c042fdff3 100644 --- a/addons/microdagr/functions/fnc_showApplicationPage.sqf +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_display", "_daylight", "_theMap", "_mapSize"]; +private ["_display", "_theMap", "_mapSize"]; disableSerialization; @@ -27,10 +27,6 @@ if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { }; if (isNull _display) exitWith {ERROR("No Display");}; -//Fade "shell" at night -_daylight = 0.05 max (((1 - overcast)/2 + ((1 - cos (daytime * 360/24)) / 4)) * (linearConversion [0, 1, sunOrMoon, (0.25 * moonIntensity), 1])); -(_display displayCtrl IDC_MICRODAGRSHELL) ctrlSetTextColor [_daylight, _daylight, _daylight, 1]; - //TopBar (_display displayCtrl IDC_RANGEFINDERCONNECTEDICON) ctrlShow (GVAR(currentWaypoint) == -2); diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index aa3a7c9379..7e2a1ad53e 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString"]; +private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString", "_daylight"]; disableSerialization; _display = displayNull; @@ -26,6 +26,10 @@ if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { }; if (isNull _display) exitWith {ERROR("No Display");}; +//Fade "shell" at night +_daylight = [] call EFUNC(common,ambientBrightness); +(_display displayCtrl IDC_MICRODAGRSHELL) ctrlSetTextColor [_daylight, _daylight, _daylight, 1]; + (_display displayCtrl IDC_CLOCKTEXT) ctrlSetText ([daytime, "HH:MM"] call bis_fnc_timeToString); _waypoints = [] call FUNC(deviceGetWaypoints); diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index a13e8d5541..4a933fc993 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -270,7 +270,7 @@ Zeige MicroDAGR Mostrar MicroDAGR Показать MicroDAGR - Ukázat MicroDAGR GPS + Ukázat MicroDAGR Pokaż MicroDAGR Afficher MicroDAGR MicroDAGR mutatása @@ -282,7 +282,7 @@ Konfiguriere MicroDAGR Configurar MicroDAGR Настроить MicroDAGR - Konfigurovat MicroDAGR GPS + Konfigurovat MicroDAGR Konfiguruj MicroDAGR Configurer MicroDAGR MicroDAGR konfigurálása @@ -294,7 +294,7 @@ Schließe MicroDAGR Cerrar MicroDAGR Закрыть MicroDAGR - Zavřít MicroDAGR GPS + Zavřít MicroDAGR Zamknij MicroDAGR Fermer MicroDAGR MicroDAGR elrejtése @@ -305,41 +305,48 @@ MicroDAGR Map Fill Wypełnienie mapy MicroDAGR Relleno del mapa MicroDAGR + MicroDAGR - Vyplnění mapy MicroDAGR Map Fill Wypełnienie mapy MicroDAGR Relleno del mapa MicroDAGR + MicroDAGR - Vyplnění mapy How much map data is filled on MicroDAGR's Jak duża część informacji mapy jest załadowana do MicroDAGR? Cuanta información está disponible en el mapa del MicroDAG Wie viel Daten auf einem MicroDAGR zu sehen sind + Kolik informací je načteno do MicroDAGR? Full Satellite + Buildings Pełna satelitarna + budynki Satelite completo + Edificios Satellitenbild + Gebäude + Satelit + Budovy Topographical + Roads Topograficzna + drogi Topografico + Carreteras Topografisch + Straßen + Topografické + Cesty None (Cannot use map view) Żadna (wyłącza ekran mapy) Nada (No se puede el mapa) Keine (kann keine Kartenansicht verwenden) + Žádný (Nelze použít zobrazení mapy) Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.<br />Source: microDAGR.pbo Moduł ten pozwala kontrolować jak duża ilość informacji jest załadowana do przedmiotów MicroDAGR. Mniejsza ilość danych ogranicza widok mapy pokazując mniej rzeczy na minimapie.<br />Źródło: microDAGR.pbo Controla la cantidad de información disponible en el microDAGR. Menos datos limitan la vista del mapa a mostrar menos en el minimapa.<br />Fuente: microDAGR.pbo Steuert wie viel Daten auf dem microDAGR zu sehen ist. Weniger Daten schränken die Kartenansicht ein, um mehr auf der Minimap zu sehen.<br />Quelle: microDAGR.pbo + Tento modul umožňuje kontrolovat, kolik informací je obsaženo v MicroDAGR. Menší množství dat omezené zobrazením mapy ukazují méně věcí na minimapě.<br />Zdroj: microDAGR.pbo - + \ No newline at end of file diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp index 0d9ef54d07..5069556078 100644 --- a/addons/missileguidance/CfgVehicles.hpp +++ b/addons/missileguidance/CfgVehicles.hpp @@ -20,6 +20,7 @@ class CfgVehicles { class ACE_Comanche_Test : B_Heli_Attack_01_F { scope = 1; + scopeCurator = 0; displayName = "ACE_Comanche_Test"; author = "ACE Team"; class Library { diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index 42b849b902..591a4f1c5e 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -2,7 +2,7 @@ class CfgPatches { class ADDON { - units[] = {}; + units[] = {"ACE_Comanche_Test"}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_laser"}; diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index ee5b02bb4b..4c18c2f4c7 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -102,18 +102,21 @@ Wyłącz Desactivado Aus + Vypnout Player Only Tylko gracz Solo jugador Nur Spieler + Pouze hráči Player and AI Gracz oraz AI Jugador e IA Spieler und KI + Hráči a AI - + \ No newline at end of file diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index 86d9725af2..2cdd0ba8a6 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -6,102 +6,119 @@ ACE Moduły misji Módulo de misiones ACE ACE-Missionsmodule + ACE Moduly mise Ambiance Sounds [ACE] Dźwięki [ACE] [ACE] Sonidos ambiente Umgebungsgeräusche [ACE] + Zvuky prostředí [ACE] Sounds Dźwięki Sonidos Sounds + Zvuky Class names of the ambiance sounds to be played. Seperated by ',' Class name-y dźwięków do odtwarzania. Oddzielone przy użyciu ',' Class names de los sonidos ambiente que se reproducirán. Separados por ',' Klassennamen der Umgebungsgeräusche, die abgespielt werden sollen. Getrennt durch "," + Class names zvuků prostředí, které budou přehrány. Oddělené ',' Minimal Distance Minimalny dystans Distancia mínima Mindestabstand + Minimální vzdálenost Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) Używany do obliczania losowej pozycji a także ustawia minimalny dystans pomiędzy graczami a odtwarzanymi plikami dźwiękowymi Usado para calcular una posición aleatoria y establecer la distancia mínima entre los jugadores y los ficheros de sonido reproducidos Wird verwendet, um eine zufällige Position zu bestimmen und setzt den Mindestabstand zwischen Spielern und der/den abzuspielenden Sounddatei(en) fest + Používá se pro výpočet náhodné pozice a určuje minimální vzdálenost mezi hráči a přehrávaným zvukem. Maximum Distance Maksymalny dystans Distancia máxima Maximalabstand + Maximální vzdálenost Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) Używany do obliczania losowej pozycji a także ustawia maksymalny dystans pomiędzy graczami a odtwarzanymi plikami dźwiękowymi Usado para calcular una posición aleatoria y establecer la distancia máxima entre los jugadores y los ficheros de sonido reproducidos Wird verwendet, um eine zufällige Position zu bestimmen und setzt den Maximalabstand zwischen Spielern und der/den abzuspielenden Sounddatei(en) fest + Používá se pro výpočet náhodné pozice a určuje maximální vzdálenost mezi hráči a přehrávaným zvukem. Minimal Delay Minimalne opóźnienie Retraso mínimo Minimale Verzögerung + Minimální prodleva Minimal delay between sounds played Minimalne opóźnienie pomiędzy odtwarzanymi dźwiękami Retraso mínimo entre los sonidos reproducidos Minimale Verzögerung zwischen abzuspielenden Sounds + Minimální prodleva mezi přehrávanými zvuky Maximum Delay Maksymalne opóźnienie Retraso máximo Maximale Verzögerung + Maximální prodleva Maximum delay between sounds played Maksymalne opóźnienie pomiędzy odtwarzanymi dźwiękami Retraso máximo entre los sonidos reproducidos Maximale Verzögerung zwischen abzuspielenden Sounds + Maximální prodleva mezi přehrávanými zvuky Follow Players Podążaj za graczami Seguir jugadores Spielern folgen + Následovat hráče Follow players. If set to false, loop will play sounds only nearby logic position. Podążaj za graczami. Jeżeli ustawione na 'Nie', pętla będzie odtwarzana tylko w pobliżu pozycji logiki. Seguir jugadores. Si esta desabilitado (false), se reproducirán sonidos en bucle solo cerca de la posición lógica. Spielern folgen. Wenn auf falsch gesetzt, werden Sounds nur in der Nähe des Logikmoduls abgespielt. + Následuj hráče. Pokud je FALSE, smyčka zvuku bude přehrávána na nejbližší pozici logiki. Volume Głośność Volumen Lautstärke + Hlasitost The volume of the sounds played Głośność odtwarzanych dźwięków Volumen de los sonidos reproducidos Lautstärke der abzuspielenden Sounds + Hlasitost přehrávaného zvuku Ambiance sounds loop (synced across MP) Pętla odtwarzania dzwięków (synchronizowana na MP) Bucle de sonidos ambiente (sincronizados en MP) Umgebungsgeräusch-Schleife (im MP synchronisiert) + Smyčka okkolního zvuku (synchronizováno v MP) - + \ No newline at end of file diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index 8a069b9031..2738a649a9 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { statement = QUOTE(_this call FUNC(rangeTableOpen)); priority = 0; icon = QUOTE(PATHTOF(UI\icon_rangeTable.paa)); - exceptions[] = {"notOnMap", "isNotInside"}; + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; }; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index b95f39a70c..3f739aee2f 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -21,7 +21,7 @@ */ #include "script_component.hpp" -private ["_shooterMan", "_bisAirFriction", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed", "_muzzleVelocity", "_muzzleVelocityShift"]; +private ["_shooterMan", "_bisAirFriction", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"]; disableSerialization; @@ -57,7 +57,6 @@ if (_newMuzzleVelocityCoefficent != 1) then { _bulletSpeed = vectorMagnitude _bulletVelocity; _bulletVelocity = (vectorNormalized _bulletVelocity) vectorMultiply (_bulletSpeed * _newMuzzleVelocityCoefficent); _projectile setVelocity _bulletVelocity; - _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; }; diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index d5559609e3..e3a80bdee7 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -54,47 +54,55 @@ Moździerz MK6 - Ustawienia Ajustes MK6 MK6-Einstellungen + MK6 - Nastavení Air Resistance Opór powietrza Resistencia al aire Luftwiderstand + Odpor vzduchu For Player Shots, Model Air Resistance and Wind Effects Modeluj opór powietrza oraz wpływ wiatru na tor lotu pocisku dla strzałów z moździerza MK6 przez graczy Para disparos del jugador, modelo de resistencia al aire y efectos de viento Für Spielerschüsse, Luftwiderstand und Windeffekte + Pro hráčovu střelbu, Model odporu vzduchu a povětrných podmínek Allow MK6 Computer Komputer MK6 Habilitar ordenador del MK6 Erlaube MK6-Computer + MK6 - Povolit počítač Show the Computer and Rangefinder (these NEED to be removed if you enable air resistance) Zezwól na komputer i dalmierz (opcja ta MUSI zostać wyłączona jeżeli aktywowałeś opór powietrza) Muestra el ordenador y el medidor de distancia (DEBEN ser quitados si se activa la resistecia al aire) Zeige den Computer und den Entfernungsmesser an (diese MÜSSEN entfernt werden, wenn der Luftwiderstand aktiviert ist) + Zobrazit počítač a dálkoměr (toto MUSÍ být odstraněno pokud je zapnut odpor vzduchu) Allow MK6 Compass Kompas MK6 Habilitar brujula del MK6 Erlaube MK6-Kompass + MK6 - Povolit kompas Show the MK6 Digital Compass Pokaż kompas MK6 Muestra la brujula digital en el MK6 Zeige MK6-Digitaler-Kompass + MK6 - Zobrazit digitální kompas Moduł ten pozwala dostosować ustawienia moździerza MK6. Dieses Modul erlaubt das Einstellen des MK6-Mörsers. + Tento modul umožňuje nastavení minometu MK6. - + \ No newline at end of file diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 170c2e8c24..f7b652ab44 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -43,4 +43,9 @@ }; }; }foreach GVAR(moduleInitCollection); + + if (isServer) then { + GVAR(serverModulesRead) = true; + publicVariable QGVAR(serverModulesRead); + }; }] call EFUNC(common,addEventhandler); diff --git a/addons/mx2a/CfgVehicles.hpp b/addons/mx2a/CfgVehicles.hpp index d58150ff4b..c450133ba7 100644 --- a/addons/mx2a/CfgVehicles.hpp +++ b/addons/mx2a/CfgVehicles.hpp @@ -4,7 +4,7 @@ class CfgVehicles { author[] = {"Spooner", "tcp"}; scope = 2; scopeCurator = 2; - displayName = "$STR_ACE_MX2A_DisplayName"; + displayName = CSTRING(DisplayName); vehicleClass = "Items"; class TransportWeapons { MACRO_ADDWEAPON(ACE_MX2A,1); diff --git a/addons/mx2a/CfgWeapons.hpp b/addons/mx2a/CfgWeapons.hpp index 0a9dadd85a..6f590e2ed4 100644 --- a/addons/mx2a/CfgWeapons.hpp +++ b/addons/mx2a/CfgWeapons.hpp @@ -2,9 +2,9 @@ class CfgWeapons { class Binocular; class ACE_MX2A: Binocular { - author = "$STR_ACE_Common_ACETeam"; - displayName = "$STR_ACE_MX2A_DisplayName"; - descriptionShort = "$STR_ACE_MX2A_Description"; + author = ECSTRING(common,ACETeam); + displayName = CSTRING(DisplayName); + descriptionShort = CSTRING(Description); model = PATHTOF(data\ace_mx2a.p3d); modelOptics = QUOTE(PATHTOEF(apl,LWTS_optic.p3d)); picture = PATHTOF(UI\w_mx2a_ca.paa); diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml index 4f8168d518..951a606a7a 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -3,10 +3,16 @@ MX-2A + MX-2A + MX-2A + MX-2A Thermal imaging device Wärmebildgerät + Monokular termowizyjny + Dispositivo de imagen térmica + Termální dalekohled - + \ No newline at end of file diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index a39547ff1d..2d2fb1a26c 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -114,142 +114,182 @@ Ustawienia imion Etiquetas de nombre Namensanzeigen + Jmenovky Player Names View Dist. Zasięg imion graczy Distancia de vision para nombres de jugadores Spielernamen-Distanz + Vzdálenost zobrazení jména hráčů Distance in meters at which player names are shown. Default: 5 Dystans w metrach, na którym wyświetlane są imiona graczy. Domyślnie: 5 Distancia en metros a la que se muestran los nombres de los jugadores. Por defecto: 5 Distanz in Metern bei der Spielernamen angezeigt werden. Standard: 5 + Vzdálenost v metrech pro zobrazení jména. Výchozí: 5 Show name tags for AI? Imiona AI ¿Mostrar nombres para la IA? Zeige Namensanzeigen für KI? + Zobrazit jmenovky pro AI? Show the name and rank tags for friendly AI units? Default: Do not force Pokaż imiona i rangi przyjaznych jednostek AI? Domyślnie: Nie wymuszaj Muestra etiquetas de nombre y rango para las unidades IA amigas? Por defecto: No forzar Zeige den Namen und Rang für freundliche KI-Einheiten? Standard: nicht erwzingen + Zobrazit jména a hodnosti pro spřátelené AI jednotky? Výchozí: Nevynucovat Do Not Force Nie wymuszaj No forzar Nicht erzwingen + Nevynucovat Force Hide Wymuś ukrycie Ocultar forzado Verstecken erzwingen + Vynuceno skrýt Force Show Wymuś wyświetlanie Mostrar forzado Anzeigen erzwingen + Vynuceno zobrazit Show crew info? Pokaż załogę ¿Mostrar información de la tripulación? Zeige Besatzungsinfo? + Zobrazit informace o posádce? Show vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force Pokaż informacje o obsadzie pojazdu, lub pozwól graczom ustawić tą opcje według własnego uznania. Domyślnie: Nie wymuszaj Muestra información de la tripulación, o por defecto permite a los jugadores elegirlo. Por defecto: No forzar Zeige Fahrzeugbesatzungsinfo oder erlaube Spielern es auszuwählen. Standard: nicht erzwingen. + Zobrazit informace o posádce, nebo nechat aby si hráč vybral sám. Výchozí: Nevynucovat Show for Vehicles Pokaż dla pojazdów Mostrar para vehiculos Zeige bei Fahrzeugen + Zobrazit pro vozidla Show cursor NameTag for vehicle commander (only if client has name tags enabled)Default: No Pokazuj imię dowódcy pojazdu nad pojazdem (tylko jeżeli klient ma włączone imiona graczy). Domyślnie: Nie Muestra etiquetas de nombre en el cursor para el comandante del vehiculo (solo si el cliente tiene las etiquetas de nombre activadas) Por defecto: No Zeige Maus-Namensanzeigen für Fahrzeugkommandanten (nur wenn der Client Namensanzeigen aktiviert hat). Standard: Nein + Zobrazit jmenovky pro velitele vozidla (pouze pokud má klient jmenovky povolené). Výchozí: Ne This module allows you to customize settings and range of Name Tags. Moduł ten pozwala dostosować ustawienia i zasięg wyświetlania imion. Dieses Modul erlaubt die Einstellungen der Anzeigenamen zu verändern. + Este módulo permite personalizar la configuración y la distancia de las Etiquetas de nombre. + Tento modul umožňuje si přizpůsobit nastavení a vzdálenost jmenovky. Disabled Wyłączone Desactivado Deaktiviert + Zakázáno Enabled Włączone Activado Aktiviert + Povoleno Only on Cursor Tylko pod kursorem Solo cursor Nur bei Maus + Pouze na kurzor Only on Keypress Tylko po wciśnięciu klawisza Solo al pulsar tecla Nur bei Tastendruck + Pouze na klávesu Only on Cursor and Keypress Tylko pod kursorem i po wciśnięciu klawisza En cursor y al pulsar tecla Nur Maus und Tastendruck + Pouze na kurzor a klávesu Force Show Only on Cursor + Wymuś pod kursorem + Forzar mostrar solo en el cursor + Vynuceno zobrazit pouze na kurzor Force Show Only on Keypress + Wymuś po wciśnięciu klawisza + Forzar mostrar solo al pulsar tecla + Vynuceno zobrazit pouze na klávesu Force Show Only on Cursor and Keypress + Wymuś pod kursorem i po wciśnięciu klawisza + Forzar mostrar en el cursor y al pulsar tecla + Vynuceno zobrazit pouze na kurzor a klávesu Use Nametag settings Użyj ustawień imion Usar ajustes de etiquetas de nombre Verwende Namenanzeigen + Použít nastavení jmenovky Always Show All Zawsze pokazuj wszystkie Mostrar siempre todo Immer alle zeigen + Vždy zobrazit vše Show player names and set their activation. Default: Enabled Opcja ta pozwala dostosować sposób wyświetlania imion nad głowami graczy. Opcja "Tylko po wciśnięciu klawisza" wyświetla imiona tylko przytrzymania klawisza "Modyfikator" dostępnego w menu ustawień addonów -> ACE3. + Mostrar nombres de los jugadores y establecer su activación. Predeterminado: Habilitado + Zobrazit jména hráčů a nastavit jejich aktivaci. Výchozí: Povoleno Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2. Opcja ta pozwala dostosować sposób wyświetlania efektu fal dźwiękowych nad głowami mówiących graczy, wyświetlanych po przytrzymaniu klawisza PTT. Opcja ta współpracuje z TFAR oraz ACRE2. + Efecto de ondas sonoras encima de las cabezas de los jugadores que hablan después de mantener la tecla PTT. Esta opción funciona con TFAR y ACRE2. + Efekt zvukových vln nad hlavami hráčů když mluví skrz PTT klávesu. Tato volba funguje s TFAR a ACRE2. Nametags Size + Rozmiar imion + Tamaño de las Etiquetas de nombre + Velikost jmenovky Text and Icon Size Scaling + Skalowanie tekstu oraz ikon + Escala del texto y el icono + Velikost textu a ikon - + \ No newline at end of file diff --git a/addons/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf index cc8490eb15..2839f6e5f9 100644 --- a/addons/nightvision/XEH_postInitClient.sqf +++ b/addons/nightvision/XEH_postInitClient.sqf @@ -40,7 +40,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; ["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness), { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if ((currentVisionMode ACE_player != 1)) exitWith {false}; @@ -54,7 +54,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; ["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness), { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if ((currentVisionMode ACE_player != 1)) exitWith {false}; diff --git a/addons/noradio/config.cpp b/addons/noradio/config.cpp index 5709806d8f..86697535f8 100644 --- a/addons/noradio/config.cpp +++ b/addons/noradio/config.cpp @@ -1,15 +1,15 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2/"; + VERSION_CONFIG; + }; }; #include "CfgEventhandlers.hpp" diff --git a/addons/optionsmenu/ACE_Settings.hpp b/addons/optionsmenu/ACE_Settings.hpp index 9ebaf65095..0badbad660 100644 --- a/addons/optionsmenu/ACE_Settings.hpp +++ b/addons/optionsmenu/ACE_Settings.hpp @@ -6,4 +6,10 @@ class ACE_Settings { displayName = CSTRING(uiScaing); values[] = {"$str_medium", "$str_large", "$str_very_large"}; }; + class GVAR(showNewsOnMainMenu) { + value = 1; + typeName = "BOOL"; + isClientSettable = 1; + displayName = CSTRING(showNewsOnMainMenu_name); + }; }; diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index 04f66112e7..755982e569 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -48,6 +48,18 @@ if (isNull ace_player) then {"null"} else {animationState ace_player}]; [_text] call _outputText; +_text = format [" +------ACE Settings------"]; +[_text] call _outputText; + + +{ + _var = missionNamespace getVariable [(_x select 0), "ERROR: Not Defined"]; + _text = format ["%1 - %2", (_x select 0), _var]; + [_text] call _outputText; +} forEach EGVAR(common,settings); + + _text = format [" ------Array Info (count >= %1)------", MIN_ARRAY_SIZE]; [_text] call _outputText; diff --git a/addons/optionsmenu/gui/define.hpp b/addons/optionsmenu/gui/define.hpp index cb4fe1b509..2a3fffc736 100644 --- a/addons/optionsmenu/gui/define.hpp +++ b/addons/optionsmenu/gui/define.hpp @@ -7,6 +7,9 @@ class ACE_gui_staticBase; class ACE_gui_listNBox; class ACE_gui_comboBoxBase; class RscXSliderH; +class RscControlsGroupNoScrollbars; +class RscHTML; +class RscText; #ifndef ACE_DEFINE_H diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index d009d78049..d80547f2b6 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -98,12 +98,73 @@ class RscDisplayInterruptEditor3D: RscStandardDisplay { class RscDisplayMain: RscStandardDisplay { //Hide the button if there is no world (-world=empty) //Seems odd to use onMouseMoving, but I don't want to overload onLoad - onMouseMoving = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');"; + onMouseMoving = QUOTE(((_this select 0) displayCtrl 80085) ctrlShow (missionName != ''); _this execVM QUOTE(QUOTE(PATHTOF(script_loadMainMenuBox.sqf)));); + class controls { class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase { action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};"; y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY"; idc = 80085; }; + + class ACE_news: RscControlsGroupNoScrollbars { + idc = 80086; + x = "safezoneX + safezoneW - (16 *(((safezoneW / safezoneH) min 1.2) / 40))"; + y = "safezoneY + (18.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "4.95 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + class controls { + class ACE_NewsTitle: RscText { + text = CSTRING(aceNews); + colorBackground[] = {(162/255),(28/255),(28/255),0.8}; + idc = -1; + x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "15 *(((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; + class ACE_VersionInfo: RscText { + idc = 68; + x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0,0,0,0.5}; + }; + class ACE_NewsBackground: RscText { + idc = -1; + x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "2.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "5.75 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + colorBackground[] = {0,0,0,0.5}; + }; + class ACE_NewsText: RscHTML { + idc = 69; + x = "0.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + y = "2.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + w = "14 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "2.75 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + + shadow = 0; + class H1 { + font = "PuristaMedium"; + fontBold = "PuristaLight"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + }; + class H2: H1 { + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + font = "PuristaLight"; + }; + class P: H1 { + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + fontBold = "PuristaLight"; + }; + colorBold[] = {0.6,0.6,0.6,1}; + colorLink[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; + colorLinkActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; + }; + }; + }; }; }; diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp index 15160739c5..fc3a90c66e 100644 --- a/addons/optionsmenu/gui/settingsMenu.hpp +++ b/addons/optionsmenu/gui/settingsMenu.hpp @@ -250,10 +250,10 @@ class ACE_settingsMenu { }; class action_debug: actionClose { idc = 1102; - text = "$STR_ACE_OptionsMenu_DumpDebug"; + text = CSTRING(DumpDebug); x = X_PART(26.5); action = QUOTE([] call FUNC(debugDumpToClipboard)); - tooltip = "$STR_ACE_OptionsMenu_DumpDebugTooltip"; + tooltip = CSTRING(DumpDebugTooltip); }; }; }; diff --git a/addons/optionsmenu/script_component.hpp b/addons/optionsmenu/script_component.hpp index 7b86dbe0dd..d25caa2c42 100644 --- a/addons/optionsmenu/script_component.hpp +++ b/addons/optionsmenu/script_component.hpp @@ -1,6 +1,6 @@ #define COMPONENT optionsmenu -#define DEBUG_MODE_FULL +// #define DEBUG_MODE_FULL #include "\z\ace\addons\main\script_mod.hpp" diff --git a/addons/optionsmenu/script_loadMainMenuBox.sqf b/addons/optionsmenu/script_loadMainMenuBox.sqf new file mode 100644 index 0000000000..9c556e5128 --- /dev/null +++ b/addons/optionsmenu/script_loadMainMenuBox.sqf @@ -0,0 +1,31 @@ +/* + * Author: PabstMirror + * Loads the version info HTML box from main menu + * + * Arguments: + * 0: Display (from onMouseMoving) + * + * Return Value: + * None + * + * Example: + * onMouseMovingEvent execVM "script_loadMainMenuBox.sqf"; + * + * Public: No + */ +#include "script_component.hpp" + +if (missionNamespace getVariable [QGVAR(newsLoaded), false]) exitWith {}; +GVAR(newsLoaded) = true; + +//Need to load from profileNamespace because ace_settings might not be init if world = empty +if (profileNamespace getVariable [QGVAR(showNewsOnMainMenu), true]) then { + ((_this select 0) displayCtrl 80086) ctrlShow true; + + private ["_version"]; + _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr"); + ((_this select 0) displayCtrl 68) ctrlSetText format ["Installed Version: %1", _version]; + ((_this select 0) displayCtrl 69) htmlLoad "http://ace3mod.com/version.html"; +} else { + ((_this select 0) displayCtrl 80086) ctrlShow false; +}; diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index ea333d1d42..cbd9d642bf 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -246,72 +246,97 @@ Pozwól na eksport ustawień [ACE] [ACE] Permitir exportar configuración Erlaube Config-Export [ACE] + Povolit export natavení [ACE] Allow Zezwól Permitir Erlaube + Povolit Allow export of all settings to a server config formatted. Zezwól na eksport wszystkich ustawień do formatu konfiguracji serwera. Permitir la exportación de todos los ajustes de configuración a un servidor con formato. Erlaube alle Einstellungen in einer Server-Config zu exportieren. + Povolit exportovat všechna nastavení do formátu server configu. When allowed, you have access to the settings modification and export in SP. Clicking export will place the formated config on your clipboard. Jeżeli ustawione na zezwól, wtedy będziesz mieć dostęp do ekranu modyfikacji wszystich ustawień i zmiennych ACE, a także będziesz mieć możliwość eksportu tychże ustawień do formatu rozpoznawalnego przez userconfig serwera. Kliknięcie opcji Eksportuj skopiuje wszystkie ustawienia do schowka. Działa tylko w trybie SP. Cuando esta permitido, se tiene acceso a los ajustes de modificación y exportación en SP. Pulsar en exportar copiara la configuración al portapapeles. Wenn erlaubt, können die Einstellungsmodifikationen angezeigt und im SP exportiert werden. Wenn auf "Exportieren" geklickt wird, wird eine formatierte Config-Datei in der Zwischenablage abgespeichert. + Pokud je povoleno, budete mít přístup k modifikaci nastavení a exportování v SP. Kliknutím na export umístníte formátovaný config do vaší schránky. Hide Ukryj Ocultar Verstecken + Skrýt Top right, downwards Po prawej u góry, w dół Arriba a la derecha, hacia abajo Open rechts, nach unten + Vpravo nahoře, dolů Top right, to the left Po prawej u góry, do lewej Arriba a la derecha, hacia la izquierda Von rechts nach links + Vpravo nahoře, do leva Top left, downwards Po lewej u góry, w dół Arriba a la izquierda, hacia abajo Von links, nach unten + Vlevo nahoře, dolů Top left, to the right Po lewej u góry, do prawej Arriba a la izquierda, hacia la derecha Oben links nach rechts + Vlevo nahoře, do prava Top Góra Arriba Oben + Nahoře Bottom Dół Abajo Unten + Dole Debug To Clipboard + Debuguj do schowka + Depurar al portapapeles + Debug do schránky Sends debug information to RPT and clipboard. + Wysyła informacje o debugowaniu do RPT oraz schowka. + Envía información de depuración al RPT y el portapapeles. + Pošle debug informace do RPT a schránky. + + + ACE News + Noticias ACE + + + Show News on Main Menu + Mostrar noticias en el menú principal - + \ No newline at end of file diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index 3041075c8d..a198ef71b6 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -16,7 +16,7 @@ class CfgVehicles { class ACE_CheckTemperature { displayName = CSTRING(CheckTemperatureShort); condition = "switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (secondaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}"; - exceptions[] = {"isNotInside"}; + exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(CheckTemperature); ); showDisabled = 0; priority = 2.9; diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp index b3c75c62ec..a5832756ff 100644 --- a/addons/rangecard/CfgVehicles.hpp +++ b/addons/rangecard/CfgVehicles.hpp @@ -4,7 +4,7 @@ class CfgVehicles { class ACE_Actions { class ACE_Weapon { class GVAR(copyRangeCard) { - displayName = "$STR_ACE_RangeCard_CopyRangeCard"; + displayName = CSTRING(CopyRangeCard); distance = 2.0; condition = QUOTE(_target call FUNC(canCopy)); statement = QUOTE(_target call FUNC(updateClassNames)); @@ -15,22 +15,31 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Equipment { class GVAR(open) { - displayName = "$STR_ACE_RangeCard_OpenRangeCard"; + displayName = CSTRING(OpenRangeCard); condition = QUOTE(call FUNC(canShow) && !GVAR(RangeCardOpened)); statement = QUOTE(false call FUNC(openRangeCard)); showDisabled = 0; priority = 0.1; icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); exceptions[] = {"notOnMap"}; - }; - class GVAR(openCopy) { - displayName = "$STR_ACE_RangeCard_OpenRangeCardCopy"; - condition = QUOTE(call FUNC(canShowCopy) && !GVAR(RangeCardOpened)); - statement = QUOTE(true call FUNC(openRangeCard)); - showDisabled = 0; - priority = 0.1; - icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); - exceptions[] = {"notOnMap"}; + class GVAR(openCopy) { + displayName = CSTRING(OpenRangeCardCopy); + condition = QUOTE(call FUNC(canShowCopy) && !GVAR(RangeCardOpened)); + statement = QUOTE(true call FUNC(openRangeCard)); + showDisabled = 0; + priority = 0.1; + icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); + exceptions[] = {"notOnMap"}; + }; + class GVAR(makeCopy) { + displayName = CSTRING(CopyRangeCard); + condition = QUOTE(call FUNC(canShow) && !GVAR(RangeCardOpened)); + statement = QUOTE(GVAR(ammoClassCopy) = GVAR(ammoClass); GVAR(magazineClassCopy) = GVAR(magazineClass); GVAR(weaponClassCopy) = GVAR(ammoClass);); + showDisabled = 0; + priority = 0.1; + icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); + exceptions[] = {"notOnMap"}; + }; }; }; }; diff --git a/addons/rangecard/CfgWeapons.hpp b/addons/rangecard/CfgWeapons.hpp index 0bd3e7daf6..7195c0a008 100644 --- a/addons/rangecard/CfgWeapons.hpp +++ b/addons/rangecard/CfgWeapons.hpp @@ -6,8 +6,8 @@ class CfgWeapons { class ACE_RangeCard: ACE_ItemCore { author[] = {"Ruthberg"}; scope = 2; - displayName = "$STR_ACE_RangeCard_Name"; - descriptionShort = "$STR_ACE_RangeCard_Description"; + displayName = CSTRING(Name); + descriptionShort = CSTRING(Description); picture = PATHTOF(UI\RangeCard_Icon.paa); icon = "iconObject_circle"; mapSize = 0.034; diff --git a/addons/rangecard/functions/fnc_canShow.sqf b/addons/rangecard/functions/fnc_canShow.sqf index f7450e10e3..330788ee7c 100644 --- a/addons/rangecard/functions/fnc_canShow.sqf +++ b/addons/rangecard/functions/fnc_canShow.sqf @@ -15,4 +15,4 @@ */ #include "script_component.hpp" -(GVAR(ammoClass) != "" && GVAR(magazineClass) != "" && GVAR(weaponClass) != "" && !GVAR(RangeCardOpened) && !(underwater ACE_player) && ("ACE_RangeCard" in (uniformItems ACE_player)) || ("ACE_RangeCard" in (vestItems ACE_player))) +(GVAR(ammoClass) != "" && GVAR(magazineClass) != "" && GVAR(weaponClass) != "" && !GVAR(RangeCardOpened) && ("ACE_RangeCard" in (uniformItems ACE_player)) || ("ACE_RangeCard" in (vestItems ACE_player))) diff --git a/addons/rangecard/functions/fnc_canShowCopy.sqf b/addons/rangecard/functions/fnc_canShowCopy.sqf index 49fd891953..e78c64cc89 100644 --- a/addons/rangecard/functions/fnc_canShowCopy.sqf +++ b/addons/rangecard/functions/fnc_canShowCopy.sqf @@ -15,4 +15,4 @@ */ #include "script_component.hpp" -(GVAR(ammoClassCopy) != "" && GVAR(magazineClassCopy) != "" && GVAR(weaponClassCopy) != "" && !GVAR(RangeCardOpened) && !(underwater ACE_player) && ("ACE_RangeCard" in (uniformItems ACE_player)) || ("ACE_RangeCard" in (vestItems ACE_player))) +(GVAR(ammoClassCopy) != "" && GVAR(magazineClassCopy) != "" && GVAR(weaponClassCopy) != "" && !GVAR(RangeCardOpened) && ("ACE_RangeCard" in (uniformItems ACE_player)) || ("ACE_RangeCard" in (vestItems ACE_player))) diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index 4c3a1626ee..b5ec9683f4 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -130,7 +130,7 @@ if (_barrelLength > 0 && _useABConfig) then { if (_useABConfig) then { ctrlSetText [770000, format["%1'' - %2 gr (%3)", round((_ammoConfig select 1) * 39.3700787) / 1000, round((_ammoConfig select 3) * 15.4323584), _ammoClass]]; if (_barrelLength > 0 && _barrelTwist > 0) then { - ctrlSetText [770002, format["Barrel: %1'' 1:%2'' twist", round(_barrelLength * 0.0393700787), round(_barrelTwist * 0.0393700787)]]; + ctrlSetText [770002, format["Barrel: %1'' 1:%2'' twist", round(2 * _barrelLength * 0.0393700787) / 2, round(_barrelTwist * 0.0393700787)]]; } else { ctrlSetText [770002, ""]; }; diff --git a/addons/rangecard/initKeybinds.sqf b/addons/rangecard/initKeybinds.sqf index 519b4730cc..cb6ff49206 100644 --- a/addons/rangecard/initKeybinds.sqf +++ b/addons/rangecard/initKeybinds.sqf @@ -1,7 +1,7 @@ ["ACE3 Equipment", QGVAR(RangeCardDialogKey), localize "STR_ACE_RangeCard_RangeCardDialogKey", { // Conditions: canInteract, canShow - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if (GVAR(RangeCardOpened)) exitWith { closeDialog 0; false @@ -17,7 +17,7 @@ ["ACE3 Equipment", QGVAR(RangeCardCopyDialogKey), localize "STR_ACE_RangeCard_RangeCardCopyDialogKey", { // Conditions: canInteract, canShowCopy - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if (GVAR(RangeCardOpened)) exitWith { closeDialog 0; false diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml index 63bcbda13f..535059456e 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -3,24 +3,45 @@ Range Card + Tabela balistyczna + Tarjeta de distancias + Vzdálenostní tabulka 50 METER increments -- MRAD/MRAD (reticle/turrets) + Co 50 metrów - MRAD/MRAD (siatka/pokrętło) + Incrementos de 50 METROS -- MRAD/MRAD (retícula/torretas) + Přidat 50 METRŮ -- MRAD/MRAD (síťka/věže) Open Range Card + Otwórz tabelę balistyczną + Abrir tarjeta de distancias + Otevřít vzdálenostní tabulku Open Range Card Copy + Otwórz kopię tabeli balistycznej + Abrir copia de tarjeta de distancias + Otevřít kopii vzdálenostní tabulky Open Range Card + Otwórz tabelę balistyczną + Abrir tarjeta de distancias + Otevřít vzdálenostní tabulku Open Range Card Copy + Otwórz kopię tabeli balistycznej + Abrir copia de tarjeta de distancias + Otevřít kopii vzdálenostní tabulky Copy Range Card + Skopiuj tabelę balistyczną + Copiar tarjeta de distancias + Kopírovat vzdálenostní tabulku \ No newline at end of file diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 54a6c1e869..483242835f 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -426,7 +426,7 @@ KamAZ Transport KamAZ de transporte KamAZ transportowy - KAMAZ Valník + KamAZ Valník KamAZ Transport КамАЗ Траспортный KamAZ Transporte @@ -438,7 +438,7 @@ KamAZ Transport (bedeckt) KamAZ de transporte (cubierto) KamAZ Transportowy (zakryty) - KAMAZ Valník (krytý) + KamAZ Valník (krytý) KamAZ Transport (bâché) КамАЗ Траспортный (крытый) KamAZ Transporte (coberto) @@ -450,7 +450,7 @@ KamAZ Munition KamAZ de munición KamAZ Amunicyjny - KAMAZ Muniční + KamAZ Muniční KamAZ Munitions КамАЗ Боеприпасы KamAZ Munições @@ -462,7 +462,7 @@ KamAZ Treibstoff KamAZ de combustible KamAZ cysterna - KAMAZ Cisterna + KamAZ Cisterna KamAZ Citerne КамАЗ Заправщик KamAZ Combustível @@ -474,7 +474,7 @@ KamAZ Instandsetzung KamAZ de reparación KamAZ Naprawczy - KAMAZ Opravárenský + KamAZ Opravárenský KamAZ Réparation КамАЗ Ремонтный KamAZ Reparador diff --git a/addons/reload/XEH_postInit.sqf b/addons/reload/XEH_postInit.sqf index cd0108f740..9d5110d330 100644 --- a/addons/reload/XEH_postInit.sqf +++ b/addons/reload/XEH_postInit.sqf @@ -7,7 +7,7 @@ if !(hasInterface) exitWith {}; ["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo), { // Conditions: canInteract - if !([ACE_player, (vehicle ACE_player), ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, (vehicle ACE_player), ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon) || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false}; diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index 85863bb6c2..285c560a6c 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -98,7 +98,7 @@ if(format["%1", _backpack] != "") then { // primaryWeapon -if (_primaryweapon != "") then { +if ((_primaryweapon != "") && {_primaryweapon != "ACE_FakePrimaryWeapon"}) then { { _unit addMagazine _x; } forEach _primaryweaponmagazine; diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 3b45a38953..40bb04f53a 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -150,67 +150,79 @@ System odrodzenia Sistema de reaparición Respawn-System + Systém znovuzrození Save Gear? Zapisać ekwipunek? ¿Guardar equipo? Ausrüstung speichern? + Uložit výbavu? Respawn with the gear a soldier had just before his death? Odradzaj z ekwipunkiem jaki żołnierz miał tuż przed swoją śmiercią? Reaparece con el equipo que el soldado tenía justo antes de morir Mit der Ausrüstung, die ein Soldat vor seinem Tod hatte, respawnen? + Znovuubjevit s výbavou kterou měl voják před smrtí? Remove bodies? Usuwać ciała? ¿Eliminar cuerpos? Körper entfernen? + Odstranit těla? Remove player bodies after disconnect? Usuwaj ciała graczy po rozłączeniu z serwera? Elimina los cuerpos de los jugadores cuando se desconecten Entferne Spielerkörper nach dem Trennen einer Verbindung? + Odstranit hráčova těla po odpojení? Moduł ten pozwala dostosować ustawienia odrodzenia (respawnu). Dieses Modul erlaubt es die Respawn-Einstellungen anzupassen. + Tento modul umožňuje nastavení znovuzrození (spawn). Friendly Fire Messages Wiadomości Friendly Fire Mensajes de fuego amigo Freundbeschuss-Nachrichten + Upozornění na přátelskou střelbu Użycie tego modułu na misji spowoduje wyświetlenie wiadomości na czacie w przypadku, kiedy zostanie popełniony friendly fire - wyświetlona zostanie wtedy wiadomość kto kogo zabił. + Zobrazí zprávu v chatu v případě, když budete střílet na vlastní jednotky. Ve zprávě se zobrazí kdo na koho střílel, popř. kdo koho zabil. Rallypoint System System punktu zbiórki Sistema de punto de reunión Rallypoint-System + Systém shromáždění Moduł ten pozwala zastosować na misji "punkt zbiórki", do którego można szybko przeteleportować się z "bazy". Wymaga postawienia odpowiednich obiektów na mapie - bazy oraz flagi. Obydwa dostępne są w kategorii Puste -> ACE Odrodzenie. + Tento modul umožňuje určit místo shromaždiště, kam se mohou jednokty rychle teleportovat ze "základny". Toto vyžaduje vhodné objekty v mapě - základna a vlajka. Oba dva můžete najít v kategorii Prázdné -> ACE Oživení. Move Rallypoint Przenieś punkt zbiórki Mover punto de reunión Bewege Rallypoint + Přesun na shromaždiště ACE Respawn ACE Odrodzenie Reaparición ACE ACE-Respawn + ACE Znovuzrození - + \ No newline at end of file diff --git a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf index 524605ed5a..754a02005c 100644 --- a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf @@ -11,12 +11,7 @@ if (count _sound == 0) exitWith { }; // add file extension -if call { - { - if (toLower (_sound select 0) find _x == count toArray (_sound select 0) - count toArray _x - 1) exitWith {false}; - true - } forEach [".wav", ".ogg", ".wss"]; -} then { +if ({(toLower (_sound select 0) find _x == (count toArray (_sound select 0) - count toArray _x) - 1)} count [".wav", ".ogg", ".wss"] == 0) then { _sound set [0, (_sound select 0) + ".wss"]; }; diff --git a/addons/sandbag/$PBOPREFIX$ b/addons/sandbag/$PBOPREFIX$ new file mode 100644 index 0000000000..1061a20968 --- /dev/null +++ b/addons/sandbag/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\sandbag \ No newline at end of file diff --git a/addons/sandbag/CfgEventHandlers.hpp b/addons/sandbag/CfgEventHandlers.hpp new file mode 100644 index 0000000000..17911f6b1f --- /dev/null +++ b/addons/sandbag/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; + +class Extended_Init_EventHandlers { + class ACE_SandbagObject { + class ADDON { + init = QUOTE(_this call DEFUNC(dragging,initObject)); + }; + }; +}; \ No newline at end of file diff --git a/addons/sandbag/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp new file mode 100644 index 0000000000..b16d2f978d --- /dev/null +++ b/addons/sandbag/CfgVehicles.hpp @@ -0,0 +1,113 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Sandbags { + displayName = CSTRING(DeploySandbag); + condition = QUOTE(call FUNC(canDeploy)); + statement = QUOTE(call FUNC(deploy)); + exceptions[] = {"isNotSwimming"}; + showDisabled = 1; + priority = 4; + icon = PATHTOF(UI\icon_sandbag_ca.paa); + }; + }; + }; + + class Item_Base_F; + class ACE_Item_Sandbag_empty: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(sandbagEmpty_displayName); + vehicleClass = "Items"; + class TransportItems { + class ACE_Sandbag_empty { + name = "ACE_Sandbag_empty"; + count = 1; + }; + }; + }; + /* + class ACE_Item_Sandbag: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(sandbag_displayName); + vehicleClass = "Items"; + class TransportItems { + class ACE_Sandbag { + name = "ACE_Sandbag"; + count = 1; + }; + }; + }; + */ + class thingX; + class ACE_SandbagObject: thingX { + author = ECSTRING(common,ACETeam); + XEH_ENABLED; + scope = 1; + side = -1; + model = PATHTOF(data\ace_sandbag_build.p3d); + displayName = CSTRING(sandbag_displayName); + typicalCargo[] = {}; + armor = 12000; // Withstand 200 5.56 bullets before sandbag hull is cheese + mapSize = 0.4; + nameSound = "Bunker"; + icon = PATHTOF(UI\icon_sandbag_ca.paa); + accuracy = 1000; + + destrType = "DestructDefault"; + + class DestructionEffects {}; + class Damage { + tex[] = {}; + mat[] = { + "z\ace\addons\sandbag\data\bag_destruct.rvmat", + "z\ace\addons\sandbag\data\bag_destruct.rvmat", + "z\ace\addons\sandbag\data\bag_destruct.rvmat" + }; + }; + class ACE_Actions { + class ACE_MainActions { + selection = ""; + distance = 5; + condition = "true"; + class ACE_PickUp { + selection = ""; + displayName = CSTRING(PICKUPSB); + distance = 4; + condition = QUOTE(!(_player getVariable [ARR_2('ace_sandbag_usingSandbag',false)])); + statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\icon_sandbag_ca.paa); + }; + class ACE_Carry { + selection = ""; + displayName = CSTRING(CARRYSB); + distance = 4; + condition = QUOTE(!(_player getVariable [ARR_2('ace_sandbag_usingSandbag',false)])); + statement = QUOTE([ARR_2(_target,_player)] call FUNC(carry)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\icon_sandbag_ca.paa); + }; + }; + }; + }; + class ACE_SandbagObject_NoGeo: ACE_SandbagObject { + scope = 1; + model = PATHTOF(data\ace_sandbag_nogeo.p3d); + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Sandbag_empty,50); + }; + }; +}; diff --git a/addons/sandbag/CfgWeapons.hpp b/addons/sandbag/CfgWeapons.hpp new file mode 100644 index 0000000000..1a26fc78d4 --- /dev/null +++ b/addons/sandbag/CfgWeapons.hpp @@ -0,0 +1,30 @@ + +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_Sandbag_empty: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + scope = 2; + displayName = CSTRING(sandbagEmpty_displayName); + model = PATHTOF(data\ace_sandbag_m.p3d); + picture = PATHTOF(data\m_sandbag_ca.paa); + + class ItemInfo: InventoryItem_Base_F { + mass = 8; + }; + }; + /* + class ACE_Sandbag: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + scope = 2; + displayName = CSTRING(sandbag_displayName); + model = PATHTOF(data\ace_sandbag_build.p3d); + picture = PATHTOF(data\m_sandbag_ca.paa); + + class ItemInfo: InventoryItem_Base_F { + mass = 160; + }; + }; + */ +}; diff --git a/addons/sandbag/README.md b/addons/sandbag/README.md new file mode 100644 index 0000000000..8c67ed9a6d --- /dev/null +++ b/addons/sandbag/README.md @@ -0,0 +1,10 @@ +ace_sandbag +=============== + +Stackable sandbags. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/sandbag/UI/icon_sandbag_ca.paa b/addons/sandbag/UI/icon_sandbag_ca.paa new file mode 100644 index 0000000000..5d6ea6d4d9 Binary files /dev/null and b/addons/sandbag/UI/icon_sandbag_ca.paa differ diff --git a/addons/sandbag/XEH_postInit.sqf b/addons/sandbag/XEH_postInit.sqf new file mode 100644 index 0000000000..d1c0ad0766 --- /dev/null +++ b/addons/sandbag/XEH_postInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +GVAR(placer) = objNull; +GVAR(sandBag) = objNull; +GVAR(deployPFH) = -1; +GVAR(deployDirection) = 0; + +// Cancel deploy sandbag if interact menu opened +["interactMenuOpened", { + if (GVAR(deployPFH) != -1 && {!isNull (GVAR(sandBag))}) then { + call FUNC(deployCancel); + }; +}] call EFUNC(common,addEventHandler); + +[{_this call DFUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); diff --git a/addons/sandbag/XEH_preInit.sqf b/addons/sandbag/XEH_preInit.sqf new file mode 100644 index 0000000000..1978913723 --- /dev/null +++ b/addons/sandbag/XEH_preInit.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(canDeploy); +PREP(carry); +PREP(deploy); +PREP(deployCancel); +PREP(deployConfirm); +PREP(drop); +PREP(handleScrollWheel); +PREP(pickup); + +ADDON = true; diff --git a/addons/sandbag/config.cpp b/addons/sandbag/config.cpp new file mode 100644 index 0000000000..6b7ce1a456 --- /dev/null +++ b/addons/sandbag/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_Sandbag", "ACE_Item_Sandbag_empty"}; + weapons[] = {"ACE_Sandbag", "ACE_Sandbag_empty"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"Rocko", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" \ No newline at end of file diff --git a/addons/sandbag/data/ace_sandbag_build.p3d b/addons/sandbag/data/ace_sandbag_build.p3d new file mode 100644 index 0000000000..eb24832c31 Binary files /dev/null and b/addons/sandbag/data/ace_sandbag_build.p3d differ diff --git a/addons/sandbag/data/ace_sandbag_m.p3d b/addons/sandbag/data/ace_sandbag_m.p3d new file mode 100644 index 0000000000..3f651a7530 Binary files /dev/null and b/addons/sandbag/data/ace_sandbag_m.p3d differ diff --git a/addons/sandbag/data/ace_sandbag_nogeo.p3d b/addons/sandbag/data/ace_sandbag_nogeo.p3d new file mode 100644 index 0000000000..5a7680ffd8 Binary files /dev/null and b/addons/sandbag/data/ace_sandbag_nogeo.p3d differ diff --git a/addons/sandbag/data/bag.rvmat b/addons/sandbag/data/bag.rvmat new file mode 100644 index 0000000000..d764320caa --- /dev/null +++ b/addons/sandbag/data/bag.rvmat @@ -0,0 +1,132 @@ +/* +ambient[]={0.992157,0.992157,0.992157,1.000000}; +diffuse[]={0.992157,0.992157,0.992157,1.000000}; +forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; +emmisive[]={0.000000,0.000000,0.000000,1.000000}; +specular[]={0.000000,0.000000,0.000000,1.000000}; +specularPower=40.000000; +*/ + +ambient[]={1.000000,1.000000,1.000000,1.000000}; +diffuse[]={1.000000,1.000000,1.000000,1.000000}; +forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; +emmisive[]={0.000000,0.000000,0.000000,1.000000}; +specular[]={0.250000,0.250000,0.250000,0.250000}; +specularPower=30.000000; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 { + texture="z\ace\addons\sandbag\data\bag_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage2 { + texture="z\ace\addons\sandbag\data\bag_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; + +/* +ambient[]={1.0, 1.0, 1.0, 1.0}; +diffuse[]={1.0, 1.0, 1.0, 1.0}; +forcedDiffuse[]={0.0, 0.0, 0.0, 0.0}; +emmisive[]={0.0, 0.0, 0.0, 0.0}; +specular[]={0.93, 0.93, 0.93, 0.0}; +specularPower=400.0; +PixelShaderID="Super"; +VertexShaderID="Super"; + +class Stage1 { + texture="z\ace\addons\sandbag\data\bag_nohq.paa"; + uvSource="tex"; + + class uvTransform { + aside[]={1.0, 0.0, 0.0}; + up[]={0.0, 1.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; + +class Stage2 { + texture="a3\weapons_f\data\detailmaps\metal_detail_dt.paa"; + uvSource="tex"; + + class uvTransform { + aside[]={6.0, 0.0, 0.0}; + up[]={0.0, 3.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; + +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource="tex"; + + class uvTransform { + aside[]={1.0, 0.0, 0.0}; + up[]={0.0, 1.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; + +class Stage4 { + texture="#(argb,8,8,3)color(0.8,0,0,1,AS)"; + uvSource="tex"; + + class uvTransform { + aside[]={1.0, 0.0, 0.0}; + up[]={0.0, 1.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; + +class Stage5 { + texture="z\ace\addons\sandbag\data\bag_smdi.paa"; + uvSource="tex"; + + class uvTransform { + aside[]={1.0, 0.0, 0.0}; + up[]={0.0, 1.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; + +class Stage6 { + texture="#(ai,64,64,1)fresnel(1.29,0.5)"; + uvSource="tex"; + + class uvTransform { + aside[]={1.0, 0.0, 0.0}; + up[]={0.0, 1.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; + +class Stage7 { + texture="a3\data_f\env_land_co.paa"; + uvSource="tex"; + + class uvTransform { + aside[]={1.0, 0.0, 0.0}; + up[]={0.0, 1.0, 0.0}; + dir[]={0.0, 0.0, 0.0}; + pos[]={0.0, 0.0, 0.0}; + }; +}; +*/ diff --git a/addons/sandbag/data/bag_co.paa b/addons/sandbag/data/bag_co.paa new file mode 100644 index 0000000000..436b8af955 Binary files /dev/null and b/addons/sandbag/data/bag_co.paa differ diff --git a/addons/sandbag/data/bag_destruct.rvmat b/addons/sandbag/data/bag_destruct.rvmat new file mode 100644 index 0000000000..1a592c973e --- /dev/null +++ b/addons/sandbag/data/bag_destruct.rvmat @@ -0,0 +1,48 @@ +ambient[]={1.000000,1.000000,1.000000,1.000000}; +diffuse[]={1.000000,1.000000,1.000000,1.000000}; +forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; +emmisive[]={0.000000,0.000000,0.000000,1.000000}; +specular[]={0.250000,0.250000,0.250000,0.250000}; +specularPower=30.000000; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 { + texture="z\ace\addons\sandbag\data\bag_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage2 { + texture="z\ace\addons\apl\data\vehicle_destr1024_1024_mc.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.200000,0.000000,0.000000}; + pos[]={0.200000,0.000000,0.000000}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(1,1,1,0.3)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage4 { + texture="z\ace\addons\apl\data\vehicle_destr1024_1024_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; diff --git a/addons/sandbag/data/bag_nohq.paa b/addons/sandbag/data/bag_nohq.paa new file mode 100644 index 0000000000..009b9c5525 Binary files /dev/null and b/addons/sandbag/data/bag_nohq.paa differ diff --git a/addons/sandbag/data/bag_smdi.paa b/addons/sandbag/data/bag_smdi.paa new file mode 100644 index 0000000000..8c277264db Binary files /dev/null and b/addons/sandbag/data/bag_smdi.paa differ diff --git a/addons/sandbag/data/m_sandbag_ca.paa b/addons/sandbag/data/m_sandbag_ca.paa new file mode 100644 index 0000000000..b0c2d9e3be Binary files /dev/null and b/addons/sandbag/data/m_sandbag_ca.paa differ diff --git a/addons/sandbag/data/model.cfg b/addons/sandbag/data/model.cfg new file mode 100644 index 0000000000..064073b314 --- /dev/null +++ b/addons/sandbag/data/model.cfg @@ -0,0 +1,21 @@ +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + class ACE_SB_Skeleton: Default {}; +}; + +class CfgModels { + class Default { + sectionsInherit=""; + sections[] = {""}; + skeletonName = ""; + }; + class ace_sandbag_build { + sectionsInherit = "Default"; + sections[] = {"zbytek"}; + skeletonName = "ACE_SB_Skeleton"; + }; +}; diff --git a/addons/sandbag/functions/fnc_canDeploy.sqf b/addons/sandbag/functions/fnc_canDeploy.sqf new file mode 100644 index 0000000000..a55b9f9875 --- /dev/null +++ b/addons/sandbag/functions/fnc_canDeploy.sqf @@ -0,0 +1,28 @@ +/* + * Author: Ruthberg + * Checks if the player can deploy a sandbag + * + * Arguments: + * None + * + * Return Value: + * can deploy? + * + * Example: + * call ace_sandbag_fnc_canDeploy; + * + * Public: No + */ +#include "script_component.hpp" + +#define SURFACE_BLACKLIST ["water", "concrete", "tarmac", "wood", "metal", "roof_tin", "roof_tiles", "wood_int", "concrete_int", "tiles_int", "metal_int", "stony", "rock", "int_concrete", "int_tiles", "int_wood", "tiling", "wavymetal", "int_metal"] + +if !([ACE_player, "ACE_Sandbag_empty"] call EFUNC(common,hasItem)) exitWith { false }; +if (ACE_player getVariable [QGVAR(usingSandbag), false]) exitWith { false }; +if ((getPosATL ACE_player select 2) - (getPos ACE_player select 2) > 1E-5) exitWith { false }; + +private ["_surfaceClass", "_surfaceType"]; +_surfaceClass = ([surfaceType (position ACE_player), "#"] call CBA_fnc_split) select 1; +_surfaceType = getText (configfile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); + +!(_surfaceType in SURFACE_BLACKLIST) diff --git a/addons/sandbag/functions/fnc_carry.sqf b/addons/sandbag/functions/fnc_carry.sqf new file mode 100644 index 0000000000..f2ba3dff8a --- /dev/null +++ b/addons/sandbag/functions/fnc_carry.sqf @@ -0,0 +1,56 @@ +/* + * Author: Ruthberg + * Carry sandbag + * + * Arguments: + * 0: sandbag + * 1: unit + * + * Return Value: + * None + * + * Example: + * [_sandbag, _unit] call ace_sandbag_fnc_carry; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_sandbag,_unit); + +_unit playActionNow "PutDown"; + +_unit setVariable [QGVAR(usingSandbag), true]; +[{ + PARAMS_2(_sandbag,_unit); + + GVAR(carrier) = ACE_player; + + [GVAR(carrier), "ACE_Sandbag", true] call EFUNC(common,setForceWalkStatus); + + deleteVehicle _sandbag; + + GVAR(sandBag) = createVehicle ["ACE_SandbagObject_NoGeo", [0,0,0], [], 0, "NONE"]; + GVAR(sandBag) enableSimulationGlobal false; + + // Force physx update + { + _x setPosASL (getPosASL _x); + } forEach (GVAR(carrier) nearObjects ["ACE_SandbagObject", 5]); + + GVAR(carryPFH) = [{ + if (GVAR(carrier) != ACE_player) exitWith { + call FUNC(drop); + }; + GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0])); + GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player); + }, 0, []] call CBA_fnc_addPerFrameHandler; + + [localize LSTRING(DropSandbag), "", ""] call EFUNC(interaction,showMouseHint); + + GVAR(carrier) setVariable [QGVAR(drop), + [GVAR(carrier), "DefaultAction", + {GVAR(carryPFH) != -1 && !isNull (GVAR(sandBag))}, + {call FUNC(drop);} + ] call EFUNC(common,AddActionEventHandler)]; +}, [_sandbag, _unit], 1, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf new file mode 100644 index 0000000000..1e1121409b --- /dev/null +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -0,0 +1,47 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg + * Starts the deploy process for sandbags. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_sandbag_fnc_deploy; + * + * Public: No + */ +#include "script_component.hpp" + +closeDialog 0; + +GVAR(placer) = ACE_player; + +[GVAR(placer), "ACE_Sandbag", true] call EFUNC(common,setForceWalkStatus); + +GVAR(sandBag) = createVehicle ["ACE_SandbagObject_NoGeo", [0,0,0], [], 0, "NONE"]; +GVAR(sandBag) enableSimulationGlobal false; + +GVAR(deployPFH) = [{ + if (GVAR(placer) != ACE_player) exitWith { + call FUNC(deployCancel); + }; + GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0])); + GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player); +}, 0, []] call CBA_fnc_addPerFrameHandler; + +[localize LSTRING(ConfirmDeployment), localize LSTRING(CancelDeployment), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint); + +GVAR(placer) setVariable [QGVAR(Deploy), + [GVAR(placer), "DefaultAction", + {GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))}, + {call FUNC(deployConfirm);} +] call EFUNC(common,AddActionEventHandler)]; + +GVAR(placer) setVariable [QGVAR(Cancel), + [GVAR(placer), "zoomtemp", + {GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))}, + {call FUNC(deployCancel);} +] call EFUNC(common,AddActionEventHandler)]; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf new file mode 100644 index 0000000000..65677ea887 --- /dev/null +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -0,0 +1,35 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg + * Cancels sandbag deployment + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_sandbag_fnc_deployCancel; + * + * Public: No + */ +#include "script_component.hpp" + +if (isNull GVAR(placer)) exitWith {}; + +[GVAR(deployPFH)] call cba_fnc_removePerFrameHandler; + +if (!isNull (GVAR(sandBag))) then { + deleteVehicle GVAR(sandBag); +}; + +[GVAR(placer), "ACE_Sandbag", false] call EFUNC(Common,setForceWalkStatus); + +call EFUNC(interaction,hideMouseHint); +[GVAR(placer), "DefaultAction", GVAR(placer) getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); +[GVAR(placer), "zoomtemp", GVAR(placer) getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); + +GVAR(placer) addItem "ACE_Sandbag_empty"; + +GVAR(sandBag) = objNull; +GVAR(placer) = objNull; diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf new file mode 100644 index 0000000000..2cb297c51e --- /dev/null +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -0,0 +1,51 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg + * Confirms sandbag deployment + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_sandbag_fnc_deployConfirm; + * + * Public: No + */ +#include "script_component.hpp" + +if (isNull GVAR(sandBag) || isNull GVAR(placer)) exitWith {}; + +[GVAR(deployPFH)] call cba_fnc_removePerFrameHandler; + +[GVAR(placer), "ACE_Sandbag", false] call EFUNC(Common,setForceWalkStatus); +[GVAR(placer), "DefaultAction", GVAR(placer) getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); +[GVAR(placer), "zoomtemp", GVAR(placer) getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); + +call EFUNC(interaction,hideMouseHint); + +GVAR(placer) playActionNow "PutDown"; + +GVAR(placer) setVariable [QGVAR(usingSandbag), true]; +[{ + _this setVariable [QGVAR(usingSandbag), false]; +}, GVAR(placer), 1.5, 0.5] call EFUNC(common,waitAndExecute); + +[{ + private ["_sandBag", "_position", "_direction"]; + _position = getPosASL GVAR(sandBag); + _direction = getDir GVAR(sandBag); + + deleteVehicle GVAR(sandBag); + + _sandBag = createVehicle ["ACE_SandbagObject", [0,0,0], [], 0, "NONE"]; + _sandBag enableSimulationGlobal true; + _sandBag setPosASL _position; + _sandBag setDir _direction; + + GVAR(placer) removeItem "ACE_Sandbag_empty"; + + GVAR(sandBag) = objNull; + GVAR(placer) = objNull; +}, [], 1.0, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/functions/fnc_drop.sqf b/addons/sandbag/functions/fnc_drop.sqf new file mode 100644 index 0000000000..1ef61289bf --- /dev/null +++ b/addons/sandbag/functions/fnc_drop.sqf @@ -0,0 +1,47 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg + * Drop sandbag + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_sandbag_fnc_deployCancel; + * + * Public: No + */ +#include "script_component.hpp" + +if (isNull GVAR(sandBag) || isNull GVAR(carrier)) exitWith {}; + +[GVAR(carryPFH)] call cba_fnc_removePerFrameHandler; + +[GVAR(carrier), "ACE_Sandbag", false] call EFUNC(Common,setForceWalkStatus); +[GVAR(carrier), "DefaultAction", GVAR(carrier) getVariable [QGVAR(drop), -1]] call EFUNC(Common,removeActionEventHandler); + +call EFUNC(interaction,hideMouseHint); + +GVAR(carrier) playActionNow "PutDown"; + +[{ + _this setVariable [QGVAR(usingSandbag), false]; +}, GVAR(carrier), 1.5, 0.5] call EFUNC(common,waitAndExecute); + +[{ + private ["_sandBag", "_position", "_direction"]; + _position = getPosASL GVAR(sandBag); + _direction = getDir GVAR(sandBag); + + deleteVehicle GVAR(sandBag); + + _sandBag = createVehicle ["ACE_SandbagObject", [0,0,0], [], 0, "NONE"]; + _sandBag enableSimulationGlobal true; + _sandBag setPosASL _position; + _sandBag setDir _direction; + + GVAR(sandBag) = objNull; + GVAR(carrier) = objNull; +}, [], 1.0, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/functions/fnc_handleScrollWheel.sqf b/addons/sandbag/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..2b831f5cdc --- /dev/null +++ b/addons/sandbag/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,24 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg + * Handles sandbag rotation + * + * Arguments: + * 0: scroll amount + * + * Return Value: + * handled + * + * Example: + * 1.2 call ace_sandbag_fnc_handleScrollWheel; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_scroll); + +if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(deployPFH) == -1) exitWith { false }; + +GVAR(deployDirection) = GVAR(deployDirection) + (_scroll * 5); + +true diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf new file mode 100644 index 0000000000..360a18983a --- /dev/null +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -0,0 +1,35 @@ +/* + * Author: Ruthberg + * Pick up sandbag + * + * Arguments: + * 0: sandbag + * 1: unit + * + * Return Value: + * None + * + * Example: + * [_sandbag, _unit] call ace_sandbag_fnc_pickup; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_sandbag,_unit); + +_unit playActionNow "PutDown"; + +_unit setVariable [QGVAR(usingSandbag), true]; +[{ + PARAMS_2(_sandbag,_unit); + _unit setVariable [QGVAR(usingSandbag), false]; + deletevehicle _sandbag; + + // Force physx update + { + _x setPosASL (getPosASL _x); + } forEach (_unit nearObjects ["ACE_SandbagObject", 5]); + + [_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory); +}, [_sandbag, _unit], 1.5, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/functions/script_component.hpp b/addons/sandbag/functions/script_component.hpp new file mode 100644 index 0000000000..1d6f10c806 --- /dev/null +++ b/addons/sandbag/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\sandbag\script_component.hpp" \ No newline at end of file diff --git a/addons/sandbag/script_component.hpp b/addons/sandbag/script_component.hpp new file mode 100644 index 0000000000..8737beef07 --- /dev/null +++ b/addons/sandbag/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT sandbag +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_SANDBAG + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SANDBAG + #define DEBUG_SETTINGS DEBUG_SETTINGS_SANDBAG +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml new file mode 100644 index 0000000000..034a6bfdbb --- /dev/null +++ b/addons/sandbag/stringtable.xml @@ -0,0 +1,149 @@ + + + + + Sandbag + Sandsack + Мешок с песком + Worek z piaskiem + Sandbag + Sac de sable + Pytel s pískem + Sacco di Sabbia + Homokzsák + + + Sandbag (empty) + Sandsack (leer) + Мешок с песком (пустой) + Worek na piasek + Sandbag (empty) + Sac de sable (vide) + Pytel na písek (prázdný) + Sacco di Sabbia (Vuoto) + Homokzsák (üres) + + + Cannot build here + Nicht möglich + Установка на этом месте невозможна + Nie można tu budować + Cannot build here + Impossible de construire ici + Zde nelze postavit + Impossibile costruire qui + Nem teheted ide + + + Pick up Sandbag + Sandsack abbauen + Взять мешок с песком + Zabierz worek + Pick up sandbag + Prendre sac de sable + Zvednout pytel + Prendi Sacco di Sabbia + Homokzsák felvétele + + + Carry Sandbag + Sandsack tragen + Нести мешок с песком + Przenieś worek + Carry sandbag + Porter sac de sable + Nést pytel + Trasporta Sacco di Sabbia + Homokzsák cipelése + + + End Carrying + Tragen beenden + Завершить переноску + Zostaw worek + End carrying + Arreter de porter + Položit + Fine Trasporto + Cipelés abbahagyása + + + Drop Sandbag + Sandsack ablegen + Положить мешок + Upuść worek + Drop sandbag + Lacher sac de sable + Odložit pytel + Lascia Sacco di Sabbia + Homokzsák eldobása + + + Confirm Deployment + Aufbauen + Подтвердить установку + Potwierdź rozłożenie + Confirm Deployment + Confirmer Déploiement + Potvrdit Položení + Conferma Posizionamento + Lerak + + + Cancel Deployment + Abbrechen + Отменить установку + Anuluj rozłożenie + Cancel Deployment + Annuler Déploiement + Zrušit Položení + Cancella Posizionamento + Visszavonás + + + Deploy Sandbag + Sandsack aufbauen + Установить мешок с песком + Rozłóż worek z piaskiem + Deploy sandbag + Deployer sac de sable + Umístit pytel + Posiziona Sacco di Sabbia + Homokzsák lerakása + + + Sandbag Box + Sandsack Kiste + Ящик мешков с песком + Skrzynia worków na piasek + Sandbag box + Caisse de sacs de sable + Bedna na pytle s pískem + Contenitore Sacchi di Sabbia + Homokzsákos láda + + + Here is no sand + Hier gibt es keinen Sand + Здесь нет песка + Tu nie ma piasku + Here is no sand + Pas de sable ici + Tady není písek + Qui non cè Sabbia + Itt nincs homok + + + + Modifier, rotates + + Modifikator, drehen + + Modificador, girar + + Modificateur, tourner + + Modificatore, rotazione + + Modifikátor, otočit + + Változtatás, forgatás + + Modyfikator, obrót + + Modificador, rotaciona + + Bращать + + + \ No newline at end of file diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp index b3d4ef8806..81756249e1 100644 --- a/addons/scopes/CfgVehicles.hpp +++ b/addons/scopes/CfgVehicles.hpp @@ -11,7 +11,7 @@ class CfgVehicles { showDisabled = 0; priority = 0.2; //icon = QUOTE(PATHTOF(UI\...)); // TODO - exceptions[] = {"notOnMap", "isNotInside"}; + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; }; diff --git a/addons/sitting/$PBOPREFIX$ b/addons/sitting/$PBOPREFIX$ new file mode 100644 index 0000000000..419bf892be --- /dev/null +++ b/addons/sitting/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\sitting \ No newline at end of file diff --git a/addons/sitting/ACE_Settings.hpp b/addons/sitting/ACE_Settings.hpp new file mode 100644 index 0000000000..d4ebb61e83 --- /dev/null +++ b/addons/sitting/ACE_Settings.hpp @@ -0,0 +1,7 @@ +class ACE_Settings { + class GVAR(enable) { + value = 1; + typeName = "BOOL"; + displayName = CSTRING(Enable); + }; +}; diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp new file mode 100644 index 0000000000..1e804e8cc9 --- /dev/null +++ b/addons/sitting/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +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_clientInit)); + }; +}; + +class Extended_Killed_EventHandlers { + class CAManBase { + class ADDON { + killed = QUOTE(_this call DFUNC(handleInterrupt)); + }; + }; +}; diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp new file mode 100644 index 0000000000..c915750d02 --- /dev/null +++ b/addons/sitting/CfgVehicles.hpp @@ -0,0 +1,128 @@ +class CfgVehicles { + class ACE_Module; + class ACE_ModuleSitting: ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE"; + displayName = CSTRING(ModuleDisplayName); + function = QFUNC(moduleInit); + scope = 2; + isGlobal = 1; + icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa)); + class Arguments { + class enable { + displayName = CSTRING(Enable); + typeName = "BOOL"; + defaultValue = 1; + }; + }; + class ModuleDescription { + description = CSTRING(ModuleDescription); + }; + }; + + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class GVAR(Stand) { + displayName = CSTRING(Stand); + condition = QUOTE(_player call FUNC(canStand)); + exceptions[] = {"isNotSitting"}; + statement = QUOTE(_player call FUNC(stand)); + priority = 0; + icon = PATHTOF(UI\stand_ca.paa); + }; + }; + }; + + #define MACRO_SEAT_ACTION \ + class ACE_Actions { \ + class ACE_MainActions { \ + displayName = ECSTRING(interaction,MainAction); \ + selection = ""; \ + distance = 1.25; \ + condition = "true"; \ + class GVAR(Sit) { \ + displayName = CSTRING(Sit); \ + condition = QUOTE(_this call FUNC(canSit)); \ + statement = QUOTE(_this call FUNC(sit)); \ + showDisabled = 0; \ + priority = 0; \ + icon = PATHTOF(UI\sit_ca.paa); \ + }; \ + }; \ + }; + + class ThingX; + // Folding Chair + class Land_CampingChair_V1_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, -0.1, -0.45}; + GVAR(sitRotation) = 10; + }; + // Camping Chair + class Land_CampingChair_V2_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, -0.1, -0.45}; + GVAR(sitRotation) = 45; + }; + // Chair (Plastic) + class Land_ChairPlastic_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 90; + GVAR(sitPosition[]) = {0, 0, -0.5}; + GVAR(sitRotation) = 5; + }; + // Chair (Wooden) + class Land_ChairWood_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, -0.05, 0}; + GVAR(sitRotation) = 75; + }; + // Office Chair + class Land_OfficeChair_01_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, 0, -0.6}; + GVAR(sitRotation) = 15; + }; + // Rattan Chair + class Land_RattanChair_01_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) + GVAR(sitRotation) = 2; + }; + // Field Toilet + class Land_FieldToilet_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, 0.75, -1.1}; + GVAR(sitRotation) = 10; + }; + // Toiletbox + class Land_ToiletBox_F: ThingX { + XEH_ENABLED; + MACRO_SEAT_ACTION + GVAR(canSit) = 1; + GVAR(sitDirection) = 180; + GVAR(sitPosition[]) = {0, 0.75, -1.1}; + GVAR(sitRotation) = 10; + }; +}; diff --git a/addons/sitting/README.md b/addons/sitting/README.md new file mode 100644 index 0000000000..41db2ce8ee --- /dev/null +++ b/addons/sitting/README.md @@ -0,0 +1,10 @@ +ace_sitting +=============== + +The Sitting module introduces ability to sit on different chairs and toilets. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Jonpas] (https://github.com/jonpas) diff --git a/addons/sitting/UI/Icon_Module_Sitting_ca.paa b/addons/sitting/UI/Icon_Module_Sitting_ca.paa new file mode 100644 index 0000000000..1d4bbccb70 Binary files /dev/null and b/addons/sitting/UI/Icon_Module_Sitting_ca.paa differ diff --git a/addons/sitting/UI/sit_ca.paa b/addons/sitting/UI/sit_ca.paa new file mode 100644 index 0000000000..1191c3b1e0 Binary files /dev/null and b/addons/sitting/UI/sit_ca.paa differ diff --git a/addons/sitting/UI/stand_ca.paa b/addons/sitting/UI/stand_ca.paa new file mode 100644 index 0000000000..08c136f668 Binary files /dev/null and b/addons/sitting/UI/stand_ca.paa differ diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf new file mode 100644 index 0000000000..e2bf1b23c1 --- /dev/null +++ b/addons/sitting/XEH_clientInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +// Exit on Headless +if !(hasInterface) exitWith {}; + +// Add interaction menu exception +["isNotSitting", {!((_this select 0) getVariable [QGVAR(isSitting), false])}] call EFUNC(common,addCanInteractWithCondition); + +// Handle interruptions +["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); +["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); +["SetSurrendered", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf new file mode 100644 index 0000000000..86912ada6b --- /dev/null +++ b/addons/sitting/XEH_preInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(canSit); +PREP(canStand); +PREP(getRandomAnimation); +PREP(handleInterrupt); +PREP(moduleInit); +PREP(sit); +PREP(stand); + +ADDON = true; diff --git a/addons/sitting/config.cpp b/addons/sitting/config.cpp new file mode 100644 index 0000000000..f12fa530fa --- /dev/null +++ b/addons/sitting/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"Jonpas"}; + authorUrl = "https://github.com/jonpas"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ACE_Settings.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf new file mode 100644 index 0000000000..c9762e265c --- /dev/null +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -0,0 +1,22 @@ +/* + * Author: Jonpas + * Check if the player can sit down. + * + * Arguments: + * 0: Seat + * 1: Player + * + * Return Value: + * Can Sit Down + * + * Example: + * [seat, player] call ace_sitting_fnc_canSit; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_seat,_player); + +// Sitting enabled, is seat object and not occupied +(GVAR(enable) && {getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {isNil{_seat getVariable QGVAR(seatOccupied)}}) diff --git a/addons/sitting/functions/fnc_canStand.sqf b/addons/sitting/functions/fnc_canStand.sqf new file mode 100644 index 0000000000..4549b9891b --- /dev/null +++ b/addons/sitting/functions/fnc_canStand.sqf @@ -0,0 +1,21 @@ +/* + * Author: Jonpas + * Check if the player can stand up (is in sitting position). + * + * Arguments: + * Player + * + * Return Value: + * Can Stand Up + * + * Example: + * player call ace_sitting_fnc_canStand; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_player); + +// Sitting +(_player getVariable [QGVAR(isSitting),false]) diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf new file mode 100644 index 0000000000..c83d230a90 --- /dev/null +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -0,0 +1,49 @@ +/* + * Author: Jonpas + * Gets a random animations from the list. + * + * Arguments: + * None + * + * Return Value: + * Random Animation + * + * Example: + * _animation = call ace_sitting_fnc_getRandomAnimation; + * + * Public: No + */ +#include "script_component.hpp" + +private ["_animations"]; + +// Animations Pool +_animations = [ + "HubSittingChairUA_idle1", + "HubSittingChairUA_idle2", + "HubSittingChairUA_idle3", + "HubSittingChairUA_move1", + "HubSittingChairUB_idle1", + "HubSittingChairUB_idle2", + "HubSittingChairUB_idle3", + "HubSittingChairUB_move1", + "HubSittingChairUC_idle1", + "HubSittingChairUC_idle2", + "HubSittingChairUC_idle3", + "HubSittingChairUC_move1", + "HubSittingChairA_idle1", + "HubSittingChairA_idle2", + "HubSittingChairA_idle3", + "HubSittingChairA_move1", + "HubSittingChairB_idle1", + "HubSittingChairB_idle2", + "HubSittingChairB_idle3", + "HubSittingChairB_move1", + "HubSittingChairC_idle1", + "HubSittingChairC_idle2", + "HubSittingChairC_idle3", + "HubSittingChairC_move1" +]; + +// Select random animation +(_animations select (floor (random (count _animations)))) diff --git a/addons/sitting/functions/fnc_handleInterrupt.sqf b/addons/sitting/functions/fnc_handleInterrupt.sqf new file mode 100644 index 0000000000..8127e924ef --- /dev/null +++ b/addons/sitting/functions/fnc_handleInterrupt.sqf @@ -0,0 +1,22 @@ +/* + * Author: Jonpas + * Handles interruptions of sitting, like killed or unconsciousness. + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * Example: + * [player] call ace_sitting_fnc_handleInterrupt; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_player); + +if (_player getVariable [QGVAR(isSitting), false]) then { + [_player] call FUNC(stand); +}; diff --git a/addons/sitting/functions/fnc_moduleInit.sqf b/addons/sitting/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..25da5be347 --- /dev/null +++ b/addons/sitting/functions/fnc_moduleInit.sqf @@ -0,0 +1,21 @@ +/* + * Author: Jonpas + * Initializes the Sitting module. + * + * Arguments: + * Whatever the module provides. + * + * Return Value: + * None + */ +#include "script_component.hpp" + +if !(isServer) exitWith {}; + +PARAMS_3(_logic,_units,_activated); + +if !(_activated) exitWith {}; + +[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule); + +diag_log text "[ACE]: Sitting Module Initialized."; diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf new file mode 100644 index 0000000000..1944cb2190 --- /dev/null +++ b/addons/sitting/functions/fnc_sit.sqf @@ -0,0 +1,63 @@ +/* + * Author: Jonpas + * Sits down the player. + * + * Arguments: + * 0: Seat + * 1: Player + * + * Return Value: + * None + * + * Example: + * [seat, player] call ace_sitting_fnc_sit; + * + * Public: No + */ +#include "script_component.hpp" + +private ["_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_sitDirectionVisual"]; + +PARAMS_2(_seat,_player); + +// Set global variable for standing up +GVAR(seat) = _seat; + +// Overwrite weird position, because Arma decides to set it differently based on current animation/stance... +_player switchMove "amovpknlmstpsraswrfldnon"; + +// Read config +_configFile = configFile >> "CfgVehicles" >> typeOf _seat; +_sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection)); +_sitPosition = getArray (_configFile >> QGVAR(sitPosition)); +_sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber (_configFile >> QGVAR(sitRotation))} else {45}; // Apply default if config entry not present + +// Get random animation and perform it (before moving player to ensure correct placement) +[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); + +// Set direction and position +_player setDir _sitDirection; +_player setPosASL (_seat modelToWorld _sitPosition) call EFUNC(common,positionToASL); + +// Set variables +_player setVariable [QGVAR(isSitting), true]; +_seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat + +// Add rotation control PFH +_sitDirectionVisual = getDirVisual _player; // Needed for precision and issues with using above directly +[{ + EXPLODE_3_PVT(_this select 0,_player,_sitDirectionVisual,_sitRotation); + + // Remove PFH if not sitting any more + if !(_player getVariable [QGVAR(isSitting), false]) exitWith { + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + // Set direction to boundary when passing it + if (getDir _player > _sitDirectionVisual + _sitRotation) exitWith { + _player setDir (_sitDirectionVisual + _sitRotation); + }; + if (getDir _player < _sitDirectionVisual - _sitRotation) exitWith { + _player setDir (_sitDirectionVisual - _sitRotation); + }; +}, 0, [_player, _sitDirectionVisual, _sitRotation]] call cba_fnc_addPerFrameHandler; diff --git a/addons/sitting/functions/fnc_stand.sqf b/addons/sitting/functions/fnc_stand.sqf new file mode 100644 index 0000000000..df1ee6f169 --- /dev/null +++ b/addons/sitting/functions/fnc_stand.sqf @@ -0,0 +1,26 @@ +/* + * Author: Jonpas + * Stands up the player. + * + * Arguments: + * Player + * + * Return Value: + * None + * + * Example: + * player call ace_sitting_fnc_stand; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_player); + +// Restore animation +[_player, "", 2] call EFUNC(common,doAnimation); + +// Set variables to nil +_player setVariable [QGVAR(isSitting), nil]; +GVAR(seat) setVariable [QGVAR(seatOccupied), nil, true]; +GVAR(seat) = nil; diff --git a/addons/sitting/functions/script_component.hpp b/addons/sitting/functions/script_component.hpp new file mode 100644 index 0000000000..1360c56284 --- /dev/null +++ b/addons/sitting/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\sitting\script_component.hpp" \ No newline at end of file diff --git a/addons/sitting/script_component.hpp b/addons/sitting/script_component.hpp new file mode 100644 index 0000000000..cbc8800cd2 --- /dev/null +++ b/addons/sitting/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT sitting +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_SITTING + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SITTING + #define DEBUG_SETTINGS DEBUG_SETTINGS_SITTING +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml new file mode 100644 index 0000000000..16eb84c59f --- /dev/null +++ b/addons/sitting/stringtable.xml @@ -0,0 +1,22 @@ + + + + + Sit Down + Usiądź + + + Stand Up + Wstań + + + Enable Sitting + + + Sitting + + + This module allows you to disable the ability to sit on chairs and toilets. + + + \ No newline at end of file diff --git a/addons/spottingscope/$PBOPREFIX$ b/addons/spottingscope/$PBOPREFIX$ new file mode 100644 index 0000000000..abab69909d --- /dev/null +++ b/addons/spottingscope/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\spottingscope \ No newline at end of file diff --git a/addons/spottingscope/CfgEventHandlers.hpp b/addons/spottingscope/CfgEventHandlers.hpp new file mode 100644 index 0000000000..81b3aef30e --- /dev/null +++ b/addons/spottingscope/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; + +class Extended_Init_EventHandlers { + class ACE_SpottingScopeObject { + class ADDON { + init = QUOTE(_this call DEFUNC(dragging,initObject)); + }; + }; +}; diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp new file mode 100644 index 0000000000..d42946214b --- /dev/null +++ b/addons/spottingscope/CfgVehicles.hpp @@ -0,0 +1,132 @@ + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(place) { + displayName = CSTRING(Placedown); + condition = QUOTE([ARR_2(_player,'ACE_SpottingScope')] call EFUNC(common,hasItem)); + statement = QUOTE([ARR_2(_player,'ACE_SpottingScope')] call FUNC(place)); + showDisabled = 0; + priority = 2; + icon = PATHTOF(UI\w_spottingscope_ca.paa); + }; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_SpottingScope: Item_Base_F { + author[] = {"Rocko", "Scubaman3D"}; + scope = 2; + scopeCurator = 2; + displayName = CSTRING(DisplayName); + vehicleClass = "Items"; + class TransportItems { + class ACE_SpottingScope { + name = "ACE_SpottingScope"; + count = 1; + }; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Item_SpottingScope,2); + }; + }; + + class LandVehicle; + class StaticWeapon: LandVehicle { + class Turrets; + class ACE_Actions { + class ACE_MainActions {}; + }; + }; + class StaticATWeapon: StaticWeapon { + class Turrets: Turrets { + class MainTurret; + }; + class ACE_Actions: ACE_Actions{ + class ACE_MainActions: ACE_MainActions {}; + }; + }; + class ACE_SpottingScopeObject: StaticATWeapon { + XEH_ENABLED; + scope = 1; + side = 1; + typicalCargo[] = {"Soldier"}; + displayName = CSTRING(DisplayName); + model = PATHTOF(data\spottingscope.p3d); + mapSize = 0.5; + transportSoldier = 0; + getInAction = "GetInLow"; + getOutAction = "GetOutLow"; + class Turrets: Turrets { + class MainTurret: MainTurret { + minTurn = -45; + maxTurn = 45; + initTurn = 0; + minElev = -10; + maxElev = 40; + initElev = 0; + + weapons[] = {}; + magazines[] = {}; + gunnerOpticsColor[] = {1,1,1,1}; + gunnerOpticsmodel = PATHTOF(data\m144_optic.p3d); + gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"}; + gunnerOutOpticsShowCursor = 0; + gunnerOpticsShowCursor = 0; + gunnerAction = "gunner_static_low01"; + gunnerGetInAction = "GetInLow"; + gunnerGetOutAction = "GetOutLow"; + gunnerForceOptics = 0; + ejectDeadGunner = 0; + class ViewGunner { + initAngleX = 5; + minAngleX = -30; + maxAngleX = 30; + initAngleY = 0; + minAngleY = -100; + maxAngleY = 100; + initFov = 0.7; + minFov = 0.7; + maxFov = 0.7; + }; + class ViewOptics { + initAngleX = 0; + minAngleX = -30; + maxAngleX = 30; + initAngleY = 0; + minAngleY = -100; + maxAngleY = 100; + initFov = 0.014812; + minFov = 0.014812; + maxFov = 0.014812; + }; + }; + }; + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition[]) = {0,1,0}; + EGVAR(dragging,dragDirection) = 0; + class ACE_Actions: ACE_Actions{ + class ACE_MainActions: ACE_MainActions { + selection = "osaveze"; + class ACE_Pickup { + selection = ""; + displayName = CSTRING(PickUp); + distance = 5; + condition = QUOTE((alive _target) && (count (crew _target) == 0)); + statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\w_spottingscope_ca.paa); + }; + }; + }; + }; +}; diff --git a/addons/spottingscope/CfgWeapons.hpp b/addons/spottingscope/CfgWeapons.hpp new file mode 100644 index 0000000000..4ba078c057 --- /dev/null +++ b/addons/spottingscope/CfgWeapons.hpp @@ -0,0 +1,17 @@ + +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_SpottingScope: ACE_ItemCore { + scope = 2; + displayName = CSTRING(DisplayName); + descriptionShort = ""; + picture = PATHTOF(UI\w_spottingscope_ca.paa); + model = PATHTOF(data\w_spottingscope.p3d); + + class ItemInfo: InventoryItem_Base_F { + mass = 40; + }; + }; +}; diff --git a/addons/spottingscope/README.md b/addons/spottingscope/README.md new file mode 100644 index 0000000000..ea9f2b819d --- /dev/null +++ b/addons/spottingscope/README.md @@ -0,0 +1,10 @@ +ace_spottingscope +=============== + +Adds a spotting scope. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/spottingscope/UI/w_spottingscope_ca.paa b/addons/spottingscope/UI/w_spottingscope_ca.paa new file mode 100644 index 0000000000..b6edc66697 Binary files /dev/null and b/addons/spottingscope/UI/w_spottingscope_ca.paa differ diff --git a/addons/spottingscope/XEH_postInit.sqf b/addons/spottingscope/XEH_postInit.sqf new file mode 100644 index 0000000000..421c54b49f --- /dev/null +++ b/addons/spottingscope/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" diff --git a/addons/spottingscope/XEH_preInit.sqf b/addons/spottingscope/XEH_preInit.sqf new file mode 100644 index 0000000000..306884e595 --- /dev/null +++ b/addons/spottingscope/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(pickup); +PREP(place); + +ADDON = true; diff --git a/addons/spottingscope/config.cpp b/addons/spottingscope/config.cpp new file mode 100644 index 0000000000..a615e5da79 --- /dev/null +++ b/addons/spottingscope/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_SpottingScope"}; + weapons[] = {"ACE_SpottingScope"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_apl", "ace_interaction"}; + author[] = {"Rocko", "Scubaman3D", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" \ No newline at end of file diff --git a/addons/spottingscope/data/PSO_ring.paa b/addons/spottingscope/data/PSO_ring.paa new file mode 100644 index 0000000000..e1502aa5e2 Binary files /dev/null and b/addons/spottingscope/data/PSO_ring.paa differ diff --git a/addons/spottingscope/data/ace_reticle.rvmat b/addons/spottingscope/data/ace_reticle.rvmat new file mode 100644 index 0000000000..0d1df7e696 --- /dev/null +++ b/addons/spottingscope/data/ace_reticle.rvmat @@ -0,0 +1,9 @@ +ambient[] = {0, 0, 0, 1}; +diffuse[] = {0, 0, 0, 1}; +forcedDiffuse[] = {0, 0, 0, 0}; +emmisive[] = {1, 1, 1, 1}; +specular[] = {0, 0, 0, 1}; +specularPower = 0; +renderFlags[] = {"NoZWrite"}; +PixelShaderID = "Normal"; +VertexShaderID = "Basic"; diff --git a/addons/spottingscope/data/ace_ssvzs.p3d b/addons/spottingscope/data/ace_ssvzs.p3d new file mode 100644 index 0000000000..a4d58c13f4 Binary files /dev/null and b/addons/spottingscope/data/ace_ssvzs.p3d differ diff --git a/addons/spottingscope/data/m144_ca.paa b/addons/spottingscope/data/m144_ca.paa new file mode 100644 index 0000000000..4d7a63ba0a Binary files /dev/null and b/addons/spottingscope/data/m144_ca.paa differ diff --git a/addons/spottingscope/data/m144_optic.p3d b/addons/spottingscope/data/m144_optic.p3d new file mode 100644 index 0000000000..15ad16fe92 Binary files /dev/null and b/addons/spottingscope/data/m144_optic.p3d differ diff --git a/addons/spottingscope/data/model.cfg b/addons/spottingscope/data/model.cfg new file mode 100644 index 0000000000..e7beb2f2c1 --- /dev/null +++ b/addons/spottingscope/data/model.cfg @@ -0,0 +1,49 @@ +class CfgSkeletons +{ + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + class ace_spottingscope_skeleton: Default { + isDiscrete = 1; + skeletonInherit = "Default"; + skeletonBones[] = { + "otocvez","", + "otochlaven","otocvez" + }; + }; +}; +class CfgModels { + class Default { + sectionsInherit = ""; + sections[] = {}; + skeletonName = ""; + }; + class spottingscope: Default { + skeletonName = "ace_spottingscope_skeleton"; + sectionsInherit = "Default"; + class animations { + class mainTurret { + type = "rotationY"; + source = "mainTurret"; + selection = "otocvez"; + axis = "osaveze"; + minValue = "rad -360"; + maxValue = "rad +360"; + angle0 = "rad -360"; + angle1 = "rad +360"; + }; + class mainGun { + type = "rotationX"; + source = "mainGun"; + selection = "otochlaven"; + axis = "osahlavne"; + minValue = "rad -360"; + maxValue = "rad +360"; + angle0 = "rad -360"; + angle1 = "rad +360"; + }; + }; + }; +}; diff --git a/addons/spottingscope/data/optic_ssvzs.p3d b/addons/spottingscope/data/optic_ssvzs.p3d new file mode 100644 index 0000000000..ffb5834768 Binary files /dev/null and b/addons/spottingscope/data/optic_ssvzs.p3d differ diff --git a/addons/spottingscope/data/scopering.paa b/addons/spottingscope/data/scopering.paa new file mode 100644 index 0000000000..ecf236b025 Binary files /dev/null and b/addons/spottingscope/data/scopering.paa differ diff --git a/addons/spottingscope/data/sniper_peri.rvmat b/addons/spottingscope/data/sniper_peri.rvmat new file mode 100644 index 0000000000..35069be267 --- /dev/null +++ b/addons/spottingscope/data/sniper_peri.rvmat @@ -0,0 +1,78 @@ +ambient[] = {1.0, 1.0, 1.0, 1.0}; +diffuse[] = {1.0, 1.0, 1.0, 1.0}; +forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {0.0, 0.0, 0.0, 1.0}; +specular[] = {0.0, 0.0, 0.0, 0.0}; +specularPower = 0.0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 { + texture = "z\ace\addons\spottingscope\data\sniper_peri_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 { + texture = "z\ace\addons\apl\data\metal4_weapons_vehicles_int_512_dt.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {6.0, 0.0, 0.0}; + up[] = {0.0, 6.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 { + texture = "#(argb,8,8,3)color(0,1,1,1)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage5 { + texture = "z\ace\addons\spottingscope\data\sniper_peri_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture = "#(ai,32,128,1)fresnel(1.58,0.01)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; diff --git a/addons/spottingscope/data/sniper_peri_co.paa b/addons/spottingscope/data/sniper_peri_co.paa new file mode 100644 index 0000000000..6466dc6d82 Binary files /dev/null and b/addons/spottingscope/data/sniper_peri_co.paa differ diff --git a/addons/spottingscope/data/sniper_peri_nohq.paa b/addons/spottingscope/data/sniper_peri_nohq.paa new file mode 100644 index 0000000000..cc84eab64d Binary files /dev/null and b/addons/spottingscope/data/sniper_peri_nohq.paa differ diff --git a/addons/spottingscope/data/sniper_peri_smdi.paa b/addons/spottingscope/data/sniper_peri_smdi.paa new file mode 100644 index 0000000000..4cb94ce7d1 Binary files /dev/null and b/addons/spottingscope/data/sniper_peri_smdi.paa differ diff --git a/addons/spottingscope/data/spot_scope.rvmat b/addons/spottingscope/data/spot_scope.rvmat new file mode 100644 index 0000000000..294d3a75b2 --- /dev/null +++ b/addons/spottingscope/data/spot_scope.rvmat @@ -0,0 +1,78 @@ +ambient[] = {1.0, 1.0, 1.0, 1.0}; +diffuse[] = {1.0, 1.0, 1.0, 1.0}; +forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {0.0, 0.0, 0.0, 1.0}; +specular[] = {0.0, 0.0, 0.0, 0.0}; +specularPower = 0.0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 { + texture = "z\ace\addons\spottingscope\data\spot_scope_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 { + texture = "z\ace\addons\apl\data\plastic_512_dt.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {6.0, 0.0, 0.0}; + up[] = {0.0, 6.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 { + texture = "#(argb,8,8,3)color(0,1,1,1)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage5 { + texture = "z\ace\addons\spottingscope\data\spot_scope_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture = "#(ai,32,128,1)fresnel(1.58,0.01)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; diff --git a/addons/spottingscope/data/spot_scope_co.paa b/addons/spottingscope/data/spot_scope_co.paa new file mode 100644 index 0000000000..c0168053a3 Binary files /dev/null and b/addons/spottingscope/data/spot_scope_co.paa differ diff --git a/addons/spottingscope/data/spot_scope_nohq.paa b/addons/spottingscope/data/spot_scope_nohq.paa new file mode 100644 index 0000000000..674ad1d0ec Binary files /dev/null and b/addons/spottingscope/data/spot_scope_nohq.paa differ diff --git a/addons/spottingscope/data/spot_scope_smdi.paa b/addons/spottingscope/data/spot_scope_smdi.paa new file mode 100644 index 0000000000..b6e2d763fe Binary files /dev/null and b/addons/spottingscope/data/spot_scope_smdi.paa differ diff --git a/addons/spottingscope/data/spot_scope_tripod.rvmat b/addons/spottingscope/data/spot_scope_tripod.rvmat new file mode 100644 index 0000000000..0403471e5a --- /dev/null +++ b/addons/spottingscope/data/spot_scope_tripod.rvmat @@ -0,0 +1,79 @@ +ambient[] = {1.0, 1.0, 1.0, 1.0}; +diffuse[] = {1.0, 1.0, 1.0, 1.0}; +forcedDiffuse[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {0.0, 0.0, 0.0, 1.0}; +specular[] = {0.0, 0.0, 0.0, 0.0}; +specularPower = 0.0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 { + texture = "z\ace\addons\spottingscope\data\spot_scope_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 { + texture = "z\ace\addons\apl\data\metal4_weapons_vehicles_int_512_dt.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {6.0, 0.0, 0.0}; + up[] = {0.0, 6.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 { + texture = "#(argb,8,8,3)color(0,1,1,1)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; +class Stage5 { + texture = "z\ace\addons\spottingscope\data\spot_scope_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture = "#(ai,32,128,1)fresnel(1.58,0.01)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1.0, 0.0, 0.0}; + up[] = {0.0, 1.0, 0.0}; + dir[] = {0.0, 0.0, 0.0}; + pos[] = {0.0, 0.0, 0.0}; + }; +}; diff --git a/addons/spottingscope/data/spottingscope.p3d b/addons/spottingscope/data/spottingscope.p3d new file mode 100644 index 0000000000..c4e0363dcf Binary files /dev/null and b/addons/spottingscope/data/spottingscope.p3d differ diff --git a/addons/spottingscope/data/w_spottingscope.p3d b/addons/spottingscope/data/w_spottingscope.p3d new file mode 100644 index 0000000000..040ef5158e Binary files /dev/null and b/addons/spottingscope/data/w_spottingscope.p3d differ diff --git a/addons/spottingscope/functions/fnc_pickup.sqf b/addons/spottingscope/functions/fnc_pickup.sqf new file mode 100644 index 0000000000..3730068092 --- /dev/null +++ b/addons/spottingscope/functions/fnc_pickup.sqf @@ -0,0 +1,30 @@ +/* + * Author: Rocko, Ruthberg + * + * Pick up spotting scope + * + * Arguments: + * 0: spotting scope + * 1: unit + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_spottingScope,_unit); + +if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { + _unit playMove "AmovPercMstpSrasWrflDnon_diary"; +}; + +[{ + PARAMS_2(_spottingScope,_unit); + + [_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory); + deleteVehicle _spottingScope; + +}, [_spottingScope, _unit], 1, 0]call EFUNC(common,waitAndExecute); diff --git a/addons/spottingscope/functions/fnc_place.sqf b/addons/spottingscope/functions/fnc_place.sqf new file mode 100644 index 0000000000..4967151748 --- /dev/null +++ b/addons/spottingscope/functions/fnc_place.sqf @@ -0,0 +1,41 @@ +/* + * Author: Rocko, Ruthberg + * + * Place down spotting scope + * + * Arguments: + * 0: unit + * 1: scope class + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_unit,_scopeClass); + +_unit removeItem _scopeClass; + +if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { + _unit playMove "AmovPercMstpSrasWrflDnon_diary"; +}; + +[{ + PARAMS_1(_unit); + + private ["_direction", "_position", "_spottingScope"]; + _direction = getDir _unit; + _position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0.02]; + + _spottingScope = "ACE_SpottingScopeObject" createVehicle [0, 0, 0]; + _spottingScope setDir _direction; + _spottingScope setPosASL _position; + if ((getPosATL _spottingScope select 2) - (getPos _spottingScope select 2) < 1E-5) then { + _spottingScope setVectorUp (surfaceNormal (position _spottingScope)); + }; + _unit reveal _spottingScope; + +}, [_unit], 1, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/spottingscope/functions/script_component.hpp b/addons/spottingscope/functions/script_component.hpp new file mode 100644 index 0000000000..504cde2ca6 --- /dev/null +++ b/addons/spottingscope/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\spottingscope\script_component.hpp" \ No newline at end of file diff --git a/addons/spottingscope/script_component.hpp b/addons/spottingscope/script_component.hpp new file mode 100644 index 0000000000..11bd94a6e5 --- /dev/null +++ b/addons/spottingscope/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT spottingscope +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_SPOTTINGSCOPE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SPOTTINGSCOPE + #define DEBUG_SETTINGS DEBUG_SETTINGS_SPOTTINGSCOPE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml new file mode 100644 index 0000000000..7fc7fdee58 --- /dev/null +++ b/addons/spottingscope/stringtable.xml @@ -0,0 +1,38 @@ + + + + + Spotting Scope + Teleskop + Зрительная труба + Teleskop + Spotting Scope + Téléscope de visée + Zaměřovací Dalekohled + Spotting Scope + Megfigyelő távcső + + + Pick up Spotting Scope + Teleskop aufnehmen + Поднять зрительная трубу + Zabierz teleskop + Pick up Spotting Scope + Prendre téléscope de visée + Zvednout Zaměřovací dalekohled + Raccogli spottingscope + Mefgigy. távcső felvétele + + + Place Spotting Scope + Teleskop aufstellen + Установить зрительная трубу + Ustaw teleskop + Place Spotting Scope + Placer téléscope de visée + Položit Zaměřovací dalekohled + Posiziona spottingscope + Megfigy. távcső elhelyezése + + + \ No newline at end of file diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 16582b3d6d..4656504545 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -30,82 +30,96 @@ System zmiany stron Sistema de cambio de unidad Einheiten-Switch-System? + Systém výměny stran Switch to West? Zmiana na Zachód? ¿Cambiar a Oeste? Nach BLUFOR wechseln? + Přesunout k BLUFOR? Allow switching to west units? Pozwolić zmieniać graczom stronę na Zachód? ¿Permitir cambios a unidades del Oeste? Erlaube das Wechseln zu BLUFOR-Einheiten? + Povolit přesun k BLUFOR? Switch to East? Zmiana na Wschód? ¿Cambiar a Este? Nach OPFOR wechseln? + Přesunout k OPFOR? Allow switching to east units? Pozwolić zmieniać graczom stronę na Wschód? ¿Permitir cambios a unidades del Este? Erlaube das Wechseln zu OPFOR-Einheiten? + Povolit přesun k OPFOR? Switch to Independent? Zmiana na Ruch Oporu? ¿Cambiar a Independiente? Nach INDFOR wechseln? + Přesunout k INDFOR? Allow switching to independent units? Pozwolić zmieniać stronę na Ruch Oporu? ¿Permitir cambios a unidades Independientes? Erlaube das Wechseln zu INDFOR-Einheiten? + Povolit přesun k INDFOR? Switch to Civilian? Zmiana na Cywili? ¿Cambiar a Civil? Nach CIVILIAN wechseln? + Přesunout k CIVILISTŮM? Allow switching to civilian units? Pozwolić zmieniać stronę na Cywili? ¿Permitir cambios a unidades Civiles Erlaube das Wechseln zu CIVILIAN-Einheiten? + Povolit přesun k CIVILISTŮM? Enable Safe Zone? Aktywuj bezp. strefę? ¿Habilitar zona segura? Aktiviere Sicherheitszone? + Povolit bezpečné oblasti? Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone. Aktywuje bezpieczną strefę wokół jednostek przeciwnika. Gracze nie mogą zmieniać strony wewnątrz tej strefy. Habilita una zona segura alrededor de las unidades enemigas. Los jugadores no pueden cambiar de unidad dentro de la zona segura. Aktiviere eine Sicherheitszone um feindliche Einheiten? Spieler können nicht zu Einheiten in der Sicherheitszone wechseln. + Povolit bezpečnou zónu kolem nepřátelských jednotek? Hráči se nemohou změnit strany/jednotky uvnitř bezpečné zóny. Safe Zone Radius Promień bezp. strefy Radio de la zona segura Sicherheitszonenradius + Oblast bezpečné zóny The safe zone around players from a different team. Default: 200 Promień bezpiecznej strefy wokół graczy z innych drużyn. Domyślnie: 200 La zona segura alrededor de los jugadores de distintos equipos. Por defecto: 200 Die Sicherheitszone um Spieler von einem anderen Team. Standard: 200 + Bezpečná zóna kolem hráče z jiných týmu. Výchozí: 200 + Tento modul umožňuje přepínání mazi dostupnými stranami. - + \ No newline at end of file diff --git a/addons/tacticalladder/$PBOPREFIX$ b/addons/tacticalladder/$PBOPREFIX$ new file mode 100644 index 0000000000..7d7735bb9e --- /dev/null +++ b/addons/tacticalladder/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\tacticalladder \ No newline at end of file diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp new file mode 100644 index 0000000000..737cae5e43 --- /dev/null +++ b/addons/tacticalladder/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp new file mode 100644 index 0000000000..d180ccae40 --- /dev/null +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -0,0 +1,96 @@ + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_TacticalLadders { + displayName = CSTRING(Deploy); + condition = QUOTE((backpack ACE_player) == QUOTE(QUOTE(ACE_TacticalLadder_Pack))); + statement = QUOTE(call FUNC(deployTL)); + exceptions[] = {}; + showDisabled = 1; + priority = 4; + }; + }; + }; + + class Bag_Base; + class ACE_TacticalLadder_Pack: Bag_Base { + scope = 2; + displayName = CSTRING(DisplayName); + descriptionShort = ""; + model = PATHTOF(data\ace_tacticalladder_pack.p3d); + picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa); + maximumLoad = 0; + mass = 50; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportBackpacks { + class _xx_ACE_TacticalLadder_Pack { + backpack = "ACE_TacticalLadder_Pack"; + count = 3; + }; + }; + }; + + class House; + class ACE_Tactical_Ladder: House { + XEH_ENABLED; + displayName = CSTRING(DisplayName); + class DestructionEffects {}; + model = PATHTOF(data\ace_tacticalladder.p3d); + animated = 1; + autocenter = 0; + featureSize = 12; + ladders[] = {{"start","end"}}; + class AnimationSources { + class rotate { + source = "user"; + animPeriod = 1e-007; + }; + class extract_1 { + source = "user"; + animPeriod = 1e-007; + }; + class extract_2: extract_1 {}; + class extract_3: extract_1 {}; + class extract_4: extract_1 {}; + class extract_5: extract_1 {}; + class extract_6: extract_1 {}; + class extract_7: extract_1 {}; + class extract_8: extract_1 {}; + class extract_9: extract_1 {}; + class extract_10: extract_1 {}; + class extract_11: extract_1 {}; + }; + class ACE_Actions { + class ACE_MainActions { + selection = "roadway"; + distance = 5; + condition = "true"; + class ACE_PickUp { + selection = ""; + displayName = CSTRING(Pickup); + distance = 4; + condition = QUOTE((backpack ACE_player) == ''); + statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickupTL)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + }; + class ACE_Position { + selection = ""; + displayName = CSTRING(Position); + distance = 4; + condition = "true"; + statement = QUOTE([ARR_2(_target,_player)] call FUNC(positionTL)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + }; + }; + }; + }; +}; diff --git a/addons/tacticalladder/README.md b/addons/tacticalladder/README.md new file mode 100644 index 0000000000..ff6b8ecad3 --- /dev/null +++ b/addons/tacticalladder/README.md @@ -0,0 +1,10 @@ +ace_tacticalladder +=============== + +Adds a packable tactical ladder. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/tacticalladder/UI/ace_tactical_ladder_pack_ca.paa b/addons/tacticalladder/UI/ace_tactical_ladder_pack_ca.paa new file mode 100644 index 0000000000..8388a8e605 Binary files /dev/null and b/addons/tacticalladder/UI/ace_tactical_ladder_pack_ca.paa differ diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf new file mode 100644 index 0000000000..f0091ec7fa --- /dev/null +++ b/addons/tacticalladder/XEH_postInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +GVAR(ladder) = objNull; +GVAR(cancelTime) = 0; +GVAR(currentStep) = 3; +GVAR(currentAngle) = 0; + +// Cancel tactical ladder deployment if the interact menu is opened +["interactMenuOpened", { + if ((ACE_time > GVAR(cancelTime)) && !isNull GVAR(ladder)) then { + GVAR(ladder) call FUNC(cancelTLdeploy); + }; +}] call EFUNC(common,addEventHandler); + +[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler); diff --git a/addons/tacticalladder/XEH_preInit.sqf b/addons/tacticalladder/XEH_preInit.sqf new file mode 100644 index 0000000000..e434974c9a --- /dev/null +++ b/addons/tacticalladder/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(cancelTLdeploy); +PREP(confirmTLdeploy); +PREP(deployTL); +PREP(handleScrollWheel); +PREP(pickupTL); +PREP(positionTL); + +ADDON = true; diff --git a/optionals/compat_hlc_ar15/config.cpp b/addons/tacticalladder/config.cpp similarity index 54% rename from optionals/compat_hlc_ar15/config.cpp rename to addons/tacticalladder/config.cpp index 51e42dc040..02740639fe 100644 --- a/optionals/compat_hlc_ar15/config.cpp +++ b/addons/tacticalladder/config.cpp @@ -5,10 +5,11 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_ar15"}; - author[]={"Ruthberg"}; + requiredAddons[] = {"ace_apl", "ace_interaction"}; + author[] = {"Rocko", "Ruthberg"}; VERSION_CONFIG; }; }; -#include "CfgWeapons.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/tacticalladder/data/ace_ladder_co.paa b/addons/tacticalladder/data/ace_ladder_co.paa new file mode 100644 index 0000000000..d550108068 Binary files /dev/null and b/addons/tacticalladder/data/ace_ladder_co.paa differ diff --git a/addons/tacticalladder/data/ace_tacticalladder.p3d b/addons/tacticalladder/data/ace_tacticalladder.p3d new file mode 100644 index 0000000000..3126601117 Binary files /dev/null and b/addons/tacticalladder/data/ace_tacticalladder.p3d differ diff --git a/addons/tacticalladder/data/ace_tacticalladder_pack.p3d b/addons/tacticalladder/data/ace_tacticalladder_pack.p3d new file mode 100644 index 0000000000..e7b565ff11 Binary files /dev/null and b/addons/tacticalladder/data/ace_tacticalladder_pack.p3d differ diff --git a/addons/tacticalladder/data/model.cfg b/addons/tacticalladder/data/model.cfg new file mode 100644 index 0000000000..1fc8840d4f --- /dev/null +++ b/addons/tacticalladder/data/model.cfg @@ -0,0 +1,283 @@ +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + class ace_tacticalladder_skeleton: Default { + isDiscrete = 0; + skeletonInherit = ""; + skeletonBones[] = { + "base","", + "1","base", + "2","1", + "3","2", + "4","3", + "5","4", + "6","5", + "7","6", + "8","7", + "9","8", + "10","9", + "11","10", + "step","11" + }; + }; + class OFP2_ManSkeleton { + isDiscrete = 0; + skeletonInherit = ""; + skeletonBones[] = { + "Pelvis","", + "Spine","Pelvis", + "Spine1","Spine", + "Spine2","Spine1", + "Spine3","Spine2", + "Camera","Pelvis", + "weapon","Spine1", + "launcher","Spine1", + //Head skeleton in hierarchy + "neck","Spine3", + "neck1","neck", + "head","neck1", + "HeadCutScene","head", + "jaw","head", + "chin","head", + "jaw_rf","head", + "jaw_rm","head", + "jaw_rs","head", + "jaw_lf","head", + "jaw_lm","head", + "jaw_ls","head", + "ear_r","head", + "ear_l","head", + "lip_lc","head", + "lip_lwlb","head", + "lip_lwlf","head", + "lip_lwm","head", + "lip_lwrf","head", + "lip_lwrb","head", + "lip_rc","head", + "lip_uprb","head", + "lip_uprf","head", + "lip_upm","head", + "lip_uplf","head", + "lip_uplb","head", + "nose_tip","head", + "nose_r","head", + "nose_l","head", + "zig_lt","head", + "zig_lm","head", + "zig_lb","head", + "zig_rt","head", + "zig_rm","head", + "zig_rb","head", + "cheek_r","head", + "cheek_l","head", + "eyebrow_lb","head", + "eyebrow_lm","head", + "eyebrow_lf","head", + "corr","head", + "eyebrow_rf","head", + "eyebrow_rm","head", + "eyebrow_rb","head", + "eye_upr","head", + "eye_lwr","head", + "eye_upl","head", + "eye_lwl","head", + "cheek_rf","head", + "cheek_rm","head", + "cheek_rb","head", + "cheek_lf","head", + "cheek_lm","head", + "cheek_lb","head", + "forehead_l","head", + "forehead_m","head", + "forehead_r","head", + "l_eye","head", + "r_eye","head", + "l_pupila","head", + "r_pupila","head", + "neck_t","head", + "neck_b","head", + "neck_r","head", + "neck_l","head", + "tongue_b","head", + "tongue_m","head", + "tongue_f","head", + //Left upper side + "LeftShoulder","Spine3", + "LeftArm","LeftShoulder", + "LeftArmRoll","LeftArm", + "LeftForeArm","LeftArmRoll", + "LeftForeArmRoll","LeftForeArm", + "LeftHand","LeftForeArmRoll", + "LeftHandRing","LeftHand", + "LeftHandRing1","LeftHandRing", + "LeftHandRing2","LeftHandRing1", + "LeftHandRing3","LeftHandRing2", + "LeftHandPinky1","LeftHandRing", + "LeftHandPinky2","LeftHandPinky1", + "LeftHandPinky3","LeftHandPinky2", + "LeftHandMiddle1","LeftHand", + "LeftHandMiddle2","LeftHandMiddle1", + "LeftHandMiddle3","LeftHandMiddle2", + "LeftHandIndex1","LeftHand", + "LeftHandIndex2","LeftHandIndex1", + "LeftHandIndex3","LeftHandIndex2", + "LeftHandThumb1","LeftHand", + "LeftHandThumb2","LeftHandThumb1", + "LeftHandThumb3","LeftHandThumb2", + //Right upper side + "RightShoulder","Spine3", + "RightArm","RightShoulder", + "RightArmRoll","RightArm", + "RightForeArm","RightArmRoll", + "RightForeArmRoll","RightForeArm", + "RightHand","RightForeArmRoll", + "RightHandRing","RightHand", + "RightHandRing1","RightHandRing", + "RightHandRing2","RightHandRing1", + "RightHandRing3","RightHandRing2", + "RightHandPinky1","RightHandRing", + "RightHandPinky2","RightHandPinky1", + "RightHandPinky3","RightHandPinky2", + "RightHandMiddle1","RightHand", + "RightHandMiddle2","RightHandMiddle1", + "RightHandMiddle3","RightHandMiddle2", + "RightHandIndex1","RightHand", + "RightHandIndex2","RightHandIndex1", + "RightHandIndex3","RightHandIndex2", + "RightHandThumb1","RightHand", + "RightHandThumb2","RightHandThumb1", + "RightHandThumb3","RightHandThumb2", + //Left lower side + "LeftUpLeg","Pelvis", + "LeftUpLegRoll","LeftUpLeg", + "LeftLeg","LeftUpLegRoll", + "LeftLegRoll","LeftLeg", + "LeftFoot","LeftLegRoll", + "LeftToeBase","LeftFoot", + //Right lower side + "RightUpLeg","Pelvis", + "RightUpLegRoll","RightUpLeg", + "RightLeg","RightUpLegRoll", + "RightLegRoll","RightLeg", + "RightFoot","RightLegRoll", + "RightToeBase","RightFoot" + }; + // location of pivot points (local axes) for hierarchical animation + //pivotsModel="ca\Anims\Characters\Data\Skeleton\SkeletonPivots.p3d"; + pivotsModel=""; + }; +}; + +class CfgModels { + class Default { + sectionsInherit=""; + sections[] = {""}; + skeletonName = ""; + }; + class ace_tacticalladder { + skeletonName = "ace_tacticalladder_skeleton"; + sections[] = { "roadway" }; + sectionsInherit = ""; + class Animations { + class rotate { + type = "rotation"; + source = ""; + sourceAddress = "clamp"; + selection = "base"; + axis = "axis_rotate"; + minValue = 0; + maxValue = 90; + angle0="rad 0"; + angle1="rad +90"; + }; + class extract_1 { + type = "translation"; + source = ""; + selection = "1"; + axis = "axis_1"; + animPeriod = 0; + minValue = 0; + maxValue = 1; + minPhase = 0; + maxPhase = 1; + offset0 = 0; + offset1 = 0.82; + }; + class extract_2: extract_1 { + selection = "2"; + axis = "axis_2"; + }; + class extract_3: extract_1 { + selection = "3"; + axis = "axis_3"; + }; + class extract_4: extract_1 { + selection = "4"; + axis = "axis_4"; + }; + class extract_5: extract_1 { + selection = "5"; + axis = "axis_5"; + }; + class extract_6: extract_1 { + selection = "6"; + axis = "axis_6"; + }; + class extract_7: extract_1 { + selection = "7"; + axis = "axis_7"; + }; + class extract_8: extract_1 { + selection = "8"; + axis = "axis_8"; + }; + class extract_9: extract_1 { + selection = "9"; + axis = "axis_9"; + }; + class extract_10: extract_1 { + selection = "10"; + axis = "axis_10"; + }; + class extract_11: extract_1 { + selection = "11"; + axis = "axis_11"; + }; + }; + }; + class ArmaMan: Default { + htMin=60; + htMax=1800; + afMax=30; + mfMax=0; + mFact=1; + tBody=37; + sections[]= { + "osobnost", + "Head_Injury", + "Body_Injury", + "l_leg_injury", + "l_arm_injury", + "r_arm_injury", + "r_leg_injury", + "injury_body", + "injury_legs", + "injury_hands", + "clan", + "clan_sign", + "Camo", + "CamoB", + "Camo1", + "Camo2", + "personality", + "hl", + "injury_head" + }; + skeletonName="OFP2_ManSkeleton"; + }; + class ace_tacticalladder_pack: ArmaMan { + }; +}; \ No newline at end of file diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf new file mode 100644 index 0000000000..63a97d97e9 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -0,0 +1,32 @@ +/* + * Author: Rocko, Ruthberg + * Cancel tactical ladder deployment + * + * Arguments: + * 0: ladder + * + * Return Value: + * None + * + * Example: + * [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy; + * + * Public: No + */ +#include "script_component.hpp" + +#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] + +PARAMS_1(_ladder); + +detach _ladder; +_ladder animate ["rotate", 0]; +{ + _ladder animate [_x, 0]; +} forEach __ANIMS; + +call EFUNC(interaction,hideMouseHint); +[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); +[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); + +GVAR(ladder) = objNull; diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf new file mode 100644 index 0000000000..93263c6aa0 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -0,0 +1,32 @@ +/* + * Author: Rocko, Ruthberg + * Confirm tactical ladder deployment + * + * Arguments: + * 0: ladder + * + * Return Value: + * Success? + * + * Example: + * [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_ladder); + +private ["_pos1", "_pos2"]; +_pos1 = getPosASL GVAR(ladder); +_pos2 = (GVAR(ladder) modelToWorld (GVAR(ladder) selectionPosition "check2")) call EFUNC(common,positionToASL); +if (lineIntersects [_pos1, _pos2, GVAR(ladder)]) exitWith { false }; + +call EFUNC(interaction,hideMouseHint); +[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); +[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); + +detach _ladder; +GVAR(ladder) = objNull; + +true diff --git a/addons/tacticalladder/functions/fnc_deployTL.sqf b/addons/tacticalladder/functions/fnc_deployTL.sqf new file mode 100644 index 0000000000..7ad135ca90 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_deployTL.sqf @@ -0,0 +1,34 @@ +/* + * Author: Rocko, Ruthberg + * Deploy tactical ladder + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_tacticalladder_fnc_deployTL; + * + * Public: No + */ +#include "script_component.hpp" + +if ((backpack ACE_player) != "ACE_TacticalLadder_Pack") exitWith {}; + +private ["_pos", "_offset", "_ladder"]; + +removeBackpack ACE_player; + +_pos = ACE_player modelToWorld [0,0,0]; +_offset = if ((ACE_player call CBA_fnc_getUnitAnim select 0) == "prone") then { 1 } else {0.8}; +_pos set [0, (_pos select 0) + (sin (direction ACE_player) * _offset)]; +_pos set [1, (_pos select 1) + (cos (direction ACE_player) * _offset)]; +_pos set [2, [ACE_player] call CBA_fnc_realHeight]; + +_ladder = "ACE_Tactical_Ladder" createVehicle _pos; +_ladder setPos _pos; +_ladder setDir (direction ACE_player); + +ACE_player reveal _ladder; diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..d08cb6e208 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,48 @@ +/* + * Author: Rocko, Ruthberg + * Handles lengthening and tilting of the ladder + * + * Arguments: + * Amount scrolled + * + * Return Value: + * Handled + * + * Example: + * 1 call ace_tacticalladder_fnc_handleScrollWheel; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_scroll); + +if (isNull GVAR(ladder)) exitWith { false }; + +if (GETMVAR(ACE_Modifier,0) == 0) then { + private ["_currentStep"]; + // Lengthening + if (_scroll > 0) then { + _currentStep = GVAR(currentStep); + if (_currentStep == 11) exitWith {}; + _currentStep = _currentStep + 1; + if (GVAR(ladder) animationPhase (format["extract_%1", _currentStep]) == 0) then { + GVAR(ladder) animate [format["extract_%1", _currentStep], 1]; + GVAR(currentStep) = _currentStep; + }; + }; + if (_scroll < 0) then { + _currentStep = GVAR(currentStep); + if (_currentStep == 3) exitWith {}; + if (GVAR(ladder) animationPhase (format["extract_%1", _currentStep]) == 1) then { + GVAR(ladder) animate [format["extract_%1", _currentStep], 0]; + GVAR(currentStep) = _currentStep - 1; + }; + }; +} else { + // Tilting + GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 90; + GVAR(ladder) animate ["rotate", GVAR(currentAngle)]; +}; + +true \ No newline at end of file diff --git a/addons/tacticalladder/functions/fnc_pickupTL.sqf b/addons/tacticalladder/functions/fnc_pickupTL.sqf new file mode 100644 index 0000000000..c603f1feca --- /dev/null +++ b/addons/tacticalladder/functions/fnc_pickupTL.sqf @@ -0,0 +1,26 @@ +/* + * Author: Rocko, Ruthberg + * Pick up tactical ladder + * + * Arguments: + * 0: ladder + * 1: unit + * + * Return Value: + * Success? + * + * Example: + * [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL; + * + * Public: No + */ +#include "script_component.hpp" + +if ((backpack ACE_player) != "") exitWith { false }; + +PARAMS_2(_ladder,_unit); + +deleteVehicle _ladder; +_unit addBackpack "ACE_TacticalLadder_Pack"; + +true diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf new file mode 100644 index 0000000000..103792c851 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -0,0 +1,52 @@ +/* + * Author: Rocko, Ruthberg + * Position tactical ladder + * + * Arguments: + * 0: sandbag + * 1: unit + * + * Return Value: + * None + * + * Example: + * [_ladder, _unit] call ace_tacticalladder_fnc_positionTL; + * + * Public: No + */ +#include "script_component.hpp" + +#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] + +PARAMS_2(_ladder,_unit); + +{ + _ladder animate [_x, 0]; +} forEach __ANIMS; + +_unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03"; +_ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of player + +_ladder animate ["rotate", 0]; +{ + _ladder animate [_x, 1]; +} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) + +GVAR(ladder) = _ladder; +GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling +GVAR(currentStep) = 3; +GVAR(currentAngle) = 0; + +[localize LSTRING(Deploy), localize LSTRING(Drop), localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint); + +ACE_player setVariable [QGVAR(Deploy), + [ACE_player, "DefaultAction", + {!isNull GVAR(ladder)}, + {GVAR(ladder) call FUNC(confirmTLdeploy);} +] call EFUNC(common,AddActionEventHandler)]; + +ACE_player setVariable [QGVAR(Cancel), + [ACE_player, "zoomtemp", + {!isNull GVAR(ladder)}, + {GVAR(ladder) call FUNC(cancelTLdeploy);} +] call EFUNC(common,AddActionEventHandler)]; diff --git a/addons/tacticalladder/functions/script_component.hpp b/addons/tacticalladder/functions/script_component.hpp new file mode 100644 index 0000000000..53bdb8be62 --- /dev/null +++ b/addons/tacticalladder/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\tacticalladder\script_component.hpp" \ No newline at end of file diff --git a/addons/tacticalladder/script_component.hpp b/addons/tacticalladder/script_component.hpp new file mode 100644 index 0000000000..9905216ae7 --- /dev/null +++ b/addons/tacticalladder/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT tacticalladder +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_TACTICALLADDER + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_TACTICALLADDER + #define DEBUG_SETTINGS DEBUG_SETTINGS_TACTICALLADDER +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml new file mode 100644 index 0000000000..962cc9e6ae --- /dev/null +++ b/addons/tacticalladder/stringtable.xml @@ -0,0 +1,67 @@ + + + + + Telescopic Ladder + Teleskopleiter + Телескопическая лестница + Drabina teleskopowa + Escalera telescópica + Telescopic Ladder + Teleskopický žebřík + Telescopic Ladder + Telescopic Ladder + + + Deploy ladder + Leiter aufbauen + Установить лестницу + Rozłóż drabinę + Despelgar escalera + Deploy ladder + Rozložit žebřík + Deploy ladder + Deploy ladder + + + Drop ladder + Leiter ablegen + Положить лестницу + Zostaw drabinę + Soltar escalera + Drop ladder + Položit žebřík + Drop ladder + Drop ladder + + + Adjust ladder + Leiter einstellen + Reguluj drabinę + Upravit žebřík + Ajustar escalera + + + Position ladder + Leiter positionieren + Перенести лестницу + Postaw drabinę + Colocar escalera + Position ladder + Umístit žebřík + Position ladder + Position ladder + + + Pickup ladder + Leiter aufnehmen + Взять лестницу + Zabierz drabinę + Recoger escalera + Pickup ladder + Vzít žebřík + Pickup ladder + Pickup ladder + + + \ No newline at end of file diff --git a/addons/tripod/$PBOPREFIX$ b/addons/tripod/$PBOPREFIX$ new file mode 100644 index 0000000000..a374eb7994 --- /dev/null +++ b/addons/tripod/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\tripod diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp new file mode 100644 index 0000000000..ed5027f094 --- /dev/null +++ b/addons/tripod/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; + +class Extended_Init_EventHandlers { + class ACE_TripodObject { + class ADDON { + init = QUOTE(_this call DEFUNC(dragging,initObject)); + }; + }; +}; diff --git a/addons/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp new file mode 100644 index 0000000000..714d2cafb1 --- /dev/null +++ b/addons/tripod/CfgVehicles.hpp @@ -0,0 +1,92 @@ + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(place) { + displayName = CSTRING(Placedown); + condition = QUOTE([ARR_2(_player,'ACE_Tripod')] call EFUNC(common,hasItem)); + statement = QUOTE([ARR_2(_player,'ACE_Tripod')] call FUNC(place)); + showDisabled = 0; + priority = 2; + icon = PATHTOF(UI\w_sniper_tripod_ca.paa); + }; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_Tripod: Item_Base_F { + author[] = {"Rocko", "Scubaman3D"}; + scope = 2; + scopeCurator = 2; + displayName = CSTRING(DisplayName); + vehicleClass = "Items"; + class TransportItems { + class ACE_Tripod { + name = "ACE_Tripod"; + count = 1; + }; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Tripod,2); + }; + }; + + class thingX; + class ACE_TripodObject: thingX { + XEH_ENABLED; + scope = 2; + displayName = CSTRING(DisplayName); + model = PATHTOF(data\sniper_tripod.p3d); + class AnimationSources { + class slide_down_tripod { + source = "user"; + animPeriod = 0.02; + initPhase = 0; + minValue = 0; + maxValue = 1; + }; + class retract_leg_1: slide_down_tripod {}; + class retract_leg_2: retract_leg_1 {}; + class retract_leg_3: retract_leg_2 {}; + }; + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition[]) = {0,1,0}; + EGVAR(dragging,dragDirection) = 0; + class ACE_Actions { + class ACE_MainActions { + selection = ""; + distance = 5; + condition = "true"; + class ACE_Pickup { + selection = ""; + displayName = CSTRING(PickUp); + distance = 5; + condition = "true"; + statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\w_sniper_tripod_ca.paa); + }; + class ACE_Adjust { + selection = ""; + displayName = CSTRING(Adjust); + distance = 5; + condition = "true"; + statement = QUOTE(_target call FUNC(adjust)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + icon = PATHTOF(UI\w_sniper_tripod_ca.paa); + }; + }; + }; + }; +}; diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp new file mode 100644 index 0000000000..cc7521f0f2 --- /dev/null +++ b/addons/tripod/CfgWeapons.hpp @@ -0,0 +1,18 @@ + +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_Tripod: ACE_ItemCore { + author[] = {"Rocko", "Scubaman3D"}; + scope = 2; + displayName = CSTRING(DisplayName); + descriptionShort = ""; + model = PATHTOF(data\w_sniper_tripod.p3d); + picture = PATHTOF(UI\w_sniper_tripod_ca.paa); + + class ItemInfo: InventoryItem_Base_F { + mass = 40; + }; + }; +}; diff --git a/addons/tripod/README.md b/addons/tripod/README.md new file mode 100644 index 0000000000..1f4282f1ab --- /dev/null +++ b/addons/tripod/README.md @@ -0,0 +1,10 @@ +ace_tripod +=============== + +Adds a packable tripod. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/tripod/UI/w_sniper_tripod_ca.paa b/addons/tripod/UI/w_sniper_tripod_ca.paa new file mode 100644 index 0000000000..a7ea6b0c31 Binary files /dev/null and b/addons/tripod/UI/w_sniper_tripod_ca.paa differ diff --git a/addons/tripod/XEH_postInit.sqf b/addons/tripod/XEH_postInit.sqf new file mode 100644 index 0000000000..706aaecae9 --- /dev/null +++ b/addons/tripod/XEH_postInit.sqf @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +GVAR(adjuster) = objNull; +GVAR(adjusting) = false; +GVAR(adjustPFH) = -1; + +GVAR(height) = 0; + +// Cancel adjustment if interact menu opens +["interactMenuOpened", { + if (GVAR(adjustPFH) != -1 && GVAR(adjusting)) then { + GVAR(adjusting) = false; + }; +}] call EFUNC(common,addEventHandler); + +[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler); diff --git a/addons/tripod/XEH_preInit.sqf b/addons/tripod/XEH_preInit.sqf new file mode 100644 index 0000000000..f27b707936 --- /dev/null +++ b/addons/tripod/XEH_preInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(adjust); +PREP(handleScrollWheel); +PREP(pickup); +PREP(place); + +ADDON = true; diff --git a/addons/tripod/config.cpp b/addons/tripod/config.cpp new file mode 100644 index 0000000000..80379019c3 --- /dev/null +++ b/addons/tripod/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_Tripod"}; + weapons[] = {"ACE_Tripod"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"Rocko", "Scubaman3D", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" \ No newline at end of file diff --git a/addons/tripod/data/model.cfg b/addons/tripod/data/model.cfg new file mode 100644 index 0000000000..ee81d26c8e --- /dev/null +++ b/addons/tripod/data/model.cfg @@ -0,0 +1,64 @@ +class CfgSkeletons +{ + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + class ace_snipertripod_skeleton: Default { + isDiscrete = 1; + skeletonInherit = "Default"; + skeletonBones[] = { + "tripod","", + "leg_1","tripod", + "leg_2","tripod", + "leg_3","tripod", + "leg_slide_1","leg_1", + "leg_slide_2","leg_2", + "leg_slide_3","leg_3" + }; + }; +}; +class CfgModels { + class Default { + sectionsInherit = ""; + sections[] = {}; + skeletonName = ""; + }; + class sniper_tripod: Default { + skeletonName = "ace_snipertripod_skeleton"; + sectionsInherit = "Default"; + class animations { + class slide_down_tripod { + type = "translation"; + selection = "tripod"; + source = "user"; + begin = "slide_end"; + end = "slide_start"; + memory = 1; + minValue = 0; + maxValue = 1; + sourceAddress = "clamp"; + offset0 = 0; + offset1 = 0.855; + }; + class retract_leg_1: slide_down_tripod { + selection = "leg_slide_1"; + begin = "slide_end_1"; + end = "slide_start_1"; + offset0 = 0; + offset1 = -0.95; + }; + class retract_leg_2: retract_leg_1 { + selection = "leg_slide_2"; + begin = "slide_end_2"; + end = "slide_start_2"; + }; + class retract_leg_3: retract_leg_2 { + selection = "leg_slide_3"; + begin = "slide_end_3"; + end = "slide_start_3"; + }; + }; + }; +}; diff --git a/addons/tripod/data/nipertripod_co.paa b/addons/tripod/data/nipertripod_co.paa new file mode 100644 index 0000000000..6f0cbaacf0 Binary files /dev/null and b/addons/tripod/data/nipertripod_co.paa differ diff --git a/addons/tripod/data/sniper_tripod.p3d b/addons/tripod/data/sniper_tripod.p3d new file mode 100644 index 0000000000..5deab7067a Binary files /dev/null and b/addons/tripod/data/sniper_tripod.p3d differ diff --git a/addons/tripod/data/w_sniper_tripod.p3d b/addons/tripod/data/w_sniper_tripod.p3d new file mode 100644 index 0000000000..65758ea807 Binary files /dev/null and b/addons/tripod/data/w_sniper_tripod.p3d differ diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf new file mode 100644 index 0000000000..ce50d38cf0 --- /dev/null +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -0,0 +1,43 @@ +/* + * Author: Ruthberg + * + * Adjust tripod height + * + * Arguments: + * 0: tripod + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_1(_tripod); + +GVAR(adjuster) = ACE_player; +GVAR(adjusting) = true; + +GVAR(adjustPFH) = [{ + EXPLODE_1_PVT(_this select 0,_tripod); + + if (GVAR(adjuster) != ACE_player || !GVAR(adjusting)) exitWith { + call EFUNC(interaction,hideMouseHint); + [ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Adjust), -1]] call EFUNC(Common,removeActionEventHandler); + [_this select 1] call cba_fnc_removePerFrameHandler; + }; + + { + _tripod animate [_x, 1 - GVAR(height)]; + } foreach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; + +}, 0, [_tripod]] call CBA_fnc_addPerFrameHandler; + +[localize "STR_ACE_Tripod_Done", "", localize "STR_ACE_Tripod_ScrollAction"] call EFUNC(interaction,showMouseHint); + +ACE_player setVariable [QGVAR(Adjust), + [ACE_player, "DefaultAction", + {GVAR(adjustPFH) != -1 && GVAR(adjusting)}, + {GVAR(adjusting) = false;} +] call EFUNC(common,AddActionEventHandler)]; diff --git a/addons/tripod/functions/fnc_handleScrollWheel.sqf b/addons/tripod/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..7399bf0c2c --- /dev/null +++ b/addons/tripod/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,24 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg + * Handles sandbag rotation + * + * Arguments: + * 0: scroll amount + * + * Return Value: + * handled + * + * Example: + * 1.2 call ace_tripod_fnc_handleScrollWheel; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_scroll); + +if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(adjustPFH) == -1) exitWith { false }; + +GVAR(height) = 0 max (GVAR(height) + (_scroll / 20)) min 1; + +true diff --git a/addons/tripod/functions/fnc_pickup.sqf b/addons/tripod/functions/fnc_pickup.sqf new file mode 100644 index 0000000000..f264eb1e2e --- /dev/null +++ b/addons/tripod/functions/fnc_pickup.sqf @@ -0,0 +1,30 @@ +/* + * Author: Rocko, Ruthberg + * + * Pick up tripod + * + * Arguments: + * 0: tripod + * 1: unit + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_tripod,_unit); + +if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { + _unit playMove "AmovPercMstpSrasWrflDnon_diary"; +}; + +[{ + PARAMS_2(_tripod,_unit); + + [_unit, "ACE_Tripod"] call EFUNC(common,addToInventory); + deleteVehicle _tripod; + +}, [_tripod, _unit], 1, 0]call EFUNC(common,waitAndExecute); diff --git a/addons/tripod/functions/fnc_place.sqf b/addons/tripod/functions/fnc_place.sqf new file mode 100644 index 0000000000..5e9c783589 --- /dev/null +++ b/addons/tripod/functions/fnc_place.sqf @@ -0,0 +1,50 @@ +/* + * Author: Rocko, Ruthberg + * + * Place down tripod + * + * Arguments: + * 0: unit + * 1: tripod class + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_unit,_tripodClass); + +_unit removeItem _tripodClass; + +if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { + _unit playMove "AmovPercMstpSrasWrflDnon_diary"; +}; + +[{ + PARAMS_1(_unit); + + private ["_direction", "_position", "_tripod"]; + _direction = getDir _unit; + _position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0.02]; + + _tripod = "ACE_TripodObject" createVehicle [0, 0, 0]; + { + _tripod animate [_x, 1]; + } foreach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; + + [{ + EXPLODE_3_PVT(_this select 0,_tripod,_direction,_position); + if (_tripod animationPhase "slide_down_tripod" == 1) then { + _tripod setDir _direction; + _tripod setPosASL _position; + if ((getPosATL _tripod select 2) - (getPos _tripod select 2) < 1E-5) then { + _tripod setVectorUp (surfaceNormal (position _tripod)); + }; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + }, 0, [_tripod, _direction, _position]] call CBA_fnc_addPerFrameHandler; + +}, [_unit], 1, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/tripod/functions/script_component.hpp b/addons/tripod/functions/script_component.hpp new file mode 100644 index 0000000000..4fa165afc7 --- /dev/null +++ b/addons/tripod/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\tripod\script_component.hpp" \ No newline at end of file diff --git a/addons/tripod/script_component.hpp b/addons/tripod/script_component.hpp new file mode 100644 index 0000000000..b160a14742 --- /dev/null +++ b/addons/tripod/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT tripod +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_TRIPOD + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_TRIPOD + #define DEBUG_SETTINGS DEBUG_SETTINGS_TRIPOD +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml new file mode 100644 index 0000000000..baf20b9854 --- /dev/null +++ b/addons/tripod/stringtable.xml @@ -0,0 +1,51 @@ + + + + + SSWT Kit + Scharfschützenzweibein + Снайперский штатив + Trójnóg snajperski + SSWT Kit + SSWT Kit + SSWT souprava + SSWT Kit + SSWT Kit + + + Place SSWT Kit + Scharfschützenzweibein aufstellen + Установить снайперский штатив + Postaw trójnóg snajperski + Place SSWT Kit + Place SSWT Kit + Rozlož souprava SSWT + Place SSWT Kit + Place SSWT Kit + + + Pick up SSWT Kit + Podnieś trójnóg snajperski + Coger equipo SSWT + Zvednout SSWT soupravu + + + Adjust SSWT Kit + Reguluj trójnóg snajperski + Ajustar equipo SSWT + Regulovat SSWT soupravu + + + Done + Gotowe + Hecho + Hotovo + + + + Modifier, adjust + + Modyfikator, regulacja + + Modificador, ajuste + + Modifikátor, regulace + + + \ No newline at end of file diff --git a/addons/ui/$PBOPREFIX$ b/addons/ui/$PBOPREFIX$ new file mode 100644 index 0000000000..601bbd5f60 --- /dev/null +++ b/addons/ui/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\Addons\ui \ No newline at end of file diff --git a/addons/ui/README.md b/addons/ui/README.md new file mode 100644 index 0000000000..f11027038f --- /dev/null +++ b/addons/ui/README.md @@ -0,0 +1,9 @@ +ace_ui +======= + +Changes the chat contrast on the map to allow easier reading + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + diff --git a/addons/ui/config.cpp b/addons/ui/config.cpp new file mode 100644 index 0000000000..e7ea4b32eb --- /dev/null +++ b/addons/ui/config.cpp @@ -0,0 +1,30 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"VKing"}; + authorUrl = "https://github.com/ACEMod/"; + VERSION_CONFIG; + }; +}; + +class RscText; + +class RscDisplayChat { + class controls { + delete Line; + delete Background; + class CA_Background: RscText { + colorBackground[] = {0.5,0.5,0.5,0.33}; // Make the chat entry field slightly darker + }; + }; +}; + +class RscChatListDefault { + colorBackground[] = {0,0,0,0.5}; // Make the chat background darker + colorMessageProtocol[] = {0.85,0.85,0.85,1}; // And the chat text brighter +}; diff --git a/addons/ui/functions/script_component.hpp b/addons/ui/functions/script_component.hpp new file mode 100644 index 0000000000..656228f742 --- /dev/null +++ b/addons/ui/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\ui\script_component.hpp" diff --git a/addons/ui/script_component.hpp b/addons/ui/script_component.hpp new file mode 100644 index 0000000000..a1a210701c --- /dev/null +++ b/addons/ui/script_component.hpp @@ -0,0 +1,13 @@ +#define COMPONENT ui +#include "\z\ace\Addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_UI + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_UI + #define DEBUG_SETTINGS DEBUG_SETTINGS_UI +#endif + +#include "\z\ace\Addons\main\script_macros.hpp" + diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 3cfbac7518..23d8b380b9 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -138,78 +138,91 @@ Ustawienie blokady pojazdów Configuración del cierre del vehiculo Fahrzeugsperreinstellungen + Nastavení zámku vozidla Lock Vehicle Inventory Zablokuj ekwipunek pojazdu Bloquear inventario del vehículo Sperre Fahrzeuginventar + Inventář zamčeného vozidla Locks the inventory of locked vehicles Blokuje dostęp do ekwipunku pojazdu Bloquea el inventario de los vehículos cerrados Sperrt das Inventar von gesperrten Fahrzeugen + Zamknout inventář u zamčených vozidel Vehicle Starting Lock State Początkowy stan blok. poj. Estado inicial del cierre en vehículos Fahrzeuge spawnen gesperrt + Počáteční stav zámku vozidla Set lock state for all vehicles (removes ambiguous lock states) Ustawia początkowy stan blokady dla wszystkich pojazdów (usuwa dwuznaczne stany blokady) Establece el estado de cierre para todos los vehículos (elimina estados de cierre ambiguos) Setze Sperrstatus für alle Fahrzeuge (entfernt unklare Sperrzustände) + Nastavit stav zámku u všech vozidel (odstraňuje nejednoznačné stavy zámků) As Is Jak jest Está Unverändert + Jak je Locked Zablokowany Cerrado Gesperrt + Zamčeno Unlocked Odblokowany Abierto Offen + Odemčeno Default Lockpick Strength Czas włamywania Durabilidad de la ganzua por defecto Standard-Pick-Stärke + Výchozí síla páčidla Default Time to lockpick (in seconds). Default: 10 Domyślny czas potrzebny na otwarcie pojazdu (w sekundach). Domyślnie: 10 Tiempo por defecto para forzar cerradura (en segundos). Por defecto: 10 Standardzeit um ein Schloss zu knacken (in Sekunden). Standard: 10 + Čas k vypáčení zámku (v sekundách). Výchozí: 10 Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br />Source: vehiclelock.pbo Ustawienia czasu włamywania oraz domyślnego stanu blokady pojazdów. Wyłącza dwuznaczne ustawienia blokady. Moduł ten umożliwia więc np. zamknięcie pojazdów przeciwnika na klucz tak, że gracze bez odpowiedniego sprzętu (wytrycha) nie będą mogli ich używać.<br />Źródło: vehiclelock.pbo Ajustes de la durabilidad de la ganzua y el estado inicial del cierre de los vehículos. Elimina estados de cierre ambiguos.<br />Fuente: vehiclelock.pbo Einstellungen für Pick-Stärke und anfänglichen Fahrzeugsperrzustand. Entfernt unklare Sperrzustände.<br />Quelle: vehiclelock.pbo + Nastavení síly vypáčení a počáteční stav zámku vozidla. Odstraňuje nejednoznačné stavy zámků.<br />Zdroj: vehiclelock.pbo Vehicle Key Assign Przydział kluczyka do pojazdu Asignacion de la llave del vehículo Fahrzeugschlüsselzuweisung + Přidělení klíče k vozidlu Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start.<br />Source: vehiclelock.pbo Zsynchronizuj z pojazdami i graczami. Rozda klucze dla graczy dla każdego zsynchronizowanego pojazdu. Działa tylko na pojazdy obecne na misji od samego początku (postawione w edytorze).<br />Źródło: vehiclelock.pbo Sincronizar con vehiculos y jugadores. Distribuirá llaves personalizadas a los jugadores para todos los vehículos sincronizados. Solo valido para objetos presentes al inicio de la mision.<br />Fuente: vehiclelock.pbo Synchronisiere mit Fahrzeugen und Spielern. Wird eigene Schlüssel an Spieler für jedes synchronisierte Fahrzeuge aushändigen. Nur gültig für am Missionsstart existierende Fahrzeuge.<br />Quelle: vehiclelock.pbo + Synchronizuj s vozidly a hráči. Hráč dostane klíč ke každému synchonizovanému vozidlu. Platné pouze pro objekty přítomné na začátku mise.<br />Zdroj: vehiclelock.pbo - + \ No newline at end of file diff --git a/addons/viewdistance/ACE_Settings.hpp b/addons/viewdistance/ACE_Settings.hpp index 8db97caa52..28ed7471ca 100644 --- a/addons/viewdistance/ACE_Settings.hpp +++ b/addons/viewdistance/ACE_Settings.hpp @@ -2,45 +2,45 @@ class ACE_Settings { class GVAR(enabled) { typeName = "BOOL"; value = 1; - displayName = "$STR_ACE_ViewDistance_enabled_DisplayName"; - description = "$STR_ACE_ViewDistance_enabled_Description"; + displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_Description); }; class GVAR(viewDistanceOnFoot) { typeName = "SCALAR"; isClientSettable = 1; value = 0; // index, NOT value // Can set it to client's actual viewdistance in the init function once ACE_Settings supports numbers (if ever). - values[] = {"$STR_ACE_ViewDistance_videosettings","500","1000","1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf - displayName = "$STR_ACE_ViewDistance_onFoot_DisplayName"; - description = "$STR_ACE_ViewDistance_onFoot_Description"; + values[] = {CSTRING(videosettings),"500","1000","1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf + displayName = CSTRING(onFoot_DisplayName); + description = CSTRING(onFoot_Description); }; class GVAR(viewDistanceLandVehicle) { typeName = "SCALAR"; isClientSettable = 1; value = 0; // index, NOT value - values[] = {"$STR_ACE_ViewDistance_videosettings","500","1000","1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf - displayName = "$STR_ACE_ViewDistance_landVehicle_DisplayName"; - description = "$STR_ACE_ViewDistance_landVehicle_Description"; + values[] = {CSTRING(videosettings),"500","1000","1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf + displayName = CSTRING(landVehicle_DisplayName); + description = CSTRING(landVehicle_Description); }; class GVAR(viewDistanceAirVehicle) { typeName = "SCALAR"; isClientSettable = 1; value = 0; // index, NOT value - values[] = {"$STR_ACE_ViewDistance_videosettings","500","1000","1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf - displayName = "$STR_ACE_ViewDistance_airVehicle_DisplayName"; - description = "$STR_ACE_ViewDistance_airVehicle_Description"; + values[] = {CSTRING(videosettings),"500","1000","1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf + displayName = CSTRING(airVehicle_DisplayName); + description = CSTRING(airVehicle_Description); }; class GVAR(limitViewDistance) { typeName = "SCALAR"; value = 10000; // Value, NOT index. 10000 is the maximum in A3 - displayName = "$STR_ACE_ViewDistance_limit_DisplayName"; - description = "$STR_ACE_ViewDistance_limit_setting"; + displayName = CSTRING(limit_DisplayName); + description = CSTRING(limit_setting); }; class GVAR(objectViewDistanceCoeff) { typeName = "SCALAR"; isClientSettable = 1; value = 0; // index. Actual coefficient is given by functions/fnc_returnObjectCoeff.sqf - values[] = {"$STR_ACE_ViewDistance_object_off","$STR_ACE_ViewDistance_object_verylow","$STR_ACE_ViewDistance_object_low","$STR_ACE_ViewDistance_object_medium","$STR_ACE_ViewDistance_object_high","$STR_ACE_ViewDistance_object_veryhigh"}; - displayName = "$STR_ACE_ViewDistance_object_DisplayName"; - description = "$STR_ACE_ViewDistance_object_Description"; + values[] = {CSTRING(object_off),CSTRING(object_verylow),CSTRING(object_low),CSTRING(object_medium),CSTRING(object_high),CSTRING(object_veryhigh)}; + displayName = CSTRING(object_DisplayName); + description = CSTRING(object_Description); }; }; diff --git a/addons/viewdistance/CfgVehicles.hpp b/addons/viewdistance/CfgVehicles.hpp index 6d0271d149..8e4e30d266 100644 --- a/addons/viewdistance/CfgVehicles.hpp +++ b/addons/viewdistance/CfgVehicles.hpp @@ -4,26 +4,26 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); category = "ACE"; function = QUOTE(DFUNC(initModule)); - displayName = "$STR_ACE_ViewDistance_Module_DisplayName"; + displayName = CSTRING(Module_DisplayName); scope = 2; isGlobal = 1; //icon = ""; // needs an icon class Arguments { class moduleViewDistanceEnabled { - displayName = "$STR_ACE_ViewDistance_enabled_DisplayName"; - description = "$STR_ACE_ViewDistance_enabled_Description"; + displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_Description); typeName = "BOOL"; defaultValue = 1; }; class moduleViewDistanceLimit { - displayName = "$STR_ACE_ViewDistance_limit_DisplayName"; - description = "$STR_ACE_ViewDistance_limit_Description"; + displayName = CSTRING(limit_DisplayName); + description = CSTRING(limit_Description); typeName = "NUMBER"; defaultValue = 10000; }; }; - class ModuleDescription { - description = "$STR_ACE_ViewDistance_Module_Description"; + class ModuleDescription { + description = CSTRING(Module_Description); sync[] = {}; }; }; diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 33d667b65f..9cb7fcde2e 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -4,102 +4,152 @@ View Distance Limiter Ogranicznik zasięgu widzenia + Limitador de distancia de visión + Omezovač dohlednosti Allows limiting maximum view distance that can be set by players. Pozwala ustawić maksymalny limit zasięgu widzenia. + Permite limitar la distancia máxima de visión que se puede establecer por los jugadores. + Umožňuje určit maximální dohlednost, kterou si může hráč nastavit Enable ACE viewdistance Wł. zasięg widzenia ACE + Habilitar distancia de visión ACE + Povolit ACE dohlednost Enables ACE viewdistance Aktywuje możliwość zmiany zasięgu widzenia w menu ustawień ACE + Habilita la distancia de visión ACE + Povolit ACE dohlednost View Distance Limit Limit zas. widzenia + Limite de distancia de visión + Limit dohlednosti Sets the limit for how high clients can raise their view distance (up to 10000) Ustawia maksymalny limit zasięgu widzenia jaki mogą ustawić gracze (do 10000) + Establece el límite de cuan alta pueden aumentar los clientes la distancia de visión (hasta 10.000) + Stanoví limit jak daleko si může client zvýšit dohlednost (do 10000) Limit for client's view distance set here and can overridden by module Limit zasięgu widzenia jest ustawiany tutaj i może zostać nadpisany poprzez moduł + Establecer aqui el límite para la distancia de visión de los clientes. Puede ser anulado por módulo + Limit dohlednoti pro klienty se nastavuje zde a může být potlačeno pomocí modulu. Client View Distance (On Foot) Zasięg widzenia (piechota) + Distancia de visión del cliente (A pie) + Dohlednost (Pěšák) Changes in game view distance when the player is on foot. Zmienia zasięg widzenia kiedy gracz porusza się na piechotę. + Cambia en juego la distancia de visión cuando el jugador va a pie. + Změna dohlednosti pro hráče pokud jde po svých. Client View Distance (Land Vehicle) Zasięg widzenia (pojazdy naziemne) + Distancia de visión del cliente (Vehículo terrestre) + Dohlednost (Pozemní technika) Changes in game view distance when the player is in a land vehicle. Zmienia zasięg widzenia kiedy gracz porusza się pojazdami naziemnymi. + Cambia en juego la distancia de visión cuando el jugador va en un vehículo terrestre. + Změna dohlednosti pro hráče pokud je v pozemní technice. Client View Distance (Air Vehicle) Zasięg widzenia (pojazdy lotnicze) + Distancia de visión del cliente (Vehículo aéreo) + Dohlednost (Vzdušná technika) Changes in game view distance when the player is in an air vehicle. Zmienia zasięg widzenia kiedy gracz porusza się pojazdami lotniczymi. + Cambia en juego la distancia de visión cuando el jugador va en un vehículo aéreo. + Změna dohlednosti pro hráče pokud je ve vzdušné technice. Dynamic Object View Distance Dynamiczny zasięg rysowania obiektów + Distancia de visión dinámica de objetos + Dynamická dohlednost objektů Sets the object view distance as a coefficient of the view distance. Zmienia zasięg rysowania obiektów jako mnożnik zasięgu widzenia. + Establece la distancia de visión de objetos como un coeficiente de la distancia de visión. + Nastaví objekt dohlednosti jako koeficient dohlednosti. Off Wyłącz + Apagada + Vypnout Very Low Bardzo niski + Muy baja + Velmi málo Low Niski + Baja + Málo Medium Średni + Media + Středně High Wysoki + Alta + Hodně Very High Bardzo wysoki + Muy alta + Velmi hodně View Distance: Zasięg widzenia: + Distancia de visión: + Dohlednost: Object View Distance is Zasięg widzenia obiektów wynosi + La distancia de visión de objetos es: + Dohlednost objektů je That option is invalid! The limit is Ta opcja jest nieprawidłowa! Limit wynosi + Esta opción no es valida! El limite es + Tato volba je neplatná! Limit je - + Video Settings Ustawienia wideo + Ajustes de vídeo + Nastavení videa - + \ No newline at end of file diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index 08fa7c97fc..dfb70f4f71 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -110,7 +110,18 @@ if !(hasInterface) exitWith {}; if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; // Statement - [ACE_player] call FUNC(putWeaponAway); + if ((currentWeapon ACE_player) != "") then { + [ACE_player] call FUNC(putWeaponAway); + } else { + private ["_weapon"]; + _weapon = switch (true) do { + case ((primaryWeapon ACE_player) != ""): {primaryWeapon ACE_player}; + case ((handgunWeapon ACE_player) != ""): {handgunWeapon ACE_player}; + case ((secondaryWeapon ACE_player) != ""): {secondaryWeapon ACE_player}; + default {""}; + }; + if (_weapon != "") then {ACE_player selectWeapon _weapon}; + }; true }, {false}, diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index fb6814dd1f..c6f779358f 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -8,6 +8,8 @@ GVAR(humidityShift) = (5 - random 10) / 100; GVAR(wind_period_start_time) = ACE_time; GVAR(rain_period_start_time) = ACE_time; +GVAR(ACE_rain) = rain; + "ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = ACE_time; }; "ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = ACE_time; }; "ACE_MISC_PARAMS" addPublicVariableEventHandler { @@ -41,4 +43,9 @@ simulWeatherSync; [FUNC(updateTemperature), 20, []] call CBA_fnc_addPerFrameHandler; [FUNC(updateHumidity), 20, []] call CBA_fnc_addPerFrameHandler; [FUNC(updateWind), 1, []] call CBA_fnc_addPerFrameHandler; -[FUNC(updateRain), 2, []] call CBA_fnc_addPerFrameHandler; \ No newline at end of file +[FUNC(updateRain), 2, []] call CBA_fnc_addPerFrameHandler; +[{ + if (GVAR(syncRain)) then { + 0 setRain GVAR(ACE_rain); + }; +}, 0, []] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf index ab89ea7225..ced8641f61 100644 --- a/addons/weather/functions/fnc_updateRain.sqf +++ b/addons/weather/functions/fnc_updateRain.sqf @@ -14,12 +14,11 @@ if (!GVAR(syncRain)) exitWith {}; if (!isNil "ACE_RAIN_PARAMS") then { - EXPLODE_3_PVT(ACE_RAIN_PARAMS,_oldRain,_newRain,_period); private ["_periodPosition", "_periodPercent"]; _periodPosition = (ACE_time - GVAR(rain_period_start_time)) min _period; _periodPercent = (_periodPosition / _period) min 1; - 0 setRain (_oldRain + (_newRain - _oldRain) * _periodPercent); + GVAR(ACE_Rain) = (_oldRain + (_newRain - _oldRain) * _periodPercent); }; diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 3443bb4b47..54069425a4 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -18,84 +18,98 @@ Pogoda Clima Wetter + Počasí Multiplayer synchronized ACE weather module Synchronizowana pogoda ACE Modulo climático del ACE sincronizado en multijugador ACE-Wettermodul (synchron im Multiplayer) + Synchronizovat ACE počasí v multiplayeru Weather propagation Zmiany pogody Propagación del clima Wetterübertragung + Změny počasí Enables server side weather propagation Aktywuje zmiany pogody po stronie serwera Permite al servidor controlar la propagación del clima Aktiviere serverseitige Wetterübertragung + Aktivuje změny počasí na straně serveru ACE Weather Pogoda ACE Clima ACE ACE-Wetter + ACE počasí Overrides the default weather (editor, mission settings) with ACE weather (map based) Nadpisuje domyślne ustawienia pogody (edytor, wywiad) przy użyciu pogody ACE (zależna od mapy) Sobreescribe el sistema climático por defecto (editor, ajustes de mision) con clima del ACE (basado en el mapa) Überschreibt das Standardwetter (Editor, Missionseinstellungen) mit dem ACE-Wetter (kartenbasiert) + Přepíše výchozí počasí (editor, nastavení mise) s ACE počasím (podle mapy) Sync Rain Synchronizuj deszcz Sincronizar lluvia Regen synchronisieren + Synchronizuj déšť Synchronizes rain Synchronizuje deszcz Sincroniza la lluvia Synchronisiert den Regen + Synchronizace deště Sync Wind Synchronizuj wiatr Sincronizar viento Wind synchronisieren + Synchronizuj vítr Synchronizes wind Synchronizuje wiatr Sincroniza el viento Synchronisiert den Wind + Synchronizace větru Sync Misc Synchronizuj różne Sincronizar otros Sonstiges synchronisieren + Synchronizuj různé Synchronizes lightnings, rainbow, fog, ... Synchronizuje pioruny, tęcze, mgłę, ... Sincroniza relampagos, arcoiris, niebla ... Synchronisiert Blitze, Regenbögen, Nebel, ... + Synchronizace blesků, duhy, mlhy, ... Update Interval Interwał aktualizacji Intervalo de actualización Aktualisierungsintervall + Interval aktualizace Defines the interval (seconds) between weather updates Określa interwał (sekundy) pomiędzy aktualizacjami pogody Defina el intervalo (en segundos) entre actualizacions de clima Definiert das Intervall (in Sekunden) zwischen Wetteraktualisierungen + Určit interval (v sekundách) mezi aktualizacemi počasí - + \ No newline at end of file diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index e420debb66..82a51a4b73 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_weather"}; versionDesc = "ACE Wind Deflection"; - author[] = {$STR_ACE_Common_ACETeam, "Glowbal", "Ruthberg"}; + author[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"}; authorUrl = "http://csemod.com"; VERSION_CONFIG; }; diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 9a9a051fec..a361681e59 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -65,60 +65,70 @@ Wind Deflection Wpływ wiatru Desviación por viento + Účinky větru Wind Deflection Wpływ wiatru Desviación por viento Windablenkung + Účinky větru Enables wind deflection Aktywuje wpływ wiatru na trajektorię lotu pocisków Activa la desviación por viento Aktiviert Windablenkung + Umožňit vliv větru Vehicle Enabled Włączone dla pojazdów Habilitada en vehículos Fahrzeuge aktiviert + Vozidla povolena Enables wind deflection for static/vehicle gunners Aktywuje wpływ wiatru na trajektorię lotu pocisków dla broni statycznej i na pojazdach Habilita la desviación por viento para artilleros estaticos/de vehículos Aktiviere Windablenkung für statische oder Fahrzeugschützen + Umožnit vliv větru pro střelce z vozidla/statiky Simulation Interval Interwał symulacji Intervalo de simulación Simulationsintervall + Interval simulace Defines the interval between every calculation step Określa interwał pomiędzy każdym krokiem kalkulacji Define el intervalo entre cada calculo Definiert das Intervall zwischen jedem Berechnungsschritt + Určuje interval mezi každým výpočtem Simulation Radius Zasięg symulacji Radio de simulación Simulationsradius + Oblast simulace Defines the radius around the player (in meters) at which projectiles are wind deflected Określa obszar naokoło gracza (w metrach), na którym pociski są znoszone przez wiatr Define el radio alrededor del jugador (en metros) en el cual los proyectiles son desviados por el viento Gibt den Radius (in Metern) um den Spieler an, in dem Projektile vom Wind beeinflusst werden + Definuje oblast kolem hráče (v metrech) v které je projektil ovlivněn větrem Wind influence on projectiles trajectory Wpływ wiatru na trajektorię lotu pocisków Influencia del viento en la trayectoria de proyectiles Windeinfluss auf die Geschossbahnen + Vítr ovlivňuje trajektorii projektilu - + \ No newline at end of file diff --git a/addons/yardage450/$PBOPREFIX$ b/addons/yardage450/$PBOPREFIX$ new file mode 100644 index 0000000000..7efb31f23f --- /dev/null +++ b/addons/yardage450/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\yardage450 \ No newline at end of file diff --git a/addons/yardage450/CfgEventHandlers.hpp b/addons/yardage450/CfgEventHandlers.hpp new file mode 100644 index 0000000000..2a05b72298 --- /dev/null +++ b/addons/yardage450/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; \ No newline at end of file diff --git a/addons/yardage450/CfgVehicles.hpp b/addons/yardage450/CfgVehicles.hpp new file mode 100644 index 0000000000..d8f2ccabe3 --- /dev/null +++ b/addons/yardage450/CfgVehicles.hpp @@ -0,0 +1,20 @@ +class CfgVehicles { + class Item_Base_F; + class ACE_Item_Yardage450: Item_Base_F { + author[] = {"Spooner", "tcp"}; + scope = 2; + scopeCurator = 2; + displayName = CSTRING(DisplayName); + vehicleClass = "Items"; + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Yardage450,1); + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Yardage450,4); + }; + }; +}; diff --git a/addons/yardage450/CfgWeapons.hpp b/addons/yardage450/CfgWeapons.hpp new file mode 100644 index 0000000000..54e15401a6 --- /dev/null +++ b/addons/yardage450/CfgWeapons.hpp @@ -0,0 +1,23 @@ + +class CfgWeapons { + class Binocular; + class ACE_Yardage450: Binocular { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(DisplayName); + descriptionShort = CSTRING(Description); + model = PATHTOF(data\ace_yardage_pro_450.p3d); + modelOptics = PATHTOF(data\bushnell_optic.p3d); + picture = PATHTOF(UI\w_bushnell_ca.paa); + opticsZoomMin = 0.33333/4; + opticsZoomMax = 0.33333/4; + opticsZoomInit = 0.33333/4; + distanceZoomMin = 400; + distanceZoomMax = 400; + discretefov[] = {0.33333/4}; + discreteInitIndex = 0; + visionMode[] = {"Normal"}; + class WeaponSlotsInfo { + mass = 12; + }; + }; +}; diff --git a/addons/yardage450/README.md b/addons/yardage450/README.md new file mode 100644 index 0000000000..6301233fe4 --- /dev/null +++ b/addons/yardage450/README.md @@ -0,0 +1,10 @@ +ace_yardage450 +========== + +Adds the Bushnell Yardage Pro Sport 450 Laser Rangefinder. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) diff --git a/addons/yardage450/RscTitles.hpp b/addons/yardage450/RscTitles.hpp new file mode 100644 index 0000000000..28fd7735e9 --- /dev/null +++ b/addons/yardage450/RscTitles.hpp @@ -0,0 +1,75 @@ +#define ST_LEFT 0 +#define ST_RIGHT 1 +#define ST_CENTER 2 + +class ACE_Yardage450_RscText { + type = 0; + idc = -1; + style = ST_CENTER; + font = "EtelkaMonospacePro"; + sizeEx = "0.027 * SafeZoneH"; + colorText[] = {0, 0, 0, 1}; + colorBackground[] = {0, 0, 0, 0}; +}; + +class RscTitles { + class ACE_RscYardage450 { + idd = -1; + movingEnable = 0; + duration = 100000; + fadein = 0; + fadeout = 0; + name = "ACE_RscYardage450"; + onLoad = "with uiNameSpace do { ACE_RscYardage450 = _this select 0; };"; + onUnload = "with uiNameSpace do { ACE_RscYardage450 = displayNull; };"; + + class Controls { + class ACE_Yardage450_RscTarget : ACE_Yardage450_RscText { + idc = 720041; + style = ST_CENTER; + x = "0.5 - (0.18 * SafeZoneH)"; + y = "0.5 - (0.25 * SafeZoneH)"; + w = "0.4 * SafeZoneH"; + h = "0.05 * SafeZoneH"; + sizeEx = "0.05 * SafeZoneH"; + text = "TARGET ACQUIRED"; + }; + class ACE_Yardage450_RscLaser : ACE_Yardage450_RscTarget { + idc = 720042; + x = "0.5 - (0.14 * SafeZoneH)"; + y = "0.5 - (0.18 * SafeZoneH)"; + w = "0.045 * SafeZoneH"; + h = "0.02 * SafeZoneH"; + sizeEx = "0.02 * SafeZoneH"; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0, 0, 0, 1}; + text = "LASER"; + }; + class ACE_Yardage450_RscRange : ACE_Yardage450_RscTarget { + idc = 720043; + style = ST_RIGHT; + x = "0.5 - (0.02 * SafeZoneH)"; + y = "0.5 + (0.18 * SafeZoneH)"; + w = "0.08 * SafeZoneH"; + h = "0.06 * SafeZoneH"; + sizeEx = "0.06 * SafeZoneH"; + text = "---"; + }; + class ACE_Yardage450_RscMeters : ACE_Yardage450_RscLaser { + idc = 720044; + x = "0.5 + (0.06 * SafeZoneH)"; + y = "0.5 + (0.19 * SafeZoneH)"; + w = "0.05 * SafeZoneH"; + h = "0.018 * SafeZoneH"; + sizeEx = "0.018 * SafeZoneH"; + text = "METERS"; + }; + class ACE_Yardage450_RscYards : ACE_Yardage450_RscMeters { + idc = 720045; + y = "0.5 + (0.21 * SafeZoneH)"; + w = "0.0417 * SafeZoneH"; + text = "YARDS"; + }; + }; + }; +}; diff --git a/addons/yardage450/UI/w_bushnell_ca.paa b/addons/yardage450/UI/w_bushnell_ca.paa new file mode 100644 index 0000000000..85a6aca23f Binary files /dev/null and b/addons/yardage450/UI/w_bushnell_ca.paa differ diff --git a/addons/yardage450/XEH_postInit.sqf b/addons/yardage450/XEH_postInit.sqf new file mode 100644 index 0000000000..2d4ef89968 --- /dev/null +++ b/addons/yardage450/XEH_postInit.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" + +#include "initKeybinds.sqf" + +GVAR(active) = false; + +GVAR(useYards) = false; + +GVAR(powerButtonPressed) = false; +GVAR(powerOnTime) = 0; + +GVAR(lasing) = false; +GVAR(targetAcquired) = false; +GVAR(targetRangeText) = "---"; diff --git a/addons/yardage450/XEH_preInit.sqf b/addons/yardage450/XEH_preInit.sqf new file mode 100644 index 0000000000..ad84432e0d --- /dev/null +++ b/addons/yardage450/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(acquireTarget); +PREP(turnOn); + +ADDON = true; diff --git a/addons/yardage450/config.cpp b/addons/yardage450/config.cpp new file mode 100644 index 0000000000..4d0f820aed --- /dev/null +++ b/addons/yardage450/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Item_Yardage450"}; + weapons[] = {"ACE_Yardage450"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_apl", "ace_laser"}; + author[] = {"Spooner", "tcp", "Ruthberg"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "RscTitles.hpp" diff --git a/addons/yardage450/data/Bushnell.rvmat b/addons/yardage450/data/Bushnell.rvmat new file mode 100644 index 0000000000..9f8cf9835d --- /dev/null +++ b/addons/yardage450/data/Bushnell.rvmat @@ -0,0 +1,66 @@ +ambient[]={1.000000,1.000000,1.000000,1.000000}; +diffuse[]={1.000000,1.000000,1.000000,1.000000}; +forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; +emmisive[]={0.000000,0.000000,0.000000,1.000000}; +specular[]={0.7000000,0.700000,0.700000,1.000000}; +specularPower=20.000000; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 { + texture="z\ace\addons\yardage450\data\bushnell_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage2 { + texture="a3\weapons_f\data\detailmaps\plast_dt.paa"; + uvSource="tex"; + class uvTransform { + aside[]={3.0000,0.000000,0.000000}; + up[]={0.000000,3.0000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0)"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage4 { + texture="z\ace\addons\yardage450\data\bushnell_as.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage5 { + texture="z\ace\addons\yardage450\data\bushnell_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1.000000,0.000000,0.000000}; + up[]={0.000000,1.000000,0.000000}; + dir[]={0.000000,0.000000,0.000000}; + pos[]={0.000000,0.000000,0.000000}; + }; +}; +class Stage6 { + texture="#(ai,64,64,1)fresnel(2,2)"; + uvSource="none"; +}; +class Stage7 { + texture="a3\data_f\env_land_co.paa"; + uvSource="none"; +}; diff --git a/addons/yardage450/data/ace_yardage_pro_450.p3d b/addons/yardage450/data/ace_yardage_pro_450.p3d new file mode 100644 index 0000000000..e63b5021da Binary files /dev/null and b/addons/yardage450/data/ace_yardage_pro_450.p3d differ diff --git a/addons/yardage450/data/bushnell_as.paa b/addons/yardage450/data/bushnell_as.paa new file mode 100644 index 0000000000..44d605d59c Binary files /dev/null and b/addons/yardage450/data/bushnell_as.paa differ diff --git a/addons/yardage450/data/bushnell_co.paa b/addons/yardage450/data/bushnell_co.paa new file mode 100644 index 0000000000..9d2738ca6f Binary files /dev/null and b/addons/yardage450/data/bushnell_co.paa differ diff --git a/addons/yardage450/data/bushnell_nohq.paa b/addons/yardage450/data/bushnell_nohq.paa new file mode 100644 index 0000000000..4500e4b6cf Binary files /dev/null and b/addons/yardage450/data/bushnell_nohq.paa differ diff --git a/addons/yardage450/data/bushnell_optic.p3d b/addons/yardage450/data/bushnell_optic.p3d new file mode 100644 index 0000000000..653a25ec3c Binary files /dev/null and b/addons/yardage450/data/bushnell_optic.p3d differ diff --git a/addons/yardage450/data/bushnell_optic_ca.paa b/addons/yardage450/data/bushnell_optic_ca.paa new file mode 100644 index 0000000000..b9cfa9d1b4 Binary files /dev/null and b/addons/yardage450/data/bushnell_optic_ca.paa differ diff --git a/addons/yardage450/data/bushnell_smdi.paa b/addons/yardage450/data/bushnell_smdi.paa new file mode 100644 index 0000000000..285c120dbe Binary files /dev/null and b/addons/yardage450/data/bushnell_smdi.paa differ diff --git a/addons/yardage450/data/scope_view.paa b/addons/yardage450/data/scope_view.paa new file mode 100644 index 0000000000..626b1caaa0 Binary files /dev/null and b/addons/yardage450/data/scope_view.paa differ diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf new file mode 100644 index 0000000000..1d89bf5971 --- /dev/null +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -0,0 +1,60 @@ +/* + * Author: Ruthberg + * Fires the laser to acquire the target + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +// Reference: http://www.optcorp.com/pdf/Bushnell/YardageProSport.pdf +#define MIN_DISTANCE ([9, 10] select GVAR(useYards)) +#define MAX_DISTANCE ([732, 800] select GVAR(useYards)) +#define METERING_POINT_NUMBER 8 + +private ["_result", "_distance", "_min", "_max", "_range"]; + +GVAR(lasing) = true; +GVAR(targetAcquired) = false; + +GVAR(distances) = []; +GVAR(distanceIndex) = -1; + +[{ + if (GVAR(targetAcquired) || !GVAR(powerButtonPressed)) exitWith { + GVAR(lasing) = false; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + _result = [eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player)] call EFUNC(laser,shootRay); + _distance = _result select 1; + + _distance = _distance - 1 + (random 2); + + GVAR(distanceIndex) = (GVAR(distanceIndex) + 1) % METERING_POINT_NUMBER; + GVAR(distances) set [GVAR(distanceIndex), _distance]; + + if (count GVAR(distances) == METERING_POINT_NUMBER) then { + _min = MAX_DISTANCE; + _max = MIN_DISTANCE; + { + _min = _x min _min; + _max = _max max _x; + } forEach GVAR(distances); + + if (abs(_max - _min) < 5) then { + _range = (_min + _max) / 2; + if (_range >= MIN_DISTANCE && _range <= MAX_DISTANCE) then { + GVAR(targetAcquired) = true; + GVAR(targetRangeText) = Str(round(_range)); + }; + }; + }; +}, 0.1, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf new file mode 100644 index 0000000000..5f123b8cb2 --- /dev/null +++ b/addons/yardage450/functions/fnc_turnOn.sqf @@ -0,0 +1,56 @@ +/* + * Author: Ruthberg + * Shows the Yardage 450 screen elements + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "ACE_RscYardage450") +#define __ctrlTarget (__dsp displayCtrl 720041) +#define __ctrlLaser (__dsp displayCtrl 720042) +#define __ctrlRange (__dsp displayCtrl 720043) +#define __ctrlMeters (__dsp displayCtrl 720044) +#define __ctrlYards (__dsp displayCtrl 720045) + +if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {}; + +GVAR(powerOnTime) = ACE_time; + +if (GVAR(active)) exitWith {}; + +GVAR(active) = true; + +[{ + if (ACE_time - GVAR(powerOnTime) > 30) exitWith { + GVAR(active) = false; + 74210 cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + if (currentWeapon ACE_player == "ACE_Yardage450" && cameraView == "GUNNER") then { + 74210 cutRsc ["ACE_RscYardage450", "PLAIN", 1, false]; + + __ctrlLaser ctrlShow GVAR(lasing); + if (GVAR(targetAcquired)) then { + __ctrlTarget ctrlSetText "Target Acquired"; + __ctrlRange ctrlSetText GVAR(targetRangeText); + } else { + __ctrlTarget ctrlSetText ""; + __ctrlRange ctrlSetText "---"; + }; + __ctrlMeters ctrlShow !GVAR(useYards); + __ctrlYards ctrlShow GVAR(useYards); + } else { + 74210 cutText ["", "PLAIN"]; + }; + +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/yardage450/functions/script_component.hpp b/addons/yardage450/functions/script_component.hpp new file mode 100644 index 0000000000..ed5cf1b7c7 --- /dev/null +++ b/addons/yardage450/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\yardage450\script_component.hpp" \ No newline at end of file diff --git a/addons/yardage450/initKeybinds.sqf b/addons/yardage450/initKeybinds.sqf new file mode 100644 index 0000000000..578f55ee40 --- /dev/null +++ b/addons/yardage450/initKeybinds.sqf @@ -0,0 +1,28 @@ + +["ACE3 Equipment", QGVAR(DistanceKey), localize "STR_ACE_Yardage450_PowerButtonKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if !(GVAR(active)) exitWith {false}; + if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {false}; + + // Statement + if !(GVAR(powerButtonPressed)) then { + GVAR(powerButtonPressed) = true; + call FUNC(acquireTarget); + }; + true +}, +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {false}; + + // Statement + GVAR(powerButtonPressed) = false; + call FUNC(turnOn); + true +}, +[19, [false, false, false]], false] call CBA_fnc_addKeybind; //R Key diff --git a/addons/yardage450/script_component.hpp b/addons/yardage450/script_component.hpp new file mode 100644 index 0000000000..abff262efc --- /dev/null +++ b/addons/yardage450/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT yardage450 +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_YARDAGE450 + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_YARDAGE450 + #define DEBUG_SETTINGS DEBUG_SETTINGS_YARDAGE450 +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml new file mode 100644 index 0000000000..c7cb16b83b --- /dev/null +++ b/addons/yardage450/stringtable.xml @@ -0,0 +1,25 @@ + + + + + Yardage 450 + Yardage 450 + Yardage 450 + Yardage 450 + + + Laser Rangefinder + Laserentfernungsmesser + Dalmierz laserowy + Telémetro láser + Laserový dálkoměr + + + Yardage 450 - Power Button + Yardage 450 - Einschalt-Taste + Yardage 450 - Przycisk zasilania + Yardage 450 - Botón de encendido + Yardage 450 - Tlačítko napájení + + + \ No newline at end of file diff --git a/addons/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp index 2630c72dff..388e3c42cb 100644 --- a/addons/zeus/ACE_Settings.hpp +++ b/addons/zeus/ACE_Settings.hpp @@ -18,6 +18,6 @@ class ACE_Settings { class GVAR(revealMines) { typeName = "SCALAR"; value = 0; - values[] = {"$STR_ACE_Zeus_revealMines_disable", "$STR_ACE_Zeus_revealMines_partial", "$STR_ACE_Zeus_revealMines_full"}; + values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)}; }; }; diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 439dede5b1..79d4ff6f1f 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -17,7 +17,7 @@ class CfgVehicles { }; class GVAR(moduleSettings): ACE_Module { scope = 2; - displayName = "$STR_ACE_Zeus_Module_DisplayName"; + displayName = CSTRING(Settings_DisplayName); icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa)); category = "ACE"; function = QFUNC(moduleZeusSettings); @@ -27,52 +27,52 @@ class CfgVehicles { author = "SilentSpike"; class Arguments { class zeusAscension { - displayName = "$STR_ACE_Zeus_ascension_DisplayName"; - description = "$STR_ACE_Zeus_ascension_Description"; + displayName = CSTRING(ascension_DisplayName); + description = CSTRING(ascension_Description); typeName = "BOOL"; defaultValue = 0; }; class zeusBird { - displayName = "$STR_ACE_Zeus_bird_DisplayName"; - description = "$STR_ACE_Zeus_bird_Description"; + displayName = CSTRING(bird_DisplayName); + description = CSTRING(bird_Description); typeName = "BOOL"; defaultValue = 0; }; class remoteWind { - displayName = "$STR_ACE_Zeus_remoteWind_DisplayName"; - description = "$STR_ACE_Zeus_remoteWind_Description"; + displayName = CSTRING(remoteWind_DisplayName); + description = CSTRING(remoteWind_Description); typeName = "BOOL"; defaultValue = 0; }; class radioOrdnance { - displayName = "$STR_ACE_Zeus_radioOrdnance_DisplayName"; - description = "$STR_ACE_Zeus_radioOrdnance_Description"; + displayName = CSTRING(radioOrdnance_DisplayName); + description = CSTRING(radioOrdnance_Description); typeName = "BOOL"; defaultValue = 0; }; class revealMines { - displayName = "$STR_ACE_Zeus_revealMines_DisplayName"; - description = "$STR_ACE_Zeus_revealMines_Description"; + displayName = CSTRING(revealMines_DisplayName); + description = CSTRING(revealMines_Description); typeName = "NUMBER"; class values { class disable { - name = "$STR_ACE_Zeus_revealMines_disable"; + name = "$STR_A3_OPTIONS_DISABLED"; value = 0; default = 1; }; class partial { - name = "$STR_ACE_Zeus_revealMines_partial"; + name = CSTRING(revealMines_partial); value = 1; }; class full { - name = "$STR_ACE_Zeus_revealMines_full"; + name = CSTRING(revealMines_full); value = 2; }; }; }; }; class ModuleDescription { - description = "$STR_ACE_Zeus_Module_Description"; + description = CSTRING(Settings_Description); sync[] = {}; }; }; @@ -83,7 +83,7 @@ class CfgVehicles { }; class GVAR(moduleCaptive): GVAR(moduleBase) { curatorCanAttach = 1; - displayName = "$STR_ACE_Zeus_ModuleCaptive_DisplayName"; + displayName = CSTRING(ModuleCaptive_DisplayName); function = QFUNC(moduleCaptive); icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa)); class ModuleDescription { @@ -93,7 +93,7 @@ class CfgVehicles { }; class GVAR(moduleSurrender): GVAR(moduleBase) { curatorCanAttach = 1; - displayName = "$STR_ACE_Zeus_ModuleSurrender_DisplayName"; + displayName = CSTRING(ModuleSurrender_DisplayName); function = QFUNC(moduleSurrender); icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa)); class ModuleDescription { @@ -103,7 +103,7 @@ class CfgVehicles { }; class GVAR(moduleUnconscious): GVAR(moduleBase) { curatorCanAttach = 1; - displayName = "$STR_ACE_Zeus_ModuleUnconscious_DisplayName"; + displayName = CSTRING(ModuleUnconscious_DisplayName); function = QFUNC(moduleUnconscious); icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa)); class ModuleDescription { diff --git a/addons/zeus/README.md b/addons/zeus/README.md new file mode 100644 index 0000000000..b99edb66bb --- /dev/null +++ b/addons/zeus/README.md @@ -0,0 +1,15 @@ +ace_zeus +========== + +Provides control over various aspects of zeus: +- Ascension messages +- Eagle +- Wind sounds +- Ordnance radio messages +- Mine markers + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [SilentSpike] (http://github.com/SilentSpike) diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index b33d7461cd..a36d8dd458 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -113,7 +113,7 @@ if (_activated) then { if (_name == "") then {_name = localize "STR_A3_curator";}; //--- Wait until mission starts - waituntil {ACE_time > 0}; + waituntil {time > 0}; // NOTE: DO NOT CHANGE TO ACE_TIME, IT BREAKS THE MODULE //--- Refresh addon list, so it's broadcasted to clients _addons = curatoraddons _logic; @@ -126,13 +126,14 @@ if (_activated) then { case (_ownerUID > 0): { waituntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits > 0 + {getplayeruid _x == _ownerVar} count playableunits > 0 || isnull _logic }; }; default { - waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull])}; + waituntil {isplayer (missionnamespace getvariable [_ownerVar,objnull]) || isnull _logic}; }; }; + if (isnull _logic) exitwith {}; //--- Assign _player = objnull; @@ -147,21 +148,22 @@ if (_activated) then { }; }; - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic)}; - waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player}; + waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + waituntil {_player assignCurator _logic; getassignedcuratorunit _logic == _player || isnull _logic}; + if (isnull _logic) exitwith {}; //--- Add radio channels { _x radiochanneladd [_player]; } foreach (_logic getvariable ["channels",[]]); - // Added by ACE_zeus to delay ascension message at mission start + // Added by ace_zeus to delay ascension message at mission start [{ _logic = _this select 0; _player = _this select 1; - if (GVAR(zeusAscension)) then { - //--- Sent notification to all assigned players + //--- Sent notification to all assigned players + if ((_logic getvariable ["showNotification",true]) && GVAR(zeusAscension)) then { { if (isplayer _x) then { [["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp; @@ -172,7 +174,7 @@ if (_activated) then { [_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler; - // Added by ACE_zeus + // Added by ace_zeus ["zeusUnitAssigned", [_logic,_player]] call EFUNC(common,globalEvent); //--- Forced interface @@ -185,13 +187,14 @@ if (_activated) then { case (_ownerUID > 0): { waituntil { sleep 0.01; - {getplayeruid _x == _ownerVar} count playableunits == 0 + {getplayeruid _x == _ownerVar} count playableunits == 0 || isnull _logic }; }; default { - waituntil {_player != missionnamespace getvariable [_ownerVar,objnull]}; + waituntil {_player != missionnamespace getvariable [_ownerVar,objnull] || isnull _logic}; }; }; + if (isnull _logic) exitwith {}; //--- Add radio channels { @@ -199,7 +202,8 @@ if (_activated) then { } foreach (_logic getvariable ["channels",[]]); //--- Unassign - waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic)}; + waituntil {unassigncurator _logic; isnull (getassignedcuratorunit _logic) || isnull _logic}; + if (isnull _logic) exitwith {}; }; }; @@ -218,7 +222,7 @@ if (_activated) then { } foreach (synchronizedobjects _logic); _addons call bis_fnc_activateaddons; - // Added by ACE_zeus to delay bird code + // Added by ace_zeus to delay bird code [{ _logic = _this select 0; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 5eade0e0b4..8f60531b34 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -26,7 +26,7 @@ if (_activated) then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; - // Added by ACE_zeus to control if mines are revealed + // Added by ace_zeus to control if mines are revealed if (GVAR(revealMines) > 0) then { //--- Reveal the mine to curator's side { diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 3237d5be73..5980e56b3d 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -127,7 +127,7 @@ if (_activated) then { _projectile setvelocity _velocity; if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; - // This is our addition to this function + // Added by ace_zeus for ace_frag compatibility if (!isnil "ace_frag_fnc_addManualTrack") then { [_projectile] call ace_frag_fnc_addManualTrack }; @@ -138,7 +138,7 @@ if (_activated) then { //--- Create sound source _soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull}; - // Added by ACE_zeus to toggle ordnance radio message + // Added by ace_zeus to toggle ordnance radio message if (GVAR(radioOrdnance)) then { //--- Play radio warning [] call _fnc_playRadio; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 92cc786b23..a9e1f35080 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -49,7 +49,7 @@ if (_activated && local _logic && !isnull curatorcamera) then { bis_fnc_moduleRemoteControl_unit = _unit; _unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true]; - // Added by ACE_zeus to toggle remote control wind sound + // Added by ace_zeus to toggle remote control wind sound if (GVAR(remoteWind)) then { //--- Play wind cue to all players [format ["wind%1",ceil random 5],"bis_fnc_playsound"] call bis_fnc_mp; diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index 624117ed03..f77f9846a4 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -21,18 +21,18 @@ private ["_unit","_captive"]; if (!_activated) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { - ["STR_ACE_Zeus_RequiresAddon"] call EFUNC(common,displayTextStructured); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _unit = attachedTo _logic; if (isNull _unit) then { - ["STR_ACE_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { if !(_unit isKindOf "CAManBase") then { - ["STR_ACE_Zeus_OnlyInfantry"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - ["STR_ACE_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { _captive = GETVAR(_unit,EGVAR(captives,isHandcuffed),false); // Event initalized by ACE_Captives diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 094ece0979..591b216ad7 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -21,21 +21,21 @@ private ["_unit","_surrendering"]; if (!_activated) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { - ["STR_ACE_Zeus_RequiresAddon"] call EFUNC(common,displayTextStructured); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _unit = attachedTo _logic; if (isNull _unit) then { - ["STR_ACE_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { if !(_unit isKindOf "CAManBase") then { - ["STR_ACE_Zeus_OnlyInfantry"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - ["STR_ACE_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { - ["STR_ACE_Zeus_OnlyNonCaptive"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); } else { _surrendering = GETVAR(_unit,EGVAR(captives,isSurrendering),false); // Event initalized by ACE_Captives diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index cf44b3e07e..2d8bae85e8 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -21,18 +21,18 @@ private ["_unit","_conscious"]; if (!_activated) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { - ["STR_ACE_Zeus_RequiresAddon"] call EFUNC(common,displayTextStructured); + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { _unit = attachedTo _logic; if (isNull _unit) then { - ["STR_ACE_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured); + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { if !(_unit isKindOf "CAManBase") then { - ["STR_ACE_Zeus_OnlyInfantry"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { if !(alive _unit) then { - ["STR_ACE_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured); + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); } else { _conscious = GETVAR(_unit,ACE_isUnconscious,false); // Function handles locality for me diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index d21814623a..8ddde63cc8 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,74 +1,107 @@  - + Zeus Settings Ustawienia Zeusa + Ajustes Zeus + Nastavení Zeuse - + Provides control over various aspects of Zeus. Pozwala kontrolować różne aspekty Zeusa. + Proporciona control sobre diversos aspectos de Zeus. + Poskytuje kontrolu na různými aspekty Zeuse. Ascension Messages Wiad. o nowym Zeusie + Mensajes de ascensión + Zpráva o novém Zeusovi Display global popup messages when a player is assigned as Zeus. Wyświetlaj globalną wiadomość kiedy gracz zostanie przydzielony jako Zeus + Mostrar mensajes emergentes globales cuando a un jugador se le asigna como Zeus. + Zobrazit globální zprávu když je hráč přiřazen jako Zeus. Zeus Eagle Orzeł Zeusa + Águila Zeus + Orel Zeuse Spawn an eagle that follows the Zeus camera. Spawnuj orła, który podąrza za kamerą Zeusa. + Generar un águila que sigue la cámara Zeus. + Vytvoří orla, který následuje kameru Zeuse. Wind Sounds Dźwięki wiatru + Sonidos de viento + Zvuky větru Play wind sounds when Zeus remote controls a unit. Odtwarzaj dźwięki wiatru kiedy Zeus zdalnie kontroluje jednostkę. + Reproduce sonidos de viento cuando Zeus controle remotamente una unidad. + Přehrát varování (vítr) když Zeus převezmě kontrolu nad jednotkou. Ordnance Warning Ostrz. o ostrzale arty. + Advertencia de artefactos explosivos + Varování před dělostřelectvem Play a radio warning when Zeus uses ordnance. Odtwarzaj wiadomość radiową kiedy Zeus używa artylerii. + Reproduce un aviso de radio cuando Zeus utiliza artefactos explosivos. + Přehrát varování (rádio) když Zeus použije dělostřelectvo. Reveal Mines Pokazuj miny + Revelar minas + Odhalit miny Reveal mines to allies and place map markers. Pokazuj znaczniki min dla sojuszników i twórz markery na mapie w miejscu min. - - - Disabled - Wyłączone + Revelar minas a aliados y establecer marcadores de mapa. + Odhalí miny pro spojence a umístnit jejich značku na mapu. Reveal to Allies Pokaż dla sojuszników + Revelar a aliados + Odhalit pro spojence Allies + Map Markers Sojusznicy + markery na mapie + Aliados + Marcas de mapa + Spojenci + Značky na mapě Toggle Captive + Przełącz więźnia + Alternar cautivo + Přepnout - Vězeň Toggle Surrender + Przełącz kapitulację + Alternar rendición + Přepnout - Vzdávání Toggle Unconscious + Przełącz nieprzytomność + Alternar inconsciencia + Přepnout - Bezvědomí Unit must be alive @@ -96,6 +129,9 @@ Unit must not be captive + Jednostka nie może być więźniem + La unidad no debe estar cautiva + Jednotka nemí být vězeň Place on a unit @@ -103,7 +139,7 @@ Es wurde nichts ausgewählt Nada bajo el ratón Nada debaixo do mouse - Nic není vybráno + Umístni na jednotku Nie ma nic pod kursorem Ничего не выделено Semmi sincs az egér alatt @@ -111,6 +147,9 @@ Requires an addon that is not present + Wymaga addonu, który nie jest obecny + Requiere un addon que no está presente + Vyžaduje addon, který není přítomen - + \ No newline at end of file diff --git a/documentation/development/setting-up-the-development-environment.md b/documentation/development/setting-up-the-development-environment.md index 9a2880b319..5264760785 100644 --- a/documentation/development/setting-up-the-development-environment.md +++ b/documentation/development/setting-up-the-development-environment.md @@ -17,8 +17,8 @@ This page describes how you can setup your development environment for ACE3, all - A properly setup P-drive - Run ArmA 3 and Arma 3 Tools directly from steam once to install registry entries (and again after every update) - Python 3.x, available [here](http://www.python.org) -- The following Mikero Tools (available [here](https://dev.withsix.com/projects/mikero-pbodll/files)): DePBO, Rapify, MakePBO, PBOProject -- A properly setup PATH variable (containing Python and the Mikero tools) +- The following Mikero Tools (available [here](https://dev.withsix.com/projects/mikero-pbodll/files)): DePBO, DeOgg, Rapify, MakePBO, PBOProject +- A properly setup PATH variable (containing Python ,the Mikero tools and git) ## 2. Why so complicated? diff --git a/documentation/feature/attach.md b/documentation/feature/attach.md index 6cbfc640ee..a248f8657f 100644 --- a/documentation/feature/attach.md +++ b/documentation/feature/attach.md @@ -17,14 +17,14 @@ Adds an attachable IR strobe, which is only visible using night vision devices a ## 2. Usage ### 2.1 Attaching to yourself -- Use Self Interact CTRL+Left Windows (ACE3 default key bind `Self Interaction Key`). +- Use Self Interact CTRL+⊞ Win (ACE3 default). - Select `Equipment`. - Select `Attach item`. - Select which item you want to attach. - Repeat the process to detach. ### 2.2 Attaching to a vehicle -- Interact with the vehicle Left Windows (ACE3 default key bind `Interact Key`). +- Interact with the vehicle ⊞ Win (ACE3 default). - Select `Attach item`. - Select your item and follow the instructions on the screen. - Repeat the process to detach. diff --git a/documentation/feature/captives.md b/documentation/feature/captives.md index db0481dad7..33b7ec3739 100644 --- a/documentation/feature/captives.md +++ b/documentation/feature/captives.md @@ -24,20 +24,23 @@ Allows players to surrender. It renders the unit unable to move and with the han ### 2.1 Taking a unit into captivity - You need `Cable Tie`. -- Approach the unit and Interact Left Windows (ACE3 default key bind `Interact Key`). +- Approach the unit and Interact ⊞ win (ACE3 default). - The interaction is located around the hands in the form of a handcuffs icon. - Repeat to release. ### 2.2 Escorting a captive -- Interact with the captive Left Windows. +- Interact with the captive ⊞ win. - Select the `Escort prisoner` option. -- To stop escorting, use the mousewheel and select `Release` or use Self Interaction CTRL+Left Windows and select `Release`. +- To stop escorting, use the mousewheel and select `Release` or use Self Interaction CTRL+⊞ win and select `Release`. ### 2.3 Loading and unloading a captive into/from a vehicle - Escort the captive. - Approach the vehicle you wish to load the captive unit into. -- Interact with the vehicle Left Windows and select `Load captive`. -- Interact with the vehicle to unload. +- Interact with the vehicle ⊞ win and select `Load captive`. +- To unload the captive interact with the vehicle ⊞ win +- Select `Passengers`. +- Select the captive. +- Select `Unload captive`. ## 3. Dependencies diff --git a/documentation/feature/concertina_wire.md b/documentation/feature/concertina_wire.md new file mode 100644 index 0000000000..0c0cdb3ab6 --- /dev/null +++ b/documentation/feature/concertina_wire.md @@ -0,0 +1,22 @@ +--- +layout: wiki +title: concertina wire +description: +group: feature +parent: wiki +--- + +## 1. Overview + +A concertina wire is a type of barbed wire formed in large coils that can be expanded to form obstacles, in ACE3 any vehicle making contact with it get it's tires destroyed. + +## 2. Usage + +### 2.1 Deploying the concertina wire +- Approach the concertina coil and select ⊞ Win (ACE3 default) +- Select `Deploy concertina wire`. +- Follow the instructions on screen. + +## 3. Dependencies + +`ace_apl` , `ace_interaction` diff --git a/documentation/feature/dagr.md b/documentation/feature/dagr.md new file mode 100644 index 0000000000..e4b350295c --- /dev/null +++ b/documentation/feature/dagr.md @@ -0,0 +1,14 @@ +--- +layout: wiki +title: Dagr +group: feature +parent: wiki +--- + +## 1. Overview + +Adds the Defense Advanced GPS Receiver. + +## 3. Dependencies + +`ace_weather` \ No newline at end of file diff --git a/documentation/feature/disarming.md b/documentation/feature/disarming.md index 84613587b3..02b8dc2163 100644 --- a/documentation/feature/disarming.md +++ b/documentation/feature/disarming.md @@ -14,7 +14,7 @@ You can search the inventory and disarm captured or unconscious units. ## 2. Usage ### 2.1 Searching and disarming -- Interact with the captured or unconscious unit Left Windows (ACE3 default key bind `Interaction Key`). +- Interact with the captured or unconscious unit ⊞ Win (ACE3 default key bind `Interaction Key`). - Select `Open inventory`. - Drag & Drop the items you wish to remove from the unit. diff --git a/documentation/feature/dragging.md b/documentation/feature/dragging.md index 7c0cbd201c..e3fdf0b6fe 100644 --- a/documentation/feature/dragging.md +++ b/documentation/feature/dragging.md @@ -14,9 +14,9 @@ This adds the option to drag or carry units or objects. ### 2.1 Dragging / Carrying units and objects - You can only drag or carry an unconscious unit. -- Interact with the unit or object Left Windows (ACE3 default key bind `Interact Key`). +- Interact with the unit or object ⊞ Win (ACE3 default key bind `Interact Key`). - Select `Drag` or `Carry`. -- To release, use the mouse wheel and select `Release` or use Self Interaction CTRL+Left Windows and select `Release`. +- To release, use the mouse wheel and select `Release` or use Self Interaction CTRL+⊞ Win and select `Release`. ## 3. Dependencies diff --git a/documentation/feature/explosives.md b/documentation/feature/explosives.md index 3aae12a56d..a88b9ae1b4 100644 --- a/documentation/feature/explosives.md +++ b/documentation/feature/explosives.md @@ -20,18 +20,18 @@ Enables attaching explosives to vehicles. ## 2. Usage ### 2.1 Placing explosives -- Use self interaction CTRL+Left Windows (ACE3 default key bind `Self Interaction Key`). +- Use self interaction CTRL+⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Explosives`. - Choose your explosive type and follow the instructions on the screen. ### 2.2 Arming and detonating explosives -- Interact with the explosive Left Windows (ACE3 default key bind `Interact Key`). +- Interact with the explosive ⊞ Win (ACE3 default key bind `Interact Key`). - Choose the arming method. - For clackers use Self Interaction `Explosives` → `Detonate` and choose the corresponding Firing Device. ### 2.3 Defusing explosives - A `Defusal Kit` is required. -- Interact with the explosive Left Windows. +- Interact with the explosive ⊞ Win. - Select `Disarm`. - You are safe to pick it up after the action has completed. diff --git a/documentation/feature/fonts.md b/documentation/feature/fonts.md new file mode 100644 index 0000000000..bf40e5ed2d --- /dev/null +++ b/documentation/feature/fonts.md @@ -0,0 +1,15 @@ +--- +layout: wiki +title: Fonts +group: feature +parent: wiki +--- + +## 1. Overview + +This module adds a font that will be used in the future, characters with equal widths to make it easy to structure correctly. This is **NOT** present in 3.1.1 because of a bug even if it's present in the sources. + + +## 3. Dependencies + +`ace_main` \ No newline at end of file diff --git a/documentation/feature/hearing.md b/documentation/feature/hearing.md index ba19ed154f..5389f0c3d5 100644 --- a/documentation/feature/hearing.md +++ b/documentation/feature/hearing.md @@ -19,7 +19,7 @@ missile launchers will be equipped with those, but remember to put them in. ### 2.1 Equipping earplugs - For this you need the `Earplugs` item. -- Press the self interaction key CTRL + Left Windows (ACE3 default key bind `Self Interaction Key`). +- Press the self interaction key CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Equipment`. - Select `Earplugs in`. - Same method to remove them but the option is `Earplugs out`. diff --git a/documentation/feature/huntIR.md b/documentation/feature/huntIR.md new file mode 100644 index 0000000000..e4e690dac3 --- /dev/null +++ b/documentation/feature/huntIR.md @@ -0,0 +1,42 @@ +--- +layout: wiki +title: HuntIR +group: feature +parent: wiki +--- + +## 1. Overview + +### 1.1 The HuntIR +The **H**igh altitude **U**nit **N**avigated **T**actical **I**maging **R**ound (HuntIR) is designed to be fired from a grenade launcher. After being fired in the air the in built parachute will be deployed and the IR CMOS camera will activate, providing a video stream until it touches the ground or get shot down. + +## 2. Usage +NOTE: the HuntIR round doesn't work with modded weapons without a compatibility fix made either by the ACE3 team or the mod team. + +### 2.1 Using the HuntIR +- To be able to connect to the IR CMOS camera you'll need a `HuntIR monitor`. +- Fire the HuntIR round as high as possible over the area you want to observe. +- Open the `HuntIR monitor`. + - To open the `HuntIR monitor` self interact CTRL + ⊞ Win (ACE3 default) + - Select `Equipment`. + - Select `Activate HuntIR monitor`. +- You now have control of the IR CMOS camera to close the monitor press ESC or ⊞ Win + +### 2.2 IR CMOS camera controls + +Shortcut | Action +------------ | ------------- +A | Lower zoom level +D | Increase zoom level +N | Toggle NV and TI modes +S | Next camera +W | Previous camera + | Rotate camera anticlockwise +| Rotate camera clockwise + | Raise camera + | Lower camera +R | Reset camera + +## 3. Dependencies + +`ace_common` \ No newline at end of file diff --git a/documentation/feature/logistics_uavbattery.md b/documentation/feature/logistics_uavbattery.md index 0b371c9f65..2920d4b7a4 100644 --- a/documentation/feature/logistics_uavbattery.md +++ b/documentation/feature/logistics_uavbattery.md @@ -15,7 +15,7 @@ Adds an item `ACE_UAVBattery` that allows refuelling / recharging of the "Darter ### 2.1 Recharging the darter - For this you need a `UAV battery` and the UAV needs to be a quad-copter. -- Interact with the UAV Left Windows (ACE3 default key bind `Interact Key`) +- Interact with the UAV ⊞ Win (ACE3 default key bind `Interact Key`) - Select `Recharge` ## 3. Dependencies diff --git a/documentation/feature/logistics_wirecutter.md b/documentation/feature/logistics_wirecutter.md index cb27b7d9da..077e3b48cb 100644 --- a/documentation/feature/logistics_wirecutter.md +++ b/documentation/feature/logistics_wirecutter.md @@ -16,7 +16,7 @@ Adds an item `ACE_wirecutter` that allows cutting of fences in Arma 3 and AllInA ### 2.1 Using the wirecutter - For this you need a `Wirecutter`. - Approach the fence you want to cut. -- Press the interaction key Left Windows (ACE3 default key bind `Interaction Key`). +- Press the interaction key ⊞ Win (ACE3 default key bind `Interaction Key`). - Find the interaction point and select `Cut Fence` (the only option). ## 3. Dependencies diff --git a/documentation/feature/magazinerepack.md b/documentation/feature/magazinerepack.md index 8a493afa56..191f12d2b7 100644 --- a/documentation/feature/magazinerepack.md +++ b/documentation/feature/magazinerepack.md @@ -15,7 +15,7 @@ Adds the ability to repack magazines of the same type. ### 2.1 Repacking - For this you need multiple half empty mags of the same type. -- Press the self interaction button CTRL + Left Windows (ACE3 default key bind `Self Interaction Key`). +- Press the self interaction button CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Repack magazines`. - Select the type of magazines you want to repack. diff --git a/documentation/feature/maptools.md b/documentation/feature/maptools.md index 8ebb97097a..a67412343f 100644 --- a/documentation/feature/maptools.md +++ b/documentation/feature/maptools.md @@ -22,7 +22,7 @@ If you are equipped with a vanilla GPS it will be shown on the map. (You don't n ### 2.1 Using map tools - For this you need to have `Map Tools`. - Open the map M (Arma 3 default key bind `Map`). -- Press the self interaction key CTRL + Left Windows (ACE3 default key bind `Self Interaction Key`). +- Press the self interaction key CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Map tools`. - Select the type of tools you want to use. - Note that you can drag the Roamer (map tool) around with LMB and rotate it with CTRL + LMB. diff --git a/documentation/feature/mk6mortar.md b/documentation/feature/mk6mortar.md index 05ecf97bbf..eb4b22caaf 100644 --- a/documentation/feature/mk6mortar.md +++ b/documentation/feature/mk6mortar.md @@ -18,7 +18,7 @@ ACE3 adds wind deflection for shells as well as a rangetable to accurately take ### 2.2 Working with the rangetable - To open the table: - - Self interact CTRL + Left Windows + - Self interact CTRL + ⊞ Win - Select `equipment`. - Select `Open 82mm Rangetable`. diff --git a/documentation/feature/mx2a.md b/documentation/feature/mx2a.md new file mode 100644 index 0000000000..892991d3b7 --- /dev/null +++ b/documentation/feature/mx2a.md @@ -0,0 +1,14 @@ +--- +layout: wiki +title: MX-2A +group: feature +parent: wiki +--- + +## 1. Overview + +Adds the MX-2A thermal imaging device. + +## 3. Dependencies + +`ace_apl` \ No newline at end of file diff --git a/documentation/feature/overheating.md b/documentation/feature/overheating.md index a02064caa7..dcbc4c1939 100644 --- a/documentation/feature/overheating.md +++ b/documentation/feature/overheating.md @@ -25,12 +25,12 @@ Adds the ability to changes barrels on machine guns to compensate for those effe ### 2.2 Swapping barrels - For this you need a `Spare barrel` and a compatible weapon. -- Press self interaction CTRL + Left Windows (ACE3 default key bind `Self Interaction Key`). +- Press self interaction CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Equipment`. - Select `Swap barrel`. ### 2.3 Checking your barrel temperature -- Press self interaction CTRL + Left Windows. +- Press self interaction CTRL + ⊞ Win. - Select `Equipment`. - Select `Check weapon temperature`. diff --git a/documentation/feature/reloadlaunchers.md b/documentation/feature/reloadlaunchers.md index eb697b81bc..773814a73e 100644 --- a/documentation/feature/reloadlaunchers.md +++ b/documentation/feature/reloadlaunchers.md @@ -13,7 +13,7 @@ Add the ability to reload someone else's launcher. ### 2. Usage ### 2.1 Reloading someone else's launcher -- Press the interaction key Left Windows and aim at your buddy's launcher. +- Press the interaction key ⊞ Win and aim at your buddy's launcher. - Select `reload launcher`. - Select the type of ammo. diff --git a/documentation/feature/respawn.md b/documentation/feature/respawn.md index 114a59b88e..753784b52b 100644 --- a/documentation/feature/respawn.md +++ b/documentation/feature/respawn.md @@ -23,7 +23,7 @@ Adds rallypoints to all 3 sides to enable teleportation from base spawn to FOB's ### 2.1 Using rallypoints - For this to work pre-emptive preparations need to be made by the mission maker. - Approach the rallypoint flagpole -- Use the interaction key Left Windows (ACE3 default key bind `Interaction key`). +- Use the interaction key ⊞ Win (ACE3 default key bind `Interaction key`). - Select teleport to (base / rallypoint). diff --git a/documentation/feature/sandbags.md b/documentation/feature/sandbags.md new file mode 100644 index 0000000000..5e0011b755 --- /dev/null +++ b/documentation/feature/sandbags.md @@ -0,0 +1,24 @@ +--- +layout: wiki +title: Sandbags +group: feature +parent: wiki +--- + +## 1. Overview + +Adds stackable sandbags able to block bullets, shrapnel and small explosions. +Note that those sandbags are affected by physics, a rocket will send them flying. + +## 2. Usage + +### 2.1 Placing the sandbags +- You'll need at least one `sandbag (empty)`. +- You need to be over a grass area / sand area to be able to fill the sandbag. +- Self interact CTRL+⊞ Win (ACE3 default). +- Select `Deploy sandbag`. +- Follow the instruction on screen. + +## 3. Dependencies + +`ace_interaction` \ No newline at end of file diff --git a/documentation/feature/spotting_scope.md b/documentation/feature/spotting_scope.md new file mode 100644 index 0000000000..ead45d540f --- /dev/null +++ b/documentation/feature/spotting_scope.md @@ -0,0 +1,21 @@ +--- +layout: wiki +title: Spotting scope +group: feature +parent: wiki +--- + +## 1. Overview + +Adds a deployable spotting scope. + +## 2. Usage + +### 2.1 Deploying the spotting scope +- Self interact CTRL+⊞ Win (ACE3 default). +- Select `Equipment`. +- Select `Place spotting scope` (note that the scope will be at your feet). + +## 3. Dependencies + +`ace_apl` , `ace_interaction` \ No newline at end of file diff --git a/documentation/feature/tacticallader.md b/documentation/feature/tacticallader.md new file mode 100644 index 0000000000..f992236db6 --- /dev/null +++ b/documentation/feature/tacticallader.md @@ -0,0 +1,21 @@ +--- +layout: wiki +title: Tactical ladder +group: feature +parent: wiki +--- + +## 1. Overview + +Adds a deployable ladder with adjustable height that you can transport on your back. + +## 2. Usage + +### 2.1 Deploying the ladder +- Self interact CTRL+⊞ Win (ACE3 default). +- Select `Deploy ladder`. +- You can adjust it's position and height by interacting with it ⊞ Win (ACE3 default) and following the instructions on screen. + +## 3. Dependencies + +`ace_apl` , `ace_interaction` \ No newline at end of file diff --git a/documentation/feature/tripod.md b/documentation/feature/tripod.md new file mode 100644 index 0000000000..4f57dc05a7 --- /dev/null +++ b/documentation/feature/tripod.md @@ -0,0 +1,24 @@ +--- +layout: wiki +title: Tripod +group: feature +parent: wiki +--- + +## 1. Overview + +Adds a packable tripod deployable on the field. It features a flat part to deploy your weapon on and adjustable legs. + +## 2. Usage + +### 2.1 deploying the tripod +- Note that you need a `SSWT kit` in your inventory. +- Self interact CTRL+⊞ Win. +- Select `Equipment` +- Select `Place SSWT kit`. + +To adjust or pick up the tripod just interact with it ⊞ Win and select the desired action. + +## 3. Dependencies + +`ace_interaction` \ No newline at end of file diff --git a/documentation/feature/ui.md b/documentation/feature/ui.md new file mode 100644 index 0000000000..eb7cf3ff58 --- /dev/null +++ b/documentation/feature/ui.md @@ -0,0 +1,15 @@ +--- +layout: wiki +title: UI +group: feature +parent: wiki +--- + +## 1. Overview + +Changes the chat contrast on the map to allow easier reading. + + +## 3. Dependencies + +`ace_common` \ No newline at end of file diff --git a/documentation/feature/yardage450.md b/documentation/feature/yardage450.md new file mode 100644 index 0000000000..66c4a2d4e3 --- /dev/null +++ b/documentation/feature/yardage450.md @@ -0,0 +1,22 @@ +--- +layout: wiki +title: Yardage 450 +group: feature +parent: wiki +--- + +## 1. Overview + +Adds the Bushnell Yardage Pro Sport 450 Laser Rangefinder. + +## 2. Usage + +### 2.1 How to use the Yardage 450 +- Bring it up like any other binocular +- Tap R once to activate the device. +- Sight the target and Hold R until `TARGET AQCUIRED` appears on top of the screen. +- The range in meters should now appear at the bottom of the screen. + +## 3. Dependencies + +`ace_apl` , `ace_laser` \ No newline at end of file diff --git a/documentation/missionmaker/classnames.md b/documentation/missionmaker/classnames.md index ad8956f749..9ea0d5b556 100644 --- a/documentation/missionmaker/classnames.md +++ b/documentation/missionmaker/classnames.md @@ -77,6 +77,21 @@ classname | in game name | type | --------- | --------- | --------- ACE_Banana | banana | ACE_ItemCore | +### Concertina_wire +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_ConcertinaWireCoil | Concertina Wire Coil | ThingX | +ACE_ConcertinaWire | Concertina Wire | deployed concertina wire | + +### Dagr +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_DAGR | DAGR | ACE_ItemCore | + ### Disposable `added in 3.0.0.3` @@ -106,13 +121,22 @@ ACE_HandFlare_Green | M127A1 Hand Held Signal (Green) | Grenade | ACE_HandFlare_Yellow | M127A1 Hand Held Signal (Yellow) | Grenade | ACE_M84 | M84 Stun Grenade | Grenade | -### hearing +### Hearing `added in 3.0.0.3` classname | in game name | type | --------- | --------- | --------- ACE_EarPlugs | Earplugs | ACE_ItemCore | +### HuntIR +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_HuntIR_monitor | HuntIR monitor | ACE_ItemCore | +ACE_HuntIR_M203 | HuntIR Round | Grenade shell | +ACE_HuntIR_Box | HuntIR Transport Box | ammo box | + ### Kestrel `added in 3.0.0.3` @@ -187,6 +211,14 @@ classname | in game name | type | --------- | --------- | --------- ACE_RangeTable_82mm | 82mm Rangetable | ACE_ItemCore | +### M2XA +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_MX2A | MX-2A | Binocular | + + ### Nightvision `added in 3.0.0.3` @@ -254,3 +286,42 @@ ACE_key_west | Vehicle Key: West | ACE_ItemCore | ACE_key_east | Vehicle Key: East | ACE_ItemCore | ACE_key_indp | Vehicle Key: Independent | ACE_ItemCore | ACE_key_civ | Vehicle Key: Civilian | ACE_ItemCore | + +### Sandbag +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_Sandbag_empty | Sandbag (empty) | ACE_ItemCore | +ACE_SandbagObject | Sandbag | ThingX | + +### Spotting scope +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_SpottingScope | Spotting Scope | ACE_ItemCore | +ACE_SpottingScopeObject | Spotting Scope (placed) | StaticATWeapon | + +### Tactical ladder +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_TacticalLadder_Pack | Telescopic Ladder | Backpack | +ACE_Tactical_Ladder | Telescopic Ladder (placed) | house | + +### Tripod +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_Tripod | SSWT Kit | ACE_ItemCore | +ACE_TripodObject | SSWT Kit (placed) | ThingX | + +### Yardage 450 +`added in 3.1.1` + +classname | in game name | type | +--------- | --------- | --------- +ACE_Yardage450 | Yardage 450 | Binocular | \ No newline at end of file diff --git a/documentation/missionmaker/modules.md b/documentation/missionmaker/modules.md index 2402078bb5..5708a16379 100644 --- a/documentation/missionmaker/modules.md +++ b/documentation/missionmaker/modules.md @@ -18,29 +18,39 @@ This module allows enabling and configuring advanced ballistic simulations. 1. **Advanced Ballistics (Boolean)**
Enables advanced ballistics.
`Default value: No` + 2. **Enabled For Snipers (Boolean)**
Enables advanced ballistics for non local snipers (when using high power optics).
`Default value: Yes` + 3. **Enabled For Group Members (Boolean)**
Enables advanced ballistics for non local group members.
`Default value: No` + 4. **Enabled For Everyone (Boolean)**
Enables advanced ballistics for all non local players (enabling this feature may degrade performance during heavy firefights in multiplayer).
`Default value: No` + 5. **Disabled In FullAuto Mode (Boolean)**
Disables the advanced ballistics during full auto fire.
`Default value: No` + 6. **Enable Ammo Temperature Simulation (Boolean)**
Muzzle velocity varies with ammo temperature.
`Default value: Yes` + 7. **Enable Barrel Length Simulation (Boolean)**
Muzzle velocity varies with barrel length.
`Default value: Yes` + 8. **Enable Bullet Trace Effect (Boolean)**
Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics).
+`default value: Yes ` + 9. **Simulation Interval (Number)**
Defines the interval between every calculation step.
`Default value: 0.00` + 10. **Simulation Radius (Number)**
Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles.
`Default value: 3000` @@ -68,7 +78,23 @@ How often the markers should be refreshed (in seconds).
Hide markers for "AI only" groups.
`Default value: No` -### 1.4 Check PBOs +### 1.4 Captives settings +*Part of: ace_captives* + +Controls the settings for cable ties and surrendering. +Very useful if you don't want your players to be able to restrict each others. + +**Settings:** + +1. **Can handcuff own side (Boolean)**
+Determine if you are able to handcuff your own side or not.
+`Default value: Yes` + +2. **Allow surrendering (Boolean)**
+Determine if you are able to surrender or not when your weapon is holstered.
+`Default value: Yes` + +### 1.5 Check PBOs *Part of: ace_common* If you are worried that players haven't updated ACE3 or other mods to the version you're using on the server, you can place the "Check PBOs" module on your map. You can choose one of three posible actions that are being executed when a player joins that has a wrong version of ACE3 or an other mod: @@ -107,7 +133,7 @@ Example 3: @JSRS + @Blastcore-A3:
``` -### 1.5 Explosive System +### 1.6 Explosive System *Part of: ace_explosive* The "Explosive System" module lets you tweak the settings for the new explosive system that ACE3 introduces. @@ -117,18 +143,19 @@ The "Explosive System" module lets you tweak the settings for the new explosive 1. **Require specialists? (Boolean)**
Require explosive specialists to disable explosives.
`Default value: No` + 2. **Punish non-specialists? (Boolean)**
Increase the time it takes to complete actions for non-specialists.
`Default value: Yes` -### 1.6 Friendly Fire Messages +### 1.7 Friendly Fire Messages *Part of: ace_respawn* The "Friendly Fire Messages" module triggers a message when a player kills a friendly or civilian unit. This module isn't needed on servers with a low difficulty setting. -### 1.7 Hearing +### 1.8 Hearing *Part of: ace_hearing* Placing this modules allows you to disable combat deafness usually triggerd by loud explosions or heavy weapons in a players proximity. @@ -140,7 +167,7 @@ Enable combat deafness?
`Default value: Yes` -### 1.8 Interaction System +### 1.9 Interaction System *Part of: ace_interaction* This module allows you to tweak if players should be able to use team management functions (e.g. "switch group", "become leader"). @@ -151,13 +178,13 @@ This module allows you to tweak if players should be able to use team management Should players be allowed to use the Team Management Menu?.
`Default value: Yes` -### 1.9 Make Unit Surrender +### 1.10 Make Unit Surrender *Part of: ace_captives* Syncing units to that module sets them in the captive state with their arms behind their back. Usefull for e.g. hostage rescue missions. -### 1.10 Map +### 1.11 Map *Part of: ace_map* ACE3 introdcues a bit more realism for the vanilla Arma 3 map and how it behaves. Some of these settings can be toggled by this module. @@ -167,18 +194,21 @@ ACE3 introdcues a bit more realism for the vanilla Arma 3 map and how it behaves 1. **Map illumination? (Boolean)**
Calculate dynamic map illumination based on light conditions?.
`Default value: Yes` + 2. **Map shake? (Boolean)**
Make map shake when walking?.
`Default value: Yes` + 3. **Limit map zoom? (Boolean)**
Limit the amount of zoom available for the map?.
`Default value: No` + 4. **Show cursor coordinates? (Boolean)**
Show the grid coordinates on the mouse pointer?.
`Default value: No` -### 1.11 MicroDAGR Map Fill +### 1.12 MicroDAGR Map Fill *Part of: ace_microdagr* Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap. @@ -190,7 +220,7 @@ How much map data is filled on MicroDAGR's.
`Default value: "Full Satellite + Buildings"` -### 1.12 MK6 Settings +### 1.13 MK6 Settings *Part of: ace_mk6mortar* ACE3 now includes the first iteration of getting a less arcady point and click mortar experience. @@ -201,35 +231,44 @@ Placing this modules allows you to enable the increased realism in game. 1. **Air Resistance (Boolean)**
For Player Shots, Model Air Resistance and Wind Effects.
`Default value: Yes` + 2. **Allow MK6 Computer (Boolean)**
Show the Computer and Rangefinder (these **NEED** to be removed if you enable air resistance).
`Default value: No` + 3. **Allow MK6 Compass (Boolean)**
Show the MK6 Digital Compass.
`Default value: Yes` -### 1.13 Name Tags +### 1.14 Name Tags *Part of: ace_nametags* This module allows you to tweak the settings for player names tags. **Settings:** -1. **Player Names View Distance (Number)**
+1. **Show player names (Option)**
+Let you choose when nametags appears.
+`Default value: "Do Not Force"` + +2. **Player Names View Distance (Number)**
Distance (in meters) at which player names are shown.
`Default value: 5` -2. **Show name tags for AI? (Option)**
+ +3. **Show name tags for AI? (Option)**
Show the name and rank tags for friendly AI units, or by default allows players to choose it on their own.
`Default value: "Do Not Force"` -3. **Show crew info? (Option)**
+ +4. **Show crew info? (Option)**
Show vehicle crew info, or by default allows players to choose it on their own.
`Default value: "Do Not Force"` -4. **Show for Vehicles? (Boolean)**
+ +5. **Show for Vehicles? (Boolean)**
Show cursor NameTag for vehicle commander (only if client has name tags enabled).
`Default value: No` -### 1.14 Rallypoint System +### 1.15 Rallypoint System *Part of: ace_respawn* This module enables Mission Makers to specificly enable units to move a rallypoint. Every unit that is synced with that module is able to move a rallypoint. @@ -242,7 +281,7 @@ This module enables Mission Makers to specificly enable units to move a rallypoi To enable JIP players to move rally points have a look at [ACE3 Rallypoints](./mission-tools.html#1.-ace-rallypoints). -### 1.15 Respawn System +### 1.16 Respawn System *Part of: ace_respawn* The "Respawn System" module enables players to respawn with the gear they had before dying and to remove bodies of players after a configurable interval (in seconds). @@ -254,7 +293,7 @@ Respawn with the gear a player had just before his death.
`Default value: No` -### 1.16 SwitchUnits System +### 1.17 SwitchUnits System *Part of: ace_switchunits* The [SwitchUnits System](./mission-tools.html#2.-ace-switchunits) enables players to control certain AI units on the map. @@ -264,33 +303,38 @@ The [SwitchUnits System](./mission-tools.html#2.-ace-switchunits) enables player 1. **Switch To West? (Boolean)**
Allow switching to west units?
`Default value: No` + 2. **Switch To East? (Boolean)**
Allow switching to east units?
`Default value: No` + 3. **Switch To Independent? (Boolean)**
Allow switching to independent units?
`Default value: No` + 4. **Switch To Civilian? (Boolean)**
Allow switching to civilian units?
`Default value: No` + 5. **Enable Safe Zone? (Boolean)**
Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone.
`Default value: Yes` + 6. **Safe Zone Radius (Number)**
The safe zone around players from a different team (in meters)
`Default value: 200` -### 1.17 Vehicle Lock +### 1.18 Vehicle Lock *Part of: ace_vehiclelock* These modules allow you to lock and unlock vehicles and their inventory using a key. Players don't receive a key automatically; for key names, see [Classnames Wiki](http://ace3mod.com/wiki/missionmaker/classnames.html#vehicle-lock). -#### 1.17.1 Vehicle Key Assign +#### 1.18.1 Vehicle Key Assign Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start. Example: `[bob, car1, true] call ACE_VehicleLock_fnc_addKeyForVehicle;` - will add a key to bob and program it to work only on car1 -#### 1.17.2.1 Vehicle Lock Setup +#### 1.18.2.1 Vehicle Lock Setup Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states. **Settings:** @@ -298,19 +342,21 @@ Settings for lockpick strength and initial vehicle lock state. Removes ambiguous 1. **Lock Vehicle Inventory? (Boolean)**
Locks the inventory of locked vehicles
`Default value: No` + 2. **Vehicle Starting Lock State (Option)**
Set lock state for all vehicles (removes ambiguous lock states)
`Default value: "As Is"` + 3. **Default Lockpick Strength (Number)**
Default Time to lockpick (in seconds)
`Default value: 10` -#### 1.17.2.2 Vehicle setVariables +#### 1.18.2.2 Vehicle setVariables * `ACE_VehicleLock_lockSide` - SIDE: overrides a vehicle's side, allowing locking and unlocking using a different side's key. For example: Unlocking INDEP vehicles with a BLUFOR key. * `ACE_vehicleLock_lockpickStrength` - NUMBER: seconds, determines how long lockpicking with take, overrides the value set in the module for a specific vehicle of the mission maker's choice. -### 1.18 View Distance Limiter +### 1.19 View Distance Limiter *Part of: ace_viewdistance* This module allows disabling the ACE3 View Distance feature as well as setting a view distance limit. @@ -320,12 +366,13 @@ This module allows disabling the ACE3 View Distance feature as well as setting a 1. **Enable ACE viewdistance (Boolean)**
Enables ACE viewdistance
`Default value: Yes` + 2. **View Distance Limit (Number)**
Sets the limit for how high clients can raise their view distance (<= 10000) `Default value: 10000` -### 1.19 Weather +### 1.20 Weather *Part of: ace_weather* This module allows you to customize the weather settings. @@ -344,6 +391,7 @@ Enables sever side weather propagation.
Note:

This is responsible for synchronizing weather between all clients. Disabling it is not recommended.

+ 2. **ACE3 Weather (Boolean)**
Overrides the default weather with ACE3 weather (map based).
`Default value: Yes` @@ -351,21 +399,25 @@ Overrides the default weather with ACE3 weather (map based).
Note:

This can be disabled without affecting the weather propagation above. Useful if you prefer changing weather settings manually.

+ 3. **Sync Rain (Boolean)**
Synchronizes rain.
`Default value: Yes` -3. **Sync Wind (Boolean)**
+ +4. **Sync Wind (Boolean)**
Synchronizes wind.
`Default value: Yes` -3. **Sync Misc (Boolean)**
+ +5. **Sync Misc (Boolean)**
Synchronizes lightnings, rainbow, fog, ...
`Default value: Yes` -4. **Update Interval (Number)**
+ +6. **Update Interval (Number)**
Defines the interval (seconds) between weather updates.
`Default value: 60` -### 1.20 Wind Deflection +### 1.21 Wind Deflection *Part of: ace_winddeflection* This module allows you to define when wind deflection is active. @@ -385,18 +437,47 @@ This module allows you to define when wind deflection is active. 1. **Wind Deflection (Boolean)**
Enables wind deflection.
`Default value: Yes` + 2. **Vehicle Enabled (Boolean)**
Enables wind deflection for static/vehicle gunners.
`Default value: Yes` + 3. **Simulation Interval (Number)**
Defines the interval between every calculation step.
`Default value: 0.05` + 4. **Simulation Radius (Number)**
Defines the radius around the player (in meters) at which projectiles are wind deflected.
`Default value: 3000` +### 1.22 Zeus Settings +*part of: ace_zeus* -### 1.21 LSD Vehicles +This module provides control over vanilla aspects of Zeus. + +**Settings:** + +1. **Ascension Messages (Option)**
+Display global popup messages when a player is assigned as Zeus
+`Default value: No` + +2. **Zeus Eagle (Boolean)**
+Spawn an eagle that follows the Zeus camera
+`Default value: No` + +3. **Wind Sounds (Boolean)**
+Play wind sounds when Zeus remote controls a unit
+`Default value: No` + +4. **Ordnance Warning (Boolean)**
+Play a radio warning when Zeus uses ordnance
+`Default value: No` + +5. **Reveal Mines (Scalar)**
+Reveal mines to allies and/or place map markers
+`Default value: Disabled` + +### 1.23 LSD Vehicles *Part of: ace_core* And then there's the "LSD Vehicles" module … it does 'something' to all vehicles synced to that module. @@ -404,7 +485,6 @@ And then there's the "LSD Vehicles" module … it does 'something' to all v - ## 2. ACE3 Medical *Part of: ace_medical* @@ -417,37 +497,52 @@ This module allows to tweak all the medical settings used in ACE3 1. **Medical Level (Option)**
What is the medical simulation level?
`Default value: "Basic"` + 2. **Medics setting (Option)**
What is the level of detail preferred for medics?
`Default value: "Normal"` + 3. **Enable Litter (Boolean)**
Enable litter being created upon treatment.
-`Default value: "Normal"` +`Default value: "Yes"` + 4. **Life time of litter objects (Number)**
How long should litter objects stay? In seconds. -1 is forever.
`Default value: 1800` + 5. **Enable Screams (Boolean)**
Enable screaming by injured units.
`Default value: Yes` + 6. **Player Damage (Number)**
What is the damage a player can take before being killed?
`Default value: 1` + 7. **AI Damage (Number)**
What is the damage an AI can take before being killed?
`Default value: 1` + 8. **AI Unconsciousness (Option)**
Allow AI to go unconscious.
`Default value: "50/50"` -9. **Prevent instant death (Boolean)**
+ +9. **Remote controlled AI (Boolean)**
+Treats remote controlled units as AI not players ? +`Default value: Yes` + +10. **Prevent instant death (Boolean)**
Have a unit move to unconscious instead of death.
`Default value: No` -10. **Bleeding coefficient (Number)**
+ +11. **Bleeding coefficient (Number)**
Coefficient to modify the bleeding speed.
`Default value: 1` -11. **Pain coefficient (Number)**
+ +12. **Pain coefficient (Number)**
Coefficient to modify the pain intensity.
`Default value: 1` -12. **Pain coefficient (Boolean)**
+ +13. **Sync status (Boolean)**
Keep unit status synced. Recommended on.
`Default value: Yes` @@ -461,31 +556,46 @@ This module allows you to change the default Advanced Medical Settings, when [2. 1. **Enabled for (Option)**
Select what units the advanced medical system will be enabled for.
`Default value: "Players only"` + 2. **Enable Advanced wounds (Boolean)**
Allow reopening of bandaged wounds?
`Default value: No` + 3. **Vehicle Crashes (Boolean)**
Do units take damage from a vehicle crash?
`Default value: Yes` + 4. **Allow PAK (Option)**
Who can use the PAK for full heal?
`Default value: "Medics only"` + 5. **Remove PAK on use (Boolean)**
Should PAK be removed on usage?
`Default value: Yes` + 6. **Locations PAK (Option)**
Where can the personal aid kit be used?
`Default value: "Vehicles & facility"` + 7. **Allow Surgical kit (Option)**
Who can use the surgical kit?
`Default value: "Medics only"` + 8. **Remove Surgical kit (Boolean)**
Should Surgical kit be removed on usage?
`Default value: Yes` + 9. **Locations Surgical kit (Option)**
Where can the Surgical kit be used?
`Default value: "Vehicles & facility"` +10. **Bloodstains (Boolean)**
+Bandaging removes bloodstains. +`Default value: No` + +11. **Pain supression (Boolean)**
+Pain is only temporarly supressed not removed. +`Default value: Yes` ### 2.3 Revive Settings @@ -496,9 +606,11 @@ This modules allows a mission maker to limit the amount of revives for units in 1. **Enable Revive (Option)**
Enable a basic revive system
`Default value: "disable"` + 2. **Max Revive time (Number)**
Max amount of seconds a unit can spend in revive state
`Default value: 120` + 3. **Max Revive lives (Number)**
Max amount of lives a unit. 0 or -1 is disabled.
`Default value: -1` @@ -513,6 +625,7 @@ Using this module you can define which unit class is defined as a medic / doctor 1. **List (String)**
List of unit names that will be classified as medic, separated by commas.
`Default value: ""` + 2. **Is Medic (Boolean)**
Medics allow for more advanced treatment in case of Advanced Medic roles enabled
`Default value: "Regular medic"` @@ -538,6 +651,7 @@ Defines an object as a medical facility. This allows for more advanced treatment 1. **List (String)**
List of vehicles that will be classified as medical vehicle, separated by commas.
`Default value: ""` + 2. **Is Medical Vehicle (Boolean)**
Whether or not the objects in the list will be a medical vehicle.
`Default value: Yes` @@ -559,46 +673,27 @@ This module randomizes the time when the sound file is played and the position w 1. **Sounds (String)**
Class names of the ambiance sounds played. Separated by ','. (Example: `radio_track_01, electricity_loop`).
`Default value: ""` + 2. **Minimal Distance (Number)**
Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) (in meters)
`Default value: 400` + 3. **Maximum Distance (Number)**
Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) (in meters)
`Default value: 900` + 4. **Minimal Delay (Number)**
Minimal delay (in seconds) between sounds played
`Default value: 10` + 5. **Maximum Delay (Number)**
Maximum delay (in seconds) between sounds played
`Default value: 10` + 6. **Follow Players (Boolean)**
Follow players. If set to false, loop will play sounds only nearby logic position.
`Default value: No` + 7. **Volume (Number)**
The volume of the sounds played
-`Default value: 1` - - -## 4. ACE3 Zeus -*Part of: ace_zeus* - -### 4.1 Zeus Settings -This module provides control over vanilla aspects of Zeus. - -**Settings:** - -1. **Ascension Messages (Option)**
-Display global popup messages when a player is assigned as Zeus
-`Default value: No` -2. **Zeus Eagle (Boolean)**
-Spawn an eagle that follows the Zeus camera
-`Default value: No` -3. **Wind Sounds (Boolean)**
-Play wind sounds when Zeus remote controls a unit
-`Default value: No` -4. **Ordnance Warning (Boolean)**
-Play a radio warning when Zeus uses ordnance
-`Default value: No` -5. **Reveal Mines (Scalar)**
-Reveal mines to allies and/or place map markers
-`Default value: Disabled` +`Default value: 1` \ No newline at end of file diff --git a/extensions/advanced_ballistics/AdvancedBallistics.cpp b/extensions/advanced_ballistics/AdvancedBallistics.cpp index 8d990ec0d2..c5c0a6c7a3 100644 --- a/extensions/advanced_ballistics/AdvancedBallistics.cpp +++ b/extensions/advanced_ballistics/AdvancedBallistics.cpp @@ -236,9 +236,9 @@ extern "C" void __stdcall RVExtension(char *output, int outputSize, const char *function) { ZERO_OUTPUT(); - + std::stringstream outputStr; if (!strcmp(function, "version")) { - int n = sprintf(output, "%s", ACE_FULL_VERSION_STR); + strncpy(output, ACE_FULL_VERSION_STR, outputSize); EXTENSION_RETURN(); } @@ -258,7 +258,11 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) velocity = strtod(strtok_s(NULL, ":", &next_token), NULL); retard = calculateRetard(dragModel, ballisticCoefficient, velocity); - int n = sprintf(output, "%f", retard); + // int n = sprintf(output, "%f", retard); + + outputStr << retard; + strncpy(output, outputStr.str().c_str(), outputSize); + EXTENSION_RETURN(); } else if (!strcmp(mode, "atmosphericCorrection")) { double ballisticCoefficient = 1.0; @@ -274,7 +278,9 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) atmosphereModel = strtok_s(NULL, ":", &next_token); ballisticCoefficient = calculateAtmosphericCorrection(ballisticCoefficient, temperature, pressure, humidity, atmosphereModel); - int n = sprintf(output, "%f", ballisticCoefficient); + //int n = sprintf(output, "%f", ballisticCoefficient); + outputStr << ballisticCoefficient; + strncpy(output, outputStr.str().c_str(), outputSize); EXTENSION_RETURN(); } else if (!strcmp(mode, "new")) { unsigned int index = 0; @@ -369,7 +375,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) bulletDatabase[index].frames = 0.0; bulletDatabase[index].randSeed = 0; - int n = sprintf(output, "%s", ""); + strncpy(output, "", outputSize); EXTENSION_RETURN(); } else if (!strcmp(mode, "simulate")) { // simulate:0:[-0.109985,542.529,-3.98301]:[3751.57,5332.23,214.252]:[0.598153,2.38829,0]:28.6:0:0.481542:0:215.16 @@ -586,8 +592,9 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) velocityOffset[1] += (distribution(bulletDatabase[index].randGenerator) * 0.8 - 0.4) * coef; velocityOffset[2] += (distribution(bulletDatabase[index].randGenerator) * 0.8 - 0.4) * coef; }; - - int n = sprintf(output, "_bullet setVelocity (_bulletVelocity vectorAdd [%f, %f, %f]); _bullet setPosASL (_bulletPosition vectorAdd [%f, %f, %f]);", velocityOffset[0], velocityOffset[1], velocityOffset[2], positionOffset[0], positionOffset[1], positionOffset[2]); + + outputStr << "_bullet setVelocity (_bulletVelocity vectorAdd [" << velocityOffset[0] << "," << velocityOffset[1] << "," << velocityOffset[2] << "]); _bullet setPosASL (_bulletPosition vectorAdd [" << positionOffset[0] << "," << positionOffset[1] << "," << positionOffset[2] << "]);"; + strncpy(output, outputStr.str().c_str(), outputSize); EXTENSION_RETURN(); } else if (!strcmp(mode, "set")) { int height = 0; @@ -602,7 +609,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) map->gridBuildingNums.push_back(numObjects); map->gridSurfaceIsWater.push_back(surfaceIsWater); - int n = sprintf(output, "%s", ""); + strncpy(output, outputStr.str().c_str(), outputSize); EXTENSION_RETURN(); } else if (!strcmp(mode, "init")) { int mapSize = 0; @@ -617,7 +624,8 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) map = &mapDatabase[worldName]; if (map->gridHeights.size() == gridCells) { - int n = sprintf(output, "%s", "Terrain already initialized"); + outputStr << "Terrain already initialized"; + strncpy(output, outputStr.str().c_str(), outputSize); EXTENSION_RETURN(); } @@ -630,10 +638,9 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) map->gridBuildingNums.reserve(gridCells); map->gridSurfaceIsWater.reserve(gridCells); - int n = sprintf(output, "%s", ""); + strncpy(output, outputStr.str().c_str(), outputSize); EXTENSION_RETURN(); } - - int n = sprintf(output, "%s", ""); + strncpy(output, outputStr.str().c_str(), outputSize); EXTENSION_RETURN(); } diff --git a/extensions/medical/handleDamage.cpp b/extensions/medical/handleDamage.cpp index b388845ac5..e36d8994b0 100644 --- a/extensions/medical/handleDamage.cpp +++ b/extensions/medical/handleDamage.cpp @@ -96,7 +96,8 @@ namespace ace { } else { - injuryToAdd = information.at(0); + int indexNewInjuryToAdd = rand() % information.size(); + injuryToAdd = information.at(indexNewInjuryToAdd); } int bodyPartID = selection; diff --git a/extras/YardageProSport.pdf b/extras/YardageProSport.pdf new file mode 100644 index 0000000000..60f527aacb Binary files /dev/null and b/extras/YardageProSport.pdf differ diff --git a/extras/assets/icons/Icons_Modules.psd b/extras/assets/icons/Icons_Modules.psd index af9b9abaa0..927c497ecd 100644 Binary files a/extras/assets/icons/Icons_Modules.psd and b/extras/assets/icons/Icons_Modules.psd differ diff --git a/extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png b/extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png new file mode 100644 index 0000000000..c19c3ca276 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png differ diff --git a/mod.cpp b/mod.cpp index f9ae718fdc..c078328e53 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.0.1"; +name = "Advanced Combat Environment 3.1.2"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.0.1"; +description = "ACE3 - Version 3.1.2"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; diff --git a/optionals/compat_asdg/config.cpp b/optionals/compat_asdg/config.cpp index c7e7903ce2..40dae32051 100644 --- a/optionals/compat_asdg/config.cpp +++ b/optionals/compat_asdg/config.cpp @@ -17,6 +17,7 @@ class asdg_FrontSideRail: asdg_SlotInfo { class compatibleItems { ACE_acc_pointer_red = 1; ACE_acc_pointer_green = 1; + ACE_acc_pointer_green_IR = 1; }; }; diff --git a/optionals/compat_cup/CfgAmmo.hpp b/optionals/compat_cup/CfgAmmo.hpp index a3cafcfbb0..f5ba34fc7e 100644 --- a/optionals/compat_cup/CfgAmmo.hpp +++ b/optionals/compat_cup/CfgAmmo.hpp @@ -4,6 +4,7 @@ class CfgAmmo class B_762x51_Ball; class B_127x99_Ball; class CUP_B_545x39_Ball: BulletBase { + airFriction=-0.0011204; ACE_caliber=5.588; ACE_bulletLength=21.59; ACE_bulletMass=3.42792; @@ -16,6 +17,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_545x39_Ball_Tracer_Green: CUP_B_545x39_Ball { + airFriction=-0.0011204; ACE_caliber=5.588; ACE_bulletLength=21.59; ACE_bulletMass=3.22704; @@ -28,6 +30,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_545x39_Ball_Tracer_Red: BulletBase { + airFriction=-0.0011204; ACE_caliber=5.588; ACE_bulletLength=21.59; ACE_bulletMass=3.22704; @@ -40,6 +43,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_545x39_Ball_Tracer_White: BulletBase { + airFriction=-0.0011204; ACE_caliber=5.588; ACE_bulletLength=21.59; ACE_bulletMass=3.22704; @@ -52,6 +56,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_545x39_Ball_Tracer_Yellow: BulletBase { + airFriction=-0.0011204; ACE_caliber=5.588; ACE_bulletLength=21.59; ACE_bulletMass=3.22704; @@ -64,6 +69,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_762x39_Ball: BulletBase { + airFriction=-0.00150173; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=7.9704; @@ -76,6 +82,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_762x39_Ball_Tracer_Green: BulletBase { + airFriction=-0.00150173; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=7.5816; @@ -88,6 +95,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class B_762x39mm_KLT: BulletBase { + airFriction=-0.00150173; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=7.5816; @@ -100,6 +108,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_9x18_Ball: BulletBase { + airFriction=-0.00180193; ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -112,6 +121,7 @@ class CfgAmmo ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; class CUP_B_9x18_Ball_Tracer_Green: BulletBase { + airFriction=-0.00180193; ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -124,6 +134,7 @@ class CfgAmmo ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; class CUP_B_9x18_Ball_Tracer_Red: BulletBase { + airFriction=-0.00180193; ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -136,6 +147,7 @@ class CfgAmmo ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; class CUP_B_9x18_Ball_Tracer_Yellow: BulletBase { + airFriction=-0.00180193; ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -148,6 +160,7 @@ class CfgAmmo ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; class CUP_B_9x18_Ball_White_Tracer: BulletBase { + airFriction=-0.00180193; ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -160,6 +173,7 @@ class CfgAmmo ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; class CUP_B_9x19_Ball: BulletBase { + airFriction=-0.00205726; ACE_caliber=9.017; ACE_bulletLength=15.494; ACE_bulletMass=8.0352; @@ -172,6 +186,7 @@ class CfgAmmo ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; class CUP_B_762x51_noTracer: B_762x51_Ball { + airFriction=-0.00099036; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=9.4608; @@ -184,6 +199,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; class CUP_B_303_Ball: BulletBase { + airFriction=-0.00082199; ACE_caliber=7.899; ACE_bulletLength=31.166; ACE_bulletMass=11.2752; @@ -196,6 +212,7 @@ class CfgAmmo ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; class CUP_B_127x107_Ball_Green_Tracer: BulletBase { + airFriction=-0.00062618; ACE_caliber=12.979; ACE_bulletLength=64.008; ACE_bulletMass=48.276; @@ -208,6 +225,7 @@ class CfgAmmo ACE_barrelLengths[]={728.98}; }; class CUP_B_127x108_Ball_Green_Tracer: BulletBase { + airFriction=-0.00062618; ACE_caliber=12.979; ACE_bulletLength=64.008; ACE_bulletMass=48.276; @@ -220,6 +238,7 @@ class CfgAmmo ACE_barrelLengths[]={728.98}; }; class CUP_B_762x54_Ball_White_Tracer: BulletBase { + airFriction=-0.00101742; ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.6552; @@ -232,6 +251,7 @@ class CfgAmmo ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; class CUP_B_762x54_Ball_Red_Tracer: BulletBase { + airFriction=-0.00101742; ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.6552; @@ -244,6 +264,7 @@ class CfgAmmo ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; class CUP_B_762x54_Ball_Green_Tracer: BulletBase { + airFriction=-0.00101742; ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.6552; @@ -256,6 +277,7 @@ class CfgAmmo ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; class CUP_B_762x54_Ball_Yellow_Tracer: BulletBase { + airFriction=-0.00101742; ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.6552; @@ -268,6 +290,7 @@ class CfgAmmo ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; class CUP_B_9x39_SP5: BulletBase { + airFriction=-0.00075274; ACE_caliber=9.246; ACE_bulletLength=31.496; ACE_bulletMass=16.2; @@ -280,6 +303,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class CUP_B_762x51_Tracer_Green: BulletBase { + airFriction=-0.00099036; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=9.4608; @@ -292,6 +316,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; class CUP_B_762x51_Tracer_Red: BulletBase { + airFriction=-0.00099036; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=9.4608; @@ -304,6 +329,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; class CUP_B_762x51_Tracer_Yellow: BulletBase { + airFriction=-0.00099036; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=9.4608; @@ -316,6 +342,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; class CUP_B_762x51_Tracer_White: BulletBase { + airFriction=-0.00099036; ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=9.4608; @@ -340,6 +367,7 @@ class CfgAmmo ACE_barrelLengths[]={728.98}; }; class CUP_B_9x18_SD: BulletBase { + airFriction=-0.00180193; ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -352,6 +380,7 @@ class CfgAmmo ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; class CUP_B_765x17_Ball: BulletBase { + airFriction=-0.00173452; ACE_caliber=7.938; ACE_bulletLength=15.494; ACE_bulletMass=4.212; @@ -364,6 +393,7 @@ class CfgAmmo ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; class CUP_B_145x115_AP_Green_Tracer: BulletBase { + airFriction=-0.00059041; ACE_caliber=14.884; ACE_bulletLength=50.8; ACE_bulletMass=65.448; @@ -376,6 +406,7 @@ class CfgAmmo ACE_barrelLengths[]={1346.2}; }; class CUP_B_127x99_Ball_White_Tracer: B_127x99_Ball { + airFriction=-0.00057503; ACE_caliber=12.954; ACE_bulletLength=58.674; ACE_bulletMass=41.9256; @@ -388,15 +419,16 @@ class CfgAmmo ACE_barrelLengths[]={736.6}; }; class CUP_B_86x70_Ball_noTracer: BulletBase { + airFriction=-0.0005788; ACE_caliber=8.585; - ACE_bulletLength=43.18; - ACE_bulletMass=19.44; + ACE_bulletLength=39.573; + ACE_bulletMass=16.2; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.381}; + ACE_ballisticCoefficients[]={0.322}; ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; ACE_dragModel=7; - ACE_muzzleVelocities[]={820, 826, 830}; - ACE_barrelLengths[]={609.6, 673.1, 711.2}; + ACE_muzzleVelocities[]={880, 915, 925}; + ACE_barrelLengths[]={508.0, 660.4, 711.2}; }; }; \ No newline at end of file diff --git a/optionals/compat_cup/CfgMagazines.hpp b/optionals/compat_cup/CfgMagazines.hpp index b05b0c3efd..469476734c 100644 --- a/optionals/compat_cup/CfgMagazines.hpp +++ b/optionals/compat_cup/CfgMagazines.hpp @@ -45,4 +45,223 @@ class CfgMagazines { modelSpecial = ""; mass = 0; }; + + class CA_Magazine; + class 30Rnd_556x45_Stanag; + class CUP_30Rnd_545x39_AK_M: CA_Magazine { + initSpeed = 880; + }; + class CUP_30Rnd_TE1_Green_Tracer_545x39_AK_M: CA_Magazine { + initSpeed = 880; + }; + class CUP_30Rnd_TE1_Red_Tracer_545x39_AK_M: CA_Magazine { + initSpeed = 880; + }; + class CUP_30Rnd_TE1_White_Tracer_545x39_AK_M: CA_Magazine { + initSpeed = 880; + }; + class CUP_30Rnd_TE1_Yellow_Tracer_545x39_AK_M: CA_Magazine { + initSpeed = 880; + }; + class CUP_75Rnd_TE4_LRT4_Green_Tracer_545x39_RPK_M: CA_Magazine { + initSpeed = 880; + }; + class CUP_30Rnd_762x39_AK47_M: CA_Magazine { + initSpeed = 750; + }; + class CUP_64Rnd_9x19_Bizon_M: CA_Magazine { + initSpeed = 350; + }; + class CUP_64Rnd_Green_Tracer_9x19_Bizon_M: CA_Magazine { + initSpeed = 350; + }; + class CUP_64Rnd_Red_Tracer_9x19_Bizon_M: CA_Magazine { + initSpeed = 350; + }; + class CUP_64Rnd_White_Tracer_9x19_Bizon_M: CA_Magazine { + initSpeed = 350; + }; + class CUP_64Rnd_Yellow_Tracer_9x19_Bizon_M: CA_Magazine { + initSpeed = 350; + }; + class CUP_5x_22_LR_17_HMR_M: CA_Magazine { + initSpeed = 830; + }; + class CUP_10x_303_M: CA_Magazine { + initSpeed = 765; + }; + class CUP_20Rnd_762x51_FNFAL_M: CA_Magazine { + initSpeed = 833; + }; + class CUP_5Rnd_127x108_KSVK_M: CA_Magazine { + initSpeed = 820; + }; + class CUP_100Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M: CA_Magazine { + initSpeed = 833; + }; + class CUP_100Rnd_TE4_LRT4_Red_Tracer_762x51_Belt_M: CUP_100Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M { + initSpeed = 833; + }; + class CUP_200Rnd_TE4_LRT4_White_Tracer_762x51_Belt_M: CA_Magazine { + initSpeed = 833; + }; + class CUP_200Rnd_TE4_LRT4_Red_Tracer_762x51_Belt_M: CA_Magazine { + initSpeed = 833; + }; + class CUP_100Rnd_TE4_LRT4_762x54_PK_Tracer_Green_M: CA_Magazine { + initSpeed = 800; + }; + class CUP_10Rnd_762x54_SVD_M: CA_Magazine { + initSpeed = 800; + }; + class CUP_10Rnd_9x39_SP5_VSS_M: CA_Magazine { + initSpeed = 300; + }; + class CUP_20Rnd_9x39_SP5_VSS_M: CA_Magazine { + initSpeed = 300; + }; + class CUP_5Rnd_127x99_as50_M: CA_Magazine { + initSpeed = 900; + }; + class CUP_20Rnd_762x51_DMR: CA_Magazine { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Yellow_Tracer_762x51_DMR: CUP_20Rnd_762x51_DMR { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Red_Tracer_762x51_DMR: CUP_20Rnd_762x51_DMR { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Green_Tracer_762x51_DMR: CUP_20Rnd_762x51_DMR { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_White_Tracer_762x51_DMR: CUP_20Rnd_762x51_DMR { + initSpeed = 833; + }; + class CUP_20Rnd_762x51_B_SCAR: CA_Magazine { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Yellow_Tracer_762x51_SCAR: CUP_20Rnd_762x51_B_SCAR { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Red_Tracer_762x51_SCAR: CUP_20Rnd_762x51_B_SCAR { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Green_Tracer_762x51_SCAR: CUP_20Rnd_762x51_B_SCAR { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_White_Tracer_762x51_SCAR: CUP_20Rnd_762x51_B_SCAR { + initSpeed = 833; + }; + class CUP_20Rnd_762x51_B_M110: CA_Magazine { + initSpeed = 833; + }; + class CUP_5Rnd_762x51_M24: CA_Magazine { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Yellow_Tracer_762x51_M110: CUP_20Rnd_762x51_B_M110 { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Red_Tracer_762x51_M110: CUP_20Rnd_762x51_B_M110 { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_Green_Tracer_762x51_M110: CUP_20Rnd_762x51_B_M110 { + initSpeed = 833; + }; + class CUP_20Rnd_TE1_White_Tracer_762x51_M110: CUP_20Rnd_762x51_B_M110 { + initSpeed = 833; + }; + class CUP_30Rnd_556x45_G36: 30Rnd_556x45_Stanag { + initSpeed = 920; + }; + class CUP_30Rnd_TE1_Red_Tracer_556x45_G36: CUP_30Rnd_556x45_G36 { + initSpeed = 920; + }; + class CUP_30Rnd_TE1_Green_Tracer_556x45_G36: CUP_30Rnd_556x45_G36 { + initSpeed = 920; + }; + class CUP_30Rnd_TE1_Yellow_Tracer_556x45_G36: CUP_30Rnd_556x45_G36 { + initSpeed = 920; + }; + class CUP_100Rnd_556x45_BetaCMag: 30Rnd_556x45_Stanag { + initSpeed = 920; + }; + class CUP_100Rnd_TE1_Red_Tracer_556x45_BetaCMag: CUP_100Rnd_556x45_BetaCMag { + initSpeed = 920; + }; + class CUP_100Rnd_TE1_Green_Tracer_556x45_BetaCMag: CUP_100Rnd_556x45_BetaCMag { + initSpeed = 920; + }; + class CUP_100Rnd_TE1_Yellow_Tracer_556x45_BetaCMag: CUP_100Rnd_556x45_BetaCMag { + initSpeed = 920; + }; + class CUP_200Rnd_TE4_Green_Tracer_556x45_M249: CA_Magazine { + initSpeed = 920; + }; + class CUP_200Rnd_TE4_Red_Tracer_556x45_M249: CUP_200Rnd_TE4_Green_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_200Rnd_TE4_Yellow_Tracer_556x45_M249: CUP_200Rnd_TE4_Green_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_200Rnd_TE1_Red_Tracer_556x45_M249: CUP_200Rnd_TE4_Red_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_100Rnd_TE4_Green_Tracer_556x45_M249: CA_Magazine { + initSpeed = 920; + }; + class CUP_100Rnd_TE4_Red_Tracer_556x45_M249: CUP_100Rnd_TE4_Green_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_100Rnd_TE4_Yellow_Tracer_556x45_M249: CUP_100Rnd_TE4_Green_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_200Rnd_TE4_Green_Tracer_556x45_L110A1: CUP_200Rnd_TE4_Green_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_200Rnd_TE4_Red_Tracer_556x45_L110A1: CUP_200Rnd_TE4_Red_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_200Rnd_TE4_Yellow_Tracer_556x45_L110A1: CUP_200Rnd_TE4_Yellow_Tracer_556x45_M249 { + initSpeed = 920; + }; + class CUP_30Rnd_556x45_Stanag: CA_Magazine { + initSpeed = 920; + }; + class CUP_20Rnd_556x45_Stanag: CUP_30Rnd_556x45_Stanag { + initSpeed = 920; + }; + class CUP_10Rnd_127x99_M107: CA_Magazine { + initSpeed = 900; + }; + class CUP_10Rnd_762x51_CZ750: CA_Magazine { + initSpeed = 833; + }; + class CUP_10Rnd_762x51_CZ750_Tracer: CUP_10Rnd_762x51_CZ750 { + initSpeed = 833; + }; + class CUP_50Rnd_UK59_762x54R_Tracer: CA_Magazine { + initSpeed = 800; + }; + class CUP_8Rnd_9x18_Makarov_M: CA_Magazine { + initSpeed = 300; + }; + class CUP_8Rnd_9x18_MakarovSD_M: CUP_8Rnd_9x18_Makarov_M { + initSpeed = 300; + }; + class CUP_6Rnd_45ACP_M: CA_Magazine { + initSpeed = 250; + }; + class CUP_17Rnd_9x19_glock17: CA_Magazine { + initSpeed = 370; + }; + class CUP_5Rnd_86x70_L115A1: CA_Magazine { + initSpeed = 915; + }; + class CUP_20Rnd_B_765x17_Ball_M: CA_Magazine { + initSpeed = 290; + }; + class CUP_30Rnd_9x19_MP5: CA_Magazine { + initSpeed = 400; + }; }; \ No newline at end of file diff --git a/optionals/compat_cup/CfgWeapons.hpp b/optionals/compat_cup/CfgWeapons.hpp index e897384343..76d442ee53 100644 --- a/optionals/compat_cup/CfgWeapons.hpp +++ b/optionals/compat_cup/CfgWeapons.hpp @@ -5,175 +5,217 @@ class CfgWeapons class Rifle_Long_Base_F; class Launcher_Base_F; class CUP_hgun_Colt1911 : Pistol_Base_F { + initSpeed=-1.04; ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; class CUP_sgun_AA12 : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=457.2; }; class CUP_arifle_AK_Base : Rifle_Base_F { + initSpeed=-0.95467; ACE_barrelTwist=240.03; ACE_barrelLength=414.02; }; class CUP_arifle_AK107_Base : CUP_arifle_AK_Base { + initSpeed=-1.0; ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; class CUP_arifle_AKS_Base : CUP_arifle_AK_Base { + initSpeed=-0.95467; ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; class CUP_arifle_AKS74U : CUP_arifle_AK_Base { + initSpeed=-0.88636; ACE_barrelTwist=160.02; ACE_barrelLength=210.82; }; class CUP_arifle_AK74; class CUP_arifle_RPK74 : CUP_arifle_AK74 { + initSpeed=-1.0; ACE_barrelTwist=195.072; ACE_barrelLength=589.28; }; class CUP_srifle_AS50 : Rifle_Long_Base_F { + initSpeed=-1.0; ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; class CUP_srifle_AWM_Base : Rifle_Long_Base_F { + initSpeed=-1.00547; ACE_barrelTwist=279.4; ACE_barrelLength=685.8; }; class CUP_smg_bizon : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=231.14; }; class CUP_hgun_Compact : Pistol_Base_F { + initSpeed=-0.97778; ACE_barrelTwist=248.92; ACE_barrelLength=94.996; }; class CUP_srifle_CZ750 : Rifle_Long_Base_F { + initSpeed=-1.0; ACE_barrelTwist=304.8; ACE_barrelLength=660.4; }; class CUP_arifle_CZ805_Base : Rifle_Base_F { + initSpeed=-0.87283; ACE_barrelTwist=304.8; ACE_barrelLength=355.6; }; class CUP_arifle_CZ805_A1 : CUP_arifle_CZ805_Base { + initSpeed=-0.93696; ACE_barrelTwist=304.8; ACE_barrelLength=355.6; }; class CUP_arifle_CZ805_A2 : CUP_arifle_CZ805_Base { + initSpeed=-0.87283; ACE_barrelTwist=304.8; ACE_barrelLength=276.86; }; class CUP_srifle_DMR : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; class CUP_hgun_Duty : Pistol_Base_F { + initSpeed=-0.97778; ACE_barrelTwist=248.92; ACE_barrelLength=94.996; }; class CUP_arifle_FNFAL : Rifle_Base_F { + initSpeed=-0.98796; ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; class CUP_arifle_G36_Base; class CUP_arifle_G36A : CUP_arifle_G36_Base { + initSpeed=-0.99357; ACE_barrelTwist=177.8; ACE_barrelLength=480; }; class CUP_arifle_G36K : CUP_arifle_G36A { + initSpeed=-0.90761; ACE_barrelTwist=177.8; ACE_barrelLength=318; }; class CUP_arifle_G36C : Rifle_Base_F { + initSpeed=-0.81522; ACE_barrelTwist=177.8; ACE_barrelLength=228; }; class CUP_arifle_MG36 : CUP_arifle_G36C { + initSpeed=-0.99457; ACE_barrelTwist=177.8; ACE_barrelLength=480; }; class CUP_hgun_Glock17 : Pistol_Base_F { + initSpeed=-0.9595; ACE_barrelTwist=248.92; ACE_barrelLength=114.046; }; class CUP_srifle_CZ550 : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=304.8; ACE_barrelLength=599.999; }; class CUP_srifle_ksvk : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=457.2; ACE_barrelLength=999.998; }; class CUP_lmg_L7A2 : Rifle_Long_Base_F { + initSpeed=-1.0; ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; class CUP_arifle_L85A2_Base : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=177.8; ACE_barrelLength=518.16; }; class CUP_arifle_L86A2_Base: Rifle_Base_F { + initSpeed=-0.97826; ACE_barrelTwist=177.8; ACE_barrelLength=646; }; class CUP_lmg_L110A1 : Rifle_Long_Base_F { + initSpeed=-0.93044; ACE_barrelTwist=177.8; ACE_barrelLength=347.98; }; class CUP_srifle_LeeEnfield : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=254.0; ACE_barrelLength=640.08; }; class CUP_hgun_M9 : Pistol_Base_F { + initSpeed=-1.0; ACE_barrelTwist=248.92; ACE_barrelLength=124.46; }; class CUP_srifle_M14 : Rifle_Base_F { + initSpeed=-0.99160; ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; class CUP_arifle_M16_Base : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=355.6; ACE_barrelLength=508.0; }; class CUP_arifle_M16A4_Base; class CUP_arifle_M4_Base : CUP_arifle_M16A4_Base { + initSpeed=-0.94565; ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; class CUP_arifle_M4A1; class CUP_srifle_Mk12SPR : CUP_arifle_M4A1 { + initSpeed=-0.98696; ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; class CUP_srifle_M24_des : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; class CUP_lmg_M60A4 : Rifle_Long_Base_F { + initSpeed=-0.96639; ACE_barrelTwist=304.8; ACE_barrelLength=431.8; }; class CUP_srifle_M107_Base : Rifle_Long_Base_F { + initSpeed=-1.0; ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; class CUP_srifle_M110 : Rifle_Base_F { + initSpeed=-0.98558; ACE_barrelTwist=279.4; ACE_barrelLength=508.0; }; class CUP_lmg_M240 : Rifle_Long_Base_F { + initSpeed=-1.00600; ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; class CUP_lmg_M249_para : Rifle_Long_Base_F { + initSpeed=-0.96739; ACE_barrelTwist=177.8; ACE_barrelLength=414.02; }; class CUP_lmg_M249 : Rifle_Long_Base_F { + initSpeed=-0.98696; ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; @@ -183,153 +225,204 @@ class CfgWeapons ACE_barrelLength=469.9; }; class CUP_hgun_Makarov : Pistol_Base_F { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=93.472; }; class CUP_hgun_MicroUzi : Pistol_Base_F { + initSpeed=-1.0; ACE_barrelTwist=248.92; ACE_barrelLength=127.0; }; class CUP_lmg_Mk48_Base : Rifle_Long_Base_F { + initSpeed=-0.98558; ACE_barrelTwist=304.8; ACE_barrelLength=501.65; }; class CUP_smg_MP5SD6 : Rifle_Base_F { + initSpeed=-0.9375; ACE_barrelTwist=254.0; ACE_barrelLength=144.78; }; class CUP_smg_MP5A5 : CUP_smg_MP5SD6 { + initSpeed=-1.0; ACE_barrelTwist=254.0; ACE_barrelLength=226.06; - }; + }; + class CUP_smg_EVO : Rifle_Base_F { + initSpeed=-0.975; + ACE_barrelTwist=254.0; + ACE_barrelLength=195.58; + }; class CUP_hgun_PB6P9 : Pistol_Base_F { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=104.14; }; class CUP_hgun_Phantom : Pistol_Base_F { + initSpeed=-1.0; ACE_barrelTwist=246.38; ACE_barrelLength=119.38; }; class CUP_lmg_PKM : Rifle_Long_Base_F { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=645.16; }; class CUP_lmg_Pecheneg : CUP_lmg_PKM { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=657.86; }; class CUP_hgun_TaurusTracker455 : Pistol_Base_F { + initSpeed=-0.92; ACE_barrelTwist=304.8; ACE_barrelLength=101.6; }; class CUP_arifle_Sa58_base; class CUP_arifle_Sa58P : CUP_arifle_Sa58_base { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=391.16; }; class CUP_arifle_Sa58V : CUP_arifle_Sa58P { + initSpeed=-1.0; + ACE_barrelTwist=240.03; + ACE_barrelLength=391.16; + }; + class CUP_arifle_Sa58RIS1 : CUP_arifle_Sa58_base { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=391.16; }; class CUP_hgun_SA61 : Pistol_Base_F { + initSpeed=-1.0; ACE_barrelTwist=406.4; ACE_barrelLength=114.3; }; class CUP_sgun_Saiga12K: Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=429.26; }; class CUP_arifle_SCAR_L_Base; class CUP_arifle_Mk16_CQC : CUP_arifle_SCAR_L_Base { + initSpeed=-0.84783; ACE_barrelTwist=177.8; ACE_barrelLength=254.0; }; class CUP_arifle_Mk16_STD : CUP_arifle_SCAR_L_Base { + initSpeed=-0.93696; ACE_barrelTwist=177.8; ACE_barrelLength=355.6; }; class CUP_arifle_Mk16_SV : CUP_arifle_SCAR_L_Base { + initSpeed=-0.98696; ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; class CUP_arifle_Mk17_Base; - class CUP_arifle_Mk17_CQC : CUP_arifle_Mk17_Base { + class CUP_arifle_Mk17_CQC : CUP_arifle_Mk17_Base { + initSpeed=-0.90144; ACE_barrelTwist=304.8; ACE_barrelLength=330.2; }; - class CUP_arifle_Mk17_STD : CUP_arifle_Mk17_Base { + class CUP_arifle_Mk17_STD : CUP_arifle_Mk17_Base { + initSpeed=-0.96154; ACE_barrelTwist=304.8; ACE_barrelLength=406.4; }; - class CUP_arifle_Mk20 : CUP_arifle_Mk17_Base { + class CUP_arifle_Mk20 : CUP_arifle_Mk17_Base { + initSpeed=-0.98558; ACE_barrelTwist=304.8; ACE_barrelLength=508.0; }; class CUP_srifle_SVD : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=238.76; ACE_barrelLength=619.76; }; class CUP_lmg_UK59 : Rifle_Long_Base_F { + initSpeed=-0.9625; ACE_barrelTwist=381.0; ACE_barrelLength=551.18; }; class MGun; class CUP_DSHKM_W : MGun { + initSpeed=-1.0; ACE_barrelTwist=381.0; ACE_barrelLength=1069.34; }; class CUP_KPVT_W : MGun { + initSpeed=-1.0; ACE_barrelTwist=454.914; ACE_barrelLength=1346.2; }; class CUP_M242_W; class CUP_KPVB_W : CUP_M242_W { + initSpeed=-1.0; ACE_barrelTwist=454.914; ACE_barrelLength=1346.2; }; class MGunCore; class CUP_M134 : MGunCore { + initSpeed=-1.0; ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; class CUP_M240_veh_W : Rifle_Long_Base_F { + initSpeed=-1.0; ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; class CUP_PKT_W : MGun { + initSpeed=-1.0; ACE_barrelTwist=240.03; ACE_barrelLength=722.122; }; class CUP_srifle_VSSVintorez : Rifle_Base_F { + initSpeed=-0.93334; ACE_barrelTwist=210.82; ACE_barrelLength=200.66; }; class CUP_arifle_XM8_Base : Rifle_Base_F { + initSpeed=-1.0; ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; class CUP_arifle_XM8_Carbine : CUP_arifle_XM8_Base { + initSpeed=-0.90760; ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; class CUP_arifle_xm8_sharpshooter : CUP_arifle_XM8_Base { + initSpeed=-1.0; ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; class CUP_arifle_xm8_SAW : CUP_arifle_XM8_Base { + initSpeed=-1.0; ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; class CUP_arifle_XM8_Compact : CUP_arifle_XM8_Base { + initSpeed=-0.81522; ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; class CUP_arifle_XM8_Railed_Base : Rifle_Base_F { + initSpeed=-0.90760; ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; class CUP_arifle_XM8_Carbine_FG : CUP_arifle_XM8_Base { + initSpeed=-0.90870; + ACE_barrelTwist=177.8; + ACE_barrelLength=317.5; + }; + class CUP_arifle_XM8_Carbine_GL : CUP_arifle_XM8_Base { + initSpeed=-0.90870; ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; diff --git a/optionals/compat_hlc_ar15/$PBOPREFIX$ b/optionals/compat_hlc_ar15/$PBOPREFIX$ deleted file mode 100644 index 1151a9959c..0000000000 --- a/optionals/compat_hlc_ar15/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlc_ar15 \ No newline at end of file diff --git a/optionals/compat_hlc_ar15/CfgWeapons.hpp b/optionals/compat_hlc_ar15/CfgWeapons.hpp deleted file mode 100644 index 53928f25d4..0000000000 --- a/optionals/compat_hlc_ar15/CfgWeapons.hpp +++ /dev/null @@ -1,65 +0,0 @@ -class CfgWeapons -{ - class Rifle; - class Rifle_Base_F; - class hlc_ar15_base: Rifle_Base_F - { - ACE_barrelTwist=177.8; - ACE_barrelLength=292.1; - }; - class hlc_rifle_RU556: hlc_ar15_base - { - ACE_barrelTwist=177.8; - ACE_barrelLength=261.62; - }; - class hlc_rifle_RU5562: hlc_rifle_RU556 - { - ACE_barrelTwist=177.8; - ACE_barrelLength=261.62; - }; - class hlc_rifle_CQBR: hlc_rifle_RU556 - { - ACE_barrelTwist=177.8; - ACE_barrelLength=254.0; - }; - class hlc_rifle_M4: hlc_rifle_RU556 - { - ACE_barrelTwist=177.8; - ACE_barrelLength=368.3; - }; - class hlc_rifle_bcmjack: hlc_ar15_base - { - ACE_barrelTwist=177.8; - ACE_barrelLength=368.3; - }; - class hlc_rifle_Colt727: hlc_ar15_base - { - ACE_barrelTwist=177.8; - ACE_barrelLength=368.3; - }; - class hlc_rifle_Colt727_GL: hlc_rifle_Colt727 - { - ACE_barrelTwist=177.8; - ACE_barrelLength=368.3; - }; - class hlc_rifle_Bushmaster300: hlc_rifle_Colt727 - { - ACE_barrelTwist=203.2; - ACE_barrelLength=368.3; - }; - class hlc_rifle_vendimus: hlc_rifle_Bushmaster300 - { - ACE_barrelTwist=203.2; - ACE_barrelLength=406.4; - }; - class hlc_rifle_SAMR: hlc_rifle_RU556 - { - ACE_barrelTwist=228.6; - ACE_barrelLength=406.4; - }; - class hlc_rifle_honeybase: hlc_rifle_RU556 - { - ACE_barrelTwist=203.2; - ACE_barrelLength=152.4; - }; -}; \ No newline at end of file diff --git a/optionals/compat_hlc_ar15/script_component.hpp b/optionals/compat_hlc_ar15/script_component.hpp deleted file mode 100644 index 3fb38b0477..0000000000 --- a/optionals/compat_hlc_ar15/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_ar15_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlc_wp_mp5/$PBOPREFIX$ b/optionals/compat_hlc_wp_mp5/$PBOPREFIX$ deleted file mode 100644 index 397f5e9e6b..0000000000 --- a/optionals/compat_hlc_wp_mp5/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlc_wp_mp5 \ No newline at end of file diff --git a/optionals/compat_hlc_wp_mp5/CfgWeapons.hpp b/optionals/compat_hlc_wp_mp5/CfgWeapons.hpp deleted file mode 100644 index b9cc94818e..0000000000 --- a/optionals/compat_hlc_wp_mp5/CfgWeapons.hpp +++ /dev/null @@ -1,60 +0,0 @@ - -class CfgWeapons -{ - class Rifle_Base_F; - class hlc_MP5_base: Rifle_Base_F - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_mp5k_PDW: hlc_MP5_base - { - ACE_barrelTwist=254.0; - ACE_barrelLength=114.3; - }; - class hlc_smg_mp5k: hlc_smg_mp5k_PDW - { - ACE_barrelTwist=254.0; - ACE_barrelLength=114.3; - }; - class hlc_smg_mp5a2: hlc_MP5_base - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_MP5N: hlc_MP5_base - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_9mmar: hlc_smg_MP5N - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_mp5a4: hlc_MP5_base - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_mp510: hlc_smg_MP5N - { - ACE_barrelTwist=381.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_mp5sd5: hlc_MP5_base - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_mp5a3: hlc_smg_mp5a2 - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; - class hlc_smg_mp5sd6: hlc_smg_mp5sd5 - { - ACE_barrelTwist=254.0; - ACE_barrelLength=228.6; - }; -}; diff --git a/optionals/compat_hlc_wp_mp5/config.cpp b/optionals/compat_hlc_wp_mp5/config.cpp deleted file mode 100644 index 1f4fe78db4..0000000000 --- a/optionals/compat_hlc_wp_mp5/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_mp5"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgWeapons.hpp" diff --git a/optionals/compat_hlc_wp_mp5/script_component.hpp b/optionals/compat_hlc_wp_mp5/script_component.hpp deleted file mode 100644 index 6b19e4912b..0000000000 --- a/optionals/compat_hlc_wp_mp5/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_mp5_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_ak/$PBOPREFIX$ b/optionals/compat_hlcmods_ak/$PBOPREFIX$ deleted file mode 100644 index d1d239c6d5..0000000000 --- a/optionals/compat_hlcmods_ak/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_ak \ No newline at end of file diff --git a/optionals/compat_hlcmods_ak/CfgWeapons.hpp b/optionals/compat_hlcmods_ak/CfgWeapons.hpp deleted file mode 100644 index 5f1c838e41..0000000000 --- a/optionals/compat_hlcmods_ak/CfgWeapons.hpp +++ /dev/null @@ -1,76 +0,0 @@ -class CfgWeapons -{ - class optic_dms; - class hlc_ak_base; - class hlc_rifle_ak12; - class InventoryOpticsItem_Base_F; - class hlc_rifle_ak74: hlc_ak_base - { - ACE_barrelTwist=199.898; - ACE_barrelLength=414.02; - }; - class hlc_rifle_aku12: hlc_rifle_ak12 - { - ACE_barrelTwist=160.02; - ACE_barrelLength=210.82; - }; - class hlc_rifle_RPK12: hlc_rifle_ak12 - { - ACE_barrelLength=589.28; - }; - class hlc_rifle_aks74u: hlc_rifle_ak74 - { - ACE_barrelTwist=160.02; - ACE_barrelLength=210.82; - }; - class hlc_rifle_ak47: hlc_rifle_ak74 - { - ACE_barrelTwist=240.03; - ACE_barrelLength=414.02; - }; - class hlc_rifle_akm: hlc_rifle_ak47 - { - ACE_barrelTwist=199.898; - ACE_barrelLength=414.02; - }; - class hlc_rifle_rpk: hlc_rifle_ak47 - { - ACE_barrelTwist=240.03; - ACE_barrelLength=589.28; - }; - class hlc_rifle_rpk74n: hlc_rifle_rpk - { - ACE_barrelTwist=240.03; - ACE_barrelLength=589.28; - }; - class hlc_rifle_aek971: hlc_rifle_ak74 - { - ACE_barrelTwist=241.3; - ACE_barrelLength=431.8; - }; - class hlc_rifle_saiga12k: hlc_rifle_ak47 - { - ACE_barrelTwist=0.0; - ACE_twistDirection=0; - ACE_barrelLength=429.26; - }; - - class HLC_Optic_PSO1 : optic_dms { - ACE_ScopeAdjust_Vertical[] = { 0, 0 }; - ACE_ScopeAdjust_Horizontal[] = { -10, 10 }; - ACE_ScopeAdjust_VerticalIncrement = 0.0; - ACE_ScopeAdjust_HorizontalIncrement = 0.5; - class ItemInfo : InventoryOpticsItem_Base_F { - class OpticsModes { - class Snip { - discreteDistance[]={100, 200, 300, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000}; - discreteDistanceInitIndex=3; - }; - }; - }; - }; - class HLC_Optic_1p29 : HLC_Optic_PSO1 { - ACE_ScopeAdjust_Vertical[] = {}; - ACE_ScopeAdjust_Horizontal[] = {}; - }; -}; \ No newline at end of file diff --git a/optionals/compat_hlcmods_ak/config.cpp b/optionals/compat_hlcmods_ak/config.cpp deleted file mode 100644 index 7c8cdba2ba..0000000000 --- a/optionals/compat_hlcmods_ak/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_aks"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgWeapons.hpp" diff --git a/optionals/compat_hlcmods_ak/script_component.hpp b/optionals/compat_hlcmods_ak/script_component.hpp deleted file mode 100644 index a970229846..0000000000 --- a/optionals/compat_hlcmods_ak/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_aks_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_aug/$PBOPREFIX$ b/optionals/compat_hlcmods_aug/$PBOPREFIX$ deleted file mode 100644 index 6b917cc98c..0000000000 --- a/optionals/compat_hlcmods_aug/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_aug \ No newline at end of file diff --git a/optionals/compat_hlcmods_aug/CfgWeapons.hpp b/optionals/compat_hlcmods_aug/CfgWeapons.hpp deleted file mode 100644 index 4666605348..0000000000 --- a/optionals/compat_hlcmods_aug/CfgWeapons.hpp +++ /dev/null @@ -1,51 +0,0 @@ - -class CfgWeapons -{ - class Rifle_Base_F; - class hlc_aug_base; - class hlc_rifle_aug: hlc_aug_base - { - ACE_barrelTwist=228.6; - ACE_barrelLength=508.0; - }; - class hlc_rifle_auga1carb: hlc_rifle_aug - { - ACE_barrelTwist=228.6; - ACE_barrelLength=406.4; - }; - class hlc_rifle_aughbar: hlc_rifle_aug - { - ACE_barrelTwist=228.6; - ACE_barrelLength=609.6; - }; - class hlc_rifle_augpara: hlc_rifle_aug - { - ACE_barrelTwist=228.6; - ACE_barrelLength=419.1; - }; - class hlc_rifle_auga2: hlc_rifle_aug - { - ACE_barrelTwist=228.6; - ACE_barrelLength=508.0; - }; - class hlc_rifle_auga2para: hlc_rifle_auga2 - { - ACE_barrelTwist=228.6; - ACE_barrelLength=419.1; - }; - class hlc_rifle_auga2carb: hlc_rifle_auga2 - { - ACE_barrelTwist=228.6; - ACE_barrelLength=457.2; - }; - class hlc_rifle_auga2lsw: hlc_rifle_aughbar - { - ACE_barrelTwist=228.6; - ACE_barrelLength=609.6; - }; - class hlc_rifle_auga3: hlc_rifle_aug - { - ACE_barrelTwist=228.6; - ACE_barrelLength=457.2; - }; -}; \ No newline at end of file diff --git a/optionals/compat_hlcmods_aug/script_component.hpp b/optionals/compat_hlcmods_aug/script_component.hpp deleted file mode 100644 index d5a6712b6b..0000000000 --- a/optionals/compat_hlcmods_aug/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_AUG_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_core/$PBOPREFIX$ b/optionals/compat_hlcmods_core/$PBOPREFIX$ deleted file mode 100644 index 9c9e9061e1..0000000000 --- a/optionals/compat_hlcmods_core/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_core \ No newline at end of file diff --git a/optionals/compat_hlcmods_core/CfgAmmo.hpp b/optionals/compat_hlcmods_core/CfgAmmo.hpp deleted file mode 100644 index afe3f03973..0000000000 --- a/optionals/compat_hlcmods_core/CfgAmmo.hpp +++ /dev/null @@ -1,316 +0,0 @@ -class CfgAmmo -{ - class B_762x51_Ball; - class B_556x45_Ball; - class B_127x99_Ball; - class B_127x99_Ball_Tracer_Red; - class HLC_762x51_tracer; - class HLC_762x51_ball; - class HLC_556NATO_EPR: B_556x45_Ball - { - ACE_caliber=5.69; - ACE_bulletLength=23.012; - ACE_bulletMass=4.0176; - ACE_ammoTempMuzzleVelocityShifts[]={-27.20, -26.44, -23.76, -21.00, -17.54, -13.10, -7.95, -1.62, 6.24, 15.48, 27.75}; - ACE_ballisticCoefficients[]={0.151}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; - ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; - }; - class HLC_556NATO_SOST: B_556x45_Ball - { - ACE_caliber=5.69; - ACE_bulletLength=23.012; - ACE_bulletMass=4.0176; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.307}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={780, 886, 950}; - ACE_barrelLengths[]={254.0, 393.7, 508.0}; - }; - class HLC_556NATO_SPR: B_556x45_Ball - { - ACE_caliber=5.69; - ACE_bulletLength=23.012; - ACE_bulletMass=4.9896; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.361}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={624, 816, 832, 838}; - ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; - }; - class HLC_300Blackout_Ball: B_556x45_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=28.397; - ACE_bulletMass=9.5256; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.398}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={559, 609, 625}; - ACE_barrelLengths[]={152.4, 406.4, 508.0}; - }; - class HLC_300Blackout_SMK: HLC_300Blackout_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=37.821; - ACE_bulletMass=14.256; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.608}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={300, 320, 340}; - ACE_barrelLengths[]={228.6, 406.4, 508.0}; - }; - class HLC_762x39_Ball: HLC_300Blackout_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=28.956; - ACE_bulletMass=7.9704; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.275}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={650, 716, 750}; - ACE_barrelLengths[]={254.0, 414.02, 508.0}; - }; - class HLC_762x39_Tracer: HLC_762x39_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=28.956; - ACE_bulletMass=7.5816; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.275}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={650, 716, 750}; - ACE_barrelLengths[]={254.0, 414.02, 508.0}; - }; - class HLC_762x51_MK316_20in: B_762x51_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=31.496; - ACE_bulletMass=11.34; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.243}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={750, 780, 790, 794}; - ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; - }; - class HLC_762x51_BTSub: B_762x51_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=34.036; - ACE_bulletMass=12.96; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.235}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={305, 325, 335, 340}; - ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; - }; - class HLC_762x54_ball: HLC_762x51_ball - { - ACE_caliber=7.925; - ACE_bulletLength=28.956; - ACE_bulletMass=9.8496; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.4}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={700, 800, 820, 833}; - ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; - }; - class HLC_762x54_tracer: HLC_762x51_tracer - { - ACE_caliber=7.925; - ACE_bulletLength=28.956; - ACE_bulletMass=9.6552; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.395}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ICAO"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={680, 750, 798, 800}; - ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; - }; - class HLC_303Brit_B: B_556x45_Ball - { - ACE_caliber=7.899; - ACE_bulletLength=31.166; - ACE_bulletMass=11.2752; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.499, 0.493, 0.48}; - ACE_velocityBoundaries[]={671, 549}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={748, 761, 765}; - ACE_barrelLengths[]={508.0, 609.6, 660.4}; - }; - class HLC_792x57_Ball: HLC_303Brit_B - { - ACE_caliber=8.077; - ACE_bulletLength=28.651; - ACE_bulletMass=12.7008; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.315}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={785, 800, 815}; - ACE_barrelLengths[]={508.0, 599.948, 660.4}; - }; - class HLC_542x42_ball: HLC_303Brit_B - { - }; - class HLC_542x42_Tracer: HLC_303Brit_B - { - }; - class FH_545x39_Ball: B_556x45_Ball - { - ACE_caliber=5.588; - ACE_bulletLength=21.59; - ACE_bulletMass=3.42792; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.168}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=7; - ACE_muzzleVelocities[]={780, 880, 920}; - ACE_barrelLengths[]={254.0, 414.02, 508.0}; - }; - class FH_545x39_7u1: FH_545x39_Ball - { - ACE_bulletMass=5.184; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_muzzleVelocities[]={260, 303, 320}; - ACE_barrelLengths[]={254.0, 414.02, 508.0}; - }; - class HLC_57x28mm_JHP: FH_545x39_Ball - { - ACE_caliber=5.69; - ACE_bulletLength=12.573; - ACE_bulletMass=1.8144; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.144}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={550, 625, 720}; - ACE_barrelLengths[]={101.6, 152.4, 262.89}; - }; - class HLC_9x19_Ball: B_556x45_Ball - { - ACE_caliber=9.017; - ACE_bulletLength=15.494; - ACE_bulletMass=8.0352; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.165}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={340, 370, 400}; - ACE_barrelLengths[]={101.6, 127.0, 228.6}; - }; - class HLC_9x19_M882_SMG: B_556x45_Ball - { - ACE_caliber=9.017; - ACE_bulletLength=15.494; - ACE_bulletMass=8.0352; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.165}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={340, 370, 400}; - ACE_barrelLengths[]={101.6, 127.0, 228.6}; - }; - class HLC_9x19_GoldDot: HLC_9x19_Ball - { - ACE_muzzleVelocities[]={350, 380, 420}; - }; - class HLC_9x19_Subsonic: HLC_9x19_Ball - { - ACE_muzzleVelocities[]={300, 320, 340}; - }; - class HLC_10mm_FMJ: HLC_9x19_Ball - { - ACE_caliber=12.7; - ACE_bulletLength=19.406; - ACE_bulletMass=10.692; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.189}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={360, 400, 430}; - ACE_barrelLengths[]={101.6, 117.094, 228.6}; - }; - class HLC_45ACP_Ball: B_556x45_Ball - { - ACE_caliber=11.481; - ACE_bulletLength=17.272; - ACE_bulletMass=14.904; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.195}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={230, 250, 285}; - ACE_barrelLengths[]={101.6, 127.0, 228.6}; - }; - class FH_44Mag: HLC_45ACP_Ball - { - ACE_caliber=10.897; - ACE_bulletLength=20.422; - ACE_bulletMass=12.96; - ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; - ACE_ballisticCoefficients[]={0.172}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={360, 390, 420}; - ACE_barrelLengths[]={101.6, 190.5, 228.6}; - }; - class FH_50BMG_SLAP: B_127x99_Ball - { - ACE_caliber=7.823; - ACE_bulletLength=31.75; - ACE_bulletMass=22.68; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={1.056}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={1204}; - ACE_barrelLengths[]={736.6}; - }; - class FH_50BMG_Raufoss: B_127x99_Ball - { - ACE_caliber=12.954; - ACE_bulletLength=60.452; - ACE_bulletMass=42.768; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.670}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={817}; - ACE_barrelLengths[]={736.6}; - }; -}; diff --git a/optionals/compat_hlcmods_core/config.cpp b/optionals/compat_hlcmods_core/config.cpp deleted file mode 100644 index ecd780908f..0000000000 --- a/optionals/compat_hlcmods_core/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_core"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgAmmo.hpp" diff --git a/optionals/compat_hlcmods_core/script_component.hpp b/optionals/compat_hlcmods_core/script_component.hpp deleted file mode 100644 index 444799ed4a..0000000000 --- a/optionals/compat_hlcmods_core/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_core_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_fal/$PBOPREFIX$ b/optionals/compat_hlcmods_fal/$PBOPREFIX$ deleted file mode 100644 index 91bbe75e96..0000000000 --- a/optionals/compat_hlcmods_fal/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_fal \ No newline at end of file diff --git a/optionals/compat_hlcmods_fal/CfgWeapons.hpp b/optionals/compat_hlcmods_fal/CfgWeapons.hpp deleted file mode 100644 index fd826a6804..0000000000 --- a/optionals/compat_hlcmods_fal/CfgWeapons.hpp +++ /dev/null @@ -1,50 +0,0 @@ - -class CfgWeapons -{ - class hlc_fal_base; - class hlc_rifle_falosw: hlc_fal_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=330.2; - }; - class hlc_rifle_osw_GL: hlc_rifle_falosw - { - ACE_barrelTwist=304.8; - ACE_barrelLength=330.2; - }; - class hlc_rifle_SLR: hlc_fal_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=551.18; - }; - class hlc_rifle_STG58F: hlc_fal_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=533.4; - }; - class hlc_rifle_FAL5061: hlc_fal_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=457.2; - }; - class hlc_rifle_L1A1SLR: hlc_rifle_SLR - { - ACE_barrelTwist=304.8; - ACE_barrelLength=551.18; - }; - class hlc_rifle_c1A1: hlc_rifle_SLR - { - ACE_barrelTwist=304.8; - ACE_barrelLength=551.18; - }; - class hlc_rifle_LAR: hlc_rifle_FAL5061 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=533.4; - }; - class hlc_rifle_SLRchopmod: hlc_rifle_FAL5061 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=457.2; - }; -}; \ No newline at end of file diff --git a/optionals/compat_hlcmods_fal/config.cpp b/optionals/compat_hlcmods_fal/config.cpp deleted file mode 100644 index 5428e9871c..0000000000 --- a/optionals/compat_hlcmods_fal/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_falpocalypse"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgWeapons.hpp" diff --git a/optionals/compat_hlcmods_fal/script_component.hpp b/optionals/compat_hlcmods_fal/script_component.hpp deleted file mode 100644 index 828722a5a4..0000000000 --- a/optionals/compat_hlcmods_fal/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_falpocalypse_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_g3/$PBOPREFIX$ b/optionals/compat_hlcmods_g3/$PBOPREFIX$ deleted file mode 100644 index ff5b23f6ea..0000000000 --- a/optionals/compat_hlcmods_g3/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_g3 \ No newline at end of file diff --git a/optionals/compat_hlcmods_g3/CfgWeapons.hpp b/optionals/compat_hlcmods_g3/CfgWeapons.hpp deleted file mode 100644 index dc02124667..0000000000 --- a/optionals/compat_hlcmods_g3/CfgWeapons.hpp +++ /dev/null @@ -1,45 +0,0 @@ - -class CfgWeapons -{ - class hlc_g3_base; - class hlc_rifle_g3sg1: hlc_g3_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=449.58; - }; - class hlc_rifle_psg1: hlc_rifle_g3sg1 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=650.24; - }; - class hlc_rifle_g3a3: hlc_rifle_g3sg1 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=449.58; - }; - class hlc_rifle_g3a3ris: hlc_rifle_g3a3 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=449.58; - }; - class hlc_rifle_g3ka4: hlc_rifle_g3a3 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=314.96; - }; - class HLC_Rifle_g3ka4_GL: hlc_rifle_g3ka4 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=314.96; - }; - class hlc_rifle_hk51: hlc_rifle_g3sg1 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=211.074; - }; - class hlc_rifle_hk53: hlc_rifle_g3sg1 - { - ACE_barrelTwist=177.8; - ACE_barrelLength=211.074; - }; -}; \ No newline at end of file diff --git a/optionals/compat_hlcmods_g3/config.cpp b/optionals/compat_hlcmods_g3/config.cpp deleted file mode 100644 index 6b79486364..0000000000 --- a/optionals/compat_hlcmods_g3/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_g3"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgWeapons.hpp" diff --git a/optionals/compat_hlcmods_g3/script_component.hpp b/optionals/compat_hlcmods_g3/script_component.hpp deleted file mode 100644 index 642977f87b..0000000000 --- a/optionals/compat_hlcmods_g3/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_g3_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_m14/$PBOPREFIX$ b/optionals/compat_hlcmods_m14/$PBOPREFIX$ deleted file mode 100644 index 9542452ad0..0000000000 --- a/optionals/compat_hlcmods_m14/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_m14 \ No newline at end of file diff --git a/optionals/compat_hlcmods_m14/CfgWeapons.hpp b/optionals/compat_hlcmods_m14/CfgWeapons.hpp deleted file mode 100644 index 64db736003..0000000000 --- a/optionals/compat_hlcmods_m14/CfgWeapons.hpp +++ /dev/null @@ -1,16 +0,0 @@ - -class CfgWeapons -{ - class Rifle_Base_F; - class hlc_rifle_M14; - class hlc_M14_base: Rifle_Base_F - { - ACE_barrelTwist=304.8; - ACE_barrelLength=558.8; - }; - class hlc_rifle_m14sopmod: hlc_rifle_M14 - { - ACE_barrelTwist=304.8; - ACE_barrelLength=457.2; - }; -}; diff --git a/optionals/compat_hlcmods_m14/config.cpp b/optionals/compat_hlcmods_m14/config.cpp deleted file mode 100644 index cdf11a7db1..0000000000 --- a/optionals/compat_hlcmods_m14/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_m14"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgWeapons.hpp" diff --git a/optionals/compat_hlcmods_m14/script_component.hpp b/optionals/compat_hlcmods_m14/script_component.hpp deleted file mode 100644 index a29b751195..0000000000 --- a/optionals/compat_hlcmods_m14/script_component.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#define COMPONENT hlcweapons_m14_comp - -#include "\z\ace\addons\main\script_mod.hpp" - -#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_hlcmods_m60e4/$PBOPREFIX$ b/optionals/compat_hlcmods_m60e4/$PBOPREFIX$ deleted file mode 100644 index 73c943fe8f..0000000000 --- a/optionals/compat_hlcmods_m60e4/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\compat_hlcmods_m60e4 \ No newline at end of file diff --git a/optionals/compat_hlcmods_m60e4/CfgWeapons.hpp b/optionals/compat_hlcmods_m60e4/CfgWeapons.hpp deleted file mode 100644 index 50b4ffbc80..0000000000 --- a/optionals/compat_hlcmods_m60e4/CfgWeapons.hpp +++ /dev/null @@ -1,15 +0,0 @@ - -class CfgWeapons -{ - class hlc_M60e4_base; - class hlc_lmg_M60E4: hlc_M60e4_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=431.8; - }; - class hlc_lmg_m60: hlc_M60e4_base - { - ACE_barrelTwist=304.8; - ACE_barrelLength=558.8; - }; -}; diff --git a/optionals/compat_hlcmods_m60e4/config.cpp b/optionals/compat_hlcmods_m60e4/config.cpp deleted file mode 100644 index 1df3a97a20..0000000000 --- a/optionals/compat_hlcmods_m60e4/config.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_m60e4"}; - author[]={"Ruthberg"}; - VERSION_CONFIG; - }; -}; - -#include "CfgWeapons.hpp" diff --git a/optionals/compat_r3f/$PBOPREFIX$ b/optionals/compat_r3f/$PBOPREFIX$ new file mode 100644 index 0000000000..405620f365 --- /dev/null +++ b/optionals/compat_r3f/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_r3f \ No newline at end of file diff --git a/optionals/compat_r3f/CfgAmmo.hpp b/optionals/compat_r3f/CfgAmmo.hpp new file mode 100644 index 0000000000..27865a0430 --- /dev/null +++ b/optionals/compat_r3f/CfgAmmo.hpp @@ -0,0 +1,100 @@ +class CfgAmmo { + class Default; + class BulletBase; + class R3F_9x19_Ball: BulletBase { + ACE_caliber=9.017; + ACE_bulletLength=15.494; + ACE_bulletMass=8.0352; + ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; + ACE_ballisticCoefficients[]={0.165}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={340, 370, 400}; + ACE_barrelLengths[]={101.6, 127.0, 228.6}; + }; + class R3F_556x45_Ball: BulletBase { + ACE_caliber=5.69; + ACE_bulletLength=23.012; + ACE_bulletMass=4.0176; + ACE_ammoTempMuzzleVelocityShifts[]={-27.20, -26.44, -23.76, -21.00, -17.54, -13.10, -7.95, -1.62, 6.24, 15.48, 27.75}; + ACE_ballisticCoefficients[]={0.151}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; + ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; + }; + class R3F_762x51_Ball: BulletBase { + ACE_caliber=7.823; + ACE_bulletLength=28.956; + ACE_bulletMass=9.4608; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.2}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ICAO"; + ACE_dragModel=7; + ACE_muzzleVelocities[]={700, 800, 820, 833, 845}; + ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; + }; + class R3F_127x99_Ball: BulletBase { + ACE_caliber=12.954; + ACE_bulletLength=58.674; + ACE_bulletMass=41.9256; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.670}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={900}; + ACE_barrelLengths[]={736.6}; + }; + class R3F_127x99_PEI: R3F_127x99_Ball { + ACE_caliber=12.954; + ACE_bulletLength=58.674; + ACE_bulletMass=41.9256; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.670}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={900}; + ACE_barrelLengths[]={736.6}; + }; + class R3F_127x99_Ball2: BulletBase { + ACE_caliber=12.954; + ACE_bulletLength=58.674; + ACE_bulletMass=41.9256; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.670}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={900}; + ACE_barrelLengths[]={736.6}; + }; + class R3F_127x99_PEI2: R3F_127x99_Ball2 { + ACE_caliber=12.954; + ACE_bulletLength=58.674; + ACE_bulletMass=41.9256; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.670}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={900}; + ACE_barrelLengths[]={736.6}; + }; + class R3F_127x99_Ball3: BulletBase { + ACE_caliber=12.954; + ACE_bulletLength=58.674; + ACE_bulletMass=41.9256; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.670}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={900}; + ACE_barrelLengths[]={736.6}; + }; +}; \ No newline at end of file diff --git a/optionals/compat_r3f/CfgWeapons.hpp b/optionals/compat_r3f/CfgWeapons.hpp new file mode 100644 index 0000000000..eae4eeb215 --- /dev/null +++ b/optionals/compat_r3f/CfgWeapons.hpp @@ -0,0 +1,190 @@ +class CfgWeapons { + class Pistol_Base_F; + class Rifle_Base_F; + class R3F_Famas_F1: Rifle_Base_F { + ACE_barrelTwist=304.8; + ACE_barrelLength=488; + }; + class R3F_Famas_surb: R3F_Famas_F1 { + ACE_barrelTwist=304.8; + ACE_barrelLength=403.86; + }; + class R3F_FRF2: Rifle_Base_F { + ACE_barrelTwist=304.8; + ACE_barrelLength=650; + }; + class R3F_PGM_Hecate_II: Rifle_Base_F { + ACE_barrelTwist=381.0; + ACE_barrelLength=700; + }; + class R3F_M107: Rifle_Base_F { + ACE_barrelTwist=381.0; + ACE_barrelLength=736.6; + }; + class R3F_TAC50: Rifle_Base_F + { + ACE_barrelTwist=381.0; + ACE_barrelLength=736.6; + }; + class R3F_Minimi: Rifle_Base_F { + ACE_barrelTwist=177.8; + ACE_barrelLength=347.98; + }; + class R3F_Minimi_HG: R3F_Minimi { + }; + class R3F_Minimi_762: R3F_Minimi { + ACE_barrelTwist=304.8; + ACE_barrelLength=502.92; + }; + class R3F_Minimi_762_HG: R3F_Minimi_762 { + }; + class R3F_HK417M: Rifle_Base_F { + ACE_barrelTwist=279.4; + ACE_barrelLength=406; + }; + class R3F_HK417S_HG: R3F_HK417M + { + ACE_barrelTwist=279.4; + ACE_barrelLength=305; + }; + class R3F_HK417L: R3F_HK417M { + ACE_barrelTwist=279.4; + ACE_barrelLength=508; + }; + class R3F_HK416M: Rifle_Base_F { + ACE_barrelTwist=177.8; + ACE_barrelLength=368.3; + }; + class R3F_MP5SD: Rifle_Base_F { + ACE_barrelTwist=254.0; + ACE_barrelLength=144.78; + }; + class R3F_MP5A5: R3F_MP5SD { + ACE_barrelTwist=254.0; + ACE_barrelLength=226.06; + }; + class R3F_M4S90: Rifle_Base_F { + ACE_twistDirection=0; + ACE_barrelTwist=0; + ACE_barrelLength=144.78; + }; + class R3F_PAMAS: Pistol_Base_F { + ACE_barrelTwist=248.92; + ACE_barrelLength=124.46; + }; + + class ItemCore; + class InventoryOpticsItem_Base_F; + class R3F_J4: ItemCore { + ACE_ScopeAdjust_Vertical[] = { -8, 8 }; + ACE_ScopeAdjust_Horizontal[] = { -8, 8 }; + ACE_ScopeAdjust_VerticalIncrement = 0.2; + ACE_ScopeAdjust_HorizontalIncrement = 0.2; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class J4 { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_J8: ItemCore { + ACE_ScopeAdjust_Vertical[] = { -10, 10 }; + ACE_ScopeAdjust_Horizontal[] = { -10, 10 }; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class J8 { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_J8_MILDOT: R3F_J8 { + ACE_ScopeAdjust_Vertical[] = { -10, 10 }; + ACE_ScopeAdjust_Horizontal[] = { -10, 10 }; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class J8_MILDOT { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_J10: ItemCore { + ACE_ScopeAdjust_Vertical[] = { -10, 10 }; + ACE_ScopeAdjust_Horizontal[] = { -10, 10 }; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class J10 { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_J10_MILDOT: R3F_J10 { + ACE_ScopeAdjust_Vertical[] = { -10, 10 }; + ACE_ScopeAdjust_Horizontal[] = { -10, 10 }; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class J10_MILDOT { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_ZEISS: ItemCore { + ACE_ScopeAdjust_Vertical[] = { 0, 23 }; + ACE_ScopeAdjust_Horizontal[] = { -7, 7 }; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class ZEISS_MILDOT { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_NF: ItemCore { + ACE_ScopeAdjust_Vertical[] = { -0.9, 34 }; + ACE_ScopeAdjust_Horizontal[] = { -11, 11 }; + ACE_ScopeAdjust_VerticalIncrement = 0.2; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class NF_MILDOT { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class R3F_NF42: ItemCore { + ACE_ScopeAdjust_Vertical[] = { -27.3, 27.3 }; + ACE_ScopeAdjust_Horizontal[] = { -27.3, 27.3}; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo : InventoryOpticsItem_Base_F { + class OpticsModes { + class NF42_MILDOT { + discreteDistance[] = { 100 }; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; +}; diff --git a/optionals/compat_hlcmods_aug/config.cpp b/optionals/compat_r3f/config.cpp similarity index 76% rename from optionals/compat_hlcmods_aug/config.cpp rename to optionals/compat_r3f/config.cpp index 06192a6ffd..d5dbc8e68c 100644 --- a/optionals/compat_hlcmods_aug/config.cpp +++ b/optionals/compat_r3f/config.cpp @@ -5,10 +5,11 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"hlcweapons_AUG"}; + requiredAddons[] = {"R3F_Armes", "R3F_Acc"}; author[]={"Ruthberg"}; VERSION_CONFIG; }; }; +#include "CfgAmmo.hpp" #include "CfgWeapons.hpp" diff --git a/optionals/compat_hlcmods_m60e4/script_component.hpp b/optionals/compat_r3f/script_component.hpp similarity index 72% rename from optionals/compat_hlcmods_m60e4/script_component.hpp rename to optionals/compat_r3f/script_component.hpp index 4a5a9c03b0..86bb669119 100644 --- a/optionals/compat_hlcmods_m60e4/script_component.hpp +++ b/optionals/compat_r3f/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT hlc_m60e4_comp +#define COMPONENT BWA3_Weapons_comp #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rhs_afrf3/CfgMagazines.hpp b/optionals/compat_rhs_afrf3/CfgMagazines.hpp new file mode 100644 index 0000000000..6acd70844a --- /dev/null +++ b/optionals/compat_rhs_afrf3/CfgMagazines.hpp @@ -0,0 +1,17 @@ +class cfgMagazines { + class VehicleMagazine; + class rhs_30Rnd_545x39_AK; + + class rhs_100Rnd_762x54mmR: rhs_30Rnd_545x39_AK { + ace_isbelt = 1; + }; + class rhs_100Rnd_762x54mmR_green: rhs_100Rnd_762x54mmR { + ace_isbelt = 1; + }; + class rhs_mag_127x108mm_50 : VehicleMagazine { + ace_isbelt = 1; + }; + class rhs_mag_127x108mm_150 : rhs_mag_127x108mm_50 { + ace_isbelt = 0; + }; +}; \ No newline at end of file diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp new file mode 100644 index 0000000000..e9c71f4da7 --- /dev/null +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -0,0 +1,156 @@ +class cfgVehicles { + class LandVehicle; + class Tank: LandVehicle { + class NewTurret; + }; + class Tank_F: Tank { + class Turrets { + class MainTurret: NewTurret { + class Turrets { + class CommanderOptics; + }; + }; + }; + }; + class Car; + class Car_F: Car { + class ViewPilot; + class NewTurret; + }; + class Wheeled_APC_F: Car_F { + class NewTurret; + class Turrets { + class MainTurret: NewTurret + { + class ViewOptics; + }; + }; + class CommanderOptics; + }; + class rhs_bmd_base: Tank_F { + class Turrets: Turrets { + class CommanderOptics: NewTurret { + ace_fcs_Enabled = 0; + }; + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + }; + class GPMGTurret1: NewTurret { + ace_fcs_Enabled = 0; + }; + }; + }; + class rhs_bmp1tank_base: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + }; + class Com_BMP1: NewTurret { + ace_fcs_Enabled = 0; + }; + }; + }; + class rhs_bmp_base: rhs_bmp1tank_base {}; + class rhs_bmp1_vdv: rhs_bmp_base {}; + class rhs_bmp2e_vdv : rhs_bmp1_vdv { + class Turrets: Turrets { + class MainTurret: MainTurret { + class Turrets: Turrets { + class CommanderOptics : CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + }; + }; + class rhs_bmp3tank_base: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + class GPMGTurret1: NewTurret { + ace_fcs_Enabled = 0; + }; + }; + }; + class rhs_btr_base: Wheeled_APC_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + }; + class CommanderOptics: CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + class rhs_a3spruttank_base: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics + { + ace_fcs_Enabled = 0; + }; + }; + }; + class GPMGTurret1: NewTurret { + ace_fcs_Enabled = 0; + }; + }; + }; + class rhs_a3t72tank_base: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + ace_fcs_Enabled = 0; + }; + class CommanderMG: CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + }; + }; + class rhs_t72bd_tv: rhs_a3t72tank_base {}; + class rhs_t90_tv: rhs_t72bd_tv { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + }; + }; + class rhs_tank_base: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + ace_fcs_Enabled = 0; + }; + class CommanderMG: CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + }; + }; + + class rhs_infantry_msv_base; + class rhs_pilot_base : rhs_infantry_msv_base + { + ace_gforcecoef = 0.55; + }; +}; \ No newline at end of file diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index bf5020dfc2..4c3e2e425e 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -65,4 +65,8 @@ class CfgWeapons ACE_ScopeAdjust_VerticalIncrement = 0.0; ACE_ScopeAdjust_HorizontalIncrement = 0.5; }; + class Launcher_Base_F; + class rhs_weap_rpg7: Launcher_Base_F { + ace_reloadlaunchers_enabled = 1; + }; }; \ No newline at end of file diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp index 8b7f9d5ca4..5e88ad2830 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -12,4 +12,6 @@ class CfgPatches { }; #include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" #include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file diff --git a/optionals/compat_rhs_usf3/CfgMagazines.hpp b/optionals/compat_rhs_usf3/CfgMagazines.hpp new file mode 100644 index 0000000000..f067cd6eee --- /dev/null +++ b/optionals/compat_rhs_usf3/CfgMagazines.hpp @@ -0,0 +1,31 @@ +class cfgMagazines { + class CA_Magazine; + class VehicleMagazine; + class rhs_mag_30Rnd_556x45_M855A1_Stanag; + class rhs_mag_30Rnd_556x45_M200_Stanag; + + class rhsusf_100Rnd_556x45_soft_pouch: rhs_mag_30Rnd_556x45_M855A1_Stanag { + ace_isbelt = 1; + }; + class rhsusf_100Rnd_556x45_M200_soft_pouch: rhs_mag_30Rnd_556x45_M200_Stanag { + ace_isbelt = 1; + }; + class rhsusf_200Rnd_556x45_soft_pouch: rhsusf_100Rnd_556x45_soft_pouch { + ace_isbelt = 1; + }; + class rhsusf_100Rnd_762x51: CA_Magazine { + ace_isbelt = 1; + }; + class rhsusf_100Rnd_762x51_m80a1epr: rhsusf_100Rnd_762x51 { + ace_isbelt = 1; + }; + class rhsusf_100Rnd_762x51_m993: rhsusf_100Rnd_762x51 { + ace_isbelt = 1; + }; + class rhs_mag_100rnd_127x99_mag: VehicleMagazine { + ace_isbelt = 1; + }; + class RHS_48Rnd_40mm_MK19: VehicleMagazine { + ace_isbelt = 1; + }; +}; \ No newline at end of file diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp new file mode 100644 index 0000000000..2be7a8076e --- /dev/null +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -0,0 +1,32 @@ +class cfgVehicles { + class LandVehicle; + class Tank: LandVehicle { + class NewTurret; + }; + class Tank_F: Tank { + class Turrets { + class MainTurret: NewTurret { + class Turrets { + class CommanderOptics; + }; + }; + }; + }; + + class MBT_01_base_F: Tank_F {}; + class rhsusf_m1a1tank_base: MBT_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + ace_fcs_Enabled = 0; + class Turrets: Turrets { + class CommanderOptics: CommanderOptics { + ace_fcs_Enabled = 0; + }; + class Loader: CommanderOptics { + ace_fcs_Enabled = 0; + }; + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index d3c9111c09..e2e1efc00e 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -6,74 +6,56 @@ class CfgWeapons class srifle_EBR_F; class launch_O_Titan_F; - class rhs_weap_XM2010_Base_F: Rifle_Base_F - { + class rhs_weap_XM2010_Base_F: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=609.6; }; class arifle_MX_Base_F; - class rhs_weap_m4_Base: arifle_MX_Base_F - { + class rhs_weap_m4_Base: arifle_MX_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; class rhs_weap_m4a1; - class rhs_weap_mk18: rhs_weap_m4a1 - { + class rhs_weap_mk18: rhs_weap_m4a1 { ACE_barrelTwist=177.8; ACE_barrelLength=261.62; }; - class rhs_weap_m16a4: rhs_weap_m4_Base - { + class rhs_weap_m16a4: rhs_weap_m4_Base { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class rhs_M249_base; - class rhs_weap_m249_pip: rhs_M249_base - { - ACE_barrelTwist=177.8; - ACE_barrelLength=414.02; - }; - class weap_m240_base; - class rhs_weap_m240B: weap_m240_base - { + class rhs_weap_m240_base; + class rhs_weap_m240B: rhs_weap_m240_base { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class rhs_weap_m14ebrri: srifle_EBR_F - { + class rhs_weap_m14ebrri: srifle_EBR_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class rhs_weap_sr25: rhs_weap_m14ebrri - { + class rhs_weap_sr25: rhs_weap_m14ebrri { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class rhs_weap_sr25_ec: rhs_weap_sr25 - { + class rhs_weap_sr25_ec: rhs_weap_sr25 { ACE_barrelTwist=285.75; ACE_barrelLength=508.0; }; - class rhs_weap_M590_5RD: Rifle_Base_F - { + class rhs_weap_M590_5RD: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=469.9; }; - class rhs_weap_M590_8RD: rhs_weap_M590_5RD - { + class rhs_weap_M590_8RD: rhs_weap_M590_5RD { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=508.0; }; class hgun_ACPC2_F; - class rhsusf_weap_m1911a1: hgun_ACPC2_F - { + class rhsusf_weap_m1911a1: hgun_ACPC2_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class rhsusf_acc_sniper_base; class rhsusf_acc_LEUPOLDMK4: rhsusf_acc_sniper_base { ACE_ScopeAdjust_Vertical[] = { -4, 30 }; @@ -87,7 +69,6 @@ class CfgWeapons ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; }; - class rhs_weap_fgm148 : launch_O_Titan_F { ace_javelin_enabled = 1; weaponInfoType = "ACE_RscOptics_javelin"; diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index bc4d264697..9a13565ccf 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -12,4 +12,6 @@ class CfgPatches { }; #include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" #include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file diff --git a/tools/make.cfg b/tools/make.cfg index 5e4460ffd9..5045099e26 100644 --- a/tools/make.cfg +++ b/tools/make.cfg @@ -63,6 +63,10 @@ release_dir = P:\z\ace\release # Default: None pbo_name_prefix = ace_ +# This string will be prefixed to release archive. +# Default: None +zipPrefix = ace3 + # Which build tool will be used? Options: pboproject, addonbuilder # Default: addonbuilder build_tool = pboproject diff --git a/tools/make.py b/tools/make.py index 11c2bf25b5..8eb8950c7f 100644 --- a/tools/make.py +++ b/tools/make.py @@ -51,6 +51,8 @@ import traceback import time import re +from tempfile import mkstemp + if sys.platform == "win32": import winreg @@ -71,6 +73,7 @@ prefix = "ace" pbo_name_prefix = "ace_" signature_blacklist = ["ace_server.pbo"] importantFiles = ["mod.cpp", "README.md", "AUTHORS.txt", "LICENSE", "logo_ace3_ca.paa"] +versionFiles = ["README.md", "mod.cpp"] ############################################################################### # http://akiscode.com/articles/sha-1directoryhash.shtml @@ -577,6 +580,100 @@ def get_ace_version(): return ACE_VERSION +def replace_file(filePath, oldSubstring, newSubstring): + #Create temp file + fh, absPath = mkstemp() + with open(absPath,'w') as newFile: + with open(filePath) as oldFile: + for line in oldFile: + newFile.write(line.replace(oldSubstring, newSubstring)) + newFile.close() + #Remove original file + os.remove(filePath) + #Move new file + shutil.move(absPath, filePath) + + +def set_version_in_files(): + newVersion = ACE_VERSION # MAJOR.MINOR.PATCH.BUILD + newVersionShort = newVersion[:-2] # MAJOR.MINOR.PATCH + + # Regex patterns + pattern = re.compile(r"(\b[0\.-9]+\b\.[0\.-9]+\b\.[0\.-9]+\b\.[0\.-9]+)") # MAJOR.MINOR.PATCH.BUILD + patternShort = re.compile(r"(\b[0\.-9]+\b\.[0\.-9]+\b\.[0\.-9]+)") # MAJOR.MINOR.PATCH + + # Change versions in files containing version + for i in versionFiles: + filePath = os.path.join(module_root_parent, i) + + try: + # Save the file contents to a variable if the file exists + if os.path.isfile(filePath): + f = open(filePath, "r+") + fileText = f.read() + f.close() + + if fileText: + # Search and save version stamp, search short if long not found + versionFound = re.findall(pattern, fileText) + if not versionFound: + versionFound = re.findall(patternShort, fileText) + + # Replace version stamp if any of the new version parts is higher than the one found + if versionFound: + # First item in the list findall returns + versionFound = versionFound[0] + + # Use the same version length as the one found + if len(versionFound) == len(newVersion): + newVersionUsed = newVersion + if len(versionFound) == len(newVersionShort): + newVersionUsed = newVersionShort + + # Print change and modify the file if changed + if versionFound != newVersionUsed: + print_green("Changing version {} => {} in {}".format(versionFound, newVersionUsed, filePath)) + replace_file(filePath, versionFound, newVersionUsed) + + except WindowsError as e: + # Temporary file is still "in use" by Python, pass this exception + pass + except Exception as e: + print_error("set_version_in_files error: {}".format(e)) + raise + + return True + + +def stash_version_files_for_building(): + try: + for file in versionFiles: + filePath = os.path.join(module_root_parent, file) + stashPath = os.path.join(release_dir, file) + print("Temporarily stashing {} => {}.bak for version update".format(filePath, stashPath)) + shutil.copy(filePath, "{}.bak".format(stashPath)) + except: + print_error("Stashing version files failed") + raise + + # Set version + set_version_in_files() + return True + + +def restore_version_files(): + try: + for file in versionFiles: + filePath = os.path.join(module_root_parent, file) + stashPath = os.path.join(release_dir, file) + print("Restoring {}".format(filePath)) + shutil.move("{}.bak".format(stashPath), filePath) + except: + print_error("Restoring version files failed") + raise + return True + + def get_private_keyname(commitID,module="main"): global pbo_name_prefix @@ -649,6 +746,7 @@ def version_stamp_pboprefix(module,commitID): return True + ############################################################################### @@ -685,8 +783,6 @@ def main(argv): # Default behaviors test = False # Copy to Arma 3 directory? arg_modules = False # Only build modules on command line? - make_release = False # Make zip file from the release? - release_version = 0 # Version of release use_pboproject = True # Default to pboProject build tool make_target = "DEFAULT" # Which section in make.cfg to use for the build new_key = True # Make a new key and use it to sign? @@ -738,10 +834,13 @@ See the make.cfg file for additional build options. argv.remove("test") if "release" in argv: - make_release = True + make_release_zip = True release_version = argv[argv.index("release") + 1] argv.remove(release_version) argv.remove("release") + else: + make_release_zip = False + release_version = ACE_VERSION if "target" in argv: make_target = argv[argv.index("target") + 1] @@ -764,6 +863,12 @@ See the make.cfg file for additional build options. check_external = True else: check_external = False + + if "version" in argv: + argv.remove("version") + version_update = True + else: + version_update = False print_yellow("\nCheck external references is set to {}".format(str(check_external))) @@ -792,6 +897,9 @@ See the make.cfg file for additional build options. # Project prefix (folder path) prefix = cfg.get(make_target, "prefix", fallback="") + + # Release archive prefix + zipPrefix = cfg.get(make_target, "zipPrefix", fallback=project.lstrip("@").lower()) # Should we autodetect modules on a complete build? module_autodetect = cfg.getboolean(make_target, "module_autodetect", fallback=True) @@ -849,7 +957,7 @@ See the make.cfg file for additional build options. sys.exit(1) # See if we have been given specific modules to build from command line. - if len(argv) > 1 and not make_release: + if len(argv) > 1 and not make_release_zip: arg_modules = True modules = argv[1:] @@ -904,9 +1012,18 @@ See the make.cfg file for additional build options. print_error("Cannot create release directory") raise + # Update version stamp in all files that contain it + # Update version only for release if full update not requested (backup and restore files) + print_blue("\nChecking for obsolete version numbers...") + if not version_update: + stash_version_files_for_building() + else: + # Set version + set_version_in_files(); + print("Version in files has been changed, make sure you commit and push the updates!") try: - #Temporarily copy optionals_root for building. They will be removed later. + # Temporarily copy optionals_root for building. They will be removed later. optionals_modules = [] optional_files = [] copy_optionals_for_building(optionals_modules,optional_files) @@ -1079,16 +1196,16 @@ See the make.cfg file for additional build options. if build_tool == "pboproject": try: nobinFilePath = os.path.join(work_drive, prefix, module, "$NOBIN$") + backup_config(module) if (not os.path.isfile(nobinFilePath)): - backup_config(module) convert_config(module) version_stamp_pboprefix(module,commit_id) if os.path.isfile(nobinFilePath): print_green("$NOBIN$ Found. Proceeding with non-binarizing!") - cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")] + cmd = [makepboTool, "-P","-A","-L","-G","-X=*.backup", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")] else: if check_external: @@ -1222,11 +1339,13 @@ See the make.cfg file for additional build options. except Exception as e: print_yellow("Cancel or some error detected: {}".format(e)) - + finally: copy_important_files(module_root_parent,os.path.join(release_dir, project)) cleanup_optionals(optionals_modules) + if not version_update: + restore_version_files() # Done building all modules! @@ -1236,25 +1355,34 @@ See the make.cfg file for additional build options. f.write(cache_out) # Delete the pboproject temp files if building a release. - if make_release and build_tool == "pboproject": + if make_release_zip and build_tool == "pboproject": try: - shutil.rmtree(os.path.join(module_root, release_dir, project, "temp"), True) + shutil.rmtree(os.path.join(release_dir, project, "temp"), True) except: print_error("ERROR: Could not delete pboProject temp files.") # Make release - if make_release: - print_blue("\nMaking release: {}-{}.zip".format(project,release_version)) + if make_release_zip: + release_name = "{}_{}".format(zipPrefix, release_version) + print_blue("\nMaking release: {}.zip".format(release_name)) try: # Delete all log files - for root, dirs, files in os.walk(os.path.join(module_root, release_dir, project, "addons")): + for root, dirs, files in os.walk(os.path.join(release_dir, project, "addons")): for currentFile in files: if currentFile.lower().endswith("log"): os.remove(os.path.join(root, currentFile)) - # Create a zip with the contents of release/ in it - shutil.make_archive(project + "-" + release_version, "zip", os.path.join(module_root, release_dir)) + # Remove all zip files from release folder to prevent zipping the zip + for file in os.listdir(release_dir): + if file.endswith(".zip"): + os.remove(os.path.join(release_dir, file)) + + # Create a zip with the contents of release folder in it + release_zip = shutil.make_archive("{}".format(release_name), "zip", release_dir) + # Move release zip to release folder + shutil.copy(release_zip, release_dir) + os.remove(release_zip) except: raise print_error("Could not make release.")