mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into fingering
This commit is contained in:
commit
88e0b67364
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ texHeaders.bin
|
||||
*.swp
|
||||
*.swo
|
||||
*.biprivatekey
|
||||
Thumbs.db
|
||||
|
@ -18,6 +18,7 @@ Kieran
|
||||
NouberNou
|
||||
PabstMirror <pabstmirror@gmail.com>
|
||||
Ruthberg <ulteq@web.de>
|
||||
SilentSpike <SilentSpike100@gmail.com>
|
||||
tpM
|
||||
ViperMaul
|
||||
VKing <kauestad@gmail.com>
|
||||
@ -89,7 +90,6 @@ Raspu86
|
||||
Riccardo Petricca <petriccarcc@gmail.com>
|
||||
Robert Boklahánics <bokirobi@gmail.com>
|
||||
ruPaladin <happyworm24@rambler.ru>
|
||||
SilentSpike <SilentSpike100@gmail.com>
|
||||
simon84 <badguy360th@gmail.com>
|
||||
Sniperwolf572 <tenga6@gmail.com>
|
||||
SzwedzikPL <szwedzikpl@gmail.com>
|
||||
|
@ -4,11 +4,11 @@
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases">
|
||||
<img src="https://img.shields.io/badge/Version-3.0.1-blue.svg"
|
||||
<img src="https://img.shields.io/badge/Version-3.1.1-blue.svg"
|
||||
alt="ACE version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.0.1/ace3_3.0.1.zip">
|
||||
<img src="http://img.shields.io/badge/Download-40.9_MB-green.svg"
|
||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.1.1/ace3_3.1.1.zip">
|
||||
<img src="http://img.shields.io/badge/Download-51.7_MB-green.svg"
|
||||
alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
|
Binary file not shown.
BIN
ace_medical.dll
BIN
ace_medical.dll
Binary file not shown.
BIN
ace_parse_imagepath.dll
Normal file
BIN
ace_parse_imagepath.dll
Normal file
Binary file not shown.
@ -30,142 +30,189 @@
|
||||
<Polish>Zaawansowana balistyka</Polish>
|
||||
<Spanish>Balística avanzada</Spanish>
|
||||
<German>Erweiterte Ballistik</German>
|
||||
<Czech>Pokročilá balistika</Czech>
|
||||
<Portuguese>Balística avançada</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Balística avançada</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativa balística avançada</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativar para caçadores</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativa balística avançada para caçadores não locais (quando usando miras telescópicas)</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativada para membros do grupo</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativa balística avançada para membros de grupo não locais</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativada para todos</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer)</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Sempre ativada para membros do grupo</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Sempre ative balística avançada quando um membro do grupo disparar</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Desabilitar no modo automático</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Desabilitar a balística avançada durante fogo automático</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativar simulação de temperatura de munição</Portuguese>
|
||||
</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>
|
||||
<Portuguese>A velocidade de saída varia com a temperatura da munição</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativar a simulação de comprimento do cano</Portuguese>
|
||||
</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>
|
||||
<Portuguese>A velocidade de saída caria com o comprimento do cano</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativa efeito traçante de projétil</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ativa o efeito traçante de projétil para projéteis de alto calibre (somente visível quando observado por miras telescópicas)</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Intervalo da simulação</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Raio de simulação</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, força de Coriolis, a gravidade, o modelo da arma no qual o disparo é realizado e o tipo de munição. Tudo isso acrescenta-se a um balística muito precisa.</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</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.
@ -10,7 +10,7 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(UI\ATRAG_Icon.paa);
|
||||
exceptions[] = {"notOnMap", "isNotInside"};
|
||||
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
false
|
||||
@ -11,4 +11,26 @@
|
||||
false
|
||||
},
|
||||
{false},
|
||||
[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
||||
[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
||||
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
[] call FUNC(can_show);
|
||||
};
|
||||
_toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
// Statement
|
||||
[] call FUNC(create_dialog);
|
||||
};
|
||||
_closeCode = {
|
||||
if (GVAR(active)) exitWith {
|
||||
closeDialog 0;
|
||||
};
|
||||
};
|
||||
[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
@ -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;
|
||||
|
@ -225,5 +225,27 @@ class CfgVehicles {
|
||||
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4);
|
||||
MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4);
|
||||
};
|
||||
class AnimationSources {
|
||||
class Ammo_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 0;
|
||||
};
|
||||
class AmmoOrd_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 1;
|
||||
};
|
||||
class Grenades_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 1;
|
||||
};
|
||||
class Support_source {
|
||||
source = "user";
|
||||
animPeriod = 1;
|
||||
initPhase = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1597,6 +1597,8 @@
|
||||
<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>
|
||||
<Portuguese>[ACE] Caixa com suprimentos de munição</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -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; \
|
||||
}; \
|
||||
}; \
|
||||
};
|
||||
|
||||
|
@ -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,61 @@
|
||||
</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>
|
||||
<Portuguese>Fazer unidade se render</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ajustes de prisioneiros</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Controla as configurações de rendição e abraçadeiras</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Pode algemar o próprio lado</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Os jogadores podem algemar unidades do seu lado</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Permite rendição</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -1,112 +1,109 @@
|
||||
class CfgVehicles {
|
||||
/*class Man;
|
||||
class CAManBase: Man {
|
||||
// @todo
|
||||
class UserActions {
|
||||
class ACE_Fire {
|
||||
displayName = "";
|
||||
priority = -99;
|
||||
available = 1;
|
||||
radius = 2.5;
|
||||
radiusView = 0;
|
||||
position = "";
|
||||
showWindow = 0;
|
||||
showIn3D = 0;
|
||||
onlyForPlayer = 1;
|
||||
shortcut = "DefaultAction";
|
||||
condition = QUOTE(call GVAR(UserActionFireCondition));
|
||||
statement = QUOTE(call GVAR(UserActionFire));
|
||||
userActionID = 100;
|
||||
};
|
||||
};
|
||||
};*/
|
||||
/*class Man;
|
||||
class CAManBase: Man {
|
||||
// @todo
|
||||
class UserActions {
|
||||
class ACE_Fire {
|
||||
displayName = "";
|
||||
priority = -99;
|
||||
available = 1;
|
||||
radius = 2.5;
|
||||
radiusView = 0;
|
||||
position = "";
|
||||
showWindow = 0;
|
||||
showIn3D = 0;
|
||||
onlyForPlayer = 1;
|
||||
shortcut = "DefaultAction";
|
||||
condition = QUOTE(call GVAR(UserActionFireCondition));
|
||||
statement = QUOTE(call GVAR(UserActionFire));
|
||||
userActionID = 100;
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
||||
//#include <DefaultItems.hpp>
|
||||
// += needs a non inherited entry in that class, otherwise it simply overwrites
|
||||
//#include <DefaultItems.hpp>
|
||||
class Logic;
|
||||
class Module_F: Logic {
|
||||
class ModuleDescription;
|
||||
};
|
||||
class ACE_Module: Module_F {};
|
||||
class ACE_ModuleCheckPBOs: ACE_Module {
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(CheckPBO_DisplayName);
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
displayName = CSTRING(CheckPBO_Action_DisplayName);
|
||||
description = CSTRING(CheckPBO_Action_Description);
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class WarnOnce {
|
||||
default = 1;
|
||||
name = CSTRING(CheckPBO_Action_WarnOnce);
|
||||
value = 0;
|
||||
};
|
||||
class Warn {
|
||||
name = CSTRING(CheckPBO_Action_WarnPerm);
|
||||
value = 1;
|
||||
};
|
||||
class Kick {
|
||||
name = CSTRING(CheckPBO_Action_Kick);
|
||||
value = 2;
|
||||
};
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(CheckPBO_DisplayName);
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
displayName = CSTRING(CheckPBO_Action_DisplayName);
|
||||
description = CSTRING(CheckPBO_Action_Description);
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class WarnOnce {
|
||||
default = 1;
|
||||
name = CSTRING(CheckPBO_Action_WarnOnce);
|
||||
value = 0;
|
||||
};
|
||||
class Warn {
|
||||
name = CSTRING(CheckPBO_Action_WarnPerm);
|
||||
value = 1;
|
||||
};
|
||||
class Kick {
|
||||
name = CSTRING(CheckPBO_Action_Kick);
|
||||
value = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
class CheckAll {
|
||||
displayName = CSTRING(CheckPBO_CheckAll_DisplayName);
|
||||
description = CSTRING(CheckPBO_CheckAll_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class Whitelist {
|
||||
displayName = CSTRING(CheckPBO_Whitelist_DisplayName);
|
||||
description = CSTRING(CheckPBO_Whitelist_Description);
|
||||
typeName = "STRING";
|
||||
defaultValue = "[]";
|
||||
};
|
||||
};
|
||||
};
|
||||
class CheckAll {
|
||||
displayName = CSTRING(CheckPBO_CheckAll_DisplayName);
|
||||
description = CSTRING(CheckPBO_CheckAll_Description);
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class Whitelist {
|
||||
displayName = CSTRING(CheckPBO_Whitelist_DisplayName);
|
||||
description = CSTRING(CheckPBO_Whitelist_Description);
|
||||
typeName = "STRING";
|
||||
class values {
|
||||
default = "[]";
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(CheckPBO_Description);
|
||||
};
|
||||
};
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(CheckPBO_Description);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_ModuleLSDVehicles: ACE_Module {
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(LSDVehicles_DisplayName);
|
||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||
isGlobal = 1;
|
||||
class Arguments {
|
||||
class ACE_ModuleLSDVehicles: ACE_Module {
|
||||
author = CSTRING(ACETeam);
|
||||
category = "ACE";
|
||||
displayName = CSTRING(LSDVehicles_DisplayName);
|
||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||
isGlobal = 1;
|
||||
class Arguments {};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(LSDVehicles_Description);
|
||||
sync[] = {"AnyVehicle"};
|
||||
};
|
||||
};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
description = CSTRING(LSDVehicles_Description);
|
||||
sync[] = {"AnyVehicle"};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
author = CSTRING(ACETeam);
|
||||
displayName = CSTRING(MiscItems);
|
||||
transportMaxWeapons = 9001;
|
||||
transportMaxMagazines = 9001;
|
||||
transportMaxItems = 9001;
|
||||
maximumload = 9001;
|
||||
|
||||
class TransportWeapons {};
|
||||
class TransportMagazines {};
|
||||
class TransportItems {};
|
||||
class TransportBackpacks {};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
author = CSTRING(ACETeam);
|
||||
displayName = CSTRING(MiscItems);
|
||||
transportMaxWeapons = 9001;
|
||||
transportMaxMagazines = 9001;
|
||||
transportMaxItems = 9001;
|
||||
maximumload = 9001;
|
||||
|
||||
class TransportWeapons {};
|
||||
class TransportMagazines {};
|
||||
class TransportItems {};
|
||||
class TransportBackpacks {};
|
||||
};
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_bananaItem: Item_Base_F {
|
||||
@ -115,10 +112,8 @@ class CfgVehicles {
|
||||
displayName = CSTRING(bananaDisplayName);
|
||||
author = CSTRING(ACETeam);
|
||||
vehicleClass = "Items";
|
||||
class TransportItems
|
||||
{
|
||||
class ACE_banana
|
||||
{
|
||||
class TransportItems {
|
||||
class ACE_banana {
|
||||
name = "ACE_banana";
|
||||
count = 1;
|
||||
};
|
||||
|
@ -15,8 +15,12 @@ class RscInGameUI {
|
||||
class RscUnitInfoTank: RscUnitInfo {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscUnitInfoAirNoWeapon: RscUnitInfo {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscUnitInfoAir: RscUnitInfo {
|
||||
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
|
@ -3,6 +3,27 @@
|
||||
|
||||
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
|
||||
|
||||
//Singe PFEH to handle execNextFrame and waitAndExec:
|
||||
[{
|
||||
private ["_entry"];
|
||||
|
||||
//Handle the waitAndExec array:
|
||||
while {((count GVAR(waitAndExecArray)) > 0) && {((GVAR(waitAndExecArray) select 0) select 0) <= ACE_Time}} do {
|
||||
_entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
(_entry select 2) call (_entry select 1);
|
||||
};
|
||||
|
||||
//Handle the execNextFrame array:
|
||||
{
|
||||
(_x select 0) call (_x select 1);
|
||||
} forEach GVAR(nextFrameBufferA);
|
||||
//Swap double-buffer:
|
||||
GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB);
|
||||
GVAR(nextFrameBufferB) = [];
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
// Listens for global "SettingChanged" events, to update the force status locally
|
||||
["SettingChanged", {
|
||||
PARAMS_2(_name,_value);
|
||||
@ -20,6 +41,8 @@
|
||||
["fixFloating", DFUNC(fixFloating)] call FUNC(addEventhandler);
|
||||
["fixPosition", DFUNC(fixPosition)] call FUNC(addEventhandler);
|
||||
|
||||
["unloadPersonEvent", DFUNC(unloadPersonLocal)] call FUNC(addEventhandler);
|
||||
|
||||
["lockVehicle", {
|
||||
_this setVariable [QGVAR(lockStatus), locked _this];
|
||||
_this lock 2;
|
||||
@ -33,6 +56,10 @@
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||
|
||||
if (isServer) then {
|
||||
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
|
||||
};
|
||||
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (ACE_time > 0) exitWith {
|
||||
@ -80,6 +107,52 @@ if(!isServer) then {
|
||||
|
||||
call FUNC(checkFiles);
|
||||
|
||||
|
||||
// Create a pfh to wait until all postinits are ready and settings are initialized
|
||||
[{
|
||||
PARAMS_1(_args);
|
||||
EXPLODE_1_PVT(_args,_waitingMsgSent);
|
||||
// If post inits are not ready then wait
|
||||
if !(SLX_XEH_MACHINE select 8) exitWith {};
|
||||
|
||||
// If settings are not initialized then wait
|
||||
if (isNil QGVAR(settings) || {(!isServer) && (isNil QEGVAR(modules,serverModulesRead))}) exitWith {
|
||||
if (!_waitingMsgSent) then {
|
||||
_args set [0, true];
|
||||
diag_log text format["[ACE] Waiting on settings from server"];
|
||||
};
|
||||
};
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
diag_log text format["[ACE] Settings received from server"];
|
||||
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
call FUNC(loadSettingsLocalizedText);
|
||||
};
|
||||
|
||||
diag_log text format["[ACE] Settings initialized"];
|
||||
|
||||
//Event that settings are safe to use:
|
||||
["SettingsInitialized", []] call FUNC(localEvent);
|
||||
|
||||
}, 0, [false]] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
|
||||
["SettingsInitialized", {
|
||||
[
|
||||
GVAR(checkPBOsAction),
|
||||
GVAR(checkPBOsCheckAll),
|
||||
call compile GVAR(checkPBOsWhitelist)
|
||||
] call FUNC(checkPBOs)
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
/***************************************************************/
|
||||
/***************************************************************/
|
||||
@ -248,47 +321,41 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
["SettingsInitialized", {
|
||||
[
|
||||
GVAR(checkPBOsAction),
|
||||
GVAR(checkPBOsCheckAll),
|
||||
call compile GVAR(checkPBOsWhitelist)
|
||||
] 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;
|
||||
|
@ -11,7 +11,6 @@ PREP(addCanInteractWithCondition);
|
||||
PREP(addLineToDebugDraw);
|
||||
PREP(addSetting);
|
||||
PREP(addToInventory);
|
||||
PREP(adminKick);
|
||||
PREP(ambientBrightness);
|
||||
PREP(applyForceWalkStatus);
|
||||
PREP(ASLToPosition);
|
||||
@ -35,6 +34,8 @@ PREP(currentChannel);
|
||||
PREP(debug);
|
||||
PREP(debugModule);
|
||||
PREP(defineVariable);
|
||||
PREP(deviceKeyFindValidIndex);
|
||||
PREP(deviceKeyRegisterNew);
|
||||
PREP(disableAI);
|
||||
PREP(disableUserInput);
|
||||
PREP(displayIcon);
|
||||
@ -101,6 +102,7 @@ PREP(goKneeling);
|
||||
PREP(hadamardProduct);
|
||||
PREP(hasItem);
|
||||
PREP(hasMagazine);
|
||||
PREP(hideUnit);
|
||||
PREP(inheritsFrom);
|
||||
PREP(insertionSort);
|
||||
PREP(interpolateFromArray);
|
||||
@ -178,6 +180,7 @@ PREP(toBin);
|
||||
PREP(toBitmask);
|
||||
PREP(toHex);
|
||||
PREP(toNumber);
|
||||
PREP(unhideUnit);
|
||||
PREP(uniqueElementsOnly);
|
||||
PREP(unloadPerson);
|
||||
PREP(unloadPersonLocal);
|
||||
@ -287,7 +290,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)
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_name";
|
||||
|
||||
_name = name (_this select 0);
|
||||
|
||||
[_name, "{if (serverCommandAvailable '#kick') then {serverCommand format['#kick %1', _this]}}"] call FUNC(execRemoteFnc);
|
@ -56,20 +56,23 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||
|
||||
///////////////
|
||||
// check server version
|
||||
// check server version/addons
|
||||
///////////////
|
||||
if (isMultiplayer) then {
|
||||
if (isServer) then {
|
||||
// send servers version of ACE to all clients
|
||||
GVAR(ServerVersion) = _version;
|
||||
GVAR(ServerAddons) = _addons;
|
||||
publicVariable QGVAR(ServerVersion);
|
||||
publicVariable QGVAR(ServerAddons);
|
||||
} else {
|
||||
// clients have to wait for the variable
|
||||
// clients have to wait for the variables
|
||||
[{
|
||||
if (isNil QGVAR(ServerVersion)) exitWith {};
|
||||
if (isNil QGVAR(ServerVersion) || isNil QGVAR(ServerAddons)) exitWith {};
|
||||
|
||||
private "_version";
|
||||
_version = _this select 0;
|
||||
private ["_version","_addons"];
|
||||
_version = (_this select 0) select 0;
|
||||
_addons = (_this select 0) select 1;
|
||||
|
||||
if (_version != GVAR(ServerVersion)) then {
|
||||
private "_errorMsg";
|
||||
@ -82,7 +85,18 @@ if (isMultiplayer) then {
|
||||
};
|
||||
};
|
||||
|
||||
_addons = _addons - GVAR(ServerAddons);
|
||||
if !(_addons isEqualTo []) then {
|
||||
_errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
|
||||
|
||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||
|
||||
if (hasInterface) then {diag_log str "1";
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
};
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
}, 1, _version] call CBA_fnc_addPerFrameHandler;
|
||||
}, 1, [_version,_addons]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
@ -8,8 +8,8 @@
|
||||
* 0: Warn once
|
||||
* 1: Warn permanently
|
||||
* 2: Kick
|
||||
* 1: Check all PBOs? <BOOL> (Optional - default: "[]")
|
||||
* 2: Whitelist <STRING> (Optinal - default: false)
|
||||
* 1: Check all PBOs? <BOOL> (Optional - default: false)
|
||||
* 2: Whitelist <STRING> (Optinal - default: "[]")
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
@ -67,24 +67,26 @@ if (!isServer) then {
|
||||
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
||||
diag_log text _error;
|
||||
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
if (_mode < 2) then {
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
|
||||
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
||||
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
||||
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
||||
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
||||
|
||||
disableSerialization;
|
||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
||||
_ctrlHint ctrlSetStructuredText _text;
|
||||
disableSerialization;
|
||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
||||
_ctrlHint ctrlSetStructuredText _text;
|
||||
|
||||
if (_mode == 0) then {
|
||||
sleep 10;
|
||||
_rscLayer cutFadeOut 0.2;
|
||||
if (_mode == 0) then {
|
||||
sleep 10;
|
||||
_rscLayer cutFadeOut 0.2;
|
||||
};
|
||||
};
|
||||
|
||||
if (_mode == 2) then {
|
||||
sleep 10;
|
||||
waitUntil {alive player};
|
||||
[player] call FUNC(adminKick);
|
||||
waitUntil {alive player}; // To be able to show list if using checkAll
|
||||
_text = composeText [parseText format ["<t align='center'>%1</t>", _text]];
|
||||
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
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];
|
||||
};
|
||||
|
34
addons/common/functions/fnc_hideUnit.sqf
Normal file
34
addons/common/functions/fnc_hideUnit.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: SilentSpike (based on muteUnit)
|
||||
* Globally hides a unit. This allows the handling of more than one reason to hide an object globally.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Reason to hide the unit <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Example:
|
||||
* [ACE_Player, "SpectatorMode"] call ace_common_fnc_hideUnit
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_reason);
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
|
||||
private "_setHiddenReasons";
|
||||
_setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []];
|
||||
|
||||
if !(_reason in _setHiddenReasons) then {
|
||||
_setHiddenReasons pushBack _reason;
|
||||
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
||||
};
|
||||
|
||||
//if !(isObjectHidden _unit) then { (Uncomment when isObjectHidden hits stable branch)
|
||||
["hideObjectGlobal",[_unit,true]] call FUNC(serverEvent);
|
||||
//};
|
@ -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)})
|
||||
|
@ -3,7 +3,9 @@
|
||||
* Initializes the check-PBOs module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
|
34
addons/common/functions/fnc_unhideUnit.sqf
Normal file
34
addons/common/functions/fnc_unhideUnit.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: SilentSpike (based on unmuteUnit)
|
||||
* Globally unhides a unit. Only unhides if the last reason was removed.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Reason to unhide the unit <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Example:
|
||||
* [ACE_Player, "SpectatorMode"] call ace_common_fnc_unhideUnit
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_reason);
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
|
||||
private "_setHiddenReasons";
|
||||
_setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []];
|
||||
|
||||
if (_reason in _setHiddenReasons) then {
|
||||
_setHiddenReasons deleteAt (_setHiddenReasons find _reason);
|
||||
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
||||
};
|
||||
|
||||
if (_setHiddenReasons isEqualTo []) then {
|
||||
["hideObjectGlobal",[_unit,false]] call FUNC(serverEvent);
|
||||
};
|
@ -15,21 +15,41 @@
|
||||
|
||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||
|
||||
private ["_vehicle", "_loaded", "_emptyPos"];
|
||||
PARAMS_1(_unit);
|
||||
_vehicle = vehicle _unit;
|
||||
private ["_loaded", "_emptyPos"];
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
|
||||
if (_vehicle == _unit) exitwith {false;};
|
||||
if !(speed _vehicle <1 && (((getpos _vehicle) select 2) < 2)) exitwith {false;};
|
||||
if (driver _vehicle == _unit) exitwith {TRACE_1("Exiting on Failed Driver Check", driver _vehicle == _unit); false;};
|
||||
TRACE_1("Vehicle Check", driver _vehicle == _unit);
|
||||
if !(speed _vehicle <1 && (((getPos _vehicle) select 2) < 2)) exitwith {TRACE_1("Exiting on Failed speed check", getPosASL _vehicle == _unit); false;};
|
||||
TRACE_1("getPosASL Vehicle Check", getPos _vehicle);
|
||||
|
||||
_emptyPos = ((getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]);
|
||||
if (count _emptyPos == 0) exitwith {false};
|
||||
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
|
||||
if (count _emptyPos == 0) exitwith {false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
|
||||
_unit setPos _emptyPos;
|
||||
unassignVehicle _unit;
|
||||
if (!alive _unit) then {
|
||||
_unit action ["Eject", vehicle _unit];
|
||||
};
|
||||
[_unit] orderGetIn false;
|
||||
TRACE_1("Ejecting", alive _unit);
|
||||
_unit action ["Eject", vehicle _unit];
|
||||
[ {
|
||||
private "_anim";
|
||||
PARAMS_2(_unit,_emptyPos);
|
||||
_unit setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
if (!([_unit] call FUNC(isAwake))) then {
|
||||
TRACE_1("Check if isAwake", [_unit] call FUNC(isAwake));
|
||||
if (driver _unit == _unit) then {
|
||||
_anim = [_unit] call EFUNC(common,getDeathAnim);
|
||||
[_unit, _anim, 1, true] call EFUNC(common,doAnimation);
|
||||
[{
|
||||
_unit = _this select 0;
|
||||
_anim = _this select 1;
|
||||
if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
|
||||
[_unit, _anim, 2, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}, [_unit, _anim], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
};
|
||||
},[_unit,_emptyPos], 0.5, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
|
||||
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);
|
||||
|
||||
@ -37,8 +57,4 @@ _loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||
_loaded = _loaded - [_unit];
|
||||
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||
|
||||
if (!([_unit] call FUNC(isAwake))) then {
|
||||
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call FUNC(doAnimation);
|
||||
};
|
||||
|
||||
true;
|
||||
true
|
@ -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,125 @@
|
||||
<Polish>Sprawdzaj PBO</Polish>
|
||||
<Spanish>Comprobar PBOs</Spanish>
|
||||
<German>Überprüfe PBOs</German>
|
||||
<Czech>Zkontrolovat PBO</Czech>
|
||||
<Portuguese>Verificar PBOs</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Este módulo verifica a integridade dos addons quando iniciamos a simulação</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Ação</Portuguese>
|
||||
</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>
|
||||
<Portuguese>O que fazer com pessoas que não tem os PBOs corretos?</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Avisar uma vez</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Avisar (permanente)</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_CheckPBO_Action_Kick">
|
||||
<English>Kick</English>
|
||||
<Polish>Kick</Polish>
|
||||
<Spanish>Expulsar</Spanish>
|
||||
<German>Kicken</German>
|
||||
<Czech>Vyhodit</Czech>
|
||||
<Portuguese>Chutar</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Verificar todos addons</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Verificar todos addons invés de só os do ACE?</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Lista branca</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Quais addons são permitidos de qualquer maneira?</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Veículos LSD</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Adiciona efeito LSD ao veículo sincronizado</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
||||
<English>Toggle Handheld Device</English>
|
||||
<Spanish>Seleccionar dispositivo de mano</Spanish>
|
||||
<Portuguese>Ativa dispositivo de mão</Portuguese>
|
||||
<Polish>Przełącz urządzenie podręczne</Polish>
|
||||
<Czech>Přepnout ruční zařízení</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_closeHandheldDevice">
|
||||
<English>Close Handheld Device</English>
|
||||
<Spanish>Cerrar dispositivo de mano</Spanish>
|
||||
<Portuguese>Fecha dispositivo de mão</Portuguese>
|
||||
<Polish>Zamknij urządzenie podręczne</Polish>
|
||||
<Czech>Zavřít ruční zařízení</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_cycleHandheldDevices">
|
||||
<English>Cycle Handheld Devices</English>
|
||||
<Spanish>Cambiar dispositivos de mano</Spanish>
|
||||
<Portuguese>Troca dispositivos de mão</Portuguese>
|
||||
<Polish>Następne urządzenie podręczne</Polish>
|
||||
<Czech>Procházet ruční zařízení</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</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"]
|
53
addons/concertina_wire/stringtable.xml
Normal file
53
addons/concertina_wire/stringtable.xml
Normal file
@ -0,0 +1,53 @@
|
||||
<?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>
|
||||
<Portuguese>Arame farpado</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Bobina de arame farpado</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Desmontar arame farpado</Portuguese>
|
||||
</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>
|
||||
<Portuguese>Colocar arame farpado</Portuguese>
|
||||
</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", "isNotSitting"};
|
||||
class GVAR(toggle) {
|
||||
displayName = "Toggle DAGR";
|
||||
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
||||
statement = QUOTE(call FUNC(toggleOverlay));
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_Item_DAGR: Item_Base_F {
|
||||
author[] = {"Rosuto", "Ruthberg"};
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = "DAGR";
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
class ACE_DAGR {
|
||||
name = "ACE_DAGR";
|
||||
count = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_DAGR,6);
|
||||
};
|
||||
};
|
||||
};
|
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.
33
addons/dagr/XEH_postInit.sqf
Normal file
33
addons/dagr/XEH_postInit.sqf
Normal file
@ -0,0 +1,33 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
#include "initKeybinds.sqf"
|
||||
|
||||
GVAR(outputPFH) = -1;
|
||||
|
||||
GVAR(run) = false;
|
||||
GVAR(hidden) = true;
|
||||
GVAR(menuRun) = false;
|
||||
GVAR(useDegrees) = true;
|
||||
GVAR(updateInterval) = 0.5;
|
||||
|
||||
GVAR(numWaypoints) = 0;
|
||||
GVAR(wpString0) = "";
|
||||
GVAR(wpString1) = "";
|
||||
GVAR(wpString2) = "";
|
||||
GVAR(wpString3) = "";
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp0) = 0;
|
||||
GVAR(wp1) = 0;
|
||||
GVAR(wp2) = 0;
|
||||
GVAR(wp3) = 0;
|
||||
GVAR(wp4) = 0;
|
||||
|
||||
GVAR(displaySelection) = "DATA";
|
||||
|
||||
GVAR(vectorConnected) = false;
|
||||
GVAR(noVectorData) = true;
|
||||
GVAR(vectorGrid) = "00000000";
|
||||
|
||||
["RangerfinderData", {_this call FUNC(handleRangeFinderData)}] call EFUNC(common,addEventHandler);
|
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) || !GVAR(menuRun)) exitWith {
|
||||
closeDialog 266860;
|
||||
GVAR(menuRun) = false;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (GVAR(MENU_B)) then {
|
||||
GVAR(menu) = "main";
|
||||
GVAR(selection) = 0;
|
||||
GVAR(numSelections) = 5;
|
||||
};
|
||||
|
||||
if (!GVAR(add) && !GVAR(edit)) then {
|
||||
if (GVAR(DOWN)) then {
|
||||
GVAR(selection) = (GVAR(numSelections) + GVAR(selection) + 1);
|
||||
};
|
||||
if (GVAR(UP)) then {
|
||||
GVAR(selection) = (GVAR(numSelections) + GVAR(selection) - 1);
|
||||
};
|
||||
GVAR(selection) = if (GVAR(numSelections) > 0) then { GVAR(selection) % GVAR(numSelections) } else { 0 };
|
||||
};
|
||||
|
||||
if (GVAR(LEFT)) then {
|
||||
GVAR(pointer) = (8 + GVAR(pointer) - 1);
|
||||
};
|
||||
if (GVAR(RIGHT)) then {
|
||||
GVAR(pointer) = (8 + GVAR(pointer) + 1);
|
||||
};
|
||||
GVAR(pointer) = GVAR(pointer) % 8;
|
||||
|
||||
(__dsp displayCtrl __PSelection1) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection2) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection3) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection4) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection5) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection6) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection7) ctrlSetText "";
|
||||
(__dsp displayCtrl __PSelection8) ctrlSetText "";
|
||||
|
||||
(__dsp displayCtrl __Selection0) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection1) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection2) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection3) ctrlSetText "";
|
||||
(__dsp displayCtrl __Selection4) ctrlSetText "";
|
||||
|
||||
(__dsp displayCtrl __F1) ctrlSetText "";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "";
|
||||
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option1) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option2) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option3) ctrlSetText "";
|
||||
(__dsp displayCtrl __Option4) ctrlSetText "";
|
||||
|
||||
switch (GVAR(menu)) do {
|
||||
case "main": {
|
||||
if (GVAR(SEL)) then {
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: {
|
||||
GVAR(displaySelection) = "DATA";
|
||||
GVAR(vectorConnected) = false;
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data.";
|
||||
if (ACE_time - GVAR(busyTimer) > 0.5) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.0) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.5) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Position Acquired";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 3.0) then {
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
case 1: {
|
||||
if (GVAR(numWaypoints) < 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "No Waypoints Found";
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(showNoWaypointsFound) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
} else {
|
||||
GVAR(menu) = "goto_wp"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0;
|
||||
};
|
||||
};
|
||||
case 2: { GVAR(menu) = "wp_list"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0 };
|
||||
case 3: { GVAR(menu) = "connect"; GVAR(numSelections) = 1; };
|
||||
case 4: { GVAR(menu) = "options"; GVAR(numSelections) = 2; };
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showNoWaypointsFound)) then {
|
||||
if (ACE_time - GVAR(busyTimer) > 2) then {
|
||||
GVAR(showNoWaypointsFound) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "DATA VIEW";
|
||||
(__dsp displayCtrl __Option1) ctrlSetText "GOTO WP";
|
||||
(__dsp displayCtrl __Option2) ctrlSetText "WP LIST";
|
||||
(__dsp displayCtrl __Option3) ctrlSetText "CONNECT TO";
|
||||
(__dsp displayCtrl __Option4) ctrlSetText "OPTIONS";
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
};
|
||||
case "goto_wp": {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0);
|
||||
(__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1);
|
||||
(__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2);
|
||||
(__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3);
|
||||
(__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4);
|
||||
if (GVAR(numSelections) > 0) then {
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
};
|
||||
if (GVAR(SEL)) then {
|
||||
GVAR(vectorConnected) = false;
|
||||
GVAR(displaySelection) = "WP";
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: { DAGR_WP_INFO = GVAR(wp0); };
|
||||
case 1: { DAGR_WP_INFO = GVAR(wp1); };
|
||||
case 2: { DAGR_WP_INFO = GVAR(wp2); };
|
||||
case 3: { DAGR_WP_INFO = GVAR(wp3); };
|
||||
case 4: { DAGR_WP_INFO = GVAR(wp4); };
|
||||
};
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(showInfoUpdating) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showInfoUpdating)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Update.";
|
||||
if (ACE_time - GVAR(busyTimer) > 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Update..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Update...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Info Updated";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.9) then {
|
||||
GVAR(showInfoUpdating) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
case "wp_list": {
|
||||
if (!GVAR(add) && !GVAR(edit)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0);
|
||||
(__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1);
|
||||
(__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2);
|
||||
(__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3);
|
||||
(__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4);
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Add";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "Edit";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Delete";
|
||||
if (GVAR(numSelections) > 0) then {
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
};
|
||||
if (GVAR(F3) && GVAR(numWaypoints) > 0) then {
|
||||
if (!GVAR(busy)) then {
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: {
|
||||
GVAR(wpString0) = GVAR(wpString1);
|
||||
GVAR(wp0) = GVAR(wp1);
|
||||
GVAR(wpString1) = GVAR(wpString2);
|
||||
GVAR(wp1) = GVAR(wp2);
|
||||
GVAR(wpString2) = GVAR(wpString3);
|
||||
GVAR(wp2) = GVAR(wp3);
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 1: {
|
||||
GVAR(wpString1) = GVAR(wpString2);
|
||||
GVAR(wp1) = GVAR(wp2);
|
||||
GVAR(wpString2) = GVAR(wpString3);
|
||||
GVAR(wp2) = GVAR(wp3);
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 2: {
|
||||
GVAR(wpString2) = GVAR(wpString3);
|
||||
GVAR(wp2) = GVAR(wp3);
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 3: {
|
||||
GVAR(wpString3) = GVAR(wpString4);
|
||||
GVAR(wp3) = GVAR(wp4);
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
case 4: {
|
||||
GVAR(wpString4) = "";
|
||||
GVAR(wp4) = "";
|
||||
};
|
||||
};
|
||||
GVAR(numWaypoints) = GVAR(numWaypoints) - 1;
|
||||
GVAR(numSelections) = GVAR(numWaypoints);
|
||||
GVAR(showDeleting) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showDeleting)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Deleting.";
|
||||
if (ACE_time - GVAR(busyTimer) > 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Deleting..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Deleting...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Waypoint Deleted";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.9) then {
|
||||
GVAR(showDeleting) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(F1)) then {
|
||||
if (GVAR(numWaypoints) == 5) then {
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(showOutOfSpace) = true;
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
} else {
|
||||
GVAR(digit1) = 0;
|
||||
GVAR(digit2) = 0;
|
||||
GVAR(digit3) = 0;
|
||||
GVAR(digit4) = 0;
|
||||
GVAR(digit5) = 0;
|
||||
GVAR(digit6) = 0;
|
||||
GVAR(digit7) = 0;
|
||||
GVAR(digit8) = 0;
|
||||
GVAR(pointer) = 0;
|
||||
GVAR(add) = true;
|
||||
};
|
||||
};
|
||||
if (GVAR(busy) && GVAR(showOutOfSpace)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Out of Space";
|
||||
if (ACE_time - GVAR(busyTimer) > 2.5) then {
|
||||
GVAR(showOutOfSpace) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(F2) && GVAR(numWaypoints) > 0) then {
|
||||
GVAR(pointer) = 0;
|
||||
GVAR(edit) = true;
|
||||
GVAR(add) = false;
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: {
|
||||
GVAR(digit1) = floor (GVAR(wp0) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp0) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp0) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp0) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp0) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp0) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp0) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp0) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 1: {
|
||||
GVAR(digit1) = floor (GVAR(wp1) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp1) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp1) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp1) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp1) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp1) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp1) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp1) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 2: {
|
||||
GVAR(digit1) = floor (GVAR(wp2) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp2) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp2) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp2) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp2) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp2) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp2) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp2) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 3: {
|
||||
GVAR(digit1) = floor (GVAR(wp3) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp3) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp3) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp3) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp3) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp3) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp3) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp3) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
case 4: {
|
||||
GVAR(digit1) = floor (GVAR(wp4) / 10000000);
|
||||
GVAR(digit2) = floor (GVAR(wp4) / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor (GVAR(wp4) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor (GVAR(wp4) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor (GVAR(wp4) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor (GVAR(wp4) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor (GVAR(wp4) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor (GVAR(wp4) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Save";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "Vector";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
|
||||
GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8);
|
||||
(__dsp displayCtrl __mainText) ctrlSetText GVAR(output);
|
||||
(__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QUOTE(PATHTOF(UI\DAGR_PSelection.paa));
|
||||
};
|
||||
if (GVAR(F1)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
if (GVAR(add)) then {
|
||||
switch (GVAR(numWaypoints)) do {
|
||||
case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); };
|
||||
case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); };
|
||||
case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); };
|
||||
case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); };
|
||||
case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); };
|
||||
};
|
||||
GVAR(numWaypoints) = GVAR(numWaypoints) + 1;
|
||||
GVAR(numSelections) = GVAR(numWaypoints);
|
||||
GVAR(selection) = 0;
|
||||
};
|
||||
if (GVAR(edit)) then {
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); };
|
||||
case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); };
|
||||
case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); };
|
||||
case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); };
|
||||
case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); };
|
||||
};
|
||||
};
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __F1) ctrlSetText "";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "";
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Saving.";
|
||||
if (ACE_time - GVAR(busyTimer) > 1) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Saving..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Saving...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 1.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Waypoint Saved";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.9) then {
|
||||
GVAR(edit) = false;
|
||||
GVAR(add) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(F2)) then {
|
||||
private ["_grid", "_gridVector"];
|
||||
_grid = toArray GVAR(vectorGrid);
|
||||
_grid deleteAt 4;
|
||||
_grid = toString _grid;
|
||||
_gridVector = parseNumber _grid;
|
||||
GVAR(digit1) = floor(_gridVector / 10000000);
|
||||
GVAR(digit2) = floor(_gridVector / 1000000 - GVAR(digit1) *10);
|
||||
GVAR(digit3) = floor(_gridVector / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100);
|
||||
GVAR(digit4) = floor(_gridVector / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000);
|
||||
GVAR(digit5) = floor(_gridVector / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000);
|
||||
GVAR(digit6) = floor(_gridVector / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000);
|
||||
GVAR(digit7) = floor(_gridVector / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000);
|
||||
GVAR(digit8) = floor(_gridVector - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000);
|
||||
};
|
||||
if (GVAR(F3)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
} else {
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Save";
|
||||
(__dsp displayCtrl __F2) ctrlSetText "Vector";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
|
||||
GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8);
|
||||
(__dsp displayCtrl __mainText) ctrlSetText GVAR(output);
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.1) then {
|
||||
GVAR(add) = false;
|
||||
GVAR(edit) = false;
|
||||
GVAR(busy) = false;
|
||||
};
|
||||
};
|
||||
if (GVAR(UP)) then {
|
||||
switch (GVAR(pointer) + 1) do {
|
||||
case 1: { GVAR(digit1) = (10 + GVAR(digit1) + 1) % 10 };
|
||||
case 2: { GVAR(digit2) = (10 + GVAR(digit2) + 1) % 10 };
|
||||
case 3: { GVAR(digit3) = (10 + GVAR(digit3) + 1) % 10 };
|
||||
case 4: { GVAR(digit4) = (10 + GVAR(digit4) + 1) % 10 };
|
||||
case 5: { GVAR(digit5) = (10 + GVAR(digit5) + 1) % 10 };
|
||||
case 6: { GVAR(digit6) = (10 + GVAR(digit6) + 1) % 10 };
|
||||
case 7: { GVAR(digit7) = (10 + GVAR(digit7) + 1) % 10 };
|
||||
case 8: { GVAR(digit8) = (10 + GVAR(digit8) + 1) % 10 };
|
||||
};
|
||||
};
|
||||
if (GVAR(DOWN)) then {
|
||||
switch (GVAR(pointer) + 1) do {
|
||||
case 1: { GVAR(digit1) = (10 + GVAR(digit1) - 1) % 10 };
|
||||
case 2: { GVAR(digit2) = (10 + GVAR(digit2) - 1) % 10 };
|
||||
case 3: { GVAR(digit3) = (10 + GVAR(digit3) - 1) % 10 };
|
||||
case 4: { GVAR(digit4) = (10 + GVAR(digit4) - 1) % 10 };
|
||||
case 5: { GVAR(digit5) = (10 + GVAR(digit5) - 1) % 10 };
|
||||
case 6: { GVAR(digit6) = (10 + GVAR(digit6) - 1) % 10 };
|
||||
case 7: { GVAR(digit7) = (10 + GVAR(digit7) - 1) % 10 };
|
||||
case 8: { GVAR(digit8) = (10 + GVAR(digit8) - 1) % 10 };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
case "connect": {
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "Vector 21";
|
||||
(__dsp displayCtrl __Selection0) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
};
|
||||
if (GVAR(SEL)) then {
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting.";
|
||||
if (ACE_time - GVAR(busyTimer) > 0.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Connecting...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
||||
if (ACE_player hasWeapon "ACE_Vector") then {
|
||||
GVAR(displaySelection) = "VECTOR";
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Vector Connected";
|
||||
GVAR(vectorConnected) = true;
|
||||
} else {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "No Device Found";
|
||||
GVAR(vectorConnected) = false;
|
||||
};
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 3.1) then {
|
||||
GVAR(busy) = false;
|
||||
if (GVAR(vectorConnected)) then {
|
||||
GVAR(menu) = "main"; GVAR(numSelections) = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
case "options": {
|
||||
(__dsp displayCtrl __Option0) ctrlSetText "Signal Delay";
|
||||
(__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" });
|
||||
(__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa));
|
||||
if (GVAR(SEL)) then {
|
||||
GVAR(vectorConnected) = false;
|
||||
switch (GVAR(selection)) do {
|
||||
case 0: { GVAR(menu) = "update_rate"; GVAR(numSelections) = 1; GVAR(tmpUpdateRate) = GVAR(updateInterval); };
|
||||
case 1: { GVAR(useDegrees) = !GVAR(useDegrees); };
|
||||
};
|
||||
}
|
||||
};
|
||||
case "update_rate": {
|
||||
if (GVAR(F1)) then {
|
||||
GVAR(updateInterval) = GVAR(tmpUpdateRate);
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(busy) = true;
|
||||
GVAR(busyTimer) = ACE_time;
|
||||
};
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Updating.";
|
||||
if (ACE_time - GVAR(busyTimer) > 0.2) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Updating..";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.4) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Updating...";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 0.6) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText "Update Success";
|
||||
};
|
||||
if (ACE_time - GVAR(busyTimer) > 2.1) then {
|
||||
GVAR(busy) = false;
|
||||
GVAR(menu) = "options"; GVAR(numSelections) = 2;
|
||||
};
|
||||
};
|
||||
if (GVAR(F3)) then {
|
||||
GVAR(menu) = "options"; GVAR(numSelections) = 2;
|
||||
};
|
||||
if (GVAR(DOWN)) then {
|
||||
GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) - 0.1;
|
||||
};
|
||||
if (GVAR(UP)) then {
|
||||
GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) + 0.1;
|
||||
};
|
||||
GVAR(tmpUpdateRate) = 0.1 max GVAR(tmpUpdateRate) min 2.0;
|
||||
if (!GVAR(busy)) then {
|
||||
(__dsp displayCtrl __mainText) ctrlSetText (Str(GVAR(tmpUpdateRate) * 1000) + "ms");
|
||||
(__dsp displayCtrl __F1) ctrlSetText "Save";
|
||||
(__dsp displayCtrl __F3) ctrlSetText "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!GVAR(busy)) then {
|
||||
GVAR(F3) = false;
|
||||
GVAR(F2) = false;
|
||||
GVAR(F1) = false;
|
||||
GVAR(MENU_B) = false;
|
||||
GVAR(SEL) = false;
|
||||
DAGR_NEXT = false;
|
||||
GVAR(RIGHT) = false;
|
||||
GVAR(LEFT) = false;
|
||||
GVAR(UP) = false;
|
||||
GVAR(DOWN) = false;
|
||||
GVAR(PWR) = false;
|
||||
};
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
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;
|
54
addons/dagr/functions/fnc_toggleOverlay.sqf
Normal file
54
addons/dagr/functions/fnc_toggleOverlay.sqf
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Author: Rosuto, Ruthberg
|
||||
* Toggles the DAGR overlay
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(run) = !GVAR(run);
|
||||
|
||||
if (GVAR(run)) then {
|
||||
if (GVAR(menuRun) && dialog) then {
|
||||
GVAR(menuRun) = false;
|
||||
closeDialog 0;
|
||||
};
|
||||
GVAR(hidden) = true;
|
||||
[{
|
||||
EXPLODE_1_PVT(_this select 0,_vehicle);
|
||||
if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith {
|
||||
GVAR(run) = false;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (cameraView == "GUNNER") then {
|
||||
if (!GVAR(hidden)) then {
|
||||
GVAR(hidden) = true;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
};
|
||||
} else {
|
||||
if (GVAR(hidden)) then {
|
||||
GVAR(hidden) = false;
|
||||
switch (toUpper GVAR(displaySelection)) do {
|
||||
case "WP" : {
|
||||
call FUNC(outputWP);
|
||||
};
|
||||
case "VECTOR" : {
|
||||
call FUNC(outputVector);
|
||||
};
|
||||
case "DATA" : {
|
||||
call FUNC(outputData);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
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"
|
59
addons/dagr/initKeybinds.sqf
Normal file
59
addons/dagr/initKeybinds.sqf
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
if (!GVAR(menuRun)) then {
|
||||
[] call FUNC(menuInit);
|
||||
} else {
|
||||
GVAR(PWR) = true; // Simulate pressing the power button
|
||||
};
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0, [false, true, false]], false] call cba_fnc_addKeybind; // (empty default key)
|
||||
|
||||
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[] call FUNC(toggleOverlay);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key)
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem));
|
||||
};
|
||||
_toggleCode = {
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
|
||||
|
||||
// Statement
|
||||
[] call FUNC(toggleOverlay);
|
||||
if (!GVAR(run)) then {
|
||||
[] call FUNC(menuInit);
|
||||
};
|
||||
};
|
||||
_closeCode = {
|
||||
// Statement
|
||||
if (GVAR(run)) then {
|
||||
//If dispaly is open, close it:
|
||||
[] call FUNC(toggleOverlay);
|
||||
};
|
||||
if (dialog && GVAR(menuRun)) then {
|
||||
//If dialog is open, close it:
|
||||
GVAR(menuRun) = false;
|
||||
closeDialog 0;
|
||||
};
|
||||
};
|
||||
["DAGR", QUOTE(PATHTOF(UI\DAGR_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
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>
|
@ -50,4 +50,4 @@
|
||||
<Russian>Нести</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -7,4 +7,10 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(ExplodeOnDefuse) {
|
||||
displayName = CSTRING(ExplodeOnDefuse_DisplayName);
|
||||
description = CSTRING(ExplodeOnDefuse_Description);
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
@ -69,25 +69,52 @@ class CfgAmmo {
|
||||
|
||||
/*class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo;
|
||||
class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo;*/
|
||||
|
||||
|
||||
class IEDUrbanBig_Remote_Ammo: PipeBombBase {
|
||||
mineTrigger = "RangeTrigger";
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDLandBig_Remote_Ammo: PipeBombBase {
|
||||
class IEDUrbanBig_Command_Ammo: IEDUrbanBig_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDUrbanBig_Range_Ammo: IEDUrbanBig_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
};
|
||||
|
||||
class IEDUrbanSmall_Remote_Ammo: PipeBombBase {
|
||||
mineTrigger = "RangeTrigger";
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDUrbanSmall_Command_Ammo: IEDUrbanSmall_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDLandSmall_Remote_Ammo: PipeBombBase {
|
||||
class IEDUrbanSmall_Range_Ammo: IEDUrbanSmall_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
};
|
||||
|
||||
class IEDLandBig_Remote_Ammo: PipeBombBase {
|
||||
triggerWhenDestroyed = 1;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.562341, 1, 40};
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDLandBig_Command_Ammo: IEDLandBig_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDLandBig_Range_Ammo: IEDLandBig_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
};
|
||||
|
||||
class IEDLandSmall_Remote_Ammo: PipeBombBase {
|
||||
triggerWhenDestroyed = 1;
|
||||
ACE_explodeOnDefuse = 0.02;
|
||||
soundTrigger[] = {"A3\Sounds_F\weapons\mines\mech_trigger_1", 0.8, 1, 40};
|
||||
};
|
||||
class IEDLandSmall_Command_Ammo: IEDLandSmall_Remote_Ammo {
|
||||
mineTrigger = "RemoteTrigger";
|
||||
};
|
||||
class IEDLandSmall_Range_Ammo: IEDLandSmall_Remote_Ammo {
|
||||
mineTrigger = "RangeTrigger";
|
||||
};
|
||||
};
|
||||
|
@ -44,10 +44,11 @@ class CfgMagazines {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_Claymore";
|
||||
ACE_DelayTime = 1.5;
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"Command"};
|
||||
SupportedTriggers[] = {"Command", "MK16_Transmitter"};
|
||||
class Command {
|
||||
FuseTime = 0.5;
|
||||
FuseTime = 0.5;
|
||||
};
|
||||
class MK16_Transmitter: Command {};
|
||||
};
|
||||
};
|
||||
|
||||
@ -95,45 +96,51 @@ class CfgMagazines {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig";
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
class Command {
|
||||
FuseTime = 0.5;
|
||||
ammo = "IEDUrbanBig_Command_Ammo";
|
||||
};
|
||||
class DeadmanSwitch:Command {};
|
||||
class Cellphone:Command {};
|
||||
class PressurePlate {
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
displayName = CSTRING(PressurePlate);
|
||||
digDistance = 0;
|
||||
ammo = "IEDUrbanBig_Remote_Ammo";
|
||||
ammo = "IEDUrbanBig_Range_Ammo";
|
||||
pitch = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
|
||||
class ACE_Triggers: ACE_Triggers {
|
||||
class Command: Command {
|
||||
ammo = "IEDLandBig_Command_Ammo";
|
||||
};
|
||||
class PressurePlate: PressurePlate {
|
||||
ammo = "IEDLandBig_Remote_Ammo";
|
||||
ammo = "IEDLandBig_Range_Ammo";
|
||||
};
|
||||
};
|
||||
};
|
||||
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
|
||||
class ACE_Triggers {
|
||||
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"};
|
||||
class Command {
|
||||
FuseTime = 0.5;
|
||||
ammo = "IEDUrbanSmall_Command_Ammo";
|
||||
};
|
||||
class DeadmanSwitch: Command {};
|
||||
class Cellphone: Command {};
|
||||
class PressurePlate {
|
||||
displayName = CSTRING(SLAME_Magnetic);
|
||||
displayName = CSTRING(PressurePlate);
|
||||
digDistance = 0;
|
||||
ammo = "IEDUrbanSmall_Remote_Ammo";
|
||||
ammo = "IEDUrbanSmall_Range_Ammo";
|
||||
pitch = 0;
|
||||
};
|
||||
};
|
||||
@ -141,8 +148,11 @@ class CfgMagazines {
|
||||
class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag {
|
||||
ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall";
|
||||
class ACE_Triggers: ACE_Triggers {
|
||||
class Command: Command {
|
||||
ammo = "IEDLandSmall_Command_Ammo";
|
||||
};
|
||||
class PressurePlate: PressurePlate {
|
||||
ammo = "IEDLandSmall_Remote_Ammo";
|
||||
ammo = "IEDLandSmall_Range_Ammo";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user