mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
port kestrel
This commit is contained in:
parent
97ee63a349
commit
8c8e14b0ca
1
addons/kestrel/$PBOPREFIX$
Normal file
1
addons/kestrel/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
|||||||
|
z\ace\addons\kestrel
|
6
addons/kestrel/CfgEventHandlers.hpp
Normal file
6
addons/kestrel/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
class Extended_PreInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
|
};
|
||||||
|
};
|
53
addons/kestrel/CfgVehicles.hpp
Normal file
53
addons/kestrel/CfgVehicles.hpp
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||||
|
name = #ITEM; \
|
||||||
|
count = COUNT; \
|
||||||
|
}
|
||||||
|
|
||||||
|
class CfgVehicles {
|
||||||
|
class Man;
|
||||||
|
class CAManBase: Man {
|
||||||
|
class ACE_SelfActions {
|
||||||
|
class ACE_OpenKestrel {
|
||||||
|
displayName = "$STR_ACE_Wind_OpenKestrel";
|
||||||
|
condition = QUOTE('ACE_Kestrel' in items _player && {!GVAR(isKestrel)});
|
||||||
|
statement = QUOTE(call FUNC(openKestrel));
|
||||||
|
showDisabled = 0;
|
||||||
|
priority = 2;
|
||||||
|
icon = PATHTOF(data\4500NV1.paa);
|
||||||
|
hotkey = "K";
|
||||||
|
};
|
||||||
|
class ACE_CloseKestrel {
|
||||||
|
displayName = "$STR_ACE_Wind_CloseKestrel";
|
||||||
|
condition = QUOTE(GVAR(isKestrel));
|
||||||
|
statement = QUOTE(call FUNC(closeKestrel));
|
||||||
|
showDisabled = 0;
|
||||||
|
priority = 2;
|
||||||
|
icon = PATHTOF(data\4500NV1.paa);
|
||||||
|
hotkey = "K";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Item_Base_F;
|
||||||
|
class ACE_Item_Kestrel: Item_Base_F {
|
||||||
|
author = "$STR_ACE_Common_ACETeam";
|
||||||
|
scope = 2;
|
||||||
|
scopeCurator = 2;
|
||||||
|
displayName = "$STR_ACE_Kestrel_Name";
|
||||||
|
vehicleClass = "Items";
|
||||||
|
class TransportItems {
|
||||||
|
class ACE_Kestrel {
|
||||||
|
name = "ACE_Kestrel";
|
||||||
|
count = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Box_NATO_Support_F;
|
||||||
|
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||||
|
class TransportItems {
|
||||||
|
MACRO_ADDITEM(ACE_Kestrel,6);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
20
addons/kestrel/CfgWeapons.hpp
Normal file
20
addons/kestrel/CfgWeapons.hpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
class CfgWeapons {
|
||||||
|
class ACE_ItemCore;
|
||||||
|
class InventoryItem_Base_F;
|
||||||
|
|
||||||
|
class ACE_Kestrel: ACE_ItemCore {
|
||||||
|
author = "$STR_ACE_Common_ACETeam";
|
||||||
|
scope = 2;
|
||||||
|
displayName = "$STR_ACE_Kestrel_Name";
|
||||||
|
descriptionShort = "$STR_ACE_Kestrel_Description";
|
||||||
|
model = PATHTOF(kestrel4500.p3d);
|
||||||
|
picture = PATHTOF(data\4500NV.paa);
|
||||||
|
icon = "iconObject_circle";
|
||||||
|
mapSize = 0.034;
|
||||||
|
|
||||||
|
class ItemInfo: InventoryItem_Base_F {
|
||||||
|
mass = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
138
addons/kestrel/RscTitles.hpp
Normal file
138
addons/kestrel/RscTitles.hpp
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
|
||||||
|
class RscPicture;
|
||||||
|
class RscText;
|
||||||
|
|
||||||
|
class RscTitles {
|
||||||
|
class ACE_Kestrel {
|
||||||
|
onload = QUOTE(_this call FUNC(onLoadKestrel));
|
||||||
|
//onunload = "";
|
||||||
|
idd = -1;
|
||||||
|
movingEnable = 0;
|
||||||
|
enableDisplay = 1;
|
||||||
|
duration = 1e+011;
|
||||||
|
fadein = 0;
|
||||||
|
fadeout = 0;
|
||||||
|
enablesimulation = 1;
|
||||||
|
|
||||||
|
class controls {
|
||||||
|
class Kestrel1: RscPicture {
|
||||||
|
idc = 10;
|
||||||
|
text = PATHTOF(data\4500NV1.paa);
|
||||||
|
style = "48 + 0x800";
|
||||||
|
x = "safeZoneX - 0.25";
|
||||||
|
y = "safeZoneY + safeZoneH - 0.8";
|
||||||
|
h = "0.75";
|
||||||
|
w = "0.75";
|
||||||
|
};
|
||||||
|
class Kestrel2: Kestrel1 {
|
||||||
|
idc = 11;
|
||||||
|
text = PATHTOF(data\4500NV2.paa);
|
||||||
|
colorText[] = {0,0,0,1-(sunOrMoon*sunOrMoon+(moonIntensity/5))};
|
||||||
|
};
|
||||||
|
|
||||||
|
class HUD1: RscText {
|
||||||
|
idc = 12;
|
||||||
|
type = 0;
|
||||||
|
style = 1;
|
||||||
|
text = " 0000";
|
||||||
|
x = "safeZoneX + 0.08";
|
||||||
|
y = "safeZoneY + safeZoneH - 0.51";
|
||||||
|
h = "0.09";
|
||||||
|
w = "0.108";
|
||||||
|
shadow = 0;
|
||||||
|
font = "PuristaMedium";
|
||||||
|
sizeEx = 0.04;
|
||||||
|
colorText[] = {0.0745,0.2196,0.1216,0.7};
|
||||||
|
colorBackground[] = {0,0,0,0};
|
||||||
|
lineSpacing = 1;
|
||||||
|
};
|
||||||
|
class HUD2: HUD1 {
|
||||||
|
idc = 13;
|
||||||
|
y = "safeZoneY + safeZoneH - 0.48";
|
||||||
|
};
|
||||||
|
class HUD3: HUD1 {
|
||||||
|
idc = 14;
|
||||||
|
y = "safeZoneY + safeZoneH - 0.45";
|
||||||
|
};
|
||||||
|
class HUD4: HUD1 {
|
||||||
|
idc = 15;
|
||||||
|
y = "safeZoneY + safeZoneH - 0.418";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACE_KestrelWheel {
|
||||||
|
onload = QUOTE(_this call FUNC(onLoadKestrelWheel));
|
||||||
|
//onunload = "";
|
||||||
|
idd = -1;
|
||||||
|
movingEnable = 0;
|
||||||
|
enableDisplay = 1;
|
||||||
|
duration = 1e+011;
|
||||||
|
fadein = 0;
|
||||||
|
fadeout = 0;
|
||||||
|
enablesimulation = 1;
|
||||||
|
|
||||||
|
class controls {
|
||||||
|
class Wheel: RscPicture {
|
||||||
|
idc = 1;
|
||||||
|
type = 0;
|
||||||
|
style = "48 + 0x800";
|
||||||
|
text = PATHTOF(data\kestrel_0.paa);
|
||||||
|
x = "safeZoneX + 0.07";
|
||||||
|
y = "safeZoneY + safeZoneH - 0.76";
|
||||||
|
h = "0.15";
|
||||||
|
w = "0.15";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// helper class to prevent flickering. Used together with preloadTitleRsc command.
|
||||||
|
class ACE_Kestrel_Preload {
|
||||||
|
idd = -1;
|
||||||
|
movingEnable = 0;
|
||||||
|
duration = 1e+011;
|
||||||
|
fadein = 0;
|
||||||
|
fadeout = 0;
|
||||||
|
class controls {
|
||||||
|
class Preload_0: RscPicture {
|
||||||
|
text = PATHTOF(data\kestrel_0.paa);
|
||||||
|
};
|
||||||
|
class Preload_1: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_1.paa);
|
||||||
|
};
|
||||||
|
class Preload_2: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_2.paa);
|
||||||
|
};
|
||||||
|
class Preload_3: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_3.paa);
|
||||||
|
};
|
||||||
|
class Preload_4: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_4.paa);
|
||||||
|
};
|
||||||
|
class Preload_5: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_5.paa);
|
||||||
|
};
|
||||||
|
class Preload_6: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_6.paa);
|
||||||
|
};
|
||||||
|
class Preload_7: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_7.paa);
|
||||||
|
};
|
||||||
|
class Preload_8: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_8.paa);
|
||||||
|
};
|
||||||
|
class Preload_9: Preload_0 {
|
||||||
|
text = PATHTOF(data\kestrel_9.paa);
|
||||||
|
};
|
||||||
|
/*class Preload_A: Preload_0 {
|
||||||
|
text = PATHTOF(data\4500NV.paa);
|
||||||
|
};
|
||||||
|
class Preload_B: Preload_0 {
|
||||||
|
text = PATHTOF(data\4500NV1.paa);
|
||||||
|
};
|
||||||
|
class Preload_C: Preload_0 {
|
||||||
|
text = PATHTOF(data\4500NV2.paa);
|
||||||
|
};*/
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
13
addons/kestrel/XEH_preInit.sqf
Normal file
13
addons/kestrel/XEH_preInit.sqf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(onLoadKestrel);
|
||||||
|
PREP(onLoadKestrelWheel);
|
||||||
|
PREP(openKestrel);
|
||||||
|
PREP(closeKestrel);
|
||||||
|
|
||||||
|
GVAR(isKestrel) = false;
|
||||||
|
GVAR(isKestrelWheel) = false;
|
||||||
|
|
||||||
|
ADDON = true;
|
18
addons/kestrel/config.cpp
Normal file
18
addons/kestrel/config.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {"ACE_Item_Kestrel"};
|
||||||
|
weapons[] = {"ACE_Kestrel"};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"ace_common","ace_interaction"};
|
||||||
|
author[] = {"Falke","commy2","KoffeinFlummi","CAA-Picard"};
|
||||||
|
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgEventHandlers.hpp"
|
||||||
|
#include "CfgVehicles.hpp"
|
||||||
|
#include "CfgWeapons.hpp"
|
||||||
|
#include "RscTitles.hpp"
|
BIN
addons/kestrel/data/4500NV.paa
Normal file
BIN
addons/kestrel/data/4500NV.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/4500NV1.paa
Normal file
BIN
addons/kestrel/data/4500NV1.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/4500NV2.paa
Normal file
BIN
addons/kestrel/data/4500NV2.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/arrow1.paa
Normal file
BIN
addons/kestrel/data/arrow1.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/body.paa
Normal file
BIN
addons/kestrel/data/body.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/gpstemp.paa
Normal file
BIN
addons/kestrel/data/gpstemp.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_0.paa
Normal file
BIN
addons/kestrel/data/kestrel_0.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_1.paa
Normal file
BIN
addons/kestrel/data/kestrel_1.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_2.paa
Normal file
BIN
addons/kestrel/data/kestrel_2.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_3.paa
Normal file
BIN
addons/kestrel/data/kestrel_3.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_4.paa
Normal file
BIN
addons/kestrel/data/kestrel_4.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_5.paa
Normal file
BIN
addons/kestrel/data/kestrel_5.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_6.paa
Normal file
BIN
addons/kestrel/data/kestrel_6.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_7.paa
Normal file
BIN
addons/kestrel/data/kestrel_7.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_8.paa
Normal file
BIN
addons/kestrel/data/kestrel_8.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/kestrel_9.paa
Normal file
BIN
addons/kestrel/data/kestrel_9.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/rad.paa
Normal file
BIN
addons/kestrel/data/rad.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/tasten.paa
Normal file
BIN
addons/kestrel/data/tasten.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/data/tasten1.paa
Normal file
BIN
addons/kestrel/data/tasten1.paa
Normal file
Binary file not shown.
94
addons/kestrel/functions/_kestreldata.sqf
Normal file
94
addons/kestrel/functions/_kestreldata.sqf
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
WHILE {AGM_isKestrel} DO {
|
||||||
|
_dSpotter = direction _player;
|
||||||
|
_windrarray = WIND;
|
||||||
|
_windrA= _windrarray select 0;
|
||||||
|
_windrB= _windrarray select 1;
|
||||||
|
_windrC= sqrt ((_windrA * _windrA) + (_windrB * _windrB));
|
||||||
|
_windrD= _windrA atan2 _windrB;
|
||||||
|
_windrR = _dSpotter - _windrD;
|
||||||
|
IF (_windrR < 0) THEN {_windrR = 360+_windrR;};
|
||||||
|
_windrBB = _windrC * sin (_windrR);
|
||||||
|
_windrAA = sqrt ((_windrC * _windrC) - (_windrBB * _windrBB));
|
||||||
|
IF (_windrR < 90) THEN {_windrAA= _windrAA - (_windrAA*2);};
|
||||||
|
IF (_windrR > 270) THEN {_windrAA= _windrAA - (_windrAA*2);};
|
||||||
|
|
||||||
|
_OrtPlayer = eyePos _player;
|
||||||
|
_Pos0 = _OrtPlayer select 0;
|
||||||
|
_Pos1 = _OrtPlayer select 1;
|
||||||
|
_Pos2 = _OrtPlayer select 2;
|
||||||
|
|
||||||
|
// im Gebaude
|
||||||
|
_Ort=0;
|
||||||
|
IF (lineIntersects [_OrtPlayer, [_Pos0,_Pos1,_Pos2 + 15]]) THEN {_Ort=_Ort+1};
|
||||||
|
/*
|
||||||
|
if (lineIntersects [_OrtPlayer, [_Pos0,_Pos1 + 15,_Pos2]]) then {_Ort=_Ort+1};
|
||||||
|
if (lineIntersects [_OrtPlayer, [_Pos0,_Pos1 - 15,_Pos2]]) then {_Ort=_Ort+1};
|
||||||
|
if (lineIntersects [_OrtPlayer, [_Pos0 + 15,_Pos1,_Pos2]]) then {_Ort=_Ort+1};
|
||||||
|
if (lineIntersects [_OrtPlayer, [_Pos0 - 15,_Pos1,_Pos2]]) then {_Ort=_Ort+1};
|
||||||
|
*/
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin windDir) * 15, (_Pos1) - (cos windDir) * 15, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin (windDir-90)) * 15, (_Pos1) - (cos (windDir-90)) * 15, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin (windDir+90)) * 15, (_Pos1) - (cos (windDir+90)) * 15, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin (windDir+180)) * 15, (_Pos1) - (cos (windDir+180)) * 15, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
if (_Ort>3) then {_windrAA=99.99;_windrBB=99.99};
|
||||||
|
|
||||||
|
// in Windrichtung
|
||||||
|
_Ort=0;
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin windDir) * 5, (_Pos1) - (cos windDir) * 5, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin (windDir-15)) * 5, (_Pos1) - (cos (windDir-15)) * 5, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
IF (lineIntersects [[(_Pos0) , (_Pos1), (_Pos2)], [(_Pos0) - (sin (windDir+15)) * 5, (_Pos1) - (cos (windDir+15)) * 5, (_Pos2)]]) THEN {_Ort=_Ort+1};
|
||||||
|
//IF (lineIntersects [_OrtPLAYER, [_Pos0,_Pos1,_Pos2 + 10]]) THEN {_Ort=_Ort+1};
|
||||||
|
IF (_Ort>2) THEN {_windrAA=99.99;_windrBB=99.99};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//IF (vehicle _player != _player) THEN {_windrAA=0;_windrBB=0};
|
||||||
|
IF (_player != vehicle _player) THEN {_windrAA=0;_windrBB=0};
|
||||||
|
|
||||||
|
IF (_windrAA == 99.99) then {
|
||||||
|
AGM_Kestrel_wind_Head = 0;
|
||||||
|
_windrAA= "0.00";
|
||||||
|
_windrBB= "0.00";
|
||||||
|
}ELSE{
|
||||||
|
AGM_Kestrel_wind_Head=_windrAA;
|
||||||
|
IF (_windrAA < 0) THEN {
|
||||||
|
_windrAA= FORMAT["-%1",[_windrAA*-1, 1, 2] call CBA_fnc_FORMATNumber];
|
||||||
|
}ELSE{
|
||||||
|
_windrAA= FORMAT["%1",[_windrAA, 1, 2] call CBA_fnc_FORMATNumber];
|
||||||
|
};
|
||||||
|
IF (_windrBB < 0) THEN {
|
||||||
|
_windrBB= FORMAT["-%1",[_windrBB*-1, 1, 2] call CBA_fnc_FORMATNumber];
|
||||||
|
}ELSE{
|
||||||
|
_windrBB= FORMAT["%1",[_windrBB, 1, 2] call CBA_fnc_FORMATNumber];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_ctrl2 ctrlSetText _windrAA;
|
||||||
|
_ctrl3 ctrlSetText _windrBB;
|
||||||
|
_ctrl4 ctrlSetText FORMAT["%1",round (direction _player)];
|
||||||
|
_ctrl5 ctrlSetText FORMAT["%1", (round (AGM_Wind_currentTemperature * 10)) / 10];
|
||||||
|
_ctrl6 ctrlsettextcolor [0,0,0,1-(sunOrMoon*sunOrMoon+(moonIntensity/5))];
|
||||||
|
|
||||||
|
IF (!("AGM_ItemKestrel" in items _player)) THEN {AGM_isKestrel = FALSE;};
|
||||||
|
IF (
|
||||||
|
underwater _player ||
|
||||||
|
//{_player != vehicle _player} ||
|
||||||
|
{cameraView == "GUNNER"} ||
|
||||||
|
{!alive _player}
|
||||||
|
) THEN {AGM_isKestrel = FALSE;};
|
||||||
|
IF (!AGM_isKestrel) THEN {_sleep1 = 0.01;};
|
||||||
|
|
||||||
|
SLEEP _sleep1;
|
||||||
|
};
|
||||||
|
AGM_isKestrelWheel=False;
|
||||||
|
_ctrl1 ctrlShow false;
|
||||||
|
_ctrl2 ctrlShow false;
|
||||||
|
_ctrl3 ctrlShow false;
|
||||||
|
_ctrl4 ctrlShow false;
|
||||||
|
_ctrl5 ctrlShow false;
|
||||||
|
_ctrl6 ctrlShow false;
|
||||||
|
*/
|
||||||
|
|
8
addons/kestrel/functions/fnc_closeKestrel.sqf
Normal file
8
addons/kestrel/functions/fnc_closeKestrel.sqf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// by commy2
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(isKestrel) = false;
|
||||||
|
GVAR(isKestrelWheel) = false;
|
||||||
|
|
||||||
|
(["ACE_KestrelWheel"] call BIS_fnc_rscLayer) cutText ["", "PLAIN", 0, false];
|
||||||
|
(["ACE_Kestrel"] call BIS_fnc_rscLayer) cutText ["", "PLAIN", 0, false];
|
30
addons/kestrel/functions/fnc_onLoadKestrel.sqf
Normal file
30
addons/kestrel/functions/fnc_onLoadKestrel.sqf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// by Falke, commy2
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(windHead) = 0;
|
||||||
|
|
||||||
|
[{
|
||||||
|
private ["_dlgKestrel", "_ctrlKestrel1", "_ctrlKestrel2", "_ctrlHUD1", "_ctrlHUD2", "_ctrlHUD3", "_ctrlHUD4"];
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
_dlgKestrel = _this select 0;
|
||||||
|
_ctrlKestrel1 = _dlgKestrel displayCtrl 10;
|
||||||
|
_ctrlKestrel2 = _dlgKestrel displayCtrl 11;
|
||||||
|
_ctrlHUD1 = _dlgKestrel displayCtrl 12;
|
||||||
|
_ctrlHUD2 = _dlgKestrel displayCtrl 13;
|
||||||
|
_ctrlHUD3 = _dlgKestrel displayCtrl 14;
|
||||||
|
_ctrlHUD4 = _dlgKestrel displayCtrl 15;
|
||||||
|
|
||||||
|
private ["_wheelState", "_wheelStateAdd"];
|
||||||
|
|
||||||
|
systemChat str diag_frameno;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!GVAR(isKestrel) || {!("ACE_Kestrel" in items ACE_player)}) exitWith {
|
||||||
|
call FUNC(closeKestrel);
|
||||||
|
|
||||||
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
}, 0.01, _this select 0] call CBA_fnc_addPerFrameHandler;
|
40
addons/kestrel/functions/fnc_onLoadKestrelWheel.sqf
Normal file
40
addons/kestrel/functions/fnc_onLoadKestrelWheel.sqf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// by Falke, commy2
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(windHead) = 0;
|
||||||
|
GVAR(wheelState) = 1;
|
||||||
|
|
||||||
|
[{
|
||||||
|
private ["_display", "_control"];
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
_display = _this select 0;
|
||||||
|
_control = _display displayCtrl 1;
|
||||||
|
|
||||||
|
private ["_wheelState", "_wheelStateAdd"];
|
||||||
|
|
||||||
|
_wheelState = GVAR(wheelState);
|
||||||
|
_wheelStateAdd = ((round GVAR(windHead) * 2) min 5) max -5;
|
||||||
|
|
||||||
|
_wheelState = _wheelState + _wheelStateAdd;
|
||||||
|
|
||||||
|
if (_wheelState < 0) then {_wheelState = _wheelState + 9};
|
||||||
|
if (_wheelState > 9) then {_wheelState = _wheelState - 9};
|
||||||
|
|
||||||
|
GVAR(wheelState) = _wheelState;
|
||||||
|
|
||||||
|
if (preloadTitleRsc ["ACE_Kestrel_Preload", "PLAIN"]) then {
|
||||||
|
|
||||||
|
private "_brightness";
|
||||||
|
_brightness = call EFUNC(common,ambientBrightness);
|
||||||
|
|
||||||
|
_control ctrlSetText format [QUOTE(PATHTOF(data\kestrel_%1.paa)), _rad1];
|
||||||
|
_control ctrlSetTextColor [_brightness, _brightness, _brightness, 1];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!GVAR(isKestrelWheel)) exitWith {
|
||||||
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
}, 0.01, _this select 0] call CBA_fnc_addPerFrameHandler;
|
8
addons/kestrel/functions/fnc_openKestrel.sqf
Normal file
8
addons/kestrel/functions/fnc_openKestrel.sqf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// by commy2
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
GVAR(isKestrel) = true;
|
||||||
|
GVAR(isKestrelWheel) = true;
|
||||||
|
|
||||||
|
(["ACE_KestrelWheel"] call BIS_fnc_rscLayer) cutRsc ["ACE_KestrelWheel", "PLAIN", 0, false];
|
||||||
|
(["ACE_Kestrel"] call BIS_fnc_rscLayer) cutRsc ["ACE_Kestrel", "PLAIN", 0, false];
|
1
addons/kestrel/functions/script_component.hpp
Normal file
1
addons/kestrel/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "\z\ace\addons\kestrel\script_component.hpp"
|
BIN
addons/kestrel/kestrel4500.p3d
Normal file
BIN
addons/kestrel/kestrel4500.p3d
Normal file
Binary file not shown.
BIN
addons/kestrel/kestrel4500rad.p3d
Normal file
BIN
addons/kestrel/kestrel4500rad.p3d
Normal file
Binary file not shown.
12
addons/kestrel/script_component.hpp
Normal file
12
addons/kestrel/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define COMPONENT kestrel
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_KESTREL
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_KESTREL
|
||||||
|
#define DEBUG_SETTINGS DEBUG_ENABLED_KESTREL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
64
addons/kestrel/stringtable.xml
Normal file
64
addons/kestrel/stringtable.xml
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Edited with tabler - 2014-12-11 -->
|
||||||
|
<Project name="ACE">
|
||||||
|
<Package name="Wind">
|
||||||
|
<Key ID="STR_ACE_Wind_ApproximateTemp">
|
||||||
|
<English>Approximate Temperature</English>
|
||||||
|
<German>Ungefähre Temperatur</German>
|
||||||
|
<Spanish>Temperatura aproximada</Spanish>
|
||||||
|
<French>Estimer la température</French>
|
||||||
|
<Polish>Przybliżona temperatura</Polish>
|
||||||
|
<Czech>Odhadovaná teplota</Czech>
|
||||||
|
<Hungarian>Hőmérséklet nagyábol</Hungarian>
|
||||||
|
<Russian>Примерная температура </Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Kestrel_Name">
|
||||||
|
<English>Kestrel 4500NV</English>
|
||||||
|
<German>Kestrel 4500NV</German>
|
||||||
|
<Spanish>Kestrel 4500NV</Spanish>
|
||||||
|
<French>Kestrel 4500NV</French>
|
||||||
|
<Polish>Kestrel 4500NV</Polish>
|
||||||
|
<Czech>Kestrel 4500NV</Czech>
|
||||||
|
<Italian>Kestrel 4500NV</Italian>
|
||||||
|
<Hungarian>Kestrel 4500NV</Hungarian>
|
||||||
|
<Portuguese>Kestrel 4500NV</Portuguese>
|
||||||
|
<Russian>Kestrel 4500NV</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Kestrel_Description">
|
||||||
|
<English>Applied Ballistics Meter</English>
|
||||||
|
<German>Applied Ballistics Meter</German>
|
||||||
|
<Spanish>Anemómetro balístico</Spanish>
|
||||||
|
<French>Applied Ballistics Meter</French>
|
||||||
|
<Polish>Urządzenie do monitorowania pogody</Polish>
|
||||||
|
<Czech>Zařízení pro měření vítru</Czech>
|
||||||
|
<Italian>Monitoraggio Balistico Attivo</Italian>
|
||||||
|
<Hungarian>Applied Ballistics Meter</Hungarian>
|
||||||
|
<Portuguese>Medidor Balístico Ativo</Portuguese>
|
||||||
|
<Russian>метеостанция</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Wind_OpenKestrel">
|
||||||
|
<English>Open Kestrel</English>
|
||||||
|
<German>Kestrel öffnen</German>
|
||||||
|
<Spanish>Abrir Kestrel</Spanish>
|
||||||
|
<French>Ouvrir Kestrel</French>
|
||||||
|
<Polish>Otwórz Kestrel</Polish>
|
||||||
|
<Czech>Otevřít Kestrel</Czech>
|
||||||
|
<Portuguese>Abrir Kestrel</Portuguese>
|
||||||
|
<Italian>Apri Kestrel</Italian>
|
||||||
|
<Hungarian>Kestrel bekapcsolása</Hungarian>
|
||||||
|
<Russian>Открыть Kestrel</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Wind_CloseKestrel">
|
||||||
|
<English>Close Kestrel</English>
|
||||||
|
<German>Kestrel schließen</German>
|
||||||
|
<Spanish>Cerrar Kestrel</Spanish>
|
||||||
|
<French>Fermer Kestrel</French>
|
||||||
|
<Polish>Zamknij Kestrel</Polish>
|
||||||
|
<Czech>Zavřít Kestrel</Czech>
|
||||||
|
<Portuguese>Fechar Kestrel</Portuguese>
|
||||||
|
<Italian>Chiudi Kestrel</Italian>
|
||||||
|
<Hungarian>Kestrel kikapcsolása</Hungarian>
|
||||||
|
<Russian>Закрыть Kestrel</Russian>
|
||||||
|
</Key>
|
||||||
|
</Package>
|
||||||
|
</Project>
|
BIN
addons/kestrel/ui/WindLight-01.paa
Normal file
BIN
addons/kestrel/ui/WindLight-01.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-02.paa
Normal file
BIN
addons/kestrel/ui/WindLight-02.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-03.paa
Normal file
BIN
addons/kestrel/ui/WindLight-03.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-04.paa
Normal file
BIN
addons/kestrel/ui/WindLight-04.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-05.paa
Normal file
BIN
addons/kestrel/ui/WindLight-05.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-06.paa
Normal file
BIN
addons/kestrel/ui/WindLight-06.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-07.paa
Normal file
BIN
addons/kestrel/ui/WindLight-07.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-08.paa
Normal file
BIN
addons/kestrel/ui/WindLight-08.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-09.paa
Normal file
BIN
addons/kestrel/ui/WindLight-09.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-10.paa
Normal file
BIN
addons/kestrel/ui/WindLight-10.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-11.paa
Normal file
BIN
addons/kestrel/ui/WindLight-11.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-12.paa
Normal file
BIN
addons/kestrel/ui/WindLight-12.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-13.paa
Normal file
BIN
addons/kestrel/ui/WindLight-13.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-14.paa
Normal file
BIN
addons/kestrel/ui/WindLight-14.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-15.paa
Normal file
BIN
addons/kestrel/ui/WindLight-15.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindLight-16.paa
Normal file
BIN
addons/kestrel/ui/WindLight-16.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-01.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-01.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-02.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-02.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-03.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-03.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-04.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-04.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-05.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-05.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-06.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-06.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-07.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-07.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-08.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-08.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-09.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-09.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-10.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-10.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-11.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-11.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-12.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-12.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-13.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-13.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-14.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-14.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-15.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-15.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindModerate-16.paa
Normal file
BIN
addons/kestrel/ui/WindModerate-16.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-01.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-01.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-02.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-02.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-03.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-03.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-04.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-04.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-05.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-05.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-06.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-06.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-07.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-07.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-08.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-08.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-09.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-09.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-10.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-10.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-11.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-11.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-12.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-12.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-13.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-13.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-14.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-14.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-15.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-15.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindStrong-16.paa
Normal file
BIN
addons/kestrel/ui/WindStrong-16.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-01.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-01.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-02.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-02.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-03.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-03.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-04.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-04.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-05.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-05.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-06.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-06.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-07.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-07.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-08.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-08.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-09.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-09.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-10.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-10.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-11.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-11.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-12.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-12.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-13.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-13.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-14.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-14.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-15.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-15.paa
Normal file
Binary file not shown.
BIN
addons/kestrel/ui/WindVeryLight-16.paa
Normal file
BIN
addons/kestrel/ui/WindVeryLight-16.paa
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user