diff --git a/.gitignore b/.gitignore index f05646fb8a..f312ddb55e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ texHeaders.bin *.swp *.swo *.biprivatekey +Thumbs.db diff --git a/AUTHORS.txt b/AUTHORS.txt index 737bfb590b..62329d7c1d 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -37,8 +37,9 @@ Aleksey EpMAK Yermakov Alganthe Anthariel Asgar Serran +Bamse Bla1337 -BlackPixxel +BlackPixxel BlackQwar Brakoviejo Brisse @@ -51,6 +52,7 @@ Dharma Bellamkonda Dimaslg eRazeri evromalarkey +F3 Project Falke75 Ferenczi Ferenzi @@ -66,8 +68,10 @@ Hamburger SV Harakhti havena Hawkins +Head jokoho482 ` Jonpas +Karneck Kavinsky Kllrt legman @@ -82,6 +86,7 @@ nikolauska nomisum OnkelDisMaster oscarmolinadev +PaxJaromeMalues pokertour Professor rakowozz @@ -101,3 +106,5 @@ Valentin Torikian VyMajoris(W-Cephei) Winter zGuba +Drill +MikeMatrix diff --git a/Arma3_workshop_addon.jpg b/Arma3_workshop_addon.jpg new file mode 100644 index 0000000000..ffc430d688 Binary files /dev/null and b/Arma3_workshop_addon.jpg differ diff --git a/README.md b/README.md index 72b1336b57..2739ce55be 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,21 @@

- +

- ACE version + ACE3 version - - ACE download + + ACE3 download - ACE issues + ACE3 issues - BIF thread + BIF thread - ACE license + ACE3 license

Requires the latest version of CBA A3. Visit us on Facebook | YouTube | Twitter | Reddit

diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll index dd19f1d0d4..41e0533991 100644 Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ diff --git a/ace_break_line.dll b/ace_break_line.dll index 482486ddd3..d76c3d4819 100644 Binary files a/ace_break_line.dll and b/ace_break_line.dll differ diff --git a/ace_clipboard.dll b/ace_clipboard.dll index 5b4ac1c537..c6b771be7f 100644 Binary files a/ace_clipboard.dll and b/ace_clipboard.dll differ diff --git a/ace_fcs.dll b/ace_fcs.dll index 919a4d0e5b..b224c194cd 100644 Binary files a/ace_fcs.dll and b/ace_fcs.dll differ diff --git a/ace_medical.dll b/ace_medical.dll index 1f4f71d5ca..790154d4c4 100644 Binary files a/ace_medical.dll and b/ace_medical.dll differ diff --git a/ace_parse_imagepath.dll b/ace_parse_imagepath.dll new file mode 100644 index 0000000000..f2c6054cec Binary files /dev/null and b/ace_parse_imagepath.dll differ diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index 757385deb3..d88a9b1148 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -1,31 +1,31 @@ class ACE_Settings { class GVAR(enabled) { - displayName = "Advanced Ballistics"; - description = "Enables advanced ballistics"; + displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_Description); typeName = "BOOL"; value = 0; }; class GVAR(simulateForSnipers) { - displayName = "Enabled For Snipers"; - description = "Enables advanced ballistics for non local snipers (when using high power optics)"; + displayName = CSTRING(simulateForSnipers_DisplayName); + description = CSTRING(simulateForSnipers_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulateForGroupMembers) { - displayName = "Enabled For Group Members"; - description = "Enables advanced ballistics for non local group members"; + displayName = CSTRING(simulateForGroupMembers_DisplayName); + description = CSTRING(simulateForGroupMembers_Description); typeName = "BOOL"; value = 0; }; class GVAR(simulateForEveryone) { - displayName = "Enabled For Everyone"; - description = "Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)"; + displayName = CSTRING(simulateForEveryone_DisplayName); + description = CSTRING(simulateForEveryone_Description); typeName = "BOOL"; value = 0; }; class GVAR(disabledInFullAutoMode) { - displayName = "Disabled In FullAuto Mode"; - description = "Disables advanced ballistics during full auto fire"; + displayName = CSTRING(disabledInFullAutoMod_DisplayName); + description = CSTRING(disabledInFullAutoMod_Description); typeName = "BOOL"; value = 0; }; @@ -38,32 +38,32 @@ class ACE_Settings { }; */ class GVAR(ammoTemperatureEnabled) { - displayName = "Enable Ammo Temperature Simulation"; - description = "Muzzle velocity varies with ammo temperature"; + displayName = CSTRING(ammoTemperatureEnabled_DisplayName); + description = CSTRING(ammoTemperatureEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(barrelLengthInfluenceEnabled) { - displayName = "Enable Barrel Length Simulation"; - description = "Muzzle velocity varies with barrel length"; + displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName); + description = CSTRING(barrelLengthInfluenceEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(bulletTraceEnabled) { - displayName = "Enable Bullet Trace Effect"; - description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)"; + displayName = CSTRING(bulletTraceEnabled_DisplayName); + description = CSTRING(bulletTraceEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulationInterval) { - displayName = "Simulation Interval"; - description = "Defines the interval between every calculation step"; + displayName = CSTRING(simulationInterval_DisplayName); + description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; value = 0.0; }; class GVAR(simulationRadius) { - displayName = "Simulation Radius"; - description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles"; + displayName = CSTRING(simulationRadius_DisplayName); + description = CSTRING(simulationRadius_Description); typeName = "SCALAR"; value = 3000; }; diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 2c3488f92d..7c01bd9f23 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -53,7 +53,9 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then { if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; if (_abort || !(GVAR(extensionAvailable))) exitWith { - [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH); + if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { + EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; + }; }; _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; @@ -114,7 +116,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(weather,Latitude), EGVAR(weather,currentTemperature), EGVAR(weather,Altitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)]; +"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _AmmoCacheEntry select 0, _AmmoCacheEntry select 6, _AmmoCacheEntry select 7, _AmmoCacheEntry select 8, _AmmoCacheEntry select 5, _stabilityFactor, _WeaponCacheEntry select 1, _muzzleVelocity, _AmmoCacheEntry select 4, getPosASL _bullet, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, floor(ACE_time), ACE_time - floor(ACE_time)]; [{ private ["_args", "_index", "_bullet", "_caliber", "_bulletTraceVisible", "_bulletVelocity", "_bulletPosition"]; diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index eed6e20be3..b30485aae6 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -31,6 +31,7 @@ Balística avanzada Erweiterte Ballistik Pokročilá balistika + Balística avançada Advanced Ballistics @@ -38,6 +39,7 @@ Balística avanzada Erweiterte Ballistik Pokročilá balistika + Balística avançada Enables advanced ballistics @@ -45,6 +47,7 @@ Activa la balística avanzada Aktiviert die erweiterte Ballistik Aktivuje pokročilou balistiku + Ativa balística avançada Enabled For Snipers @@ -52,6 +55,7 @@ Akt. dla snajperów Für Scharfschützen aktiviert Povoleno pro odstřelovače + Ativar para caçadores Enables advanced ballistics for non local snipers (when using high power optics) @@ -59,6 +63,7 @@ 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) + Ativa balística avançada para caçadores não locais (quando usando miras telescópicas) Enabled For Group Members @@ -66,6 +71,7 @@ Akt. dla czł. grupy Für Gruppenmitglieder aktiviert Povoleno pro členy skupiny + Ativada para membros do grupo Enables advanced ballistics for non local group members @@ -73,6 +79,7 @@ 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 + Ativa balística avançada para membros de grupo não locais Enabled For Everyone @@ -80,6 +87,7 @@ Akt. dla wszystkich Für jeden aktiviert Povoleno pro všechny + Ativada para todos Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer) @@ -87,6 +95,7 @@ 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) + Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer) Always Enabled For Group Members @@ -94,6 +103,7 @@ Siempre activada para miembros de grupo Für Gruppenmitglieder immer aktiviert Vždy povoleno pro členy skupiny + Sempre ativada para membros do grupo Always enables advanced ballistics when a group member fires @@ -101,6 +111,7 @@ 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 + Sempre ative balística avançada quando um membro do grupo disparar Disabled In FullAuto Mode @@ -108,6 +119,7 @@ Desactivada en modo automático Beim vollautomatischen Feuern deaktiviert Zakázáno v automatickém režimu střelby + Desabilitar no modo automático Disables the advanced ballistics during full auto fire @@ -115,6 +127,7 @@ 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 + Desabilitar a balística avançada durante fogo automático Enable Ammo Temperature Simulation @@ -122,6 +135,7 @@ Activar simulación de temperatura de munición Simulation der Munitionstemperatur aktivieren Povolit simulaci teploty munice + Ativar simulação de temperatura de munição Muzzle velocity varies with ammo temperature @@ -129,6 +143,7 @@ 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 + A velocidade de saída varia com a temperatura da munição Enable Barrel Length Simulation @@ -136,6 +151,7 @@ Habilitar la simulación de longitud del cañón Simulation der Lauflänge aktivieren Povolit simulaci délky hlavně + Ativar a simulação de comprimento do cano Muzzle velocity varies with barrel length @@ -143,6 +159,7 @@ 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ě + A velocidade de saída caria com o comprimento do cano Enable Bullet Trace Effect @@ -150,6 +167,7 @@ Activar el efecto trazador de la bala Geschossspureffekt aktivieren Povolit efekt trasírek + Ativa efeito traçante de projétil Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics) @@ -157,6 +175,7 @@ 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) + Ativa o efeito traçante de projétil para projéteis de alto calibre (somente visível quando observado por miras telescópicas) Simulation Interval @@ -164,6 +183,7 @@ Intervalo de simulación Simulationsintervall Interval simulace + Intervalo da simulação Defines the interval between every calculation step @@ -171,6 +191,7 @@ Define el intervalo entre cada cálculo Legt das Intervall zwischen den Berechnungsschritten fest Určuje interval mezi každým výpočtem + Define o intervalo entre cada cálculo Simulation Radius @@ -178,6 +199,7 @@ Radio de simulación Simulationsradius Rozsah simulace + Raio de simulação Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles @@ -185,11 +207,13 @@ 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 + Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis - + This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired. 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. + Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, força de Coriolis, a gravidade, o modelo da arma no qual o disparo é realizado e o tipo de munição. Tudo isso acrescenta-se a um balística muito precisa. \ No newline at end of file diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp index ac8a759bd3..e97889eabf 100644 --- a/addons/aircraft/CfgWeapons.hpp +++ b/addons/aircraft/CfgWeapons.hpp @@ -20,7 +20,7 @@ class CfgWeapons { reloadTime = 0.01; magazineReloadTime = 0.1; }; - + // Manual Switching Of Flare Mode class SmokeLauncher; class CMFlareLauncher: SmokeLauncher { @@ -106,12 +106,14 @@ class CfgWeapons { class M134_minigun: MGunCore { class LowROF: Mode_FullAuto { - reloadTime = 0.015; //0.03; same as above @todo - dispersion = 0.006; //0.0023; + reloadTime = 0.03; //0.03; same as above @todo + dispersion = 0.0064; //0.0023; + multiplier = 1; }; class HighROF: LowROF { - reloadTime = 0.015; //0.03; - dispersion = 0.006; //0.0023; + reloadTime = 0.02; //0.03; + dispersion = 0.0064; //0.0023; + multiplier = 1; }; class close: HighROF {}; class short: close {}; diff --git a/addons/atragmx/CfgVehicles.hpp b/addons/atragmx/CfgVehicles.hpp index 65ef589d0f..cc4a7880fe 100644 --- a/addons/atragmx/CfgVehicles.hpp +++ b/addons/atragmx/CfgVehicles.hpp @@ -21,13 +21,10 @@ class CfgVehicles { author = "Ruthberg"; scope = 2; scopeCurator = 2; - displayName = "ATragMX"; + displayName = CSTRING(Name); vehicleClass = "Items"; class TransportItems { - class ACE_ATragMX { - name = "ACE_ATragMX"; - count = 1; - }; + MACRO_ADDITEM(ACE_ATragMX,1); }; }; diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf index df71f9beb9..aad591581a 100644 --- a/addons/atragmx/functions/fnc_create_dialog.sqf +++ b/addons/atragmx/functions/fnc_create_dialog.sqf @@ -57,6 +57,6 @@ GVAR(DialogPFH) = [{ [_this select 1] call cba_fnc_removePerFrameHandler; }; __ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))]; -}, 60, []] call cba_fnc_addPerFrameHandler; +}, 60, []] call CBA_fnc_addPerFrameHandler; true diff --git a/addons/attach/CfgMagazines.hpp b/addons/attach/CfgMagazines.hpp index a000222adc..f85cac82b4 100644 --- a/addons/attach/CfgMagazines.hpp +++ b/addons/attach/CfgMagazines.hpp @@ -3,14 +3,17 @@ class CfgMagazines { class CA_Magazine; class B_IR_Grenade: CA_Magazine { ACE_Attachable = "B_IRStrobe"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); }; class O_IR_Grenade: B_IR_Grenade { ACE_Attachable = "O_IRStrobe"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); }; class I_IR_Grenade: B_IR_Grenade { ACE_Attachable = "I_IRStrobe"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); }; class SmokeShell; diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp index 3ad2591f63..dfea64678d 100644 --- a/addons/attach/CfgWeapons.hpp +++ b/addons/attach/CfgWeapons.hpp @@ -1,4 +1,3 @@ - class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; @@ -9,11 +8,11 @@ class CfgWeapons { scope = 2; displayName = CSTRING(IrStrobe_Name); descriptionShort = CSTRING(IrStrobe_Description); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); picture = PATHTOF(UI\irstrobe_item.paa); class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; -}; +}; \ No newline at end of file diff --git a/addons/attach/GUI_VirtualAmmo.hpp b/addons/attach/GUI_VirtualAmmo.hpp new file mode 100644 index 0000000000..69e98e7ecb --- /dev/null +++ b/addons/attach/GUI_VirtualAmmo.hpp @@ -0,0 +1,30 @@ +class RscTitles { + class GVAR(virtualAmmo) { + idd = -1; + movingEnable = 1; + duration = 9999999; + fadein = 0; + fadeout = 0; + onLoad = "uiNamespace setVariable ['ACE_attach_virtualAmmoDisplay', (_this select 0)];"; + class controls {}; + class objects { + class TheObject { + idc = 800851; + type = 82; + model = "\a3\weapons_f\Ammo\Handgrenade.p3d"; + scale = 1; + direction[] = {0, 0, 1}; + up[] = {0, 1, 0}; + x = 0.5; + y = 0.5; + z = 1; + xBack = 0.5; + yBack = 0.5; + zBack = 0.5; + inBack = 0; + enableZoom = 0; + zoomDuration = 1; + }; + }; + }; +}; diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp index e8983cefde..0ecc37788a 100644 --- a/addons/attach/config.cpp +++ b/addons/attach/config.cpp @@ -16,3 +16,4 @@ class CfgPatches { #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" +#include "GUI_VirtualAmmo.hpp" diff --git a/addons/attach/data/ace_IRStrobe.p3d b/addons/attach/data/ace_IRStrobe.p3d new file mode 100644 index 0000000000..67f3d55f89 Binary files /dev/null and b/addons/attach/data/ace_IRStrobe.p3d differ diff --git a/addons/attach/data/ace_IRStrobe.rvmat b/addons/attach/data/ace_IRStrobe.rvmat new file mode 100644 index 0000000000..5557299263 --- /dev/null +++ b/addons/attach/data/ace_IRStrobe.rvmat @@ -0,0 +1,90 @@ +class StageTI +{ + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,1}; +emmisive[] = {0,0,0,1}; +specular[] = {0.99999976,0.99999976,0.99999976,1}; +specularPower = 128; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\attach\data\ace_IRStrobe_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.1,0.1,0.1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,32,128,1)fresnel(0.71,0.74)"; + uvSource = "none"; +}; +class Stage7 +{ + texture = "a3\data_f\env_land_co.paa"; + useWorldEnvMap = "true"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1.0,0.0,0.0}; + up[] = {0.0,1.0,0.0}; + dir[] = {0.0,0.0,0.0}; + pos[] = {0.0,0.0,0.0}; + }; +}; \ No newline at end of file diff --git a/addons/attach/data/ace_IRStrobe_co.paa b/addons/attach/data/ace_IRStrobe_co.paa new file mode 100644 index 0000000000..02d5889edc Binary files /dev/null and b/addons/attach/data/ace_IRStrobe_co.paa differ diff --git a/addons/attach/data/ace_IRStrobe_nohq.paa b/addons/attach/data/ace_IRStrobe_nohq.paa new file mode 100644 index 0000000000..380b89b7dc Binary files /dev/null and b/addons/attach/data/ace_IRStrobe_nohq.paa differ diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 984c231366..bd363b1307 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -17,10 +17,10 @@ */ #include "script_component.hpp" -private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID"]; - -PARAMS_3(_attachToVehicle,_unit,_args); -_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam; +private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"]; +params ["_attachToVehicle","_unit","_args"]; +_args params [["_itemClassname","", [""]]]; +TRACE_3("params",_attachToVehicle,_unit,_itemClassname); //Sanity Check (_unit has item in inventory, not over attach limit) if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");}; @@ -47,44 +47,75 @@ if (_unit == _attachToVehicle) then { //Self Attachment _attachToVehicle setVariable [QGVAR(Objects), [_attachedItem], true]; _attachToVehicle setVariable [QGVAR(ItemNames), [_itemClassname], true]; } else { - GVAR(placeAction) = -1; - - _tempObject = _itemVehClass createVehicleLocal [0,0,-10000]; - _tempObject enableSimulationGlobal false; + GVAR(placeAction) = PLACE_WAITING; [_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus); - //MenuBack isn't working for now (localize "STR_ACE_Attach_CancelAction") [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame); - _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = 1;}] call EFUNC(common,AddActionEventHandler)]; - // _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {true}, {GVAR(placeAction) = 0;}] call EFUNC(common,AddActionEventHandler)]; + _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; - _actionID = _unit addAction [format ["%1", localize LSTRING(CancelAction)], {GVAR(placeAction) = 0}]; + _actionID = _unit addAction [format ["%1", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}]; + + //Display to show virtual object: + private []; + _model = getText (configFile >> "CfgAmmo" >> _itemVehClass >> "model"); + if (_model == "") then { + _model = getText (configFile >> "CfgVehicles" >> _itemVehClass >> "model"); + }; + //"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game! + if (_model == "") exitWith {ERROR("No Model");}; + (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false]; + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model; [{ - private "_startingPosition"; - PARAMS_2(_args,_pfID); - EXPLODE_7_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_tempObject,_onAtachText,_actionID); + private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"]; + params ["_args","_idPFH"]; + _args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"]; - if ((GVAR(placeAction) != -1) || + _virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]); + if (cameraView == "EXTERNAL") then { + _virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0])); + }; + _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition); + _lineInterection = lineIntersects [eyePos ACE_player, _virtualPosASL, ACE_player]; + + //Don't allow placing in a bad position: + if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;}; + + if ((GVAR(placeAction) != PLACE_WAITING) || {_unit != ACE_player} || {!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} || {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then { - [_pfID] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; [_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); - //[_unit, "MenuBack", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler); _unit removeAction _actionID; - if (GVAR(placeAction) == 1) then { - _startingPosition = _tempObject modelToWorldVisual [0,0,0]; - [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _startingPosition] call FUNC(placeApprove); + (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + + if (GVAR(placeAction) == PLACE_APPROVE) then { + [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _virtualPos] call FUNC(placeApprove); }; - deleteVehicle _tempObject; } else { - _tempObject setPosATL ((ASLtoATL eyePos _unit) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]));; + //Show the virtual object: + if (_lineInterection) then { + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false; + } else { + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow true; + _screenPos = worldToScreen _virtualPos; + if (_screenPos isEqualTo []) exitWith { + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlShow false; + }; + _realDistance = (_virtualPos distance (positionCameraToWorld [0,0,0])) / ((call CBA_fnc_getFov) select 1); + _screenPos = [(_screenPos select 0), _realDistance, (_screenPos select 1)]; + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetPosition _screenPos; + _dir = (positionCameraToWorld [0,0,1]) vectorFromTo (positionCameraToWorld [0,0,0]); + _angle = asin (_dir select 2); + _up = [0, cos _angle, sin _angle]; + ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModelDirAndUp [[1,0,0], _up]; + }; }; - }, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _tempObject, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler; + }, 0, [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _actionID]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index 18071092d5..20a49c09be 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -17,14 +17,14 @@ */ #include "script_component.hpp" -PARAMS_3(_attachToVehicle,_player,_args); +private ["_attachLimit", "_attachedObjects","_playerPos"]; +params ["_attachToVehicle","_player","_args"]; +_args params [["_itemClassname","", [""]]]; +TRACE_3("params",_attachToVehicle,_unit,_itemClassname); -private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"]; - -_itemName = [_args, 0, ""] call CBA_fnc_defaultParam; _attachLimit = [6, 1] select (_player == _attachToVehicle); _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); -(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemName in ((itemsWithMagazines _player) + [""])}; +(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemClassname in ((itemsWithMagazines _player) + [""])}; diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index dc335e6bb6..ba3182ddea 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -16,9 +16,9 @@ */ #include "script_component.hpp" -PARAMS_2(_attachToVehicle,_unit); - private ["_attachedObjects", "_inRange"]; +params ["_attachToVehicle", "_unit"]; +TRACE_2("params",_attachToVehicle,_unit); _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 92df83b5c1..98f482f17b 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -16,15 +16,16 @@ */ #include "script_component.hpp" -PARAMS_2(_attachToVehicle,_unit); - -private ["_attachedObjects", "_attachedItems", "_itemDisplayName"]; +private ["_attachedObjects", "_attachedItems", "_itemDisplayName", + "_attachedObject", "_attachedIndex", "_itemName", "_minDistance", + "_unitPos", "_objectPos" +]; +params ["_attachToVehicle","_unit"], +TRACE_2("params",_attachToVehicle,_unit); _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []]; -private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"]; - _attachedObject = objNull; _attachedIndex = -1; _itemName = ""; diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf index fb432146be..aeb75c00d4 100644 --- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf +++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf @@ -18,7 +18,8 @@ #include "script_component.hpp" private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"]; -PARAMS_2(_target,_player); +params ["_target","_player"]; +TRACE_2("params",_target,_player); _listed = []; _actions = []; @@ -30,7 +31,7 @@ _actions = []; if (getText (_item >> "ACE_Attachable") != "") then { _displayName = getText(_item >> "displayName"); _picture = getText(_item >> "picture"); - _action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); + _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _target]; }; }; @@ -43,7 +44,7 @@ _actions = []; if (getText (_item >> "ACE_Attachable") != "") then { _displayName = getText(_item >> "displayName"); _picture = getText(_item >> "picture"); - _action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); + _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _target]; }; }; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index d85a65df2b..0656e7880f 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -25,9 +25,10 @@ */ #include "script_component.hpp" -private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_setupObject", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; +private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; -PARAMS_6(_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition); +params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"]; +TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition); _startingOffset = _attachToVehicle worldToModel _startingPosition; @@ -37,9 +38,6 @@ _closeInUnitVector = vectorNormalized (_startingOffset vectorFromTo [0,0,0]); _closeInMax = _startDistanceFromCenter; _closeInMin = 0; -//Delete Local Placement Object -deleteVehicle _setupObject; - while {(_closeInMax - _closeInMin) > 0.01} do { _closeInDistance = (_closeInMax + _closeInMin) / 2; // systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter]; diff --git a/addons/attach/script_component.hpp b/addons/attach/script_component.hpp index 409f74ab94..604a47fcb4 100644 --- a/addons/attach/script_component.hpp +++ b/addons/attach/script_component.hpp @@ -9,4 +9,8 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH #endif -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file +#include "\z\ace\addons\main\script_macros.hpp" + +#define PLACE_WAITING -1 +#define PLACE_CANCEL 0 +#define PLACE_APPROVE 1 diff --git a/addons/backpacks/README.md b/addons/backpacks/README.md index 9c721428b1..6fa54a9897 100644 --- a/addons/backpacks/README.md +++ b/addons/backpacks/README.md @@ -1,8 +1,7 @@ -ace_lockbackpacks +ace_backpacks ================= -Introduces the ability to lock one's backpack. - +Adds indication when someone else opens your backpack (soundeffect / camShake). ## Maintainers diff --git a/addons/backpacks/XEH_postInit.sqf b/addons/backpacks/XEH_postInit.sqf index 375fcd5f89..639bf74919 100644 --- a/addons/backpacks/XEH_postInit.sqf +++ b/addons/backpacks/XEH_postInit.sqf @@ -1,3 +1,3 @@ #include "script_component.hpp" -["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler); +["backpackOpened", DFUNC(backpackOpened)] call EFUNC(common,addEventHandler); diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 3f5cf53994..9488bf6bd9 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -2,18 +2,18 @@ * Author: commy2 * * Someone opened your backpack. Execute locally. - * + * * Argument: * 0: Who accessed your inventory? (Object) * 1: Unit that wields the backpack (Object) * 2: The backpack object (Object) - * + * * Return value: * None. */ #include "script_component.hpp" - -PARAMS_3(_unit,_target,_backpack); +private ["_sounds", "_position"]; +params ["_target", "_backpack"]; // do cam shake if the target is the player if ([_target] call EFUNC(common,isPlayer)) then { @@ -21,7 +21,6 @@ if ([_target] call EFUNC(common,isPlayer)) then { }; // play a rustling sound -private ["_sounds", "_position"]; _sounds = [ /*"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss", diff --git a/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf b/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf index 562dc84da2..85f5966aa9 100644 --- a/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf +++ b/addons/backpacks/functions/fnc_getBackpackAssignedUnit.sqf @@ -2,21 +2,21 @@ * Author: commy2 * * Returns the unit that has the given backpack object equipped. - * + * * Argument: - * 0: A backpack object (Object) - * + * 0: Executing Unit (Object) + * 1: A backpack object (Object) + * * Return value: * Unit that has the backpack equipped. (Object) */ #include "script_component.hpp" +scopeName "main"; -private ["_backpack", "_unit"]; - -_backpack = _this select 0; - -_unit = objNull; +params ["_unit","_backpack"]; +_target = objNull; { - if (backpackContainer _x == _backpack) exitWith {_unit = _x}; -} forEach (allUnits + allDeadMen); -_unit + if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"}; +} count nearestObjects [_unit, ["Man"], 5]; +if (isNull _target) exitWith {ACE_Player}; +_target diff --git a/addons/backpacks/functions/fnc_isBackpack.sqf b/addons/backpacks/functions/fnc_isBackpack.sqf index b1d55f9ce6..3419d2ed38 100644 --- a/addons/backpacks/functions/fnc_isBackpack.sqf +++ b/addons/backpacks/functions/fnc_isBackpack.sqf @@ -11,9 +11,8 @@ */ #include "script_component.hpp" -private ["_backpack", "_config"]; - -_backpack = _this select 0; +private ["_config"]; +params ["_backpack"]; if (typeName _backpack == "OBJECT") then { _backpack = typeOf _backpack; diff --git a/addons/backpacks/functions/fnc_onOpenInventory.sqf b/addons/backpacks/functions/fnc_onOpenInventory.sqf index 63e4aa87a3..d79f8aed9b 100644 --- a/addons/backpacks/functions/fnc_onOpenInventory.sqf +++ b/addons/backpacks/functions/fnc_onOpenInventory.sqf @@ -2,29 +2,27 @@ * Author: commy2 * * Handle the open inventory event. Display message on traget client. - * + * * Argument: * Input from "InventoryOpened" eventhandler - * + * * Return value: * false. Always open the inventory dialog. (Bool) */ #include "script_component.hpp" -private ["_unit", "_backpack"]; - -_unit = _this select 0; -_backpack = _this select 1; +private "_target"; +params ["","_backpack"]; // exit if the target is not a backpack if !([_backpack] call FUNC(isBackpack)) exitWith {}; // get the unit that wears the backpack object -private "_target"; -_target = [_backpack] call FUNC(getBackpackAssignedUnit); +_target = _this call FUNC(getBackpackAssignedUnit); +if (isNull _target) exitWith {false}; // raise event on target unit -["backpackOpened", _target, [_unit, _target, _backpack]] call EFUNC(common,targetEvent); +["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent); // return false to open inventory as usual false diff --git a/addons/ballistics/scripts/initTargetWall.sqf b/addons/ballistics/scripts/initTargetWall.sqf index 391faaa82e..d9b16eec10 100644 --- a/addons/ballistics/scripts/initTargetWall.sqf +++ b/addons/ballistics/scripts/initTargetWall.sqf @@ -1,9 +1,9 @@ // by commy2 #include "script_component.hpp" -private ["_wall", "_paper"]; +private "_paper"; -_wall = _this select 0; +params ["_wall"]; if (local _wall) then { _paper = "UserTexture_1x2_F" createVehicle position _wall; diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index 171d7936b8..db44078980 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1598,6 +1598,7 @@ [ACE] Caja de suministros de munición [ACE] Munitionskiste [ACE] Bedna s municí + [ACE] Caixa com suprimentos de munição \ No newline at end of file diff --git a/addons/captives/ACE_Settings.hpp b/addons/captives/ACE_Settings.hpp index 73bafbab41..1d0ebbf491 100644 --- a/addons/captives/ACE_Settings.hpp +++ b/addons/captives/ACE_Settings.hpp @@ -5,6 +5,13 @@ class ACE_Settings { typeName = "BOOL"; value = 1; }; + class GVAR(requireSurrender) { + displayName = CSTRING(ModuleSettings_requireSurrender_name); + description = CSTRING(ModuleSettings_requireSurrender_description); + typeName = "SCALAR"; + values[] = {ECSTRING(common,Disabled), CSTRING(SurrenderOnly), CSTRING(SurrenderOrNoWeapon)}; + value = 1; + }; class GVAR(allowSurrender) { displayName = CSTRING(ModuleSettings_allowSurrender_name); description = CSTRING(ModuleSettings_allowSurrender_description); diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 746a1c4b63..774ecf87e3 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -189,6 +189,26 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 1; }; + class requireSurrender { + displayName = CSTRING(ModuleSettings_requireSurrender_name); + description = CSTRING(ModuleSettings_requireSurrender_description); + typeName = "NUMBER"; + class values { + class disable { + name = ECSTRING(common,No); + value = 0; + }; + class Surrender { + name = CSTRING(SurrenderOnly); + value = 1; + default = 1; + }; + class SurrenderOrNoWeapon { + name = CSTRING(SurrenderOrNoWeapon); + value = 2; + }; + }; + }; }; class ModuleDescription: ModuleDescription { description = CSTRING(ModuleSettings_Description); diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index e42b5455ff..5e7eb34a76 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -16,11 +16,11 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); - +params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && ("ACE_CableTie" in (items _unit)) && {alive _target} && -{!(_target getVariable [QGVAR(isHandcuffed), false])} +{!(_target getVariable [QGVAR(isHandcuffed), false])} && +(GVAR(requireSurrender) == 0 || ((_target getVariable [QGVAR(isSurrendering), false]) || (currentWeapon _target == "" && GVAR(requireSurrender) == 2))) diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index 1d9480fd0b..a7c799905e 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -16,8 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); - +params ["_unit", "_target"]; //Alive, handcuffed, not being escored, and not unconscious (_target getVariable [QGVAR(isHandcuffed), false]) && diff --git a/addons/captives/functions/fnc_canFriskPerson.sqf b/addons/captives/functions/fnc_canFriskPerson.sqf index 5eecc453d4..d164f13ac3 100644 --- a/addons/captives/functions/fnc_canFriskPerson.sqf +++ b/addons/captives/functions/fnc_canFriskPerson.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); +params ["_unit", "_target"]; _target getVariable [QGVAR(isHandcuffed), false] || {_target getVariable [QGVAR(isSurrendering), false]} diff --git a/addons/captives/functions/fnc_canLoadCaptive.sqf b/addons/captives/functions/fnc_canLoadCaptive.sqf index 04b33ad42d..0e028ac1ec 100644 --- a/addons/captives/functions/fnc_canLoadCaptive.sqf +++ b/addons/captives/functions/fnc_canLoadCaptive.sqf @@ -18,8 +18,7 @@ #include "script_component.hpp" private ["_objects"]; - -PARAMS_3(_unit,_target,_vehicle); +params ["_unit", "_target","_vehicle"]; if (isNull _target) then { _objects = attachedObjects _unit; @@ -28,7 +27,7 @@ if (isNull _target) then { }; if (isNull _vehicle) then { - _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship_F"], 10]; + _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship"], 10]; if ((count _objects) > 0) then {_vehicle = _objects select 0;}; }; diff --git a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf index 4642cd90fd..e8bbe3b50e 100644 --- a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); +params ["_unit", "_target"]; //Unit is handcuffed and not currently being escorted _target getVariable [QGVAR(isHandcuffed), false] && diff --git a/addons/captives/functions/fnc_canStopEscorting.sqf b/addons/captives/functions/fnc_canStopEscorting.sqf index 56065a43fc..cfafb5a0e8 100644 --- a/addons/captives/functions/fnc_canStopEscorting.sqf +++ b/addons/captives/functions/fnc_canStopEscorting.sqf @@ -16,8 +16,7 @@ */ #include "script_component.hpp" -PARAMS_1(_unit); -DEFAULT_PARAM(1,_target,objNull); +params ["_unit", ["_target", objNull]]; if (isNull _target) then { _target = _unit getVariable [QGVAR(escortedUnit), objNull]; diff --git a/addons/captives/functions/fnc_canSurrender.sqf b/addons/captives/functions/fnc_canSurrender.sqf index 059fb98d03..de0a88d871 100644 --- a/addons/captives/functions/fnc_canSurrender.sqf +++ b/addons/captives/functions/fnc_canSurrender.sqf @@ -16,12 +16,12 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_newSurrenderState); - private "_returnValue"; +params ["_unit", "_newSurrenderState"]; + _returnValue = if (_newSurrenderState) then { - //no weapon equiped AND not currently surrendering and + //no weapon equiped AND not currently surrendering and GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])} } else { //is Surrendering diff --git a/addons/captives/functions/fnc_canUnloadCaptive.sqf b/addons/captives/functions/fnc_canUnloadCaptive.sqf index 59e798a24c..6bd98cf4eb 100644 --- a/addons/captives/functions/fnc_canUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_canUnloadCaptive.sqf @@ -18,6 +18,6 @@ private ["_cargo"]; -PARAMS_2(_player,_unit); +params ["_player", "_unit"]; ((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]} diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index 0d15f503e8..21bfe58747 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -16,10 +16,11 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); -_unit removeItem "ACE_CableTie"; +params ["_unit", "_target"]; playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10]; ["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent); + +_unit removeItem "ACE_CableTie"; diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index bc2cd97ffd..bb070b057a 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -PARAMS_3(_unit,_target,_state); +params ["_unit", "_target","_state"]; if (_state) then { if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {}; diff --git a/addons/captives/functions/fnc_doFriskPerson.sqf b/addons/captives/functions/fnc_doFriskPerson.sqf index d79c88a5fb..e14025b88f 100644 --- a/addons/captives/functions/fnc_doFriskPerson.sqf +++ b/addons/captives/functions/fnc_doFriskPerson.sqf @@ -19,6 +19,7 @@ private ["_weapon", "_listedItemClasses", "_actions", "_allGear"]; PARAMS_2(_player,_unit); +params ["_player", "_unit"]; _weapon = currentWeapon _player; if (_weapon == primaryWeapon _player && {_weapon != ""}) then { diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index 97ecd98a0a..d7df42eb0a 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -17,9 +17,10 @@ */ #include "script_component.hpp" -PARAMS_3(_unit,_target,_vehicle); private "_objects"; +params ["_unit", "_target","_vehicle"]; + if (isNull _target) then { _objects = attachedObjects _unit; _objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter); @@ -28,7 +29,7 @@ if (isNull _target) then { if (isNull _target) exitWith {}; if (isNull _vehicle) then { - _objects = nearestObjects [_unit, ["Car_F", "Tank_F", "Helicopter_F", "Boat_F", "Plane_F"], 10]; + _objects = nearestObjects [_unit, ["Car", "Tank", "Helicopter", "Plane", "Ship"], 10]; if ((count _objects) > 0) then {_vehicle = _objects select 0;}; }; if (isNull _vehicle) exitWith {}; diff --git a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf index a69decf620..681b698de3 100644 --- a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf @@ -15,6 +15,6 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); +params ["_unit", "_target"]; ["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent); diff --git a/addons/captives/functions/fnc_doUnloadCaptive.sqf b/addons/captives/functions/fnc_doUnloadCaptive.sqf index 5d95189742..46ba618010 100644 --- a/addons/captives/functions/fnc_doUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_doUnloadCaptive.sqf @@ -16,6 +16,6 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_target); +params ["_unit", "_target"]; ["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent); diff --git a/addons/captives/functions/fnc_handleGetIn.sqf b/addons/captives/functions/fnc_handleGetIn.sqf index cf7d2c7271..487e7d4179 100644 --- a/addons/captives/functions/fnc_handleGetIn.sqf +++ b/addons/captives/functions/fnc_handleGetIn.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -PARAMS_3(_vehicle,_dontcare,_unit); +params ["_vehicle", "_dontcare","_unit"]; if (local _unit) then { if (_unit getVariable [QGVAR(isEscorting), false]) then { diff --git a/addons/captives/functions/fnc_handleGetOut.sqf b/addons/captives/functions/fnc_handleGetOut.sqf index 4bf9a1fa19..daf88b7e34 100644 --- a/addons/captives/functions/fnc_handleGetOut.sqf +++ b/addons/captives/functions/fnc_handleGetOut.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -PARAMS_3(_vehicle,_dontcare,_unit); +params ["_vehicle", "_dontcare","_unit"]; if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then { private ["_cargoIndex"]; diff --git a/addons/captives/functions/fnc_handleKilled.sqf b/addons/captives/functions/fnc_handleKilled.sqf index 3eed932d5a..f7b15ec117 100644 --- a/addons/captives/functions/fnc_handleKilled.sqf +++ b/addons/captives/functions/fnc_handleKilled.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -PARAMS_1(_oldUnit); +params ["_oldUnit"]; if (!local _oldUnit) exitWith {}; diff --git a/addons/captives/functions/fnc_handleOnUnconscious.sqf b/addons/captives/functions/fnc_handleOnUnconscious.sqf index 9aa4856204..ca6362d3da 100644 --- a/addons/captives/functions/fnc_handleOnUnconscious.sqf +++ b/addons/captives/functions/fnc_handleOnUnconscious.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_unit,_isUnconc); +params ["_unit","_isUnconc"]; if (!local _unit) exitWith {}; diff --git a/addons/captives/functions/fnc_handlePlayerChanged.sqf b/addons/captives/functions/fnc_handlePlayerChanged.sqf index 21fd1e1ec3..aea91b5e11 100644 --- a/addons/captives/functions/fnc_handlePlayerChanged.sqf +++ b/addons/captives/functions/fnc_handlePlayerChanged.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_newUnit,_oldUnit); +params ["_newUnit","_oldUnit"]; //set showHUD based on new unit status: if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then { diff --git a/addons/captives/functions/fnc_handleRespawn.sqf b/addons/captives/functions/fnc_handleRespawn.sqf index 02888c27a0..6f68aea2fe 100644 --- a/addons/captives/functions/fnc_handleRespawn.sqf +++ b/addons/captives/functions/fnc_handleRespawn.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_dead); +params ["_unit","_dead"]; if (!local _unit) exitWith {}; diff --git a/addons/captives/functions/fnc_handleUnitInitPost.sqf b/addons/captives/functions/fnc_handleUnitInitPost.sqf index a8b601300a..66cbcff794 100644 --- a/addons/captives/functions/fnc_handleUnitInitPost.sqf +++ b/addons/captives/functions/fnc_handleUnitInitPost.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -PARAMS_1(_unit); +params ["_unit"]; // prevent players from throwing grenades (added to all units) [_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler); diff --git a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf index 84b90e78c2..7b30199caf 100644 --- a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf +++ b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_zeusIsOpen); +params ["_unit","_zeusIsOpen"]; //set showHUD based on unit status: if (!_zeusIsOpen) then { diff --git a/addons/captives/functions/fnc_moduleSettings.sqf b/addons/captives/functions/fnc_moduleSettings.sqf index c12ac80b99..fc8c76721f 100644 --- a/addons/captives/functions/fnc_moduleSettings.sqf +++ b/addons/captives/functions/fnc_moduleSettings.sqf @@ -13,7 +13,8 @@ #include "script_component.hpp" -PARAMS_1(_logic); +params ["_logic"]; [_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(requireSurrender), "requireSurrender"] call EFUNC(common,readSettingFromModule); diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index 5b40b7663e..64c80af35c 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -17,9 +17,10 @@ */ #include "script_component.hpp" -PARAMS_3(_logic,_units,_activated); private ["_bisMouseOver", "_mouseOverObject"]; +params ["_logic", "_units", "_activated"]; + if (!_activated) exitWith {}; if (local _logic) then { diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index bd141988bb..9bde3b399d 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -16,8 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_state); - +params ["_unit","_state"]; if (!local _unit) exitwith { ERROR("running setHandcuffed on remote unit"); @@ -43,7 +42,7 @@ if (_state) then { // fix anim on mission start (should work on dedicated servers) [{ - PARAMS_1(_unit); + params ["_unit"]; if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then { [_unit] call EFUNC(common,fixLoweredRifleAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index c1a34b636c..4fad2d3853 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -16,8 +16,7 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_state); - +params ["_unit","_state"]; if (!local _unit) exitwith { ERROR("running surrender on remote unit"); diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf index 626a0b34e4..7e30fe4af4 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf @@ -16,10 +16,10 @@ */ #include "script_component.hpp" -PARAMS_2(_target,_vehicle); - private ["_cargoIndex"]; +params ["_target","_vehicle"]; + _target moveInCargo _vehicle; _target assignAsCargo _vehicle; _cargoIndex = _vehicle getCargoIndex _target; diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf index 5ef6f01406..000d5ef568 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf @@ -15,8 +15,7 @@ */ #include "script_component.hpp" -PARAMS_1(_unit); - +params ["_unit"]; _unit setVariable [QGVAR(CargoIndex), -1, true]; moveOut _unit; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 19ab9050a3..08982b7277 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -163,6 +163,7 @@ Hacer que la unidad se rinda Einheit kapitulieren lassen Vzdávající se jednotka + Fazer unidade se render Sync a unit to make them surrender.<br />Source: ace_captives @@ -170,42 +171,71 @@ 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 + Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives Captives Settings Ustawienia więźniów Ajustes de prisioneros Nastavení zajatce + Gefangenen-Einstellungen + Ajustes de prisioneiros 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 + Einstellungen zur Kapitulation und Kabelbindern + Controla as configurações de rendição e abraçadeiras Can handcuff own side Skuwanie sojuszników Se puede esposar el bando propio Může spoutat spolubojovníky + Kann Teamkollegen fesseln + Pode algemar o próprio lado 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ě + Können Spieler eigene Einheiten fesseln + Os jogadores podem algemar unidades do seu lado Allow surrendering Pozwól kapitulować Permitir rendición Povolit vzdávání + Kapitulation erlauben + Permite rendição 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ň + Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben + Jogadores podem se render depois de guardar sua arma + + + Require surrendering + Wymagaj kapitulacji + + + Require Players to surrender before they can be arrested + Wymagaj od graczy kapitulacji zanim będzie można ich zaaresztować + + + Surrendering only + Tylko kapitulacja + + + Surrendering or No weapon + Kapitulacja lub brak broni \ No newline at end of file diff --git a/addons/cargo/$PBOPREFIX$ b/addons/cargo/$PBOPREFIX$ new file mode 100644 index 0000000000..74e5e4186e --- /dev/null +++ b/addons/cargo/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\cargo \ No newline at end of file diff --git a/addons/cargo/ACE_Settings.hpp b/addons/cargo/ACE_Settings.hpp new file mode 100644 index 0000000000..c8865f2097 --- /dev/null +++ b/addons/cargo/ACE_Settings.hpp @@ -0,0 +1,9 @@ +class ACE_Settings { + class GVAR(enable) { + displayName = CSTRING(ModuleSettings_enable); + description = CSTRING(ModuleSettings_enable_Description); + typeName = "BOOL"; + value = 1; + category = CSTRING(settingsCategory); + }; +}; diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f80fefa3aa --- /dev/null +++ b/addons/cargo/CfgEventHandlers.hpp @@ -0,0 +1,79 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_Killed_EventHandlers { + class All { + init = QUOTE(call FUNC(handleDestroyed)); + }; +}; + +class Extended_Init_EventHandlers { + class StaticWeapon { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; + + class ReammoBox_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; + + class Cargo_base_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + + class CargoNet_01_box_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + + class Land_CargoBox_V1_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + + class Land_PaperBox_closed_F { + class ADDON { + init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); + }; + }; + + class Car { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + + class Tank { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + + class Helicopter { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + + class Plane { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; + + class Ship_F { + class ADDON { + init = QUOTE(_this call DFUNC(initVehicle)); + }; + }; +}; diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp new file mode 100644 index 0000000000..d5572741da --- /dev/null +++ b/addons/cargo/CfgVehicles.hpp @@ -0,0 +1,294 @@ +class CfgVehicles { + class ACE_Module; + class ACE_moduleCargoSettings: ACE_Module { + scope = 2; + displayName = CSTRING(SettingsModule_DisplayName); + icon = QUOTE(PATHTOF(UI\Icon_Module_Cargo_ca.paa)); + category = "ACE"; + function = QFUNC(moduleSettings); + functionPriority = 1; + isGlobal = 1; + isTriggerActivated = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class enable { + displayName = CSTRING(ModuleSettings_enable); + description = CSTRING(ModuleSettings_enable_Description); + typeName = "BOOL"; + defaultValue = 1; + }; + }; + class ModuleDescription { + description = CSTRING(SettingsModule_Description); + sync[] = {}; + }; + }; + + + class LandVehicle; + class Car: LandVehicle { + GVAR(space) = 4; + GVAR(hasCargo) = 1; + class ACE_Cargo { + /* + class Cargo { + class ACE_medicalSupplyCrate { + type = "ACE_medicalSupplyCrate"; + amount = 1; + }; + };*/ + }; + }; + class Tank: LandVehicle { + GVAR(space) = 4; + GVAR(hasCargo) = 1; + }; + + class Car_F; + class Truck_F: Car_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + + class Air; + class Helicopter: Air { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + class Heli_Transport_02_base_F; + class I_Heli_Transport_02_F : Heli_Transport_02_base_F { + GVAR(space) = 20; + GVAR(hasCargo) = 1; + }; + class Plane: Air { + GVAR(space) = 4; + GVAR(hasCargo) = 1; + }; + + class Ship; + class Ship_F: Ship { + GVAR(space) = 4; + GVAR(hasCargo) = 1; + }; + + // Static weapons + class StaticWeapon: LandVehicle { + GVAR(size) = 2; // 1 = small, 2 = large + GVAR(canLoad) = 1; + }; + + class StaticMortar; + class Mortar_01_base_F: StaticMortar { + GVAR(size) = 2; // 1 = small, 2 = large + GVAR(canLoad) = 1; + }; + + // Ammo boxes + class ThingX; + class ReammoBox_F: ThingX { + GVAR(size) = 2; // 1 = small, 2 = large + GVAR(canLoad) = 1; + }; + + class Scrapyard_base_F; + class Land_PaperBox_closed_F: Scrapyard_base_F { + GVAR(space) = 10; + GVAR(hasCargo) = 1; + GVAR(size) = 11; + GVAR(canLoad) = 1; + XEH_ENABLED; + class ACE_Actions { + class ACE_MainActions { + displayName = ECSTRING(interaction,MainAction); + distance = 5; + condition = QUOTE(true); + statement = ""; + icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa"; + selection = ""; + }; + }; + }; + + class Cargo_base_F: ThingX { + GVAR(space) = 4; + GVAR(hasCargo) = 1; + GVAR(size) = 4; + GVAR(canLoad) = 1; + class ACE_Actions { + class ACE_MainActions { + displayName = ECSTRING(interaction,MainAction); + distance = 5; + condition = QUOTE(true); + statement = ""; + icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa"; + selection = ""; + }; + }; + }; + class Cargo10_base_F: Cargo_base_F { + GVAR(space) = 14; + GVAR(size) = 15; + XEH_ENABLED; + }; + class Land_Cargo20_blue_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_brick_red_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_cyan_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_grey_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_light_blue_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_light_green_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_military_green_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Ruins_F; + class Land_Cargo20_military_ruins_F: Ruins_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_orange_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_red_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_sand_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_vr_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_white_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + class Land_Cargo20_yellow_F: Cargo_base_F { + GVAR(space) = 49; + GVAR(size) = 50; + XEH_ENABLED; + }; + + + class Land_Cargo40_blue_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_brick_red_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_cyan_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_grey_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_light_blue_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_light_green_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_military_green_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_military_ruins_F: Ruins_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_orange_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_red_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_sand_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_vr_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_white_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + class Land_Cargo40_yellow_F: Cargo_base_F { + GVAR(space) = 99; + GVAR(size) = 100; + XEH_ENABLED; + }; + // small + class Land_CargoBox_V1_F: ThingX { + GVAR(space) = 7; + GVAR(hasCargo) = 1; + GVAR(size) = 7; + XEH_ENABLED; + class ACE_Actions { + class ACE_MainActions { + displayName = ECSTRING(interaction,MainAction); + distance = 5; + condition = QUOTE(true); + statement = ""; + icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa"; + selection = ""; + }; + }; + }; + +}; diff --git a/addons/cargo/UI/Icon_Module_Cargo_ca.paa b/addons/cargo/UI/Icon_Module_Cargo_ca.paa new file mode 100644 index 0000000000..a292fb4227 Binary files /dev/null and b/addons/cargo/UI/Icon_Module_Cargo_ca.paa differ diff --git a/addons/cargo/UI/Icon_load.paa b/addons/cargo/UI/Icon_load.paa new file mode 100644 index 0000000000..ccd77761e4 Binary files /dev/null and b/addons/cargo/UI/Icon_load.paa differ diff --git a/addons/cargo/XEH_preInit.sqf b/addons/cargo/XEH_preInit.sqf new file mode 100644 index 0000000000..9cc90501c1 --- /dev/null +++ b/addons/cargo/XEH_preInit.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(canLoad); +PREP(canLoadItemIn); +PREP(canUnloadItem); +PREP(findNearestVehicle); +PREP(getCargoSpaceLeft); +PREP(getSizeItem); +PREP(handleDestroyed); +PREP(initObject); +PREP(initVehicle); +PREP(loadItem); +PREP(moduleSettings); +PREP(onMenuOpen); +PREP(startLoadIn); +PREP(startUnload); +PREP(unloadItem); +PREP(validateCargoSpace); + +GVAR(initializedItemClasses) = []; + +if (isServer) then { + ["cargo_hideItem", {params ["_object", "_status"]; _object hideObjectGlobal _status;}] call EFUNC(common,addEventHandler); +}; + +ADDON = true; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp new file mode 100644 index 0000000000..1aefa49616 --- /dev/null +++ b/addons/cargo/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"commy2", "Glowbal"}; + authorUrl = "https://ace3mod.com/"; + VERSION_CONFIG; + }; +}; + +#include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "menu.hpp" diff --git a/addons/cargo/functions/fnc_canLoad.sqf b/addons/cargo/functions/fnc_canLoad.sqf new file mode 100644 index 0000000000..da41d93358 --- /dev/null +++ b/addons/cargo/functions/fnc_canLoad.sqf @@ -0,0 +1,32 @@ +/* + * Author: Glowbal + * Check if player can load an item into the nearest vehicle. + * + * Arguments: + * 0: Player + * 1: Object to load + * + * Return value: + * Can load + * + * Example: + * [player, object] call ace_cargo_fnc_canLoad + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player", "_object"]; + +private ["_nearestVehicle"]; +_nearestVehicle = [_player] call FUNC(findNearestVehicle); + +if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then { + { + if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x}; + } forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); +}; + +if (isNull _nearestVehicle) exitWith {false}; + +[_object, _nearestVehicle] call FUNC(canLoadItemIn) diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf new file mode 100644 index 0000000000..8cfe9e194b --- /dev/null +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -0,0 +1,29 @@ +/* + * Author: Glowbal + * Check if item can be loaded into other Object. + * + * Arguments: + * 0: Item Object + * 1: Holder Object (Vehicle) + * + * Return value: + * Can load in + * + * Example: + * [item, holder] call ace_cargo_fnc_canLoadItemIn + * + * Public: No + */ +#include "script_component.hpp" + +params ["_item", "_vehicle"]; + +if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false}; + +private "_itemSize"; +_itemSize = ([_item] call FUNC(getSizeItem)); + +(_itemSize > 0) && +{alive _item && alive _vehicle} && +{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} && +{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))} diff --git a/addons/cargo/functions/fnc_canUnloadItem.sqf b/addons/cargo/functions/fnc_canUnloadItem.sqf new file mode 100644 index 0000000000..779a7533a9 --- /dev/null +++ b/addons/cargo/functions/fnc_canUnloadItem.sqf @@ -0,0 +1,44 @@ +/* + * Author: Glowbal, ViperMaul + * Check if item can be unloaded. + * + * Arguments: + * 0: loaded Object + * 1: Object + * + * Return value: + * Can be unloaded + * + * Example: + * [item, holder] call ace_cargo_fnc_canUnloadItem + * + * Public: No + */ +#include "script_component.hpp" + +private ["_loaded", "_validVehiclestate", "_emptyPos"]; + +params ["_item", "_vehicle"]; + +_loaded = _vehicle getVariable [QGVAR(loaded), []]; +if !(_item in _loaded) exitWith {false}; + +_validVehiclestate = true; +_emptyPos = []; +if (_vehicle isKindOf "Ship" ) then { + if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot. +} else { + if (_vehicle isKindOf "Air" ) then { + if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false}; + _emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition); + _emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ]; + } else { + if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); + }; +}; + +if (!_validVehiclestate) exitWith {false}; + +(count _emptyPos != 0) diff --git a/addons/cargo/functions/fnc_findNearestVehicle.sqf b/addons/cargo/functions/fnc_findNearestVehicle.sqf new file mode 100644 index 0000000000..c0ec154d47 --- /dev/null +++ b/addons/cargo/functions/fnc_findNearestVehicle.sqf @@ -0,0 +1,37 @@ +/* + * Author: Glowbal + * Get nearest vehicle from unit, priority: Car-Air-Tank-Ship. + * + * Arguments: + * 0: Unit + * + * Return value: + * Vehicle in Distance + * + * Example: + * [unit] call ace_cargo_fnc_findNearestVehicle + * + * Public: No + */ +#include "script_component.hpp" + +private ["_loadCar", "_loadHelicopter", "_loadTank", "_loadShip", "_loadContainer"]; + +params ["_unit"]; + +_loadCar = nearestObject [_unit, "car"]; +if (_unit distance _loadCar <= MAX_LOAD_DISTANCE) exitWith {_loadCar}; + +_loadHelicopter = nearestObject [_unit, "air"]; +if (_unit distance _loadHelicopter <= MAX_LOAD_DISTANCE) exitWith {_loadHelicopter}; + +_loadTank = nearestObject [_unit, "tank"]; +if (_unit distance _loadTank <= MAX_LOAD_DISTANCE) exitWith {_loadTank}; + +_loadShip = nearestObject [_unit, "ship"]; +if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip}; + +_loadContainer = nearestObject [_unit,"Cargo_base_F"]; +if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer}; + +objNull diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf new file mode 100644 index 0000000000..cae27a2d58 --- /dev/null +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -0,0 +1,20 @@ +/* + * Author: Glowbal + * Get the cargo space left on object. + * + * Arguments: + * 0: Object + * + * Return value: + * Cargo space left + * + * Example: + * [object] call ace_cargo_fnc_getCargoSpaceLeft + * + * Public: No + */ +#include "script_component.hpp" + +params ["_object"]; + +_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))] diff --git a/addons/cargo/functions/fnc_getSizeItem.sqf b/addons/cargo/functions/fnc_getSizeItem.sqf new file mode 100644 index 0000000000..a3556c8a25 --- /dev/null +++ b/addons/cargo/functions/fnc_getSizeItem.sqf @@ -0,0 +1,28 @@ +/* + * Author: Glowbal + * Get the cargo size of an object. + * + * Arguments: + * 0: Object + * + * Return value: + * Cargo size (default: -1) + * + * Example: + * [object] call ace_cargo_fnc_getSizeItem + * + * Public: No + */ +#include "script_component.hpp" + +private "_config"; + +params ["_item"]; + +_config = (configFile >> "CfgVehicles" >> typeof _item >> QGVAR(size)); + +if (isNumber (_config)) exitWith { + _item getVariable [QGVAR(size), getNumber (_config)] +}; + +-1 diff --git a/addons/cargo/functions/fnc_handleDestroyed.sqf b/addons/cargo/functions/fnc_handleDestroyed.sqf new file mode 100644 index 0000000000..c11dd3bfad --- /dev/null +++ b/addons/cargo/functions/fnc_handleDestroyed.sqf @@ -0,0 +1,31 @@ +/* + * Author: Glowbal + * Handle object being destroyed. + * + * Arguments: + * 0: Object + * + * Return value: + * None + * + * Example: + * [object] call ace_cargo_fnc_handleDestroyed + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle"]; + +private["_loaded"]; + +_loaded = _vehicle getVariable [QGVAR(loaded), []]; +if (count _loaded == 0) exitWith {}; + +{ + // TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment? + deleteVehicle _x; + //_x setDamage 1; +} count _loaded; + +[_vehicle] call FUNC(validateCargoSpace); diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf new file mode 100644 index 0000000000..f9b48b19e1 --- /dev/null +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -0,0 +1,30 @@ +/* + * Author: Glowbal + * Initializes variables for loadable objects. Called from init EH. + * + * Arguments: + * 0: Object + * + * Return value: + * None + * + * Example: + * [object] call ace_cargo_fnc_initObject + * + * Public: No + */ +#include "script_component.hpp" + +params ["_object"]; + +if (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(canLoad)) != 1) exitWith {}; + +private ["_type", "_action"]; +_type = typeOf _object; + +// do nothing if the class is already initialized +if (_type in GVAR(initializedItemClasses)) exitWith {}; +GVAR(initializedItemClasses) pushBack _type; + +_action = [QGVAR(load), localize LSTRING(loadObject), QUOTE(PATHTOF(UI\Icon_load.paa)), {[_player, _target] call FUNC(startLoadIn)}, {GVAR(enable) && {[_player, _target] call FUNC(canLoad)}}] call EFUNC(interact_menu,createAction); +[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf new file mode 100644 index 0000000000..8449a316b2 --- /dev/null +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -0,0 +1,60 @@ +/* + * Author: Glowbal + * Initializes vehicle, adds open caro menu action if available. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Example: + * [vehicle] call ace_cargo_fnc_initVehicle + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle"]; +TRACE_1("params", _vehicle); + +private ["_type", "_initializedClasses"]; +_type = typeOf _vehicle; +_initializedClasses = GETMVAR(GVAR(initializedClasses),[]); + +if (isServer) then { + { + if (isClass _x) then { + private ["_className", "_amount","_position","_object"]; + _className = getText (_x >> "type"); + _amount = getNumber (_x >> "amount"); + _position = getPos _vehicle; + _position set [1, (_position select 1) + 1]; + _position set [2, (_position select 2) + 7.5]; + for "_i" from 1 to _amount do { + _object = createVehicle [_className, _position, [], 0, "CAN_COLLIDE"]; + if !([_object, _vehicle] call FUNC(loadItem)) exitWith { + deleteVehicle _object; + }; + }; + }; + nil + } count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo")); +}; + +// do nothing if the class is already initialized +if (_type in _initializedClasses) exitWith {}; +// set class as initialized +_initializedClasses pushBack _type; +SETMVAR(GVAR(initializedClasses),_initializedClasses); + +if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {}; + +private ["_text", "_condition", "_statement", "_icon", "_action"]; +_condition = {GVAR(enable)}; +_text = localize LSTRING(openMenu); +_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);}; +_icon = ""; + +_action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); +[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf new file mode 100644 index 0000000000..f8816f3b8f --- /dev/null +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -0,0 +1,37 @@ +/* + * Author: Glowbal + * Load object into vehicle. + * + * Arguments: + * 0: Object + * 1: Vehicle + * + * Return value: + * Object loaded + * + * Example: + * [object, vehicle] call ace_cargo_fnc_loadItem + * + * Public: No + */ +#include "script_component.hpp" + +private ["_loaded", "_space", "_itemSize"]; + +params ["_item", "_vehicle"]; + +if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false}; + +_loaded = _vehicle getVariable [QGVAR(loaded), []]; +_loaded pushback _item; +_vehicle setVariable [QGVAR(loaded), _loaded, true]; + +_space = [_vehicle] call FUNC(getCargoSpaceLeft); +_itemSize = [_item] call FUNC(getSizeItem); +_vehicle setVariable [QGVAR(space), _space - _itemSize, true]; + +detach _item; +_item attachTo [_vehicle,[0,0,100]]; +["cargo_hideItem", [_item, true]] call EFUNC(common,serverEvent); + +true diff --git a/addons/cargo/functions/fnc_moduleSettings.sqf b/addons/cargo/functions/fnc_moduleSettings.sqf new file mode 100644 index 0000000000..35e6aede7a --- /dev/null +++ b/addons/cargo/functions/fnc_moduleSettings.sqf @@ -0,0 +1,28 @@ +/* + * Author: Glowbal + * Module for adjusting the cargo settings + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * function = "ace_cargo_fnc_loadItem" + * + * Public: No + */ +#include "script_component.hpp" + +if (!isServer) exitWith {}; + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule); + +diag_log text "[ACE]: Cargo Module Initialized."; diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf new file mode 100644 index 0000000000..031bea01cc --- /dev/null +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -0,0 +1,48 @@ +/* + * Author: Glowbal + * Handle the UI data display. + * + * Arguments: + * 0: Display + * + * Return value: + * None + * + * Example: + * [display] call ace_cargo_fnc_onMenuOpen + * + * Public: No + */ +#include "script_component.hpp" + +disableSerialization; + +params ["_display"]; + +uiNamespace setVariable [QGVAR(menuDisplay), _display]; + +[{ + private ["_display","_loaded", "_ctrl", "_label"]; + disableSerialization; + _display = uiNamespace getVariable QGVAR(menuDisplay); + if (isnil "_display") exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + if (isNull GVAR(interactionVehicle) || ACE_player distance GVAR(interactionVehicle) >= 10) exitWith { + closeDialog 0; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []]; + _ctrl = _display displayCtrl 100; + _label = _display displayCtrl 2; + + lbClear _ctrl; + { + _ctrl lbAdd (getText(configfile >> "CfgVehicles" >> typeOf _x >> "displayName")); + true + } count _loaded; + + _label ctrlSetText format[localize LSTRING(labelSpace), [GVAR(interactionVehicle)] call DFUNC(getCargoSpaceLeft)]; +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf new file mode 100644 index 0000000000..b4ba50fbb6 --- /dev/null +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -0,0 +1,31 @@ +/* + * Author: Glowbal + * Start load item. + * + * Arguments: + * 0: Object + * + * Return value: + * Object loaded + * + * Example: + * [object] call ace_cargo_fnc_starLoadIn + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player", "_object"]; + +private ["_nearestVehicle"]; +_nearestVehicle = [_player] call FUNC(findNearestVehicle); + +if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then { + { + if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x}; + } foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]); +}; + +if (isNull _nearestVehicle) exitWith {false}; + +[_object, _nearestVehicle] call FUNC(loadItem) diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf new file mode 100644 index 0000000000..28ae034167 --- /dev/null +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -0,0 +1,35 @@ +/* + * Author: Glowbal + * Start unload action. + * + * Arguments: + * None + * + * Return value: + * None + * + * Example: + * [] call ace_cargo_fnc_startUnload + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_loaded", "_ctrl", "_selected", "_item"]; + +disableSerialization; + +_display = uiNamespace getVariable QGVAR(menuDisplay); +if (isnil "_display") exitWith {}; + +_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []]; +if (count _loaded == 0) exitWith {}; + +_ctrl = _display displayCtrl 100; + +_selected = (lbCurSel _ctrl) max 0; + +if (count _loaded <= _selected) exitWith {}; +_item = _loaded select _selected; + +[_item, GVAR(interactionVehicle)] call FUNC(unloadItem); diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf new file mode 100644 index 0000000000..f6d70591df --- /dev/null +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -0,0 +1,65 @@ +/* + * Author: Glowbal, ViperMaul + * Unload object from vehicle. + * + * Arguments: + * 0: Object + * 1: Vehicle + * + * Return value: + * Object unloaded + * + * Example: + * [object, vehicle] call ace_cargo_fnc_unloadItem + * + * Public: No + */ +#include "script_component.hpp" + +private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"]; + +params ["_item", "_vehicle"]; + +if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith { + false +}; + +_validVehiclestate = true; +_emptyPos = []; +if (_vehicle isKindOf "Ship" ) then { + if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; + TRACE_1("SHIP Ground Check", getPosATL _vehicle ); + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot. +} else { + if (_vehicle isKindOf "Air" ) then { + if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false}; + TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); + _emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition); + _emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ]; + } else { + if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; + TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeOf _item]); + }; +}; + +TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); +if (!_validVehiclestate) exitWith {false}; + +if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle + +_loaded = _vehicle getVariable [QGVAR(loaded), []]; +_loaded = _loaded - [_item]; +_vehicle setVariable [QGVAR(loaded), _loaded, true]; + +_space = [_vehicle] call FUNC(getCargoSpaceLeft); +_itemSize = [_item] call FUNC(getSizeItem); +_vehicle setVariable [QGVAR(space), (_space + _itemSize), true]; + +detach _item; +_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL)); +["cargo_hideItem", [_item, false]] call EFUNC(common,serverEvent); + +// TOOO maybe drag/carry the unloaded item? + +true diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf new file mode 100644 index 0000000000..6caf664ca5 --- /dev/null +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -0,0 +1,38 @@ +/* + * Author: Glowbal + * Validate the vehicle cargo space. + * + * Arguments: + * 0: Object + * + * Return value: + * None + * + * Example: + * [object] call ace_cargo_fnc_validateCargoSpace + * + * Public: No + */ +#include "script_component.hpp" + +private ["_loaded", "_newLoaded", "_totalSpaceOccupied"]; + +params ["_vehicle"]; + +_loaded = _vehicle getVariable [QGVAR(loaded), []]; + +_newLoaded = []; +_totalSpaceOccupied = 0; +{ + if !(isNull _x) then { + _newLoaded pushback _x; + _totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem)); + }; + true +} count _loaded; + +if (count _loaded != count _newLoaded) then { + _vehicle setVariable [QGVAR(loaded), _newLoaded, true]; +}; + +_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; diff --git a/addons/cargo/functions/script_component.hpp b/addons/cargo/functions/script_component.hpp new file mode 100644 index 0000000000..cc6204b83b --- /dev/null +++ b/addons/cargo/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\cargo\script_component.hpp" diff --git a/addons/cargo/menu.hpp b/addons/cargo/menu.hpp new file mode 100644 index 0000000000..bde617b311 --- /dev/null +++ b/addons/cargo/menu.hpp @@ -0,0 +1,103 @@ +#include "\z\ace\addons\common\define.hpp" + +class GVAR(menu) { + idd = 314614; + movingEnable = true; + onLoad = QUOTE([_this select 0] call FUNC(onMenuOpen)); + onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];); + class controlsBackground { + class HeaderBackground: ACE_gui_backgroundBase{ + idc = -1; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(0,0,0,0)"; + }; + class CenterBackground: HeaderBackground { + y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + h = "14 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(0,0,0,0.8)"; + colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + }; + }; + + class controls { + class HeaderName { + idc = 1; + type = CT_STATIC; + x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_LEFT + ST_SHADOW; + font = "PuristaMedium"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.95, 0.95, 0.95, 0.75}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + text = CSTRING(cargoMenu); + }; + class SubHeader: HeaderName { + idc = 2; + x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_CENTER; + colorText[] = {1, 1, 1.0, 0.9}; + colorBackground[] = {0,0,0,0}; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + text = ""; + }; + class cargoList: ACE_gui_listBoxBase { + idc = 100; + x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + rowHeight = 0.03; + colorBackground[] = {0, 0, 0, 0.2}; + colorText[] = {1, 1, 1, 1.0}; + colorScrollbar[] = {0.95, 0.95, 0.95, 1}; + colorSelect[] = {1, 1, 1, 1.0}; + colorSelect2[] = {1, 1, 1, 1.0}; + colorSelectBackground[] = {0.3, 0.3, 0.3, 1.0}; + colorSelectBackground2[] = {0.3, 0.3, 0.3, 1.0}; + }; + class btnUnload: ACE_gui_buttonBase { + text = "Cancel"; + idc = 11; + x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "14.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; + animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; + color[] = {1, 1, 1, 1}; + color2[] = {0,0,0, 1}; + colorBackgroundFocused[] = {1,1,1,1}; + colorBackground[] = {1,1,1,1}; + colorbackground2[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,1}; + colorFocused[] = {0,0,0,1}; + periodFocus = 1; + periodOver = 1; + action = QUOTE(closeDialog 0); + }; + class btnCancel: btnUnload { + text = CSTRING(unloadObject); + idc = 12; + x = "20.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE([] call FUNC(startUnload);); + }; + }; +}; diff --git a/addons/cargo/script_component.hpp b/addons/cargo/script_component.hpp new file mode 100644 index 0000000000..9716d7a536 --- /dev/null +++ b/addons/cargo/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT cargo +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_CARGO + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_CARGO + #define DEBUG_SETTINGS DEBUG_ENABLED_CARGO +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define MAX_LOAD_DISTANCE 10 diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml new file mode 100644 index 0000000000..57ee916156 --- /dev/null +++ b/addons/cargo/stringtable.xml @@ -0,0 +1,35 @@ + + + + + Load + + + Unload + + + Cargo + + + Cargo Menu + + + Cargo space left: %1 + + + Cargo + + + Enable Cargo + + + Enable the load in cargo module + + + Cargo Settings + + + Configure the cargo module settings + + + diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index 767822f4ea..69d6f99924 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -113,10 +113,31 @@ class CfgVehicles { author = CSTRING(ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_banana { - name = "ACE_banana"; - count = 1; - }; + MACRO_ADDITEM(ACE_banana,1); }; }; + + class Land_HelipadEmpty_F; + class ACE_LogicDummy: Land_HelipadEmpty_F { + scope = 1; + SLX_XEH_DISABLED = 1; + author = CSTRING(ACETeam); + class EventHandlers { + init = "(_this select 0) enableSimulation false"; + }; + }; + + class Bicycle; + class ACE_Headbug_Fix: Bicycle { + scope = 1; + side = 3; + model = PATHTOF(data\ACE_HeadBanger.p3d); + //model = QPATHTO_M(ACE_HeadBanger.p3d); + author = CSTRING(ACETeam); + displayName = " "; + soundEngine[] = {"", 20, 0.875}; + soundEnviron[] = {"", 25, 0.925}; + isBicycle = 1; + XEH_DISABLED; + }; }; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 159ef1883a..43b5478eff 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -6,7 +6,7 @@ //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; @@ -37,6 +37,21 @@ }; }] call FUNC(addEventhandler); + +["HeadbugFixUsed", { + PARAMS_2(_profileName,_animation); + diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation]; +}] call FUNC(addEventHandler); + + +//~~~~~Get Map Data~~~~~ +//Find MGRS zone and 100km grid for current map +[] call FUNC(getMGRSdata); +//Prepare variables for FUNC(getMapGridFromPos)/FUNC(getMapPosFromGrid) +[] call FUNC(getMapGridData); + + + ["fixCollision", DFUNC(fixCollision)] call FUNC(addEventhandler); ["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler); ["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler); @@ -56,15 +71,9 @@ ["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler); ["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler); -// hack to get PFH to work in briefing -[QGVAR(onBriefingPFH), "onEachFrame", { - if (ACE_time > 0) exitWith { - [QGVAR(onBriefingPFH), "onEachFrame"] call BIS_fnc_removeStackedEventHandler; - }; - - call cba_common_fnc_onFrame; -}] call BIS_fnc_addStackedEventHandler; -///// +if (isServer) then { + ["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler); +}; QGVAR(remoteFnc) addPublicVariableEventHandler { (_this select 1) call FUNC(execRemoteFnc); @@ -99,8 +108,9 @@ if(!isServer) then { }; ["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler); ["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler); -[FUNC(syncedEventPFH), 0.5, []] call cba_fnc_addPerFrameHandler; - +if (isServer) then { + [FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler; +}; call FUNC(checkFiles); @@ -137,7 +147,7 @@ call FUNC(checkFiles); //Event that settings are safe to use: ["SettingsInitialized", []] call FUNC(localEvent); -}, 0, [false]] call cba_fnc_addPerFrameHandler; +}, 0, [false]] call CBA_fnc_addPerFrameHandler; ["SettingsInitialized", { @@ -261,7 +271,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player; ["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent); }; -}, 0, []] call cba_fnc_addPerFrameHandler; +}, 0, []] call CBA_fnc_addPerFrameHandler; // PFH to raise camera created event. Only works on these cams by BI. @@ -286,7 +296,7 @@ GVAR(OldIsCamera) = false; ["activeCameraChanged", [ACE_player, _isCamera]] call FUNC(localEvent); }; -}, 1, []] call cba_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it. +}, 1, []] call CBA_fnc_addPerFrameHandler; // feel free to decrease the sleep ACE_time if you need it. [QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable); @@ -314,13 +324,21 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then { ["PlayerJip", [player] ] call FUNC(localEvent); [(_this select 1)] call cba_fnc_removePerFrameHandler; }; - }, 0, []] call cba_fnc_addPerFrameHandler; + }, 0, []] call CBA_fnc_addPerFrameHandler; }; //Device Handler: GVAR(deviceKeyHandlingArray) = []; GVAR(deviceKeyCurrentIndex) = -1; +// Register localizations for the Keybinding categories +["ACE3 Equipment", localize LSTRING(ACEKeybindCategoryEquipment)] call cba_fnc_registerKeybindModPrettyName; +["ACE3 Common", localize LSTRING(ACEKeybindCategoryCommon)] call cba_fnc_registerKeybindModPrettyName; +["ACE3 Weapons", localize LSTRING(ACEKeybindCategoryWeapons)] call cba_fnc_registerKeybindModPrettyName; +["ACE3 Movement", localize LSTRING(ACEKeybindCategoryMovement)] call cba_fnc_registerKeybindModPrettyName; +["ACE3 Scope Adjustment", localize LSTRING(ACEKeybindCategoryScopeAdjustment)] call cba_fnc_registerKeybindModPrettyName; +["ACE3 Vehicles", localize LSTRING(ACEKeybindCategoryVehicles)] call cba_fnc_registerKeybindModPrettyName; + ["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"), { [] call FUNC(deviceKeyFindValidIndex); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 72e85e4b6b..6fdf99113c 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -11,6 +11,7 @@ PREP(addCanInteractWithCondition); PREP(addLineToDebugDraw); PREP(addSetting); PREP(addToInventory); +PREP(assignObjectsInList); PREP(ambientBrightness); PREP(applyForceWalkStatus); PREP(ASLToPosition); @@ -69,7 +70,11 @@ PREP(getFirstTerrainIntersection); PREP(getForceWalkStatus); PREP(getGunner); PREP(getInPosition); +PREP(getMapGridData); +PREP(getMapGridFromPos); +PREP(getMapPosFromGrid); PREP(getMarkerType); +PREP(getMGRSdata); PREP(getName); PREP(getNumberFromMissionSQM); PREP(getNumberMagazinesIn); @@ -102,6 +107,8 @@ PREP(goKneeling); PREP(hadamardProduct); PREP(hasItem); PREP(hasMagazine); +PREP(headBugFix); +PREP(hideUnit); PREP(inheritsFrom); PREP(insertionSort); PREP(interpolateFromArray); @@ -179,6 +186,7 @@ PREP(toBin); PREP(toBitmask); PREP(toHex); PREP(toNumber); +PREP(unhideUnit); PREP(uniqueElementsOnly); PREP(unloadPerson); PREP(unloadPersonLocal); @@ -320,7 +328,7 @@ if (hasInterface) then { // Raise ACE event ["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent); }; - }, 0, []] call cba_fnc_addPerFrameHandler; + }, 0, []] call CBA_fnc_addPerFrameHandler; }; // Time handling @@ -333,7 +341,7 @@ ACE_pausedTime = 0; ACE_virtualPausedTime = 0; PREP(timePFH); -[FUNC(timePFH), 0, []] call cba_fnc_addPerFrameHandler; +[FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler; // Init toHex [0] call FUNC(toHex); diff --git a/addons/common/data/ace_headbanger.p3d b/addons/common/data/ace_headbanger.p3d new file mode 100644 index 0000000000..4add05893c Binary files /dev/null and b/addons/common/data/ace_headbanger.p3d differ diff --git a/addons/common/functions/fnc_assignObjectsInList.sqf b/addons/common/functions/fnc_assignObjectsInList.sqf new file mode 100644 index 0000000000..0d10066d01 --- /dev/null +++ b/addons/common/functions/fnc_assignObjectsInList.sqf @@ -0,0 +1,50 @@ +/* + * Author: Glowbal + * Loops through a string and filters out object names/variables to assign a value for given variable. + * Used by moduleAssign* within various parts of the ACE3 project. + * + * Arguments: + * 0: list + * 1: variableName + * 2: value + * 3: Global + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_splittedList", "_nilCheckPassedList"]; +params ["_list", "_variable", "_setting", "_global"]; + +if (typeName _list == "STRING") then { + _splittedList = [_list, ","] call BIS_fnc_splitString; + _nilCheckPassedList = ""; + { + _x = [_x] call FUNC(stringRemoveWhiteSpace); + if !(isnil _x) then { + if (_nilCheckPassedList == "") then { + _nilCheckPassedList = _x; + } else { + _nilCheckPassedList = _nilCheckPassedList + ","+ _x; + }; + }; + }foreach _splittedList; + + _list = [] call compile format["[%1]",_nilCheckPassedList]; +}; + +{ + if (!isnil "_x") then { + if (typeName _x == typeName objNull) then { + if (local _x) then { + _x setvariable [_variable, _setting, _global]; + }; + }; + }; +}foreach _list; + +true diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 631329ecee..647a1b00a6 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -56,20 +56,23 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter); } forEach getArray (configFile >> "ACE_Extensions" >> "extensions"); /////////////// -// check server version +// check server version/addons /////////////// if (isMultiplayer) then { if (isServer) then { // send servers version of ACE to all clients GVAR(ServerVersion) = _version; + GVAR(ServerAddons) = _addons; publicVariable QGVAR(ServerVersion); + publicVariable QGVAR(ServerAddons); } else { - // clients have to wait for the variable + // clients have to wait for the variables [{ - if (isNil QGVAR(ServerVersion)) exitWith {}; + if (isNil QGVAR(ServerVersion) || isNil QGVAR(ServerAddons)) exitWith {}; - private "_version"; - _version = _this select 0; + private ["_version","_addons"]; + _version = (_this select 0) select 0; + _addons = (_this select 0) select 1; if (_version != GVAR(ServerVersion)) then { private "_errorMsg"; @@ -82,7 +85,18 @@ if (isMultiplayer) then { }; }; + _addons = _addons - GVAR(ServerAddons); + if !(_addons isEqualTo []) then { + _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons]; + + diag_log text format ["[ACE] ERROR: %1", _errorMsg]; + + if (hasInterface) then {diag_log str "1"; + ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); + }; + }; + [_this select 1] call CBA_fnc_removePerFrameHandler; - }, 1, _version] call CBA_fnc_addPerFrameHandler; + }, 1, [_version,_addons]] call CBA_fnc_addPerFrameHandler; }; }; diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index 4733f1a81f..5665ee632c 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -8,8 +8,8 @@ * 0: Warn once * 1: Warn permanently * 2: Kick - * 1: Check all PBOs? (Optional - default: "[]") - * 2: Whitelist (Optinal - default: false) + * 1: Check all PBOs? (Optional - default: false) + * 2: Whitelist (Optinal - default: "[]") * * Return value: * None @@ -27,6 +27,8 @@ _whitelist = [_whitelist, {toLower _this}] call FUNC(map); ACE_Version_CheckAll = _checkAll; ACE_Version_Whitelist = _whitelist; +if (!_checkAll) exitWith {}; //ACE is checked by FUNC(checkFiles) + if (!isServer) then { [_mode, _checkAll, _whitelist] spawn { private ["_missingAddon", "_missingAddonServer", "_oldVersionClient", "_oldVersionServer", "_text", "_error", "_rscLayer", "_ctrlHint"]; diff --git a/addons/common/functions/fnc_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf index 532850d7bb..0c3d6c8e78 100644 --- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf +++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf @@ -7,9 +7,10 @@ diag_log text format["REGISTERED ACE PFH HANDLERS"]; diag_log text format["-------------------------------------------"]; if (!isNil "ACE_PFH_COUNTER") then { { - private["_pfh"]; - _pfh = _x select 0; - diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ]; + private ["_isActive"]; + _x params ["_pfh", "_parameters"]; + _isActive = if (!isNil {cba_common_PFHhandles select (_pfh select 0)}) then {"ACTIVE"} else {"REMOVED"}; + diag_log text format["Registered PFH: id=%1 [%2, delay %3], %4:%5", (_pfh select 0), (_isActive), (_parameters select 1), (_pfh select 1), (_pfh select 2) ]; } forEach ACE_PFH_COUNTER; }; diff --git a/addons/common/functions/fnc_getAllGear.sqf b/addons/common/functions/fnc_getAllGear.sqf index aa2289309e..33c23c98a3 100644 --- a/addons/common/functions/fnc_getAllGear.sqf +++ b/addons/common/functions/fnc_getAllGear.sqf @@ -18,6 +18,7 @@ * 14-16: pistol (String, Array, Array) * 17: map, compass, watch, etc. (Array) * 18: binocluar (String) + * 19: active weapon, active muzzle, active weaponMode (Array) * */ #include "script_component.hpp" @@ -34,7 +35,8 @@ if (isNull _unit) exitWith {[ "", ["","","",""], [], "", ["","","",""], [], [], - "" + "", + ["","",""] ]}; [ @@ -47,5 +49,6 @@ if (isNull _unit) exitWith {[ secondaryWeapon _unit, secondaryWeaponItems _unit, secondaryWeaponMagazine _unit, handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit, assignedItems _unit, - binocular _unit + binocular _unit, + [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit] ] diff --git a/addons/common/functions/fnc_getHitPointsWithSelections.sqf b/addons/common/functions/fnc_getHitPointsWithSelections.sqf index 2bf568ec8a..b66700881e 100644 --- a/addons/common/functions/fnc_getHitPointsWithSelections.sqf +++ b/addons/common/functions/fnc_getHitPointsWithSelections.sqf @@ -41,14 +41,15 @@ _hitpointClasses = [_config >> "HitPoints"]; while {isClass _class} do { for "_i" from 0 to (count _class - 1) do { - private ["_entry", "_selection"]; + if (isClass (_class select _i)) then { + private ["_entry", "_selection"]; + _entry = configName (_class select _i); + _selection = getText (_class select _i >> "name"); - _entry = configName (_class select _i); - _selection = getText (_class select _i >> "name"); - - if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then { - _hitpoints pushBack _entry; - _selections pushBack _selection; + if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then { + _hitpoints pushBack _entry; + _selections pushBack _selection; + }; }; }; diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf new file mode 100644 index 0000000000..775f439174 --- /dev/null +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -0,0 +1,165 @@ +/* + * Author: VKing + * Gets the current map's MGRS grid zone designator and 100km square. + * Also gets longitude, latitude and altitude offset for the map + * + * Argument: + * 0: Optional: Map name, if undefined the current map is used (String) + * + * Return value: + * 0: Grid zone designator (String) + * 1: 100km square (String) + * 2: GZD + 100km sq. as a single string (String) + * Writes return values to GVAR(MGRS_data) if run on the current map + */ + +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +private ["_zone","_band","_GZD","_long","_lat","_UTM","_easting","_northing", "_altitude"]; + +DEFAULT_PARAM(0,_map,worldName); + +_long = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "longitude"); +_lat = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "latitude"); +_altitude = getNumber (ConfigFile >> "CfgWorlds" >> _map >> "elevationOffset"); + +if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; }; +if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; }; +if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; }; +if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; }; +if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; }; +if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; }; +if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; }; +if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; }; +if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; }; +if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; }; +if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; }; +if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; }; +if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; }; +if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; }; +if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; }; + + +_UTM = [_long,_lat] call BIS_fnc_posDegToUTM; +_easting = _UTM select 0; +_northing = _UTM select 1; +// _zone = _UTM select 2; +TRACE_4("",_UTM,_easting,_northing,_zone); + +/* +_band = switch (true) do { + case (_lat<-72): {"C"}; + case (_lat<-64): {"D"}; + case (_lat<-56): {"E"}; + case (_lat<-48): {"F"}; + case (_lat<-40): {"G"}; + case (_lat<-32): {"H"}; + case (_lat<-24): {"J"}; + case (_lat<-16): {"K"}; + case (_lat<-8): {"L"}; + case (_lat<0): {"M"}; + case (_lat>72): {"X"}; + case (_lat>64): {"W"}; + case (_lat>56): {"V"}; + case (_lat>48): {"U"}; + case (_lat>40): {"T"}; + case (_lat>32): {"S"}; + case (_lat>24): {"R"}; + case (_lat>16): {"Q"}; + case (_lat>8): {"P"}; + case (_lat>=0): {"N"}; +}; + */ +_zone = 1 + (floor ((_long + 180) / 6)); +_band = "Z"; +if (_lat <= -80) then { + _band = "A"; +} else { + if (_lat < 84) then { + _band = "CDEFGHJKLMNPQRSTUVWXX" select [(floor ((_lat / 8) + 10)), 1]; + }; +}; +if (_map == "VR") then {_zone = 0; _band = "RV";}; + +_GZD = format ["%1%2",_zone,_band]; +TRACE_3("",_zone,_band,_GZD); + + +private ["_set1","_set2","_set3","_set4","_set5","_set6","_metaE","_metaN","_letterE","_letterN","_grid100km"]; + +_set1 = [1,7,13,19,25,31,37,43,49,55]; +_set2 = [2,8,14,20,26,32,38,44,50,56]; +_set3 = [3,9,15,21,27,33,39,45,51,57]; +_set4 = [4,10,16,22,28,34,40,46,52,58]; +_set5 = [5,11,17,23,29,35,41,47,53,59]; +_set6 = [6,12,18,24,30,36,42,48,54,60]; + +switch (true) do { +case (_zone in _set1): {_metaE = 1; _metaN = 1;}; +case (_zone in _set2): {_metaE = 2; _metaN = 2;}; +case (_zone in _set3): {_metaE = 3; _metaN = 1;}; +case (_zone in _set4): {_metaE = 1; _metaN = 2;}; +case (_zone in _set5): {_metaE = 2; _metaN = 1;}; +case (_zone in _set6): {_metaE = 3; _metaN = 2;}; +}; +TRACE_2("",_metaE,_metaN); + +switch (true) do { +case (_zone == 0): {_letterE = "E"}; +case (_easting > 800000): {LOG("E8"); switch (_metaE) do {case 1: {_letterE="H"}; case 2: {_letterE="R"}; case 3: {_letterE="Z"}; }; }; +case (_easting > 700000): {LOG("E7"); switch (_metaE) do {case 1: {_letterE="G"}; case 2: {_letterE="Q"}; case 3: {_letterE="Y"}; }; }; +case (_easting > 600000): {LOG("E6"); switch (_metaE) do {case 1: {_letterE="F"}; case 2: {_letterE="P"}; case 3: {_letterE="X"}; }; }; +case (_easting > 500000): {LOG("E5"); switch (_metaE) do {case 1: {_letterE="E"}; case 2: {_letterE="N"}; case 3: {_letterE="W"}; }; }; +case (_easting > 400000): {LOG("E4"); switch (_metaE) do {case 1: {_letterE="D"}; case 2: {_letterE="M"}; case 3: {_letterE="V"}; }; }; +case (_easting > 300000): {LOG("E3"); switch (_metaE) do {case 1: {_letterE="C"}; case 2: {_letterE="L"}; case 3: {_letterE="U"}; }; }; +case (_easting > 200000): {LOG("E2"); switch (_metaE) do {case 1: {_letterE="B"}; case 2: {_letterE="K"}; case 3: {_letterE="T"}; }; }; +case (_easting > 100000): {LOG("E1"); switch (_metaE) do {case 1: {_letterE="A"}; case 2: {_letterE="J"}; case 3: {_letterE="S"}; }; }; + default {_letterE="@"}; +}; +TRACE_1("",_letterE); + +_northing = _northing mod 2000000; +TRACE_1("",_northing); + +switch (true) do { +case (_zone == 0): {_letterN = "N"}; +case (_northing > 1900000): {LOG("N19"); switch (_metaN) do {case 1: {_letterN = "V"}; case 2: {_letterN = "E"}; }; }; +case (_northing > 1800000): {LOG("N18"); switch (_metaN) do {case 1: {_letterN = "U"}; case 2: {_letterN = "D"}; }; }; +case (_northing > 1700000): {LOG("N17"); switch (_metaN) do {case 1: {_letterN = "T"}; case 2: {_letterN = "C"}; }; }; +case (_northing > 1600000): {LOG("N16"); switch (_metaN) do {case 1: {_letterN = "S"}; case 2: {_letterN = "B"}; }; }; +case (_northing > 1500000): {LOG("N15"); switch (_metaN) do {case 1: {_letterN = "R"}; case 2: {_letterN = "A"}; }; }; +case (_northing > 1400000): {LOG("N14"); switch (_metaN) do {case 1: {_letterN = "Q"}; case 2: {_letterN = "V"}; }; }; +case (_northing > 1300000): {LOG("N13"); switch (_metaN) do {case 1: {_letterN = "P"}; case 2: {_letterN = "U"}; }; }; +case (_northing > 1200000): {LOG("N12"); switch (_metaN) do {case 1: {_letterN = "N"}; case 2: {_letterN = "T"}; }; }; +case (_northing > 1100000): {LOG("N11"); switch (_metaN) do {case 1: {_letterN = "M"}; case 2: {_letterN = "S"}; }; }; +case (_northing > 1000000): {LOG("N10"); switch (_metaN) do {case 1: {_letterN = "L"}; case 2: {_letterN = "R"}; }; }; +case (_northing > 900000): {LOG("N09"); switch (_metaN) do {case 1: {_letterN = "K"}; case 2: {_letterN = "Q"}; }; }; +case (_northing > 800000): {LOG("N08"); switch (_metaN) do {case 1: {_letterN = "J"}; case 2: {_letterN = "P"}; }; }; +case (_northing > 700000): {LOG("N07"); switch (_metaN) do {case 1: {_letterN = "H"}; case 2: {_letterN = "N"}; }; }; +case (_northing > 600000): {LOG("N06"); switch (_metaN) do {case 1: {_letterN = "G"}; case 2: {_letterN = "M"}; }; }; +case (_northing > 500000): {LOG("N05"); switch (_metaN) do {case 1: {_letterN = "F"}; case 2: {_letterN = "L"}; }; }; +case (_northing > 400000): {LOG("N04"); switch (_metaN) do {case 1: {_letterN = "E"}; case 2: {_letterN = "K"}; }; }; +case (_northing > 300000): {LOG("N03"); switch (_metaN) do {case 1: {_letterN = "D"}; case 2: {_letterN = "J"}; }; }; +case (_northing > 200000): {LOG("N02"); switch (_metaN) do {case 1: {_letterN = "C"}; case 2: {_letterN = "H"}; }; }; +case (_northing > 100000): {LOG("N01"); switch (_metaN) do {case 1: {_letterN = "B"}; case 2: {_letterN = "G"}; }; }; +case (_northing > 0): {LOG("N00"); switch (_metaN) do {case 1: {_letterN = "A"}; case 2: {_letterN = "F"}; }; }; +}; +TRACE_1("",_letterN); + +_grid100km = _letterE+_letterN; +TRACE_1("",_grid100km); + +if (_map == worldName) then { + GVAR(MGRS_data) = [_GZD,_grid100km,_GZD+_grid100km]; + GVAR(mapAltitude) = _altitude; + GVAR(mapLatitude) = _lat; + GVAR(mapLongitude) = _long; +}; +[_GZD,_grid100km,_GZD+_grid100km] \ No newline at end of file diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf new file mode 100644 index 0000000000..308772bfff --- /dev/null +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -0,0 +1,76 @@ +/* + * Author: PabstMirror (ideas from Nou's mapGridToPos and BIS_fnc_gridToPos) + * Finds real x/y offset and map step for a 10 digit grid + * Save time by preparing data one time at startup + * + * Argument: + * None + * + * Return values: + * None + * + * Example: + * [] call ace_map_fnc_getMapGridData + * + * Public: No + */ +#include "script_component.hpp" + +private["_cfgGrid", "_formatX", "_formatY", "_heightOffset", "_offsetX", "_offsetY", "_originGrid", "_realOffsetY", "_startGrid", "_stepX", "_stepY", "_zoom", "_zoomMax", "_letterGrid"]; + +GVAR(mapGridData) = []; + +//--- Extract grid values from world config (Borrowed from BIS_fnc_gridToPos) +_cfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; +_offsetX = getNumber (_cfgGrid >> "offsetX"); +_offsetY = getNumber (_cfgGrid >> "offsetY"); +_zoomMax = 1e99; +_formatX = ""; +_formatY = ""; +_stepX = 1e10; +_stepY = 1e10; +{ + _zoom = getnumber (_x >> "zoomMax"); + if (_zoom < _zoomMax) then { + _zoomMax = _zoom; + _formatX = getText (_x >> "formatX"); + _formatY = getText (_x >> "formatY"); + _stepX = getNumber (_x >> "stepX"); + _stepY = getNumber (_x >> "stepY"); + }; +} foreach configProperties [_cfgGrid, "isClass _x", false]; + +_letterGrid = false; +if (((toLower _formatX) find "a") != -1) then {_letterGrid = true}; +if (((toLower _formatY) find "a") != -1) then {_letterGrid = true}; +if (_letterGrid) exitWith { + diag_log text format ["[ACE] Map Grid Warning (%1) - Map uses letter grids [%2,%3]", worldName, _formatX, _formatY]; +}; + +//Start at [0, 500] and move north until we get a change in grid +_heightOffset = 500; +_startGrid = mapGridPosition [0, _heightOffset]; +_originGrid = _startGrid; +while {_startGrid == _originGrid} do { + _heightOffset = _heightOffset + 1; + _originGrid = mapGridPosition [0, _heightOffset]; +}; + +//Calculate the real y offset +_realOffsetY = parseNumber (_originGrid select [(count _formatX), (count _formatY)]) * _stepY + _heightOffset - 1; + +//Calculate MGRS 10digit step - they should both be 1 meter: +_stepXat5 = _stepX * 10 ^ ((count _formatX) - 5); +_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5); + +if (_stepYat5 < 0) then { + diag_log text format ["[ACE] Map Grid Warning (%1) - Northing is reversed", worldName]; +}; +if (_stepXat5 != 1) then { + diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x", worldName, _stepXat5]; +}; +if ((_stepYat5 != 1) && {_stepYat5 != -1}) then { + diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y", worldName, _stepXat5]; +}; + +GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5]; diff --git a/addons/common/functions/fnc_getMapGridFromPos.sqf b/addons/common/functions/fnc_getMapGridFromPos.sqf new file mode 100644 index 0000000000..983b78ffff --- /dev/null +++ b/addons/common/functions/fnc_getMapGridFromPos.sqf @@ -0,0 +1,63 @@ +/* + * Author: VKing, PabstMirror + * Gets a 10-digit map grid for the given world position + * + * Argument: + * 0: Position (2D Position) + * 1: Return type; false for array of easting and northing, true for single string + * + * Return values: + * 0: Easting + * 1: Northing + * + * Example: + * [(getPos player)] call ace_common_fnc_getMapGridFromPos; + * + * Public: Yes + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +PARAMS_1(_pos); +DEFAULT_PARAM(1,_returnSingleString,false); + +private["_count", "_easting", "_nativeGrid", "_northing"]; + +//Fallback, when map data is weird (letters) +if ((count GVAR(mapGridData)) == 0) exitWith { + _nativeGrid = mapGridPosition _pos; + if (_returnSingleString) then { + _nativeGrid + } else { + _count = floor ((count _nativeGrid) / 2); + [(_nativeGrid select [0, _count]), (_nativeGrid select [_count, _count])] + }; +}; + +EXPLODE_4_PVT(GVAR(mapGridData),_offsetX,_realOffsetY,_stepXat5,_stepYat5); +_easting = floor (((_pos select 0) - _offsetX) / _stepXat5); +_northing = floor (((_pos select 1) - _realOffsetY) / _stepYat5); + +//Attempt to handle negative east/north (e.g.: moving west of map bounds) +if (_easting > 0) then { + _easting = str _easting; + while {count _easting < 5} do {_easting = "0" + _easting;}; +} else { + _easting = str abs _easting; + while {count _easting < 4} do {_easting = "0" + _easting;}; + _easting = "-" + _easting; +}; +if (_northing > 0) then { + _northing = str _northing; + while {count _northing < 5} do {_northing = "0" + _northing;}; +} else { + _northing = str abs _northing; + while {count _northing < 4} do {_northing = "0" + _northing;}; + _northing = "-" + _northing; +}; + +if (_returnSingleString) then { + _easting + _northing +} else { + [_easting, _northing] +}; diff --git a/addons/common/functions/fnc_getMapPosFromGrid.sqf b/addons/common/functions/fnc_getMapPosFromGrid.sqf new file mode 100644 index 0000000000..20194df88a --- /dev/null +++ b/addons/common/functions/fnc_getMapPosFromGrid.sqf @@ -0,0 +1,46 @@ +/* + * Author: PabstMirror + * Gets position from grid cords + * + * Argument: + * 0: Grid Cords + * 1: Get Center or bottom right + * + * Return values: + * Position + * + * Example: + * ["6900080085"] call ace_common_fnc_getMapPosFromGrid + * + * Public: Yes + */ +#include "script_component.hpp" + +PARAMS_1(_inputString); +DEFAULT_PARAM(1,_getCenterOfGrid,true); + +private["_countInput", "_countInputHalf", "_xPart", "_xPos", "_yPart", "_yPos"]; + +if ((count GVAR(mapGridData)) == 0) exitWith { + ERROR("Map has bad data, falling back to BIS_fnc_gridToPos"); + (_this call BIS_fnc_gridToPos) select 0 +}; + +EXPLODE_4_PVT(GVAR(mapGridData),_offsetX,_realOffsetY,_stepXat5,_stepYat5); + +_countInput = count _inputString; +_countInputHalf = floor (_countInput / 2); + +//Split string, ignoring middle +_xPart = _inputString select [0, _countInputHalf]; +_yPart = _inputString select [(ceil (_countInput / 2)), _countInputHalf]; + +_xPos = ((parseNumber _xPart) * _stepXat5 * 10 ^ (5 - _countInputHalf)) + _offsetX; +_yPos = ((parseNumber _yPart) * _stepYat5 * 10 ^ (5 - _countInputHalf)) + _realOffsetY; + +if (_getCenterOfGrid) then { + _xPos = _xPos + 0.5 * _stepXat5 * 10 ^ (5 - _countInputHalf); + _yPos = _yPos + 0.5 * _stepYat5 * 10 ^ (5 - _countInputHalf); +}; + +[_xPos, _yPos, 0]; diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf new file mode 100644 index 0000000000..fe9354f632 --- /dev/null +++ b/addons/common/functions/fnc_headBugFix.sqf @@ -0,0 +1,42 @@ +/** + * fnc_headbugfix.sqf + * @Descr: Fixes animation issues that may get you stuck + * @Author: rocko + * + * @Arguments: + * @Return: nil + * @PublicAPI: true + */ + +#include "script_component.hpp" +private ["_pos","_dir","_anim"]; + +_anim = animationState ACE_player; +["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent); +["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent); + +if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false}; + +_pos = getposATL ACE_player; +_dir = getDir ACE_player; + +titleCut ["", "BLACK"]; +[ACE_Player, "headBugFix"] call FUNC(hideUnit); + +// create invisible headbug fix vehicle +_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos; +_ACE_HeadbugFix setDir _dir; +ACE_player moveInAny _ACE_HeadbugFix; +sleep 0.1; + +unassignVehicle ACE_player; +ACE_player action ["Eject", vehicle ACE_player]; +ACE_player setDir _dir; +ACE_player setposATL _pos; +sleep 1.0; + +deleteVehicle _ACE_HeadbugFix; + +[ACE_Player, "headBugFix"] call FUNC(unhideUnit); +titleCut ["", "PLAIN"]; +true diff --git a/addons/common/functions/fnc_hideUnit.sqf b/addons/common/functions/fnc_hideUnit.sqf new file mode 100644 index 0000000000..94857335f4 --- /dev/null +++ b/addons/common/functions/fnc_hideUnit.sqf @@ -0,0 +1,34 @@ +/* + * Author: SilentSpike (based on muteUnit) + * Globally hides a unit. This allows the handling of more than one reason to hide an object globally. + * + * Arguments: + * 0: Unit + * 1: Reason to hide the unit + * + * Return Value: + * nil + * + * Example: + * [ACE_Player, "SpectatorMode"] call ace_common_fnc_hideUnit + * + * Public: No + */ + +#include "script_component.hpp" + +PARAMS_2(_unit,_reason); + +if (isNull _unit) exitWith {}; + +private "_setHiddenReasons"; +_setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []]; + +if !(_reason in _setHiddenReasons) then { + _setHiddenReasons pushBack _reason; + _unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true]; +}; + +//if !(isObjectHidden _unit) then { (Uncomment when isObjectHidden hits stable branch) + ["hideObjectGlobal",[_unit,true]] call FUNC(serverEvent); +//}; diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index 53bf51d599..30bb6a7e38 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -12,7 +12,7 @@ #define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) -private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"]; +private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank","_loadboat"]; _caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param; _unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param; _vehicle = ObjNull; @@ -30,6 +30,11 @@ if (_unit distance _loadcar <= 10) then { _loadtank = nearestObject [_unit, "tank"]; if (_unit distance _loadtank <= 10) then { _vehicle = _loadtank; + } else { + _loadboat = nearestObject [_unit, "ship"]; + if (_unit distance _loadboat <= 10) then { + _vehicle = _loadboat; + }; }; }; }; diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index ccde28b9aa..8718be1e75 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -10,35 +10,48 @@ #include "script_component.hpp" -private ["_unit","_vehicle","_caller","_handle","_loaded"]; +private ["_unit","_vehicle","_caller","_handle","_loaded","_slotsOpen"]; _unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param; _vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param; _caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param; +_slotsOpen = false; if (!alive _unit) then { _unit = [_unit,_caller] call FUNC(makeCopyOfBody); }; -_unit moveInCargo _vehicle; -_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]]; -_loaded pushback _unit; -_vehicle setvariable [QGVAR(loaded_persons),_loaded,true]; -if (!([_unit] call FUNC(isAwake))) then { - _handle = [_unit,_vehicle] spawn { - private ["_unit","_vehicle"]; - _unit = _this select 0; - _vehicle = _this select 1; - waituntil {vehicle _unit == _vehicle}; - sleep 0.5; - //Save the "awake" animation before applying the death animation - if (vehicle _unit == _vehicle) then { - _unit setVariable [QEGVAR(medical,vehicleAwakeAnim), [_vehicle, (animationState _unit)]]; - }; - [_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation); - }; +if (_vehicle emptyPositions "cargo" > 0) then { + _unit moveInCargo _vehicle; + _slotsOpen = true; } else { - if ([_unit] call FUNC(isArrested)) then { + if (_vehicle emptyPositions "gunner" > 0) then { + _unit moveInGunner _vehicle; + _slotsOpen = true; + }; +}; +if (_slotsOpen) then { + _loaded = _vehicle getvariable [QGVAR(loaded_persons),[]]; + _loaded pushback _unit; + _vehicle setvariable [QGVAR(loaded_persons),_loaded,true]; + if (!([_unit] call FUNC(isAwake))) then { + _handle = [_unit,_vehicle] spawn { + private ["_unit","_vehicle"]; + _unit = _this select 0; + _vehicle = _this select 1; + waituntil {vehicle _unit == _vehicle}; + sleep 0.5; + + //Save the "awake" animation before applying the death animation + if (vehicle _unit == _vehicle) then { + _unit setVariable [QEGVAR(medical,vehicleAwakeAnim), [_vehicle, (animationState _unit)]]; + }; + [_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation); + }; + } else { + if ([_unit] call FUNC(isArrested)) then { + + }; }; }; \ No newline at end of file diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf index 280a1e9907..4479ba04fa 100644 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf @@ -15,16 +15,16 @@ private ["_parseConfigForDisplayNames", "_name"]; _parseConfigForDisplayNames = { - private "_optionEntry"; + private ["_optionEntry", "_values", "_text"]; _optionEntry = _this select 0; if !(isClass _optionEntry) exitwith {false}; + _values = getArray (_optionEntry >> "values"); _x set [3, getText (_optionEntry >> "displayName")]; _x set [4, getText (_optionEntry >> "description")]; + _x set [5, _values]; + _x set [8, getText (_optionEntry >> "category")]; - private "_values"; - _values = _x select 5; { - private "_text"; _text = _x; if (((typeName _text) == "STRING") && {(count _text) > 1} && {(_text select [0,1]) == "$"}) then { _text = localize (_text select [1, ((count _text) - 1)]); //chop off the leading $ @@ -41,7 +41,9 @@ _parseConfigForDisplayNames = { if !([configFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then { if !([configFile >> "ACE_ServerSettings" >> _name] call _parseConfigForDisplayNames) then { - [missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames; + if !([missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then { + diag_log text format ["[ACE] - Setting found, but couldn't localize [%1] (server has but we don't?)", _name]; + }; }; }; diff --git a/addons/common/functions/fnc_moduleCheckPBOs.sqf b/addons/common/functions/fnc_moduleCheckPBOs.sqf index 9543b3a5c9..c75324c9a3 100644 --- a/addons/common/functions/fnc_moduleCheckPBOs.sqf +++ b/addons/common/functions/fnc_moduleCheckPBOs.sqf @@ -3,7 +3,9 @@ * Initializes the check-PBOs module. * * Arguments: - * Whatever the module provides. (I dunno.) + * 0: The module logic + * 1: units + * 2: activated * * Return Value: * None diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 8effc3680d..d50e09fb15 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -41,11 +41,11 @@ if ((typeName _value) != (_settingData select 1)) then { _failed = true; if ((_settingData select 1) == "BOOL" and (typeName _value) == "SCALAR") then { // If value is not 0 or 1 consider it invalid and don't set anything - if (_value == 0) then { + if (_value isEqualTo 0) then { _value = false; _failed = false; }; - if (_value == 1) then { + if (_value isEqualTo 1) then { _value = true; _failed = false; }; diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf index 9a95819996..f06436884f 100644 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ b/addons/common/functions/fnc_setSettingFromConfig.sqf @@ -65,17 +65,19 @@ if (isNil _name) then { localizedDescription, possibleValues, isForced, - defaultValue + defaultValue, + category ];*/ _settingData = [ _name, _typeName, (getNumber (_optionEntry >> "isClientSettable")) > 0, - getText (_optionEntry >> "displayName"), - getText (_optionEntry >> "description"), - getArray (_optionEntry >> "values"), + "", //getText (_optionEntry >> "displayName"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText + "", //getText (_optionEntry >> "description"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText + [], //getArray (_optionEntry >> "values"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText getNumber (_optionEntry >> "force") > 0, - _value + _value, + "" //getText (_optionEntry >> "category") //No need to broadcast, handeled by fnc_loadSettingsLocalizedText ]; //Strings in the values array won't be localized from the config, so just do that now: diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index e7966c3b4d..d43841146a 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -36,7 +36,7 @@ if (isNil QGVAR(publishSchedId)) then { GVAR(publishVarNames) = []; GVAR(publishNextTime) = 1e7; }; - }, 0, []] call cba_fnc_addPerFrameHandler; + }, 0, []] call CBA_fnc_addPerFrameHandler; }; // If the variable is not on the list diff --git a/addons/common/functions/fnc_unhideUnit.sqf b/addons/common/functions/fnc_unhideUnit.sqf new file mode 100644 index 0000000000..190be47664 --- /dev/null +++ b/addons/common/functions/fnc_unhideUnit.sqf @@ -0,0 +1,34 @@ +/* + * Author: SilentSpike (based on unmuteUnit) + * Globally unhides a unit. Only unhides if the last reason was removed. + * + * Arguments: + * 0: Unit + * 1: Reason to unhide the unit + * + * Return Value: + * nil + * + * Example: + * [ACE_Player, "SpectatorMode"] call ace_common_fnc_unhideUnit + * + * Public: No + */ + +#include "script_component.hpp" + +PARAMS_2(_unit,_reason); + +if (isNull _unit) exitWith {}; + +private "_setHiddenReasons"; +_setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []]; + +if (_reason in _setHiddenReasons) then { + _setHiddenReasons deleteAt (_setHiddenReasons find _reason); + _unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true]; +}; + +if (_setHiddenReasons isEqualTo []) then { + ["hideObjectGlobal",[_unit,false]] call FUNC(serverEvent); +}; diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 23d33e4bfe..da2d9ea77e 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -15,16 +15,34 @@ #define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) -private ["_loaded", "_emptyPos"]; +private ["_loaded", "_emptyPos","_validVehiclestate"]; PARAMS_2(_unit,_vehicle); +_validVehiclestate = true; -if (driver _vehicle == _unit) exitwith {TRACE_1("Exiting on Failed Driver Check", driver _vehicle == _unit); false;}; -TRACE_1("Vehicle Check", driver _vehicle == _unit); -if !(speed _vehicle <1 && (((getPos _vehicle) select 2) < 2)) exitwith {TRACE_1("Exiting on Failed speed check", getPosASL _vehicle == _unit); false;}; -TRACE_1("getPosASL Vehicle Check", getPos _vehicle); +if (_vehicle isKindOf "Ship" ) then { + if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; + TRACE_1("SHIP Ground Check", getPosATL _vehicle ); + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); // TODO: if spot is underwater pick another spot. +} else { + if (_vehicle isKindOf "Air" ) then { + if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false}; + TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); + _emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition); + _emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ]; + } else { + if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false}; + TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); + _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); + }; +}; + +TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); +if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]; false }; + +diag_log str _emptyPos; + +if (count _emptyPos == 0) exitwith {diag_log format["No safe empty spots to unload patient. %1", _emptyPos]; false}; //consider displaying text saying there are no safe places to exit the vehicle -_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); -if (count _emptyPos == 0) exitwith {false}; //consider displaying text saying there are no safe places to exit the vehicle unassignVehicle _unit; [_unit] orderGetIn false; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 7d0de1b584..0bbe6564da 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -476,13 +476,14 @@ Comprobar PBOs Überprüfe PBOs Zkontrolovat PBO + Verificar PBOs - 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 + Este módulo verifica a integridade dos addons quando iniciamos a simulação Action @@ -490,6 +491,7 @@ Acción Aktion Akce + Ação What to do with people who do not have the right PBOs? @@ -497,6 +499,7 @@ ¿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? + O que fazer com pessoas que não tem os PBOs corretos? Warn once @@ -504,6 +507,7 @@ Avisar una vez Einmal verwarnen Upozornit jednou + Avisar uma vez Warn (permanent) @@ -511,6 +515,7 @@ Avisar (permanente) Immer verwarnen Upozornit (permanentně) + Avisar (permanente) Kick @@ -518,6 +523,7 @@ Expulsar Kicken Vyhodit + Chutar Check all addons @@ -525,6 +531,7 @@ Comprobar todos los addons Alle Addons überprüfen Zkontrolovat všechny addony + Verificar todos addons Check all addons instead of only those of ACE? @@ -532,6 +539,7 @@ 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? + Verificar todos addons invés de só os do ACE? Whitelist @@ -539,6 +547,7 @@ Lista blanca Whitelist Seznam povolených + Lista branca What addons are allowed regardless? @@ -546,6 +555,7 @@ Qué addons están permitidos igualmente Welche Addons werden dennoch erlaubt? Jaké addony jsou povoleny? + Quais addons são permitidos de qualquer maneira? LSD Vehicles @@ -553,6 +563,7 @@ Vehículos LSD LSD-Fahrzeuge LSD vozidla + Veículos LSD Adds LSD effect to synchronized vehicle @@ -560,18 +571,113 @@ 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 + Adiciona efeito LSD ao veículo sincronizado Toggle Handheld Device Seleccionar dispositivo de mano + Handheld aufrufen + Ativa dispositivo de mão + Przełącz urządzenie podręczne + Přepnout ruční zařízení Close Handheld Device Cerrar dispositivo de mano + Handheld schließen + Fecha dispositivo de mão + Zamknij urządzenie podręczne + Zavřít ruční zařízení Cycle Handheld Devices Cambiar dispositivos de mano + Handheld wechseln + Troca dispositivos de mão + Następne urządzenie podręczne + Procházet ruční zařízení + + + Disabled + Zakázáno + Non + Deaktiviert + Disattivato + Wyłączone + Desativado + Откл. + Desactivado + + + Enabled + Zapnuto + Oui + Aktiviert + Attivato + Włączone + Ativado + Вкл. + Activado + + + Yes + Ja + Si + Tak + Ano + Oui + Да + Igen + Sim + Si + + + No + Nein + No + Nie + Ne + Non + Нет + Nem + Não + No + + + Vehicles only + Tylko pojazdy + + + Do Not Force + Nie wymuszaj + No forzar + Nicht erzwingen + Nevynucovat + Não forçar + + + ACE3 Equipment + ACE3 Wyposażenie + + + ACE3 Common + ACE3 Ogólne + + + ACE3 Weapons + ACE3 Broń + + + ACE3 Movement + ACE3 Ruch + + + ACE3 Scope Adjustment + ACE3 Regulacja optyki + + + ACE3 Vehicles + ACE3 Pojazdy \ No newline at end of file diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp index 2592bf5b77..cf1be40487 100644 --- a/addons/concertina_wire/CfgVehicles.hpp +++ b/addons/concertina_wire/CfgVehicles.hpp @@ -123,7 +123,8 @@ class CfgVehicles { displayName = "$STR_ACE_ROLLWIRE"; distance = 4; condition = "true"; - statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy)); + //wait a frame to handle "Do When releasing action menu key" option: + statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame)); showDisabled = 0; exceptions[] = {}; priority = 5; diff --git a/addons/concertina_wire/XEH_postInit.sqf b/addons/concertina_wire/XEH_postInit.sqf index ff3b5c5167..58bd1f63c7 100644 --- a/addons/concertina_wire/XEH_postInit.sqf +++ b/addons/concertina_wire/XEH_postInit.sqf @@ -9,3 +9,5 @@ GVAR(deployPFH) = -1; GVAR(placer) setVariable [QGVAR(wireDeployed), true]; }; }] call EFUNC(common,addEventHandler); + +[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler); diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf index f15feb48bd..582d642484 100644 --- a/addons/concertina_wire/XEH_preInit.sqf +++ b/addons/concertina_wire/XEH_preInit.sqf @@ -7,5 +7,6 @@ PREP(dismount); PREP(dismountSuccess); PREP(handleDamage); PREP(handleKilled); +PREP(vehicleDamage); ADDON = true; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index c30e767266..5548cad649 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -37,7 +37,7 @@ deleteVehicle _wirecoil; _unit setVariable [QGVAR(wireDeployed), false]; GVAR(deployPFH) = [{ - EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action); + EXPLODE_3_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit); private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"]; _posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL); @@ -73,7 +73,7 @@ GVAR(deployPFH) = [{ { _wireNoGeo animate [_x, _anim]; } foreach WIRE_FAST; -}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler; +}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler; [localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint); diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf index 2d2cd7f789..f5f84a6afa 100644 --- a/addons/concertina_wire/functions/fnc_handleKilled.sqf +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -17,7 +17,9 @@ PARAMS_2(_wire,_killer); -if (isNull _killer) then { +private ["_distance", "_vehicle"]; + +if (isNull _killer) then { _killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull]; if (isNull _killer) then { _killer = nearestObject [_wire, "car"]; @@ -25,111 +27,9 @@ if (isNull _killer) then { }; 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 +[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent); diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf new file mode 100644 index 0000000000..e7dff30000 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -0,0 +1,123 @@ +/* + * Author: Rocko + * Handles vehicle damage from hitting wire + * + * Arguments: + * 0: wire + * 1: vehicle + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_2(_wire,_vehicle); + +private ["_type", "_mode", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w"]; + +_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) + +_type = typeOf _wire; +_anim = _wire animationPhase "wire_2"; +_pos_w = getPos _wire; +_dir_w = getDir _wire; + +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] call EFUNC(common,waitAndExecute); +}; + +//TODO: Create broken geoless wire (two version) +//TODO: Make wire remains stop vehicles diff --git a/addons/concertina_wire/script_component.hpp b/addons/concertina_wire/script_component.hpp index f3f353f181..3512643b81 100644 --- a/addons/concertina_wire/script_component.hpp +++ b/addons/concertina_wire/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT concertina_wire #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_CONCERTINA_WIRE #define DEBUG_MODE_FULL #endif diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml index 0583a9448d..07c2961862 100644 --- a/addons/concertina_wire/stringtable.xml +++ b/addons/concertina_wire/stringtable.xml @@ -5,45 +5,49 @@ Concertina Wire NATO-Draht Проволочная спираль - Drut kolczasty - Concertina wire + Koncentrina + Alambre de espino Concertina wire Ostnatý drát Concertina wire Concertina wire + Arame farpado Concertina Wire Coil NATO-Draht Rolle Проволочная спираль (моток) - Zwój drutu kolczastego - Concertina wire coil + Zwój koncentriny + Bobina de alambre de espino Concertina wire coil Smyčka ostnatého drátu Concertina wire coil Concertina wire coil + Bobina de arame farpado Dismount Concertina Wire NATO-Draht abbauen Демонтировать проволочную спираль - Zwiń drut kolczasty - Dismount Concertina wire + Zwiń koncentrinę + Desmontar alambre de espino Dismount Concertina wire Svinout ostnatý drát Dismount Concertina wire Dismount Concertina wire + Desmontar arame farpado Deploy Concertina Wire NATO-Draht verlegen Монтировать проволочную спираль - Rozwiń drut kolczasty - Deploy Concertina wire + Rozwiń koncentrinę + Desplegar alambre de espino Deploy Concertina wire Rozvinout ostnatý drát Deploy Concertina wire Deploy Concertina wire + Colocar arame farpado - \ No newline at end of file + diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp index f26d8841ae..a9948ca8aa 100644 --- a/addons/dagr/CfgVehicles.hpp +++ b/addons/dagr/CfgVehicles.hpp @@ -33,10 +33,7 @@ class CfgVehicles { displayName = "DAGR"; vehicleClass = "Items"; class TransportItems { - class ACE_DAGR { - name = "ACE_DAGR"; - count = 1; - }; + MACRO_ADDITEM(ACE_DAGR,1); }; }; diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp index 31b0603ff2..830e9cf115 100644 --- a/addons/dagr/CfgWeapons.hpp +++ b/addons/dagr/CfgWeapons.hpp @@ -7,11 +7,11 @@ class CfgWeapons { author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; scope = 2; displayName = "DAGR"; + model = QUOTE(PATHTOF(data\DAGR.p3d)); 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/data/DAGR.p3d b/addons/dagr/data/DAGR.p3d new file mode 100644 index 0000000000..afba9837f9 Binary files /dev/null and b/addons/dagr/data/DAGR.p3d differ diff --git a/addons/dagr/data/DAGR.rvmat b/addons/dagr/data/DAGR.rvmat new file mode 100644 index 0000000000..7cbd970f05 --- /dev/null +++ b/addons/dagr/data/DAGR.rvmat @@ -0,0 +1,82 @@ +class StageTI +{ + texture="a3\data_f\default_ti_ca.paa"; +}; +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.050000008,0.050000008,0.050000008,1}; +specularPower=40; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\ace\addons\dagr\data\DAGR_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform + { + aside[]={0,9,0}; + up[]={4.5,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 +{ + texture="#(argb,8,8,3)color(0,0,0,0)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 +{ + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="#(argb,8,8,3)color(1,1,1,1,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 +{ + texture="#(ai,64,128,1)fresnel(0.4,0.2)"; + uvSource="none"; +}; +class Stage7 +{ + texture="a3\data_f\env_land_co.paa"; + uvSource="none"; +}; diff --git a/addons/dagr/data/DAGR_CO.paa b/addons/dagr/data/DAGR_CO.paa new file mode 100644 index 0000000000..d2fc1a06d7 Binary files /dev/null and b/addons/dagr/data/DAGR_CO.paa differ diff --git a/addons/dagr/data/DAGR_NOHQ.paa b/addons/dagr/data/DAGR_NOHQ.paa new file mode 100644 index 0000000000..311c4489bb Binary files /dev/null and b/addons/dagr/data/DAGR_NOHQ.paa differ diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index ff7429fa0a..9bcf244fbc 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -30,7 +30,7 @@ __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"]; + private["_dagrElevation", "_dagrGrid", "_dagrHeading", "_dagrSpeed", "_dagrTime", "_elevation", "_gridArray", "_speed"]; // Abort Condition if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { @@ -40,54 +40,8 @@ GVAR(outputPFH) = [{ }; // 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; + _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos); + _dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])]; // SPEED _speed = speed (vehicle ACE_player); @@ -97,7 +51,7 @@ GVAR(outputPFH) = [{ // Elevation _elevation = getPosASL ACE_player; - _elevation = floor ((_elevation select 2) + EGVAR(weather,altitude)); + _elevation = floor ((_elevation select 2) + EGVAR(common,mapAltitude)); _dagrElevation = str _elevation + "m"; // Heading diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 660e678a82..ad9068344f 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -72,7 +72,7 @@ _yCoord = switch true do { _dagrGrid = _xCoord + " " + _yCoord; // Find target elevation -_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(weather,altitude)); +_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(common,mapAltitude)); _dagrElevation = str _elevation + "m"; // Time diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index d1fc2a47f2..71c3e7c1a7 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -30,7 +30,7 @@ __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"]; + private["_MYpos", "_WPpos", "_bearing", "_dagrDistance", "_dagrGrid", "_dagrHeading", "_distance", "_gridArray"]; // Abort Condition if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith { @@ -40,54 +40,8 @@ GVAR(outputPFH) = [{ }; // 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; + _gridArray = [(getPos ACE_player), false] call EFUNC(common,getMapGridFromPos); + _dagrGrid = format ["%1 %2", ((_gridArray select 0) select [0,4]), ((_gridArray select 1) select [0,4])]; // WP Grid _xGrid2 = floor (DAGR_WP_INFO / 10000); @@ -110,8 +64,8 @@ GVAR(outputPFH) = [{ _dagrGrid2 = _xCoord2 + " " + _yCoord2; // Distance - _WPpos = [[_xCoord2, _yCoord2], true] call CBA_fnc_mapGridToPos; - _MYpos = [[_xCoord, _yCoord], true] call CBA_fnc_mapGridToPos; + _WPpos = [_dagrGrid2, true] call EFUNC(common,getMapPosFromGrid); + _MYpos = [_dagrGrid, true] call EFUNC(common,getMapPosFromGrid); _distance = _MYpos distance _WPpos; _distance = floor (_distance * 10) / 10; _dagrDistance = str _distance + "m"; diff --git a/addons/disarming/XEH_postInit.sqf b/addons/disarming/XEH_postInit.sqf index 7315ef1785..ef17e6e96a 100644 --- a/addons/disarming/XEH_postInit.sqf +++ b/addons/disarming/XEH_postInit.sqf @@ -1,4 +1,4 @@ #include "script_component.hpp" -["DisarmDropItems", {_this call FUNC(eventTargetStart)}] call EFUNC(common,addEventHandler); -["DisarmDebugCallback", {_this call FUNC(eventCallerFinish)}] call EFUNC(common,addEventHandler); +["DisarmDropItems", FUNC(eventTargetStart)] call EFUNC(common,addEventHandler); +["DisarmDebugCallback", FUNC(eventCallerFinish)] call EFUNC(common,addEventHandler); diff --git a/addons/disarming/functions/fnc_canBeDisarmed.sqf b/addons/disarming/functions/fnc_canBeDisarmed.sqf index 25ec884919..9be20db7f4 100644 --- a/addons/disarming/functions/fnc_canBeDisarmed.sqf +++ b/addons/disarming/functions/fnc_canBeDisarmed.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Checks the conditions for being able to disarm a unit * * Arguments: @@ -15,17 +16,17 @@ */ #include "script_component.hpp" -PARAMS_1(_target); - private ["_animationStateCfgMoves", "_putDownAnim"]; +params ["_target"]; + //Check animationState for putDown anim //This ensures the unit doesn't have to actualy do any animation to drop something //This should always be true for the 3 possible status effects that allow disarming _animationStateCfgMoves = getText (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _target) >> "actions"); -if (_animationStateCfgMoves == "") exitWith {false}; +if (_animationStateCfgMoves == "") exitWith { false }; _putDownAnim = getText (configFile >> "CfgMovesBasic" >> "Actions" >> _animationStateCfgMoves >> "PutDown"); -if (_putDownAnim != "") exitWith {false}; +if (_putDownAnim != "") exitWith { false }; (alive _target) && diff --git a/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf b/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf index ec9e975ec2..34f1a10d32 100644 --- a/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf +++ b/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Checks the conditions for being able to disarm a unit * * Arguments: @@ -16,7 +17,7 @@ */ #include "script_component.hpp" -PARAMS_2(_player,_target); +params ["_player", "_target"]; -([_target] call FUNC(canBeDisarmed)) && +([_target] call FUNC(canBeDisarmed)) && {([_player, _target, []] call EFUNC(common,canInteractWith))} diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 5422fd00a6..91eff1c99d 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Makes a unit drop items * * Arguments: @@ -22,13 +23,11 @@ private ["_fncSumArray", "_return", "_holder", "_dropPos", "_targetMagazinesStart", "_holderMagazinesStart", "_xClassname", "_xAmmo", "_targetMagazinesEnd", "_holderMagazinesEnd", "_holderItemsStart", "_targetItemsStart", "_addToCrateClassnames", "_addToCrateCount", "_index", "_holderItemsEnd", "_targetItemsEnd", "_holderIsEmpty"]; - -PARAMS_3(_caller,_target,_listOfItemsToRemove); -DEFAULT_PARAM(3,_doNotDropAmmo,false); //By default units drop all weapon mags when dropping a weapon +params ["_caller", "_target", "_listOfItemsToRemove", ["_doNotDropAmmo", false, [false]]]; //By default units drop all weapon mags when dropping a weapon _fncSumArray = { _return = 0; - {_return = _return + _x;} forEach (_this select 0); + {_return = _return + _x;} count (_this select 0); _return }; @@ -48,7 +47,7 @@ if (!_doNotDropAmmo) then { if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); }; //Create a new weapon holder diff --git a/addons/disarming/functions/fnc_eventCallerFinish.sqf b/addons/disarming/functions/fnc_eventCallerFinish.sqf index d95be98d5f..bc48a26b70 100644 --- a/addons/disarming/functions/fnc_eventCallerFinish.sqf +++ b/addons/disarming/functions/fnc_eventCallerFinish.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Recieves a possible error code from FUNC(eventTargetFinish) * * Arguments: @@ -17,7 +18,7 @@ */ #include "script_component.hpp" -PARAMS_3(_caller,_target,_errorMsg); +params ["_caller", "_target", "_errorMsg"]; if (_caller != ACE_player) exitWith {}; diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf index d702a554a5..b9fb461356 100644 --- a/addons/disarming/functions/fnc_eventTargetFinish.sqf +++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * After FUNC(disarmDropItems) has completed, passing a possible error code. * Passes that error back to orginal caller. * @@ -18,7 +19,7 @@ */ #include "script_component.hpp" -PARAMS_3(_caller,_target,_errorMsg); +params ["_caller", "_target", "_errorMsg"]; if (_errorMsg != "") then { diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this]; diff --git a/addons/disarming/functions/fnc_eventTargetStart.sqf b/addons/disarming/functions/fnc_eventTargetStart.sqf index 316ec2b656..29c370f2b5 100644 --- a/addons/disarming/functions/fnc_eventTargetStart.sqf +++ b/addons/disarming/functions/fnc_eventTargetStart.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Disarm Event Handler, Starting func, called on the target. * If target has to remove uniform/vest, this will add all uniform/vest items to the drop list. * @@ -18,7 +19,7 @@ */ #include "script_component.hpp" -PARAMS_3(_caller,_target,_listOfObjectsToRemove); +params ["_caller", "_target", "_listOfObjectsToRemove"]; private "_itemsToAdd"; diff --git a/addons/disarming/functions/fnc_getAllGearContainer.sqf b/addons/disarming/functions/fnc_getAllGearContainer.sqf index c5b2c445ab..0394761197 100644 --- a/addons/disarming/functions/fnc_getAllGearContainer.sqf +++ b/addons/disarming/functions/fnc_getAllGearContainer.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Helper function to get all gear of a container * * Arguments: @@ -15,15 +16,16 @@ */ #include "script_component.hpp" -PARAMS_1(_target); +params ["_target"]; -private ["_allGear"]; - -_allGear = [[],[]]; +private ["_items", "_counts"]; +_items = []; +_counts = []; { - (_allGear select 0) append (_x select 0); - (_allGear select 1) append (_x select 1); + _x params ["_item", "_count"]; + _items append _item; + _counts append _count; } forEach [(getWeaponCargo _target), (getItemCargo _target), (getMagazineCargo _target), (getBackpackCargo _target)]; -_allGear +[_items,_counts] // Return diff --git a/addons/disarming/functions/fnc_getAllGearUnit.sqf b/addons/disarming/functions/fnc_getAllGearUnit.sqf index 99d4b2d7f2..bdd1ff0bf9 100644 --- a/addons/disarming/functions/fnc_getAllGearUnit.sqf +++ b/addons/disarming/functions/fnc_getAllGearUnit.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Helper function to get all gear of a unit. * * Arguments: @@ -15,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_1(_target); +params ["_target"]; private ["_allItems", "_classnamesCount", "_index", "_uniqueClassnames"]; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 88e0e81be8..c2a3a6396e 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Opens the disarm dialog (allowing a person to remove items) * * Arguments: @@ -15,21 +16,9 @@ * Public: No */ #include "script_component.hpp" - -#define TEXTURES_RANKS [ \ - "", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \ - ] - -PARAMS_2(_caller,_target); +params ["_caller", "_target"]; private "_display"; - +#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa" //Sanity Checks if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");}; if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");}; @@ -47,8 +36,8 @@ GVAR(disarmTarget) = _target; //Setup Drop Event (on right pannel) (_display displayCtrl 632) ctrlAddEventHandler ["LBDrop", { if (isNull GVAR(disarmTarget)) exitWith {}; - PARAMS_5(_ctrl,_xPos,_yPos,_idc,_itemInfo); - EXPLODE_3_PVT((_itemInfo select 0),_displayText,_value,_data); + params ["_ctrl", "_xPos", "_yPos", "_idc", "_itemInfo"]; + (_itemInfo select 0) params ["_displayText", "_value", "_data"]; if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");}; @@ -60,18 +49,18 @@ GVAR(disarmTarget) = _target; //Setup PFEH [{ - private ["_groundContainer", "_targetContainer", "_playerName", "_rankPicture", "_rankIndex", "_targetUniqueItems", "_holderUniqueItems", "_holder"]; + private ["_groundContainer", "_targetContainer", "_playerName", "_icon", "_rankPicture", "_targetUniqueItems", "_holderUniqueItems", "_holder"]; disableSerialization; - EXPLODE_2_PVT(_this,_args,_pfID); - EXPLODE_3_PVT(_args,_player,_target,_display); + params ["_args", "_idPFH"]; + _args params ["_player", "_target", "_display"]; if ((!([_player, _target] call FUNC(canPlayerDisarmUnit))) || {isNull _display} || {_player != ACE_player}) then { - [_pfID] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; GVAR(disarmTarget) = objNull; - if (!isNull _display) then {closeDialog 0;}; //close dialog if still open + if (!isNull _display) then { closeDialog 0; }; //close dialog if still open } else { _groundContainer = _display displayCtrl 632; @@ -80,8 +69,9 @@ GVAR(disarmTarget) = _target; _rankPicture = _display displayCtrl 1203; //Show rank and name (just like BIS's inventory) - _rankIndex = ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target)) + 1); - _rankPicture ctrlSetText (TEXTURES_RANKS select _rankIndex); + _icon = format [DEFUALTPATH, toLower (rank _target)]; + if (_icon isEqualTo DEFUALTPATH) then {_icon = ""}; + _rankPicture ctrlSetText _icon; _playerName ctrlSetText ([GVAR(disarmTarget)] call EFUNC(common,getName)); //Clear both inventory lists: @@ -98,7 +88,7 @@ GVAR(disarmTarget) = _target; if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); //If a holder exists, show it's inventory if (!isNull _holder) then { diff --git a/addons/disarming/functions/fnc_showItemsInListbox.sqf b/addons/disarming/functions/fnc_showItemsInListbox.sqf index b36e53e820..f675012ee3 100644 --- a/addons/disarming/functions/fnc_showItemsInListbox.sqf +++ b/addons/disarming/functions/fnc_showItemsInListbox.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Shows a list of inventory items in a listBox control. * * Arguments: @@ -17,11 +18,12 @@ #include "script_component.hpp" disableSerialization; -PARAMS_2(_listBoxCtrl,_itemsCountArray); - private ["_classname", "_count", "_displayName", "_picture"]; +params ["_listBoxCtrl", "_itemsCountArray"]; + { + private "_configPath"; _displayName = ""; _picture = ""; @@ -31,21 +33,25 @@ private ["_classname", "_count", "_displayName", "_picture"]; if ((_classname != DUMMY_ITEM) && {_classname != "ACE_FakePrimaryWeapon"}) then { //Don't show the dummy potato or fake weapon switch (true) do { - case (isClass (configFile >> "CfgWeapons" >> _classname)): { - _displayName = getText (configFile >> "CfgWeapons" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgWeapons" >> _classname >> "picture"); + case (isClass (configFile >> "CfgWeapons" >> _classname)): { + _configPath = (configFile >> "CfgWeapons"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; - case (isClass (configFile >> "CfgMagazines" >> _classname)): { - _displayName = getText (configFile >> "CfgMagazines" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgMagazines" >> _classname >> "picture"); + case (isClass (configFile >> "CfgMagazines" >> _classname)): { + _configPath = (configFile >> "CfgMagazines"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; - case (isClass (configFile >> "CfgVehicles" >> _classname)): { - _displayName = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgVehicles" >> _classname >> "picture"); + case (isClass (configFile >> "CfgVehicles" >> _classname)): { + _configPath = (configFile >> "CfgVehicles"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; - case (isClass (configFile >> "CfgGlasses" >> _classname)): { - _displayName = getText (configFile >> "CfgGlasses" >> _classname >> "displayName"); - _picture = getText (configFile >> "CfgGlasses" >> _classname >> "picture"); + case (isClass (configFile >> "CfgGlasses" >> _classname)): { + _configPath = (configFile >> "CfgGlasses"); + _displayName = getText (_configPath >> _classname >> "displayName"); + _picture = getText (_configPath >> _classname >> "picture"); }; default { ERROR(format ["[%1] - bad classname", _classname]); diff --git a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf index e1753f390a..efe5aae72a 100644 --- a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf +++ b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf @@ -1,5 +1,6 @@ /* * Author: PabstMirror + * * Verifies magazines moved with exact ammo counts preserved. * Arrays will be in format from magazinesAmmo/magazinesAmmoCargo * e.g.: [["30Rnd_65x39_caseless_mag",15], ["30Rnd_65x39_caseless_mag",30]] diff --git a/addons/disposable/CfgEventHandlers.hpp b/addons/disposable/CfgEventHandlers.hpp index e4e4abffd8..98fec255c2 100644 --- a/addons/disposable/CfgEventHandlers.hpp +++ b/addons/disposable/CfgEventHandlers.hpp @@ -22,7 +22,7 @@ class Extended_FiredBIS_EventHandlers { class Extended_InitPost_EventHandlers { class CAManBase { class ADDON { - init = QUOTE([ARR_2(_this select 0, secondaryWeapon (_this select 0))] call FUNC(takeLoadedATWeapon)); + init = QUOTE([_this select 0] call FUNC(takeLoadedATWeapon)); }; }; }; diff --git a/addons/disposable/CfgMagazines.hpp b/addons/disposable/CfgMagazines.hpp index 484fa36238..d26d5ecea2 100644 --- a/addons/disposable/CfgMagazines.hpp +++ b/addons/disposable/CfgMagazines.hpp @@ -1,6 +1,6 @@ class CfgMagazines { class NLAW_F; - class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine + class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine author = ECSTRING(common,ACETeam); scope = 1; scopeArsenal = 1; @@ -12,14 +12,4 @@ class CfgMagazines { class ACE_FiredMissileDummy: ACE_PreloadedMissileDummy { count = 0; }; - class ACE_UsedTube_F: NLAW_F { - author = ECSTRING(common,ACETeam); - displayName = CSTRING(UsedTube); - descriptionShort = CSTRING(UsedTubeDescription); - displayNameShort = "-"; - count = 0; - weaponPoolAvailable = 0; - modelSpecial = ""; - mass = 0; - }; }; diff --git a/addons/disposable/XEH_postInit.sqf b/addons/disposable/XEH_postInit.sqf index bc51974bc6..800d749d06 100644 --- a/addons/disposable/XEH_postInit.sqf +++ b/addons/disposable/XEH_postInit.sqf @@ -3,8 +3,12 @@ if (!hasInterface) exitWith {}; -["inventoryDisplayLoaded", {[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)}] call EFUNC(common,addEventHandler); -["playerInventoryChanged", { - [_this select 0, _this select 1 select 11] call FUNC(takeLoadedATWeapon); - [_this select 0] call FUNC(updateInventoryDisplay); +["inventoryDisplayLoaded", { + [ACE_player, _this select 0] call FUNC(updateInventoryDisplay) +}] call EFUNC(common,addEventHandler); + +["playerInventoryChanged", { + params ["_unit"]; + [_unit] call FUNC(takeLoadedATWeapon); + [_unit] call FUNC(updateInventoryDisplay); }] call EFUNC(common,addEventHandler); diff --git a/addons/disposable/XEH_postInitClient.sqf b/addons/disposable/XEH_postInitClient.sqf deleted file mode 100644 index c20dfa886b..0000000000 --- a/addons/disposable/XEH_postInitClient.sqf +++ /dev/null @@ -1,10 +0,0 @@ -// by commy2 - -// The Arma InventoryOpened EH fires actually before the inventory dialog is opened (findDisplay 602 => displayNull). - -#include "script_component.hpp" - -["inventoryDisplayLoaded",{ - [ACE_player] call FUNC(takeLoadedATWeapon); - [ACE_player, (_this select 0)] call FUNC(updateInventoryDisplay); -}] call EFUNC(common,addEventHandler); \ No newline at end of file diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index 8c55209123..ec56f42ff4 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -21,17 +21,14 @@ */ #include "script_component.hpp" -private ["_unit", "_weapon", "_projectile", "_replacementTube", "_items"]; +params ["_unit", "_weapon", "", "", "", "", "_projectile"]; +TRACE_3("params",_unit,_weapon,_projectile); -_unit = _this select 0; -_weapon = _this select 1; -_projectile = _this select 6; - -if (!local _unit) exitWith {}; +if ((!local _unit) || {_weapon != (secondaryWeapon _unit)}) exitWith {}; +private ["_replacementTube", "_items"]; _replacementTube = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_UsedTube"); if (_replacementTube == "") exitWith {}; //If no replacement defined just exit -if (_weapon != (secondaryWeapon _unit)) exitWith {}; //just to be sure //Save array of items attached to launcher @@ -43,19 +40,19 @@ _unit selectWeapon _replacementTube; //Re-add all attachments to the used tube { if (_x != "") then {_unit addSecondaryWeaponItem _x}; -} forEach _items; +} count _items; // AI - Remove the ai's missle launcher tube after the missle has exploded if !([_unit] call EFUNC(common,isPlayer)) then { [{ - EXPLODE_2_PVT(_this,_params,_pfhId); - EXPLODE_3_PVT(_params,_unit,_tube,_projectile); + params ["_args","_idPFH"]; + _args params ["_unit", "_tube", "_projectile"]; //don't do anything until projectile is null (exploded/max range) if (isNull _projectile) then { //Remove PFEH: - [_pfhId] call cba_fnc_removePerFrameHandler; + [_idPFH] call cba_fnc_removePerFrameHandler; //If (tube is dropped) OR (is dead) OR (is player) just exit if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {}; @@ -66,13 +63,13 @@ if !([_unit] call EFUNC(common,isPlayer)) then { _container = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"]; _container setPosAsl (getPosAsl _unit); _container addWeaponCargoGlobal [_tube, 1]; - + //This will duplicate attachements, because we will be adding a weapon that may already have attachments on it //We either need a way to add a clean weapon, or a way to add a fully configured weapon to a container: // { // if (_x != "") then {_container addItemCargoGlobal [_x, 1];}; // } forEach _items; - + _unit removeWeaponGlobal _tube; }; }, 1, [_unit, _replacementTube, _projectile]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf index de3875dfa0..b379584b68 100644 --- a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf +++ b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf @@ -15,16 +15,18 @@ */ #include "script_component.hpp" -private ["_unit", "_launcher", "_config"]; +params ["_unit"]; +TRACE_1("params",_unit); -PARAMS_1(_unit); if (!local _unit) exitWith {}; +private ["_launcher", "_config"]; + _launcher = secondaryWeapon _unit; _config = configFile >> "CfgWeapons" >> _launcher; if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber (_config >> "ACE_isUsedLauncher") != 1} && {count secondaryWeaponMagazine _unit == 0}) then { - private ["_magazine", "_isLauncherSelected"]; + private ["_magazine", "_isLauncherSelected", "_didAdd"]; _magazine = getArray (_config >> "magazines") select 0; @@ -34,14 +36,22 @@ if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber if (backpack _unit == "") then { _unit addBackpack "Bag_Base"; - _unit addMagazine _magazine; + _didAdd = _magazine in (magazines _unit); _unit addWeapon _launcher; - + if (!_didAdd) then { + TRACE_1("Failed To Add Disposable Magazine Normally, doing backup method (no backpack)",_unit); + _unit addSecondaryWeaponItem _magazine; + }; removeBackpack _unit; } else { _unit addMagazine _magazine; + _didAdd = _magazine in (magazines _unit); _unit addWeapon _launcher; + if (!_didAdd) then { + TRACE_2("Failed To Add Disposable Magazine Normally, doing backup method",_unit,(backpack _unit)); + _unit addSecondaryWeaponItem _magazine; + }; }; if (_isLauncherSelected) then { diff --git a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf index 3f9d6f9802..7f50e45089 100644 --- a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf +++ b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf @@ -16,9 +16,8 @@ #include "script_component.hpp" disableSerialization; - -PARAMS_1(_player); -DEFAULT_PARAM(1,_display,(findDisplay 602)); +params ["_player", ["_display",(findDisplay 602),[displayNull]]]; +TRACE_2("params",_player,_display); _player removeMagazines "ACE_PreloadedMissileDummy"; _player removeMagazines "ACE_FiredMissileDummy"; diff --git a/addons/disposable/script_component.hpp b/addons/disposable/script_component.hpp index af1f17bd86..12a05ea60d 100644 --- a/addons/disposable/script_component.hpp +++ b/addons/disposable/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT disposable #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_ATTACH #define DEBUG_MODE_FULL #endif diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index e5c454e969..2ff7d07c0d 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -28,6 +28,11 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initObject)); }; }; + class ACE_RepairItem_Base { + class ADDON { + init = QUOTE(_this call DFUNC(initObject)); + }; + }; }; class Extended_Killed_EventHandlers { diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index 5ac84b7038..d4d791724b 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -83,4 +83,18 @@ class CfgVehicles { GVAR(canCarry) = 0; GVAR(canDrag) = 0; }; + + class ACE_RepairItem_Base: ThingX {}; + + class ACE_Track: ACE_RepairItem_Base { + GVAR(canCarry) = 1; + GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryDirection) = 0; + }; + + class ACE_Wheel: ACE_RepairItem_Base { + GVAR(canCarry) = 1; + GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryDirection) = 0; + }; }; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index 239ecd4e17..a27efae704 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -21,8 +21,8 @@ class ACE_ModuleExplosive: ACE_Module { defaultValue = 1; }; class ExplodeOnDefuse { - displayName = "$STR_ACE_Explosive_ExplodeOnDefuse_DisplayName"; - description = "$STR_ACE_Explosive_ExplodeOnDefuse_Description"; + displayName = CSTRING(ExplodeOnDefuse_DisplayName); + description = CSTRING(ExplodeOnDefuse_Description); typeName = "BOOL"; defaultValue = 1; }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 7768515953..f6ee8ec65e 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -12,7 +12,7 @@ class CfgWeapons { displayName = CSTRING(clacker_displayName); descriptionShort = CSTRING(clacker_description); picture = PATHTOF(Data\UI\Clacker.paa); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_m57.p3d)); ACE_Range = 250; ACE_Detonator = 1; diff --git a/addons/explosives/Data/ace_m57.p3d b/addons/explosives/Data/ace_m57.p3d new file mode 100644 index 0000000000..3c7dd5ebb8 Binary files /dev/null and b/addons/explosives/Data/ace_m57.p3d differ diff --git a/addons/explosives/Data/ace_m57.rvmat b/addons/explosives/Data/ace_m57.rvmat new file mode 100644 index 0000000000..628e9bfe55 --- /dev/null +++ b/addons/explosives/Data/ace_m57.rvmat @@ -0,0 +1,82 @@ +class StageTI { + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.3,0.3,0.3,1}; +specularPower = 3b0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 { + texture="#(rgb,1,1,1)color(0.5,0.5,1,1)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 { + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 { + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 { + texture = "#(ai,32,128,1)fresnel(0.85,0.36)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 { + useWorldEnvMap = "true"; + texture = "a3\data_f\env_interier_car_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/explosives/Data/ace_m57_co.paa b/addons/explosives/Data/ace_m57_co.paa new file mode 100644 index 0000000000..411de2a143 Binary files /dev/null and b/addons/explosives/Data/ace_m57_co.paa differ diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index abd6d83e26..a985b428c1 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -511,6 +511,7 @@ Sistema de explosivos Sprengstoffsystem Systém výbušnin + Sistema de explosivos Require specialists? @@ -518,6 +519,7 @@ ¿Requiere especialista? Benötigt Sprengstoffexperten? Vyžadovat specialistu? + Requer especialista? Require explosive specialists to disable explosives? Default: No @@ -525,6 +527,7 @@ 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 + Requer especialista em explosivos para desativar explosivos? Padrão: Não Punish non-specialists? @@ -532,6 +535,7 @@ ¿Penalizar a los no especialistas? Bestrafe Nicht-Sprengstoffexperten? Potrestat, pokud není specialista? + Punir não especialistas? Increase the time it takes to complete actions for non-specialists? Default: Yes @@ -539,18 +543,28 @@ 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 + Aumentar o tempo necessário para completar ações por não especialistas? Padrão: Sim Explode on defusal? + Explosão no desarmamento? + Eksplozja przy rozbrajaniu? + Explodovat při zneškodňování? + Explotar al desactivar? Enable certain explosives to explode on defusal? Default: Yes + Ativa certos explosivos para detonar no desarmamento? Padrão: Sim + Spraw, aby niektóre ładunki wybuchowe eksplodowały przy próbie ich rozbrojenia? Domyślnie:Tak + Umožnit u některých výbušnin explozi při pokusu je zneškodnit? Výchozí: Ano + ¿Habilitar ciertos explosivos para estallar al desactivar? Por defecto: Sí - + This module adjusts the settings related to explosives. 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. + Este módulo permite personalizar as definições relacionadas a explosivos. - + \ No newline at end of file diff --git a/addons/finger/$PBOPREFIX$ b/addons/finger/$PBOPREFIX$ new file mode 100644 index 0000000000..746f380ecc --- /dev/null +++ b/addons/finger/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\finger \ No newline at end of file diff --git a/addons/finger/ACE_Settings.hpp b/addons/finger/ACE_Settings.hpp new file mode 100644 index 0000000000..a4beb40eb8 --- /dev/null +++ b/addons/finger/ACE_Settings.hpp @@ -0,0 +1,27 @@ +class ACE_Settings { + class GVAR(enabled) { + value = 0; + typeName = "BOOL"; + displayName = CSTRING(enabled_displayName); + }; + class GVAR(maxRange) { + value = 4; + typeName = "SCALAR"; + displayName = CSTRING(maxRange_displayName); + description = CSTRING(maxRange_description); + }; + class GVAR(indicatorForSelf) { + value = 1; + typeName = "BOOL"; + isClientSettable = 1; + displayName = CSTRING(indicatorForSelf_name); + description = CSTRING(indicatorForSelf_description); + }; + class GVAR(indicatorColor) { + value[] = {0.83, 0.68, 0.21, 0.75}; + typeName = "COLOR"; + isClientSettable = 1; + displayName = CSTRING(indicatorColor_name); + description = CSTRING(indicatorColor_description); + }; +}; diff --git a/addons/finger/CfgEventHandlers.hpp b/addons/finger/CfgEventHandlers.hpp new file mode 100644 index 0000000000..917a0acbd7 --- /dev/null +++ b/addons/finger/CfgEventHandlers.hpp @@ -0,0 +1,10 @@ +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/finger/CfgVehicles.hpp b/addons/finger/CfgVehicles.hpp new file mode 100644 index 0000000000..99d9713f00 --- /dev/null +++ b/addons/finger/CfgVehicles.hpp @@ -0,0 +1,25 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(moduleSettings): ACE_Module { + scope = 2; + category = "ACE"; + displayName = CSTRING(moduleSettings_displayName); + icon = QUOTE(PATHTOF(UI\Icon_Module_finger_ca.paa)); + function = QFUNC(moduleSettings); + isGlobal = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class enabled { + displayName = CSTRING(enabled_DisplayName); + typeName = "BOOL"; + defaultValue = 1; + }; + class maxRange { + displayName = CSTRING(maxRange_displayName); + description = CSTRING(maxRange_description); + typeName = "NUMBER"; + defaultValue = 4; + }; + }; + }; +}; diff --git a/addons/finger/README.md b/addons/finger/README.md new file mode 100644 index 0000000000..6c5d55b7aa --- /dev/null +++ b/addons/finger/README.md @@ -0,0 +1,12 @@ +ace_finger +=========== + +Allows players to point and show a virtual spot in the distance to nearby players. + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Drill](https://github.com/TheDrill/) +- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf new file mode 100644 index 0000000000..5d2fa5a261 --- /dev/null +++ b/addons/finger/XEH_postInit.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +GVAR(lastFPTime) = -1; +GVAR(fingersHash) = HASH_CREATE; +GVAR(pfeh_id) = -1; + +["SettingsInitialized", { + //If not enabled, dont't bother adding keybind or eventhandler + if (!GVAR(enabled)) exitWith {}; + + [QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler); + + ["ACE3 Common", + QGVAR(finger), + [(localize LSTRING(keyComb)), (localize LSTRING(keyComb_description))], + { + _this call FUNC(keyPress); + }, + {false}, + [41, [true, false, false]], true] call cba_fnc_addKeybind; // Shift + Tilda (hold) +}] call EFUNC(common,addEventHandler); diff --git a/addons/finger/XEH_preInit.sqf b/addons/finger/XEH_preInit.sqf new file mode 100644 index 0000000000..e7e68cf8ec --- /dev/null +++ b/addons/finger/XEH_preInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(incomingFinger); +PREP(keyPress); +PREP(moduleSettings); +PREP(perFrameEH); + +ADDON = true; diff --git a/addons/finger/config.cpp b/addons/finger/config.cpp new file mode 100644 index 0000000000..2cc3be5ddd --- /dev/null +++ b/addons/finger/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {QGVAR(moduleSettings)}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Drill"}; + authorUrl = "https://github.com/TheDrill/"; + VERSION_CONFIG; + }; +}; + + +#include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf new file mode 100644 index 0000000000..5a1e23a278 --- /dev/null +++ b/addons/finger/functions/fnc_incomingFinger.sqf @@ -0,0 +1,35 @@ +/* + * Author: TheDrill, PabstMirror + * Recieve an finger event, adds to the array (or updates if already present) and starts PFEH if not already running + * + * Arguments: + * 0: Source Unit (can be self) + * 1: Position being pointed at (from positionCameraToWorld) + * + * Return Value: + * None + * + * Example: + * [bob, [1,2,3]] call ace_finger_fnc_incomingFinger; + * + * Public: No + */ +#include "script_component.hpp" + +private ["_data", "_fingerPos"]; + +params ["_sourceUnit", "_fingerPosPrecise"]; + +//add some random float to location if it's not our own finger: +_fingerPos = if (_sourceUnit == ACE_player) then { + _fingerPosPrecise +} else { + _fingerPosPrecise vectorAdd [random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y] +}; + +_data = [ACE_diagTime, _fingerPos, ([_sourceUnit] call EFUNC(common,getName))]; +HASH_SET(GVAR(fingersHash), _sourceUnit, _data); + +if (GVAR(pfeh_id) == -1) then { + GVAR(pfeh_id) = [DFUNC(perFrameEH), 0, []] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf new file mode 100644 index 0000000000..1ce83d62dc --- /dev/null +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -0,0 +1,62 @@ +/* + * Author: TheDrill, PabstMirror + * On keypress, point and send position to nearby players + * + * Arguments: + * None + * + * Return Value: + * Key Handeled + * + * Example: + * [] call ace_finger_fnc_keyPress; + * + * Public: No + */ +#include "script_component.hpp" + +private["_fingerPosPrecise", "_playerEyePos", "_sendFingerToPlayers", "_nearbyMen"]; + +if (!alive ACE_player) exitWith {false}; +// Conditions: canInteract +if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; +//make sure player is dismounted or in a static weapon: +if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false}; +//Check camera view (not in GUNNER) +if !(cameraView in ["INTERNAL", "EXTERNAL"]) exitWith {false}; +//Exit if run recently (run every 1 seconds) +if (ACE_diagTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true}; + +GVAR(lastFPTime) = ACE_diagTime; + +_fingerPosPrecise = positionCameraToWorld [0, 0, FP_DISTANCE]; +_playerEyePos = eyePos ACE_player; + +_sendFingerToPlayers = []; + + +_nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]); +{ + _nearbyMen append (crew _x); +} count (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]); + +{ + if ((((eyePos _x) vectorDistance _playerEyePos) < GVAR(maxRange)) && + {alive _x} && + {(_x == (vehicle _x)) || {(vehicle _x) isKindOf "StaticWeapon"}} && + {GVAR(indicatorForSelf) || {_x != ACE_player}} && + {!(lineIntersects [(eyePos _x), _playerEyePos, ACE_player, _x])} && + {[_x] call EFUNC(common,isPlayer)}) then { + + _sendFingerToPlayers pushBack _x; + }; + true +} count _nearbyMen; + +TRACE_1("sending finger to",_sendFingerToPlayers); + +[QGVAR(fingered), _sendFingerToPlayers, [ACE_player, _fingerPosPrecise]] call EFUNC(common,targetEvent); + +ACE_player playActionNow "GestureGo"; + +true diff --git a/addons/finger/functions/fnc_moduleSettings.sqf b/addons/finger/functions/fnc_moduleSettings.sqf new file mode 100644 index 0000000000..c5189f4562 --- /dev/null +++ b/addons/finger/functions/fnc_moduleSettings.sqf @@ -0,0 +1,20 @@ +/* + * Author: PabstMirror + * Module for fingering settings + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic"]; +if !(isServer) exitWith {}; + +[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf new file mode 100644 index 0000000000..d6297a4095 --- /dev/null +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -0,0 +1,51 @@ +/* + * Author: TheDrill, PabstMirror + * The perFrameEventHandler to draw the icons + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [fromCBA] call ace_finger_fnc_perFrameEH; + * + * Public: No + */ +#include "script_component.hpp" + +private["_drawColor", "_fovCorrection", "_iconSize", "_timeLeftToShow", "_cameraOffset"]; + +if (!alive ACE_player) then {GVAR(fingersHash) = HASH_CREATE;}; +// Conditions: canInteract +if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = HASH_CREATE;}; +//make sure player is dismounted or in a static weapon: +if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = HASH_CREATE;}; + +_cameraOffset = worldToScreen (positionCameraToWorld [1000, 0, 10000]); +_fovCorrection = 0; +if (count _cameraOffset > 0) then {_fovCorrection = (_cameraOffset select 0) - 0.5;}; +_iconSize = BASE_SIZE * _fovCorrection; + +{ + _data = HASH_GET(GVAR(fingersHash), _x); + _data params ["_lastTime", "_pos", "_name"]; + _timeLeftToShow = _lastTime + FP_TIMEOUT - ACE_diagTime; + if (_timeLeftToShow <= 0) then { + HASH_REM(GVAR(fingersHash), _x); + } else { + _drawColor = + GVAR(indicatorColor); + //Fade out: + if (_timeLeftToShow < 0.5) then { + _drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))]; + }; + + drawIcon3D [QUOTE(PATHTOF(UI\fp_icon.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"]; + }; +} count (GVAR(fingersHash) select 0); + +if ((count (GVAR(fingersHash) select 0)) == 0) then { + [GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler; + GVAR(pfeh_id) = -1; +}; diff --git a/addons/finger/functions/script_component.hpp b/addons/finger/functions/script_component.hpp new file mode 100644 index 0000000000..4d3625f072 --- /dev/null +++ b/addons/finger/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\finger\script_component.hpp" \ No newline at end of file diff --git a/addons/finger/script_component.hpp b/addons/finger/script_component.hpp new file mode 100644 index 0000000000..ae96943943 --- /dev/null +++ b/addons/finger/script_component.hpp @@ -0,0 +1,21 @@ +#define COMPONENT finger +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_FINGER + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_FINGER + #define DEBUG_SETTINGS DEBUG_SETTINGS_FINGER +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define BASE_SIZE 44 + +#define FP_TIMEOUT 2 +#define FP_ACTION_TIMEOUT 1 + +#define FP_DISTANCE 10000 +#define FP_RANDOMIZATION_X 350 +#define FP_RANDOMIZATION_Y 100 diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml new file mode 100644 index 0000000000..f11f36d971 --- /dev/null +++ b/addons/finger/stringtable.xml @@ -0,0 +1,50 @@ + + + + + Show pointing indicator to self + Отображать пальце-индикатор для показывающего игрока + Pokaż indykator wskazywania palcem dla siebie + + + Render the indicator for the pointing player. This option doesn't affect whether the other players would see the indicator + Отображать индикатор для показывающего игрока. Эта настройка не влияет на то, будутт ли другие игроки видеть индикатор + Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie. + + + Pointing indicator + Пальце-индикатор + Indykator palca + + + Color of the pointing indicator circle + Цвет индикатора пальце-указания + Kolor okręgu wyświetlanego przy wskazywaniu palcem + + + Action "point a finger at" + Действие "показать пальцем на" + Akcja "wskaż palcem" + + + Points, and shows a virtual marker of where you are looking to nearby units. Can be held down. + Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany. + + + Pointing Settings + Ustawienia wskazywania palcem + + + Pointing Enabled + Aktywuj wskazywanie + + + Pointing Max Range + Maks. zasięg wskazywania + + + Max range between players to show the pointing indicator [default: 4 meters] + Określ dystans na jakim można wskazywać coś palcem innym graczom. [domyślnie: 4m] + + + diff --git a/addons/finger/ui/Icon_Module_finger_ca.paa b/addons/finger/ui/Icon_Module_finger_ca.paa new file mode 100644 index 0000000000..2d8de25b9b Binary files /dev/null and b/addons/finger/ui/Icon_Module_finger_ca.paa differ diff --git a/addons/finger/ui/fp_icon.paa b/addons/finger/ui/fp_icon.paa new file mode 100644 index 0000000000..9fccb144f1 Binary files /dev/null and b/addons/finger/ui/fp_icon.paa differ diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 95c921df64..af3464c2b6 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -6,7 +6,7 @@ if(GVAR(EnableDebugTrace) && !isMultiplayer) then { }; if(isServer) then { - [QGVAR(frag_eh), { _this call FUNC(frago); }] call ace_common_fnc_addEventHandler; + [QGVAR(frag_eh), { _this call FUNC(frago); }] call EFUNC(common,addEventHandler); }; [FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/frag/functions/fnc_addBlackList.sqf b/addons/frag/functions/fnc_addBlackList.sqf index 95edcd1590..53c163b04c 100644 --- a/addons/frag/functions/fnc_addBlackList.sqf +++ b/addons/frag/functions/fnc_addBlackList.sqf @@ -1,4 +1,4 @@ #include "script_component.hpp" private ["_round"]; _round = _this select 0; -GVAR(blackList) set[(count GVAR(blackList)), _round]; \ No newline at end of file +GVAR(blackList) set [(count GVAR(blackList)), _round]; diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf index 1fae55278e..5d7857c67a 100644 --- a/addons/frag/functions/fnc_addPfhRound.sqf +++ b/addons/frag/functions/fnc_addPfhRound.sqf @@ -1,8 +1,9 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" -private ["_enabled","_doFragTrack", "_doSpall", "_spallTrack", "_spallTrackID"]; +private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"]; PARAMS_3(_gun,_type,_round); +DEFAULT_PARAM(3,_doFragTrack,false); if (!GVAR(enabled)) exitWith {}; @@ -16,7 +17,6 @@ if(_round in GVAR(blackList)) exitWith { // Exit on max track if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { }; -_doFragTrack = false; if(_gun == ACE_player) then { _doFragTrack = true; } else { @@ -28,14 +28,16 @@ if(_gun == ACE_player) then { }; }; }; + +_doSpall = false; if(GVAR(SpallEnabled)) then { if(GVAR(spallIsTrackingCount) <= 0) then { GVAR(spallHPData) = []; }; if(GVAR(spallIsTrackingCount) > 5) then { // ACE_player sideChat "LIMT!"; - _doSpall = false; } else { + _doSpall = true; GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1; }; }; @@ -46,30 +48,27 @@ if(GVAR(autoTrace)) then { }; // We only do the single track object check here. -// We should do an {!(_round in GVAR(objects))} +// We should do an {!(_round in GVAR(objects))} // But we leave that out here for optimization. So this cannot be a framework function // Otherwise, it should only be added once and from the FiredEH if(_doFragTrack && alive _round) then { _spallTrack = []; _spallTrackID = []; - + private["_args"]; _args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID, - (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))), - (getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")), - (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")), - (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))), - (getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"))))) - ]; + (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))), + (getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")), + (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")), + (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))), + (getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"))))) + ]; TRACE_1("Initializing track", _round); GVAR(objects) pushBack _round; GVAR(arguments) pushBack _args; - + if(_doSpall) then { [_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack); }; // ACE_player sideChat "WTF2"; }; - - - diff --git a/addons/frag/functions/fnc_addTrack.sqf b/addons/frag/functions/fnc_addTrack.sqf index 32dec890c9..680dc31c37 100644 --- a/addons/frag/functions/fnc_addTrack.sqf +++ b/addons/frag/functions/fnc_addTrack.sqf @@ -20,4 +20,4 @@ _positions set[(count _positions), [(getPos _obj), _objSpd]]; _data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color]; GVAR(traces) set[_index, _data]; -[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call cba_fnc_addPerFrameHandler; +[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf index 911203dc5f..b0e24f0972 100644 --- a/addons/frag/functions/fnc_doReflections.sqf +++ b/addons/frag/functions/fnc_doReflections.sqf @@ -18,5 +18,5 @@ if(_depth <= 2) then { _testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0]; - [DFUNC(findReflections), 0, _testParams] call cba_fnc_addPerFrameHandler; + [DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf index 1e8e87bcb3..a5a5472e1b 100644 --- a/addons/frag/functions/fnc_doSpall.sqf +++ b/addons/frag/functions/fnc_doSpall.sqf @@ -2,12 +2,11 @@ #include "script_component.hpp" // ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA"; -private ["_params", "_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"]; +private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"]; -_params = _this select 0; -_hitData = _params select 0; +_hitData = _this select 0; _initialData = GVAR(spallHPData) select (_hitData select 0); -_hpData = (_hitData select 1) select (_params select 1); +_hpData = (_hitData select 1) select (_this select 1); _object = _hpData select 0; @@ -149,4 +148,4 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then { }; }; }; -}; \ No newline at end of file +}; diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index 75c4ee2ae6..193e1e7154 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -1,11 +1,7 @@ //fnc_findReflections.sqf #include "script_component.hpp" -private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", - "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", - "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", - "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec"]; - +private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"]; _params = _this select 0; _pos = _params select 0; @@ -46,7 +42,7 @@ if(_zIndex < 5) then { // } forEach _res; // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; // TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]]; - + }; // if(terrainIntersectASL [_pos, _testPos]) exitWith {}; _lastPos = _testPos; @@ -91,7 +87,7 @@ if(_zIndex < 5) then { _avgX = 0; _avgY = 0; _avgZ = 0; - + { _avgX = _avgX + (_x select 0); _avgY = _avgY + (_x select 1); @@ -99,7 +95,7 @@ if(_zIndex < 5) then { } forEach _blist; _c = count _blist; _bpos = [_avgX/_c, _avgY/_c, _avgZ/_c]; - + _distance = _pos vectorDistance _bpos; _hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0); // _hitFactor = 1/(_distance^2); @@ -108,16 +104,16 @@ if(_zIndex < 5) then { _hit = _hit - (_hit%10); _range = (floor (_indirectHitRange-(_distance/4))) min 100; _range = _range - (_range%2); - + if(_hit >= 10 && _range > 0) then { // TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]]; // TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]]; _refExp = format["ace_explosion_reflection_%1_%2", _range, _hit]; // _refExp createVehicle (ASLtoATL _bpos); // drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""]; - + _explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth]; - + }; if(count _explosions > (_radi*2)/_depth) exitWith {}; } forEach _buckets; @@ -125,6 +121,6 @@ if(_zIndex < 5) then { // _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3")))); // _dirvec = _dirvec vectorMultiply 100; // _can setVelocity _dirvec; - [DFUNC(doExplosions), 0, [_explosions, 0]] call cba_fnc_addPerFrameHandler; + [DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler; [(_this select 1)] call cba_fnc_removePerFrameHandler; }; diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index a7c5577cb9..693b85eb3d 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -1,58 +1,8 @@ #include "script_component.hpp" - -private ["_enabled", "_gun", "_type", "_round", "_doFragTrack", "_doSpall", "_spallTrack", "_spallTrackID"]; - -if (!GVAR(enabled)) exitWith {}; +private["_gun", "_type", "_round"]; _gun = _this select 0; _type = _this select 4; _round = _this select 6; -_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled)); -if(_enabled < 1) exitWith {}; - -if(_round in GVAR(blackList)) exitWith { - GVAR(blackList) = GVAR(blackList) - [_round]; -}; - - -_doFragTrack = false; -if(_gun == ACE_player) then { - _doFragTrack = true; -} else { - if((gunner _gun) == ACE_player) then { - _doFragTrack = true; - } else { - if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then { - _doFragTrack = true; - }; - }; -}; -_doSpall = false; -if(_doSpall) then { - if(GVAR(spallIsTrackingCount) <= 0) then { - GVAR(spallHPData) = []; - }; - if(GVAR(spallIsTrackingCount) > 5) then { - // ACE_player sideChat "LIMT!"; - _doSpall = false; - } else { - GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1; - }; -}; -// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)]; - -#ifdef DEBUG_MODE_FULL -[ACE_player, _round, [1,0,0,1]] call FUNC(addTrack); -#endif - -if(_doFragTrack && alive _round) then { - GVAR(trackedObjects) pushBack _round; - _spallTrack = []; - _spallTrackID = []; - [DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, ACE_time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler; - if(_doSpall) then { - [_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack); - }; - // ACE_player sideChat "WTF2"; -}; +[_gun, _type, _round] call FUNC(addPfhRound); diff --git a/addons/frag/functions/fnc_masterPFH.sqf b/addons/frag/functions/fnc_masterPFH.sqf index 4e81c4c609..637cc02f81 100644 --- a/addons/frag/functions/fnc_masterPFH.sqf +++ b/addons/frag/functions/fnc_masterPFH.sqf @@ -4,7 +4,7 @@ * Master single PFH abstraction for all rounds being tracked by frag/spall * * Arguments: - * + * * * Return Value: * None @@ -15,30 +15,22 @@ if (!GVAR(enabled)) exitWith {}; -private["_gcIndex"]; +private["_gcIndex", "_iter"]; _gcIndex = []; _iter = 0; -while { (count GVAR(objects)) > 0 && { _iter < GVAR(MaxTrackPerFrame) } } do { +while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do { private["_object", "_args"]; if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then { GVAR(lastIterationIndex) = 0; }; _object = GVAR(objects) select GVAR(lastIterationIndex); - + if(!isNil "_object") then { - if(isNull _object) then { - _gcIndex pushBack GVAR(lastIterationIndex); - } else { - _args = GVAR(arguments) select GVAR(lastIterationIndex); - - if(!(_args call FUNC(pfhRound))) then { - _gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false - }; - // If its not alive anymore, remove it from the queue, it already ran once on dead - if(!alive _object) then { - _gcIndex pushBack GVAR(lastIterationIndex); - }; + _args = GVAR(arguments) select GVAR(lastIterationIndex); + + if(!(_args call FUNC(pfhRound))) then { + _gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false }; }; _iter = _iter + 1; @@ -53,6 +45,6 @@ _deletionCount = 0; _deleteIndex = _x - _deletionCount; GVAR(objects) deleteAt _deleteIndex; GVAR(arguments) deleteAt _deleteIndex; - + _deletionCount = _deletionCount + 1; -} forEach _gcIndex; \ No newline at end of file +} forEach _gcIndex; diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf index 2c0d8944e7..8aa2303c0d 100644 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ b/addons/frag/functions/fnc_pfhRound.sqf @@ -14,15 +14,15 @@ _indirectRange = _this select 11; _force = _this select 12; _fragPower = _this select 13; -if(_round in GVAR(blackList)) exitWith { +if(_round in GVAR(blackList)) exitWith { false }; -if (!alive _round) then { - if((diag_frameno - _firedFrame) > 1) then { +if (!alive _round) exitWith { + if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame if(_skip == 0) then { if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then { - [QGVAR(frag_eh), _this] call ace_common_fnc_serverEvent; + [QGVAR(frag_eh), _this] call EFUNC(common,serverEvent); }; }; }; @@ -35,15 +35,16 @@ if (!alive _round) then { }; } forEach _spallTrack; }; -} else { - - _params set[1, (getPosASL _round)]; - _params set[2, (velocity _round)]; - if(_doSpall) then { - private["_scale"]; - _scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1; - [_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack); - }; + false }; -true \ No newline at end of file +_this set[1, (getPosASL _round)]; +_this set[2, (velocity _round)]; + +if(_doSpall) then { + private["_scale"]; + _scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1; + [_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack); +}; + +true diff --git a/addons/frag/functions/fnc_removePfhRound.sqf b/addons/frag/functions/fnc_removePfhRound.sqf index 7fe3994d55..92b09aad6d 100644 --- a/addons/frag/functions/fnc_removePfhRound.sqf +++ b/addons/frag/functions/fnc_removePfhRound.sqf @@ -2,8 +2,10 @@ // THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD +PARAMS_1(_round); + if(_round in GVAR(blackList)) then { GVAR(blackList) = GVAR(blackList) - [_round]; }; -GVAR(objects) = GVAR(objects) - [_round]; \ No newline at end of file +GVAR(objects) = GVAR(objects) - [_round]; diff --git a/addons/frag/functions/fnc_removeTrack.sqf b/addons/frag/functions/fnc_removeTrack.sqf index 804719a7ca..d14b55b172 100644 --- a/addons/frag/functions/fnc_removeTrack.sqf +++ b/addons/frag/functions/fnc_removeTrack.sqf @@ -11,4 +11,4 @@ if(IS_ARRAY((_this select 0))) then { _ret = false; }; }; -_ret \ No newline at end of file +_ret diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf index 5e3719cb47..3756bb1416 100644 --- a/addons/frag/functions/fnc_spallHP.sqf +++ b/addons/frag/functions/fnc_spallHP.sqf @@ -21,7 +21,7 @@ if ((_this select 0) <= (count GVAR(spallHPData))) then { // diag_log text format["%1: %2", _forEachIndex, _x]; // } forEach _hp; // } forEach (_this select 1); - [DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler; + [DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame); // player sideChat "WEEE"; } forEach (_this select 1); }; diff --git a/addons/frag/functions/fnc_startTracing.sqf b/addons/frag/functions/fnc_startTracing.sqf index 4ed9240ed6..5c0c8aaf77 100644 --- a/addons/frag/functions/fnc_startTracing.sqf +++ b/addons/frag/functions/fnc_startTracing.sqf @@ -1,5 +1,5 @@ #include "script_component.hpp" if(!GVAR(tracesStarted)) then { GVAR(tracesStarted) = true; - GVAR(traceID) = [FUNC(drawTraces), 0, []] call cba_fnc_addPerFrameHandler; -}; \ No newline at end of file + GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/frag/functions/fnc_stopTracing.sqf b/addons/frag/functions/fnc_stopTracing.sqf index 56d7508d6b..13c8f31f33 100644 --- a/addons/frag/functions/fnc_stopTracing.sqf +++ b/addons/frag/functions/fnc_stopTracing.sqf @@ -2,4 +2,4 @@ if(GVAR(tracesStarted)) then { GVAR(tracesStarted) = false; [GVAR(traceID)] call cba_fnc_removePerFrameHandler; -}; \ No newline at end of file +}; diff --git a/addons/frag/functions/fnc_trackFragRound.sqf b/addons/frag/functions/fnc_trackFragRound.sqf deleted file mode 100644 index e6a24f62bd..0000000000 --- a/addons/frag/functions/fnc_trackFragRound.sqf +++ /dev/null @@ -1,52 +0,0 @@ -//fnc_trackFragRound.sqf -#include "script_component.hpp" -private ["_params", "_round", "_lastPos", "_lastVel", "_type", "_time", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; -_params = _this select 0; -_round = _params select 0; -_lastPos = _params select 1; -_lastVel = _params select 2; -_type = _params select 3; -_time = _params select 4; -_doSpall = _params select 6; -_spallTrack = _params select 7; -_foundObjectHPIds = _params select 8; - -if (!alive _round) then { - [_this select 1] call cba_fnc_removePerFrameHandler; - if(_time != ACE_time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then { - GVAR(trackedObjects) = GVAR(trackedObjects) - [_round]; - _skip = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip)); - if(_skip == 0) then { - _explosive = getNumber (configFile >> "CfgAmmo" >> _type >> "explosive"); - _indirectRange = getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange"); - _force = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force)); - _fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt(_indirectRange)); - if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then { - [QGVAR(frag_eh), _params] call ace_common_fnc_serverEvent; - GVAR(trackedObjects) = GVAR(trackedObjects) - [_round]; - }; - }; - }; - if(_doSpall) then { - GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1; - // diag_log text format["F: %1", _foundObjectHPIds]; - { - if(!isNil "_x") then { - _x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex]; - }; - } forEach _spallTrack; - }; -} else { - if(!(_round in GVAR(trackedObjects)) || {_round in GVAR(blackList)}) then { - [_this select 1] call cba_fnc_removePerFrameHandler; - if(_round in GVAR(blackList)) then { - GVAR(blackList) = GVAR(blackList) - [_round]; - }; - }; - - _params set[1, (getPosASL _round)]; - _params set[2, (velocity _round)]; - if(_doSpall) then { - [_round, 1, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack); - }; -}; diff --git a/addons/frag/functions/fnc_trackTrace.sqf b/addons/frag/functions/fnc_trackTrace.sqf index 371d58b3b1..b87892ab15 100644 --- a/addons/frag/functions/fnc_trackTrace.sqf +++ b/addons/frag/functions/fnc_trackTrace.sqf @@ -8,7 +8,7 @@ _index = _params select 1; if (alive _tracerObj && (count GVAR(traces)) > 0) then { _data = GVAR(traces) select _index; _positions = _data select 4; - _positions set[(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]]; + _positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]]; } else { [(_this select 1)] call cba_fnc_removePerFrameHandler; }; diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index fb25760e94..5a59b15a4a 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -7,6 +7,7 @@ Simulación de fragmentación Splittersimulation Simulace fragmentace + Simulação de fragmentação Enable the ACE Fragmentation Simulation @@ -14,6 +15,7 @@ Aktywuje symulację fragmentacji ACE Aktiviere die ACE-Splittersimulation Povolit ACE simulaci fragmentace + Ativa a simulação de fragmentação do ACE Spalling Simulation @@ -21,6 +23,7 @@ Symulacja odprysków Explosionssimulation Simulace úlomků + Simulação de estilhaços Enable the ACE Spalling Simulation @@ -28,6 +31,7 @@ Aktywuje symulację odprysków ACE Aktiviere ACE-Explosionssimulation Povolit ACE simulaci úlomků + Ativa a simulação de estilhaços do ACE Maximum Projectiles Tracked @@ -35,6 +39,7 @@ Maks. liczba śledzonych pocisków Maximalzahl der verfolgten Projektile Maximální počet sledovaných projektilů + Máximo de projéteis rastreados 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) @@ -42,6 +47,7 @@ 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) + Esta definição controla a quantidade máxima de projéteis que o sistema de fragmentação e estilhaçamento irá acompanhar em qualquer momento. Se mais projéteis são disparados, eles não serão rastreados. Diminua essa configuração se você não quiser que o FPS caia em cenários com alta contagem de projéteis (> 200 projéteis no ar ao mesmo tempo) Maximum Projectiles Per Frame @@ -49,6 +55,7 @@ Maximale Anzahl an Projektilen pro Frame Maks. liczba pocisków na klatkę Maximální počet projektilů ze jeden snímek + Projéteis máximos por quadro 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. @@ -56,12 +63,15 @@ 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. + O número de cálculos por estilhaço rastreado para executar em qualquer quadro. Isso ajuda a distribuir o impacto no FPS do rastreamento de estilhaço em vários quadros, o que limita o seu impacto ainda mais. (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ů + (nur SP) Splitter-/Explosions-Debug-Verfolgung + (Somente SP) Depuração de fragmentação e estilhaços traçantes (SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only. @@ -69,6 +79,7 @@ (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. + (Somente SP) Requer um reinício de missão / editor. Habilita o rastreamento visual de projéteis de fragmentação e estilhaçamento apenas no modo de jogo SP. - \ No newline at end of file + diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index c557827e17..95b699eb1c 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -2,15 +2,15 @@ #define COLOUR 8.0 class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"Garth 'L-H' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Garth 'L-H' de Wet"}; + authorUrl = "http://garth.snakebiteink.co.za/"; + VERSION_CONFIG; + }; }; #include "CfgEventHandlers.hpp" @@ -165,10 +165,6 @@ class CfgGlasses { ACE_Resistance = 1; }; - class AV_ESS_blk:None{ - COMBAT_GOGGLES - }; - class G_Balaclava_blk; class G_Balaclava_combat:G_Balaclava_blk { diff --git a/addons/goggles/functions/fnc_applyDust.sqf b/addons/goggles/functions/fnc_applyDust.sqf index 17824253ff..35677657a7 100644 --- a/addons/goggles/functions/fnc_applyDust.sqf +++ b/addons/goggles/functions/fnc_applyDust.sqf @@ -56,4 +56,4 @@ GVAR(DustHandler) = [{ GVAR(DustHandler) = -1; }; }; -},0,[]] call CALLSTACK(cba_fnc_addPerFrameHandler); +},0,[]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index b1559c6cfe..e78f1d52de 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -2,7 +2,7 @@ #include "script_component.hpp" -["flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call EFUNC(common,addEventHandler); +["flashbangExplosion", DFUNC(flashbangExplosionEH)] call EFUNC(common,addEventHandler); if !(hasInterface) exitWith {}; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 50dc7cd288..cd85c3fe36 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -6,7 +6,7 @@ * 0: The grenade * * Return Value: - * Nothing + * None * * Example: * [theGrenade] call ace_grenades_fnc_flashbangExplosionEH @@ -15,9 +15,8 @@ */ #include "script_component.hpp" -private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"]; - -PARAMS_1(_grenade); +private ["_affected", "_strength", "_posGrenade", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"]; +params ["_grenade"]; _affected = _grenade nearEntities ["CAManBase", 20]; @@ -34,13 +33,13 @@ _affected = _grenade nearEntities ["CAManBase", 20]; _x setSkill ((skill _x) / 50); [{ - PARAMS_1(_unit); + params ["_unit"]; //Make sure we don't enable AI for unconscious units if (!(_unit getVariable ["ace_isunconscious", false])) then { [_unit, false] call EFUNC(common,disableAI); }; _unit setSkill (skill _unit * 50); - }, [_x], (7 * _strength), 0.1] call EFUNC(common,waitAndExecute); //0.1 precision is fine for AI + }, [_x], (7 * _strength)] call EFUNC(common,waitAndExecute); } else { //Do effects for player // is there line of sight to the grenade? @@ -48,13 +47,11 @@ _affected = _grenade nearEntities ["CAManBase", 20]; _eyePos = eyePos ACE_player; //PositionASL _posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground - _losCount = 0; //Check for line of sight (check 4 points in case grenade is stuck in an object or underground) - { - if (!lineIntersects [(_posGrenade vectorAdd _x), _eyePos, _grenade, ACE_player]) then { - _losCount = _losCount + 1; - }; - } forEach [[0,0,0], [0,0,0.2], [0.1, 0.1, 0.1], [-0.1, -0.1, 0.1]]; + _losCount = { + (!lineIntersects [(_posGrenade vectorAdd _x), _eyePos, _grenade, ACE_player]) + } count [[0,0,0], [0,0,0.2], [0.1, 0.1, 0.1], [-0.1, -0.1, 0.1]]; + TRACE_1("Line of sight count (out of 4)",_losCount); if (_losCount <= 1) then { _strength = _strength / 10; @@ -62,7 +59,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //Add ace_hearing ear ringing sound effect if ((isClass (configFile >> "CfgPatches" >> "ACE_Hearing")) && {_strength > 0}) then { - [_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging); + [_x, (20 * _strength)] call EFUNC(hearing,earRinging); }; // account for people looking away by slightly @@ -78,7 +75,6 @@ _affected = _grenade nearEntities ["CAManBase", 20]; TRACE_1("Final strength for player",_strength); - //Add ace_medical pain effect: if ((isClass (configFile >> "CfgPatches" >> "ACE_Medical")) && {_strength > 0.1}) then { [ACE_player, (_strength / 2)] call EFUNC(medical,adjustPainLevel); @@ -93,9 +89,9 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //Delete the light after 0.1 seconds [{ - PARAMS_1(_light); + params ["_light"]; deleteVehicle _light; - }, [_light], 0.1, 0] call EFUNC(common,waitAndExecute); + }, [_light], 0.1] call EFUNC(common,waitAndExecute); // blind player if (_strength > 0.1) then { @@ -105,7 +101,7 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //PARTIALRECOVERY - start decreasing effect over ACE_time [{ - PARAMS_1(_strength); + params ["_strength"]; GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]]; GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength); }, [_strength], (7 * _strength), 0] call EFUNC(common,waitAndExecute); @@ -113,8 +109,9 @@ _affected = _grenade nearEntities ["CAManBase", 20]; //FULLRECOVERY - end effect [{ GVAR(flashbangPPEffectCC) ppEffectEnable false; - }, [], (17 * _strength), 0] call EFUNC(common,waitAndExecute); + }, [], (17 * _strength)] call EFUNC(common,waitAndExecute); }; }; }; -} forEach _affected; + true +} count _affected; diff --git a/addons/grenades/functions/fnc_flashbangThrownFuze.sqf b/addons/grenades/functions/fnc_flashbangThrownFuze.sqf index 377793ca7b..f0e2406b53 100644 --- a/addons/grenades/functions/fnc_flashbangThrownFuze.sqf +++ b/addons/grenades/functions/fnc_flashbangThrownFuze.sqf @@ -6,7 +6,7 @@ * 0: projectile - Flashbang Grenade * * Return Value: - * Nothing + * None * * Example: * [theFlashbang] call ace_grenades_fnc_flashbangThrownFuze @@ -14,12 +14,11 @@ * Public: No */ #include "script_component.hpp" - -PARAMS_1(_projectile); +params ["_projectile"]; if (alive _projectile) then { playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400]; - + private "_affected"; _affected = _projectile nearEntities ["CAManBase", 50]; ["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent); diff --git a/addons/grenades/functions/fnc_nextMode.sqf b/addons/grenades/functions/fnc_nextMode.sqf index 913906b8f8..7789e12ac4 100644 --- a/addons/grenades/functions/fnc_nextMode.sqf +++ b/addons/grenades/functions/fnc_nextMode.sqf @@ -3,7 +3,7 @@ * Select the next throwing mode and display message. * * Arguments: - * Nothing + * None * * Return Value: * Handeled diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index c7bc09a261..03e67a152a 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -12,7 +12,7 @@ * 6: projectile - Object of the projectile that was shot * * Return Value: - * Nothing + * None * * Example: * [clientFiredBIS-XEH] call ace_grenades_fnc_throwGrenade @@ -21,11 +21,8 @@ */ #include "script_component.hpp" -private ["_unit", "_weapon", "_projectile", "_mode", "_fuzeTime"]; - -_unit = _this select 0; -_weapon = _this select 1; -_projectile = _this select 6; +private ["_mode", "_fuzeTime"]; +params ["_unit", "_weapon", "", "", "", "", "_projectile"]; if (_unit != ACE_player) exitWith {}; if (_weapon != "Throw") exitWith {}; diff --git a/addons/grenades/textures/ace_m84.rvmat b/addons/grenades/textures/ace_m84.rvmat index e668125e70..1bfb6ffc0f 100644 --- a/addons/grenades/textures/ace_m84.rvmat +++ b/addons/grenades/textures/ace_m84.rvmat @@ -8,85 +8,85 @@ PixelShaderID = "Super"; VertexShaderID = "Super"; class Stage1 { - texture = "z\ace\addons\grenades\textures\ace_m84_nohq.paa"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "z\ace\addons\grenades\textures\ace_m84_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage2 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {0,9,0}; - up[] = {4.5,0,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {0,9,0}; + up[] = {4.5,0,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage3 { - texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0,MC)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage4 { - texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage5 { - texture = "z\ace\addons\grenades\textures\ace_m84_smdi.paa"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; + texture = "z\ace\addons\grenades\textures\ace_m84_smdi.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; class Stage6 { - texture = "#(ai,16,2,2)fresnel(10.4,8.3)"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,1}; - pos[] = {0,0,0}; - }; + texture = "#(ai,16,2,2)fresnel(10.4,8.3)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; }; class Stage7 { - texture = "a3\data_f\env_land_co.paa"; - uvSource = "tex"; - class uvTransform - { - aside[] = {1,0,0}; - up[] = {0,1,0}; - dir[] = {0,0,0}; - pos[] = {0,0,0}; - }; -}; \ No newline at end of file + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/hearing/ACE_Settings.hpp b/addons/hearing/ACE_Settings.hpp index c0f69dda65..867914b857 100644 --- a/addons/hearing/ACE_Settings.hpp +++ b/addons/hearing/ACE_Settings.hpp @@ -2,6 +2,8 @@ class ACE_Settings { class GVAR(EnableCombatDeafness) { value = 1; typeName = "BOOL"; + displayName = CSTRING(CombatDeafness_DisplayName); + description = CSTRING(CombatDeafness_Description); }; class GVAR(EarplugsVolume) { value = 0.5; diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index 1cf06910b0..44ea8f734f 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -109,6 +109,27 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 1; }; + class DisableEarRinging { + displayName = CSTRING(DisableEarRinging); + typeName = "NUMBER"; + class values { + class DoNotForce { + default = 1; + name = ECSTRING(common,DoNotForce); + value = -1; + }; + /* Probably don't want to allow forcing ear ringing for people who have serious problems with the effect + class NotDisabled { + name = ECSTRING(common,No); + value = 0; + }; + */ + class IsDisabled { + name = ECSTRING(common,Yes); + value = 1; + }; + }; + }; }; class ModuleDescription { description = CSTRING(Module_Description); diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index 11ad91f658..2806ef9970 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -5,11 +5,47 @@ class CfgWeapons { class ACE_EarPlugs: ACE_ItemCore { displayName = CSTRING(EarPlugs_Name); descriptionShort = CSTRING(EarPlugs_Description); - model = PATHTOF(ACE_earplugs.p3d); + model = QUOTE(PATHTOF(data\ace_earplugs.p3d)); picture = PATHTOF(UI\ACE_earplugs_x_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; }; }; + + class H_HelmetB; + class H_HelmetCrew_B: H_HelmetB { + GVAR(protection) = 1; + GVAR(lowerVolume) = 0.80; + }; + class H_HelmetCrew_0: H_HelmetCrew_B {}; + class H_HelmetCrew_I: H_HelmetCrew_B {}; + + class H_CrewHelmetHeli_B: H_HelmetB { + GVAR(protection) = 0.85; + GVAR(lowerVolume) = 0.75; + }; + class H_CrewHelmetHeli_O: H_CrewHelmetHeli_B {}; + class H_CrewHelmetHeli_I: H_CrewHelmetHeli_B {}; + + class H_PilotHelmetHeli_B: H_HelmetB { + GVAR(protection) = 0.85; + GVAR(lowerVolume) = 0.75; + }; + class H_PilotHelmetHeli_O: H_PilotHelmetHeli_B {}; + class H_PilotHelmetHeli_I: H_PilotHelmetHeli_B {}; + + class H_PilotHelmetFighter_B: H_HelmetB { + GVAR(protection) = 1; + GVAR(lowerVolume) = 0.80; + }; + class H_PilotHelmetFighter_O: H_PilotHelmetFighter_B {}; + class H_PilotHelmetFighter_I: H_PilotHelmetFighter_B {}; + + class H_Cap_headphones: H_HelmetB { + GVAR(protection) = 0.5; + GVAR(lowerVolume) = 0.60; + }; + class H_Cap_marshal: H_Cap_headphones {}; }; + diff --git a/addons/hearing/UI/earplug_co.paa b/addons/hearing/UI/earplug_co.paa deleted file mode 100644 index 94ba616adb..0000000000 Binary files a/addons/hearing/UI/earplug_co.paa and /dev/null differ diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index ad7fddcd98..ad73ed55d5 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -2,8 +2,9 @@ if (!hasInterface) exitWith {}; -GVAR(currentDeafness) = 0; -GVAR(newStrength) = 0; +GVAR(deafnessDV) = 0; +GVAR(deafnessPrior) = 0; +GVAR(volume) = 1; GVAR(playerVehAttenuation) = 1; GVAR(beep) = false; @@ -11,10 +12,11 @@ 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; +["SettingsInitialized", { + // Spawn volume updating process + [FUNC(updateVolume), 1, [false] ] call CBA_fnc_addPerFrameHandler; +}] call EFUNC(common,addEventHandler); //Update veh attunation when player veh changes ["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call EFUNC(common,addEventHandler); @@ -22,14 +24,13 @@ GVAR(earRingingPFH) = -1; //Reset deafness on respawn (or remote control player switch) ["playerChanged", { - ACE_player setVariable [QGVAR(dv), 0]; - ACE_player setVariable [QGVAR(prior), 0]; + GVAR(deafnessDV) = 0; + GVAR(deafnessPrior) = 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/ace_earplugs.p3d b/addons/hearing/ace_earplugs.p3d deleted file mode 100644 index 5054aba858..0000000000 Binary files a/addons/hearing/ace_earplugs.p3d and /dev/null differ diff --git a/addons/hearing/config.cpp b/addons/hearing/config.cpp index 1007b2095d..5d130e589a 100644 --- a/addons/hearing/config.cpp +++ b/addons/hearing/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {"ACE_EarPlugs"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_interaction"}; + requiredAddons[] = {"ace_interaction", "A3_Characters_F", "A3_Characters_F_Kart"}; author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2", "Rocko", "Rommel", "Ruthberg"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; diff --git a/addons/hearing/data/ace_earplugs.p3d b/addons/hearing/data/ace_earplugs.p3d new file mode 100644 index 0000000000..c6d4295212 Binary files /dev/null and b/addons/hearing/data/ace_earplugs.p3d differ diff --git a/addons/hearing/data/ace_earplugs_co.paa b/addons/hearing/data/ace_earplugs_co.paa new file mode 100644 index 0000000000..25dd6378b4 Binary files /dev/null and b/addons/hearing/data/ace_earplugs_co.paa differ diff --git a/addons/hearing/functions/fnc_addEarPlugs.sqf b/addons/hearing/functions/fnc_addEarPlugs.sqf index 455de07fd9..62ed4518e2 100644 --- a/addons/hearing/functions/fnc_addEarPlugs.sqf +++ b/addons/hearing/functions/fnc_addEarPlugs.sqf @@ -15,9 +15,12 @@ */ #include "script_component.hpp" -private ["_unit", "_launcher"]; +PARAMS_1(_unit); -_unit = _this select 0; +// Exit if hearing is disabled or soldier has earplugs already in (persistence scenarios) +if (!GVAR(enableCombatDeafness) || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {}; + +private ["_launcher"]; // add earplugs if the soldier has a rocket launcher _launcher = secondaryWeapon _unit; diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 96482f5b79..6a896c1820 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -16,77 +16,23 @@ */ #include "script_component.hpp" -if (GVAR(DisableEarRinging)) exitWith {}; - PARAMS_2(_unit,_strength); -if (isNull _unit) exitWith {}; +if (_unit != ACE_player) exitWith {}; if (_strength < 0.05) exitWith {}; +if (!isNull curatorCamera) exitWith {}; if (_unit getVariable ["ACE_hasEarPlugsin", false]) then { _strength = _strength / 4; }; -_unit setVariable [QGVAR(dv), (_unit getVariable [QGVAR(dv), 0]) + _strength]; +//headgear hearing protection +if(headgear _unit != "") then { + private ["_protection"]; + _protection = (getNumber (configFile >> "CfgWeapons" >> (headgear _unit) >> QGVAR(protection))) min 1; + if(_protection > 0) then { + _strength = _strength * (1 - _protection); + }; +}; -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; - }; - - // 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; +GVAR(deafnessDV) = GVAR(deafnessDV) + _strength; diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf index cb9202618f..dde9bc50cc 100644 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ b/addons/hearing/functions/fnc_explosionNear.sqf @@ -16,6 +16,9 @@ */ #include "script_component.hpp" +//Only run if deafness or ear ringing is enabled: +if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {}; + PARAMS_2(_unit,_damage); private ["_strength"]; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 4164f81b33..6fc48b27fa 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -21,17 +21,18 @@ */ #include "script_component.hpp" -private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"]; +//Only run if deafness or ear ringing is enabled: +if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {}; PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo); -//Only run if combatDeafness enabled: -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 {}; +private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"]; + _vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)}; _distance = 1 max _distance; @@ -67,7 +68,7 @@ if (count _weaponMagazines == 0) then { _magazine = ""; { - EXPLODE_2_PVT(_x,_magazineType,_ammoType) + EXPLODE_2_PVT(_x,_magazineType,_ammoType); if (_ammoType == _ammo) exitWith { _magazine = _magazineType; }; diff --git a/addons/hearing/functions/fnc_moduleHearing.sqf b/addons/hearing/functions/fnc_moduleHearing.sqf index a560a712a6..6ec0af0231 100644 --- a/addons/hearing/functions/fnc_moduleHearing.sqf +++ b/addons/hearing/functions/fnc_moduleHearing.sqf @@ -1,6 +1,6 @@ /* * Author: esteldunedain - * Initializes the Map module. + * Initializes the Hearing module. * * Arguments: * Whatever the module provides. (I dunno.) @@ -16,4 +16,9 @@ if !(_activated) exitWith {}; [_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Interaction Module Initialized."; +// Do Not Force - read module setting only non-default is set due to using SCALAR +if ((_logic getVariable "DisableEarRinging") != -1) then { + [_logic, QGVAR(DisableEarRinging), "DisableEarRinging"] call EFUNC(common,readSettingFromModule); +}; + +diag_log text "[ACE]: Hearing Module Initialized."; diff --git a/addons/hearing/functions/fnc_putInEarplugs.sqf b/addons/hearing/functions/fnc_putInEarplugs.sqf index e979360945..8b11e6ba25 100644 --- a/addons/hearing/functions/fnc_putInEarplugs.sqf +++ b/addons/hearing/functions/fnc_putInEarplugs.sqf @@ -24,5 +24,8 @@ _player setVariable ["ACE_hasEarPlugsIn", true, true]; [localize LSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured); +//Force an immediate fast volume update: +[[true]] call FUNC(updateVolume); + /*// No Earplugs in inventory, telling user [localize LSTRING(NoPlugs)] call EFUNC(common,displayTextStructured);*/ diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index bee3517235..19a34831cd 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -27,3 +27,6 @@ _player addItem "ACE_EarPlugs"; _player setVariable ["ACE_hasEarPlugsIn", false, true]; [localize LSTRING(EarPlugs_Are_Off)] call EFUNC(common,displayTextStructured); + +//Force an immediate fast volume update: +[[true]] call FUNC(updateVolume); diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index cfec318dc0..3a72e8eb3b 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -3,7 +3,8 @@ * Updates and applys the current deafness. Called every 0.1 sec from a PFEH. * * Arguments: - * None + * 0: Args + * -----0: Just update volume (skip ringing/recovery) * * Return Value: * None @@ -15,47 +16,85 @@ */ #include "script_component.hpp" -private ["_recoverRate", "_volume"]; +//Only run if deafness or ear ringing is enabled: +if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {}; -// Exit if combat deafness is disabled -if !(GVAR(enableCombatDeafness)) exitWith {}; +EXPLODE_1_PVT((_this select 0),_justUpdateVolume); -// Check if new noises increase deafness -GVAR(newStrength) = (((ACE_player getvariable [QGVAR(dv), 0]) min 20) / 20) ^ 2; -if (GVAR(newStrength) > GVAR(currentDeafness)) then { - GVAR(currentDeafness) = GVAR(newStrength); -}; +private["_volume", "_soundTransitionTime"]; -// Recover rate is slower if deafness is severe -_recoverRate = 0.01; -if (GVAR(currentDeafness) > 0.7) then { - _recoverRate = 0.005; - if (GVAR(currentDeafness) > 0.9) then { - _recoverRate = 0.002; +GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0; +GVAR(volume) = (1 - (GVAR(deafnessDV) / 20)) max 0; + +if (!_justUpdateVolume) then { + //If we got a big increase in the last second: + if ((GVAR(deafnessDV) - GVAR(deafnessPrior)) > 2) then { + if (ACE_time > GVAR(time3)) then { + GVAR(beep2) = false; + }; + if ((!GVAR(DisableEarRinging)) && {!GVAR(beep2)}) then { + playSound "ACE_Combat_Deafness"; + GVAR(beep2) = true; + GVAR(time3) = ACE_time + 5; + }; }; + + GVAR(deafnessPrior) = GVAR(deafnessDV); + + if (GVAR(deafnessDV) > 19.75) then { + ACE_player setvariable [QGVAR(deaf), true]; + if ((!GVAR(DisableEarRinging)) && {ACE_time > GVAR(time4)}) then { + playSound "ACE_Combat_Deafness"; + GVAR(beep2) = true; + GVAR(time3) = ACE_time + 10; + GVAR(time4) = ACE_time + 30; + }; + } else { + ACE_player setvariable [QGVAR(deaf), false]; + }; + + if (GVAR(deafnessDV) > 10) then { + //check if the ringing is already being played + if (ACE_time > GVAR(time2)) then { + GVAR(beep) = false; + }; + if ((!GVAR(DisableEarRinging)) && {!GVAR(beep)}) then { + playSound "ACE_Ring_Backblast"; + GVAR(time2) = ACE_time + 22; + GVAR(beep) = true; + }; + }; + + // Hearing takes longer to return to normal after it hits rock bottom + GVAR(deafnessDV) = (GVAR(deafnessDV) - (0.5 * (GVAR(volume) max 0.1))) max 0; }; -// Deafness recovers with ACE_time -GVAR(currentDeafness) = GVAR(currentDeafness) - _recoverRate max 0; +if ((missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false]) || {!GVAR(enableCombatDeafness)}) exitWith {}; -// needed until Bohemia fixes playSound to actually use the second argument -_volume = (1 - GVAR(currentDeafness) max 0)^2 max 0.04; +_volume = GVAR(volume); // Earplugs reduce hearing 50% if ([ACE_player] call FUNC(hasEarPlugsIn)) then { _volume = _volume min GVAR(EarplugsVolume); }; +// Headgear can reduce hearing +if(headgear ACE_player != "") then { + private ["_lowerVolume"]; + _lowerVolume = (getNumber (configFile >> "CfgWeapons" >> (headgear ACE_player) >> QGVAR(lowerVolume))) min 1; + if(_lowerVolume > 0) then { + _volume = _volume min (1 - _lowerVolume); + }; +}; + // Reduce volume if player is unconscious if (ACE_player getVariable ["ACE_isUnconscious", false]) then { _volume = _volume min GVAR(UnconsciousnessVolume); }; -if (!(missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false])) then { - 0.1 fadeSound _volume; - 0.1 fadeSpeech _volume; - ACE_player setVariable ["tf_globalVolume", _volume]; - if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;}; -}; +_soundTransitionTime = if (_justUpdateVolume) then {0.1} else {1}; -//hintSilent format ["GVAR(currentDeafness), _Volume = %1, %2", GVAR(currentDeafness), _volume]; +_soundTransitionTime fadeSound _volume; +_soundTransitionTime fadeSpeech _volume; +ACE_player setVariable ["tf_globalVolume", _volume]; +if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;}; diff --git a/addons/hearing/script_component.hpp b/addons/hearing/script_component.hpp index 089bce86eb..194e150375 100644 --- a/addons/hearing/script_component.hpp +++ b/addons/hearing/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT hearing #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_HEARING #define DEBUG_MODE_FULL #endif diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 35b847c5d1..a3af102580 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -115,6 +115,7 @@ Audición Gehör Sluch + Audição Enable combat deafness? @@ -122,19 +123,22 @@ ¿Habilitar sordera de combate? Aktiviere Taubheit im Gefecht? Povolit ztrátu sluchu? + Ativar surdez em combate? - Enable combat deafness? + Reduces the hearing ability as the player takes hearing damage 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? + Ativar surdez em combate? - + Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection 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. + Este módulo ativa / desativa surdez em combate. Quando ativado, os jogadores podem ficar surdos quando uma arma é disparada ao seu redor ou uma explosão ocorre sem proteção auditiva. \ No newline at end of file diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index b979d09a4f..7fa6453fe2 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -1,11 +1,7 @@ // by commy2 #include "script_component.hpp" -private ["_unit", "_firer", "_damage"]; - -_unit = _this select 0; -_firer = _this select 1; -_damage = _this select 2; +params ["_unit", "_firer", "_damage"]; // don't fall on collision damage if (_unit == _firer) exitWith {}; diff --git a/addons/huntir/CfgVehicles.hpp b/addons/huntir/CfgVehicles.hpp index bc8ed4fc83..3b6486aaf7 100644 --- a/addons/huntir/CfgVehicles.hpp +++ b/addons/huntir/CfgVehicles.hpp @@ -16,7 +16,7 @@ class CfgVehicles { }; }; }; - + class Parachute_02_base_F; class ACE_HuntIR: Parachute_02_base_F { author = ECSTRING(common,ACETeam); @@ -67,13 +67,10 @@ class CfgVehicles { displayName = CSTRING(monitor_displayName); vehicleClass = "Items"; class TransportItems { - class ACE_HuntIR_monitor { - name = "ACE_HuntIR_monitor"; - count = 1; - }; + MACRO_ADDITEM(ACE_HuntIR_monitor,1); }; }; - + class ReammoBox_F; class ACE_HuntIR_Box: ReammoBox_F { model = PATHTOF(data\ace_huntirbox.p3d); diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 264c0c74b6..bcc553fff0 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -63,6 +63,11 @@ GVAR(no_cams) sort true; GVAR(no_cams) set [_forEachIndex, _x select 1]; } forEach GVAR(no_cams); [{ + //Close monitor if we no longer have the item: + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable ["ace_huntir_monitor", displayNull])}) then { + closeDialog 0; + }; + GVAR(nearHuntIRs) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; { if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then { diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 23c7df04f0..121cd9fd12 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -25,6 +25,12 @@ if (_ammo != "F_HuntIR") exitWith {}; [{ PARAMS_1(_projectile); + + //If null (deleted or hit water) exit: + if (isNull _projectile) exitWith {}; + //If it's not spinning (hit ground), bail: + if ((vectorMagnitude (velocity _projectile)) < 0.1) exitWith {}; + "ACE_HuntIR_Propell" createVehicle (getPosATL _projectile); [{ PARAMS_1(_position); diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index f8aed93880..27fd5e280b 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -38,6 +38,11 @@ createDialog "ace_huntir_cam_dialog_off"; GVAR(messageSearching) = toArray "Searching....."; GVAR(messageConnecting) = toArray "Connecting....."; [{ + //Close monitor if we no longer have item: + if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable ["ace_huntir_monitor", displayNull])}) then { + closeDialog 0; + }; + private ["_elapsedTime", "_nearestHuntIRs"]; _elapsedTime = ACE_time - GVAR(startTime); _nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; diff --git a/addons/huntir/script_component.hpp b/addons/huntir/script_component.hpp index 9f99437f67..385c0985ae 100644 --- a/addons/huntir/script_component.hpp +++ b/addons/huntir/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT huntir #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL + #ifdef DEBUG_ENABLED_HUNTIR #define DEBUG_MODE_FULL #endif diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml index 45c6b19392..7e7767f349 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -4,178 +4,194 @@ HuntIR Transport Box HuntIR Transportkiste - HuntIR Transport Box + Caja de transporte de HuntIR Trasnportní bedna HuntIR Ящик с HuntIR HuntIR Transport Box Skrzynia HuntIR HuntIR Transport Box HuntIR Transport Box + Caixa de transporte do HuntIR HuntIR Round HuntIR Granate - HuntIR Round + Proyectil HuntIR HuntIR Round HuntIR снаряд HuntIR Round Nabój HuntIR Munition HuntIR HuntIR lövedék + Cartucho HuntIR HuntIR monitor HuntIR Monitor - HuntIR monitor + Monitor HuntIR HuntIR monitor HuntIR монитор HuntIR monitor Odbiornik HuntIR Ecran HuntIR HuntIR monitor + Monitor HuntIR Activate HuntIR monitor HuntIR Monitor aktivieren - Activate HuntIR monitor + Activar monitor HuntIR Zapnout HuntIR monitor Включить HuntIR монитор Activate HuntIR monitor Włącz odbiornik HuntIR Allumer écran HuntIR HuntIR monitor aktiválása + Ativar monitor do HuntIR Camera: Kamera: - Camera: + Camara: Kamera: Камера: Camera: Kamera: Caméra: Kamera: + Câmera: Altitude: Höhe: - Altitude: + Altitud: Výška: Высота: Altitude: Wysokość: Altitude: Magasság: + Altitude: Recording Time: Aufnahmezeit: - Recording Time: + Tiempo de grabación: Čas nahrávání: Время записи: Recording Time: Czas nagrywania: Temps d'enregistrement: Felvételi idő: + Tempo de gravação: Press ESC to quit camera Zum Verlassen ESC drücken - Press ESC to quit camera + Pulsar ESC para salir de la camara Stiskni ESC pro opustění kamery Нажмите ESC чтобы выйти из режима камеры Press ESC to quit camera Wciśnij ESC by wyjść z widoku kamery Appuyer sur ESC pour quitter camera Nyomj ESC-ket a kamerából való kilépéshez + Pressione ESC para sair da câmera Help Hilfe - Help + Ayuda Pomoc Помощь Help Pomoc Aide Súgó + Ajuda A/D - Cycle zoom A/D - Zoom - A/D - Cycle zoom + A/D - Cambiar zoom A/D - Změna přiblížení A/D - Приближение A/D - Cycle zoom A/D - powiększenie A/D - Changement zoom A/D - Nagyítás + A/D - Troca zoom W/S - Select camera W/S - Wähle Kamera - W/S - Select camera + W/S - Seleccionar camara W/S - Výběr kamery W/S - Выбрать камеру W/S - Select camera W/S - wybór kamery W/S - Sélectionner caméra W/S - Kamera váltás + W/S - Seleciona câmera Left/Right - Rotate camera Links/Rechts - Rotiere Kamera - Left/Right - Rotate camera + Left/Right - Rotar camara Levá/Pravá - Rotace kamery Влево/Вправо - Вращать камеру Left/Right - Rotate camera Lewo/Prawo - obrót kamery w poziomie Gauche/Droite - Rotation caméra Jobb/Bal - Kamera forgatás + Esquerda/Direita - Rotaciona câmera Up/Down - Elevate/lower camera Hoch/Runter - Neige Kamera - Up/Down - Elevate/lower camera + Up/Down - Subir/bajar camara Nahoru/Dolu - Zvýšít/snížit úhel pohledu kamery Вверх/Вниз - Поднять/Опустить камеру Up/Down - Elevate/lower camera Góra/Dół - obrót kamery w pionie Haut/Bas - Monter/descendre caméra Fel/Le - Kamera döntése/süllyesztése + Acima/Abaixo - Eleva/Abaixa a câmera N - Cycle IT modes N - Sichtmodi - N - Cycle IT modes + N - Cambiar modos de IT N - Změna režimů kamery N - Режимы камеры N - Cycle IT modes N - wybór trybu IT N - Changement de modes IT N - Hőkép módok + N - Troca modo IT R - Reset camera R - Reset - R - Reset camera + R - Reiniciar camara R - Reset kamery R - Сбросить настройки камеры R - Reset camera R - resetuj kamerę R - Reset caméra R - Kamera visszaállítása + R - Redefine a câmera Esc - Exit help ESC - Hilfe verlassen - Esc - Exit help + Esc - Salit de ayuda Esc - Ukončit pomoc Esc - Выйти из помощи Esc - Exit help Esc - wyjście z ekranu Pomocy Esc - Sortir de l'aide Exit - Kilépés a súgóból + Esc - Sai do Ajuda \ No newline at end of file diff --git a/addons/interact_menu/ACE_Settings.hpp b/addons/interact_menu/ACE_Settings.hpp index e9e16f78f1..381405987c 100644 --- a/addons/interact_menu/ACE_Settings.hpp +++ b/addons/interact_menu/ACE_Settings.hpp @@ -3,12 +3,14 @@ class ACE_Settings { value = 0; typeName = "BOOL"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(AlwaysUseCursorSelfInteraction); }; class GVAR(cursorKeepCentered) { value = 0; typeName = "BOOL"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(cursorKeepCentered); description = CSTRING(cursorKeepCenteredDescription); }; @@ -16,42 +18,49 @@ class ACE_Settings { value = 0; typeName = "BOOL"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(AlwaysUseCursorInteraction); }; class GVAR(UseListMenu) { value = 0; typeName = "BOOL"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(UseListMenu); }; class GVAR(colorTextMax) { value[] = {1, 1, 1, 1}; typeName = "COLOR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorTextMax); }; class GVAR(colorTextMin) { value[] = {1, 1, 1, 0.25}; typeName = "COLOR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorTextMin); }; class GVAR(colorShadowMax) { value[] = {0, 0, 0, 1}; typeName = "COLOR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorShadowMax); }; class GVAR(colorShadowMin) { value[] = {0, 0, 0, 0.25}; typeName = "COLOR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ColorShadowMin); }; class GVAR(textSize) { value = 2; typeName = "SCALAR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(textSize); values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; }; @@ -59,6 +68,7 @@ class ACE_Settings { value = 2; typeName = "SCALAR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(shadowSetting); description = CSTRING(shadowSettingDescription); values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)}; @@ -67,13 +77,23 @@ class ACE_Settings { value = 1; typeName = "BOOL"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(ActionOnKeyRelease); }; class GVAR(menuBackground) { value = 0; typeName = "SCALAR"; isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); displayName = CSTRING(background); values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)}; }; + class GVAR(addBuildingActions) { + value = 0; + typeName = "BOOL"; + isClientSettable = 1; + category = CSTRING(Category_InteractionMenu); + displayName = CSTRING(addBuildingActions); + description = CSTRING(addBuildingActionsDescription); + }; }; diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index 02bc94688c..cbc28e66b4 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -3,6 +3,9 @@ if (!hasInterface) exitWith {}; +GVAR(cachedBuildingTypes) = []; +GVAR(cachedBuildingActionPairs) = []; + GVAR(ParsedTextCached) = []; //Setup text/shadow/size/color settings matrix @@ -17,6 +20,9 @@ GVAR(ParsedTextCached) = []; // Install the render EH on the main display addMissionEventHandler ["Draw3D", DFUNC(render)]; +//Add Actions to Houses: +["interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call EFUNC(common,addEventHandler); + // This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is. // The thread dies as soon as the mission start, so it's not really compiting for scheduler space. [] spawn { diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index 1539f8e2aa..73b543250e 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -4,6 +4,7 @@ ADDON = false; PREP(addActionToClass); PREP(addActionToObject); +PREP(addMainAction); PREP(compileMenu); PREP(compileMenuSelfAction); PREP(compileMenuZeus); @@ -25,6 +26,8 @@ PREP(renderMenu); PREP(renderSelector); PREP(setupTextColors); PREP(splitPath); +PREP(userActions_addHouseActions); +PREP(userActions_getHouseActions); // Event handlers for all interact menu controls DFUNC(handleMouseMovement) = { diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index c1da3392e9..8909c3d685 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -21,5 +21,5 @@ class CfgPatches { #include "ACE_Settings.hpp" class ACE_Extensions { - extensions[] += {"ace_break_line"}; + extensions[] += {"ace_break_line", "ace_parse_imagepath"}; }; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 7a8278c72d..4d300d35a2 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -19,7 +19,9 @@ */ #include "script_component.hpp" -EXPLODE_4_PVT(_this,_objectType,_typeNum,_parentPath,_action); +if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { + ERROR("Bad Params"); +}; // Ensure the config menu was compiled first if (_typeNum == 0) then { @@ -35,8 +37,15 @@ if((count _actionTrees) == 0) then { missionNamespace setVariable [_varName, _actionTrees]; }; +if (_parentPath isEqualTo ["ACE_MainActions"]) then { + [_objectType, _typeNum] call FUNC(addMainAction); +}; + _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); -if (isNil {_parentNode}) exitWith {}; +if (isNil {_parentNode}) exitWith { + ERROR("Failed to add action"); + diag_log text format ["action (%1) to parent %2 on object %3 [%4]", (_action select 0), _parentPath, _objectType, _typeNum]; +}; // Add action node as children of the correct node of action tree (_parentNode select 1) pushBack [_action,[]]; diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index 5c736a2da6..8cd2270d48 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -19,7 +19,9 @@ */ #include "script_component.hpp" -EXPLODE_4_PVT(_this,_object,_typeNum,_parentPath,_action); +if (!params [["_object", objNull, [objNull]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { + ERROR("Bad Params"); +}; private ["_varName","_actionList"]; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; @@ -28,6 +30,10 @@ if((count _actionList) == 0) then { _object setVariable [_varName, _actionList]; }; +if (_parentPath isEqualTo ["ACE_MainActions"]) then { + [(typeOf _object), _typeNum] call FUNC(addMainAction); +}; + // Add action and parent path to the list of object actions _actionList pushBack [_action, +_parentPath]; diff --git a/addons/interact_menu/functions/fnc_addMainAction.sqf b/addons/interact_menu/functions/fnc_addMainAction.sqf new file mode 100644 index 0000000000..cf2a3f51d4 --- /dev/null +++ b/addons/interact_menu/functions/fnc_addMainAction.sqf @@ -0,0 +1,31 @@ +/* + * Author: Jonpas, PabstMirror + * Makes sure there is a ACE_MainActions on the object type + * + * Argument: + * 0: Object classname + * 1: Type of action, 0 for actions, 1 for self-actions + * + * Return value: + * None + * + * Example: + * ["Table", 0] call ace_interact_menu_fnc_addMainAction; + * + * Public: No + */ +#include "script_component.hpp" + +params ["_objectType", "_typeNum"]; + +private["_actionTrees", "_mainAction", "_parentNode", "_varName"]; + +_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; +_actionTrees = missionNamespace getVariable [_varName, []]; +_parentNode = [_actionTrees, ["ACE_MainActions"]] call FUNC(findActionNode); + +if (isNil {_parentNode}) then { + TRACE_2("No Main Action on object", _objectType, _typeNum); + _mainAction = ["ACE_MainActions", localize ELSTRING(interaction,MainAction), "", {}, {true}] call FUNC(createAction); + [_objectType, _typeNum, [], _mainAction] call EFUNC(interact_menu,addActionToClass); +}; diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 62d9ca1094..4da303f618 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -14,8 +14,8 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_object,_origAction,_parentPath); -EXPLODE_2_PVT(_origAction,_origActionData,_origActionChildren); +params ["_object", "_origAction", "_parentPath"]; +_origAction params ["_origActionData", "_origActionChildren"]; private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_action","_actionData","_x"]; diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 8d68a34268..6dd4c5ee74 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp"; -EXPLODE_1_PVT(_this,_target); +params ["_target"]; private ["_objectType","_actionsVarName","_isMan"]; _objectType = _target; @@ -29,7 +29,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {}; private "_recurseFnc"; _recurseFnc = { private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; - EXPLODE_1_PVT(_this,_actionsCfg); + params ["_actionsCfg"]; _actions = []; { @@ -90,7 +90,7 @@ _recurseFnc = { [], _position, _distance, - [_showDisabled,_enableInside,_canCollapse,_runOnHover], + [_showDisabled,_enableInside,_canCollapse,_runOnHover, false], _modifierFunction ], _children diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 27f841c505..910b8893c6 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp"; -EXPLODE_1_PVT(_this,_target); +params ["_target"]; private ["_objectType","_actionsVarName","_isMan"]; _objectType = _target; @@ -30,7 +30,7 @@ private "_recurseFnc"; _recurseFnc = { private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; - EXPLODE_1_PVT(_this,_actionsCfg); + params ["_actionsCfg"]; _actions = []; { @@ -74,7 +74,7 @@ _recurseFnc = { {}, [0,0,0], 10, //distace - [_showDisabled,_enableInside,_canCollapse,_runOnHover], + [_showDisabled,_enableInside,_canCollapse,_runOnHover, true], _modifierFunction ], _children diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index 9dc212ac40..ef7c36abc9 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -19,7 +19,7 @@ private "_recurseFnc"; _recurseFnc = { private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; - EXPLODE_1_PVT(_this,_actionsCfg); + params ["_actionsCfg"]; _actions = []; { diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index b26cb186f3..256984c104 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -26,56 +26,31 @@ */ #include "script_component.hpp" -EXPLODE_5_PVT(_this,_actionName,_displayName,_icon,_statement,_condition); +params [ + "_actionName", + "_displayName", + "_icon", + "_statement", + "_condition", + ["_insertChildren", {}], + ["_customParams", []], + ["_position", {[0, 0, 0]}], + ["_distance", 2], + ["_params", [false, false, false, false, false]], + ["_modifierFunction", {}] +]; -// IGNORE_PRIVATE_WARNING(_target); -private ["_insertChildren","_customParams","_position","_distance","_params", "_modifierFunction"]; - -_insertChildren = if (count _this > 5) then { - _this select 5 -} else { - {} -}; - -_customParams = if (count _this > 6) then { - _this select 6 -} else { - [] -}; - -_position = if (count _this > 7) then { - if (typeName (_this select 7) == "STRING") then { +_position = if (typeName (_position) == "STRING") then { // If the action is set to a selection, create the suitable code - compile format ["_target selectionPosition '%1'", _this select 7]; + compile format ["_target selectionPosition '%1'", _position]; } else { - if (typeName (_this select 7) == "ARRAY") then { + if (typeName (_position) == "ARRAY") then { // If the action is set to a array position, create the suitable code - compile format ["%1", _this select 7]; + compile format ["%1", _position]; } else { - _this select 7 + _position; }; - } -} else { - {[0,0,0]} -}; - -_distance = if (count _this > 8) then { - _this select 8 -} else { - 2 -}; - -_params = if (count _this > 9) then { - _this select 9 -} else { - [false,false,false,false] -}; - -_modifierFunction = if (count _this > 10) then { - _this select 10 -} else { - {} -}; + }; [ _actionName, diff --git a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf index b5d6a4e967..13b241e1d1 100644 --- a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf +++ b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf @@ -1,11 +1,7 @@ // by commy2 #include "script_component.hpp" -private ["_ctrl", "_index", "_text"]; - -_ctrl = _this select 0; -_index = _this select 1; -_text = _this select 2; +params ["_ctrl", "_index", "_text"]; //systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")); diff --git a/addons/interact_menu/functions/fnc_findActionNode.sqf b/addons/interact_menu/functions/fnc_findActionNode.sqf index b8639754d2..41ab658a62 100644 --- a/addons/interact_menu/functions/fnc_findActionNode.sqf +++ b/addons/interact_menu/functions/fnc_findActionNode.sqf @@ -8,7 +8,7 @@ * 1: Path * * Return value: - * Action node . + * Action node or if not found * * Example: * [_actionTree, ["ACE_TapShoulderRight","VulcanPinchAction"]] call ace_interact_menu_fnc_findActionNode; @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_actionTreeList,_parentPath); +params ["_actionTreeList", "_parentPath"]; private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"]; @@ -31,10 +31,10 @@ _parentNode = [[],_actionTreeList]; _foundParentNode = false; _fnc_findFolder = { - EXPLODE_3_PVT(_this,_parentPath,_level,_actionNode); + params ["_parentPath", "_level", "_actionNode"]; { - EXPLODE_2_PVT(_x,_actionData,_actionChildren); + _x params ["_actionData", "_actionChildren"]; if ((_actionData select 0) isEqualTo (_parentPath select _level)) exitWith { if (count _parentPath == _level + 1) exitWith { diff --git a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf index cb21d218db..a0962d7883 100644 --- a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf +++ b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf @@ -11,7 +11,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_newUnit,_oldUnit); +params ["_newUnit", "_oldUnit"]; // add to new unit private "_ehid"; diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index ec22b0aa9e..0a02fe2ea7 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -13,7 +13,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_longPath,_shortPath); +params ["_longPath", "_shortPath"]; private ["_isSubPath","_i"]; _isSubPath = true; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 5bf156b69e..ca06e25eb6 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -EXPLODE_1_PVT(_this,_menuType); +params ["_menuType"]; if (GVAR(openedMenuType) == _menuType) exitWith {true}; diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index 02e2d4db01..86580afa67 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -12,8 +12,7 @@ */ #include "script_component.hpp" -private "_calledByClicking"; -_calledByClicking = _this select 1; +params ["_menuType", "_calledByClicking"]; // Exit if there's no menu opened if (GVAR(openedMenuType) < 0) exitWith {true}; diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf index c407273258..c95f53f152 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf @@ -17,11 +17,11 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath); +params ["_objectType", "_typeNum", "_fullPath"]; -private ["_res","_varName","_actionTrees", "_actionIndex", "_parentLevel", "_parentNode"]; +private ["_res","_varName","_actionTrees", "_parentNode", "_found"]; _res = _fullPath call FUNC(splitPath); -EXPLODE_2_PVT(_res,_parentPath,_actionName); +_res params ["_parentPath", "_actionName"]; _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; _actionTrees = missionNamespace getVariable [_varName, []]; @@ -30,10 +30,15 @@ _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); if (isNil {_parentNode}) exitWith {}; // Iterate through children of the father +_found = false; { if (((_x select 0) select 0) == _actionName) exitWith { + TRACE_2("Deleting Action", _forEachIndex, _x); + _found = true; (_parentNode select 1) deleteAt _forEachIndex; }; } forEach (_parentNode select 1); -_parentLevel deleteAt _actionIndex; +if (!_found) then { + WARNING("Failed to find action to delete"); +}; diff --git a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf index bab740c578..e630bf4ad1 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf @@ -17,11 +17,11 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath); +params ["_object", "_typeNum", "_fullPath"]; private ["_res","_varName","_actionList"]; _res = _fullPath call FUNC(splitPath); -EXPLODE_2_PVT(_res,_parentPath,_actionName); +_res params ["_parentPath", "_actionName"]; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; _actionList = _object getVariable [_varName, []]; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 8ca7f8aa33..81a6887f97 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -49,7 +49,7 @@ _fnc_renderNearbyActions = { _action = _x; if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action]; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; }; } forEach GVAR(objectActionList); @@ -61,7 +61,7 @@ _fnc_renderNearbyActions = { // Try to render the menu if ([_target, _action] call FUNC(renderBaseMenu)) then { _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action]; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; } forEach _classActions; @@ -78,7 +78,10 @@ _fnc_renderNearbyActions = { _fnc_renderLastFrameActions = { { - _x call FUNC(renderBaseMenu); + _x params ["_target", "_action", "_objectActionList"]; + + GVAR(objectActionList) = _objectActionList; + [_target, _action] call FUNC(renderBaseMenu); } forEach GVAR(foundActions); }; @@ -173,6 +176,6 @@ if (count GVAR(collectedActionPoints) > 1) then { // Render the non-ocluded points { - EXPLODE_3_PVT(_x,_z,_sPos,_activeActionTree); + _x params ["_z", "_sPos", "_activeActionTree"]; [[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu); } forEach GVAR(collectedActionPoints); diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index a844930a7c..a5ccabf3bf 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -18,8 +18,8 @@ BEGIN_COUNTER(fnc_renderBaseMenu) private ["_distance","_pos","_weaponDir","_ref","_sPos","_activeActionTree", "_line"]; -EXPLODE_2_PVT(_this,_object,_baseActionNode); -EXPLODE_1_PVT(_baseActionNode,_actionData); +params ["_object", "_baseActionNode"]; +_baseActionNode params ["_actionData"]; _distance = _actionData select 8; @@ -44,7 +44,7 @@ if (GVAR(openedMenuType) == 0 && (vehicle ACE_player == ACE_player) && (isNull c if (_actualDistance > _distance) exitWith {true}; - if (_actualDistance > 1.5) exitWith { + if ((_actualDistance > 1.5) && {!((_actionData select 9) select 4)}) exitWith { // If distance to action is greater than 1.5 m, check LOS _line = [_headPos call EFUNC(common,positionToASL), _pos call EFUNC(common,positionToASL), _object, ACE_player]; lineIntersects _line diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 44a280a52e..ab909964de 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -16,7 +16,8 @@ #include "script_component.hpp" #define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa) private ["_ctrl", "_pos", "_displayNum"]; -PARAMS_4(_text,_icon,_sPos,_textSettings); + +params ["_text", "_icon", "_sPos", "_textSettings"]; //systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1]; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index a82b82dcb7..21c434fe03 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -17,9 +17,9 @@ private ["_menuInSelectedPath", "_path", "_menuDepth", "_x", "_offset", "_newPos", "_forEachIndex", "_player", "_pos", "_target", "_textSettings"]; -EXPLODE_4_PVT(_this,_parentPath,_action,_sPos,_angles); -EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject); -EXPLODE_2_PVT(_angles,_centerAngle,_maxAngleSpan); +params ["_parentPath", "_action", "_sPos", "_angles"]; +_action params ["_actionData", "_activeChildren", "_actionObject"]; +_angles params ["_centerAngle", "_maxAngleSpan"]; _menuDepth = (count GVAR(menuDepthPath)); diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index 96a495c715..17ded20903 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -13,7 +13,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_sPos,_icon); +params ["_sPos", "_icon"]; private ["_displayNum", "_ctrl", "_pos"]; diff --git a/addons/interact_menu/functions/fnc_setupTextColors.sqf b/addons/interact_menu/functions/fnc_setupTextColors.sqf index e54d529668..c23d68cfd3 100644 --- a/addons/interact_menu/functions/fnc_setupTextColors.sqf +++ b/addons/interact_menu/functions/fnc_setupTextColors.sqf @@ -16,7 +16,7 @@ private ["_menuDepth", "_mixColor", "_pathCount", "_row", "_shadowColor", "_text //Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text _mixColor = { - PARAMS_3(_color1,_color2,_ratio); + params ["_color1", "_color2", "_ratio"]; private ["_return", "_mix", "_index"]; _return = ""; for "_index" from 0 to 3 do { diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf new file mode 100644 index 0000000000..fdd7d14573 --- /dev/null +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -0,0 +1,97 @@ +/* + * Author: PabstMirror + * Scans for nearby "Static" objects (buildings) and adds the UserActions to them. + * Called when interact_menu starts rendering (from "interact_keyDown" event) + * + * Arguments: + * 0: Interact Menu Type (0 - world, 1 - self) + * + * Return Value: + * Nothing + * + * Example: + * [0] call ace_interact_menu_fnc_addHouseActions + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_interactionType"]; + +//Ignore if not enabled: +if (!GVAR(addBuildingActions)) exitWith {}; +//Ignore self-interaction menu: +if (_interactionType != 0) exitWith {}; +//Ignore when mounted: +if ((vehicle ACE_player) != ACE_player) exitWith {}; + +[{ + private ["_nearBuidlings", "_typeOfHouse", "_houseBeingScaned", "_actionSet", "_memPoints", "_memPointsActions", "_helperPos", "_helperObject"]; + params ["_args", "_pfID"]; + _args params ["_setPosition", "_addedHelpers", "_housesScaned", "_housesToScanForActions"]; + + if (!EGVAR(interact_menu,keyDown)) then { + {deleteVehicle _x;} forEach _addedHelpers; + [_pfID] call CBA_fnc_removePerFrameHandler; + } else { + // Prevent Rare Error when ending mission with interact key down: + if (isNull ace_player) exitWith {}; + + //Make the common case fast (cursorTarget is looking at a door): + if ((!isNull cursorTarget) && {cursorTarget isKindOf "Static"} && {!(cursorTarget in _housesScaned)}) then { + if (((count (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "UserActions")) > 0) || {(count (getArray (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "ladders"))) > 0}) then { + _housesToScanForActions = [cursorTarget]; + } else { + _housesScaned pushBack cursorTarget; + }; + }; + + //For performance, we only do 1 thing per frame, + //-either do a wide scan and search for houses with actions + //-or scan one house at a time and add the actions for that house + + if (_housesToScanForActions isEqualTo []) then { + //If player moved >2 meters from last pos, then rescan + if (((getPosASL ace_player) distance _setPosition) < 2) exitWith {}; + + _nearBuidlings = nearestObjects [ace_player, ["Static"], 30]; + { + _typeOfHouse = typeOf _x; + if (((count (configFile >> "CfgVehicles" >> _typeOfHouse >> "UserActions")) == 0) && {(count (getArray (configFile >> "CfgVehicles" >> _typeOfHouse >> "ladders"))) == 0}) then { + _housesScaned pushBack _x; + } else { + _housesToScanForActions pushBack _x; + }; + } forEach (_nearBuidlings - _housesScaned); + + _args set [0, (getPosASL ace_player)]; + } else { + _houseBeingScaned = _housesToScanForActions deleteAt 0; + _typeOfHouse = typeOf _houseBeingScaned; + //Skip this house for now if we are outside of it's radius + //(we have to scan far out for the big houses, but we don't want to waste time adding actions on every little shack) + if ((_houseBeingScaned != cursorTarget) && {((ACE_player distance _houseBeingScaned) - ((sizeOf _typeOfHouse) / 2)) > 4}) exitWith {}; + + _housesScaned pushBack _houseBeingScaned; + + _actionSet = [_typeOfHouse] call FUNC(userActions_getHouseActions); + _actionSet params ["_memPoints", "_memPointsActions"]; + + // systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime]; + { + _helperPos = (_houseBeingScaned modelToWorld (_houseBeingScaned selectionPosition _x)) call EFUNC(common,positionToASL); + _helperObject = "Sign_Sphere25cm_F" createVehicleLocal _helperPos; + _addedHelpers pushBack _helperObject; + _helperObject setVariable [QGVAR(building), _houseBeingScaned]; + _helperObject setPosASL _helperPos; + _helperObject hideObject true; + TRACE_3("Making New Helper",_helperObject,_x,_houseBeingScaned); + + { + [_helperObject, 0, [], _x] call EFUNC(interact_menu,addActionToObject); + } forEach (_memPointsActions select _forEachIndex); + + } forEach _memPoints; + }; + }; +}, 0, [((getPosASL ace_player) vectorAdd [-100,0,0]), [], [], []]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf new file mode 100644 index 0000000000..dee82fd939 --- /dev/null +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -0,0 +1,137 @@ +/* + * Author: PabstMirror + * Scans the buidling type for UserActions and Ladder mount points. + * + * Arguments: + * 0: Building Classname + * + * Return Value: + * [[Array of MemPoints], [Array Of Actions]] + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_typeOfBuilding"]; + +private["_action", "_actionDisplayName", "_actionDisplayNameDefault", "_actionMaxDistance", "_actionOffset", "_actionPath", "_actionPosition", "_building", "_configPath", "_endIndex", "_iconImage", "_index", "_ladders", "_memPointIndex", "_memPoints", "_memPointsActions", "_startIndex"]; + +_searchIndex = GVAR(cachedBuildingTypes) find _typeOfBuilding; +if (_searchIndex != -1) exitWith {GVAR(cachedBuildingActionPairs) select _searchIndex}; + +_memPoints = []; +_memPointsActions = []; + +//Get the offset for a memory point: +_fnc_getMemPointOffset = { + params ["_memoryPoint"]; + _memPointIndex = _memPoints find _memoryPoint; + _actionOffset = [0,0,0]; + if (_memPointIndex == -1) then { + _memPoints pushBack _memoryPoint; + _memPointsActions pushBack []; + } else { + _actionOffset set [2, 0.0254 * (count (_memPointsActions select _memPointIndex))]; + }; + _actionOffset +}; + +// Add UserActions for the building: +_fnc_userAction_Statement = { + params ["_target", "_player", "_variable"]; + _variable params ["_actionStatement", "_actionCondition"]; + this = _target getVariable [QGVAR(building), objNull]; + call _actionStatement; +}; +_fnc_userAction_Condition = { + params ["_target", "_player", "_variable"]; + _variable params ["_actionStatement", "_actionCondition"]; + this = _target getVariable [QGVAR(building), objNull]; + if (isNull this) exitWith {false}; + call _actionCondition; +}; + +_configPath = configFile >> "CfgVehicles" >> _typeOfBuilding >> "UserActions"; +for "_index" from 0 to ((count _configPath) - 1) do { + _actionPath = _configPath select _index; + + _actionDisplayName = getText (_actionPath >> "displayName"); + _actionDisplayNameDefault = getText (_actionPath >> "displayNameDefault"); + _actionPosition = getText (_actionPath >> "position"); + _actionCondition = getText (_actionPath >> "condition"); + _actionStatement = getText (_actionPath >> "statement"); + _actionMaxDistance = getNumber (_actionPath >> "radius"); + + if (_actionDisplayName == "") then {_actionDisplayName = (configName _x);}; + if (_actionPosition == "") then {ERROR("Bad Position");}; + if (_actionCondition == "") then {_actionCondition = "true";}; + if (_actionStatement == "") then {ERROR("No Statement");}; + + _actionStatement = compile _actionStatement; + _actionCondition = compile _actionCondition; + _actionMaxDistance = _actionMaxDistance + 0.1; //increase range slightly + _iconImage = ""; + + //extension ~4x as fast: + _iconImage = "ace_parse_imagepath" callExtension _actionDisplayNameDefault; + + _actionOffset = [_actionPosition] call _fnc_getMemPointOffset; + _memPointIndex = _memPoints find _actionPosition; + + _action = [(configName _actionPath), _actionDisplayName, _iconImage, _fnc_userAction_Statement, _fnc_userAction_Condition, {}, [_actionStatement, _actionCondition], _actionOffset, _actionMaxDistance, [false,false,false,false,true]] call EFUNC(interact_menu,createAction); + (_memPointsActions select _memPointIndex) pushBack _action; +}; + +// Add Ladder Actions for the building: +_fnc_ladder_ladderUp = { + params ["_target", "_player", "_variable"]; + _variable params ["_ladderIndex"]; + _building = _target getVariable [QGVAR(building), objNull]; + TRACE_3("Ladder Action - UP",_player,_building,_ladderIndex); + _player action ["LadderUp", _building, _ladderIndex, 0]; +}; +_fnc_ladder_ladderDown = { + params ["_target", "_player", "_variable"]; + _variable params ["_ladderIndex"]; + _building = _target getVariable [QGVAR(building), objNull]; + TRACE_3("Ladder Action - Down",_player,_building,_ladderIndex); + _player action ["LadderDown", _building, _ladderIndex, 1]; +}; + +_fnc_ladder_conditional = { + params ["_target", "_player"]; + //(Check distance < 2) and (Don't show actions if on a ladder) + ((_target distance _player) < 2) && {((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _player) >> "onLadder")) == 0)} +}; + +_ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders"); +{ + _x params ["_ladderBottomMemPoint", "_ladderTopMemPoint"]; + + _actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition + + _actionDisplayName = localize "str_action_ladderup"; + _iconImage = "\A3\ui_f\data\igui\cfg\actions\ladderup_ca.paa"; + //Ladder Up Action: + _actionOffset = [_ladderBottomMemPoint] call _fnc_getMemPointOffset; + _actionOffset = _actionOffset vectorAdd [0,0,1]; + _memPointIndex = _memPoints find _ladderBottomMemPoint; + _action = [format ["LadderUp_%1", _forEachIndex], _actionDisplayName, _iconImage, _fnc_ladder_ladderUp, _fnc_ladder_conditional, {}, [_forEachIndex], _actionOffset, _actionMaxDistance, [false,false,false,false,true]] call EFUNC(interact_menu,createAction); + (_memPointsActions select _memPointIndex) pushBack _action; + + _actionDisplayName = localize "str_action_ladderdown"; + _iconImage = "\A3\ui_f\data\igui\cfg\actions\ladderdown_ca.paa"; + //Ladder Down Action: + _actionOffset = [_ladderTopMemPoint] call _fnc_getMemPointOffset; + _actionOffset = _actionOffset vectorAdd [0,0,0.25]; + _memPointIndex = _memPoints find _ladderTopMemPoint; + _action = [format ["LadderDown_%1", _forEachIndex], _actionDisplayName, _iconImage, _fnc_ladder_ladderDown, _fnc_ladder_conditional, {}, [_forEachIndex], _actionOffset, _actionMaxDistance, [false,false,false,false,true]] call EFUNC(interact_menu,createAction); + (_memPointsActions select _memPointIndex) pushBack _action; + +} forEach _ladders; + +GVAR(cachedBuildingTypes) pushBack _typeOfBuilding; +GVAR(cachedBuildingActionPairs) pushBack [_memPoints, _memPointsActions]; + + +[_memPoints, _memPointsActions] diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 31fab217b2..5bd8aefe21 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -87,6 +87,9 @@ Zeus Actions + Akcje Zeusa + Akce Zeuse + Acciones Zeus Interaction - Text Max @@ -225,24 +228,48 @@ Tło menu interakcji Fondo del menú de interacción Pozadí menu interakce + Interaktionsmenü-Hintergrund + Fundo do menu de interação 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é. + Den Hintergrund verschwimmen lassen, während das Interaktionsmenü geöffnet ist. + Desfocar o fundo enquanto o menu de interação está aberto. Blur screen Rozmycie ekranu Pantalla de desenfoque Rozmazaný obraz + Verschwommenes Bild + Desfoque de tela Black Przyciemnienie ekranu - Negra + Negro Černý obraz + Preto + Schwarz + + + Show actions for buildings + Pokazuj akcje dla budynków + Zobrazit akci pro budovy + Mostrar acciones para edificios + + + Adds interaction actions for opening doors and mounting ladders on buildings. (Note: There is a performance cost when opening interaction menu, especially in towns) + Dodaje opcje interakcji dla otwierania drzwi oraz wchodzenia po drabinach do budynków. Uwaga: Użycie tej opcji może spowodować spadek wydajności menu interakcji, szczególnie w dużych miastach. + Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) + Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades) + + + Interaction Menu + Menu interakcji - + \ No newline at end of file diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index 913e7a7c85..50f203a092 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -8,23 +8,23 @@ class ACE_ZeusActions { class stance { displayName = "$STR_A3_RscAttributeUnitPos_Title"; - class limited { - displayName = "$STR_A3_RscAttributeUnitPos_Down_tooltip"; + class prone { + displayName = "$STR_Pos_Down"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_prone_ca.paa"; statement = "{_x setUnitPos 'DOWN';} forEach (curatorSelected select 0);"; }; - class normal { - displayName = "$STR_A3_RscAttributeUnitPos_Crouch_tooltip"; + class crouch { + displayName = "$STR_Pos_Crouch"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_crouch_ca.paa"; statement = "{_x setUnitPos 'MIDDLE';} forEach (curatorSelected select 0);"; }; - class full { - displayName = "$STR_A3_RscAttributeUnitPos_Up_tooltip"; + class stand { + displayName = "$STR_Pos_Up"; icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_stand_ca.paa"; statement = "{_x setUnitPos 'UP';} forEach (curatorSelected select 0);"; }; class auto { - displayName = "$STR_A3_RscAttributeUnitPos_Auto_tooltip"; + displayName = "$STR_Pos_Automatic"; icon = "\A3\UI_F_Curator\Data\default_ca.paa"; statement = "{_x setUnitPos 'AUTO';} forEach (curatorSelected select 0);"; }; @@ -40,121 +40,97 @@ class ACE_ZeusActions { icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; class behaviour { - displayName = CSTRING(Zeus_Behaviour); + displayName = "$STR_Combat_Mode"; class careless { - displayName = CSTRING(Zeus_Behaviour_careless); + displayName = "$STR_Combat_Careless"; statement = "{ _x setBehaviour 'CARELESS'; } forEach (curatorSelected select 1);"; }; class safe { - displayName = "$STR_safe"; + displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; statement = "{ _x setBehaviour 'SAFE'; } forEach (curatorSelected select 1);"; }; class aware { - displayName = "$STR_aware"; + displayName = "$STR_Combat_Aware"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa"; statement = "{ _x setBehaviour 'AWARE'; } forEach (curatorSelected select 1);"; }; class combat { - displayName = "$STR_combat"; + displayName = "$STR_Combat_Combat"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa"; statement = "{ _x setBehaviour 'COMBAT'; } forEach (curatorSelected select 1);"; }; class stealth { - displayName = "$STR_stealth"; + displayName = "$STR_Combat_Stealth"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa"; statement = "{ _x setBehaviour 'STEALTH'; } forEach (curatorSelected select 1);"; }; }; class speed { - displayName = CSTRING(Zeus_Speed); + displayName = "$STR_HC_Menu_Speed"; class limited { - displayName = "$STR_speed_limited"; + displayName = "$STR_Speed_Limited"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa"; statement = "{_x setSpeedMode 'LIMITED';} forEach (curatorSelected select 1);"; }; class normal { - displayName = "$STR_speed_normal"; + displayName = "$STR_Speed_Normal"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa"; statement = "{_x setSpeedMode 'NORMAL';} forEach (curatorSelected select 1);"; }; class full { - displayName = "$STR_speed_full"; + displayName = "$STR_Speed_Full"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa"; statement = "{_x setSpeedMode 'FULL';} forEach (curatorSelected select 1);"; }; }; - class stance { - displayName = "$STR_A3_RscAttributeUnitPos_Title"; - - class limited { - displayName = "$STR_A3_RscAttributeUnitPos_Down_tooltip"; - icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_prone_ca.paa"; - statement = "{ {_x setUnitPos 'DOWN'} forEach (units _x); } forEach (curatorSelected select 1);"; - }; - class normal { - displayName = "$STR_A3_RscAttributeUnitPos_Crouch_tooltip"; - icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_crouch_ca.paa"; - statement = "{ {_x setUnitPos 'MIDDLE'} forEach (units _x); } forEach (curatorSelected select 1);"; - }; - class full { - displayName = "$STR_A3_RscAttributeUnitPos_Up_tooltip"; - icon = "\A3\UI_F\Data\IGUI\RscIngameUI\RscUnitInfo\SI_stand_ca.paa"; - statement = "{ {_x setUnitPos 'UP'} forEach (units _x); } forEach (curatorSelected select 1);"; - }; - class auto { - displayName = "$STR_A3_RscAttributeUnitPos_Auto_tooltip"; - icon = "\A3\UI_F_Curator\Data\default_ca.paa"; - statement = "{ {_x setUnitPos 'AUTO'} forEach (units _x); } forEach (curatorSelected select 1);"; - }; - }; class formation { - displayName = CSTRING(Zeus_Formation); + displayName = "$STR_Formation"; class wedge { - displayName = "$STR_wedge"; + displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; statement = "{_x setFormation 'WEDGE';} forEach (curatorSelected select 1);"; }; class vee { - displayName = "$STR_vee"; + displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; statement = "{_x setFormation 'VEE';} forEach (curatorSelected select 1);"; }; class line { - displayName = "$STR_line"; + displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; statement = "{_x setFormation 'LINE';} forEach (curatorSelected select 1);"; }; class column { - displayName = "$STR_column"; + displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; statement = "{_x setFormation 'COLUMN';} forEach (curatorSelected select 1);"; }; class file { - displayName = "$STR_file"; + displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; statement = "{_x setFormation 'FILE';} forEach (curatorSelected select 1);"; }; class stag_column { - displayName = "$STR_staggered"; + displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; statement = "{_x setFormation 'STAG COLUMN';} forEach (curatorSelected select 1);"; }; class ech_left { - displayName = "$STR_echl"; + displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; statement = "{_x setFormation 'ECH LEFT';} forEach (curatorSelected select 1);"; }; class ech_right { - displayName = "$STR_echr"; + displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; statement = "{_x setFormation 'ECH RIGHT';} forEach (curatorSelected select 1);"; }; class diamond { - displayName = "$STR_diamond"; + displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; statement = "{_x setFormation 'DIAMOND';} forEach (curatorSelected select 1);"; }; @@ -162,100 +138,100 @@ class ACE_ZeusActions { }; class ZeusWaypoints { displayName = "Waypoints"; - icon = "\A3\UI_F_Curator\Data\CfgCurator\waypoint_ca.paa"; + icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; class behaviour { - displayName = CSTRING(Zeus_Behaviour); + displayName = "$STR_Combat_Mode"; class careless { - displayName = CSTRING(Zeus_Behaviour_careless); + displayName = "$STR_Combat_Careless"; statement = "{ _x setWaypointBehaviour 'CARELESS'; } forEach (curatorSelected select 2);"; }; class safe { - displayName = "$STR_safe"; + displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; statement = "{ _x setWaypointBehaviour 'SAFE'; } forEach (curatorSelected select 2);"; }; class aware { - displayName = "$STR_aware"; + displayName = "$STR_Combat_Aware"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\aware_ca.paa"; statement = "{ _x setWaypointBehaviour 'AWARE'; } forEach (curatorSelected select 2);"; }; class combat { - displayName = "$STR_combat"; + displayName = "$STR_Combat_Combat"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\combat_ca.paa"; statement = "{ _x setWaypointBehaviour 'COMBAT'; } forEach (curatorSelected select 2);"; }; class stealth { - displayName = "$STR_stealth"; + displayName = "$STR_Combat_Stealth"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\stealth_ca.paa"; statement = "{ _x setWaypointBehaviour 'STEALTH'; } forEach (curatorSelected select 2);"; }; }; class speed { - displayName = CSTRING(Zeus_Speed); + displayName = "$STR_HC_Menu_Speed"; class limited { - displayName = "$STR_speed_limited"; + displayName = "$STR_Speed_Limited"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\limited_ca.paa"; statement = "{ _x setWaypointSpeed 'LIMITED'; } forEach (curatorSelected select 2);"; }; class normal { - displayName = "$STR_speed_normal"; + displayName = "$STR_Speed_Normal"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\normal_ca.paa"; statement = "{ _x setWaypointSpeed 'NORMAL'; } forEach (curatorSelected select 2);"; }; class full { - displayName = "$STR_speed_full"; + displayName = "$STR_Speed_Full"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeSpeedMode\full_ca.paa"; statement = "{ _x setWaypointSpeed 'FULL'; } forEach (curatorSelected select 2);"; }; }; class formation { - displayName = CSTRING(Zeus_Formation); + displayName = "$STR_Formation"; class wedge { - displayName = "$STR_wedge"; + displayName = "$STR_Wedge"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\wedge_ca.paa"; statement = "{_x setWaypointFormation 'WEDGE';} forEach (curatorSelected select 1);"; }; class vee { - displayName = "$STR_vee"; + displayName = "$STR_Vee"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\vee_ca.paa"; statement = "{_x setWaypointFormation 'VEE';} forEach (curatorSelected select 1);"; }; class line { - displayName = "$STR_line"; + displayName = "$STR_Line"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\line_ca.paa"; statement = "{_x setWaypointFormation 'LINE';} forEach (curatorSelected select 1);"; }; class column { - displayName = "$STR_column"; + displayName = "$STR_Column"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\column_ca.paa"; statement = "{_x setWaypointFormation 'COLUMN';} forEach (curatorSelected select 1);"; }; class file { - displayName = "$STR_file"; + displayName = "$STR_File"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\file_ca.paa"; statement = "{_x setWaypointFormation 'FILE';} forEach (curatorSelected select 1);"; }; class stag_column { - displayName = "$STR_staggered"; + displayName = "$STR_Staggered"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\stag_column_ca.paa"; statement = "{_x setWaypointFormation 'STAG COLUMN';} forEach (curatorSelected select 1);"; }; class ech_left { - displayName = "$STR_echl"; + displayName = "$STR_EchL"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_left_ca.paa"; statement = "{_x setWaypointFormation 'ECH LEFT';} forEach (curatorSelected select 1);"; }; class ech_right { - displayName = "$STR_echr"; + displayName = "$STR_EchR"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\ech_right_ca.paa"; statement = "{_x setWaypointFormation 'ECH RIGHT';} forEach (curatorSelected select 1);"; }; class diamond { - displayName = "$STR_diamond"; + displayName = "$STR_Diamond"; icon="\A3\UI_F_Curator\Data\RscCommon\RscAttributeFormation\diamond_ca.paa"; statement = "{_x setWaypointFormation 'DIAMOND';} forEach (curatorSelected select 1);"; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 9e9dc4bc76..997974d2e3 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -91,7 +91,7 @@ class CfgVehicles { class ACE_JoinGroup { displayName = CSTRING(JoinGroup); - condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinGroup)); + condition = QUOTE(GVAR(EnableTeamManagement) && {[ARR_2(_player,_target)] call DFUNC(canJoinGroup)}); statement = QUOTE([_player] joinSilent group _target); showDisabled = 0; priority = 2.6; @@ -351,7 +351,7 @@ class CfgVehicles { hotkey = "7"; }; class ACE_Gesture_Yes { - displayName = CSTRING(Gestures_Yes); + displayName = ECSTRING(common,Yes); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2);); showDisabled = 1; @@ -359,7 +359,7 @@ class CfgVehicles { hotkey = "8"; }; class ACE_Gesture_No { - displayName = CSTRING(Gestures_No); + displayName = ECSTRING(common,No); condition = QUOTE(canStand _target); statement = QUOTE(_target playActionNow 'gestureNo';); showDisabled = 1; @@ -548,7 +548,7 @@ class CfgVehicles { }; }; }; - + class StaticMGWeapon: StaticWeapon {}; class HMG_01_base_F: StaticMGWeapon {}; class HMG_01_high_base_F: HMG_01_base_F { @@ -557,14 +557,14 @@ class CfgVehicles { 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 { @@ -575,6 +575,25 @@ class CfgVehicles { class thingX; class ReammoBox_F: thingX { + class ACE_Actions { + class ACE_MainActions { + displayName = CSTRING(MainAction); + selection = ""; + distance = 2; + condition = "true"; + class ACE_OpenBox { + displayName = CSTRING(OpenBox); + condition = QUOTE(alive _target); + statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)), _target)]); + showDisabled = 0; + priority = -1; + }; + }; + }; + class ACE_SelfActions {}; + }; + + class ACE_RepairItem_Base: thingX { class ACE_Actions { class ACE_MainActions { displayName = CSTRING(MainAction); diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 624e63a424..4f1df733b7 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -385,30 +385,6 @@ Olá Ciao - - Yes - Ja - Si - Tak - Ano - Oui - Да - Igen - Sim - Si - - - No - Nein - No - Nie - Ne - Non - Нет - Nem - Não - No - Put weapon on back Waffe wegstecken @@ -793,12 +769,19 @@ Passeggeri Passageiros + + Open + Otwórz + Otevřít + Abrir + Interaction System System interakcji Sistema de interacción Interaktionssystem Systém interakce + Sistema de interação Enable Team Management @@ -806,6 +789,7 @@ Habilitar gestión de equipos Aktiviere Gruppenverwaltung Povolit správu týmu + Habilitar gestão de equipes Should players be allowed to use the Team Management Menu? Default: Yes @@ -813,24 +797,15 @@ ¿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 + Devem os jogadores ter permissão de usar o menu de gestão de equipes? Padrão: Sim Team management allows color allocation for team members, taking team command and joining/leaving teams. Na zarządzanie drużyną składa się: przydział kolorów dla członków drużyny, przejmowanie dowodzenia, dołączanie/opuszczanie drużyn. Die Gruppenverwaltung erlaubt die Zuweisung von Farben für Einheiten, die Kommandierung und das Beitreten/Verlassen einer Gruppe. Správa týmu se skládá z: přidělení barev pro členy týmu, převzetí velení, připojení/odpojení. - - - Behaviour - - - Careless - - - Formation - - - Speed Mode + O módulo de gestão de equipe é composto por: a atribuição de cores para os membros da equipe, comando das equipes, juntando-se / deixando equipes. + La gestión del equipo permite la asignación de colores para los miembros del equipo, tomando el mando del equipo y uniendo/dejando equipos. - + \ No newline at end of file diff --git a/addons/javelin/XEH_pre_init.sqf b/addons/javelin/XEH_pre_init.sqf index 1accd4a8f4..961f9af93d 100644 --- a/addons/javelin/XEH_pre_init.sqf +++ b/addons/javelin/XEH_pre_init.sqf @@ -9,5 +9,7 @@ PREP(showFireMode); PREP(onFired); PREP(onOpticLoad); PREP(onOpticDraw); +PREP(onOpticUnload); -GVAR(isLockKeyDown) = false; \ No newline at end of file +GVAR(isLockKeyDown) = false; +GVAR(pfehID) = -1; diff --git a/addons/javelin/functions/fnc_onFired.sqf b/addons/javelin/functions/fnc_onFired.sqf index fa947bfdd5..fce170fde9 100644 --- a/addons/javelin/functions/fnc_onFired.sqf +++ b/addons/javelin/functions/fnc_onFired.sqf @@ -1,21 +1,17 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" -PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); +PARAMS_2(_shooter,_weapon); -// Bail on not missile -if( _shooter != ACE_player) exitWith { false }; +// Bail on not missile or javelin PFEH not running +if ((_shooter != ACE_player) || {(GVAR(pfehID) == -1)}) exitWith { false }; + +private ["_configs"]; _configs = configProperties [configFile >> "CfgWeapons" >> _weapon, QUOTE(configName _x == QUOTE(QGVAR(enabled))), false]; if (((count _configs) < 1) || {(getNumber (_configs select 0)) != 1}) exitWith {}; -_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil]; -if(!isNil "_pfh_handle") then { - //[_pfh_handle] call cba_fnc_removePerFrameHandler; - //uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil]; - - __JavelinIGUITargeting ctrlShow false; - __JavelinIGUITargetingGate ctrlShow false; - __JavelinIGUITargetingLines ctrlShow false; - __JavelinIGUITargetingConstraints ctrlShow false; -}; \ No newline at end of file +__JavelinIGUITargeting ctrlShow false; +__JavelinIGUITargetingGate ctrlShow false; +__JavelinIGUITargetingLines ctrlShow false; +__JavelinIGUITargetingConstraints ctrlShow false; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index 3e293fcb9c..cf02d5359e 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -56,7 +56,7 @@ if (((count _weaponConfig) < 1) || {(getNumber (_weaponConfig select 0)) != 1}) }; [(_this select 1)] call cba_fnc_removePerFrameHandler; - uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil]; + GVAR(pfehID) = -1; }; // Find a target within the optic range diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf index 0332c132e9..895a48c910 100644 --- a/addons/javelin/functions/fnc_onOpticLoad.sqf +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -18,6 +18,10 @@ __JavelinIGUITargetingConstrains ctrlShow false; __JavelinIGUITargetingGate ctrlShow false; __JavelinIGUITargetingLines ctrlShow false; +if(GVAR(pfehID) != -1) then { + [] call FUNC(onOpticUnload); // Unload optic if it was already loaded +}; + uiNameSpace setVariable [QGVAR(arguments), [ ACE_diagTime, // Last runtime @@ -30,11 +34,4 @@ uiNameSpace setVariable [QGVAR(arguments), ] ]; - - -_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil]; -if(!isNil "_pfh_handle") then { - [] call FUNC(onOpticUnload); // Unload optic if it was already loaded -}; -_pfh_handle = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; -uiNamespace setVariable["ACE_RscOptics_javelin_PFH", _pfh_handle]; +GVAR(pfehID) = [FUNC(onOpticDraw), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/javelin/functions/fnc_onOpticUnload.sqf b/addons/javelin/functions/fnc_onOpticUnload.sqf index 187b6cf589..714a3e7748 100644 --- a/addons/javelin/functions/fnc_onOpticUnload.sqf +++ b/addons/javelin/functions/fnc_onOpticUnload.sqf @@ -1,14 +1,13 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" TRACE_1("enter", _this); -private["_args", "_disableFireEH", "_pfh"]; +private["_args", "_disableFireEH"]; -uiNameSpace setVariable ['ACE_RscOptics_javelin',nil]; +// uiNameSpace setVariable ['ACE_RscOptics_javelin',nil]; -_pfh = uiNamespace getVariable["ACE_RscOptics_javelin_PFH", nil ]; -if(!isNil "_pfh") then { - [_pfh] call CBA_fnc_removePerFrameHandler; - uiNameSpace setVariable ['ACE_RscOptics_javelin_PFH',nil]; +if(GVAR(pfehID) != -1) then { + [GVAR(pfehID)] call CBA_fnc_removePerFrameHandler; + GVAR(pfehID) = -1; }; _args = uiNamespace getVariable[QGVAR(arguments), nil ]; diff --git a/addons/kestrel4500/CfgVehicles.hpp b/addons/kestrel4500/CfgVehicles.hpp index 776bd8dcf5..9ca6510928 100644 --- a/addons/kestrel4500/CfgVehicles.hpp +++ b/addons/kestrel4500/CfgVehicles.hpp @@ -39,13 +39,10 @@ class CfgVehicles { author = "Ruthberg"; scope = 2; scopeCurator = 2; - displayName = "Kestrel 4500"; + displayName = CSTRING(Name); vehicleClass = "Items"; class TransportItems { - class ACE_Kestrel4500 { - name = "ACE_Kestrel4500"; - count = 1; - }; + MACRO_ADDITEM(ACE_Kestrel4500,1); }; }; diff --git a/addons/kestrel4500/RscTitles.hpp b/addons/kestrel4500/RscTitles.hpp index fe0adf2c4b..7046918935 100644 --- a/addons/kestrel4500/RscTitles.hpp +++ b/addons/kestrel4500/RscTitles.hpp @@ -56,6 +56,7 @@ class Kestrel4500_Display { controlsBackground[]={}; objects[]={}; class controls { + #define DIALOG_SAFE_Y(num) QUOTE((safeZoneY + num) min (safeZoneY + safeZoneH - 1.024*4/3 + num)) class BACKGROUND { moving=1; type=0; @@ -64,7 +65,7 @@ class Kestrel4500_Display { idc=74000; style=48; x=safezoneX; - y=safezoneY; + y = DIALOG_SAFE_Y(0); w=1.024; h=1.024*4/3; colorBackground[]={1,1,1,1}; @@ -74,7 +75,7 @@ class Kestrel4500_Display { class POWER: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.385; - y=safezoneY+1.125; + y = DIALOG_SAFE_Y(1.125); w=0.042; h=0.042*4/3; action=QUOTE(7 call FUNC(buttonPressed)); @@ -83,7 +84,7 @@ class Kestrel4500_Display { class ENTER: POWER { idc=-1; x=safezoneX+0.46; - y=safezoneY+1.0; + y = DIALOG_SAFE_Y(1.0); w=0.1; action=QUOTE(0 call FUNC(buttonPressed)); onMouseButtonDown = "playSound 'kestrel4500_center_button_click'"; @@ -91,7 +92,7 @@ class Kestrel4500_Display { class TOP: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.46; - y=safezoneY+0.93; + y = DIALOG_SAFE_Y(0.93); w=0.1; h=0.03; action=QUOTE(1 call FUNC(buttonPressed)); @@ -99,14 +100,14 @@ class Kestrel4500_Display { }; class BOTTOM: TOP { idc=-1; - y=safezoneY+1.1; + y = DIALOG_SAFE_Y(1.1); action=QUOTE(2 call FUNC(buttonPressed)); onMouseButtonDown = "playSound 'kestrel4500_bottom_button_click'"; }; class LEFT: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.4; - y=safezoneY+0.97; + y = DIALOG_SAFE_Y(0.97); w=0.046; h=0.11; action=QUOTE(3 call FUNC(buttonPressed)); @@ -121,7 +122,7 @@ class Kestrel4500_Display { class MEMORY: Kestrel4500_RscButton { idc=-1; x=safezoneX+0.395; - y=safezoneY+0.87; + y = DIALOG_SAFE_Y(0.87); w=0.05; h=0.045*4/3; action=QUOTE(5 call FUNC(buttonPressed)); @@ -131,39 +132,39 @@ class Kestrel4500_Display { x=safezoneX+0.585; action=QUOTE(6 call FUNC(buttonPressed)); }; - + class TEXT_TOP: Kestrel4500_RscText { idc=74100; x=safezoneX+0.40; - y=safezoneY+0.58; + y = DIALOG_SAFE_Y(0.58); w=0.22; h=0.04; text=""; }; class TEXT_CENTER_BIG: TEXT_TOP { idc=74200; - y=safezoneY+0.61; + y = DIALOG_SAFE_Y(0.61); h=0.10; SizeEx=0.06; }; class TEXT_CENTER: TEXT_TOP { idc=74201; - y=safezoneY+0.64; + y = DIALOG_SAFE_Y(0.64); }; class TEXT_CENTER_LINE_1_LEFT: TEXT_TOP { idc=74300; - y=safezoneY+0.60; + y = DIALOG_SAFE_Y(0.60); style=ST_LEFT; h=0.10; SizeEx=0.05; }; class TEXT_CENTER_LINE2_LEFT: TEXT_CENTER_LINE_1_LEFT { idc=74301; - y=safezoneY+0.64; + y = DIALOG_SAFE_Y(0.64); }; class TEXT_CENTER_LINE_3_LEFT: TEXT_CENTER_LINE2_LEFT { idc=74302; - y=safezoneY+0.68; + y = DIALOG_SAFE_Y(0.68); }; class TEXT_CENTER_LINE_1_RIGHT: TEXT_CENTER_LINE_1_LEFT { idc=74303; @@ -179,42 +180,42 @@ class Kestrel4500_Display { }; class TEXT_INFO_LINE_1: TEXT_TOP { idc=74400; - y=safezoneY+0.68; + y = DIALOG_SAFE_Y(0.68); }; class TEXT_INFO_LINE_2: TEXT_TOP { idc=74401; - y=safezoneY+0.72; + y = DIALOG_SAFE_Y(0.72); }; class TEXT_BOTTOM_BIG: TEXT_TOP { idc=74500; - y=safezoneY+0.67; + y = DIALOG_SAFE_Y(0.67); h=0.10; SizeEx=0.06; }; class TEXT_CENTER_LINE_1: TEXT_TOP { idc=74600; - y=safezoneY+0.58; + y = DIALOG_SAFE_Y(0.58); SizeEx=0.03; }; class TEXT_CENTER_LINE_2: TEXT_CENTER_LINE_1 { idc=74601; - y=safezoneY+0.61; + y = DIALOG_SAFE_Y(0.61); }; class TEXT_CENTER_LINE_3: TEXT_CENTER_LINE_1 { idc=74602; - y=safezoneY+0.64; + y = DIALOG_SAFE_Y(0.64); }; class TEXT_CENTER_LINE_4: TEXT_CENTER_LINE_1 { idc=74603; - y=safezoneY+0.67; + y = DIALOG_SAFE_Y(0.67); }; class TEXT_CENTER_LINE_5: TEXT_CENTER_LINE_1 { idc=74604; - y=safezoneY+0.70; + y = DIALOG_SAFE_Y(0.70); }; class TEXT_CENTER_LINE_6: TEXT_CENTER_LINE_1 { idc=74605; - y=safezoneY+0.73; + y = DIALOG_SAFE_Y(0.73); }; }; }; @@ -228,6 +229,7 @@ class RscTitles { fadeIn="false"; fadeOut="false"; class controls { + #define DISPLAY_SAFE_Y(num) QUOTE((safeZoneY + 0.7 + num) min (safeZoneY + safeZoneH - 1.024*4/3*0.75 + num)) class RscKestrel4500 { idc=75000; moving=0; @@ -236,7 +238,7 @@ class RscTitles { SizeEX=0.025*0.75; style=48; x=safezoneX+0.14; - y=safezoneY+0.7; + y = DISPLAY_SAFE_Y(0); w=0.512*0.75; h=1.024*4/3*0.75; colorBackground[]={1,1,1,1}; @@ -246,7 +248,7 @@ class RscTitles { class RscTextTop: Kestrel4500_RscText { idc=75100; x=safezoneX-0.05+0.40*0.75; - y=safezoneY+0.7+0.58*0.75; + y = DISPLAY_SAFE_Y(0.58*0.75); w=0.22*0.75; h=0.04*0.75; SizeEx=0.04*0.75; @@ -254,18 +256,18 @@ class RscTitles { }; class RscTextCenterBig: RscTextTop { idc=75200; - y=safezoneY+0.7+0.61*0.75; + y = DISPLAY_SAFE_Y(0.61*0.75); h=0.10*0.75; SizeEx=0.06*0.75; text=""; }; class RscTextCenter: RscTextTop { idc=75201; - y=safezoneY+0.7+0.64*0.75; + y = DISPLAY_SAFE_Y(0.64*0.75); }; class RscTextCenterLine1Left: RscTextTop { idc=75300; - y=safezoneY+0.7+0.60*0.75; + y = DISPLAY_SAFE_Y(0.60*0.75); style=ST_LEFT; h=0.10*0.75; SizeEx=0.05*0.75; @@ -273,12 +275,12 @@ class RscTitles { }; class RscTextCenterLine2Left: RscTextCenterLine1Left { idc=75301; - y=safezoneY+0.7+0.64*0.75; + y = DISPLAY_SAFE_Y(0.64*0.75); text=""; }; class RscTextCenterLine3Left: RscTextCenterLine2Left { idc=75302; - y=safezoneY+0.7+0.68*0.75; + y = DISPLAY_SAFE_Y(0.68*0.75); text=""; }; class RscTextCenterLine1Right: RscTextCenterLine1Left { @@ -295,49 +297,49 @@ class RscTitles { }; class RscTextInfoLine1: RscTextTop { idc=75400; - y=safezoneY+0.7+0.68*0.75; + y = DISPLAY_SAFE_Y(0.68*0.75); text=""; }; class RscTextInfoLine2: RscTextTop { idc=75401; - y=safezoneY+0.7+0.72*0.75; + y = DISPLAY_SAFE_Y(0.72*0.75); text=""; }; class RscTextBottomBig: RscTextTop { idc=75500; - y=safezoneY+0.7+0.67*0.75; + y = DISPLAY_SAFE_Y(0.67*0.75); h=0.10*0.75; SizeEx=0.06*0.75; text=""; }; class RscTextCenterLine1: RscTextTop { idc=75600; - y=safezoneY+0.7+0.58*0.75; + y = DISPLAY_SAFE_Y(0.58*0.75); SizeEx=0.03*0.75; }; class RscTextCenterLine2: RscTextCenterLine1 { idc=75601; - y=safezoneY+0.7+0.61*0.75; + y = DISPLAY_SAFE_Y(0.61*0.75); }; class RscTextCenterLine3: RscTextCenterLine1 { idc=75602; - y=safezoneY+0.7+0.64*0.75; + y = DISPLAY_SAFE_Y(0.64*0.75); }; class RscTextCenterLine4: RscTextCenterLine1 { idc=75603; - y=safezoneY+0.7+0.67*0.75; + y = DISPLAY_SAFE_Y(0.67*0.75); }; class RscTextCenterLine5: RscTextCenterLine1 { idc=75604; - y=safezoneY+0.7+0.70*0.75; + y = DISPLAY_SAFE_Y(0.70*0.75); }; class RscTextCenterLine6: RscTextCenterLine1 { idc=75605; - y=safezoneY+0.7+0.73*0.75; + y = DISPLAY_SAFE_Y(0.73*0.75); }; }; }; - + class RscKestrel4500_Preload { idd = -1; movingEnable = 0; diff --git a/addons/kestrel4500/data/Kestrel4500.p3d b/addons/kestrel4500/data/Kestrel4500.p3d index 8166e552f2..feb4f842cb 100644 Binary files a/addons/kestrel4500/data/Kestrel4500.p3d and b/addons/kestrel4500/data/Kestrel4500.p3d differ diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf index 4858ad80b2..244e719b37 100644 --- a/addons/kestrel4500/functions/fnc_collectData.sqf +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -20,7 +20,7 @@ _playerAltitude = (getPosASL ACE_player) select 2; _temperature = _playerAltitude call EFUNC(weather,calculateTemperatureAtHeight); _humidity = EGVAR(weather,currentHumidity); _barometricPressure = _playerAltitude call EFUNC(weather,calculateBarometricPressure); -_altitude = EGVAR(weather,Altitude) + _playerAltitude; +_altitude = EGVAR(common,mapAltitude) + _playerAltitude; _airDensity = [_temperature, _barometricPressure, _humidity] call EFUNC(weather,calculateAirDensity); _densityAltitude = _airDensity call EFUNC(weather,calculateDensityAltitude); _chill = [_temperature, _humidity] call EFUNC(weather,calculateWindChill); diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index fce359de6f..d61a1f48e4 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -276,7 +276,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 12: { // ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(EGVAR(weather,Altitude) + _playerAltitude)); + _textCenterBig = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; @@ -300,7 +300,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 14: { // User Screen 1 _textCenterLine1Left = Str(round(_playerDir)); - _textCenterLine2Left = Str(round(EGVAR(weather,Altitude) + _playerAltitude)); + _textCenterLine2Left = Str(round(EGVAR(common,mapAltitude) + _playerAltitude)); _textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10); _textCenterLine1Right = GVAR(Directions) select GVAR(Direction); _textCenterLine2Right = "m"; diff --git a/addons/laser/functions/fnc_laser_init.sqf b/addons/laser/functions/fnc_laser_init.sqf index 2be349c294..304cd5938a 100644 --- a/addons/laser/functions/fnc_laser_init.sqf +++ b/addons/laser/functions/fnc_laser_init.sqf @@ -26,7 +26,7 @@ if(!isDedicated) then { _uuid = [(vehicle ACE_player), ACE_player, QFUNC(vanillaLaserSeekerHandler), ACE_DEFAULT_LASER_WAVELENGTH, ACE_DEFAULT_LASER_CODE, ACE_DEFAULT_LASER_BEAMSPREAD] call FUNC(laserOn); _laserTarget setVariable [QGVAR(uuid), _uuid, false]; - [FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call cba_fnc_addPerFrameHandler; + [FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player, _uuid]] call CBA_fnc_addPerFrameHandler; } else { // server side ownership of laser _laserTarget setVariable [QGVAR(owner), nil, true]; diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 346aec837e..22287f1342 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -12,13 +12,13 @@ * Return value: * Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found. */ - + #include "script_component.hpp" -private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; -private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; +private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; +private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; -private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; +private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; _pos = _this select 0; _dir = vectorNormalized (_this select 1); @@ -62,17 +62,19 @@ _finalOwner = nil; }; }; }; - _laserPos = _laser select 0; - _laserDir = _laser select 1; - _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); - { - _testPoint = _x select 0; - _testPointVector = vectorNormalized (_testPoint vectorDiff _pos); - _testDotProduct = _dir vectorDotProduct _testPointVector; - if(_testDotProduct > _seekerCos) then { - _spots pushBack [_testPoint, _owner]; - }; - } forEach (_res select 2); + + //Handle Weird Data Return + if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then { + _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); + { + _testPoint = _x select 0; + _testPointVector = vectorNormalized (_testPoint vectorDiff _pos); + _testDotProduct = _dir vectorDotProduct _testPointVector; + if(_testDotProduct > _seekerCos) then { + _spots pushBack [_testPoint, _owner]; + }; + } forEach (_res select 2); + }; }; } forEach (GVAR(laserEmitters) select 1); @@ -119,10 +121,10 @@ if((count _spots) > 0) then { _largestIndex = _index; }; } forEach _buckets; - + _finalBucket = _finalBuckets select _largestIndex; _owners = HASH_CREATE; - + if(count _finalBucket > 0) then { _avgX = 0; _avgY = 0; diff --git a/addons/laser/initKeybinds.sqf b/addons/laser/initKeybinds.sqf index 5e3d017103..25fdd2ddcc 100644 --- a/addons/laser/initKeybinds.sqf +++ b/addons/laser/initKeybinds.sqf @@ -1,9 +1,9 @@ ["ACE3 Equipment", QGVAR(LaserCodeUp), localize LSTRING(laserCodeUp), { - if( EGVAR(laser_selfdesignate,active) - || + if( EGVAR(laser_selfdesignate,active) + || { (currentWeapon ACE_player) == "Laserdesignator" && (call CBA_fnc_getFoV) select 1 > 5 } // If laserdesignator & FOV, we are in scope. - || + || { [ACE_player] call FUNC(unitTurretCanLockLaser) } ) then { [] call FUNC(keyLaserCodeUp); @@ -14,14 +14,14 @@ ["ACE3 Equipment", QGVAR(LaserCodeDown), localize LSTRING(laserCodeDown), { - if( EGVAR(laser_selfdesignate,active) - || + if( EGVAR(laser_selfdesignate,active) + || { (currentWeapon ACE_player) == "Laserdesignator" && (call CBA_fnc_getFoV) select 1 > 5 } // If laserdesignator & FOV, we are in scope. - || + || { [ACE_player] call FUNC(unitTurretCanLockLaser) } ) then { [] call FUNC(keyLaserCodeDown); }; }, {false}, -[18, [true, true, true]], false, 0] call CBA_fnc_addKeybind; // (ALT+CTRL+E) +[18, [false, true, true]], false, 0] call CBA_fnc_addKeybind; // (ALT+CTRL+E) diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf index 0da2866738..a07b197236 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -83,7 +83,7 @@ if(!GVAR(active)) then { // @TODO: Nou gets to field all tickets about missing lasers. //_localLaserTarget = "LaserTargetW" createVehicleLocal (getpos ACE_player); - GVAR(selfDesignateHandle) = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call cba_fnc_addPerFrameHandler; + GVAR(selfDesignateHandle) = [FUNC(laserHudDesignatePFH), 0.1, [ACE_player, _laserUuid, nil]] call CBA_fnc_addPerFrameHandler; } else { [] call FUNC(laserHudDesignateOff); [] call FUNC(laserHudDesignateOn); diff --git a/addons/logistics_uavbattery/CfgVehicles.hpp b/addons/logistics_uavbattery/CfgVehicles.hpp index ca924a1cb8..a6f2db786f 100644 --- a/addons/logistics_uavbattery/CfgVehicles.hpp +++ b/addons/logistics_uavbattery/CfgVehicles.hpp @@ -30,10 +30,7 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { - class _xx_ACE_UAVBattery { - count = 6; - name = "ACE_UAVBattery"; - }; + MACRO_ADDITEM(ACE_UAVBattery,6); }; }; }; diff --git a/addons/logistics_uavbattery/CfgWeapons.hpp b/addons/logistics_uavbattery/CfgWeapons.hpp index 923d2dd934..46120f7c3d 100644 --- a/addons/logistics_uavbattery/CfgWeapons.hpp +++ b/addons/logistics_uavbattery/CfgWeapons.hpp @@ -6,7 +6,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(Battery_Name); descriptionShort = CSTRING(Battery_Description); - model = QUOTE(PATHTOF(models\ace_battery.p3d)); + model = QUOTE(PATHTOF(data\ace_battery.p3d)); picture = QUOTE(PATHTOF(ui\UAV_battery_ca.paa)); class ItemInfo: InventoryItem_Base_F { mass = 20; diff --git a/addons/logistics_uavbattery/data/ace_battery.p3d b/addons/logistics_uavbattery/data/ace_battery.p3d new file mode 100644 index 0000000000..fff6e0fc1e Binary files /dev/null and b/addons/logistics_uavbattery/data/ace_battery.p3d differ diff --git a/addons/logistics_uavbattery/models/battery.rvmat b/addons/logistics_uavbattery/data/battery.rvmat similarity index 87% rename from addons/logistics_uavbattery/models/battery.rvmat rename to addons/logistics_uavbattery/data/battery.rvmat index 36329ac896..91ba414cc3 100644 --- a/addons/logistics_uavbattery/models/battery.rvmat +++ b/addons/logistics_uavbattery/data/battery.rvmat @@ -8,7 +8,7 @@ PixelShaderID="Super"; VertexShaderID="Super"; class Stage1 { - texture="z\ace\addons\logistics_uavbattery\models\battery_nohq.paa"; + texture="z\ace\addons\logistics_uavbattery\data\battery_nohq.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; @@ -38,7 +38,7 @@ class Stage3 { }; }; class Stage4 { - texture="z\ace\addons\logistics_uavbattery\models\default_as.paa"; + texture="z\ace\addons\logistics_uavbattery\data\default_as.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; @@ -48,7 +48,7 @@ class Stage4 { }; }; class Stage5 { - texture="z\ace\addons\logistics_uavbattery\models\battery_smdi.paa"; + texture="z\ace\addons\logistics_uavbattery\data\battery_smdi.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; diff --git a/addons/logistics_uavbattery/data/battery_co.paa b/addons/logistics_uavbattery/data/battery_co.paa new file mode 100644 index 0000000000..2d20df9d70 Binary files /dev/null and b/addons/logistics_uavbattery/data/battery_co.paa differ diff --git a/addons/logistics_uavbattery/data/battery_nohq.paa b/addons/logistics_uavbattery/data/battery_nohq.paa new file mode 100644 index 0000000000..54569435c7 Binary files /dev/null and b/addons/logistics_uavbattery/data/battery_nohq.paa differ diff --git a/addons/logistics_uavbattery/data/battery_smdi.paa b/addons/logistics_uavbattery/data/battery_smdi.paa new file mode 100644 index 0000000000..5f20937613 Binary files /dev/null and b/addons/logistics_uavbattery/data/battery_smdi.paa differ diff --git a/addons/logistics_uavbattery/models/default_as.paa b/addons/logistics_uavbattery/data/default_as.paa similarity index 100% rename from addons/logistics_uavbattery/models/default_as.paa rename to addons/logistics_uavbattery/data/default_as.paa diff --git a/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf b/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf index aaaac3077d..451753a9e2 100644 --- a/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf +++ b/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf @@ -16,6 +16,6 @@ */ #include "script_component.hpp" -PARAMS_2(_caller,_target); +params ["_caller", "_target"]; ("ACE_UAVBattery" in (items _caller)) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4} diff --git a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf index e51f17777e..25f452882c 100644 --- a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf +++ b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf @@ -15,23 +15,21 @@ * Public: No */ #include "script_component.hpp" - -PARAMS_2(_caller,_target); - private ["_onFinish", "_onFailure"]; +params ["_caller", "_target"]; if (!(_this call FUNC(canRefuelUAV))) exitWith {}; _onFinish = { - EXPLODE_2_PVT((_this select 0),_caller,_target); - _caller removeItem "ACE_UAVBattery"; - playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10]; - ["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local + (_this select 0) params ["_caller", "_target"]; + _caller removeItem "ACE_UAVBattery"; + playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10]; + ["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local }; _onFailure = { - EXPLODE_2_PVT((_this select 0),_caller,_target); - [_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); + (_this select 0) params ["_caller", "_target"]; + [_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); }; [_caller, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation); diff --git a/addons/logistics_uavbattery/models/ace_battery.p3d b/addons/logistics_uavbattery/models/ace_battery.p3d deleted file mode 100644 index bf756d62cb..0000000000 Binary files a/addons/logistics_uavbattery/models/ace_battery.p3d and /dev/null differ diff --git a/addons/logistics_uavbattery/models/battery_co.paa b/addons/logistics_uavbattery/models/battery_co.paa deleted file mode 100644 index 14abfa75b0..0000000000 Binary files a/addons/logistics_uavbattery/models/battery_co.paa and /dev/null differ diff --git a/addons/logistics_uavbattery/models/battery_nohq.paa b/addons/logistics_uavbattery/models/battery_nohq.paa deleted file mode 100644 index 11b7e6e14d..0000000000 Binary files a/addons/logistics_uavbattery/models/battery_nohq.paa and /dev/null differ diff --git a/addons/logistics_uavbattery/models/battery_smdi.paa b/addons/logistics_uavbattery/models/battery_smdi.paa deleted file mode 100644 index 85ea45371f..0000000000 Binary files a/addons/logistics_uavbattery/models/battery_smdi.paa and /dev/null differ diff --git a/addons/logistics_wirecutter/CfgWeapons.hpp b/addons/logistics_wirecutter/CfgWeapons.hpp index 31de39cf2c..4297cb3b83 100644 --- a/addons/logistics_wirecutter/CfgWeapons.hpp +++ b/addons/logistics_wirecutter/CfgWeapons.hpp @@ -6,7 +6,7 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(wirecutterName); descriptionShort = CSTRING(wirecutterDescription); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_wirecutter.p3d)); picture = QUOTE(PATHTOF(ui\item_wirecutter_ca.paa)); scope = 2; class ItemInfo: InventoryItem_Base_F { diff --git a/addons/logistics_wirecutter/data/ace_wirecutter.p3d b/addons/logistics_wirecutter/data/ace_wirecutter.p3d new file mode 100644 index 0000000000..ebb459f99f Binary files /dev/null and b/addons/logistics_wirecutter/data/ace_wirecutter.p3d differ diff --git a/addons/logistics_wirecutter/data/ace_wirecutter.rvmat b/addons/logistics_wirecutter/data/ace_wirecutter.rvmat new file mode 100644 index 0000000000..1983a2c8f1 --- /dev/null +++ b/addons/logistics_wirecutter/data/ace_wirecutter.rvmat @@ -0,0 +1,90 @@ +class StageTI +{ + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,1}; +emmisive[] = {0,0,0,1}; +specular[] = {0,0,0,1}; +specularPower = 0; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\logistics_wirecutter\data\ace_wirecutter_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,32,128,1)fresnel(0.71,0.74)"; + uvSource = "none"; +}; +class Stage7 +{ + texture = "a3\data_f\env_land_co.paa"; + useWorldEnvMap = "true"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1.0,0.0,0.0}; + up[] = {0.0,1.0,0.0}; + dir[] = {0.0,0.0,0.0}; + pos[] = {0.0,0.0,0.0}; + }; +}; \ No newline at end of file diff --git a/addons/logistics_wirecutter/data/ace_wirecutter_co.paa b/addons/logistics_wirecutter/data/ace_wirecutter_co.paa new file mode 100644 index 0000000000..6dc2f01fac Binary files /dev/null and b/addons/logistics_wirecutter/data/ace_wirecutter_co.paa differ diff --git a/addons/logistics_wirecutter/data/ace_wirecutter_nohq.paa b/addons/logistics_wirecutter/data/ace_wirecutter_nohq.paa new file mode 100644 index 0000000000..7158e713ab Binary files /dev/null and b/addons/logistics_wirecutter/data/ace_wirecutter_nohq.paa differ diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 1fb4a0b622..e67c45e675 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -25,7 +25,7 @@ #ifndef STRING_MACROS_GUARD #define STRING_MACROS_GUARD #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) - #define LESTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) #endif @@ -68,6 +68,11 @@ count = COUNT; \ } +#define MACRO_ADDBACKPACK(BACKPACK,COUNT) class _xx_##BACKPACK { \ + backpack = #BACKPACK; \ + count = COUNT; \ +} + #ifdef DISABLE_COMPILE_CACHE #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index b94cde4b31..e38e71ac4b 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -4,7 +4,7 @@ #define PREFIX ace #define MAJOR 3 -#define MINOR 1 +#define MINOR 2 #define PATCHLVL 2 #define BUILD 0 diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index d1b7e38dba..30cae96ef6 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -39,14 +39,13 @@ class CfgVehicles { }; }; - class Module_F; - class ACE_ModuleBlueForceTracking: Module_F { + class ACE_ModuleBlueForceTracking: ACE_Module { author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(BFT_Module_DisplayName); function = QFUNC(blueForceTrackingModule); scope = 2; - isGlobal = 1; + isGlobal = 0; icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Enabled { diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index a3f377544b..95f42db431 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -18,12 +18,36 @@ call FUNC(determineZoom); GVAR(lastStillTime) = ACE_time; GVAR(isShaking) = false; + //Allow panning the lastStillPosition while mapShake is active + GVAR(rightMouseButtonLastPos) = []; ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}]; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", { + if (GVAR(isShaking) && {(count GVAR(rightMouseButtonLastPos)) == 2}) then { + private["_lastPos", "_newPos"]; + _lastPos = (_this select 0) ctrlMapScreenToWorld GVAR(rightMouseButtonLastPos); + _newPos = (_this select 0) ctrlMapScreenToWorld (_this select [1,2]); + GVAR(lastStillPosition) set [0, (GVAR(lastStillPosition) select 0) + (_lastPos select 0) - (_newPos select 0)]; + GVAR(lastStillPosition) set [1, (GVAR(lastStillPosition) select 1) + (_lastPos select 1) - (_newPos select 1)]; + GVAR(rightMouseButtonLastPos) = _this select [1,2]; + TRACE_3("Mouse Move",_lastPos,_newPos,GVAR(rightMouseButtonLastPos)); + }; + }]; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonDown", { + if ((_this select 1) == 1) then { + GVAR(rightMouseButtonLastPos) = _this select [2,2]; + }; + }]; + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonUp", { + if ((_this select 1) == 1) then { + GVAR(rightMouseButtonLastPos) = []; + }; + }]; }; ["SettingsInitialized", { // Start Blue Force Tracking if Enabled if (GVAR(BFT_Enabled)) then { + diag_log text "[ACE] Blue Force Tracking Enabled (client)"; GVAR(BFT_markers) = []; [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 078c06b41d..16cfd2bc31 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -125,13 +125,6 @@ class RscDisplayDiary { }; }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; // BRIEFING SCREEN @@ -149,13 +142,6 @@ class RscDisplayGetReady: RscDisplayMainMap { #include "MapControls.hpp" }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; class RscDisplayClientGetReady: RscDisplayGetReady { // get rid of the "center to player position" - button (as it works even on elite) @@ -164,13 +150,6 @@ class RscDisplayClientGetReady: RscDisplayGetReady { #include "MapControls.hpp" }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; class RscDisplayServerGetReady: RscDisplayGetReady { // get rid of the "center to player position" - button (as it works even on elite) @@ -179,11 +158,4 @@ class RscDisplayServerGetReady: RscDisplayGetReady { #include "MapControls.hpp" }; }; - // scale up the compass - class objects { - class Compass: RscObject { - scale = 0.7; - zoomDuration = 0; - }; - }; }; diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index bab776c9ab..33049c38ca 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -12,15 +12,12 @@ #include "script_component.hpp" -if !(hasInterface) exitWith {}; +if (!isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); - -if !(_activated) exitWith {}; +PARAMS_1(_logic); [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Blue Force Tracking Module initialized."; -TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); +diag_log text "[ACE]: Blue Force Tracking Module initialized. (server)"; diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 930baf7835..3f2d312fae 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -7,6 +7,7 @@ Mapa Karte Mapa + Mapa Map illumination? @@ -14,6 +15,7 @@ ¿Iluminación de mapa? Kartenausleuchtung Osvětlení mapy + Iluminação do mapa? Calculate dynamic map illumination based on light conditions? @@ -21,6 +23,7 @@ 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? + Calcular a iluminação dinâmica do mapa de acordo com as condições de luz? Map shake? @@ -28,6 +31,7 @@ ¿Temblor de mapa? Kamerawackeln Třesení mapy? + Tremor de mapa? Make map shake when walking? @@ -35,6 +39,7 @@ Hace que el mapa tiemble cuando caminas Kamerawackeln beim Gehen? Umožnit třesení mapy za pochodu? + Tremer o mapa enquanto caminha? Limit map zoom? @@ -42,6 +47,7 @@ ¿Limitar el zoom de mapa? Kartenzoom einschränken Omezit přiblížení mapy? + Limitar zoom do mapa? Limit the amount of zoom available for the map? @@ -49,6 +55,7 @@ Limita la cantidad de zoom disponible para el mapa Zoomstufe der Karte einschränken? Omezit stupeň přiblížení pro mapu? + Limitar a quantidade de zoom disponível para o mapa? Show cursor coordinates? @@ -56,6 +63,7 @@ ¿Mostrar coordenadas de cursor? Zeige Cursor-Koordinaten? Zobrazit souřadnice u kurzoru? + Mostrar coordenadas no cursor? Show the grid coordinates on the mouse pointer? @@ -63,25 +71,36 @@ 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ě? + Mostrar as coordenadas de grade no ponteiro do mouse? - + This module allows you to customize the map screen. Moduł ten pozwala dostosować opcje widoku ekranu mapy. Dieses Modul erweitert die Kartenfunktionen. Tento modul umožňuje přizpůsobit mapu s obrazem. + Este módulo permite que você personalize a tela de mapa. Blue Force Tracking Blue Force Tracking - Seguimiento de fuerzas amigas + Blue Force Tracking Blue Force Tracking Blue Force Tracking + Rastreio de forças azuis BFT Enable + RFA ativo + Aktywuj BFT + Povolit BFT + Activar BFT Enable Blue Force Tracking. Default: No + Ativa Rastreio de Forças Azuis. Padrão: Não + Aktywuj Blue Force Tracking. Domyślnie: Nie + Povolit Blue Force Tracking. Výchozí: Ne + Activar Blue Force Tracking. Por defecto: No Interval @@ -89,6 +108,7 @@ Intervalo Intervall Interval + Intervalo How often the markers should be refreshed (in seconds) @@ -96,6 +116,7 @@ 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) + Frequência em que os marcadores devem ser atualizados (em segundos) Hide AI groups? @@ -103,6 +124,7 @@ ¿Ocultar grupos de IA? KI-Gruppen verstecken? Skrýt AI skupiny? + Esconder grupos de IA? Hide markers for 'AI only' groups? @@ -110,12 +132,14 @@ Oculta las marcas de grupos 'solo IA' Verstecke Marker für "nur KI"-Gruppen? Skrýt značky pouze pro AI skupiny? + Esconder marcadores que pertencem ao grupo de IA? - + This module allows the tracking of allied units with BFT map markers. 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. + Permite que você acompanhe as posições no mapa das unidades aliadas com marcadores RFA. \ No newline at end of file diff --git a/addons/maptools/CfgWeapons.hpp b/addons/maptools/CfgWeapons.hpp index 2e2271509b..5cec99bfb0 100644 --- a/addons/maptools/CfgWeapons.hpp +++ b/addons/maptools/CfgWeapons.hpp @@ -5,7 +5,7 @@ class CfgWeapons { class ACE_MapTools: ACE_ItemCore { displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; + model = QUOTE(PATHTOF(data\ace_MapTools.p3d)); picture = PATHTOF(UI\maptool_item.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { diff --git a/addons/maptools/data/ace_MapTools.p3d b/addons/maptools/data/ace_MapTools.p3d new file mode 100644 index 0000000000..f0952c09fa Binary files /dev/null and b/addons/maptools/data/ace_MapTools.p3d differ diff --git a/addons/maptools/data/ace_maptools.rvmat b/addons/maptools/data/ace_maptools.rvmat new file mode 100644 index 0000000000..a76a437c9d --- /dev/null +++ b/addons/maptools/data/ace_maptools.rvmat @@ -0,0 +1,90 @@ +class StageTI +{ + texture = "a3\data_f\default_glass_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,1}; +emmisive[] = {0,0,0,1}; +specular[] = {0.6,0.6,0.6,1}; +specularPower = 250; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\maptools\data\ace_maptools_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,32,128,1)fresnel(0.71,0.74)"; + uvSource = "none"; +}; +class Stage7 +{ + texture = "a3\data_f\env_land_co.paa"; + useWorldEnvMap = "true"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1.0,0.0,0.0}; + up[] = {0.0,1.0,0.0}; + dir[] = {0.0,0.0,0.0}; + pos[] = {0.0,0.0,0.0}; + }; +}; \ No newline at end of file diff --git a/addons/maptools/data/ace_maptools_ca.paa b/addons/maptools/data/ace_maptools_ca.paa new file mode 100644 index 0000000000..b4f54a7792 Binary files /dev/null and b/addons/maptools/data/ace_maptools_ca.paa differ diff --git a/addons/maptools/data/ace_maptools_nohq.paa b/addons/maptools/data/ace_maptools_nohq.paa new file mode 100644 index 0000000000..6bba02066d Binary files /dev/null and b/addons/maptools/data/ace_maptools_nohq.paa differ diff --git a/addons/maptools/functions/fnc_canUseMapTools.sqf b/addons/maptools/functions/fnc_canUseMapTools.sqf index 30d86160ab..7658c2c1d2 100644 --- a/addons/maptools/functions/fnc_canUseMapTools.sqf +++ b/addons/maptools/functions/fnc_canUseMapTools.sqf @@ -14,7 +14,13 @@ visibleMap && {alive ACE_player} && -{"ItemMap" in (assignedItems ACE_player)} && +{ + scopeName "hasMap"; + { + if (_x isKindOf ["ItemMap", configFile >> "CfgWeapons"]) exitWith {true breakOut "hasMap"}; + } forEach (assignedItems ACE_player); + false +} && {"ACE_MapTools" in (items ACE_player)} && {!GVAR(mapTool_isDragging)} && {!GVAR(mapTool_isRotating)} diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 8eacf39006..d94ba333d2 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -4,13 +4,15 @@ class ACE_Medical_Actions { class Bandage { displayName = CSTRING(Bandage); displayNameProgress = CSTRING(Bandaging); - + category = "bandage"; treatmentLocations[] = {"All"}; + allowedSelections[] = {"All"}; requiredMedic = 0; treatmentTime = 5; treatmentTimeSelfCoef = 1; items[] = {{"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"}}; condition = ""; + patientStateCondition = 0; itemConsumed = 1; callbackSuccess = QUOTE(DFUNC(treatmentBasic_bandage)); @@ -24,11 +26,13 @@ class ACE_Medical_Actions { animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; - litter[] = { {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; + litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} }; }; class Morphine: Bandage { displayName = CSTRING(Inject_Morphine); displayNameProgress = CSTRING(Injecting_Morphine); + allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; + category = "medication"; treatmentTime = 2; items[] = {"ACE_morphine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine)); @@ -38,6 +42,8 @@ class ACE_Medical_Actions { class Epinephrine: Bandage { displayName = CSTRING(Inject_Epinephrine); displayNameProgress = CSTRING(Injecting_Epinephrine); + allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; + category = "medication"; requiredMedic = 1; treatmentTime = 3; items[] = {"ACE_epinephrine"}; @@ -48,6 +54,8 @@ class ACE_Medical_Actions { class BloodIV: Bandage { displayName = CSTRING(Transfuse_Blood); displayNameProgress = CSTRING(Transfusing_Blood); + allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; + category = "advanced"; requiredMedic = 1; treatmentTime = 20; items[] = {"ACE_bloodIV"}; @@ -56,14 +64,17 @@ class ACE_Medical_Actions { litter[] = {}; }; class BloodIV_500: BloodIV { + category = "advanced"; items[] = {"ACE_bloodIV_500"}; }; class BloodIV_250: BloodIV { + category = "advanced"; items[] = {"ACE_bloodIV_250"}; }; class BodyBag: Bandage { displayName = CSTRING(PlaceInBodyBag); displayNameProgress = CSTRING(PlacingInBodyBag); + category = "advanced"; treatmentLocations[] = {"All"}; requiredMedic = 0; treatmentTime = 4; @@ -80,7 +91,9 @@ class ACE_Medical_Actions { class Diagnose: Bandage { displayName = CSTRING(Actions_Diagnose); displayNameProgress = CSTRING(Actions_Diagnosing); + category = "examine"; treatmentLocations[] = {"All"}; + allowedSelections[] = {"head"}; requiredMedic = 0; treatmentTime = 1; items[] = {}; @@ -96,10 +109,12 @@ class ACE_Medical_Actions { class Advanced { class FieldDressing { - displayName = CSTRING(Bandage); + displayName = CSTRING(Actions_FieldDressing); displayNameProgress = CSTRING(Bandaging); + category = "bandage"; // Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All. treatmentLocations[] = {"All"}; + allowedSelections[] = {"All"}; // What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor requiredMedic = 0; // The time it takes for a treatment action to complete. Time is in seconds. @@ -107,6 +122,7 @@ class ACE_Medical_Actions { // Item required for the action. Leave empty for no item required. items[] = {"ACE_fieldDressing"}; condition = ""; + patientStateCondition = 0; // Callbacks callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage)); callbackFailure = ""; @@ -119,20 +135,26 @@ class ACE_Medical_Actions { animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; - litter[] = { {"All", "", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; + litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} }; }; class PackingBandage: fieldDressing { + displayName = CSTRING(Actions_PackingBandage); items[] = {"ACE_packingBandage"}; + litter[] = { {"All", "", {"ACE_MedicalLitter_packingBandage"}}}; }; class ElasticBandage: fieldDressing { + displayName = CSTRING(Actions_ElasticBandage); items[] = {"ACE_elasticBandage"}; }; class QuikClot: fieldDressing { + displayName = CSTRING(Actions_QuikClot); items[] = {"ACE_quikclot"}; + litter[] = { {"All", "", {"ACE_MedicalLitter_QuickClot"}}}; }; class Tourniquet: fieldDressing { displayName = CSTRING(Apply_Tourniquet); displayNameProgress = CSTRING(Applying_Tourniquet); + allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r", "body"}; items[] = {"ACE_tourniquet"}; treatmentTime = 6; callbackSuccess = QUOTE(DFUNC(treatmentTourniquet)); @@ -142,6 +164,8 @@ class ACE_Medical_Actions { class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); displayNameProgress = CSTRING(Injecting_Morphine); + allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; + category = "medication"; items[] = {"ACE_morphine"}; treatmentTime = 3; callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication)); @@ -161,8 +185,10 @@ class ACE_Medical_Actions { litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} }; }; class BloodIV: fieldDressing { - displayName = CSTRING(Transfuse_Blood); + displayName = CSTRING(Actions_Blood4_1000); displayNameProgress = CSTRING(Transfusing_Blood); + allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; + category = "advanced"; items[] = {"ACE_bloodIV"}; requiredMedic = 1; treatmentTime = 7; @@ -171,41 +197,49 @@ class ACE_Medical_Actions { litter[] = {}; }; class BloodIV_500: BloodIV { + displayName = CSTRING(Actions_Blood4_500); items[] = {"ACE_bloodIV_500"}; }; class BloodIV_250: BloodIV { + displayName = CSTRING(Actions_Blood4_250); items[] = {"ACE_bloodIV_250"}; }; class PlasmaIV: BloodIV { - displayName = CSTRING(Transfuse_Plasma); + displayName = CSTRING(Actions_Plasma4_1000); displayNameProgress = CSTRING(Transfusing_Plasma); items[] = {"ACE_plasmaIV"}; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class PlasmaIV_500: PlasmaIV { + displayName = CSTRING(Actions_Plasma4_500); items[] = {"ACE_plasmaIV_500"}; }; class PlasmaIV_250: PlasmaIV { + displayName = CSTRING(Actions_Plasma4_250); items[] = {"ACE_plasmaIV_250"}; }; class SalineIV: BloodIV { - displayName = CSTRING(Transfuse_Saline); + displayName = CSTRING(Actions_Saline4_1000); displayNameProgress = CSTRING(Transfusing_Saline); items[] = {"ACE_salineIV"}; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class SalineIV_500: SalineIV { + displayName = CSTRING(Actions_Saline4_500); items[] = {"ACE_salineIV_500"}; }; class SalineIV_250: SalineIV { + displayName = CSTRING(Actions_Saline4_250); items[] = {"ACE_salineIV_250"}; }; class SurgicalKit: fieldDressing { - displayName = ""; + displayName = CSTRING(Use_SurgicalKit); displayNameProgress = CSTRING(TreatmentAction); + category = "advanced"; items[] = {"ACE_surgicalKit"}; treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)}; requiredMedic = QGVAR(medicSetting_SurgicalKit); + patientStateCondition = QGVAR(useCondition_SurgicalKit); treatmentTime = "(count ((_this select 1) getVariable ['ACE_Medical_bandagedWounds', []]) * 5)"; callbackSuccess = ""; callbackProgress = QUOTE(DFUNC(treatmentAdvanced_surgicalKit_onProgress)); @@ -214,11 +248,13 @@ class ACE_Medical_Actions { litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"} }}; }; class PersonalAidKit: fieldDressing { - displayName = ""; + displayName = CSTRING(Use_Aid_Kit); displayNameProgress = CSTRING(TreatmentAction); + category = "advanced"; items[] = {"ACE_personalAidKit"}; treatmentLocations[] = {QGVAR(useLocation_PAK)}; requiredMedic = QGVAR(medicSetting_PAK); + patientStateCondition = QGVAR(useCondition_PAK); treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime)); callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal)); itemConsumed = QGVAR(consumeItem_PAK); @@ -228,11 +264,16 @@ class ACE_Medical_Actions { animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerSelf = ""; animationCallerSelfProne = ""; - litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}}, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}} }, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; + litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}}, + {"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}} }, + {"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, + {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} + }; }; class CheckPulse: fieldDressing { - displayName = ""; + displayName = CSTRING(Actions_CheckPulse); displayNameProgress = CSTRING(Check_Pulse_Content); + category = "examine"; treatmentLocations[] = {"All"}; requiredMedic = 0; treatmentTime = 2; @@ -242,34 +283,43 @@ class ACE_Medical_Actions { callbackProgress = ""; animationPatient = ""; animationCaller = ""; // TODO + animationCallerProne = ""; + animationCallerSelfProne = ""; itemConsumed = 0; litter[] = {}; }; class CheckBloodPressure: CheckPulse { + displayName = CSTRING(Actions_CheckBloodPressure); callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure)); displayNameProgress = CSTRING(Check_Bloodpressure_Content); }; class CheckResponse: CheckPulse { + displayName = CSTRING(Check_Response); callbackSuccess = QUOTE(DFUNC(actionCheckResponse)); displayNameProgress = CSTRING(Check_Response_Content); }; - class RemoveTourniquet: CheckPulse { + class RemoveTourniquet: Tourniquet { + displayName = CSTRING(Actions_RemoveTourniquet); + items[] = {}; treatmentTime = 2.5; callbackSuccess = QUOTE(DFUNC(actionRemoveTourniquet)); condition = QUOTE([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)); displayNameProgress = CSTRING(RemovingTourniquet); + litter[] = {}; }; class CPR: fieldDressing { displayName = CSTRING(Actions_CPR); displayNameProgress = CSTRING(Actions_PerformingCPR); + category = "advanced"; treatmentLocations[] = {"All"}; + allowedSelections[] = {"body"}; requiredMedic = 0; treatmentTime = 15; items[] = {}; - condition = "((_this select 1) getvariable ['ACE_medical_inCardiacArrest', false])"; + condition = "!([(_this select 1)] call ace_common_fnc_isAwake)"; callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR)); callbackFailure = ""; - callbackProgress = "(((_this select 0) select 1) getvariable ['ACE_medical_inCardiacArrest', false])"; + callbackProgress = "!([((_this select 0) select 1)] call ace_common_fnc_isAwake)"; animationPatient = ""; animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationCaller = "AinvPknlMstpSlayWnonDnon_medic"; @@ -282,6 +332,7 @@ class ACE_Medical_Actions { class BodyBag: fieldDressing { displayName = CSTRING(PlaceInBodyBag); displayNameProgress = CSTRING(PlacingInBodyBag); + category = "advanced"; treatmentLocations[] = {"All"}; requiredMedic = 0; treatmentTime = 2; @@ -813,9 +864,9 @@ class ACE_Medical_Advanced { // specific details for the ACE_Morphine treatment action class Morphine { painReduce = 15; - hrIncreaseLow[] = {-10, -30, 35}; - hrIncreaseNormal[] = {-10, -50, 40}; - hrIncreaseHigh[] = {-10, -40, 50}; + hrIncreaseLow[] = {-10, -20, 35}; + hrIncreaseNormal[] = {-10, -30, 35}; + hrIncreaseHigh[] = {-10, -35, 50}; timeInSystem = 900; maxDose = 4; inCompatableMedication[] = {}; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 2b28e91882..910f152292 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -1,94 +1,116 @@ class ACE_Settings { class GVAR(level) { + category = CSTRING(Category_Medical); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "Basic", "Advanced"}; }; class GVAR(medicSetting) { + category = CSTRING(Category_Medical); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "Normal", "Advanced"}; }; class GVAR(enableFor) { + category = CSTRING(Category_Medical); value = 0; typeName = "SCALAR"; values[] = {"Players only", "Players and AI"}; }; class GVAR(enableOverdosing) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(bleedingCoefficient) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(painCoefficient) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(enableAirway) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = false; }; class GVAR(enableFractures) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = false; }; class GVAR(enableAdvancedWounds) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = false; }; class GVAR(enableVehicleCrashes) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(enableScreams) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(playerDamageThreshold) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(AIDamageThreshold) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; }; class GVAR(enableUnconsciousnessAI) { + category = CSTRING(Category_Medical); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "50/50", "Enabled"}; }; class GVAR(remoteControlledAI) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(preventInstaDeath) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(enableRevive) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; values[] = {"Disabled", "Players only", "Players and AI"}; }; class GVAR(maxReviveTime) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 120; }; class GVAR(amountOfReviveLives) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = -1; }; class GVAR(allowDeadBodyMovement) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(allowLitterCreation) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(litterSimulationDetail) { + category = CSTRING(Category_Medical); displayName = CSTRING(litterSimulationDetail); description = CSTRING(litterSimulationDetail_Desc); typeName = "SCALAR"; @@ -100,54 +122,81 @@ class ACE_Settings { isClientSettable = 1; }; class GVAR(litterCleanUpDelay) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; }; class GVAR(medicSetting_PAK) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(medicSetting_SurgicalKit) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(consumeItem_PAK) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; values[] = {"No", "Yes"}; }; class GVAR(consumeItem_SurgicalKit) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 0; values[] = {"No", "Yes"}; }; class GVAR(useLocation_PAK) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 3; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; }; class GVAR(useLocation_SurgicalKit) { + category = CSTRING(Category_Medical); typeName = "SCALAR"; value = 2; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; }; + class GVAR(useCondition_PAK) { + category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName); + description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description); + typeName = "SCALAR"; + value = 0; + values[] = {"Anytime", "Stable"}; + }; + class GVAR(useCondition_SurgicalKit) { + category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName); + description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description); + typeName = "SCALAR"; + value = 0; + values[] = {"Anytime", "Stable"}; + }; class GVAR(keepLocalSettingsSynced) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 1; }; class GVAR(healHitPointAfterAdvBandage) { + category = CSTRING(Category_Medical); displayName = CSTRING(healHitPointAfterAdvBandage); typeName = "BOOL"; value = 0; }; class GVAR(painIsOnlySuppressed) { + category = CSTRING(Category_Medical); displayName = CSTRING(painIsOnlySuppressed); typeName = "BOOL"; value = 1; }; class GVAR(painEffectType) { + category = CSTRING(Category_Medical); displayName = CSTRING(painEffectType); typeName = "SCALAR"; value = 0; @@ -155,15 +204,18 @@ class ACE_Settings { isClientSettable = 1; }; class GVAR(allowUnconsciousAnimationOnTreatment) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(moveUnitsFromGroupOnUnconscious) { + category = CSTRING(Category_Medical); typeName = "BOOL"; value = 0; }; class GVAR(menuTypeStyle) { + category = CSTRING(Category_Medical); displayName = CSTRING(menuTypeDisplay); description = CSTRING(menuTypeDescription); typeName = "SCALAR"; diff --git a/addons/medical/CfgActions.hpp b/addons/medical/CfgActions.hpp new file mode 100644 index 0000000000..ccaac6f75b --- /dev/null +++ b/addons/medical/CfgActions.hpp @@ -0,0 +1,6 @@ +class CfgActions { + class None; + class Heal: None { + show = 0; + }; +}; \ No newline at end of file diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index c8a4528ca5..aef45b115d 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -92,7 +92,7 @@ class CfgVehicles { typeName = "NUMBER"; class values { class disable { - name = CSTRING(disabled); + name = ECSTRING(common,Disabled); value = 0; }; class normal { @@ -101,7 +101,7 @@ class CfgVehicles { default = 1; }; class full { - name = CSTRING(enabled); + name = ECSTRING(common,Enabled); value = 2; }; }; @@ -196,11 +196,19 @@ class CfgVehicles { class consumeItem_PAK { displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName); description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description); - typeName = "NUMBER"; class values { - class keep { name = CSTRING(No); value = 0; }; - class remove { name = CSTRING(Yes); value = 1; default = 1; }; + class keep { name = ECSTRING(common,No); value = 0; }; + class remove { name = ECSTRING(common,Yes); value = 1; default = 1; }; + }; + }; + class useCondition_PAK { + displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName); + description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description); + typeName = "NUMBER"; + class values { + class AnyTime { name = CSTRING(AnyTime); value = 0; }; + class Stable { name = CSTRING(Stable); value = 1; default = 1; }; }; }; class useLocation_PAK { @@ -212,7 +220,7 @@ class CfgVehicles { class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; }; class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; }; class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; default = 1; }; - class disabled { name = CSTRING(AdvancedMedicalSettings_disabled); value = 4;}; + class disabled { name = ECSTRING(common,Disabled); value = 4;}; }; }; class medicSetting_SurgicalKit: medicSetting_PAK { @@ -227,15 +235,23 @@ class CfgVehicles { displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName); description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description); }; + class useCondition_SurgicalKit: useCondition_PAK { + displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName); + description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description); + class values { + class AnyTime { name = CSTRING(AnyTime); value = 0; default = 1; }; + class Stable { name = CSTRING(Stable); value = 1; }; + }; + }; class healHitPointAfterAdvBandage { displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName); - description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description); + description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description); typeName = "BOOL"; defaultValue = 0; }; class painIsOnlySuppressed { displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName); - description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description); + description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description); typeName = "BOOL"; defaultValue = 1; }; @@ -264,7 +280,7 @@ class CfgVehicles { typeName = "NUMBER"; defaultValue = 0; class values { - class disable { name = CSTRING(disabled); value = 0; default = 1;}; + class disable { name = ECSTRING(common,Disabled); value = 0; default = 1;}; class playerOnly { name = CSTRING(playeronly); value = 1; }; class playerAndAI { name = CSTRING(playersandai); value = 2; }; }; @@ -357,11 +373,11 @@ class CfgVehicles { typeName = "NUMBER"; class values { class none { - name = CSTRING(No); + name = ECSTRING(common,No); value = 0; }; class medic { - name = CSTRING(Yes); + name = ECSTRING(common,Yes); value = 1; default = 1; }; @@ -701,6 +717,9 @@ class CfgVehicles { destrType = "DestructNo"; model = QUOTE(PATHTOF(data\littergeneric.p3d)); }; + class ACE_MedicalLitter_clean: ACE_MedicalLitterBase { + model = QUOTE(PATHTOF(data\littergeneric_clean.p3d)); + }; class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase { model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d)); }; @@ -711,21 +730,23 @@ class CfgVehicles { model = QUOTE(PATHTOF(data\littergeneric_bandages3.p3d)); }; class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_packingBandage.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_packingBandage.p3d)); }; class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase { model = QUOTE(PATHTOF(data\littergeneric_gloves.p3d)); }; class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_atropine.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_atropine.p3d)); }; class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_epinephrine.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_epinephrine.p3d)); }; class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\litter_morphine.p3d)); + model = QUOTE(PATHTOF(data\littergeneric_morphine.p3d)); + }; + class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase { + model = QUOTE(PATHTOF(data\littergeneric_Quikclot.p3d)); }; - class Item_Base_F; class ACE_fieldDressingItem: Item_Base_F { scope = 2; @@ -734,10 +755,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_fieldDressing { - name = "ACE_fieldDressing"; - count = 1; - }; + MACRO_ADDITEM(ACE_fieldDressing,1); }; }; class ACE_packingBandageItem: Item_Base_F { @@ -747,10 +765,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_packingBandage { - name = "ACE_packingBandage"; - count = 1; - }; + MACRO_ADDITEM(ACE_packingBandage,1); }; }; class ACE_elasticBandageItem: Item_Base_F { @@ -760,10 +775,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_elasticBandage { - name = "ACE_elasticBandage"; - count = 1; - }; + MACRO_ADDITEM(ACE_elasticBandage,1); }; }; class ACE_tourniquetItem: Item_Base_F { @@ -773,10 +785,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_tourniquet { - name = "ACE_tourniquet"; - count = 1; - }; + MACRO_ADDITEM(ACE_tourniquet,1); }; }; class ACE_morphineItem: Item_Base_F { @@ -786,10 +795,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_morphine { - name = "ACE_morphine"; - count = 1; - }; + MACRO_ADDITEM(ACE_morphine,1); }; }; class ACE_atropineItem: Item_Base_F { @@ -799,10 +805,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_atropine { - name = "ACE_atropine"; - count = 1; - }; + MACRO_ADDITEM(ACE_atropine,1); }; }; class ACE_epinephrineItem: Item_Base_F { @@ -812,10 +815,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_epinephrine { - name = "ACE_epinephrine"; - count = 1; - }; + MACRO_ADDITEM(ACE_epinephrine,1); }; }; class ACE_plasmaIVItem: Item_Base_F { @@ -825,10 +825,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_plasmaIV { - name = "ACE_plasmaIV"; - count = 1; - }; + MACRO_ADDITEM(ACE_plasmaIV,1); }; }; @@ -839,10 +836,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_bloodIV { - name = "ACE_bloodIV"; - count = 1; - }; + MACRO_ADDITEM(ACE_bloodIV,1); }; }; class ACE_salineIVItem: Item_Base_F { @@ -852,10 +846,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_salineIV { - name = "ACE_salineIV"; - count = 1; - }; + MACRO_ADDITEM(ACE_salineIV,1); }; }; class ACE_quikClotItem: Item_Base_F { @@ -865,10 +856,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_quikClot { - name = "ACE_quikclot"; - count = 1; - }; + MACRO_ADDITEM(ACE_quikclot,1); }; }; class ACE_personalAidKitItem: Item_Base_F { @@ -878,10 +866,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_personalAidKit { - name = "ACE_personalAidKit"; - count = 1; - }; + MACRO_ADDITEM(ACE_personalAidKit,1); }; }; class ACE_surgicalKitItem: Item_Base_F { @@ -891,10 +876,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_surgicalKit { - name = "ACE_surgicalKit"; - count = 1; - }; + MACRO_ADDITEM(ACE_surgicalKit,1); }; }; class ACE_bodyBagItem: Item_Base_F { @@ -904,10 +886,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); vehicleClass = "Items"; class TransportItems { - class ACE_bodyBag { - name = "ACE_bodyBag"; - count = 1; - }; + MACRO_ADDITEM(ACE_bodyBag,1); }; }; @@ -919,119 +898,38 @@ class CfgVehicles { model = PATHTOF(data\ace_medcrate.p3d); author = ECSTRING(common,ACETeam); class TransportItems { - class ACE_fieldDressing { - name = "ACE_fieldDressing"; - count = 50; - }; - class ACE_morphine { - name = "ACE_morphine"; - count = 25; - }; - class ACE_epinephrine { - name = "ACE_epinephrine"; - count = 25; - }; - class ACE_bloodIV { - name = "ACE_bloodIV"; - count = 15; - }; - class ACE_bloodIV_500 { - name = "ACE_bloodIV_500"; - count = 15; - }; - class ACE_bloodIV_250 { - name = "ACE_bloodIV_250"; - count = 15; - }; - class ACE_bodyBag { - name = "ACE_bodyBag"; - count = 10; - }; + MACRO_ADDITEM(ACE_fieldDressing,50); + MACRO_ADDITEM(ACE_morphine,25); + MACRO_ADDITEM(ACE_epinephrine,25); + MACRO_ADDITEM(ACE_bloodIV,15); + MACRO_ADDITEM(ACE_bloodIV_500,15); + MACRO_ADDITEM(ACE_bloodIV_250,15); + MACRO_ADDITEM(ACE_bodyBag,10); }; }; class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate { displayName = CSTRING(medicalSupplyCrate_advanced); class TransportItems { - class ACE_fieldDressing { - name = "ACE_fieldDressing"; - count = 25; - }; - class ACE_packingBandage { - name = "ACE_packingBandage"; - count = 25; - }; - class ACE_elasticBandage { - name = "ACE_elasticBandage"; - count = 25; - }; - class ACE_tourniquet { - name = "ACE_tourniquet"; - count = 15; - }; - class ACE_morphine { - name = "ACE_morphine"; - count = 15; - }; - class ACE_atropine { - name = "ACE_atropine"; - count = 15; - }; - class ACE_epinephrine { - name = "ACE_epinephrine"; - count = 15; - }; - class ACE_plasmaIV { - name = "ACE_plasmaIV"; - count = 7; - }; - class ACE_plasmaIV_500 { - name = "ACE_plasmaIV_500"; - count = 7; - }; - class ACE_plasmaIV_250 { - name = "ACE_plasmaIV_250"; - count = 7; - }; - class ACE_salineIV { - name = "ACE_salineIV"; - count = 7; - }; - class ACE_salineIV_500 { - name = "ACE_salineIV_500"; - count = 7; - }; - class ACE_salineIV_250 { - name = "ACE_salineIV_250"; - count = 7; - }; - class ACE_bloodIV { - name = "ACE_bloodIV"; - count = 7; - }; - class ACE_bloodIV_500 { - name = "ACE_bloodIV_500"; - count = 7; - }; - class ACE_bloodIV_250 { - name = "ACE_bloodIV_250"; - count = 7; - }; - class ACE_quikClot { - name = "ACE_quikclot"; - count = 20; - }; - class ACE_personalAidKit { - name = "ACE_personalAidKit"; - count = 3; - }; - class ACE_surgicalKit { - name = "ACE_surgicalKit"; - count = 2; - }; - class ACE_bodyBag { - name = "ACE_bodyBag"; - count = 5; - }; + MACRO_ADDITEM(ACE_fieldDressing,25); + MACRO_ADDITEM(ACE_packingBandage,25); + MACRO_ADDITEM(ACE_elasticBandage,25); + MACRO_ADDITEM(ACE_tourniquet,15); + MACRO_ADDITEM(ACE_morphine,15); + MACRO_ADDITEM(ACE_atropine,15); + MACRO_ADDITEM(ACE_epinephrine,15); + MACRO_ADDITEM(ACE_plasmaIV,7); + MACRO_ADDITEM(ACE_plasmaIV_500,7); + MACRO_ADDITEM(ACE_plasmaIV_250,7); + MACRO_ADDITEM(ACE_salineIV,7); + MACRO_ADDITEM(ACE_salineIV_500,7); + MACRO_ADDITEM(ACE_salineIV_250,7); + MACRO_ADDITEM(ACE_bloodIV,7); + MACRO_ADDITEM(ACE_bloodIV_500,7); + MACRO_ADDITEM(ACE_bloodIV_250,7); + MACRO_ADDITEM(ACE_quikClot,20); + MACRO_ADDITEM(ACE_personalAidKit,3); + MACRO_ADDITEM(ACE_surgicalKit,2); + MACRO_ADDITEM(ACE_bodyBag,5); }; }; }; diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index ef6c702604..6de00eff22 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -98,9 +98,13 @@ class CfgWeapons { mass = 1; }; }; + class ACE_plasmaIV: ACE_ItemCore { scope = 2; displayName = CSTRING(Plasma_IV); + model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + hiddenSelections[] = {"camo"}; + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_1000ml_ca.paa)) }; picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa)); descriptionShort = CSTRING(Plasma_IV_Desc_Short); descriptionUse = CSTRING(Plasma_IV_Desc_Use); @@ -110,21 +114,27 @@ class CfgWeapons { }; class ACE_plasmaIV_500: ACE_plasmaIV { displayName = CSTRING(Plasma_IV_500); + model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_500ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_plasmaIV_250: ACE_plasmaIV { displayName = CSTRING(Plasma_IV_250); + model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_250ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; }; class ACE_bloodIV: ACE_ItemCore { scope = 2; - model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d"; + model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); displayName = CSTRING(Blood_IV); picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa)); + hiddenSelections[] = {"camo"}; + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_1000ml_ca.paa)) }; descriptionShort = CSTRING(Blood_IV_Desc_Short); descriptionUse = CSTRING(Blood_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -133,12 +143,16 @@ class CfgWeapons { }; class ACE_bloodIV_500: ACE_bloodIV { displayName = CSTRING(Blood_IV_500); + model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_500ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_bloodIV_250: ACE_bloodIV { displayName = CSTRING(Blood_IV_250); + model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_250ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -146,6 +160,9 @@ class CfgWeapons { class ACE_salineIV: ACE_ItemCore { scope = 2; displayName = CSTRING(Saline_IV); + model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + hiddenSelections[] = {"camo"}; + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_1000ml_ca.paa)) }; picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa)); descriptionShort = CSTRING(Saline_IV_Desc_Short); descriptionUse = CSTRING(Saline_IV_Desc_Use); @@ -155,12 +172,16 @@ class CfgWeapons { }; class ACE_salineIV_500: ACE_salineIV { displayName = CSTRING(Saline_IV_500); + model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_500ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_salineIV_250: ACE_salineIV { displayName = CSTRING(Saline_IV_250); + model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); + hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_250ml_ca.paa)) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -168,6 +189,7 @@ class CfgWeapons { class ACE_quikclot: ACE_ItemCore { scope = 2; displayName = CSTRING(QuikClot_Display); + model = QUOTE(PATHTOF(data\QuikClot.p3d)); picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa)); descriptionShort = CSTRING(QuikClot_Desc_Short); descriptionUse = CSTRING(QuikClot_Desc_Use); diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 0b51f57165..f9f821eeb3 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -92,7 +92,7 @@ GVAR(effectTimeBlood) = ACE_time; [{ private["_bleeding", "_blood"]; // Zeus interface is open or player is dead; disable everything - if (!(isNull (findDisplay 312)) or !(alive ACE_player)) exitWith { + if (!(isNull curatorCamera) or !(alive ACE_player)) exitWith { GVAR(effectUnconsciousCC) ppEffectEnable false; GVAR(effectUnconsciousRB) ppEffectEnable false; GVAR(effectBlindingCC) ppEffectEnable false; @@ -174,52 +174,54 @@ GVAR(lastHeartBeatSound) = ACE_time; if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then { GVAR(lastHeartBeat) = ACE_time; - // Pain effect - _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; - _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); - if (GVAR(painEffectType) == 1) then { - GVAR(effectPainCC) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { - _strength = _strength * 0.15; - GVAR(effectPainCA) ppEffectEnable true; - GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; - GVAR(effectPainCA) ppEffectCommit 0.01; - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; - GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + // Pain effect, no pain effect in zeus camera + if (isNull curatorCamera) then { + _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; + _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); + if (GVAR(painEffectType) == 1) then { + GVAR(effectPainCC) ppEffectEnable false; + if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + _strength = _strength * 0.15; + GVAR(effectPainCA) ppEffectEnable true; + GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; GVAR(effectPainCA) ppEffectCommit 0.01; - }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; - GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit 0.01; + }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + } else { + GVAR(effectPainCA) ppEffectEnable false; + }; } else { GVAR(effectPainCA) ppEffectEnable false; - }; - } else { - GVAR(effectPainCA) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { - _strength = _strength * 0.9; - GVAR(effectPainCC) ppEffectEnable true; - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; - GVAR(effectPainCC) ppEffectCommit 0.01; - [{ - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; - GVAR(effectPainCC) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + _strength = _strength * 0.9; + GVAR(effectPainCC) ppEffectEnable true; + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; GVAR(effectPainCC) ppEffectCommit 0.01; - }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; - GVAR(effectPainCC) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); - } else { - GVAR(effectPainCC) ppEffectEnable false; + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit 0.01; + }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + } else { + GVAR(effectPainCC) ppEffectEnable false; + }; }; }; }; diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index a932ee5c9d..b479383468 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -56,6 +56,7 @@ PREP(isInMedicalFacility); PREP(isInMedicalVehicle); PREP(isMedic); PREP(isMedicalVehicle); +PREP(isInStableCondition); PREP(itemCheck); PREP(modifyMedicalAction); PREP(onMedicationUsage); diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 463ed95406..16d9573fc9 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -12,6 +12,7 @@ class CfgPatches { }; }; +#include "CfgActions.hpp" #include "CfgEventHandlers.hpp" #include "CfgFactionClasses.hpp" #include "CfgVehicles.hpp" @@ -22,6 +23,3 @@ class CfgPatches { #include "UI\RscTitles.hpp" #include "UI\triagecard.hpp" -class ACE_Extensions { - extensions[] += {"ace_medical"}; -}; diff --git a/addons/medical/data/EpiMorphine_co.paa b/addons/medical/data/EpiMorphine_co.paa new file mode 100644 index 0000000000..04d5f4aae5 Binary files /dev/null and b/addons/medical/data/EpiMorphine_co.paa differ diff --git a/addons/medical/data/Epipen_co.paa b/addons/medical/data/Epipen_co.paa deleted file mode 100644 index 2a1afe1f33..0000000000 Binary files a/addons/medical/data/Epipen_co.paa and /dev/null differ diff --git a/addons/medical/data/IVBag.rvmat b/addons/medical/data/IVBag.rvmat new file mode 100644 index 0000000000..c33c0ead90 --- /dev/null +++ b/addons/medical/data/IVBag.rvmat @@ -0,0 +1,99 @@ +#define _ARMA_ + +class StageTI +{ + texture = "a3\data_f\default_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,0}; +specular[] = {0.3,0.3,0.3,0.3}; +specularPower = 150; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\medical\data\IVBag_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,64,64,1)fresnelGlass(2)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 +{ + useWorldEnvMap = "true"; + texture = "a3\data_f\env_land_ca.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/medical/data/IVBag_1000ml.p3d b/addons/medical/data/IVBag_1000ml.p3d new file mode 100644 index 0000000000..e76108b4ff Binary files /dev/null and b/addons/medical/data/IVBag_1000ml.p3d differ diff --git a/addons/medical/data/IVBag_250ml.p3d b/addons/medical/data/IVBag_250ml.p3d new file mode 100644 index 0000000000..1e727c45d8 Binary files /dev/null and b/addons/medical/data/IVBag_250ml.p3d differ diff --git a/addons/medical/data/IVBag_500ml.p3d b/addons/medical/data/IVBag_500ml.p3d new file mode 100644 index 0000000000..569244fe88 Binary files /dev/null and b/addons/medical/data/IVBag_500ml.p3d differ diff --git a/addons/medical/data/IVBag_blood_1000ml_ca.paa b/addons/medical/data/IVBag_blood_1000ml_ca.paa new file mode 100644 index 0000000000..8831da60c1 Binary files /dev/null and b/addons/medical/data/IVBag_blood_1000ml_ca.paa differ diff --git a/addons/medical/data/IVBag_blood_250ml_ca.paa b/addons/medical/data/IVBag_blood_250ml_ca.paa new file mode 100644 index 0000000000..bd1d323917 Binary files /dev/null and b/addons/medical/data/IVBag_blood_250ml_ca.paa differ diff --git a/addons/medical/data/IVBag_blood_500ml_ca.paa b/addons/medical/data/IVBag_blood_500ml_ca.paa new file mode 100644 index 0000000000..ad093988fe Binary files /dev/null and b/addons/medical/data/IVBag_blood_500ml_ca.paa differ diff --git a/addons/medical/data/IVBag_nohq.paa b/addons/medical/data/IVBag_nohq.paa new file mode 100644 index 0000000000..3018c3a044 Binary files /dev/null and b/addons/medical/data/IVBag_nohq.paa differ diff --git a/addons/medical/data/IVBag_plasma_1000ml_ca.paa b/addons/medical/data/IVBag_plasma_1000ml_ca.paa new file mode 100644 index 0000000000..c3959990d9 Binary files /dev/null and b/addons/medical/data/IVBag_plasma_1000ml_ca.paa differ diff --git a/addons/medical/data/IVBag_plasma_250ml_ca.paa b/addons/medical/data/IVBag_plasma_250ml_ca.paa new file mode 100644 index 0000000000..6ba7ae4f9d Binary files /dev/null and b/addons/medical/data/IVBag_plasma_250ml_ca.paa differ diff --git a/addons/medical/data/IVBag_plasma_500ml_ca.paa b/addons/medical/data/IVBag_plasma_500ml_ca.paa new file mode 100644 index 0000000000..3a58b45ff8 Binary files /dev/null and b/addons/medical/data/IVBag_plasma_500ml_ca.paa differ diff --git a/addons/medical/data/IVBag_saline_1000ml_ca.paa b/addons/medical/data/IVBag_saline_1000ml_ca.paa new file mode 100644 index 0000000000..3637870600 Binary files /dev/null and b/addons/medical/data/IVBag_saline_1000ml_ca.paa differ diff --git a/addons/medical/data/IVBag_saline_250ml_ca.paa b/addons/medical/data/IVBag_saline_250ml_ca.paa new file mode 100644 index 0000000000..d37f6d2ce5 Binary files /dev/null and b/addons/medical/data/IVBag_saline_250ml_ca.paa differ diff --git a/addons/medical/data/IVBag_saline_500ml_ca.paa b/addons/medical/data/IVBag_saline_500ml_ca.paa new file mode 100644 index 0000000000..f3305e5b02 Binary files /dev/null and b/addons/medical/data/IVBag_saline_500ml_ca.paa differ diff --git a/addons/medical/data/QuikClot.p3d b/addons/medical/data/QuikClot.p3d new file mode 100644 index 0000000000..85ec2e9923 Binary files /dev/null and b/addons/medical/data/QuikClot.p3d differ diff --git a/addons/medical/data/QuikClot.rvmat b/addons/medical/data/QuikClot.rvmat new file mode 100644 index 0000000000..778e9812e1 --- /dev/null +++ b/addons/medical/data/QuikClot.rvmat @@ -0,0 +1,82 @@ +class StageTI +{ + texture="a3\data_f\default_ti_ca.paa"; +}; +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.050000008,0.050000008,0.050000008,1}; +specularPower=50; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\ace\addons\medical\data\quikclot_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform + { + aside[]={0,9,0}; + up[]={4.5,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 +{ + texture="#(argb,8,8,3)color(0,0,0,0)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 +{ + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="#(argb,8,8,3)color(1,1,1,1,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 +{ + texture="#(ai,64,64,1)fresnel(1.5,1.22)"; + uvSource="none"; +}; +class Stage7 +{ + texture="a3\data_f\env_land_co.paa"; + uvSource="none"; +}; diff --git a/addons/medical/data/QuikClot_CO.paa b/addons/medical/data/QuikClot_CO.paa new file mode 100644 index 0000000000..ce1a412b74 Binary files /dev/null and b/addons/medical/data/QuikClot_CO.paa differ diff --git a/addons/medical/data/QuikClot_NOHQ.paa b/addons/medical/data/QuikClot_NOHQ.paa new file mode 100644 index 0000000000..0b5f78ff0f Binary files /dev/null and b/addons/medical/data/QuikClot_NOHQ.paa differ diff --git a/addons/medical/data/ace_gloves_ca.paa b/addons/medical/data/ace_gloves_ca.paa deleted file mode 100644 index 0873d7fbf4..0000000000 Binary files a/addons/medical/data/ace_gloves_ca.paa and /dev/null differ diff --git a/addons/medical/data/ace_litterclean_co.paa b/addons/medical/data/ace_litterclean_co.paa new file mode 100644 index 0000000000..68fb2a2b22 Binary files /dev/null and b/addons/medical/data/ace_litterclean_co.paa differ diff --git a/addons/medical/data/atropine.p3d b/addons/medical/data/atropine.p3d index 582f495291..2b3ea52e61 100644 Binary files a/addons/medical/data/atropine.p3d and b/addons/medical/data/atropine.p3d differ diff --git a/addons/medical/data/atropine_co.paa b/addons/medical/data/atropine_co.paa index 3e44836bee..aadcb955f8 100644 Binary files a/addons/medical/data/atropine_co.paa and b/addons/medical/data/atropine_co.paa differ diff --git a/addons/medical/data/epinephrine.p3d b/addons/medical/data/epinephrine.p3d index a06831867a..47149c4eca 100644 Binary files a/addons/medical/data/epinephrine.p3d and b/addons/medical/data/epinephrine.p3d differ diff --git a/addons/medical/data/epinephrine_co.paa b/addons/medical/data/epinephrine_co.paa deleted file mode 100644 index 2a1afe1f33..0000000000 Binary files a/addons/medical/data/epinephrine_co.paa and /dev/null differ diff --git a/addons/medical/data/litter_atropine.p3d b/addons/medical/data/litter_atropine.p3d deleted file mode 100644 index c6b6450ca4..0000000000 Binary files a/addons/medical/data/litter_atropine.p3d and /dev/null differ diff --git a/addons/medical/data/litter_epinephrine.p3d b/addons/medical/data/litter_epinephrine.p3d deleted file mode 100644 index 0f45dab936..0000000000 Binary files a/addons/medical/data/litter_epinephrine.p3d and /dev/null differ diff --git a/addons/medical/data/litter_morphine.p3d b/addons/medical/data/litter_morphine.p3d deleted file mode 100644 index 945db92aab..0000000000 Binary files a/addons/medical/data/litter_morphine.p3d and /dev/null differ diff --git a/addons/medical/data/litter_packingbandage.p3d b/addons/medical/data/litter_packingbandage.p3d deleted file mode 100644 index 5c0cdda10e..0000000000 Binary files a/addons/medical/data/litter_packingbandage.p3d and /dev/null differ diff --git a/addons/medical/data/littergeneric_Quikclot.p3d b/addons/medical/data/littergeneric_Quikclot.p3d new file mode 100644 index 0000000000..e309736148 Binary files /dev/null and b/addons/medical/data/littergeneric_Quikclot.p3d differ diff --git a/addons/medical/data/littergeneric_atropine.p3d b/addons/medical/data/littergeneric_atropine.p3d new file mode 100644 index 0000000000..141f7bd67f Binary files /dev/null and b/addons/medical/data/littergeneric_atropine.p3d differ diff --git a/addons/medical/data/littergeneric_clean.p3d b/addons/medical/data/littergeneric_clean.p3d new file mode 100644 index 0000000000..7fa6fb3e91 Binary files /dev/null and b/addons/medical/data/littergeneric_clean.p3d differ diff --git a/addons/medical/data/littergeneric_epinephrine.p3d b/addons/medical/data/littergeneric_epinephrine.p3d new file mode 100644 index 0000000000..33f2b19285 Binary files /dev/null and b/addons/medical/data/littergeneric_epinephrine.p3d differ diff --git a/addons/medical/data/littergeneric_gloves.p3d b/addons/medical/data/littergeneric_gloves.p3d index 269742c802..abc55ebcc9 100644 Binary files a/addons/medical/data/littergeneric_gloves.p3d and b/addons/medical/data/littergeneric_gloves.p3d differ diff --git a/addons/medical/data/littergeneric_gloves.rvmat b/addons/medical/data/littergeneric_gloves.rvmat new file mode 100644 index 0000000000..0a0df2c55c --- /dev/null +++ b/addons/medical/data/littergeneric_gloves.rvmat @@ -0,0 +1,32 @@ +ambient[]={1,1,1,1}; +diffuse[]={0.5,0.5,0.5,1}; +forcedDiffuse[]={0.5,0.5,0.5,0}; +emmisive[]={0,0,0,1}; +specular[]={0.20000001,0.20000001,0.20000001,0}; +specularPower=350.799999; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 +{ + texture="z\ace\addons\medical\data\littergeneric_gloves_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture= "#(argb,8,8,3)color(0.1,0.1,0.1,0,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/medical/data/littergeneric_gloves_co.paa b/addons/medical/data/littergeneric_gloves_co.paa new file mode 100644 index 0000000000..77deb00196 Binary files /dev/null and b/addons/medical/data/littergeneric_gloves_co.paa differ diff --git a/addons/medical/data/littergeneric_gloves_nohq.paa b/addons/medical/data/littergeneric_gloves_nohq.paa new file mode 100644 index 0000000000..86388fad83 Binary files /dev/null and b/addons/medical/data/littergeneric_gloves_nohq.paa differ diff --git a/addons/medical/data/littergeneric_morphine.p3d b/addons/medical/data/littergeneric_morphine.p3d new file mode 100644 index 0000000000..754bce29a4 Binary files /dev/null and b/addons/medical/data/littergeneric_morphine.p3d differ diff --git a/addons/medical/data/littergeneric_packingbandage.p3d b/addons/medical/data/littergeneric_packingbandage.p3d new file mode 100644 index 0000000000..73e86d92b4 Binary files /dev/null and b/addons/medical/data/littergeneric_packingbandage.p3d differ diff --git a/addons/medical/data/littergeneric_packingbandage.rvmat b/addons/medical/data/littergeneric_packingbandage.rvmat new file mode 100644 index 0000000000..8deaff550f --- /dev/null +++ b/addons/medical/data/littergeneric_packingbandage.rvmat @@ -0,0 +1,31 @@ +ambient[]={1,1,1,1}; +diffuse[]={0.5,0.5,0.5,1}; +forcedDiffuse[]={0.5,0.5,0.5,0}; +emmisive[]={0,0,0,1}; +specular[]={0,0,0,0}; +PixelShaderID="NormalMapSpecularDIMap"; +VertexShaderID="NormalMap"; +class Stage1 +{ + texture="z\ace\addons\medical\data\littergeneric_packingbandage_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture= "#(argb,8,8,3)color(0,0,0,1,SMDI)"; + uvSource="tex"; + class uvTransform + { + aside[]={0,0,0}; + up[]={0,0,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/medical/data/littergeneric_packingbandage_nohq.paa b/addons/medical/data/littergeneric_packingbandage_nohq.paa new file mode 100644 index 0000000000..b3d88b53ab Binary files /dev/null and b/addons/medical/data/littergeneric_packingbandage_nohq.paa differ diff --git a/addons/medical/data/model.cfg b/addons/medical/data/model.cfg new file mode 100644 index 0000000000..114fae7ada --- /dev/null +++ b/addons/medical/data/model.cfg @@ -0,0 +1,24 @@ +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; +}; + +class CfgModels { + class Default { + sectionsInherit=""; + sections[] = {""}; + skeletonName = ""; + }; + class IVBagBase: Default { + sectionsInherit = ""; + sections[] = {"camo"}; + skeletonName = ""; + }; + + class IVBag_250ml: IVBagBase {}; + class IVBag_500ml: IVBagBase {}; + class IVBag_1000ml: IVBagBase {}; +}; \ No newline at end of file diff --git a/addons/medical/data/morphine.p3d b/addons/medical/data/morphine.p3d index 4457c97cc9..8657b87c8a 100644 Binary files a/addons/medical/data/morphine.p3d and b/addons/medical/data/morphine.p3d differ diff --git a/addons/medical/data/morphine_co.paa b/addons/medical/data/morphine_co.paa deleted file mode 100644 index 8d91fd0e10..0000000000 Binary files a/addons/medical/data/morphine_co.paa and /dev/null differ diff --git a/addons/medical/data/packingbandage.p3d b/addons/medical/data/packingbandage.p3d index 714275e3a3..002c68ed13 100644 Binary files a/addons/medical/data/packingbandage.p3d and b/addons/medical/data/packingbandage.p3d differ diff --git a/addons/medical/data/packingbandage.rvmat b/addons/medical/data/packingbandage.rvmat index b90d8469c6..ba2fdfb2e6 100644 --- a/addons/medical/data/packingbandage.rvmat +++ b/addons/medical/data/packingbandage.rvmat @@ -1,9 +1,9 @@ ambient[]={1,1,1,1}; diffuse[]={0.5,0.5,0.5,1}; forcedDiffuse[]={0.5,0.5,0.5,0}; -emmisive[]={0,0,0,1}; -specular[]={0.30000001,0.30000001,0.30000001,0}; -specularPower=57.799999; +emmisive[]={0,0,0,0}; +specular[]={0,0,0,0}; +specularPower=0; PixelShaderID="NormalMapSpecularDIMap"; VertexShaderID="NormalMap"; class Stage1 @@ -20,13 +20,13 @@ class Stage1 }; class Stage2 { - texture="z\ace\addons\medical\data\packingbandage_smdi.paa"; + texture= "#(argb,8,8,3)color(0,0,0,1,SMDI)"; uvSource="tex"; class uvTransform { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; + aside[]={0,0,0}; + up[]={0,0,0}; + dir[]={0,0,0}; pos[]={0,0,0}; }; }; diff --git a/addons/medical/data/packingbandage_co.paa b/addons/medical/data/packingbandage_co.paa new file mode 100644 index 0000000000..cac0cd7c90 Binary files /dev/null and b/addons/medical/data/packingbandage_co.paa differ diff --git a/addons/medical/data/packingbandage_color.paa b/addons/medical/data/packingbandage_color.paa deleted file mode 100644 index 54b1f75e2e..0000000000 Binary files a/addons/medical/data/packingbandage_color.paa and /dev/null differ diff --git a/addons/medical/data/packingbandage_nohq.paa b/addons/medical/data/packingbandage_nohq.paa index 1b3782c501..27420ea40a 100644 Binary files a/addons/medical/data/packingbandage_nohq.paa and b/addons/medical/data/packingbandage_nohq.paa differ diff --git a/addons/medical/data/packingbandage_smdi.paa b/addons/medical/data/packingbandage_smdi.paa deleted file mode 100644 index 8d5b3848ac..0000000000 Binary files a/addons/medical/data/packingbandage_smdi.paa and /dev/null differ diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index 19bd75caad..82edd1749f 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -58,4 +58,5 @@ if ([_caller] call FUNC(isMedic)) then { if (_logOutPut != "") then { [_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); + [_target,"quick_view", 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 9af18d0a6d..d759bf1bc8 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -50,4 +50,5 @@ if (_heartRate > 1.0) then { if (_logOutPut != "") then { [_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); + [_unit,"quick_view", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf index 2d62df12f6..b5df63047e 100644 --- a/addons/medical/functions/fnc_actionCheckResponse.sqf +++ b/addons/medical/functions/fnc_actionCheckResponse.sqf @@ -28,3 +28,4 @@ if ([_target] call EFUNC(common,isAwake)) then { ["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent); [_target,"activity",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog); +[_target,"quick_view",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 062a696fcd..e0cab95420 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -16,7 +16,7 @@ #include "script_component.hpp" -private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_condition"]; +private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_condition", "_patientStateCondition", "_allowedSelections"]; _caller = _this select 0; _target = _this select 1; _selectionName = _this select 2; @@ -44,7 +44,8 @@ if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false}; _items = getArray (_config >> "items"); if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false}; -_locations = getArray (_config >> "treatmentLocations"); +_allowedSelections = getArray (_config >> "allowedSelections"); +if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false}; _return = true; if (getText (_config >> "condition") != "") then { @@ -62,6 +63,14 @@ if (getText (_config >> "condition") != "") then { }; if (!_return) exitwith {false}; +_patientStateCondition = if (isText(_config >> "patientStateCondition")) then { + missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] +} else { + getNumber(_config >> "patientStateCondition") +}; +if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; + +_locations = getArray (_config >> "treatmentLocations"); if ("All" in _locations) exitwith {true}; private [ "_medFacility", "_medVeh"]; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 6797785763..a3b71b7f9c 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -16,12 +16,13 @@ #define MIN_ENTRIES_LITTER_CONFIG 3 -private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems"]; +private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems", "_previousDamage"]; _caller = _this select 0; _target = _this select 1; _selectionName = _this select 2; _className = _this select 3; _usersOfItems = _this select 5; +_previousDamage = _this select 6; if !(GVAR(allowLitterCreation)) exitwith {}; if (vehicle _caller != _caller || vehicle _target != _target) exitwith {}; @@ -76,7 +77,7 @@ _createdLitter = []; _litterCondition = missionNamespace getvariable _litterCondition; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; }; - if !([_caller, _target, _selectionName, _className, _usersOfItems] call _litterCondition) exitwith {}; + if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {}; if (typeName _litterOptions == "ARRAY") then { // Loop through through the litter options and place the litter diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index 83955f7bd1..19d3bdec1d 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -16,7 +16,6 @@ private ["_unit","_return"]; _unit = _this select 0; -if (GVAR(level) == 1) exitwith {true}; if (isnil QGVAR(unconsciousConditions)) then { GVAR(unconsciousConditions) = []; }; diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index a92bf9029c..a86077cb3b 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -58,10 +58,10 @@ if (isClass (_config >> _className)) then { _bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; _exist = false; -_injuryId = _injury select 0; +_injuryType = _injury select 1; _bandagedInjury = []; { - if ((_x select 0) == _injuryId) exitwith { + if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith { _exist = true; _existingInjury = _x; _existingInjury set [3, (_existingInjury select 3) + _impact]; @@ -73,16 +73,11 @@ _bandagedInjury = []; if !(_exist) then { // [ID, classID, bodypart, percentage treated, bloodloss rate] - _bandagedInjury = [_injuryId, _injury select 1, _injury select 2, _impact, _injury select 4]; + _bandagedInjury = [_injury select 0, _injury select 1, _injury select 2, _impact, _injury select 4]; _bandagedWounds pushback _bandagedInjury; }; -_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, !USE_WOUND_EVENT_SYNC]; - -if (USE_WOUND_EVENT_SYNC) then { - // sync _bandagedInjury - -}; +_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; // Check if we are ever going to reopen this if (random(1) <= _reopeningChance) then { @@ -95,22 +90,19 @@ if (random(1) <= _reopeningChance) then { _injuryIndex = _this select 3; _injury = _this select 4; - if (alive _target) then { + //if (alive _target) then { _openWounds = _target getvariable [QGVAR(openWounds), []]; if ((count _openWounds)-1 < _injuryIndex) exitwith {}; _selectedInjury = _openWounds select _injuryIndex; - if (_selectedInjury select 0 == _injury select 0) then { // matching the IDs + if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs _selectedInjury set [3, (_selectedInjury select 3) + _impact]; _openWounds set [_injuryIndex, _selectedInjury]; - _target setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC]; - if (USE_WOUND_EVENT_SYNC) then { - ["medical_propagateWound", [_target, _selectedInjury]] call EFUNC(common,globalEvent); - }; + _bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []]; _exist = false; - _injuryId = _injury select 0; + _injuryId = _injury select 1; { - if ((_x select 0) == _injuryId) exitwith { + if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith { _exist = true; _existingInjury = _x; _existingInjury set [3, ((_existingInjury select 3) - _impact) max 0]; @@ -119,10 +111,11 @@ if (random(1) <= _reopeningChance) then { }foreach _bandagedWounds; if (_exist) then { - _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, !USE_WOUND_EVENT_SYNC]; + _target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true]; + _target setvariable [QGVAR(openWounds), _openWounds, true]; }; }; // Otherwise something went wrong, we we don't reopen them.. - }; - }, [_target, _impact, _part, _injuryIndex, _injury], _delay, 0] call EFUNC(common,waitAndExecute); + //}; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay, 0] call EFUNC(common,waitAndExecute); }; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index f13fbc8c05..d7595ec439 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -31,6 +31,7 @@ if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then { GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]]; if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { + GVAR(litterPFHRunning) = true; [{ { if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then { @@ -46,7 +47,7 @@ if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { [(_this select 1)] call CBA_fnc_removePerFrameHandler; GVAR(litterPFHRunning) = false; }; - }, 30, []] call cba_fnc_addPerFrameHandler; + }, 30, []] call CBA_fnc_addPerFrameHandler; }; true \ No newline at end of file diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index ab6e6f2a68..a4e5525276 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -80,10 +80,10 @@ if (GVAR(level) < 2) then { } else { _damageReturn = _damageReturn min 0.89; }; + }; [_unit] call FUNC(addToInjuredCollection); - if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith { if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then { [_unit] call EFUNC(common,unloadPerson); @@ -99,7 +99,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { if (_unit getvariable ["ACE_isUnconscious", false]) exitwith { [_unit] call FUNC(setDead); - 0.89 + 0.89; }; if (_delayedUnconsicous) then { [{ @@ -110,7 +110,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW [_this select 0, true] call FUNC(setUnconscious); }, [_unit]] call EFUNC(common,execNextFrame); }; - 0.89 + 0.89; }; _damageReturn min 0.89; }; @@ -120,8 +120,7 @@ if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_dam [_unit] call EFUNC(common,unloadPerson); }; [_unit] call FUNC(setDead); - - 0.89 + 0.89; }; -_damageReturn +_damageReturn; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 9da0d065ed..e617738a90 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -39,8 +39,6 @@ _damageBodyParts = _unit getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]; _damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage]; _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; -[_unit] call FUNC(handleDamage_advancedSetDamage); - _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage); [_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_assignWounds); diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index 9760770d71..99816ee274 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -81,12 +81,17 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t _args = _this select 0; if (diag_frameno > (_args select 1) + 2) then { + (_args select 0) setDamage 0; + _cache_params = (_args select 0) getVariable [QGVAR(cachedHandleDamageParams), []]; _cache_damages = (_args select 0) getVariable QGVAR(cachedDamages); { _params = _x + [_cache_damages select _foreachIndex]; _params call FUNC(handleDamage_advanced); }foreach _cache_params; + + [(_args select 0)] call FUNC(handleDamage_advancedSetDamage); + [(_this select 1)] call cba_fnc_removePerFrameHandler; }; }, 0, [_unit, diag_frameno] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index c96c1b05f8..0c7113f69a 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -110,6 +110,11 @@ if (GVAR(level) >= 2) then { _bloodPressure = [_unit] call FUNC(getBloodPressure); _unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; + if (_painStatus > 0 && {_painStatus < 10}) then { + _painReduce = if (_painStatus > 5) then {0.002} else {0.001}; + _unit setVariable [QGVAR(pain), (_painStatus - _painReduce * _interval) max 0, _syncValues]; + }; + // TODO Disabled until implemented fully // Handle airway /*if (GVAR(setting_allowAirwayInjuries)) then { diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf new file mode 100644 index 0000000000..f7c22ed085 --- /dev/null +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -0,0 +1,30 @@ +/* +* Author: Glowbal +* Check if a unit is in a stable condition +* +* Arguments: +* 0: The patient +* +* Return Value: +* Is in stable condition +* +* Public: No +*/ + +#include "script_component.hpp" + +private ["_unit"]; +_unit = _this select 0; + +if (GVAR(level) <= 1) exitwith { + ([_unit] call FUNC(getBloodloss)) == 0; +}; + +_totalBloodLoss = 0; +_openWounds = _unit getvariable [QGVAR(openWounds), []]; +{ + // total bleeding ratio * percentage of injury left + _totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3)); +}foreach _openWounds; + +(_totalBloodLoss == 0); diff --git a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf index 5263044583..2960c65b9d 100644 --- a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf @@ -33,5 +33,7 @@ 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(useCondition_PAK), "useCondition_PAK"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(useCondition_SurgicalKit), "useCondition_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_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index fe18ac581f..c29edcd5e3 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -49,7 +49,7 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == _unit = _args select 0; _startTime = _unit getvariable [QGVAR(reviveStartTime), 0]; - if (ACE_time - _startTime > GVAR(maxReviveTime)) exitwith { + if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { [(_this select 1)] call cba_fnc_removePerFrameHandler; _unit setvariable [QGVAR(inReviveState), nil, true]; _unit setvariable [QGVAR(reviveStartTime), nil]; @@ -66,6 +66,11 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == _unit setvariable [QGVAR(reviveStartTime), nil]; [(_this select 1)] call cba_fnc_removePerFrameHandler; }; + if (GVAR(level) >= 2) then { + if (_unit getvariable [QGVAR(heartRate), 60] > 0) then { + _unit setvariable [QGVAR(heartRate), 0]; + }; + }; }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler; false; }; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 3298c0a869..7e5cd8c1b7 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -6,10 +6,14 @@ * 0: The unit that will be put in an unconscious state * 1: Set unconsciouns * 2: Minimum unconscious ACE_time + * 3: Force AI Unconscious (skip random death chance) * * ReturnValue: * nil * + * Example: + * [bob, true] call ace_medical_fnc_setUnconscious; + * * Public: yes */ diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 06cea8dfe3..9c218de540 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -16,7 +16,7 @@ #include "script_component.hpp" -private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return", "_usersOfItems", "_consumeItems", "_condition", "_displayText", "_wpn", "_treatmentTimeConfig"]; +private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return", "_usersOfItems", "_consumeItems", "_condition", "_displayText", "_wpn", "_treatmentTimeConfig", "_patientStateCondition", "_allowedSelections"]; _caller = _this select 0; _target = _this select 1; _selectionName = _this select 2; @@ -49,13 +49,13 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then { if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false}; +_allowedSelections = getArray (_config >> "allowedSelections"); +if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false}; + // Check item _items = getArray (_config >> "items"); if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false}; -// Check allowed locations -_locations = getArray (_config >> "treatmentLocations"); - _return = true; if (isText (_config >> "Condition")) then { _condition = getText(_config >> "condition"); @@ -74,6 +74,16 @@ if (isText (_config >> "Condition")) then { }; if (!_return) exitwith {false}; +_patientStateCondition = if (isText(_config >> "patientStateCondition")) then { + missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0] +} else { + getNumber(_config >> "patientStateCondition") +}; +if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; + +// Check allowed locations +_locations = getArray (_config >> "treatmentLocations"); + if ("All" in _locations) then { _return = true; } else { @@ -149,7 +159,7 @@ if (_caller == _target) then { _callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE"); }; -_caller setvariable [QGVAR(selectedWeaponOnTreatment), currentWeapon _caller]; +_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)]; // Cannot use secondairy weapon for animation if (currentWeapon _caller == secondaryWeapon _caller) then { diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf index 0a49420783..ade74a6ccb 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf @@ -23,7 +23,7 @@ _selectionName = _this select 2; _className = _this select 3; _items = _this select 4; -// TODO replace by event system instead -[[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ - +if (alive _target && {(_target getvariable [QGVAR(inCardiacArrest), false] || _target getvariable [QGVAR(inReviveState), false])}) then { + [[_caller, _target], QUOTE(DFUNC(treatmentAdvanced_CPRLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ +}; true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf index 4bb14e1139..c3151f2c90 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf @@ -14,17 +14,15 @@ #include "script_component.hpp" -private ["_caller","_target", "_n"]; +private ["_caller","_target", "_reviveStartTime"]; _caller = _this select 0; _target = _this select 1; -_n = _target getvariable [QEGVAR(common,ENABLE_REVIVE_COUNTER),0]; -if (_n > 0) then { - _n = _n - random(20); - if (_n < 0) then { - _n = 0; +if (_target getvariable [QGVAR(inReviveState), false]) exitwith { + _reviveStartTime = _target getvariable [QGVAR(reviveStartTime),0]; + if (_reviveStartTime > 0) then { + _target setvariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time]; }; - _target setvariable [QEGVAR(common,ENABLE_REVIVE_COUNTER), _n]; }; if (random(1)>= 0.6) exitwith { @@ -33,4 +31,7 @@ if (random(1)>= 0.6) exitwith { _target setvariable [QGVAR(bloodPressure), [50,70]]; }; +[_target, "activity", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); +[_target, "activity_view", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message + true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index 6b6b7adb81..1278994a11 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -38,5 +38,6 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith { }foreach _items;*/ [_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); +[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index 544ef6ae55..df7594921d 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -68,4 +68,7 @@ if (alive _target) exitwith { // Resetting damage _target setDamage 0; + + [_target, "activity", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity_view", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index e3d07616f3..0b401a73cc 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -29,9 +29,10 @@ _items = _this select 4; { if (_x != "") then { [_target, _x] call FUNC(addToTriageCard); + [_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog); + [_target, "activity_view", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog); }; }foreach _items; -[_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog); true; diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index fc6b91b057..e0c4d20ed6 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -30,3 +30,4 @@ _removeItem = _items select 0; [[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [_target, _removeItem] call FUNC(addToTriageCard); [_target, "activity", LSTRING(Activity_gaveIV), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); +[_target, "activity_view", LSTRING(Activity_gaveIV), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index cab44d3295..148ed06252 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -44,6 +44,7 @@ _removeItem = _items select 0; [_target, _removeItem] call FUNC(addToTriageCard); [_target, "activity", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); +[_target, "activity_view", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message true; diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index 19352e5441..8a5d784301 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems", "_weaponSelect"]; +private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems", "_weaponSelect", "_lastAnim"]; _args = _this select 0; _caller = _args select 0; @@ -30,13 +30,28 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - [_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation); + _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + //Don't play another medic animation (when player is rapidily treating) + TRACE_2("Reseting to old animation", animationState player, _lastAnim); + switch (true) do { + case (_lastAnim == "AinvPknlMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPpneMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWnonDnon_medic"): {_lastAnim = "AmovPknlMstpSnonWnonDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWpstDnon_medic"): {_lastAnim = "AinvPpneMstpSlayWpstDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWpstDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWpstDnon"}; + }; + [_caller, _lastAnim, 1] call EFUNC(common,doAnimation); }; _caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; -_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]); -if (_weaponSelect != "") then { - _caller selectWeapon _weaponSelect; +_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]); +if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { + for "_index" from 0 to 99 do { + _caller action ["SwitchWeapon", _caller, _caller, _index]; + //Just check weapon, muzzle and mode (ignore ammo in case they were reloading) + if (((weaponState _caller) select [0,3]) isEqualTo (_weaponSelect select [0,3])) exitWith {TRACE_1("Restoring", (weaponState _caller));}; + if ((weaponState _caller) isEqualTo ["","","","",0]) exitWith {ERROR("weaponState not found");}; + }; } else { _caller action ["SwitchWeapon", _caller, _caller, 99]; }; @@ -60,4 +75,4 @@ if (isNil _callback) then { _args call _callback; -_args call FUNC(createLitter); +// _args call FUNC(createLitter); diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index b3b6e9d52a..f5cb9baf71 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_weaponSelect"]; +private ["_args", "_caller", "_target","_selectionName","_className","_config","_callback", "_weaponSelect", "_lastAnim"]; _args = _this select 0; _caller = _args select 0; _target = _args select 1; @@ -28,13 +28,28 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { _caller removeWeapon "ACE_FakePrimaryWeapon"; }; if (vehicle _caller == _caller) then { - [_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation); + _lastAnim = _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""]; + //Don't play another medic animation (when player is rapidily treating) + TRACE_2("Reseting to old animation", animationState player, _lastAnim); + switch (true) do { + case (_lastAnim == "AinvPknlMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWrflDnon_medic"): {_lastAnim = "AmovPpneMstpSrasWrflDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWnonDnon_medic"): {_lastAnim = "AmovPknlMstpSnonWnonDnon"}; + case (_lastAnim == "AinvPpneMstpSlayWpstDnon_medic"): {_lastAnim = "AinvPpneMstpSlayWpstDnon"}; + case (_lastAnim == "AinvPknlMstpSlayWpstDnon_medic"): {_lastAnim = "AmovPknlMstpSrasWpstDnon"}; + }; + [_caller, _lastAnim, 1] call EFUNC(common,doAnimation); }; _caller setvariable [QGVAR(treatmentPrevAnimCaller), nil]; -_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), ""]); -if (_weaponSelect != "") then { - _caller selectWeapon _weaponSelect; +_weaponSelect = (_caller getvariable [QGVAR(selectedWeaponOnTreatment), []]); +if ((_weaponSelect params [["_previousWeapon", ""]]) && {(_previousWeapon != "") && {_previousWeapon in (weapons _caller)}}) then { + for "_index" from 0 to 99 do { + _caller action ["SwitchWeapon", _caller, _caller, _index]; + //Just check weapon, muzzle and mode (ignore ammo in case they were reloading) + if (((weaponState _caller) select [0,3]) isEqualTo (_weaponSelect select [0,3])) exitWith {TRACE_1("Restoring", (weaponState _caller));}; + if ((weaponState _caller) isEqualTo ["","","","",0]) exitWith {ERROR("weaponState not found");}; + }; } else { _caller action ["SwitchWeapon", _caller, _caller, 99]; }; @@ -52,11 +67,24 @@ if (isNil _callback) then { _callback = missionNamespace getvariable _callback; }; -_args call _callback; +//Get current damage before treatment (for litter) +_previousDamage = switch (toLower _selectionName) do { + case ("head"): {_target getHitPointDamage "HitHead"}; + case ("body"): {_target getHitPointDamage "HitBody"}; + case ("hand_l"): {_target getHitPointDamage "HitLeftArm"}; + case ("hand_r"): {_target getHitPointDamage "HitRightArm"}; + case ("leg_l"): {_target getHitPointDamage "HitLeftLeg"}; + case ("leg_r"): {_target getHitPointDamage "HitRightLeg"}; + default {damage _target}; +}; +_args call _callback; +_args pushBack _previousDamage; _args call FUNC(createLitter); //If we're not already tracking vitals, start: if (!(_target getvariable [QGVAR(addedToUnitLoop),false])) then { [_target] call FUNC(addToInjuredCollection); }; + +["medical_treatmentSuccess", [_caller, _target, _selectionName, _className]] call EFUNC(common,localEvent); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 6fa58bb759..290690d442 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -950,7 +950,7 @@ Analgetikum slouží k tlumení středně těžkých a těžkých bolestí - Atropin autoinjector + Atropine autoinjector Атропин в пневмошприце Atropina auto-inyectable Auto-injecteur d'Atropine @@ -1592,6 +1592,7 @@ Nada Keine Žádný + Nada Weak @@ -2211,6 +2212,7 @@ Bandażowanie usuwa ślady krwi Obvázání odstraňuje skvrny od krve El vendaje elimina las manchas de sangre + Bandagem remove manchas de sangue Pain is only temporarily suppressed @@ -2218,6 +2220,7 @@ Ból jest tymczasowo zwalczany Bolest je potlačena pouze dočasně El dolor se suprime solo temporalmente + Dor é suprimida somente temporáriamente Pain Effect Type @@ -2730,6 +2733,7 @@ Médico ACE ACE-Medicsystem ACE Zdravotnické + ACE Médico Medical Settings [ACE] @@ -2738,6 +2742,7 @@ Ajustes médicos [ACE] Medizinische Einstellungen [ACE] Lékařské nastavení [ACE] + Ajustes médicos [ACE] Medical Level @@ -2746,6 +2751,7 @@ Nivel médico Medizinisches Level Úroveň medického + Nível médico What is the medical simulation level? @@ -2754,6 +2760,7 @@ ¿Cuál es el nivel de simulación médica? Wie hoch soll das medizinische Simulationslevel sein? Jaká je úroveň lékařské simulace? + Qual o nível de simulação médica? Basic @@ -2762,6 +2769,7 @@ Básico Standard Základní + Básica Advanced @@ -2770,6 +2778,7 @@ Avanzado Erweitert Pokročilé + Avançada Medics setting @@ -2778,6 +2787,7 @@ Configuración médica Medizinische Einstellungen Úroveň zdravotníků + Configuração médica What is the level of detail prefered for medics? @@ -2785,6 +2795,7 @@ 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? + Qual o nível de detalhe preferido para os médicos? Disable medics @@ -2793,6 +2804,7 @@ Desactivar médicos Sanitäter deaktivieren Zakázat zdravotníky + Desativar médicos Enable Litter @@ -2801,6 +2813,7 @@ Activar restos médicos Abfälle aktivieren Povolit odpadky + Ativar lixo médico Enable litter being created upon treatment @@ -2809,6 +2822,7 @@ 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í + Ativar lixo ser criado após tratamento Life time of litter objects @@ -2817,6 +2831,7 @@ Tiempo de vida de los restos médicos Dauer des angezeigten Abfalls Životnost pro odpadky + Tempo de vida dos objetos do lixo How long should litter objects stay? In seconds. -1 is forever. @@ -2825,6 +2840,7 @@ ¿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. + Quanto tempo os objetos do lixo devem ficar? Em segundos. -1 é para sempre. Enable Screams @@ -2833,6 +2849,7 @@ Activar gritos Schreie aktivieren Povolit křik + Ativar gritos Enable screaming by injuried units @@ -2841,6 +2858,7 @@ Activar gritos para unidades heridas Aktiviere Schreie bei verletzten Einheiten Povolit křičení zraněných jednotek + Ativa gritos para unidades feridas Player Damage @@ -2849,6 +2867,7 @@ Daño de jugador Spielerschaden Poškození hráče + Dano do jogador What is the damage a player can take before being killed? @@ -2857,6 +2876,7 @@ ¿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? + Qal é o dano que um jogador pode sofrer antes de morrer? AI Damage @@ -2865,6 +2885,7 @@ Daño IA KI-Schaden Poškození AI + Dano da IA What is the damage an AI can take before being killed? @@ -2873,6 +2894,7 @@ ¿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? + Qual é o dano que uma IA pode sofrer antes de morrer? AI Unconsciousness @@ -2881,6 +2903,7 @@ Inconsciencia IA KI-Bewusstlosigkeit Bezvědomí AI + Inconsciência da IA Allow AI to go unconscious @@ -2889,30 +2912,21 @@ Permita a la IA caer inconsciente KI kann bewusstlos werden Umožňuje AI upadnout do bezvědomí + Permite IA ficar inconsciente Remote Controlled AI IA controlada remotamente + IA controlada remotamente + Zdalnie sterowane AI + Vzdáleně ovládané AI Treat remote controlled units as AI not players? ¿Tratar unidades remotamente controladas como IA? - - - Disabled - Отключено - Wyłączone - Activado - Deaktiviert - Zakázáno - - - Enabled - Включено - Włączone - Desactivado - Aktiviert - Povoleno + Tratar unidades remotamente controladas como IA? + Traktuj jednostki zdalnie sterowane (przez Zeusa) jako AI, nie jako graczy? + Ošetřit vzdáleně ovládané jednotky jako AI, ne jako hráče? Prevent instant death @@ -2921,6 +2935,7 @@ Prevenir muerte instantánea Verhindere direkten Tod Zabránit okamžité smrti + Previnir morte instantânea Have a unit move to unconscious instead of death @@ -2929,6 +2944,7 @@ 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 + Fazer a unidade ficar inconsciente invés de morrer Bleeding coefficient @@ -2937,6 +2953,7 @@ Coeficiente de sangrado Verblutungsmultiplikator Koeficient krvácení + Coeficiente de sangramento Coefficient to modify the bleeding speed @@ -2945,6 +2962,7 @@ Coeficiente para modificar la velocidad de sangrado Multiplikator um die Verblutungsgeschwindigkeit zu verändern Koeficient rychlosti krvácení + Coeficiente para modificar a velocidade do sangramento Pain coefficient @@ -2953,6 +2971,7 @@ Coeficiente de dolor Schmerzmultiplikator Koeficient bolesti + Coeficiente de dor Coefficient to modify the pain intensity @@ -2961,6 +2980,7 @@ Coeficiente para modificar la intensidad del dolor Multiplikator um den Schmerzintensität zu verändern Koeficient intenzity bolesti + Coeficiente para modificar a instensidade de dor Sync status @@ -2969,6 +2989,7 @@ Sincronizador estado Status synchronisieren Synchronizovat status + Sincronizar estado Keep unit status synced. Recommended on. @@ -2977,6 +2998,7 @@ 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. + Mater o estado da unidade sincronizado. Recomendado ativado. Provides a medical system for both players and AI. @@ -2985,6 +3007,7 @@ 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. + Proporciona o sistema médico para os jogadores e a IA. Advanced Medical Settings [ACE] @@ -2993,6 +3016,7 @@ Ajustes médicos avanzados [ACE] Erweiterte medizinische Einstellungen [ACE] Pokročilé zdravotnické nastavení [ACE] + Ajustes médicos avançados [ACE] Enabled for @@ -3001,6 +3025,7 @@ Hablitado para Aktiviert für Povoleno pro + Habilitado para Select what units the advanced medical system will be enabled for @@ -3009,6 +3034,7 @@ 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 + Selecione quais unidades o sistema médico avançado será habilitado Players only @@ -3017,6 +3043,7 @@ Solo jugadores Nur Spieler Pouze hráči + Somente jogadores Players and AI @@ -3025,6 +3052,7 @@ Jugadors e IA Spieler und KI Hráči a AI + Jogadores e IA Enable Advanced wounds @@ -3033,6 +3061,7 @@ Activa heridas avanzadas Aktiviere erweiterte Wunden Povolit pokročilé zranění + Ativar ferimentos avançados Allow reopening of bandaged wounds? @@ -3041,6 +3070,7 @@ Permitir la reapertura de las heridas vendadas? Erlaube das Öffnen von bandagierten Wunden? Umožnit znovuotevření zavázané rány? + Permitr reabertura de ferimentos enfaixados? Vehicle Crashes @@ -3049,6 +3079,7 @@ Accidentes de vehículos Fahrzeugunfälle Poškození z kolize + Batidas de veículos Do units take damage from a vehicle crash? @@ -3057,6 +3088,7 @@ ¿Las unidades reciben daño de un accidente de tráfico? Bekommen Einheiten von Fahrzeugunfällen Schaden? Dostane jednotka poškození při autonehodě? + As unidades recebem dano de uma batida de veículo? Allow PAK @@ -3065,6 +3097,7 @@ Permitir EPA Erlaube Erstehilfekasten Povolit osobní lékárničky + Permitir Kit de Primeiros Socorros Who can use the PAK for full heal? @@ -3073,6 +3106,7 @@ ¿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í? + Quem pode usar o KPS para cura completa? Anyone @@ -3081,6 +3115,7 @@ Nadie Jeder Kdokoliv + Qualquer um Medics only @@ -3089,6 +3124,7 @@ Solo médicos Nur Sanitäter Pouze zdravotník + Somente médicos Doctors only @@ -3097,6 +3133,7 @@ Solo doctores Nur Ärzte Pouze doktor + Somente doutores Remove PAK on use @@ -3105,6 +3142,7 @@ Eliminar EPA después del uso Entferne Erstehilfekasten bei Verwendung Odebrat osobní lékárničku po použití + Remover o KPS depois do uso Should PAK be removed on usage? @@ -3113,6 +3151,7 @@ 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í? + Deve o KPS ser removido depois do uso? Locations PAK @@ -3121,14 +3160,28 @@ Ubicacions del EPA Orte für Erstehilfekasten Lokace osobní lékárničky + Localizações do KPS - Where can the personal aid kit be used? + Where can the Personal Aid Kit be used? Где может использоваться аптечка? Gdzie można korzystać z apteczek osobistych? ¿Dónde se puede utilizar el equipo de primeros auxilios? Wo kann der Erstehilfekasten verwendet werden? - Kde může být osobní lékárnička použita? + Kde může být použita osobní lékárnička? + Onde o kit de primeiros socorros pode ser utilizado? + + + Condition PAK + Podmínka osobní lékárničky + Condición EPA + Warunek apteczek + + + When can the Personal Aid Kit be used? + Kde může být použita osobní lékárnička? + ¿Cuando se puede utilizar el Equipo de primeros auxilios? + Po spełnieniu jakich warunków apteczka osobista może zostać zastosowana na pacjencie? Anywhere @@ -3137,6 +3190,7 @@ Donde sea Überall Kdekoliv + Qualquer lugar Medical vehicles @@ -3145,6 +3199,7 @@ Vehiculos médicos Medizinische Fahrzeuge Zdravotnická vozidla + Veículos médcos Medical facility @@ -3153,6 +3208,7 @@ Centro médico Medizinische Einrichtungen Zdravotnické zařízení + Instalação médica Vehicles & facility @@ -3161,14 +3217,7 @@ Vehículos y centros Fahrzeuge & Einrichtungen Vozidla a zařízení - - - Disabled - Отключено - Wyłączone - Desactivado - Deaktiviert - Zakázáno + Veículos e instalações Allow Surgical kit (Adv) @@ -3177,6 +3226,7 @@ Permitir equipo quirúrgico (Avanzado) Erlaube Operationskasten Povolit chirurgickou soupravu (Pokr.) + Permite kit cirúrgico (avançado) Who can use the surgical kit? @@ -3185,6 +3235,7 @@ ¿Quién puede utilizar el equipo quirúrgico? Wer kann den Operationskasten verwenden? Kdo může použít chirurgickou soupravu? + Quem pode usar o kit cirúrgico? Remove Surgical kit (Adv) @@ -3193,6 +3244,7 @@ Eliminar equipo quirúrgico (Avanzado) Enrtferne Operationskasten (erweitert) Odebrat chirurgickou soupravu (Pokr.) + Remover kit cirúrgico (avançado) Should Surgical kit be removed on usage? @@ -3201,6 +3253,7 @@ Eliminar el equipo quirúrgico después del uso Entferne Operationskästen bei Verwendung? Odebrat chirurgickou soupravu po použití? + Deve o kit cirúrgico ser removido após o uso? Locations Surgical kit (Adv) @@ -3209,6 +3262,7 @@ Ubicaciones del equipo quirúrgico (Avanzado) Orte für Operationskästen (erweitert) Lokace chirurgické soupravy (Pokr.) + Localizações do kit cirúrgico (avançado) Where can the Surgical kit be used? @@ -3217,6 +3271,19 @@ Dónde se puede utilizar el equipo quirúrgico Wo kann der Operationskasten verwendet werden? Kde může být použita chirurgická souprava? + Onde o kit cirúrgico pode ser utilizado? + + + Condition Surgical kit (Adv) + Podmínka chirurgické soupravy (Pokr.) + Condición de equipo quirúrgico (Av) + Warunek zestawu chir. + + + When can the Surgical kit be used? + Kde může být použita chirurgická souprava? + ¿Cuando se puede utilizar el equipo quirúrgico? + Po spełnieniu jakich warunków zestaw chirurgiczny może zostać zastosowany na pacjencie? Bloodstains @@ -3224,6 +3291,7 @@ Plamy krwi Skvrny od krve Manchas de sangre + Manchas de sangue Bandaging removes bloodstains @@ -3231,6 +3299,7 @@ Bandażowanie usuwa ślady krwi Obvázání odstraňuje skvrny od krve El vendaje elimina las manchas de sangre + Bandagem remove manchas de sangue Pain suppression @@ -3238,6 +3307,7 @@ Zwalczanie bólu Potlačení bolesti Supresión del dolor + Supressão de dor Pain is only temporarily suppressed, not removed @@ -3245,6 +3315,7 @@ Ból jest tylko tymczasowo zwalczany, nie jest usuwany trwale Bolest je potlačena, ale jen dočastně El dolor se suprime solo temporalmente, no se elimina. + Dor é somente temporáriamente suprimida, não removida Configure the treatment settings from ACE Medical @@ -3253,6 +3324,7 @@ Configure las opciones de tratamiento del ACE Médico Behandlungseinstellungen vom ACE-Medical konfigurieren Konfigurace nastavení léčby ze zdravotnické systému ACE + Configure as opções de tratamento do ACE Médico Revive Settings [ACE] @@ -3261,6 +3333,7 @@ Sistema de resucitado [ACE] Wiederbelebungseinstellungen [ACE] Nastavení oživení [ACE] + Sistema de reavivamento [ACE] Enable Revive @@ -3269,6 +3342,7 @@ Habilitar resucitado Erlaube Wiederbelebung Povolit oživení + Habilitar reavivamento Enable a basic revive system @@ -3277,6 +3351,7 @@ Habilitar un sistema básico de resucitado Aktiviere Standard-Wiederbelebungssystem Povolit základní systém oživení + Habilitar um sistema básico de reavivamento Max Revive time @@ -3285,6 +3360,7 @@ Tiempo máximo de resucitado Maximale Wiederbelebungszeit Maximální čas pro oživení + Tempo máximo de reavivamento Max amount of seconds a unit can spend in revive state @@ -3293,6 +3369,7 @@ 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 + Quantidade máxima de segundos que uma unidade pode gastar em um estado de reavivamento Max Revive lives @@ -3301,6 +3378,7 @@ Vidas máximas de resucitado Maximale Leben bei Wiederbelebung Maximální počet oživení + Vidas máximas do reavivado Max amount of lives a unit. 0 or -1 is disabled. @@ -3309,6 +3387,7 @@ 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. + Quantidade máxima de vidas por unidade. 0 ou -1 é desativado. Provides a medical system for both players and AI. @@ -3317,6 +3396,7 @@ 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. + Proporciona um sistema médico para jogadores e IA. Set Medic Class [ACE] @@ -3325,6 +3405,7 @@ Establecer case médica [ACE] Setze Sanitäterklassen [ACE] Určit třídu medika [ACE] + Definir classe médica [ACE] List @@ -3333,6 +3414,7 @@ Lista Liste Seznam + Lista List of unit names that will be classified as medic, separated by commas. @@ -3341,6 +3423,7 @@ 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. + Lista dos nomes das unidades que se classificam como médicos, separados por vírgulas. Is Medic @@ -3349,13 +3432,14 @@ Es médico Ist Sanitäter Je zdravotník + É médico - - - + This module allows you to assign the medic class to selected units. + Moduł ten pozwala przypisać klasę medyczną wybranym jednostkom. Dieses Modul legt fest welche Einheit ein Sanitäter ist. Tento modul určuje, která jednotka je zdravotník. + Este módulo determina qual unidade é um paramédico. None @@ -3364,6 +3448,7 @@ Nada Keine Žádný + Nada Regular medic @@ -3372,6 +3457,7 @@ Médico regular Normaler Sanitäter Řadový zdravotník + Médico regular Doctor (Only Advanced Medics) @@ -3380,6 +3466,7 @@ Doctor (Solo medicina avanzada) Arzt (nur erweiterte Sanitäter) Doktor (Pouze pokročilý zdravotníci) + Doutor (Somente médicos avançados) Assigns the ACE medic class to a unit @@ -3388,6 +3475,7 @@ 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 + Atribui a classe médica do ACE a uma unidade Set Medical Vehicle [ACE] @@ -3396,6 +3484,7 @@ Establecer vehículos médicos [ACE] Setze medizinisches Fahrzeug [ACE] Určit zdravotnické vozidlo [ACE] + Definir veículo médico [ACE] List @@ -3404,14 +3493,16 @@ Lista Liste Seznam + Lista List of vehicles that will be classified as medical vehicle, separated by commas. Список транспортных средств, которые будут считаться медицинским транспортом (через запятую). Lista nazw pojazdów, które są sklasyfikowane jako pojazdy medyczne, oddzielone przecinkami. Lista de los vehículos que se clasifican como vehículo médicos, separados por comas. - Liste ovn Fahrzeugen, die als medizinische Fahrzeuge verwendet werden. Wird durch Kommas getrennt. + Liste von Fahrzeugen, die als medizinische Fahrzeuge verwendet werden. Wird durch Kommas getrennt. Seznam vozidel které budou klasifikovány jako zdravotnická vozidla, oddělené čárkami. + Lista de veículos que serão classificados como veículos médicos, separados por vírgulas. Is Medical Vehicle @@ -3420,6 +3511,7 @@ Es vehículo médico Ist medizinisches Fahrzeug Je zdravotnické vozidlo + É um veículo médico Whatever or not the objects in the list will be a medical vehicle. @@ -3428,6 +3520,7 @@ 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. + Se serão ou não os objetos dessa lista veículos médicos. Assigns the ACE medic class to a unit @@ -3436,6 +3529,7 @@ 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 + Atribui a classe médica ACE a uma unidade Set Medical Facility [ACE] @@ -3444,6 +3538,7 @@ Establece el centro médico [ACE] Setze medizinische Einrichtung [ACE] Určit zdravotnické zařízení [ACE] + Definir instalação médica [ACE] Is Medical Facility @@ -3452,6 +3547,7 @@ Es centro médico Ist eine medizinische Einrichtung Je zdravotnické zařízení + É uma instalação médica Registers an object as a medical facility @@ -3460,6 +3556,7 @@ Registra un objeto como un centro médico Definiert ein Objekt als medizinische Einrichtung Registruje objekt jako zdravotnické zařízení + Registra um objeto como instalacão médica Defines an object as a medical facility. This allows for more advanced treatments. Can be used on buildings and vehicles. @@ -3468,6 +3565,7 @@ 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. + Define um objeto como instalação médica. Isso permite tratamentos mais avançados. Pode ser utilizado em edifícios e veículos. [ACE] Medical Supply Crate (Basic) @@ -3476,6 +3574,7 @@ [ACE] Caja de suministros médicos (Básica) [ACE] Medizinische Kiste (standard) [ACE] Zdravotnické zásoby (základní) + [ACE] Caixa com suprimentos médicos [ACE] Medical Supply Crate (Advanced) @@ -3484,30 +3583,31 @@ [ACE] Caja de suministros médicos (Avanzada) [ACE] Medizinische Kiste (erweitert) [ACE] Zdravotnické zásoby (pokročilé) + [ACE] Caixa com suprimentos médicos (Avançados) - - Yes - Ja - Si - Tak - Ano - Oui - Да - Igen - Sim - Si + + Anytime + Kdykoli + Siempre + Zawsze - - No - Nein - No - Nie - Ne - Non - Нет - Nem - Não - No + + Stable + Stabilní + Estable + Po stabilizacji + + + Medical + Zdravotní + Médical + Sanitäter + Medico + Medyczne + Médico + Медик + Médico + Orvosi - \ No newline at end of file + diff --git a/addons/medical/ui/body_background.png b/addons/medical/ui/body_background.png deleted file mode 100644 index 65791a01c0..0000000000 Binary files a/addons/medical/ui/body_background.png and /dev/null differ diff --git a/addons/medical_menu/$PBOPREFIX$ b/addons/medical_menu/$PBOPREFIX$ new file mode 100644 index 0000000000..6ca7434932 --- /dev/null +++ b/addons/medical_menu/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\medical_menu \ No newline at end of file diff --git a/addons/medical_menu/ACE_Settings.hpp b/addons/medical_menu/ACE_Settings.hpp new file mode 100644 index 0000000000..1f2b9cc3ea --- /dev/null +++ b/addons/medical_menu/ACE_Settings.hpp @@ -0,0 +1,25 @@ + +class ACE_Settings { + class GVAR(allow) { + displayName = CSTRING(allow); + description = CSTRING(allow_Descr); + value = 1; + typeName = "SCALAR"; + values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), ECSTRING(common,VehiclesOnly)}; + }; + class GVAR(useMenu) { + displayName = CSTRING(useMenu); + description = CSTRING(useMenu_Descr); + value = 0; + typeName = "SCALAR"; + values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), ECSTRING(common,VehiclesOnly)}; + isClientSettable = 1; + }; + class GVAR(openAfterTreatment) { + displayName = CSTRING(openAfterTreatment); + description = CSTRING(openAfterTreatment_Descr); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; +}; diff --git a/addons/medical_menu/CfgEventHandlers.hpp b/addons/medical_menu/CfgEventHandlers.hpp new file mode 100644 index 0000000000..7392999c9a --- /dev/null +++ b/addons/medical_menu/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/medical_menu/CfgVehicles.hpp b/addons/medical_menu/CfgVehicles.hpp new file mode 100644 index 0000000000..7bbe7db2ad --- /dev/null +++ b/addons/medical_menu/CfgVehicles.hpp @@ -0,0 +1,70 @@ + +class CfgVehicles { + + class ACE_Module; + class ACE_moduleMedicalMenuSettings: ACE_Module { + scope = 2; + displayName = CSTRING(module_DisplayName); + icon = QUOTE(PATHTOEF(medical,UI\Icon_Module_Medical_ca.paa)); + category = "ACE_medical"; + function = QUOTE(DFUNC(module)); + functionPriority = 1; + isGlobal = 0; + isTriggerActivated = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class allow { + displayName = CSTRING(allow); + description = CSTRING(allow_Descr); + typeName = "NUMBER"; + class values { + class disable { + name = ECSTRING(common,Disabled); + value = 0; + }; + class enable { + name = ECSTRING(common,Enabled); + value = 1; + default = 1; + }; + class VehiclesOnly { + name = ECSTRING(common,VehiclesOnly); + value = 2; + }; + }; + }; + }; + class ModuleDescription { + description = CSTRING(module_Desc); + sync[] = {}; + }; + }; + + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class Medical_Menu { + displayName = CSTRING(OpenMenu); + runOnHover = 0; + exceptions[] = {"isNotInside"}; + condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); + statement = QUOTE([_target] call DFUNC(openMenu)); + icon = PATHTOEF(medical,UI\icons\medical_cross.paa); + }; + }; + + class ACE_Actions { + // Create a consolidates medical menu for treatment while boarded + class ACE_MainActions { + class Medical_Menu { + displayName = CSTRING(OpenMenu); + runOnHover = 0; + exceptions[] = {"isNotInside"}; + condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); + statement = QUOTE([_target] call DFUNC(openMenu)); + icon = PATHTOEF(medical,UI\icons\medical_cross.paa); + }; + }; + }; + }; +}; diff --git a/addons/medical_menu/README.md b/addons/medical_menu/README.md new file mode 100644 index 0000000000..0755083712 --- /dev/null +++ b/addons/medical_menu/README.md @@ -0,0 +1,10 @@ +ace_medical_menu +=============== + +Provides the CSE medical menu for the advanced medical system. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Glowbal](https://github.com/Glowbal) diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf new file mode 100644 index 0000000000..a72c1a8887 --- /dev/null +++ b/addons/medical_menu/XEH_postInit.sqf @@ -0,0 +1,34 @@ +#include "script_component.hpp" + +if (!hasInterface) exitwith {}; + +["medical_treatmentSuccess", { + + if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then { + GVAR(pendingReopen) = false; + [{ + [GVAR(INTERACTION_TARGET)] call FUNC(openMenu); + }, []] call EFUNC(common,execNextFrame); + }; +}] call EFUNC(common,addEventhandler); + + +["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey), +{ + _target = cursorTarget; + if (!(_target isKindOf "CAManBase") || ACE_player distance _target > 10) then {_target = ACE_player}; + // Conditions: canInteract + if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false}; + + // Statement + [_target] call FUNC(openMenu); + false +}, +{ + if (ACE_time - GVAR(lastOpenedOn) > 0.5) then { + [ObjNull] call FUNC(openMenu); + }; +}, +[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind; + diff --git a/addons/medical_menu/XEH_preInit.sqf b/addons/medical_menu/XEH_preInit.sqf new file mode 100644 index 0000000000..c231c7df6e --- /dev/null +++ b/addons/medical_menu/XEH_preInit.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(onMenuOpen); +PREP(openMenu); + +PREP(canOpenMenu); +PREP(updateIcons); +PREP(updateUIInfo); +PREP(handleUI_DisplayOptions); +PREP(handleUI_dropDownTriageCard); +PREP(getTreatmentOptions); +PREP(updateActivityLog); +PREP(updateQuickViewLog); +PREP(updateBodyImage); +PREP(updateInformationLists); +PREP(setTriageStatus); +PREP(collectActions); +PREP(module); + +GVAR(INTERACTION_TARGET) = objNull; +GVAR(actionsOther) = []; +GVAR(actionsSelf) = []; +GVAR(selectedBodyPart) = 0; + +call FUNC(collectActions); + +ADDON = true; diff --git a/addons/medical_menu/config.cpp b/addons/medical_menu/config.cpp new file mode 100644 index 0000000000..27e0db03b9 --- /dev/null +++ b/addons/medical_menu/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_medical"}; + author[] = {$STR_ACE_Common_ACETeam, "Glowbal"}; + authorUrl = "http://ace3mod.com"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ui\menu.hpp" +#include "ACE_Settings.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/medical_menu/data/background_img.paa b/addons/medical_menu/data/background_img.paa new file mode 100644 index 0000000000..de59065e3b Binary files /dev/null and b/addons/medical_menu/data/background_img.paa differ diff --git a/addons/medical_menu/data/icons/advanced_treatment_small.paa b/addons/medical_menu/data/icons/advanced_treatment_small.paa new file mode 100644 index 0000000000..8becb9d2df Binary files /dev/null and b/addons/medical_menu/data/icons/advanced_treatment_small.paa differ diff --git a/addons/medical_menu/data/icons/airway_management_small.paa b/addons/medical_menu/data/icons/airway_management_small.paa new file mode 100644 index 0000000000..ab4da47958 Binary files /dev/null and b/addons/medical_menu/data/icons/airway_management_small.paa differ diff --git a/addons/medical_menu/data/icons/bandage_fracture_small.paa b/addons/medical_menu/data/icons/bandage_fracture_small.paa new file mode 100644 index 0000000000..a869f260ec Binary files /dev/null and b/addons/medical_menu/data/icons/bandage_fracture_small.paa differ diff --git a/addons/medical_menu/data/icons/examine_patient_small.paa b/addons/medical_menu/data/icons/examine_patient_small.paa new file mode 100644 index 0000000000..2e9fc9831d Binary files /dev/null and b/addons/medical_menu/data/icons/examine_patient_small.paa differ diff --git a/addons/medical_menu/data/icons/icon_advanced_treatment.paa b/addons/medical_menu/data/icons/icon_advanced_treatment.paa new file mode 100644 index 0000000000..d6bf6effd9 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_advanced_treatment.paa differ diff --git a/addons/medical_menu/data/icons/icon_airway_management.paa b/addons/medical_menu/data/icons/icon_airway_management.paa new file mode 100644 index 0000000000..f444f5f385 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_airway_management.paa differ diff --git a/addons/medical_menu/data/icons/icon_bandage_fracture.paa b/addons/medical_menu/data/icons/icon_bandage_fracture.paa new file mode 100644 index 0000000000..df8d1de571 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_bandage_fracture.paa differ diff --git a/addons/medical_menu/data/icons/icon_bleeding.paa b/addons/medical_menu/data/icons/icon_bleeding.paa new file mode 100644 index 0000000000..d11c2ed496 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_bleeding.paa differ diff --git a/addons/medical_menu/data/icons/icon_carry.paa b/addons/medical_menu/data/icons/icon_carry.paa new file mode 100644 index 0000000000..7ebb830b03 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_carry.paa differ diff --git a/addons/medical_menu/data/icons/icon_examine_patient.paa b/addons/medical_menu/data/icons/icon_examine_patient.paa new file mode 100644 index 0000000000..12eb06c890 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_examine_patient.paa differ diff --git a/addons/medical_menu/data/icons/icon_medication.paa b/addons/medical_menu/data/icons/icon_medication.paa new file mode 100644 index 0000000000..98893ad863 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_medication.paa differ diff --git a/addons/medical_menu/data/icons/icon_toggle_self.paa b/addons/medical_menu/data/icons/icon_toggle_self.paa new file mode 100644 index 0000000000..3078eb5dd5 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_toggle_self.paa differ diff --git a/addons/medical_menu/data/icons/icon_tourniquet.paa b/addons/medical_menu/data/icons/icon_tourniquet.paa new file mode 100644 index 0000000000..8b34a7bfbb Binary files /dev/null and b/addons/medical_menu/data/icons/icon_tourniquet.paa differ diff --git a/addons/medical_menu/data/icons/icon_tourniquet_small.paa b/addons/medical_menu/data/icons/icon_tourniquet_small.paa new file mode 100644 index 0000000000..a457e2c0d5 Binary files /dev/null and b/addons/medical_menu/data/icons/icon_tourniquet_small.paa differ diff --git a/addons/medical_menu/data/icons/icon_triage_card.paa b/addons/medical_menu/data/icons/icon_triage_card.paa new file mode 100644 index 0000000000..850ab0f4ce Binary files /dev/null and b/addons/medical_menu/data/icons/icon_triage_card.paa differ diff --git a/addons/medical_menu/data/icons/medication_small.paa b/addons/medical_menu/data/icons/medication_small.paa new file mode 100644 index 0000000000..b6acd670c8 Binary files /dev/null and b/addons/medical_menu/data/icons/medication_small.paa differ diff --git a/addons/medical_menu/data/icons/toggle_self_small.paa b/addons/medical_menu/data/icons/toggle_self_small.paa new file mode 100644 index 0000000000..73108e5a98 Binary files /dev/null and b/addons/medical_menu/data/icons/toggle_self_small.paa differ diff --git a/addons/medical_menu/data/icons/triage_card_small.paa b/addons/medical_menu/data/icons/triage_card_small.paa new file mode 100644 index 0000000000..92eb0f0d20 Binary files /dev/null and b/addons/medical_menu/data/icons/triage_card_small.paa differ diff --git a/addons/medical_menu/data/ui_background.paa b/addons/medical_menu/data/ui_background.paa new file mode 100644 index 0000000000..f1c42c7d7d Binary files /dev/null and b/addons/medical_menu/data/ui_background.paa differ diff --git a/addons/medical_menu/functions/fnc_canOpenMenu.sqf b/addons/medical_menu/functions/fnc_canOpenMenu.sqf new file mode 100644 index 0000000000..2cfe7072ef --- /dev/null +++ b/addons/medical_menu/functions/fnc_canOpenMenu.sqf @@ -0,0 +1,24 @@ +/* + * Author: Glowbal + * Check if ACE_player can Open the medical menu + * + * Arguments: + * 0: Caller + * 1: Target + * + * Return Value: + * Can open + * + * Example: + * [] call ace_medical_menu_canOpenMenu + * + * Public: No + */ +#include "script_component.hpp" + +params ["_caller", "_target"]; + +if !(GVAR(allow) == 1 || (GVAR(allow) == 2 && {vehicle _caller != _caller || vehicle _target != _target} && {alive ACE_player})) exitwith {false}; +if !(GVAR(useMenu) == 1 || (GVAR(useMenu) == 2 && {vehicle _caller != _caller || vehicle _target != _target} && {alive ACE_player})) exitwith {false}; + +true; diff --git a/addons/medical_menu/functions/fnc_collectActions.sqf b/addons/medical_menu/functions/fnc_collectActions.sqf new file mode 100644 index 0000000000..211de76202 --- /dev/null +++ b/addons/medical_menu/functions/fnc_collectActions.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Collect treatment actions from medical config + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_menu_fnc_collectActions + * + * Public: No + */ +#include "script_component.hpp" + +private ["_configBasic", "_configAdvanced", "_fnc_compileActionsLevel"]; +_configBasic = (configFile >> "ACE_Medical_Actions" >> "Basic"); +_configAdvanced = (configFile >> "ACE_Medical_Actions" >> "Advanced"); + +_fnc_compileActionsLevel = { + private ["_entryCount", "_actions", "_displayName", "_condition", "_category", "_statement"]; + params ["_config"]; + _actions = []; + + { + if (isClass _x) then { + _displayName = getText (_x >> "displayName"); + _category = getText (_x >> "category"); + _condition = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,canTreatCached)), configName _x]; + _statement = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,treatment)), configName _x]; + _actions pushBack [_displayName, _category, compile _condition, compile _statement]; + }; + nil + }count ("true" configClasses _config); + + _actions // return +}; + +GVAR(actionsBasic) = [_configBasic] call _fnc_compileActionsLevel; +GVAR(actionsAdvanced) = [_configAdvanced] call _fnc_compileActionsLevel; diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf new file mode 100644 index 0000000000..4b03d27970 --- /dev/null +++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Grab available treatment options for given category + * + * Arguments: + * 0: The medic + * 1: The patient + * 2: Category name + * + * Return Value: + * Available actions + * + * Exmaple: + * [ACE_player, poor_dude, "some category"] call ace_medical_menu_fnc_getTreatmentOptions + * + * Public: No + */ +#include "script_component.hpp" + +private "_actions"; +params ["_player", "_target", "_name"]; + +if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitwith {[]}; + +_actions = if (EGVAR(medical,level) == 2) then { + GVAR(actionsAdvanced); +} else { + GVAR(actionsBasic); +}; + +_collectedActions = []; + +_bodyPart = EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart); +{ + _x params ["", "_currentCategory", "_currentCondition"]; + if (_name == _currentCategory && {call _currentCondition}) then { + _collectedActions pushBack _x; + }; + nil +} count _actions; + +_collectedActions // return diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf new file mode 100644 index 0000000000..d795b0128c --- /dev/null +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -0,0 +1,110 @@ +/* + * Author: Glowbal + * Display the available treatment options in category + * + * Arguments: + * 0: Category name + * + * Return Value: + * None + * + * Example: + * ["some category"] call ace_medical_menu_handleUI_DisplayOptions + * + * Public: No + */ +#include "script_component.hpp" + +#define START_IDC 20 +#define END_IDC 27 +#define AMOUNT_OF_ENTRIES (count _entries) + +if (!hasInterface) exitwith{}; + +private ["_entries", "_display", "_newTarget", "_card", "_ctrl", "_code"]; + +params ["_name"]; + +disableSerialization; + +_display = uiNamespace getVariable QGVAR(medicalMenu); +if (isNil "_display") exitwith {}; // no valid dialog present + +if (_name isEqualTo "toggle") exitwith { + if (GVAR(INTERACTION_TARGET) != ACE_player) then { + _newTarget = ACE_player; + } else { + _newTarget = GVAR(INTERACTION_TARGET_PREVIOUS); + }; + + GVAR(INTERACTION_TARGET_PREVIOUS) = GVAR(INTERACTION_TARGET); + [_newTarget] spawn { + closeDialog 0; + sleep 0.1; + [_this select 0] call FUNC(openMenu); + }; +}; + +// Clean the dropdown options list from all actions +for [{_x = START_IDC}, {_x <= END_IDC}, {_x = _x + 1}] do { + _ctrl = (_display displayCtrl (_x)); + _ctrl ctrlSetText ""; + _ctrl ctrlShow false; + _ctrl ctrlSetEventHandler ["ButtonClick",""]; + _ctrl ctrlSetTooltip ""; + _ctrl ctrlCommit 0; +}; + +GVAR(LatestDisplayOptionMenu) = _name; + +// The triage card has no options available +lbClear 212; +if (_name isEqualTo "triage") exitwith { + + ctrlEnable [212, true]; + private ["_log", "_triageCardTexts", "_message"]; + _log = GVAR(INTERACTION_TARGET) getvariable [QEGVAR(medical,triageCard), []]; + _triageCardTexts = []; + { + _x params ["_item", "_amount", "_time"]; + _message = _item; + if (isClass(configFile >> "CfgWeapons" >> _item)) then { + _message = getText(configFile >> "CfgWeapons" >> _item >> "DisplayName"); + } else { + if (isLocalized _message) then { + _message = localize _message; + }; + }; + _triageCardTexts pushback format["%1x - %2 (%3m)", _amount, _message, round((ACE_time - _time) / 60)]; + nil; + }count _log; + + if (count _triageCardTexts == 0) exitwith { + lbAdd [212,(localize ELSTRING(medical,TriageCard_NoEntry))]; + }; + { + lbAdd [212,_x]; + nil; + }count _triageCardTexts; +}; + +ctrlEnable [212, false]; + +_entries = [ACE_player, GVAR(INTERACTION_TARGET), _name] call FUNC(getTreatmentOptions); + +{ + //player sidechat format["TRIGGERED: %1",_x]; + if (_forEachIndex > END_IDC) exitwith {}; + _ctrl = (_display displayCtrl (START_IDC + _forEachIndex)); + if (!(_forEachIndex > AMOUNT_OF_ENTRIES)) then { + _ctrl ctrlSetText (_x select 0); + _code = format ["ace_medical_menu_pendingReopen = true; call %1;", (_x select 3)]; + _ctrl ctrlSetEventHandler ["ButtonClick", _code]; + _ctrl ctrlSetTooltip (_x select 0); // TODO implement + _ctrl ctrlShow true; + } else { + _ctrl ctrlSetText ""; + _ctrl ctrlSetEventHandler ["ButtonClick", ""]; + }; + _ctrl ctrlCommit 0; +} forEach _entries; diff --git a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf new file mode 100644 index 0000000000..fb924fc40b --- /dev/null +++ b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf @@ -0,0 +1,35 @@ +/* + * Author: Glowbal + * Handle the triage card display + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_menu_handleUI_dropDownTriageCard + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_pos", "_ctrl", "_currentPos", "_idc"]; + +disableSerialization; + +_display = uiNamespace getVariable QGVAR(medicalMenu); +_pos = [0, 0, 0, 0]; +_currentPos = ctrlPosition (_display displayCtrl 2002); +_currentPos params ["_currentPosX", "_currentPosY"]; +if (_currentPosX == 0 && _currentPosY == 0) then { + _pos = ctrlPosition (_display displayCtrl 2001); +}; + +for "_idc" from 2002 to 2006 step 1 do { + _pos set [1, (_pos select 1) + (_pos select 3)]; + _ctrl = _display displayCtrl _idc; + _ctrl ctrlSetPosition _pos; + _ctrl ctrlCommit 0; +}; diff --git a/addons/medical_menu/functions/fnc_module.sqf b/addons/medical_menu/functions/fnc_module.sqf new file mode 100644 index 0000000000..d95110c200 --- /dev/null +++ b/addons/medical_menu/functions/fnc_module.sqf @@ -0,0 +1,22 @@ +/* + * Author: Glowbal + * Module for adjusting the medical menu settings + * + * Arguments: + * 0: The module logic + * 1: units + * 2: activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; + +if !(_activated) exitWith {}; + +[_logic, QGVAR(allow), "allow"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical_menu/functions/fnc_onMenuOpen.sqf b/addons/medical_menu/functions/fnc_onMenuOpen.sqf new file mode 100644 index 0000000000..52a957ae93 --- /dev/null +++ b/addons/medical_menu/functions/fnc_onMenuOpen.sqf @@ -0,0 +1,77 @@ +/* + * Author: Glowbal + * Handle medical menu opened + * + * Arguments: + * 0: Medical Menu display + * + * Return Value: + * None + * + * Example: + * [medical_menu] call ace_medical_menu_onMenuOpen + * + * Public: No + */ +#include "script_component.hpp" + +private "_target"; + +params ["_display"]; + +if (isNil "_display") exitwith {}; + +if (isNil QGVAR(LatestDisplayOptionMenu)) then { + GVAR(LatestDisplayOptionMenu) = "triage"; +} else { + if (GVAR(LatestDisplayOptionMenu) == "toggle") then { + GVAR(LatestDisplayOptionMenu) = "triage"; + GVAR(INTERACTION_TARGET) = GVAR(INTERACTION_TARGET_PREVIOUS); + }; +}; + +_target = GVAR(INTERACTION_TARGET); +if (isNil QGVAR(INTERACTION_TARGET_PREVIOUS)) then { + GVAR(INTERACTION_TARGET_PREVIOUS) = _target; +}; +[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions); + +disableSerialization; + +[_target, _display] call FUNC(updateUIInfo); + +(_display displayCtrl 11) ctrlSetTooltip localize LSTRING(VIEW_TRIAGE_CARD); +(_display displayCtrl 12) ctrlSetTooltip localize LSTRING(EXAMINE_PATIENT); +(_display displayCtrl 13) ctrlSetTooltip localize LSTRING(BANDAGE_FRACTURES); +(_display displayCtrl 14) ctrlSetTooltip localize LSTRING(MEDICATION); +(_display displayCtrl 15) ctrlSetTooltip localize LSTRING(AIRWAY_MANAGEMENT); +(_display displayCtrl 16) ctrlSetTooltip localize LSTRING(ADVANCED_TREATMENT); +(_display displayCtrl 17) ctrlSetTooltip localize LSTRING(DRAG_CARRY); +(_display displayCtrl 18) ctrlSetTooltip localize LSTRING(TOGGLE_SELF); + +(_display displayCtrl 301) ctrlSetTooltip localize LSTRING(SELECT_HEAD); +(_display displayCtrl 302) ctrlSetTooltip localize LSTRING(SELECT_TORSO); +(_display displayCtrl 303) ctrlSetTooltip localize LSTRING(SELECT_ARM_R); +(_display displayCtrl 304) ctrlSetTooltip localize LSTRING(SELECT_ARM_L); +(_display displayCtrl 305) ctrlSetTooltip localize LSTRING(SELECT_LEG_R); +(_display displayCtrl 306) ctrlSetTooltip localize LSTRING(SELECT_LEG_L); +(_display displayCtrl 2001) ctrlSetTooltip localize LSTRING(SELECT_TRIAGE_STATUS); + +(_display displayCtrl 1) ctrlSetText format ["%1", [_target] call EFUNC(common,getName)]; +setMousePosition [0.4, 0.4]; + +[QGVAR(onMenuOpen), "onEachFrame", { + params ["_display"]; + if (isNull GVAR(INTERACTION_TARGET)) then { + GVAR(INTERACTION_TARGET) = ACE_player; + }; + [GVAR(INTERACTION_TARGET), _display] call FUNC(updateUIInfo); + [GVAR(INTERACTION_TARGET)] call FUNC(updateIcons); + [GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions); + + _status = [GVAR(INTERACTION_TARGET)] call FUNC(getTriageStatus); + (_display displayCtrl 2000) ctrlSetText (_status select 0); + (_display displayCtrl 2000) ctrlSetBackgroundColor (_status select 2); + }, [_display]] call BIS_fnc_addStackedEventHandler; + + ["Medical_onMenuOpen", [ACE_player, _interactionTarget]] call EFUNC(common,localEvent); diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf new file mode 100644 index 0000000000..3bc67f0028 --- /dev/null +++ b/addons/medical_menu/functions/fnc_openMenu.sqf @@ -0,0 +1,33 @@ +/* + * Author: Glowbal + * Open the medical menu for target + * + * Arguments: + * 0: Target + * + * Return Value: + * None + * + * Example: + * [some_player] call ace_medical_menu_openMenu + * + * Public: No + */ +#include "script_component.hpp" + +params ["_interactionTarget"]; + +if (dialog || isNull _interactionTarget) exitwith { + disableSerialization; + + private "_display"; + _display = uiNamespace getVariable QGVAR(medicalMenu); + if (!isNil "_display") then { + closeDialog 314412; + }; +}; + +GVAR(INTERACTION_TARGET) = _interactionTarget; + +createDialog QGVAR(medicalMenu); +GVAR(lastOpenedOn) = ACE_time; diff --git a/addons/medical_menu/functions/fnc_setTriageStatus.sqf b/addons/medical_menu/functions/fnc_setTriageStatus.sqf new file mode 100644 index 0000000000..7e7c764aee --- /dev/null +++ b/addons/medical_menu/functions/fnc_setTriageStatus.sqf @@ -0,0 +1,18 @@ +/* + * Author: Glowbal + * Set the triage status of object + * + * Arguments: + * 0: Target + * 1: Status + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +params ["_target", "_status"]; + +_target setvariable [QEGVAR(medical,triageLevel), _status, true]; diff --git a/addons/medical_menu/functions/fnc_updateActivityLog.sqf b/addons/medical_menu/functions/fnc_updateActivityLog.sqf new file mode 100644 index 0000000000..335aea0c58 --- /dev/null +++ b/addons/medical_menu/functions/fnc_updateActivityLog.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Update the activity log + * + * Arguments: + * 0: display + * 1: log collection + * + * Return Value: + * None + * + * Example: + * [some_display, log] call ace_medical_menu_updateActivityLog + * + * Public: No + */ +#include "script_component.hpp" + +private "_logCtrl"; + +params ["_display", "_logs"]; + +_logCtrl = _display displayCtrl 214; +lbClear _logCtrl; + +{ + _x params ["_message", "_moment", "_dummy", "_arguments"]; + + if (isLocalized _message) then { + _message = localize _message; + }; + + { + if (typeName _x == "STRING" && {isLocalized _x}) then { + _arguments set [_foreachIndex, localize _x]; + }; + } forEach _arguments; + + _message = format ([_message] + _arguments); + _logCtrl lbAdd format ["%1 %2", _moment, _message]; + nil +} count _logs; diff --git a/addons/medical_menu/functions/fnc_updateBodyImage.sqf b/addons/medical_menu/functions/fnc_updateBodyImage.sqf new file mode 100644 index 0000000000..34b2f450c8 --- /dev/null +++ b/addons/medical_menu/functions/fnc_updateBodyImage.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Update the body image on the menu + * + * Arguments: + * 0: selection bloodloss + * 1: display + * + * Return Value: + * None + * + * Example: + * [0.3, some_display] call ace_medical_menu_updateBodyImage + * + * Public: No + */ +#include "script_component.hpp" + +params ["_selectionBloodLoss", "_display"]; + +// Handle the body image coloring +_availableSelections = [50, 51, 52, 53, 54, 55]; +{ + private ["_red", "_green", "_blue"]; + + _red = 1; + _green = 1; + _blue = 1; + + if (_x > 0) then { + if (_damaged select _forEachIndex) then { + _green = (0.9 - _x) max 0; + _blue = _green; + } else { + _green = (0.9 - _x) max 0; + _red = _green; + //_blue = _green; + }; + }; + + (_display displayCtrl (_availableSelections select _forEachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0]; +} forEach _selectionBloodLoss; diff --git a/addons/medical_menu/functions/fnc_updateIcons.sqf b/addons/medical_menu/functions/fnc_updateIcons.sqf new file mode 100644 index 0000000000..f9d3fc5ab4 --- /dev/null +++ b/addons/medical_menu/functions/fnc_updateIcons.sqf @@ -0,0 +1,35 @@ +/* + * Author: Glowbal + * Update the category icons + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_menu_updateIcons + * + * Public: No + */ +#include "script_component.hpp" + +#define START_IDC 111 +#define END_IDC 118 + +private ["_display", "_idc", "_options", "_name", "_amount"]; + +disableSerialization; + +_display = uiNamespace getVariable QGVAR(medicalMenu); + +_options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"]; +for "_idc" from START_IDC to END_IDC step 1 do { + _amount = [ACE_player, GVAR(INTERACTION_TARGET), _options select (_idc - START_IDC)] call FUNC(getTreatmentOptions); + if ((count _amount) > 0 || _idc == START_IDC || _idc == END_IDC) then { + (_display displayCtrl _idc) ctrlSettextColor [1, 1, 1, 1]; + } else { + (_display displayCtrl _idc) ctrlSettextColor [0.4, 0.4, 0.4, 1]; + }; +}; diff --git a/addons/medical_menu/functions/fnc_updateInformationLists.sqf b/addons/medical_menu/functions/fnc_updateInformationLists.sqf new file mode 100644 index 0000000000..db7220065c --- /dev/null +++ b/addons/medical_menu/functions/fnc_updateInformationLists.sqf @@ -0,0 +1,36 @@ +/* + * Author: Glowbal + * Update the treatment information list + * + * Arguments: + * 0: display + * 1: message collection + * 2: injury collection + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +private "_lbCtrl"; + +params ["_display", "_genericMessages", "_allInjuryTexts"]; + +_lbCtrl = _display displayCtrl 213; +lbClear _lbCtrl; +{ + _lbCtrl lbAdd (_x select 0); + _lbCtrl lbSetColor [_forEachIndex, _x select 1]; +} forEach _genericMessages; + +_amountOfGeneric = count _genericMessages; +{ + _lbCtrl lbAdd (_x select 0); + _lbCtrl lbSetColor [_forEachIndex + _amountOfGeneric, _x select 1]; +} forEach _allInjuryTexts; + +if (count _allInjuryTexts == 0) then { + _lbCtrl lbAdd localize ELSTRING(medical,NoInjuriesBodypart); +}; diff --git a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf new file mode 100644 index 0000000000..8ca81f28ed --- /dev/null +++ b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Update the quick view log + * + * Arguments: + * 0: display + * 1: log collection + * + * Return Value: + * None + * + * Example: + * [some_display, log] call ace_medical_menu_updateQuickViewLog + * + * Public: No + */ +#include "script_component.hpp" + +private "_logCtrl"; + +params ["_display", "_logs"]; + +_logCtrl = _display displayCtrl 215; +lbClear _logCtrl; + +{ + _x params ["_message", "_moment", "_dummy", "_arguments"]; + + if (isLocalized _message) then { + _message = localize _message; + }; + + { + if (typeName _x == "STRING" && {isLocalized _x}) then { + _arguments set [_foreachIndex, localize _x]; + }; + } forEach _arguments; + + _message = format ([_message] + _arguments); + _logCtrl lbAdd format ["%1 %2", _moment, _message]; + nil +} count _logs; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf new file mode 100644 index 0000000000..7dee2d5123 --- /dev/null +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -0,0 +1,142 @@ +/* + * Author: Glowbal + * Update all UI information in the medical menu + * + * Arguments: + * 0: target + * 1: display + * + * Return Value: + * None + * + * Example: + * [some_player, some_display] call ace_medical_menu_updateUIInfo + * + * Public: No + */ +#include "script_component.hpp" + +private ["_genericMessages", "_totalIvVolume", "_damaged", "_selectionBloodLoss", "_allInjuryTexts"]; + +params ["_target", "_display"]; + +_selectionN = GVAR(selectedBodyPart); +if (_selectionN < 0 || _selectionN > 5) exitwith {}; + +_genericMessages = []; +_partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN; +_genericMessages pushBack [localize _partText, [1, 1, 1, 1]]; + +if (_target getVariable [QEGVAR(medical,isBleeding), false]) then { + _genericMessages pushBack [localize ELSTRING(medical,Status_Bleeding), [1, 0.1, 0.1, 1]]; +}; + +if (_target getVariable [QEGVAR(medical,hasLostBlood), 0] > 1) then { + _genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]]; +}; + +if (((_target getVariable [QEGVAR(medical,tourniquets), [0, 0, 0, 0, 0, 0]]) select _selectionN) > 0) then { + _genericMessages pushBack [localize ELSTRING(medical,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]]; +}; + +if (_target getVariable [QEGVAR(medical,hasPain), false]) then { + _genericMessages pushBack [localize ELSTRING(medical,Status_Pain), [1, 1, 1, 1]]; +}; + +_totalIvVolume = 0; +{ + private "_value"; + _value = _target getVariable _x; + if (!isNil "_value") then { + _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]); + }; +} count EGVAR(medical,IVBags); + +if (_totalIvVolume >= 1) then { + _genericMessages pushBack [format [localize ELSTRING(medical,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]]; +}; + +_damaged = [false, false, false, false, false, false]; +_selectionBloodLoss = [0, 0, 0, 0, 0, 0]; + +_allInjuryTexts = []; +if (EGVAR(medical,level) >= 2) then { + _openWounds = _target getVariable [QEGVAR(medical,openWounds), []]; + private "_amountOf"; + { + _amountOf = _x select 3; + // Find how much this bodypart is bleeding + if (_amountOf > 0) then { + _damaged set [_x select 2, true]; + _selectionBloodLoss set [_x select 2, (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))]; + + if (_selectionN == (_x select 2)) then { + // Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this] + if (_amountOf >= 1) then { + // TODO localization + _allInjuryTexts pushBack [format["%2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,1,1,1]]; + } else { + // TODO localization + _allInjuryTexts pushBack [format["Partial %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6], [1,1,1,1]]; + }; + }; + }; + } forEach _openWounds; + + _bandagedwounds = _target getVariable [QEGVAR(medical,bandagedWounds), []]; + { + _amountOf = _x select 3; + // Find how much this bodypart is bleeding + if !(_damaged select (_x select 2)) then { + _selectionBloodLoss set [_x select 2, (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))]; + }; + if (_selectionN == (_x select 2)) then { + // Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this] + if (_amountOf > 0) then { + if (_amountOf >= 1) then { + // TODO localization + _allInjuryTexts pushBack [format ["[B] %2x %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]]; + } else { + // TODO localization + _allInjuryTexts pushBack [format ["[B] Partial %1", (EGVAR(medical,AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]]; + }; + }; + }; + } forEach _bandagedwounds; +} else { + _damaged = [true, true, true, true, true, true]; + { + _selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x]; + + if (_target getHitPointDamage _x > 0 && _forEachIndex == _selectionN) then { + _pointDamage = _target getHitPointDamage _x; + _severity = switch (true) do { + case (_pointDamage > 0.5): {localize ELSTRING(medical,HeavilyWounded)}; + case (_pointDamage > 0.1): {localize ELSTRING(medical,LightlyWounded)}; + default {localize ELSTRING(medical,VeryLightlyWounded)}; + }; + _part = localize ([ + ELSTRING(medical,Head), + ELSTRING(medical,Torso), + ELSTRING(medical,LeftArm), + ELSTRING(medical,RightArm), + ELSTRING(medical,LeftLeg), + ELSTRING(medical,RightLeg) + ] select _forEachIndex); + _allInjuryTexts pushBack [format ["%1 %2", _severity, toLower _part], [1,1,1,1]]; + }; + } forEach ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; +}; + +[_selectionBloodLoss, _display] call FUNC(updateBodyImage); +[_display, _genericMessages, _allInjuryTexts] call FUNC(updateInformationLists); + +_logs = _target getVariable [QEGVAR(medical,logFile_activity_view), []]; +[_display, _logs] call FUNC(updateActivityLog); + +_logs = _target getVariable [QEGVAR(medical,logFile_quick_view), []]; +[_display, _logs] call FUNC(updateQuickViewLog); + +_triageStatus = [_target] call EFUNC(medical,getTriageStatus); +(_display displayCtrl 2000) ctrlSetText (_triageStatus select 0); +(_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2); diff --git a/addons/medical_menu/functions/script_component.hpp b/addons/medical_menu/functions/script_component.hpp new file mode 100644 index 0000000000..8c2e419166 --- /dev/null +++ b/addons/medical_menu/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\medical_menu\script_component.hpp" diff --git a/addons/medical_menu/script_component.hpp b/addons/medical_menu/script_component.hpp new file mode 100644 index 0000000000..3119d48e19 --- /dev/null +++ b/addons/medical_menu/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT medical_menu +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MEDICAL_MENU + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MEDICAL_MENU + #define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL_MENU +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml new file mode 100644 index 0000000000..f4cc40521a --- /dev/null +++ b/addons/medical_menu/stringtable.xml @@ -0,0 +1,396 @@ + + + + + Medical Menu + Menu medyczne + + + Allow Medical Menu + Akt. menu medyczne + + + Allow clients to use the medical menu + Zezwalaj graczom korzystać z menu medycznego + + + Use Medical menu + Użyj menu medycznego + + + If allowed by server, enable the option to use the Medical Menu through keybinding and interaction menu + Jeżeli zezwolone przez serwer, aktywuj menu medyczne poprzez skrót klawiszowy i menu interakcji. + + + Re-open Medical menu + Otwieraj ponownie menu medyczne + + + Re-open the medical menu after succesful treatment + Otwórz ponownie menu medyczne po udanym zakończeniu leczenia + + + Open Medical Menu + Otwórz menu medyczne + + + Medical Menu Settings + Ustawienia menu medycznego + + + Configure the usage of the Medical Menu + Skonfiguruj opcje menu medycznego + + + EXAMINE & TREATMENT + ОСМОТР И ЛЕЧЕНИЕ + EXAMINAR & TRATAMIENTO + EXAMINER & TRAITEMENTS + BADANIE & LECZENIE + + + STATUS + СОСТОЯНИЕ + ESTADO + ÉTATS + STATUS + + + OVERVIEW + ОБЩАЯ ИНФОРМАЦИЯ + DESCRIPCIÓN + DESCRIPTION + OPIS + + + ACTIVITY LOG + ПРОВЕДЕННЫЕ МАНИПУЛЯЦИИ + REGISTRO DE ACTIVIDAD + REGISTRE DES SOINS + LOGI AKTYWNOŚCI + + + QUICK VIEW + БЫСТРЫЙ ОСМОТР + VISTA RÁPIDA + VUE RAPIDE + SZYBKI PODGLĄD + + + None + Не ранен + Ninguno + Aucun + Brak + + + Minor + Несрочная помощь + Menor + Mineur + Normalny + + + Delayed + Срочная помощь + Diferido + Urgent + Opóźniony + + + Immediate + Неотложная помощь + Inmediato + Immédiat + Natychmiastowy + + + Deceased + Морг + Fallecido + Décédé + Nie żyje + + + View triage Card + Смотреть первичную карточку + Ver Triage + Voir Carte de Triage + Pokaż kartę segregacyjną + + + Examine Patient + Осмотреть пациента + Examinar Paciente + Examiner Patient + Zbadaj pacjenta + + + Bandage / Fractures + Раны / переломы + Vendajes/Fracturas + Bandages / Fractures + Bandaże / Złamania + + + Medication + Медикаменты + Medicación + Médications + Leki + + + Airway Management + Дыхательные пути + Vías Aéreas + Gestion Des Voie REspiratoire + Drogi oddechowe + + + Advanced Treatments + Специальная медпомощь + Tratamientos Avanzados + Traitement Avancé + Zaawansowane zabiegi + + + Drag/Carry + Тащить/нести + Arrastrar/Cargar + Glisser/Porter + Ciągnij/Nieś + + + Toggle (Self) + Лечить себя/другого раненого + Activer (sois) + Przełącz (na siebie) + Alternar + + + Select triage status + Сортировка + Seleccionar estado de Triage + Selectioner l'état de Triage + Wybierz priorytet + + + + Select Head + Выбрать голову + Seleccionar Cabeza + Selectioner Tête + Wybierz głowę + + + Select Torso + Выбрать торс + Seleccionar Torso + Selectioner Torse + Wybierz tors + + + Select Left Arm + Выбрать левую руку + Seleccionar Brazo Izquierdo + Selectioner Bras Gauche + Wybierz lewą rękę + + + Select Right Arm + Выбрать правую руку + Seleccionar Brazo Derecho + Selectioner Bras Droit + Wybierz prawą rękę + + + Select Left Leg + Выбрать левую ногу + Seleccionar Pierna Izquierda + Selectioner Jambe Gauche + Wybierz lewą nogę + + + Select Right Leg + Выбрать правую ногу + Seleccionar Pierna Derecha + Selectioner Jambe Droite + Wybierz prawą nogę + + + Head + Голова + Cabeza + Tête + Głowa + + + Torso + Торс + Torse + Tors + + + Left Arm + Левая рука + Brazo Izquierdo + Bras Gauche + Lewa ręka + + + Right Arm + Правая рука + Brazo Derecho + Bras Droit + Prawa ręka + + + Left Leg + Левая нога + Pierna Izquierda + Jambe Gauche + Lewa noga + + + Right Leg + Правая нога + Pierna Derecha + Jambe Droite + Prawa noga + + + Body Part: %1 + Часть тела: %1 + Parte del cuerpo: %1 + Partie du corps: %1 + Część ciała: %1 + + + Small + малого размера + Pequeña + Petite + małym + + + Medium + среднего размера + Mediana + moyenne + średnim + + + Large + большого размера + Grande + Grande + dużym + + + There are %2 %1 Open Wounds + %2 открытые раны %1 + Hay %2 Heridas Abiertas %1 + Il y a %2 %1 Blessure Ouverte + Widzisz otwarte rany w ilości %2 o %1 rozmiarze + + + There is 1 %1 Open Wound + Открытая рана %1 + Hay 1 Herida Abierta %1 + Il y a 1 blessure ouverte %1 + Widzisz 1 otwartą ranę o %1 rozmiarze + + + There is a partial %1 Open wound + Частично открытая рана %1 + Hay una herida parcial abierta %1 + Il y a une Blessure Patiellement Ouverte %1 + Widzisz częściowo otwartą ranę o %1 rozmiarze + + + There are %2 %1 Bandaged Wounds + %2 перевязанные раны %1 + Hay %2 Heridas %1 Vendadas + Il y a %2 %1 Blessure Bandée + Widzisz %2 zabandażowanych ran o %1 rozmiarze + + + There is 1 %1 Bandaged Wound + 1 перевязанная рана %1 + Hay 1 Herida Vendada %1 + Il y a 1 %1 Blessure Bandée + Widzisz 1 zabandażowaną ranę o %1 rozmiarze + + + There is a partial %1 Bandaged wound + Частично перевязанная рана %1 + Hay una Herida parcial %1 Vendada + Il y a %1 Blessure Partielment Bandée + Widzisz 1 częściowo zabandażowaną ranę o %1 rozmiarze + + + Normal breathing + Дыхание в норме + Respiración normal + Respiration Normale + Normalny oddech + + + No breathing + Дыхания нет + No respira + Apnée + Brak oddechu + + + Difficult breathing + Дыхание затруднено + Dificultad para respirar + Difficultée Respiratoire + Trudności z oddychaniem + + + Almost no breathing + Дыхания почти нет + Casi sin respirar + Respiration Faible + Prawie brak oddechu + + + Bleeding + Кровотечение + Sangrando + Seignement + Krwawienie zewnętrzne + + + in Pain + Испытывает боль + Con Dolor + A De La Douleur + W bólu + + + Lost a lot of Blood + Большая кровопотеря + Mucha Sangre perdida + A Perdu Bcp de Sang + Stracił dużo krwi + + + Tourniquet [CAT] + Жгут + Torniquete [CAT] + Garot [CAT] + Opaska uciskowa [CAT] + + + Nasopharyngeal Tube [NPA] + Назотрахеальная трубка + Torniquete [CAT] + Canule Naseaupharyngée [NPA] + Rurka nosowo-gardłowa [NPA] + Nasopharyngeal Tube [NPA] + + + diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp new file mode 100644 index 0000000000..c0c32cac8b --- /dev/null +++ b/addons/medical_menu/ui/menu.hpp @@ -0,0 +1,570 @@ +#include "\z\ace\addons\common\define.hpp" + +class GVAR(medicalMenu) { + idd = 314412; + movingEnable = true; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(medicalMenu)), _this select 0)]; [ARR_2(QUOTE(QGVAR(id)), true)] call EFUNC(common,blurScreen); [_this select 0] call FUNC(onMenuOpen);); + onUnload = QUOTE([ARR_2(QUOTE(QGVAR(id)), false)] call EFUNC(common,blurScreen); [ARR_2(QUOTE(QGVAR(onMenuOpen)), 'onEachFrame')] call BIS_fnc_removeStackedEventHandler;); + class controlsBackground { + class HeaderBackground: ACE_gui_backgroundBase{ + idc = -1; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(0,0,0,0)"; + }; + class CenterBackground: HeaderBackground { + y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + h = "16 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(0,0,0,0.8)"; + colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + }; + class BottomBackground: CenterBackground { + y = "(18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))"; + h = "9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; + }; + + class controls { + class HeaderName { + idc = 1; + type = CT_STATIC; + x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_LEFT + ST_SHADOW; + font = "PuristaMedium"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.95, 0.95, 0.95, 0.75}; + colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"}; + text = ""; + }; + + class IconsBackGroundBar: ACE_gui_backgroundBase{ + idc = -1; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "3.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = QUOTE(PATHTOF(data\background_img.paa)); + colorText[] = {1, 1, 1, 0.0}; + }; + class CatagoryLeft: HeaderName { + x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_CENTER; + colorText[] = {1, 1, 1.0, 0.9}; + colorBackground[] = {0,0,0,0}; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + text = $STR_ACE_Medical_Menu_EXAMINE_TREATMENT; + }; + class CatagoryCenter: CatagoryLeft { + x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = $STR_ACE_Medical_Menu_STATUS; + }; + class CatagoryRight: CatagoryCenter{ + x = "25.66 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = $STR_ACE_Medical_Menu_OVERVIEW; + }; + class Line: ACE_gui_backgroundBase { + idc = -1; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "37 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "0.03 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(1,1,1,0.5)"; + }; + + class iconImg1: ACE_gui_backgroundBase { + idc = 111; + x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.1)"; + colorBackground[] = {0,0,0,1}; + colorPicture[] = {1,1,1,1}; + colorText[] = {1,1,1,1}; + text = QUOTE(PATHTOF(data\icons\triage_card_small.paa)); + }; + class iconImg2: iconImg1 { + idc = 112; + x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\examine_patient_small.paa)); + }; + class iconImg3: iconImg1 { + idc = 113; + x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\bandage_fracture_small.paa)); + }; + class iconImg4: iconImg1 { + idc = 114; + x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\medication_small.paa)); + }; + class iconImg5: iconImg1 { + idc = 115; + x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\airway_management_small.paa)); + }; + class iconImg6: iconImg1 { + idc = 116; + x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\advanced_treatment_small.paa)); + }; + class iconImg7: iconImg1 { + idc = 117; + x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\icon_carry.paa)); + }; + class iconImg8: iconImg1 { + idc = 118; + x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(data\icons\toggle_self_small.paa)); + }; + + + class BtnIconLeft1: ACE_gui_buttonBase { + idc = 11; + x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)"; + action = QUOTE(['triage'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft2: BtnIconLeft1 { + idc = 12; + x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['examine'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft3: BtnIconLeft1 { + idc = 13; + x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['bandage'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft4: BtnIconLeft1 { + idc = 14; + x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['medication'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft5: BtnIconLeft1 { + idc = 15; + x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['airway'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft6: BtnIconLeft1 { + idc = 16; + x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['advanced'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft7: BtnIconLeft1 { + idc = 17; + x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['drag'] call FUNC(handleUI_DisplayOptions);); + }; + class BtnIconLeft8: BtnIconLeft1 { + idc = 18; + x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(['toggle'] call FUNC(handleUI_DisplayOptions);); + }; + + class TriageCardList: ACE_gui_listBoxBase { + idc = 212; + x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + rowHeight = 0.03; + colorBackground[] = {0, 0, 0, 0.2}; + colorText[] = {1,1, 1, 1.0}; + colorScrollbar[] = {0.95, 0.95, 0.95, 1}; + colorSelect[] = {0.95, 0.95, 0.95, 1}; + colorSelect2[] = {0.95, 0.95, 0.95, 1}; + colorSelectBackground[] = {0, 0, 0, 0.0}; + colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0}; + }; + + // Left side + class BtnMenu1: BtnIconLeft1 { + idc = 20; + y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = ""; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)"; + animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; + color[] = {1, 1, 1, 1}; + color2[] = {0,0,0, 1}; + colorBackgroundFocused[] = {1,1,1,1}; + colorBackground[] = {1,1,1,1}; + colorbackground2[] = {1,1,1,1}; + colorDisabled[] = {0.5,0.5,0.5,0.8}; + colorFocused[] = {0,0,0,1}; + periodFocus = 1; + periodOver = 1; + action = ""; + }; + class BtnMenu2: BtnMenu1 { + idc = 21; + y = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text = ""; + }; + class BtnMenu3: BtnMenu1 { + idc = 22; + y = "7.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text = ""; + }; + class BtnMenu4: BtnMenu1 { + idc = 23; + y = "8.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text =""; + }; + class BtnMenu5: BtnMenu1 { + idc = 24; + y = "9.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text = ""; + }; + class BtnMenu6: BtnMenu1 { + idc = 25; + y = "10.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text = ""; + }; + class BtnMenu7: BtnMenu1 { + idc = 26; + y = "12 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text = ""; + }; + class BtnMenu8: BtnMenu1 { + idc = 27; + y = "13.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + text = ""; + }; + // center + + class bodyImgBackground: ACE_gui_backgroundBase { + idc = -1; + x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "12.33 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + colorBackground[] = {1,1,1,1}; + colorPicture[] = {1,1,1,1}; + colorText[] = {1,1,1,1}; + text = QUOTE(PATHTOEF(medical,ui\body_background.paa)); + }; + class bodyImgHead: bodyImgBackground { + idc = 50; + x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "12.33 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + colorBackground[] = {1,1,1,1}; + colorPicture[] = {1,1,1,0.75}; + colorText[] = {1,1,1,0.75}; + text = QUOTE(PATHTOEF(medical,ui\body_head.paa)); + }; + + class bodyImgTorso: bodyImgHead { + idc = 51; + text = QUOTE(PATHTOEF(medical,ui\body_torso.paa)); + }; + class bodyImgArms_l: bodyImgHead { + idc = 52; + text = QUOTE(PATHTOEF(medical,ui\body_arm_left.paa)); + }; + class bodyImgArms_r: bodyImgHead { + idc = 53; + text = QUOTE(PATHTOEF(medical,ui\body_arm_right.paa)); + }; + class bodyImgLegs_l: bodyImgHead { + idc = 54; + text = QUOTE(PATHTOEF(medical,ui\body_leg_left.paa)); + }; + class bodyImgLegs_r: bodyImgHead { + idc = 55; + text = QUOTE(PATHTOEF(medical,ui\body_leg_right.paa)); + }; + + + class selectHead: ACE_gui_buttonBase { + idc = 301; + x = "18.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "1.4 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)"; + action = QUOTE(GVAR(selectedBodyPart) = 0; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + }; + class selectTorso : selectHead { + idc = 302; + x = "18.4 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "2.2 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "4.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + action = QUOTE(GVAR(selectedBodyPart) = 1; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + }; + class selectLeftArm: selectHead{ + idc = 303; + x = "17.4 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "5.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "4.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + action = QUOTE(GVAR(selectedBodyPart) = 3; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + }; + class selectRightArm: selectLeftArm{ + idc = 304; + x = "20.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(GVAR(selectedBodyPart) = 2; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + }; + class selectLeftLeg :selectHead { + idc = 305; + x = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "9.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + action = QUOTE(GVAR(selectedBodyPart) = 5; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + }; + class selectRightLeg :selectLeftLeg { + idc = 306; + x = "19.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(GVAR(selectedBodyPart) = 4; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);); + }; + + + class TriageTextBottom: HeaderName { + idc = 2000; + x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "16.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_CENTER; + colorText[] = {1, 1, 1.0, 1}; + colorBackground[] = {0,0.0,0.0,0.7}; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = ""; + }; + + // Right side + class InjuryList: ACE_gui_listBoxBase { + idc = 213; + x = "25.66 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "5.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + rowHeight = 0.03; + colorBackground[] = {0, 0, 0, 0.2}; + colorText[] = {1,1, 1, 1.0}; + colorScrollbar[] = {0.95, 0.95, 0.95, 1}; + colorSelect[] = {0.95, 0.95, 0.95, 1}; + colorSelect2[] = {0.95, 0.95, 0.95, 1}; + colorSelectBackground[] = {0, 0, 0, 0.0}; + colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5}; + }; + // bottom + + class ActivityLogHeader: CatagoryLeft { + x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_CENTER; + colorText[] = {0.6, 0.7, 1.0, 1}; + colorBackground[] = {0,0,0,0}; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = $STR_ACE_Medical_Menu_ACTIVITY_LOG; + }; + class QuickViewHeader: ActivityLogHeader { + x = "19.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = $STR_ACE_Medical_Menu_QUICK_VIEW; + }; + class LineBottomHeaders: Line { + y = "19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + }; + class ActivityLog: InjuryList { + idc = 214; + //style = 16; + //type = 102; + //rows=1; + colorBackground[] = {0, 0, 0, 0}; + x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "(19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))"; + w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + //colorSelectBackground[] = {0, 0, 0, 0.0}; + //colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0}; + //columns[] = {0.0, 0.08}; + //canDrag=true; + //arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; + // arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; + drawSideArrows = 0; + //idcLeft = -1; + //idcRight = -1; + }; + + class QuikViewLog: InjuryList { + idc = 215; + //style = 16; + //type = 102; + //rows=1; + colorBackground[] = {0, 0, 0, 0}; + x = "21.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "(19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))"; + w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + colorSelectBackground[] = {0, 0, 0, 0.0}; + colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0}; + + //columns[] = {0.0, 0.08}; + //canDrag=true; + //arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; + // arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; + drawSideArrows = 0; + //idcLeft = -1; + //idcRight = -1; + }; + + class selectTriageStatus: ACE_gui_buttonBase { + idc = 2001; + x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "16.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_CENTER; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)"; + action = QUOTE([] call FUNC(handleUI_dropDownTriageCard);); + }; + class selectTriageStatusNone: selectTriageStatus { + idc = 2002; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_Medical_Menu_TRIAGE_NONE; + style = ST_CENTER; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; + action = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),0)] call FUNC(setTriageStatus);); + }; + + class selectTriageStatusMinor: selectTriageStatus { + idc = 2003; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_Medical_Menu_TRIAGE_MINOR; + style = ST_CENTER; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + action = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),1)] call FUNC(setTriageStatus);); + }; + class selectTriageStatusDelayed: selectTriageStatus { + idc = 2004; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_Medical_Menu_TRIAGE_DELAYED; + style = ST_CENTER; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + action = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),2)] call FUNC(setTriageStatus);); + }; + class selectTriageStatusImmediate: selectTriageStatus { + idc = 2005; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_Medical_Menu_TRIAGE_IMMEDIATE; + style = ST_CENTER; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureOver = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + action = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),3)] call FUNC(setTriageStatus);); + }; + class selectTriageStatusDeceased: selectTriageStatus { + idc = 2006; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_Medical_Menu_TRIAGE_DECEASED; + style = ST_CENTER; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; + action = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),4)] call FUNC(setTriageStatus);); + }; + }; +}; \ No newline at end of file diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index 2d33969b56..c918bcf454 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -39,25 +39,4 @@ GVAR(newWaypointPosition) = []; GVAR(currentWaypoint) = -1; GVAR(rangeFinderPositionASL) = []; - -GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset"); - -private ["_worldMapLong", "_worldMapLat", "_zone", "_band", "_squareID"]; - -//Calculate the map's MGRS: -_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude"); -_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude"); -//Pull UTM grid from world's long/lat -_zone = 1 + (floor ((_worldMapLong + 180) / 6)); -_band = "Z"; -if (_worldMapLat <= -80) then { - _band = "A"; -} else { - if (_worldMapLat < 84) then { - _band = "CDEFGHJKLMNPQRSTUVWXX" select [(floor ((_worldMapLat / 8) + 10)), 1]; - }; -}; -//calculating square ID from long/lat is a pain in the ass, just fake it unless someone wants to actualy do this -_squareID = if ((count worldName) > 2) then {toUpper(worldName select [0,2])} else {"XG"}; -GVAR(mgrsGridZoneDesignator) = format ["%1%2 %3", _zone, _band, _squareID]; - +GVAR(mgrsGridZoneDesignator) = format ["%1 %2",EGVAR(common,MGRS_data) select 0, EGVAR(common,MGRS_data) select 1]; diff --git a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf index 066b44508d..0822bdf310 100644 --- a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf +++ b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_display", "_editText", "_gridPosTuple", "_actualPos"]; +private ["_display", "_editText", "_actualPos"]; PARAMS_1(_keypadButton); disableSerialization; @@ -34,8 +34,7 @@ _editText = ctrlText (_display displayCtrl IDC_MODEMARK_CORDSEDIT); switch (_keypadButton) do { case ("ok"): { if ((count GVAR(newWaypointPosition)) == 0) then { - _gridPosTuple = [_editText] call BIS_fnc_gridToPos; - _actualPos = [(((_gridPosTuple select 0) select 0) + 0.5 * ((_gridPosTuple select 1) select 0)), (((_gridPosTuple select 0) select 1) + 0.5 * ((_gridPosTuple select 1) select 1))]; + _actualPos = [_editText, true] call EFUNC(common,getMapPosFromGrid); _actualPos set [2, (getTerrainHeightASL _actualPos)]; GVAR(newWaypointPosition) = _actualPos; [APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode); diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 7e2a1ad53e..910f422c75 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString", "_daylight"]; +private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPos", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString"]; disableSerialization; _display = displayNull; @@ -37,18 +37,14 @@ _waypoints = [] call FUNC(deviceGetWaypoints); switch (GVAR(currentApplicationPage)) do { case (APP_MODE_INFODISPLAY): { //Easting/Northing: - _posString = mapGridPosition ACE_player; - _eastingText = ""; - _northingText = ""; - if (count _posString > 0) then { - _eastingText = (_posString select [0, ((count _posString)/2)]) + "e"; - _northingText = (_posString select [(count _posString)/2, (count _posString - 1)]) + "n"; - }; + _posString = [getPos ACE_player] call EFUNC(common,getMapGridFromPos); + _eastingText = (_posString select 0) + "e"; + _northingText = (_posString select 1) + "n"; (_display displayCtrl IDC_MODEDISPLAY_EASTING) ctrlSetText _eastingText; (_display displayCtrl IDC_MODEDISPLAY_NORTHING) ctrlSetText _northingText; //Elevation: - _numASL = ((getPosASL ace_player) select 2) + GVAR(mapAltitude); + _numASL = ((getPosASL ace_player) select 2) + EGVAR(common,mapAltitude); _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; (_display displayCtrl IDC_MODEDISPLAY_ELEVATIONNUM) ctrlSetText _aboveSeaLevelText; @@ -82,7 +78,8 @@ case (APP_MODE_INFODISPLAY): { if (GVAR(currentWaypoint) == -2) then { if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { - _targetPosName = format ["[%1]", (mapGridPosition GVAR(rangeFinderPositionASL))]; + _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); + _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); }; } else { @@ -100,7 +97,7 @@ case (APP_MODE_INFODISPLAY): { }; _2dDistanceKm = (((getPosASL ace_player) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000; _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; - _numASL = (_targetPosLocationASL select 2) + GVAR(mapAltitude); + _numASL = (_targetPosLocationASL select 2) + EGVAR(common,mapAltitude); _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; }; @@ -136,7 +133,8 @@ case (APP_MODE_COMPASS): { if (GVAR(currentWaypoint) == -2) then { if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { - _targetPosName = format ["[%1]", (mapGridPosition GVAR(rangeFinderPositionASL))]; + _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); + _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); }; } else { diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index 4a933fc993..a636ffa4de 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -306,12 +306,16 @@ Wypełnienie mapy MicroDAGR Relleno del mapa MicroDAGR MicroDAGR - Vyplnění mapy + MicroDAGR-Kartenfüllung + Preenchimento de mapa do MicroDAGR MicroDAGR Map Fill Wypełnienie mapy MicroDAGR Relleno del mapa MicroDAGR MicroDAGR - Vyplnění mapy + MicroDAGR-Kartenfüllung + Preenchimento de mapa do MicroDAGR How much map data is filled on MicroDAGR's @@ -319,6 +323,7 @@ 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? + Quanta informação é preenchida no mapa do MicroDAGR Full Satellite + Buildings @@ -326,6 +331,7 @@ Satelite completo + Edificios Satellitenbild + Gebäude Satelit + Budovy + Satélite completo + Edifícios Topographical + Roads @@ -333,6 +339,7 @@ Topografico + Carreteras Topografisch + Straßen Topografické + Cesty + Topográfico + Estradas None (Cannot use map view) @@ -340,6 +347,7 @@ Nada (No se puede el mapa) Keine (kann keine Kartenansicht verwenden) Žádný (Nelze použít zobrazení mapy) + Nada (Não pode usar a tela de mapa) 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 @@ -347,6 +355,7 @@ 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 + Controla quantos dados são preenchidos nos itens microDAGR. Menos dados restringe a visualização de mapa para mostrar menos informações no minimapa<br/>Fonte: MicroDAGR.pbo - \ No newline at end of file + diff --git a/addons/missileguidance/functions/fnc_handleHandoff.sqf b/addons/missileguidance/functions/fnc_handleHandoff.sqf index 017a9c0160..7145bc0038 100644 --- a/addons/missileguidance/functions/fnc_handleHandoff.sqf +++ b/addons/missileguidance/functions/fnc_handleHandoff.sqf @@ -3,4 +3,4 @@ PARAMS_2(_target,_args); if(isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false }; -[FUNC(guidancePFH), 0, _args] call cba_fnc_addPerFrameHandler; \ No newline at end of file +[FUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index f044d8242c..7fc77fdd56 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -1,20 +1,21 @@ //#define DEBUG_MODE_FULL #include "script_component.hpp" +PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); + // Bail if guidance is disabled // Bail on locality of the projectile, it should be local to us if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false }; +//Bail if shooter isn't player AND system not enabled for AI: if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false }; -private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"]; -private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; - -PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); - // Bail on not missile if(! (_ammo isKindOf "MissileBase") ) exitWith { false }; +private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"]; +private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; + //Verify ammo has explicity added guidance config (ignore inheritances) _configs = configProperties [(configFile >> "CfgAmmo" >> _ammo), QUOTE(configName _x == QUOTE(QUOTE(ADDON))), false]; if( (count _configs) < 1) exitWith {}; @@ -100,12 +101,12 @@ _args = [_this, // _guidingUnit = ACE_player; // // if(local _guidingUnit) then { -// [FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler; +// [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; // } else { // [QGVAR(handoff), [_guidingUnit, _args] ] call FUNC(doHandoff); // }; //} else { - [FUNC(guidancePFH), 0, _args ] call cba_fnc_addPerFrameHandler; + [FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; //}; diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 4c18c2f4c7..2845767f15 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -103,6 +103,7 @@ Desactivado Aus Vypnout + Desligado Player Only @@ -110,6 +111,7 @@ Solo jugador Nur Spieler Pouze hráči + Somente jogador Player and AI @@ -117,6 +119,7 @@ Jugador e IA Spieler und KI Hráči a AI + Jogador e IA \ No newline at end of file diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 9b4c46ec10..70ef644384 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -117,7 +117,7 @@ if (_activated && local _logic) then { }; }; }; - }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call cba_fnc_addPerFrameHandler; + }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call CBA_fnc_addPerFrameHandler; }; true; diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index 2cdd0ba8a6..b99285850d 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -7,6 +7,7 @@ Módulo de misiones ACE ACE-Missionsmodule ACE Moduly mise + Módulo de missões ACE Ambiance Sounds [ACE] @@ -14,6 +15,7 @@ [ACE] Sonidos ambiente Umgebungsgeräusche [ACE] Zvuky prostředí [ACE] + [ACE] Sons ambientes Sounds @@ -21,6 +23,7 @@ Sonidos Sounds Zvuky + Sons Class names of the ambiance sounds to be played. Seperated by ',' @@ -28,6 +31,7 @@ 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é ',' + Nomes de classe dos sons de ambiente para serem reproduzidos. Separados por "," Minimal Distance @@ -35,6 +39,7 @@ Distancia mínima Mindestabstand Minimální vzdálenost + Distância mínima Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) @@ -42,6 +47,7 @@ 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. + Usada para calcular uma posição aleatória e definir a distância mínima entre os jogadores e os arquivos de sons que estão sendo reproduzidos. Maximum Distance @@ -49,6 +55,7 @@ Distancia máxima Maximalabstand Maximální vzdálenost + Distância máxima Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) @@ -56,6 +63,7 @@ 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. + Usado para calcular uma posição aleatória e definir uma distância máxima entre os jogadores e os arquivos de sons que estão sendo reproduzidos. Minimal Delay @@ -63,6 +71,7 @@ Retraso mínimo Minimale Verzögerung Minimální prodleva + Atraso mínimo Minimal delay between sounds played @@ -70,6 +79,7 @@ Retraso mínimo entre los sonidos reproducidos Minimale Verzögerung zwischen abzuspielenden Sounds Minimální prodleva mezi přehrávanými zvuky + Atraso mínimo entre os sons reproduzidos Maximum Delay @@ -77,6 +87,7 @@ Retraso máximo Maximale Verzögerung Maximální prodleva + Atraso máximo Maximum delay between sounds played @@ -84,6 +95,7 @@ Retraso máximo entre los sonidos reproducidos Maximale Verzögerung zwischen abzuspielenden Sounds Maximální prodleva mezi přehrávanými zvuky + Atraso máximo entre os sons reproduzidos Follow Players @@ -91,6 +103,7 @@ Seguir jugadores Spielern folgen Následovat hráče + Seguir jogadores Follow players. If set to false, loop will play sounds only nearby logic position. @@ -98,6 +111,7 @@ 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. + Segue os jogadores. Se esta desabilitado (falso), o loop reproduzirá os sons somente perto de sua posição lógica. Volume @@ -105,6 +119,7 @@ Volumen Lautstärke Hlasitost + Volume The volume of the sounds played @@ -112,6 +127,7 @@ Volumen de los sonidos reproducidos Lautstärke der abzuspielenden Sounds Hlasitost přehrávaného zvuku + O volume em que os sons serão reproduzidos Ambiance sounds loop (synced across MP) @@ -119,6 +135,7 @@ Bucle de sonidos ambiente (sincronizados en MP) Umgebungsgeräusch-Schleife (im MP synchronisiert) Smyčka okkolního zvuku (synchronizováno v MP) + Loop de sons ambientes (sincronizados através do MP) \ No newline at end of file diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index 2738a649a9..b351e440b4 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -23,14 +23,15 @@ class CfgVehicles { }; class StaticMortar: StaticWeapon { class Turrets: Turrets { - class MainTurret: MainTurret { - }; + class MainTurret: MainTurret {}; }; }; class Mortar_01_base_F: StaticMortar { class Turrets: Turrets { class MainTurret: MainTurret { turretInfoType = "ACE_Mk6_RscWeaponRangeArtillery"; + discreteDistance[] = {}; + discreteDistanceInitIndex = 0; }; }; class ACE_SelfActions { @@ -58,7 +59,7 @@ class CfgVehicles { displayName = CSTRING(airResistanceEnabled_DisplayName); description = CSTRING(airResistanceEnabled_Description); typeName = "BOOL"; - defaultValue = 1; + defaultValue = 0; }; class allowComputerRangefinder { displayName = CSTRING(allowComputerRangefinder_DisplayName); diff --git a/addons/mk6mortar/RscInGameUI.hpp b/addons/mk6mortar/RscInGameUI.hpp index 102362216a..740334886c 100644 --- a/addons/mk6mortar/RscInGameUI.hpp +++ b/addons/mk6mortar/RscInGameUI.hpp @@ -3,8 +3,17 @@ class RscInGameUI { class CA_IGUI_elements_group: RscControlsGroup {}; }; class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery',(_this select 0))]; _this call FUNC(turretDisplayLoaded);); - controls[] = {"ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"}; + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call EFUNC(common,localEvent);); + controls[] = {"ACE_ChargeDisplay", "ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"}; + class ACE_ChargeDisplay: RscStructuredText { + idc = 80085; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0, 0, 0, 0.1}; + x = "(profilenamespace getvariable ['IGUI_GRID_WEAPON_X', ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))])"; + y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ['IGUI_GRID_WEAPON_Y', (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])"; + w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; class ACE_MILS_GROUP: CA_IGUI_elements_group { idc = 80170; class controls { diff --git a/addons/mk6mortar/XEH_clientInit.sqf b/addons/mk6mortar/XEH_clientInit.sqf index 973772c96a..cde5277260 100644 --- a/addons/mk6mortar/XEH_clientInit.sqf +++ b/addons/mk6mortar/XEH_clientInit.sqf @@ -3,3 +3,4 @@ if (!hasInterface) exitWith {}; ["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler); +["infoDisplayChanged", {_this call FUNC(turretDisplayLoaded);}] call EFUNC(common,addEventHandler); diff --git a/addons/mk6mortar/config.cpp b/addons/mk6mortar/config.cpp index bbd7a2f892..8a54d15a5b 100644 --- a/addons/mk6mortar/config.cpp +++ b/addons/mk6mortar/config.cpp @@ -12,10 +12,13 @@ class CfgPatches { }; }; +#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" + +//UI Stuff: class RscText; class RscListbox; class RscListNBox; @@ -23,7 +26,7 @@ class RscPicture; class RscControlsGroup; class ScrollBar; class RscActiveText; +class RscStructuredText; #include "RscInGameUI.hpp" #include "RscRangeTable.hpp" -#include "ACE_Settings.hpp" diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 3f739aee2f..6c2875d75e 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -21,13 +21,12 @@ */ #include "script_component.hpp" -private ["_shooterMan", "_bisAirFriction", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"]; - -disableSerialization; +if (!GVAR(airResistanceEnabled)) exitWith {}; PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile); -if (!GVAR(airResistanceEnabled)) exitWith {}; +private ["_shooterMan", "_temperature", "_newMuzzleVelocityCoefficent", "_bulletVelocity", "_bulletSpeed"]; + // Large enough distance to not simulate any wind deflection if (_vehicle distance ACE_player > 8000) exitWith {false}; @@ -35,11 +34,6 @@ if (_vehicle distance ACE_player > 8000) exitWith {false}; _shooterMan = gunner _vehicle; if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {false}; -//Should be zero, just make sure: -_bisAirFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); -if (_bisAirFriction != 0) exitWith {ERROR("Non zero base airFriction");}; - - //Calculate air density: _altitude = (getPosASL _vehicle) select 2; _temperature = _altitude call EFUNC(weather,calculateTemperatureAtHeight); diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf index e74cb315f7..4b0e9e634c 100644 --- a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf +++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf @@ -16,33 +16,29 @@ */ #include "script_component.hpp" -private ["_chargeText", "_xPos", "_yPos", "_wPos", "_hPos", "_tubeWeaponName", "_fireModes"]; - PARAMS_2(_player,_newVehicle); +private["_tubeWeaponName" ,"_fireModes", "_lastFireMode"]; + if (isNull _newVehicle) exitWith {}; if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {}; -_chargeText = (findDisplay 46) ctrlCreate ["RscStructuredText", 80085]; - -_xPos = (profilenamespace getvariable ["IGUI_GRID_WEAPON_X", ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))]); -_yPos = 2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable ["IGUI_GRID_WEAPON_Y", (safezoneY + 0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]); -_wPos = 10 * (((safezoneW / safezoneH) min 1.2) / 40); -_hPos = 1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25); - -_chargeText ctrlSetPosition [_xPos, _yPos, _wPos, _hPos]; -_chargeText ctrlCommit 0; - _tubeWeaponName = (weapons _newVehicle) select 0; _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes"); +//Restore last firemode: +_lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1]; +if (_lastFireMode != -1) then { + _player action ["SwitchWeapon", _newVehicle, _player, _lastFireMode]; +}; + [{ + private["_chargeText", "_currentChargeMode", "_currentFireMode", "_display", "_elevDeg", "_elevationDiff", "_lookVector", "_notGunnerView", "_realAzimuth", "_realElevation", "_upVectorDir", "_useMils", "_weaponDir"]; PARAMS_2(_args,_pfID); - EXPLODE_3_PVT(_args,_mortarVeh,_chargeText,_fireModes); + EXPLODE_2_PVT(_args,_mortarVeh,_fireModes); if ((vehicle ACE_player) != _mortarVeh) then { [_pfID] call CBA_fnc_removePerFrameHandler; - ctrlDelete _chargeText; } else { _useMils = _mortarVeh getVariable [QGVAR(useMils), true]; @@ -51,8 +47,9 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes") _currentFireMode = (weaponState [_mortarVeh, [0]]) select 2; _currentChargeMode = _fireModes find _currentFireMode; - _text = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))]; - _chargeText ctrlSetStructuredText parseText _text; + //Save firemode on vehicle: + _mortarVeh setVariable [QGVAR(lastFireMode), _currentChargeMode]; + if (shownArtilleryComputer && {!GVAR(allowComputerRangefinder)}) then { //Don't like this solution, but it works closeDialog 0; @@ -62,18 +59,51 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes") _display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull]; if (isNull _display) exitWith {}; //It may be null for the first frame + _chargeText = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))]; + //Hud should hidden in 3rd person _notGunnerView = cameraView != "GUNNER"; - //Update CurrentElevation Display: + //Calc real azimuth/elevation + //(looking at the sky VS looking at ground will radicaly change fire direction because BIS) + _realAzimuth = -1; + _realElevation = -1; + if ((ctrlText (_display displayCtrl 173)) == "--") then { + //No range (looking at sky), it will follow weaponDir: + _weaponDir = _mortarVeh weaponDirection (currentWeapon _mortarVeh); + _realAzimuth = (_weaponDir select 0) atan2 (_weaponDir select 1); + _realElevation = asin (_weaponDir select 2); + } else { + //Valid range, will fire at camera dir + _lookVector = ((positionCameraToWorld [0,0,0]) call EFUNC(common,positionToASL)) vectorFromTo ((positionCameraToWorld [0,0,10]) call EFUNC(common,positionToASL)); + _realAzimuth = ((_lookVector select 0) atan2 (_lookVector select 1)); + _upVectorDir = (((vectorUp _mortarVeh) select 0) atan2 ((vectorUp _mortarVeh) select 1)); + _elevationDiff = (cos (_realAzimuth - _upVectorDir)) * acos ((vectorUp _mortarVeh) select 2); + _realElevation = ((180 / PI) * (_mortarVeh animationPhase "mainGun")) + 75 - _elevationDiff; + }; + + //Update Heading Display: + if (_notGunnerView || (!GVAR(allowCompass))) then { + (_display displayCtrl 80156) ctrlSetText ""; + } else { + if (_useMils) then { + (_display displayCtrl 80156) ctrlSetText str (((round (_realAzimuth * 6400 / 360)) + 6400) % 6400); + } else { + (_display displayCtrl 80156) ctrlSetText str ((round (_realAzimuth + 360)) % 360); + }; + }; + + //Update CurrentElevation Display and "charge" text if (_notGunnerView) then { + (_display displayCtrl 80085) ctrlSetStructuredText parseText ""; (_display displayCtrl 80175) ctrlSetText ""; } else { - _elevDeg = parseNumber ctrlText (_display displayCtrl 175); + (_display displayCtrl 80085) ctrlSetStructuredText parseText _chargeText; + if (_useMils) then { - (_display displayCtrl 80175) ctrlSetText str round (_elevDeg * 6400 / 360); + (_display displayCtrl 80175) ctrlSetText str ((round (_realElevation * 6400 / 360)) % 6400); } else { - (_display displayCtrl 80175) ctrlSetText str _elevDeg; + (_display displayCtrl 80175) ctrlSetText str (((round (_realElevation * 100)) / 100) % 360); }; }; @@ -85,24 +115,13 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes") if (_elevDeg <= 0) then { //Bad data means "----" out of range (_display displayCtrl 80176) ctrlSetText (ctrlText (_display displayCtrl 176)); } else { + _elevDeg = _elevDeg + (_realElevation - (parseNumber ctrlText (_display displayCtrl 175))); if (_useMils) then { - (_display displayCtrl 80176) ctrlSetText str round (_elevDeg * 6400 / 360); + (_display displayCtrl 80176) ctrlSetText str round ((round (_elevDeg * 6400 / 360)) % 6400); } else { - (_display displayCtrl 80176) ctrlSetText str _elevDeg; + (_display displayCtrl 80176) ctrlSetText str (((round (_elevDeg * 100)) / 100) % 360); }; }; }; - - //Update Heading Display: - if (_notGunnerView || (!GVAR(allowCompass))) then { - (_display displayCtrl 80156) ctrlSetText ""; - } else { - _rotationDegrees = ((getDir _mortarVeh) + (((-180 / PI) * (_mortarVeh animationPhase "mainTurret")) + 360)) % 360; - if (_useMils) then { - (_display displayCtrl 80156) ctrlSetText str round (_rotationDegrees * 6400 / 360); - } else { - (_display displayCtrl 80156) ctrlSetText (ctrlText (_display displayCtrl 156)); - }; - }; }; -}, 0, [_newVehicle, _chargeText,_fireModes]] call CBA_fnc_addPerFrameHandler; +}, 0, [_newVehicle, _fireModes]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf index 04ca9c3278..1a3301d779 100644 --- a/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf @@ -18,4 +18,4 @@ PARAMS_2(_vehicle,_player); -"ACE_RangeTable_82mm" in (items _player); \ No newline at end of file +"ACE_RangeTable_82mm" in (items _player); diff --git a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf index d775b87365..6904403b55 100644 --- a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf @@ -23,10 +23,10 @@ switch (true) do { case ((abs(_muzzleVelocity - 70) < 0.00001) && {(abs(_airFriction - -0.0001) < 0.00001)}): { [ - ["100","1493","9","1.4","14.0","3.7","0.4","-0.3","0.0","-0.0","-0.0","0.0"], - ["150","1438","14","1.4","13.9","2.5","0.4","-0.4","0.0","-0.0","-0.1","0.0"], - ["200","1381","20","1.4","13.8","1.9","0.5","-0.4","0.0","-0.0","-0.1","0.1"], - ["250","1321","27","1.5","13.6","1.5","0.5","-0.4","0.0","-0.0","-0.1","0.1"], + ["100","1493","9","1.4","14.0","3.7","0.4","-0.3","0.0","0.0","0.0","0.0"], + ["150","1438","14","1.4","13.9","2.5","0.4","-0.4","0.0","0.0","-0.1","0.0"], + ["200","1381","20","1.4","13.8","1.9","0.5","-0.4","0.0","0.0","-0.1","0.1"], + ["250","1321","27","1.5","13.6","1.5","0.5","-0.4","0.0","0.0","-0.1","0.1"], ["300","1256","36","1.6","13.3","1.3","0.6","-0.5","0.0","-0.1","-0.1","0.1"], ["350","1183","49","1.7","12.9","1.1","0.6","-0.5","0.1","-0.1","-0.1","0.1"], ["400","1097","70","1.9","12.4","0.9","0.6","-0.5","0.1","-0.1","-0.2","0.1"], @@ -35,10 +35,10 @@ case ((abs(_muzzleVelocity - 70) < 0.00001) && {(abs(_airFriction - -0.0001) < 0 }; case ((abs(_muzzleVelocity - 140) < 0.00001) && {(abs(_airFriction - -0.0001) < 0.00001)}): { [ - ["150","1556","1","0.8","27.2","16.3","2.5","-2.4","0.0","-0.0","-0.2","0.2"], - ["200","1541","1","0.8","27.2","12.3","2.5","-2.4","0.0","-0.0","-0.3","0.2"], - ["250","1527","2","0.8","27.2","9.9","2.6","-2.4","0.0","-0.0","-0.3","0.3"], - ["300","1512","2","0.8","27.2","8.3","2.7","-2.4","0.1","-0.0","-0.4","0.4"], + ["150","1556","1","0.8","27.2","16.3","2.5","-2.4","0.0","0.0","-0.2","0.2"], + ["200","1541","1","0.8","27.2","12.3","2.5","-2.4","0.0","0.0","-0.3","0.2"], + ["250","1527","2","0.8","27.2","9.9","2.6","-2.4","0.0","0.0","-0.3","0.3"], + ["300","1512","2","0.8","27.2","8.3","2.7","-2.4","0.1","0.0","-0.4","0.4"], ["350","1497","3","0.8","27.1","7.1","2.7","-2.5","0.0","-0.1","-0.5","0.4"], ["400","1482","3","0.8","27.1","6.2","2.7","-2.5","0.1","-0.1","-0.5","0.5"], ["450","1467","3","0.8","27.0","5.6","2.8","-2.5","0.1","-0.1","-0.6","0.6"], @@ -71,10 +71,10 @@ case ((abs(_muzzleVelocity - 140) < 0.00001) && {(abs(_airFriction - -0.0001) < }; case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - -0.0001) < 0.00001)}): { [ - ["250","1559","1","0.6","37.3","23.8","6.1","-5.9","0.0","-0.0","-0.6","0.5"], - ["300","1551","1","0.6","37.3","20.0","6.1","-5.9","0.1","-0.0","-0.7","0.7"], + ["250","1559","1","0.6","37.3","23.8","6.1","-5.9","0.0","0.0","-0.6","0.5"], + ["300","1551","1","0.6","37.3","20.0","6.1","-5.9","0.1","0.0","-0.7","0.7"], ["350","1543","1","0.6","37.3","17.2","6.2","-5.9","0.0","-0.1","-0.8","0.7"], - ["400","1535","1","0.6","37.3","15.1","6.2","-5.9","0.1","-0.0","-0.9","0.9"], + ["400","1535","1","0.6","37.3","15.1","6.2","-5.9","0.1","0.0","-0.9","0.9"], ["450","1527","1","0.6","37.3","13.4","6.3","-6.0","0.1","-0.1","-1.0","1.0"], ["500","1519","1","0.6","37.2","12.1","6.3","-6.0","0.1","-0.1","-1.1","1.1"], ["550","1510","1","0.6","37.2","11.0","6.4","-6.0","0.1","-0.1","-1.3","1.2"], @@ -133,87 +133,87 @@ case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - -0.0001) < }; case ((abs(_muzzleVelocity - 70) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): { [ - ["100","1497","9","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["150","1445","14","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["100","1497","9","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["150","1445","14","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["200","1390","19","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["250","1333","26","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["250","1333","26","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["300","1272","34","1.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["350","1204","45","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["400","1127","61","1.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["350","1204","45","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["400","1127","61","1.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["450","1028","91","2.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"] ] }; case ((abs(_muzzleVelocity - 140) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): { [ - ["150","1562","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["200","1549","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["150","1562","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["200","1549","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["250","1536","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["300","1523","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["300","1523","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["350","1510","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["400","1497","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["400","1497","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["450","1484","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["500","1471","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["550","1458","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["500","1471","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["550","1458","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["600","1445","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["650","1431","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["650","1431","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["700","1418","5","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["750","1404","5","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["800","1390","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["850","1376","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["800","1390","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["850","1376","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["900","1362","6","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["950","1348","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["1000","1333","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1050","1318","8","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1100","1303","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1150","1288","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1200","1272","10","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["1000","1333","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1050","1318","8","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1100","1303","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1150","1288","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1200","1272","10","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1250","1256","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["1300","1239","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1350","1222","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1400","1205","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1450","1187","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1500","1168","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1550","1148","18","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1600","1127","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1650","1105","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1700","1082","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1750","1057","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["1300","1239","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1350","1222","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1400","1205","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1450","1187","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1500","1168","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1550","1148","18","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1600","1127","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1650","1105","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1700","1082","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1750","1057","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1800","1029","31","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["1850","997","37","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1900","960","46","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1950","912","63","1.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"] + ["1850","997","37","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1900","960","46","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1950","912","63","1.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"] ] }; case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): { [ - ["300","1563","0","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["350","1556","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["300","1563","0","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["350","1556","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["400","1550","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["450","1544","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["500","1537","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["450","1544","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["500","1537","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["550","1531","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["600","1525","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["650","1519","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["700","1512","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["600","1525","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["650","1519","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["700","1512","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["750","1506","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["800","1499","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["800","1499","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["850","1493","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["900","1487","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["950","1480","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1000","1474","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1050","1467","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["1100","1461","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1150","1454","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["1100","1461","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1150","1454","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1200","1448","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1250","1441","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["1300","1435","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1350","1428","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1400","1422","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["1300","1435","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1350","1428","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1400","1422","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1450","1415","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1500","1408","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["1550","1402","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1600","1395","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["1650","1388","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["1550","1402","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1600","1395","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["1650","1388","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1700","1381","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1750","1374","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["1800","1367","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], @@ -222,45 +222,45 @@ case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - 0) < 0.0000 ["1950","1346","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2000","1339","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2050","1332","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["2100","1325","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["2150","1317","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["2100","1325","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["2150","1317","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2200","1310","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["2250","1302","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["2300","1295","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["2350","1287","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["2250","1302","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["2300","1295","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["2350","1287","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2400","1280","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2450","1272","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2500","1264","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["2550","1256","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["2600","1248","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["2550","1256","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["2600","1248","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2650","1240","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2700","1232","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["2750","1223","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["2750","1223","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2800","1215","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["2850","1206","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["2900","1197","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["2850","1206","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["2900","1197","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["2950","1188","7","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["3000","1179","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["3000","1179","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3050","1170","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["3100","1160","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["3100","1160","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3150","1151","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["3200","1141","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["3200","1141","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3250","1131","10","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3300","1120","10","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3350","1109","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["3400","1098","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["3450","1087","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["3500","1075","13","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], - ["3550","1062","14","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["3400","1098","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["3450","1087","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["3500","1075","13","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], + ["3550","1062","14","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3600","1049","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["3650","1036","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["3650","1036","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3700","1021","17","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3750","1006","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3800","990","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["3850","971","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["3850","971","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3900","952","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["3950","929","32","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], - ["4000","900","40","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","-0.0"], + ["4000","900","40","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"], ["4050","861","56","2.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"] ] }; diff --git a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf index c81ff32132..23518f64f3 100644 --- a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf +++ b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf @@ -3,18 +3,28 @@ * Called when the mk6's in game UI is loaded. Hides rangefinder data if it is disabled. * * Arguments: - * None + * 0: Display + * 1: Type * * Return Value: * None * * Example: - * [] call ace_mk6mortar_fnc_turretDisplayLoaded + * [rsc,"Mk6Mortar"] call ace_mk6mortar_fnc_turretDisplayLoaded * * Public: No */ #include "script_component.hpp" +disableSerialization; + +PARAMS_2(_display,_rscType); + +if (_rscType != "Mk6Mortar") exitWith {}; +if (isNull _display) exitWith {}; + +private ["_fnc_hideControl", "_xPos", "_yPos", "_wPos", "_hPos"]; + #define CTRL_CA_OPTICSPITCH (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSPITCH") #define CTRL_CA_OPTICSZOOM (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSZOOM") #define CTRL_CA_SOLUTION_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_SOLUTION_TEXT") @@ -29,15 +39,8 @@ #define CTRL_CA_ELEV (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV") #define CTRL_CA_ELEV_NEED (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED") -private ["_display", "_fnc_hideControl"]; - -disableSerialization; - -_display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull]; -if (isNull _display) exitWith {}; - _fnc_hideControl = { - private "_idc"; + private ["_idc", "_pos"]; PARAMS_2(_path,_hideCtrl); _idc = getNumber (_path >> "IDC"); _pos = []; @@ -64,4 +67,3 @@ _fnc_hideControl = { [CTRL_CA_HEADING, true] call _fnc_hideControl; [CTRL_CA_ELEV, true] call _fnc_hideControl; [CTRL_CA_ELEV_NEED, true] call _fnc_hideControl; - diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index e3a80bdee7..26ab485db2 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -55,6 +55,7 @@ Ajustes MK6 MK6-Einstellungen MK6 - Nastavení + Ajustes do MK6 Air Resistance @@ -62,6 +63,7 @@ Resistencia al aire Luftwiderstand Odpor vzduchu + Resistência do Ar For Player Shots, Model Air Resistance and Wind Effects @@ -69,6 +71,7 @@ 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 + Para disparos do jogador, modelo de resistência de ar e efeitos de vento Allow MK6 Computer @@ -76,6 +79,7 @@ Habilitar ordenador del MK6 Erlaube MK6-Computer MK6 - Povolit počítač + Permitir computador do MK6 Show the Computer and Rangefinder (these NEED to be removed if you enable air resistance) @@ -83,6 +87,7 @@ 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) + Mostra o computador e o medidor de distância (estes DEVEM ser removidos se você habilitar resistência do ar) Allow MK6 Compass @@ -90,6 +95,7 @@ Habilitar brujula del MK6 Erlaube MK6-Kompass MK6 - Povolit kompas + Permitir bússula do MK6 Show the MK6 Digital Compass @@ -97,12 +103,14 @@ Muestra la brujula digital en el MK6 Zeige MK6-Digitaler-Kompass MK6 - Zobrazit digitální kompas + Mostra a bússula digital do MK6 Moduł ten pozwala dostosować ustawienia moździerza MK6. Dieses Modul erlaubt das Einstellen des MK6-Mörsers. Tento modul umožňuje nastavení minometu MK6. + Este módulo permite que você ajuste o morteiro MK6. \ No newline at end of file diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index f7b652ab44..62d16f42ce 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -26,12 +26,8 @@ _function = missionNamespace getvariable _function; }; - if (_isGlobal) then { - [_logic, [], true] call _function; - } else { - if (isServer) then { - [_logic, [], true] call _function; - }; + if (_isGlobal || isServer) then { + [_logic, (synchronizedObjects _logic), true] call _function; }; if !(_isPersistent) then { diff --git a/addons/movement/ACE_Settings.hpp b/addons/movement/ACE_Settings.hpp index 8424f9cba9..fdc0bd36b0 100644 --- a/addons/movement/ACE_Settings.hpp +++ b/addons/movement/ACE_Settings.hpp @@ -5,4 +5,4 @@ class ACE_Settings { isClientSettable = 1; displayName = CSTRING(UseImperial); }; -}; \ No newline at end of file +}; diff --git a/addons/movement/CfgEventHandlers.hpp b/addons/movement/CfgEventHandlers.hpp index 0cd959a047..e75956f440 100644 --- a/addons/movement/CfgEventHandlers.hpp +++ b/addons/movement/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/movement/CfgFatigue.hpp b/addons/movement/CfgFatigue.hpp index 288462ccb9..e7dfdf9ad8 100644 --- a/addons/movement/CfgFatigue.hpp +++ b/addons/movement/CfgFatigue.hpp @@ -1,4 +1,3 @@ - class CfgFatigue { MinValue1 = 0.2; MinValue2 = 0.8; diff --git a/addons/movement/CfgInventoryGlobalVariable.hpp b/addons/movement/CfgInventoryGlobalVariable.hpp index 1210f3df58..cf25595254 100644 --- a/addons/movement/CfgInventoryGlobalVariable.hpp +++ b/addons/movement/CfgInventoryGlobalVariable.hpp @@ -1,4 +1,3 @@ - class CfgInventoryGlobalVariable { maxSoldierLoad = 1200; }; diff --git a/addons/movement/CfgMoves.hpp b/addons/movement/CfgMoves.hpp index bd9519b013..50d3e3ab2b 100644 --- a/addons/movement/CfgMoves.hpp +++ b/addons/movement/CfgMoves.hpp @@ -1,4 +1,3 @@ - class CfgMovesBasic { class ManActions { ACE_Climb = "ACE_Climb"; diff --git a/addons/movement/CfgVehicles.hpp b/addons/movement/CfgVehicles.hpp new file mode 100644 index 0000000000..e620d38a24 --- /dev/null +++ b/addons/movement/CfgVehicles.hpp @@ -0,0 +1,6 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + maxGunElev = 80; // Allows looking further up (default: 60) + }; +}; diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index 496e4982ac..8ea42fbf0c 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -16,4 +16,5 @@ class CfgPatches { #include "CfgFatigue.hpp" //#include "CfgInventoryGlobalVariable.hpp" #include "CfgMoves.hpp" +#include "CfgVehicles.hpp" #include "ACE_Settings.hpp" diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml index 951a606a7a..e8df673866 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -6,6 +6,8 @@ MX-2A MX-2A MX-2A + MX-2A + MX-2A Thermal imaging device @@ -13,6 +15,7 @@ Monokular termowizyjny Dispositivo de imagen térmica Termální dalekohled + Dispositivo de imagem térmica - \ No newline at end of file + diff --git a/addons/nametags/ACE_Settings.hpp b/addons/nametags/ACE_Settings.hpp index e976c4adc8..354d5748bf 100644 --- a/addons/nametags/ACE_Settings.hpp +++ b/addons/nametags/ACE_Settings.hpp @@ -4,6 +4,7 @@ class ACE_Settings { typeName = "COLOR"; isClientSettable = 1; displayName = CSTRING(DefaultNametagColor); + category = CSTRING(Module_DisplayName); }; class GVAR(showPlayerNames) { value = 1; @@ -11,30 +12,35 @@ class ACE_Settings { isClientSettable = 1; displayName = CSTRING(ShowPlayerNames); description = CSTRING(ShowPlayerNames_Desc); - values[] = {CSTRING(Disabled), CSTRING(Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)}; + values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)}; + category = CSTRING(Module_DisplayName); }; class GVAR(showPlayerRanks) { value = 1; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(ShowPlayerRanks); + category = CSTRING(Module_DisplayName); }; class GVAR(showVehicleCrewInfo) { value = 1; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(ShowVehicleCrewInfo); + category = CSTRING(Module_DisplayName); }; class GVAR(showNamesForAI) { value = 0; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(ShowNamesForAI); + category = CSTRING(Module_DisplayName); }; class GVAR(showCursorTagForVehicles) { value = 0; typeName = "BOOL"; isClientSettable = 0; + category = CSTRING(Module_DisplayName); }; class GVAR(showSoundWaves) { value = 1; @@ -42,17 +48,20 @@ class ACE_Settings { isClientSettable = 1; displayName = CSTRING(ShowSoundWaves); description = CSTRING(ShowSoundWaves_Desc); - values[] = {CSTRING(Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)}; + values[] = {ECSTRING(common,Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)}; + category = CSTRING(Module_DisplayName); }; class GVAR(playerNamesViewDistance) { value = 5; typeName = "SCALAR"; isClientSettable = 0; + category = CSTRING(Module_DisplayName); }; class GVAR(playerNamesMaxAlpha) { value = 0.8; typeName = "SCALAR"; isClientSettable = 0; + category = CSTRING(Module_DisplayName); }; class GVAR(tagSize) { value = 2; @@ -61,5 +70,6 @@ class ACE_Settings { displayName = CSTRING(TagSize_Name); description = CSTRING(TagSize_Description); values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; + category = CSTRING(Module_DisplayName); }; }; diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index 6c0c148e47..f6e28095b4 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -16,7 +16,7 @@ class CfgVehicles { class values { class DoNotForce { default = 1; - name = CSTRING(DoNotForce); + name = ECSTRING(common,DoNotForce); value = -1; }; class ForceHide { @@ -54,7 +54,7 @@ class CfgVehicles { class values { class DoNotForce { default = 1; - name = CSTRING(DoNotForce); + name = ECSTRING(common,DoNotForce); value = -1; }; class ForceHide { @@ -74,7 +74,7 @@ class CfgVehicles { class values { class DoNotForce { default = 1; - name = CSTRING(DoNotForce); + name = ECSTRING(common,DoNotForce); value = -1; }; class ForceHide { diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index efc634be6c..b828d70005 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -66,8 +66,8 @@ GVAR(showNamesTime) = -10; // Change settings accordingly when they are changed ["SettingChanged", { - PARAMS_1(_name); - if (_name == QGVAR(showPlayerNames)) then { + params ["_name"]; + if (_name == QGVAR(showPlayerNames)) then { call FUNC(updateSettings); }; }] call EFUNC(common,addEventHandler); diff --git a/addons/nametags/functions/fnc_canShow.sqf b/addons/nametags/functions/fnc_canShow.sqf index b53f50c93e..5bccc8f91d 100644 --- a/addons/nametags/functions/fnc_canShow.sqf +++ b/addons/nametags/functions/fnc_canShow.sqf @@ -10,16 +10,12 @@ * Can show Crew Info * * Example: - * call ace_nametags_fnc_doShow + * call ace_nametags_fnc_canShow * * Public: No */ #include "script_component.hpp" -private ["_player"]; - -_player = ACE_player; - -vehicle _player != _player && +((vehicle ACE_player) != ACE_player) && {GVAR(ShowCrewInfo)} && -{!(vehicle _player isKindOf "ParachuteBase")}; +{!(vehicle ACE_player isKindOf "ParachuteBase")}; diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index 7b6bbda138..7c98be16ed 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -13,29 +13,29 @@ * None * * Example: - * [ACE_player, _target, _alpha, _distance * 0.026, _icon] call ace_nametags_fnc_drawNameTagIcon + * [ACE_player, bob, 0.5, height, ICON_NAME_SPEAK] call ace_nametags_fnc_drawNameTagIcon * * Public: No */ #include "script_component.hpp" -PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType); - -private ["_position", "_color", "_name", "_rank", "_size", "_icon", "_scale"]; +params ["_player", "_target", "_alpha", "_heightOffset", "_iconType"]; if (_iconType == ICON_NONE) exitWith {}; //Don't waste time if not visable +private ["_position", "_color", "_name", "_size", "_icon", "_scale"]; + //Set Icon: _icon = ""; _size = 0; -if ((_iconType == ICON_NAME_SPEAK) || (_iconType == ICON_SPEAK)) then { +if (_iconType in [ICON_NAME_SPEAK, ICON_SPEAK]) then { _icon = QUOTE(PATHTOF(UI\soundwave)) + str (floor (random 10)) + ".paa"; _size = 1; - _alpha = _alpha max 0.6;//Boost alpha when speaking + _alpha = (_alpha max 0.2) + 0.2;//Boost alpha when speaking } else { if (_iconType == ICON_NAME_RANK) then { - _icon = TEXTURES_RANKS select ((["PRIVATE", "CORPORAL", "SERGEANT", "LIEUTENANT", "CAPTAIN", "MAJOR", "COLONEL"] find (rank _target)) + 1); + _icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa",(toLower(rank _target))]; _size = 1; }; }; @@ -50,7 +50,7 @@ _name = if (_iconType in [ICON_NAME, ICON_NAME_RANK, ICON_NAME_SPEAK]) then { }; //Set Color: -if !(group _target == group _player) then { +if ((group _target) != (group _player)) then { _color = +GVAR(defaultNametagColor); //Make a copy, then multiply both alpha values (allows client to decrease alpha in settings) _color set [3, (_color select 3) * _alpha]; } else { @@ -58,7 +58,7 @@ if !(group _target == group _player) then { }; // Convert position to ASLW (expected by drawIcon3D) and add height offsets -_position = _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .35)]); +_position = _target modelToWorldVisual ((_target selectionPosition "pilot") vectorAdd [0,0,(_heightOffset + .3)]); _scale = [0.333, 0.5, 0.666, 0.83333, 1] select GVAR(tagSize); diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf index 6d83b0f573..b0e0b1ff34 100644 --- a/addons/nametags/functions/fnc_getVehicleData.sqf +++ b/addons/nametags/functions/fnc_getVehicleData.sqf @@ -22,7 +22,7 @@ private ["_type", "_varName", "_data", "_isAir", "_config", "_fnc_addTurret", "_fnc_addTurretUnit"]; -PARAMS_1(_type); +params ["_type"]; _varName = format ["ACE_CrewInfo_Cache_%1", _type]; _data = + (uiNamespace getVariable _varName); diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 897d223930..9299611d3b 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -19,7 +19,7 @@ if (isServer) then { //If someone disconnects while speaking, reset their variable addMissionEventHandler ["HandleDisconnect", { - PARAMS_1(_disconnectedPlayer); + params ["_disconnectedPlayer"]; if (_disconnectedPlayer getVariable [QGVAR(isSpeakingInGame), false]) then { _disconnectedPlayer setVariable [QGVAR(isSpeakingInGame), false, true]; }; @@ -30,7 +30,7 @@ if (!hasInterface) exitWith {}; ["playerChanged", { //When player changes, make sure to reset old unit's variable - PARAMS_2(_newUnit,_oldUnit); + params ["", "_oldUnit"]; if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then { _oldUnit setVariable [QGVAR(isSpeakingInGame), false, true]; }; @@ -40,14 +40,14 @@ if (!hasInterface) exitWith {}; if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { diag_log text format ["[ACE_nametags] - ACRE Detected"]; DFUNC(isSpeaking) = { - PARAMS_1(_unit); - (([_unit] call acre_api_fnc_isSpeaking) || ([ACE_player] call acre_api_fnc_isBroadcasting)) && {!(_unit getVariable ["ACE_isUnconscious", false])} + params ["_unit"]; + (([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then { diag_log text format ["[ACE_nametags] - TFR Detected"]; DFUNC(isSpeaking) = { - PARAMS_1(_unit); + params ["_unit"]; (_unit getVariable ["tf_isSpeaking", false]) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; } else { @@ -64,7 +64,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then { } , 0.1, []] call CBA_fnc_addPerFrameHandler; DFUNC(isSpeaking) = { - PARAMS_1(_unit); + params ["_unit"]; (_unit getVariable [QGVAR(isSpeakingInGame), false]) && {!(_unit getVariable ["ACE_isUnconscious", false])} }; }; diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index 7373d85de1..1b209cb32a 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -1,6 +1,5 @@ /* * Author: esteldunedain - * * Initializes the name tags module. * * Arguments: @@ -14,20 +13,24 @@ if !(isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); +params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; GVAR(Module) = true; [_logic, QGVAR(playerNamesViewDistance), "playerNamesViewDistance" ] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(showCursorTagForVehicles), "showCursorTagForVehicles" ] call EFUNC(common,readSettingFromModule); // Do Not Force - read module setting only non-default is set due to using SCALAR if ((_logic getVariable "showPlayerNames") != -1) then { [_logic, QGVAR(showPlayerNames), "showPlayerNames" ] call EFUNC(common,readSettingFromModule); }; +if ((_logic getVariable "showNamesForAI") != -1) then { + [_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule); +}; +if ((_logic getVariable "showVehicleCrewInfo") != -1) then { + [_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule); +}; diag_log text "[ACE]: NameTags Module Initialized."; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index 43996e17b2..bbf608b75a 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -17,8 +17,8 @@ private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_pos2", "_vecy", "_relPos", "_projDist", "_pos", "_target", "_targetEyePosASL", "_ambientBrightness", "_maxDistance"]; -//don't show nametags in spectator -if ((isNull ACE_player) || {!alive ACE_player}) exitWith {}; +//don't show nametags in spectator or if RscDisplayMPInterrupt is open +if ((isNull ACE_player) || {!alive ACE_player} || {!isNull (findDisplay 49)}) exitWith {}; _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0; _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance); @@ -63,6 +63,7 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then { {GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} && {!(_target getVariable ["ACE_hideName", false])}) then { _distance = ACE_player distance _target; + if (_distance > (_maxDistance + 5)) exitWith {}; _alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax; _icon = ICON_NONE; if (GVAR(showSoundWaves) == 2) then { //icon will be drawn below, so only show name here @@ -116,5 +117,6 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho [ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon); }; - } forEach _targets; + nil + } count _targets; }; diff --git a/addons/nametags/functions/fnc_setText.sqf b/addons/nametags/functions/fnc_setText.sqf index 33112c31d0..842c765de1 100644 --- a/addons/nametags/functions/fnc_setText.sqf +++ b/addons/nametags/functions/fnc_setText.sqf @@ -17,7 +17,7 @@ #define TextIDC 11123 -PARAMS_1(_text); +params ["_text"]; private["_ctrl"]; diff --git a/addons/nametags/script_component.hpp b/addons/nametags/script_component.hpp index da912b48c4..7bf0acbc4a 100644 --- a/addons/nametags/script_component.hpp +++ b/addons/nametags/script_component.hpp @@ -16,15 +16,3 @@ #define ICON_NAME_RANK 2 #define ICON_NAME_SPEAK 3 #define ICON_SPEAK 4 - -//todo?: custom rank icons?? -#define TEXTURES_RANKS [ \ - "", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\lieutenant_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\captain_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\major_gs.paa", \ - "\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \ - ] \ No newline at end of file diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 2d2fb1a26c..a0048c4076 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -115,6 +115,7 @@ Etiquetas de nombre Namensanzeigen Jmenovky + Etiquetas de nome Player Names View Dist. @@ -122,6 +123,7 @@ Distancia de vision para nombres de jugadores Spielernamen-Distanz Vzdálenost zobrazení jména hráčů + Distância de visão dos nomes dos jogadores Distance in meters at which player names are shown. Default: 5 @@ -129,6 +131,7 @@ 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 + Distância em metros que os nomes dos jogadores são mostrados. Padrão: 5 Show name tags for AI? @@ -136,6 +139,7 @@ ¿Mostrar nombres para la IA? Zeige Namensanzeigen für KI? Zobrazit jmenovky pro AI? + Mostrar nomes para IA? Show the name and rank tags for friendly AI units? Default: Do not force @@ -143,13 +147,7 @@ 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 + Mostra o nome e patente para unidades IA aliadas? Padrão: Não forçar Force Hide @@ -157,6 +155,7 @@ Ocultar forzado Verstecken erzwingen Vynuceno skrýt + Ocultar forçado Force Show @@ -164,6 +163,7 @@ Mostrar forzado Anzeigen erzwingen Vynuceno zobrazit + Mostrar forçado Show crew info? @@ -171,6 +171,7 @@ ¿Mostrar información de la tripulación? Zeige Besatzungsinfo? Zobrazit informace o posádce? + Mostrar informação de tripulação? Show vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force @@ -178,6 +179,7 @@ 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 + Mostrar informações de tripulação ou por padrão permitir a escolha dos jogadores. Padrão: Não forçar. Show for Vehicles @@ -185,6 +187,7 @@ Mostrar para vehiculos Zeige bei Fahrzeugen Zobrazit pro vozidla + Mostrar para veículos Show cursor NameTag for vehicle commander (only if client has name tags enabled)Default: No @@ -192,6 +195,7 @@ 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 + Mostrar o nome no cursor para o comandante do veículo (somente se o cliente tiver etiquetas de nomes ativada). Padrão: Não This module allows you to customize settings and range of Name Tags. @@ -199,20 +203,7 @@ 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 + Este módulo permite que você personalize as configurações e distâncias de etiquetas de nome. Only on Cursor @@ -220,6 +211,7 @@ Solo cursor Nur bei Maus Pouze na kurzor + Somente no cursor Only on Keypress @@ -227,6 +219,7 @@ Solo al pulsar tecla Nur bei Tastendruck Pouze na klávesu + Somente em tecla ativada Only on Cursor and Keypress @@ -234,24 +227,31 @@ En cursor y al pulsar tecla Nur Maus und Tastendruck Pouze na kurzor a klávesu + Somente em cursor ou tecla ativada Force Show Only on Cursor Wymuś pod kursorem Forzar mostrar solo en el cursor Vynuceno zobrazit pouze na kurzor + Erzwinge nur mit Mauszeiger anzuzeigen + Forçar mostrar somente no cursor Force Show Only on Keypress Wymuś po wciśnięciu klawisza Forzar mostrar solo al pulsar tecla Vynuceno zobrazit pouze na klávesu + Erzwinge nur mit Tastendruck anzuzeigen + Forçar somente mostrar em tecla ativada 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 + Erzwinge nur mit Mauszeiger und Tastendruck anzuzeigen + Forçar mostrar somente em cursor e tecla ativada Use Nametag settings @@ -259,6 +259,7 @@ Usar ajustes de etiquetas de nombre Verwende Namenanzeigen Použít nastavení jmenovky + Usar ajustes de etiquetas de nome Always Show All @@ -266,30 +267,39 @@ Mostrar siempre todo Immer alle zeigen Vždy zobrazit vše + Sempre mostrar tudo 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 + Erlaubt das Anzeigen von Spielernamen und stellt ein, ob sie standardmäßig aktiviert oder deaktiviert sind. Standard: aktiviert + Mostrar os nomes dos jogadores e definir sua ativação. Padrão: Ativado 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. + Es wird ein Schallwellensymbol über den Köpfen von sprechenden Spielern angezeigt, die ihre Push-to-Talk-Taste drücken. Diese Option funktioniert mit TFAR und ACRE2. + Efeito de ondas sonoras acima das cabeças dos jogadores que falam depois mantendo pressionada a tecla PTT. Esta opção funciona com TFAR e ACRE2. Nametags Size Rozmiar imion Tamaño de las Etiquetas de nombre Velikost jmenovky + Namensschildgröße + Tamanho das etiquetas de nome Text and Icon Size Scaling Skalowanie tekstu oraz ikon Escala del texto y el icono Velikost textu a ikon + Text- und Symbolgrößen + Escala de tamanho dos ícones e textos - \ No newline at end of file + diff --git a/addons/optionsmenu/CfgEventHandlers.hpp b/addons/optionsmenu/CfgEventHandlers.hpp index b97829836e..917a0acbd7 100644 --- a/addons/optionsmenu/CfgEventHandlers.hpp +++ b/addons/optionsmenu/CfgEventHandlers.hpp @@ -1,5 +1,10 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; + 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/optionsmenu/XEH_postInit.sqf b/addons/optionsmenu/XEH_postInit.sqf new file mode 100644 index 0000000000..a981c34e0b --- /dev/null +++ b/addons/optionsmenu/XEH_postInit.sqf @@ -0,0 +1,11 @@ + +#include "script_component.hpp" + +["SettingsInitialized", { + GVAR(categories) pushback ""; //Ensure All Catagories is at top + { + if !(_x select 8 in GVAR(categories)) then { + GVAR(categories) pushback (_x select 8); + }; + }foreach EGVAR(common,settings); +}] call EFUNC(common,addEventHandler); diff --git a/addons/optionsmenu/XEH_preInit.sqf b/addons/optionsmenu/XEH_preInit.sqf index e35784560a..21f64c4f46 100644 --- a/addons/optionsmenu/XEH_preInit.sqf +++ b/addons/optionsmenu/XEH_preInit.sqf @@ -10,16 +10,19 @@ PREP(onSliderPosChanged); PREP(onServerSaveInputField); PREP(onServerSettingsMenuOpen); PREP(onServerListBoxShowSelectionChanged); +PREP(onCategorySelectChanged); PREP(resetSettings); PREP(serverResetSettings); PREP(settingsMenuUpdateKeyView); PREP(settingsMenuUpdateList); PREP(serverSettingsMenuUpdateKeyView); PREP(serverSettingsMenuUpdateList); +PREP(onServerCategorySelectChanged); PREP(updateSetting); PREP(exportSettings); PREP(toggleIncludeClientSettings); PREP(moduleAllowConfigExport); +PREP(stringEscape); GVAR(clientSideOptions) = []; GVAR(clientSideColors) = []; @@ -29,5 +32,7 @@ GVAR(ClientSettingsExportIncluded) = false; GVAR(serverSideOptions) = []; GVAR(serverSideColors) = []; GVAR(serverSideValues) = []; +GVAR(categories) = []; +GVAR(currentCategorySelection) = 0; ADDON = true; diff --git a/addons/optionsmenu/functions/fnc_exportSettings.sqf b/addons/optionsmenu/functions/fnc_exportSettings.sqf index fa76b8752a..9d6437495d 100644 --- a/addons/optionsmenu/functions/fnc_exportSettings.sqf +++ b/addons/optionsmenu/functions/fnc_exportSettings.sqf @@ -40,7 +40,7 @@ private ["_compiledConfig", "_name", "_typeName", "_isClientSetable", "_localize if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then { _value = missionNamespace getvariable [_name, _defaultValue]; - if (_typeName == "STRING") then { // I dont think we have string values, but just in case + if (_typeName == "STRING") then { _value = format['"%1"', _value]; }; if (_typeName == "BOOL") then { diff --git a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf new file mode 100644 index 0000000000..3129e32bef --- /dev/null +++ b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf @@ -0,0 +1,27 @@ +/* + * Author: Glowbal + * Changes which category is selected + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ACE_optionsmenu_fnc_onCategorySelectChanged + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_settingsMenu", "_ctrlComboBox"]; + +disableSerialization; +_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; + +_ctrlComboBox = (_settingsMenu displayCtrl 14); +GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; + +[true] call FUNC(settingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf b/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf index 1543a2c8d5..b122d0da0e 100644 --- a/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf @@ -18,24 +18,28 @@ private ["_settingIndex", "_rightDropDownIndex"]; -_settingIndex = lbCurSel 200; //Index of left list _rightDropDownIndex = lbCurSel 400; //Index of right drop down - if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;}; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; +if (_settingIndex == -1) exitWith {}; + switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_OPTIONS): { if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then { - _settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0; - [MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); + _settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0; + [MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); }; [false] call FUNC(settingsMenuUpdateList); - }; + }; case (MENU_TAB_SERVER_OPTIONS): { if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideOptions)))) then { - _settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0; - [MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); + _settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0; + [MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); }; [false] call FUNC(serverSettingsMenuUpdateList); - }; + }; }; diff --git a/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf new file mode 100644 index 0000000000..d134cda993 --- /dev/null +++ b/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf @@ -0,0 +1,26 @@ +/* + * Author: Glowbal + * Changes which category is selected + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ACE_optionsmenu_fnc_onCategorySelectChanged + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_settingsMenu", "_ctrlComboBox"]; +disableSerialization; +_settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; + +_ctrlComboBox = (_settingsMenu displayCtrl 14); +GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; + +[true] call FUNC(serverSettingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf b/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf index b8eb630f85..fde370426f 100644 --- a/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf @@ -18,9 +18,13 @@ private ["_settingIndex", "_inputText", "_setting", "_settingName", "_convertedValue"]; -_settingIndex = lbCurSel 200; //Index of left list _inputText = ctrlText 414; //Index of right drop down +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; + switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_SERVER_VALUES): { if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideValues)))) then { @@ -29,7 +33,10 @@ switch (GVAR(optionMenu_openTab)) do { _settingName = _setting select 0; _convertedValue = switch (toUpper (_setting select 1)) do { - case "STRING": {format ['"%1"', _inputText]}; + case "STRING": { + ctrlSetText [414, _inputText call FUNC(stringEscape)]; + format ['%1', _inputText call FUNC(stringEscape)]; + }; case "ARRAY": {format [call compile "[%1]", _inputText]}; case "SCALAR": {parseNumber _inputText;}; default {throw "Error"}; diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 4f96438042..6c0cb56519 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -65,3 +65,14 @@ if (GVAR(ClientSettingsExportIncluded)) then { } else { (_settingsMenu displayCtrl 1102) ctrlSetText localize (LSTRING(inClientSettings)); }; + + +lbClear (_menu displayCtrl 14); +{ + if (_x == "") then { + _x = localize (LSTRING(category_all)); + }; + (_menu displayCtrl 14) lbAdd _x; +} forEach GVAR(categories); + +(_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf index 050abcf295..c71a26a6e7 100644 --- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf @@ -52,3 +52,15 @@ if (GVAR(serverConfigGeneration) == 0) then { (_menu displayCtrl 1102) ctrlEnable false; (_menu displayCtrl 1102) ctrlShow false; }; + +lbClear (_menu displayCtrl 14); +{ + if (_x == "") then { + _x = localize LSTRING(category_all); + }; + (_menu displayCtrl 14) lbAdd _x; +} forEach GVAR(categories); + +(_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies + + diff --git a/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf b/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf index b69d8bd734..7df198cc5f 100644 --- a/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf @@ -18,7 +18,11 @@ private ["_newColor", "_settingIndex"]; -_settingIndex = lbCurSel 200; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; +if (_settingIndex == -1) exitWith {}; switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_COLORS): { diff --git a/addons/optionsmenu/functions/fnc_resetSettings.sqf b/addons/optionsmenu/functions/fnc_resetSettings.sqf index 07fc43cdfc..8d6c3958c6 100644 --- a/addons/optionsmenu/functions/fnc_resetSettings.sqf +++ b/addons/optionsmenu/functions/fnc_resetSettings.sqf @@ -30,8 +30,8 @@ private ["_name", "_default", "_lastSelected"]; [MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting); } forEach GVAR(clientSideColors); -_lastSelected = lbCurSel 200; +_lastSelected = lnbCurSelRow 200; [GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged); if (_lastSelected != -1) then { - lbSetCurSel [200, _lastSelected]; + lnbSetCurSelRow [200, _lastSelected]; }; diff --git a/addons/optionsmenu/functions/fnc_serverResetSettings.sqf b/addons/optionsmenu/functions/fnc_serverResetSettings.sqf index 434e622818..d9f6a4ad96 100644 --- a/addons/optionsmenu/functions/fnc_serverResetSettings.sqf +++ b/addons/optionsmenu/functions/fnc_serverResetSettings.sqf @@ -36,7 +36,7 @@ private ["_name", "_default", "_lastSelected"]; [MENU_TAB_SERVER_VALUES, _name, _default] call FUNC(updateSetting); } forEach GVAR(serverSideVakyes); -_lastSelected = lbCurSel 200; +_lastSelected = lnbCurSelRow 200; [GVAR(optionMenu_openTab)] call FUNC(onserverListBoxShowSelectionChanged); if (_lastSelected != -1) then { lbSetCurSel [200, _lastSelected]; diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf index 9daee053bb..87532aaf86 100644 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf +++ b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf @@ -16,11 +16,10 @@ #include "script_component.hpp" -private ["_settingsMenu", "_ctrlList", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor", "_expectedType"]; +private ["_settingsMenu", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor", "_expectedType"]; disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; -_ctrlList = _settingsMenu displayCtrl 200; _collection = switch (GVAR(optionMenu_openTab)) do { case MENU_TAB_SERVER_OPTIONS: {GVAR(serverSideOptions)}; @@ -29,15 +28,12 @@ _collection = switch (GVAR(optionMenu_openTab)) do { default {[]}; }; -if (count _collection > 0) then { - _settingIndex = (lbCurSel _ctrlList); - if (_settingIndex > (count _collection)) then { - _settingIndex = count _collection - 1; - }; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; - if (_settingIndex < 0) then { - _settingIndex = 0; - }; +if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { _setting = _collection select _settingIndex; _entryName = _setting select 0; @@ -52,12 +48,12 @@ if (count _collection > 0) then { switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_SERVER_OPTIONS): { _possibleValues = _setting select 5; - _settingsValue = _setting select 8; + _settingsValue = _setting select 9; // Created disable/enable options for bools if ((_setting select 1) == "BOOL") then { lbClear 400; - lbAdd [400, (localize LSTRING(Disabled))]; - lbAdd [400, (localize LSTRING(Enabled))]; + lbAdd [400, (localize ELSTRING(common,No))]; + lbAdd [400, (localize ELSTRING(common,Yes))]; _settingsValue = [0, 1] select _settingsValue; } else { lbClear 400; @@ -66,14 +62,14 @@ if (count _collection > 0) then { (_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue; }; case (MENU_TAB_SERVER_COLORS): { - _currentColor = _setting select 8; + _currentColor = _setting select 9; { sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))]; } forEach [410, 411, 412, 413]; }; case (MENU_TAB_SERVER_VALUES): { // TODO implement - _settingsValue = _setting select 8; + _settingsValue = _setting select 9; // Created disable/enable options for bools _expectedType = switch (_setting select 1) do { diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf index f3e393bbfd..fc745c37be 100644 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf @@ -16,63 +16,77 @@ #include "script_component.hpp" -private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue"]; +private ["_settingName", "_added", "_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"]; DEFAULT_PARAM(0,_updateKeyView,true); disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; _ctrlList = _settingsMenu displayCtrl 200; -lbclear _ctrlList; +lnbClear _ctrlList; + +_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); + +_added = 0; switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_SERVER_OPTIONS): { { - if ((_x select 3) != "") then { - _ctrlList lbadd (_x select 3); - } else { - _ctrlList lbadd (_x select 0); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _settingName = if ((_x select 3) != "") then { + (_x select 3); + } else { + (_x select 0); + }; + + _settingsValue = _x select 9; + + // Created disable/enable options for bools + _settingsText = if ((_x select 1) == "BOOL") then { + [(localize ELSTRING(common,No)), (localize ELSTRING(common,Yes))] select _settingsValue; + } else { + (_x select 5) select _settingsValue; + }; + + _added = _ctrlList lnbAddRow [_settingName, _settingsText]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - - _settingsValue = _x select 8; - - // Created disable/enable options for bools - _settingsText = if ((_x select 1) == "BOOL") then { - [(localize LSTRING(Disabled)), (localize LSTRING(Enabled))] select _settingsValue; - } else { - (_x select 5) select _settingsValue; - }; - - _ctrlList lbadd (_settingsText); }foreach GVAR(serverSideOptions); }; case (MENU_TAB_SERVER_COLORS): { { - _color = +(_x select 8); - { - _color set [_forEachIndex, ((round (_x * 100))/100)]; - } forEach _color; - _settingsColor = str _color; - if ((_x select 3) != "") then { - _ctrlList lbadd (_x select 3); - } else { - _ctrlList lbadd (_x select 0); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _color = +(_x select 9); + { + _color set [_forEachIndex, ((round (_x * 100))/100)]; + } forEach _color; + _settingsColor = str _color; + _settingName = if ((_x select 3) != "") then { + (_x select 3); + } else { + (_x select 0); + }; + + _added = _ctrlList lnbAddRow [_settingName, _settingsColor]; + _ctrlList lnbSetColor [[_added, 1], (_x select 9)]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - _ctrlList lbadd (_settingsColor); - _ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 8)]; }foreach GVAR(serverSideColors); }; case (MENU_TAB_SERVER_VALUES): { { - if ((_x select 3) != "") then { - _ctrlList lbadd (_x select 3); - } else { - _ctrlList lbadd (_x select 0); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _settingName = if ((_x select 3) != "") then { + (_x select 3); + } else { + (_x select 0); + }; + _settingsValue = _x select 9; + if (typeName _settingsValue != "STRING") then { + _settingsValue = format["%1", _settingsValue]; + }; + _added = _ctrlList lnbAddRow [_settingName, _settingsValue]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - _settingsValue = _x select 8; - if (typeName _settingsValue != "STRINg") then { - _settingsValue = format["%1", _settingsValue]; - }; - _ctrlList lbadd (_settingsValue); }foreach GVAR(serverSideValues); }; }; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf index 3777093ccd..64f45121e5 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf @@ -28,15 +28,12 @@ _collection = switch (GVAR(optionMenu_openTab)) do { default {[]}; }; -if (count _collection > 0) then { - _settingIndex = (lbCurSel _ctrlList); - if (_settingIndex > (count _collection)) then { - _settingIndex = count _collection - 1; - }; +_settingIndex = -1; +if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { + _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; +}; - if (_settingIndex < 0) then { - _settingIndex = 0; - }; +if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { _setting = _collection select _settingIndex; _entryName = _setting select 0; @@ -51,13 +48,13 @@ if (count _collection > 0) then { switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_OPTIONS): { _possibleValues = _setting select 5; - _settingsValue = _setting select 8; + _settingsValue = _setting select 9; // Created disable/enable options for bools if ((_setting select 1) == "BOOL") then { lbClear 400; - lbAdd [400, (localize LSTRING(Disabled))]; - lbAdd [400, (localize LSTRING(Enabled))]; + lbAdd [400, (localize ELSTRING(common,No))]; + lbAdd [400, (localize ELSTRING(common,Yes))]; _settingsValue = [0, 1] select _settingsValue; } else { lbClear 400; @@ -66,7 +63,7 @@ if (count _collection > 0) then { (_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue; }; case (MENU_TAB_COLORS): { - _currentColor = _setting select 8; + _currentColor = _setting select 9; { sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))]; } forEach [410, 411, 412, 413]; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf index fdd9128ca3..96a45a1b83 100644 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf +++ b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf @@ -16,42 +16,49 @@ #include "script_component.hpp" -private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue"]; +private ["_settingName", "_added", "_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"]; DEFAULT_PARAM(0,_updateKeyView,true); disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; _ctrlList = _settingsMenu displayCtrl 200; -lbclear _ctrlList; +lnbClear _ctrlList; + +_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); switch (GVAR(optionMenu_openTab)) do { case (MENU_TAB_OPTIONS): { { - _ctrlList lbadd (_x select 3); + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _settingName = (_x select 3); + _settingsValue = _x select 9; - _settingsValue = _x select 8; - - // Created disable/enable options for bools - _settingsText = if ((_x select 1) == "BOOL") then { - [(localize LSTRING(Disabled)), (localize LSTRING(Enabled))] select _settingsValue; - } else { - (_x select 5) select _settingsValue; + // Created disable/enable options for bools + _settingsText = if ((_x select 1) == "BOOL") then { + [(localize ELSTRING(common,No)), (localize ELSTRING(common,Yes))] select _settingsValue; + } else { + (_x select 5) select _settingsValue; + }; + _added = _ctrlList lnbAddRow [_settingName, _settingsText]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; }; - - _ctrlList lbadd (_settingsText); - }foreach GVAR(clientSideOptions); + } foreach GVAR(clientSideOptions); }; case (MENU_TAB_COLORS): { - { - _color = +(_x select 8); - { - _color set [_forEachIndex, ((round (_x * 100))/100)]; - } forEach _color; - _settingsColor = str _color; - _ctrlList lbadd (_x select 3); - _ctrlList lbadd (_settingsColor); - _ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 8)]; + { + if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { + _color = +(_x select 9); + { + _color set [_forEachIndex, ((round (_x * 100))/100)]; + } forEach _color; + _settingsColor = str _color; + _settingName = (_x select 3); + + _added = _ctrlList lnbAddRow [_settingName, _settingsColor]; + _ctrlList lnbSetColor [[_added, 1], (_x select 9)]; + _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; + }; }foreach GVAR(clientSideColors); }; }; diff --git a/addons/optionsmenu/functions/fnc_stringEscape.sqf b/addons/optionsmenu/functions/fnc_stringEscape.sqf new file mode 100644 index 0000000000..1493f76445 --- /dev/null +++ b/addons/optionsmenu/functions/fnc_stringEscape.sqf @@ -0,0 +1,59 @@ +/* + * Author: Glowbal + * Parse the string for quotation marks, so it can be used for config export. + * + * Arguments: + * 0: string + * + * Return Value: + * parsed string + * + * Example: + * [] call ACE_optionsmenu_fnc_stringEscape + * + * Public: No + */ + +private ["_str", "_array", "_maxIndex", "_isEven"]; +_str = _this; + +_isEven = { + params ["_array", "_index"]; + private [ "_count"]; + _count = 0; + { + if (_forEachIndex <= _index && {_x == 39}) then { + _count = _count + 1; + }; + }foreach _array; + + _count %2 == 0; +}; + +// reg: 34 +// single: 39 +_array = toArray _str; +{ + if (_x == 34) then { + _array set [_foreachIndex, 39]; + }; +}foreach _array; + +_maxIndex = count _array; +for "_i" from 0 to _maxIndex /* step +1 */ do { + if (((_i + 1) < _maxIndex - 1) && {_array select _i == 39 && (_array select (_i + 1)) == 39}) then { + if ([_array, _i] call _isEven) then { + _array deleteAt _i; + _i = _i - 1; + _maxIndex = _maxIndex - 1; + }; + }; +}; + +{ + if (_x == 34) then { + _array set [_foreachIndex, 39]; + }; +}foreach _array; + +toString _array; diff --git a/addons/optionsmenu/functions/fnc_updateSetting.sqf b/addons/optionsmenu/functions/fnc_updateSetting.sqf index 3fe1682614..25fa06c604 100644 --- a/addons/optionsmenu/functions/fnc_updateSetting.sqf +++ b/addons/optionsmenu/functions/fnc_updateSetting.sqf @@ -32,9 +32,9 @@ switch (_type) do { _newValue = [false, true] select _newValue; }; - if !((_x select 8) isEqualTo _newValue) then { + if !((_x select 9) isEqualTo _newValue) then { _changed = true; - _x set [8, _newValue]; + _x set [9, _newValue]; } ; }; @@ -42,9 +42,9 @@ switch (_type) do { }; case (MENU_TAB_COLORS): { { - if (((_x select 0) == _name) && {!((_x select 8) isEqualTo _newValue)}) then { + if (((_x select 0) == _name) && {!((_x select 9) isEqualTo _newValue)}) then { _changed = true; - _x set [8, _newValue]; + _x set [9, _newValue]; }; } foreach GVAR(clientSideColors); }; @@ -56,9 +56,9 @@ switch (_type) do { _newValue = [false, true] select _newValue; }; - if !((_x select 8) isEqualTo _newValue) then { + if !((_x select 9) isEqualTo _newValue) then { _changed = true; - _x set [8, _newValue]; + _x set [9, _newValue]; } ; }; @@ -66,17 +66,17 @@ switch (_type) do { }; case (MENU_TAB_SERVER_COLORS): { { - if (((_x select 0) == _name) && {!((_x select 8) isEqualTo _newValue)}) then { + if (((_x select 0) == _name) && {!((_x select 9) isEqualTo _newValue)}) then { _changed = true; - _x set [8, _newValue]; + _x set [9, _newValue]; }; } foreach GVAR(serverSideColors); }; case (MENU_TAB_SERVER_VALUES): { { - if (((_x select 0) == _name) && {!((_x select 8) isEqualTo _newValue)}) then { + if (((_x select 0) == _name) && {!((_x select 9) isEqualTo _newValue)}) then { _changed = true; - _x set [8, _newValue]; + _x set [9, _newValue]; }; } foreach GVAR(serverSideValues); }; diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index d80547f2b6..513692eaab 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -95,6 +95,11 @@ class RscDisplayInterruptEditor3D: RscStandardDisplay { class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; }; }; +class RscDisplayMovieInterrupt: RscStandardDisplay { + class controls { + class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {}; + }; +}; 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 diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp index fc3a90c66e..cd65eb966d 100644 --- a/addons/optionsmenu/gui/settingsMenu.hpp +++ b/addons/optionsmenu/gui/settingsMenu.hpp @@ -1,9 +1,3 @@ -class ACE_settingsMenu { - idd = 145246; - movingEnable = false; - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen);); - onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;); - #define SIZEX (((safezoneW / safezoneH) min 1.2)) #define SIZEY (SIZEX / 1.2) #define X_ORIGINAL(num) (num * (SIZEX / 40) + (safezoneX + (safezoneW - SIZEX)/2)) @@ -21,6 +15,12 @@ class ACE_settingsMenu { #define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), W_ORIGINAL(num), W_MAKEITBIGGA(num))]) #define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), H_ORIGINAL(num), H_MAKEITBIGGA(num))]) +class ACE_settingsMenu { + idd = 145246; + movingEnable = false; + onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen);); + onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;); + class controlsBackground { class HeaderBackground: ACE_gui_backgroundBase { idc = -1; @@ -77,10 +77,20 @@ class ACE_settingsMenu { idc = 13; x = X_PART(2); y = Y_PART(3.4); - w = W_PART(30); + w = W_PART(15); h = H_PART(1); text = ""; }; + class categorySelection: ACE_gui_comboBoxBase { + idc = 14; + x = X_PART(14); + y = Y_PART(3.4); + w = W_PART(9); + h = H_PART(1); + text = ""; + onLBSelChanged = QUOTE( call FUNC(onCategorySelectChanged)); + SizeEx = H_PART(0.9); + }; class selectionAction_1: ACE_gui_buttonBase { idc = 1000; text = CSTRING(TabOptions); @@ -246,15 +256,23 @@ class ACE_settingsMenu { idc = 1102; text = CSTRING(OpenExport); x = X_PART(18); - action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {createDialog 'ACE_serverSettingsMenu'; }); - }; + action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {closeDialog 0; createDialog 'ACE_serverSettingsMenu';}); + }; class action_debug: actionClose { idc = 1102; text = CSTRING(DumpDebug); - x = X_PART(26.5); + x = X_PART(26.1); action = QUOTE([] call FUNC(debugDumpToClipboard)); tooltip = CSTRING(DumpDebugTooltip); }; + class action_headBugFix: actionClose { + idc = 1102; + text = CSTRING(headBugFix); + x = X_PART(34); + w = W_PART(5); + action = QUOTE(0 spawn EFUNC(common,headBugFix); closedialog 0;); + tooltip = CSTRING(headBugFixTooltip); + }; }; }; class ACE_serverSettingsMenu: ACE_settingsMenu { @@ -283,6 +301,16 @@ class ACE_serverSettingsMenu: ACE_settingsMenu { h = H_PART(1); text = ""; }; + class categorySelection: ACE_gui_comboBoxBase { + idc = 14; + x = X_PART(14); + y = Y_PART(3.4); + w = W_PART(9); + h = H_PART(1); + text = ""; + onLBSelChanged = QUOTE( call FUNC(onServerCategorySelectChanged)); + SizeEx = H_PART(0.9); + }; class selectionAction_1: ACE_gui_buttonBase { idc = 1000; text = CSTRING(TabOptions); diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index cbd9d642bf..77cbc0961c 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -73,30 +73,6 @@ Valori Valores - - Yes - Ja - Si - Tak - Ano - Oui - Да - Igen - Sim - Si - - - No - Nein - No - Nie - Ne - Non - Нет - Nem - Não - No - Setting: Nastavení: @@ -247,6 +223,7 @@ [ACE] Permitir exportar configuración Erlaube Config-Export [ACE] Povolit export natavení [ACE] + [ACE] Permitir exportação de configurações Allow @@ -254,6 +231,7 @@ Permitir Erlaube Povolit + Permitir Allow export of all settings to a server config formatted. @@ -261,6 +239,7 @@ 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. + Permitir exportação de todas as configurações para uma configuração formatada de servidor. When allowed, you have access to the settings modification and export in SP. Clicking export will place the formated config on your clipboard. @@ -268,6 +247,7 @@ 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. + Quando permitido, você tem acesso à modificação de definições e exportação em SP. Clicando em exportação colocará a configuração formatada em sua área de transferência. Hide @@ -275,6 +255,7 @@ Ocultar Verstecken Skrýt + Ocultar Top right, downwards @@ -282,6 +263,7 @@ Arriba a la derecha, hacia abajo Open rechts, nach unten Vpravo nahoře, dolů + Superior direito, para baixo Top right, to the left @@ -289,6 +271,7 @@ Arriba a la derecha, hacia la izquierda Von rechts nach links Vpravo nahoře, do leva + Superior direito, à esquerda Top left, downwards @@ -296,6 +279,7 @@ Arriba a la izquierda, hacia abajo Von links, nach unten Vlevo nahoře, dolů + Superior esquerdo, para baixo Top left, to the right @@ -303,6 +287,7 @@ Arriba a la izquierda, hacia la derecha Oben links nach rechts Vlevo nahoře, do prava + Superior esquerdo, para a direita Top @@ -310,6 +295,7 @@ Arriba Oben Nahoře + Acima Bottom @@ -317,26 +303,51 @@ Abajo Unten Dole + Abaixo Debug To Clipboard Debuguj do schowka Depurar al portapapeles Debug do schránky + Debug in die Zwischenablage + Depuração para área de transferência 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. + Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. + Envia informação de depuração para RPT e área de transferência. + + + Headbug Fix + Fix Headbug + + + Resets your animation state. + Resetuje aktualną animację. ACE News Noticias ACE + ACE-Neuigkeiten + Notícias do ACE + Wiadomości ACE + ACE Novinky Show News on Main Menu Mostrar noticias en el menú principal + Zeige Neuigkeiten im Hauptmenü + Mostrar notícias no menu principal + Pokazuj wiadomości ACE w menu głównym + Zobrazit novinky v hlavním menu + + + All Categories + Wszystkie kategorie \ No newline at end of file diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index 1249cac690..fd3081f7eb 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -43,7 +43,7 @@ _fnc_stopCurrentBurst = { _ammo = _unit ammo _weapon; if (_ammo > 0) then { _unit setAmmo [_weapon, 0]; - [_fnc_stopCurrentBurst, 0, [_unit, _weapon, _ammo, diag_frameno]] call cba_fnc_addPerFrameHandler; + [_fnc_stopCurrentBurst, 0, [_unit, _weapon, _ammo, diag_frameno]] call CBA_fnc_addPerFrameHandler; }; // only display the hint once, after you try to shoot an already jammed weapon diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp index 8c7edda20f..7a1f8119ca 100644 --- a/addons/parachute/CfgEventHandlers.hpp +++ b/addons/parachute/CfgEventHandlers.hpp @@ -8,3 +8,10 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; +class Extended_Respawn_EventHandlers { + class CAManBase { + class ADDON { + respawn = QUOTE(call COMPILE_FILE(XEH_respawn)); + }; + }; +}; \ No newline at end of file diff --git a/addons/parachute/CfgVehicles.hpp b/addons/parachute/CfgVehicles.hpp index bc5ecbd60f..aefadf2e63 100644 --- a/addons/parachute/CfgVehicles.hpp +++ b/addons/parachute/CfgVehicles.hpp @@ -2,20 +2,80 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { - class _xx_ACE_Altimeter { - name = "ACE_Altimeter"; - count = 6; - }; + MACRO_ADDITEM(ACE_Altimeter,6); }; class TransportBackpacks { - class _xx_ACE_NonSteerableParachute { - backpack = "ACE_NonSteerableParachute"; - count = 4; - }; + MACRO_ADDBACKPACK(ACE_NonSteerableParachute,4); }; }; - class B_Parachute; + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_CutParachute { + displayName = CSTRING(CutParachute); + exceptions[] = {"isNotInside"}; + condition = QUOTE([_player] call FUNC(checkCutParachute)); + statement = QUOTE([_player] call FUNC(cutParachute)); + showDisabled = 0; + priority = 2.9; + icon = QUOTE(PATHTOF(UI\cut_ca.paa)); + hotkey = "C"; // Did this realy Work? + }; + }; + }; + + class Helicopter; + class ParachuteBase: Helicopter { + MACRO_HASRESERVE + }; + class ParachuteWest: ParachuteBase { + MACRO_HASRESERVE + }; + class ParachuteEast: ParachuteBase { + MACRO_HASRESERVE + }; + class ParachuteG: ParachuteBase { + MACRO_HASRESERVE + }; + class Parachute: ParachuteWest { + MACRO_HASRESERVE + }; + class NonSteerable_Parachute_F: Parachute { + MACRO_HASRESERVE + }; + class Paraglide: ParachuteWest{ + MACRO_HASRESERVE + }; + class Steerable_Parachute_F: Paraglide{ + MACRO_HASRESERVE + }; + class Parachute_02_base_F: parachuteBase { + MACRO_HASRESERVE + }; + class B_Parachute_02_F: Parachute_02_base_F { + MACRO_HASRESERVE + }; + class O_Parachute_02_F: Parachute_02_base_F { + MACRO_HASRESERVE + }; + class I_Parachute_02_F: Parachute_02_base_F { + MACRO_HASRESERVE + }; + class Bag_Base; + class B_Parachute:Bag_Base { + MACRO_HASRESERVE + }; + class B_B_Parachute_02_F: B_Parachute { + MACRO_HASRESERVE + }; + class B_O_Parachute_02_F: B_Parachute { + MACRO_HASRESERVE + }; + class B_I_Parachute_02_F: B_Parachute { + MACRO_HASRESERVE + }; + class ACE_NonSteerableParachute: B_Parachute { author = ECSTRING(common,ACETeam); scope = 2; @@ -24,10 +84,21 @@ class CfgVehicles { //model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo // backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40 ParachuteClass = "NonSteerable_Parachute_F"; + MACRO_HASRESERVE maximumLoad = 0; mass = 100; }; + class ACE_ReserveParachute: ACE_NonSteerableParachute { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(ReserveParachute); + scope = 1; + mass = 70; + ParachuteClass = "NonSteerable_Parachute_F"; + ace_reserveParachute = ""; + ace_hasReserveParachute = 0; + }; + class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";}; class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";}; class O_helipilot_F; class O_Pilot_F: O_helipilot_F {backpack = "ACE_NonSteerableParachute";}; diff --git a/addons/parachute/UI/cut_ca.paa b/addons/parachute/UI/cut_ca.paa new file mode 100644 index 0000000000..2f5948535b Binary files /dev/null and b/addons/parachute/UI/cut_ca.paa differ diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index a8f83b43a3..46dd21b99c 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -23,7 +23,7 @@ if (!hasInterface) exitWith {}; if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false}; if (!(missionNamespace getVariable [QGVAR(AltimeterActive), false])) then { - [ace_player] call FUNC(showAltimeter); + [ACE_player] call FUNC(showAltimeter); } else { call FUNC(hideAltimeter); }; @@ -36,9 +36,12 @@ GVAR(PFH) = false; ["playerVehicleChanged",{ if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then { GVAR(PFH) = true; - [FUNC(onEachFrame), 0.1, []] call CALLSTACK(cba_fnc_addPerFrameHandler); + [FUNC(onEachFrame), 0.1, []] call CALLSTACK(CBA_fnc_addPerFrameHandler); }; }] call EFUNC(common,addEventHandler); // don't show speed and height when in expert mode ["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler); + +//[ACE_Player,([ACE_player] call EFUNC(common,getAllGear))] call FUNC(storeParachute); +["playerInventoryChanged", FUNC(storeParachute) ] call EFUNC(common,addEventHandler); diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index f446d955b8..7bc0823215 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -22,5 +22,7 @@ PREP(handleInfoDisplayChanged); PREP(hideAltimeter); PREP(onEachFrame); PREP(showAltimeter); - +PREP(cutParachute); +PREP(checkCutParachute); +PREP(storeParachute); ADDON = true; diff --git a/addons/parachute/XEH_respawn.sqf b/addons/parachute/XEH_respawn.sqf new file mode 100644 index 0000000000..31e3ff2ae2 --- /dev/null +++ b/addons/parachute/XEH_respawn.sqf @@ -0,0 +1,17 @@ +/* + * Author: joko // Jonas + * Reset the parachute system. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * None + * + * Public: No + */ +#include "script_component.hpp" +ACE_player setVariable [QGVAR(chuteIsCut), false]; \ No newline at end of file diff --git a/addons/parachute/functions/fnc_checkCutParachute.sqf b/addons/parachute/functions/fnc_checkCutParachute.sqf new file mode 100644 index 0000000000..8301007fa3 --- /dev/null +++ b/addons/parachute/functions/fnc_checkCutParachute.sqf @@ -0,0 +1,19 @@ +/* + * Author: joko // Jonas + * Reset the parachute system. + * + * Arguments: + * 0: Object + * + * Return Value: + * Boolean + * + * Example: + * [player] call FUNC(checkCutParachute); + * + * Public: No + */ +#include "script_component.hpp" +private["_unit"]; +_unit = _this select 0; +(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getvariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) \ No newline at end of file diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf new file mode 100644 index 0000000000..e594e28223 --- /dev/null +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -0,0 +1,22 @@ +/* + * Author: joko // Jonas + * Cut Parachute and delete Old + * + * Arguments: + * 0: Object + * + * Return Value: + * Nothing + * + * Example: + * [player] call FUNC(cutParachute); + * + * Public: No + */ +#include "script_component.hpp" +private["_unit","_vehicle"]; +_unit = _this select 0; +_vehicle = vehicle _unit; +_unit action ["GetOut", _vehicle]; +deleteVehicle _vehicle; +_unit setVariable [QGVAR(chuteIsCut), true, true]; diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf index a620c5a4ca..7a90a1f12c 100644 --- a/addons/parachute/functions/fnc_doLanding.sqf +++ b/addons/parachute/functions/fnc_doLanding.sqf @@ -14,13 +14,14 @@ * Public: No */ #include "script_component.hpp" -private ["_unit"]; +private["_unit"]; _unit = _this select 0; GVAR(PFH) = false; [_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation); +_unit setVariable [QGVAR(chuteIsCut), false, true]; [{ if (ACE_time >= ((_this select 0) select 0) + 1) then { ((_this select 0) select 1) playActionNow "Crouch"; [(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler); }; -}, 1, [ACE_time,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler); +}, 1, [ACE_time,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index 9960e3f727..28909f19cd 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -49,4 +49,4 @@ GVAR(AltimeterActive) = true; (_this select 0) set [2, _height]; (_this select 0) set [3, _curTime]; -}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(cba_fnc_addPerFrameHandler); +}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf new file mode 100644 index 0000000000..baa93bbae0 --- /dev/null +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -0,0 +1,30 @@ +/* + * Author: joko // Jonas + * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit + * + * Arguments: + * None + * + * Return Value: + * 0: Unit + * 1: getAllGear-Array + * + * Example: + * None + * + * Public: No + */ +#include "script_component.hpp" +private ["_unit","_backpack"]; +_unit = _this select 0; +_backpack = (_this select 1) select 6; +if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then { + _unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); +} else { + if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then { + _unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true]; + }; + if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then { + _unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true]; + }; +}; diff --git a/addons/parachute/script_component.hpp b/addons/parachute/script_component.hpp index 0b0493b202..93a3e0d363 100644 --- a/addons/parachute/script_component.hpp +++ b/addons/parachute/script_component.hpp @@ -1,3 +1,4 @@ +#define DEBUG_ENABLED_PARACHUTE #define COMPONENT parachute #include "\z\ace\addons\main\script_mod.hpp" @@ -10,3 +11,7 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + + +#define MACRO_HASRESERVE ace_hasReserveParachute = 1; \ + ace_reserveParachute = "ACE_ReserveParachute"; diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index d3cdbd9a7d..8a4b2d766c 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -49,5 +49,15 @@ Paracadute non manovrabile Para-querdas não controlável + + Cut Parachute + Fallschirm abschneiden + Odetnij spadochron + + + Reserve Parachute + Reserve Fallschirm + Spadochron awaryjny + - + \ No newline at end of file diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp index a5832756ff..9e0793e36b 100644 --- a/addons/rangecard/CfgVehicles.hpp +++ b/addons/rangecard/CfgVehicles.hpp @@ -53,10 +53,7 @@ class CfgVehicles { displayName = "Range Card"; vehicleClass = "Items"; class TransportItems { - class ACE_RangeCard { - name = "ACE_RangeCard"; - count = 1; - }; + MACRO_ADDITEM(ACE_RangeCard,1); }; }; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index b5ec9683f4..04317d46d7 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -149,7 +149,7 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t _barometricPressure = 1013.25; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _barometricPressure = 1013.25 * (1 - (0.0065 * EGVAR(weather,altitude)) / 288.15) ^ 5.255754495; + _barometricPressure = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495; }; _relativeHumidity = 0.5; diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml index 535059456e..bda93bcab3 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -6,42 +6,56 @@ Tabela balistyczna Tarjeta de distancias Vzdálenostní tabulka + Entfernungsspinne + Tabela de distâncias 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) + 50-Meter-Schritte MRAD/MRAD (Fadenkreuz/Geschützturm) + Incrementos de 50 METROS - MRAD/MRAD (retícula/torres) Open Range Card Otwórz tabelę balistyczną Abrir tarjeta de distancias Otevřít vzdálenostní tabulku + Öffne Entfernungsspinne + Abrir tabela de distâncias Open Range Card Copy Otwórz kopię tabeli balistycznej Abrir copia de tarjeta de distancias Otevřít kopii vzdálenostní tabulky + Öffne Kopie der Entfernungsspinne + Abrir cópia da tabela de distâncias Open Range Card Otwórz tabelę balistyczną Abrir tarjeta de distancias Otevřít vzdálenostní tabulku + Öffne Entfernungsspinne + Abrir tabela de distäncias Open Range Card Copy Otwórz kopię tabeli balistycznej Abrir copia de tarjeta de distancias Otevřít kopii vzdálenostní tabulky + Öffne Kopie der Entfernungsspinne + Abrir cópia da tabela de distâncias Copy Range Card Skopiuj tabelę balistyczną Copiar tarjeta de distancias Kopírovat vzdálenostní tabulku + Kopiere Entfernungsspinne + Copiar tabela de distäncias - \ No newline at end of file + diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf index 745bb2a5cb..ce7b743df5 100644 --- a/addons/reloadlaunchers/functions/fnc_load.sqf +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -38,7 +38,7 @@ _onSuccess = { }; _onFailure = { - [localize LESTRING(common,ActionAborted)] call DEFUNC(common,displayTextStructured); + [localize ELSTRING(common,ActionAborted)] call DEFUNC(common,displayTextStructured); }; _condition = { diff --git a/addons/repair/$PBOPREFIX$ b/addons/repair/$PBOPREFIX$ new file mode 100644 index 0000000000..d8fbd51195 --- /dev/null +++ b/addons/repair/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\repair \ No newline at end of file diff --git a/addons/repair/ACE_Repair.hpp b/addons/repair/ACE_Repair.hpp new file mode 100644 index 0000000000..c12566d5b1 --- /dev/null +++ b/addons/repair/ACE_Repair.hpp @@ -0,0 +1,70 @@ +class ACE_Repair { + class Actions { + class ReplaceWheel { + displayName = CSTRING(ReplaceWheel); + displayNameProgress = CSTRING(ReplacingWheel); + + locations[] = {"All"}; + requiredEngineer = QGVAR(engineerSetting_Wheel); + repairingTime = 10; + repairingTimeSelfCoef = 1; + items[] = {"ToolKit"}; + condition = QUOTE(call FUNC(canReplaceWheel)); + itemConsumed = 0; + + callbackSuccess = QUOTE(call FUNC(doReplaceWheel)); + callbackFailure = ""; + callbackProgress = ""; + + animationCaller = "Acts_carFixingWheel"; + animationCallerProne = "Acts_carFixingWheel"; + animationCallerSelf = "Acts_carFixingWheel"; + animationCallerSelfProne = "Acts_carFixingWheel"; + litter[] = {}; + }; + class RemoveWheel: ReplaceWheel { + displayName = CSTRING(RemoveWheel); + displayNameProgress = CSTRING(RemovingWheel); + condition = QUOTE(call FUNC(canRemove)); + callbackSuccess = QUOTE(call FUNC(doRemoveWheel)); + }; + class MiscRepair: ReplaceWheel { + displayName = CSTRING(Repairing); // let's make empty string an auto generated string + displayNameProgress = CSTRING(RepairingHitPoint); + condition = QUOTE((_target getHitPointDamage _hitPoint) > ([_caller] call FUNC(getPostRepairDamage))); + requiredEngineer = 0; + repairingTime = 15; + callbackSuccess = QUOTE(call FUNC(doRepair)); + }; + class RepairTrack: MiscRepair { + displayName = CSTRING(Repairing); + displayNameProgress = CSTRING(RepairingHitPoint); + condition = QUOTE(call FUNC(canRepairTrack)); + callbackSuccess = QUOTE(call FUNC(doRepairTrack)); + requiredEngineer = QGVAR(engineerSetting_Wheel); + }; + class RemoveTrack: MiscRepair { + displayName = CSTRING(RemoveTrack); + displayNameProgress = CSTRING(RemovingTrack); + condition = QUOTE(call FUNC(canRemove)); + callbackSuccess = QUOTE(call FUNC(doRemoveTrack)); + requiredEngineer = QGVAR(engineerSetting_Wheel); + }; + class ReplaceTrack: RemoveTrack { + displayName = CSTRING(ReplaceTrack); + displayNameProgress = CSTRING(ReplacingTrack); + condition = QUOTE(call FUNC(canReplaceTrack)); + callbackSuccess = QUOTE(call FUNC(doReplaceTrack)); + requiredEngineer = QGVAR(engineerSetting_Wheel); + }; + class FullRepair: MiscRepair { + displayName = CSTRING(fullRepair); + displayNameProgress = CSTRING(fullyRepairing); + requiredEngineer = QGVAR(engineerSetting_fullRepair); + repairLocations[] = {QGVAR(fullRepairLocation)}; + repairingTime = 30; + condition = "damage (_this select 1) > 0"; + callbackSuccess = QUOTE(call FUNC(doFullRepair)); + }; + }; +}; diff --git a/addons/repair/ACE_Settings.hpp b/addons/repair/ACE_Settings.hpp new file mode 100644 index 0000000000..e956e853de --- /dev/null +++ b/addons/repair/ACE_Settings.hpp @@ -0,0 +1,64 @@ +class ACE_Settings { + class GVAR(DisplayTextOnRepair) { + displayName = CSTRING(SettingDisplayTextName); + description = CSTRING(SettingDisplayTextDesc); + typeName = "BOOL"; + isClientSettable = 1; + value = 1; + category = CSTRING(categoryName); + }; + class GVAR(engineerSetting_Repair) { + displayName = CSTRING(enginerSetting_Repair_name); + description = CSTRING(enginerSetting_Repair_description); + typeName = "SCALAR"; + value = 1; + values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; + category = CSTRING(categoryName); + }; + class GVAR(engineerSetting_Wheel) { + displayName = CSTRING(enginerSetting_Wheel_name); + description = CSTRING(enginerSetting_Wheel_description); + typeName = "SCALAR"; + value = 0; + values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; + category = CSTRING(categoryName); + }; + class GVAR(repairDamageThreshold) { + displayName = CSTRING(repairDamageThreshold_name); + description = CSTRING(repairDamageThreshold_description); + typeName = "SCALAR"; + value = 0.6; + category = CSTRING(categoryName); + }; + class GVAR(repairDamageThreshold_Engineer) { + displayName = CSTRING(repairDamageThreshold_Engineer_name); + description = CSTRING(repairDamageThreshold_Engineer_description); + typeName = "SCALAR"; + value = 0.4; + category = CSTRING(categoryName); + }; + class GVAR(consumeItem_ToolKit) { + displayName = CSTRING(consumeItem_ToolKit_name); + description = CSTRING(consumeItem_ToolKit_description); + typeName = "SCALAR"; + value = 1; + values[] = {ECSTRING(common,No), ECSTRING(common,Yes)}; + category = CSTRING(categoryName); + }; + class GVAR(fullRepairLocation) { + displayName = CSTRING(fullRepairLocation); + description = CSTRING(fullRepairLocation_description); + typeName = "SCALAR"; + value = 2; + values[] = {CSTRING(useAnywhere), CSTRING(repairVehicleOnly), CSTRING(repairFacilityOnly), CSTRING(vehicleAndFacility), ECSTRING(common,Disabled)}; + category = CSTRING(categoryName); + }; + class GVAR(engineerSetting_fullRepair) { + displayName = CSTRING(engineerSetting_fullRepair_name); + description = CSTRING(engineerSetting_fullRepair_description); + typeName = "SCALAR"; + value = 3; + values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; + category = CSTRING(categoryName); + }; +}; diff --git a/addons/repair/CfgActions.hpp b/addons/repair/CfgActions.hpp new file mode 100644 index 0000000000..5dbd0ca7a6 --- /dev/null +++ b/addons/repair/CfgActions.hpp @@ -0,0 +1,9 @@ +class CfgActions { + class None; + class Repair: None { + show = 0; + }; + class RepairVehicle: None { + show = 0; + }; +}; diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp new file mode 100644 index 0000000000..27e14937cf --- /dev/null +++ b/addons/repair/CfgEventHandlers.hpp @@ -0,0 +1,48 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; + +class Extended_Init_EventHandlers { + class Car { + class ADDON { + init = QUOTE(_this call DFUNC(addRepairActions)); + }; + }; + + class Tank { + class ADDON { + init = QUOTE(_this call DFUNC(addRepairActions)); + }; + }; + + class Helicopter { + class ADDON { + init = QUOTE(_this call DFUNC(addRepairActions)); + }; + }; + + class Plane { + class ADDON { + init = QUOTE(_this call DFUNC(addRepairActions)); + }; + }; + + class Ship_F { + class ADDON { + init = QUOTE(_this call DFUNC(addRepairActions)); + }; + }; + class ACE_RepairItem_Base { + class ADDON { + init = QUOTE(if (!isnil QUOTE(QEFUNC(cargo,initObject))) then {_this call EFUNC(cargo,initObject)}); + }; + }; +}; diff --git a/addons/repair/CfgVehicleClasses.hpp b/addons/repair/CfgVehicleClasses.hpp new file mode 100644 index 0000000000..585b8f2858 --- /dev/null +++ b/addons/repair/CfgVehicleClasses.hpp @@ -0,0 +1,5 @@ +class CfgVehicleClasses { + class GVAR(items) { + displayName = "ACE"; + }; +}; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp new file mode 100644 index 0000000000..f24cd9bc9a --- /dev/null +++ b/addons/repair/CfgVehicles.hpp @@ -0,0 +1,338 @@ +#define MACRO_REPAIRVEHICLE \ + class ACE_Actions { \ + class ACE_MainActions { \ + class GVAR(Repair) { \ + displayName = CSTRING(Repair); \ + condition = "true"; \ + statement = ""; \ + runOnHover = 1; \ + showDisabled = 0; \ + priority = 2; \ + icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \ + distance = 4; \ + }; \ + }; \ + }; + +class CfgVehicles { + class ACE_Module; + // @todo localization for all the modules + class ACE_moduleRepairSettings: ACE_Module { + scope = 2; + displayName = CSTRING(moduleName); + icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); //@todo + category = "ACE"; + function = QFUNC(moduleRepairSettings); + functionPriority = 1; + isGlobal = 1; + isTriggerActivated = 0; + author = ECSTRING(Common,ACETeam); + class Arguments { + class engineerSetting_Repair { + displayName = CSTRING(enginerSetting_Repair_name); + description = CSTRING(enginerSetting_Repair_description); + typeName = "NUMBER"; + class values { + class anyone { name = CSTRING(engineerSetting_anyone); value = 0; }; + class Engineer { name = CSTRING(engineerSetting_EngineerOnly); value = 1; default = 1; }; + class Special { name = CSTRING(engineerSetting_RepairSpecialistOnly); value = 2; }; + }; + }; + class engineerSetting_Wheel { + displayName = CSTRING(enginerSetting_Wheel_name); + description = CSTRING(enginerSetting_Wheel_description); + typeName = "NUMBER"; + class values { + class anyone { name = CSTRING(engineerSetting_anyone); value = 0; default = 1; }; + class Engineer { name = CSTRING(engineerSetting_EngineerOnly); value = 1; }; + class Special { name = CSTRING(engineerSetting_RepairSpecialistOnly); value = 2; }; + }; + }; + class repairDamageThreshold { + displayName = CSTRING(repairDamageThreshold_name); + description = CSTRING(repairDamageThreshold_description); + typeName = "NUMBER"; + defaultValue = 0.6; + }; + class repairDamageThreshold_Engineer { + displayName = CSTRING(repairDamageThreshold_Engineer_name); + description = CSTRING(repairDamageThreshold_Engineer_description); + typeName = "NUMBER"; + defaultValue = 0.4; + }; + class consumeItem_ToolKit { + displayName = CSTRING(consumeItem_ToolKit_name); + description = CSTRING(consumeItem_ToolKit_description); + typeName = "NUMBER"; + class values { + class keep { name = ECSTRING(common,No); value = 0; default = 1; }; + class remove { name = ECSTRING(common,Yes); value = 1; }; + }; + }; + class fullRepairLocation { + displayName = CSTRING(fullRepairLocation); + description = CSTRING(fullRepairLocation_description); + typeName = "NUMBER"; + class values { + class anywhere { name = CSTRING(useAnywhere); value = 0; }; + class vehicle { name = CSTRING(repairVehicleOnly); value = 1; }; + class facility { name = CSTRING(repairFacilityOnly); value = 2; default = 1; }; + class vehicleAndFacility { name = CSTRING(vehicleAndFacility); value = 3; }; + class disabled { name = ECSTRING(common,Disabled); value = 4;}; + }; + }; + class engineerSetting_fullRepair { + displayName = CSTRING(engineerSetting_fullRepair_name); + description = CSTRING(engineerSetting_fullRepair_description); + typeName = "NUMBER"; + class values { + class anyone { name = CSTRING(engineerSetting_anyone); value = 0; }; + class Engineer { name = CSTRING(engineerSetting_EngineerOnly); value = 1; }; + class Special { name = CSTRING(engineerSetting_RepairSpecialistOnly); value = 2; default = 1;}; + }; + }; + }; + class ModuleDescription { + description = CSTRING(moduleDescription); + sync[] = {}; + }; + }; + + class Module_F; + class ACE_moduleAssignEngineerRoles: Module_F { + scope = 2; + displayName = CSTRING(AssignEngineerRole_Module_DisplayName); + icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); + category = "ACE"; + function = QFUNC(moduleAssignEngineer); + functionPriority = 10; + isGlobal = 2; + isTriggerActivated = 0; + isDisposable = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class EnableList { + displayName = CSTRING(AssignEngineerRole_EnableList_DisplayName); + description = CSTRING(AssignEngineerRole_EnableList_Description); + defaultValue = ""; + typeName = "STRING"; + }; + class role { + displayName = CSTRING(AssignEngineerRole_role_DisplayName); + description = CSTRING(AssignEngineerRole_role_Description); + typeName = "NUMBER"; + class values { + class none { + name = CSTRING(AssignEngineerRole_role_none); + value = 0; + }; + class medic { + name = CSTRING(AssignEngineerRole_role_engineer); + value = 1; + default = 1; + }; + class doctor { + name = CSTRING(AssignEngineerRole_role_specialist); + value = 2; + }; + }; + }; + }; + class ModuleDescription { + description = CSTRING(AssignEngineerRole_Module_Description); + sync[] = {}; + }; + }; + class ACE_moduleAssignRepairVehicle: Module_F { + scope = 2; + displayName = CSTRING(AssignRepairVehicle_Module_DisplayName); + icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); + category = "ACE"; + function = QFUNC(moduleAssignRepairVehicle); + functionPriority = 10; + isGlobal = 2; + isTriggerActivated = 0; + isDisposable = 0; + author = ECSTRING(common,ACETeam); + class Arguments { + class EnableList { + displayName = CSTRING(AssignRepairVehicle_EnableList_DisplayName); + description = CSTRING(AssignRepairVehicle_EnableList_Description); + defaultValue = ""; + typeName = "STRING"; + }; + class role { + displayName = CSTRING(AssignRepairVehicle_role_DisplayName); + description = CSTRING(AssignRepairVehicle_role_Description); + typeName = "NUMBER"; + class values { + class none { + name = ECSTRING(common,No); + value = 0; + }; + class isVehicle { + name = ECSTRING(common,Yes); + value = 1; + default = 1; + }; + }; + }; + }; + class ModuleDescription { + description = CSTRING(AssignRepairVehicle_Module_Description); + sync[] = {}; + }; + }; + class ACE_moduleAssignRepairFacility: ACE_moduleAssignRepairVehicle { + displayName = CSTRING(AssignRepairFacility_Module_DisplayName); + function = QFUNC(moduleAssignRepairFacility); + class Arguments { + class EnableList { + displayName = CSTRING(AssignRepairFacility_EnableList_DisplayName); + description = CSTRING(AssignRepairFacility_EnableList_Description); + defaultValue = ""; + typeName = "STRING"; + }; + class role { + displayName = CSTRING(AssignRepairFacility_role_DisplayName); + description = CSTRING(AssignRepairFacility_role_Description); + typeName = "NUMBER"; + class values { + class none { + name = ECSTRING(common,No); + value = 0; + }; + class isFacility { + name = ECSTRING(common,Yes); + value = 1; + default = 1; + }; + }; + }; + }; + class ModuleDescription { + description = CSTRING(AssignRepairFacility_Module_Description); + sync[] = {}; + }; + }; + + + class LandVehicle; + class Car: LandVehicle { + MACRO_REPAIRVEHICLE + class ACE_Cargo { + class Cargo { + class ACE_Wheel { + type = "ACE_Wheel"; + amount = 1; + }; + }; + }; + }; + + class Tank: LandVehicle { + MACRO_REPAIRVEHICLE + }; + + class Air; + class Helicopter: Air { + MACRO_REPAIRVEHICLE + }; + + class Plane: Air { + MACRO_REPAIRVEHICLE + }; + + class Ship; + class Ship_F: Ship { + MACRO_REPAIRVEHICLE + }; + + class thingX; + class ACE_RepairItem_Base: thingX { + XEH_ENABLED; + icon = "iconObject_circle"; + mapSize = 0.7; + accuracy = 0.2; + vehicleClass = QGVAR(items); + destrType = "DesturctNo"; + }; + + class ACE_Track: ACE_RepairItem_Base { + EGVAR(cargo,size) = 2; + EGVAR(cargo,canLoad) = 1; + author = "Hawkins"; + scope = 2; + model = QUOTE(PATHTOF(data\ace_track.p3d)); + displayName = "$STR_ACE_Repair_SpareTrack"; + }; + + class ACE_Wheel: ACE_RepairItem_Base { + EGVAR(cargo,size) = 1; + EGVAR(cargo,canLoad) = 1; + author = "Hawkins"; + scope = 2; + model = QUOTE(PATHTOF(data\ace_wheel.p3d)); + displayName = "$STR_ACE_Repair_SpareWheel"; + picture = QUOTE(PATHTOF(ui\tire_ca.paa)); + }; + + // disable vanilla repair + // "getNumber (_x >> ""transportRepair"") > 0" configClasses (configFile >> "CfgVehicles") + + class Slingload_01_Base_F; + class B_Slingload_01_Repair_F: Slingload_01_Base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class Heli_Transport_04_base_F; + class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class Pod_Heli_Transport_04_base_F; + class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class B_APC_Tracked_01_base_F; + class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class Offroad_01_base_F; + class Offroad_01_repair_base_F: Offroad_01_base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class B_Truck_01_mover_F; + class B_Truck_01_Repair_F: B_Truck_01_mover_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class B_Truck_01_fuel_F: B_Truck_01_mover_F { // the fuel hemet apparently can repair. GJ BI + transportRepair = 0; + }; + + class Truck_02_base_F; + class Truck_02_box_base_F: Truck_02_base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; + + class Truck_02_engineeral_base_F: Truck_02_box_base_F { + GVAR(canRepair) = 0; + }; + + class Truck_03_base_F; + class O_Truck_03_repair_F: Truck_03_base_F { + GVAR(canRepair) = 1; + transportRepair = 0; + }; +}; diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf new file mode 100644 index 0000000000..44ca157b0c --- /dev/null +++ b/addons/repair/XEH_postInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +["setVehicleDamage", {_this call FUNC(setDamage)}] call EFUNC(common,addEventHandler); +["setVehicleHitPointDamage", {_this call FUNC(setHitPointDamage)}] call EFUNC(common,addEventHandler); + +// wheels +["setWheelHitPointDamage", {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call EFUNC(common,addEventHandler); diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf new file mode 100644 index 0000000000..ebf4c87537 --- /dev/null +++ b/addons/repair/XEH_preInit.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(addRepairActions); +PREP(canRemove); +PREP(canRepair); +PREP(canRepairTrack); +PREP(canReplaceTrack); +PREP(canReplaceWheel); +PREP(doFullRepair); +PREP(doRemoveTrack); +PREP(doRemoveWheel); +PREP(doRepair); +PREP(doRepairTrack); +PREP(doReplaceTrack); +PREP(doReplaceWheel); +PREP(getPostRepairDamage); +PREP(getWheelHitPointsWithSelections); +PREP(hasItems); +PREP(isEngineer); +PREP(isInRepairFacility); +PREP(isNearRepairVehicle); +PREP(isRepairVehicle); +PREP(moduleAssignEngineer); +PREP(moduleAssignRepairVehicle); +PREP(moduleAssignRepairFacility); +PREP(moduleRepairSettings); +PREP(normalizeHitPoints); +PREP(repair); +PREP(repair_failure); +PREP(repair_success); +PREP(setDamage); +PREP(setHitPointDamage); +PREP(spawnObject); +PREP(useItem); +PREP(useItems); + +ADDON = true; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp new file mode 100644 index 0000000000..d97f9e30e5 --- /dev/null +++ b/addons/repair/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {"ACE_Wheel", "ACE_Track"}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"commy2", "Glowbal"}; + authorUrl = "https://ace3mod.com"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" + +#include "CfgActions.hpp" +#include "CfgVehicleClasses.hpp" +#include "CfgVehicles.hpp" + +#include "ACE_Settings.hpp" +#include "ACE_Repair.hpp" diff --git a/addons/repair/data/ace_track.p3d b/addons/repair/data/ace_track.p3d new file mode 100644 index 0000000000..86b07f0ef8 Binary files /dev/null and b/addons/repair/data/ace_track.p3d differ diff --git a/addons/repair/data/ace_wheel.p3d b/addons/repair/data/ace_wheel.p3d new file mode 100644 index 0000000000..f2b07b066f Binary files /dev/null and b/addons/repair/data/ace_wheel.p3d differ diff --git a/addons/repair/data/trailObjects.rvmat b/addons/repair/data/trailObjects.rvmat new file mode 100644 index 0000000000..4fa521f376 --- /dev/null +++ b/addons/repair/data/trailObjects.rvmat @@ -0,0 +1,99 @@ +#define _ARMA_ + +class StageTI +{ + texture = "a3\data_f\default_ti_ca.paa"; +}; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,0}; +specular[] = {0.0099999998,0.0099999998,0.0099999998,0.0099999998}; +specularPower = 500; +PixelShaderID = "Super"; +VertexShaderID = "Super"; +class Stage1 +{ + texture = "z\ace\addons\repair\data\trailObjects_nohq.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 +{ + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage3 +{ + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage4 +{ + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage5 +{ + texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage6 +{ + texture = "#(ai,64,64,1)fresnelGlass(2)"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage7 +{ + useWorldEnvMap = "true"; + texture = "a3\data_f\env_land_ca.paa"; + uvSource = "tex"; + class uvTransform + { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/repair/data/trailObjects_co.paa b/addons/repair/data/trailObjects_co.paa new file mode 100644 index 0000000000..25f2c4c1c0 Binary files /dev/null and b/addons/repair/data/trailObjects_co.paa differ diff --git a/addons/repair/data/trailObjects_nohq.paa b/addons/repair/data/trailObjects_nohq.paa new file mode 100644 index 0000000000..fc10e94aea Binary files /dev/null and b/addons/repair/data/trailObjects_nohq.paa differ diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf new file mode 100644 index 0000000000..3503dff3f0 --- /dev/null +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -0,0 +1,129 @@ +/* + * Author: commy2 + * Checks if the vehicles class already has the actions initialized, otherwise add all available repair options. Calleed from init EH. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Example: + * [vehicle] call ace_repair_fnc_addRepairActions + * + * Public: No + */ +#include "script_component.hpp" +#define TRACK_HITPOINTS ["HitLTrack", "HitRTrack"] + +params ["_vehicle"]; +TRACE_1("params", _vehicle); + +private ["_type", "_initializedClasses"]; + +_type = typeOf _vehicle; + +_initializedClasses = GETMVAR(GVAR(initializedClasses),[]); + +// do nothing if the class is already initialized +if (_type in _initializedClasses) exitWith {}; +// get all hitpoints +private "_hitPoints"; +_hitPoints = [_vehicle] call EFUNC(common,getHitPointsWithSelections) select 0; + +// get hitpoints of wheels with their selections +private ["_wheelHitPointsWithSelections", "_wheelHitPoints", "_wheelHitPointSelections"]; + +_wheelHitPointsWithSelections = [_vehicle] call FUNC(getWheelHitPointsWithSelections); + +_wheelHitPoints = _wheelHitPointsWithSelections select 0; +_wheelHitPointSelections = _wheelHitPointsWithSelections select 1; + +// add repair events to this vehicle class +{ + if (_x in _wheelHitPoints) then { + // add wheel repair action + + private ["_icon", "_selection"]; + + _icon = QUOTE(PATHTOF(ui\tire_ca.paa)); + _icon = "A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; + // textDefault = ""; + _selection = _wheelHitPointSelections select (_wheelHitPoints find _x); + + private ["_name", "_text", "_condition", "_statement"]; + + // remove wheel action + _name = format ["Remove_%1", _x]; + _text = localize "STR_ACE_Repair_RemoveWheel"; + + _condition = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(canRepair)}; + _statement = {[_this select 1, _this select 0, _this select 2 select 0, "RemoveWheel"] call DFUNC(repair)}; + + private "_action"; + _action = [_name, _text, _icon, _statement, _condition, {}, [_x], _selection, 2] call EFUNC(interact_menu,createAction); + [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); + + // replace wheel action + _name = format ["Replace_%1", _x]; + _text = localize LSTRING(ReplaceWheel); + + _condition = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(canRepair)}; + _statement = {[_this select 1, _this select 0, _this select 2 select 0, "ReplaceWheel"] call DFUNC(repair)}; + + _action = [_name, _text, _icon, _statement, _condition, {}, [_x], _selection, 2] call EFUNC(interact_menu,createAction); + [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); + + } else { + // exit if the hitpoint is in the blacklist, e.g. glasses + if (_x in IGNORED_HITPOINTS) exitWith {}; + + // exit if the hitpoint is virtual + if (isText (configFile >> "CfgVehicles" >> _type >> "HitPoints" >> _x >> "depends")) exitWith {}; + + // add misc repair action + + private ["_name", "_text", "_icon", "_selection", "_condition", "_statement"]; + + _name = format ["Repair_%1", _x]; + + _text = format ["STR_ACE_Repair_%1", _x]; + + if (isLocalized _text) then { + _text = format [localize LSTRING(RepairHitpoint), localize _text]; + } else { + _text = format [localize LSTRING(RepairHitpoint), _x]; + }; + + _icon = "A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; + _selection = ""; + _condition = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(canRepair)}; + _statement = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(repair)}; + + if (_x in TRACK_HITPOINTS) then { + if (_x == "HitLTrack") then { + _selection = [-1.75, 0, -1.75]; + } else { + _selection = [1.75, 0, -1.75]; + }; + private "_action"; + _action = [_name, _text, _icon, _statement, _condition, {}, [_x, "RepairTrack"], _selection, 4] call EFUNC(interact_menu,createAction); + [_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass); + } else { + private "_action"; + _action = [_name, _text, _icon, _statement, _condition, {}, [_x, "MiscRepair"], _selection, 4] call EFUNC(interact_menu,createAction); + [_type, 0, ["ACE_MainActions", QGVAR(Repair)], _action] call EFUNC(interact_menu,addActionToClass); + }; + }; +} forEach _hitPoints; + +private ["_action", "_condition", "_statement"]; + +_condition = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(canRepair)}; +_statement = {[_this select 1, _this select 0, _this select 2 select 0, _this select 2 select 1] call DFUNC(repair)}; +_action = [QGVAR(fullRepair), localize LSTRING(fullRepair), "A3\ui_f\data\igui\cfg\actions\repair_ca.paa", _statement, _condition, {}, ["", "fullRepair"], "", 4] call EFUNC(interact_menu,createAction); +[_type, 0, ["ACE_MainActions", QGVAR(Repair)], _action] call EFUNC(interact_menu,addActionToClass); +// set class as initialized +_initializedClasses pushBack _type; + +SETMVAR(GVAR(initializedClasses),_initializedClasses); diff --git a/addons/repair/functions/fnc_canRemove.sqf b/addons/repair/functions/fnc_canRemove.sqf new file mode 100644 index 0000000000..9fa657a2bb --- /dev/null +++ b/addons/repair/functions/fnc_canRemove.sqf @@ -0,0 +1,23 @@ +/* + * Author: commy2 + * Check if the unit can remove given wheel/track of the vehicle. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * + * Return Value: + * Can Remove + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_canRemove + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_target", "_hitPoint"]; +TRACE_3("params",_unit,_target,_hitPoint); + +alive _target && {_target getHitPointDamage _hitPoint < 1} diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf new file mode 100644 index 0000000000..bb44a3dcd4 --- /dev/null +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -0,0 +1,94 @@ +/* + * Author: Glowbal + * Check if the repair action can be performed. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * 3: Repair Action Classname + * + * Return Value: + * Can Repair + * + * Example: + * ["something", player] call ace_repair_fnc_canRepair + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_caller", "_target", "_hitPoint", "_className"]; +TRACE_4("params",_caller,_target,_hitPoint,_className); + +private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition"]; + +_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +if !(isClass _config) exitwith {false}; // or go for a default? +if(isEngineOn _target) exitwith {false}; + +_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { + getNumber (_config >> "requiredEngineer"); +} else { + // Check for required class + if (isText (_config >> "requiredEngineer")) exitwith { + missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0]; + }; + 0; +}; +if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false}; + +_items = getArray (_config >> "items"); +if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false}; + +_return = true; +if (getText (_config >> "condition") != "") then { + _condition = getText (_config >> "condition"); + if (isnil _condition) then { + _condition = compile _condition; + } else { + _condition = missionNamespace getVariable _condition; + }; + if (typeName _condition == "BOOL") then { + _return = _condition; + } else { + _return = [_caller, _target, _hitPoint, _className] call _condition; + }; +}; + +if (!_return) exitwith {false}; + +_vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then { + missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0] +} else { + getNumber(_config >> "vehicleStateCondition") +}; +// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; + +_locations = getArray (_config >> "repairLocations"); +if ("All" in _locations) exitwith {true}; + +private ["_repairFacility", "_repairVeh"]; +_repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))}; +_repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))}; + +{ + if (_x == "field") exitwith {_return = true;}; + if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;}; + if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;}; + if !(isnil _x) exitwith { + private "_val"; + _val = missionNamespace getVariable _x; + if (typeName _val == "SCALAR") then { + _return = switch (_val) do { + case 0: {true}; //useAnywhere + case 1: {call _repairVeh}; //repairVehicleOnly + case 2: {call _repairFacility}; //repairFacilityOnly + case 3: {(call _repairFacility) || {call _repairVeh}}; //vehicleAndFacility + default {false}; //Disabled + }; + }; + }; +} forEach _locations; + +_return && alive _target; diff --git a/addons/repair/functions/fnc_canRepairTrack.sqf b/addons/repair/functions/fnc_canRepairTrack.sqf new file mode 100644 index 0000000000..34165068d7 --- /dev/null +++ b/addons/repair/functions/fnc_canRepairTrack.sqf @@ -0,0 +1,41 @@ +/* + * Author: commy2 + * Check if the unit can replace given wheel of the vehicle. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_canRepairTrack + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_target", "_hitPoint", ["_wheel",false]]; +TRACE_4("params",_unit,_target,_hitPoint,_wheel); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action + +if (typeName _wheel == "OBJECT") then { + // not near interpret as objNull + if !(_wheel in nearestObjects [_unit, ["ACE_Track"], 5]) then { + _wheel = objNull; + }; +} else { + _wheel = objNull; + + { + if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith { + _wheel = _x; + }; + } forEach nearestObjects [_unit, ["ACE_Track"], 5]; +}; + +if (isNull _wheel || damage _wheel >= 1) exitWith {false}; + +alive _target && {_target getHitPointDamage _hitPoint > 0} diff --git a/addons/repair/functions/fnc_canReplaceTrack.sqf b/addons/repair/functions/fnc_canReplaceTrack.sqf new file mode 100644 index 0000000000..94a62a5289 --- /dev/null +++ b/addons/repair/functions/fnc_canReplaceTrack.sqf @@ -0,0 +1,42 @@ +/* + * Author: commy2 + * Check if the unit can replace given wheel of the vehicle. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * 3: Track / (default: false) + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_canReplaceTrack + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_target", "_hitPoint", ["_track", false]]; +TRACE_4("params",_unit,_target,_hitPoint,_track); +// TODO [_unit, _track] call EFUNC(common,claim); on start of action + +if (typeName _track == "OBJECT") then { + // not near interpret as objNull + if !(_track in nearestObjects [_unit, ["ACE_Track"], 5]) then { + _track = objNull; + }; +} else { + _track = objNull; + + { + if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith { + _track = _x; + }; + } forEach nearestObjects [_unit, ["ACE_Track"], 5]; +}; + +if (isNull _track) exitWith {false}; + +alive _target && {_target getHitPointDamage _hitPoint >= 1} diff --git a/addons/repair/functions/fnc_canReplaceWheel.sqf b/addons/repair/functions/fnc_canReplaceWheel.sqf new file mode 100644 index 0000000000..9497504370 --- /dev/null +++ b/addons/repair/functions/fnc_canReplaceWheel.sqf @@ -0,0 +1,48 @@ +/* + * Author: commy2 + * Check if the unit can replace given wheel of the vehicle. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * 3: Wheel / (default: false) + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_canReplaceWheel + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_target", "_hitPoint", ["_wheel", false]]; +TRACE_4("params",_unit,_target,_hitPoint,_wheel); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action +//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitwith {false}; + +//if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; + +//if !([_unit, GVAR(engineerSetting_Wheel)] call FUNC(isEngineer)) exitWith {false}; + +// check for a near wheel +if (typeName _wheel == "OBJECT") then { + // not near interpret as objNull + if !(_wheel in nearestObjects [_unit, ["ACE_Wheel"], 5]) then { + _wheel = objNull; + }; +} else { + _wheel = objNull; + + { + if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith { + _wheel = _x; + }; + } forEach nearestObjects [_unit, ["ACE_Wheel"], 5]; +}; + +if (isNull _wheel) exitWith {false}; + +alive _target && {_target getHitPointDamage _hitPoint >= 1} diff --git a/addons/repair/functions/fnc_doFullRepair.sqf b/addons/repair/functions/fnc_doFullRepair.sqf new file mode 100644 index 0000000000..6beec4c4c7 --- /dev/null +++ b/addons/repair/functions/fnc_doFullRepair.sqf @@ -0,0 +1,23 @@ +/* + * Author: Glowbal + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_doFullRepair + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint"]; +TRACE_3("params",_unit,_vehicle,_hitPoint); + +_vehicle setDamage 0; diff --git a/addons/repair/functions/fnc_doRemoveTrack.sqf b/addons/repair/functions/fnc_doRemoveTrack.sqf new file mode 100644 index 0000000000..68755658ca --- /dev/null +++ b/addons/repair/functions/fnc_doRemoveTrack.sqf @@ -0,0 +1,44 @@ +/* + * Author: commy2 + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_doRemoveTrack + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint"]; +TRACE_3("params",_unit,_vehicle,_hitPoint); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action +// get current hitpoint damage +private "_hitPointDamage"; +_hitPointDamage = _vehicle getHitPointDamage _hitPoint; + +// can't remove destroyed or already removed wheel +if (_hitPointDamage >= 1) exitWith {}; + +// don't die by spawning / moving the wheel +["fixCollision", _unit] call EFUNC(common,localEvent); + +// spawn wheel +private "_wheel"; +_wheel = ["ACE_Track", getPosASL _unit] call FUNC(spawnObject); +_wheel setdamage _hitPointDamage; + +// raise event to set the new hitpoint damage +["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, 1]] call EFUNC(common,targetEvent); + +// display text message if enabled +if (GVAR(DisplayTextOnRepair)) then { + [localize LSTRING(RemovedTrack)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/repair/functions/fnc_doRemoveWheel.sqf b/addons/repair/functions/fnc_doRemoveWheel.sqf new file mode 100644 index 0000000000..0ffeb7ad23 --- /dev/null +++ b/addons/repair/functions/fnc_doRemoveWheel.sqf @@ -0,0 +1,44 @@ +/* + * Author: commy2 + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_doRemoveWheel + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint"]; +TRACE_3("params",_unit,_vehicle,_hitPoint); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action +// get current hitpoint damage +private "_hitPointDamage"; +_hitPointDamage = _vehicle getHitPointDamage _hitPoint; + +// can't remove destroyed or already removed wheel +if (_hitPointDamage >= 1) exitWith {}; + +// don't die by spawning / moving the wheel +["fixCollision", _unit] call EFUNC(common,localEvent); + +// spawn wheel +private "_wheel"; +_wheel = ["ACE_Wheel", getPosASL _unit] call FUNC(spawnObject); +_wheel setdamage _hitPointDamage; + +// raise event to set the new hitpoint damage +["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, 1]] call EFUNC(common,targetEvent); + +// display text message if enabled +if (GVAR(DisplayTextOnRepair)) then { + [localize LSTRING(RemovedWheel)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf new file mode 100644 index 0000000000..dfc21830c9 --- /dev/null +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -0,0 +1,46 @@ +/* + * Author: commy2 + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_doRepair + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint"]; +TRACE_3("params",_unit,_vehicle,_hitPoint); + +// get current hitpoint damage +private "_hitPointDamage"; +_hitPointDamage = _vehicle getHitPointDamage _hitPoint; + +_hitPointDamage = _hitPointDamage - 0.5; +// don't use negative values for damage +_hitPointDamage = _hitPointDamage max ([_unit] call FUNC(getPostRepairDamage)); + +// raise event to set the new hitpoint damage +["setVehicleHitPointDamage", _vehicle, [_vehicle, _hitPoint, _hitPointDamage]] call EFUNC(common,targetEvent); + +// display text message if enabled +if (GVAR(DisplayTextOnRepair)) then { + private "_text"; + _text = format ["STR_ACE_Repair_%1", _hitPoint]; + + if (isLocalized _text) then { + _text = format [localize ([LSTRING(RepairedHitPointFully), LSTRING(RepairedHitPointPartially)] select (_hitPointDamage > 0)), localize _text]; + } else { + _text = localize ([LSTRING(RepairedFully), LSTRING(RepairedPartially)] select (_hitPointDamage > 0)); + }; + + [_text] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf new file mode 100644 index 0000000000..4803518e3d --- /dev/null +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -0,0 +1,53 @@ +/* + * Author: commy2 + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * 3: Repair Action Classname + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint", "classname"] call ace_repair_fnc_doRepairTrack + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint", "_classname"]; +TRACE_4("params",_unit,_vehicle,_hitPoint,_classname); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action + +private ["_hitPointDamage", "_newDamage", "_wheel"]; + +_wheel = objNull; + +{ + if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith { + _wheel = _x; + }; +} forEach nearestObjects [_unit, ["ACE_Track"], 5]; +if (isNull _wheel) exitwith {}; + +// get current hitpoint damage + +_hitPointDamage = _vehicle getHitPointDamage _hitPoint; +_newDamage = (1 - (damage _wheel)) / 4; // require 4 tracks to fully replace one side + +// can't replace a destroyed wheel +if ((damage _wheel) >= 1) exitWith {}; +// don't die by spawning / moving the wheel +_hitPointDamage = (_hitPointDamage - _newDamage) min 0; +deleteVehicle _wheel; + +// raise event to set the new hitpoint damage +["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, _hitPointDamage]] call EFUNC(common,targetEvent); + +// display text message if enabled +if (GVAR(DisplayTextOnRepair)) then { + [LSTRING(ReplacedTrack)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf new file mode 100644 index 0000000000..13e53b3f3a --- /dev/null +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -0,0 +1,56 @@ +/* + * Author: commy2 + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * 3: Repair Action Classname + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint", "classname"] call ace_repair_fnc_doReplaceTrack + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint", "_classname"]; +TRACE_4("params",_unit,_vehicle,_hitPoint,_classname); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action + +private["_hitPointDamage", "_wheel"]; + +_wheel = objNull; + +{ + if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith { + _wheel = _x; + }; +} forEach nearestObjects [_unit, ["ACE_Track"], 5]; +if (isNull _wheel) exitwith {}; + +// get current hitpoint damage +_hitPointDamage = _vehicle getHitPointDamage _hitPoint; + +// can't replace not destroyed wheel +if (_hitPointDamage < 1) exitWith {}; + +// don't die by spawning / moving the wheel +_hitPointDamage = damage _wheel; + +// can't replace a destroyed wheel +if (_hitPointDamage >= 1) exitWith {}; + +deleteVehicle _wheel; + +// raise event to set the new hitpoint damage +["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, _hitPointDamage]] call EFUNC(common,targetEvent); + +// display text message if enabled +if (GVAR(DisplayTextOnRepair)) then { + [LSTRING(ReplacedTrack)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf new file mode 100644 index 0000000000..62db39aa6d --- /dev/null +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -0,0 +1,56 @@ +/* + * Author: commy2 + * Called by repair action / progress bar. Raise events to set the new hitpoint damage. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 2: Selected hitpoint + * 3: Repair Action Classname + * + * Return Value: + * None + * + * Example: + * [unit, vehicle, "hitpoint", "classname"] call ace_repair_fnc_doReplaceWheel + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_vehicle", "_hitPoint", "_classname"]; +TRACE_4("params",_unit,_vehicle,_hitPoint,_classname); +// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action + +private ["_hitPointDamage", "_wheel"]; + +_wheel = objNull; + +{ + if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith { + _wheel = _x; + }; +} forEach nearestObjects [_unit, ["ACE_Wheel"], 5]; +if (isNull _wheel) exitwith {}; + +// get current hitpoint damage +_hitPointDamage = _vehicle getHitPointDamage _hitPoint; + +// can't replace not destroyed wheel +if (_hitPointDamage < 1) exitWith {}; + +// don't die by spawning / moving the wheel +_hitPointDamage = damage _wheel; + +// can't replace a destroyed wheel +if (_hitPointDamage >= 1) exitWith {}; + +deleteVehicle _wheel; + +// raise event to set the new hitpoint damage +["setWheelHitPointDamage", _vehicle, [_vehicle, _hitPoint, _hitPointDamage]] call EFUNC(common,targetEvent); + +// display text message if enabled +if (GVAR(DisplayTextOnRepair)) then { + [LSTRING(ReplacedWheel)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf new file mode 100644 index 0000000000..797f7a4f22 --- /dev/null +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -0,0 +1,26 @@ +/* + * Author: commy2 + * Returns the damage threshold based on settings and unit type. + * + * Arguments: + * 0: Unit that does the repairing + * + * Return Value: + * 0: Rpair Damage Threshold + * + * Example: + * [unit] call ace_repair_fnc_getPostRepairDamage + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; +TRACE_1("params",_unit); +// TODO when near repair station, full repair? + +if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitwith {0}; + +if ([_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold_Engineer)}; +if ([_unit, GVAR(engineerSetting_Repair)] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold)}; +0.3; diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf new file mode 100644 index 0000000000..182c6f54f0 --- /dev/null +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -0,0 +1,82 @@ +/* + * Author: commy2 + * Returns the wheel hitpoints and their selections. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * 0: Wheel hitpoints + * 1: Wheel hitpoint selections in model coordinates + * + * Example: + * [unit, vehicle, "hitpoint"] call ace_repair_fnc_getWheelHitPointsWithSelections + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle"]; +TRACE_1("params",_vehicle); + +// get the vehicles wheel config +private "_wheels"; +_wheels = configfile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; + +// exit with nothing if the vehicle has no wheels class +if !(isClass _wheels) exitWith {[[],[]]}; + +// get all wheels and read selections from config +private ["_selections", "_bones"]; + +_wheels = "true" configClasses _wheels; + +_selections = []; +_bones = []; +{ + _selections pushBack getText (_x >> "center"); + + private "_bone"; + _bone = getText (_x >> "boneName"); + + _bone = toArray _bone; + _bone resize count "wheel_X_Y"; // this is a requirement for physx. Should work for all addon vehicles. + _bone = toString _bone; + + _bones pushBack _bone; +} forEach _wheels; + +// get hitpoints with their fire geometry selections +private ["_hitPointsWithSelections", "_hitPoints", "_hitPointSelections"]; + +_hitPointsWithSelections = [_vehicle] call EFUNC(common,getHitPointsWithSelections); + +_hitPoints = _hitPointsWithSelections select 0; +_hitPointSelections = _hitPointsWithSelections select 1; + +// assign hitpoints to correct wheel selection by comparing bone name and fire geometry selection +private ["_wheelHitPoints", "_wheelHitPointSelections"]; + +_wheelHitPoints = []; +_wheelHitPointSelections = []; +{ + private "_bone"; + _bone = _x; + + private "_index"; + + _index = -1; + { + if (_bone != "" && {_x find _bone == 0}) exitWith { // same as above. Requirement for physx. + _index = _forEachIndex; + }; + } forEach _hitPointSelections; + + if (_index != -1) then { + _wheelHitPoints pushBack (_hitPoints select _index); + _wheelHitPointSelections pushBack (_selections select _forEachIndex); + }; + +} forEach _bones; + +[_wheelHitPoints, _wheelHitPointSelections] diff --git a/addons/repair/functions/fnc_hasItems.sqf b/addons/repair/functions/fnc_hasItems.sqf new file mode 100644 index 0000000000..2f070c8bb6 --- /dev/null +++ b/addons/repair/functions/fnc_hasItems.sqf @@ -0,0 +1,34 @@ +/* + * Author: Glowbal + * Check if the engineer has all items. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Items required + * + * Return Value: + * Has Items + * + * Example: + * [engineer, [items]] call ace_repair_fnc_hasItems + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", "_items"]; +TRACE_2("params",_unit,_items); + +private ["_return"]; + +_return = true; +{ + if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitwith { + _return = false; + }; + if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitwith { + _return = false; + }; +} forEach _items; + +_return; diff --git a/addons/repair/functions/fnc_isEngineer.sqf b/addons/repair/functions/fnc_isEngineer.sqf new file mode 100644 index 0000000000..9d6af3a1ff --- /dev/null +++ b/addons/repair/functions/fnc_isEngineer.sqf @@ -0,0 +1,29 @@ +/* + * Author: Glowbal, KoffeinFlummi, commy2 + * Check if a unit is any engineer class. + * + * Arguments: + * 0: Unit + * 1: Class (default: 1) + * + * Return Value: + * Is Engineer Class + * + * Example: + * [unit, 1] call ace_repair_fnc_isEngineer + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", ["_engineerN", 1]]; +TRACE_2("params",_unit,_engineerN); + +private ["_class"]; +_class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")]; + +// This if statement is here for copmatability with the common variant of isEngineer, which requires a bool. +// We cannot move this function to common because we require the GVAR(engineerSetting_Repair), which only makes sense to include in the repair module. +if (typeName _class == "BOOL") then {_class = 1}; + +_class >= (_engineerN min GVAR(engineerSetting_Repair)); diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf new file mode 100644 index 0000000000..0c062ff0b3 --- /dev/null +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal + * Checks if a unit is in a repair facility. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Is inside a repair facility + * + * Example: + * [unit] call ace_repair_fnc_isInRepairFacility + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_object"]; +TRACE_1("params",_object); + +private ["_position","_objects","_isInBuilding","_repairFacility"]; + +_position = getPosASL _object; +_isInBuilding = false; +_repairFacility = []; + +_objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]); +{ + if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith { + _isInBuilding = true; + }; +} forEach _objects; + +if (!_isInBuilding) then { + _objects = position _object nearObjects 7.5; + { + if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith { + _isInBuilding = true; + }; + } forEach _objects; +}; +_isInBuilding; diff --git a/addons/repair/functions/fnc_isNearRepairVehicle.sqf b/addons/repair/functions/fnc_isNearRepairVehicle.sqf new file mode 100644 index 0000000000..677f489a88 --- /dev/null +++ b/addons/repair/functions/fnc_isNearRepairVehicle.sqf @@ -0,0 +1,30 @@ +/* + * Author: KoffeinFlummi + * Checks if a unit is near an engineering vehicle. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Is near engineering vehicle + * + * Example: + * [unit] call ace_repair_fnc_isNearRepairVehicle + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit"]; +TRACE_1("params",_unit); + +private ["_nearObjects", "_return"]; + +_nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20]; + +_return = false; +{ + if ([_x] call FUNC(isRepairVehicle)) exitwith {_return = true;}; +} forEach _nearObjects; + +_return; diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf new file mode 100644 index 0000000000..121bda0fe3 --- /dev/null +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -0,0 +1,23 @@ +/* + * Author: Glowbal + * Check if vehicle is a engineering vehicle. + * + * Arguments: + * 0: Vehicle + * + * ReturnValue: + * Is engineering vehicle + * + * Example: + * [vehicle] call ace_repair_fnc_isRepairVehicle + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_vehicle"]; +TRACE_1("params",_vehicle); + +if (_vehicle isKindOf "CAManBase") exitwith {false}; + +((_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]) > 0); diff --git a/addons/repair/functions/fnc_moduleAssignEngineer.sqf b/addons/repair/functions/fnc_moduleAssignEngineer.sqf new file mode 100644 index 0000000000..9fb9ed8431 --- /dev/null +++ b/addons/repair/functions/fnc_moduleAssignEngineer.sqf @@ -0,0 +1,31 @@ +/* + * Author: Glowbal + * Assign an engineer role to a unit. + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * function = "ace_repair_fnc_moduleAssignEngineer" + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; + +if (!isNull _logic) then { + private ["_list", "_setting"]; + _list = _logic getVariable ["EnableList",""]; + _setting = _logic getVariable ["role",0]; + + [_list, "ACE_IsEngineer", _setting, true] call EFUNC(common,assignObjectsInList); + [synchronizedObjects _logic, "ACE_IsEngineer", _setting, true] call EFUNC(common,assignObjectsInList); + }; + +true diff --git a/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf b/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf new file mode 100644 index 0000000000..00cb847866 --- /dev/null +++ b/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf @@ -0,0 +1,31 @@ +/* + * Author: Glowbal + * Assign a repair facility. + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * function = "ace_repair_fnc_moduleAssignRepairFacility" + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; + +if (!isNull _logic) then { + private ["_list", "_setting"]; + _list = _logic getVariable ["EnableList",""]; + _setting = _logic getVariable ["role",0]; + + [_list, "ACE_isRepairFacility", _setting, true] call EFUNC(common,assignObjectsInList); + [synchronizedObjects _logic, "ACE_isRepairFacility", _setting, true] call EFUNC(common,assignObjectsInList); + }; + +true diff --git a/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf b/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf new file mode 100644 index 0000000000..69d2a2c52f --- /dev/null +++ b/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf @@ -0,0 +1,31 @@ +/* + * Author: Glowbal + * Assign a repair vehicle. + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * function = "ace_repair_fnc_moduleAssignRepairVehicle" + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; + +if (!isNull _logic) then { + private ["_list", "_setting"]; + _list = _logic getVariable ["EnableList",""]; + _setting = _logic getVariable ["role",0]; + + [_list, "ACE_isRepairVehicle", _setting, true] call EFUNC(common,assignObjectsInList); + [synchronizedObjects _logic, "ACE_isRepairVehicle", _setting, true] call EFUNC(common,assignObjectsInList); + }; + +true diff --git a/addons/repair/functions/fnc_moduleRepairSettings.sqf b/addons/repair/functions/fnc_moduleRepairSettings.sqf new file mode 100644 index 0000000000..3b97d2f168 --- /dev/null +++ b/addons/repair/functions/fnc_moduleRepairSettings.sqf @@ -0,0 +1,34 @@ +/* + * Author: commy2 + * Adjusts repair damage settings. + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * function = "ace_repair_fnc_moduleRepairSettings" + * + * Public: No + */ +#include "script_component.hpp" + +params ["_logic"]; + +if (!isServer) exitWith {}; + +[_logic, QGVAR(engineerSetting_Repair), "engineerSetting_Repair"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(engineerSetting_Wheel), "engineerSetting_Wheel"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(consumeItem_ToolKit), "consumeItem_ToolKit"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(repairDamageThreshold), "repairDamageThreshold"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(repairDamageThreshold_Engineer), "repairDamageThreshold_Engineer"] call EFUNC(common,readSettingFromModule); + + +[_logic, QGVAR(fullRepairLocation), "fullRepairLocation"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(engineerSetting_fullRepair), "engineerSetting_fullRepair"] call EFUNC(common,readSettingFromModule); + +diag_log text "[ACE]: Repair Module Initialized."; diff --git a/addons/repair/functions/fnc_normalizeHitPoints.sqf b/addons/repair/functions/fnc_normalizeHitPoints.sqf new file mode 100644 index 0000000000..88c72f4de8 --- /dev/null +++ b/addons/repair/functions/fnc_normalizeHitPoints.sqf @@ -0,0 +1,48 @@ +/* + * Author: commy2 + * Used to normalize dependant hitpoints. May overwrite some global variables that are named like hitpoints or "Total" though... + * + * Arguments: + * 0: Local Vehicle + * + * Return Value: + * None + * + * Example: + * [vehicle] call ace_repair_fnc_normalizeHitPoints + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle"]; +TRACE_1("params",_vehicle); + +// Can't execute all commands if the vehicle isn't local, exit if that's so +if !(local _vehicle) exitWith {}; + +private ["_hitPoints", "_config", "_dependentHitPoints", "_dependentHitPointScripts", "_damage"]; + +_hitPoints = [_vehicle] call EFUNC(common,getHitPoints); +_config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints"; + +// define global variables. Needed to parse the depends config entries. Also find dependent hitpoints. + +_dependentHitPoints = []; +_dependentHitPointScripts = []; + +Total = damage _vehicle; + +{ + missionNamespace setVariable [_x, _vehicle getHitPointDamage _x]; + if (isText (_config >> _x >> "depends")) then { + _dependentHitPoints pushBack _x; + _dependentHitPointScripts pushBack compile getText (_config >> _x >> "depends"); + }; +} forEach _hitPoints; + +// apply normalized damage to all dependand hitpoints +{ + _damage = call (_dependentHitPointScripts select _forEachIndex); + _vehicle setHitPointDamage [_x, _damage]; +} forEach _dependentHitPoints; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf new file mode 100644 index 0000000000..92af5df80e --- /dev/null +++ b/addons/repair/functions/fnc_repair.sqf @@ -0,0 +1,205 @@ +/* + * Author: Glowbal, KoffeinFlummi + * Starts the repair process. + * + * Arguments: + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 3: Repair Action Classname + * + * Return Value: + * Succesful Repair Started + * + * Example: + * [unit, vehicle, "hitpoint", "classname"] call ace_repair_fnc_repair + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_caller", "_target", "_hitPoint", "_className"]; +TRACE_4("params",_calller,_target,_hitPoint,_className); + +private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn"]; + +_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); +if !(isClass _config) exitwith {false}; // or go for a default? + +_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { + getNumber (_config >> "requiredEngineer"); +} else { + // Check for required class + if (isText (_config >> "requiredEngineer")) exitwith { + missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0]; + }; + 0; +}; +if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false}; +if (isEngineOn _target) exitwith {false}; +_items = getArray (_config >> "items"); +if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false}; + +_return = true; +if (getText (_config >> "condition") != "") then { + _condition = getText (_config >> "condition"); + if (isnil _condition) then { + _condition = compile _condition; + } else { + _condition = missionNamespace getVariable _condition; + }; + if (typeName _condition == "BOOL") then { + _return = _condition; + } else { + _return = [_caller, _target, _hitPoint, _className] call _condition; + }; +}; +if (!_return) exitwith {false}; + +_vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then { + missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0] +} else { + getNumber(_config >> "vehicleStateCondition") +}; +// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false}; + +_locations = getArray (_config >> "repairLocations"); +if ("All" in _locations) exitwith {true}; + +private ["_repairFacility", "_repairVeh"]; +_repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))}; +_repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))}; + +{ + if (_x == "field") exitwith {_return = true;}; + if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;}; + if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;}; + if !(isnil _x) exitwith { + private "_val"; + _val = missionNamespace getVariable _x; + if (typeName _val == "SCALAR") then { + _return = switch (_val) do { + case 0: {true}; //useAnywhere + case 1: {call _repairVeh}; //repairVehicleOnly + case 2: {call _repairFacility}; //repairFacilityOnly + case 3: {(call _repairFacility) || {call _repairVeh}}; //vehicleAndFacility + default {false}; //Disabled + }; + }; + }; +} forEach _locations; + +if !(_return && alive _target) exitwith {false}; + +_consumeItems = if (isNumber (_config >> "itemConsumed")) then { + getNumber (_config >> "itemConsumed"); +} else { + // Check for required class + if (isText (_config >> "itemConsumed")) exitwith { + missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0]; + }; + 0; +}; + +_usersOfItems = []; +if (_consumeItems > 0) then { + _usersOfItems = ([_caller, _target, _items] call FUNC(useItems)) select 1; +}; + +// Parse the config for the progress callback +_callbackProgress = getText (_config >> "callbackProgress"); +if (_callbackProgress == "") then { + _callbackProgress = "true"; +}; +if (isNil _callbackProgress) then { + _callbackProgress = compile _callbackProgress; +} else { + _callbackProgress = missionNamespace getVariable _callbackProgress; +}; + + +// Player Animation +_callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE"); +_caller setvariable [QGVAR(selectedWeaponOnrepair), currentWeapon _caller]; + +// Cannot use secondairy weapon for animation +if (currentWeapon _caller == secondaryWeapon _caller) then { + _caller selectWeapon (primaryWeapon _caller); +}; + +_wpn = ["non", "rfl", "pst"] select (1 + ([primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller))); +_callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace; +if (vehicle _caller == _caller && {_callerAnim != ""}) then { + if (primaryWeapon _caller == "") then { + _caller addWeapon "ACE_FakePrimaryWeapon"; + }; + if (currentWeapon _caller == "") then { + _caller selectWeapon (primaryWeapon _caller); // unit always has a primary weapon here + }; + + if (stance _caller == "STAND") then { + _caller setvariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; + } else { + _caller setvariable [QGVAR(repairPrevAnimCaller), animationState _caller]; + }; + [_caller, _callerAnim] call EFUNC(common,doAnimation); +}; + +//Get repair time +_repairTime = if (isNumber (_config >> "repairingTime")) then { + getNumber (_config >> "repairingTime"); +} else { + if (isText (_config >> "repairingTime")) exitwith { + _repairTimeConfig = getText(_config >> "repairingTime"); + if (isnil _repairTimeConfig) then { + _repairTimeConfig = compile _repairTimeConfig; + } else { + _repairTimeConfig = missionNamespace getVariable _repairTimeConfig; + }; + if (typeName _repairTimeConfig == "SCALAR") exitwith { + _repairTimeConfig; + }; + [_caller, _target, _hitPoint, _className] call _repairTimeConfig; + }; + 0; +}; + +private ["_text", "_processText"]; +_processText = getText (_config >> "displayNameProgress"); +_text = format ["STR_ACE_Repair_%1", _hitPoint]; +if (isLocalized _text) then { + _text = format [_processText, localize _text]; +} else { + _text = _processText; +}; + +// Start repair +[ + _repairTime, + [_caller, _target, _hitPoint, _className, _items, _usersOfItems], + DFUNC(repair_success), + DFUNC(repair_failure), + _text, + _callbackProgress, + [] +] call EFUNC(common,progressBar); + +// Display Icon +_iconDisplayed = getText (_config >> "actionIconPath"); +if (_iconDisplayed != "") then { + [QGVAR(repairActionIcon), true, _iconDisplayed, [1,1,1,1], getNumber(_config >> "actionIconDisplayTime")] call EFUNC(common,displayIcon); +}; + +// handle display of text/hints +_displayText = ""; +if (_target != _caller) then { + _displayText = getText(_config >> "displayTextOther"); +} else { + _displayText = getText(_config >> "displayTextSelf"); +}; + +if (_displayText != "") then { + ["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent); +}; + +true; diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf new file mode 100644 index 0000000000..6e27ab07a7 --- /dev/null +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -0,0 +1,61 @@ +/* + * Author: KoffeinFlummi, Glowbal + * Callback when repair fails. + * + * Arguments: + * 0: Arguments + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 3: Repair Action Classname + * 4: None + * 5: Items available + * + * Return Value: + * None + * + * Example: + * [[unit, vehicle, "hitpoint", "classname", nil, [items]]] call ace_repair_fnc_repair_failure + * + * Public: No + */ +#include "script_component.hpp" + +params ["_args"]; +_args params ["_caller", "_target","_selectionName","_className","","_usersOfItems"]; +TRACE_5("params",_caller,_target,_selectionName,_className,_usersOfItems); + +private ["_config","_callback", "_usersOfItems", "_weaponSelect"]; + +if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { + _caller removeWeapon "ACE_FakePrimaryWeapon"; +}; +if (vehicle _caller == _caller) then { + [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); +}; +_caller setvariable [QGVAR(repairPrevAnimCaller), nil]; + +_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); +if (_weaponSelect != "") then { + _caller selectWeapon _weaponSelect; +} else { + _caller action ["SwitchWeapon", _caller, _caller, 99]; +}; + +{ + (_x select 0) addItem (_x select 1); +} forEach _usersOfItems; + +// Record specific callback +_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); + +_callback = getText (_config >> "callbackFailure"); +if (isNil _callback) then { + _callback = compile _callback; +} else { + _callback = missionNamespace getVariable _callback; +}; + +_args call _callback; + +// _args call FUNC(createLitter); diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf new file mode 100644 index 0000000000..ccad93663f --- /dev/null +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -0,0 +1,54 @@ +/* + * Author: KoffeinFlummi, Glowbal + * Callback when repair completes. + * + * Arguments: + * 0: Arguments + * 0: Unit that does the repairing + * 1: Vehicle to repair + * 3: Repair Action Classname + * + * Return Value: + * None + * + * Example: + * [[unit, vehicle, "hitpoint", "classname"]] call ace_repair_fnc_repair_success + * + * Public: No + */ +#include "script_component.hpp" + +params ["_args"]; +_args params ["_caller", "_target","_selectionName","_className"]; +TRACE_4("params",_caller,_target,_selectionName,_className); + +private ["_config","_callback", "_weaponSelect"]; + +if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { + _caller removeWeapon "ACE_FakePrimaryWeapon"; +}; +if (vehicle _caller == _caller) then { + [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); +}; +_caller setvariable [QGVAR(repairPrevAnimCaller), nil]; + +_weaponSelect = (_caller getVariable [QGVAR(selectedWeaponOnrepair), ""]); +if (_weaponSelect != "") then { + _caller selectWeapon _weaponSelect; +} else { + _caller action ["SwitchWeapon", _caller, _caller, 99]; +}; + +// Record specific callback +_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); + +_callback = getText (_config >> "callbackSuccess"); +if (isNil _callback) then { + _callback = compile _callback; +} else { + _callback = missionNamespace getVariable _callback; +}; +_args call _callback; + +// _args call FUNC(createLitter); diff --git a/addons/repair/functions/fnc_setDamage.sqf b/addons/repair/functions/fnc_setDamage.sqf new file mode 100644 index 0000000000..410a9b0396 --- /dev/null +++ b/addons/repair/functions/fnc_setDamage.sqf @@ -0,0 +1,45 @@ +/* + * Author: commy2 + * Sets the structural damage of a vehicle without altering the hitPoints, requires local vehicle. + * + * Arguments: + * 0: Local Vehicle to Damage + * 1: Total Damage + * + * Return Value: + * None + * + * Example: + * [vehicle, 0.5] call ace_repair_fnc_setDamage + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle", "_damage"]; +TRACE_2("params",_vehicle,_damage); + +// can't execute all commands if the vehicle isn't local. exit here. +if !(local _vehicle) exitWith {}; + +// save array with damage values of all hitpoints +private ["_hitPoints", "_hitPointDamages"]; + +_hitPoints = [_vehicle] call EFUNC(common,getHitpoints); + +_hitPointDamages = []; + +{ + _hitPointDamages set [_forEachIndex, _vehicle getHitPointDamage _x]; +} forEach _hitPoints; + +// set damage of the vehicle +_vehicle setDamage _damage; + +// restore original hitpoint damage values +{ + _vehicle setHitPointDamage [_x, _hitPointDamages select _forEachIndex]; +} forEach _hitPoints; + +// normalize hitpoints +[_vehicle] call FUNC(normalizeHitPoints); diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf new file mode 100644 index 0000000000..a8b4cd347b --- /dev/null +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -0,0 +1,86 @@ +/* + * Author: commy2 + * Set the hitpoint damage and change the structural damage acordingly, requires local vehicle. + * + * Arguments: + * 0: Local Vehicle to Damage + * 1: Selected hitpoint + * 2: Total Damage + * + * Return Value: + * None + * + * Example: + * [vehicle, "hitpoint", 0.5] call ace_repair_fnc_setHitPointDamage + * + * Public: No + */ +#include "script_component.hpp" + +params ["_vehicle", "_hitPoint", "_hitPointDamage"]; +TRACE_3("params",_vehicle,_hitPoint,_hitPointDamage); + +// can't execute all commands if the vehicle isn't local. exit here. +if !(local _vehicle) exitWith {}; + +// get all valid hitpoints +private ["_hitPoints", "_hitPointsWithSelections"]; + +_hitPoints = [_vehicle] call EFUNC(common,getHitpoints); +_hitPointsWithSelections = [_vehicle] call EFUNC(common,getHitpointsWithSelections) select 0; + +// exit if the hitpoint is not valid +if !(_hitPoint in _hitPoints) exitWith {systemChat format["NOT A VALID HITPOINT: %1",_hitpoint]}; + +// save array with damage values of all hitpoints +private "_hitPointDamages"; +_hitPointDamages = []; + +{ + _hitPointDamages set [_forEachIndex, (_vehicle getHitPointDamage _x)]; +} forEach _hitPoints; + +// save structural damage and sum of hitpoint damages +private ["_damageOld", "_hitPointDamageSumOld"]; + +_damageOld = damage _vehicle; + +_hitPointDamageSumOld = 0; +{ + if (!(_x in IGNORED_HITPOINTS) && {!isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")}) then { + _hitPointDamageSumOld = _hitPointDamageSumOld + (_hitPointDamages select (_hitPoints find _x)); + }; +} forEach _hitPointsWithSelections; + +// set new damage in array +_hitPointDamages set [_hitPoints find _hitPoint, _hitPointDamage]; + +// save sum of new hitpoint damages +private "_hitPointDamageSumNew"; + +_hitPointDamageSumNew = 0; +{ + if (!(_x in IGNORED_HITPOINTS) && {!isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")}) then { + _hitPointDamageSumNew = _hitPointDamageSumNew + (_hitPointDamages select (_hitPoints find _x)); + }; +} forEach _hitPointsWithSelections; + +// calculate new strctural damage +private "_damageNew"; +_damageNew = _hitPointDamageSumNew / count _hitPoints; + +if (_hitPointDamageSumOld > 0) then { + _damageNew = _damageOld * (_hitPointDamageSumNew / _hitPointDamageSumOld); +}; + +// set new structural damage value +_vehicle setDamage _damageNew; + +// set the new damage for that hit point + +{ + _vehicle setHitPointDamage [_x, _hitPointDamages select _forEachIndex]; +} forEach _hitPoints; + +// normalize hitpoints +// [_vehicle] call FUNC(normalizeHitPoints); diff --git a/addons/repair/functions/fnc_spawnObject.sqf b/addons/repair/functions/fnc_spawnObject.sqf new file mode 100644 index 0000000000..1ea4b7363a --- /dev/null +++ b/addons/repair/functions/fnc_spawnObject.sqf @@ -0,0 +1,32 @@ +/* + * Author: commy2 + * Spawns an object of specified string, at specified position with specified damage taken. + * + * Arguments: + * 0: Item classname + * 1: Position + * 2: Damage + * + * Return Value: + * None + * + * Example: + * ["classname", [0, 0, 0], 1] call ace_repair_fnc_spawnObject + * + * Public: No + */ +#include "script_component.hpp" + +params ["_item", "_position", ["_damage", 0]]; +TRACE_3("params",_item,_position,_damage); + +// randomized end position +_position = _position vectorAdd [1 - random 2, 1 - random 2, 0]; + +_item = createVehicle [_item, _position, [], 0, "NONE"]; +_item setPosASL _position; + +["fixCollision", _item] call EFUNC(common,localEvent); +["fixPosition", _item] call EFUNC(common,localEvent); + +_item setDamage _damage; diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf new file mode 100644 index 0000000000..218a7a1ee4 --- /dev/null +++ b/addons/repair/functions/fnc_useItem.sqf @@ -0,0 +1,26 @@ +/* + * Author: Glowbal + * Use Equipment if any is available. + * + * Arguments: + * 0: Unit + * 2: Item classname + * + * ReturnValue: + * None + * + * Example: + * [unit, "classname"] call ace_repair_fnc_useItem + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", "_item"]; +TRACE_2("params",_unit,_item); + +if ([_unit, _item] call EFUNC(common,hasItem)) exitwith { + [[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ + [true, _unit]; +}; +[false, objNull]; diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf new file mode 100644 index 0000000000..f8aa176018 --- /dev/null +++ b/addons/repair/functions/fnc_useItems.sqf @@ -0,0 +1,41 @@ +/* + * Author: Glowbal + * Use Equipment items if any is available. + * + * Arguments: + * 0: Unit + * 1: Item classnames + * + * ReturnValue: + * None + * + * Example: + * [unit, ["classname1", "classname2"]] call ace_repair_fnc_useItems + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", "_items"]; +TRACE_2("params",_unit,_items); + +private ["_itemUsedInfo", "_itemsUsedBy"]; + +_itemsUsedBy = []; +{ + // handle a one of type use item + if (typeName _x == "ARRAY") then { + { + _itemUsedInfo = [_unit, _x] call FUNC(useItem); + if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + } forEach _x; + }; + + // handle required item + if (typeName _x == "STRING") then { + _itemUsedInfo = [_unit, _x] call FUNC(useItem); + if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]}; + }; +} forEach _items; + +[count _items == count _itemsUsedBy, _itemsUsedBy]; diff --git a/addons/repair/functions/script_component.hpp b/addons/repair/functions/script_component.hpp new file mode 100644 index 0000000000..80a7b2eb74 --- /dev/null +++ b/addons/repair/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\repair\script_component.hpp" diff --git a/addons/repair/script_component.hpp b/addons/repair/script_component.hpp new file mode 100644 index 0000000000..23c52bdec8 --- /dev/null +++ b/addons/repair/script_component.hpp @@ -0,0 +1,16 @@ +#define COMPONENT repair +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_REPAIR + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_REPAIR + #define DEBUG_SETTINGS DEBUG_SETTINGS_REPAIR +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + + +#define IGNORED_HITPOINTS ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitGlass7","HitGlass8","HitGlass9","HitGlass10","HitGlass11","HitGlass12","HitGlass13","HitGlass14","HitGlass15","HitRGlass","HitLGlass"] +// #define TRACK_HITPOINTS ["HitLTrack", "HitRTrack"]; diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml new file mode 100644 index 0000000000..ffafc56683 --- /dev/null +++ b/addons/repair/stringtable.xml @@ -0,0 +1,642 @@ + + + + + + Spare Track + Ersatzkette + Cadena de repuesto + Chenille de réserve + Zapasowa gąsienica + Náhradní pásy + Lagarta Reserva + Cingolo di scorta + Pót lánctalp + Запасная гусеница + + + Spare Wheel + Ersatzreifen + Rueda de repuesto + Roue de secours + Zapasowe koło + Náhradní Kolo + Roda Reserva + Ruota di scorta + Pótkerék + Запасное колесо + + + Change Wheel + Reifen wechseln + Cambiar rueda + Changer Roue + Wymień koło + Vyměňit kolo + Trocar Roda + Sostituisci la ruota + Kerék cseréje + Поменять колесо + + + Replacing Wheel ... + Ersetze Reifen ... + + + Wheel replaced + Reifen ersetzt + + + Remove Wheel + Reifen entfernen + Quitar rueda + Démonter Roue + Zdejmij koło + Odstranit Kolo + Remover Roda + Rimuovi la ruota + Kerék leszerelése + Снять колесо + + + Removing Wheel ... + Entferne Reifen ... + + + Wheel removed + Reifen entfernt + + + Change Track + + + Replacing Track ... + + + Track replaced + + + Remove Track + + + Removing Track ... + + + Track removed + + + + Full Repair + + + Repairing Vehicle ... + + + + Full Repair Locations + + + At what locations can a vehicle be fully repaired? + + + Allow Full Repair + + + Who can perform a full repair on a vehicle? + + + Repair %1 + Reparieren %1 + Reparación %1 + Réparer %1 + Napraw %1 + Opravit %1 + Reparar %1 + Ripara %1 + Szerelés %1 + Ремонт %1 + + + Repair >> + Reparieren >> + Reparación >> + Réparer >> + Napraw >> + Opravit >> + Reparar >> + Ripara >> + Szerelés >> + Ремонт >> + + + Display text on repair + + + Display a notification whenever you repair a vehicle + + + Repairing ... + Reparieren ... + Reparando ... + Réparation ... + Naprawianie... + Opravuji ... + Reparando ... + Sto riparando ... + javítása ... + Ремонтируем ... + + + Repairing %1 ... + Reparieren %1 ... + Reparando %1 ... + Réparation %1 ... + Naprawianie %1... + Opravuji %1 ... + Reparando %1 ... + Sto riparando %1 ... + %1 javítása ... + Ремонтируем %1 ... + + + Repaired %1 + %1 repariert + Reparado %1 + %1 réparé(e) + Naprawiono %1 + Opraveno - %1 + Reparado %1 + %1 Riparata/o + %1 megjavítva + %1 отремонтирован + + + Fully repaired part + Bauteil vollständig repariert + + + Partially repaired %1 + Bauteil teilweise repariert + + + Fully repaired %1 + %1 vollständig repariert + + + Partially repaired %1 + %1 teilweise repariert + + + Body + Karosserie + Carrocería + Blindage + Karoseria + Karoserie + Carroceria + Carrozzeria + Test + Кузов + + + Hull + Wanne + Casco + Caisse + Kadłub + Trup + Chassi + Scafo + Test + Корпус + + + Engine + Motor + Motor + Moteur + Silnik + Motor + Motor + Motore + Motor + Двигатель + + + Fuel Tank + Tank + Depósito + Réservoir + Zbiornik paliwa + Palivová nádrž + Tanque de Combustível + Serbatoio + Üzemanyagtank + Топливный бак + + + Main Turret + Turm + Torreta príncipal + Tourelle + Wieżyczka + Hlavní Věž + Torre principal + Torretta principale + Lövegtorony + Башню + + + Gun + Kanone + Cañón + Canon + Działo + Kanón + Canhão + Cannone + Ágyú + Пушку + + + Left Track + Linke Kette + Cadena izquierda + Chenille gauche + Lewa gąsienica + Levý Pás + Lagarta Esquerda + Cingolo sinistro + Bal lánctalp + Левую гусеницу + + + Right Track + Rechte Kette + Cadena derecha + Chenille droite + Prawa gąsienica + Pravý Pás + Lagarta Direita + Cingolo destro + Jobb lánctalp + Правую гусеницу + + + Left Front Wheel + Linkes Vorderrad + Rueda frontal izquierda + Roue avant-gauche + Przednie lewe koło + Levé přední Kolo + Roda Dianteira Esquerda + Ruota frontale sinistra + Bal első kerék + Левое переднее колесо + + + Right Front Wheel + Rechtes Vorderrad + Rueda frontal derecha + Roue avant-droite + Przednie prawe koło + Pravé přední Kolo + Roda Dianteira Direita + Ruota frontale destra + Jobb első kerék + Правое переднее колесо + + + Second Left Front Wheel + Zweites linkes Vorderrad + Segunda rueda frontal izquierda + Deuxième roue avant-gauche + Drugie przednie lewe koło + Druhé Levé přední Kolo + Segunda Roda Dianteira Esquerda + Seconda ruota frontale sinistra + Második bal első kerék + Второе переднее левое колесо + + + Second Right Front Wheel + Zweites rechtes Vorderrad + Segunda rueda frontal derecha + Deuxième roue avant-droite + Drugie przednie prawe koło + Druhé Pravé přední Kolo + Segunda Roda Dianteira Direita + Seconda ruota frontale destra + Második jobb hátsó kerék + Второе правое переднее колесо + + + Left Middle Wheel + Linkes mittleres Rad + Rueda central izquierda + Roue centre-gauche + Środkowe lewe koło + Levé prostřední Kolo + Roda Intermediária Esquerda + Ruota centrale sinistra + Bal középső kerék + Левое среднее колесо + + + Right Middle Wheel + Rechtes mittleres Rad + Rueda central derecha + Roue centre-droite + Środkowe prawe koło + Pravé prostřední Kolo + Roda Intermediária Direita + Ruota centrale destra + Jobb középső kerék + Правое среднее колесо + + + Left Rear Wheel + Linkes Hinterrad + Rueda trasera izquierda + Roue arrière-gauche + Tylnie lewe koło + Levé zadní Kolo + Roda Traseira Esquerda + Ruota posteriore sinistra + Bal hátsó kerék + Левое заднее колесо + + + Right Rear Wheel + Rechtes Hinterrad + Rueda trasera derecha + Roue arrière-droite + Tylnie prawe koło + Pravé zadní Kolo + Roda Traseira Direita + Ruota posteriore destra + Jobb hátsó kerék + Правое заднее колесо + + + Avionics + Avionik + Aviónica + Avionique + Awionika + Elektronika + Aviônica + Avionica + Avionika + Авионику + + + Main Rotor + Hauptrotor + Rotor principal + Rotor principal + Główny rotor + Hlavní Rotor + Rotor Principal + Rotore principale + Főrotor + Несущий винт + + + Tail Rotor + Heckrotor + Rotor de cola + Rotor anticouple + Tylni rotor + Zadní Rotor + Rotor de Cauda + Rotore di coda + Farokrotor + Рулевой винт + + + Winch + Seilwinde + + + Glass (right) + Scheibe (rechts) + Ventana (derecha) + Vitre (droite) + Szyba (prawa) + Sklo (pravé) + Vidro (à direita) + Vetro destro + Jobb szélvédő + Стекло (справа) + + + Glass (left) + Scheibe (links) + Ventana (izquierda) + Vitre (gauche) + Szyba (lewa) + Sklo (pravé) + Vidro (à esquerda) + Vetro sinistro + Bal szélvédő + Стекло (слава) + + + Glass 1 + Scheibe 1 + Ventana 1 + Vitre 1 + Szyba 1 + Sklo 1 + Vidro 1 + Vetro 1 + Üveg 1 + Стекло 1 + + + Glass 2 + Scheibe 2 + Ventana 2 + Vitre 2 + Szyba 2 + Sklo 2 + Vidro 2 + Vetro 2 + Üveg 2 + Стекло 2 + + + Glass 3 + Scheibe 3 + Ventana 3 + Vitre 3 + Szyba 3 + Sklo 3 + Vidro 3 + Vetro 3 + Üveg 3 + Стекло 3 + + + Glass 4 + Scheibe 4 + Ventana 4 + Vitre 4 + Szyba 4 + Sklo 4 + Vidro 4 + Vetro 4 + Üveg 4 + Стекло 4 + + + Glass 5 + Scheibe 5 + Ventana 5 + Vitre 5 + Szyba 5 + Sklo 5 + Vidro 5 + Vetro 5 + Üveg 5 + Стекло 5 + + + Glass 6 + Scheibe 6 + Ventana 6 + Vitre 6 + Szyba 6 + Sklo 6 + Vidro 6 + Vetro 6 + Üveg 6 + Стекло 6 + + + Repair Settings + + + Provides a repair system for all types of vehicles. + + + Anyone + + + Engineer only + + + Repair Specialist only + + + Allow Wheel + + + Who can remove and replace wheels? + + + Allow Repair + + + Who can perform repair actions? + + + Repair Threshold + + + What is the maximum damage that can be repaired with a toolkit? + + + Repair Threshold (Engineer) + + + What is the maximum damage that can be repaired by an engineer? + + + Remove toolkit on use + + + Should the toolkit be removed on usage? + + + Anywhere + + + Repair Vehicle only + + + Repair Facility only + + + Repair Facility or Vehicle + + + Assign Engineer + + + List + + + List of unit names that will be classified as engineer, separated by commas. + + + Is Engineer + + + Select the engineering skill level of the unit + + + None + + + Engineer + + + Specialist + + + Assign one or multiple units as an engineer + + + Assign Repair Vehicle + + + List + + + List of vehicles that will be classified as repair vehicle, separated by commas. + + + Is Repair Vehicle + + + Is the vehicle classified as a repair vehicle? + + + Assign one or multiple vehicles as a repair vehicle + + + + Assign Repair Facility + + + List + + + List of objects that will be classified as repair Facility, separated by commas. + + + Is Repair Facility + + + Is the object classified as a repair Facility? + + + Assign one or multiple objects as a repair Facility + + + Vehicle Repair + + + diff --git a/addons/repair/ui/Icon_Module_Repair_ca.paa b/addons/repair/ui/Icon_Module_Repair_ca.paa new file mode 100644 index 0000000000..11b0f896d6 Binary files /dev/null and b/addons/repair/ui/Icon_Module_Repair_ca.paa differ diff --git a/addons/repair/ui/tire_ca.paa b/addons/repair/ui/tire_ca.paa new file mode 100644 index 0000000000..93ceb6bb6c Binary files /dev/null and b/addons/repair/ui/tire_ca.paa differ diff --git a/addons/respawn/CfgAddons.hpp b/addons/respawn/CfgAddons.hpp index 2793ac09da..111613615e 100644 --- a/addons/respawn/CfgAddons.hpp +++ b/addons/respawn/CfgAddons.hpp @@ -1,5 +1,5 @@ class CfgAddons { class GVAR(Rallypoints) { - list[] = { "ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_RallypointExit_West", "ACE_RallypointExit_East", "ACE_RallypointExit_Independent" }; + list[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_Rallypoint_West_Base", "ACE_Rallypoint_East_Base", "ACE_Rallypoint_Independent_Base"}; }; }; diff --git a/addons/respawn/config.cpp b/addons/respawn/config.cpp index daed5e2ab0..4a23d1f650 100644 --- a/addons/respawn/config.cpp +++ b/addons/respawn/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { units[] = {}; - weapons[] = { "ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_RallypointExit_West", "ACE_RallypointExit_East", "ACE_RallypointExit_Independent" }; + weapons[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_Rallypoint_West_Base", "ACE_Rallypoint_East_Base", "ACE_Rallypoint_Independent_Base"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_common" }; author[] = { "bux578", "commy2" }; diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf index 5a0472cf5b..d512c23886 100644 --- a/addons/respawn/functions/fnc_moveRallypoint.sqf +++ b/addons/respawn/functions/fnc_moveRallypoint.sqf @@ -26,10 +26,12 @@ private ["_rallypoint", "_position"]; _rallypoint = [ objNull, missionNamespace getVariable ["ACE_Rallypoint_West", objNull], - missionNamespace getVariable ["ACE_RallypointExit_East", objNull], - missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull] + missionNamespace getVariable ["ACE_Rallypoint_East", objNull], + missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull] ] select ([west, east, independent] find _side) + 1; +TRACE_3("moving rally",_unit, _rallypoint, (typeOf _rallypoint)); + if (isNull _rallypoint) exitWith {}; _position = getPosATL _unit; diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index 285c560a6c..7e55c1d8e2 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -1,16 +1,16 @@ /* - Name: ACE_Respawn_fnc_removeBody - + Name: ACE_Respawn_fnc_restoreGear + Author(s): bux578 - + Description: Restores previously saved gear - + Parameters: 0: OBJECT - unit - 1: ARRAY - Array containing all gear - + 1: ARRAY - Array containing all gear (result of ACE_common_fnc_getAllGear) + Returns: VOID */ @@ -19,7 +19,15 @@ PARAMS_2(_unit,_allGear); -private ["_unit", "_allGear", "_headgear", "_goggles", "_uniform", "_uniformitems", "_vest", "_vestitems", "_backpack", "_backpackitems", "_primaryweapon", "_primaryweaponitems", "_primaryweaponmagazine", "_handgunweapon", "_handgunweaponitems", "_handgunweaponmagazine", "_assigneditems", "_binocular", "_backpa", "_secondaryweapon", "_secondaryweaponitems", "_secondaryweaponmagazine"]; +private ["_unit", "_allGear", "_headgear", "_goggles", +"_uniform", "_uniformitems", +"_vest", "_vestitems", +"_backpack", "_backpackitems", "_backpa", +"_primaryweapon", "_primaryweaponitems", "_primaryweaponmagazine", +"_secondaryweapon", "_secondaryweaponitems", "_secondaryweaponmagazine", +"_handgunweapon", "_handgunweaponitems", "_handgunweaponmagazine", +"_assigneditems", "_binocular", +"_activeWeaponAndMuzzle", "_activeWeapon", "_activeMuzzle", "_activeWeaponMode"]; // remove all starting gear of a player @@ -51,6 +59,7 @@ _handgunweaponitems = _allGear select 15; _handgunweaponmagazine = _allGear select 16; _assigneditems = _allGear select 17; _binocular = _allGear select 18; +_activeWeaponAndMuzzle = _allGear select 19; // start restoring the items @@ -69,16 +78,16 @@ if (_goggles != "") then { { _unit addItemToUniform _x; -}forEach _uniformitems; +} forEach _uniformitems; { _unit addItemToVest _x; -}forEach _vestitems; +} forEach _vestitems; private "_flagRemoveDummyBag"; _flagRemoveDummyBag = false; -if(format["%1", _backpack] != "") then { +if (format["%1", _backpack] != "") then { _unit addBackpack _backpack; _backpa = unitBackpack _unit; @@ -158,7 +167,36 @@ _assignedItems = _assignedItems - [_binocular]; _unit addWeapon _binocular; +// reload Laserdesignator +// we assume that if the unit had a Laserdesignator it probably had batteries for it if ("Laserdesignator" in assignedItems _unit) then { _unit selectWeapon "Laserdesignator"; - if (currentMagazine _unit == "") then {_unit addMagazine "Laserbatteries";}; + + if (currentMagazine _unit == "") then { + _unit addMagazine "Laserbatteries"; + }; +}; + +// restore the last active weapon, muzzle and weaponMode +_activeWeapon = _activeWeaponAndMuzzle select 0; +_activeMuzzle = _activeWeaponAndMuzzle select 1; +_activeWeaponMode = _activeWeaponAndMuzzle select 2; + +if (_activeMuzzle != "" and _activeMuzzle != _activeWeapon) then { + _unit selectWeapon _activeMuzzle; +} else { + if (_activeWeapon != "") then { + _unit selectWeapon _activeWeapon; + }; +}; + +if (currentWeapon _unit != "") then { + private ["_index"]; + _index = 0; + while { + _index < 100 && {currentWeaponMode _unit != _activeWeaponMode} + } do { + _unit action ["SwitchWeapon", _unit, _unit, _index]; + _index = _index + 1; + }; }; diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 40bb04f53a..4b649173f0 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -151,6 +151,7 @@ Sistema de reaparición Respawn-System Systém znovuzrození + Sistema de Renascimento Save Gear? @@ -158,6 +159,7 @@ ¿Guardar equipo? Ausrüstung speichern? Uložit výbavu? + Salvar equipamento? Respawn with the gear a soldier had just before his death? @@ -165,6 +167,7 @@ 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í? + Renascer com o equipamento que um soldado tinha antes de sua morte? Remove bodies? @@ -172,6 +175,7 @@ ¿Eliminar cuerpos? Körper entfernen? Odstranit těla? + Remover corpos? Remove player bodies after disconnect? @@ -179,12 +183,14 @@ Elimina los cuerpos de los jugadores cuando se desconecten Entferne Spielerkörper nach dem Trennen einer Verbindung? Odstranit hráčova těla po odpojení? + Remover corpos dos jogadores depois de desconectar? Moduł ten pozwala dostosować ustawienia odrodzenia (respawnu). Dieses Modul erlaubt es die Respawn-Einstellungen anzupassen. Tento modul umožňuje nastavení znovuzrození (spawn). + Este módulo permite que você personalize as configurações do renascimento (Spawn). Friendly Fire Messages @@ -192,11 +198,13 @@ Mensajes de fuego amigo Freundbeschuss-Nachrichten Upozornění na přátelskou střelbu + Mensagens de fogo amigo 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. + Usando este módulo em uma missão para exibir mensagens chat, no caso de quando você faz um fogo amigo - então a mensagem será exibida mostrando quem matou quem. Rallypoint System @@ -204,11 +212,13 @@ Sistema de punto de reunión Rallypoint-System Systém shromáždění + Sistema de ponto de encontro 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í. + Este módulo permite que você aplique em uma missão "pontos de encontro", que pode rapidamente se teletransportar para a "base". Ele requer colocar objetos apropriados no mapa - base e bandeiras. Ambos estão disponíveis na categoria em branco -> ACE Revival. Move Rallypoint @@ -216,6 +226,7 @@ Mover punto de reunión Bewege Rallypoint Přesun na shromaždiště + Mover para ponto de encontro ACE Respawn @@ -223,6 +234,7 @@ Reaparición ACE ACE-Respawn ACE Znovuzrození + ACE Respawn \ No newline at end of file diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index 7ab283f6b6..c7132dd76c 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -14,7 +14,7 @@ if (!hasInterface) exitWith {}; // Conditions: canInteract if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; + if !([ACE_player] call EFUNC(common,canUseWeapon) && {currentWeapon ACE_player != binocular ACE_player}) exitWith {false}; // Statement [ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety); diff --git a/addons/sandbag/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp index b16d2f978d..5a9b530062 100644 --- a/addons/sandbag/CfgVehicles.hpp +++ b/addons/sandbag/CfgVehicles.hpp @@ -5,7 +5,8 @@ class CfgVehicles { class ACE_Sandbags { displayName = CSTRING(DeploySandbag); condition = QUOTE(call FUNC(canDeploy)); - statement = QUOTE(call FUNC(deploy)); + //wait a frame to handle "Do When releasing action menu key" option: + statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [])] call EFUNC(common,execNextFrame)); exceptions[] = {"isNotSwimming"}; showDisabled = 1; priority = 4; @@ -22,10 +23,7 @@ class CfgVehicles { displayName = CSTRING(sandbagEmpty_displayName); vehicleClass = "Items"; class TransportItems { - class ACE_Sandbag_empty { - name = "ACE_Sandbag_empty"; - count = 1; - }; + MACRO_ADDITEM(ACE_Sandbag_empty,1); }; }; /* @@ -103,7 +101,7 @@ class CfgVehicles { scope = 1; model = PATHTOF(data\ace_sandbag_nogeo.p3d); }; - + class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { diff --git a/addons/sandbag/functions/fnc_canDeploy.sqf b/addons/sandbag/functions/fnc_canDeploy.sqf index a55b9f9875..0c5fda5b4c 100644 --- a/addons/sandbag/functions/fnc_canDeploy.sqf +++ b/addons/sandbag/functions/fnc_canDeploy.sqf @@ -6,10 +6,10 @@ * None * * Return Value: - * can deploy? + * Can deploy * * Example: - * call ace_sandbag_fnc_canDeploy; + * [] call ace_sandbag_fnc_canDeploy * * Public: No */ @@ -22,6 +22,7 @@ if (ACE_player getVariable [QGVAR(usingSandbag), false]) exitWith { false }; if ((getPosATL ACE_player select 2) - (getPos ACE_player select 2) > 1E-5) exitWith { false }; private ["_surfaceClass", "_surfaceType"]; + _surfaceClass = ([surfaceType (position ACE_player), "#"] call CBA_fnc_split) select 1; _surfaceType = getText (configfile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); diff --git a/addons/sandbag/functions/fnc_carry.sqf b/addons/sandbag/functions/fnc_carry.sqf index f2ba3dff8a..84ab8c1883 100644 --- a/addons/sandbag/functions/fnc_carry.sqf +++ b/addons/sandbag/functions/fnc_carry.sqf @@ -10,39 +10,39 @@ * None * * Example: - * [_sandbag, _unit] call ace_sandbag_fnc_carry; + * [_sandbag, _unit] call ace_sandbag_fnc_carry * * Public: No */ #include "script_component.hpp" -PARAMS_2(_sandbag,_unit); +params ["_sandbag", "_unit"]; _unit playActionNow "PutDown"; _unit setVariable [QGVAR(usingSandbag), true]; [{ - PARAMS_2(_sandbag,_unit); - + params ["_sandbag", "_unit"]; + GVAR(carrier) = ACE_player; - + [GVAR(carrier), "ACE_Sandbag", true] call EFUNC(common,setForceWalkStatus); - + deleteVehicle _sandbag; - - GVAR(sandBag) = createVehicle ["ACE_SandbagObject_NoGeo", [0,0,0], [], 0, "NONE"]; + + GVAR(sandBag) = createVehicle ["ACE_SandbagObject_NoGeo", [0, 0, 0], [], 0, "NONE"]; GVAR(sandBag) enableSimulationGlobal false; - + // Force physx update { _x setPosASL (getPosASL _x); - } forEach (GVAR(carrier) nearObjects ["ACE_SandbagObject", 5]); + } count (GVAR(carrier) nearObjects ["ACE_SandbagObject", 5]); GVAR(carryPFH) = [{ if (GVAR(carrier) != ACE_player) exitWith { call FUNC(drop); }; - GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0])); + GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0, 0, 1] vectorDiff positionCameraToWorld [0, 0, 0])); GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player); }, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index 1e1121409b..5bb162e029 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_sandbag_fnc_deploy; + * [] call ace_sandbag_fnc_deploy * * Public: No */ @@ -21,14 +21,14 @@ GVAR(placer) = ACE_player; [GVAR(placer), "ACE_Sandbag", true] call EFUNC(common,setForceWalkStatus); -GVAR(sandBag) = createVehicle ["ACE_SandbagObject_NoGeo", [0,0,0], [], 0, "NONE"]; +GVAR(sandBag) = createVehicle ["ACE_SandbagObject_NoGeo", [0, 0, 0], [], 0, "NONE"]; GVAR(sandBag) enableSimulationGlobal false; GVAR(deployPFH) = [{ if (GVAR(placer) != ACE_player) exitWith { call FUNC(deployCancel); }; - GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0])); + GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0, 0, 1] vectorDiff positionCameraToWorld [0, 0, 0])); GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player); }, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf index 65677ea887..bb7480a59e 100644 --- a/addons/sandbag/functions/fnc_deployCancel.sqf +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_sandbag_fnc_deployCancel; + * [] call ace_sandbag_fnc_deployCancel * * Public: No */ diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 2cb297c51e..61264c15fe 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_sandbag_fnc_deployConfirm; + * [] call ace_sandbag_fnc_deployConfirm * * Public: No */ @@ -36,16 +36,16 @@ GVAR(placer) setVariable [QGVAR(usingSandbag), true]; private ["_sandBag", "_position", "_direction"]; _position = getPosASL GVAR(sandBag); _direction = getDir GVAR(sandBag); - + deleteVehicle GVAR(sandBag); - - _sandBag = createVehicle ["ACE_SandbagObject", [0,0,0], [], 0, "NONE"]; + + _sandBag = createVehicle ["ACE_SandbagObject", [0, 0, 0], [], 0, "NONE"]; _sandBag enableSimulationGlobal true; _sandBag setPosASL _position; _sandBag setDir _direction; - + GVAR(placer) removeItem "ACE_Sandbag_empty"; - + GVAR(sandBag) = objNull; GVAR(placer) = objNull; }, [], 1.0, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/functions/fnc_drop.sqf b/addons/sandbag/functions/fnc_drop.sqf index 1ef61289bf..3ba825d423 100644 --- a/addons/sandbag/functions/fnc_drop.sqf +++ b/addons/sandbag/functions/fnc_drop.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_sandbag_fnc_deployCancel; + * [] call ace_sandbag_fnc_deployCancel * * Public: No */ @@ -34,14 +34,14 @@ GVAR(carrier) playActionNow "PutDown"; private ["_sandBag", "_position", "_direction"]; _position = getPosASL GVAR(sandBag); _direction = getDir GVAR(sandBag); - + deleteVehicle GVAR(sandBag); - - _sandBag = createVehicle ["ACE_SandbagObject", [0,0,0], [], 0, "NONE"]; + + _sandBag = createVehicle ["ACE_SandbagObject", [0, 0, 0], [], 0, "NONE"]; _sandBag enableSimulationGlobal true; _sandBag setPosASL _position; _sandBag setDir _direction; - + GVAR(sandBag) = objNull; GVAR(carrier) = objNull; }, [], 1.0, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/functions/fnc_handleScrollWheel.sqf b/addons/sandbag/functions/fnc_handleScrollWheel.sqf index 2b831f5cdc..94697d7691 100644 --- a/addons/sandbag/functions/fnc_handleScrollWheel.sqf +++ b/addons/sandbag/functions/fnc_handleScrollWheel.sqf @@ -9,13 +9,13 @@ * handled * * Example: - * 1.2 call ace_sandbag_fnc_handleScrollWheel; + * [1.2] call ace_sandbag_fnc_handleScrollWheel * * Public: No */ #include "script_component.hpp" -PARAMS_1(_scroll); +params ["_scroll"]; if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(deployPFH) == -1) exitWith { false }; diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf index 360a18983a..dd0b93fd59 100644 --- a/addons/sandbag/functions/fnc_pickup.sqf +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -10,26 +10,26 @@ * None * * Example: - * [_sandbag, _unit] call ace_sandbag_fnc_pickup; + * [_sandbag, _unit] call ace_sandbag_fnc_pickup * * Public: No */ #include "script_component.hpp" -PARAMS_2(_sandbag,_unit); +params ["_sandbag", "_unit"]; _unit playActionNow "PutDown"; _unit setVariable [QGVAR(usingSandbag), true]; [{ - PARAMS_2(_sandbag,_unit); + params ["_sandbag", "_unit"]; _unit setVariable [QGVAR(usingSandbag), false]; deletevehicle _sandbag; - + // Force physx update { _x setPosASL (getPosASL _x); - } forEach (_unit nearObjects ["ACE_SandbagObject", 5]); - + } count (_unit nearObjects ["ACE_SandbagObject", 5]); + [_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory); }, [_sandbag, _unit], 1.5, 0.5] call EFUNC(common,waitAndExecute); diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index 034a6bfdbb..5576add969 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -6,132 +6,144 @@ Sandsack Мешок с песком Worek z piaskiem - Sandbag + Saco de arena Sac de sable Pytel s pískem Sacco di Sabbia Homokzsák + Saco de Areia Sandbag (empty) Sandsack (leer) Мешок с песком (пустой) Worek na piasek - Sandbag (empty) + Saco de arena (vacio) Sac de sable (vide) Pytel na písek (prázdný) Sacco di Sabbia (Vuoto) Homokzsák (üres) + Saco de Areia (vazio) Cannot build here Nicht möglich Установка на этом месте невозможна Nie można tu budować - Cannot build here + No se puede construir aqui Impossible de construire ici Zde nelze postavit Impossibile costruire qui Nem teheted ide + Não pode contruir aqui Pick up Sandbag Sandsack abbauen Взять мешок с песком Zabierz worek - Pick up sandbag + Coger saco de arena Prendre sac de sable Zvednout pytel Prendi Sacco di Sabbia Homokzsák felvétele + Pegar saco de areia Carry Sandbag Sandsack tragen Нести мешок с песком Przenieś worek - Carry sandbag + Portar saco de arena Porter sac de sable Nést pytel Trasporta Sacco di Sabbia Homokzsák cipelése + Carregar saco de areia End Carrying Tragen beenden Завершить переноску Zostaw worek - End carrying + Dejar de portar Arreter de porter Položit Fine Trasporto Cipelés abbahagyása + Parar de carregar Drop Sandbag Sandsack ablegen Положить мешок Upuść worek - Drop sandbag + Soltar saco de arena Lacher sac de sable Odložit pytel Lascia Sacco di Sabbia Homokzsák eldobása + Derrubar saco de areia Confirm Deployment Aufbauen Подтвердить установку Potwierdź rozłożenie - Confirm Deployment + Confirmar despliegue Confirmer Déploiement Potvrdit Položení Conferma Posizionamento Lerak + Confirmar implantação Cancel Deployment Abbrechen Отменить установку Anuluj rozłożenie - Cancel Deployment + Cancelar despliegue Annuler Déploiement Zrušit Položení Cancella Posizionamento Visszavonás + Cancelar implantação Deploy Sandbag Sandsack aufbauen Установить мешок с песком Rozłóż worek z piaskiem - Deploy sandbag + Desplegar saco de arena Deployer sac de sable Umístit pytel Posiziona Sacco di Sabbia Homokzsák lerakása + Implantar saco de areia Sandbag Box Sandsack Kiste Ящик мешков с песком Skrzynia worków na piasek - Sandbag box + Caja de sacos de arena Caisse de sacs de sable Bedna na pytle s pískem Contenitore Sacchi di Sabbia Homokzsákos láda + Caixa de saco de areia Here is no sand Hier gibt es keinen Sand Здесь нет песка Tu nie ma piasku - Here is no sand + Aqui no hay arena Pas de sable ici Tady není písek Qui non cè Sabbia Itt nincs homok + Aqui não tem areia + Modifier, rotates diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index ac03046803..42e0f17818 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -10,23 +10,26 @@ * Return value: * Did we adjust anything? * + * Example: + * [player, ELEVATION_UP, false] call ace_scopes_fnc_adjustScope + * * Public: No */ #include "script_component.hpp" -PARAMS_3(_unit,_turretAndDirection,_majorStep); +private ["_weaponIndex", "_zeroing", "_optic", "_opticConfig", "_verticalIncrement", "_horizontalIncrement", "_maxVertical", "_maxHorizontal", "_adjustment"]; + +params ["_unit", "_turretAndDirection", "_majorStep"]; if (!(_unit isKindOf "Man")) exitWith {false}; if (currentMuzzle _unit != currentWeapon _unit) exitWith {false}; -private ["_weaponIndex", "_zeroing", "_optic", "_verticalIncrement", "_horizontalIncrement", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero", "_adjustment"]; - _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; _adjustment = _unit getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { - _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; // [Windage, Elevation, Zero] + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; // [Windage, Elevation, Zero] }; if (isNil QGVAR(Optics)) then { @@ -34,18 +37,17 @@ if (isNil QGVAR(Optics)) then { }; _optic = GVAR(Optics) select _weaponIndex; -_verticalIncrement = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_VerticalIncrement"); -_horizontalIncrement = getNumber (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_HorizontalIncrement"); -_maxVertical = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Vertical"); -_maxHorizontal = getArray (configFile >> "CfgWeapons" >> _optic >> "ACE_ScopeAdjust_Horizontal"); +_opticConfig = configFile >> "CfgWeapons" >> _optic; +_verticalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement"); +_horizontalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); +_maxVertical = getArray (_opticConfig >> "ACE_ScopeAdjust_Vertical"); +_maxHorizontal = getArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal"); if ((count _maxHorizontal < 2) || (count _maxVertical < 2)) exitWith {false}; if ((_verticalIncrement == 0) && (_horizontalIncrement == 0)) exitWith {false}; _zeroing = _adjustment select _weaponIndex; -_elevation = _zeroing select 0; -_windage = _zeroing select 1; -_zero = _zeroing select 2; +_zeroing params ["_elevation", "_windage", "_zero"]; switch (_turretAndDirection) do { case ELEVATION_UP: { _elevation = _elevation + _verticalIncrement }; diff --git a/addons/scopes/functions/fnc_adjustZero.sqf b/addons/scopes/functions/fnc_adjustZero.sqf index 12e911b537..363407e090 100644 --- a/addons/scopes/functions/fnc_adjustZero.sqf +++ b/addons/scopes/functions/fnc_adjustZero.sqf @@ -8,29 +8,30 @@ * Return value: * true * + * Example: + * [player] call ace_scopes_fnc_adjustZero + * * Public: No */ #include "script_component.hpp" -PARAMS_1(_unit); +private ["_weaponIndex", "_adjustment", "_zeroing"]; + +params ["_unit"]; if (vehicle _unit != _unit) exitWith {false}; -private ["_weaponIndex", "_adjustment", "_zeroing", "_elevation", "_windage", "_zero"]; - _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; _adjustment = _unit getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { // [Windage, Elevation, Zero] - _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; }; -_zeroing = _adjustment select _weaponIndex; -_elevation = _zeroing select 0; -_windage = _zeroing select 1; -_zero = _zeroing select 2; +_zeroing = _adjustment select _weaponIndex; +_zeroing params ["_elevation", "_windage", "_zero"]; _zero = round((_zero + _elevation) * 10) / 10; _elevation = 0; diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index 4950fe9ece..fbd3e1b636 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -11,20 +11,23 @@ * Return value: * True * + * Example: + * [player, 1.3, 0.3, 0.1] call ace_scopes_fnc_applyScopeAdjustment + * * Public: No */ #include "script_component.hpp" -EXPLODE_4_PVT(_this,_unit,_elevation,_windage,_zero); +private ["_adjustmentDifference", "_pitchBankYaw", "_adjustment", "_weaponIndex"]; -private ["_adjustmentDifference", "_pitchbankyaw", "_pitch", "_bank", "_yaw", "_adjustment", "_weaponIndex"]; +params ["_unit", "_elevation", "_windage", "_zero"]; _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); _adjustment = _unit getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { // [Windage, Elevation, Zero] - _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; _unit setVariable [QGVAR(Adjustment), _adjustment]; }; @@ -39,10 +42,11 @@ playSound (["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_Click_3"] se if (cameraView == "GUNNER") then { // Convert adjustmentDifference from mils to degrees _adjustmentDifference = [_adjustmentDifference, {_this * 0.05625}] call EFUNC(common,map); - _pitchbankyaw = [_unit] call EFUNC(common,getPitchBankYaw); - _pitch = (_pitchbankyaw select 0) + (_adjustmentDifference select 0); - _bank = (_pitchbankyaw select 1); - _yaw = (_pitchbankyaw select 2) + (_adjustmentDifference select 1); + _adjustmentDifference params ["_elevationDifference", "_windageDifference"]; + _pitchBankYaw = [_unit] call EFUNC(common,getPitchBankYaw); + _pitchBankYaw params ["_pitch", "_bank", "_yaw"]; + _pitch = _pitch + _elevationDifference; + _yaw = _yaw + _windageDifference; [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw); } else { [] call FUNC(showZeroing); diff --git a/addons/scopes/functions/fnc_canAdjustZero.sqf b/addons/scopes/functions/fnc_canAdjustZero.sqf index 619d82cf6e..36ea4ac793 100644 --- a/addons/scopes/functions/fnc_canAdjustZero.sqf +++ b/addons/scopes/functions/fnc_canAdjustZero.sqf @@ -8,17 +8,20 @@ * Return value: * Can we update the zero reference? * + * Example: + * [player] call ace_scopes_fnc_canAdjustZero + * * Public: No */ #include "script_component.hpp" -PARAMS_1(_unit); - private ["_weaponIndex", "_adjustment", "_elevation"]; +params ["_unit"]; + if (cameraView == "GUNNER") exitWith {false}; -if !(vehicle _unit == _unit) exitWith {false}; -if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false}; +if (vehicle _unit != _unit) exitWith {false}; +if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false}; _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; @@ -26,7 +29,7 @@ if (_weaponIndex < 0) exitWith {false}; _adjustment = _unit getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { // [Windage, Elevation, Zero] - _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; }; _elevation = (_adjustment select _weaponIndex) select 0; diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index 020431c27b..5ede2d2cf8 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and esteldunedain + * Author: KoffeinFlummi, esteldunedain * Adjusts the flight path of the bullet according to the zeroing * * Argument: @@ -18,11 +18,11 @@ */ #include "script_component.hpp" -private ["_unit", "_adjustment", "_projectile", "_weaponIndex", "_zeroing", "_adjustment"]; -_unit = _this select 0; -_projectile = _this select 6; +private ["_adjustment", "_weaponIndex", "_zeroing", "_adjustment"]; -if !([_unit] call EFUNC(common,isPlayer)) exitWith {}; +params ["_unit", "", "", "", "", "", "_projectile"]; + +if (!([_unit] call EFUNC(common,isPlayer))) exitWith {}; _adjustment = _unit getVariable [QGVAR(Adjustment), []]; if (_adjustment isEqualTo []) exitWith {}; @@ -32,9 +32,10 @@ if (_weaponIndex < 0) exitWith {}; _zeroing = _adjustment select _weaponIndex; -if (_zeroing isEqualTo [0,0,0]) exitWith {}; +if (_zeroing isEqualTo [0, 0, 0]) exitWith {}; // Convert zeroing from mils to degrees _zeroing = _zeroing vectorMultiply 0.05625; +_zeroing params ["_elevation", "_windage", "_zero"]; -[_projectile, (_zeroing select 1), (_zeroing select 0) + (_zeroing select 2), 0] call EFUNC(common,changeProjectileDirection); +[_projectile, _elevation, _elevation + _zero, 0] call EFUNC(common,changeProjectileDirection); diff --git a/addons/scopes/functions/fnc_getOptics.sqf b/addons/scopes/functions/fnc_getOptics.sqf index 289ed5e7bd..a80c5860e8 100644 --- a/addons/scopes/functions/fnc_getOptics.sqf +++ b/addons/scopes/functions/fnc_getOptics.sqf @@ -10,21 +10,25 @@ * 1: Optic of secondary * 2: Optic of handgun * + * Example: + * [player] call ace_scopes_fnc_getOptics + * * Public: No */ #include "script_component.hpp" -EXPLODE_1_PVT(_this,_unit); +private "_optics"; -private ["_array"]; -_array = ["", "", ""]; +params ["_unit"]; -if !(_unit isKindOf "CAManBase") exitWith {_array}; +_optics = ["", "", ""]; + +if (!(_unit isKindOf "CAManBase")) exitWith {_optics}; { if (count _x >= 2) then { - _array set [_forEachIndex, _x select 2]; + _optics set [_forEachIndex, _x select 2]; }; } forEach [primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit]; -_array +_optics diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index af4b347124..562bf731b4 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and Commy2 + * Author: KoffeinFlummi, Commy2 * Check if weapon optics changed and reset zeroing if needed * * Arguments: @@ -8,18 +8,21 @@ * Return Value: * None * + * Example: + * [player] call ace_scopes_fnc_inventoryCheck + * * Public: No */ #include "script_component.hpp" -EXPLODE_1_PVT(_this,_player); - private ["_newOptics", "_adjustment"]; +params ["_player"]; + _adjustment = ACE_player getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { // [Windage, Elevation, Zero] - _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; ACE_player setVariable [QGVAR(Adjustment), _adjustment]; [ACE_player, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); }; @@ -32,8 +35,8 @@ _newOptics = [_player] call FUNC(getOptics); { if (_newOptics select _forEachIndex != _x) then { // The optic for this weapon changed, set adjustment to zero - if !((_adjustment select _foreachindex) isEqualTo [0,0,0]) then { - _adjustment set [_forEachIndex, [0,0,0]]; + if (!((_adjustment select _foreachindex) isEqualTo [0, 0, 0])) then { + _adjustment set [_forEachIndex, [0, 0, 0]]; [ACE_player, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); }; }; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index 7cefc68563..d3d4a38a9d 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and esteldunedain + * Author: KoffeinFlummi, esteldunedain * Display the adjustment knobs, update their value and fade them out later * * Arguments: @@ -8,13 +8,16 @@ * Return Value: * None * + * Example: + * [] call ace_scopes_fnc_showZeroing + * * Public: No */ #include "script_component.hpp" -disableSerialization; +private ["_weaponIndex", "_adjustment", "_layer", "_display", "_zeroing", "_vertical", "_horizontal"]; -private ["_weaponIndex","_adjustment","_layer","_display","_zeroing","_vertical","_horizontal"]; +disableSerialization; _weaponIndex = [ACE_player, currentWeapon ACE_player] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {}; @@ -22,7 +25,7 @@ if (_weaponIndex < 0) exitWith {}; _adjustment = ACE_player getVariable QGVAR(Adjustment); if (isNil "_adjustment") then { // [Windage, Elevation, Zero] - _adjustment = [[0,0,0], [0,0,0], [0,0,0]]; + _adjustment = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]; }; // Display the adjustment knobs @@ -35,10 +38,11 @@ if (isNull _display) exitWith {}; // Update values _zeroing = _adjustment select _weaponIndex; +_zeroing params ["_elevation", "_windage"]; _vertical = _display displayCtrl 12; _horizontal = _display displayCtrl 13; -_vertical ctrlSetText (str (_zeroing select 0)); -_horizontal ctrlSetText (str (_zeroing select 1)); +_vertical ctrlSetText (str _elevation); +_horizontal ctrlSetText (str _windage); // Set the ACE_time when to hide the knobs GVAR(timeToHide) = ACE_diagTime + 3.0; @@ -47,14 +51,13 @@ if !(isNil QGVAR(fadePFH)) exitWith {}; // Launch a PFH to wait and fade out the knobs GVAR(fadePFH) = [{ - if (ACE_diagTime >= GVAR(timeToHide)) exitWith { private "_layer"; + params ["", "_pfhId"]; _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; _layer cutFadeOut 2; GVAR(fadePFH) = nil; - [_this select 1] call cba_fnc_removePerFrameHandler; + [_pfhId] call cba_fnc_removePerFrameHandler; }; - }, 0.1, []] call CBA_fnc_addPerFrameHandler diff --git a/addons/sitting/ACE_Settings.hpp b/addons/sitting/ACE_Settings.hpp index d4ebb61e83..49d3e27929 100644 --- a/addons/sitting/ACE_Settings.hpp +++ b/addons/sitting/ACE_Settings.hpp @@ -1,6 +1,6 @@ class ACE_Settings { class GVAR(enable) { - value = 1; + value = 0; typeName = "BOOL"; displayName = CSTRING(Enable); }; diff --git a/addons/sitting/CfgMoves.hpp b/addons/sitting/CfgMoves.hpp new file mode 100644 index 0000000000..fc902032e2 --- /dev/null +++ b/addons/sitting/CfgMoves.hpp @@ -0,0 +1,105 @@ +// Enable visual head movement while free-looking +#define MACRO_ANIMATION \ + head = "headDefault"; + +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class HubSittingChairA_idle1; + class GVAR(HubSittingChairA_idle1): HubSittingChairA_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairA_idle2; + class GVAR(HubSittingChairA_idle2): HubSittingChairA_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairA_idle3; + class GVAR(HubSittingChairA_idle3): HubSittingChairA_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairA_move1; + class GVAR(HubSittingChairA_move1): HubSittingChairA_move1 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle1; + class GVAR(HubSittingChairB_idle1): HubSittingChairB_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle2; + class GVAR(HubSittingChairB_idle2): HubSittingChairB_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle3; + class GVAR(HubSittingChairB_idle3): HubSittingChairB_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairB_move1; + class GVAR(HubSittingChairB_move1): HubSittingChairB_move1 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle1; + class GVAR(HubSittingChairC_idle1): HubSittingChairC_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle2; + class GVAR(HubSittingChairC_idle2): HubSittingChairC_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle3; + class GVAR(HubSittingChairC_idle3): HubSittingChairC_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairC_move1; + class GVAR(HubSittingChairC_move1): HubSittingChairC_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle1; + class GVAR(HubSittingChairUA_idle1): HubSittingChairUA_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle2; + class GVAR(HubSittingChairUA_idle2): HubSittingChairUA_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle3; + class GVAR(HubSittingChairUA_idle3): HubSittingChairUA_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUA_move1; + class GVAR(HubSittingChairUA_move1): HubSittingChairUA_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle1; + class GVAR(HubSittingChairUB_idle1): HubSittingChairUB_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle2; + class GVAR(HubSittingChairUB_idle2): HubSittingChairUB_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle3; + class GVAR(HubSittingChairUB_idle3): HubSittingChairUB_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUB_move1; + class GVAR(HubSittingChairUB_move1): HubSittingChairUB_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle1; + class GVAR(HubSittingChairUC_idle1): HubSittingChairUC_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle2; + class GVAR(HubSittingChairUC_idle2): HubSittingChairUC_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle3; + class GVAR(HubSittingChairUC_idle3): HubSittingChairUC_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUC_move1; + class GVAR(HubSittingChairUC_move1): HubSittingChairUC_move1 { + MACRO_ANIMATION + }; + }; +}; diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index c915750d02..a156d5e87e 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -39,7 +39,7 @@ class CfgVehicles { class ACE_MainActions { \ displayName = ECSTRING(interaction,MainAction); \ selection = ""; \ - distance = 1.25; \ + distance = 1.5; \ condition = "true"; \ class GVAR(Sit) { \ displayName = CSTRING(Sit); \ @@ -63,7 +63,7 @@ class CfgVehicles { GVAR(sitRotation) = 10; }; // Camping Chair - class Land_CampingChair_V2_F: ThingX { + class Land_CampingChair_V2_F: ThingX { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -71,8 +71,10 @@ class CfgVehicles { GVAR(sitPosition[]) = {0, -0.1, -0.45}; GVAR(sitRotation) = 45; }; + + class Furniture_base_F; // Chair (Plastic) - class Land_ChairPlastic_F: ThingX { + class Land_ChairPlastic_F: Furniture_base_F { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -81,7 +83,7 @@ class CfgVehicles { GVAR(sitRotation) = 5; }; // Chair (Wooden) - class Land_ChairWood_F: ThingX { + class Land_ChairWood_F: Furniture_base_F { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -90,7 +92,7 @@ class CfgVehicles { GVAR(sitRotation) = 75; }; // Office Chair - class Land_OfficeChair_01_F: ThingX { + class Land_OfficeChair_01_F: Furniture_base_F { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -99,7 +101,7 @@ class CfgVehicles { GVAR(sitRotation) = 15; }; // Rattan Chair - class Land_RattanChair_01_F: ThingX { + class Land_RattanChair_01_F: Furniture_base_F { XEH_ENABLED; MACRO_SEAT_ACTION GVAR(canSit) = 1; @@ -107,22 +109,4 @@ class CfgVehicles { GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) GVAR(sitRotation) = 2; }; - // Field Toilet - class Land_FieldToilet_F: ThingX { - XEH_ENABLED; - MACRO_SEAT_ACTION - GVAR(canSit) = 1; - GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, 0.75, -1.1}; - GVAR(sitRotation) = 10; - }; - // Toiletbox - class Land_ToiletBox_F: ThingX { - XEH_ENABLED; - MACRO_SEAT_ACTION - GVAR(canSit) = 1; - GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, 0.75, -1.1}; - GVAR(sitRotation) = 10; - }; }; diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index e2bf1b23c1..1e477cd952 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -9,4 +9,3 @@ if !(hasInterface) exitWith {}; // Handle interruptions ["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); ["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); -["SetSurrendered", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler); diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf index 86912ada6b..1649aaba2b 100644 --- a/addons/sitting/XEH_preInit.sqf +++ b/addons/sitting/XEH_preInit.sqf @@ -6,6 +6,7 @@ PREP(canSit); PREP(canStand); PREP(getRandomAnimation); PREP(handleInterrupt); +PREP(hasChairMoved); PREP(moduleInit); PREP(sit); PREP(stand); diff --git a/addons/sitting/config.cpp b/addons/sitting/config.cpp index f12fa530fa..96d3edab7b 100644 --- a/addons/sitting/config.cpp +++ b/addons/sitting/config.cpp @@ -12,6 +12,7 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" #include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMoves.hpp" #include "CfgVehicles.hpp" diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf index c9762e265c..fef36b4bbd 100644 --- a/addons/sitting/functions/fnc_canSit.sqf +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -10,13 +10,16 @@ * Can Sit Down * * Example: - * [seat, player] call ace_sitting_fnc_canSit; + * [seat, player] call ace_sitting_fnc_canSit * * Public: No */ #include "script_component.hpp" -PARAMS_2(_seat,_player); +params ["_seat", "_player"]; -// Sitting enabled, is seat object and not occupied -(GVAR(enable) && {getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {isNil{_seat getVariable QGVAR(seatOccupied)}}) +// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope) +GVAR(enable) && +{getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && +{isNil {_seat getVariable QGVAR(seatOccupied)}} && +{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} diff --git a/addons/sitting/functions/fnc_canStand.sqf b/addons/sitting/functions/fnc_canStand.sqf index 4549b9891b..c516485a82 100644 --- a/addons/sitting/functions/fnc_canStand.sqf +++ b/addons/sitting/functions/fnc_canStand.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -PARAMS_1(_player); +params ["_player"]; // Sitting -(_player getVariable [QGVAR(isSitting),false]) +(_player getVariable [QGVAR(isSitting), false]) diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf index c83d230a90..ca9a9ccfb1 100644 --- a/addons/sitting/functions/fnc_getRandomAnimation.sqf +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -9,40 +9,40 @@ * Random Animation * * Example: - * _animation = call ace_sitting_fnc_getRandomAnimation; + * _animation = call ace_sitting_fnc_getRandomAnimation * * Public: No */ #include "script_component.hpp" -private ["_animations"]; +private "_animations"; // Animations Pool _animations = [ - "HubSittingChairUA_idle1", - "HubSittingChairUA_idle2", - "HubSittingChairUA_idle3", - "HubSittingChairUA_move1", - "HubSittingChairUB_idle1", - "HubSittingChairUB_idle2", - "HubSittingChairUB_idle3", - "HubSittingChairUB_move1", - "HubSittingChairUC_idle1", - "HubSittingChairUC_idle2", - "HubSittingChairUC_idle3", - "HubSittingChairUC_move1", - "HubSittingChairA_idle1", - "HubSittingChairA_idle2", - "HubSittingChairA_idle3", - "HubSittingChairA_move1", - "HubSittingChairB_idle1", - "HubSittingChairB_idle2", - "HubSittingChairB_idle3", - "HubSittingChairB_move1", - "HubSittingChairC_idle1", - "HubSittingChairC_idle2", - "HubSittingChairC_idle3", - "HubSittingChairC_move1" + QGVAR(HubSittingChairA_idle1), + QGVAR(HubSittingChairA_idle2), + QGVAR(HubSittingChairA_idle3), + QGVAR(HubSittingChairA_move1), + QGVAR(HubSittingChairB_idle1), + QGVAR(HubSittingChairB_idle2), + QGVAR(HubSittingChairB_idle3), + QGVAR(HubSittingChairB_move1), + QGVAR(HubSittingChairC_idle1), + QGVAR(HubSittingChairC_idle2), + QGVAR(HubSittingChairC_idle3), + QGVAR(HubSittingChairC_move1), + QGVAR(HubSittingChairUA_idle1), + QGVAR(HubSittingChairUA_idle2), + QGVAR(HubSittingChairUA_idle3), + QGVAR(HubSittingChairUA_move1), + QGVAR(HubSittingChairUB_idle1), + QGVAR(HubSittingChairUB_idle2), + QGVAR(HubSittingChairUB_idle3), + QGVAR(HubSittingChairUB_move1), + QGVAR(HubSittingChairUC_idle1), + QGVAR(HubSittingChairUC_idle2), + QGVAR(HubSittingChairUC_idle3), + QGVAR(HubSittingChairUC_move1) ]; // Select random animation diff --git a/addons/sitting/functions/fnc_handleInterrupt.sqf b/addons/sitting/functions/fnc_handleInterrupt.sqf index 8127e924ef..328675c172 100644 --- a/addons/sitting/functions/fnc_handleInterrupt.sqf +++ b/addons/sitting/functions/fnc_handleInterrupt.sqf @@ -9,14 +9,14 @@ * None * * Example: - * [player] call ace_sitting_fnc_handleInterrupt; + * player call ace_sitting_fnc_handleInterrupt * * Public: No */ #include "script_component.hpp" -PARAMS_1(_player); +params ["_player"]; if (_player getVariable [QGVAR(isSitting), false]) then { - [_player] call FUNC(stand); + _player call FUNC(stand); }; diff --git a/addons/sitting/functions/fnc_hasChairMoved.sqf b/addons/sitting/functions/fnc_hasChairMoved.sqf new file mode 100644 index 0000000000..de3a38e0ce --- /dev/null +++ b/addons/sitting/functions/fnc_hasChairMoved.sqf @@ -0,0 +1,30 @@ +/* + * Author: Jonpas + * Checks if chair moved from original position. + * + * Arguments: + * 0: Seat + * 1: Seat Position + * + * Return Value: + * None + * + * Example: + * [seat, seatPos] call ace_sitting_fnc_hasChairMoved + * + * Public: No + */ +#include "script_component.hpp" + +params ["_seat", "_seatPosOrig"]; + +TRACE_2("Chair position",_seatPosOrig,getPosASL _seat); + +(getPosASL _seat) params ["_seatX", "_seatY", "_seatZ"]; +_seatPosOrig params ["_seatOrigX", "_seatOrigY", "_seatOrigZ"]; + +// Check each coordinate due to possibility of tiny movements in simulation +if (abs (_seatX - _seatOrigX) > 0.01) exitWith {true}; +if (abs (_seatY - _seatOrigY) > 0.01) exitWith {true}; +if (abs (_seatZ - _seatOrigZ) > 0.01) exitWith {true}; +false diff --git a/addons/sitting/functions/fnc_moduleInit.sqf b/addons/sitting/functions/fnc_moduleInit.sqf index 25da5be347..ae476317db 100644 --- a/addons/sitting/functions/fnc_moduleInit.sqf +++ b/addons/sitting/functions/fnc_moduleInit.sqf @@ -3,18 +3,22 @@ * Initializes the Sitting module. * * Arguments: - * Whatever the module provides. + * 0: The module logic + * 1: Units + * 2: Activated * * Return Value: * None + * + * Public: No */ #include "script_component.hpp" if !(isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); +params ["_logic", "_units", "_activated"]; -if !(_activated) exitWith {}; +if (!_activated) exitWith {}; [_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule); diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf index 1944cb2190..0c6825ed58 100644 --- a/addons/sitting/functions/fnc_sit.sqf +++ b/addons/sitting/functions/fnc_sit.sqf @@ -18,7 +18,7 @@ private ["_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_sitDirectionVisual"]; -PARAMS_2(_seat,_player); +params ["_seat", "_player"]; // Set global variable for standing up GVAR(seat) = _seat; @@ -33,11 +33,13 @@ _sitPosition = getArray (_configFile >> QGVAR(sitPosition)); _sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber (_configFile >> QGVAR(sitRotation))} else {45}; // Apply default if config entry not present // Get random animation and perform it (before moving player to ensure correct placement) -[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); +[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations +[_player, "", 1] call EFUNC(common,doAnimation); // Correctly applies animation's config values (such as disallow throwing of grenades, intercept keybinds... etc). // Set direction and position _player setDir _sitDirection; -_player setPosASL (_seat modelToWorld _sitPosition) call EFUNC(common,positionToASL); +// No need for ATL/ASL as modelToWorld returns in format position +_player setPos (_seat modelToWorld _sitPosition); // Set variables _player setVariable [QGVAR(isSitting), true]; @@ -45,12 +47,21 @@ _seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple peop // Add rotation control PFH _sitDirectionVisual = getDirVisual _player; // Needed for precision and issues with using above directly +_seatPosOrig = getPosASL _seat; [{ - EXPLODE_3_PVT(_this select 0,_player,_sitDirectionVisual,_sitRotation); - + params ["_args", "_pfhId"]; + _args params ["_player", "_sitDirectionVisual", "_sitRotation", "_seat", "_seatPosOrig"]; + // Remove PFH if not sitting any more if !(_player getVariable [QGVAR(isSitting), false]) exitWith { - [_this select 1] call cba_fnc_removePerFrameHandler; + [_pfhId] call cba_fnc_removePerFrameHandler; + TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(isSitting), false)]); + }; + + // Stand up if chair moves + if ([_seat, _seatPosOrig] call FUNC(hasChairMoved)) exitWith { + _player call FUNC(stand); + TRACE_2("Chair moved",getPosASL _seat,_seatPosOrig); }; // Set direction to boundary when passing it @@ -60,4 +71,4 @@ _sitDirectionVisual = getDirVisual _player; // Needed for precision and issues w if (getDir _player < _sitDirectionVisual - _sitRotation) exitWith { _player setDir (_sitDirectionVisual - _sitRotation); }; -}, 0, [_player, _sitDirectionVisual, _sitRotation]] call cba_fnc_addPerFrameHandler; +}, 0, [_player, _sitDirectionVisual, _sitRotation, _seat, _seatPosOrig]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/sitting/functions/fnc_stand.sqf b/addons/sitting/functions/fnc_stand.sqf index df1ee6f169..978bcaf279 100644 --- a/addons/sitting/functions/fnc_stand.sqf +++ b/addons/sitting/functions/fnc_stand.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -PARAMS_1(_player); +params ["_player"]; // Restore animation [_player, "", 2] call EFUNC(common,doAnimation); diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml index 16eb84c59f..443c34c360 100644 --- a/addons/sitting/stringtable.xml +++ b/addons/sitting/stringtable.xml @@ -4,19 +4,37 @@ Sit Down Usiądź + Sentar + Sednout si + Sentarse Stand Up Wstań + Levantar + Vstát + Levantarse Enable Sitting + Habilitar opção para sentar + Aktywuj siadanie + Povolit sezení + Acivar asiento Sitting + Sentado + Siadanie + Sedící + Sentarse This module allows you to disable the ability to sit on chairs and toilets. + Este módulo permite que você desabilite a capacidade de sentar-se em cadeiras e banheiros. + Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach. + Tento modul dovoluje zakázat možnost sedět na židlých a toaletách. + Este módulo te permite desactivar la capacidad de sentarte en sillas y aseos. \ No newline at end of file diff --git a/addons/slideshow/$PBOPREFIX$ b/addons/slideshow/$PBOPREFIX$ new file mode 100644 index 0000000000..78ced9578e --- /dev/null +++ b/addons/slideshow/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\slideshow \ No newline at end of file diff --git a/addons/slideshow/CfgEventHandlers.hpp b/addons/slideshow/CfgEventHandlers.hpp new file mode 100644 index 0000000000..b928bc2de6 --- /dev/null +++ b/addons/slideshow/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; diff --git a/addons/slideshow/CfgVehicles.hpp b/addons/slideshow/CfgVehicles.hpp new file mode 100644 index 0000000000..7e82d48ffc --- /dev/null +++ b/addons/slideshow/CfgVehicles.hpp @@ -0,0 +1,49 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(module): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE_missionModules"; + displayName = CSTRING(DisplayName); + function = QFUNC(moduleInit); + scope = 2; + isGlobal = 1; + isTriggerActivated = 0; + isDisposable = 0; + icon = QUOTE(PATHTOF(UI\Icon_Module_Slideshow_ca.paa)); + class Arguments { + class Objects { + displayName = CSTRING(Objects_DisplayName); + description = CSTRING(Objects_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Controllers { + displayName = CSTRING(Controllers_DisplayName); + description = CSTRING(Controllers_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Images { + displayName = CSTRING(Images_DisplayName); + description = CSTRING(Images_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Names { + displayName = CSTRING(Names_DisplayName); + description = CSTRING(Names_Description); + typeName = "STRING"; + defaultValue = ""; + }; + class Duration { + displayName = CSTRING(Duration_DisplayName); + description = CSTRING(Duration_Description); + typeName = "NUMBER"; + defaultValue = 0; + }; + }; + class ModuleDescription { + description = CSTRING(Description); + }; + }; +}; diff --git a/addons/slideshow/README.md b/addons/slideshow/README.md new file mode 100644 index 0000000000..58b22c1e17 --- /dev/null +++ b/addons/slideshow/README.md @@ -0,0 +1,10 @@ +ace_slideshow +=============== + +Adds ability to have slide-shows on them and control them with a controller (another object). + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Jonpas] (https://github.com/jonpas) diff --git a/addons/slideshow/UI/Icon_Module_Slideshow_ca.paa b/addons/slideshow/UI/Icon_Module_Slideshow_ca.paa new file mode 100644 index 0000000000..882a279579 Binary files /dev/null and b/addons/slideshow/UI/Icon_Module_Slideshow_ca.paa differ diff --git a/addons/slideshow/XEH_preInit.sqf b/addons/slideshow/XEH_preInit.sqf new file mode 100644 index 0000000000..0f9e270896 --- /dev/null +++ b/addons/slideshow/XEH_preInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(addSlideActions); +PREP(autoTransition); +PREP(createSlideshow); +PREP(makeList); +PREP(moduleInit); + +GVAR(slideshows) = 0; + +ADDON = true; diff --git a/addons/slideshow/config.cpp b/addons/slideshow/config.cpp new file mode 100644 index 0000000000..3af3bd5354 --- /dev/null +++ b/addons/slideshow/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[]= {"Jonpas", "DaC"}; + authorUrl = "https://github.com/jonpas"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/slideshow/functions/fnc_addSlideActions.sqf b/addons/slideshow/functions/fnc_addSlideActions.sqf new file mode 100644 index 0000000000..1ebba306b4 --- /dev/null +++ b/addons/slideshow/functions/fnc_addSlideActions.sqf @@ -0,0 +1,51 @@ +/* + * Author: Jonpas + * Adds controller slide actions. + * + * Arguments: + * 0: Objects + * 1: Images + * 2: Names + * 3: Controller + * 4: Current Slideshow + * + * Return Value: + * List of actions + * + * Example: + * [[object], ["image"], ["name"], controller, 1] call ace_slideshow_fnc_addSlideActions + * + * Public: No + */ +#include "script_component.hpp" + +private "_actions"; + +params ["_objects", "_images", "_names", "_controller", "_currentSlideshow"]; + +_actions = []; +{ + _actions pushBack + [ + [ + format [QGVAR(slideshow%1_slide%2), _currentSlideshow, _forEachIndex + 1], + _names select _forEachIndex, + "", + { + (_this select 2) params ["_objects", "_image"]; + { + _x setObjectTextureGlobal [0, _image] + } count _objects; + }, + {true}, + {}, + [_objects, _x] + ] call EFUNC(interact_menu,createAction), + [], + _controller + ]; +} forEach _images; + +TRACE_1("Children actions",_actions); + +_actions diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf new file mode 100644 index 0000000000..c8b03a707a --- /dev/null +++ b/addons/slideshow/functions/fnc_autoTransition.sqf @@ -0,0 +1,41 @@ +/* + * Author: Jonpas + * Handles automatic slide transitions using waitAndExecute in a PFH-like manner resulting in no performance loss. + * + * Arguments: + * 0: Objects + * 1: Image Paths + * 2: State Variable Name + * 3: Duration (0 disables automatic transitions) + * + * Return Value: + * None + * + * Example: + * [objects, images, "ace_slideshow_slideshow1", duration] call ace_slideshow_fnc_autoTransition + * + * Public: No + */ +#include "script_component.hpp" + +private "_currentSlide"; + +params ["_objects", "_images", "_varString", "_duration"]; + +// Get current slide number of this slideshow +_currentSlide = missionNamespace getVariable [_varString, 0]; + +// Increment slide or return to first slide if reached end +_currentSlide = (_currentSlide + 1) mod (count _images); + +// Save slide back into global variable (PFH's local variables do not persist through PFH run) +missionNamespace setVariable [_varString, _currentSlide]; + +// Set slide +{ + _x setObjectTextureGlobal [0, _images select _currentSlide]; +} count _objects; + +// Log current slide and execute Next slide +TRACE_4("Auto-transition",_images select _currentSlide,_currentSlide,count _images,_duration); +[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute); diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf new file mode 100644 index 0000000000..665b954496 --- /dev/null +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -0,0 +1,82 @@ +/* + * Author: Jonpas, DaC + * Prepares necessary variables and default image. + * + * Arguments: + * 0: Objects + * 1: Controller Objects + * 2: Image Paths + * 3: Action Names + * 4: Slide Duration (0 disables automatic transitions) + * + * Return Value: + * Parsed List + * + * Example: + * [[object1, object2, object3], [controller1], ["images\image1.paa", "images\image2.paa"], ["Action1", "Action2"], 5] call ace_slideshow_fnc_createSlideshow + * + * Public: Yes + */ +#include "script_component.hpp" + +private ["_currentSlideshow", "_actionsObject", "_actionsClass", "_mainAction", "_slidesAction", "_varString"]; + +params ["_objects", "_controllers", "_images", "_names", "_duration"]; + +// Verify data +if (count _images != count _names || {count _images == 0} || {count _names == 0}) exitWith { + diag_log "[ACE] ERROR: Slideshow Images or Names fields can NOT be empty and must have equal number of items!" +}; + +// Objects synced to the module +{ + _objects pushBack _x; + nil +} count (synchronizedObjects _logic); + +// If no controllers use objects as controllers +if (count _controllers == 0) then { + _controllers = _objects; +}; + +TRACE_4("Information",_objects,_controllers,_images,_names); + +if (isServer) then { + // Default images on whiteboards (first image) + { + _x setObjectTextureGlobal [0, _images select 0]; + } count _objects; + + // Number of slideshows (multiple modules support) + GVAR(slideshows) = GVAR(slideshows) + 1; +}; + +_currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets changed during execution of below code + +// If interaction menu module is not present, set default duration value +if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then { + _duration = 5; + diag_log text format ["[ACE]: Slideshow: Interaction Menu module not present, defaulting duration value to %1", _duration]; +}; + +// Add interactions if automatic transitions are disabled, else setup automatic transitions +if (_duration == 0) then { + { + // Add Slides sub-action and populate with images + _slidesAction = [QGVAR(Slides), localize LSTRING(Interaction), "", {}, {true}, {(_this select 2) call FUNC(addSlideActions)}, [_objects,_images,_names,_x,_currentSlideshow], [0,0,0], 2] call EFUNC(interact_menu,createAction); + [_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject); + nil + } count _controllers; +} else { + if !(isServer) exitWith {}; + + // Formatted GVAR string (multiple modules support) + _varString = format [QGVAR(slideshow%1), _currentSlideshow]; + TRACE_1("Current Slide",_varString); + + // Set formatted GVAR to first slide + missionNamespace setVariable [_varString, 0]; + + // Automatic transitions handler + [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute); +}; diff --git a/addons/slideshow/functions/fnc_makeList.sqf b/addons/slideshow/functions/fnc_makeList.sqf new file mode 100644 index 0000000000..8de87a2d96 --- /dev/null +++ b/addons/slideshow/functions/fnc_makeList.sqf @@ -0,0 +1,58 @@ +/* + * Author: Jonpas + * Makes a list from a string using comma as a delimiter, optionally remove whitespace and check each for object existence. + * + * Arguments: + * 0: Text + * 1: Remove Whitespace + * 2: Check Nil + * + * Return Value: + * Parsed List + * + * Example: + * ["text", true, false] call ace_slideshow_fnc_makeList + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_list", "_removeWhitespace", "_checkNil"]; + +private ["_splittedList", "_listNoWhitespace", "_nilCheckPassedList"]; + +// Split using comma delimiter +_splittedList = [_list, ","] call BIS_fnc_splitString; + +// Remove whitespace +_listNoWhitespace = []; +if (_removeWhitespace) then { + { + _listNoWhitespace pushBack ([_x] call EFUNC(common,stringRemoveWhiteSpace)); + nil + } count _splittedList; + _list = _listNoWhitespace; +}; + +// Check for object existence +_nilCheckPassedList = ""; +if (_checkNil) then { + { + if !(isNil _x) then { + if (_nilCheckPassedList == "") then { + _nilCheckPassedList = _x; + } else { + _nilCheckPassedList = _nilCheckPassedList + "," + _x; + }; + }; + } count _list; + + // Add Array characters and parse into array + _list = "[" + _nilCheckPassedList + "]"; + _list = [] call compile _list; +}; + +TRACE_4("Lists",_splittedList,_listNoWhitespace,_nilCheckPassedList,_list); + +_list // return diff --git a/addons/slideshow/functions/fnc_moduleInit.sqf b/addons/slideshow/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..da1724dfcc --- /dev/null +++ b/addons/slideshow/functions/fnc_moduleInit.sqf @@ -0,0 +1,37 @@ +/* + * Author: Jonpas + * Initializes the module. + * + * Arguments: + * 0: The module logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +// Exit on Headless Client +if (!hasInterface && !isDedicated) exitWith {}; + +private ["_objects", "_controllers", "_images", "_names", "_duration"]; + +params [["_logic", objNull, [objNull]], "_units", "_activated"]; + +if !(_activated) exitWith {}; +if (isNull _logic) exitWith {}; + +// Extract variables from logic +_objects = [_logic getVariable ["Objects", ""], true, true] call FUNC(makeList); +_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList); +_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList); +_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList); +_duration = _logic getVariable ["Duration", 0]; + +// Prepare with actions +[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow); + +diag_log text format ["[ACE]: Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration]; diff --git a/addons/slideshow/functions/script_component.hpp b/addons/slideshow/functions/script_component.hpp new file mode 100644 index 0000000000..c4c2d6d966 --- /dev/null +++ b/addons/slideshow/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\slideshow\script_component.hpp" diff --git a/addons/slideshow/script_component.hpp b/addons/slideshow/script_component.hpp new file mode 100644 index 0000000000..12f60ee1ab --- /dev/null +++ b/addons/slideshow/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT slideshow +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_SLIDESHOW + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SLIDESHOW + #define DEBUG_SETTINGS DEBUG_SETTINGS_SLIDESHOW +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml new file mode 100644 index 0000000000..fa10700ffb --- /dev/null +++ b/addons/slideshow/stringtable.xml @@ -0,0 +1,57 @@ + + + + + Slideshow + Pokaz slajdów + + + This module allows you to set up slide-shows on different objects. One module per image list. Only objects with hiddenSelection 0 are supported. + Ten moduł pozwala skonfigurować pokaz slajdów na różnych obiektach. Jeden moduł na jedną liste slajdów. Tylko obiekty z hiddenSelection 0 są wspierane. + + + Objects + Obiekty + + + Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. Reference INFO for object support. + Nazwy obiektów (mogą to też być zsynchronizowane obiekty) na których pokaz slajdów zostanie pokazany, oddzielony przecinkiem jeżeli jest ich więcej niż 1. Sprawdź opis modułu aby dowiedzieć się jakie obiekty są wspierane przez moduł. + + + Controllers + Kontroler + + + Controller object names, separated by commas if multiple. + Nazwa obiektu - kontrolera, oddzielona przecinkami jeżeli jest ich więcej niż 1. + + + Images + Obrazy + + + List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). + Lista obrazów, które zostaną użyte do pokazu slajdów, oddzielone przecinkiem, z poprawnym pełnym formatem ścieżki do obrazka (np. slajdy\obrazek.paa). + + + Interaction Names + Nazwy interakcji + + + List of names that will be used for interaction entries, separated by commas, in order of images. + Lista nazw, które zostaną użyte do nazwania wpisów interakcji, oddzielone przecinkiem, w kolejności obrazów. + + + Slide Duration + Czas trwania slajdów + + + Duration of each slide. Default: 0 (Automatic Transitions Disabled) + Czas trwania poszczególnych slajdów. Domyślnie: 0 (Automatyczne przejścia wyłączone) + + + Slides + Slajdy + + + \ No newline at end of file diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index d42946214b..b0b8bf9c77 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -24,10 +24,7 @@ class CfgVehicles { displayName = CSTRING(DisplayName); vehicleClass = "Items"; class TransportItems { - class ACE_SpottingScope { - name = "ACE_SpottingScope"; - count = 1; - }; + MACRO_ADDITEM(ACE_SpottingScope,1); }; }; diff --git a/addons/spottingscope/functions/fnc_pickup.sqf b/addons/spottingscope/functions/fnc_pickup.sqf index 3730068092..81c9bc10a5 100644 --- a/addons/spottingscope/functions/fnc_pickup.sqf +++ b/addons/spottingscope/functions/fnc_pickup.sqf @@ -1,30 +1,30 @@ /* * Author: Rocko, Ruthberg - * * Pick up spotting scope * * Arguments: * 0: spotting scope * 1: unit * - * Return Value: - * Nothing - * * Return value: * None + * + * Example: + * [spotting_scope, player] call ace_spottingscope_fnc_pickup + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_spottingScope,_unit); +params ["_spottingScope", "_unit"]; if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { _unit playMove "AmovPercMstpSrasWrflDnon_diary"; }; [{ - PARAMS_2(_spottingScope,_unit); - + params ["_spottingScope", "_unit"]; + [_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory); deleteVehicle _spottingScope; - }, [_spottingScope, _unit], 1, 0]call EFUNC(common,waitAndExecute); diff --git a/addons/spottingscope/functions/fnc_place.sqf b/addons/spottingscope/functions/fnc_place.sqf index 4967151748..09f756c109 100644 --- a/addons/spottingscope/functions/fnc_place.sqf +++ b/addons/spottingscope/functions/fnc_place.sqf @@ -1,21 +1,22 @@ /* * Author: Rocko, Ruthberg - * * Place down spotting scope * * Arguments: * 0: unit * 1: scope class * - * Return Value: - * Nothing - * * Return value: * None + * + * Example: + * [player, "ACE_SpottingScope"] call ace_spottingscope_fnc_place + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_scopeClass); +params ["_unit", "_scopeClass"]; _unit removeItem _scopeClass; @@ -24,18 +25,17 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { }; [{ - PARAMS_1(_unit); - + params ["_unit"]; + private ["_direction", "_position", "_spottingScope"]; _direction = getDir _unit; _position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0.02]; - + _spottingScope = "ACE_SpottingScopeObject" createVehicle [0, 0, 0]; _spottingScope setDir _direction; _spottingScope setPosASL _position; if ((getPosATL _spottingScope select 2) - (getPos _spottingScope select 2) < 1E-5) then { - _spottingScope setVectorUp (surfaceNormal (position _spottingScope)); + _spottingScope setVectorUp (surfaceNormal (position _spottingScope)); }; _unit reveal _spottingScope; - }, [_unit], 1, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml index 7fc7fdee58..e20f0635ea 100644 --- a/addons/spottingscope/stringtable.xml +++ b/addons/spottingscope/stringtable.xml @@ -6,33 +6,36 @@ Teleskop Зрительная труба Teleskop - Spotting Scope + Telescopio Téléscope de visée Zaměřovací Dalekohled Spotting Scope Megfigyelő távcső + Luneta de observador Pick up Spotting Scope Teleskop aufnehmen Поднять зрительная трубу Zabierz teleskop - Pick up Spotting Scope + Coger telescopio Prendre téléscope de visée Zvednout Zaměřovací dalekohled Raccogli spottingscope Mefgigy. távcső felvétele + Pegar luneta de observador Place Spotting Scope Teleskop aufstellen Установить зрительная трубу Ustaw teleskop - Place Spotting Scope + Colocar telescopio Placer téléscope de visée Položit Zaměřovací dalekohled Posiziona spottingscope Megfigy. távcső elhelyezése + Colocar luneta de observador \ No newline at end of file diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index d51c1b888e..620b805cb9 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -27,19 +27,22 @@ DFUNC(pfhMarkAiOnMap) = { _args = _this select 0; _sides = _args select 0; - + // delete markers { deleteMarkerLocal _x; } forEach GVAR(AllMarkerNames); - if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then { - + // reset the array + GVAR(AllMarkerNames) = []; + + if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then { + // create markers { if (([_x] call FUNC(isValidAi) && (side group _x in _sides)) || (_x getVariable [QGVAR(IsPlayerControlled), false])) then { private ["_markerName", "_marker", "_markerColor"]; - + _markerName = str _x; _marker = createMarkerLocal [_markerName, position _x]; diff --git a/addons/switchunits/functions/fnc_switchBack.sqf b/addons/switchunits/functions/fnc_switchBack.sqf index 69be77dd8b..c9ca731427 100644 --- a/addons/switchunits/functions/fnc_switchBack.sqf +++ b/addons/switchunits/functions/fnc_switchBack.sqf @@ -28,6 +28,11 @@ DFUNC(pfhSwitchBack) = { if (local _originalPlayerUnit) exitWith { selectPlayer _originalPlayerUnit; deleteVehicle _currentUnit; + + private "_layer"; + _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer; + _layer cuttext ["","plain"]; + [(_this select 1)] call cba_fnc_removePerFrameHandler; }; }; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 1fbe8b9b28..c57012afdb 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -95,4 +95,4 @@ DFUNC(pfhSwitchUnit) = { }; }; -[FUNC(pfhSwitchUnit), 0.2, [_unit, _oldUnit]] call cba_fnc_addPerFrameHandler; +[FUNC(pfhSwitchUnit), 0.2, [_unit, _oldUnit]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 4656504545..2d0bc91314 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -23,7 +23,7 @@ Cette unité est trop proche des ennemis Ez az egység túl közel van az ellenséghez. Questa unità è troppo vicina al nemico. - Essa unidade está muito perta do inimigo. + Essa unidade está muito perto do inimigo. SwitchUnits System @@ -31,6 +31,7 @@ Sistema de cambio de unidad Einheiten-Switch-System? Systém výměny stran + Sistema de troca de unidades Switch to West? @@ -38,6 +39,7 @@ ¿Cambiar a Oeste? Nach BLUFOR wechseln? Přesunout k BLUFOR? + Trocar para Oeste? Allow switching to west units? @@ -45,6 +47,7 @@ ¿Permitir cambios a unidades del Oeste? Erlaube das Wechseln zu BLUFOR-Einheiten? Povolit přesun k BLUFOR? + Permitir troca de unidades para o Oeste? Switch to East? @@ -52,6 +55,7 @@ ¿Cambiar a Este? Nach OPFOR wechseln? Přesunout k OPFOR? + Trocar para Leste? Allow switching to east units? @@ -59,6 +63,7 @@ ¿Permitir cambios a unidades del Este? Erlaube das Wechseln zu OPFOR-Einheiten? Povolit přesun k OPFOR? + Permitir troca de unidades para o Leste? Switch to Independent? @@ -66,6 +71,7 @@ ¿Cambiar a Independiente? Nach INDFOR wechseln? Přesunout k INDFOR? + Trocar para Indenpendente Allow switching to independent units? @@ -73,6 +79,7 @@ ¿Permitir cambios a unidades Independientes? Erlaube das Wechseln zu INDFOR-Einheiten? Povolit přesun k INDFOR? + Permitir troca de unidades para o Indenpendente? Switch to Civilian? @@ -80,6 +87,7 @@ ¿Cambiar a Civil? Nach CIVILIAN wechseln? Přesunout k CIVILISTŮM? + Trocar para Civis? Allow switching to civilian units? @@ -87,6 +95,7 @@ ¿Permitir cambios a unidades Civiles Erlaube das Wechseln zu CIVILIAN-Einheiten? Povolit přesun k CIVILISTŮM? + Permitir troca de unidades para o Civil? Enable Safe Zone? @@ -94,6 +103,7 @@ ¿Habilitar zona segura? Aktiviere Sicherheitszone? Povolit bezpečné oblasti? + Habilitar zona segura? Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone. @@ -101,6 +111,7 @@ 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. + Habilitar uma zona segur ao redor das unidades inimigas? Jogadores não conseguirão trocar para unidades dentro dessa zona segura. Safe Zone Radius @@ -108,6 +119,7 @@ Radio de la zona segura Sicherheitszonenradius Oblast bezpečné zóny + Raio da zona segura The safe zone around players from a different team. Default: 200 @@ -115,11 +127,13 @@ 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 + A zona segura ao redor dos jogadores de diferentes equipes. Padrão: 200 - + Moduł ten pozwala na zmianę strony w trakcie gry. Tento modul umožňuje přepínání mazi dostupnými stranami. + Este módulo permite mudar o lado à disposição dos jogadores. \ No newline at end of file diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp index d180ccae40..a1eda1a955 100644 --- a/addons/tacticalladder/CfgVehicles.hpp +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -13,14 +13,14 @@ class CfgVehicles { }; }; }; - + 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); + picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa); maximumLoad = 0; mass = 50; }; @@ -28,13 +28,10 @@ class CfgVehicles { class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportBackpacks { - class _xx_ACE_TacticalLadder_Pack { - backpack = "ACE_TacticalLadder_Pack"; - count = 3; - }; + MACRO_ADDBACKPACK(ACE_TacticalLadder_Pack,3); }; }; - + class House; class ACE_Tactical_Ladder: House { XEH_ENABLED; @@ -85,7 +82,8 @@ class CfgVehicles { displayName = CSTRING(Position); distance = 4; condition = "true"; - statement = QUOTE([ARR_2(_target,_player)] call FUNC(positionTL)); + //wait a frame to handle "Do When releasing action menu key" option: + statement = QUOTE([ARR_2({_this call FUNC(positionTL)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame)); showDisabled = 0; exceptions[] = {}; priority = 5; diff --git a/addons/tacticalladder/data/ace_tacticalladder.p3d b/addons/tacticalladder/data/ace_tacticalladder.p3d index 3126601117..a331f24084 100644 Binary files a/addons/tacticalladder/data/ace_tacticalladder.p3d and b/addons/tacticalladder/data/ace_tacticalladder.p3d differ diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index 63a97d97e9..456d245832 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -9,7 +9,7 @@ * None * * Example: - * [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy; + * [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy * * Public: No */ @@ -17,16 +17,16 @@ #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); +params ["_ladder"]; detach _ladder; _ladder animate ["rotate", 0]; { _ladder animate [_x, 0]; -} forEach __ANIMS; +} count __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); +[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 index 93263c6aa0..764e5c73d8 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -6,16 +6,16 @@ * 0: ladder * * Return Value: - * Success? + * Success * * Example: - * [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy; + * [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy * * Public: No */ #include "script_component.hpp" -PARAMS_1(_ladder); +params ["_ladder"]; private ["_pos1", "_pos2"]; _pos1 = getPosASL GVAR(ladder); @@ -23,8 +23,8 @@ _pos2 = (GVAR(ladder) modelToWorld (GVAR(ladder) selectionPosition "check2")) ca 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); +[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; diff --git a/addons/tacticalladder/functions/fnc_deployTL.sqf b/addons/tacticalladder/functions/fnc_deployTL.sqf index 7ad135ca90..14c386dda1 100644 --- a/addons/tacticalladder/functions/fnc_deployTL.sqf +++ b/addons/tacticalladder/functions/fnc_deployTL.sqf @@ -3,13 +3,13 @@ * Deploy tactical ladder * * Arguments: - * Nothing + * None * * Return Value: - * Nothing + * None * * Example: - * call ace_tacticalladder_fnc_deployTL; + * [] call ace_tacticalladder_fnc_deployTL * * Public: No */ diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf index d08cb6e208..6b5107b814 100644 --- a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf +++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf @@ -9,13 +9,13 @@ * Handled * * Example: - * 1 call ace_tacticalladder_fnc_handleScrollWheel; + * [1] call ace_tacticalladder_fnc_handleScrollWheel; * * Public: No */ #include "script_component.hpp" -PARAMS_1(_scroll); +params ["_scroll"]; if (isNull GVAR(ladder)) exitWith { false }; @@ -37,7 +37,7 @@ if (GETMVAR(ACE_Modifier,0) == 0) then { if (GVAR(ladder) animationPhase (format["extract_%1", _currentStep]) == 1) then { GVAR(ladder) animate [format["extract_%1", _currentStep], 0]; GVAR(currentStep) = _currentStep - 1; - }; + }; }; } else { // Tilting @@ -45,4 +45,4 @@ if (GETMVAR(ACE_Modifier,0) == 0) then { GVAR(ladder) animate ["rotate", GVAR(currentAngle)]; }; -true \ No newline at end of file +true diff --git a/addons/tacticalladder/functions/fnc_pickupTL.sqf b/addons/tacticalladder/functions/fnc_pickupTL.sqf index c603f1feca..ad409f8870 100644 --- a/addons/tacticalladder/functions/fnc_pickupTL.sqf +++ b/addons/tacticalladder/functions/fnc_pickupTL.sqf @@ -7,10 +7,10 @@ * 1: unit * * Return Value: - * Success? + * Success * * Example: - * [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL; + * [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL * * Public: No */ @@ -18,7 +18,7 @@ if ((backpack ACE_player) != "") exitWith { false }; -PARAMS_2(_ladder,_unit); +params ["_ladder", "_unit"]; deleteVehicle _ladder; _unit addBackpack "ACE_TacticalLadder_Pack"; diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index 103792c851..1035101556 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -10,7 +10,7 @@ * None * * Example: - * [_ladder, _unit] call ace_tacticalladder_fnc_positionTL; + * [_ladder, _unit] call ace_tacticalladder_fnc_positionTL * * Public: No */ @@ -18,11 +18,11 @@ #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); +params ["_ladder", "_unit"]; { _ladder animate [_x, 0]; -} forEach __ANIMS; +} count __ANIMS; _unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03"; _ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of player @@ -30,7 +30,7 @@ _ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of playe _ladder animate ["rotate", 0]; { _ladder animate [_x, 1]; -} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) +} count ["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 diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index 962cc9e6ae..4342ac5408 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -11,6 +11,7 @@ Teleskopický žebřík Telescopic Ladder Telescopic Ladder + Escada telescópica Deploy ladder @@ -22,6 +23,7 @@ Rozložit žebřík Deploy ladder Deploy ladder + Implantar escada Drop ladder @@ -33,6 +35,7 @@ Položit žebřík Drop ladder Drop ladder + Derrubar escada Adjust ladder @@ -40,6 +43,7 @@ Reguluj drabinę Upravit žebřík Ajustar escalera + Ajustar escada Position ladder @@ -51,6 +55,7 @@ Umístit žebřík Position ladder Position ladder + Posicionar escada Pickup ladder @@ -62,6 +67,7 @@ Vzít žebřík Pickup ladder Pickup ladder + Pegar escada \ No newline at end of file diff --git a/addons/tripod/$PBOPREFIX$ b/addons/tripod/$PBOPREFIX$ index a374eb7994..2a79aeafd9 100644 --- a/addons/tripod/$PBOPREFIX$ +++ b/addons/tripod/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\tripod +z\ace\addons\tripod \ No newline at end of file diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp index ed5027f094..d700ed4c85 100644 --- a/addons/tripod/CfgEventHandlers.hpp +++ b/addons/tripod/CfgEventHandlers.hpp @@ -1,7 +1,7 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_preInit) ); - }; + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; }; class Extended_PostInit_EventHandlers { diff --git a/addons/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp index 714d2cafb1..2a689ba349 100644 --- a/addons/tripod/CfgVehicles.hpp +++ b/addons/tripod/CfgVehicles.hpp @@ -1,4 +1,3 @@ - class CfgVehicles { class Man; class CAManBase: Man { @@ -18,16 +17,13 @@ class CfgVehicles { class Item_Base_F; class ACE_Item_Tripod: Item_Base_F { - author[] = {"Rocko", "Scubaman3D"}; + author[] = {"Rocko", "Scubaman3D"}; scope = 2; scopeCurator = 2; displayName = CSTRING(DisplayName); vehicleClass = "Items"; class TransportItems { - class ACE_Tripod { - name = "ACE_Tripod"; - count = 1; - }; + MACRO_ADDITEM(ACE_Tripod,1); }; }; @@ -37,7 +33,7 @@ class CfgVehicles { MACRO_ADDITEM(ACE_Tripod,2); }; }; - + class thingX; class ACE_TripodObject: thingX { XEH_ENABLED; @@ -50,7 +46,7 @@ class CfgVehicles { animPeriod = 0.02; initPhase = 0; minValue = 0; - maxValue = 1; + maxValue = 1; }; class retract_leg_1: slide_down_tripod {}; class retract_leg_2: retract_leg_1 {}; @@ -80,7 +76,8 @@ class CfgVehicles { displayName = CSTRING(Adjust); distance = 5; condition = "true"; - statement = QUOTE(_target call FUNC(adjust)); + //wait a frame to handle "Do When releasing action menu key" option: + statement = QUOTE([ARR_2({_this call FUNC(adjust)}, [_target])] call EFUNC(common,execNextFrame)); showDisabled = 0; exceptions[] = {}; priority = 5; diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp index cc7521f0f2..5ae0ee84d2 100644 --- a/addons/tripod/CfgWeapons.hpp +++ b/addons/tripod/CfgWeapons.hpp @@ -1,4 +1,3 @@ - class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index ce50d38cf0..1ba99cedbe 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -1,37 +1,39 @@ /* * Author: Ruthberg - * * Adjust tripod height * * Arguments: * 0: tripod * - * Return Value: - * Nothing - * * Return value: * None + * + * Example: + * [tripod] call ace_tripod_fnc_adjust + * + * Public: No */ #include "script_component.hpp" -PARAMS_1(_tripod); +params ["_tripod"]; GVAR(adjuster) = ACE_player; GVAR(adjusting) = true; GVAR(adjustPFH) = [{ - EXPLODE_1_PVT(_this select 0,_tripod); - + params ["_args", "_pfhId"]; + _args params ["_tripod"]; + if (GVAR(adjuster) != ACE_player || !GVAR(adjusting)) exitWith { call EFUNC(interaction,hideMouseHint); [ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Adjust), -1]] call EFUNC(Common,removeActionEventHandler); - [_this select 1] call cba_fnc_removePerFrameHandler; + [_pfhId] call cba_fnc_removePerFrameHandler; }; - + { _tripod animate [_x, 1 - GVAR(height)]; - } foreach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; - + } count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; + }, 0, [_tripod]] call CBA_fnc_addPerFrameHandler; [localize "STR_ACE_Tripod_Done", "", localize "STR_ACE_Tripod_ScrollAction"] call EFUNC(interaction,showMouseHint); diff --git a/addons/tripod/functions/fnc_handleScrollWheel.sqf b/addons/tripod/functions/fnc_handleScrollWheel.sqf index 7399bf0c2c..973a57dd2f 100644 --- a/addons/tripod/functions/fnc_handleScrollWheel.sqf +++ b/addons/tripod/functions/fnc_handleScrollWheel.sqf @@ -9,13 +9,13 @@ * handled * * Example: - * 1.2 call ace_tripod_fnc_handleScrollWheel; + * [1.2] call ace_tripod_fnc_handleScrollWheel; * * Public: No */ #include "script_component.hpp" -PARAMS_1(_scroll); +params ["_scroll"]; if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(adjustPFH) == -1) exitWith { false }; diff --git a/addons/tripod/functions/fnc_pickup.sqf b/addons/tripod/functions/fnc_pickup.sqf index f264eb1e2e..24fc26ea1d 100644 --- a/addons/tripod/functions/fnc_pickup.sqf +++ b/addons/tripod/functions/fnc_pickup.sqf @@ -1,30 +1,30 @@ /* * Author: Rocko, Ruthberg - * * Pick up tripod * * Arguments: * 0: tripod * 1: unit * - * Return Value: - * Nothing - * * Return value: * None + * + * Example: + * [tripod, player] call ace_tripod_fnc_pickup + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_tripod,_unit); +params ["_tripod", "_unit"]; if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { _unit playMove "AmovPercMstpSrasWrflDnon_diary"; }; [{ - PARAMS_2(_tripod,_unit); + params ["_tripod", "_unit"]; [_unit, "ACE_Tripod"] call EFUNC(common,addToInventory); deleteVehicle _tripod; - }, [_tripod, _unit], 1, 0]call EFUNC(common,waitAndExecute); diff --git a/addons/tripod/functions/fnc_place.sqf b/addons/tripod/functions/fnc_place.sqf index 5e9c783589..ce7f445885 100644 --- a/addons/tripod/functions/fnc_place.sqf +++ b/addons/tripod/functions/fnc_place.sqf @@ -1,21 +1,22 @@ /* * Author: Rocko, Ruthberg - * * Place down tripod * * Arguments: * 0: unit * 1: tripod class * - * Return Value: - * Nothing - * * Return value: * None + * + * Example: + * [player, "ACE_Tripod"] call ace_tripod_fnc_place + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_tripodClass); +params ["_unit", "_tripodClass"]; _unit removeItem _tripodClass; @@ -24,27 +25,29 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { }; [{ - PARAMS_1(_unit); - + params ["_unit"]; + private ["_direction", "_position", "_tripod"]; _direction = getDir _unit; _position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0.02]; - + _tripod = "ACE_TripodObject" createVehicle [0, 0, 0]; { _tripod animate [_x, 1]; - } foreach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; - + } count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; + [{ - EXPLODE_3_PVT(_this select 0,_tripod,_direction,_position); + params ["_args", "_pfhId"]; + _args params ["_tripod", "_direction", "_position"]; + if (_tripod animationPhase "slide_down_tripod" == 1) then { _tripod setDir _direction; _tripod setPosASL _position; if ((getPosATL _tripod select 2) - (getPos _tripod select 2) < 1E-5) then { - _tripod setVectorUp (surfaceNormal (position _tripod)); + _tripod setVectorUp (surfaceNormal (position _tripod)); }; - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_pfhId] call CBA_fnc_removePerFrameHandler; }; }, 0, [_tripod, _direction, _position]] call CBA_fnc_addPerFrameHandler; - + }, [_unit], 1, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml index baf20b9854..caddca415f 100644 --- a/addons/tripod/stringtable.xml +++ b/addons/tripod/stringtable.xml @@ -11,6 +11,7 @@ SSWT souprava SSWT Kit SSWT Kit + Kit SSWT Place SSWT Kit @@ -22,30 +23,39 @@ Rozlož souprava SSWT Place SSWT Kit Place SSWT Kit + Colocar kit SSWT Pick up SSWT Kit Podnieś trójnóg snajperski Coger equipo SSWT Zvednout SSWT soupravu + SSWT-Werkzeug aufheben + Pegar kit SSWT Adjust SSWT Kit Reguluj trójnóg snajperski Ajustar equipo SSWT Regulovat SSWT soupravu + SSWT-Werkzeug anpassen + Ajustar kit SSWT Done Gotowe Hecho Hotovo + Fertig + Feito + Modifier, adjust + Modyfikator, regulacja + Modificador, ajuste + Modifikátor, regulace + + Modifikator, anpassen + + Modificador, ajuste - \ No newline at end of file + diff --git a/addons/vector/CfgVehicles.hpp b/addons/vector/CfgVehicles.hpp index cf0d50d18f..f06f79aa12 100644 --- a/addons/vector/CfgVehicles.hpp +++ b/addons/vector/CfgVehicles.hpp @@ -1,9 +1,3 @@ - -#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ - weapon = #WEAPON; \ - count = COUNT; \ -} - class CfgVehicles { class Item_Base_F; class ACE_Item_Vector: Item_Base_F { diff --git a/addons/vector/functions/fnc_illuminate.sqf b/addons/vector/functions/fnc_illuminate.sqf index 0c3779e441..cbf9d56fef 100644 --- a/addons/vector/functions/fnc_illuminate.sqf +++ b/addons/vector/functions/fnc_illuminate.sqf @@ -7,35 +7,36 @@ disableSerialization; _dlgVector = GETUVAR(ACE_dlgVector,displayNull); if (_this select 0) then { - { - private ["_string", "_index"]; + if (ctrlIDC _x != 170) then { + private ["_string", "_index"]; - _string = ctrlText _x; - _index = _string find ".paa"; + _string = ctrlText _x; + _index = _string find ".paa"; - if (_index != -1 && {_string find "_illum.paa" == -1}) then { - _string = toArray _string; - _string resize _index; + if (_index != -1 && {_string find "_illum.paa" == -1}) then { + _string = toArray _string; + _string resize _index; - _x ctrlSetText format ["%1_illum.paa", toString _string]; + _x ctrlSetText format ["%1_illum.paa", toString _string]; + }; }; } forEach allControls _dlgVector; - } else { - { - private ["_string", "_index"]; + if (ctrlIDC _x != 170) then { + private ["_string", "_index"]; - _string = ctrlText _x; - _index = _string find "_illum.paa"; + _string = ctrlText _x; + _index = _string find "_illum.paa"; - if (_index != -1) then { - _string = toArray _string; - _string resize _index; + if (_index != -1) then { + _string = toArray _string; + _string resize _index; + + _x ctrlSetText format ["%1.paa", toString _string]; + }; - _x ctrlSetText format ["%1.paa", toString _string]; }; } forEach allControls _dlgVector; - }; diff --git a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf index d683073286..073054648e 100644 --- a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf @@ -20,7 +20,10 @@ private ["_previousMags","_newMags","_keyMagazine","_keyName"]; -PARAMS_3(_unit,_veh,_useCustom); +if (!params [["_unit", objNull, [objNull]], ["_veh", objNull, [objNull]], ["_useCustom", false, [false]]]) exitWith { + ERROR("Input wrong type"); +}; +TRACE_3("params",_unit,_veh,_useCustom); if (isNull _unit) exitWith {ERROR("null unit");}; if (isNull _veh) exitWith {ERROR("null vehicle");}; diff --git a/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf b/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf index 999f471ac3..eda75922c4 100644 --- a/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf +++ b/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf @@ -17,7 +17,8 @@ private ["_vehConfigSide","_vehSide","_returnValue"]; -PARAMS_1(_veh); +params ["_veh"]; +TRACE_1("params",_veh); if (isNull _veh) exitWith {ERROR("null vehicle"); "error"}; diff --git a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf index 5a2bc3f7bd..be23dc8dd9 100644 --- a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf +++ b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf @@ -16,26 +16,30 @@ */ #include "script_component.hpp" -PARAMS_1(_vehicle); - if (!isServer) exitWith {}; +params ["_vehicle"]; +TRACE_1("params",_vehicle); + [{ //If the module wasn't placed, just exit (needs to be in wait because objectInitEH is before moduleInit) if (GVAR(VehicleStartingLockState) == -1) exitWith {}; + private ["_lock"]; - PARAMS_1(_vehicle); + + params ["_vehicle"]; + if ((_vehicle isKindOf "Car") || {_vehicle isKindOf "Tank"} || {_vehicle isKindOf "Helicopter"}) then { //set lock state (eliminates the ambigious 1-"Default" and 3-"Locked for Player" states) _lock = switch (GVAR(VehicleStartingLockState)) do { - case (0): {(locked _vehicle) in [2, 3]}; - case (1):{true}; - case (2):{false}; + case (0): { (locked _vehicle) in [2, 3] }; + case (1): { true }; + case (2): { false }; }; - if (((_lock) && {(locked _vehicle) != 2}) || {(!_lock) && {(locked _vehicle) != 0}}) then { + if ((_lock && {(locked _vehicle) != 2}) || {!_lock && {(locked _vehicle) != 0}}) then { TRACE_3("Setting Lock State",_lock,(typeOf _vehicle),_vehicle); ["VehicleLock_SetVehicleLock", [_vehicle], [_vehicle, _lock]] call EFUNC(common,targetEvent); }; }; //Delay call until mission start (so everyone has the eventHandler's installed) -}, [_vehicle], 0.25, 0.25] call EFUNC(common,waitAndExecute); +}, [_vehicle], 0.25] call EFUNC(common,waitAndExecute); diff --git a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf index 779f4a363e..390104cefc 100644 --- a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf @@ -18,7 +18,8 @@ private ["_returnValue","_sideKeyName","_customKeys"]; -PARAMS_2(_unit,_veh); +params ["_unit", "_veh"]; +TRACE_2("params",_unit,_veh); if (isNull _unit) exitWith {ERROR("null unit"); false}; if (isNull _veh) exitWith {ERROR("null vehicle"); false}; diff --git a/addons/vehiclelock/functions/fnc_lockpick.sqf b/addons/vehiclelock/functions/fnc_lockpick.sqf index 613a7b35dc..f4837c742b 100644 --- a/addons/vehiclelock/functions/fnc_lockpick.sqf +++ b/addons/vehiclelock/functions/fnc_lockpick.sqf @@ -22,7 +22,8 @@ private ["_vehLockpickStrenth","_condition","_returnValue"]; -PARAMS_3(_unit,_veh,_funcType); +params ["_unit", "_veh", "_funcType"]; +TRACE_3("params",_unit,_veh,_funcType); if (isNull _unit) exitWith {ERROR("null unit"); false}; if (isNull _veh) exitWith {ERROR("null vehicle"); false}; @@ -41,25 +42,20 @@ if (_vehLockpickStrenth < 0) exitWith {false}; //Condition check for progressBar _condition = { - PARAMS_1(_args); - EXPLODE_2_PVT(_args,_unit,_veh); + params ["_args"]; + _args params ["_args", "_unit", "_veh"]; ((_unit distance _veh) < 5) && {(speed _veh) < 0.1} }; if (!([[_unit, _veh]] call _condition)) exitWith {false}; -_returnValue = false; -switch (true) do { -case (_funcType == "canLockpick"): { - _returnValue = true; - }; -case (_funcType == "startLockpick"): { +_returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"]; +switch (_funcType) do { + case "startLockpick": { [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition] call EFUNC(common,progressBar); - _returnValue = true; }; -case (_funcType == "finishLockpick"): { + case "finishLockpick": { ["VehicleLock_SetVehicleLock", [_veh], [_veh, false]] call EFUNC(common,targetEvent); - _returnValue = true; }; default { ERROR("bad function type"); diff --git a/addons/vehiclelock/functions/fnc_moduleInit.sqf b/addons/vehiclelock/functions/fnc_moduleInit.sqf index 510b8ec7be..9b2c3cf182 100644 --- a/addons/vehiclelock/functions/fnc_moduleInit.sqf +++ b/addons/vehiclelock/functions/fnc_moduleInit.sqf @@ -17,10 +17,12 @@ */ #include "script_component.hpp" -PARAMS_3(_logic,_syncedUnits,_activated); +if (!isServer) exitWith {}; + +params ["_logic", "_syncedUnits", "_activated"]; +TRACE_3("params",_logic,_syncedObjects,_activated); if (!_activated) exitWith {WARNING("Vehicle Lock Init Module - placed but not active");}; -if (!isServer) exitWith {}; //Set the GVAR for default lockpick strength [_logic, QGVAR(DefaultLockpickStrength), "DefaultLockpickStrength"] call EFUNC(common,readSettingFromModule); diff --git a/addons/vehiclelock/functions/fnc_moduleSync.sqf b/addons/vehiclelock/functions/fnc_moduleSync.sqf index ede20e3196..27577e4dbe 100644 --- a/addons/vehiclelock/functions/fnc_moduleSync.sqf +++ b/addons/vehiclelock/functions/fnc_moduleSync.sqf @@ -17,14 +17,18 @@ */ #include "script_component.hpp" -PARAMS_3(_logic,_syncedObjects,_activated); +if (!isServer) exitWith {}; + +params ["_logic", "_syncedObjects", "_activated"]; +TRACE_3("params",_logic,_syncedObjects,_activated); if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not active");}; -if (!isServer) exitWith {}; [{ private ["_listOfVehicles"]; - PARAMS_1(_syncedObjects); + + params ["_syncedObjects"]; + _listOfVehicles = []; { if ((_x isKindOf "Car") || (_x isKindOf "Tank") || (_x isKindOf "Helicopter")) then { diff --git a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf index 8199f4b850..5db2cbebe0 100644 --- a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf +++ b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf @@ -16,7 +16,8 @@ */ #include "script_component.hpp" -PARAMS_2(_unit,_container); +params ["_unit", "_container"]; +TRACE_2("params",_unit,_container); //Only check for player: if (_unit != ace_player) exitWith {false}; diff --git a/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf b/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf index 9d8a396e31..e959a705e0 100644 --- a/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf +++ b/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf @@ -18,7 +18,8 @@ private ["_currentKeys"]; -PARAMS_2(_veh,_key); +params ["_veh", "_key"]; +TRACE_2("params",_veh,_key); if (!isServer) exitWith {ERROR("only run on server");}; if (isNull _veh) exitWith {ERROR("null vehicle");}; diff --git a/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf b/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf index cb51cb27a8..d2290ef732 100644 --- a/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf +++ b/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf @@ -18,7 +18,8 @@ private ["_lockNumber"]; -PARAMS_2(_veh,_isLocked); +params ["_veh", "_isLocked"]; +TRACE_2("params",_veh,_isLocked); _lockNumber = if (_isLocked) then {2} else {0}; TRACE_2("Setting Lock State", _veh, _lockNumber); diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 23d8b380b9..89a64faf8a 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -139,6 +139,7 @@ Configuración del cierre del vehiculo Fahrzeugsperreinstellungen Nastavení zámku vozidla + Configuração de fechadura do veículo Lock Vehicle Inventory @@ -146,6 +147,7 @@ Bloquear inventario del vehículo Sperre Fahrzeuginventar Inventář zamčeného vozidla + Bloquear inventário do veículo Locks the inventory of locked vehicles @@ -153,6 +155,7 @@ Bloquea el inventario de los vehículos cerrados Sperrt das Inventar von gesperrten Fahrzeugen Zamknout inventář u zamčených vozidel + Bloqueia o inventário de veículos fechados Vehicle Starting Lock State @@ -160,6 +163,7 @@ Estado inicial del cierre en vehículos Fahrzeuge spawnen gesperrt Počáteční stav zámku vozidla + Estado inicial da fechadura dos veículos Set lock state for all vehicles (removes ambiguous lock states) @@ -167,6 +171,7 @@ 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ů) + Definir estados de fechadura para todos os veículos (remove estados de fechadura ambíguos) As Is @@ -174,6 +179,7 @@ Está Unverändert Jak je + Como está Locked @@ -181,6 +187,7 @@ Cerrado Gesperrt Zamčeno + Fechado Unlocked @@ -188,6 +195,7 @@ Abierto Offen Odemčeno + Aberto Default Lockpick Strength @@ -195,6 +203,7 @@ Durabilidad de la ganzua por defecto Standard-Pick-Stärke Výchozí síla páčidla + Durabilidade padrão da chave micha Default Time to lockpick (in seconds). Default: 10 @@ -202,6 +211,7 @@ 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 + Tempo padrão para forçar a fechadura (em segundos). Padrão: 10 Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br />Source: vehiclelock.pbo @@ -209,6 +219,7 @@ 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 + Definições para a durabilidade da chave micha e estado inicial da fechadura do veículo. Remove estados de fechadura ambíguas <br /> Fonte: Vehiclelock.pbo Vehicle Key Assign @@ -216,6 +227,7 @@ Asignacion de la llave del vehículo Fahrzeugschlüsselzuweisung Přidělení klíče k vozidlu + Atribuição de chave de veículo 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 @@ -223,6 +235,7 @@ 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 + Sincronizar com veículos e jogadores. Irá distribuir chaves personalizadas para os jogadores para cada veículo sincronizado. Só é válido para objetos presentes no início da missão <br /> Fonte: vehiclelock.pbo \ No newline at end of file diff --git a/addons/vehicles/functions/fnc_speedLimiter.sqf b/addons/vehicles/functions/fnc_speedLimiter.sqf index 7ddb07433a..151c02fd8a 100644 --- a/addons/vehicles/functions/fnc_speedLimiter.sqf +++ b/addons/vehicles/functions/fnc_speedLimiter.sqf @@ -1,10 +1,24 @@ -// by commy2 +/* + * Author: commy2 + * Toggle speed limiter for Driver in Vehicle. + * + * Arguments: + * 0: Driver + * 1: Vehicle + * + * Return Value: + * None + * + * Example: + * [player, car] call ace_vehicles_fnc_speedLimiter + * + * Public: No + */ #include "script_component.hpp" -private ["_driver", "_vehicle"]; +private "_maxSpeed"; -_driver = _this select 0; -_vehicle = _this select 1; +params ["_driver", "_vehicle"]; if (GETGVAR(isSpeedLimiter,false)) exitWith { [localize LSTRING(Off)] call EFUNC(common,displayTextStructured); @@ -16,19 +30,15 @@ if (GETGVAR(isSpeedLimiter,false)) exitWith { playSound "ACE_Sound_Click"; GVAR(isSpeedLimiter) = true; -private "_maxSpeed"; _maxSpeed = speed _vehicle max 10; [{ - private ["_driver", "_vehicle", "_maxSpeed"]; - - _driver = _this select 0 select 0; - _vehicle = _this select 0 select 1; - _maxSpeed = _this select 0 select 2; + params ["_args", "_idPFH"]; + _args params ["_driver", "_vehicle", "_maxSpeed"]; if (!GVAR(isSpeedLimiter) || {_driver != driver _vehicle}) exitWith { GVAR(isSpeedLimiter) = false; - [_this select 1] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; }; private "_speed"; diff --git a/addons/vehicles/functions/fnc_startEngine.sqf b/addons/vehicles/functions/fnc_startEngine.sqf index 63afd78e2e..e2c171e018 100644 --- a/addons/vehicles/functions/fnc_startEngine.sqf +++ b/addons/vehicles/functions/fnc_startEngine.sqf @@ -1,23 +1,30 @@ -// by commy2 +/* + * Author: commy2 + * Delays engine start of vehicle. + * + * Arguments: + * 0: Vehicle + * 1: Is Engine on + * + * Return Value: + * None + * + * Example: + * [vehicle player, false] call ace_vehicle_fnc_startEngine + * + * Public: No + */ #include "script_component.hpp" -private ["_vehicle", "_isEngineOn"]; - -_vehicle = _this select 0; -_isEngineOn = _this select 1; +params ["_vehicle", "_isEngineOn"]; if (!_isEngineOn || {floor abs speed _vehicle > 0}) exitWith {}; [{ - private ["_vehicle", "_time", "_direction"]; + params ["_args", "_idPFH"]; + _args params ["_vehicle", "_time", "_direction"]; - _vehicle = _this select 0 select 0; - _time = _this select 0 select 1; - _direction = _this select 0 select 2; - - if (ACE_time > _time) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; - }; + if (ACE_time > _time) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; _vehicle setVelocity [0, 0, 0]; _vehicle setVectorDirAndUp _direction; diff --git a/addons/viewdistance/XEH_postInit.sqf b/addons/viewdistance/XEH_postInit.sqf index c49a197c26..865e5527e5 100644 --- a/addons/viewdistance/XEH_postInit.sqf +++ b/addons/viewdistance/XEH_postInit.sqf @@ -2,28 +2,33 @@ if (!hasInterface) exitWith {}; -// Force the view distance down to the limit. -if (GVAR(enabled) && {viewDistance > GVAR(limitViewDistance)}) then { - setViewDistance GVAR(limitViewDistance); -}; - -// Adapt view distance when the player is created or changed according to whether client is on foot or vehicle. -["playerChanged",{ - [false] call FUNC(adaptViewDistance); -}] call ace_common_fnc_addEventHandler; - -// Set the EH which waits for any of the view distance settings to be changed, so that the effect is show immediately -["SettingChanged",{ - if ((_this select 0 == QGVAR(viewDistanceOnFoot)) || - (_this select 0 == QGVAR(viewDistanceLandVehicle)) || - (_this select 0 == QGVAR(viewDistanceAirVehicle)) || - (_this select 0 == QGVAR(objectViewDistanceCoeff))) then { - - [true] call FUNC(adaptViewDistance); +["SettingsInitialized", { + // if not enabled, then bugger off. + if !(GVAR(enabled)) exitWith {}; + + // Force the view distance down to the limit. + if (viewDistance > GVAR(limitViewDistance)) then { + setViewDistance GVAR(limitViewDistance); }; -}] call ace_common_fnc_addEventHandler; + + // Adapt view distance when the player is created or changed according to whether client is on foot or vehicle. + ["playerChanged",{ + [false] call FUNC(adaptViewDistance); + }] call EFUNC(common,addEventHandler); + + // Set the EH which waits for any of the view distance settings to be changed, so that the effect is show immediately + ["SettingChanged",{ + if ((_this select 0 == QGVAR(viewDistanceOnFoot)) || + (_this select 0 == QGVAR(viewDistanceLandVehicle)) || + (_this select 0 == QGVAR(viewDistanceAirVehicle)) || + (_this select 0 == QGVAR(objectViewDistanceCoeff))) then { -// Set the EH which waits for a vehicle change to automatically swap to On Foot/In Land Vehicle/In Air Vehicle -["playerVehicleChanged",{ - [false] call FUNC(adaptViewDistance) -}] call ace_common_fnc_addEventHandler; \ No newline at end of file + [true] call FUNC(adaptViewDistance); + }; + }] call EFUNC(common,addEventHandler); + + // Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle + ["playerVehicleChanged",{ + [false] call FUNC(adaptViewDistance) + }] call EFUNC(common,addEventHandler); +}] call EFUNC(common,addEventHandler); \ No newline at end of file diff --git a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf index 2ef4b84ae6..ca03758df5 100644 --- a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf @@ -17,10 +17,10 @@ #include "script_component.hpp" -PARAMS_1(_show_prompt); - private["_land_vehicle","_air_vehicle"]; +params ["_show_prompt"]; + if (!GVAR(enabled) || isNull ACE_player) exitWith {}; _land_vehicle = (vehicle ACE_player) isKindOf "LandVehicle"; diff --git a/addons/viewdistance/functions/fnc_changeViewDistance.sqf b/addons/viewdistance/functions/fnc_changeViewDistance.sqf index 9060254c60..34a3f5ba46 100644 --- a/addons/viewdistance/functions/fnc_changeViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_changeViewDistance.sqf @@ -20,7 +20,7 @@ private ["_text","_new_view_distance","_view_distance_limit","_object_view_distance_coeff"]; -PARAMS_2(_index_requested,_show_prompt); +params ["_index_requested", "_show_prompt"]; _new_view_distance = [_index_requested] call FUNC(returnValue); // changes the setting index into an actual view distance value _object_view_distance_coeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient. diff --git a/addons/viewdistance/functions/fnc_initModule.sqf b/addons/viewdistance/functions/fnc_initModule.sqf index 7569383d0c..26072e5b5f 100644 --- a/addons/viewdistance/functions/fnc_initModule.sqf +++ b/addons/viewdistance/functions/fnc_initModule.sqf @@ -17,7 +17,7 @@ if (!isServer) exitWith {}; -PARAMS_3(_logic,_units,_activated); +params ["_logic", "_units", "_activated"]; if (!_activated) exitWith { diag_log text "[ACE]: View Distance Limit Module is placed but NOT active."; diff --git a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf index 145b8ae9e6..71a23d7b54 100644 --- a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf +++ b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf @@ -1,7 +1,7 @@ /* * Author: Winter * Returns the object view distance coefficient according to the given index - * + * * * Arguments: * 0: Object View Distance setting Index @@ -17,10 +17,10 @@ #include "script_component.hpp" -PARAMS_1(_index); - private ["_return"]; +params ["_index"]; + _return = switch (_index) do { case 0: {0.00}; // Off case 1: {0.20}; // Very Low @@ -31,4 +31,4 @@ _return = switch (_index) do { default {0.50}; // something broke if this returns }; -_return; \ No newline at end of file +_return; diff --git a/addons/viewdistance/functions/fnc_returnValue.sqf b/addons/viewdistance/functions/fnc_returnValue.sqf index fb449cf702..d374d69d60 100644 --- a/addons/viewdistance/functions/fnc_returnValue.sqf +++ b/addons/viewdistance/functions/fnc_returnValue.sqf @@ -17,10 +17,10 @@ #include "script_component.hpp" -PARAMS_1(_index); - private ["_return"]; +params ["_index"]; + _return = switch (_index) do { case 0: {-1}; case 1: {500}; @@ -40,4 +40,4 @@ _return = switch (_index) do { default {1000}; }; -_return; \ No newline at end of file +_return; diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 9cb7fcde2e..bdf96f35a0 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -6,150 +6,200 @@ Ogranicznik zasięgu widzenia Limitador de distancia de visión Omezovač dohlednosti + Sichtweitenbegrenzung + Limitador de distância de visão 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 + Erlaubt das Einschränken der maximalen Sichtweite, welche von Spielern eingestellt werden kann. + Permite limitar a distância máxima de visão que pode ser definida pelos jogadores. Enable ACE viewdistance Wł. zasięg widzenia ACE Habilitar distancia de visión ACE Povolit ACE dohlednost + Aktiviere ACE-Sichtweite + Habilitar distância de visão ACE Enables ACE viewdistance Aktywuje możliwość zmiany zasięgu widzenia w menu ustawień ACE Habilita la distancia de visión ACE Povolit ACE dohlednost + Aktiviert ACE-Sichtweite + Habilita a distância de visão ACE View Distance Limit Limit zas. widzenia Limite de distancia de visión Limit dohlednosti + Sichtweitengrenze + Limite da distância de visão 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) + Setze die Grenze fest, wie weit Spieler ihre Sichtweite erhöhen können (bis 10000) + Estabelecer um limite de quão alto os clientes podem aumentar sua distância de visão (até 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. + Stellt die Grenze für die Sichtweite des Spielers ein. Das kann von einem Modul überschrieben werden. + Permite limitar a distância de visão máxima que pode ser definida por jogadores. Pode ser substituído por módulo. Client View Distance (On Foot) Zasięg widzenia (piechota) Distancia de visión del cliente (A pie) Dohlednost (Pěšák) + Spielersichtweite (zu Fuß) + Distância de visão do cliente (A pé) 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. + Verändert die Sichtweite, wenn ein Spieler zu Fuß unterwegs ist. + Muda a distância de visão do jogador dentro do jogo quando ele está a pé. Client View Distance (Land Vehicle) Zasięg widzenia (pojazdy naziemne) Distancia de visión del cliente (Vehículo terrestre) Dohlednost (Pozemní technika) + Spielersichtweite (Landfahrzeuge) + Distância de visão do cliente (Veículo terrestre) 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. + Verändert die Sichtweite, wenn ein Spieler in einem Landfahrzeug ist. + Muda a distância de visão do jogador dentro do jogo quando ele está dentro de um veículo terrestre. Client View Distance (Air Vehicle) Zasięg widzenia (pojazdy lotnicze) Distancia de visión del cliente (Vehículo aéreo) Dohlednost (Vzdušná technika) + Spielersichtweite (Luftfahrzeuge) + Distância de visão do cliente (Veículo aéreo) 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. + Verändert die Sichtweite wenn ein Spieler in einem Luftfahrzeug ist. + Muda a distância de visão do jogador dentro do jogo quando ele está dentro de um veículo aéreo. Dynamic Object View Distance Dynamiczny zasięg rysowania obiektów Distancia de visión dinámica de objetos Dynamická dohlednost objektů + Dynamische Objektsichtweite + Distância de visão dinâmica dos objetos 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. + Passt die Objektsichtweite dynamisch der Sichtweite an. + Estabelece a distância de visão dos objetos com um coeficiente da distância de visão. Off Wyłącz Apagada Vypnout + Aus + Desligado Very Low Bardzo niski Muy baja Velmi málo + Sehr niedrig + Muito baixo Low Niski Baja Málo + Niedrig + Baixo Medium Średni Media Středně + Mittel + Médio High Wysoki Alta Hodně + Hoch + Alto Very High Bardzo wysoki Muy alta Velmi hodně + Sehr hoch + Muito alto View Distance: Zasięg widzenia: Distancia de visión: Dohlednost: + Sichtweite: + Distância de visão: Object View Distance is Zasięg widzenia obiektów wynosi La distancia de visión de objetos es: Dohlednost objektů je + Objektsichtweite ist + Distância de visão do objeto é 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 + Diese Option ist ungültig! Die Grenze ist + Essa opção é inválida. O limte é Video Settings Ustawienia wideo Ajustes de vídeo Nastavení videa + Grafikeinstellungen + Ajustes de vídeo - \ No newline at end of file + diff --git a/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf index f45ed0ea57..572a83edf1 100644 --- a/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf @@ -1,21 +1,26 @@ /* * Author: esteldunedain - * * Count how many grenade magazines the unit has on the uniform and vest. * - * Argument: - * 0: Muzzle name + * Arguments: + * 0: Unit + * 1: Muzzle Class * - * Return value: - * 0: Number of magazines - * 1: First magazine name + * Return Value: + * 0: Number of magazines + * 1: First magazine name + * + * Example: + * [player, currentMuzzle player] call ace_weaponselect_fnc_countMagazinesForGrenadeMuzzle + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_muzzle); - private ["_uniformMags", "_vestMags", "_backpackMags", "_numberOfMagazines", "_magazineClasses", "_firstMagazine"]; +params ["_unit", "_muzzle"]; + _uniformMags = getMagazineCargo uniformContainer _unit; _vestMags = getMagazineCargo vestContainer _unit; _backpackMags = getMagazineCargo backpackContainer _unit; diff --git a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf index 81cb57d9f3..37956d2121 100644 --- a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf +++ b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf @@ -1,24 +1,28 @@ /* * Author: esteldunedain - * * Display a grenade type and quantity. * - * Argument: - * 0: magazine class - * 1: number of magazines + * Arguments: + * 0: magazine class + * 1: number of magazines * - * Return value: + * Return Value: * None + * + * Example: + * [currentMagazine player, 3] call ace_weaponselect_fnc_displayGrenadeTypeAndNumber + * + * Public: No */ #include "script_component.hpp" if !(GVAR(DisplayText)) exitwith {}; -PARAMS_2(_magazine,_numberofMagazines); - private ["_color", "_name", "_text", "_picture"]; -_color = [[1,0,0], [1,1,1]] select (_numberofMagazines > 0); +params ["_magazine", "_numberofMagazines"]; + +_color = [[1, 0, 0], [1, 1, 1]] select (_numberofMagazines > 0); _name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort"); _text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText); diff --git a/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf b/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf index 65d62826e5..2b2370260a 100644 --- a/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf +++ b/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf @@ -1,17 +1,29 @@ -// by commy2 +/* + * Author: commy2 + * Find the next Grenade Magazine. + * + * Arguments: + * 0: Grenade Type ("All", "Frag", "NonFrag") + * + * Return Value: + * Magazine classname + * + * Example: + * ["All"] call ace_weaponselect_fnc_findNextGrenadeMagazine + * + * Public: No + */ #include "script_component.hpp" -private ["_allMags", "_allMuzzles", "_magazines"]; +private ["_allMags", "_allMuzzles", "_magazines", "_start", "_index", "_nextMagazine"]; -PARAMS_1(_type); //"All", "Frag" or "NonFrag" +params ["_type"]; _allMags = missionNamespace getVariable [format [QGVAR(%1Magazines), _type], []]; _allMuzzles = missionNamespace getVariable [format [QGVAR(%1Muzzles), _type], []]; _magazines = magazines ACE_player; -private ["_start", "_index", "_nextMagazine"]; - _start = [GVAR(CurrentGrenadeMuzzleOther), GVAR(CurrentGrenadeMuzzleFrag)] select GVAR(CurrentGrenadeMuzzleIsFrag); _index = _allMuzzles find _start; diff --git a/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf index 0491afa413..5aa096f44e 100644 --- a/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf @@ -1,17 +1,29 @@ -// by commy2 +/* + * Author: commy2 + * Find the next Grenade Muzzle. + * + * Arguments: + * 0: Grenade Type ("All", "Frag", "NonFrag") + * + * Return Value: + * Class name of next throw muzzle + * + * Example: + * ["All"] call ace_weaponselect_fnc_findNextGrenadeMuzzle + * + * Public: No + */ #include "script_component.hpp" -private ["_allMags", "_allMuzzles", "_magazines"]; +private ["_allMags", "_allMuzzles", "_magazines", "_start", "_index", "_nextMuzzle"]; -PARAMS_1(_type); //"All", "Frag" or "NonFrag" +params ["_type"]; _allMags = missionNamespace getVariable [format [QGVAR(%1Magazines), _type], []]; _allMuzzles = missionNamespace getVariable [format [QGVAR(%1Muzzles), _type], []]; _magazines = magazines ACE_player; -private ["_start", "_index", "_nextMuzzle"]; - _start = [GVAR(CurrentGrenadeMuzzleOther), GVAR(CurrentGrenadeMuzzleFrag)] select GVAR(CurrentGrenadeMuzzleIsFrag); _index = _allMuzzles find _start; diff --git a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf index 37e2b1c873..20ef674dae 100644 --- a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf +++ b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf @@ -1,9 +1,23 @@ -// by commy2 +/* + * Author: commy2 + * Fire Vehicle Smoke Launcher. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Example: + * [vehicle player] call ace_weaponselect_fnc_fireSmokeLauncher + * + * Public: No + */ #include "script_component.hpp" private ["_turret", "_weapons"]; -PARAMS_1(_vehicle); +params ["_vehicle"]; _turret = [_vehicle] call EFUNC(common,getTurretCommander); diff --git a/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf b/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf index 5e8c3f920f..aa89a13c98 100644 --- a/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf +++ b/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf @@ -1,4 +1,18 @@ -// by commy2 +/* + * Author: commy2 + * Returns the selected Grenade Muzzle. + * + * Arguments: + * None + * + * Return Value: + * Class name of selected throw muzzle + * + * Example: + * [] call ace_weaponselect_fnc_getSelectedGrenade + * + * Public: No + */ #include "script_component.hpp" [GVAR(CurrentGrenadeMuzzleOther), GVAR(CurrentGrenadeMuzzleFrag)] select GVAR(CurrentGrenadeMuzzleIsFrag) diff --git a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf index 45e84d631d..c79f03c6f2 100644 --- a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf @@ -1,9 +1,24 @@ -// by commy2 +/* + * Author: commy2 + * Play the change firemode sound for specified weapon at units position. + * + * Arguments: + * 0: Unit + * 1: Weapon + * + * Return Value: + * None + * + * Example: + * [player, currentWeapon player] call ace_weaponselect_fnc_playChangeFiremodeSound + * + * Public: No + */ #include "script_component.hpp" private ["_sound"]; -PARAMS_2(_unit,_weapon); +params ["_unit", "_weapon"]; _sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFiremodeSound"); diff --git a/addons/weaponselect/functions/fnc_putWeaponAway.sqf b/addons/weaponselect/functions/fnc_putWeaponAway.sqf index a4cd743bfb..faddb4d869 100644 --- a/addons/weaponselect/functions/fnc_putWeaponAway.sqf +++ b/addons/weaponselect/functions/fnc_putWeaponAway.sqf @@ -1,17 +1,21 @@ /* * Author: commy2 - * * The unit will put its current weapon away. * - * Argument: - * 0: What unit should put the current weapon on back? (Object) + * Arguments: + * 0: Unit * - * Return value: - * None. + * Return Value: + * None + * + * Example: + * [player] call ace_weaponselect_fnc_putWeaponAway + * + * Public: NO */ #include "script_component.hpp" -PARAMS_1(_unit); +params ["_unit"]; [_unit] call EFUNC(common,fixLoweredRifleAnimation); diff --git a/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf b/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf index 69ea5cdf99..a68670184a 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf @@ -1,25 +1,28 @@ /* * Author: esteldunedain, commy2 - * * Cycle through all grenades. * - * Argument: + * Arguments: + * 0: Unit + * + * Return Value: * None * - * Return value: - * None + * Example: + * [player] call ace_weaponselect_fnc_selectGrenadeAll + * + * Public: No */ #include "script_component.hpp" private ["_text", "_nextMuzzle"]; -PARAMS_1(_unit); +params ["_unit"]; _nextMuzzle = ["All"] call FUNC(findNextGrenadeMuzzle); if (_nextMuzzle != "") then { - private ["_magazines", "_magazine", "_count", "_return"]; _magazines = GVAR(AllMagazines) select (GVAR(AllMuzzles) find _nextMuzzle); reverse _magazines; diff --git a/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf b/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf index 91d0023e47..c221b6cc30 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf @@ -1,19 +1,23 @@ /* * Author: esteldunedain, commy2 - * * Cycle through frags. * - * Argument: + * Arguments: + * 0: Unit + * + * Return Value: * None * - * Return value: - * None + * Example: + * [player] call ace_weaponselect_fnc_selectGrenadeFrag + * + * Public: No */ #include "script_component.hpp" private ["_text", "_nextMuzzle"]; -PARAMS_1(_unit); +params ["_unit"]; _nextMuzzle = ["Frag"] call FUNC(findNextGrenadeMuzzle); diff --git a/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf b/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf index 28cc0e74d8..2f219989eb 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf @@ -1,19 +1,23 @@ /* * Author: esteldunedain, commy2 - * * Cycle through non explosive grenades. * - * Argument: + * Arguments: + * 0: Unit + * + * Return Value: * None * - * Return value: - * None + * Example: + * [player] call ace_weaponselect_fnc_selectGrenadeOther + * + * Public: No */ #include "script_component.hpp" private ["_nextMuzzle", "_text"]; -PARAMS_1(_unit); +params ["_unit"]; _nextMuzzle = ["NonFrag"] call FUNC(findNextGrenadeMuzzle); diff --git a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf index 012bf94898..815b8d28cf 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf @@ -1,17 +1,22 @@ /* * Author: commy2 - * * The player will select the specified weapon or will change to the next firing mode if the weapon was already selected. * - * Argument: - * 0: A weapon (String) + * Arguments: + * 0: Unit + * 1: Weapon * - * Return value: - * None. + * Return Value: + * None + * + * Example: + * [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMode + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_weapon); +params ["_unit", "_weapon"]; if (_weapon == "") exitWith {}; diff --git a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf index 67e63cd830..71c9cfc7b4 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf @@ -1,17 +1,22 @@ /* * Author: commy2 - * * The player will select the specified weapon and change to the first additional muzzle. E.g. the grenade launcher of a assault rifle. * - * Argument: - * 0: A weapon (String) + * Arguments: + * 0: Unit + * 1: Weapon * - * Return value: - * None. + * Return Value: + * None + * + * Example: + * [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMuzzle + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_weapon); +params ["_unit", "_weapon"]; if (_weapon == "") exitWith {}; diff --git a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf index 9507c23a30..9695079da5 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf @@ -1,7 +1,23 @@ -// by commy2 +/* + * Author: commy2 + * Select weapon for unit in vehicle. + * + * Arguments: + * 0: Unit + * 1: Vehicle + * 2: Weapon index + * + * Return Value: + * None + * + * Example: + * [player, vehicle player, 1] call ace_weaponselect_fnc_selectWeaponVehicle + * + * Public: No + */ #include "script_component.hpp" -PARAMS_3(_unit,_vehicle,_index); +params ["_unit", "_vehicle", "_index"]; private "_turret"; _turret = [_unit] call EFUNC(common,getTurretIndex); diff --git a/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf index 4bf970fab1..ce7ec55393 100644 --- a/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf @@ -1,21 +1,25 @@ /* * Author: esteldunedain - * * Select the next grenade muzzle to throw. * - * Argument: - * muzzle name + * Arguments: + * 0: Unit + * 1: Muzzlename * - * Return value: + * Return Value: * None * + * Example: + * [player, currentMuzzle player] call ace_weaponselect_fnc_setNextGrenadeMuzzle + * + * Public: No */ #include "script_component.hpp" -PARAMS_2(_unit,_muzzle); - private ["_uniformMags", "_vestMags", "_backpackMags", "_i", "_uniformMagsToRemove", "_vestMagsToRemove", "_backpackMagsToRemove", "_firstMagazine", "_throwMuzzleNames"]; +params ["_unit", "_muzzle"]; + _uniformMags = getMagazineCargo uniformContainer _unit; _vestMags = getMagazineCargo vestContainer _unit; _backpackMags = getMagazineCargo backpackContainer _unit; diff --git a/addons/weaponselect/functions/fnc_throwGrenade.sqf b/addons/weaponselect/functions/fnc_throwGrenade.sqf index ab06fd5b5d..2cdc8e63dc 100644 --- a/addons/weaponselect/functions/fnc_throwGrenade.sqf +++ b/addons/weaponselect/functions/fnc_throwGrenade.sqf @@ -1,11 +1,27 @@ -// by commy2 +/* + * Author: commy2 + * Display Grenade information on grenade throw. + * + * Arguments: + * 0: unit - Object the event handler is assigned to + * 1: weapon - Fired weapon + * 2: muzzle - Muzzle that was used + * 3: mode - Current mode of the fired weapon + * 4: ammo - Ammo used + * 5: magazine - magazine name which was used + * 6: projectile - Object of the projectile that was shot + * + * Return Value: + * None + * + * Example: + * [_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile] call ace_weaponselect_fnc_throwGrenade + * + * Public: No + */ #include "script_component.hpp" -private ["_unit","_weapon","_magazine"]; - -_unit = _this select 0; -_weapon = _this select 1; -_magazine = _this select 5; +params ["_unit", "_weapon", "", "", "", "_magazine"]; if (_weapon != "Throw") exitWith {}; diff --git a/addons/weather/ACE_Settings.hpp b/addons/weather/ACE_Settings.hpp index d4b5a716cf..d3b9b1fd2e 100644 --- a/addons/weather/ACE_Settings.hpp +++ b/addons/weather/ACE_Settings.hpp @@ -1,37 +1,37 @@ class ACE_Settings { class GVAR(enableServerController) { - displayName = "Weather propagation"; - description = "Enables sever side weather propagation"; + displayName = CSTRING(enableServerController_DisplayName); + description = CSTRING(enableServerController_Description); typeName = "BOOL"; value = 1; }; class GVAR(useACEWeather) { - displayName = "ACE Weather"; - description = "Overrides the default weather (editor, mission settings) with ACE weather (map based)"; + displayName = CSTRING(useACEWeather_DisplayName); + description = CSTRING(useACEWeather_Description); typeName = "BOOL"; value = 1; }; class GVAR(syncRain) { - displayName = "Sync Rain"; - description = "Synchronizes rain"; + displayName = CSTRING(syncRain_DisplayName); + description = CSTRING(syncRain_Description); typeName = "BOOL"; value = 1; }; class GVAR(syncWind) { - displayName = "Sync Wind"; - description = "Synchronizes wind"; + displayName = CSTRING(syncWind_DisplayName); + description = CSTRING(syncWind_Description); typeName = "BOOL"; value = 1; }; class GVAR(syncMisc) { - displayName = "Sync Misc"; - description = "Synchronizes lightnings, rainbow, fog, ..."; + displayName = CSTRING(syncMisc_DisplayName); + description = CSTRING(syncMisc_Description); typeName = "BOOL"; value = 1; }; class GVAR(serverUpdateInterval) { - displayName = "Update Interval"; - description = "Defines the interval (seconds) between weather updates"; + displayName = CSTRING(serverUpdateInterval_DisplayName); + description = CSTRING(serverUpdateInterval_Description); typeName = "SCALAR"; value = 60; }; diff --git a/addons/weather/XEH_postServerInit.sqf b/addons/weather/XEH_postServerInit.sqf index 5704212b79..aa733afa5d 100644 --- a/addons/weather/XEH_postServerInit.sqf +++ b/addons/weather/XEH_postServerInit.sqf @@ -9,4 +9,4 @@ GVAR(rain_current_range) = -1+(random 2); // Wind call FUNC(initWind); -[FUNC(serverController), GVAR(serverUpdateInterval)] call cba_fnc_addPerFrameHandler; +[FUNC(serverController), GVAR(serverUpdateInterval)] call CBA_fnc_addPerFrameHandler; diff --git a/addons/weather/functions/fnc_calculateBarometricPressure.sqf b/addons/weather/functions/fnc_calculateBarometricPressure.sqf index e0d8e8f878..869deb93cb 100644 --- a/addons/weather/functions/fnc_calculateBarometricPressure.sqf +++ b/addons/weather/functions/fnc_calculateBarometricPressure.sqf @@ -14,4 +14,4 @@ */ #include "script_component.hpp" -((1013.25 - 10 * overcast) * (1 - (0.0065 * (GVAR(Altitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * GVAR(Altitude))) ^ 5.255754495); \ No newline at end of file +((1013.25 - 10 * overcast) * (1 - (0.0065 * (EGVAR(common,mapAltitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * EGVAR(common,mapAltitude))) ^ 5.255754495); diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index e81463f41a..44a5b0696c 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -47,7 +47,7 @@ GVAR(WindInfo) = true; }; if (_windSpeed > 0.2) then { - _playerDir = getDir ACE_player; + _playerDir = (ACE_player call CBA_fnc_headDir) select 0; _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); _windIndex = round(((_playerDir - _windDir + 360) % 360) / 30); _windIndex = _windIndex % 12; diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index 55c6e9c3c0..2e39f80764 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -11,31 +11,6 @@ */ #include "script_component.hpp" -GVAR(Altitude) = getNumber(configFile >> "CfgWorlds" >> worldName >> "elevationOffset"); -GVAR(Latitude) = getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); - -if (worldName in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { GVAR(Latitude) = 50; GVAR(Altitude) = 0; }; -if (worldName in ["Altis", "Stratis"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; -if (worldName in ["Takistan", "Zargabad", "Mountains_ACR"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 2000; }; -if (worldName in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 100; }; -if (worldName in ["fallujah"]) then { GVAR(Latitude) = 33; GVAR(Altitude) = 0; }; -if (worldName in ["fata", "Abbottabad"]) then { GVAR(Latitude) = 30; GVAR(Altitude) = 1000; }; -if (worldName in ["sfp_wamako"]) then { GVAR(Latitude) = 14; GVAR(Altitude) = 0; }; -if (worldName in ["sfp_sturko"]) then { GVAR(Latitude) = 56; GVAR(Altitude) = 0; }; -if (worldName in ["Bornholm"]) then { GVAR(Latitude) = 55; GVAR(Altitude) = 0; }; -if (worldName in ["Imrali"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; -if (worldName in ["Caribou"]) then { GVAR(Latitude) = 68; GVAR(Altitude) = 0; }; -if (worldName in ["Namalsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; }; -if (worldName in ["MCN_Aliabad"]) then { GVAR(Latitude) = 36; GVAR(Altitude) = 0; }; -if (worldName in ["Clafghan"]) then { GVAR(Latitude) = 34; GVAR(Altitude) = 640; }; -if (worldName in ["Sangin", "hellskitchen"]) then { GVAR(Latitude) = 32; GVAR(Altitude) = 0; }; -if (worldName in ["Sara"]) then { GVAR(Latitude) = 40; GVAR(Altitude) = 0; }; -if (worldName in ["reshmaan"]) then { GVAR(Latitude) = 35; GVAR(Altitude) = 2000; }; -if (worldName in ["Thirsk"]) then { GVAR(Latitude) = 65; GVAR(Altitude) = 0; }; -if (worldName in ["lingor"]) then { GVAR(Latitude) = -4; GVAR(Altitude) = 0; }; -if (worldName in ["Panthera3"]) then { GVAR(Latitude) = 46; GVAR(Altitude) = 0; }; -if (worldName in ["Kunduz"]) then { GVAR(Latitude) = 37; GVAR(Altitude) = 400; }; - // Assume default wind values // Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]]; diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 54069425a4..69e2d4a792 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -19,6 +19,7 @@ Clima Wetter Počasí + Clima Multiplayer synchronized ACE weather module @@ -26,6 +27,7 @@ Modulo climático del ACE sincronizado en multijugador ACE-Wettermodul (synchron im Multiplayer) Synchronizovat ACE počasí v multiplayeru + Módulo climático ACE para sincronismo multiplayer Weather propagation @@ -33,6 +35,7 @@ Propagación del clima Wetterübertragung Změny počasí + Propagação do clima Enables server side weather propagation @@ -40,6 +43,7 @@ Permite al servidor controlar la propagación del clima Aktiviere serverseitige Wetterübertragung Aktivuje změny počasí na straně serveru + Ativa propagação de clima via server ACE Weather @@ -47,6 +51,7 @@ Clima ACE ACE-Wetter ACE počasí + Clima ACE Overrides the default weather (editor, mission settings) with ACE weather (map based) @@ -54,6 +59,7 @@ 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) + Sobreescreve o clima padrão (editor, ajustes de missão) pelo sistema de clima ACE (baseado por mapa) Sync Rain @@ -61,6 +67,7 @@ Sincronizar lluvia Regen synchronisieren Synchronizuj déšť + Sincronizar chuva Synchronizes rain @@ -68,6 +75,7 @@ Sincroniza la lluvia Synchronisiert den Regen Synchronizace deště + Sincroniza a chuva Sync Wind @@ -75,6 +83,7 @@ Sincronizar viento Wind synchronisieren Synchronizuj vítr + Sincronizar vento Synchronizes wind @@ -82,6 +91,7 @@ Sincroniza el viento Synchronisiert den Wind Synchronizace větru + Sincroniza o vento Sync Misc @@ -89,6 +99,7 @@ Sincronizar otros Sonstiges synchronisieren Synchronizuj různé + Sincronizar outros Synchronizes lightnings, rainbow, fog, ... @@ -96,6 +107,7 @@ Sincroniza relampagos, arcoiris, niebla ... Synchronisiert Blitze, Regenbögen, Nebel, ... Synchronizace blesků, duhy, mlhy, ... + Sincroniza relâmpagos, arco-íris, neblina... Update Interval @@ -103,6 +115,7 @@ Intervalo de actualización Aktualisierungsintervall Interval aktualizace + Intervalo de atualização Defines the interval (seconds) between weather updates @@ -110,6 +123,7 @@ 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í + Defina o intervalo (em segundos) entre as atualizações de clima \ No newline at end of file diff --git a/addons/winddeflection/ACE_Settings.hpp b/addons/winddeflection/ACE_Settings.hpp index 0a0cac6b34..2d6d7dfb3f 100644 --- a/addons/winddeflection/ACE_Settings.hpp +++ b/addons/winddeflection/ACE_Settings.hpp @@ -1,25 +1,25 @@ class ACE_Settings { class GVAR(enabled) { - displayName = "Wind Deflection"; - description = "Enables wind deflection"; + displayName = CSTRING(deflectionModule_DisplayName); + description = CSTRING(deflectionModule_Description); typeName = "BOOL"; value = 1; }; class GVAR(vehicleEnabled) { - displayName = "Vehicle Enabled"; - description = "Enables wind deflection for static/vehicle gunners"; + displayName = CSTRING(vehicleEnabled_DisplayName); + description = CSTRING(vehicleEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulationInterval) { - displayName = "Simulation Interval"; - description = "Defines the interval between every calculation step"; + displayName = CSTRING(simulationInterval_DisplayName); + description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; value = 0.05; }; class GVAR(simulationRadius) { - displayName = "Simulation Radius"; - description = "Defines the radius around the player (in meters) at which projectiles are wind deflected"; + displayName = CSTRING(simulationRadius_DisplayName); + description = CSTRING(simulationRadius_Description); typeName = "SCALAR"; value = 3000; }; diff --git a/addons/winddeflection/CfgEventHandlers.hpp b/addons/winddeflection/CfgEventHandlers.hpp index d856993322..a835fd0e88 100644 --- a/addons/winddeflection/CfgEventHandlers.hpp +++ b/addons/winddeflection/CfgEventHandlers.hpp @@ -3,7 +3,11 @@ class Extended_PreInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; - +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; class Extended_FiredBIS_EventHandlers { class AllVehicles { class ADDON { diff --git a/addons/winddeflection/XEH_postInit.sqf b/addons/winddeflection/XEH_postInit.sqf new file mode 100644 index 0000000000..63d866fb60 --- /dev/null +++ b/addons/winddeflection/XEH_postInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +if !(hasInterface) exitWith {}; + +GVAR(trackedBullets) = []; + +["SettingsInitialized", { + //If not enabled, dont't add PFEH + if (!GVAR(enabled)) exitWith {}; + + [] call FUNC(updateTrajectoryPFH); + +}] call EFUNC(common,addEventHandler); diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index f7090cfc2a..6c668a8033 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -21,9 +21,7 @@ */ #include "script_component.hpp" -private ["_unit", "_bullet"]; -_unit = _this select 0; -_bullet = _this select 6; +params ["_unit", "", "", "", "_ammo", "", "_bullet"]; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && (_bullet isKindOf "BulletBase") && (_unit isKindOf "Man")) exitWith {false}; @@ -34,6 +32,6 @@ if (!((_bullet isKindOf "BulletBase") || (_bullet isKindOf "GrenadeBase"))) exit if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; if (!([_unit] call EFUNC(common,isPlayer))) exitWith {false}; -[_bullet, getNumber(configFile >> "cfgAmmo" >> (_this select 4) >> "airFriction")] call FUNC(updateTrajectoryPFH); +GVAR(trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")]; true; \ No newline at end of file diff --git a/addons/winddeflection/functions/fnc_initModuleSettings.sqf b/addons/winddeflection/functions/fnc_initModuleSettings.sqf index 40be14a2b2..037ce15c47 100644 --- a/addons/winddeflection/functions/fnc_initModuleSettings.sqf +++ b/addons/winddeflection/functions/fnc_initModuleSettings.sqf @@ -15,10 +15,7 @@ #include "script_component.hpp" -private ["_logic", "_units", "_activated"]; -_logic = _this select 0; -_units = _this select 1; -_activated = _this select 2; +params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 40e349095e..baff39516d 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -13,38 +13,45 @@ * * Public: No */ +// #define ENABLE_PERFORMANCE_COUNTERS #include "script_component.hpp" [{ - private ["_args", "_bullet", "_airFriction", "_time", "_deltaT", "_bulletVelocity", "_bulletSpeed", "_trueVelocity", "_trueSpeed", "_dragRef", "_drag", "_accelRef", "_accel"]; + // BEGIN_COUNTER(pfeh); + private["_accel", "_accelRef", "_bulletSpeed", "_bulletVelocity", "_deleted", "_deltaT", "_drag", "_dragRef", "_isWind", "_trueSpeed", "_trueVelocity"]; - _args = _this select 0; - _bullet = _args select 0; - _airFriction = _args select 1; - _time = _args select 2; - - _bulletVelocity = velocity _bullet; - _bulletSpeed = vectorMagnitude _bulletVelocity; - - if (!alive _bullet || ((_bullet isKindOf "BulletBase") && _bulletSpeed < 100)) exitwith { - [_this select 1] call cba_fnc_removePerFrameHandler; - }; - - _deltaT = ACE_time - _time; - _args set[2, ACE_time]; - - if (vectorMagnitude ACE_wind > 0) then { - _trueVelocity = _bulletVelocity vectorDiff ACE_wind; - _trueSpeed = vectorMagnitude _trueVelocity; + params ["_args"]; + _args params ["_lastTime"]; + _deltaT = ACE_time - _lastTime; + _args set [0, ACE_time]; + _deleted = 0; + _isWind = (vectorMagnitude ACE_wind > 0); - _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; - _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); - _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + { + _x params ["_bullet", "_airFriction"]; - _drag = _deltaT * _airFriction * _trueSpeed; - _accel = _trueVelocity vectorMultiply (_drag); - _bulletVelocity = _bulletVelocity vectorAdd _accel; - }; - _bullet setVelocity _bulletVelocity; - -}, GVAR(simulationInterval), [_this select 0, _this select 1, ACE_time]] call CBA_fnc_addPerFrameHandler; \ No newline at end of file + _bulletVelocity = velocity _bullet; + _bulletSpeed = vectorMagnitude _bulletVelocity; + + if ((!alive _bullet) || {(_bullet isKindOf "BulletBase") && {_bulletSpeed < 100}}) then { + GVAR(trackedBullets) deleteAt (_forEachIndex - _deleted); + _deleted = _deleted + 1; + } else { + if (_isWind) then { + _trueVelocity = _bulletVelocity vectorDiff ACE_wind; + _trueSpeed = vectorMagnitude _trueVelocity; + + _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed; + _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef); + _bulletVelocity = _bulletVelocity vectorDiff _accelRef; + + _drag = _deltaT * _airFriction * _trueSpeed; + _accel = _trueVelocity vectorMultiply (_drag); + _bulletVelocity = _bulletVelocity vectorAdd _accel; + }; + _bullet setVelocity _bulletVelocity; + }; + + } forEach GVAR(trackedBullets); + // END_COUNTER(pfeh); +}, GVAR(simulationInterval), [ACE_time]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index a361681e59..f7b4324233 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -66,6 +66,8 @@ Wpływ wiatru Desviación por viento Účinky větru + Windablenkung + Desvio de vento Wind Deflection @@ -73,6 +75,7 @@ Desviación por viento Windablenkung Účinky větru + Desvio de vento Enables wind deflection @@ -80,6 +83,7 @@ Activa la desviación por viento Aktiviert Windablenkung Umožňit vliv větru + Ativa o desvio de vento Vehicle Enabled @@ -87,6 +91,7 @@ Habilitada en vehículos Fahrzeuge aktiviert Vozidla povolena + Ativado em veículos Enables wind deflection for static/vehicle gunners @@ -94,6 +99,7 @@ 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 + Ativa o desvio de vento para atiradores de estáticas e veículos Simulation Interval @@ -101,6 +107,7 @@ Intervalo de simulación Simulationsintervall Interval simulace + Intervalo de simulação Defines the interval between every calculation step @@ -108,6 +115,7 @@ Define el intervalo entre cada calculo Definiert das Intervall zwischen jedem Berechnungsschritt Určuje interval mezi každým výpočtem + Define o intervalo entre cada cálculo Simulation Radius @@ -115,6 +123,7 @@ Radio de simulación Simulationsradius Oblast simulace + Radio da Simulação Defines the radius around the player (in meters) at which projectiles are wind deflected @@ -122,6 +131,7 @@ 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 + Define o raio ao redor do jogador (em metros) em qual os projéteis são desviados pelo vento Wind influence on projectiles trajectory @@ -129,6 +139,7 @@ Influencia del viento en la trayectoria de proyectiles Windeinfluss auf die Geschossbahnen Vítr ovlivňuje trajektorii projektilu + Influência do vento na trajetória dos projéteis - \ No newline at end of file + diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml index c7cb16b83b..30887673e7 100644 --- a/addons/yardage450/stringtable.xml +++ b/addons/yardage450/stringtable.xml @@ -6,6 +6,8 @@ Yardage 450 Yardage 450 Yardage 450 + Yardage 450 + Yardage 450 Laser Rangefinder @@ -13,6 +15,7 @@ Dalmierz laserowy Telémetro láser Laserový dálkoměr + Medidor de Distância a laser Yardage 450 - Power Button @@ -20,6 +23,7 @@ Yardage 450 - Przycisk zasilania Yardage 450 - Botón de encendido Yardage 450 - Tlačítko napájení + Yardage 450 - Botão de energia - \ No newline at end of file + diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 79d4ff6f1f..e110970ae3 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -79,6 +79,10 @@ class CfgVehicles { class GVAR(moduleBase): Module_F { author = "SilentSpike"; category = "ACE"; + functionPriority = 1; + isGlobal = 1; + isTriggerActivated = 0; + scope = 1; scopeCurator = 2; }; class GVAR(moduleCaptive): GVAR(moduleBase) { @@ -111,4 +115,34 @@ class CfgVehicles { sync[] = {}; }; }; + class GVAR(moduleSetMedic): GVAR(moduleBase) { + curatorCanAttach = 1; + displayName = CSTRING(ModuleSetMedic_displayName); + function = QFUNC(moduleSetMedic); + icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa)); + class ModuleDescription { + description = ""; + sync[] = {}; + }; + }; + class GVAR(moduleSetMedicalVehicle): GVAR(moduleBase) { + curatorCanAttach = 1; + displayName = CSTRING(ModuleSetMedicalVehicle_displayName); + function = QFUNC(moduleSetMedicalVehicle); + icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa)); + class ModuleDescription { + description = ""; + sync[] = {}; + }; + }; + class GVAR(moduleSetMedicalFacility): GVAR(moduleBase) { + curatorCanAttach = 1; + displayName = CSTRING(ModuleSetMedicalFacility_displayName); + function = QFUNC(moduleSetMedicalFacility); + icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa)); + class ModuleDescription { + description = ""; + sync[] = {}; + }; + }; }; diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf index 1b2ac19263..3817db218f 100644 --- a/addons/zeus/XEH_preInit.sqf +++ b/addons/zeus/XEH_preInit.sqf @@ -8,6 +8,9 @@ PREP(bi_moduleProjectile); PREP(bi_moduleRemoteControl); PREP(handleZeusUnitAssigned); PREP(moduleCaptive); +PREP(moduleSetMedic); +PREP(moduleSetMedicalVehicle); +PREP(moduleSetMedicalFacility); PREP(moduleSurrender); PREP(moduleUnconscious); PREP(moduleZeusSettings); diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 7505f2770e..810ce17396 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -19,7 +19,10 @@ class CfgPatches { }; class GVAR(medical): ADDON { units[] = { - QGVAR(moduleUnconscious) + QGVAR(moduleUnconscious), + QGVAR(moduleSetMedic), + QGVAR(moduleSetMedicalVehicle), + QGVAR(moduleSetMedicalFacility) }; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 5980e56b3d..7150856154 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -127,9 +127,9 @@ if (_activated) then { _projectile setvelocity _velocity; if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; - // Added by ace_zeus for ace_frag compatibility - if (!isnil "ace_frag_fnc_addManualTrack") then { - [_projectile] call ace_frag_fnc_addManualTrack + // Added by ace_zeus for ace_frag compatibility + if (!isnil QEFUNC(frag,addPfhRound)) then { + [objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound); }; //--- Play sound diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index e5433bad27..65663e65fd 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -19,11 +19,11 @@ #include "script_component.hpp" -private ["_logic","_removeAddons","_numCfgs","_cfg","_requiredAddon"]; +private ["_removeAddons", "_numCfgs", "_cfg", "_requiredAddon"]; if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; -_logic = _this select 0; +params ["_logic"]; _removeAddons = []; _numCfgs = count (configFile >> "ACE_Curator"); diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index f77f9846a4..8273c8ba6f 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -1,33 +1,35 @@ /* * Author: SilentSpike - * Flips the capture state of the unit the module is attached to. + * Flips the capture state of the unit the module is placed on. * * Arguments: - * 0: The module logic - * 1: units - * 2: activated + * 0: The module logic + * 1: Synchronized units + * 2: Activated * - * ReturnValue: - * nil + * Return Value: + * None * - * Public: no + * Public: No */ #include "script_component.hpp" -PARAMS_3(_logic,_units,_activated); -private ["_unit","_captive"]; +params ["_logic", "_units", "_activated"]; +private ["_mouseOver", "_unit", "_captive"]; -if (!_activated) exitWith {}; +if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { - _unit = attachedTo _logic; + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); - if (isNull _unit) then { + if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { + _unit = effectivecommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf new file mode 100644 index 0000000000..661e33f907 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -0,0 +1,52 @@ +/* + * Author: SilentSpike, Glowbal + * Assigns a medic role from the medical module to a unit + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; +private ["_mouseOver", "_unit", "_medicN"]; + +if !(_activated && local _logic) exitWith {}; + +if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); +} else { + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + + if ((_mouseOver select 0) != "OBJECT") then { + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); + } else { + _unit = effectivecommander (_mouseOver select 1); + + if !(_unit isKindOf "CAManBase") then { + [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); + } else { + if !(alive _unit) then { + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); + } else { + if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); + } else { + _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); + if (_medicN < 1) then { + _unit setvariable [QEGVAR(medical,medicClass), 1, true]; + }; + }; + }; + }; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf new file mode 100644 index 0000000000..22826108e7 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -0,0 +1,51 @@ +/* + * Author: SilentSpike, Glowbal + * Assigns a medic role from the medical module to a unit + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; +private ["_mouseOver", "_unit"]; + +if !(_activated && local _logic) exitWith {}; + +if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); +} else { + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + + if ((_mouseOver select 0) != "OBJECT") then { + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); + } else { + _unit = (_mouseOver select 1); + + if (_unit isKindOf "Man" || {!(_unit isKindOf "Building")}) then { + [LSTRING(OnlyStructures)] call EFUNC(common,displayTextStructured); + } else { + if !(alive _unit) then { + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); + } else { + if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); + } else { + if (!(GETVAR(_unit,EGVAR(medical,isMedicalFacility),false))) then { + _unit setvariable [QEGVAR(medical,isMedicalFacility), true, true]; + }; + }; + }; + }; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf new file mode 100644 index 0000000000..9e5e788461 --- /dev/null +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -0,0 +1,52 @@ +/* + * Author: SilentSpike, Glowbal + * Assigns a medic role from the medical module to a unit + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_logic", "_units", "_activated"]; +private ["_mouseOver", "_unit", "_medicN"]; + +if !(_activated && local _logic) exitWith {}; + +if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { + [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); +} else { + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + + if ((_mouseOver select 0) != "OBJECT") then { + [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); + } else { + _unit = (_mouseOver select 1); + + if (_unit isKindOf "Man" || {_unit isKindOf "Building"}) then { + [LSTRING(OnlyVehicles)] call EFUNC(common,displayTextStructured); + } else { + if !(alive _unit) then { + [LSTRING(OnlyAlive)] call EFUNC(common,displayTextStructured); + } else { + if (GETVAR(_unit,EGVAR(captives,isHandcuffed),false)) then { + [LSTRING(OnlyNonCaptive)] call EFUNC(common,displayTextStructured); + } else { + _medicN = GETVAR(_unit,EGVAR(medical,medicClass),0); + if (_medicN < 1) then { + _unit setvariable [QEGVAR(medical,medicClass), 1, true]; + }; + }; + }; + }; + }; +}; + +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 591b216ad7..95f35593a5 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -1,33 +1,35 @@ /* * Author: SilentSpike - * Flips the surrender state of the unit the module is attached to. + * Flips the surrender state of the unit the module is placed on. * * Arguments: - * 0: The module logic - * 1: units - * 2: activated + * 0: The module logic + * 1: Synchronized units + * 2: Activated * - * ReturnValue: - * nil + * Return Value: + * None * - * Public: no + * Public: No */ #include "script_component.hpp" -PARAMS_3(_logic,_units,_activated); -private ["_unit","_surrendering"]; +params ["_logic", "_units", "_activated"]; +private ["_mouseOver", "_unit", "_surrendering"]; -if (!_activated) exitWith {}; +if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { - _unit = attachedTo _logic; + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); - if (isNull _unit) then { + if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { + _unit = effectivecommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 2d8bae85e8..d9f9031cee 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -1,33 +1,35 @@ /* * Author: SilentSpike - * Flips the unconscious state of the unit the module is attached to. + * Flips the unconscious state of the unit the module is placed on. * * Arguments: - * 0: The module logic - * 1: units - * 2: activated + * 0: The module logic + * 1: Synchronized units + * 2: Activated * - * ReturnValue: - * nil + * Return Value: + * None * - * Public: no + * Public: No */ #include "script_component.hpp" -PARAMS_3(_logic,_units,_activated); -private ["_unit","_conscious"]; +params ["_logic", "_units", "_activated"]; +private ["_mouseOver", "_unit", "_conscious"]; -if (!_activated) exitWith {}; +if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); } else { - _unit = attachedTo _logic; + _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); - if (isNull _unit) then { + if ((_mouseOver select 0) != "OBJECT") then { [LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured); } else { + _unit = effectivecommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { [LSTRING(OnlyInfantry)] call EFUNC(common,displayTextStructured); } else { @@ -36,7 +38,7 @@ if (isNil QEFUNC(medical,setUnconscious)) then { } else { _conscious = GETVAR(_unit,ACE_isUnconscious,false); // Function handles locality for me - [_unit, !_conscious, round(random(10)+5), true] call EFUNC(medical,setUnconscious); + [_unit, !_conscious, 10e10, true] call EFUNC(medical,setUnconscious); }; }; }; diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index 3a582f7196..0b9c0f8dd8 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -15,10 +15,7 @@ #include "script_component.hpp" -private ["_logic", "_units", "_activated"]; -_logic = _this select 0; -_units = _this select 1; -_activated = _this select 2; +params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 8ddde63cc8..fd1c978188 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -6,102 +6,145 @@ Ustawienia Zeusa Ajustes Zeus Nastavení Zeuse + Zeus-Einstellungen + Ajustes do Zeus 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. + Bietet die Steuerung verschiedener Zeus-Optionen an. + Proporciona controle sobre diversos aspectos do Zeus. Ascension Messages Wiad. o nowym Zeusie Mensajes de ascensión Zpráva o novém Zeusovi + Aufstiegsnachrichten + Mensagens de ascensão 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. + Zeige globale Popup-Nachrichten wenn ein Spieler zu Zeus wird. + Mostra uma mensagem popup quando um jogador é atribuido ao Zeus. Zeus Eagle Orzeł Zeusa Águila Zeus Orel Zeuse + Zeus-Adler + Águia do Zeus 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. + Erstelle einen Adler, der der Zeus-Kamera folgt. + Cria uma águia que segue a câmera do Zeus Wind Sounds Dźwięki wiatru Sonidos de viento Zvuky větru + Windgeräusche + Sons de vento 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. + Spiele Windgeräusche ab, wenn Zeus eine Einheit steuert. + Reproduz sons de vento quando uma unidade é remotamente controlada pelo Zeus. Ordnance Warning Ostrz. o ostrzale arty. Advertencia de artefactos explosivos Varování před dělostřelectvem + Artilleriewarnung + Aviso de explosivos 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. + Spiele eine Radiowarnung ab, wenn Zeus Artillerie verwendet. + Reproduz uma aviso via rádio quando o Zeus usa um explosivo. Reveal Mines Pokazuj miny Revelar minas Odhalit miny + Enthülle Minen + Revelar minas 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. + Enthülle Minen gegenüber Verbündeten und platziere Kartenmarkierungen. + Revelar minas para aliados e colocar marcadores no mapa. Reveal to Allies Pokaż dla sojuszników Revelar a aliados Odhalit pro spojence + An Verbündete weitergeben + Revelar para aliados Allies + Map Markers Sojusznicy + markery na mapie Aliados + Marcas de mapa Spojenci + Značky na mapě + Verbündete + Kartenmarkierungen + Aliados + Marcadores no mapa Toggle Captive Przełącz więźnia Alternar cautivo Přepnout - Vězeň + Gefangennahme umschalten + Alternar prisioneiro Toggle Surrender Przełącz kapitulację Alternar rendición Přepnout - Vzdávání + Aufgabe umschalten + Alternar rendição Toggle Unconscious Przełącz nieprzytomność Alternar inconsciencia Přepnout - Bezvědomí + Bewusstlosigkeit umschalten + Alternar inconsciência + + + Assign Medic + + + Assign Medical Vehicle + + + Assign Medical Facility Unit must be alive @@ -127,18 +170,26 @@ Si può usare solo su fanteria a piedi Usar somente em infantaria desmontada + + Unit must be a structure + + + Unit must be a vehicle + Unit must not be captive Jednostka nie może być więźniem La unidad no debe estar cautiva Jednotka nemí být vězeň + Einheit darf nicht gefangen sein + Unidade não pode ser prisioneira Place on a unit Rien sous le curseur Es wurde nichts ausgewählt Nada bajo el ratón - Nada debaixo do mouse + Coloque em uma unidade Umístni na jednotku Nie ma nic pod kursorem Ничего не выделено @@ -150,6 +201,8 @@ Wymaga addonu, który nie jest obecny Requiere un addon que no está presente Vyžaduje addon, který není přítomen + Benötigt ein Addon, das nicht vorhanden ist + Requer um addon que não está presente - \ No newline at end of file + diff --git a/addons/zeus/ui/Icon_Module_Zeus_Medic_ca.paa b/addons/zeus/ui/Icon_Module_Zeus_Medic_ca.paa new file mode 100644 index 0000000000..60963046a7 Binary files /dev/null and b/addons/zeus/ui/Icon_Module_Zeus_Medic_ca.paa differ diff --git a/documentation/development/ace3-config-entries.md b/documentation/development/ace3-config-entries.md index d87ca4145e..3ba9092d4a 100644 --- a/documentation/development/ace3-config-entries.md +++ b/documentation/development/ace3-config-entries.md @@ -23,6 +23,8 @@ ace_dragging_dragposition ace_dragging_dragdirection ace_gforcecoef ace_offset +ace_hasReserveParachute +ace_reserveParachute ``` @@ -63,6 +65,8 @@ ace_barrelLength ace_laserpointer ace_nextmodeclass ace_modedescription +ace_hearing_protection +ace_hearing_lowerVolume ``` diff --git a/documentation/development/ace3-events-system.md b/documentation/development/ace3-events-system.md index 77281c9c7c..7f3dbf6a49 100644 --- a/documentation/development/ace3-events-system.md +++ b/documentation/development/ace3-events-system.md @@ -56,7 +56,7 @@ PREP(onTapShoulder); "playerChanged" - `player` changed (zeus/respawn) + `player` changed (zeus/respawn/init) common [_newPlayer, _oldPlayer] local @@ -68,23 +68,23 @@ PREP(onTapShoulder); [_player] local - + "playerInventoryChanged" Inventory changed common - getAllGear-Array + [_player, getAllGear-Array] local - - + + "playerVisionModeChanged" Vision mode changed (e.g. NVG on) common [_unit, _newVisionMode] local - - + + "inventoryDisplayChanged" Inventory display opened/closed @@ -92,7 +92,7 @@ PREP(onTapShoulder); [_unit, _isOpen] local - + "zeusDisplayChanged" Zeus display opened/closed @@ -100,56 +100,70 @@ PREP(onTapShoulder); [_unit, _isOpen] local - + "cameraViewChanged" Camera view changed common [_unit, _newCameraView] local - + "playerVehicleChanged" Player vehicle changed common [_unit, _newVehicle] local - + "playerTurretChanged" Player turret changed common [_unit, _newTurretIndexArray] local - + "infoDisplayChanged" On info box change (e.g. entering and leaving a vehicle) common [_display, _type] local - + "inventoryDisplayLoaded" On opening the inventory display common [_display] local - + "mapDisplayLoaded" On loading the map (briefing and mission start) common [_display, _mapType] local - + + + "SettingsInitialized" + Settings are now safe to use (at mission start) + common + + local + + + "SettingChanged" + A setting was changed + common + [_name, _value] + local + "interactionMenuOpened" Interaction Menu Opened interaction local - + "killedByFriendly" On TK/Civilian Killed @@ -163,7 +177,7 @@ PREP(onTapShoulder); map target - + "drawing_sendbackMarkers" Send Drawing Markers @@ -177,21 +191,28 @@ PREP(onTapShoulder); map global - + "drawing_removeLineMarker" Line Deleted map global - + "flashbangExplosion" Flashbang Goes Bang grenades target - + + + "zeusUnitAssigned" + A player was assigned as zeus + zeus + [_logic,_player] + global + @@ -208,13 +229,26 @@ PREP(onTapShoulder); - + + "SetHandcuffed" + Set the captive (handcuffed) state of a unit + [_unit, _state] + captives + local + + + "SetSurrendered" + Set the surrender state of a unit + [_unit, _state] + captives + local + + "ace_fcs_forceChange" force FCS updates fcs fcs local - diff --git a/documentation/development/arma-3-issues.md b/documentation/development/arma-3-issues.md index 4a3e9ea0fc..16f9988409 100644 --- a/documentation/development/arma-3-issues.md +++ b/documentation/development/arma-3-issues.md @@ -22,6 +22,7 @@ Keeping track of Arma 3 issues that need to be fixed. If you want to support us * [James2464: 0023725: All Environment Rocks Should Have PhysX LODs](http://feedback.arma3.com/view.php?id=23725) * [Jaynus: 0023679: Display event handler return values for mouse buttons should be respected](http://feedback.arma3.com/view.php?id=23679) * [Heisenberg: 0023741: Switching between optic modes of a sniper scope (AMS, DMS, MOS) will result in a blurred vision](http://feedback.arma3.com/view.php?id=23741) +* [AgentRev: 0022310: setObjectTextureGlobal causing "Cannot load texture" errors when used with valid mission files](http://feedback.arma3.com/view.php?id=22310) **Resolved:** diff --git a/documentation/development/coding-guidelines.md b/documentation/development/coding-guidelines.md index 89f0d91342..a869911747 100644 --- a/documentation/development/coding-guidelines.md +++ b/documentation/development/coding-guidelines.md @@ -1,7 +1,7 @@ --- layout: wiki title: Coding Guidelines -description: +description: group: development parent: wiki order: 1 @@ -112,7 +112,7 @@ Every function should have a header of the following format: * The return value * * Example: - * _bool = ["something", player] call ace_common_fnc_imanexample + * ["something", player] call ace_common_fnc_imanexample * * Public: [Yes/No] */ @@ -124,33 +124,39 @@ Every function should have a header of the following format: ### 4.1 Module/PBO specific Macro Usage The family of `GVAR` macro's define global variable strings or constants for use within a module. Please use these to make sure we follow naming conventions across all modules and also prevent duplicate/overwriting between variables in different modules. The macro family expands as follows, for the example of the module 'balls': -* `GVAR(face)` is `ace_balls_face` -* `QGVAR(face)` is `"ace_balls_face"` -* `EGVAR(balls,face)` is `ace_balls_face` -* `EGVAR(leg,face)` is `ace_leg_face` -* `QEGVAR(leg,face)` is `"ace_leg_face"` +| Macros | Expands to | +| -------|---------| +| `GVAR(face)` | ace_balls_face | +|`QGVAR(face)` | "ace_balls_face" | +| `EGVAR(balls,face)` | ace_balls_face | +| `EGVAR(leg,face)` | ace_leg_face | +| `QEGVAR(leg,face)` | "ace_leg_face" | There also exists the FUNC family of Macros: -* `FUNC(face)` is `ace_balls_fnc_face` or the call trace wrapper for that function. -* `EFUNC(balls,face)` is `ace_balls_fnc_face` or the call trace wrapper for that function. -* `EFUNC(leg,face)` is `ace_leg_fnc_face` or the call trace wrapper for that function. -* `DFUNC(face)` is `ace_balls_fnc_face` and will ALWAYS be the function global variable. -* `DEFUNC(leg,face)` is `ace_leg_fnc_face` and will ALWAYS be the function global variable. -* `QFUNC(face)` is `"ace_balls_fnc_face"` -* `QEFUNC(leg,face)` is `"ace_leg_fnc_face"` +| Macros | Expands to | +| -------|---------| +|`FUNC(face)` | ace_balls_fnc_face or the call trace wrapper for that function.| +|`EFUNC(balls,face)` | ace_balls_fnc_face or the call trace wrapper for that function.| +|`EFUNC(leg,face) `| ace_leg_fnc_face or the call trace wrapper for that function.| +|`DFUNC(face)` | ace_balls_fnc_face and will ALWAYS be the function global variable.| +|`DEFUNC(leg,face)` | ace_leg_fnc_face and will ALWAYS be the function global variable.| +|`QFUNC(face)` | "ace_balls_fnc_face" | +|`QEFUNC(leg,face)` | "ace_leg_fnc_face" | The `FUNC` and `EFUNC` macros should NOT be used inside `QUOTE` macros if the intention is to get the function name or assumed to be the function variable due to call tracing (see below). If you need to 100% always be sure that you are getting the function name or variable use the `DFUNC` or `DEFUNC` macros. For example `QUOTE(FUNC(face)) == "ace_balls_fnc_face"` would be an illegal use of `FUNC` inside `QUOTE`. Using `FUNC` or `EFUNC` inside a `QUOTE` macro is fine if the intention is for it to be executed as a function. -#### 4.1.1 FUNC Macros, Call Tracing, and Non-ACE/Anonymous Functions +#### 4.1.1 FUNC Macros, Call Tracing, and Non-ACE3 /Anonymous Functions -ACE implements a basic call tracing system that can dump the call stack on errors or wherever you want. To do this the `FUNC` macros in debug mode will expand out to include metadata about the call including line numbers and files. This functionality is automatic with the use of calls via `FUNC` and `EFUNC`, but any calls to other functions need to use the following macros: +ACE3 implements a basic call tracing system that can dump the call stack on errors or wherever you want. To do this the `FUNC` macros in debug mode will expand out to include metadata about the call including line numbers and files. This functionality is automatic with the use of calls via `FUNC` and `EFUNC`, but any calls to other functions need to use the following macros: -* `CALLSTACK(functionName)` example: `[] call CALLSTACK(cba_fnc_someFunction)` -* `CALLSTACK_NAMED(function,functionName)` example: `[] call CALLSTACK_NAMED(_anonymousFunction,'My anonymous function!')` +| Macro | example | +| -------|---------| +|`CALLSTACK(functionName)` | `[] call CALLSTACK(cba_fnc_someFunction)` | +|`CALLSTACK_NAMED(function,functionName)` | `[] call CALLSTACK_NAMED(_anonymousFunction,'My anonymous function!')`| These macros will call these functions with the appropriate wrappers and enable call logging into them (but to no further calls inside obviously). @@ -162,44 +168,64 @@ These macros will call these functions with the appropriate wrappers and enable #### 4.2.1 setVariable, getVariable family macros -* `GETVAR(player,MyVarName,false)` - `player getVariable ["MyVarName", false]` -* `GETMVAR(MyVarName,objNull)` - `missionNamespace getVariable ["MyVarName", objNull]` -* `GETUVAR(MyVarName,displayNull)` - `uiNamespace getVariable ["MyVarName", displayNull]` -* `SETVAR(player,MyVarName,127)` - `player setVariable ["MyVarName", 127]` -* `SETPVAR(player,MyVarName,127)` - `player setVariable ["MyVarName", 127, true]` -* `SETMVAR(MyVarName,player)` - `missionNamespace setVariable ["MyVarName", player]` -* `SETUVAR(MyVarName,_control)` - `uiNamespace setVariable ["MyVarName", _control]` +| Macro | Expands to | +| -------|---------| +|`GETVAR(player,MyVarName,false)` | player getVariable ["MyVarName", false]| +|`GETMVAR(MyVarName,objNull)` | missionNamespace getVariable ["MyVarName", objNull]| +|`GETUVAR(MyVarName,displayNull)` | uiNamespace getVariable ["MyVarName", displayNull]| +|`SETVAR(player,MyVarName,127)` | player setVariable ["MyVarName", 127] SETPVAR(player,MyVarName,127) player setVariable ["MyVarName", 127, true] | +|`SETMVAR(MyVarName,player)` | missionNamespace setVariable ["MyVarName", player] | +|`SETUVAR(MyVarName,_control)` | uiNamespace setVariable ["MyVarName", _control] | + +#### 4.2.2 STRING family macros + +Note that you need the strings in module stringtable.xml in the correct format +`STR_ACE__`
+Example:
+`STR_Balls_Banana`
+ +Script strings: + +| Macro | Expands to | +| -------|---------| +| `LSTRING(banana)` | "STR_ACE_balls_banana"| +| `ELSTRING(balls,banana)` | "STR_ACE_balls_banana"| + + +Config Strings (require `$` as first character): + +| Macro | Expands to | +| -------|---------| +| `CSTRING(banana)` | "$STR_ACE_balls_banana" | +| `ECSTRING(balls,banana)` | "$STR_ACE_balls_banana" | ## 5. Event Handlers -Event handlers in ACE are implemented through our event system. They should be used to trigger or allow triggering of specific functionality. +Event handlers in ACE3 are implemented through our event system. They should be used to trigger or allow triggering of specific functionality. The commands are listed below. -* `[eventName, eventCodeBlock] call ace_common_fnc_addEventHandler` adds an event handler with the event name and returns the event handler id. -* `[eventName, args] call ace_common_fnc_globalEvent` calls an event with the listed args on all machines, the local machine, and the server. -* `[eventName, args] call ace_common_fnc_serverEvent` calls an event just on the server computer (dedicated or self-hosted). -* `[eventName, targetObject(s), args] call ace_common_fnc_targetEvent` calls an event just on the targeted object or list of objects. -* `[eventName, args] call ace_common_fnc_localEvent` calls an event just on the local machine, useful for inter-module events. +| Even Handler | Use | +| -------|---------| +|`[eventName, eventCodeBlock] call ace_common_fnc_addEventHandler` | adds an event handler with the event name and returns the event handler id.| +| `[eventName, args] call ace_common_fnc_globalEvent` | calls an event with the listed args on all machines, the local machine, and the server. | +|`[eventName, args] call ace_common_fnc_serverEvent` | calls an event just on the server computer (dedicated or self-hosted).| +| `[eventName, targetObject(s), args] call ace_common_fnc_targetEvent` | calls an event just on the targeted object or list of objects.| +|`[eventName, args] call ace_common_fnc_localEvent` | calls an event just on the local machine, useful for inter-module events.| Events can be removed or cleared with the following commands. -* `[eventName, eventHandlerId] call ace_common_fnc_removeEventHandler` will remove a specific event handler of the event name, using the ID returned from `ace_common_fnc_addEventHandler`. -* `[eventName] call ace_common_fnc_removeAllEventHandlers` will remove all event handlers for that type of event. +| Even Handler | Use | +| -------|---------| +|`[eventName, eventHandlerId] call ace_common_fnc_removeEventHandler` | will remove a specific event handler of the event name, using the ID returned from `ace_common_fnc_addEventHandler`.| +|`[eventName] call ace_common_fnc_removeAllEventHandlers` | will remove all event handlers for that type of event.| -More information on the [ACE Events System](https://github.com/KoffeinFlummi/ACE3/wiki/ACE-Events-System) page. +More information on the [ACE3 Events System](https://github.com/KoffeinFlummi/ACE3/wiki/ACE-Events-System) page. ## 6. Hashes -Hashes are a variable type that store key value pairs. They are not implemented natively in SQF, so there are a number of macros and functions for their usage in ACE. If you are unfamiliar with the idea, they are similar in function to `setVariable`/`getVariable` but do not require an object to use. +Hashes are a variable type that store key value pairs. They are not implemented natively in SQF, so there are a number of macros and functions for their usage in ACE3. If you are unfamiliar with the idea, they are similar in function to `setVariable`/`getVariable` but do not require an object to use. The following example is a simple usage using our macros which will be explained further below. @@ -217,11 +243,13 @@ if(HASH_HASKEY(_hash, "key")) then { A description of the above macros is below. -* `HASHCREATE` is used to create an empty hash. -* `HASH_SET(hash, key, val)` will set the hash key to that value, a key can be anything, even objects. -* `HASH_GET(hash, key)` will return the value of that key (or nil if it doesn't exist). -* `HASH_HASKEY(hash, key)` will return true/false if that key exists in the hash. -* `HASH_REM(hash, key)` will remove that hash key. +| Macro | Use | +| -------|---------| +|`HASHCREATE` | used to create an empty hash.| +| `HASH_SET(hash, key, val)` | will set the hash key to that value, a key can be anything, even objects. | +|`HASH_GET(hash, key)` | will return the value of that key (or nil if it doesn't exist). | +| `HASH_HASKEY(hash, key)` | will return true/false if that key exists in the hash. | +| `HASH_REM(hash, key)` | will remove that hash key.| ### 6.1 Hashlists @@ -248,7 +276,7 @@ _anotherHash = HASHLIST_SELECT(_hashList, 0); // this should print "val: 1" player sideChat format["val: %1", HASH_GET(_anotherHash, "key1")]; -//Say we need to add a new key to the hashlist +//Say we need to add a new key to the hashlist //that we didn't initialize it with? We can simply //set a new key using the standard HASH_SET macro HASH_SET(_anotherHash, "anotherKey", "another value"); @@ -256,11 +284,14 @@ HASH_SET(_anotherHash, "anotherKey", "another value"); As you can see above working with hashlists are fairly simple, a more in depth explanation of the macros is below. -* `HASHLIST_CREATELIST(keys)` creates a new hashlist with the default keys, pass [] for no default keys. -* `HASHLIST_CREATEHASH(hashlist)` returns a blank hash template from a hashlist. -* `HASHLIST_PUSH(hashList, hash)` pushes a new hash onto the end of the list. -* `HASHLIST_SELECT(hashlist, index)` returns the hash at that index in the list. -* `HASHLIST_SET(hashlist, index, hash)` sets a specific index to that hash. + +| Macro | Use | +| -------|---------| +|`HASHLIST_CREATELIST(keys)` | creates a new hashlist with the default keys, pass [] for no default keys.| +|`HASHLIST_CREATEHASH(hashlist)` | returns a blank hash template from a hashlist.| +|`HASHLIST_PUSH(hashList, hash)` | pushes a new hash onto the end of the list.| +|`HASHLIST_SELECT(hashlist, index)` | returns the hash at that index in the list. | +|`HASHLIST_SET(hashlist, index, hash)` | sets a specific index to that hash.| #### 6.1.1 A note on pass by reference and hashes diff --git a/documentation/development/Documentation guidelines and tips.md b/documentation/development/documentation-guidelines-and-tips.md similarity index 100% rename from documentation/development/Documentation guidelines and tips.md rename to documentation/development/documentation-guidelines-and-tips.md diff --git a/documentation/development/extension-guidelines.md b/documentation/development/extension-guidelines.md index d8da6a3974..2d551c4278 100644 --- a/documentation/development/extension-guidelines.md +++ b/documentation/development/extension-guidelines.md @@ -33,7 +33,7 @@ order: 9 ``` cd extensions\build -cmake .. -G "Visual Studio 2014" +cmake .. -G "Visual Studio 14 2015" ``` A Visual studio project file will now be generated in your build directory. diff --git a/documentation/development/setting-up-the-development-environment.md b/documentation/development/setting-up-the-development-environment.md index 5264760785..e02760f96d 100644 --- a/documentation/development/setting-up-the-development-environment.md +++ b/documentation/development/setting-up-the-development-environment.md @@ -23,7 +23,7 @@ This page describes how you can setup your development environment for ACE3, all ## 2. Why so complicated? -If you have contributed to AGM you might be used to an easier build process, where there was even an .exe you could use for building. ACE3, however, makes use of CBA macros to simplify things and give the developer access to a better debug process, which requires a stricter build environment. Additionally, Mikero's tools are stricter and report more errors than AddonBuilder does. The structure of this development environment also allows for [file patching](#file-patching), which is very useful for debugging. +If you have contributed to AGM you might be used to an easier build process, where there was even an .exe you could use for building. ACE3, however, makes use of CBA macros to simplify things and give the developer access to a better debug process, which requires a stricter build environment. Additionally, Mikero's tools are stricter and report more errors than AddonBuilder does. The structure of this development environment also allows for [file patching](#7-file-patching), which is very useful for debugging. Not offering .exes for the Python scripts we use allows us to make easy changes without the hassle of compiling self-extracting exes all the time. diff --git a/documentation/feature/advanced_ballistics.md b/documentation/feature/advanced-ballistics.md similarity index 81% rename from documentation/feature/advanced_ballistics.md rename to documentation/feature/advanced-ballistics.md index 70123a0320..78ec99ef17 100644 --- a/documentation/feature/advanced_ballistics.md +++ b/documentation/feature/advanced-ballistics.md @@ -3,6 +3,7 @@ layout: wiki title: Advanced Ballistics description: The advanced ballistics module improves internal and external ballistics. group: feature +category: realism parent: wiki --- @@ -25,7 +26,7 @@ The Advanced Ballistics module improves internal and external ballistics. ## 2. Usage ### 2.1 Protractor -Press Ctrl+Shift+K while using a compatible weapon to toggle the protractor. The red line indicates the current inclination angle in degrees. The protractor will disappear if you lower or holster your weapon. +Press Ctrl+⇧ Shift+K while using a compatible weapon to toggle the protractor. The red line indicates the current inclination angle in degrees. The protractor will disappear if you lower or holster your weapon. ## 3. Dependencies `ace_ballistics`, `ace_weather`, `ace_modules` diff --git a/documentation/feature/ai.md b/documentation/feature/ai.md index afc6194644..15d770395d 100644 --- a/documentation/feature/ai.md +++ b/documentation/feature/ai.md @@ -3,7 +3,7 @@ layout: wiki title: AI (Artificial Intelligence) description: Config based changes to AI to ensure compatibility with advanced AI modifications group: feature -order: 5 +category: realism parent: wiki --- diff --git a/documentation/feature/aircraft.md b/documentation/feature/aircraft.md index 25f4e52cad..43753a8d25 100644 --- a/documentation/feature/aircraft.md +++ b/documentation/feature/aircraft.md @@ -3,7 +3,7 @@ layout: wiki title: Aircraft description: Aircraft overhaul group: feature -order: 5 +category: realism parent: wiki --- @@ -35,7 +35,7 @@ Adds a HUD to the AH-9 based on the Comanche's HUD. ## 2. Usage ### 2.1 Switching flare modes -Press CTRL+C to switch between flare firing modes (Arma 3 default key bind `countermeasure mode`) +Press Ctrl+C to switch between flare firing modes (Arma 3 default key bind `countermeasure mode`) ## 3. Dependencies diff --git a/documentation/feature/apl.md b/documentation/feature/apl.md index c526935143..3be2d6c243 100644 --- a/documentation/feature/apl.md +++ b/documentation/feature/apl.md @@ -3,6 +3,7 @@ layout: wiki title: APL description: assets under APL license group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/atragmx.md b/documentation/feature/atragmx.md index c7113f7cd2..c5ead1cf00 100644 --- a/documentation/feature/atragmx.md +++ b/documentation/feature/atragmx.md @@ -3,6 +3,7 @@ layout: wiki title: ATragMX description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/attach.md b/documentation/feature/attach.md index a248f8657f..6f291a99ad 100644 --- a/documentation/feature/attach.md +++ b/documentation/feature/attach.md @@ -3,6 +3,7 @@ layout: wiki title: Attach description: Allow players to attach items to vehicles or themselves group: feature +category: interaction parent: wiki --- @@ -17,14 +18,14 @@ Adds an attachable IR strobe, which is only visible using night vision devices a ## 2. Usage ### 2.1 Attaching to yourself -- Use Self Interact CTRL+⊞ Win (ACE3 default). +- Use Self Interact Ctrl+⊞ Win (ACE3 default). - Select `Equipment`. - Select `Attach item`. - Select which item you want to attach. - Repeat the process to detach. ### 2.2 Attaching to a vehicle -- Interact with the vehicle ⊞ Win (ACE3 default). +- Interact with the vehicle ⊞ Win (ACE3 default). - Select `Attach item`. - Select your item and follow the instructions on the screen. - Repeat the process to detach. diff --git a/documentation/feature/backpacks.md b/documentation/feature/backpacks.md index 426f39d18a..b86f801770 100644 --- a/documentation/feature/backpacks.md +++ b/documentation/feature/backpacks.md @@ -3,6 +3,7 @@ layout: wiki title: Backpacks description: Notifies a player when his backpack is opened group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/ballistics.md b/documentation/feature/ballistics.md index 1e453271fb..70552a8d25 100644 --- a/documentation/feature/ballistics.md +++ b/documentation/feature/ballistics.md @@ -3,7 +3,7 @@ layout: wiki title: Ballistics description: Realistic ballistic improvements group: feature -order: 5 +category: realism parent: wiki --- diff --git a/documentation/feature/captives.md b/documentation/feature/captives.md index 33b7ec3739..4cb495d810 100644 --- a/documentation/feature/captives.md +++ b/documentation/feature/captives.md @@ -3,6 +3,7 @@ layout: wiki title: Captives description: System for taking and handling captives group: feature +category: interaction parent: wiki --- @@ -31,7 +32,7 @@ Allows players to surrender. It renders the unit unable to move and with the han ### 2.2 Escorting a captive - Interact with the captive ⊞ win. - Select the `Escort prisoner` option. -- To stop escorting, use the mousewheel and select `Release` or use Self Interaction CTRL+⊞ win and select `Release`. +- To stop escorting, use the mousewheel and select `Release` or use Self Interaction Ctrl+⊞ win and select `Release`. ### 2.3 Loading and unloading a captive into/from a vehicle - Escort the captive. diff --git a/documentation/feature/common.md b/documentation/feature/common.md index 2929f6b335..7a7c25166e 100644 --- a/documentation/feature/common.md +++ b/documentation/feature/common.md @@ -3,6 +3,7 @@ layout: wiki title: Common description: Common functions and systems used by most other components. group: feature +category: general parent: wiki --- diff --git a/documentation/feature/concertina_wire.md b/documentation/feature/concertina-wire.md similarity index 69% rename from documentation/feature/concertina_wire.md rename to documentation/feature/concertina-wire.md index 0c0cdb3ab6..6e462438b9 100644 --- a/documentation/feature/concertina_wire.md +++ b/documentation/feature/concertina-wire.md @@ -1,19 +1,20 @@ --- layout: wiki -title: concertina wire +title: Concertina Wire description: group: feature +category: equipment parent: wiki --- ## 1. Overview -A concertina wire is a type of barbed wire formed in large coils that can be expanded to form obstacles, in ACE3 any vehicle making contact with it get it's tires destroyed. +A concertina wire is a type of barbed wire formed in large coils that can be expanded to form obstacles, in ACE3 any vehicle making contact with it gets its tires destroyed. ## 2. Usage ### 2.1 Deploying the concertina wire -- Approach the concertina coil and select ⊞ Win (ACE3 default) +- Approach the concertina coil and select ⊞ Win (ACE3 default) - Select `Deploy concertina wire`. - Follow the instructions on screen. diff --git a/documentation/feature/dagr.md b/documentation/feature/dagr.md index e4b350295c..24f80cf0cf 100644 --- a/documentation/feature/dagr.md +++ b/documentation/feature/dagr.md @@ -2,6 +2,7 @@ layout: wiki title: Dagr group: feature +category: equipment parent: wiki --- @@ -11,4 +12,4 @@ Adds the Defense Advanced GPS Receiver. ## 3. Dependencies -`ace_weather` \ No newline at end of file +`ace_weather` diff --git a/documentation/feature/difficulties.md b/documentation/feature/difficulties.md index bc48994e81..0bc6e7e6da 100644 --- a/documentation/feature/difficulties.md +++ b/documentation/feature/difficulties.md @@ -3,6 +3,7 @@ layout: wiki title: Difficulties description: Tweak to Vanilla hardest difficulty group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/disarming.md b/documentation/feature/disarming.md index 02b8dc2163..d7b043ab24 100644 --- a/documentation/feature/disarming.md +++ b/documentation/feature/disarming.md @@ -3,6 +3,7 @@ layout: wiki title: Disarming description: group: feature +category: interaction parent: wiki --- @@ -14,7 +15,7 @@ You can search the inventory and disarm captured or unconscious units. ## 2. Usage ### 2.1 Searching and disarming -- Interact with the captured or unconscious unit ⊞ Win (ACE3 default key bind `Interaction Key`). +- Interact with the captured or unconscious unit ⊞ Win (ACE3 default key bind `Interaction Key`). - Select `Open inventory`. - Drag & Drop the items you wish to remove from the unit. diff --git a/documentation/feature/disposable.md b/documentation/feature/disposable.md index c60ae729cf..16e7a5ca71 100644 --- a/documentation/feature/disposable.md +++ b/documentation/feature/disposable.md @@ -3,6 +3,7 @@ layout: wiki title: Disposable description: Makes NLAW disposable and allows addons to do the same group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/dragging.md b/documentation/feature/dragging.md index e3fdf0b6fe..a93089cf3b 100644 --- a/documentation/feature/dragging.md +++ b/documentation/feature/dragging.md @@ -3,6 +3,7 @@ layout: wiki title: Dragging description: Adds the option to drag and carry units and objects group: feature +category: interaction parent: wiki --- @@ -14,9 +15,9 @@ This adds the option to drag or carry units or objects. ### 2.1 Dragging / Carrying units and objects - You can only drag or carry an unconscious unit. -- Interact with the unit or object ⊞ Win (ACE3 default key bind `Interact Key`). +- Interact with the unit or object ⊞ Win (ACE3 default key bind `Interact Key`). - Select `Drag` or `Carry`. -- To release, use the mouse wheel and select `Release` or use Self Interaction CTRL+⊞ Win and select `Release`. +- To release, use the mouse wheel and select `Release` or use Self Interaction Ctrl+⊞ Win and select `Release`. ## 3. Dependencies diff --git a/documentation/feature/explosives.md b/documentation/feature/explosives.md index a88b9ae1b4..214ec7dcab 100644 --- a/documentation/feature/explosives.md +++ b/documentation/feature/explosives.md @@ -3,6 +3,7 @@ layout: wiki title: Explosives description: Adds numerous improvements to using and handling explosives group: feature +category: interaction parent: wiki --- @@ -20,18 +21,18 @@ Enables attaching explosives to vehicles. ## 2. Usage ### 2.1 Placing explosives -- Use self interaction CTRL+⊞ Win (ACE3 default key bind `Self Interaction Key`). +- Use self interaction Ctrl+⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Explosives`. - Choose your explosive type and follow the instructions on the screen. ### 2.2 Arming and detonating explosives -- Interact with the explosive ⊞ Win (ACE3 default key bind `Interact Key`). +- Interact with the explosive ⊞ Win (ACE3 default key bind `Interact Key`). - Choose the arming method. - For clackers use Self Interaction `Explosives` → `Detonate` and choose the corresponding Firing Device. ### 2.3 Defusing explosives - A `Defusal Kit` is required. -- Interact with the explosive ⊞ Win. +- Interact with the explosive ⊞ Win. - Select `Disarm`. - You are safe to pick it up after the action has completed. diff --git a/documentation/feature/fcs.md b/documentation/feature/fcs.md index b66cad8522..bf176179e5 100644 --- a/documentation/feature/fcs.md +++ b/documentation/feature/fcs.md @@ -2,6 +2,7 @@ layout: wiki title: FCS (Fire Control System) description: +category: equipment group: feature parent: wiki --- @@ -21,17 +22,15 @@ Anti air cannons can now use airburst ammunition. It will explode on the FCS' ze ### 2.1 Engaging moving targets - Place the crosshair on the enemy vehicle. -- Press and hold TAB (ACE 3 default key bind `Lock Target [Hold]`) and follow the target for about 2 seconds. -- Release TAB. +- Press and hold Tab ↹ (ACE 3 default key bind `Lock Target [Hold]`) and follow the target for about 2 seconds. +- Release Tab ↹. - The optic is now adjusted sideways to ensure a hit. ### 2.2 Ranging stationary targets - Place the crosshair on the object to range. -- Tap TAB +- Tap Tab ↹ - The optic is now adjusted. -*NOTE: GBU guidance is **DISABLED** as of ACE3 3.0.1* - ## 3. Dependencies `ace_interaction` diff --git a/documentation/feature/finger.md b/documentation/feature/finger.md new file mode 100644 index 0000000000..3943980a97 --- /dev/null +++ b/documentation/feature/finger.md @@ -0,0 +1,21 @@ +--- +layout: wiki +title: Finger +description: Finger pointing +group: feature +category: realism +parent: wiki +--- + +## 1. Overview +Allows players to point in a direction with their fingers, when they do so people around (4m by default) can see a big circle in the pointed direction. + + +## 2. Usage + +### 2.1 How to point things +- Press ⇧ Shift+` (QWERTY and AZERTY layouts) + +## 3. Dependencies + +`ace_common` diff --git a/documentation/feature/flashsuppressors.md b/documentation/feature/flashsuppressors.md index 82696fcc91..ba59dd0907 100644 --- a/documentation/feature/flashsuppressors.md +++ b/documentation/feature/flashsuppressors.md @@ -3,6 +3,7 @@ layout: wiki title: Flash Suppressors description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/fonts.md b/documentation/feature/fonts.md index bf40e5ed2d..198e3f8bd0 100644 --- a/documentation/feature/fonts.md +++ b/documentation/feature/fonts.md @@ -2,6 +2,7 @@ layout: wiki title: Fonts group: feature +category: general parent: wiki --- @@ -12,4 +13,4 @@ This module adds a font that will be used in the future, characters with equal w ## 3. Dependencies -`ace_main` \ No newline at end of file +`ace_main` diff --git a/documentation/feature/frag.md b/documentation/feature/frag.md index 949597aad2..406b6f65ad 100644 --- a/documentation/feature/frag.md +++ b/documentation/feature/frag.md @@ -3,6 +3,7 @@ layout: wiki title: Frag description: group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/gforces.md b/documentation/feature/gforces.md index fcc4758ee5..be58b966c1 100644 --- a/documentation/feature/gforces.md +++ b/documentation/feature/gforces.md @@ -3,6 +3,7 @@ layout: wiki title: G-Forces description: group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/goggles.md b/documentation/feature/goggles.md index 2e4dfce54d..945df87a3e 100644 --- a/documentation/feature/goggles.md +++ b/documentation/feature/goggles.md @@ -3,6 +3,7 @@ layout: wiki title: Goggles description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/grenades.md b/documentation/feature/grenades.md index fc6a8641f3..f5f4e101ce 100644 --- a/documentation/feature/grenades.md +++ b/documentation/feature/grenades.md @@ -3,6 +3,7 @@ layout: wiki title: Grenades description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/hearing.md b/documentation/feature/hearing.md index 5389f0c3d5..f935a6286c 100644 --- a/documentation/feature/hearing.md +++ b/documentation/feature/hearing.md @@ -3,6 +3,7 @@ layout: wiki title: Hearing description: group: feature +category: realism parent: wiki --- @@ -11,15 +12,18 @@ parent: wiki ### 1.1 Hearing damage simulation Introduces hearing damage caused by nearby explosions and large-caliber weapons. -### 1.2 Earplugs +### 1.2 Earplugs Adds earplugs to mitigate that effect. Soldiers with high caliber weapons or missile launchers will be equipped with those, but remember to put them in. +### 1.3 Helmets +Some types of helmets can mitigate hearing damage also (ie. crewman helmet, pilot helmet etc.). + ## 2. Usage ### 2.1 Equipping earplugs - For this you need the `Earplugs` item. -- Press the self interaction key CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). +- Press the self interaction key Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Equipment`. - Select `Earplugs in`. - Same method to remove them but the option is `Earplugs out`. @@ -27,4 +31,4 @@ missile launchers will be equipped with those, but remember to put them in. ## 3. Dependencies -`ace_interaction` \ No newline at end of file +`ace_interaction` diff --git a/documentation/feature/hitreactions.md b/documentation/feature/hitreactions.md index 919c09e9f6..002cd2b7c6 100644 --- a/documentation/feature/hitreactions.md +++ b/documentation/feature/hitreactions.md @@ -3,6 +3,7 @@ layout: wiki title: Hit Reactions description: group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/huntIR.md b/documentation/feature/huntIR.md index e4e690dac3..bd4841c184 100644 --- a/documentation/feature/huntIR.md +++ b/documentation/feature/huntIR.md @@ -2,6 +2,7 @@ layout: wiki title: HuntIR group: feature +category: equipment parent: wiki --- @@ -17,10 +18,10 @@ NOTE: the HuntIR round doesn't work with modded weapons without a compatibility - To be able to connect to the IR CMOS camera you'll need a `HuntIR monitor`. - Fire the HuntIR round as high as possible over the area you want to observe. - Open the `HuntIR monitor`. - - To open the `HuntIR monitor` self interact CTRL + ⊞ Win (ACE3 default) + - To open the `HuntIR monitor` self interact Ctrl + ⊞ Win (ACE3 default) - Select `Equipment`. - Select `Activate HuntIR monitor`. -- You now have control of the IR CMOS camera to close the monitor press ESC or ⊞ Win +- You now have control of the IR CMOS camera to close the monitor press ESC or ⊞ Win ### 2.2 IR CMOS camera controls @@ -39,4 +40,4 @@ Shortcut | Action ## 3. Dependencies -`ace_common` \ No newline at end of file +`ace_common` diff --git a/documentation/feature/interact_menu.md b/documentation/feature/interact-menu.md similarity index 92% rename from documentation/feature/interact_menu.md rename to documentation/feature/interact-menu.md index d0635ae7ef..96364c522b 100644 --- a/documentation/feature/interact_menu.md +++ b/documentation/feature/interact-menu.md @@ -3,6 +3,7 @@ layout: wiki title: Interact Menu description: group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/interaction.md b/documentation/feature/interaction.md index e4e28f23c9..3916afede2 100644 --- a/documentation/feature/interaction.md +++ b/documentation/feature/interaction.md @@ -1,16 +1,45 @@ --- layout: wiki title: Interaction -description: +description: group: feature +category: interaction parent: wiki --- ## 1. Overview -This provides interaction options between units. +This provides interaction options between units, vehicles, buildings and objects. +Some of the zeus actions are also available (while in zeus) in the interaction menu (remote control, group management). -## 2. Dependencies +## 2. Usage + +### 2.1 Opening the self interaction menu +- Press and hold Ctrl + ⊞ Win (ACE3 default). + +### 2.2 Opening the interaction menu +- Press and hold ⊞ Win (ACE3 default). + +### 2.3 Using the zeus interactions +- Units + - Select the unit(s). + - Open the interaction menu. + - Select `Units`. + - Select the stance (works for multiple units) or remote control. + +- Groups + - Select a group by clicking on the icon hovering above it's squad leader, to select multiple squads press and hold Ctrl. + - Open the interaction menu. + - Select `Groups`. + - From here you can select the speed / formation / behavior of all the units of the group(s). + +- Waypoints + - Select a waypoint by clicking on it, same as above press and hold Ctrl to select multiple. + - Open the interaction menu. + - Select `Waypoints`. + - From here you can modify the speed / formation / behavior of the units / groups that are moving to that waypoint. + +## 3. Dependencies `ace_interact_menu` diff --git a/documentation/feature/inventory.md b/documentation/feature/inventory.md index 53f126dc2a..f4d4dcfd2b 100644 --- a/documentation/feature/inventory.md +++ b/documentation/feature/inventory.md @@ -3,6 +3,7 @@ layout: wiki title: Inventory description: group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/javelin.md b/documentation/feature/javelin.md index 8cf59c0a08..baa1549e7e 100644 --- a/documentation/feature/javelin.md +++ b/documentation/feature/javelin.md @@ -3,6 +3,7 @@ layout: wiki title: Javelin description: group: feature +category: equipment parent: wiki --- @@ -20,12 +21,12 @@ The Titan / Javelin now posses the ability to be used in top down attack or dire - For this feature you need to have a compatible launcher. - Fully zoom in with the launcher. - Switch to thermals N (Arma 3 default key bind `Night vision`). -- While keeping your aim steadily on target press and hold TAB (ACE3 default key bind `Lock Target [Hold]`). +- While keeping your aim steadily on target press and hold Tab ↹ (ACE3 default key bind `Lock Target [Hold]`). - When the sound changes and a cross appears on the screen the target is locked and you're able to fire. ### 2.2 Switching fire mode - For this feature you need to have a compatible launcher. -- When aiming with your launcher press CTRL + TAB. +- When aiming with your launcher press Ctrl + Tab ↹. - On the right side of the screen (for most launchers) you should see that `TOP`is now illumiated in green which means that your missile will be fired in top down mode. ## 3. Dependencies diff --git a/documentation/feature/kestrel4500.md b/documentation/feature/kestrel4500.md index f859ed4cd8..3769385c5e 100644 --- a/documentation/feature/kestrel4500.md +++ b/documentation/feature/kestrel4500.md @@ -3,6 +3,7 @@ layout: wiki title: Kestrel 4500 description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/laser_selfdesignate.md b/documentation/feature/laser-selfdesignate.md similarity index 93% rename from documentation/feature/laser_selfdesignate.md rename to documentation/feature/laser-selfdesignate.md index dd3b25bc36..cdc35914c5 100644 --- a/documentation/feature/laser_selfdesignate.md +++ b/documentation/feature/laser-selfdesignate.md @@ -3,6 +3,7 @@ layout: wiki title: Laser Self-Designate description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/laser.md b/documentation/feature/laser.md index 78ab448e8c..27718d6d61 100644 --- a/documentation/feature/laser.md +++ b/documentation/feature/laser.md @@ -3,6 +3,7 @@ layout: wiki title: Laser description: group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/laserpointer.md b/documentation/feature/laserpointer.md index d6f38df99f..1e962919c9 100644 --- a/documentation/feature/laserpointer.md +++ b/documentation/feature/laserpointer.md @@ -3,6 +3,7 @@ layout: wiki title: Laser Pointer description: Switching laser modes, daylight lasers group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/logistics_uavbattery.md b/documentation/feature/logistics-uavbattery.md similarity index 80% rename from documentation/feature/logistics_uavbattery.md rename to documentation/feature/logistics-uavbattery.md index 2920d4b7a4..af57c4b2a2 100644 --- a/documentation/feature/logistics_uavbattery.md +++ b/documentation/feature/logistics-uavbattery.md @@ -3,6 +3,7 @@ layout: wiki title: Logistics - UAV Battery description: UAV recharging group: feature +category: equipment parent: wiki --- @@ -15,7 +16,7 @@ Adds an item `ACE_UAVBattery` that allows refuelling / recharging of the "Darter ### 2.1 Recharging the darter - For this you need a `UAV battery` and the UAV needs to be a quad-copter. -- Interact with the UAV ⊞ Win (ACE3 default key bind `Interact Key`) +- Interact with the UAV ⊞ Win (ACE3 default key bind `Interact Key`) - Select `Recharge` ## 3. Dependencies diff --git a/documentation/feature/logistics_wirecutter.md b/documentation/feature/logistics-wirecutter.md similarity index 79% rename from documentation/feature/logistics_wirecutter.md rename to documentation/feature/logistics-wirecutter.md index 077e3b48cb..9e180c9b62 100644 --- a/documentation/feature/logistics_wirecutter.md +++ b/documentation/feature/logistics-wirecutter.md @@ -3,6 +3,7 @@ layout: wiki title: Logistics - Wirecutter description: group: feature +category: equipment parent: wiki --- @@ -16,7 +17,7 @@ Adds an item `ACE_wirecutter` that allows cutting of fences in Arma 3 and AllInA ### 2.1 Using the wirecutter - For this you need a `Wirecutter`. - Approach the fence you want to cut. -- Press the interaction key ⊞ Win (ACE3 default key bind `Interaction Key`). +- Press the interaction key ⊞ Win (ACE3 default key bind `Interaction Key`). - Find the interaction point and select `Cut Fence` (the only option). ## 3. Dependencies diff --git a/documentation/feature/magazinerepack.md b/documentation/feature/magazinerepack.md index 191f12d2b7..870281693c 100644 --- a/documentation/feature/magazinerepack.md +++ b/documentation/feature/magazinerepack.md @@ -3,6 +3,7 @@ layout: wiki title: Magazine Repack description: Repacking magazines, and maybe your bananas. group: feature +category: realism parent: wiki --- @@ -15,7 +16,7 @@ Adds the ability to repack magazines of the same type. ### 2.1 Repacking - For this you need multiple half empty mags of the same type. -- Press the self interaction button CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). +- Press the self interaction button Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Repack magazines`. - Select the type of magazines you want to repack. diff --git a/documentation/feature/main.md b/documentation/feature/main.md index a745f01e3b..668cfb531f 100644 --- a/documentation/feature/main.md +++ b/documentation/feature/main.md @@ -3,6 +3,7 @@ layout: wiki title: Main description: main module group: feature +category: general parent: wiki --- diff --git a/documentation/feature/map.md b/documentation/feature/map.md index 2feafa9350..9e45c5a359 100644 --- a/documentation/feature/map.md +++ b/documentation/feature/map.md @@ -3,6 +3,7 @@ layout: wiki title: Map description: Map improvements group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/maptools.md b/documentation/feature/maptools.md index a67412343f..0e99b9feef 100644 --- a/documentation/feature/maptools.md +++ b/documentation/feature/maptools.md @@ -3,6 +3,7 @@ layout: wiki title: Map Tools description: Map tools, a roamer and pens group: feature +category: equipment parent: wiki --- @@ -22,10 +23,10 @@ If you are equipped with a vanilla GPS it will be shown on the map. (You don't n ### 2.1 Using map tools - For this you need to have `Map Tools`. - Open the map M (Arma 3 default key bind `Map`). -- Press the self interaction key CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). +- Press the self interaction key Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Map tools`. - Select the type of tools you want to use. -- Note that you can drag the Roamer (map tool) around with LMB and rotate it with CTRL + LMB. +- Note that you can drag the Roamer (map tool) around with LMB and rotate it with Ctrl + LMB. ### 2.2 Drawing lines - To draw lines `Map Tools` are not required. diff --git a/documentation/feature/markers.md b/documentation/feature/markers.md index 84f133760c..73560dd99f 100644 --- a/documentation/feature/markers.md +++ b/documentation/feature/markers.md @@ -3,6 +3,7 @@ layout: wiki title: Markers description: improved markers group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/medical-system.md b/documentation/feature/medical-system.md index b77c1c8bba..4bc0ae1557 100644 --- a/documentation/feature/medical-system.md +++ b/documentation/feature/medical-system.md @@ -4,240 +4,289 @@ title: Medical System description: ACE provide users with a more realistic medical system and comes in both a basic and advanced version. Both versions have overlap but each have their own unique characteristics. group: feature order: 4 +category: realism parent: wiki --- +**Disclaimer:** The documentation for the medical system being extremely long it's highly advised to use the table of contents at the top right corner of the page. ## 1. Overview -ACE provide users with a more realistic medical system and comes in both a basic and advanced version. This page will detail the differences between both systems and what they do. It is split into two parts; basic and advanced. Both versions have overlap but each have their own unique characteristics. +ACE3 provides users with a more realistic medical system and comes in both a basic and an advanced version. This page will detail the differences between both systems and what they do as well as how to use them efficiently. +### 1.1 Basic medical +ACE3's basic medical system is quite a bit more complex than Arma 3's default system, but not really difficult to grasp. ACE3 basic medical is a mixture between the ACE2 and AGM medical systems. +All interactions in the medical system are done with the interaction menu. Non-medics can - by default - not perform all actions (Epinephrine and IVs) and their actions take more time as when performed by trained medics. -## 2. Basic Medical -ACE's basic medical system is quite a bit more complex than Arma's default system, but not really difficult to grasp. ACE basic medical is a mixture between the ACE2 and AGM medical systems. +### 1.2 Revive system +The revive system lets you bring downed units back up. +Upon receiving a deadly amount of damage a unit will fall unconscious for a determined amount of time. In that time a medic will need to treat them and give them epinephrine to bring them back up. -The four main elements that basic medical introduces are: +### 1.3 Advanced medical -* damage divided into different zones (head, body, left & right arm, left & right leg) -* bleeding -* unconsciousness -* pain - -All interactions in the medical system are done with the interaction menu. Non-medics can - by default - not perform all actions, and their actions take more time as when performed by trained medics. These actions are using epinephrine and blood IVs. - - -### 2.1 How it works - -When hit, units start to lose blood depending on the severity of their wounds. Once the level of blood falls below a certain threshold, the unit will fall unconscious and eventually die. Units will also fall unconscious when sustaining large amounts of damage at once. - -To stop the bleeding, the combat life saver needs to bandage every wounded limb. Unconscious units can be "woken up" with Epipens. Should a unit have lost a lot of blood, it might be necessary to replace the lost blood with a blood bag before being able to wake unconscious units up. - -Should a unit be in pain, materializing itself with a chromatic aberration screen effect, he can be given morphine. - -### 2.2 Basic medical system - recommended gear -* Soldier: - * 10 x Bandage (basic) - -* Medic: - * 15-25 x Bandage (basic) - * 6 x Blood IV (500ml) - * 10 x Morphine Autoinjector - * 10 x Epinephrine Autoinjector - -## 3. Advanced Medical -The advanced medical system provides a more complex and detailed medical simulation and is based off the CSE/CMS medical system. It focuses on a more realistic model for injuries and treatment, thus resulting in a more important and prominent role for combat medics, and a bigger incentive to not get shot. +The advanced medical system provides a more complex and detailed medical simulation and is based off the CSE CMS. It focuses on a more realistic model for injuries and treatments, thus resulting in a more important and prominent role for combat medics, and a bigger incentive to avoid getting shot. The system behind advanced medical is designed to attempt to mimic important parts of the human body, as well as react to any injuries sustained and treatments applied in a realistic manner. The available treatments and supplies in advanced medical are based off the Tactical Combat Casualty Care (TCCC) guidelines, which are the same guidelines used by real-life combat medics around the world. Besides the 4 elements introduced by basic medical, advanced introduces the following: -* More detailed wound system -* Accurate blood loss based upon sustained injuries -* Vitals, including heart rate and blood pressure -* Cardiac Arrest -* Various treatment methods such as CPR, different kinds of IVs and tourniquets -* A basic medication simulation +- More detailed wound system. +- Accurate blood loss based upon sustained injuries. +- Vitals, including heart rate and blood pressure. +- Cardiac Arrest. +- Various treatment methods such as CPR, different kinds of IVs and a working tourniquet. +- A basic medication simulation. + +## 2. Usage -### 3.1 How it works +### 2.1 Basic -Same as with basic, when hit an injury is sustained. Different though is that the type of injury and the severity of it are based upon how the damage was done and what caused it. This affects both blood loss and immediate consequences, such as being knocked out or being killed right away. When a player has sustained an injury, this will be indicated by flashing red of the screen; this means the player is bleeding. +When hit, units start to lose blood depending on the severity of their wounds. Once the level of blood falls below a certain threshold, the unit will fall unconscious and eventually die. Units will also fall unconscious when sustaining large amounts of damage at once or from high amounts of pain. -#### 3.1.1 Stopping bleeding -In order to stop the bleeding, all injuries on every bodypart requires treatment. This is done by either applying a tourniquet to legs or arms as a temporarly solution, or by using bandages to stop the bleeding as a more permament fix. +#### 2.1.1 Wounds, bandages and medications -#### 3.1.2 Vitals -While a unit is bleeding however, the blood volume decreases which will result in a change of vitals. Depending on the factors such as current blood volume, the blood loss rate, medication used, the blood pressure will start to drop. To counter this drop, also based upon the previously mentioned factors and others, the heart rate will adjust accordingly to attempt to keep blood pressure at safe levels. This means that for any patient it is required to keep an eye on the vitals. This is done through the interaction system by selecting check pulse or blood pressure on either the arms or head. -#### 3.1.3 Medication -To stabilize the vitals and to counter for example pain, a player/medic can use medication. Advanced medical has 3 different medications available: +##### 2.1.1.1 Wounds -* Atropine -* Morphine -* Epinephrine +It's pretty straightforward compared to advanced, you only have two types of wounds. -Atropine is a vagolytic and anticholinergic drug which in low dosages reduces heart rate but in high dosages increases it, countering effects of organophosphate poisoning (in NBC scenarios; anticholinesterase poisoning) and symptomatic bradycardia (in post-ROSC care and resuscitative medicine). +- Yellow: you need one bandage to heal it. +- Red: you need two bandages to heal it. -Morphine is used to alleviate large amounts of pain. Has an effect similar to Heroin due to its opiate properties. Must only ever be given once, and only when bleeding has been reduced to a minimum. Morphine must never be given to a casualty with a low heart rate, as it can stop the heart. It's effect lasts up to 15 minutes. +##### 2.1.1.2 Bandages -Epinephrine is used to increase heart rate and blood pressure and alleviate unconsciousness. Epinephrine is a synthetic form of Adrenaline, which is naturally produced in the body. It can also be applied to counter-act the effects of Atropine. Be careful though, as it may only be given once. +- All of them have the same effect. -_Epinephrine must never be given to a casualty with a high heart rate or blood pressure._ +##### 2.1.1.3 Tourniquet -#### 3.1.4 Types of wounds -Advanced medical system brings more different types of wounds, each with its own effects on patient. We distinguish minor, medium and large wound sizes. Below there is a list of those wounds: +- Serves no use in basic -* Abrasions (or scrapes) - * Also called scrapes, they occur when the skin is rubbed away by friction against another rough surface (e.g. rope burns and skinned knees). - * Sources: falling, ropeburn, vehicle crashes. - * Effects: pain - extremely light, bleeding - extremely slowly +##### 2.1.1.4 IVs -* Avulsions - * Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions. - * Sources: explosions, vehicle crashes, grenades, artillery shells, bullets, backblast, bites. - * Effects: pain - extremely high, bleeding - extremely fast (depends on wound size). +IV | Effect +---------- | ---------- | +Saline | Serves no use in basic +Plasma | Serves no use in basic +Blood | Restores the blood of the patient -* Contusions - * Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions. - * Sources: bullets, backblast, punches, vehicle crashes, falling. - * Effects: pain - light, no bleeding. +Use the appropriate amount depending on the situation (low / heavy loss of blood) (250, 500 or 1 000 mL) -* Crush wounds - * Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures. - * Sources: falling, vehicle crashes, punches. - * Effects: pain - light, bleeding - extremely slowly. -* Cut wounds - * Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision. - * Sources: vehicle crashes, grenades, explosions, artillery shells, backblast, stabs - * Effects: pain - light, bleeding - speed depends on lenght and size of the woundę. +##### 2.1.1.5 Autoinjectors -* Lacerations - * Also called tears, these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source as in childbirth, or from an external source like a punch. - * Sources: vehicle crashes, punches - * Effects: pain - light, bleeding - slow to medium speed (depends on wound size). +Autoinjector | Effect +---------- | ---------- | +Morphine | Removes pain +Epinephrine | Wakes up the patient +Atropine | Serves no use in basic -* Velocity wounds - * They are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel. - * Sources: bullets, grenades, explosions, artillery shells. - * Effects: pain - extremely high, bleeding - medium speed (depends on wound size). +#### 2.1.2 Treating the patient -* Puncture wounds - * Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass. - * Sources: stabs, grenades. - * Effects: pain - light, bleeding - slowly. +- **Step 1:** Is the patient responsive? + - **Yes:** Ask him if he has wounds / he is in pain. + - **No:** Go to step 2. + + +- **Step 2:** Is the patient wounded? + - **Yes:** Treat the wounds and go to step 3. + - **No:** Skip this step. -We also distinguish different types of fractures (WIP/not implemented yet): -* Broken femur - * Description - * Sources: bullets, vehicle crashes, backblast, explosions, artillery shells, grenades. - * Effects: pain - extremely high, unable to stand until healed by medic. + +- **Step 3:** Is the patient in pain? + - **Yes:** Give him morphine. + - **No:** Skip this step. + -#### 3.1.5 Bandage types -Advanced medical system brings 4 different types of bandages and also properly working tourniquet. Below there is a list of all bandage types with effectiveness vs different wound types. Higher effectiveness bandages needs to be applied fewer times than ones with lower effectiveness. That depends on wound size. Applying bad type of bandage on given wound can yield wound opening after a while if not stiched fast enough. -All bandage types weights about 50 grams each. +- **Step 4:** Did the patient lose blood? + - **Yes:** Give blood via IV. + - **No:** Go to step 5. + - **No and patient responsive:** You're done. -* Bandage (basic) - * Abrasions - highest effectiveness - * Avulsions - lowest effectiveness - * Contusions - highest effectiveness - * Crush wounds - low effectiveness - * Cut wounds - very low effectiveness - * Lacerations - medium effectiveness - * Velocity wounds - lowest effectiveness - * Puncture wounds - low effectiveness -* Bandage (packing) - * Abrasions - highest effectiveness - * Avulsions - highest effectiveness - * Contusions - highest effectiveness - * Crush wounds - low effectiveness - * Cut wounds - lowest effectiveness - * Lacerations - lowest effectiveness - * Velocity wounds - highest effectiveness - * Puncture wounds - lowest effectiveness +- **Step 5** + - If at this point the patient is still not back on its feet it's time to use an epinephrine autoinjector. -* Bandage (elastic) - * Abrasions - highest effectiveness - * Avulsions - lowest effectiveness - * Contusions - highest effectiveness - * Crush wounds - highest effectiveness - * Cut wounds - highest effectiveness - * Lacerations - highest effectiveness - * Velocity wounds - low effectiveness - * Puncture wounds - high effectiveness +#### 2.1.3 Additional informations -* QuikClot - * Abrasions - medium effectiveness - * Avulsions - high effectiveness - * Contusions - medium effectiveness - * Crush wounds - medium effectiveness - * Cut wounds - medium effectiveness - * Lacerations - medium effectiveness - * Velocity wounds - high effectiveness - * Puncture wounds - high effectiveness +- If the revive system is in place your character will not die until the revive timer is at 0. Even if a tank shoots your ass off an epinephrine shot will bring you back up after your wounds are treated. (The timer is invisible and may vary from mission to mission, it also depends on the amount of lives remaining you have.) +- You can't do an overdose in basic. -* Tourniquet - * Can only be applied on limbs - * Stops bleeding from wounds - * Should be taken off as fast as possible and applied only to give medic time to bandage all the wounds - * If not taken off for a while it will cause pain to patient, can cause death that way +### 2.2 Advanced -#### 3.1.6 Transfuzions -In case of blood loss, blood could be replenished by three different types of IV: blood, plasma and saline. We distinguish 3 different sizes of IV bags: 250ml, 500ml and 1000ml. -Transfuzing 250ml of given IV takes about 1 minute to complete! +Same as with basic, when hit an injury is sustained. Different though is that the type of injury and the severity of it are based upon how the damage was done and what caused it. This affects both blood loss and immediate consequences, such as being knocked out or being killed right away. When a player has sustained an injury, this will be indicated by flashing red on the screen; this means the player is bleeding. -+#### 3.1.7 PAK and Surgical kit -Using Personal Aid Kit brings patient to the best possible health state. Depending on module options, PAK can be used only in specified situations, specified place and by specified person. -Surgical kit is used to stich bandaged wounds so they will never open again. Depending on module options, surgical kit can be used only in specified situations, specified place and by specified person. +#### 2.2.1 Wounds, bandages and medications -### 3.2 Advanced medical system - recommended gear + +##### 2.2.1.1 Abrasions (or scrapes) + +- They occur when the skin is rubbed away by friction against another rough surface (e.g. rope burns and skinned knees). +- Sources: falling, rope burn, vehicle crashes. +- Effects: pain - extremely light, bleeding - extremely slowly. + +##### 2.2.1.2 Avulsions + +- Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions. +- Sources: explosions, vehicle crashes, grenades, artillery shells, bullets, backblast, bites. +- Effects: pain - extremely high, bleeding - extremely fast (depends on wound size). + +##### 2.2.1.3 Contusions + +- Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions. +- Sources: bullets, backblast, punches, vehicle crashes, falling. +- Effects: pain - light, no bleeding. + +##### 2.2.1.4 Crush wounds + +- Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures. +- Sources: falling, vehicle crashes, punches. +- Effects: pain - light, bleeding - extremely slowly. + +##### 2.2.1.5 Cut wounds** + +- Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision. +- Sources: vehicle crashes, grenades, explosions, artillery shells, backblast, stabs. +- Effects: pain - light, bleeding - speed depends on length and size of the wound. + + +##### 2.2.1.6 Lacerations (tears) + +- these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source or from an external source like a punch. +- Sources: vehicle crashes, punches. +- Effects: pain - light, bleeding - slow to medium speed (depends on wound size). + +##### 2.2.1.7 Velocity wound + +- They are caused by an object entering the body at a high speed, typically a bullet or small pieces of shrapnel. +- Sources: bullets, grenades, explosions, artillery shells. +- Effects: pain - extremely high, bleeding - medium speed (depends on wound size). + + +##### 2.2.1.8 Puncture wounds + +- Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass. +- Sources: stabs, grenades. +- Effects: pain - light, bleeding - slowly. + +In order to stop the bleeding, all bleeding injuries on every body part requires treatment. This is done by either applying a tourniquet to legs or arms as a temporary solution, or by using bandages to stop the bleeding as a more permanent fix. + + +##### 2.2.1.9 Bandages effectiveness + +Bandage | Abrasions | Avulsions | Contusions | Crush wounds | Cut wounds | Lacerations | Velocity wounds | Puncture wounds| +---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ------- | +Basic | `highest` | lowest | `highest` | low | very low | medium | lowest | low +Bandage (packing) | `highest` | `highest` | `highest` | low | lowest | lowest | `highest` | lowest +Bandage (elastic) | `highest` | lowest | `highest` | `highest` | `highest` | `highest` | low | high +QuikClot | medium | high | medium | medium | medium | medium | high | high + +##### 2.2.1.10 Tourniquet + +- Can only be applied on limbs. +- Stops bleeding from wounds. +- Should be taken off as fast as possible and applied only to give medic time to bandage all the wounds. +- If not taken off for a while it will cause pain to the patient. + +##### 2.2.1.11 IVs + +IV | Effect +---------- | ---------- | +Saline plasma and blood | All three restore the volume of liquid in the blood stream. as a result blood pressure is raised for all of them. + +Use the appropriate amount depending on the situation (heavy loss of blood, blood pressure too low) (250, 500 or 1 000 mL) + +##### 2.2.1.12 Autoinjectors + +Autoinjector | Effect +---------- | ---------- | +Morphine | lower the blood pressure and heart rate of the patient, also suppress pain +Epinephrine | raise the heart rate of the patient +Atropine | lower the heart rate of the patient + +##### 2.2.1.13 Surgical kit + +- Is only useful when advanced wounds (reopening) is enabled. +- Stitch a wound to stop it from reopening. +- It's use may be limited to a certain class and / or near a vehicle / facility. +- It's use can also be limited according to the condition of the patient, you might need to stabilize him first before using it. + +##### 2.2.1.14 PAK + +- Used to fully heal someone. (Removes any injury, restore vitals to a stable state and reset the medical history, clears all medication in the system.) +- It's use may be limited to a certain class and / or near a vehicle / facility. +- It's use can also be limited according to the condition of the patient, you might need to stabilize him first before using it. + +#### 2.2.2 Vitals + +##### 2.2.2.1 Blood pressure + + NOTE:the `systolic` blood pressure is the number on the left, the `diastolic` blood pressure is the number on the right. + +- Blood pressure is affected by the amount of blood lost as well as IVs and medication. + - **Non existent:** 0 - 20 `systolic`. + - **Low:** 20 - 100 `systolic`. + - **Normal:** 100 - 160 `systolic`. + - **High:** 160 and above `systolic`. + +##### 2.2.2.2 Heart rate + +- The heart rate (pulse) is affected by the amount of blood lost and medications. + - **Low:** 45 and below + - **Normal:** between 46 and 119 + - **High:** 120 and above -* Soldier: - * 4 x Bandage (basic) - * 3 x Bandage (elastic) - * 3 x Bandage (packing) - * 3 x QuikClot - * 1 x Morphine Autoinjector - * 1 x Tourniquet -* Combat First Responder (CFR): - * 10-15 x Bandage (basic) - * 15-20 x Bandage (elastic) - * 5-8 x Bandage (packing) - * 10-15 x QuikClot - * 3 x Tourniquet - * 4 x Saline IV (500ml) - * 5 x Morphine Autoinjector - * 5 x Epinephrine Autoinjector - * 8 x Atropine Autoinjector +##### 2.2.2.3 Cardiac arrest -* Medic: - * 10-15 x Bandage (basic) - * 15-20 x Bandage (elastic) - * 8 x Bandage (packing) - * 10-15 x QuikClot - * 5 x Tourniquet - * 6 x Saline IV (500ml) - * 8 x Morphine Autoinjector - * 8 x Epinephrine Autoinjector - * 12 x Atropine Autoinjector - * 1-3 x *Surgical kit* - * 1-3 x *Personal Aid Kit* +- A patient will enter cardiac arrest when:
+ - The heart rate is below 20. + - The heart rate is above 200. + - The systolic blood pressure is above 260. + - The diastolic blood pressure is below 40 and the heart rate is above 190. + - The systolic blood pressure is above 145 and the heart rate is above 150. -* Paramedic: - * 10-15 x Bandage (basic) - * 15-20 x Bandage (elastic) - * 8 x Bandage (packing) - * 10-15 x QuikClot - * 5 x Tourniquet - * 2 x Saline IV (500ml) - * 3 x Blood IV (1000ml) - Taken from vehicle inventory only when needed - * 3 x Plasma IV (1000ml) - Taken from vehicle inventory only when needed - * 8 x Morphine Autoinjector - * 8 x Epinephrine Autoinjector - * 12 x Atropine Autoinjector - * 1-3 x *Surgical kit* - * 1-3 x *Personal Aid Kit* -*medical item* - number of items that should be carried depends on module settings +#### 2.2.3 Treating the patient +This is a step by step guide, follow the steps from 1 to 6 in order unless stated otherwise. -## Dependencies -`ace_interaction`, `ace_modules`, `ace_apl` + +- **Step 1:** Is the patient responsive? + - **Yes:** Ask him if he has wounds / he is in pain and act accordingly. + - **No:** Go to step 2. + + +- **Step 2:** Does the patient have a pulse? + - **Yes:** Go to step 3. + - **No:** If you are alone provide CPR, if you have someone else get him to do CPR while you treat the patient's wounds. skip to step 3 or 4 depending on the situation. + + +- **Step 3:** Is the patient wounded? + - **Yes**: Treat the wounds. + - **No:** Skip this step. + + +- **Step 4:** Did the patient lose blood? + - **Yes:** Use IVs to restore the volume of liquid in the blood stream of the patient. + - **No:** Skip this step. + + +- **Step 5:** Is the patient in pain? + - **Yes and stable pulse:** Give him morphine. + - **Yes and unstable heart rate:** Stabilize the heart rate before administrating morphine. + - **No:** You're done. + + +- **Step 6:** is the patient awake now? + - **Yes:** You're done. + - **No:** Stabilize his pulse / make sure he isn't in pain or missing blood. + +Note that keeping the patient's vitals stable is very important while treating him. + +#### 2.2.4 Additional informations + +- As an infantryman you can use a tourniquet to stop a limb from bleeding, note that this is supposed to be a temporary solution and leaving the tourniquet more than 5 minutes will induce pain. +- Epinephrine should **NEVER** be used in case of cardiac arrest, it will only make the patient harder to treat afterwards or might outright kill him (remember epinephrine raises the blood pressure, a blood pressure too high is deadly). +- Pain is only suppressed and not removed by default. +- You don't have to take epinephrine after you take morphine, just wait until your pulse stabilizes by itself (Provided that you are in a stable condition). +- Giving too much morphine to a patient (more than one every 10 minutes) will put him in cardiac arrest because of a blood pressure / heart rate too low. + +## 3. Dependencies +`ace_interaction`, `ace_modules`, `ace_apl` \ No newline at end of file diff --git a/documentation/feature/microdagr.md b/documentation/feature/microdagr.md index 3ff9562293..a7172031f6 100644 --- a/documentation/feature/microdagr.md +++ b/documentation/feature/microdagr.md @@ -1,26 +1,149 @@ --- layout: wiki title: MicroDAGR -description: +description: A GPS device and much more group: feature +category: equipment parent: wiki --- -## Overview +For an easier time reading don't forget that you can view all chapters on the right side of the page by clicking on Show/hide under table of content. -### Sub-feature 1 -Short description of sub-feature 1. +## 1. Overview -### Sub-feature 2 -Short description of sub-feature 2. +"Military operations rely on the position, +navigation and timing (PNT) data that GPS +can provide. In combat, the accuracy of +PNT data can mean the difference between +life and death. Non-military GPS receivers +simply aren’t good enough when lives are +on the line" (Extracted from the real life manual) + +that's where the MicroDAGR comes in, here's a list of it's features (in arma 3) : + +- Compass and headings. +- Date and hour synced to the mission. +- Elevation (above or below sea level) +- Current speed. +- GPS with topographic and satellite view. +- Creating, naming, deleting waypoints. +- Friendly identification (BLUFOR tracker need to be on) +- The MicroDAGR is also able to connect to your vector to retrieve data from it. + +## 2. Usage + +Please note that the numbers in 2.1 are going to be referred to as `1` `2` etc when explaining how to use the MicroDAGR + +### 2.1 Bringing the MicroDAGR + +- Self interact Ctrl+⊞ Win. +- Select `Equipment`. +- Select `configure MicroDAGR`. + +### 2.2 The MicroDAGR interface + + + +number | function | +------ | ----------------------------------------------------- | +`1` | Options menu and hour display. +`2` | Grid position `e` is west to east `n` is south to north. +`3` | Elevation above sea level in meters. +`4` & `11` | Compass heading. +`5` & `10` | Current speed. +`6` | Date (mission). +`7` | Main menu button. +`8` | Compass menu button. +`9` | Map menu button. +`12` | Compass +`13` | Player heading (your eyes). +`14` | Center the map on your position. +`15` | Map zoom. +`16` | Map dezoom +`17` | Your position. +`18` | Waypoint creation menu +`19` | Waypoint editing menu. +`20` | Connection menu. +`21` | Settings menu. + +### 2.3 Waypoints +#### 2.3.1 Adding waypoints +- There's three ways of adding a waypoint. + +- First way: Using the waypoint creation menu. + - Find the position you want to mark on the map. + - Get it's map grid. + - The grid is composed of 6 digits. + - The first three digits are read west to east. (Top of the map screen). + - The last three are read south to north. (Left side of the map screen). + - Go to the options menu (Click in `1` area, above the bar). + - Click on `Mark`(`18`). + - Enter the grid number. + - Press OK. + - Enter the desired name of the waypoint. + - Press OK. + +- Second way: Using the waypoint menu + - Find the position you want to mark on the map. + - Get it's map grid. + - The grid is composed of 6 digits. + - The first three digits are read west to east. (Top of the map screen). + - The last three are read south to north. (Left side of the map screen). + - Go to the options menu (Click in `1` area, above the bar). + - CLick on `Waypoints` (`19`). + - Click on `Add`. + - Enter the grid number. + - Press OK. + - Enter the name of the waypoint. + - Press OK. + +- Third way: Using the Map menu. + - Go to the map menu (click on `9`) + - double left click on the position where you want your waypoint. + - Enter the name of the waypoint. + - Press OK. + +#### 2.3.2 Setting a waypoint +- Go to the options menu (Click in `1` area, above the bar). +- CLick on `Waypoints` (`19`). +- Select the waypoint. +- Click on `SetWp`. -## Usage +- Once a waypoint is set: + - It's heading, elevation and distance are marked on the main menu. (`7`) + - It's heading, direction, grid position and name are marked in the compass menu (`8`) + - A marker appear at the waypoint grid location in the map menu (`9`) -Short overview of how to use the feature, e.g. menu options, key bindings, -instructions. May not apply to all modules. +#### 2.3.3 Deleting a waypoint +- Go to the options menu (Click in `1` area, above the bar). +- CLick on `Waypoints` (`19`). +- Select the waypoint. +- Click on `Delete`. + +### 2.4 Switching between mils and degrees +- Go to the options menu (Click in `1` area, above the bar). +- Click on `Settings` (`21`) +- Double left click on the unit next to `Angular unit:` + +### 2.5 Switching between topographical and satellite view + +- Go to the map menu (`9`) +- Click on the map menu button again (`9`) + +### 2.6 Retrieving data from the vector +- For this you obviously need a `vector 21`. +- Go to the options menu (Click in `1` area, above the bar). +- Click on `Connect to` (`20`). +- Pull out your `vector 21`. + - Press and hold both R and Tab ↹ until the red pointing circle appears. + - Sight the circle on the object and release both keys. +- The data on the main menu now have changed, you can now see the azimuth the range and the elevation of the point you sighted. +- Note that the compass menu also changed and now features the azimuth, compass bearing, distance and grid position of the point you sighted. + +Note that the results of the measure you took won't change until you do an other measure. -## Dependencies +## 3. Dependencies `ace_common` diff --git a/documentation/feature/missileguidance.md b/documentation/feature/missileguidance.md index 7dd4d6a304..c718788f0c 100644 --- a/documentation/feature/missileguidance.md +++ b/documentation/feature/missileguidance.md @@ -3,6 +3,7 @@ layout: wiki title: Missile Guidance description: group: feature +category: realism parent: wiki --- @@ -13,14 +14,14 @@ Adds the AMG framework, for more information about it refer to the [AMG framewor ## 2. Usage ### 2.1 Switching fire mode -- Press CTRL + TAB the LED's on the right of the UI will change. +- Press Ctrl + Tab ↹ the LED's on the right of the UI will change. - `TOP` for top down mode. - `DIR` for direct mode. ### 2.2 Locking - Fully zoom in by using NUMPAD + - Switch to thermals by pressing N the `FLTR` LED should light up. -- Aim at the target and hold TAB a crosshair will appear and the `SEEK` LED will light up. +- Aim at the target and hold Tab ↹ a crosshair will appear and the `SEEK` LED will light up. - Fire! ## 3. Dependencies diff --git a/documentation/feature/missionmodules.md b/documentation/feature/missionmodules.md index c434016fc2..e96f9dcdd9 100644 --- a/documentation/feature/missionmodules.md +++ b/documentation/feature/missionmodules.md @@ -3,6 +3,7 @@ layout: wiki title: Mission Modules description: modules that can be used by mission makers. group: feature +category: general parent: wiki --- diff --git a/documentation/feature/mk6mortar.md b/documentation/feature/mk6mortar.md index eb4b22caaf..691a6bc8ef 100644 --- a/documentation/feature/mk6mortar.md +++ b/documentation/feature/mk6mortar.md @@ -3,6 +3,7 @@ layout: wiki title: Mk6 Mortar description: Improve the existing mk6 mortar. group: feature +category: equipment parent: wiki --- @@ -18,7 +19,7 @@ ACE3 adds wind deflection for shells as well as a rangetable to accurately take ### 2.2 Working with the rangetable - To open the table: - - Self interact CTRL + ⊞ Win + - Self interact Ctrl + ⊞ Win - Select `equipment`. - Select `Open 82mm Rangetable`. @@ -34,7 +35,7 @@ ACE3 adds wind deflection for shells as well as a rangetable to accurately take - Once you finished your maths, it's time to aim, get the cross of the mortar on target, if you don't see it use a waypoint if possible. In our case ELEV is 1339-2 = 1337. - On the right side of the screen, while looking through the mk6 scope you should see ELV, we need to match this number with the one we found. - - To adjust the ELV use pageUP and pageDOWN. + - To adjust the ELV use Page Up and page Down. - Once the number you found and ELV are the same FIRE ! - On top of that you can calculate the time the shell will take to land by using the third row from the left, in our case the shell need to travel 2000m that's 20xthe number indicated. so 20x0,5 = 10s. @@ -62,4 +63,4 @@ ACE3 adds wind deflection for shells as well as a rangetable to accurately take ## 3. Dependencies -`ace_interaction` \ No newline at end of file +`ace_interaction` diff --git a/documentation/feature/modules.md b/documentation/feature/modules.md new file mode 100644 index 0000000000..1cdbe9dae4 --- /dev/null +++ b/documentation/feature/modules.md @@ -0,0 +1,15 @@ +--- +layout: wiki +title: Modules +group: feature +category: general +parent: wiki +--- + +## 1. Overview + +This is taking care of module initialization **DO NOT REMOVE**. + +## 2. Dependencies + +`ace_main` diff --git a/documentation/feature/movement.md b/documentation/feature/movement.md index bb857644b0..cf64c40945 100644 --- a/documentation/feature/movement.md +++ b/documentation/feature/movement.md @@ -3,6 +3,7 @@ layout: wiki title: Movement description: Movement improvements group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/mx2a.md b/documentation/feature/mx2a.md index 892991d3b7..c83325f575 100644 --- a/documentation/feature/mx2a.md +++ b/documentation/feature/mx2a.md @@ -1,7 +1,9 @@ --- layout: wiki title: MX-2A +description: Movement improvements group: feature +category: equipment parent: wiki --- @@ -11,4 +13,4 @@ Adds the MX-2A thermal imaging device. ## 3. Dependencies -`ace_apl` \ No newline at end of file +`ace_apl` diff --git a/documentation/feature/nametags.md b/documentation/feature/nametags.md index 6130be167f..00a582c010 100644 --- a/documentation/feature/nametags.md +++ b/documentation/feature/nametags.md @@ -3,6 +3,7 @@ layout: wiki title: Nametags description: group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/nightvision.md b/documentation/feature/nightvision.md index 46bae6a905..256670a8bd 100644 --- a/documentation/feature/nightvision.md +++ b/documentation/feature/nightvision.md @@ -3,6 +3,7 @@ layout: wiki title: Nightvision description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/noidle.md b/documentation/feature/noidle.md index f63daa4eb8..b57455315c 100644 --- a/documentation/feature/noidle.md +++ b/documentation/feature/noidle.md @@ -1,8 +1,9 @@ --- layout: wiki title: No Idle -description: Disable idle animations +description: Disables idle animations group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/noradio.md b/documentation/feature/noradio.md index e7452ed840..a3ee167c32 100644 --- a/documentation/feature/noradio.md +++ b/documentation/feature/noradio.md @@ -3,6 +3,7 @@ layout: wiki title: No Radio description: Disable callouts group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/norearm.md b/documentation/feature/norearm.md index 73ed1c35cc..0b5f00d28b 100644 --- a/documentation/feature/norearm.md +++ b/documentation/feature/norearm.md @@ -3,6 +3,7 @@ layout: wiki title: No Rearm description: Remove rearm from group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/optics.md b/documentation/feature/optics.md index fe1d04ee76..2602d98d98 100644 --- a/documentation/feature/optics.md +++ b/documentation/feature/optics.md @@ -3,6 +3,7 @@ layout: wiki title: Optics description: 2D and PIP optics group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/optionsmenu.md b/documentation/feature/optionsmenu.md index e4da9f033a..345bb81af8 100644 --- a/documentation/feature/optionsmenu.md +++ b/documentation/feature/optionsmenu.md @@ -3,6 +3,7 @@ layout: wiki title: Options Menu description: ACE3 options menu group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/overheating.md b/documentation/feature/overheating.md index dcbc4c1939..ff2e6c6778 100644 --- a/documentation/feature/overheating.md +++ b/documentation/feature/overheating.md @@ -3,6 +3,7 @@ layout: wiki title: Overheating description: Weapon temperature and jamming, barrel swapping. group: feature +category: realism parent: wiki --- @@ -25,12 +26,12 @@ Adds the ability to changes barrels on machine guns to compensate for those effe ### 2.2 Swapping barrels - For this you need a `Spare barrel` and a compatible weapon. -- Press self interaction CTRL + ⊞ Win (ACE3 default key bind `Self Interaction Key`). +- Press self interaction Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Equipment`. - Select `Swap barrel`. ### 2.3 Checking your barrel temperature -- Press self interaction CTRL + ⊞ Win. +- Press self interaction Ctrl + ⊞ Win. - Select `Equipment`. - Select `Check weapon temperature`. diff --git a/documentation/feature/overpressure.md b/documentation/feature/overpressure.md index 85ed13e8ca..77d16145d8 100644 --- a/documentation/feature/overpressure.md +++ b/documentation/feature/overpressure.md @@ -3,6 +3,7 @@ layout: wiki title: Overpressure description: backblast and overpressure group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/parachute.md b/documentation/feature/parachute.md index a3f9791fb7..39f353f08b 100644 --- a/documentation/feature/parachute.md +++ b/documentation/feature/parachute.md @@ -3,6 +3,7 @@ layout: wiki title: Parachute description: Add an altimeter and a non-steerable parachute group: feature +category: equipment parent: wiki --- @@ -14,7 +15,10 @@ Removes the altitude and descend speed UI elements when free-falling and parachu ### 1.2 Non-steerable parachute Adds a non-steerable parachute variant for jet pilots. -### 1.3 Landing animation +### 1.3 Parachute cutting and reserve parachutes +You are now able to cut parachutes and deploy a reserve one. + +### 1.4 Landing animation Smoothens the parachute landing animation. ## 2. Usage @@ -23,6 +27,10 @@ Smoothens the parachute landing animation. - For this you need to have an `Altimeter Watch` in the watch slot. - Press O (Arma 3 default key bind `Watch`) to bring up the altimeter. +### 2.2 Cutting a parachute +- While falling with a parachute deployed open the self interaction menu Ctrl+⊞ Win (ACE3 default). +- Select `Cut Parachute` + ## 3. Dependencies `ace_common` diff --git a/documentation/feature/protection.md b/documentation/feature/protection.md index 628d05d972..a0efe09e05 100644 --- a/documentation/feature/protection.md +++ b/documentation/feature/protection.md @@ -3,6 +3,7 @@ layout: wiki title: Protection description: Tweaks armor values group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/ragdolls.md b/documentation/feature/ragdolls.md index 235e8e97be..603dd13691 100644 --- a/documentation/feature/ragdolls.md +++ b/documentation/feature/ragdolls.md @@ -1,8 +1,9 @@ --- layout: wiki title: Ragdolls -description: +description: Changes the ragdolls to react more to the force of shots and explosions. group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/rangecard.md b/documentation/feature/rangecard.md index b40e76cd49..7f3a49251c 100644 --- a/documentation/feature/rangecard.md +++ b/documentation/feature/rangecard.md @@ -1,8 +1,9 @@ --- layout: wiki title: Rangecard -description: Add a range card for your weapons +description: Adds a range card for your weapons group: feature +category: equipment parent: wiki --- @@ -13,7 +14,7 @@ Add a range card that updates itself for your weapon and the type of ammo you're ## 2. Usage ### 2.1 Opening the range card -- Open the self interaction menu CTRL + ⊞ Win +- Open the self interaction menu Ctrl + ⊞ Win - Select `Equipment` - Select `Open Range Card` @@ -28,4 +29,4 @@ Add a range card that updates itself for your weapon and the type of ammo you're ## 3. Dependencies -`ACE_Advanced_Ballistics` \ No newline at end of file +`ACE_Advanced_Ballistics` diff --git a/documentation/feature/realisticnames.md b/documentation/feature/realisticnames.md index 72f5766664..2ec556bfea 100644 --- a/documentation/feature/realisticnames.md +++ b/documentation/feature/realisticnames.md @@ -3,6 +3,7 @@ layout: wiki title: Realistic Names description: More realistic weapon names group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/recoil.md b/documentation/feature/recoil.md index b684a1c8ce..fd34686012 100644 --- a/documentation/feature/recoil.md +++ b/documentation/feature/recoil.md @@ -3,6 +3,7 @@ layout: wiki title: Recoil description: Recoil overhaul group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/reload.md b/documentation/feature/reload.md index 3cd4db1c8d..2c23fadb29 100644 --- a/documentation/feature/reload.md +++ b/documentation/feature/reload.md @@ -3,6 +3,7 @@ layout: wiki title: Reload description: group: feature +category: interaction parent: wiki --- @@ -14,7 +15,7 @@ Hides the actual round count of magazines and removes the icon when the current ## 2. Usage ### 2.1 Checking your ammo -- Press CTRL + R (ACE3 default key bind `Check Ammo`). +- Press Ctrl + R (ACE3 default key bind `Check Ammo`). ## 3. Dependencies diff --git a/documentation/feature/reloadlaunchers.md b/documentation/feature/reloadlaunchers.md index 773814a73e..16bed1b541 100644 --- a/documentation/feature/reloadlaunchers.md +++ b/documentation/feature/reloadlaunchers.md @@ -3,6 +3,7 @@ layout: wiki title: Reload Launchers description: group: feature +category: interaction parent: wiki --- @@ -13,7 +14,7 @@ Add the ability to reload someone else's launcher. ### 2. Usage ### 2.1 Reloading someone else's launcher -- Press the interaction key ⊞ Win and aim at your buddy's launcher. +- Press the interaction key ⊞ Win and aim at your buddy's launcher. - Select `reload launcher`. - Select the type of ammo. diff --git a/documentation/feature/respawn.md b/documentation/feature/respawn.md index 753784b52b..90d6b0d68d 100644 --- a/documentation/feature/respawn.md +++ b/documentation/feature/respawn.md @@ -3,6 +3,7 @@ layout: wiki title: Respawn description: Same gear on respawn, FF message, rallypoints group: feature +category: interaction parent: wiki --- @@ -23,7 +24,7 @@ Adds rallypoints to all 3 sides to enable teleportation from base spawn to FOB's ### 2.1 Using rallypoints - For this to work pre-emptive preparations need to be made by the mission maker. - Approach the rallypoint flagpole -- Use the interaction key ⊞ Win (ACE3 default key bind `Interaction key`). +- Use the interaction key ⊞ Win (ACE3 default key bind `Interaction key`). - Select teleport to (base / rallypoint). diff --git a/documentation/feature/safemode.md b/documentation/feature/safemode.md index 9024ac973b..5065fb717c 100644 --- a/documentation/feature/safemode.md +++ b/documentation/feature/safemode.md @@ -3,6 +3,7 @@ layout: wiki title: Safe Mode description: Introduce safe mode group: feature +category: equipment parent: wiki --- @@ -14,8 +15,8 @@ You can now use the safety mode of any weapon. Switching weapon modes takes the ## 2. Usage ### 2.1 Switching safety on / off -- To turn it on press CTRL + ` (QWERTY layout) (ACE3 default key bind `Safe Mode`). -- To turn it off press CTRL + ` (QWERTY layout) again or switch firing mode. +- To turn it on press Ctrl + ` (QWERTY layout) (ACE3 default key bind `Safe Mode`). +- To turn it off press Ctrl + ` (QWERTY layout) again or switch firing mode. ## 3. Dependencies diff --git a/documentation/feature/sandbags.md b/documentation/feature/sandbags.md index 5e0011b755..dbe450eb31 100644 --- a/documentation/feature/sandbags.md +++ b/documentation/feature/sandbags.md @@ -1,7 +1,9 @@ --- layout: wiki title: Sandbags +description: Adds stackable sandbags group: feature +category: equipment parent: wiki --- @@ -15,10 +17,10 @@ Note that those sandbags are affected by physics, a rocket will send them flying ### 2.1 Placing the sandbags - You'll need at least one `sandbag (empty)`. - You need to be over a grass area / sand area to be able to fill the sandbag. -- Self interact CTRL+⊞ Win (ACE3 default). +- Self interact Ctrl+⊞ Win (ACE3 default). - Select `Deploy sandbag`. - Follow the instruction on screen. ## 3. Dependencies -`ace_interaction` \ No newline at end of file +`ace_interaction` diff --git a/documentation/feature/scopes.md b/documentation/feature/scopes.md index 9e70641f71..359f5a8bf6 100644 --- a/documentation/feature/scopes.md +++ b/documentation/feature/scopes.md @@ -3,6 +3,7 @@ layout: wiki title: Scopes description: Scope adjustment group: feature +category: equipment parent: wiki --- @@ -15,16 +16,16 @@ Allows snipers to adjust their scopes horizontally and vertically in mils. ### 2.1 Adjusting your scope vertically Please not that the following key combinations are ACE3 default key binds. -- Minor adjustment up pageUP. -- Minor adjustment down pageDOWN. -- Major adjustment up Shift + pageUP. -- Major adjustment down Shift + pageDOWN. +- Minor adjustment up Page Up. +- Minor adjustment down page Down. +- Major adjustment up ⇧ Shift + Page Up. +- Major adjustment down ⇧ Shift + page Down. ### 2.2 Adjusting your scope horizontally -- Minor adjustment right CTRL + pageUP. -- Minor adjustment left CTRL + pageDOWN. -- Major adjustment right CTRL + Shift + pageUP. -- Major adjustment left CTRL + Shift + pageDOWN. +- Minor adjustment right Ctrl + Page Up. +- Minor adjustment left Ctrl + page Down. +- Major adjustment right Ctrl + ⇧ Shift + Page Up. +- Major adjustment left Ctrl + ⇧ Shift + page Down. ## 3. Dependencies diff --git a/documentation/feature/sitting.md b/documentation/feature/sitting.md new file mode 100644 index 0000000000..aee2ee859d --- /dev/null +++ b/documentation/feature/sitting.md @@ -0,0 +1,22 @@ +--- +layout: wiki +title: Sitting +description: +group: feature +category: interaction +parent: wiki +--- + +## 1. Overview +Adds the ability to sit on chairs. + +## 2. Usage +Please note that to be able to use this function the sitting module need to be placed down (or set to 1 in the server config) + +### 2.1 How to sit / stand up +- Look at the chair and press the interaction key Ctrl+⊞ Win (ACE3 default). +- Select `Sit Down`. +- To stand up press the self interaction key ⊞ Win (ACE3 default) and select `Stand Up`. + +## 3. Dependencies +`ace_interaction` \ No newline at end of file diff --git a/documentation/feature/slideshow.md b/documentation/feature/slideshow.md new file mode 100644 index 0000000000..0ff2372064 --- /dev/null +++ b/documentation/feature/slideshow.md @@ -0,0 +1,23 @@ +--- +layout: wiki +title: Slideshow +group: feature +category: interaction +parent: wiki +--- + +## 1. Overview +This adds the ability to have images shown on some objects and have other objects being used as remotes. +Please note that only objects with hiddenSelection 0 can be used to render images (whiteboard, TV, PC Screen being the most notable examples). + +## 2. Usage +Note that this sections is for users, for mission makers refer to [the entry in mission-tools](../missionmaker/mission-tools.html) +Also if no remotes are defined the "screen" object itself becomes the remote. + +### 2.1 Switching between images +- Look at the object used as a remote and use the interaction menu ⊞ Win (ACE3 default). +- Select the action that correspond to the image you want (the name of the action depends on the mission maker). + +## 3. Dependencies + +`ace_common` \ No newline at end of file diff --git a/documentation/feature/smallarms.md b/documentation/feature/smallarms.md index 51fc7c0440..ffa905eacf 100644 --- a/documentation/feature/smallarms.md +++ b/documentation/feature/smallarms.md @@ -3,6 +3,7 @@ layout: wiki title: Small Arms description: Various improvements to small arms group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/spectator.md b/documentation/feature/spectator.md new file mode 100644 index 0000000000..08919c369d --- /dev/null +++ b/documentation/feature/spectator.md @@ -0,0 +1,422 @@ +--- +layout: wiki +title: Spectator +description: A flexible spectator system +group: feature +category: interaction +parent: wiki +--- + +
+
Please note:
+

This is not part of ACE3 yet. It will be released in a future version.

+
+ +## 1. Overview + +The ACE3 spectator system is designed to act as a flexible and easy to configure framework. Most scenarios can be set up as desired using only the settings provided, however public functions are available for finer control of these configurable aspects. + +### 1.1 Spectator System + +By default, the ACE3 spectator system does nothing - meaning existing missions will behave exactly as before. There are two tools available to enable the spectator system in your missions: + +- An `"ace_spectator"` [respawn template](https://community.bistudio.com/wiki/Arma_3_Respawn) +- Public functions `ace_spectator_fnc_setSpectator` and `ace_spectator_fnc_stageSpectator` + +With respawn template `"ace_spectator"` in effect players will enter spectator mode upon death and exit upon respawn. The template is compatible with all respawn types and allows you to take advantage of the vanilla framework's flexibility (combining templates, side specific templates, etc.). This makes for very simple combination of a wide variety of spectator and respawn setups. + +An example description.ext file using the respawn template: + +``` +respawn = 3; +respawnDelay = 180; +respawnTemplates[] = {"ace_spectator"}; +respawnTemplatesWest[] = {"ace_spectator","Counter","Wave"}; +``` + +For groups using custom respawn frameworks - or for missions where you want finer control over who, how and when players enter spectator - the two following functions are provided: + +`ace_spectator_fnc_setSpectator` + +``` +* Sets local client to the given spectator state (virtually) +* To physically handle a spectator see ace_spectator_fnc_stageSpectator +* +* Client will be able to communicate in ACRE/TFAR as appropriate +* The spectator interface will be opened/closed +* +* Arguments: +* 0: Spectator state of local client (default: true) +* +* Return Value: +* None +* +* Example: +* [true] call ace_spectator_fnc_setSpectator +``` + +`ace_spectator_fnc_stageSpectator` + +``` +* Sets target unit to the given spectator state (physically) +* To virtually handle a spectator see ace_spectator_fnc_setSpectator +* +* Units will be gathered at marker ace_spectator_respawn (or [0,0,0] by default) +* Upon unstage, units will be moved to the position they were in upon staging +* +* Arguments: +* 0: Unit to put into spectator stage (default: player) +* 1: Spectator stage (default: true) +* +* Return Value: +* None +* +* Example: +* [player, false] call ace_spectator_fnc_stageSpectator +``` + +### 1.2 Spectatable Units + +Spectatable units are stored in an automatically maintained list (`ace_spectator_unitList`) on each client. However, directly accessing this list is not encouraged. Instead mission makers have two tools at their disposal to tweak the list: + +- Unit filter +- Unit whitelist/blacklist + +The unit filter determines which units will automatically be used to populate the spectatable unit list. It's controlled by setting `ace_spectator_filterUnits` and there are four possible options: + +- **No units** +- **Player units** +- **Playable units** *(default)* +- **All units** + +In cases where more specific control is required function `ace_spectator_fnc_updateUnits` can be used to whitelist units from the filter or blacklist them from the list (on the local client): + +``` + * Arguments: + * 0: Units to add to the whitelist + * 1: Use blacklist + * + * Return Value: + * None + * + * Example: + * [allUnits,true] call ace_spectator_fnc_updateUnits + * +``` + +### 1.3 Spectatable Sides + +Spectatable sides can simply be considered an extra layer of filtering for the spectatable unit list. Again, there are two methods of controlling the spectatable sides: + +- Side filter +- Side list + +The side list is exactly what it sounds like, a list of sides spectatable by the local client. However, unlike spectatable units the side list remains static and can only be updated manually. This is because the side filter is applied on top of the side list whenever the unit list is automatically maintained - meaning the unit list will update if the player changes side or if the side relations change. + +Note that the unit whitelist/blacklist also serves to override this side filtering mechanism. + +The default side list is `[west,east,resistance,civilian]` and to update it (on the local client) function `ace_spectator_fnc_updateSpectatableSides` can be used: + +``` + * Arguments: + * 0: Sides to add + * 1: Sides to remove + * + * Return Value: + * Spectatable sides + * + * Example: + * [[west], [east,civilian]] call ace_spectator_fnc_updateSpectatableSides +``` + +The side filter determines which sides from the side list are valid each time the unit list is updated. It's controlled by setting `ace_spectator_filterSides` and there are four possible options: + +- **Player side** *(default)* +- **Friendly sides** +- **Hostile sides** +- **All sides** + +### 1.4 Camera Modes + +There are 3 possible camera modes: + +- **Free** +- **Internal** +- **External** + +Mission makers can control the camera modes available to spectators via the setting `ace_spectator_restrictModes`. Function `ace_spectator_fnc_updateCameraModes` is also provided to alter the available modes (to the local player) as desired at any point in the mission: + +``` + * Arguments: + * 0: Camera modes to add + * 1: Camera modes to remove + * + * Return Value: + * Available camera modes + * + * Example: + * [[0], [1,2]] call ace_spectator_fnc_updateCameraModes +``` + +### 1.5 Vision Modes + +Vision modes are only available in free camera mode. By default there are 4 available vision modes: + +- **Normal** +- **Night vision** +- **Thermal imaging (white hot)** +- **Thermal imaging (black hot)** + +Mission makers can control which of these vision modes are available to spectators via the setting `ace_spectator_restrictVisions`. However, there are actually a total of 10 possible vision modes and function `ace_spectator_fnc_updateVisionModes` can be used to alter which of them are available (to the local player) at any point in the mission: + +``` + * Possible vision modes are: + * - -2: Normal + * - -1: Night vision + * - 0: White hot + * - 1: Black hot + * - 2: Light Green Hot / Darker Green cold + * - 3: Black Hot / Darker Green cold + * - 4: Light Red Hot / Darker Red Cold + * - 5: Black Hot / Darker Red Cold + * - 6: White Hot / Darker Red Cold + * - 7: Thermal (Shade of Red and Green, Bodies are white) + * + * Arguments: + * 0: Vision modes to add + * 1: Vision modes to remove + * + * Return Value: + * Available vision modes + * + * Example: + * [[0], [1,2]] call ace_spectator_fnc_updateVisionModes +``` + +### 1.6 Camera Attributes + +The spectator camera has 8 manipulatable attributes: + +- **Camera mode:** The camera view +- **Camera unit:** The unit used for internal and external view +- **Camera vision:** The vision mode used by the free camera +- **Camera position:** The position of the free camera +- **Camera pan:** The pan (direction/heading) of the free camera +- **Camera tilt:** The tilt (pitch) of the free camera +- **Camera zoom:** The zoom level of the free camera +- **Camera speed:** The movement speed of the free camera + +Function `ace_spectator_fnc_setCameraAttributes` can be used to change any of these attributes at any point (including before spectator has ever opened): + +``` + * Arguments: + * 0: Camera mode + * - 0: Free + * - 1: Internal + * - 2: External + * 1: Camera unit (objNull for random) + * 2: Camera vision + * - -2: Normal + * - -1: Night vision + * - 0: Thermal white hot + * - 1: Thermal black hot + * 3: Camera position (ATL) + * 4: Camera pan (0 - 360) + * 5: Camera tilt (-90 - 90) + * 6: Camera zoom (0.01 - 2) + * 7: Camera speed in m/s (0.05 - 10) + * + * Return Value: + * None + * + * Example: + * [1, objNull] call ace_spectator_fnc_setCameraAttributes +``` + +## 2. Usage + +### 2.1 Spectator Shortcuts + +Shortcuts are currently hardcoded in the ACE3 spectator system. Future versions are likely to change that. + +#### 2.1.1 Interface Shortcuts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ShortcutAction
1Toggle unit list
2Toggle help
3Toggle toolbar
4Toggle compass
5Toggle unit icons
MToggle map
BackspaceToggle interface
+ +#### 2.1.2 Free Camera Shortcuts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ShortcutAction
WCamera forward
SCamera backward
ACamera left
DCamera right
QCamera up
ZCamera down
RMBPan camera
LMBDolly camera
⇧ ShiftSpeed boost
FFocus on unit
+ +#### 2.1.3 Camera Attribute Shortcuts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ShortcutAction
Up arrowNext camera
Down arrowPrevious camera
Right arrowNext unit
Left arrowPrevious unit
NNext vision mode
Ctrl+NPrevious vision mode
ScrollwheelAdjust zoom
Ctrl+ScrollwheelAdjust speed
Num-/Num+Increment zoom
Ctrl+Num-/Num+Increment speed
Alt+Num-Reset zoom
Alt+Num+Reset speed
+ +### 2.2 The Interface + +#### 2.2.1 Unit list + +The unit list on the left lists all of the units currently available to spectate. +Double click on any unit name in the list to switch to the unit. +Double click on the current unit to switch between internal and external view. + +#### 2.2.2 Toolbar + +The toolbar along the bottom of the screen displays various useful values. From left to right these are: + +- Unit name +- Camera mode +- Vision mode/Unit side +- 24-hour Clock +- Camera zoom/Unit depth +- Camera/Unit speed + +#### 2.2.3 Map + +The map overlay will show the current position of the free camera and all spectatable units. In free camera you can alt-click on the map to teleport the camera to the position of the cursor. + +## 3. Dependencies + +`ace_common` diff --git a/documentation/feature/spotting_scope.md b/documentation/feature/spotting-scope.md similarity index 63% rename from documentation/feature/spotting_scope.md rename to documentation/feature/spotting-scope.md index ead45d540f..c0c79fb1ad 100644 --- a/documentation/feature/spotting_scope.md +++ b/documentation/feature/spotting-scope.md @@ -1,7 +1,9 @@ --- layout: wiki title: Spotting scope +description: Adds a deployable spotting scope group: feature +category: equipment parent: wiki --- @@ -12,10 +14,10 @@ Adds a deployable spotting scope. ## 2. Usage ### 2.1 Deploying the spotting scope -- Self interact CTRL+⊞ Win (ACE3 default). +- Self interact Ctrl+⊞ Win (ACE3 default). - Select `Equipment`. - Select `Place spotting scope` (note that the scope will be at your feet). ## 3. Dependencies -`ace_apl` , `ace_interaction` \ No newline at end of file +`ace_apl` , `ace_interaction` diff --git a/documentation/feature/switchunits.md b/documentation/feature/switchunits.md index cc1a0ba381..da45041fb4 100644 --- a/documentation/feature/switchunits.md +++ b/documentation/feature/switchunits.md @@ -3,6 +3,7 @@ layout: wiki title: Switch Units description: group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/tacticallader.md b/documentation/feature/tacticallader.md index f992236db6..efc05fccf9 100644 --- a/documentation/feature/tacticallader.md +++ b/documentation/feature/tacticallader.md @@ -1,7 +1,9 @@ --- layout: wiki title: Tactical ladder +description: Adds a deployable ladder with adjustable height that you can transport on your back. group: feature +category: equipment parent: wiki --- @@ -12,10 +14,10 @@ Adds a deployable ladder with adjustable height that you can transport on your b ## 2. Usage ### 2.1 Deploying the ladder -- Self interact CTRL+⊞ Win (ACE3 default). +- Self interact Ctrl+⊞ Win (ACE3 default). - Select `Deploy ladder`. -- You can adjust it's position and height by interacting with it ⊞ Win (ACE3 default) and following the instructions on screen. +- You can adjust it's position and height by interacting with it ⊞ Win (ACE3 default) and following the instructions on screen. ## 3. Dependencies -`ace_apl` , `ace_interaction` \ No newline at end of file +`ace_apl` , `ace_interaction` diff --git a/documentation/feature/testmissions.md b/documentation/feature/testmissions.md index 8b61c47327..a49ff963b0 100644 --- a/documentation/feature/testmissions.md +++ b/documentation/feature/testmissions.md @@ -1,14 +1,15 @@ --- layout: wiki title: Test Missions -description: +description: Adds an ACE3 Test Missions group: feature +category: general parent: wiki --- ## 1. Overview -adds ACE3 test missions +Adds an ACE3 Test Missions ## 2. Dependencies diff --git a/documentation/feature/thermals.md b/documentation/feature/thermals.md index 495ba30eaf..051bbc8241 100644 --- a/documentation/feature/thermals.md +++ b/documentation/feature/thermals.md @@ -3,6 +3,7 @@ layout: wiki title: Thermals description: group: feature +category: equipment parent: wiki --- diff --git a/documentation/feature/tripod.md b/documentation/feature/tripod.md index 4f57dc05a7..06d8fc0b4a 100644 --- a/documentation/feature/tripod.md +++ b/documentation/feature/tripod.md @@ -1,7 +1,9 @@ --- layout: wiki title: Tripod +description: Adds a packable tripod deployable on the field group: feature +category: equipment parent: wiki --- @@ -13,12 +15,12 @@ Adds a packable tripod deployable on the field. It features a flat part to deplo ### 2.1 deploying the tripod - Note that you need a `SSWT kit` in your inventory. -- Self interact CTRL+⊞ Win. +- Self interact Ctrl+⊞ Win. - Select `Equipment` - Select `Place SSWT kit`. -To adjust or pick up the tripod just interact with it ⊞ Win and select the desired action. +To adjust or pick up the tripod just interact with it ⊞ Win and select the desired action. ## 3. Dependencies -`ace_interaction` \ No newline at end of file +`ace_interaction` diff --git a/documentation/feature/ui.md b/documentation/feature/ui.md index eb7cf3ff58..b079773d60 100644 --- a/documentation/feature/ui.md +++ b/documentation/feature/ui.md @@ -1,7 +1,9 @@ --- layout: wiki title: UI +description: group: feature +category: general parent: wiki --- @@ -9,7 +11,6 @@ parent: wiki Changes the chat contrast on the map to allow easier reading. +## 2. Dependencies -## 3. Dependencies - -`ace_common` \ No newline at end of file +`ace_common` diff --git a/documentation/feature/vector.md b/documentation/feature/vector.md index 025012959a..1dbd11001d 100644 --- a/documentation/feature/vector.md +++ b/documentation/feature/vector.md @@ -1,8 +1,9 @@ --- layout: wiki title: Vector -description: +description: Adds a realistic depiction of the Vector 21 rangefinder group: feature +category: equipment parent: wiki --- @@ -32,12 +33,12 @@ The Vector is controlled with 2 keys: the azimuth key and the range key; Ta #### 2.2 Azimuth Measuring Azimuth -- Press and hold the TAB until the azimuth is displayed. +- Press and hold the Tab ↹ until the azimuth is displayed. #### 2.3 Slope distance and Azimuth Measuring Slope distance and Azimuth -- Press and hold both R and TAB until the red pointing circle appears. +- Press and hold both R and Tab ↹ until the red pointing circle appears. - Sight the circle on the object and release both keys. #### 2.4 Horizontal distance and height difference @@ -49,35 +50,35 @@ The Vector is controlled with 2 keys: the azimuth key and the range key; Ta #### 2.5 Azimuth and Inclination Measuring Azimuth and Inclination -- Tap TAB once then press and hold it until the azimuth and inclination is displayed. +- Tap Tab ↹ once then press and hold it until the azimuth and inclination is displayed. #### 2.6 Distance between two points Measuring Distance between two points - Press and hold R until the red pointing circle appears. -- Sight the circle on the first object and tap TAB while further holding R. The first measurement is confirmed ("1-P" = first point). +- Sight the circle on the first object and tap Tab ↹ while further holding R. The first measurement is confirmed ("1-P" = first point). - Sight the second object and release R. #### 2.7 Horizontal and vertical distance between two points Measuring Horizontal and vertical distance between two points - Tap R once then press and hold it until the red pointing circle appears. -- Sight the circle on the object and tap TAB once. The first measurement is confirmed ("1-P" = first point). +- Sight the circle on the object and tap Tab ↹ once. The first measurement is confirmed ("1-P" = first point). - Sight the second object and release R. #### 2.8 Horizontal distance and azimuth between two points Measuring Horizontal distance and azimuth between two points -- Press and hold TAB until the azimuth appears. -- Sight the circle on the first object and tap R while further holding TAB. The first measurement is confirmed ("1-P" = first point). -- Sight the second object and release TAB. +- Press and hold Tab ↹ until the azimuth appears. +- Sight the circle on the first object and tap R while further holding Tab ↹. The first measurement is confirmed ("1-P" = first point). +- Sight the second object and release Tab ↹. ### 2.9 Fall of shot Measuring Fall of shot -- Tap TAB once then press and hold it until the azimuth appears. -- Sight the circle on the object and tap R while further holding TAB. The first measurement is confirmed ("1-P" = first point). -- Sight the Fall of shot and release TAB. The left digits display the left (`L`)/right (`r`) correction value in meter and the right digits display the longer (`A` = add)/shorter (`d` = drop) correction value in meter. If R is tapped the height correction values will be displayed (`UP` and `dn`). +- Tap Tab ↹ once then press and hold it until the azimuth appears. +- Sight the circle on the object and tap R while further holding Tab ↹. The first measurement is confirmed ("1-P" = first point). +- Sight the Fall of shot and release Tab ↹. The left digits display the left (`L`)/right (`r`) correction value in meter and the right digits display the longer (`A` = add)/shorter (`d` = drop) correction value in meter. If R is tapped the height correction values will be displayed (`UP` and `dn`). ## 3. Dependencies diff --git a/documentation/feature/vehiclelock.md b/documentation/feature/vehiclelock.md index a97ec96149..c4162ace7b 100644 --- a/documentation/feature/vehiclelock.md +++ b/documentation/feature/vehiclelock.md @@ -1,8 +1,9 @@ --- layout: wiki title: Vehicle Lock -description: The Vehiclelock module enables locking vehicles and their inventory +description: The vehicle lock module enables locking vehicles and their inventory group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/vehicles.md b/documentation/feature/vehicles.md index 3f78b654b2..5575a457fc 100644 --- a/documentation/feature/vehicles.md +++ b/documentation/feature/vehicles.md @@ -3,6 +3,7 @@ layout: wiki title: Vehicles description: group: feature +category: realism parent: wiki --- @@ -41,6 +42,10 @@ MBT main guns and mortars can no longer lock on enemies. The AT rounds of both n - To turn the engine on press 2. - To turn the engine off press 1. +### 2.2 Turning the speed limiter on / off +- To turn the speed limiter on press Del. +- To turn it off press Del again. + ## 3. Dependencies `ace_common` diff --git a/documentation/feature/viewdistance.md b/documentation/feature/viewdistance.md index 38e4fc4c53..5c9bd3a815 100644 --- a/documentation/feature/viewdistance.md +++ b/documentation/feature/viewdistance.md @@ -3,6 +3,7 @@ layout: wiki title: View Distance description: The view distance module adds extra view distance settings group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/weaponselect.md b/documentation/feature/weaponselect.md index 232e643416..ec638ea943 100644 --- a/documentation/feature/weaponselect.md +++ b/documentation/feature/weaponselect.md @@ -1,7 +1,9 @@ --- layout: wiki title: Weapon Select +description: group: feature +category: interaction parent: wiki --- diff --git a/documentation/feature/weather.md b/documentation/feature/weather.md index 4dee0da86f..e6d6aa6a4e 100644 --- a/documentation/feature/weather.md +++ b/documentation/feature/weather.md @@ -3,6 +3,7 @@ layout: wiki title: Weather description: The Weather module overrides the mission/editor weather setting with a synchronized realistic weather simulation group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/windeflection.md b/documentation/feature/windeflection.md index 82019eca7c..ffec021d26 100644 --- a/documentation/feature/windeflection.md +++ b/documentation/feature/windeflection.md @@ -1,8 +1,9 @@ --- layout: wiki title: Wind Deflection -description: The Windeflection module simulates wind deflection of projectiles +description: The wind deflection module simulates wind deflection of projectiles group: feature +category: realism parent: wiki --- diff --git a/documentation/feature/yardage450.md b/documentation/feature/yardage450.md index 66c4a2d4e3..7aabbf36f2 100644 --- a/documentation/feature/yardage450.md +++ b/documentation/feature/yardage450.md @@ -1,7 +1,9 @@ --- layout: wiki title: Yardage 450 +description: Adds the Bushnell Yardage Pro Sport 450 Laser Rangefinder group: feature +category: equipment parent: wiki --- @@ -19,4 +21,4 @@ Adds the Bushnell Yardage Pro Sport 450 Laser Rangefinder. ## 3. Dependencies -`ace_apl` , `ace_laser` \ No newline at end of file +`ace_apl` , `ace_laser` diff --git a/documentation/feature/zeus.md b/documentation/feature/zeus.md index 12a016d584..36e7f5e434 100644 --- a/documentation/feature/zeus.md +++ b/documentation/feature/zeus.md @@ -3,6 +3,7 @@ layout: wiki title: Zeus description: The Zeus module improves the Vanilla functionality group: feature +category: interaction parent: wiki --- diff --git a/documentation/framework/carry-drag.md b/documentation/framework/carry-drag.md index 988797ba79..cfa4eb13af 100644 --- a/documentation/framework/carry-drag.md +++ b/documentation/framework/carry-drag.md @@ -26,3 +26,71 @@ class CfgVehicles { }; ``` +## 2. Functions + +**NOTE THAT THE FOLLOWING FUNCTIONS ARE NOT PUBLIC AND THUS MAY CHANGE IN THE FUTURE.**
+ + +Also note that if the item is too heavy you won't be able to carry / drag it, the mass is also affected by what's inside it.
+To bypass this empty the object and / or use setMass.
+ +### 2.1 Enabling / disabling dragging + +`ace_dragging_fnc_setDraggable.`
+Enable the object to be dragged.
+ +| Arguments | | +--------------| -------- | +0 | Any object (Object) +1: | true to enable dragging, false to disable (Bool) +2:| Position offset for attachTo command (Array, optional; default: [0,0,0]) +3: | Direction in degree to rotate the object after attachTo (Number, optional; default: 0) +Return value: NONE
+ +#### 2.1.1 example 1: +``` +[foo,true,[0,2,0],45] call ace_dragging_fnc_setDraggable +``` +| Arguments | | +--------------| -------- | +0:| foo (my object) +1:| true (dragging is enabled) +2:| `[0,2,0]` (0 meters sideways, 2 meters forward, 0 meters upwards) +3:| 45 (the object is rotated by 45°) + +#### 2.1.2 example 2 +``` +[bar,false,[3,-2,2],20] call ace_dragging_fnc_setDraggable +``` + +| Arguments | | +--------------| -------- | +0:| bar (object) +1:| false (dragging is disabled) +2:| 3 meters sideways, -2 meters backwards, 2 meters upwards +3:| the object is rotated by 20° + +### 2.2 Enabling / disabling carrying +`ace_dragging_fnc_setCarryable.`
+Enable the object to be carried.
+ +| Arguments | | +--------------| -------- | +0 | Any object (Object) +1:| true to enable carrying, false to disable (Bool) +2:| Position offset for attachTo command (Array, optional; default: [0,1,1]) +3:| Direction in degree to rotate the object after attachTo (Number, optional; default: 0) +Return value: NONE
+ + +#### 2.1.1 example 1: +``` +[foo,true,[0,3,1],10] call ace_dragging_fnc_setCarryable +``` +| Arguments | | +--------------| -------- | +0:| foo (my object) +1:| true (carrying is enabled) +2:| `[0,2,0]` (0 meters sideways, 3 meters forward, 1 meters upwards) +3:| 10 (the object is rotated by 10°) + diff --git a/documentation/missionmaker/classnames.md b/documentation/missionmaker/class-names.md similarity index 67% rename from documentation/missionmaker/classnames.md rename to documentation/missionmaker/class-names.md index 9ea0d5b556..9866f20064 100644 --- a/documentation/missionmaker/classnames.md +++ b/documentation/missionmaker/class-names.md @@ -1,7 +1,7 @@ --- layout: wiki -title: Classnames -description: A list of all the classnames in ACE3, your wet dream came true. +title: Class names +description: A list of all the class names in ACE3 group: missionmaker order: 11 parent: wiki @@ -9,27 +9,27 @@ parent: wiki Everything is ordered alphabetically. -You know an in-game name but want the classname? CTRL + F +You know an in-game name but want the class name? CTRL + F -### Atragmx +## AtragMX `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- | +class name | in game name | type | +---------- | --------- | --------- | ACE_ATragMX | ATragMX | ACE_ItemCore | -### Attachable +## Attachable `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- | +class name | in game name | type | +---------- | --------- | --------- | ACE_IR_Strobe_Item | IR strobe | ACE_ItemCore | -### Ballistics +## Ballistics `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- | +class name | in game name | type | +---------- | --------- | --------- | ACE_100Rnd_65x39_caseless_mag_Tracer_Dim | 6.5mm IR-DIM | Magazine | ACE_200Rnd_65x39_cased_Box_Tracer_Dim | 6.5mm IR-DIM | Magazine | ACE_30Rnd_65x39_caseless_mag_Tracer_Dim | 6.5mm IR-DIM | Magazine | @@ -63,118 +63,118 @@ ACE_30Rnd_9x19_mag | 9x19mm | Magazine | ACE_16Rnd_9x19_mag | 9x19mm | Magazine | ACE_10Rnd_762x54_Tracer_mag | 7.62mm | Magazine | -### Captive +## Captive `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_CableTie | cable tie | ACE_ItemCore | -### Common +## Common `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Banana | banana | ACE_ItemCore | -### Concertina_wire +## Concertina Wire `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_ConcertinaWireCoil | Concertina Wire Coil | ThingX | ACE_ConcertinaWire | Concertina Wire | deployed concertina wire | -### Dagr +## DAGR `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_DAGR | DAGR | ACE_ItemCore | -### Disposable +## Disposable `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_launch_NLAW_Used_F | used NLAW | Weapon | -### Explosives +## Explosives `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Clacker| M57 Firing Device | ACE_ItemCore | ACE_M26_Clacker| M26 Firing Device | ACE_ItemCore | ACE_DefusalKit | Defusal Kit | ACE_ItemCore | ACE_DeadManSwitch | Dead Man's Switch | ACE_ItemCore | ACE_Cellphone | Cellphone | ACE_ItemCore | -### Grenades +## Grenades `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_HandFlare_White | M127A1 Hand Held Signal (White) | Grenade | ACE_HandFlare_Red | M127A1 Hand Held Signal (Red | Grenade | ACE_HandFlare_Green | M127A1 Hand Held Signal (Green) | Grenade | ACE_HandFlare_Yellow | M127A1 Hand Held Signal (Yellow) | Grenade | ACE_M84 | M84 Stun Grenade | Grenade | -### Hearing +## Hearing `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_EarPlugs | Earplugs | ACE_ItemCore | -### HuntIR +## HuntIR `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_HuntIR_monitor | HuntIR monitor | ACE_ItemCore | ACE_HuntIR_M203 | HuntIR Round | Grenade shell | ACE_HuntIR_Box | HuntIR Transport Box | ammo box | -### Kestrel +## Kestrel `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Kestrel4500 | Kestrel 4500NV | ACE_ItemCore | -### Laser pointers +## Laser Pointers `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- acc_pointer_IR | Laser Pointer (red) | Weapon accessory | ACE_acc_pointer_red | Laser Pointer (green) | Weapon accessory | ACE_acc_pointer_green_IR | Laser Pointer (green) | Weapon accessory | ACE_acc_pointer_green | Laser Pointer (green) | Weapon accessory | -### logistics +## Logistics `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_UAVBattery | UAV Battery | ACE_ItemCore | ACE_wirecutter | Wirecutter | ACE_ItemCore | -### Map tools +## Map Tools `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_MapTools | Map Tools | ACE_ItemCore | -# Medical +## Medical `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_atropine | Atropin autoinjector | ACE_ItemCore | ACE_fieldDressing | Bandage (Basic) | ACE_ItemCore | ACE_elasticBandage | Bandage (Elastic) | ACE_ItemCore | @@ -197,33 +197,33 @@ ACE_salineIV_250 | Saline IV (250ml) | ACE_ItemCore | ACE_surgicalKit | Surgical Kit | ACE_ItemCore | ACE_tourniquet | Tourniquet (CAT) | ACE_ItemCore | -### Microdagr +## MicroDAGR `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_microDAGR | MicroDAGR GPS | ACE_ItemCore | -### mk6 mortar +## MK6 Mortar `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_RangeTable_82mm | 82mm Rangetable | ACE_ItemCore | -### M2XA +## M2XA `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_MX2A | MX-2A | Binocular | -### Nightvision +## Nightvision `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_NVG_Gen1 | NV Goggles (Gen1) | Nvgs | ACE_NVG_Gen2 | NV Goggles (Gen2) | Nvgs | ACE_NVG_Gen3 | NV Goggles (Gen3) | Nvgs | @@ -231,11 +231,11 @@ ACE_NVG_Gen4 | NV Goggles (Gen4) | Nvgs | ACE_NVG_Wide | NV Goggles (Wide) | Nvgs | -### Optics +## Optics `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_optic_Arco_2D | ARCO (2D) | Weapon accessory | ACE_optic_Arco_PIP | ARCO (PIP) | Weapon accessory | ACE_optic_LRPS_2D | LRPS (2D) | Weapon accessory | @@ -247,39 +247,53 @@ ACE_optic_MRCO_PIP | MRCO (PIP) | Weapon accessory | ACE_optic_Hamr_2D | RCO (2D) | Weapon accessory | ACE_optic_Hamr_PIP | RCO (PIP) | Weapon accessory | -### Overheating +## Overheating `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_SpareBarrel | Spare barrel | ACE_ItemCore | -### Parachute -`added in 3.0.0.3` +## Parachute +`last modified in 3.2.0` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Altimeter | Altimeter Watch | ACE_ItemCore | ACE_NonSteerableParachute | Non-Steerable Parachute | Backpack | +ACE_ReserveParachute | Reserve Parachute | Backpack | -### Rangecard +## Rangecard +`added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_RangeCard | rangecard | ACE_ItemCore | -### Vector +## Respawn +`last modified in 3.2.0` + +class name | in game name | type | +---------- | --------- | --------- +ACE_Rallypoint_West | Rallypoint West | FlagCarrier | +ACE_Rallypoint_East | Rallypoint East | FlagCarrier | +ACE_Rallypoint_Independent | Rallypoint Independent | FlagCarrier | +ACE_Rallypoint_West_Base | Rallypoint West (Base) | FlagCarrier | +ACE_Rallypoint_East_Base | Rallypoint East (Base) | FlagCarrier | +ACE_Rallypoint_Independent_Base | Rallypoint Independent (Base) | FlagCarrier | + +## Vector `added in 3.0.0.3` -classname | in game name | type | +class name | in game name | type | --------- | --------- | --------- ACE_Vector | Vector 21 | Binoculars | -### Vehicle lock +## Vehicle Lock `added in 3.0.0.3` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_key_master | Vehicle Key: Master | ACE_ItemCore | ACE_key_lockpick | Lockpick | ACE_ItemCore | ACE_key_west | Vehicle Key: West | ACE_ItemCore | @@ -287,41 +301,41 @@ ACE_key_east | Vehicle Key: East | ACE_ItemCore | ACE_key_indp | Vehicle Key: Independent | ACE_ItemCore | ACE_key_civ | Vehicle Key: Civilian | ACE_ItemCore | -### Sandbag +## Sandbag `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Sandbag_empty | Sandbag (empty) | ACE_ItemCore | ACE_SandbagObject | Sandbag | ThingX | -### Spotting scope +## Spotting Scope `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_SpottingScope | Spotting Scope | ACE_ItemCore | ACE_SpottingScopeObject | Spotting Scope (placed) | StaticATWeapon | -### Tactical ladder +## Tactical Ladder `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_TacticalLadder_Pack | Telescopic Ladder | Backpack | ACE_Tactical_Ladder | Telescopic Ladder (placed) | house | -### Tripod +## Tripod `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Tripod | SSWT Kit | ACE_ItemCore | ACE_TripodObject | SSWT Kit (placed) | ThingX | -### Yardage 450 +## Yardage 450 `added in 3.1.1` -classname | in game name | type | ---------- | --------- | --------- +class name | in game name | type | +---------- | --------- | --------- ACE_Yardage450 | Yardage 450 | Binocular | \ No newline at end of file diff --git a/documentation/missionmaker/mission-tools.md b/documentation/missionmaker/mission-tools.md index ead87303a6..eeb4c2be06 100644 --- a/documentation/missionmaker/mission-tools.md +++ b/documentation/missionmaker/mission-tools.md @@ -10,18 +10,19 @@ parent: wiki ## 1. ACE Rallypoints *Part of: ace_respawn* -"ACE rally points" is a two way teleport system between two positions. Usually this is used to transport units that have died during a mission back to the front line. The rally points are portrayed by flagpoles (West, East and Independant flagpoles are available) that have a "Base" and an "Exit" version. +"ACE Rallypoints" is a two way teleport system between two positions. Usually this is used to transport units that have died during a mission back to the front line. The rally points are portrayed by flagpoles (West, East and Independant flagpoles are available) that have a "Base" and an "Exit" version. They can be found in the editor under: "Empty" >> "ACE Respawn" **Classnames:** -* `ACE_Rallypoint_West`, `ACE_RallypointExit_West` -* `ACE_Rallypoint_East`, `ACE_RallypointExit_East` -* `ACE_Rallypoint_Independent`, `ACE_RallypointExit_Independent` +- `ACE_Rallypoint_West`, `ACE_Rallypoint_West_Base` +- `ACE_Rallypoint_East`, `ACE_Rallypoint_East_Base` +- `ACE_Rallypoint_Independent`, `ACE_Rallypoint_Independent_Base` Using the Interaction Menu on a rallypoint offers the ability to teleport from one flagpole to the other flagpole and vice versa. If you want to change the texture of the flag use this line: + ```c++ this setFlagTexture 'path\to\my\texture\my_awesome_clan_logo.paa'; ``` @@ -32,7 +33,7 @@ All units synced to the ["Rallypoint System" module](./modules.html#1.14-rallypo
Note:
-

It's important to mention that this doesn't work for player who join during a mission (JIP = Join in progress). That's something we can't change because that's the way Bohemia has implemented their module framework.

+

It's important to mention that this doesn't work for player who join during a mission (JIP = Join in progress). That's something we can't change because that's the way Bohemia Interactive has implemented their module framework.

To enable other units to move them add this to the unit's initialization code: @@ -57,4 +58,81 @@ this setVariable ["ACE_CanSwitchUnits", true]; ``` Once this player spawns, all controllable AI will be marked on his map and he'll be able to click on the map to switch to this unit. The initial unit will be prone to damage, but has no equipment and can't run. So it would be wise to hide or move this unit far from other players. -The [module settings](./modules.html#1.16-switchunits-system) define which side a player can control or how big the radius of the safe zone is. The safe zone is a circular zone around AI units that must be clear from players of an opposing side to be able to switch to. \ No newline at end of file +The [module settings](./modules.html#1.16-switchunits-system) define which side a player can control or how big the radius of the safe zone is. The safe zone is a circular zone around AI units that must be clear from players of an opposing side to be able to switch to. + +## 3. ACE Slideshow +*Part of: ace_slideshow* + +"ACE Slideshow" is a very powerful tool for mission makers and platoon leaders giving them the power to project images on some objects. +You will now learn how to set up everything for it to work properly. + +### 3.1 The module explained +Name | Explanation +---- | ----- +Objects | Name of the objects used as screens +Controllers | Name of the objects used as controllers +Images | Full path of the image from the mission folder/file or from an other mod (even BI PBOs work) +Interaction names | Name of your interactions +Slide duration | 0 (0 = disabled, number is in seconds) + +- Only objects with hiddenSelection 0 can be used as "screens". +- If you set a duration the remotes will be disabled. (If the remotes are disabled `ace_interaction` is not needed) +- You can have multiple sets of images on different screens, see the advanced slideshow below. +- It is advisable images resolution sizes are powers of 2 (eg. 512x512) to avoid graphical glitches in them. + +
+
Note:
+

Mission MUST be in a PBO format (not bare folder) when used on a dedicated server due to an [issue](http://feedback.arma3.com/view.php?id=22310) to prevent errors.

+
+ +### 3.2 Basic slideshow +*A set of 4 images that are swapped via a remote* + +Note that all names and interaction names are examples. + +- First place the slideshow module down. +- Place the object that will be used as a "screen" and give it the name `foo1` +- Place the object you want to use as a remote and name it `bar1` +- In your mission folder create a new folder called images and drop your banana images there. +- Place down the module and fill it as follows: + +Name | Written +---- | ----- +Objects | foo1 +Controllers | bar1 +Images | images\banana1.jpg,images\banana2.jpg,images\banana3.jpg,images\banana4.jpg +Interaction names | banana1,banana2,banana3,banana4 +Slide duration | 0 + +- Go in game and enjoy your bananas + +### 3.3 Multiple screens and remotes +*2 set of "screens" and remotes* + +- First place the slideshow module down. +- Place 2 objects that you want to use as "screens" and call them `foo1` and `foo2` +- Place 2 objects you want to use as remotes and call them `bar1` and `bar2` +- In your mission folder create a new folder called images and drop your banana images there. +- Place down 2 modules and fill them as follows: + +*Module 1* + +Name | Written +---- | ----- +Objects | foo1 +Controllers | bar1 +Images | images\banana1.jpg,images\banana2.jpg +Interaction names | banana1,banana2 +Slide duration | 0 + +*Module 2* + +Name | Written +---- | ----- +objects | foo2 +Controllers | bar2 +images | images\banana3.jpg,images\banana4.jpg +Interaction names | banana3,banana4 +Slide duration | 0 + +- You now have two set of "screens" with a remote each. \ No newline at end of file diff --git a/documentation/missionmaker/modules.md b/documentation/missionmaker/modules.md index 5708a16379..9ee9ee7e57 100644 --- a/documentation/missionmaker/modules.md +++ b/documentation/missionmaker/modules.md @@ -15,54 +15,29 @@ This module allows enabling and configuring advanced ballistic simulations. **Settings:** -1. **Advanced Ballistics (Boolean)**
-Enables advanced ballistics.
-`Default value: No` - -2. **Enabled For Snipers (Boolean)**
-Enables advanced ballistics for non local snipers (when using high power optics).
-`Default value: Yes` - -3. **Enabled For Group Members (Boolean)**
-Enables advanced ballistics for non local group members.
-`Default value: No` - -4. **Enabled For Everyone (Boolean)**
-Enables advanced ballistics for all non local players (enabling this feature may degrade performance during heavy firefights in multiplayer).
-`Default value: No` - -5. **Disabled In FullAuto Mode (Boolean)**
-Disables the advanced ballistics during full auto fire.
-`Default value: No` - -6. **Enable Ammo Temperature Simulation (Boolean)**
-Muzzle velocity varies with ammo temperature.
-`Default value: Yes` - -7. **Enable Barrel Length Simulation (Boolean)**
-Muzzle velocity varies with barrel length.
-`Default value: Yes` - -8. **Enable Bullet Trace Effect (Boolean)**
-Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics).
-`default value: Yes ` - -9. **Simulation Interval (Number)**
-Defines the interval between every calculation step.
-`Default value: 0.00` - -10. **Simulation Radius (Number)**
-Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles.
-`Default value: 3000` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Advanced Ballistics | Boolean | Enables advanced ballistics. | No +Enabled For Snipers | Boolean | Enables advanced ballistics for non local snipers (when using high power optics). | Yes +Enabled For Group Members | Boolean | Enables advanced ballistics for non local group members.| No +Enabled For Everyone | Boolean | Enables advanced ballistics for all non local players (enabling this feature may degrade performance during heavy firefights in multiplayer). | No +Disabled In FullAuto Mode | Boolean | Disables the advanced ballistics during full auto fire. | No +Enable Ammo Temperature Simulation | Boolean | Muzzle velocity varies with ammo temperature. | Yes +Enable Barrel Length Simulation | Boolean | Muzzle velocity varies with barrel length. | Yes +Enable Bullet Trace Effect | Boolean | Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics). | Yes +Simulation Interval | Number | Defines the interval between every calculation step. | 0.00 +Simulation Radius | Number | Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles. | 3000 ### 1.2 Allow Config Export *Part of: ace_Optionmenu* This modules allows to export all current ACE3 settings from the ACE3 Option menu to the clipboard and RPT file. -1. **Allow (Boolean)**
-Enables the "export" button in the ACE3 Option menu
-`Default value: Yes` +**Settings:** + +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Allow | Boolean | Enables the "export" button in the ACE3 Option menu. | Yes ### 1.3 BlueForceTracking *Part of: ace_map* @@ -71,12 +46,11 @@ When adding the "Blue Force Tracking" module to your mission it adds map markers **Settings:** -1. **Interval (Number)**
-How often the markers should be refreshed (in seconds).
-`Default value: 1` -2. **Hide AI Groups (Boolean)**
-Hide markers for "AI only" groups.
-`Default value: No` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +BFT Enable | Boolean | Enable blue force tracking | No +Interval | Number | How often the markers should be refreshed (in seconds). | 1 +Hide AI Groups | Boolean | Hide markers for "AI only" groups. | No ### 1.4 Captives settings *Part of: ace_captives* @@ -86,13 +60,10 @@ Very useful if you don't want your players to be able to restrict each others. **Settings:** -1. **Can handcuff own side (Boolean)**
-Determine if you are able to handcuff your own side or not.
-`Default value: Yes` - -2. **Allow surrendering (Boolean)**
-Determine if you are able to surrender or not when your weapon is holstered.
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Can handcuff own side | Boolean | Determine if you are able to handcuff your own side or not. | Yes +Allow surrendering | Boolean | Determine if you are able to surrender or not when your weapon is holstered. | Yes ### 1.5 Check PBOs *Part of: ace_common* @@ -105,17 +76,15 @@ If you are worried that players haven't updated ACE3 or other mods to the versio **Settings:** -1. **Action (Option)**
-What to do with people who do not have the right PBOs.
-`Default value: "Warn once"` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Action | Option | What to do with people who do not have the right PBOs. | "Warn once" +Check all addons | Boolean | Check all addons instead of only those of ACE3? | "No" -2. **Check all addons (Boolean)**
-Check all addons instead of only those of ACE3?
-`Default value: "No"` - -3. **Whitelist**
-You can make a whitelist of addons that don't have to be on the server. If you want to use the "Check all addons" option of this module and allow the usage of client side modifications like Blastcore or JSRS, you have to list them here. -The list must be in the following format: `["ADDON1","ADDON2",...]` where the addons are CfgPatches references to all PBOs of the optional mod. To figure these out, you can use the scripting command `activatedAddons` in the editor while those mods are enabled. + **Whitelist** + +You can make a whitelist of addons that don't have to be on the server. If you want to use the "Check all addons" option of this module and allow the usage of client side modifications like Blastcore or JSRS, you have to list them here. +The list must be in the following format: `["ADDON1","ADDON2",...]` where the addons are CfgPatches references to all PBOs of the optional mod. To figure these out, you can use the scripting command `activatedAddons` in the editor while those mods are enabled. Example 1: @Blastcore-A3:
``` @@ -132,7 +101,6 @@ Example 3: @JSRS + @Blastcore-A3:
[TBD, "warfxpe","blastcore_vep"] ``` - ### 1.6 Explosive System *Part of: ace_explosive* @@ -140,138 +108,119 @@ The "Explosive System" module lets you tweak the settings for the new explosive **Settings:** -1. **Require specialists? (Boolean)**
-Require explosive specialists to disable explosives.
-`Default value: No` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Require specialists? | Boolean | Require explosive specialists to disable explosives. | No +Punish non-specialists? | Boolean | Increase the time it takes to complete actions for non-specialists. | Yes +Explode on defusal? | Boolean | Enables certain explosives to explode on defusal? | Yes -2. **Punish non-specialists? (Boolean)**
-Increase the time it takes to complete actions for non-specialists.
-`Default value: Yes` +### 1.7 Finger settings +*Part of ace_finger* +This module allow you to tweak settings for finger pointing such as is if it's enabled or the distance people can see you finger things -### 1.7 Friendly Fire Messages +**Settings:** + +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Finger pointing enabled | Boolean | | Yes +Finger Max Range | Number | How far away players can finger each others (in meters) | 4 + +### 1.8 Friendly Fire Messages *Part of: ace_respawn* The "Friendly Fire Messages" module triggers a message when a player kills a friendly or civilian unit. This module isn't needed on servers with a low difficulty setting. - -### 1.8 Hearing +### 1.9 Hearing *Part of: ace_hearing* -Placing this modules allows you to disable combat deafness usually triggerd by loud explosions or heavy weapons in a players proximity. +Placing this modules allows you to disable combat deafness usually triggered by loud explosions or heavy weapons in a players proximity. **Settings:** -1. **Enable combat deafness? (Boolean)***
-Enable combat deafness?
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Enable combat deafness? | Boolean | Enable combat deafness? | Yes - -### 1.9 Interaction System +### 1.10 Interaction System *Part of: ace_interaction* This module allows you to tweak if players should be able to use team management functions (e.g. "switch group", "become leader"). **Settings:** -1. **Enable Team Management (Boolean)**
-Should players be allowed to use the Team Management Menu?.
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Enable Team Management | Boolean | Should players be allowed to use the Team Management Menu?. | Yes -### 1.10 Make Unit Surrender +### 1.11 LSD Vehicles +*part of ace_common* + +Any vehicle linked to this module will become a seizure inducing machine of doom, no, really. + +### 1.12 Make Unit Surrender *Part of: ace_captives* -Syncing units to that module sets them in the captive state with their arms behind their back. Usefull for e.g. hostage rescue missions. +Syncing units to that module sets them in the captive state with their arms behind their back. Useful for e.g. hostage rescue missions. - -### 1.11 Map +### 1.13 Map *Part of: ace_map* -ACE3 introdcues a bit more realism for the vanilla Arma 3 map and how it behaves. Some of these settings can be toggled by this module. +ACE3 introduces a bit more realism for the vanilla Arma 3 map and how it behaves. Some of these settings can be toggled by this module. **Settings:** -1. **Map illumination? (Boolean)**
-Calculate dynamic map illumination based on light conditions?.
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Map illumination? | Boolean | Calculate dynamic map illumination based on light conditions?. | Yes +Map shake? | Boolean | Make map shake when walking?. | Yes +Limit map zoom? | Boolean | Limit the amount of zoom available for the map?. | No +Show cursor coordinates? | Boolean | Show the grid coordinates on the mouse pointer?. | No -2. **Map shake? (Boolean)**
-Make map shake when walking?.
-`Default value: Yes` - -3. **Limit map zoom? (Boolean)**
-Limit the amount of zoom available for the map?.
-`Default value: No` - -4. **Show cursor coordinates? (Boolean)**
-Show the grid coordinates on the mouse pointer?.
-`Default value: No` - - -### 1.12 MicroDAGR Map Fill +### 1.14 MicroDAGR Map Fill *Part of: ace_microdagr* Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap. **Settings:** -1. **MicroDAGR Map Fill (Option)**
-How much map data is filled on MicroDAGR's.
-`Default value: "Full Satellite + Buildings"` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +MicroDAGR Map Fill | Option | How much map data is filled on MicroDAGR's. | "Full Satellite + Buildings" - -### 1.13 MK6 Settings +### 1.15 MK6 Settings *Part of: ace_mk6mortar* -ACE3 now includes the first iteration of getting a less arcady point and click mortar experience. -Placing this modules allows you to enable the increased realism in game. +ACE3 now includes the first iteration of getting a less arcady point and click mortar experience. +Placing this modules allows you to enable the increased realism in game. **Settings:** -1. **Air Resistance (Boolean)**
-For Player Shots, Model Air Resistance and Wind Effects.
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Air Resistance | Boolean | For Player Shots, Model Air Resistance and Wind Effects. | No +Allow MK6 Computer | Boolean | Show the Computer and Rangefinder (these **NEED** to be removed if you enable air resistance). | No +Allow MK6 Compass | Boolean | Show the MK6 Digital Compass. | Yes -2. **Allow MK6 Computer (Boolean)**
-Show the Computer and Rangefinder (these **NEED** to be removed if you enable air resistance).
-`Default value: No` - -3. **Allow MK6 Compass (Boolean)**
-Show the MK6 Digital Compass.
-`Default value: Yes` - -### 1.14 Name Tags +### 1.16 Name Tags *Part of: ace_nametags* This module allows you to tweak the settings for player names tags. **Settings:** -1. **Show player names (Option)**
-Let you choose when nametags appears.
-`Default value: "Do Not Force"` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Show player names | Option | Let you choose when nametags appears. | "Do Not Force" +layer Names View Distance | Number | Distance (in meters) at which player names are shown. | 5 +Show name tags for AI? | Option | Show the name and rank tags for friendly AI units, or by default allows players to choose it on their own. | "Do Not Force" +Show crew info? | Option | Show vehicle crew info, or by default allows players to choose it on their own. | "Do Not Force" +Show for Vehicles? | Boolean | Show cursor NameTag for vehicle commander (only if client has name tags enabled). | No -2. **Player Names View Distance (Number)**
-Distance (in meters) at which player names are shown.
-`Default value: 5` - -3. **Show name tags for AI? (Option)**
-Show the name and rank tags for friendly AI units, or by default allows players to choose it on their own.
-`Default value: "Do Not Force"` - -4. **Show crew info? (Option)**
-Show vehicle crew info, or by default allows players to choose it on their own.
-`Default value: "Do Not Force"` - -5. **Show for Vehicles? (Boolean)**
-Show cursor NameTag for vehicle commander (only if client has name tags enabled).
-`Default value: No` - - -### 1.15 Rallypoint System +### 1.17 Rallypoint System *Part of: ace_respawn* -This module enables Mission Makers to specificly enable units to move a rallypoint. Every unit that is synced with that module is able to move a rallypoint. +This module enables Mission Makers to specifically enable units to move a rallypoint. Every unit that is synced with that module is able to move a rallypoint.
Note:
@@ -280,99 +229,81 @@ This module enables Mission Makers to specificly enable units to move a rallypoi To enable JIP players to move rally points have a look at [ACE3 Rallypoints](./mission-tools.html#1.-ace-rallypoints). - -### 1.16 Respawn System +### 1.18 Respawn System *Part of: ace_respawn* The "Respawn System" module enables players to respawn with the gear they had before dying and to remove bodies of players after a configurable interval (in seconds). **Settings:** -1. **Save Gear? (Boolean)**
-Respawn with the gear a player had just before his death.
-`Default value: No` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Save Gear? | Boolean | Respawn with the gear a player had just before his death. | No +### 1.19 Sitting +*part of ace_sitting* -### 1.17 SwitchUnits System -*Part of: ace_switchunits* - -The [SwitchUnits System](./mission-tools.html#2.-ace-switchunits) enables players to control certain AI units on the map. +This module is used to turn sitting on. **Settings:** -1. **Switch To West? (Boolean)**
-Allow switching to west units?
-`Default value: No` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Enable sitting | Boolean | | Yes -2. **Switch To East? (Boolean)**
-Allow switching to east units?
-`Default value: No` +### 1.20 SwitchUnits System +*Part of: ace_switchunits* -3. **Switch To Independent? (Boolean)**
-Allow switching to independent units?
-`Default value: No` +The [SwitchUnits System](./mission-tools.html#2.-ace-switchunits) enables players to control certain AI units on the map. -4. **Switch To Civilian? (Boolean)**
-Allow switching to civilian units?
-`Default value: No` +**Settings:** -5. **Enable Safe Zone? (Boolean)**
-Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone.
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Switch To West? | Boolean | Allow switching to west units? | No +Switch To East? | Boolean | Allow switching to east units? | No +Switch To Independent? | Boolean | Allow switching to independent units? | No +Switch To Civilian? | Boolean | Allow switching to civilian units? | No +Enable Safe Zone? | Boolean | Enable a safe zone around enemy units? Players can't switch to units inside of the safe zone. | Yes +Safe Zone Radius | Number | The safe zone around players from a different team (in meters). | 200 -6. **Safe Zone Radius (Number)**
-The safe zone around players from a different team (in meters)
-`Default value: 200` - - -### 1.18 Vehicle Lock +### 1.21 Vehicle Lock *Part of: ace_vehiclelock* These modules allow you to lock and unlock vehicles and their inventory using a key. Players don't receive a key automatically; for key names, see [Classnames Wiki](http://ace3mod.com/wiki/missionmaker/classnames.html#vehicle-lock). -#### 1.18.1 Vehicle Key Assign -Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start. +#### 1.21.1 Vehicle Key Assign +Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start. Example: `[bob, car1, true] call ACE_VehicleLock_fnc_addKeyForVehicle;` - will add a key to bob and program it to work only on car1 -#### 1.18.2.1 Vehicle Lock Setup +#### 1.21.2.1 Vehicle Lock Setup Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states. **Settings:** -1. **Lock Vehicle Inventory? (Boolean)**
-Locks the inventory of locked vehicles
-`Default value: No` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Lock Vehicle Inventory? | Boolean | Locks the inventory of locked vehicles. | No +Vehicle Starting Lock State | Option | Set lock state for all vehicles (removes ambiguous lock states). | "As Is" +Default Lockpick Strength | Number | Default Time to lockpick (in seconds). | 10 -2. **Vehicle Starting Lock State (Option)**
-Set lock state for all vehicles (removes ambiguous lock states)
-`Default value: "As Is"` - -3. **Default Lockpick Strength (Number)**
-Default Time to lockpick (in seconds)
-`Default value: 10` - -#### 1.18.2.2 Vehicle setVariables +#### 1.21.2.2 Vehicle setVariables * `ACE_VehicleLock_lockSide` - SIDE: overrides a vehicle's side, allowing locking and unlocking using a different side's key. For example: Unlocking INDEP vehicles with a BLUFOR key. * `ACE_vehicleLock_lockpickStrength` - NUMBER: seconds, determines how long lockpicking with take, overrides the value set in the module for a specific vehicle of the mission maker's choice. - -### 1.19 View Distance Limiter +### 1.22 View Distance Limiter *Part of: ace_viewdistance* This module allows disabling the ACE3 View Distance feature as well as setting a view distance limit. **Settings:** -1. **Enable ACE viewdistance (Boolean)**
-Enables ACE viewdistance
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Enable ACE viewdistance | Boolean | Enables ACE viewdistance. | Yes +View Distance Limit | Number | Sets the limit for how high clients can raise their view distance (<= 10 000) | 10000 -2. **View Distance Limit (Number)**
-Sets the limit for how high clients can raise their view distance (<= 10000) -`Default value: 10000` - - -### 1.20 Weather +### 1.23 Weather *Part of: ace_weather* This module allows you to customize the weather settings. @@ -384,40 +315,16 @@ This module allows you to customize the weather settings. **Settings:** -1. **Weather propagation (Boolean)**
-Enables sever side weather propagation.
-`Default value: Yes` -
-
Note:
-

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

-
+Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Weather propagation | Boolean | Enables sever side weather propagation.(This is responsible for synchronizing weather between all clients. Disabling it is **NOT** recommended). | Yes +ACE3 Weather | Boolean | Overrides the default weather with ACE3 weather (map based)(This can be disabled without affecting the weather propagation above. Useful if you prefer changing weather settings manually). | Yes +Sync Rain | Boolean | Synchronizes rain. | Yes +Sync Wind | Boolean | Synchronizes wind. | Yes +Sync Misc | Boolean | Synchronizes lightnings, rainbow, fog, ... | Yes +Update Interval | Number | Defines the interval (seconds) between weather updates. | 60 -2. **ACE3 Weather (Boolean)**
-Overrides the default weather with ACE3 weather (map based).
-`Default value: Yes` -
-
Note:
-

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

-
- -3. **Sync Rain (Boolean)**
-Synchronizes rain.
-`Default value: Yes` - -4. **Sync Wind (Boolean)**
-Synchronizes wind.
-`Default value: Yes` - -5. **Sync Misc (Boolean)**
-Synchronizes lightnings, rainbow, fog, ...
-`Default value: Yes` - -6. **Update Interval (Number)**
-Defines the interval (seconds) between weather updates.
-`Default value: 60` - - -### 1.21 Wind Deflection +### 1.24 Wind Deflection *Part of: ace_winddeflection* This module allows you to define when wind deflection is active. @@ -434,56 +341,27 @@ This module allows you to define when wind deflection is active. **Settings:** -1. **Wind Deflection (Boolean)**
-Enables wind deflection.
-`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Wind Deflection | Boolean | Enables wind deflection. | Yes +Vehicle Enabled | Boolean | Enables wind deflection for static/vehicle gunners. | Yes +Simulation Interval | Number | Defines the interval between every calculation step. | 0.05 +Simulation Radius | Number | Defines the radius around the player (in meters) at which projectiles are wind deflected. | 3000 -2. **Vehicle Enabled (Boolean)**
-Enables wind deflection for static/vehicle gunners.
-`Default value: Yes` - -3. **Simulation Interval (Number)**
-Defines the interval between every calculation step.
-`Default value: 0.05` - -4. **Simulation Radius (Number)**
-Defines the radius around the player (in meters) at which projectiles are wind deflected.
-`Default value: 3000` - -### 1.22 Zeus Settings +### 1.25 Zeus Settings *part of: ace_zeus* This module provides control over vanilla aspects of Zeus. **Settings:** -1. **Ascension Messages (Option)**
-Display global popup messages when a player is assigned as Zeus
-`Default value: No` - -2. **Zeus Eagle (Boolean)**
-Spawn an eagle that follows the Zeus camera
-`Default value: No` - -3. **Wind Sounds (Boolean)**
-Play wind sounds when Zeus remote controls a unit
-`Default value: No` - -4. **Ordnance Warning (Boolean)**
-Play a radio warning when Zeus uses ordnance
-`Default value: No` - -5. **Reveal Mines (Scalar)**
-Reveal mines to allies and/or place map markers
-`Default value: Disabled` - -### 1.23 LSD Vehicles -*Part of: ace_core* - -And then there's the "LSD Vehicles" module … it does 'something' to all vehicles synced to that module. -
- -
+Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Ascension Messages | Boolean | Display global pop-up messages when a player is assigned as Zeus. | No +Zeus Eagle | Boolean | Spawn an eagle that follows the Zeus camera. | No +Wind Sounds | Boolean | Play wind sounds when Zeus remote controls a unit. | No +Ordnance Warning | Boolean | Play a radio warning when Zeus uses ordnance. | No +Reveal Mines | Option | Reveal mines to allies and place map markers. | "Disabled" ## 2. ACE3 Medical *Part of: ace_medical* @@ -494,58 +372,21 @@ This module allows to tweak all the medical settings used in ACE3 **Settings:** -1. **Medical Level (Option)**
-What is the medical simulation level?
-`Default value: "Basic"` - -2. **Medics setting (Option)**
-What is the level of detail preferred for medics?
-`Default value: "Normal"` - -3. **Enable Litter (Boolean)**
-Enable litter being created upon treatment.
-`Default value: "Yes"` - -4. **Life time of litter objects (Number)**
-How long should litter objects stay? In seconds. -1 is forever.
-`Default value: 1800` - -5. **Enable Screams (Boolean)**
-Enable screaming by injured units.
-`Default value: Yes` - -6. **Player Damage (Number)**
-What is the damage a player can take before being killed?
-`Default value: 1` - -7. **AI Damage (Number)**
-What is the damage an AI can take before being killed?
-`Default value: 1` - -8. **AI Unconsciousness (Option)**
-Allow AI to go unconscious.
-`Default value: "50/50"` - -9. **Remote controlled AI (Boolean)**
-Treats remote controlled units as AI not players ? -`Default value: Yes` - -10. **Prevent instant death (Boolean)**
-Have a unit move to unconscious instead of death.
-`Default value: No` - -11. **Bleeding coefficient (Number)**
-Coefficient to modify the bleeding speed.
-`Default value: 1` - -12. **Pain coefficient (Number)**
-Coefficient to modify the pain intensity.
-`Default value: 1` - -13. **Sync status (Boolean)**
-Keep unit status synced. Recommended on.
-`Default value: Yes` - +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Medical Level | Option | What is the medical simulation level? | "Basic" +Medics setting | Option | What is the level of detail preferred for medics? | "Basic" +Enable Litter | Boolean | Enable litter being created upon treatment. | "Yes" +Life time of litter objects | Number | How long should litter objects stay? In seconds. -1 is forever. | 1800 +Enable Screams | Boolean | Enable screaming by injured units. | Yes +Player Damage | Number | What is the damage a player can take before being killed? | 1 +AI Damage | Number | What is the damage an AI can take before being killed? | 1 +AI Unconsciousness | Option | Allow AI to go unconscious. | "50/50" +Remote controlled AI | Boolean | Treats remote controlled units as AI not players? | Yes +Prevent instant death | Boolean | Have a unit move to unconscious instead of death. | No +Bleeding coefficient | Number | Coefficient to modify the bleeding speed. | 1 +Pain coefficient | Number | Coefficient to modify the pain intensity. | 1 +Sync status | Boolean | Keep unit status synced. (Recommended on). | Yes ### 2.2 Advanced Medical Settings @@ -553,82 +394,42 @@ This module allows you to change the default Advanced Medical Settings, when [2. **Settings:** -1. **Enabled for (Option)**
-Select what units the advanced medical system will be enabled for.
-`Default value: "Players only"` - -2. **Enable Advanced wounds (Boolean)**
-Allow reopening of bandaged wounds?
-`Default value: No` - -3. **Vehicle Crashes (Boolean)**
-Do units take damage from a vehicle crash?
-`Default value: Yes` - -4. **Allow PAK (Option)**
-Who can use the PAK for full heal?
-`Default value: "Medics only"` - -5. **Remove PAK on use (Boolean)**
-Should PAK be removed on usage?
-`Default value: Yes` - -6. **Locations PAK (Option)**
-Where can the personal aid kit be used?
-`Default value: "Vehicles & facility"` - -7. **Allow Surgical kit (Option)**
-Who can use the surgical kit?
-`Default value: "Medics only"` - -8. **Remove Surgical kit (Boolean)**
-Should Surgical kit be removed on usage?
-`Default value: Yes` - -9. **Locations Surgical kit (Option)**
-Where can the Surgical kit be used?
-`Default value: "Vehicles & facility"` - -10. **Bloodstains (Boolean)**
-Bandaging removes bloodstains. -`Default value: No` - -11. **Pain supression (Boolean)**
-Pain is only temporarly supressed not removed. -`Default value: Yes` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Enabled for | Option | Select what units the advanced medical system will be enabled for. | "Players only" +Enable Advanced wounds | Boolean | Allow reopening of bandaged wounds? | No +Vehicle Crashes | Boolean | Do units take damage from a vehicle crash? | Yes +Allow PAK | Option | Who can use the PAK for full heal? | "Medics only" +Remove PAK on use | Boolean | Should PAK be removed on usage? | Yes +Locations PAK | Option | Where can the personal aid kit be used? | "Vehicles & facility" +Allow Surgical kit | Option | Who can use the surgical kit? | "Medics only" +Remove Surgical kit | Boolean | Should Surgical kit be removed on usage? | Yes +Locations Surgical kit | Option | Where can the Surgical kit be used? | "Vehicles & facility" +Bloodstains | Boolean | Bandaging removes bloodstains. | No +Pain suppression | Boolean | Pain is only temporarily suppressed not removed. | Yes ### 2.3 Revive Settings -This modules allows a mission maker to limit the amount of revives for units in basic and advanced medical. +This modules allows a mission maker to limit the amount of revives for units in basic and advanced medical. **Settings:** -1. **Enable Revive (Option)**
-Enable a basic revive system
-`Default value: "disable"` - -2. **Max Revive time (Number)**
-Max amount of seconds a unit can spend in revive state
-`Default value: 120` - -3. **Max Revive lives (Number)**
-Max amount of lives a unit. 0 or -1 is disabled.
-`Default value: -1` - +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Enable Revive | Option | Enable a basic revive system. | "disabled" +Max Revive time | Number | Max amount of seconds a unit can spend in revive state | 120 +Max Revive lives | Number | Max amount of lives a unit. 0 or -1 is disabled. | -1 ### 2.4 Set Medic Class -Using this module you can define which unit class is defined as a medic / doctor. +Using this module you can define which unit class is defined as a medic / doctor. **Settings:** -1. **List (String)**
-List of unit names that will be classified as medic, separated by commas.
-`Default value: ""` - -2. **Is Medic (Boolean)**
-Medics allow for more advanced treatment in case of Advanced Medic roles enabled
-`Default value: "Regular medic"` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +List | String | List of unit names that will be classified as medic, separated by commas. | "" +Is Medic | Boolean | Medics allow for more advanced treatment in case of Advanced Medic roles enabled. | "Regular medic" ### 2.5 Set Medical Facility @@ -637,10 +438,9 @@ Defines an object as a medical facility. This allows for more advanced treatment **Settings:** -1. **Is Medical Facility (Boolean)**
-Registers an object as a medical facility.
-`Default value: Yes` - +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Is Medical Facility | Boolean | Registers an object as a medical facility. | Yes ### 2.6 Set Medical Vehicle @@ -648,21 +448,17 @@ Defines an object as a medical facility. This allows for more advanced treatment **Settings:** -1. **List (String)**
-List of vehicles that will be classified as medical vehicle, separated by commas.
-`Default value: ""` - -2. **Is Medical Vehicle (Boolean)**
-Whether or not the objects in the list will be a medical vehicle.
-`Default value: Yes` - +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +List | String | List of vehicles that will be classified as medical vehicle, separated by commas. | "" +Is Medical Vehicle | Boolean | Whether or not the objects in the list will be a medical vehicle. | Yes ## 3. ACE3 Mission Modules *Part of: ace_missionmodules* ### 3.1 Ambiance Sounds -Used for ambiance sounds loop (synced across MP). +Used for ambiance sounds loop (synced across MP). This module randomizes the time when the sound file is played and the position where the sound file is played (If "Follow Players" is set to No). `Minimal Distance` and `Maximal Distance` influence the position from where the sound file is played. Setting both values to 0 forces the module to play the sound from where it was placed in the editor. @@ -670,30 +466,27 @@ This module randomizes the time when the sound file is played and the position w **Settings:** -1. **Sounds (String)**
-Class names of the ambiance sounds played. Separated by ','. (Example: `radio_track_01, electricity_loop`).
-`Default value: ""` +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Sounds | String | Class names of the ambiance sounds played. Separated by ','. (Example: `radio_track_01, electricity_loop`)| "" +Minimal Distance | Number | Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) (in meters) | 400 +Maximum Distance | Number | Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) (in meters) | 900 +Minimal Delay | Number | Minimal delay (in seconds) between sounds played | 10 +Maximum Delay | Number | Maximum delay (in seconds) between sounds played | 10 +Follow Players | Boolean | Follow players. If set to false, loop will play sounds only nearby logic position. | No +Volume | Number | The volume of the sounds played. | 1 -2. **Minimal Distance (Number)**
-Used for calculating a random position and sets the minimal distance between the players and the played sound file(s) (in meters)
-`Default value: 400` +### 3.2 Slideshow +*part of ace_slideshow* -3. **Maximum Distance (Number)**
-Used for calculating a random position and sets the maximum distance between the players and the played sound file(s) (in meters)
-`Default value: 900` +This module is the core of `ace_slideshow` for more informations about slideshow check [the mission-tools section](./mission-tools.html) -4. **Minimal Delay (Number)**
-Minimal delay (in seconds) between sounds played
-`Default value: 10` +**Settings:** -5. **Maximum Delay (Number)**
-Maximum delay (in seconds) between sounds played
-`Default value: 10` - -6. **Follow Players (Boolean)**
-Follow players. If set to false, loop will play sounds only nearby logic position.
-`Default value: No` - -7. **Volume (Number)**
-The volume of the sounds played
-`Default value: 1` \ No newline at end of file +Name | Type | Description | Default value +---- | ---- | ---- | ---- | +Objects | String | Object names (can also be synchronized objects) slide-show will be displayed on, separated by commas if multiple. | "" +Controllers | String | Controller object names, separated by commas if multiple. | "" +Images | String | List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). | "" +Interaction names | String | List of names that will be used for interaction entries, separated by commas, in order of images. | Number | | 0 "" +Slide Duration | Number | Duration of each slide (in seconds) (0 = automatic slides disabled) | 0 \ No newline at end of file diff --git a/documentation/user/getting-started.md b/documentation/user/getting-started.md deleted file mode 100644 index 6e18cdb278..0000000000 --- a/documentation/user/getting-started.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: wiki -title: Getting started -description: Downloaded ACE3 and have no idea where to start? This page serves as a document to help new players get started with things like the medical system, or how to adjust your scope. -group: user -order: 0 -parent: wiki ---- - -Downloaded ACE3 and have no idea where to start? This page serves as a document to help new players and mission makers understand what's available to them. - -- You don't know where to begin your ACE3 journey? [**Check out ACE3 features**](http://ace3mod.com/wiki/feature/) - -- You are a mission maker but you don't know what ACE3 have to offer? [**We have some documentation for you**](http://ace3mod.com/wiki/missionmaker/) - -- Are you searching for ACE3 classnames ? [**Here they are**](http://ace3mod.com/wiki/missionmaker/classnames.html) \ No newline at end of file diff --git a/documentation/user/information-center.md b/documentation/user/information-center.md new file mode 100644 index 0000000000..b1a1e8e9f0 --- /dev/null +++ b/documentation/user/information-center.md @@ -0,0 +1,53 @@ +--- +layout: wiki +title: Information center +description: Downloaded ACE3 and have no idea where to start? This page serves as a document to help new players get started with things or get an answer to some of your questions. +group: user +order: 0 +parent: wiki +--- + +Downloaded ACE3 and have no idea where to start? This page serves as a starting point to help new players and mission makers understand what's available to them. + + +- You don't know where to begin your ACE3 journey? [**Check out ACE3 features**](http://ace3mod.com/wiki/feature/) + + +- You are a mission maker but you don't know what ACE3 has to offer? [**We have some documentation for you**](http://ace3mod.com/wiki/missionmaker/) + + +- Are you searching for ACE3 classnames ? [**Here they are**](http://ace3mod.com/wiki/missionmaker/classnames.html) + + +## 1. FAQ +### 1.1 Features +**Q:** Where is X feature?
+**A:** When it's done.
+ +**Q:** Feature X was in ACE2/AGM/CSE where is it?
+**A:** It's going to be ported at some point.
+ +**Q:** Why was my feature request closed on GitHub?
+**A:** Feature requests should initially be added to issue #414 for easy tracking.[HERE](https://github.com/acemod/ACE3/issues/414/) + +**Q:** I want to disable feature X how do I do it?
+**A:** Simply delete the PBO.(note that some features depends on others, check dependencies before deleting anything).
+ +### 1.2 Issues + +**Q:** Laser locking is broken, when are you going to fix it?
+**A:** Fun fact, it isn't, you need to come from the direction of the laser, (laser is pointing to the east, you come from the west) and you drop the GBU, it will then guide itself to the target. The reasoning behind that is that the vehicle or building laser designated would obstruct the laser and the GBU would then be unable to lock on it.
+ +**Q:** I take vanilla damage with ACE 3.1.1
+**A:** This has been fixed on ACE3 master and will be fixed in the next release, in the meantime Basic medical doesn't have that issue.
+ +**Q:** I'm having dll errors.
+**A:** Remove ACE3 from your Arma 3 folder and repeat the installation process (don't forget to re-download).
+ +### 1.3 Compatibility + +**Q:**(mod) doesn't have some ACE3 features.
+**A:**ACE3 isn't and can't be responsible for compatibility with every (mod), due it's size other (mod) authors are strongly encouraged to provide that from their side. Compatibility PBOs currently in ACE3 are there to kick-start and provide examples for (mod) authors.
+ +**Q:** ACE3 causes issues in (mod).
+**A:**If you've found an issue with ACE3 please make sure that ACE3 is really the cause of the problem. To do this try to reproduce the issue with using only @cba_a3 and @ACE3 on a newly created mission. ACE3 isn't and can't be responsible for all mod conflicts, due it's size other mod authors are strongly encouraged to provide that from their side.
\ No newline at end of file diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index 2382e64558..43bd59abaf 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -89,8 +89,8 @@ endif() string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ") set(ACE_VERSION_MAJOR 3) -set(ACE_VERSION_MINOR 0) -set(ACE_VERSION_REVISION 1) +set(ACE_VERSION_MINOR 2) +set(ACE_VERSION_REVISION 0) EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD OUTPUT_VARIABLE T_ACE_VERSION_BUILD OUTPUT_STRIP_TRAILING_WHITESPACE @@ -126,6 +126,7 @@ add_subdirectory(break_line) add_subdirectory(clipboard) add_subdirectory(advanced_ballistics) add_subdirectory(medical) +add_subdirectory(parse_imagepath) # Test Extension for dynamically loading/unloading built extensions; does not build in release if (DEVEL) diff --git a/extensions/parse_imagepath/CMakeLists.txt b/extensions/parse_imagepath/CMakeLists.txt new file mode 100644 index 0000000000..e38a4bb506 --- /dev/null +++ b/extensions/parse_imagepath/CMakeLists.txt @@ -0,0 +1,12 @@ +set(ACE_EXTENSION_NAME "ace_parse_imagepath") + +file(GLOB SOURCES *.h *.hpp *.c *.cpp) +add_library( ${ACE_EXTENSION_NAME} SHARED ${SOURCES} ${GLOBAL_SOURCES}) +target_link_libraries(${ACE_EXTENSION_NAME} ace_common) +set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES PREFIX "") +set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) + +if(CMAKE_COMPILER_IS_GNUCXX) + set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) + set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) +endif() \ No newline at end of file diff --git a/extensions/parse_imagepath/ace_parse_imagepath.cpp b/extensions/parse_imagepath/ace_parse_imagepath.cpp new file mode 100644 index 0000000000..051535e473 --- /dev/null +++ b/extensions/parse_imagepath/ace_parse_imagepath.cpp @@ -0,0 +1,54 @@ +/* + * ace_parse_imagepath.cpp + * Author: PabstMirror + * Gets raw image path from structured text input. + * + * Takes: + * Structured text that usualy has an image: + * Example: ""; + * + * Returns: + * Just the image path or "" if none + */ + +#include "shared.hpp" + +#include +#include + +extern "C" { + __declspec (dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function); +}; + +std::string getImagePathFromStructuredText(const std::string & input) { + std::string returnValue = ""; + std::size_t endIndex = input.find(".paa"); + std::size_t startIndex = endIndex - 1; + if ((endIndex != std::string::npos) && (endIndex > 1)) { + endIndex = endIndex + 4; + while ((startIndex > 0) && (returnValue == "")) { + if ((input[startIndex]) == '\'') { + returnValue = input.substr((startIndex + 1), (endIndex - startIndex - 1)); + }; + startIndex = startIndex - 1; + }; + }; + return returnValue; +} + +// i like to live dangerously. jk, fix strncpy sometime pls. +#pragma warning( push ) +#pragma warning( disable : 4996 ) + +void __stdcall RVExtension(char *output, int outputSize, const char *function) { + ZERO_OUTPUT(); + if (!strcmp(function, "version")) { + strncpy(output, ACE_FULL_VERSION_STR, outputSize); + } else { + strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize); + output[outputSize - 1] = '\0'; + } + EXTENSION_RETURN(); +} + +#pragma warning( pop ) diff --git a/extras/assets/icons/png/Icon_Actions/disarm.png b/extras/assets/icons/Icon_Actions_png/disarm.png similarity index 100% rename from extras/assets/icons/png/Icon_Actions/disarm.png rename to extras/assets/icons/Icon_Actions_png/disarm.png diff --git a/extras/assets/icons/icon_microDAGR.png b/extras/assets/icons/Icon_Actions_png/icon_microDAGR.png similarity index 100% rename from extras/assets/icons/icon_microDAGR.png rename to extras/assets/icons/Icon_Actions_png/icon_microDAGR.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Ambient_Sounds_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Ambient_Sounds_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Ambient_Sounds_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Ambient_Sounds_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_BFTracking_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_BFTracking_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_BFTracking_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_BFTracking_ca.png diff --git a/extras/assets/icons/Icon_Module_png/Icon_Module_Cargo_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Cargo_ca.png new file mode 100644 index 0000000000..0209ed8676 Binary files /dev/null and b/extras/assets/icons/Icon_Module_png/Icon_Module_Cargo_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_CheckPBO_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_CheckPBO_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_CheckPBO_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_CheckPBO_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Explosives_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Explosives_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Explosives_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Explosives_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_FriendlyFire_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_FriendlyFire_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_FriendlyFire_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_FriendlyFire_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Hearing_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Hearing_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Hearing_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Hearing_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Interaction_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Interaction_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Interaction_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Interaction_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_LSD_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_LSD_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_LSD_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_LSD_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Make_Unit_Surrender_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Make_Unit_Surrender_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Make_Unit_Surrender_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Make_Unit_Surrender_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Map_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Map_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Map_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Map_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Medical_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Medical_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Medical_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Medical_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_NameTags_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_NameTags_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_NameTags_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_NameTags_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Rallypoint_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Rallypoint_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Rallypoint_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Rallypoint_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Repair_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Repair_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Repair_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Repair_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Respawn_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Respawn_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Respawn_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Respawn_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Sitting_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Sitting_ca.png diff --git a/extras/assets/icons/Icon_Module_png/Icon_Module_Slideshow_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Slideshow_ca.png new file mode 100644 index 0000000000..f2b08a1746 Binary files /dev/null and b/extras/assets/icons/Icon_Module_png/Icon_Module_Slideshow_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_SwitchUnits_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_SwitchUnits_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_SwitchUnits_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_SwitchUnits_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_VehicleKey_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_VehicleKey_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_VehicleKey_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_VehicleKey_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_VehicleLock_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_VehicleLock_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_VehicleLock_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_VehicleLock_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Wind_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Wind_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Wind_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Wind_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Captive_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Captive_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Captive_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Captive_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Settings_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Settings_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Settings_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Settings_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Surrender_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Surrender_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Surrender_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Surrender_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Unconscious_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Unconscious_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_Zeus_Unconscious_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_Zeus_Unconscious_ca.png diff --git a/extras/assets/icons/png/Icon_Module/Icon_Module_microDAGR_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_microDAGR_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module/Icon_Module_microDAGR_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_microDAGR_ca.png diff --git a/extras/assets/icons/png/Icon_Module_mk6_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_mk6_ca.png similarity index 100% rename from extras/assets/icons/png/Icon_Module_mk6_ca.png rename to extras/assets/icons/Icon_Module_png/Icon_Module_mk6_ca.png diff --git a/extras/assets/icons/Icons_Modules.psd b/extras/assets/icons/Icons_Modules.psd index 927c497ecd..553449898a 100644 Binary files a/extras/assets/icons/Icons_Modules.psd and b/extras/assets/icons/Icons_Modules.psd differ diff --git a/mod.cpp b/mod.cpp index c078328e53..0f16ca182a 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.1.2"; +name = "Advanced Combat Environment 3.2.1"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.1.2"; +description = "ACE3 - Version 3.2.1"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; diff --git a/optionals/compat_bwa3/CfgAmmo.hpp b/optionals/compat_bwa3/CfgAmmo.hpp index 599651ac10..c19e00819a 100644 --- a/optionals/compat_bwa3/CfgAmmo.hpp +++ b/optionals/compat_bwa3/CfgAmmo.hpp @@ -3,6 +3,7 @@ class CfgAmmo { class B_556x45_Ball_Tracer_Red; class B_762x51_Tracer_Red; class B_127x99_Ball_Tracer_Red; + class GrenadeHand; class BWA3_B_556x45_Ball: B_556x45_Ball_Tracer_Red { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -132,4 +133,10 @@ class CfgAmmo { ACE_muzzleVelocities[]={}; ACE_barrelLengths[]={}; }; + class BWA3_G_DM51A1: GrenadeHand { + ace_frag_metal = 296; + ace_frag_charge = 180; + ace_frag_gurney_c = 2930; // Gurney velocity constant for PETN + ace_frag_gurney_k = 1/2; // shape factor for a cylinder + }; }; \ No newline at end of file diff --git a/optionals/compat_bwa3/CfgMagazines.hpp b/optionals/compat_bwa3/CfgMagazines.hpp new file mode 100644 index 0000000000..bf43af6426 --- /dev/null +++ b/optionals/compat_bwa3/CfgMagazines.hpp @@ -0,0 +1,9 @@ +class CfgMagazines { + class CA_Magazine; + class BWA3_200Rnd_556x45: CA_Magazine { + ACE_isBelt = 1; + }; + class BWA3_120Rnd_762x51: CA_Magazine { + ACE_isBelt = 1; + }; +}; \ No newline at end of file diff --git a/optionals/compat_bwa3/CfgWeapons.hpp b/optionals/compat_bwa3/CfgWeapons.hpp index 731396ed73..c0acea9912 100644 --- a/optionals/compat_bwa3/CfgWeapons.hpp +++ b/optionals/compat_bwa3/CfgWeapons.hpp @@ -2,6 +2,7 @@ class CfgWeapons { class Pistol_Base_F; class Rifle_Base_F; class Rifle_Long_Base_F; + class UGL_F; class BWA3_P8: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=108; @@ -30,6 +31,13 @@ class CfgWeapons { ACE_barrelTwist=304.8; ACE_barrelLength=406; }; + class BWA3_G27_AG: BWA3_G27 { + class AG40: UGL_F { + magazines[] += { + "ACE_HuntIR_M203" + }; + }; + }; class BWA3_MG4: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=480; @@ -42,7 +50,11 @@ class CfgWeapons { ACE_barrelTwist=381.0; ACE_barrelLength=736.7; }; - + class AG40: UGL_F { + magazines[] += { + "ACE_HuntIR_M203" + }; + }; class optic_Hamr; class InventoryOpticsItem_Base_F; diff --git a/optionals/compat_bwa3/config.cpp b/optionals/compat_bwa3/config.cpp index e1ca37d121..efdebaf616 100644 --- a/optionals/compat_bwa3/config.cpp +++ b/optionals/compat_bwa3/config.cpp @@ -13,3 +13,4 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgWeapons.hpp" +#include "CfgMagazines.hpp" diff --git a/optionals/compat_rhs_afrf3/CfgMagazines.hpp b/optionals/compat_rhs_afrf3/CfgMagazines.hpp index 6acd70844a..92444a380b 100644 --- a/optionals/compat_rhs_afrf3/CfgMagazines.hpp +++ b/optionals/compat_rhs_afrf3/CfgMagazines.hpp @@ -5,13 +5,13 @@ class cfgMagazines { class rhs_100Rnd_762x54mmR: rhs_30Rnd_545x39_AK { ace_isbelt = 1; }; - class rhs_100Rnd_762x54mmR_green: rhs_100Rnd_762x54mmR { + class rhs_mag_127x108mm_50: VehicleMagazine { ace_isbelt = 1; }; - class rhs_mag_127x108mm_50 : VehicleMagazine { - ace_isbelt = 1; + class rhs_mag_127x108mm_150: rhs_mag_127x108mm_50 { + ace_isbelt = 0; }; - class rhs_mag_127x108mm_150 : rhs_mag_127x108mm_50 { + class rhs_mag_127x108mm_1470 : rhs_mag_127x108mm_50 { ace_isbelt = 0; }; }; \ No newline at end of file diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index 4c3e2e425e..0c3d3dfac4 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -57,7 +57,7 @@ class CfgWeapons ACE_barrelTwist=195.072; ACE_barrelLength=589.28; }; - + class rhs_acc_sniper_base; class rhs_acc_pso1m2: rhs_acc_sniper_base { ACE_ScopeAdjust_Vertical[] = { 0, 0 }; @@ -65,8 +65,29 @@ class CfgWeapons ACE_ScopeAdjust_VerticalIncrement = 0.0; ACE_ScopeAdjust_HorizontalIncrement = 0.5; }; + class Launcher_Base_F; class rhs_weap_rpg7: Launcher_Base_F { ace_reloadlaunchers_enabled = 1; }; + + class H_HelmetB; + class rhs_tsh4: H_HelmetB { + ace_hearing_protection = 1; + ace_hearing_lowerVolume = 0.80; + }; + class rhs_tsh4_ess: rhs_tsh4 {}; + class rhs_tsh4_bala: rhs_tsh4 {}; + class rhs_tsh4_ess_bala: rhs_tsh4 {}; + + class rhs_zsh7a: H_HelmetB { + ace_hearing_protection = 1; + ace_hearing_lowerVolume = 0.80; + }; + class rhs_zsh7a_mike: rhs_zsh7a {}; + + class rhs_gssh18: H_HelmetB { + ace_hearing_protection = 0.5; + ace_hearing_lowerVolume = 0.60; + }; }; \ No newline at end of file diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp index 5e88ad2830..123f80b566 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"rhs_c_weapons"}; + requiredAddons[] = {"rhs_c_weapons", "rhs_c_troops"}; author[]={"Ruthberg"}; VERSION_CONFIG; }; diff --git a/optionals/compat_rhs_usf3/CfgMagazines.hpp b/optionals/compat_rhs_usf3/CfgMagazines.hpp index f067cd6eee..e067d1f293 100644 --- a/optionals/compat_rhs_usf3/CfgMagazines.hpp +++ b/optionals/compat_rhs_usf3/CfgMagazines.hpp @@ -10,16 +10,7 @@ class cfgMagazines { class rhsusf_100Rnd_556x45_M200_soft_pouch: rhs_mag_30Rnd_556x45_M200_Stanag { ace_isbelt = 1; }; - class rhsusf_200Rnd_556x45_soft_pouch: rhsusf_100Rnd_556x45_soft_pouch { - ace_isbelt = 1; - }; - class rhsusf_100Rnd_762x51: CA_Magazine { - ace_isbelt = 1; - }; - class rhsusf_100Rnd_762x51_m80a1epr: rhsusf_100Rnd_762x51 { - ace_isbelt = 1; - }; - class rhsusf_100Rnd_762x51_m993: rhsusf_100Rnd_762x51 { + class rhsusf_50Rnd_762x51: CA_Magazine { ace_isbelt = 1; }; class rhs_mag_100rnd_127x99_mag: VehicleMagazine { diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index e2e1efc00e..e059a4f71c 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -5,7 +5,8 @@ class CfgWeapons class Rifle_Base_F; class srifle_EBR_F; class launch_O_Titan_F; - + class UGL_F; + class rhs_weap_XM2010_Base_F: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=609.6; @@ -14,6 +15,98 @@ class CfgWeapons class rhs_weap_m4_Base: arifle_MX_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; + class M203_GL : UGL_F { + magazines[] = { + "rhs_mag_M441_HE", + "rhs_mag_M433_HEDP", + "rhs_mag_M4009", + "rhs_mag_m576", + "rhs_mag_M585_white", + "rhs_mag_M661_green", + "rhs_mag_M662_red", + "rhs_mag_M713_red", + "rhs_mag_M714_white", + "rhs_mag_M715_green", + "rhs_mag_M716_yellow", + + //bis compatibility + "1Rnd_HE_Grenade_shell", + "UGL_FlareWhite_F", + "UGL_FlareGreen_F", + "UGL_FlareRed_F", + "UGL_FlareYellow_F", + "UGL_FlareCIR_F", + "1Rnd_Smoke_Grenade_shell", + "1Rnd_SmokeRed_Grenade_shell", + "1Rnd_SmokeGreen_Grenade_shell", + "1Rnd_SmokeYellow_Grenade_shell", + "1Rnd_SmokePurple_Grenade_shell", + "1Rnd_SmokeBlue_Grenade_shell", + "1Rnd_SmokeOrange_Grenade_shell", + "3Rnd_HE_Grenade_shell", + "3Rnd_UGL_FlareWhite_F", + "3Rnd_UGL_FlareGreen_F", + "3Rnd_UGL_FlareRed_F", + "3Rnd_UGL_FlareYellow_F", + "3Rnd_UGL_FlareCIR_F", + "3Rnd_Smoke_Grenade_shell", + "3Rnd_SmokeRed_Grenade_shell", + "3Rnd_SmokeGreen_Grenade_shell", + "3Rnd_SmokeYellow_Grenade_shell", + "3Rnd_SmokePurple_Grenade_shell", + "3Rnd_SmokeBlue_Grenade_shell", + "3Rnd_SmokeOrange_Grenade_shell", + + //ACE3 Compatibility + "ACE_HuntIR_M203" + }; + }; + class M320_GL : M203_GL { + magazines[] = { + "rhs_mag_M441_HE", + "rhs_mag_M433_HEDP", + "rhs_mag_M4009", + "rhs_mag_m576", + "rhs_mag_M585_white", + "rhs_mag_M661_green", + "rhs_mag_M662_red", + "rhs_mag_M713_red", + "rhs_mag_M714_white", + "rhs_mag_M715_green", + "rhs_mag_M716_yellow", + + //bis compatibility + "1Rnd_HE_Grenade_shell", + "UGL_FlareWhite_F", + "UGL_FlareGreen_F", + "UGL_FlareRed_F", + "UGL_FlareYellow_F", + "UGL_FlareCIR_F", + "1Rnd_Smoke_Grenade_shell", + "1Rnd_SmokeRed_Grenade_shell", + "1Rnd_SmokeGreen_Grenade_shell", + "1Rnd_SmokeYellow_Grenade_shell", + "1Rnd_SmokePurple_Grenade_shell", + "1Rnd_SmokeBlue_Grenade_shell", + "1Rnd_SmokeOrange_Grenade_shell", + "3Rnd_HE_Grenade_shell", + "3Rnd_UGL_FlareWhite_F", + "3Rnd_UGL_FlareGreen_F", + "3Rnd_UGL_FlareRed_F", + "3Rnd_UGL_FlareYellow_F", + "3Rnd_UGL_FlareCIR_F", + "3Rnd_Smoke_Grenade_shell", + "3Rnd_SmokeRed_Grenade_shell", + "3Rnd_SmokeGreen_Grenade_shell", + "3Rnd_SmokeYellow_Grenade_shell", + "3Rnd_SmokePurple_Grenade_shell", + "3Rnd_SmokeBlue_Grenade_shell", + "3Rnd_SmokeOrange_Grenade_shell", + + //ACE3 Compatibility + "ACE_HuntIR_M203" + }; + }; }; class rhs_weap_m4a1; class rhs_weap_mk18: rhs_weap_m4a1 { @@ -51,11 +144,13 @@ class CfgWeapons ACE_twistDirection=0; ACE_barrelLength=508.0; }; + class 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 }; @@ -69,13 +164,49 @@ 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"; modelOptics = "\z\ace\addons\javelin\data\reticle_titan.p3d"; - + canLock = 0; lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; + + class rhsusf_ach_helmet_ocp; + class rhsusf_opscore_01: rhsusf_ach_helmet_ocp { + ace_hearing_protection = 0.50; + ace_hearing_lowerVolume = 0.60; + }; + class rhsusf_opscore_01_tan: rhsusf_opscore_01 {}; + class rhsusf_opscore_03_ocp: rhsusf_opscore_01 {}; + + class rhsusf_cvc_helmet: rhsusf_opscore_01 { + ace_hearing_protection = 1; + ace_hearing_lowerVolume = 0.80; + }; + class rhsusf_cvc_green_helmet: rhsusf_cvc_helmet {}; + class rhsusf_cvc_ess: rhsusf_cvc_helmet {}; + class rhsusf_cvc_green_ess: rhsusf_cvc_ess {}; + + class H_PilotHelmetHeli_B; + class H_CrewHelmetHeli_B; + class rhsusf_hgu56p: H_PilotHelmetHeli_B + { + ace_hearing_protection = 0.85; + ace_hearing_lowerVolume = 0.75; + }; + class rhsusf_hgu56p_mask: H_CrewHelmetHeli_B + { + ace_hearing_protection = 0.85; + ace_hearing_lowerVolume = 0.75; + }; + + class H_HelmetB; + class RHS_jetpilot_usaf: H_HelmetB { + ace_hearing_protection = 1; + ace_hearing_lowerVolume = 0.80; + }; }; diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index 9a13565ccf..3e9aee6ec7 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -5,7 +5,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"rhsusf_c_weapons"}; + requiredAddons[] = {"rhsusf_c_weapons", "rhsusf_c_troops"}; author[]={"Ruthberg"}; VERSION_CONFIG; }; diff --git a/optionals/tracers/CfgAmmo.hpp b/optionals/tracers/CfgAmmo.hpp index 7155087627..a432be3286 100644 --- a/optionals/tracers/CfgAmmo.hpp +++ b/optionals/tracers/CfgAmmo.hpp @@ -1,217 +1,159 @@ class CfgAmmo { - class B_556x45_Ball; - class B_556x45_Ball_Tracer_Red : B_556x45_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_556x45_Ball_Tracer_Green : B_556x45_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_556x45_Ball_Tracer_Yellow : B_556x45_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Green { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_65x39_Case; - class B_65x39_Case_green: B_65x39_Case { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_65x39_Case_yellow: B_65x39_Case { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_65x39_Caseless; - class B_65x39_Caseless_green: B_65x39_Caseless { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_65x39_Caseless_yellow: B_65x39_Caseless { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_762x51_Ball; - class B_762x51_Tracer_Red: B_762x51_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x51_Tracer_Green: B_762x51_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_762x51_Tracer_Yellow: B_762x51_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_762x54_Ball; - class B_762x54_Tracer_Red: B_762x54_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x54_Tracer_Green: B_762x54_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_762x54_Tracer_Yellow: B_762x54_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class ACE_762x39_Ball_57N231P : B_762x54_Tracer_Green { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_9x21_Ball; - class B_9x21_Ball_Tracer_Green: B_9x21_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_127x99_Ball; - class B_127x99_Ball_Tracer_Red: B_127x99_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_127x99_Ball_Tracer_Green: B_127x99_Ball { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_127x99_Ball_Tracer_Yellow: B_127x99_Ball { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_127x99_SLAP; - class B_127x99_SLAP_Tracer_Red: B_127x99_SLAP { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_127x99_SLAP_Tracer_Green: B_127x99_SLAP { - model = PATHTOF(ace_TracerGreen2.p3d); - }; - class B_127x99_SLAP_Tracer_Yellow: B_127x99_SLAP { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_30mm_HE; - class B_30mm_HE_Tracer_Red: B_30mm_HE { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_HE_Tracer_Green: B_30mm_HE { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_30mm_HE_Tracer_Yellow: B_30mm_HE { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_40mm_GPR; - class B_40mm_GPR_Tracer_Red: B_40mm_GPR { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_40mm_GPR_Tracer_Green: B_40mm_GPR { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_40mm_GPR_Tracer_Yellow: B_40mm_GPR { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_20mm; - class B_20mm_Tracer_Red: B_20mm { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_AP; - class B_30mm_AP_Tracer_Red: B_30mm_AP { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_AP_Tracer_Green: B_30mm_AP { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_30mm_AP_Tracer_Yellow: B_30mm_AP { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_30mm_APFSDS; - class B_30mm_APFSDS_Tracer_Red: B_30mm_APFSDS { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_30mm_APFSDS_Tracer_Green: B_30mm_APFSDS { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_30mm_APFSDS_Tracer_Yellow: B_30mm_APFSDS { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class B_35mm_AA; - class B_35mm_AA_Tracer_Red: B_35mm_AA { - model = PATHTOF(tracer_red_2.p3d); - }; - class B_35mm_AA_Tracer_Green: B_35mm_AA { - model = PATHTOF(tracer_green_2.p3d); - }; - class B_35mm_AA_Tracer_Yellow: B_35mm_AA { - model = PATHTOF(tracer_yellow_2.p3d); - }; - class Sh_120mm_HE; - class Sh_120mm_HE_Tracer_Red: Sh_120mm_HE { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_120mm_HE_Tracer_Green: Sh_120mm_HE { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_120mm_HE_Tracer_Yellow: Sh_120mm_HE { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; - class Sh_120mm_APFSDS; - class Sh_120mm_APFSDS_Tracer_Red: Sh_120mm_APFSDS { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_120mm_APFSDS_Tracer_Green: Sh_120mm_APFSDS { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_120mm_APFSDS_Tracer_Yellow: Sh_120mm_APFSDS { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class BulletBase; + class ShellBase; class SubmunitionBullet; - class B_762x51_Minigun_Tracer_Red: SubmunitionBullet { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x51_Minigun_Tracer_Yellow: B_762x51_Minigun_Tracer_Red { - model = PATHTOF(ace_TracerYellow2.p3d); - }; - class B_762x51_Minigun_Tracer_Red_splash: B_762x51_Ball { - model = PATHTOF(ace_TracerRed2.p3d); - }; - class B_762x51_Minigun_Tracer_Yellow_splash: B_762x51_Minigun_Tracer_Red_splash { - model = PATHTOF(ace_TracerYellow2.p3d); - }; + + //No idea + class B_56x15_dual: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + + //Pistol + class B_9x21_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_9x21_Ball_Tracer_Green: B_9x21_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_45ACP_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_45ACP_Ball_Green: B_45ACP_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_45ACP_Ball_Yellow: B_45ACP_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + //Assault rifle + class B_556x45_Ball: BulletBase {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_556x45_Ball_Tracer_Red: B_556x45_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_556x45_Ball_Tracer_Green: B_556x45_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_556x45_Ball_Tracer_Yellow: B_556x45_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_65x39_Caseless: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_65x39_Caseless_green: B_65x39_Caseless {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_65x39_Caseless_yellow: B_65x39_Caseless {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_65x39_Case; + class B_65x39_Case_green: B_65x39_Case {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_65x39_Case_yellow: B_65x39_Case {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_65x39_Minigun_Caseless: SubmunitionBullet {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_65x39_Minigun_Caseless_Red_splash; + class B_65x39_Minigun_Caseless_Yellow_splash: B_65x39_Minigun_Caseless_Red_splash {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_65x39_Minigun_Caseless_Green_splash: B_65x39_Minigun_Caseless_Red_splash {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + //Battle rifle + class B_762x51_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_762x51_Tracer_Red: B_762x51_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_762x51_Tracer_Green: B_762x51_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_762x51_Tracer_Yellow: B_762x51_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_762x51_Minigun_Tracer_Red: SubmunitionBullet {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_762x51_Minigun_Tracer_Red_splash: B_762x51_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_762x51_Minigun_Tracer_Yellow: B_762x51_Minigun_Tracer_Red {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_762x51_Minigun_Tracer_Yellow_splash: B_762x51_Minigun_Tracer_Red_splash {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_762x54_Ball; + class B_762x54_Tracer_Red: B_762x54_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_762x54_Tracer_Green: B_762x54_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_762x54_Tracer_Yellow: B_762x54_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + //Sniper rifle + class B_127x99_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_127x99_Ball_Tracer_Red: B_127x99_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_127x99_Ball_Tracer_Green: B_127x99_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_127x99_Ball_Tracer_Yellow: B_127x99_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_127x99_SLAP; + class B_127x99_SLAP_Tracer_Red: B_127x99_SLAP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_127x99_SLAP_Tracer_Green: B_127x99_SLAP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_127x99_SLAP_Tracer_Yellow: B_127x99_SLAP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_408_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_127x33_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_127x108_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_338_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_338_NM_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_127x54_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + class B_93x64_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + + //Autocannon + class B_19mm_HE: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + + class B_30mm_HE; + class B_30mm_HE_Tracer_Red: B_30mm_HE {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_HE_Tracer_Green: B_30mm_HE {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_HE_Tracer_Yellow: B_30mm_HE {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_30mm_MP; + class B_30mm_MP_Tracer_Red: B_30mm_MP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_MP_Tracer_Green: B_30mm_MP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_MP_Tracer_Yellow: B_30mm_MP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_40mm_GPR; + class B_40mm_GPR_Tracer_Red: B_40mm_GPR {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_40mm_GPR_Tracer_Green: B_40mm_GPR {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_40mm_GPR_Tracer_Yellow: B_40mm_GPR {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_20mm: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_20mm_Tracer_Red: B_20mm {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + + class B_25mm: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + + class B_30mm_AP: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_30mm_AP_Tracer_Red: B_30mm_AP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_AP_Tracer_Green: B_30mm_AP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_AP_Tracer_Yellow: B_30mm_AP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_30mm_APFSDS; + class B_30mm_APFSDS_Tracer_Red: B_30mm_APFSDS {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_30mm_APFSDS_Tracer_Green: B_30mm_APFSDS {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_30mm_APFSDS_Tracer_Yellow: B_30mm_APFSDS {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_40mm_APFSDS; + class B_40mm_APFSDS_Tracer_Red: B_40mm_APFSDS {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_40mm_APFSDS_Tracer_Green: B_40mm_APFSDS {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_40mm_APFSDS_Tracer_Yellow: B_40mm_APFSDS {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class B_35mm_AA: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_35mm_AA_Tracer_Red: B_35mm_AA {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_35mm_AA_Tracer_Green: B_35mm_AA {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_35mm_AA_Tracer_Yellow: B_35mm_AA {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + + class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red.p3d + class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green.p3d + + //Cannon + class Sh_120mm_HE: ShellBase {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white + class Sh_120mm_HE_Tracer_Red: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_120mm_HE_Tracer_Green: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_120mm_HE_Tracer_Yellow: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + + class Sh_120mm_APFSDS: ShellBase {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white + class Sh_120mm_APFSDS_Tracer_Red: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_120mm_APFSDS_Tracer_Green: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_120mm_APFSDS_Tracer_Yellow: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_125mm_APFSDS; - class Sh_125mm_APFSDS_T_Red: Sh_125mm_APFSDS { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_125mm_APFSDS_T_Green: Sh_125mm_APFSDS { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_125mm_APFSDS_T_Yellow: Sh_125mm_APFSDS { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_125mm_APFSDS_T_Red: Sh_125mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_125mm_APFSDS_T_Green: Sh_125mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_125mm_APFSDS_T_Yellow: Sh_125mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_125mm_HE; - class Sh_125mm_HE_T_Red: Sh_125mm_HE { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_125mm_HE_T_Green: Sh_125mm_HE { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_125mm_HE_T_Yellow: Sh_125mm_HE { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_125mm_HE_T_Red: Sh_125mm_HE {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_125mm_HE_T_Green: Sh_125mm_HE {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_125mm_HE_T_Yellow: Sh_125mm_HE {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_125mm_HEAT; - class Sh_125mm_HEAT_T_Red: Sh_125mm_HEAT { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_125mm_HEAT_T_Green: Sh_125mm_HEAT { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_125mm_HEAT_T_Yellow: Sh_125mm_HEAT { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_125mm_HEAT_T_Red: Sh_125mm_HEAT {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_125mm_HEAT_T_Green: Sh_125mm_HEAT {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_125mm_HEAT_T_Yellow: Sh_125mm_HEAT {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_105mm_APFSDS; - class Sh_105mm_APFSDS_T_Red: Sh_105mm_APFSDS { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_105mm_APFSDS_T_Green: Sh_105mm_APFSDS { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_105mm_APFSDS_T_Yellow: Sh_105mm_APFSDS { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; + class Sh_105mm_APFSDS_T_Red: Sh_105mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_105mm_APFSDS_T_Green: Sh_105mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_105mm_APFSDS_T_Yellow: Sh_105mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow + class Sh_105mm_HEAT_MP; - class Sh_105mm_HEAT_MP_T_Red: Sh_105mm_HEAT_MP { - model = PATHTOF(ace_shell_tracer_red.p3d); - }; - class Sh_105mm_HEAT_MP_T_Green: Sh_105mm_HEAT_MP { - model = PATHTOF(ace_shell_tracer_green.p3d); - }; - class Sh_105mm_HEAT_MP_T_Yellow: Sh_105mm_HEAT_MP { - model = PATHTOF(ace_shell_tracer_yellow.p3d); - }; -}; + class Sh_105mm_HEAT_MP_T_Red: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red + class Sh_105mm_HEAT_MP_T_Green: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green + class Sh_105mm_HEAT_MP_T_Yellow: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow +}; \ No newline at end of file diff --git a/tools/search_privates.py b/tools/search_privates.py index 37320214fc..207c6403e0 100644 --- a/tools/search_privates.py +++ b/tools/search_privates.py @@ -21,7 +21,7 @@ def get_private_declare(content): priv_split = sorted(set(priv_split)) priv_declared += priv_split; - srch = re.compile('PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*|IGNORE_PRIVATE_WARNING.*') + srch = re.compile('params \[.*\]|PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*|IGNORE_PRIVATE_WARNING.*') priv_srch_declared = srch.findall(content) priv_srch_declared = sorted(set(priv_srch_declared)) diff --git a/tools/search_unused_privates.py b/tools/search_unused_privates.py index b9bdd880ce..72a0dadcea 100644 --- a/tools/search_unused_privates.py +++ b/tools/search_unused_privates.py @@ -21,7 +21,7 @@ def get_private_declare(content): priv_split = sorted(set(priv_split)) priv_declared += priv_split; - srch = re.compile('PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*|IGNORE_PRIVATE_WARNING.*') + srch = re.compile('params \[.*\]|PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*|IGNORE_PRIVATE_WARNING.*') priv_srch_declared = srch.findall(content) priv_srch_declared = sorted(set(priv_srch_declared))