mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into sitting
Conflicts: addons/kestrel4500/CfgVehicles.hpp addons/microdagr/CfgVehicles.hpp
This commit is contained in:
commit
29ce8f635e
@ -30,142 +30,166 @@
|
||||
<Polish>Zaawansowana balistyka</Polish>
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
<German>Erweiterte Ballistik</German>
|
||||
<Czech>Pokročilá balistika</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
|
||||
<English>Advanced Ballistics</English>
|
||||
<Polish>Zaawansowana balistyka</Polish>
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
<German>Erweiterte Ballistik</German>
|
||||
<Czech>Pokročilá balistika</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
|
||||
<English>Enables advanced ballistics</English>
|
||||
<Polish>Aktywuje zaawansowaną balistykę</Polish>
|
||||
<Spanish>Activa la balística avanzada</Spanish>
|
||||
<German>Aktiviert die erweiterte Ballistik</German>
|
||||
<Czech>Aktivuje pokročilou balistiku</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
|
||||
<English>Enabled For Snipers</English>
|
||||
<Spanish>Activada para francotiradores</Spanish>
|
||||
<Polish>Akt. dla snajperów</Polish>
|
||||
<German>Für Scharfschützen aktiviert</German>
|
||||
<Czech>Povoleno pro odstřelovače</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
|
||||
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
|
||||
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung)</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (když používá výkonnou optiku)</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
|
||||
<English>Enabled For Group Members</English>
|
||||
<Spanish>Activada para miembros de grupo</Spanish>
|
||||
<Polish>Akt. dla czł. grupy</Polish>
|
||||
<German>Für Gruppenmitglieder aktiviert</German>
|
||||
<Czech>Povoleno pro členy skupiny</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
|
||||
<English>Enables advanced ballistics for non local group members</English>
|
||||
<Spanish>Activada la balística avanzada para miembros de grupo no locales</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální členy skupiny</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
|
||||
<English>Enabled For Everyone</English>
|
||||
<Spanish>Activada para todos</Spanish>
|
||||
<Polish>Akt. dla wszystkich</Polish>
|
||||
<German>Für jeden aktiviert</German>
|
||||
<Czech>Povoleno pro všechny</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
|
||||
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
|
||||
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)</German>
|
||||
<Czech>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)</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||
<English>Always Enabled For Group Members</English>
|
||||
<Polish>Zawsze akt. dla czł. grupy</Polish>
|
||||
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
||||
<German>Für Gruppenmitglieder immer aktiviert</German>
|
||||
<Czech>Vždy povoleno pro členy skupiny</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
|
||||
<English>Always enables advanced ballistics when a group member fires</English>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich członków grupy</Polish>
|
||||
<Spanish>Activada la balística avanzada siempre cuando miembros de grupo disparan</Spanish>
|
||||
<German>Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro členy skupiny</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
|
||||
<English>Disabled In FullAuto Mode</English>
|
||||
<Polish>Wył. podczas ognia auto.</Polish>
|
||||
<Spanish>Desactivada en modo automático</Spanish>
|
||||
<German>Beim vollautomatischen Feuern deaktiviert</German>
|
||||
<Czech>Zakázáno v automatickém režimu střelby</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
|
||||
<English>Disables the advanced ballistics during full auto fire</English>
|
||||
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
|
||||
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
|
||||
<German>Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern</German>
|
||||
<Czech>Zákáže pokročilou balistiku během střelby v režimu automat</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||
<English>Enable Ammo Temperature Simulation</English>
|
||||
<Polish>Symulacja temp. amunicji</Polish>
|
||||
<Spanish>Activar simulación de temperatura de munición</Spanish>
|
||||
<German>Simulation der Munitionstemperatur aktivieren</German>
|
||||
<Czech>Povolit simulaci teploty munice</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
|
||||
<English>Muzzle velocity varies with ammo temperature</English>
|
||||
<Polish>Prędkość wylotowa pocisku jest zależna od temperatury amunicji</Polish>
|
||||
<Spanish>La velocidad de salida varía con la temperatura de la munición</Spanish>
|
||||
<German>Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit</German>
|
||||
<Czech>Úsťová rychlost je závislá na teplotě munice</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
|
||||
<English>Enable Barrel Length Simulation</English>
|
||||
<Polish>Symulacja długości lufy</Polish>
|
||||
<Spanish>Habilitar la simulación de longitud del cañón</Spanish>
|
||||
<German>Simulation der Lauflänge aktivieren</German>
|
||||
<Czech>Povolit simulaci délky hlavně</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
|
||||
<English>Muzzle velocity varies with barrel length</English>
|
||||
<Polish>Prędkość wylotowa pocisku jest zależna od długości lufy</Polish>
|
||||
<Spanish>La velocidad de salidal varía con la longitud del cañón</Spanish>
|
||||
<German>Lauflänge beeinflusst Mündungsgeschwindigkeit</German>
|
||||
<Czech>Úsťová rychlost je závislá na délce hlavně</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
|
||||
<English>Enable Bullet Trace Effect</English>
|
||||
<Polish>Efekt smugi pocisku</Polish>
|
||||
<Spanish>Activar el efecto trazador de la bala</Spanish>
|
||||
<German>Geschossspureffekt aktivieren</German>
|
||||
<Czech>Povolit efekt trasírek</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_Description">
|
||||
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
|
||||
<Polish>Aktywuje efekt smugi pocisku dla pocisków wysokokalibrowych (widoczne tylko podczas patrzenia przez optykę)</Polish>
|
||||
<Spanish>Activa el efecto trazador de la balas de gran calibre (solo visible cuando se mira a través de una mira telescópica)</Spanish>
|
||||
<German>Aktiviere Geschossspureffekt für hohe Kaliber (bei Benutzung von Optiken mit starker Vergrößerung)</German>
|
||||
<Czech>Aktivuje efekt trasírek z vysokokaliberních zbraní (viditelné pouze skrze výkonnou optiku)</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
|
||||
<English>Simulation Interval</English>
|
||||
<Polish>Interwał symulacji</Polish>
|
||||
<Spanish>Intervalo de simulación</Spanish>
|
||||
<German>Simulationsintervall</German>
|
||||
<Czech>Interval simulace</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
|
||||
<English>Defines the interval between every calculation step</English>
|
||||
<Polish>Określa interwał pomiędzy każdym krokiem kalkulacji</Polish>
|
||||
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
||||
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
|
||||
<Czech>Určuje interval mezi každým výpočtem</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
|
||||
<English>Simulation Radius</English>
|
||||
<Polish>Zasięg symulacji</Polish>
|
||||
<Spanish>Radio de simulación</Spanish>
|
||||
<German>Simulationsradius</German>
|
||||
<Czech>Rozsah simulace</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_Description">
|
||||
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
|
||||
<Polish>Określa obszar naokoło gracza (w metrach), na którym zaawansowana balistyka jest aplikowana dla pocisków</Polish>
|
||||
<Spanish>Define el radio alrededor del jugador (en metros) en el cual se aplica la balística avanzada a los proyectiles</Spanish>
|
||||
<German>Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird</German>
|
||||
<Czech>Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_Description">
|
||||
<English></English>
|
||||
<Polish>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.</Polish>
|
||||
<Czech>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.</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
79
addons/apl/data/Jezek_kov.rvmat
Normal file
79
addons/apl/data/Jezek_kov.rvmat
Normal file
@ -0,0 +1,79 @@
|
||||
ambient[]={1.000000,1.000000,1.000000,1.000000};
|
||||
diffuse[]={1.000000,1.000000,1.000000,1.000000};
|
||||
forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
|
||||
emmisive[]={0.000000,0.000000,0.000000,1.000000};
|
||||
specular[]={1.000000,1.000000,1.000000,1.000000};
|
||||
specularPower=83.900002;
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1 {
|
||||
texture="z\ace\addons\apl\data\jezek_texture_NOHQ.tga";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage3 {
|
||||
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage4 {
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage5 {
|
||||
texture="z\ace\addons\apl\data\jezek_texture_SMDI.tga";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage6 {
|
||||
texture="#(ai,32,128,1)fresnel(1.85,0.64)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage7 {
|
||||
texture="a3\data_f\env_land_co.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
BIN
addons/apl/data/barbwire_a_co.paa
Normal file
BIN
addons/apl/data/barbwire_a_co.paa
Normal file
Binary file not shown.
BIN
addons/apl/data/barbwire_a_nohq.paa
Normal file
BIN
addons/apl/data/barbwire_a_nohq.paa
Normal file
Binary file not shown.
78
addons/apl/data/barbwire_a_ns.rvmat
Normal file
78
addons/apl/data/barbwire_a_ns.rvmat
Normal file
@ -0,0 +1,78 @@
|
||||
ambient[]={1.000000,1.000000,1.000000,1.000000};
|
||||
diffuse[]={1.000000,1.000000,1.000000,1.000000};
|
||||
forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
|
||||
emmisive[]={0.000000,0.000000,0.000000,1.000000};
|
||||
specular[]={1.000000,1.000000,1.000000,0.000000};
|
||||
specularPower=16.000000;
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1 {
|
||||
texture="z\ace\addons\apl\data\BarbWire_A_NOHQ.tga";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage3 {
|
||||
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage4 {
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage5 {
|
||||
texture="#(argb,8,8,3)color(0,0,1,1,SMDI)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage6 {
|
||||
texture="#(ai,32,128,1)fresnel(0.01,0.01)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage7 {
|
||||
texture="#(argb,8,8,3)color(0,0,0,1,CO)";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.000000,0.000000,0.000000};
|
||||
pos[]={0.000000,0.000000,0.000000};
|
||||
};
|
||||
};
|
10
addons/apl/data/glass_House.bisurf
Normal file
10
addons/apl/data/glass_House.bisurf
Normal file
@ -0,0 +1,10 @@
|
||||
Density=2400;
|
||||
rough=0;
|
||||
dust=0;
|
||||
bulletPenetrability=50;
|
||||
soundEnviron=Empty;
|
||||
isWater=false;
|
||||
friction=0.1;
|
||||
restitution=0.1;
|
||||
impact = Hit_Glass;
|
||||
soundHit = glass;
|
Binary file not shown.
BIN
addons/apl/data/jezek_texture_co.paa
Normal file
BIN
addons/apl/data/jezek_texture_co.paa
Normal file
Binary file not shown.
BIN
addons/apl/data/jezek_texture_nohq.paa
Normal file
BIN
addons/apl/data/jezek_texture_nohq.paa
Normal file
Binary file not shown.
BIN
addons/apl/data/jezek_texture_smdi.paa
Normal file
BIN
addons/apl/data/jezek_texture_smdi.paa
Normal file
Binary file not shown.
10
addons/apl/data/plastic.bisurf
Normal file
10
addons/apl/data/plastic.bisurf
Normal file
@ -0,0 +1,10 @@
|
||||
Density=1380;
|
||||
rough=0.1;
|
||||
dust=0;
|
||||
bulletPenetrability=150;
|
||||
soundEnviron=Empty;
|
||||
isWater=false;
|
||||
friction=0.7;
|
||||
restitution=0.3;
|
||||
impact = default_Mat;
|
||||
soundHit = plastic;
|
Binary file not shown.
BIN
addons/apl/data/plech.paa
Normal file
BIN
addons/apl/data/plech.paa
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
false
|
||||
@ -12,3 +12,25 @@
|
||||
},
|
||||
{false},
|
||||
[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
||||
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
[] call FUNC(can_show);
|
||||
};
|
||||
_toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
// Statement
|
||||
[] call FUNC(create_dialog);
|
||||
};
|
||||
_closeCode = {
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
};
|
||||
[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
@ -60,7 +60,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then
|
||||
detach _attachedObject;
|
||||
_attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
|
||||
// Delete attached item after 0.5 seconds
|
||||
[{deleteVehicle (_this select 0)}, [_attachedObject], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
[{deleteVehicle (_this select 0)}, [_attachedObject], 2] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
// Delete attached item
|
||||
deleteVehicle _attachedObject;
|
||||
|
@ -1597,6 +1597,7 @@
|
||||
<Polish>[ACE] Skrzynka z amunicją</Polish>
|
||||
<Spanish>[ACE] Caja de suministros de munición</Spanish>
|
||||
<German>[ACE] Munitionskiste</German>
|
||||
<Czech>[ACE] Bedna s municí</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -1,13 +1,13 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(allowHandcuffOwnSide) {
|
||||
displayName = "$STR_ACE_Captives_ModuleSettings_handcuffSide_name";
|
||||
description = "$STR_ACE_Captives_ModuleSettings_handcuffSide_description";
|
||||
displayName = CSTRING(ModuleSettings_handcuffSide_name);
|
||||
description = CSTRING(ModuleSettings_handcuffSide_description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(allowSurrender) {
|
||||
displayName = "$STR_ACE_Captives_ModuleSettings_allowSurrender_name";
|
||||
description = "$STR_ACE_Captives_ModuleSettings_allowSurrender_description";
|
||||
displayName = CSTRING(ModuleSettings_allowSurrender_name);
|
||||
description = CSTRING(ModuleSettings_allowSurrender_description);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
|
@ -56,15 +56,12 @@ class CfgVehicles {
|
||||
priority = 2.2;
|
||||
hotkey = "L";
|
||||
};
|
||||
class ACE_FriskPerson {
|
||||
displayName = CSTRING(FriskPerson);
|
||||
distance = 2;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
|
||||
showDisabled = 0;
|
||||
//icon = ""; //@todo
|
||||
priority = 3;
|
||||
hotkey = "F";
|
||||
class GVAR(UnloadCaptive) {
|
||||
displayName = CSTRING(UnloadCaptive);
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive));
|
||||
priority = 1.2;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -111,13 +108,6 @@ class CfgVehicles {
|
||||
exceptions[] = {"isNotEscorting"}; \
|
||||
priority = 1.2; \
|
||||
}; \
|
||||
class GVAR(UnloadCaptive) { \
|
||||
displayName = CSTRING(UnloadCaptive); \
|
||||
distance = 4; \
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
|
||||
priority = 1.2; \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
||||
@ -179,7 +169,7 @@ class CfgVehicles {
|
||||
|
||||
class ACE_Module: Module_F {};
|
||||
class GVAR(moduleSettings): ACE_Module {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
author = ECSTRING(common,ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(ModuleSettings_DisplayName);
|
||||
function = QFUNC(moduleSettings);
|
||||
|
@ -23,4 +23,6 @@ PARAMS_2(_unit,_target);
|
||||
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
||||
{isNull (attachedTo _target)} &&
|
||||
{alive _target} &&
|
||||
{!(_target getVariable ["ACE_isUnconscious", false])}
|
||||
{!(_target getVariable ["ACE_isUnconscious", false])} &&
|
||||
{(vehicle _unit) == _unit} &&
|
||||
{(vehicle _target) == _target}
|
||||
|
@ -3,15 +3,14 @@
|
||||
* Check if the unit can unload a captive from the vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that wants to unload a captive <OBJECT>
|
||||
* 1: A captive. ObjNull for the first escorted captive <OBJECT>
|
||||
* 2: Vehicle to unload a captive from <OBJECT>
|
||||
* 0: Unit that wants to unload a captive (player) <OBJECT>
|
||||
* 1: A captive loaded in a vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, bob, car1] call ACE_captives_fnc_canUnloadCaptive;
|
||||
* [player, bob] call ACE_captives_fnc_canUnloadCaptive;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -19,10 +18,6 @@
|
||||
|
||||
private ["_cargo"];
|
||||
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
PARAMS_2(_player,_unit);
|
||||
|
||||
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
|
||||
|
||||
_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
|
||||
count _cargo > 0
|
||||
((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}
|
||||
|
@ -4,29 +4,18 @@
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit that wants to unload a captive <OBJECT>
|
||||
* 1: Vehicle to unload a captive from. <BOOL>
|
||||
* 1: A captive loaded in a vehicle <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, car] call ACE_captives_fnc_doUnloadCaptive
|
||||
* [bob, prisoner] call ACE_captives_fnc_doUnloadCaptive
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
private ["_cargo", "_target"];
|
||||
|
||||
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
|
||||
|
||||
_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
|
||||
if ((count _cargo) > 0) then {
|
||||
_target = _cargo select 0;
|
||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
||||
} else {
|
||||
ERROR("No captive to unload");
|
||||
};
|
||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
||||
|
@ -140,7 +140,7 @@
|
||||
<Spanish>Rendirse</Spanish>
|
||||
<Portuguese>Render-se</Portuguese>
|
||||
<Czech>Vzdát se</Czech>
|
||||
<Polish>Poddaj się</Polish>
|
||||
<Polish>Kapituluj</Polish>
|
||||
<Russian>Сдаться</Russian>
|
||||
<Hungarian>Megadás</Hungarian>
|
||||
<Italian>Arrenditi</Italian>
|
||||
@ -159,33 +159,53 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_DisplayName">
|
||||
<English>Make Unit Surrender</English>
|
||||
<Polish>Poddaj się!</Polish>
|
||||
<Polish>Skapituluj jednostkę</Polish>
|
||||
<Spanish>Hacer que la unidad se rinda</Spanish>
|
||||
<German>Einheit kapitulieren lassen</German>
|
||||
<Czech>Vzdávající se jednotka</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
||||
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
||||
<Polish>Zsynchronizuj z jednostką aby sprawić by się poddała<br />Źródło: ace_captives</Polish>
|
||||
<Polish>Zsynchronizuj z jednostką, aby skapitulowała.<br />Źródło: ace_captives</Polish>
|
||||
<Spanish>Sincroniza una unidad para hacer que se rinda.<br />Fuente: ace_captives</Spanish>
|
||||
<German>Einheit synchronisieren, um sie kapitulieren zu lassen.<br />Quelle: ace_captives</German>
|
||||
<Czech>Synchronizuj s jednotkou, která se má vzdát.<br />Zdroj: ace_captives</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
|
||||
<English>Captives Settings</English>
|
||||
<Polish>Ustawienia więźniów</Polish>
|
||||
<Spanish>Ajustes de prisioneros</Spanish>
|
||||
<Czech>Nastavení zajatce</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_Description">
|
||||
<English>Controls settings for surrender and cable ties</English>
|
||||
<Polish>Moduł ten kontroluje ustawienia kapitulacji oraz opasek zaciskowych</Polish>
|
||||
<Spanish>Ajustes de control para rendición y precintos</Spanish>
|
||||
<Czech>Toto kontroluje nastavení kapitulace a pout</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_name">
|
||||
<English>Can handcuff own side</English>
|
||||
<Polish>Skuwanie sojuszników</Polish>
|
||||
<Spanish>Se puede esposar el bando propio</Spanish>
|
||||
<Czech>Může spoutat spolubojovníky</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_description">
|
||||
<English>Can players cabletie units on their own side</English>
|
||||
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
|
||||
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
|
||||
<Czech>Mohou hráči spoutat jednotky na své straně</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_name">
|
||||
<English>Allow surrendering</English>
|
||||
<Polish>Pozwól kapitulować</Polish>
|
||||
<Spanish>Permitir rendición</Spanish>
|
||||
<Czech>Povolit vzdávání</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_description">
|
||||
<English>Players can surrender after holstering their weapon</English>
|
||||
<Polish>Gracze mogą skapitulować po schowaniu swojej broni do kabury</Polish>
|
||||
<Spanish>Los jugadores pueden rendirse después de enfundar su arma</Spanish>
|
||||
<Czech>Hráč se může vzdát poté, co si skryje zbraň</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -22,7 +22,7 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 0;
|
||||
values[] = {"$STR_ACE_Common_CheckPBO_Action_WarnOnce", "$STR_ACE_Common_CheckPBO_Action_WarnPerm", "$STR_ACE_Common_CheckPBO_Action_Kick"};
|
||||
values[] = {CSTRING(CheckPBO_Action_WarnOnce), CSTRING(CheckPBO_Action_WarnPerm), CSTRING(CheckPBO_Action_Kick)};
|
||||
};
|
||||
class GVAR(checkPBOsCheckAll) {
|
||||
value = 0;
|
||||
@ -38,7 +38,7 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
|
||||
displayName = CSTRING(EnableNumberHotkeys);
|
||||
};*/
|
||||
class GVAR(settingFeedbackIcons) {
|
||||
value = 1;
|
||||
|
@ -16,7 +16,11 @@ class RscInGameUI {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscUnitInfoAir: RscUnitInfo {
|
||||
class RscUnitInfoAirNoWeapon: RscUnitInfo {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
|
@ -3,6 +3,27 @@
|
||||
|
||||
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
|
||||
|
||||
//Singe PFEH to handle execNextFrame and waitAndExec:
|
||||
[{
|
||||
private ["_entry"];
|
||||
|
||||
//Handle the waitAndExec array:
|
||||
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
|
||||
_entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
(_entry select 2) call (_entry select 1);
|
||||
};
|
||||
|
||||
//Handle the execNextFrame array:
|
||||
{
|
||||
(_x select 0) call (_x select 1);
|
||||
} forEach GVAR(nextFrameBufferA);
|
||||
//Swap double-buffer:
|
||||
GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB);
|
||||
GVAR(nextFrameBufferB) = [];
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
// Listens for global "SettingChanged" events, to update the force status locally
|
||||
["SettingChanged", {
|
||||
PARAMS_2(_name,_value);
|
||||
@ -80,6 +101,43 @@ if(!isServer) then {
|
||||
|
||||
call FUNC(checkFiles);
|
||||
|
||||
|
||||
// Create a pfh to wait until all postinits are ready and settings are initialized
|
||||
[{
|
||||
PARAMS_1(_args);
|
||||
EXPLODE_1_PVT(_args,_waitingMsgSent);
|
||||
// If post inits are not ready then wait
|
||||
if !(SLX_XEH_MACHINE select 8) exitWith {};
|
||||
|
||||
// If settings are not initialized then wait
|
||||
if (isNil QGVAR(settings) || {(!isServer) && (isNil QEGVAR(modules,serverModulesRead))}) exitWith {
|
||||
if (!_waitingMsgSent) then {
|
||||
_args set [0, true];
|
||||
diag_log text format["[ACE] Waiting on settings from server"];
|
||||
};
|
||||
};
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
diag_log text format["[ACE] Settings received from server"];
|
||||
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
call FUNC(loadSettingsLocalizedText);
|
||||
};
|
||||
|
||||
diag_log text format["[ACE] Settings initialized"];
|
||||
|
||||
//Event that settings are safe to use:
|
||||
["SettingsInitialized", []] call FUNC(localEvent);
|
||||
|
||||
}, 0, [false]] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/***************************************************************/
|
||||
/***************************************************************/
|
||||
@ -256,39 +314,41 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
|
||||
] call FUNC(checkPBOs)
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
//Device Handler:
|
||||
GVAR(deviceKeyHandlingArray) = [];
|
||||
GVAR(deviceKeyCurrentIndex) = -1;
|
||||
|
||||
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
|
||||
{
|
||||
[] call FUNC(deviceKeyFindValidIndex);
|
||||
if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false};
|
||||
[] call ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 3);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0xC7, [false, false, false]], false] call cba_fnc_addKeybind; //Home Key
|
||||
|
||||
["ACE3 Equipment", QGVAR(closeDevice), (localize "STR_ACE_Common_closeHandheldDevice"),
|
||||
{
|
||||
[] call FUNC(deviceKeyFindValidIndex);
|
||||
if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false};
|
||||
[] call ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 4);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0xC7, [false, true, false]], false] call cba_fnc_addKeybind; //CTRL + Home Key
|
||||
|
||||
["ACE3 Equipment", QGVAR(cycleDevice), (localize "STR_ACE_Common_cycleHandheldDevices"),
|
||||
{
|
||||
[1] call FUNC(deviceKeyFindValidIndex);
|
||||
if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false};
|
||||
_displayName = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 0);
|
||||
_iconImage = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 1);
|
||||
[_displayName, _iconImage] call FUNC(displayTextPicture);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0xC7, [true, false, false]], false] call cba_fnc_addKeybind; //SHIFT + Home Key
|
||||
|
||||
|
||||
GVAR(commonPostInited) = true;
|
||||
|
||||
// Create a pfh to wait until all postinits are ready and settings are initialized
|
||||
[{
|
||||
PARAMS_1(_args);
|
||||
EXPLODE_1_PVT(_args,_waitingMsgSent);
|
||||
// If post inits are not ready then wait
|
||||
if !(SLX_XEH_MACHINE select 8) exitWith {};
|
||||
|
||||
// If settings are not initialized then wait
|
||||
if (isNil QGVAR(settings)) exitWith {
|
||||
if (!_waitingMsgSent) then {
|
||||
_args set [0, true];
|
||||
diag_log text format["[ACE] Waiting on settings from server"];
|
||||
};
|
||||
};
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
diag_log text format["[ACE] Settings received from server"];
|
||||
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
call FUNC(loadSettingsLocalizedText);
|
||||
};
|
||||
|
||||
diag_log text format["[ACE] Settings initialized"];
|
||||
|
||||
//Event that settings are safe to use:
|
||||
["SettingsInitialized", []] call FUNC(localEvent);
|
||||
|
||||
}, 0, [false]] call cba_fnc_addPerFrameHandler;
|
||||
|
@ -35,6 +35,8 @@ PREP(currentChannel);
|
||||
PREP(debug);
|
||||
PREP(debugModule);
|
||||
PREP(defineVariable);
|
||||
PREP(deviceKeyFindValidIndex);
|
||||
PREP(deviceKeyRegisterNew);
|
||||
PREP(disableAI);
|
||||
PREP(disableUserInput);
|
||||
PREP(displayIcon);
|
||||
@ -287,7 +289,12 @@ PREP(_handleRequestSyncedEvent);
|
||||
PREP(_handleRequestAllSyncedEvents);
|
||||
|
||||
GVAR(syncedEvents) = HASH_CREATE;
|
||||
|
||||
//GVARS for execNextFrame and waitAndExec
|
||||
GVAR(waitAndExecArray) = [];
|
||||
GVAR(nextFrameNo) = diag_frameno;
|
||||
GVAR(nextFrameBufferA) = [];
|
||||
GVAR(nextFrameBufferB) = [];
|
||||
|
||||
// @TODO: Generic local-managed global-synced objects (createVehicleLocal)
|
||||
|
||||
|
45
addons/common/functions/fnc_deviceKeyFindValidIndex.sqf
Normal file
45
addons/common/functions/fnc_deviceKeyFindValidIndex.sqf
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Finds next valid index for the device array.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Offset from currentIndex (use 1 to find next valid after current) or a displayName string <STRING>or<NUMBER><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* The new index (-1 if no valid) <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_common_fnc_deviceKeyFindValidIndex
|
||||
* ["kestral4500"] call ace_common_fnc_deviceKeyFindValidIndex
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
DEFAULT_PARAM(0,_searchOffsetOrName,0);
|
||||
|
||||
private ["_validIndex", "_offsetBy", "_realIndex", "_offset"];
|
||||
|
||||
_validIndex = -1;
|
||||
|
||||
if ((typeName _searchOffsetOrName) == "STRING") then {
|
||||
{
|
||||
if ((_x select 0) == _searchOffsetOrName) exitWith {
|
||||
_validIndex = _forEachIndex;
|
||||
};
|
||||
} forEach GVAR(deviceKeyHandlingArray);
|
||||
} else {
|
||||
if ((count GVAR(deviceKeyHandlingArray)) > 0) then {
|
||||
_baseIndex = if (GVAR(deviceKeyCurrentIndex) == -1) then {0} else {GVAR(deviceKeyCurrentIndex) + _searchOffsetOrName};
|
||||
for "_offset" from _baseIndex to ((count GVAR(deviceKeyHandlingArray)) - 1 + _baseIndex) do {
|
||||
_realIndex = _offset % (count GVAR(deviceKeyHandlingArray));
|
||||
if ([] call ((GVAR(deviceKeyHandlingArray) select _realIndex) select 2)) exitWith {
|
||||
_validIndex = _realIndex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(deviceKeyCurrentIndex) = _validIndex;
|
||||
|
||||
GVAR(deviceKeyCurrentIndex)
|
25
addons/common/functions/fnc_deviceKeyRegisterNew.sqf
Normal file
25
addons/common/functions/fnc_deviceKeyRegisterNew.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Finds next valid index for the device array.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Localized Device Display Name <STRING>
|
||||
* 1: Image <STRING>
|
||||
* 2: Condtion Code (do they have the device) <CODE>
|
||||
* 3: Toggle Code (on home press) <CODE>
|
||||
* 4: Close Code (on ctrl-home press) <CODE>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditionCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_5(_displayName,_iconImage,_conditionCode,_toggleCode,_closeCode);
|
||||
|
||||
GVAR(deviceKeyHandlingArray) pushBack [_displayName,_iconImage,_conditionCode,_toggleCode,_closeCode];
|
||||
[] call FUNC(deviceKeyFindValidIndex);
|
@ -14,21 +14,8 @@
|
||||
|
||||
PARAMS_2(_func,_params);
|
||||
|
||||
[
|
||||
{
|
||||
EXPLODE_2_PVT(_this,_params,_pfhId);
|
||||
EXPLODE_2_PVT(_params,_delayedExecParams,_startFrame);
|
||||
EXPLODE_2_PVT(_delayedExecParams,_func,_funcParams);
|
||||
|
||||
// Exit if we are still on the same frame
|
||||
if (diag_frameno == _startFrame) exitWith {};
|
||||
|
||||
// Remove the PFH
|
||||
[_pfhId] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
// Execute the function
|
||||
_funcParams call _func;
|
||||
},
|
||||
0,
|
||||
[_this, diag_frameno]
|
||||
] call CBA_fnc_addPerFrameHandler
|
||||
if (diag_frameno != GVAR(nextFrameNo)) then {
|
||||
GVAR(nextFrameBufferA) pushBack [_params, _func];
|
||||
} else {
|
||||
GVAR(nextFrameBufferB) pushBack [_params, _func];
|
||||
};
|
||||
|
@ -1,15 +1,21 @@
|
||||
/*
|
||||
* Author: bux578, commy2
|
||||
* Author: bux578, commy2, akalegman
|
||||
*
|
||||
* Checks if a unit is a player / curator controlled unit.
|
||||
* Currently returns false for non-local remote controlled zeus units. (Remotes from another zeus machine)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit to be checked (object)
|
||||
* 1: exclude remote controlled units (boolean)
|
||||
*
|
||||
* Return Value:
|
||||
* Bool: is unit a player?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
isPlayer (_this select 0) || {_this select 0 == call FUNC(player)}
|
||||
private ["_unit", "_excludeRemoteControlled"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_excludeRemoteControlled = if (count _this > 1) then {_this select 1} else {false};
|
||||
|
||||
isPlayer _unit || (!_excludeRemoteControlled && {_unit == call FUNC(player)})
|
||||
|
@ -22,16 +22,3 @@ PARAMS_3(_func,_params,_delay);
|
||||
|
||||
GVAR(waitAndExecArray) pushBack [(ACE_time + _delay), _func, _params];
|
||||
GVAR(waitAndExecArray) sort true;
|
||||
|
||||
if ((count GVAR(waitAndExecArray)) == 1) then {
|
||||
[{
|
||||
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
|
||||
private ["_entry"];
|
||||
_entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
(_entry select 2) call (_entry select 1);
|
||||
};
|
||||
if ((count GVAR(waitAndExecArray)) == 0) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -475,78 +475,100 @@
|
||||
<Polish>Sprawdzaj PBO</Polish>
|
||||
<Spanish>Comprobar PBOs</Spanish>
|
||||
<German>Überprüfe PBOs</German>
|
||||
<Czech>Zkontrolovat PBO</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Description">
|
||||
<English></English>
|
||||
<Polish>Sprawdzaj spójność addonów z serwerem</Polish>
|
||||
<Spanish>Este módulo verifica la integridad de los addons con los que iniciamos el simulador</Spanish>
|
||||
<German>Dieses Modul überprüft ob jeder Spieler die richtigen PBO-Dateien hat.</German>
|
||||
<Czech>Zjistit addon který je v souladu se serverem</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_DisplayName">
|
||||
<English>Action</English>
|
||||
<Polish>Akcja</Polish>
|
||||
<Spanish>Acción</Spanish>
|
||||
<German>Aktion</German>
|
||||
<Czech>Akce</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Description">
|
||||
<English>What to do with people who do not have the right PBOs?</English>
|
||||
<Polish>Co zrobić z graczami, którzy nie mają właściwych PBO?</Polish>
|
||||
<Spanish>¿Qué hacer con la gente que no tiene correctamente los PBOs?</Spanish>
|
||||
<German>Was soll mit Leuten passieren, die nicht die richtigen PBOs haben?</German>
|
||||
<Czech>Co udělat s lidmi, co nemají správné addony?</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnOnce">
|
||||
<English>Warn once</English>
|
||||
<Polish>Ostrzeż raz</Polish>
|
||||
<Spanish>Avisar una vez</Spanish>
|
||||
<German>Einmal verwarnen</German>
|
||||
<Czech>Upozornit jednou</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_WarnPerm">
|
||||
<English>Warn (permanent)</English>
|
||||
<Polish>Ostrzeżenie (permanentne)</Polish>
|
||||
<Spanish>Avisar (permanente)</Spanish>
|
||||
<German>Immer verwarnen</German>
|
||||
<Czech>Upozornit (permanentně)</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Kick">
|
||||
<English>Kick</English>
|
||||
<Polish>Kick</Polish>
|
||||
<Spanish>Expulsar</Spanish>
|
||||
<German>Kicken</German>
|
||||
<Czech>Vyhodit</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_DisplayName">
|
||||
<English>Check all addons</English>
|
||||
<Polish>Sprawdź wsz. addony</Polish>
|
||||
<Spanish>Comprobar todos los addons</Spanish>
|
||||
<German>Alle Addons überprüfen</German>
|
||||
<Czech>Zkontrolovat všechny addony</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_CheckAll_Description">
|
||||
<English>Check all addons instead of only those of ACE?</English>
|
||||
<Polish>Sprawdzaj wszystkie addony czy tylko te z ACE?</Polish>
|
||||
<Spanish>Comprobar todos los addons en vez de solo los del ACE</Spanish>
|
||||
<German>Alle Addons anstatt nur ACE überprüfen?</German>
|
||||
<Czech>Zkontrolovat všechny addony namísto jen těch od ACE?</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_DisplayName">
|
||||
<English>Whitelist</English>
|
||||
<Polish>Biała lista</Polish>
|
||||
<Spanish>Lista blanca</Spanish>
|
||||
<German>Whitelist</German>
|
||||
<Czech>Seznam povolených</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Whitelist_Description">
|
||||
<English>What addons are allowed regardless?</English>
|
||||
<Polish>Jakie addony są dozwolone?</Polish>
|
||||
<Spanish>Qué addons están permitidos igualmente</Spanish>
|
||||
<German>Welche Addons werden dennoch erlaubt?</German>
|
||||
<Czech>Jaké addony jsou povoleny?</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_LSDVehicles_DisplayName">
|
||||
<English>LSD Vehicles</English>
|
||||
<Polish>Pojazdy LSD</Polish>
|
||||
<Spanish>Vehículos LSD</Spanish>
|
||||
<German>LSD-Fahrzeuge</German>
|
||||
<Czech>LSD vozidla</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_LSDVehicles_Description">
|
||||
<English>Adds LSD effect to synchronized vehicle</English>
|
||||
<Polish>Dodaje efekt LSD pod zsynchronizowany pojazd</Polish>
|
||||
<Spanish>Añade el efecto LSD al vehículo sincronizado</Spanish>
|
||||
<German>Fügt einen LSD-Effekt zum synchronisierten Fahrzeug hinzu</German>
|
||||
<Czech>Přidá LSD efekt pro synchronizované vozidla</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
||||
<English>Toggle Handheld Device</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_closeHandheldDevice">
|
||||
<English>Close Handheld Device</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_cycleHandheldDevices">
|
||||
<English>Cycle Handheld Devices</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
1
addons/concertina_wire/$PBOPREFIX$
Normal file
1
addons/concertina_wire/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\concertina_wire
|
44
addons/concertina_wire/CfgEventHandlers.hpp
Normal file
44
addons/concertina_wire/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
// TODO: Probably needs handledamage eh for better tracking what killed the wire
|
||||
// Also disallow wire becoming destroyed by small explosives e.g. 40mm
|
||||
class ACE_ConcertinaWire {
|
||||
class ADDON {
|
||||
killed = QUOTE(call FUNC(handleKilled));
|
||||
};
|
||||
};
|
||||
class Land_Razorwire_F {
|
||||
class ADDON {
|
||||
killed = QUOTE(call FUNC(handleKilled));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Init_EventHandlers {
|
||||
class ACE_ConcertinaWireCoil {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DEFUNC(dragging,initObject));
|
||||
};
|
||||
};
|
||||
class ACE_ConcertinaWire {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_init));
|
||||
};
|
||||
};
|
||||
class Land_Razorwire_F {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_init));
|
||||
};
|
||||
};
|
||||
};
|
139
addons/concertina_wire/CfgVehicles.hpp
Normal file
139
addons/concertina_wire/CfgVehicles.hpp
Normal file
@ -0,0 +1,139 @@
|
||||
|
||||
class CfgVehicles {
|
||||
class Fence;
|
||||
class thingX;
|
||||
class NonStrategic;
|
||||
|
||||
class ACE_ConcertinaWireNoGeo: Fence {
|
||||
XEH_ENABLED;
|
||||
scope = 1;
|
||||
displayName = "";
|
||||
model = PATHTOF(data\ACE_ConcertinaWireNoGeo.p3d);
|
||||
destrType = "DestructTent";
|
||||
accuracy = 0.3;
|
||||
mapSize = 2.8;
|
||||
animated = 1;
|
||||
autocenter = 0;
|
||||
armor = 200;
|
||||
class AnimationSources {
|
||||
class fix1 {
|
||||
source = "user";
|
||||
animPeriod = 1e-007;
|
||||
initPhase = 0;
|
||||
};
|
||||
class fix2: fix1 {};
|
||||
class fix3: fix1 {};
|
||||
class fix4: fix1 {};
|
||||
class rotate {
|
||||
source = "user";
|
||||
animPeriod = 1e-007;
|
||||
};
|
||||
class wire_2 {
|
||||
source = "user";
|
||||
animPeriod = 1e-007;
|
||||
};
|
||||
class wire_3: wire_2{};
|
||||
class wire_4: wire_2{};
|
||||
class wire_5: wire_2{};
|
||||
class wire_6: wire_2{};
|
||||
class wire_7: wire_2{};
|
||||
class wire_8: wire_2{};
|
||||
class wire_9: wire_2{};
|
||||
class wire_10: wire_2{};
|
||||
class wire_11: wire_2{};
|
||||
class wire_12: wire_2{};
|
||||
class wire_13: wire_2{};
|
||||
class wire_14: wire_2{};
|
||||
class wire_15: wire_2{};
|
||||
class wire_16: wire_2{};
|
||||
class wire_17: wire_2{};
|
||||
class wire_18: wire_2{};
|
||||
|
||||
class wire_2_1: wire_2 {
|
||||
animPeriod = 8;
|
||||
};
|
||||
class wire_3_1: wire_2_1 {};
|
||||
class wire_4_1: wire_2_1 {};
|
||||
class wire_5_1: wire_2_1 {};
|
||||
class wire_6_1: wire_2_1 {};
|
||||
class wire_7_1: wire_2_1 {};
|
||||
class wire_8_1: wire_2_1 {};
|
||||
class wire_9_1: wire_2_1 {};
|
||||
class wire_10_1: wire_2_1 {};
|
||||
class wire_11_1: wire_2_1 {};
|
||||
class wire_12_1: wire_2_1 {};
|
||||
class wire_13_1: wire_2_1 {};
|
||||
class wire_14_1: wire_2_1 {};
|
||||
class wire_15_1: wire_2_1 {};
|
||||
class wire_16_1: wire_2_1 {};
|
||||
class wire_17_1: wire_2_1 {};
|
||||
class wire_18_1: wire_2_1 {};
|
||||
};
|
||||
};
|
||||
class ACE_ConcertinaWire: ACE_ConcertinaWireNoGeo {
|
||||
scope = 2;
|
||||
displayName = $STR_ACE_CONCERTINA_WIRE;
|
||||
model = PATHTOF(data\ACE_ConcertinaWire.p3d);
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
selection = "";
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
class ACE_Dismount {
|
||||
selection = "";
|
||||
displayName = "$STR_ACE_UNROLLWIRE";
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\icon_sandbag_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_ConcertinaWireCoil: thingX {
|
||||
XEH_ENABLED;
|
||||
scope = 2;
|
||||
displayName = $STR_ACE_CONCERTINA_WIRECOIL;
|
||||
model = PATHTOF(data\ACE_ConcertinaWireCoil.p3d);
|
||||
mapsize = 0.5;
|
||||
animated = 0;
|
||||
nameSound = "fence";
|
||||
typicalCargo[] = {};
|
||||
transportAmmo = 0;
|
||||
transportRepair = 0;
|
||||
transportFuel = 0;
|
||||
cost = 0;
|
||||
armor = 1000;
|
||||
destrType = "DestructNo";
|
||||
accuracy = 1000;
|
||||
autocenter = 0;
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,0.5,0.5};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
selection = "";
|
||||
distance = 4;
|
||||
condition = "true";
|
||||
class ACE_Deploy {
|
||||
selection = "";
|
||||
displayName = "$STR_ACE_ROLLWIRE";
|
||||
distance = 4;
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\icon_sandbag_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Land_Razorwire_F: NonStrategic {
|
||||
XEH_ENABLED;
|
||||
};
|
||||
};
|
10
addons/concertina_wire/README.md
Normal file
10
addons/concertina_wire/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
ace_concertina_wire
|
||||
===============
|
||||
|
||||
Adds concertina wire.
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
BIN
addons/concertina_wire/UI/icon_sandbag_ca.paa
Normal file
BIN
addons/concertina_wire/UI/icon_sandbag_ca.paa
Normal file
Binary file not shown.
4
addons/concertina_wire/XEH_init.sqf
Normal file
4
addons/concertina_wire/XEH_init.sqf
Normal file
@ -0,0 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_wire);
|
||||
_wire addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
|
11
addons/concertina_wire/XEH_postInit.sqf
Normal file
11
addons/concertina_wire/XEH_postInit.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(placer) = objNull;
|
||||
GVAR(deployPFH) = -1;
|
||||
|
||||
// Deploy concertina wire if interact menu is opened
|
||||
["interactMenuOpened", {
|
||||
if (GVAR(deployPFH) != -1) then {
|
||||
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
11
addons/concertina_wire/XEH_preInit.sqf
Normal file
11
addons/concertina_wire/XEH_preInit.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(deploy);
|
||||
PREP(dismount);
|
||||
PREP(dismountSuccess);
|
||||
PREP(handleDamage);
|
||||
PREP(handleKilled);
|
||||
|
||||
ADDON = true;
|
15
addons/concertina_wire/config.cpp
Normal file
15
addons/concertina_wire/config.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {"ACE_ConcertinaWire", "ACE_ConcertinaWireNoGeo", "ACE_ConcertinaWireCoil"};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_apl", "ace_interaction"};
|
||||
author[] = {"Rocko", "Ruthberg"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
BIN
addons/concertina_wire/data/ACE_ConcertinaWire.p3d
Normal file
BIN
addons/concertina_wire/data/ACE_ConcertinaWire.p3d
Normal file
Binary file not shown.
BIN
addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d
Normal file
BIN
addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d
Normal file
Binary file not shown.
BIN
addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d
Normal file
BIN
addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d
Normal file
Binary file not shown.
290
addons/concertina_wire/data/model.cfg
Normal file
290
addons/concertina_wire/data/model.cfg
Normal file
@ -0,0 +1,290 @@
|
||||
class CfgSkeletons {
|
||||
class Default {
|
||||
isDiscrete = 1;
|
||||
skeletonInherit = "";
|
||||
skeletonBones[] = {};
|
||||
};
|
||||
class ACE_SB_Skeleton: Default {};
|
||||
class ACE_ConcertinaSkeleton {
|
||||
isDiscrete = 0;
|
||||
skeletonInherit = "";
|
||||
skeletonBones[] = {
|
||||
"1","",
|
||||
"2","1",
|
||||
"3","2",
|
||||
"4","3",
|
||||
"5","4",
|
||||
"6","5",
|
||||
"7","6",
|
||||
"8","7",
|
||||
"9","8",
|
||||
"10","9",
|
||||
"11","10",
|
||||
"12","11",
|
||||
"13","12",
|
||||
"14","13",
|
||||
"15","14",
|
||||
"16","15",
|
||||
"17","16",
|
||||
"18","17",
|
||||
"fix1","",
|
||||
"fix2","",
|
||||
"fix3","",
|
||||
"fix4",""
|
||||
};
|
||||
};
|
||||
class ace_tacticalladder_skeleton: Default {
|
||||
isDiscrete = 0;
|
||||
skeletonInherit = "";
|
||||
skeletonBones[] = {
|
||||
"base","",
|
||||
"1","base",
|
||||
"2","1",
|
||||
"3","2",
|
||||
"4","3",
|
||||
"5","4",
|
||||
"6","5",
|
||||
"7","6",
|
||||
"8","7",
|
||||
"9","8",
|
||||
"10","9",
|
||||
"11","10",
|
||||
"step","11"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgModels {
|
||||
class Default {
|
||||
sectionsInherit="";
|
||||
sections[] = {""};
|
||||
skeletonName = "";
|
||||
};
|
||||
class ace_sandbag_build {
|
||||
sectionsInherit = "Default";
|
||||
sections[] = {"zbytek"};
|
||||
skeletonName = "ACE_SB_Skeleton";
|
||||
};
|
||||
class ACE_ConcertinaWire {
|
||||
skeletonName = "ACE_ConcertinaSkeleton";
|
||||
sections[] = {};
|
||||
sectionsInherit = "";
|
||||
class Animations {
|
||||
class fix1 {
|
||||
type="hide";
|
||||
source="user";
|
||||
selection="fix1";
|
||||
minValue = 0;
|
||||
maxValue = 1;
|
||||
minPhase = 0;
|
||||
maxPhase = 1;
|
||||
hideValue = 1;
|
||||
};
|
||||
class fix2: fix1 {
|
||||
selection="fix2";
|
||||
};
|
||||
class fix3: fix1 {
|
||||
selection="fix3";
|
||||
};
|
||||
class fix4: fix1 {
|
||||
selection="fix4";
|
||||
};
|
||||
class rotate {
|
||||
type = "rotation";
|
||||
source = "";
|
||||
sourceAddress = "loop";
|
||||
selection = "1";
|
||||
axis = "rotate_axis";
|
||||
minValue = 0;
|
||||
maxValue = 360;
|
||||
|
||||
angle0="rad -360";
|
||||
angle1="rad +360";
|
||||
};
|
||||
class wire_2 {
|
||||
type = "translation";
|
||||
source = "";
|
||||
selection = "2";
|
||||
axis = "2_axis";
|
||||
animPeriod = 0;
|
||||
minValue = 0;
|
||||
maxValue = 1;
|
||||
minPhase = 0;
|
||||
maxPhase = 1;
|
||||
offset0 = 0;
|
||||
offset1 = -1;
|
||||
};
|
||||
class wire_3: wire_2 {
|
||||
selection = "3"; axis = "3_axis";
|
||||
};
|
||||
class wire_4: wire_2 {
|
||||
selection = "4"; axis = "4_axis";
|
||||
};
|
||||
class wire_5: wire_2 {
|
||||
selection = "5"; axis = "5_axis";
|
||||
};
|
||||
class wire_6: wire_2 {
|
||||
selection = "6"; axis = "6_axis";
|
||||
};
|
||||
class wire_7: wire_2 {
|
||||
selection = "7"; axis = "7_axis";
|
||||
};
|
||||
class wire_8: wire_2 {
|
||||
selection = "8"; axis = "8_axis";
|
||||
};
|
||||
class wire_9: wire_2 {
|
||||
selection = "9"; axis = "9_axis";
|
||||
};
|
||||
class wire_10: wire_2 {
|
||||
selection = "10"; axis = "10_axis";
|
||||
};
|
||||
class wire_11: wire_2 {
|
||||
selection = "11"; axis = "11_axis";
|
||||
};
|
||||
class wire_12: wire_2 {
|
||||
selection = "12"; axis = "12_axis";
|
||||
};
|
||||
class wire_13: wire_2 {
|
||||
selection = "13"; axis = "13_axis";
|
||||
};
|
||||
class wire_14: wire_2 {
|
||||
selection = "14"; axis = "14_axis";
|
||||
};
|
||||
class wire_15: wire_2 {
|
||||
selection = "15"; axis = "15_axis";
|
||||
};
|
||||
class wire_16: wire_2 {
|
||||
selection = "16"; axis = "16_axis";
|
||||
};
|
||||
class wire_17: wire_2 {
|
||||
selection = "17"; axis = "17_axis";
|
||||
};
|
||||
class wire_18: wire_2 {
|
||||
selection = "18"; axis = "18_axis";
|
||||
};
|
||||
class wire_2_1: wire_2 {
|
||||
selection = "2";axis = "2_axis";offset1 = -1;
|
||||
};
|
||||
class wire_3_1: wire_2_1 {
|
||||
selection = "3"; axis = "3_axis";
|
||||
};
|
||||
class wire_4_1: wire_2_1 {
|
||||
selection = "4"; axis = "4_axis";
|
||||
};
|
||||
class wire_5_1: wire_2_1 {
|
||||
selection = "5"; axis = "5_axis";
|
||||
};
|
||||
class wire_6_1: wire_2_1 {
|
||||
selection = "6"; axis = "6_axis";
|
||||
};
|
||||
class wire_7_1: wire_2_1 {
|
||||
selection = "7"; axis = "7_axis";
|
||||
};
|
||||
class wire_8_1: wire_2_1 {
|
||||
selection = "8"; axis = "8_axis";
|
||||
};
|
||||
class wire_9_1: wire_2_1 {
|
||||
selection = "9"; axis = "9_axis";
|
||||
};
|
||||
class wire_10_1: wire_2_1 {
|
||||
selection = "10"; axis = "10_axis";
|
||||
};
|
||||
class wire_11_1: wire_2_1 {
|
||||
selection = "11"; axis = "11_axis";
|
||||
};
|
||||
class wire_12_1: wire_2_1 {
|
||||
selection = "12"; axis = "12_axis";
|
||||
};
|
||||
class wire_13_1: wire_2_1 {
|
||||
selection = "13"; axis = "13_axis";
|
||||
};
|
||||
class wire_14_1: wire_2_1 {
|
||||
selection = "14"; axis = "14_axis";
|
||||
};
|
||||
class wire_15_1: wire_2_1 {
|
||||
selection = "15"; axis = "15_axis";
|
||||
};
|
||||
class wire_16_1: wire_2_1 {
|
||||
selection = "16"; axis = "16_axis";
|
||||
};
|
||||
class wire_17_1: wire_2_1 {
|
||||
selection = "17"; axis = "17_axis";
|
||||
};
|
||||
class wire_18_1: wire_2_1 {
|
||||
selection = "18"; axis = "18_axis";
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_ConcertinaWireNoGeo: ACE_ConcertinaWire {};
|
||||
class ace_tacticalladder {
|
||||
skeletonName = "ace_tacticalladder_skeleton";
|
||||
sections[] = { "roadway" };
|
||||
sectionsInherit = "";
|
||||
class Animations {
|
||||
class rotate {
|
||||
type = "rotation";
|
||||
source = "";
|
||||
sourceAddress = "clamp";
|
||||
selection = "base";
|
||||
axis = "axis_rotate";
|
||||
minValue = 0;
|
||||
maxValue = 90;
|
||||
angle0="rad 0";
|
||||
angle1="rad +90";
|
||||
};
|
||||
class extract_1 {
|
||||
type = "translation";
|
||||
source = "";
|
||||
selection = "1";
|
||||
axis = "axis_1";
|
||||
animPeriod = 0;
|
||||
minValue = 0;
|
||||
maxValue = 1;
|
||||
minPhase = 0;
|
||||
maxPhase = 1;
|
||||
offset0 = 0;
|
||||
offset1 = 0.82;
|
||||
};
|
||||
class extract_2: extract_1 {
|
||||
selection = "2";
|
||||
axis = "axis_2";
|
||||
};
|
||||
class extract_3: extract_1 {
|
||||
selection = "3";
|
||||
axis = "axis_3";
|
||||
};
|
||||
class extract_4: extract_1 {
|
||||
selection = "4";
|
||||
axis = "axis_4";
|
||||
};
|
||||
class extract_5: extract_1 {
|
||||
selection = "5";
|
||||
axis = "axis_5";
|
||||
};
|
||||
class extract_6: extract_1 {
|
||||
selection = "6";
|
||||
axis = "axis_6";
|
||||
};
|
||||
class extract_7: extract_1 {
|
||||
selection = "7";
|
||||
axis = "axis_7";
|
||||
};
|
||||
class extract_8: extract_1 {
|
||||
selection = "8";
|
||||
axis = "axis_8";
|
||||
};
|
||||
class extract_9: extract_1 {
|
||||
selection = "9";
|
||||
axis = "axis_9";
|
||||
};
|
||||
class extract_10: extract_1 {
|
||||
selection = "10";
|
||||
axis = "axis_10";
|
||||
};
|
||||
class extract_11: extract_1 {
|
||||
selection = "11";
|
||||
axis = "axis_11";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
84
addons/concertina_wire/functions/fnc_deploy.sqf
Normal file
84
addons/concertina_wire/functions/fnc_deploy.sqf
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Author: Rocko, Ruthberg
|
||||
*
|
||||
* Deploys the concertina wire
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire coil <OBJECT>
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_wirecoil,_unit);
|
||||
|
||||
private ["_wireNoGeo", "_dir", "_pos", "_wireNoGeoPos"];
|
||||
|
||||
_wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0];
|
||||
{
|
||||
_wireNoGeo animate [_x, 1];
|
||||
} foreach WIRE_FAST;
|
||||
|
||||
GVAR(placer) = _unit;
|
||||
_dir = getDir _unit;
|
||||
_pos = getPosASL _unit;
|
||||
_wireNoGeoPos = _pos vectorAdd [1.1 * sin(_dir), 1.1 * cos(_dir), 0];
|
||||
|
||||
_wireNoGeo setDir _dir;
|
||||
_wireNoGeo setPosASL _wireNoGeoPos;
|
||||
|
||||
deleteVehicle _wirecoil;
|
||||
|
||||
_unit setVariable [QGVAR(wireDeployed), false];
|
||||
|
||||
GVAR(deployPFH) = [{
|
||||
EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action);
|
||||
|
||||
private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"];
|
||||
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
|
||||
_posEnd = (getPosASL _unit) vectorAdd (vectorDir _unit);
|
||||
_dirVect = _posStart vectorDiff _posEnd;
|
||||
_dir = _dirVect call CBA_fnc_vectDir;
|
||||
_range = vectorMagnitude _dirVect;
|
||||
_anim = 0 max (1 - (_range / 12));
|
||||
|
||||
if (!(alive _unit) || _range >= 12 || (_unit getVariable [QGVAR(wireDeployed), false])) exitWith {
|
||||
_wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0];
|
||||
{
|
||||
_wire animate [_x, _anim];
|
||||
} foreach WIRE_FAST;
|
||||
|
||||
[{
|
||||
EXPLODE_5_PVT(_this select 0,_wireNoGeo,_wire,_anim,_dir,_wireNoGeoPos);
|
||||
if (_wire animationPhase "wire_2" == _anim) then {
|
||||
deleteVehicle _wireNoGeo;
|
||||
_wire setDir _dir;
|
||||
_wire setPosASL _wireNoGeoPos;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, [_wireNoGeo, _wire, _anim, _dir, _wireNoGeoPos]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_wireNoGeo setDir _dir;
|
||||
{
|
||||
_wireNoGeo animate [_x, _anim];
|
||||
} foreach WIRE_FAST;
|
||||
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);
|
||||
|
||||
GVAR(placer) setVariable [QGVAR(Deploy),
|
||||
[GVAR(placer), "DefaultAction",
|
||||
{GVAR(deployPFH) != -1},
|
||||
{GVAR(placer) setVariable [QGVAR(wireDeployed), true]}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
41
addons/concertina_wire/functions/fnc_dismount.sqf
Normal file
41
addons/concertina_wire/functions/fnc_dismount.sqf
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Start dismounting the concertina wire
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire <OBJECT>
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith {
|
||||
[{
|
||||
_this call FUNC(dismount);
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
};
|
||||
|
||||
PARAMS_2(_wire,_unit);
|
||||
|
||||
private ["_config", "_delay"];
|
||||
_config = (configFile >> "CfgVehicles" >> typeOf _unit);
|
||||
_delay = if (getNumber(_config >> "engineer") == 1 || getNumber(_config >> "canDeactivateMines") == 1) then {60} else {120};
|
||||
|
||||
// TODO: Animation?
|
||||
|
||||
[
|
||||
_delay,
|
||||
[_wire],
|
||||
{(_this select 0) call FUNC(dismountSuccess)},
|
||||
{},
|
||||
localize "STR_ACE_UNROLLWIRE",
|
||||
{true},
|
||||
["isnotinside"]
|
||||
] call EFUNC(common,progressBar);
|
42
addons/concertina_wire/functions/fnc_dismountSuccess.sqf
Normal file
42
addons/concertina_wire/functions/fnc_dismountSuccess.sqf
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Author: Rocko, Ruthberg
|
||||
*
|
||||
* Dismounts the concertina wire
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_wire);
|
||||
|
||||
{
|
||||
_wire animate [_x, 1];
|
||||
} foreach WIRE_FAST;
|
||||
|
||||
[{
|
||||
EXPLODE_1_PVT(_this select 0,_wire);
|
||||
|
||||
if (_wire animationPhase "wire_2" == 1) then {
|
||||
private ["_dir", "_pos", "_wirecoil"];
|
||||
|
||||
_dir = getDir _wire;
|
||||
_pos = getPosASL _wire;
|
||||
|
||||
_wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0];
|
||||
|
||||
deleteVehicle _wire;
|
||||
|
||||
_wirecoil setDir _dir;
|
||||
_wirecoil setPosASL _pos;
|
||||
_wirecoil setVelocity [0, 0, 0];
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, [_wire]] call CBA_fnc_addPerFrameHandler;
|
29
addons/concertina_wire/functions/fnc_handleDamage.sqf
Normal file
29
addons/concertina_wire/functions/fnc_handleDamage.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Handles wire damage
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire <OBJECT>
|
||||
* 1: selectionName <STRING>
|
||||
* 2: damage <NUMBER>
|
||||
* 3: source <OBJECT>
|
||||
* 4: projectile <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_5(_wire,_selectionName,_damage,_source,_projectile);
|
||||
|
||||
if (_damage < 0.5) exitWith { 0 };
|
||||
|
||||
if (!(isNull _source)) then {
|
||||
_wire setVariable [QGVAR(lastDamager), _source];
|
||||
};
|
||||
|
||||
_damage
|
135
addons/concertina_wire/functions/fnc_handleKilled.sqf
Normal file
135
addons/concertina_wire/functions/fnc_handleKilled.sqf
Normal file
@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Author: Rocko
|
||||
*
|
||||
* Handles wire and vehicle damage
|
||||
*
|
||||
* Arguments:
|
||||
* 0: wire <OBJECT>
|
||||
* 1: killer (vehicle) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_wire,_killer);
|
||||
|
||||
if (isNull _killer) then {
|
||||
_killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull];
|
||||
if (isNull _killer) then {
|
||||
_killer = nearestObject [_wire, "car"];
|
||||
};
|
||||
};
|
||||
if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {};
|
||||
|
||||
private ["_type", "_mode", "_distance", "_anim", "_parts", "_selectionPart", "_selection", "_pos_w", "_dir_w", "_vehicle"];
|
||||
_type = typeOf _wire;
|
||||
_mode = switch (_type) do {
|
||||
case "ACE_ConcertinaWire": { 0 };
|
||||
case "Land_Razorwire_F": { 1 };
|
||||
default { -1 };
|
||||
};
|
||||
|
||||
if (_mode == -1) exitWith {};
|
||||
|
||||
// _mode = 0 = Single Coil
|
||||
// _mode = 1 = Triple Coil
|
||||
|
||||
// --------------------------------
|
||||
// L M R
|
||||
// 4.54929 (4)
|
||||
// 6.13564 (6)
|
||||
//9.78744 (10)
|
||||
|
||||
_distance = _wire distance _killer;
|
||||
if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire
|
||||
|
||||
_type = typeOf _wire;
|
||||
_anim = _wire animationPhase "wire_2";
|
||||
_pos_w = getPos _wire;
|
||||
_dir_w = getDir _wire;
|
||||
_vehicle = vehicle _killer;
|
||||
|
||||
if (_mode == 0) then {
|
||||
private ["_x", "_y", "_found", "_wireCheckPosAr", "_no"];
|
||||
_x = _pos_w select 0;
|
||||
_y = _pos_w select 1;
|
||||
// Check if two Single coils are placed next to each other (i.e playes have built a big wire obstacle)
|
||||
_wireCheckPosAr = [
|
||||
[_x + (sin (_dir_w+90) * 1.5),_y + (cos (_dir_w+90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w+90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w+90) * 1.5)],
|
||||
[_x + (sin (_dir_w-90) * 1.5),_y + (cos (_dir_w-90) * 1.5)],
|
||||
[(_x-(sin _dir_w)) + (sin (_dir_w-90) * 1.5),(_y-(cos _dir_w)) + (cos (_dir_w-90) * 1.5)]
|
||||
];
|
||||
{
|
||||
_found = false;
|
||||
_no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
||||
_no = _no - [_wire]; //diag_log _no;
|
||||
if (count _no > 0) exitWith {
|
||||
_found = true; //diag_log "found";
|
||||
};
|
||||
} foreach _wireCheckPosAr;
|
||||
// Double coil found!
|
||||
if (_found) then {
|
||||
_mode = 1;
|
||||
} else {
|
||||
// Randomly make a single coil also catch tanks, if speed is high
|
||||
if (_vehicle isKindOf "Tank" && {20 > random 100} && {speed _vehicle > 30}) then {
|
||||
_mode = 1;
|
||||
} else {
|
||||
if !(_vehicle isKindOf "Tank") then {
|
||||
_mode = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (_mode == 1) then {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Tank"): {
|
||||
_parts = ["ltrack","rtrack"];
|
||||
};
|
||||
case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): {
|
||||
_parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "Wheeled_APC" || {_vehicle isKindOf "Car"}): {
|
||||
_parts = ["lfwheel","lf2wheel","lmwheel","lbwheel","rfwheel","rf2wheel","rmwheel","rbwheel"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (canMove _vehicle) then {
|
||||
{
|
||||
_selectionPart = "hit" + _x;
|
||||
if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then {
|
||||
_selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name");
|
||||
// TODO: Only the tires that have touched the wire should burst.
|
||||
_vehicle setHit [_selection, 1];
|
||||
};
|
||||
} forEach _parts;
|
||||
};
|
||||
|
||||
if (_mode == 1) then {
|
||||
if (_vehicle isKindOf "StaticWeapon") exitWith {};
|
||||
[{
|
||||
PARAMS_2(_vehicle,_wire);
|
||||
|
||||
_vehicle setVelocity ((velocity _vehicle) vectorMultiply 0.75);
|
||||
|
||||
private ["_vPos", "_vDir"];
|
||||
// Set vehicle back in front of wire, since the wire will make the vehicle jump, and a wire with no geometry lod is undestructible and not recognizeable
|
||||
_vPos = getPosASL _vehicle;
|
||||
_vDir = getDir _vehicle;
|
||||
_vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]);
|
||||
// TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires
|
||||
}, [_vehicle, _wire], 0.1, 0] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
|
||||
//TODO: Create broken geoless wire (two version)
|
||||
//TODO: Make wire remains stop vehicles
|
1
addons/concertina_wire/functions/script_component.hpp
Normal file
1
addons/concertina_wire/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\concertina_wire\script_component.hpp"
|
15
addons/concertina_wire/script_component.hpp
Normal file
15
addons/concertina_wire/script_component.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#define COMPONENT concertina_wire
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_CONCERTINA_WIRE
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_CONCERTINA_WIRE
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_CONCERTINA_WIRE
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define WIRE_FAST ["wire_2","wire_3","wire_4","wire_5","wire_6","wire_7","wire_8","wire_9","wire_10","wire_11","wire_12","wire_13","wire_14","wire_15","wire_16","wire_17","wire_18"]
|
||||
#define WIRE_SLOW ["wire_2_1","wire_3_1","wire_4_1","wire_5_1","wire_6_1","wire_7_1","wire_8_1","wire_9_1","wire_10_1","wire_11_1","wire_12_1","wire_13_1","wire_14_1","wire_15_1","wire_16_1","wire_17_1","wire_18_1"]
|
49
addons/concertina_wire/stringtable.xml
Normal file
49
addons/concertina_wire/stringtable.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="concertina_wire">
|
||||
<Key ID="STR_ACE_CONCERTINA_WIRE">
|
||||
<English>Concertina Wire</English>
|
||||
<German>NATO-Draht</German>
|
||||
<Russian>Проволочная спираль</Russian>
|
||||
<Polish>Drut kolczasty</Polish>
|
||||
<Spanish>Concertina wire</Spanish>
|
||||
<French>Concertina wire</French>
|
||||
<Czech>Ostnatý drát</Czech>
|
||||
<Italian>Concertina wire</Italian>
|
||||
<Hungarian>Concertina wire</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CONCERTINA_WIRECOIL">
|
||||
<English>Concertina Wire Coil</English>
|
||||
<German>NATO-Draht Rolle</German>
|
||||
<Russian>Проволочная спираль (моток)</Russian>
|
||||
<Polish>Zwój drutu kolczastego</Polish>
|
||||
<Spanish>Concertina wire coil</Spanish>
|
||||
<French>Concertina wire coil</French>
|
||||
<Czech>Smyčka ostnatého drátu</Czech>
|
||||
<Italian>Concertina wire coil</Italian>
|
||||
<Hungarian>Concertina wire coil</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_UNROLLWIRE">
|
||||
<English>Dismount Concertina Wire</English>
|
||||
<German>NATO-Draht abbauen</German>
|
||||
<Russian>Демонтировать проволочную спираль</Russian>
|
||||
<Polish>Zwiń drut kolczasty</Polish>
|
||||
<Spanish>Dismount Concertina wire</Spanish>
|
||||
<French>Dismount Concertina wire</French>
|
||||
<Czech>Svinout ostnatý drát</Czech>
|
||||
<Italian>Dismount Concertina wire</Italian>
|
||||
<Hungarian>Dismount Concertina wire</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ROLLWIRE">
|
||||
<English>Deploy Concertina Wire</English>
|
||||
<German>NATO-Draht verlegen</German>
|
||||
<Russian>Монтировать проволочную спираль</Russian>
|
||||
<Polish>Rozwiń drut kolczasty</Polish>
|
||||
<Spanish>Deploy Concertina wire</Spanish>
|
||||
<French>Deploy Concertina wire</French>
|
||||
<Czech>Rozvinout ostnatý drát</Czech>
|
||||
<Italian>Deploy Concertina wire</Italian>
|
||||
<Hungarian>Deploy Concertina wire</Hungarian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
1
addons/dagr/$PBOPREFIX$
Normal file
1
addons/dagr/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\dagr
|
11
addons/dagr/CfgEventHandlers.hpp
Normal file
11
addons/dagr/CfgEventHandlers.hpp
Normal file
@ -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) );
|
||||
};
|
||||
};
|
49
addons/dagr/CfgVehicles.hpp
Normal file
49
addons/dagr/CfgVehicles.hpp
Normal file
@ -0,0 +1,49 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(menu) {
|
||||
displayName = "Configure DAGR";
|
||||
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
||||
statement = QUOTE(call FUNC(menuInit));
|
||||
showDisabled = 0;
|
||||
priority = 0.1;
|
||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||
exceptions[] = {"isNotInside"};
|
||||
class GVAR(toggle) {
|
||||
displayName = "Toggle DAGR";
|
||||
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
||||
statement = QUOTE(call FUNC(toggleOverlay));
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_Item_DAGR: Item_Base_F {
|
||||
author[] = {"Rosuto", "Ruthberg"};
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = "DAGR";
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
class ACE_DAGR {
|
||||
name = "ACE_DAGR";
|
||||
count = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_DAGR,6);
|
||||
};
|
||||
};
|
||||
};
|
19
addons/dagr/CfgWeapons.hpp
Normal file
19
addons/dagr/CfgWeapons.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_DAGR: ACE_ItemCore {
|
||||
author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"};
|
||||
scope = 2;
|
||||
displayName = "DAGR";
|
||||
descriptionShort = "";
|
||||
picture = PATHTOF(UI\DAGR_Icon.paa);
|
||||
icon = "iconObject_circle";
|
||||
mapSize = 0.034;
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 10;
|
||||
};
|
||||
};
|
||||
};
|
424
addons/dagr/Dialog.hpp
Normal file
424
addons/dagr/Dialog.hpp
Normal file
@ -0,0 +1,424 @@
|
||||
// Control types
|
||||
#define CT_STATIC 0
|
||||
#define CT_BUTTON 1
|
||||
#define CT_EDIT 2
|
||||
#define CT_SLIDER 3
|
||||
#define CT_COMBO 4
|
||||
#define CT_LISTBOX 5
|
||||
#define CT_TOOLBOX 6
|
||||
#define CT_CHECKBOXES 7
|
||||
#define CT_PROGRESS 8
|
||||
#define CT_HTML 9
|
||||
#define CT_STATIC_SKEW 10
|
||||
#define CT_ACTIVETEXT 11
|
||||
#define CT_TREE 12
|
||||
#define CT_STRUCTURED_TEXT 13
|
||||
#define CT_CONTEXT_MENU 14
|
||||
#define CT_CONTROLS_GROUP 15
|
||||
#define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button
|
||||
|
||||
#define CT_XKEYDESC 40
|
||||
#define CT_XBUTTON 41
|
||||
#define CT_XLISTBOX 42
|
||||
#define CT_XSLIDER 43
|
||||
#define CT_XCOMBO 44
|
||||
#define CT_ANIMATED_TEXTURE 45
|
||||
#define CT_OBJECT 80
|
||||
#define CT_OBJECT_ZOOM 81
|
||||
#define CT_OBJECT_CONTAINER 82
|
||||
#define CT_OBJECT_CONT_ANIM 83
|
||||
#define CT_LINEBREAK 98
|
||||
#define CT_USER 99
|
||||
#define CT_MAP 100
|
||||
#define CT_MAP_MAIN 101
|
||||
#define CT_List_N_Box 102 // Arma 2 - N columns list box
|
||||
|
||||
|
||||
// Static styles
|
||||
#define ST_POS 0x0F
|
||||
#define ST_HPOS 0x03
|
||||
#define ST_VPOS 0x0C
|
||||
#define ST_LEFT 0x00
|
||||
#define ST_RIGHT 0x01
|
||||
#define ST_CENTER 0x02
|
||||
#define ST_DOWN 0x04
|
||||
#define ST_UP 0x08
|
||||
#define ST_VCENTER 0x0c
|
||||
#define ST_TYPE 0xF0
|
||||
#define ST_SINGLE 0
|
||||
#define ST_MULTI 16
|
||||
#define ST_TITLE_BAR 32
|
||||
#define ST_PICTURE 48
|
||||
#define ST_FRAME 64
|
||||
#define ST_BACKGROUND 80
|
||||
#define ST_GROUP_BOX 96
|
||||
#define ST_GROUP_BOX2 112
|
||||
#define ST_HUD_BACKGROUND 128
|
||||
#define ST_TILE_PICTURE 144
|
||||
#define ST_WITH_RECT 160
|
||||
#define ST_LINE 176
|
||||
#define ST_SHADOW 0x100
|
||||
#define ST_NO_RECT 0x200
|
||||
#define ST_KEEP_ASPECT_RATIO 0x800
|
||||
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
|
||||
|
||||
// Slider styles
|
||||
#define SL_DIR 0x400
|
||||
#define SL_VERT 0
|
||||
#define SL_HORZ 0x400
|
||||
#define SL_TEXTURES 0x10
|
||||
|
||||
// Listbox styles
|
||||
#define LB_TEXTURES 0x10
|
||||
#define LB_MULTI 0x20
|
||||
#define FontM "PuristaMedium"
|
||||
|
||||
class RscText;
|
||||
|
||||
class DAGR_Button {
|
||||
idc = -1;
|
||||
type = CT_BUTTON;
|
||||
style = ST_LEFT;
|
||||
font = "PuristaMedium";
|
||||
sizeEx = 0.02;
|
||||
colorText[] = { 0, 1, 0, 1 };
|
||||
colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state
|
||||
colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state
|
||||
colorBackground[] = { 0, 0, 0, 0 };
|
||||
colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state
|
||||
colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state
|
||||
offsetX = 0;
|
||||
offsetY = 0;
|
||||
offsetPressedX = 0;
|
||||
offsetPressedY = 0;
|
||||
colorShadow[] = { 0, 0, 0, 0 };
|
||||
colorBorder[] = { 0, 0, 0, 0 };
|
||||
borderSize = 0;
|
||||
soundEnter[] = { "", 0, 1 }; // no sound
|
||||
soundPush[] = { "", 0, 1 };
|
||||
soundClick[] = { "", 0, 1 }; // no sound
|
||||
soundEscape[] = { "", 0, 1 }; // no sound
|
||||
x = 0.5;
|
||||
y = 0.5;
|
||||
w = 0.07;
|
||||
h = 0.05;
|
||||
text = "";
|
||||
action = "";
|
||||
};
|
||||
class DAGR_Menu_Pic {
|
||||
type = 0;
|
||||
idc = -1;
|
||||
style = 48;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0.7;
|
||||
h = 1.4;
|
||||
text = "";
|
||||
colorBackground[] = {};
|
||||
colorText[] = {};
|
||||
font = "PuristaMedium";
|
||||
sizeEx = 0.04;
|
||||
waitForLoad = 0;
|
||||
};
|
||||
|
||||
class DAGR_Menu_Text {
|
||||
type = 0;
|
||||
idc = -1;
|
||||
style = 0x00;
|
||||
x = 0.5;
|
||||
y = 0.5;
|
||||
w = 0.15;
|
||||
h = 0.15;
|
||||
colorBackground[] = { 0, 0, 0, 0 };
|
||||
colorText[] = { 0.239, 0.216, 0.153, 1 };
|
||||
font = "PuristaMedium";
|
||||
sizeEx = 0.03;
|
||||
waitForLoad = 0;
|
||||
text = "";
|
||||
};
|
||||
|
||||
class DAGR_Menu {
|
||||
idd = 266860;
|
||||
movingEnable = false;
|
||||
duration = 100000;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
name = "Dagr_Menu";
|
||||
onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]";
|
||||
onUnload = QUOTE(GVAR(PWR) = true); // Simulate pressing the power button
|
||||
controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button",
|
||||
"DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0",
|
||||
"DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2",
|
||||
"DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3",
|
||||
"DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"};
|
||||
|
||||
class DAGR_MENU_UI : DAGR_Menu_Pic {
|
||||
idc = 266861;
|
||||
x = 0.175;
|
||||
y = -0.173;
|
||||
text = QUOTE(PATHTOF(UI\dagr_menu.paa));
|
||||
sizeEx = 0.1;
|
||||
};
|
||||
|
||||
class DAGR_PWR_Button : DAGR_Button {
|
||||
idc = 266863;
|
||||
action = QUOTE(GVAR(PWR) = true);
|
||||
x = 0.40;
|
||||
y = 0.65;
|
||||
};
|
||||
|
||||
class DAGR_UP_Button : DAGR_Button {
|
||||
idc = 266864;
|
||||
action = QUOTE(GVAR(UP) = true);
|
||||
x = 0.50;
|
||||
y = 0.675;
|
||||
};
|
||||
|
||||
class DAGR_DOWN_Button : DAGR_Button {
|
||||
idc = 266865;
|
||||
action = QUOTE(GVAR(DOWN) = true);
|
||||
x = 0.50;
|
||||
y = 0.81;
|
||||
};
|
||||
|
||||
class DAGR_LEFT_Button : DAGR_Button {
|
||||
idc = 266866;
|
||||
action = QUOTE(GVAR(LEFT) = true);
|
||||
x = 0.40;
|
||||
y = 0.735;
|
||||
w = 0.05;
|
||||
h = 0.07;
|
||||
};
|
||||
|
||||
class DAGR_RIGHT_Button : DAGR_Button {
|
||||
idc = 266867;
|
||||
action = QUOTE(GVAR(RIGHT) = true);
|
||||
x = 0.62;
|
||||
y = 0.735;
|
||||
w = 0.05;
|
||||
h = 0.07;
|
||||
};
|
||||
|
||||
class DAGR_NEXT_Button : DAGR_Button {
|
||||
idc = 266868;
|
||||
action = QUOTE(DAGR_NEXT = true);
|
||||
x = 0.60;
|
||||
y = 0.65;
|
||||
};
|
||||
|
||||
class DAGR_SEL_Button : DAGR_Button {
|
||||
idc = 266869;
|
||||
action = QUOTE(GVAR(SEL) = true);
|
||||
x = 0.54;
|
||||
y = 0.735;
|
||||
w = 0.06;
|
||||
h = 0.06;
|
||||
};
|
||||
|
||||
class DAGR_MENU_Button : DAGR_Button {
|
||||
idc = 266870;
|
||||
action = QUOTE(GVAR(MENU_B) = true);
|
||||
x = 0.46;
|
||||
y = 0.735;
|
||||
w = 0.06;
|
||||
h = 0.06;
|
||||
};
|
||||
|
||||
class DAGR_F1_Button : DAGR_Button {
|
||||
idc = 266871;
|
||||
action = QUOTE(GVAR(F1) = true);
|
||||
x = 0.40;
|
||||
y = 0.575;
|
||||
};
|
||||
|
||||
class DAGR_F2_Button : DAGR_Button {
|
||||
idc = 266872;
|
||||
action = QUOTE(GVAR(F2) = true);
|
||||
x = 0.495;
|
||||
y = 0.575;
|
||||
};
|
||||
|
||||
class DAGR_F3_Button : DAGR_Button {
|
||||
idc = 266873;
|
||||
action = QUOTE(GVAR(F3) = true);
|
||||
x = 0.59;
|
||||
y = 0.575;
|
||||
};
|
||||
|
||||
class DAGR_F1_Text : DAGR_Menu_Text {
|
||||
idc = 266874;
|
||||
x = 0.388;
|
||||
y = 0.38;
|
||||
text = "";
|
||||
};
|
||||
|
||||
class DAGR_F2_Text : DAGR_Menu_Text {
|
||||
idc = 266875;
|
||||
x = 0.506;
|
||||
y = 0.38;
|
||||
};
|
||||
|
||||
class DAGR_F3_Text : DAGR_Menu_Text {
|
||||
idc = 266876;
|
||||
x = 0.612;
|
||||
y = 0.38;
|
||||
};
|
||||
|
||||
class DAGR_MENU_OPTION0 : DAGR_Menu_Text {
|
||||
idc = 2668777;
|
||||
style = 0x02;
|
||||
sizeEx = 0.035;
|
||||
x = 0.43;
|
||||
y = 0.19;
|
||||
};
|
||||
|
||||
class DAGR_MENU_OPTION1 : DAGR_Menu_Text {
|
||||
idc = 2668778;
|
||||
style = 0x02;
|
||||
sizeEx = 0.035;
|
||||
x = 0.43;
|
||||
y = 0.225;
|
||||
};
|
||||
|
||||
class DAGR_MENU_OPTION2 : DAGR_Menu_Text {
|
||||
idc = 2668779;
|
||||
style = 0x02;
|
||||
sizeEx = 0.035;
|
||||
x = 0.43;
|
||||
y = 0.26;
|
||||
};
|
||||
|
||||
class DAGR_MENU_OPTION3 : DAGR_Menu_Text {
|
||||
idc = 2668780;
|
||||
style = 0x02;
|
||||
sizeEx = 0.035;
|
||||
x = 0.43;
|
||||
y = 0.295;
|
||||
};
|
||||
|
||||
class DAGR_MENU_OPTION4 : DAGR_Menu_Text {
|
||||
idc = 2668781;
|
||||
style = 0x02;
|
||||
sizeEx = 0.035;
|
||||
x = 0.43;
|
||||
y = 0.33;
|
||||
};
|
||||
class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic {
|
||||
idc = 2668783;
|
||||
x = 0.42;
|
||||
y = 0.246;
|
||||
w = 0.17;
|
||||
h = 0.035;
|
||||
sizeEx = 0.05;
|
||||
};
|
||||
|
||||
class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic {
|
||||
idc = 2668784;
|
||||
x = 0.42;
|
||||
y = 0.281;
|
||||
w = 0.17;
|
||||
h = 0.035;
|
||||
sizeEx = 0.05;
|
||||
};
|
||||
|
||||
class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic {
|
||||
idc = 2668785;
|
||||
x = 0.42;
|
||||
y = 0.316;
|
||||
w = 0.17;
|
||||
h = 0.035;
|
||||
sizeEx = 0.05;
|
||||
};
|
||||
|
||||
class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic {
|
||||
idc = 2668786;
|
||||
x = 0.42;
|
||||
y = 0.351;
|
||||
w = 0.17;
|
||||
h = 0.035;
|
||||
sizeEx = 0.05;
|
||||
};
|
||||
|
||||
class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic {
|
||||
idc = 2668787;
|
||||
x = 0.42;
|
||||
y = 0.386;
|
||||
w = 0.17;
|
||||
h = 0.035;
|
||||
sizeEx = 0.05;
|
||||
};
|
||||
|
||||
class DAGR_MENU_Main_Text : DAGR_Menu_Text {
|
||||
idc = 2668782;
|
||||
style = ST_CENTER;
|
||||
x = 0.38;
|
||||
y = 0.32;
|
||||
w = 0.25;
|
||||
h = 0.035;
|
||||
sizeEx = 0.04;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic {
|
||||
idc = 2668788;
|
||||
x = 0.451;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic {
|
||||
idc = 2668789;
|
||||
x = 0.465;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic {
|
||||
idc = 2668790;
|
||||
x = 0.479;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic {
|
||||
idc = 2668791;
|
||||
x = 0.493;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic {
|
||||
idc = 2668792;
|
||||
x = 0.507;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic {
|
||||
idc = 2668793;
|
||||
x = 0.521;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic {
|
||||
idc = 2668794;
|
||||
x = 0.535;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
|
||||
class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic {
|
||||
idc = 2668795;
|
||||
x = 0.549;
|
||||
y = 0.352;
|
||||
w = 0.01;
|
||||
h = 0.003;
|
||||
};
|
||||
};
|
10
addons/dagr/README.md
Normal file
10
addons/dagr/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
ace_dagr
|
||||
===============
|
||||
|
||||
Defense Advanced GPS Receiver
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
95
addons/dagr/RscTitles.hpp
Normal file
95
addons/dagr/RscTitles.hpp
Normal file
@ -0,0 +1,95 @@
|
||||
class RscTitles {
|
||||
class DAGR_Text {
|
||||
type = 0;
|
||||
idc = -1;
|
||||
style = 0x01;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0.15;
|
||||
h = 0.050;
|
||||
text = "";
|
||||
colorBackground[] = { 0, 0, 0, 0 };
|
||||
colorText[] = { 0.239, 0.216, 0.153, 1 };
|
||||
font = "PuristaMedium";
|
||||
sizeEx = 0.04;
|
||||
waitForLoad = 0;
|
||||
};
|
||||
class DAGR_Pic {
|
||||
type = 0;
|
||||
idc = -1;
|
||||
style = 48;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0.50;
|
||||
h = 0.50;
|
||||
text = "";
|
||||
colorBackground[] = {};
|
||||
colorText[] = {};
|
||||
font = "PuristaMedium";
|
||||
sizeEx = 0.02;
|
||||
waitForLoad = 0;
|
||||
};
|
||||
|
||||
class DAGR_Display {
|
||||
idd = 266850;
|
||||
movingEnable = false;
|
||||
duration = 100000;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
name = "Dagr_Display";
|
||||
onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]";
|
||||
controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"};
|
||||
|
||||
class DAGR_UI : DAGR_Pic {
|
||||
idc = 266856;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.45";
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.47";
|
||||
};
|
||||
|
||||
class DAGR_Grid : DAGR_Text {
|
||||
idc = 266851;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830
|
||||
y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845
|
||||
w = 0.25;
|
||||
h = 0.06;
|
||||
sizeEx = 0.07;
|
||||
};
|
||||
class DAGR_Speed : DAGR_Text {
|
||||
idc = 266852;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
|
||||
};
|
||||
class DAGR_Elevation : DAGR_Text {
|
||||
idc = 266853;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
|
||||
};
|
||||
class DAGR_Heading : DAGR_Text {
|
||||
idc = 266854;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656
|
||||
};
|
||||
class DAGR_Time : DAGR_Text {
|
||||
idc = 266855;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
|
||||
};
|
||||
|
||||
class DAGR_WP : DAGR_Text {
|
||||
idc = 266857;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
|
||||
};
|
||||
|
||||
class DAGR_Bearing : DAGR_Text {
|
||||
idc = 266858;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914
|
||||
};
|
||||
class DAGR_DIST : DAGR_Text {
|
||||
idc = 266859;
|
||||
x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935
|
||||
y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965
|
||||
};
|
||||
};
|
||||
};
|
BIN
addons/dagr/UI/DAGR_Button.paa
Normal file
BIN
addons/dagr/UI/DAGR_Button.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_GPS.paa
Normal file
BIN
addons/dagr/UI/DAGR_GPS.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_GPS_SHOW.paa
Normal file
BIN
addons/dagr/UI/DAGR_GPS_SHOW.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_Icon.paa
Normal file
BIN
addons/dagr/UI/DAGR_Icon.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_MENU.paa
Normal file
BIN
addons/dagr/UI/DAGR_MENU.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_PSelection.paa
Normal file
BIN
addons/dagr/UI/DAGR_PSelection.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_Selection.paa
Normal file
BIN
addons/dagr/UI/DAGR_Selection.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_Vector.paa
Normal file
BIN
addons/dagr/UI/DAGR_Vector.paa
Normal file
Binary file not shown.
BIN
addons/dagr/UI/DAGR_WP.paa
Normal file
BIN
addons/dagr/UI/DAGR_WP.paa
Normal file
Binary file not shown.
31
addons/dagr/XEH_postInit.sqf
Normal file
31
addons/dagr/XEH_postInit.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "initKeybinds.sqf"
|
||||
|
||||
GVAR(outputPFH) = -1;
|
||||
|
||||
GVAR(run) = false;
|
||||
GVAR(hidden) = true;
|
||||
GVAR(menuRun) = false;
|
||||
GVAR(useDegrees) = true;
|
||||
GVAR(updateInterval) = 0.5;
|
||||
|
||||
GVAR(numWaypoints) = 0;
|
||||
GVAR(wpString0) = "";
|
||||
GVAR(wpString1) = "";
|
||||
GVAR(wpString2) = "";
|
||||
GVAR(wpString3) = "";
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp0) = 0;
|
||||
GVAR(wp1) = 0;
|
||||
GVAR(wp2) = 0;
|
||||
GVAR(wp3) = 0;
|
||||
GVAR(wp4) = 0;
|
||||
|
||||
GVAR(displaySelection) = "DATA";
|
||||
|
||||
GVAR(vectorConnected) = false;
|
||||
GVAR(noVectorData) = true;
|
||||
GVAR(vectorGrid) = "00000000";
|
||||
|
||||
["RangerfinderData", {_this call FUNC(handleRangeFinderData)}] call EFUNC(common,addEventHandler);
|
12
addons/dagr/XEH_preInit.sqf
Normal file
12
addons/dagr/XEH_preInit.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(handleRangeFinderData);
|
||||
PREP(menuInit);
|
||||
PREP(outputData);
|
||||
PREP(outputVector);
|
||||
PREP(outputWP);
|
||||
PREP(toggleOverlay);
|
||||
|
||||
ADDON = true;
|
18
addons/dagr/config.cpp
Normal file
18
addons/dagr/config.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {"ACE_Item_DAGR"};
|
||||
weapons[] = {"ACE_DAGR"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_weather"};
|
||||
author[] = {"Rosuto", "Ruthberg"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "Dialog.hpp"
|
||||
#include "RscTitles.hpp"
|
30
addons/dagr/functions/fnc_handleRangeFinderData.sqf
Normal file
30
addons/dagr/functions/fnc_handleRangeFinderData.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: Rosuto, Ruthberg
|
||||
* Handles incoming data packets from the Vectronix Vector LRF
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Slope distance (Meters) <NUMBER>
|
||||
* 1: Azimuth (Degrees) <NUMBER>
|
||||
* 2: Inclination (Degrees) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [1000, 45, 1] call ace_dagr_fnc_handleRangeFinderData
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define EMP_RF_ACC 5 // Rangefinder Accuracy
|
||||
|
||||
PARAMS_3(_slopeDistance,_azimuth,_inclination);
|
||||
|
||||
if (GVAR(vectorConnected)) then {
|
||||
GVAR(LAZPOS) = (eyePos player) vectorAdd ([_slopeDistance, _azimuth, _inclination] call CBA_fnc_polar2vect);
|
||||
GVAR(LAZDIST) = _slopeDistance * cos(_inclination);
|
||||
GVAR(LAZDIST) = floor (GVAR(LAZDIST) / EMP_RF_ACC) * EMP_RF_ACC;
|
||||
GVAR(LAZHEADING) = _azimuth;
|
||||
GVAR(noVectorData) = false;
|
||||
};
|
607
addons/dagr/functions/fnc_menuInit.sqf
Normal file
607
addons/dagr/functions/fnc_menuInit.sqf
Normal file
@ -0,0 +1,607 @@
|
||||
/*
|
||||
* Author: Rosuto, Ruthberg
|
||||
* Creates the DAGR menu dialog
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define __dsp (uiNamespace getVariable "DAGR_MENU")
|
||||
#define __F1 266874
|
||||
#define __F2 266875
|
||||
#define __F3 266876
|
||||
#define __Option0 2668777
|
||||
#define __Option1 2668778
|
||||
#define __Option2 2668779
|
||||
#define __Option3 2668780
|
||||
#define __Option4 2668781
|
||||
#define __Selection0 2668783
|
||||
#define __Selection1 2668784
|
||||
#define __Selection2 2668785
|
||||
#define __Selection3 2668786
|
||||
#define __Selection4 2668787
|
||||
#define __mainText 2668782
|
||||
#define __PSelection1 2668788
|
||||
#define __PSelection2 2668789
|
||||
#define __PSelection3 2668790
|
||||
#define __PSelection4 2668791
|
||||
#define __PSelection5 2668792
|
||||
#define __PSelection6 2668793
|
||||
#define __PSelection7 2668794
|
||||
#define __PSelection8 2668795
|
||||
|
||||
135471 cutText ["", "PLAIN"];
|
||||
closeDialog 0;
|
||||
createDialog "DAGR_MENU";
|
||||
|
||||
GVAR(menu) = "main";
|
||||
GVAR(selection) = 0;
|
||||
GVAR(numSelections) = 5;
|
||||
GVAR(tmpUpdateRate) = GVAR(updateInterval);
|
||||
GVAR(edit) = false;
|
||||
GVAR(add) = false;
|
||||
GVAR(pointer) = 0;
|
||||
GVAR(digit1) = 0;
|
||||
GVAR(digit2) = 0;
|
||||
GVAR(digit3) = 0;
|
||||
GVAR(digit4) = 0;
|
||||
GVAR(digit5) = 0;
|
||||
GVAR(digit6) = 0;
|
||||
GVAR(digit7) = 0;
|
||||
GVAR(digit8) = 0;
|
||||
|
||||
GVAR(busy) = false;
|
||||
GVAR(busyTimer) = 0;
|
||||
|
||||
GVAR(showNoWaypointsFound) = false;
|
||||
GVAR(showInfoUpdatin) = false;
|
||||
GVAR(showDeleting) = false;
|
||||
GVAR(showOutOfSpace) = false;
|
||||
|
||||
GVAR(PWR) = false;
|
||||
GVAR(menuRun) = true;
|
||||
[{
|
||||
if (!dialog || GVAR(PWR)) exitWith {
|
||||
closeDialog 266860;
|
||||
GVAR(menuRun) = false;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (GVAR(MENU_B)) then {
|
||||
GVAR(menu) = "main";
|
||||
GVAR(selection) = 0;
|
||||
GVAR(numSelections) = 5;
|
||||
};
|
||||
|
||||
if (!GVAR(add) && !GVAR(edit)) then {
|
||||
if (GVAR(DOWN)) then {
|
||||
GVAR(selection) = (GVAR(numSelections) + GVAR(selection) + 1);
|
||||
};
|
||||
if (GVAR(UP)) then {
|
||||
GVAR(selection) = (GVAR(numSelections) + GVAR(selection) - 1);
|
||||
};
|
||||
GVAR(selection) = if (GVAR(numSelections) > 0) then { GVAR(selection) % GVAR(numSelections) } else { 0 };
|
||||
};
|
||||
|
||||
if (GVAR(LEFT)) then {
|
||||
GVAR(pointer) = (8 + GVAR(pointer) - 1);
|
||||
};
|
||||
if (GVAR(RIGHT)) then {
|
||||
GVAR(pointer) = (8 + GVAR(pointer) + 1);
|
||||
};
|
||||
GVAR(pointer) = GVAR(pointer) % 8;
|
||||
|
||||
(__dsp displayCtrl __PSelection1) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection2) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection3) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection4) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection5) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection6) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection7) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection8) ctrlSetText "";
|
||||
|
||||
(__dsp displayCtrl __Selection0) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection1) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection2) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection3) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection4) ctrlSetText "";
|
||||
|
||||
(__dsp displayCtrl __F1) ctrlSetText "";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "";
|
||||
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option1) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option2) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option3) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option4) ctrlSetText "";
|
||||
|
||||
switch (GVAR(menu)) do {
|
||||
case "main": {
|
||||
if (GVAR(SEL)) then {
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: {
|
||||
GVAR(displaySelection) = "DATA";
|
||||
GVAR(vectorConnected) = false;
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data.";
|
||||
if (ACE_time - GVAR(busyTimer) > 0.5) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.0) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.5) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Position Acquired";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 3.0) then {
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
case 1: {
|
||||
if (GVAR(numWaypoints) < 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "No Waypoints Found";
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(showNoWaypointsFound) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
} else {
|
||||
GVAR(menu) = "goto_wp"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0;
|
||||
};
|
||||
};
|
||||
case 2: { GVAR(menu) = "wp_list"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0 };
|
||||
case 3: { GVAR(menu) = "connect"; GVAR(numSelections) = 1; };
|
||||
case 4: { GVAR(menu) = "options"; GVAR(numSelections) = 2; };
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showNoWaypointsFound)) then {
|
||||
if (ACE_time - GVAR(busyTimer) > 2) then {
|
||||
GVAR(showNoWaypointsFound) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "DATA VIEW";
|
||||
(__dsp displayCtrl __Option1) ctrlSetText "GOTO WP";
|
||||
(__dsp displayCtrl __Option2) ctrlSetText "WP LIST";
|
||||
(__dsp displayCtrl __Option3) ctrlSetText "CONNECT TO";
|
||||
(__dsp displayCtrl __Option4) ctrlSetText "OPTIONS";
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
};
|
||||
case "goto_wp": {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0);
|
||||
(__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1);
|
||||
(__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2);
|
||||
(__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3);
|
||||
(__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4);
|
||||
if (GVAR(numSelections) > 0) then {
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
};
|
||||
if (GVAR(SEL)) then {
|
||||
GVAR(vectorConnected) = false;
|
||||
GVAR(displaySelection) = "WP";
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: { DAGR_WP_INFO = GVAR(wp0); };
|
||||
case 1: { DAGR_WP_INFO = GVAR(wp1); };
|
||||
case 2: { DAGR_WP_INFO = GVAR(wp2); };
|
||||
case 3: { DAGR_WP_INFO = GVAR(wp3); };
|
||||
case 4: { DAGR_WP_INFO = GVAR(wp4); };
|
||||
};
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(showInfoUpdating) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showInfoUpdating)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Update.";
|
||||
if (ACE_time - GVAR(busyTimer) > 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Update..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Update...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Updated";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.9) then {
|
||||
GVAR(showInfoUpdating) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
case "wp_list": {
|
||||
if (!GVAR(add) && !GVAR(edit)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0);
|
||||
(__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1);
|
||||
(__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2);
|
||||
(__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3);
|
||||
(__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4);
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Add";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "Edit";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Delete";
|
||||
if (GVAR(numSelections) > 0) then {
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
};
|
||||
if (GVAR(F3) && GVAR(numWaypoints) > 0) then {
|
||||
if (!GVAR(busy)) then {
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: {
|
||||
GVAR(wpString0) = GVAR(wpString1);
|
||||
GVAR(wp0) = GVAR(wp1);
|
||||
GVAR(wpString1) = GVAR(wpString2);
|
||||
GVAR(wp1) = GVAR(wp2);
|
||||
GVAR(wpString2) = GVAR(wpString3);
|
||||
GVAR(wp2) = GVAR(wp3);
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 1: {
|
||||
GVAR(wpString1) = GVAR(wpString2);
|
||||
GVAR(wp1) = GVAR(wp2);
|
||||
GVAR(wpString2) = GVAR(wpString3);
|
||||
GVAR(wp2) = GVAR(wp3);
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 2: {
|
||||
GVAR(wpString2) = GVAR(wpString3);
|
||||
GVAR(wp2) = GVAR(wp3);
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 3: {
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 4: {
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
};
|
||||
GVAR(numWaypoints) = GVAR(numWaypoints) - 1;
|
||||
GVAR(numSelections) = GVAR(numWaypoints);
|
||||
GVAR(showDeleting) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showDeleting)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Deleting.";
|
||||
if (ACE_time - GVAR(busyTimer) > 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Deleting..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Deleting...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Waypoint Deleted";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.9) then {
|
||||
GVAR(showDeleting) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(F1)) then {
|
||||
if (GVAR(numWaypoints) == 5) then {
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(showOutOfSpace) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
} else {
|
||||
GVAR(digit1) = 0;
|
||||
GVAR(digit2) = 0;
|
||||
GVAR(digit3) = 0;
|
||||
GVAR(digit4) = 0;
|
||||
GVAR(digit5) = 0;
|
||||
GVAR(digit6) = 0;
|
||||
GVAR(digit7) = 0;
|
||||
GVAR(digit8) = 0;
|
||||
GVAR(pointer) = 0;
|
||||
GVAR(add) = true;
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showOutOfSpace)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Out of Space";
|
||||
if (ACE_time - GVAR(busyTimer) > 2.5) then {
|
||||
GVAR(showOutOfSpace) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(F2) && GVAR(numWaypoints) > 0) then {
|
||||
GVAR(pointer) = 0;
|
||||
GVAR(edit) = true;
|
||||
GVAR(add) = false;
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: {
|
||||
GVAR(digit1) = floor (GVAR(wp0) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp0) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp0) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp0) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp0) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp0) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp0) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp0) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 1: {
|
||||
GVAR(digit1) = floor (GVAR(wp1) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp1) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp1) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp1) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp1) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp1) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp1) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp1) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 2: {
|
||||
GVAR(digit1) = floor (GVAR(wp2) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp2) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp2) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp2) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp2) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp2) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp2) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp2) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 3: {
|
||||
GVAR(digit1) = floor (GVAR(wp3) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp3) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp3) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp3) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp3) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp3) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp3) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp3) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 4: {
|
||||
GVAR(digit1) = floor (GVAR(wp4) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp4) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp4) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp4) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp4) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp4) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp4) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp4) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Save";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "Vector";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
|
||||
GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8);
|
||||
(__dsp displayCtrl __mainText) ctrlSetText GVAR(output);
|
||||
(__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QUOTE(PATHTOF(UI\DAGR_PSelection.paa));
|
||||
};
|
||||
if (GVAR(F1)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
if (GVAR(add)) then {
|
||||
switch (GVAR(numWaypoints)) do {
|
||||
case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); };
|
||||
case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); };
|
||||
case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); };
|
||||
case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); };
|
||||
case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); };
|
||||
};
|
||||
GVAR(numWaypoints) = GVAR(numWaypoints) + 1;
|
||||
GVAR(numSelections) = GVAR(numWaypoints);
|
||||
GVAR(selection) = 0;
|
||||
};
|
||||
if (GVAR(edit)) then {
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); };
|
||||
case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); };
|
||||
case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); };
|
||||
case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); };
|
||||
case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); };
|
||||
};
|
||||
};
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __F1) ctrlSetText "";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "";
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Saving.";
|
||||
if (ACE_time - GVAR(busyTimer) > 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Saving..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Saving...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Waypoint Saved";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.9) then {
|
||||
GVAR(edit) = false;
|
||||
GVAR(add) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(F2)) then {
|
||||
private ["_grid", "_gridVector"];
|
||||
_grid = toArray GVAR(vectorGrid);
|
||||
_grid deleteAt 4;
|
||||
_grid = toString _grid;
|
||||
_gridVector = parseNumber _grid;
|
||||
GVAR(digit1) = floor(_gridVector / 10000000);
|
||||
GVAR(digit2) = floor(_gridVector / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor(_gridVector / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor(_gridVector / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor(_gridVector / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor(_gridVector / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor(_gridVector / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor(_gridVector - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
if (GVAR(F3)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
} else {
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Save";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "Vector";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
|
||||
GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8);
|
||||
(__dsp displayCtrl __mainText) ctrlSetText GVAR(output);
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.1) then {
|
||||
GVAR(add) = false;
|
||||
GVAR(edit) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(UP)) then {
|
||||
switch (GVAR(pointer) + 1) do {
|
||||
case 1: { GVAR(digit1) = (10 + GVAR(digit1) + 1) % 10 };
|
||||
case 2: { GVAR(digit2) = (10 + GVAR(digit2) + 1) % 10 };
|
||||
case 3: { GVAR(digit3) = (10 + GVAR(digit3) + 1) % 10 };
|
||||
case 4: { GVAR(digit4) = (10 + GVAR(digit4) + 1) % 10 };
|
||||
case 5: { GVAR(digit5) = (10 + GVAR(digit5) + 1) % 10 };
|
||||
case 6: { GVAR(digit6) = (10 + GVAR(digit6) + 1) % 10 };
|
||||
case 7: { GVAR(digit7) = (10 + GVAR(digit7) + 1) % 10 };
|
||||
case 8: { GVAR(digit8) = (10 + GVAR(digit8) + 1) % 10 };
|
||||
};
|
||||
};
|
||||
if (GVAR(DOWN)) then {
|
||||
switch (GVAR(pointer) + 1) do {
|
||||
case 1: { GVAR(digit1) = (10 + GVAR(digit1) - 1) % 10 };
|
||||
case 2: { GVAR(digit2) = (10 + GVAR(digit2) - 1) % 10 };
|
||||
case 3: { GVAR(digit3) = (10 + GVAR(digit3) - 1) % 10 };
|
||||
case 4: { GVAR(digit4) = (10 + GVAR(digit4) - 1) % 10 };
|
||||
case 5: { GVAR(digit5) = (10 + GVAR(digit5) - 1) % 10 };
|
||||
case 6: { GVAR(digit6) = (10 + GVAR(digit6) - 1) % 10 };
|
||||
case 7: { GVAR(digit7) = (10 + GVAR(digit7) - 1) % 10 };
|
||||
case 8: { GVAR(digit8) = (10 + GVAR(digit8) - 1) % 10 };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
case "connect": {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "Vector 21";
|
||||
(__dsp displayCtrl __Selection0) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
if (GVAR(SEL)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting.";
|
||||
if (ACE_time - GVAR(busyTimer) > 0.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
||||
if (ACE_player hasWeapon "ACE_Vector") then {
|
||||
GVAR(displaySelection) = "VECTOR";
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
|
||||
GVAR(vectorConnected) = true;
|
||||
} else {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "No Device Found";
|
||||
GVAR(vectorConnected) = false;
|
||||
};
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 3.1) then {
|
||||
GVAR(busy) = false;
|
||||
if (GVAR(vectorConnected)) then {
|
||||
GVAR(menu) = "main"; GVAR(numSelections) = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
case "options": {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "Signal Delay";
|
||||
(__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" });
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
if (GVAR(SEL)) then {
|
||||
GVAR(vectorConnected) = false;
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: { GVAR(menu) = "update_rate"; GVAR(numSelections) = 1; GVAR(tmpUpdateRate) = GVAR(updateInterval); };
|
||||
case 1: { GVAR(useDegrees) = !GVAR(useDegrees); };
|
||||
};
|
||||
}
|
||||
};
|
||||
case "update_rate": {
|
||||
if (GVAR(F1)) then {
|
||||
GVAR(updateInterval) = GVAR(tmpUpdateRate);
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Updating.";
|
||||
if (ACE_time - GVAR(busyTimer) > 0.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Updating..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Updating...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Update Success";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.1) then {
|
||||
GVAR(busy) = false;
|
||||
GVAR(menu) = "options"; GVAR(numSelections) = 2;
|
||||
};
|
||||
};
|
||||
if (GVAR(F3)) then {
|
||||
GVAR(menu) = "options"; GVAR(numSelections) = 2;
|
||||
};
|
||||
if (GVAR(DOWN)) then {
|
||||
GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) - 0.1;
|
||||
};
|
||||
if (GVAR(UP)) then {
|
||||
GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) + 0.1;
|
||||
};
|
||||
GVAR(tmpUpdateRate) = 0.1 max GVAR(tmpUpdateRate) min 2.0;
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText (Str(GVAR(tmpUpdateRate) * 1000) + "ms");
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Save";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(F3) = false;
|
||||
GVAR(F2) = false;
|
||||
GVAR(F1) = false;
|
||||
GVAR(MENU_B) = false;
|
||||
GVAR(SEL) = false;
|
||||
DAGR_NEXT = false;
|
||||
GVAR(RIGHT) = false;
|
||||
GVAR(LEFT) = false;
|
||||
GVAR(UP) = false;
|
||||
GVAR(DOWN) = false;
|
||||
GVAR(PWR) = false;
|
||||
};
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
120
addons/dagr/functions/fnc_outputData.sqf
Normal file
120
addons/dagr/functions/fnc_outputData.sqf
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Author: Rosuto
|
||||
* DAGR data output loop
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
135471 cutRsc ["DAGR_DISPLAY", "plain down"];
|
||||
|
||||
#define __display (uiNameSpace getVariable "DAGR_DISPLAY")
|
||||
|
||||
#define __gridControl (__display displayCtrl 266851)
|
||||
#define __speedControl (__display displayCtrl 266852)
|
||||
#define __elevationControl (__display displayCtrl 266853)
|
||||
#define __headingControl (__display displayCtrl 266854)
|
||||
#define __timeControl (__display displayCtrl 266855)
|
||||
#define __background (__display displayCtrl 266856)
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa));
|
||||
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xgrid", "_ygrid", "_xcoord", "_ycoord", "_speed", "_dagrHeading", "_dagrGrid", "_dagrElevation", "_dagrSpeed", "_dagrTime", "_elevation"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// GRID
|
||||
_pos = getPosASL ACE_player;
|
||||
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
_gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid");
|
||||
_offsetX = getNumber (_gridConfig >> "offsetX");
|
||||
_offsetY = getNumber (_gridConfig >> "offsetY");
|
||||
_stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX");
|
||||
_stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY");
|
||||
|
||||
if (_stepY >= 0) then {
|
||||
_pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY];
|
||||
};
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];};
|
||||
if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];};
|
||||
|
||||
_xGrid = toArray Str(round(_pos select 0));
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
};
|
||||
_xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round(_pos select 1));
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
_yGrid resize 4;
|
||||
_yGrid = toString _yGrid;
|
||||
_yGrid = parseNumber _yGrid;
|
||||
|
||||
_xCoord = switch true do {
|
||||
case (_xGrid >= 1000): { "" + Str(_xGrid) };
|
||||
case (_xGrid >= 100): { "0" + Str(_xGrid) };
|
||||
case (_xGrid >= 10): { "00" + Str(_xGrid) };
|
||||
default { "000" + Str(_xGrid) };
|
||||
};
|
||||
|
||||
_yCoord = switch true do {
|
||||
case (_yGrid >= 1000): { "" + Str(_yGrid) };
|
||||
case (_yGrid >= 100): { "0" + Str(_yGrid) };
|
||||
case (_yGrid >= 10): { "00" + Str(_yGrid) };
|
||||
default { "000" + Str(_yGrid) };
|
||||
};
|
||||
|
||||
_dagrGrid = _xcoord + " " + _ycoord;
|
||||
|
||||
// SPEED
|
||||
_speed = speed (vehicle ACE_player);
|
||||
_speed = floor (_speed * 10) / 10;
|
||||
_speed = abs(_speed);
|
||||
_dagrspeed = str _speed + "kph";
|
||||
|
||||
// Elevation
|
||||
_elevation = getPosASL ACE_player;
|
||||
_elevation = floor ((_elevation select 2) + EGVAR(weather,altitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
|
||||
// Heading
|
||||
_dagrHeading = if (!GVAR(useDegrees)) then {
|
||||
floor (DEG_TO_MIL(direction (vehicle ACE_player)))
|
||||
} else {
|
||||
floor (direction (vehicle ACE_player))
|
||||
};
|
||||
|
||||
// Time
|
||||
_dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||
|
||||
// Output
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
__speedControl ctrlSetText format ["%1", _dagrSpeed];
|
||||
__elevationControl ctrlSetText format ["%1", _dagrElevation];
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1 °", _dagrHeading] });
|
||||
__timeControl ctrlSetText format ["%1", _dagrTime];
|
||||
|
||||
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
98
addons/dagr/functions/fnc_outputVector.sqf
Normal file
98
addons/dagr/functions/fnc_outputVector.sqf
Normal file
@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Author: Rosuto
|
||||
* DAGR vector output loop
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_pos", "_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevation", "_dagrTime", "_elevation", "_xCoord", "_yCoord"];
|
||||
|
||||
135471 cutRsc ["DAGR_DISPLAY", "plain down"];
|
||||
|
||||
#define __display (uiNameSpace getVariable "DAGR_DISPLAY")
|
||||
|
||||
#define __gridControl (__display displayCtrl 266851)
|
||||
#define __speedControl (__display displayCtrl 266858)
|
||||
#define __elevationControl (__display displayCtrl 266853)
|
||||
#define __headingControl (__display displayCtrl 266854)
|
||||
#define __timeControl (__display displayCtrl 266855)
|
||||
#define __background (__display displayCtrl 266856)
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
|
||||
|
||||
if (GVAR(noVectorData)) exitwith {};
|
||||
|
||||
_pos = [GVAR(LAZPOS) select 0, GVAR(LAZPOS) select 1];
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];};
|
||||
if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];};
|
||||
|
||||
// Find laser position
|
||||
_xGrid = toArray Str(round(_pos select 0));
|
||||
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
};
|
||||
_xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round(_pos select 1));
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
_yGrid resize 4;
|
||||
_yGrid = toString _yGrid;
|
||||
_yGrid = parseNumber _yGrid;
|
||||
|
||||
_xCoord = switch true do {
|
||||
case (_xGrid >= 1000): { "" + Str(_xGrid) };
|
||||
case (_xGrid >= 100): { "0" + Str(_xGrid) };
|
||||
case (_xGrid >= 10): { "00" + Str(_xGrid) };
|
||||
default { "000" + Str(_xGrid) };
|
||||
};
|
||||
|
||||
_yCoord = switch true do {
|
||||
case (_yGrid >= 1000): { "" + Str(_yGrid) };
|
||||
case (_yGrid >= 100): { "0" + Str(_yGrid) };
|
||||
case (_yGrid >= 10): { "00" + Str(_yGrid) };
|
||||
default { "000" + Str(_yGrid) };
|
||||
};
|
||||
|
||||
_dagrGrid = _xCoord + " " + _yCoord;
|
||||
|
||||
// Find target elevation
|
||||
_elevation = floor ((GVAR(LAZPOS) select 2) + EGVAR(weather,altitude));
|
||||
_dagrElevation = str _elevation + "m";
|
||||
|
||||
// Time
|
||||
_dagrTime = [daytime, "HH:MM"] call bis_fnc_timeToString;
|
||||
|
||||
// Bearing
|
||||
_bearing = GVAR(LAZHEADING);
|
||||
if (_bearing >= 360) then {_bearing = _bearing - 360;};
|
||||
if (!GVAR(useDegrees)) then {_bearing = DEG_TO_MIL(_bearing)};
|
||||
_bearing = floor (_bearing);
|
||||
|
||||
// Distance
|
||||
_dagrDist = str GVAR(LAZDIST) + "m";
|
||||
|
||||
// Put grid into variable so DAGR menu can access it
|
||||
GVAR(vectorGrid) = _dagrGrid;
|
||||
|
||||
// OUTPUT
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
__speedControl ctrlSetText format ["%1", _dagrDist];
|
||||
__elevationControl ctrlSetText format ["%1", _dagrElevation];
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _bearing] } else { format ["%1°", _bearing] });
|
||||
__timeControl ctrlSetText format ["%1", _dagrTime];
|
136
addons/dagr/functions/fnc_outputWP.sqf
Normal file
136
addons/dagr/functions/fnc_outputWP.sqf
Normal file
@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Author: Rosuto
|
||||
* DAGR waypoint output loop
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
135471 cutRsc ["DAGR_DISPLAY", "plain down"];
|
||||
|
||||
#define __display (uiNameSpace getVariable "DAGR_DISPLAY")
|
||||
|
||||
#define __gridControl (__display displayCtrl 266851)
|
||||
#define __speedControl (__display displayCtrl 266858)
|
||||
#define __elevationControl (__display displayCtrl 266857)
|
||||
#define __headingControl (__display displayCtrl 266854)
|
||||
#define __timeControl (__display displayCtrl 266859)
|
||||
#define __background (__display displayCtrl 266856)
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa));
|
||||
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xGrid", "_yGrid", "_xCoord", "_yCoord", "_dagrHeading", "_dagrGrid", "_bearing", "_MYpos", "_WPpos", "_dagrDistance", "_distance"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// GRID
|
||||
_pos = getPosASL ACE_player;
|
||||
|
||||
_mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
|
||||
_gridConfig = (configFile >> "CfgWorlds" >> worldName >> "Grid");
|
||||
_offsetX = getNumber (_gridConfig >> "offsetX");
|
||||
_offsetY = getNumber (_gridConfig >> "offsetY");
|
||||
_stepX = getNumber (_gridConfig >> "Zoom1" >> "stepX");
|
||||
_stepY = getNumber (_gridConfig >> "Zoom1" >> "stepY");
|
||||
|
||||
if (_stepY >= 0) then {
|
||||
_pos set [1, (_mapSize - 100) - (_pos select 1) - _offsetY];
|
||||
};
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
if (_pos select 0 < 0) then {_pos set [0, (_pos select 0) + 99999];};
|
||||
if (_pos select 1 < 0) then {_pos set [1, (_pos select 1) + 99999];};
|
||||
|
||||
_xGrid = toArray Str(round(_pos select 0));
|
||||
while {count _xGrid < 5} do {
|
||||
_xGrid = [48] + _xGrid;
|
||||
};
|
||||
_xGrid resize 4;
|
||||
_xGrid = toString _xGrid;
|
||||
_xGrid = parseNumber _xGrid;
|
||||
|
||||
_yGrid = toArray Str(round(_pos select 1));
|
||||
while {count _yGrid < 5} do {
|
||||
_yGrid = [48] + _yGrid;
|
||||
};
|
||||
_yGrid resize 4;
|
||||
_yGrid = toString _yGrid;
|
||||
_yGrid = parseNumber _yGrid;
|
||||
|
||||
_xCoord = switch true do {
|
||||
case (_xGrid >= 1000): { "" + Str(_xGrid) };
|
||||
case (_xGrid >= 100): { "0" + Str(_xGrid) };
|
||||
case (_xGrid >= 10): { "00" + Str(_xGrid) };
|
||||
default { "000" + Str(_xGrid) };
|
||||
};
|
||||
|
||||
_yCoord = switch true do {
|
||||
case (_yGrid >= 1000): { "" + Str(_yGrid) };
|
||||
case (_yGrid >= 100): { "0" + Str(_yGrid) };
|
||||
case (_yGrid >= 10): { "00" + Str(_yGrid) };
|
||||
default { "000" + Str(_yGrid) };
|
||||
};
|
||||
|
||||
_dagrGrid = _xCoord + " " + _yCoord;
|
||||
|
||||
// WP Grid
|
||||
_xGrid2 = floor (DAGR_WP_INFO / 10000);
|
||||
_yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000;
|
||||
|
||||
_xCoord2 = switch true do {
|
||||
case (_xGrid2 >= 1000): { "" + Str(_xGrid2) };
|
||||
case (_xGrid2 >= 100): { "0" + Str(_xGrid2) };
|
||||
case (_xGrid2 >= 10): { "00" + Str(_xGrid2) };
|
||||
default { "000" + Str(_xGrid2) };
|
||||
};
|
||||
|
||||
_yCoord2 = switch true do {
|
||||
case (_yGrid2 >= 1000): { "" + Str(_yGrid2) };
|
||||
case (_yGrid2 >= 100): { "0" + Str(_yGrid2) };
|
||||
case (_yGrid2 >= 10): { "00" + Str(_yGrid2) };
|
||||
default { "000" + Str(_yGrid2) };
|
||||
};
|
||||
|
||||
_dagrGrid2 = _xCoord2 + " " + _yCoord2;
|
||||
|
||||
// Distance
|
||||
_WPpos = [[_xCoord2, _yCoord2], true] call CBA_fnc_mapGridToPos;
|
||||
_MYpos = [[_xCoord, _yCoord], true] call CBA_fnc_mapGridToPos;
|
||||
_distance = _MYpos distance _WPpos;
|
||||
_distance = floor (_distance * 10) / 10;
|
||||
_dagrDistance = str _distance + "m";
|
||||
|
||||
// Heading
|
||||
_dagrHeading = floor (if (GVAR(useDegrees)) then {
|
||||
direction (vehicle ACE_player)
|
||||
} else {
|
||||
DEG_TO_MIL(direction (vehicle ACE_player))
|
||||
});
|
||||
|
||||
// WP Heading
|
||||
_bearing = floor ((_WPpos vectorDiff _MYpos) call CBA_fnc_vectDir);
|
||||
|
||||
// Output
|
||||
__gridControl ctrlSetText format ["%1", _dagrGrid];
|
||||
__speedControl ctrlSetText format ["%1", _bearing];
|
||||
__elevationControl ctrlSetText format ["%1", _dagrGrid2];
|
||||
__headingControl ctrlSetText (if (!GVAR(useDegrees)) then { format ["%1", _dagrHeading] } else { format ["%1°", _dagrHeading] });
|
||||
__timeControl ctrlSetText format ["%1", _dagrDistance];
|
||||
|
||||
}, GVAR(updateInterval), []] call CBA_fnc_addPerFrameHandler;
|
50
addons/dagr/functions/fnc_toggleOverlay.sqf
Normal file
50
addons/dagr/functions/fnc_toggleOverlay.sqf
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Author: Rosuto, Ruthberg
|
||||
* Toggles the DAGR overlay
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(run) = !GVAR(run);
|
||||
|
||||
if (GVAR(run)) then {
|
||||
GVAR(hidden) = true;
|
||||
[{
|
||||
EXPLODE_1_PVT(_this select 0,_vehicle);
|
||||
if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith {
|
||||
GVAR(run) = false;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (cameraView == "GUNNER") then {
|
||||
if (!GVAR(hidden)) then {
|
||||
GVAR(hidden) = true;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
};
|
||||
} else {
|
||||
if (GVAR(hidden)) then {
|
||||
GVAR(hidden) = false;
|
||||
switch (toUpper GVAR(displaySelection)) do {
|
||||
case "WP" : {
|
||||
call FUNC(outputWP);
|
||||
};
|
||||
case "VECTOR" : {
|
||||
call FUNC(outputVector);
|
||||
};
|
||||
case "DATA" : {
|
||||
call FUNC(outputData);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
1
addons/dagr/functions/script_component.hpp
Normal file
1
addons/dagr/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\dagr\script_component.hpp"
|
30
addons/dagr/initKeybinds.sqf
Normal file
30
addons/dagr/initKeybinds.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
if (!GVAR(menuRun)) then {
|
||||
[] call FUNC(menuInit);
|
||||
} else {
|
||||
GVAR(PWR) = true; // Simulate pressing the power button
|
||||
};
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[199, [false, true, false]], false] call cba_fnc_addKeybind; // (CTRL + Home)
|
||||
|
||||
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[] call FUNC(toggleOverlay);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[199, [false, false, false]], false] call cba_fnc_addKeybind; // (Home)
|
15
addons/dagr/script_component.hpp
Normal file
15
addons/dagr/script_component.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#define COMPONENT dagr
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DAGR
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_DAGR
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_DAGR
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define DEG_TO_MIL(d) (d / 360 * 6400)
|
||||
#define MIL_TO_DEG(d) (d / 6400 * 360)
|
5
addons/dagr/stringtable.xml
Normal file
5
addons/dagr/stringtable.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="DAGR">
|
||||
</Package>
|
||||
</Project>
|
@ -9,45 +9,45 @@ onSetup parameters:
|
||||
0: STRING - Magazine Classname
|
||||
*/
|
||||
class Command {
|
||||
displayName = $STR_ACE_Explosives_clacker_displayName;
|
||||
displayName = CSTRING(clacker_displayName);
|
||||
picture = PATHTOF(Data\UI\Clacker.paa);
|
||||
onPlace = QUOTE(_this call FUNC(AddClacker);false);
|
||||
requires[] = {"ACE_Clacker"};
|
||||
};
|
||||
class MK16_Transmitter:Command {
|
||||
displayName = $STR_ACE_Explosives_MK16_displayName;
|
||||
displayName = CSTRING(MK16_displayName);
|
||||
picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa);
|
||||
requires[] = {"ACE_M26_Clacker"};
|
||||
};
|
||||
class DeadManSwitch:Command {
|
||||
displayName = $STR_ACE_Explosives_DeadManSwitch_displayName;
|
||||
displayName = CSTRING(DeadManSwitch_displayName);
|
||||
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
|
||||
requires[] = {"ACE_DeadManSwitch"};
|
||||
};
|
||||
class Cellphone:Command {
|
||||
displayName = $STR_ACE_Explosives_cellphone_displayName;
|
||||
displayName = CSTRING(cellphone_displayName);
|
||||
picture = PATHTOF(Data\UI\Cellphone_UI.paa);
|
||||
onPlace = QUOTE(_this call FUNC(addCellphoneIED);false);
|
||||
requires[] = {"ACE_Cellphone"};
|
||||
};
|
||||
class PressurePlate {
|
||||
displayName = $STR_ACE_Explosives_PressurePlate;
|
||||
displayName = CSTRING(PressurePlate);
|
||||
picture = PATHTOF(Data\UI\PressurePlate.paa);
|
||||
onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'ACE_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false";
|
||||
};
|
||||
class IRSensor {
|
||||
displayName = $STR_ACE_Explosives_IRSensor;
|
||||
displayName = CSTRING(IRSensor);
|
||||
picture = PATHTOF(Data\UI\PressurePlate.paa);
|
||||
onPlace = "false";
|
||||
};
|
||||
class Timer {
|
||||
displayName = $STR_ACE_Explosives_timerName;
|
||||
displayName = CSTRING(timerName);
|
||||
picture = PATHTOF(data\UI\Timer.paa);
|
||||
onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false);
|
||||
onSetup = QUOTE(_this call FUNC(openTimerSetUI);true);
|
||||
};
|
||||
class Tripwire {
|
||||
displayName = $STR_ACE_Explosives_TripWire;
|
||||
displayName = CSTRING(TripWire);
|
||||
picture = PATHTOF(Data\UI\Tripwire.paa);
|
||||
onPlace = "false";
|
||||
};
|
||||
|
@ -44,10 +44,11 @@ class CfgMagazines {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_Claymore";
|
||||
ACE_DelayTime = 1.5;
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"Command"};
|
||||
SupportedTriggers[] = {"Command", "MK16_Transmitter"};
|
||||
class Command {
|
||||
FuseTime = 0.5;
|
||||
};
|
||||
class MK16_Transmitter: Command {};
|
||||
};
|
||||
};
|
||||
|
||||
@ -78,13 +79,13 @@ class CfgMagazines {
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"IRSensor","PressurePlate","Timer","Command"};
|
||||
class PressurePlate{
|
||||
displayName = $STR_ACE_Explosives_SLAME_Magnetic;
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
digDistance = 0;
|
||||
ammo = "SLAMDirectionalMine_Magnetic_Ammo";
|
||||
pitch = 90;
|
||||
};
|
||||
class IRSensor{
|
||||
displayName = $STR_ACE_Explosives_SLAME_IRSensor;
|
||||
displayName = CSTRING(SLAME_IRSensor);
|
||||
};
|
||||
class Timer {
|
||||
ammo = "SLAMDirectionalMine_Timer_Ammo";
|
||||
@ -106,7 +107,7 @@ class CfgMagazines {
|
||||
class DeadmanSwitch:Command {};
|
||||
class Cellphone:Command {};
|
||||
class PressurePlate {
|
||||
displayName = $STR_ACE_Explosives_SLAME_Magnetic;
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
digDistance = 0;
|
||||
ammo = "IEDUrbanBig_Remote_Ammo";
|
||||
pitch = 0;
|
||||
@ -131,7 +132,7 @@ class CfgMagazines {
|
||||
class DeadmanSwitch: Command {};
|
||||
class Cellphone: Command {};
|
||||
class PressurePlate {
|
||||
displayName = $STR_ACE_Explosives_SLAME_Magnetic;
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
digDistance = 0;
|
||||
ammo = "IEDUrbanSmall_Remote_Ammo";
|
||||
pitch = 0;
|
||||
|
@ -3,7 +3,7 @@ class CfgVehicles {
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Explosives {
|
||||
displayName = $STR_ACE_Explosives_Menu;
|
||||
displayName = CSTRING(Menu);
|
||||
condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]));
|
||||
statement = "";
|
||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||
@ -13,7 +13,7 @@ class CfgVehicles {
|
||||
hotkey = "X";
|
||||
//Sub-menu items
|
||||
class ACE_Detonate {
|
||||
displayName = $STR_ACE_Explosives_Detonate;
|
||||
displayName = CSTRING(Detonate);
|
||||
condition = QUOTE([_player] call FUNC(canDetonate));
|
||||
statement = "";
|
||||
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
|
||||
@ -24,7 +24,7 @@ class CfgVehicles {
|
||||
hotkey = "T";
|
||||
};
|
||||
class ACE_Place {
|
||||
displayName = $STR_ACE_Explosives_Place;
|
||||
displayName = CSTRING(Place);
|
||||
condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)});
|
||||
statement = "";
|
||||
insertChildren = QUOTE([_player] call FUNC(addExplosiveActions););
|
||||
@ -35,7 +35,7 @@ class CfgVehicles {
|
||||
hotkey = "P";
|
||||
};
|
||||
class ACE_Cellphone {
|
||||
displayName = $STR_ACE_Explosives_cellphone_displayName;
|
||||
displayName = CSTRING(cellphone_displayName);
|
||||
condition = "('ACE_Cellphone' in (items ace_player))";
|
||||
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
|
||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||
@ -65,7 +65,7 @@ class CfgVehicles {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
class ACE_Defuse {
|
||||
displayName = $STR_ACE_Explosives_Defuse;
|
||||
displayName = CSTRING(Defuse);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse););
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
|
@ -9,8 +9,8 @@ class CfgWeapons {
|
||||
|
||||
class ACE_Clacker: ACE_ItemCore {
|
||||
scope = 2;
|
||||
displayName = $STR_ACE_Explosives_clacker_displayName;
|
||||
descriptionShort = $STR_ACE_Explosives_clacker_description;
|
||||
displayName = CSTRING(clacker_displayName);
|
||||
descriptionShort = CSTRING(clacker_description);
|
||||
picture = PATHTOF(Data\UI\Clacker.paa);
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
ACE_Range = 250;
|
||||
@ -22,14 +22,14 @@ class CfgWeapons {
|
||||
};
|
||||
};
|
||||
class ACE_M26_Clacker: ACE_Clacker {
|
||||
displayName = $STR_ACE_Explosives_M26_displayName;
|
||||
displayName = CSTRING(M26_displayName);
|
||||
picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa);
|
||||
ACE_Range = 5000;
|
||||
};
|
||||
class ACE_DefusalKit: ACE_ItemCore {
|
||||
scope = 2;
|
||||
displayName = $STR_ACE_Explosives_DefusalKit_displayName;
|
||||
descriptionShort = $STR_ACE_Explosives_DefusalKit_description;
|
||||
displayName = CSTRING(DefusalKit_displayName);
|
||||
descriptionShort = CSTRING(DefusalKit_description);
|
||||
picture = PATHTOF(Data\UI\Pliers.paa);
|
||||
model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
|
||||
|
||||
@ -40,8 +40,8 @@ class CfgWeapons {
|
||||
};
|
||||
class ACE_DeadManSwitch: ACE_ItemCore {
|
||||
scope = 2;
|
||||
displayName = $STR_ACE_Explosives_DeadManSwitch_displayName;
|
||||
descriptionShort = $STR_ACE_Explosives_DeadManSwitch_description;
|
||||
displayName = CSTRING(DeadManSwitch_displayName);
|
||||
descriptionShort = CSTRING(DeadManSwitch_description);
|
||||
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
ACE_Range = 100;
|
||||
@ -54,8 +54,8 @@ class CfgWeapons {
|
||||
};
|
||||
class ACE_Cellphone: ACE_ItemCore {
|
||||
scope = 2;
|
||||
displayName = $STR_ACE_Explosives_cellphone_displayName;
|
||||
descriptionShort = $STR_ACE_Explosives_cellphone_description;
|
||||
displayName = CSTRING(cellphone_displayName);
|
||||
descriptionShort = CSTRING(cellphone_description);
|
||||
picture = PATHTOF(Data\UI\Cellphone_UI.paa);
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
ACE_Range = 15000;
|
||||
|
@ -89,7 +89,7 @@ class RscACE_SelectTimeUI {
|
||||
h = 0.1;
|
||||
y = 0.09;
|
||||
style = ST_CENTER;
|
||||
text = $STR_ACE_Explosives_Cancel;
|
||||
text = CSTRING(Cancel);
|
||||
action = "closeDialog 0;";
|
||||
};
|
||||
class approveBtn: RscButton {
|
||||
@ -99,7 +99,7 @@ class RscACE_SelectTimeUI {
|
||||
h = 0.1;
|
||||
w = 0.15;
|
||||
style = ST_CENTER;
|
||||
text = $STR_ACE_Explosives_SetTime;
|
||||
text = CSTRING(SetTime);
|
||||
action = "closeDialog 0;";
|
||||
};
|
||||
};
|
||||
|
@ -510,35 +510,41 @@
|
||||
<Polish>System ładunków wybuchowych</Polish>
|
||||
<Spanish>Sistema de explosivos</Spanish>
|
||||
<German>Sprengstoffsystem</German>
|
||||
<Czech>Systém výbušnin</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_RequireSpecialist_DisplayName">
|
||||
<English>Require specialists?</English>
|
||||
<Polish>Wymagaj specjalistów?</Polish>
|
||||
<Spanish>¿Requiere especialista?</Spanish>
|
||||
<German>Benötigt Sprengstoffexperten?</German>
|
||||
<Czech>Vyžadovat specialistu?</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_RequireSpecialist_Description">
|
||||
<English>Require explosive specialists to disable explosives? Default: No</English>
|
||||
<Polish>Wymagać saperów do rozbrajania ładunków wybuchowych? Domyślnie: Nie</Polish>
|
||||
<Spanish>Requiere especialista en explosivos para desactivar explosivos?. Por defecto: No</Spanish>
|
||||
<German>Benötige Sprengstoffexperte um Sprengladungen zu entschärfen? Standard: Nein</German>
|
||||
<Czech>Vyžadovat specialistu na zneškodnění výbušniny? Výchozí: Ne</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_PunishNonSpecialists_DisplayName">
|
||||
<English>Punish non-specialists?</English>
|
||||
<Polish>Karaj nie-specjalistów?</Polish>
|
||||
<Spanish>¿Penalizar a los no especialistas?</Spanish>
|
||||
<German>Bestrafe Nicht-Sprengstoffexperten?</German>
|
||||
<Czech>Potrestat, pokud není specialista?</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_PunishNonSpecialists_Description">
|
||||
<English>Increase the time it takes to complete actions for non-specialists? Default: Yes</English>
|
||||
<Polish>Zwiększyć ilość wymaganego czasu do ukończenia akcji dla nie-specjalistów? Domyślnie: Tak</Polish>
|
||||
<Spanish>Aumenta el tiempo que lleva completar acciones para los no especialstas?. Por defecto: Si</Spanish>
|
||||
<German>Entschärfungszeit für Nicht-Sprengstoffexperten erhöhen? Standard: Ja</German>
|
||||
<Czech>Zvýšit čas potřebný k dokončení akce pokud není specialista? Výchozí: Ano</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Explosives_Module_Description">
|
||||
<English></English>
|
||||
<Polish>Moduł ten pozwala dostosować opcje związane z ładunkami wybuchowymi, ich podkładaniem oraz rozbrajaniem.</Polish>
|
||||
<German>Dieses Modul erlaubt die Einstellungen für Sprengstoffe zu verändern.</German>
|
||||
<Czech>Tento modul umoňuje přizpůsobit nastavení týkajících se výbušnin.</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -25,7 +25,7 @@ class CfgVehicles {
|
||||
class Car: LandVehicle {
|
||||
class ACE_SelfActions {
|
||||
class ResetFCS {
|
||||
displayName = $STR_ACE_FCS_ResetFCS;
|
||||
displayName = CSTRING(ResetFCS);
|
||||
condition = QUOTE(call FUNC(canResetFCS));
|
||||
statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset););
|
||||
showDisabled = 0;
|
||||
@ -38,7 +38,7 @@ class CfgVehicles {
|
||||
class Tank: LandVehicle {
|
||||
class ACE_SelfActions {
|
||||
class ResetFCS {
|
||||
displayName = $STR_ACE_FCS_ResetFCS;
|
||||
displayName = CSTRING(ResetFCS);
|
||||
condition = QUOTE(call FUNC(canResetFCS));
|
||||
statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset););
|
||||
showDisabled = 0;
|
||||
|
@ -6,58 +6,69 @@
|
||||
<Polish>Symulacja fragmentacji</Polish>
|
||||
<Spanish>Simulación de fragmentación</Spanish>
|
||||
<German>Splittersimulation</German>
|
||||
<Czech>Simulace fragmentace</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableFrag_Desc">
|
||||
<English>Enable the ACE Fragmentation Simulation</English>
|
||||
<Spanish>Activa la simulación de fragmentación ACE</Spanish>
|
||||
<Polish>Aktywuje symulację fragmentacji ACE</Polish>
|
||||
<German>Aktiviere die ACE-Splittersimulation</German>
|
||||
<Czech>Povolit ACE simulaci fragmentace</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableSpall">
|
||||
<English>Spalling Simulation</English>
|
||||
<Spanish>Simulación de astillamiento</Spanish>
|
||||
<Polish>Symulacja odprysków</Polish>
|
||||
<German>Explosionssimulation</German>
|
||||
<Czech>Simulace úlomků</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableSpall_Desc">
|
||||
<English>Enable the ACE Spalling Simulation</English>
|
||||
<Spanish>Activa la simulación de astillamiento ACE</Spanish>
|
||||
<Polish>Aktywuje symulację odprysków ACE</Polish>
|
||||
<German>Aktiviere ACE-Explosionssimulation</German>
|
||||
<Czech>Povolit ACE simulaci úlomků</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrack">
|
||||
<English>Maximum Projectiles Tracked</English>
|
||||
<Spanish>Máximos proyectiles rastreados</Spanish>
|
||||
<Polish>Maks. liczba śledzonych pocisków</Polish>
|
||||
<German>Maximalzahl der verfolgten Projektile</German>
|
||||
<Czech>Maximální počet sledovaných projektilů</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrack_Desc">
|
||||
<English>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)</English>
|
||||
<Spanish>Este ajuste controla la cantidad máxima de proyectiles del sistema de fragmentación y astillamiento de los que se hará un seguimiento en cualquier momento dado. Si se disparan más proyectiles, no serán rastreados. Baja esta opción si no deseas una bajada de FPS en escenarios con muchos proyectiles (>200 proyectiles en el aire a la vez)</Spanish>
|
||||
<Polish>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).</Polish>
|
||||
<German>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)</German>
|
||||
<Czech>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)</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrackPerFrame">
|
||||
<English>Maximum Projectiles Per Frame</English>
|
||||
<Spanish>Máximos proyectiles por cuadro</Spanish>
|
||||
<German>Maximale Anzahl an Projektilen pro Frame</German>
|
||||
<Polish>Maks. liczba pocisków na klatkę</Polish>
|
||||
<Czech>Maximální počet projektilů ze jeden snímek</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_MaxTrackPerFrame_Desc">
|
||||
<English>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.</English>
|
||||
<Polish>Ilość obliczeń wykonywanych przez symulację odprysków w danej klatce. Ta opcja pomaga rozprzestrzenić obliczenia odprysków na więcej klatek, zmniejszając spadek FPS jeszcze bardziej.</Polish>
|
||||
<German>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.</German>
|
||||
<Spanish>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.</Spanish>
|
||||
<Czech>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.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableDebugTrace">
|
||||
<English>(SP Only) Frag/Spall Debug Tracing</English>
|
||||
<Spanish>(Solo SP) Seguimiento de depuración de Fragmentación/Astillamiento </Spanish>
|
||||
<Polish>(Tylko SP) Wizualny debug odł./odpr.</Polish>
|
||||
<Czech>(Pouze SP) Debug sledování Frag/Úlomků</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Frag_EnableDebugTrace_Desc">
|
||||
<English>(SP Only) Requires a mission/editor restart. Enables visual tracing of fragmentation and spalling rounds in SP game mode only.</English>
|
||||
<Spanish>(Solo SP) Requiere un reinicio misión/editor. Permite el seguimiento visual de la fragmentación y astillamientos de los proyectiles en modo SP.</Spanish>
|
||||
<Polish>(Tylko SP) Wymaga restartu misji/edytora. Aktywuje wizualne śledzenie odłamków oraz odprysków w trybie gry Single Player.</Polish>
|
||||
<German>(nur SP) Splitter-/Explosions-Debugging</German>
|
||||
<Czech>(Pouze SP) Vyžaduje restart mise/editoru. Aktivuje vizuální stopování fragmentace a úlomů pouze v režimu jednoho hráče.</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -3,6 +3,7 @@ class CfgAmmo {
|
||||
class FlareBase: FlareCore {
|
||||
intensity = 20000;
|
||||
flareSize = 12;
|
||||
timeToLive = 60;
|
||||
};
|
||||
class F_40mm_White: FlareBase {
|
||||
intensity = 40000;
|
||||
@ -10,7 +11,7 @@ class CfgAmmo {
|
||||
};
|
||||
class F_20mm_White: FlareBase {
|
||||
intensity = 20000;
|
||||
flareSize = 12;
|
||||
flareSize = 6;
|
||||
};
|
||||
class F_Signal_Green: FlareBase {
|
||||
intensity = 20000;
|
||||
@ -19,6 +20,7 @@ class CfgAmmo {
|
||||
class Flare_82mm_AMOS_White: FlareCore {
|
||||
intensity = 80000;
|
||||
flareSize = 12;
|
||||
timeToLive = 60;
|
||||
};
|
||||
|
||||
class F_20mm_Red: F_20mm_White {};
|
||||
|
@ -11,4 +11,12 @@ class CfgSounds {
|
||||
sound[] = {QUOTE(PATHTOF(sounds\ACE_earringing_heavy.wav)),8,1.7};
|
||||
titles[] = {};
|
||||
};
|
||||
class ACE_Combat_Deafness {
|
||||
sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),3,1};
|
||||
titles[] = {};
|
||||
};
|
||||
class ACE_Ring_Backblast {
|
||||
sound[] = {QUOTE(PATHTOF(sounds\backblast_ring.ogg)),1,1};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
||||
|
@ -6,6 +6,13 @@ GVAR(currentDeafness) = 0;
|
||||
GVAR(newStrength) = 0;
|
||||
GVAR(playerVehAttenuation) = 1;
|
||||
|
||||
GVAR(beep) = false;
|
||||
GVAR(beep2) = false;
|
||||
GVAR(time2) = 0;
|
||||
GVAR(time3) = 0;
|
||||
GVAR(time4) = 0;
|
||||
GVAR(earRingingPFH) = -1;
|
||||
|
||||
// Spawn volume updating process
|
||||
[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
@ -15,6 +22,14 @@ GVAR(playerVehAttenuation) = 1;
|
||||
|
||||
//Reset deafness on respawn (or remote control player switch)
|
||||
["playerChanged", {
|
||||
ACE_player setVariable [QGVAR(dv), 0];
|
||||
ACE_player setVariable [QGVAR(prior), 0];
|
||||
ACE_player setvariable [QGVAR(deaf), false];
|
||||
GVAR(beep) = false;
|
||||
GVAR(beep2) = false;
|
||||
GVAR(time2) = 0;
|
||||
GVAR(time3) = 0;
|
||||
GVAR(time4) = 0;
|
||||
GVAR(currentDeafness) = 0;
|
||||
GVAR(newStrength) = 0;
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
||||
weapons[] = {"ACE_EarPlugs"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2"};
|
||||
author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2", "Rocko", "Rommel", "Ruthberg"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
|
@ -1,56 +1,92 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi, commy2
|
||||
* Creates ear ringing effect with set strength.
|
||||
* Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg
|
||||
* Ear ringing PFH
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit (player) <OBJECT>
|
||||
* 0: unit <OBJECT>
|
||||
* 1: strength of ear ringing (Number between 0 and 1) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [clientExplosionEvent] call ace_hearing_fnc_earRinging
|
||||
* [_unit, _strength] call ace_hearing_fnc_earRinging
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_strength"];
|
||||
if (GVAR(DisableEarRinging)) exitWith {};
|
||||
|
||||
_unit = _this select 0;
|
||||
_strength = _this select 1;
|
||||
PARAMS_2(_unit,_strength);
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
if (_strength < 0.05) exitWith {};
|
||||
|
||||
if (_unit getVariable ["ACE_hasEarPlugsin", false]) then {
|
||||
_strength = _strength / 4;
|
||||
};
|
||||
|
||||
GVAR(newStrength) = GVAR(newStrength) max _strength;
|
||||
_unit setVariable [QGVAR(dv), (_unit getVariable [QGVAR(dv), 0]) + _strength];
|
||||
|
||||
if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {};
|
||||
if (GVAR(earRingingPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(earRingingPFH) = [{
|
||||
EXPLODE_1_PVT(_this select 0,_unit);
|
||||
private ["_prior"];
|
||||
_prior = (_unit getvariable [QGVAR(dv), 0]) min 20;
|
||||
|
||||
if (GVAR(DisableEarRinging)) exitWith {};
|
||||
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 (_strength > 0.75) exitWith {
|
||||
playSound "ACE_EarRinging_Heavy";
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
[
|
||||
{GVAR(isEarRingingPlaying) = false;}, [], 7.0, 0.25
|
||||
] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
if (_strength > 0.5) exitWith {
|
||||
playSound "ACE_EarRinging_Medium";
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
[
|
||||
{GVAR(isEarRingingPlaying) = false;}, [], 5.0, 0.25
|
||||
] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
if (_strength > 0.2) exitWith {
|
||||
playSound "ACE_EarRinging_Weak";
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
[
|
||||
{GVAR(isEarRingingPlaying) = false;}, [], 3.0, 0.25
|
||||
] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi, commy2
|
||||
* Author: KoffeinFlummi, commy2, Ruthberg
|
||||
* Handles deafness due to explosions going off near the player.
|
||||
*
|
||||
* Arguments:
|
||||
@ -16,12 +16,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_damage", "_strength"];
|
||||
PARAMS_2(_unit,_damage);
|
||||
|
||||
_unit = _this select 0;
|
||||
_damage = _this select 1;
|
||||
|
||||
_strength = (_damage * 2) min 1;
|
||||
private ["_strength"];
|
||||
_strength = 0 max _damage;
|
||||
if (_strength < 0.01) exitWith {};
|
||||
|
||||
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_silencer", "_audibleFireCoef", "_audibleFire", "_loudness", "_strength", "_vehAttenuation"];
|
||||
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"];
|
||||
|
||||
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
|
||||
|
||||
@ -30,10 +30,11 @@ if (!GVAR(enableCombatDeafness)) exitWith {};
|
||||
//Only run if firedNear object is player or player's vehicle:
|
||||
if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
|
||||
if (_weapon in ["Throw", "Put"]) exitWith {};
|
||||
if (_distance > 50) exitWith {};
|
||||
|
||||
_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
|
||||
|
||||
if (_distance < 1) then {_distance = 1;};
|
||||
_distance = 1 max _distance;
|
||||
|
||||
_silencer = switch (_weapon) do {
|
||||
case (primaryWeapon _firer) : {(primaryWeaponItems _firer) select 0};
|
||||
@ -47,10 +48,47 @@ if (_silencer != "") then {
|
||||
_audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire");
|
||||
};
|
||||
|
||||
_audibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire");
|
||||
_weaponMagazines = missionNamespace getVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], []];
|
||||
if (count _weaponMagazines == 0) then {
|
||||
_muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
|
||||
_weaponMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
|
||||
{
|
||||
if (_x != "this") then {
|
||||
_muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
||||
_weaponMagazines append _muzzleMagazines;
|
||||
};
|
||||
} forEach _muzzles;
|
||||
missionNamespace setVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], _weaponMagazines];
|
||||
};
|
||||
|
||||
_loudness = _audibleFireCoef * _audibleFire / 64;
|
||||
_strength = _vehAttenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off
|
||||
_magazine = "";
|
||||
{
|
||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||
if (_ammoType == _ammo) exitWith {
|
||||
_magazine = _x;
|
||||
};
|
||||
} forEach _weaponMagazines;
|
||||
|
||||
if (_magazine == "") exitWith {};
|
||||
|
||||
_initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||
_ammoConfig = (configFile >> "CfgAmmo" >> _ammo);
|
||||
_parentClasses = [_ammoConfig, true] call BIS_fnc_returnParents;
|
||||
_caliber = getNumber(_ammoConfig >> "ACE_caliber");
|
||||
_caliber = switch (true) do {
|
||||
case ("ShellBase" in _parentClasses): { 80 };
|
||||
case ("RocketBase" in _parentClasses): { 200 };
|
||||
case ("MissileBase" in _parentClasses): { 600 };
|
||||
case ("SubmunitionBase" in _parentClasses): { 80 };
|
||||
default {
|
||||
if (_caliber <= 0) then { 6.5 } else { _caliber };
|
||||
};
|
||||
};
|
||||
_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5;
|
||||
_strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off
|
||||
|
||||
//systemChat format["%1 : %2 : %3", _strength, _initSpeed, _parentClasses];
|
||||
//systemChat format["%1 : %2 : %3", _weapon, _magazine, _initSpeed];
|
||||
|
||||
if (_strength < 0.01) exitWith {};
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_effectType", "_newAttenuation", "_turretConfig", "_turretPath", "_vehicle"];
|
||||
|
||||
_vehicle = vehicle ACE_player;
|
||||
|
||||
if (isNull _vehicle) exitWith {};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: commy2 and esteldunedain
|
||||
* Author: commy2 and esteldunedain and Ruthberg
|
||||
* Updates and applys the current deafness. Called every 0.1 sec from a PFEH.
|
||||
*
|
||||
* Arguments:
|
||||
@ -15,19 +15,16 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define STRENGHTODEAFNESS 3
|
||||
#define MAXDEAFNESS 1.1
|
||||
|
||||
private ["_recoverRate", "_volume"];
|
||||
|
||||
// Exit if combat deafness is disabled
|
||||
if !(GVAR(enableCombatDeafness)) exitWith {};
|
||||
|
||||
// Check if new noises increase deafness
|
||||
if (GVAR(newStrength) * STRENGHTODEAFNESS > GVAR(currentDeafness)) then {
|
||||
GVAR(currentDeafness) = GVAR(newStrength) * STRENGHTODEAFNESS min MAXDEAFNESS;
|
||||
GVAR(newStrength) = (((ACE_player getvariable [QGVAR(dv), 0]) min 20) / 20) ^ 2;
|
||||
if (GVAR(newStrength) > GVAR(currentDeafness)) then {
|
||||
GVAR(currentDeafness) = GVAR(newStrength);
|
||||
};
|
||||
GVAR(newStrength) = 0;
|
||||
|
||||
// Recover rate is slower if deafness is severe
|
||||
_recoverRate = 0.01;
|
||||
|
BIN
addons/hearing/sounds/backblast_ring.ogg
Normal file
BIN
addons/hearing/sounds/backblast_ring.ogg
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user