diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 63942ca799..eed6e20be3 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -30,142 +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/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 index db033f6cd1..004fd8c6e5 100644 Binary files a/addons/apl/data/glass_house.rvmat and b/addons/apl/data/glass_house.rvmat differ 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/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 index ba54cd9164..6cf20f3d7f 100644 Binary files a/addons/apl/data/plastic.rvmat and b/addons/apl/data/plastic.rvmat 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/atragmx/initKeybinds.sqf b/addons/atragmx/initKeybinds.sqf index a000a106f4..c2ab01d217 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"]] 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"]] 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/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 index 252fbc551d..73bafbab41 100644 --- a/addons/captives/ACE_Settings.hpp +++ b/addons/captives/ACE_Settings.hpp @@ -1,13 +1,13 @@ class ACE_Settings { class GVAR(allowHandcuffOwnSide) { - displayName = "$STR_ACE_Captives_ModuleSettings_handcuffSide_name"; - description = "$STR_ACE_Captives_ModuleSettings_handcuffSide_description"; + displayName = CSTRING(ModuleSettings_handcuffSide_name); + description = CSTRING(ModuleSettings_handcuffSide_description); typeName = "BOOL"; value = 1; }; class GVAR(allowSurrender) { - displayName = "$STR_ACE_Captives_ModuleSettings_allowSurrender_name"; - description = "$STR_ACE_Captives_ModuleSettings_allowSurrender_description"; + 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 bc70716236..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; }; }; }; @@ -111,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; \ - }; \ }; \ }; @@ -179,7 +169,7 @@ class CfgVehicles { class ACE_Module: Module_F {}; class GVAR(moduleSettings): ACE_Module { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(ModuleSettings_DisplayName); function = QFUNC(moduleSettings); 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_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/stringtable.xml b/addons/captives/stringtable.xml index 8d8c30e92c..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,33 +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 index 9d8ba9ce10..d6226fd0ab 100644 --- a/addons/common/ACE_Settings.hpp +++ b/addons/common/ACE_Settings.hpp @@ -22,7 +22,7 @@ class ACE_Settings { value = 0; typeName = "SCALAR"; isClientSettable = 0; - values[] = {"$STR_ACE_Common_CheckPBO_Action_WarnOnce", "$STR_ACE_Common_CheckPBO_Action_WarnPerm", "$STR_ACE_Common_CheckPBO_Action_Kick"}; + values[] = {CSTRING(CheckPBO_Action_WarnOnce), CSTRING(CheckPBO_Action_WarnPerm), CSTRING(CheckPBO_Action_Kick)}; }; class GVAR(checkPBOsCheckAll) { value = 0; @@ -38,7 +38,7 @@ class ACE_Settings { value = 1; typeName = "BOOL"; isClientSettable = 1; - displayName = "$STR_ACE_Common_EnableNumberHotkeys"; + displayName = CSTRING(EnableNumberHotkeys); };*/ class GVAR(settingFeedbackIcons) { value = 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 eb015a6264..e3729a837a 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); @@ -80,6 +101,43 @@ 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; + + /***************************************************************/ /***************************************************************/ /***************************************************************/ @@ -256,39 +314,41 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then { ] call FUNC(checkPBOs) }] call FUNC(addEventHandler); +//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..3a26d1e184 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -35,6 +35,8 @@ PREP(currentChannel); PREP(debug); PREP(debugModule); PREP(defineVariable); +PREP(deviceKeyFindValidIndex); +PREP(deviceKeyRegisterNew); PREP(disableAI); PREP(disableUserInput); PREP(displayIcon); @@ -287,7 +289,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/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_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..82c709929d 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -475,78 +475,100 @@ 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 + + + Close Handheld Device + + + Cycle Handheld Devices 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..96b81c15b6 --- /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"}; + 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"}; + }; + }; + }; + }; + }; + + 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..17fa744074 --- /dev/null +++ b/addons/dagr/XEH_postInit.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" + +#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..ae1eed9a2b --- /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)) 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..b05cb23fe5 --- /dev/null +++ b/addons/dagr/functions/fnc_toggleOverlay.sqf @@ -0,0 +1,50 @@ +/* + * 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 { + 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..3f89842cfc --- /dev/null +++ b/addons/dagr/initKeybinds.sqf @@ -0,0 +1,30 @@ + +["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] 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}, +[199, [false, true, false]], false] call cba_fnc_addKeybind; // (CTRL + Home) + +["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false}; + + // Statement + [] call FUNC(toggleOverlay); + true +}, +{false}, +[199, [false, false, false]], false] call cba_fnc_addKeybind; // (Home) 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_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/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 248ee12640..03162ef4ae 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"; @@ -106,7 +107,7 @@ class CfgMagazines { class DeadmanSwitch:Command {}; class Cellphone:Command {}; class PressurePlate { - displayName = $STR_ACE_Explosives_SLAME_Magnetic; + displayName = CSTRING(SLAME_Magnetic); digDistance = 0; ammo = "IEDUrbanBig_Remote_Ammo"; pitch = 0; @@ -131,7 +132,7 @@ class CfgMagazines { class DeadmanSwitch: Command {}; class Cellphone: Command {}; class PressurePlate { - displayName = $STR_ACE_Explosives_SLAME_Magnetic; + displayName = CSTRING(SLAME_Magnetic); digDistance = 0; ammo = "IEDUrbanSmall_Remote_Ammo"; pitch = 0; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 4250538c87..b7b69ca7a5 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -3,7 +3,7 @@ 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", "isNotSitting"}; @@ -13,7 +13,7 @@ class CfgVehicles { 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);); @@ -24,7 +24,7 @@ class CfgVehicles { 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,7 +35,7 @@ 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", "isNotSitting"}; @@ -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"}; 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..9eb2bad49a 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -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/stringtable.xml b/addons/explosives/stringtable.xml index 839f8a1582..da6759386d 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -510,35 +510,41 @@ 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 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. - + \ No newline at end of file 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/frag/stringtable.xml b/addons/frag/stringtable.xml index 453b4a6628..fb25760e94 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -6,58 +6,69 @@ 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/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 01b05e5f50..ad7fddcd98 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -6,6 +6,13 @@ 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; @@ -15,6 +22,14 @@ GVAR(playerVehAttenuation) = 1; //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..04c16f99d4 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,47 @@ 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; + missionNamespace setVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], _weaponMagazines]; +}; -_loudness = _audibleFireCoef * _audibleFire / 64; -_strength = _vehAttenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off +_magazine = ""; +{ + _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo"); + if (_ammoType == _ammo) exitWith { + _magazine = _x; + }; +} 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/CfgMagazines.hpp b/addons/huntir/CfgMagazines.hpp index 921ffbe09a..c11f81a98c 100644 --- a/addons/huntir/CfgMagazines.hpp +++ b/addons/huntir/CfgMagazines.hpp @@ -2,10 +2,10 @@ class CfgMagazines { class 1Rnd_HE_Grenade_shell; class ACE_HuntIR_M203: 1Rnd_HE_Grenade_shell { - displayName = $STR_ACE_HUNTIR_ROUND; + displayName = CSTRING(magazine_displayName); displayNameShort = "HuntIR"; descriptionShort = ""; - picture = PATHTOF(UI\m_m1070_ca.paa); + picture = PATHTOF(data\m_m1070_ca.paa); ammo = "F_HuntIR"; }; }; diff --git a/addons/huntir/CfgVehicles.hpp b/addons/huntir/CfgVehicles.hpp index 54876d4cf5..9e24473243 100644 --- a/addons/huntir/CfgVehicles.hpp +++ b/addons/huntir/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Equipment { class GVAR(open) { - displayName = $STR_ACE_HUNTIR_MON_ACT; + displayName = CSTRING(activateMonitor); condition = QUOTE([ARR_2(ACE_player,'ACE_HuntIR_monitor')] call EFUNC(common,hasItem)); statement = QUOTE(call FUNC(huntir)); showDisabled = 0; @@ -20,6 +20,7 @@ class CfgVehicles { class Parachute_02_base_F; class ACE_HuntIR: Parachute_02_base_F { scope = 1; + destrType = "DestructDefault"; displayName = "HuntIR"; model = PATHTOF(data\huntir.p3d); castDriverShadow = 0; @@ -34,7 +35,7 @@ class CfgVehicles { class ACE_Item_HuntIR_monitor: Item_Base_F { scope = 2; scopeCurator = 2; - displayName = $STR_ACE_HUNTIR_MON; + displayName = CSTRING(monitor_displayName); vehicleClass = "Items"; class TransportItems { class ACE_HuntIR_monitor { diff --git a/addons/huntir/CfgWeapons.hpp b/addons/huntir/CfgWeapons.hpp index 42844acffb..6ff271d604 100644 --- a/addons/huntir/CfgWeapons.hpp +++ b/addons/huntir/CfgWeapons.hpp @@ -5,9 +5,9 @@ class CfgWeapons { class ACE_HuntIR_monitor: ACE_ItemCore { scope = 2; - displayName = $STR_ACE_HUNTIR_MON; + displayName = CSTRING(monitor_displayName); picture = PATHTOF(UI\w_huntir_monitor_ca.paa); - descriptionShort = $STR_ACE_HUNTIR_MON; + descriptionShort = CSTRING(monitor_displayName); model = PATHTOF(data\ace_huntir_monitor.p3d); class ItemInfo: InventoryItem_Base_F { diff --git a/addons/huntir/Dialog.hpp b/addons/huntir/Dialog.hpp index c3ef2f6567..97058394a5 100644 --- a/addons/huntir/Dialog.hpp +++ b/addons/huntir/Dialog.hpp @@ -137,7 +137,7 @@ class ace_huntir_cam_dialog { soundEscape[] = { "", 0, 1 }; x = __X + (2*0.8); y = __Y + 0.045; w = 0.05; h = 0.02; - text = "$STR_ACE_HUNTIR_HELP"; + text = CSTRING(HELP); action = "createDialog 'ace_huntir_help_dialog'"; }; class CAM_BG { @@ -173,11 +173,11 @@ class ace_huntir_cam_dialog { }; class CAM_ALT: CAM_HEIGHT { x = __X + 0.35; - text = "$STR_ACE_HUNTIR_ALT"; + text = CSTRING(ALT); }; class CAM_No: CAM_HEIGHT { x = __X + __W - 0.64; - text = "$STR_ACE_HUNTIR_CAM"; + text = CSTRING(CAM); }; class CAM_NO_x: CAM_HEIGHT { idc = 2; @@ -189,7 +189,7 @@ class ace_huntir_cam_dialog { x = __X + 0.35; y = __Y + __H - 0.65; w = 0.12; - text = "$STR_ACE_HUNTIR_TIME"; + text = CSTRING(TIME); }; class CAM_TIME_REMAIN: CAM_TIME { idc = 3; @@ -272,7 +272,7 @@ class ace_huntir_cam_dialog_inactive: ace_huntir_cam_dialog { sizeEx = 0.02; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0,0,0,0}; - text = "$STR_ACE_HUNTIR_ESC"; + text = CSTRING(ESC); blinkingPeriod = 0; }; class CAM_BG: CAM_BG {}; @@ -371,31 +371,31 @@ class ace_huntir_help_dialog: ace_huntir_cam_dialog { sizeEx = 0.022; colorText[] = { 1, 1, 1, 1 }; colorBackground[] = {0,0,0,1}; - text = "$STR_ACE_HUNTIR_HELP_EXIT"; + text = CSTRING(HELP_EXIT); blinkingPeriod = 0; }; class HELP1: HELP0 { y = __Y + 0.06; - text = "$STR_ACE_HUNTIR_HELP_ZOOM"; + text = CSTRING(HELP_ZOOM); }; class HELP2: HELP0 { y = __Y + 0.09; - text = "$STR_ACE_HUNTIR_HELP_CAM"; + text = CSTRING(HELP_CAM); }; class HELP3: HELP0 { y = __Y + 0.12; - text = "$STR_ACE_HUNTIR_HELP_ROT"; + text = CSTRING(HELP_ROT); }; class HELP4: HELP0 { y = __Y + 0.15; - text = "$STR_ACE_HUNTIR_HELP_ELV"; + text = CSTRING(HELP_ELV); }; class HELP5: HELP0 { y = __Y + 0.18; - text = "$STR_ACE_HUNTIR_HELP_MOD"; + text = CSTRING(HELP_MOD); }; class HELP6: HELP0 { y = __Y + 0.21; - text = "$STR_ACE_HUNTIR_HELP_RES"; + text = CSTRING(HELP_RES); }; }; diff --git a/addons/huntir/XEH_preInit.sqf b/addons/huntir/XEH_preInit.sqf index 0ae45c1540..7737030571 100644 --- a/addons/huntir/XEH_preInit.sqf +++ b/addons/huntir/XEH_preInit.sqf @@ -3,6 +3,7 @@ ADDON = false; PREP(cam); +PREP(handleDamage); PREP(handleFired); PREP(huntir); PREP(huntirCompass); diff --git a/addons/huntir/data/huntir.p3d b/addons/huntir/data/huntir.p3d index ebf349672e..e9b9147416 100644 Binary files a/addons/huntir/data/huntir.p3d and b/addons/huntir/data/huntir.p3d differ diff --git a/addons/huntir/UI/m_M1070_ca.paa b/addons/huntir/data/m_M1070_ca.paa similarity index 100% rename from addons/huntir/UI/m_M1070_ca.paa rename to addons/huntir/data/m_M1070_ca.paa diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index af229bfe75..64bf9e37b8 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -65,12 +65,12 @@ GVAR(no_cams) sort true; [{ GVAR(nearHuntIRs) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; { - if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))}) then { + if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {damage _x < 0.5}) then { GVAR(no_cams) pushBack _x; }; } forEach GVAR(nearHuntIRs); { - if (((getPosVisual _x) select 2) <= 20 || {!(_x in GVAR(nearHuntIRs))}) then { + if (((getPosVisual _x) select 2) <= 20 || {!(_x in GVAR(nearHuntIRs))} || {damage _x >= 0.5}) then { GVAR(no_cams) deleteAt _forEachIndex; if (_forEachIndex < GVAR(cur_cam)) then { GVAR(cur_cam) = GVAR(cur_cam) - 1; @@ -125,7 +125,7 @@ GVAR(no_cams) sort true; }; }; - private ["_cam_coord_y", "_cam_coord_x", "_speed", "_cam_time", "_cam_pos"]; + 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); @@ -138,8 +138,7 @@ GVAR(no_cams) sort true; ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]]; ctrlSetText [2, format["%1", GVAR(cur_cam) + 1]]; - _speed = 1 max abs((velocity GVAR(huntIR)) select 2); - _cam_time = ((GVAR(pos) select 2) - 20) / _speed; + _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)]; diff --git a/addons/huntir/functions/fnc_handleDamage.sqf b/addons/huntir/functions/fnc_handleDamage.sqf new file mode 100644 index 0000000000..34772d8a66 --- /dev/null +++ b/addons/huntir/functions/fnc_handleDamage.sqf @@ -0,0 +1,25 @@ +/* + * Author: Ruthberg + * + * Handles huntir damage + * + * Arguments: + * 0: huntir + * 1: selectionName + * 2: damage + * 3: source + * 4: projectile + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_5(_huntir,_selectionName,_damage,_source,_projectile); + +systemChat format["Selection: %1; Damage: %2", _selectionName, _damage]; + +_damage diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 16afd17546..447d5a4435 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -23,24 +23,29 @@ PARAMS_7(_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); if (_ammo != "F_HuntIR") exitWith {}; -private ["_dir", "_pos", "_dirDegree", "_b", "_a", "_y", "_x"]; -_dir = ACE_player weaponDirection _weapon; -_pos = getPosATL ACE_player; - -_dirDegree = (_dir select 0) atan2 (_dir select 1); -_b = 500 / (tan((asin(_dir select 2)) + 10)); -_a = _b * sin(_dirDegree); -_b = _a / tan(_dirDegree); -_x = (_pos select 0) + _a; -_y = (_pos select 1) + _b; - [{ - PARAMS_3(_projectile,_x,_y); + PARAMS_1(_projectile); "ACE_HuntIR_Propell" createVehicle (getPosATL _projectile); [{ - PARAMS_3(_x,_y,_z); + PARAMS_1(_position); private ["_huntir"]; - _huntir = createVehicle ["ACE_HuntIR", [_x, _y, _z], [], 0, "FLY"]; - _huntir setPosATL [_x, _y, _z]; - }, [_x, _y, ((getPosATL _projectile) select 2) + 400], 5, 0] call EFUNC(common,waitAndExecute); -}, [_projectile, _x, _y], 5, 0] call EFUNC(common,waitAndExecute); + _huntir = createVehicle ["ACE_HuntIR", _position, [], 0, "FLY"]; + _huntir setPosATL _position; + _huntir setVariable [QGVAR(startTime), ACE_time, true]; + // TODO: Edit the .p3d to allow doing the following _huntir getHit "camera"; _huntir getHit "parachute"; + //_huntir addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; + [{ + EXPLODE_1_PVT(_this select 0,_huntir); + if (isNull _huntir) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + if (damage _huntir > 0) then { + private ["_velocity"]; + _velocity = velocity _huntir; + _velocity set [2, -1 min -20 * sqrt(damage _huntir)]; + _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/stringtable.xml b/addons/huntir/stringtable.xml index 41b36e3377..45c6b19392 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ HuntIR Transport Box HuntIR Transport Box - + HuntIR Round HuntIR Granate HuntIR Round @@ -23,7 +23,7 @@ Munition HuntIR HuntIR lövedék - + HuntIR monitor HuntIR Monitor HuntIR monitor @@ -34,7 +34,7 @@ Ecran HuntIR HuntIR monitor - + Activate HuntIR monitor HuntIR Monitor aktivieren Activate HuntIR monitor @@ -170,7 +170,7 @@ Esc - Exit help ESC - Hilfe verlassen Esc - Exit help - Esc - Ukončit Pomoc + Esc - Ukončit pomoc Esc - Выйти из помощи Esc - Exit help Esc - wyjście z ekranu Pomocy diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 42cdb8c4de..6737729092 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -220,18 +220,26 @@ 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 - + \ No newline at end of file diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 74a46ae106..9e9dc4bc76 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -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 a1dad1a8e0..c1a9d463e9 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 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í. - + \ No newline at end of file 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 c29bdfed7d..d7dfbc6c72 100644 --- a/addons/kestrel4500/CfgVehicles.hpp +++ b/addons/kestrel4500/CfgVehicles.hpp @@ -11,24 +11,24 @@ class CfgVehicles { 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", "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"}; + 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 5b599fd8e1..c31b736ac6 100644 --- a/addons/kestrel4500/CfgWeapons.hpp +++ b/addons/kestrel4500/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class InventoryItem_Base_F; class ACE_Kestrel4500: ACE_ItemCore { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); scope = 2; displayName = CSTRING(Name); descriptionShort = CSTRING(Description); 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.rvmat b/addons/kestrel4500/data/Kestrel4500.rvmat index 80872f5fec..256b6b86bb 100644 --- a/addons/kestrel4500/data/Kestrel4500.rvmat +++ b/addons/kestrel4500/data/Kestrel4500.rvmat @@ -5,8 +5,8 @@ ambient[] = {1,1,1,1}; diffuse[] = {1,1,1,1}; forcedDiffuse[] = {0,0,0,0}; emmisive[] = {0,0,0,1}; -specular[] = {1,1,1,1}; -specularPower = 0; +specular[] = {0.3,0.3,0.3,1}; +specularPower = 50; PixelShaderID = "Super"; VertexShaderID = "Super"; class Stage1 { @@ -50,7 +50,7 @@ class Stage4 { }; }; class Stage5 { - texture = "#(argb,8,8,3)color(0,0,0,0,0)"; + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; uvSource = "tex"; class uvTransform { aside[] = {1,0,0}; diff --git a/addons/kestrel4500/initKeybinds.sqf b/addons/kestrel4500/initKeybinds.sqf index f6ad1e8a17..2a691bbe4f 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"]] 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"]] 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/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 81b2da2473..133931578a 100644 --- a/addons/laserpointer/XEH_postInit.sqf +++ b/addons/laserpointer/XEH_postInit.sqf @@ -1,7 +1,7 @@ // 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 @@ -14,26 +14,28 @@ 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..1b12c23584 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 ["_brightness", "_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]; @@ -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..5e5faf65c4 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; }; diff --git a/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf index 4927e7db13..99549ec18f 100644 --- a/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf +++ b/addons/laserpointer/functions/fnc_switchLaserLightMode.sqf @@ -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 {}; diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 373275d6b9..7d5a9dda5a 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -6,94 +6,110 @@ 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 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/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 ae7beadfda..c8a4528ca5 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -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 a2fda5347c..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 diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index d3c2275751..a7fdf65c1f 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -76,6 +76,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); 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_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_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..35e8b900fb 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,6 +41,7 @@ _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; [_unit] call FUNC(handleDamage_advancedSetDamage); +_typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); [_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds); // TODO Disabled until implemented fully @@ -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_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..0457e909a6 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -72,9 +72,13 @@ if (alive _target) then { }; 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 8856a4e1da..01c6c94dca 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,18 @@ Pravá noha Perna Direita + + Bandaging removes bloodstains + Bandagieren entfernt Blutflecken + Bandażowanie usuwa ślady krwi + Obvázání odstraňuje skvrny od krve + + + Pain is only temporarily suppressed + Schmerzen werden nur vorübergehend unterdrückt + Ból jest tymczasowo zwalczany + Bolest je potlačena pouze dočasně + Pain Effect Type Schmerzeffekt-Typ @@ -2707,6 +2727,7 @@ ACE Opcje medyczne Médico ACE ACE-Medicsystem + ACE Zdravotnické Medical Settings [ACE] @@ -2714,6 +2735,7 @@ Ustawienia medyczne [ACE] Ajustes médicos [ACE] Medizinische Einstellungen [ACE] + Lékařské nastavení [ACE] Medical Level @@ -2721,6 +2743,7 @@ Poziom medyczny Nivel médico Medizinisches Level + Úroveň medického What is the medical simulation level? @@ -2728,6 +2751,7 @@ 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 @@ -2735,6 +2759,7 @@ Podstawowy Básico Standard + Základní Advanced @@ -2742,6 +2767,7 @@ Zaawansowany Avanzado Erweitert + Pokročilé Medics setting @@ -2749,12 +2775,14 @@ 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 @@ -2762,6 +2790,7 @@ Wyłącz medyków Desactivar médicos Sanitäter deaktivieren + Zakázat zdravotníky Enable Litter @@ -2769,6 +2798,7 @@ Aktywuj odpadki Activar restos médicos Abfälle aktivieren + Povolit odpadky Enable litter being created upon treatment @@ -2776,6 +2806,7 @@ 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 @@ -2783,6 +2814,7 @@ 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. @@ -2790,6 +2822,7 @@ 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 @@ -2797,6 +2830,7 @@ Aktywuj wrzaski Activar gritos Schreie aktivieren + Povolit křik Enable screaming by injuried units @@ -2804,6 +2838,7 @@ 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 @@ -2811,6 +2846,7 @@ 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? @@ -2818,6 +2854,7 @@ 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 @@ -2825,6 +2862,7 @@ Próg obrażeń AI Daño IA KI-Schaden + Poškození AI What is the damage an AI can take before being killed? @@ -2832,6 +2870,7 @@ 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 @@ -2839,6 +2878,7 @@ Nieprzytomność AI Inconsciencia IA KI-Bewusstlosigkeit + Bezvědomí AI Allow AI to go unconscious @@ -2846,6 +2886,13 @@ 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 + + + Treat remote controlled units as AI not players? Disabled @@ -2853,6 +2900,7 @@ Wyłączone Activado Deaktiviert + Zakázáno Enabled @@ -2860,6 +2908,7 @@ Włączone Desactivado Aktiviert + Povoleno Prevent instant death @@ -2867,6 +2916,7 @@ Wył. natychmiast. śmierć Prevenir muerte instantánea Verhindere direkten Tod + Zabránit okamžité smrti Have a unit move to unconscious instead of death @@ -2874,6 +2924,7 @@ 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 @@ -2881,6 +2932,7 @@ Mnożnik krwawienia Coeficiente de sangrado Verblutungsmultiplikator + Koeficient krvácení Coefficient to modify the bleeding speed @@ -2888,6 +2940,7 @@ 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 @@ -2895,6 +2948,7 @@ Mnożnik bólu Coeficiente de dolor Schmerzmultiplikator + Koeficient bolesti Coefficient to modify the pain intensity @@ -2902,6 +2956,7 @@ 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 @@ -2909,6 +2964,7 @@ Synchronizuj status Sincronizador estado Status synchronisieren + Synchronizovat status Keep unit status synced. Recommended on. @@ -2916,6 +2972,7 @@ 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. @@ -2923,27 +2980,31 @@ 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 @@ -2951,6 +3012,7 @@ Tylko dla graczy Solo jugadores Nur Spieler + Pouze hráči Players and AI @@ -2958,6 +3020,7 @@ Gracze oraz AI Jugadors e IA Spieler und KI + Hráči a AI Enable Advanced wounds @@ -2965,6 +3028,7 @@ Akt. zaawansowane rany Activa heridas avanzadas Aktiviere erweiterte Wunden + Povolit pokročilé zranění Allow reopening of bandaged wounds? @@ -2972,6 +3036,7 @@ 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 @@ -2979,6 +3044,7 @@ Obrażenia od kolizji Accidentes de vehículos Fahrzeugunfälle + Poškození z kolize Do units take damage from a vehicle crash? @@ -2986,6 +3052,7 @@ 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 @@ -2993,6 +3060,7 @@ Ust. apteczek osobistych Permitir EPA Erlaube Erstehilfekasten + Povolit osobní lékárničky Who can use the PAK for full heal? @@ -3000,6 +3068,7 @@ 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 @@ -3007,6 +3076,7 @@ Wszyscy Nadie Jeder + Kdokoliv Medics only @@ -3014,6 +3084,7 @@ Tylko medycy Solo médicos Nur Sanitäter + Pouze zdravotník Doctors only @@ -3021,6 +3092,7 @@ Tylko doktorzy Solo doctores Nur Ärzte + Pouze doktor Remove PAK on use @@ -3028,6 +3100,7 @@ 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? @@ -3035,6 +3108,7 @@ 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 @@ -3042,6 +3116,7 @@ Ogr. apteczek osobistych Ubicacions del EPA Orte für Erstehilfekasten + Lokace osobní lékárničky Where can the personal aid kit be used? @@ -3049,6 +3124,7 @@ 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 @@ -3056,6 +3132,7 @@ Wszędzie Donde sea Überall + Kdekoliv Medical vehicles @@ -3063,6 +3140,7 @@ Pojazdy medyczne Vehiculos médicos Medizinische Fahrzeuge + Zdravotnická vozidla Medical facility @@ -3070,6 +3148,7 @@ Budynki medyczne Centro médico Medizinische Einrichtungen + Zdravotnické zařízení Vehicles & facility @@ -3077,6 +3156,7 @@ Pojazdy i budynki medyczne Vehículos y centros Fahrzeuge & Einrichtungen + Vozidla a zařízení Disabled @@ -3084,6 +3164,7 @@ Wyłączone Desactivado Deaktiviert + Zakázáno Allow Surgical kit (Adv) @@ -3091,6 +3172,7 @@ Ust. zestawu chirurg. Permitir equipo quirúrgico (Avanzado) Erlaube Operationskasten + Povolit chirurgickou soupravu (Pokr.) Who can use the surgical kit? @@ -3098,6 +3180,7 @@ 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) @@ -3105,6 +3188,7 @@ 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? @@ -3112,6 +3196,7 @@ 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) @@ -3119,6 +3204,7 @@ 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? @@ -3126,6 +3212,31 @@ 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 + + + Bandaging removes bloodstains + Bandagieren entfernt Blutflecken + Bandażowanie usuwa ślady krwi + Obvázání odstraňuje skvrny od krve + + + Pain suppression + Schmerzunterdrückung + Zwalczanie bólu + Potlačení bolesti + + + Pain is only temporarily suppressed, not removed + Bandagieren entfernt Blutflecken + Ból jest tylko tymczasowo zwalczany, nie jest usuwany trwale + Bolest je potlačena, ale jen dočastně Configure the treatment settings from ACE Medical @@ -3133,6 +3244,7 @@ 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] @@ -3140,6 +3252,7 @@ Ustawienia wskrzeszania [ACE] Sistema de resucitado [ACE] Wiederbelebungseinstellungen [ACE] + Nastavení oživení [ACE] Enable Revive @@ -3147,6 +3260,7 @@ Aktywuj wskrzeszanie Habilitar resucitado Erlaube Wiederbelebung + Povolit oživení Enable a basic revive system @@ -3154,6 +3268,7 @@ Aktywuj podstawowy system wskrzeszania Habilitar un sistema básico de resucitado Aktiviere Standard-Wiederbelebungssystem + Povolit základní systém oživení Max Revive time @@ -3161,6 +3276,7 @@ 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 @@ -3168,6 +3284,7 @@ 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 @@ -3175,6 +3292,7 @@ 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. @@ -3182,6 +3300,7 @@ 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. @@ -3189,6 +3308,7 @@ 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] @@ -3196,6 +3316,7 @@ Ustaw klasę medyka [ACE] Establecer case médica [ACE] Setze Sanitäterklassen [ACE] + Určit třídu medika [ACE] List @@ -3203,6 +3324,7 @@ Lista Lista Liste + Seznam List of unit names that will be classified as medic, separated by commas. @@ -3210,6 +3332,7 @@ 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 @@ -3217,12 +3340,14 @@ 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 @@ -3230,6 +3355,7 @@ Żadna Nada Keine + Žádný Regular medic @@ -3237,6 +3363,7 @@ Zwykły medyk Médico regular Normaler Sanitäter + Řadový zdravotník Doctor (Only Advanced Medics) @@ -3244,6 +3371,7 @@ 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 @@ -3251,6 +3379,7 @@ 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] @@ -3258,6 +3387,7 @@ Ustaw pojazd medyczny [ACE] Establecer vehículos médicos [ACE] Setze medizinisches Fahrzeug [ACE] + Určit zdravotnické vozidlo [ACE] List @@ -3265,6 +3395,7 @@ Lista Lista Liste + Seznam List of vehicles that will be classified as medical vehicle, separated by commas. @@ -3272,6 +3403,7 @@ 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 @@ -3279,6 +3411,7 @@ 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. @@ -3286,6 +3419,7 @@ 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 @@ -3293,6 +3427,7 @@ 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] @@ -3300,6 +3435,7 @@ Ustaw budynek medyczny [ACE] Establece el centro médico [ACE] Setze medizinische Einrichtung [ACE] + Určit zdravotnické zařízení [ACE] Is Medical Facility @@ -3307,6 +3443,7 @@ Jest budynkiem med. Es centro médico Ist eine medizinische Einrichtung + Je zdravotnické zařízení Registers an object as a medical facility @@ -3314,6 +3451,7 @@ 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. @@ -3321,6 +3459,7 @@ 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) @@ -3328,6 +3467,7 @@ [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) @@ -3335,6 +3475,7 @@ [ACE] Skrzynka z zapasami medycznymi (zaawansowana) [ACE] Caja de suministros médicos (Avanzada) [ACE] Medizinische Kiste (erweitert) + [ACE] Zdravotnické zásoby (pokročilé) Yes @@ -3361,4 +3502,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 60f49c20c3..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", "isNotSitting"}; - }; 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", "isNotSitting"}; - }; - 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", "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..736403cb5f 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"]] 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/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/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/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 a91923bfcf..951a606a7a 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -4,11 +4,15 @@ 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 f19ac8683b..2d2fb1a26c 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -114,147 +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/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/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..5bf4ced035 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 = "8.25 * ((((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 = "5.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_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 9bdb914216..4bbeb22cf5 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -246,74 +246,95 @@ 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 + + + Show News on Main Menu - + \ No newline at end of file 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/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 74c10fb535..535059456e 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -4,30 +4,44 @@ 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/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/sandbag/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp index f26b746629..b16d2f978d 100644 --- a/addons/sandbag/CfgVehicles.hpp +++ b/addons/sandbag/CfgVehicles.hpp @@ -3,10 +3,10 @@ class CfgVehicles { class CAManBase: Man { class ACE_SelfActions { class ACE_Sandbags { - displayName = $STR_ACE_AC_BUILD; + displayName = CSTRING(DeploySandbag); condition = QUOTE(call FUNC(canDeploy)); statement = QUOTE(call FUNC(deploy)); - exceptions[] = {"isNotSwimming", "isNotInside"}; + exceptions[] = {"isNotSwimming"}; showDisabled = 1; priority = 4; icon = PATHTOF(UI\icon_sandbag_ca.paa); @@ -16,10 +16,10 @@ class CfgVehicles { class Item_Base_F; class ACE_Item_Sandbag_empty: Item_Base_F { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); scope = 2; scopeCurator = 2; - displayName = "$STR_ACE_M_SBEMPTY"; + displayName = CSTRING(sandbagEmpty_displayName); vehicleClass = "Items"; class TransportItems { class ACE_Sandbag_empty { @@ -30,10 +30,10 @@ class CfgVehicles { }; /* class ACE_Item_Sandbag: Item_Base_F { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); scope = 2; scopeCurator = 2; - displayName = "$STR_ACE_Sandbag"; + displayName = CSTRING(sandbag_displayName); vehicleClass = "Items"; class TransportItems { class ACE_Sandbag { @@ -45,12 +45,12 @@ class CfgVehicles { */ class thingX; class ACE_SandbagObject: thingX { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); XEH_ENABLED; scope = 1; side = -1; model = PATHTOF(data\ace_sandbag_build.p3d); - displayName = $STR_ACE_Sandbag; + displayName = CSTRING(sandbag_displayName); typicalCargo[] = {}; armor = 12000; // Withstand 200 5.56 bullets before sandbag hull is cheese mapSize = 0.4; @@ -76,7 +76,7 @@ class CfgVehicles { condition = "true"; class ACE_PickUp { selection = ""; - displayName = "$STR_ACE_AC_PICKUPSB"; + displayName = CSTRING(PICKUPSB); distance = 4; condition = QUOTE(!(_player getVariable [ARR_2('ace_sandbag_usingSandbag',false)])); statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup)); @@ -87,7 +87,7 @@ class CfgVehicles { }; class ACE_Carry { selection = ""; - displayName = "$STR_ACE_AC_CARRYSB"; + displayName = CSTRING(CARRYSB); distance = 4; condition = QUOTE(!(_player getVariable [ARR_2('ace_sandbag_usingSandbag',false)])); statement = QUOTE([ARR_2(_target,_player)] call FUNC(carry)); diff --git a/addons/sandbag/CfgWeapons.hpp b/addons/sandbag/CfgWeapons.hpp index cb80d1e9d9..1a26fc78d4 100644 --- a/addons/sandbag/CfgWeapons.hpp +++ b/addons/sandbag/CfgWeapons.hpp @@ -4,9 +4,9 @@ class CfgWeapons { class InventoryItem_Base_F; class ACE_Sandbag_empty: ACE_ItemCore { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); scope = 2; - displayName = "$STR_ACE_M_SBEMPTY"; + displayName = CSTRING(sandbagEmpty_displayName); model = PATHTOF(data\ace_sandbag_m.p3d); picture = PATHTOF(data\m_sandbag_ca.paa); @@ -16,9 +16,9 @@ class CfgWeapons { }; /* class ACE_Sandbag: ACE_ItemCore { - author = "$STR_ACE_Common_ACETeam"; + author = ECSTRING(common,ACETeam); scope = 2; - displayName = "$STR_ACE_Sandbag"; + displayName = CSTRING(sandbag_displayName); model = PATHTOF(data\ace_sandbag_build.p3d); picture = PATHTOF(data\m_sandbag_ca.paa); diff --git a/addons/sandbag/functions/fnc_carry.sqf b/addons/sandbag/functions/fnc_carry.sqf index cefcd827c3..f2ba3dff8a 100644 --- a/addons/sandbag/functions/fnc_carry.sqf +++ b/addons/sandbag/functions/fnc_carry.sqf @@ -46,7 +46,7 @@ _unit setVariable [QGVAR(usingSandbag), true]; GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player); }, 0, []] call CBA_fnc_addPerFrameHandler; - [localize "STR_ACE_AC_DROP", "", ""] call EFUNC(interaction,showMouseHint); + [localize LSTRING(DropSandbag), "", ""] call EFUNC(interaction,showMouseHint); GVAR(carrier) setVariable [QGVAR(drop), [GVAR(carrier), "DefaultAction", diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index 9501d5d09e..1e1121409b 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -32,7 +32,7 @@ GVAR(deployPFH) = [{ GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player); }, 0, []] call CBA_fnc_addPerFrameHandler; -[localize "STR_ACE_AC_CONF", localize "STR_ACE_AC_CANCEL", localize "STR_ACE_Sandbag_ScrollAction"] call EFUNC(interaction,showMouseHint); +[localize LSTRING(ConfirmDeployment), localize LSTRING(CancelDeployment), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint); GVAR(placer) setVariable [QGVAR(Deploy), [GVAR(placer), "DefaultAction", diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index 49f8840bcc..034a6bfdbb 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -1,7 +1,7 @@  - + Sandbag Sandsack Мешок с песком @@ -12,7 +12,7 @@ Sacco di Sabbia Homokzsák - + Sandbag (empty) Sandsack (leer) Мешок с песком (пустой) @@ -23,7 +23,7 @@ Sacco di Sabbia (Vuoto) Homokzsák (üres) - + Cannot build here Nicht möglich Установка на этом месте невозможна @@ -34,7 +34,7 @@ Impossibile costruire qui Nem teheted ide - + Pick up Sandbag Sandsack abbauen Взять мешок с песком @@ -45,7 +45,7 @@ Prendi Sacco di Sabbia Homokzsák felvétele - + Carry Sandbag Sandsack tragen Нести мешок с песком @@ -56,7 +56,7 @@ Trasporta Sacco di Sabbia Homokzsák cipelése - + End Carrying Tragen beenden Завершить переноску @@ -67,7 +67,7 @@ Fine Trasporto Cipelés abbahagyása - + Drop Sandbag Sandsack ablegen Положить мешок @@ -78,7 +78,7 @@ Lascia Sacco di Sabbia Homokzsák eldobása - + Confirm Deployment Aufbauen Подтвердить установку @@ -89,7 +89,7 @@ Conferma Posizionamento Lerak - + Cancel Deployment Abbrechen Отменить установку @@ -100,7 +100,7 @@ Cancella Posizionamento Visszavonás - + Deploy Sandbag Sandsack aufbauen Установить мешок с песком @@ -111,7 +111,7 @@ Posiziona Sacco di Sabbia Homokzsák lerakása - + Sandbag Box Sandsack Kiste Ящик мешков с песком @@ -122,7 +122,7 @@ Contenitore Sacchi di Sabbia Homokzsákos láda - + Here is no sand Hier gibt es keinen Sand Здесь нет песка diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index 12f2f937dd..d42946214b 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -11,7 +11,6 @@ class CfgVehicles { showDisabled = 0; priority = 2; icon = PATHTOF(UI\w_spottingscope_ca.paa); - exceptions[] = {"isNotInside"}; }; }; }; diff --git a/addons/spottingscope/data/ace_ssvzs.p3d b/addons/spottingscope/data/ace_ssvzs.p3d index a30b34fa3e..a4d58c13f4 100644 Binary files a/addons/spottingscope/data/ace_ssvzs.p3d and b/addons/spottingscope/data/ace_ssvzs.p3d differ 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..07b48a8a3f --- /dev/null +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -0,0 +1,86 @@ + +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 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/addons/tacticalladder/config.cpp b/addons/tacticalladder/config.cpp new file mode 100644 index 0000000000..2e26593c12 --- /dev/null +++ b/addons/tacticalladder/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"Rocko"}; + VERSION_CONFIG; + }; +}; + +#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..36b9918f2e --- /dev/null +++ b/addons/tacticalladder/data/model.cfg @@ -0,0 +1,137 @@ +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 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..ef497a5c84 --- /dev/null +++ b/addons/tacticalladder/stringtable.xml @@ -0,0 +1,66 @@ + + + + + Telescopic Ladder + Teleskopleiter + Телескопическая лестница + Drabina teleskopowa + Telescopic Ladder + Telescopic Ladder + Teleskopický žebřík + Telescopic Ladder + Telescopic Ladder + + + Deploy ladder + Leiter aufbauen + Установить лестницу + Rozłóż drabinę + Deploy ladder + Deploy ladder + Rozložit žebřík + Deploy ladder + Deploy ladder + + + Drop ladder + Leiter ablegen + Положить лестницу + Zostaw drabinę + Drop ladder + Drop ladder + Položit žebřík + Drop ladder + Drop ladder + + + Adjust ladder + Leiter einstellen + Reguluj drabinę + Upravit žebřík + + + Position ladder + Leiter positionieren + Перенести лестницу + Postaw drabinę + Position ladder + Position ladder + Umístit žebřík + Position ladder + Position ladder + + + Pickup ladder + Leiter aufnehmen + Взять лестницу + Zabierz drabinę + Pickup ladder + Pickup ladder + Vzít žebřík + Pickup ladder + Pickup ladder + + + \ No newline at end of file diff --git a/addons/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp index bee27fbe8d..714d2cafb1 100644 --- a/addons/tripod/CfgVehicles.hpp +++ b/addons/tripod/CfgVehicles.hpp @@ -11,7 +11,6 @@ class CfgVehicles { showDisabled = 0; priority = 2; icon = PATHTOF(UI\w_sniper_tripod_ca.paa); - exceptions[] = {"isNotInside"}; }; }; }; diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml index 69b30b7e98..baf20b9854 100644 --- a/addons/tripod/stringtable.xml +++ b/addons/tripod/stringtable.xml @@ -8,7 +8,7 @@ Trójnóg snajperski SSWT Kit SSWT Kit - SSWT sada + SSWT souprava SSWT Kit SSWT Kit @@ -19,21 +19,33 @@ Postaw trójnóg snajperski Place SSWT Kit Place SSWT Kit - Rozlož sadu SSWT + 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/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/CfgVehicles.hpp b/addons/yardage450/CfgVehicles.hpp index ef5de319aa..d8f2ccabe3 100644 --- a/addons/yardage450/CfgVehicles.hpp +++ b/addons/yardage450/CfgVehicles.hpp @@ -4,7 +4,7 @@ class CfgVehicles { author[] = {"Spooner", "tcp"}; scope = 2; scopeCurator = 2; - displayName = "$STR_ACE_Yardage450_DisplayName"; + displayName = CSTRING(DisplayName); vehicleClass = "Items"; class TransportWeapons { MACRO_ADDWEAPON(ACE_Yardage450,1); diff --git a/addons/yardage450/CfgWeapons.hpp b/addons/yardage450/CfgWeapons.hpp index 2133100780..54e15401a6 100644 --- a/addons/yardage450/CfgWeapons.hpp +++ b/addons/yardage450/CfgWeapons.hpp @@ -2,9 +2,9 @@ class CfgWeapons { class Binocular; class ACE_Yardage450: Binocular { - author = "$STR_ACE_Common_ACETeam"; - displayName = "$STR_ACE_Yardage450_DisplayName"; - descriptionShort = "$STR_ACE_Yardage450_Description"; + 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); diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml index 5554e9a29e..c7cb16b83b 100644 --- a/addons/yardage450/stringtable.xml +++ b/addons/yardage450/stringtable.xml @@ -4,16 +4,22 @@ 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/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index b33d7461cd..2d41a725cb 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -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/stringtable.xml b/addons/zeus/stringtable.xml index 34cc1a1d18..8ddde63cc8 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -4,70 +4,104 @@ 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. + 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 +130,8 @@ 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 @@ -112,6 +148,8 @@ 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/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";