mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
try to port that vector
This commit is contained in:
parent
ece2456773
commit
5636721717
@ -1,353 +0,0 @@
|
||||
class CfgPatches {
|
||||
class AGM_Vector {
|
||||
units[] = {"AGM_Item_Vector"};
|
||||
weapons[] = {"AGM_Vector"};
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = {AGM_Core};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"Ghost", "Hamburger SV", "commy2", "bux578"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Vector {
|
||||
class AGM_Vector {
|
||||
file = "AGM_Vector\functions";
|
||||
class abort;
|
||||
class config;
|
||||
class convertDegree;
|
||||
class convertDistance;
|
||||
class convertFOS;
|
||||
class getDirection;
|
||||
class getDistance;
|
||||
class modeAzimuth;
|
||||
class modeAzimuthInclination;
|
||||
class modeDistance;
|
||||
class modeDistanceAzimuth;
|
||||
class modeDistanceHeight;
|
||||
class modeFallOfShort;
|
||||
class modeRelativeAzimuthDistance;
|
||||
class modeRelativeDistance;
|
||||
class modeRelativeDistanceHeight;
|
||||
class settings;
|
||||
class tabAzimuthKey;
|
||||
class tabDistanceKey;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_Vector {
|
||||
clientInit = "call compile preprocessFileLineNumbers '\AGM_Vector\clientInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Core_Default_Keys {
|
||||
class vectorAzimuth {
|
||||
displayName = "$STR_AGM_Vector_AzimuthKey";
|
||||
condition = "currentWeapon player == 'AGM_Vector' && {_vehicle == player} && {cameraView == 'Gunner'}";
|
||||
statement = "AGM_vectorKey set [0, true]; if (AGM_isVectorReady) then {AGM_isVectorReady = false; AGM_Vector_scriptHandle = 0 spawn AGM_Vector_fnc_tabAzimuthKey; 0 spawn AGM_Vector_fnc_abort;};";
|
||||
conditionUp = "true";
|
||||
statementUp = "AGM_vectorKey set [0, false];";
|
||||
key = 15;
|
||||
shift = 0;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
class vectorDistance {
|
||||
displayName = "$STR_AGM_Vector_DistanceKey";
|
||||
condition = "currentWeapon player == 'AGM_Vector' && {_vehicle == player} && {cameraView == 'Gunner'}";
|
||||
statement = "AGM_vectorKey set [1, true]; if (AGM_isVectorReady) then {AGM_isVectorReady = false; AGM_Vector_scriptHandle = 0 spawn AGM_Vector_fnc_tabDistanceKey; 0 spawn AGM_Vector_fnc_abort;};";
|
||||
conditionUp = "true";
|
||||
statementUp = "AGM_vectorKey set [1, false];";
|
||||
key = 19;
|
||||
shift = 0;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class Binocular;
|
||||
class AGM_Vector: Binocular {
|
||||
author = "$STR_AGM_Core_AGMTeam";
|
||||
displayName = "$STR_AGM_Vector_VectorName";
|
||||
descriptionShort = "$STR_AGM_Vector_VectorDescription";
|
||||
model = "\AGM_Vector\agm_vector.p3d";
|
||||
modelOptics = "\AGM_Vector\agm_vector_optics.p3d";
|
||||
picture = "\AGM_Vector\UI\agm_vector_x_ca.paa";
|
||||
visionMode[] = {"Normal","NVG"};
|
||||
opticsZoomMax = 0.03;
|
||||
opticsZoomMin = 0.03;
|
||||
weaponInfoType = "AGM_RscOptics_vector";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Item_Base_F;
|
||||
class AGM_Item_Vector: Item_Base_F {
|
||||
author = "Ghost, Hamburger SV";
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = "$STR_AGM_Vector_VectorName";
|
||||
vehicleClass = "Items";
|
||||
class TransportWeapons {
|
||||
class AGM_Vector {
|
||||
weapon = "AGM_Vector";
|
||||
count = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class AGM_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportWeapons {
|
||||
class _xx_AGM_Vector {
|
||||
weapon = "AGM_Vector";
|
||||
count = 6;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Rsc_Display_Base;
|
||||
class AGM_Rsc_Control_Base;
|
||||
class RSCText;
|
||||
|
||||
class RscInGameUI {
|
||||
class AGM_RscOptics_vector: AGM_Rsc_Display_Base {
|
||||
idd = -1;
|
||||
onLoad = "uiNamespace setVariable ['AGM_dlgVectorOptics', _this select 0];";
|
||||
controls[] = {"CA_Distance","CA_Heading","CA_OpticsPitch"};
|
||||
|
||||
class CA_Distance: RSCText {
|
||||
idc = 151; // distance
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
class CA_Heading: RSCText {
|
||||
idc = 156; // azimuth
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
class CA_OpticsPitch: RSCText {
|
||||
idc = 182; // inclination
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RscTitles {
|
||||
class AGM_Vector : AGM_Rsc_Display_Base {
|
||||
name = "AGM_Vector";
|
||||
onLoad = "uiNamespace setVariable ['AGM_dlgVector', _this select 0];";
|
||||
controls[] = {"Vector_Center", "Vector_Crosshair", "Digit0", "Digit1", "Digit2", "Digit3", "Digit4", "Digit5", "Digit6", "Digit7", "Digit8", "Digit9", "DigitE1", "DigitE2", "DigitE3", "DigitE4"};
|
||||
|
||||
class Vector_Center : AGM_Rsc_Control_Base {
|
||||
idc = 1;
|
||||
colorText[] = {1, 0, 0, 0.5};
|
||||
x = 0.488 * safezoneW + safezoneX;
|
||||
y = 0.4783 * safezoneH + safezoneY;
|
||||
w = 0.4 / 16 * safezoneW;
|
||||
h = 0.4 / 9 * safezoneH;
|
||||
};
|
||||
|
||||
class Vector_Crosshair : Vector_Center {
|
||||
idc = 2;
|
||||
x = 0.4848 * safezoneW + safezoneX;
|
||||
y = 0.4732 * safezoneH + safezoneY;
|
||||
w = 0.5 / 16 * safezoneW;
|
||||
h = 0.5 / 9 * safezoneH;
|
||||
};
|
||||
|
||||
class Digit0 : Vector_Center {
|
||||
idc = 10;
|
||||
x = (0.54 + 0 * 0.02) * safezoneW + safezoneX;
|
||||
y = 0.54 * safezoneH + safezoneY;
|
||||
w = 0.5 / 16 * safezoneW;
|
||||
h = 0.5 / 9 * safezoneH;
|
||||
};
|
||||
|
||||
class Digit1 : Digit0 {
|
||||
idc = 11;
|
||||
x = (0.54 + 1 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit2 : Digit0 {
|
||||
idc = 12;
|
||||
x = (0.54 + 2 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit3 : Digit0 {
|
||||
idc = 13;
|
||||
x = (0.54 + 3 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit4 : Digit0 {
|
||||
idc = 14;
|
||||
x = (0.54 + 4 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit5 : Digit0 {
|
||||
idc = 15;
|
||||
x = (0.35 + 0 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit6 : Digit0 {
|
||||
idc = 16;
|
||||
x = (0.35 + 1 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit7 : Digit0 {
|
||||
idc = 17;
|
||||
x = (0.35 + 2 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit8 : Digit0 {
|
||||
idc = 18;
|
||||
x = (0.35 + 3 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class Digit9 : Digit0 {
|
||||
idc = 19;
|
||||
x = (0.35 + 4 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class DigitE1 : Digit0 {
|
||||
idc = 21;
|
||||
x = (0.39 + 0 * 0.02) * safezoneW + safezoneX;
|
||||
y = 0.42 * safezoneH + safezoneY;
|
||||
};
|
||||
|
||||
class DigitE2 : DigitE1 {
|
||||
idc = 22;
|
||||
x = (0.39 + 1 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class DigitE3 : DigitE1 {
|
||||
idc = 23;
|
||||
x = (0.39 + 2 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
|
||||
class DigitE4 : DigitE1 {
|
||||
idc = 24;
|
||||
x = (0.39 + 3 * 0.02) * safezoneW + safezoneX;
|
||||
};
|
||||
};
|
||||
|
||||
//PRELOAD
|
||||
class AGM_Digit_Preload : AGM_Rsc_Display_Base {
|
||||
class controlsBackground {
|
||||
class Preload_Center : AGM_Rsc_Control_Base {
|
||||
text = "\AGM_Vector\rsc\Vector_Center.paa";
|
||||
};
|
||||
class Preload_0 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d0.paa";
|
||||
};
|
||||
class Preload_1 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d1.paa";
|
||||
};
|
||||
class Preload_2 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d2.paa";
|
||||
};
|
||||
class Preload_3 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d3.paa";
|
||||
};
|
||||
class Preload_4 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d4.paa";
|
||||
};
|
||||
class Preload_5 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d5.paa";
|
||||
};
|
||||
class Preload_6 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d6.paa";
|
||||
};
|
||||
class Preload_7 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d7.paa";
|
||||
};
|
||||
class Preload_8 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d8.paa";
|
||||
};
|
||||
class Preload_9 : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d9.paa";
|
||||
};
|
||||
class Preload_x : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d+.paa";
|
||||
};
|
||||
class Preload_y : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\d-.paa";
|
||||
};
|
||||
class Preload_A : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dA.paa";
|
||||
};
|
||||
class Preload_b : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\db.paa";
|
||||
};
|
||||
class Preload_C : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dC.paa";
|
||||
};
|
||||
class Preload_d : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dd.paa";
|
||||
};
|
||||
class Preload_E : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dE.paa";
|
||||
};
|
||||
class Preload_F : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dF.paa";
|
||||
};
|
||||
class Preload_G : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dG.paa";
|
||||
};
|
||||
class Preload_i : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\di.paa";
|
||||
};
|
||||
class Preload_L : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dL.paa";
|
||||
};
|
||||
class Preload_n : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dn.paa";
|
||||
};
|
||||
class Preload_o : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\do.paa";
|
||||
};
|
||||
class Preload_oo : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\doo.paa";
|
||||
};
|
||||
class Preload_P : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dP.paa";
|
||||
};
|
||||
class Preload_q : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dq.paa";
|
||||
};
|
||||
class Preload_r : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dr.paa";
|
||||
};
|
||||
class Preload_t : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dt.paa";
|
||||
};
|
||||
class Preload_U : Preload_Center {
|
||||
text = "\AGM_Vector\rsc\dU.paa";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Debug_Crosshair : AGM_Rsc_Display_Base {
|
||||
name = "AGM_Debug_Crosshair";
|
||||
onLoad = "uiNamespace setVariable ['AGM_ctrlDebugCrosshair', (_this select 0) displayCtrl 1];";
|
||||
|
||||
class controlsBackground {
|
||||
class Debug_Crosshair : AGM_Rsc_Control_Base {
|
||||
text = "\AGM_Vector\rsc\debug_crosshair.paa";
|
||||
colorText[] = {1, 0, 0, 0.5};
|
||||
x = 0.490938 * safezoneW + safezoneX;
|
||||
y = 0.4838 * safezoneH + safezoneY;
|
||||
w = 0.3 / 16 * safezoneW;
|
||||
h = 0.3 / 9 * safezoneH;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1 +1 @@
|
||||
z\ace\addons\blank
|
||||
z\ace\addons\ballistics
|
@ -2,12 +2,12 @@
|
||||
#define MACRO_ADDMAGAZINE(MAGAZINE,COUNT) class _xx_##MAGAZINE { \
|
||||
magazine = #MAGAZINE; \
|
||||
count = COUNT; \
|
||||
};
|
||||
}
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
}
|
||||
|
||||
class CfgVehicles {
|
||||
#include <FixUniforms.hpp>
|
||||
|
1
addons/vector/$PBOPREFIX$
Normal file
1
addons/vector/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\vector
|
12
addons/vector/CfgEventHandlers.hpp
Normal file
12
addons/vector/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
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));
|
||||
};
|
||||
};
|
26
addons/vector/CfgVehicles.hpp
Normal file
26
addons/vector/CfgVehicles.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \
|
||||
weapon = #WEAPON; \
|
||||
count = COUNT; \
|
||||
}
|
||||
|
||||
class CfgVehicles {
|
||||
class Item_Base_F;
|
||||
class ACE_Item_Vector: Item_Base_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = "$STR_ACE_Vector_VectorName";
|
||||
vehicleClass = "Items";
|
||||
class TransportWeapons {
|
||||
MACRO_ADDWEAPON(ACE_Vector,1);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportWeapons {
|
||||
MACRO_ADDWEAPON(ACE_Vector,6);
|
||||
};
|
||||
};
|
||||
};
|
16
addons/vector/CfgWeapons.hpp
Normal file
16
addons/vector/CfgWeapons.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
class CfgWeapons {
|
||||
class Binocular;
|
||||
class ACE_Vector: Binocular {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "$STR_ACE_Vector_VectorName";
|
||||
descriptionShort = "$STR_ACE_Vector_VectorDescription";
|
||||
model = PATHTOF(ace_vector.p3d);
|
||||
modelOptics = PATHTOF(ace_vector_optics.p3d);
|
||||
picture = PATHTOF(UI\ace_vector_x_ca.paa);
|
||||
visionMode[] = {"Normal","NVG"};
|
||||
opticsZoomMax = 0.03;
|
||||
opticsZoomMin = 0.03;
|
||||
weaponInfoType = "ACE_RscOptics_vector";
|
||||
};
|
||||
};
|
165
addons/vector/RscInGameUI.hpp
Normal file
165
addons/vector/RscInGameUI.hpp
Normal file
@ -0,0 +1,165 @@
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
|
||||
//class ScrollBar;
|
||||
class RscControlsGroup {
|
||||
class VScrollbar;//: ScrollBar {};
|
||||
class HScrollbar;//: ScrollBar {};
|
||||
};
|
||||
|
||||
class RscInGameUI {
|
||||
class RscUnitInfo;
|
||||
class ACE_RscOptics_vector: RscUnitInfo {
|
||||
onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; uiNamespace setVariable ['ACE_dlgVectorOptics', _this select 0];";
|
||||
onUnload = "[""onUnload"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
|
||||
idd = 300;
|
||||
controls[] = {"CA_Distance","CA_Heading","CA_OpticsPitch","CA_Elev","CA_OpticsZoom","CA_VisionMode","ACE_ScriptedDisplayControlsGroup"};
|
||||
|
||||
class CA_Distance: RscText {
|
||||
idc = 151; // distance
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class CA_Heading: RscText {
|
||||
idc = 156; // azimuth
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class CA_OpticsPitch: RscText {
|
||||
idc = 182; // inclination
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class CA_Elev: RscText {
|
||||
idc = 175; // inclination, more accurate
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class CA_OpticsZoom: RscText {
|
||||
idc = 180; // some kind of zoom
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class CA_VisionMode: RscText {
|
||||
idc = 179; // ???
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
|
||||
class ACE_ScriptedDisplayControlsGroup: RscControlsGroup {
|
||||
idc = 170;
|
||||
x = "SafezoneX";
|
||||
y = "SafezoneY";
|
||||
w = "SafezoneW";
|
||||
h = "SafezoneH";
|
||||
|
||||
class VScrollbar: VScrollbar {
|
||||
width = 0;
|
||||
};
|
||||
|
||||
class HScrollbar: HScrollbar {
|
||||
height = 0;
|
||||
};
|
||||
|
||||
class controls {
|
||||
class Center: RscPicture {
|
||||
idc = 1301;
|
||||
text = "";
|
||||
colorText[] = {1,0,0,0.5};
|
||||
x = 0.488 * safezoneW /*+ safezoneX*/;
|
||||
y = 0.4783 * safezoneH /*+ safezoneY*/;
|
||||
w = 0.4 / 16 * safezoneW;
|
||||
h = 0.4 / 9 * safezoneH;
|
||||
};
|
||||
|
||||
class Crosshair: Center {
|
||||
idc = 1302;
|
||||
x = 0.4848 * safezoneW /*+ safezoneX*/;
|
||||
y = 0.4732 * safezoneH /*+ safezoneY*/;
|
||||
w = 0.5 / 16 * safezoneW;
|
||||
h = 0.5 / 9 * safezoneH;
|
||||
};
|
||||
|
||||
class Digit0: Center {
|
||||
idc = 1310;
|
||||
x = (0.54 + 0 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
y = 0.54 * safezoneH /*+ safezoneY*/;
|
||||
w = 0.5 / 16 * safezoneW;
|
||||
h = 0.5 / 9 * safezoneH;
|
||||
};
|
||||
|
||||
class Digit1: Digit0 {
|
||||
idc = 1311;
|
||||
x = (0.54 + 1 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit2: Digit0 {
|
||||
idc = 1312;
|
||||
x = (0.54 + 2 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit3: Digit0 {
|
||||
idc = 1313;
|
||||
x = (0.54 + 3 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit4: Digit0 {
|
||||
idc = 1314;
|
||||
x = (0.54 + 4 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit5: Digit0 {
|
||||
idc = 1315;
|
||||
x = (0.35 + 0 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit6: Digit0 {
|
||||
idc = 1316;
|
||||
x = (0.35 + 1 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit7: Digit0 {
|
||||
idc = 1317;
|
||||
x = (0.35 + 2 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit8: Digit0 {
|
||||
idc = 1318;
|
||||
x = (0.35 + 3 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class Digit9: Digit0 {
|
||||
idc = 1319;
|
||||
x = (0.35 + 4 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class DigitE1: Digit0 {
|
||||
idc = 1321;
|
||||
x = (0.39 + 0 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
y = 0.42 * safezoneH /*+ safezoneY*/;
|
||||
};
|
||||
|
||||
class DigitE2: DigitE1 {
|
||||
idc = 1322;
|
||||
x = (0.39 + 1 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class DigitE3: DigitE1 {
|
||||
idc = 1323;
|
||||
x = (0.39 + 2 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
|
||||
class DigitE4: DigitE1 {
|
||||
idc = 1324;
|
||||
x = (0.39 + 3 * 0.02) * safezoneW /*+ safezoneX*/;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
// by commy2
|
||||
|
||||
player setVariable ["AGM_cooldownVector", 0, false];
|
||||
/*player setVariable ["AGM_cooldownVector", 0, false];
|
||||
|
||||
AGM_isVectorReady = true;
|
||||
AGM_vectorKey = [false, false];
|
||||
@ -10,4 +10,4 @@ AGM_vectorSettings = [false, false, false, false];
|
||||
0 spawn {
|
||||
waitUntil {preloadTitleRsc ["AGM_Digit_Preload", "PLAIN"]};
|
||||
waitUntil {preloadTitleRsc ["AGM_Debug_Crosshair", "PLAIN"]};
|
||||
};
|
||||
};*/
|
21
addons/vector/XEH_preInit.sqf
Normal file
21
addons/vector/XEH_preInit.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(abort);
|
||||
PREP(config);
|
||||
PREP(convertDegree);
|
||||
PREP(convertDistance);
|
||||
PREP(convertFOS);
|
||||
PREP(getDirection);
|
||||
PREP(getDistance);
|
||||
PREP(modeAzimuth);
|
||||
PREP(modeAzimuthInclination);
|
||||
PREP(modeDistance);
|
||||
PREP(modeDistanceAzimuth);
|
||||
PREP(modeDistanceHeight);
|
||||
PREP(modeFallOfShort);
|
||||
PREP(modeRelativeAzimuthDistance);
|
||||
PREP(modeRelativeDistance);
|
||||
PREP(modeRelativeDistanceHeight);
|
||||
PREP(settings);
|
||||
PREP(tabAzimuthKey);
|
||||
PREP(tabDistanceKey);
|
44
addons/vector/config.cpp
Normal file
44
addons/vector/config.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {"AGM_Item_Vector"};
|
||||
weapons[] = {"AGM_Vector"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Ghost","Hamburger SV","commy2","bux578"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
/*class AGM_Default_Keys {
|
||||
class vectorAzimuth {
|
||||
displayName = "$STR_AGM_Vector_AzimuthKey";
|
||||
condition = "currentWeapon player == 'AGM_Vector' && {_vehicle == player} && {cameraView == 'Gunner'}";
|
||||
statement = "AGM_vectorKey set [0, true]; if (AGM_isVectorReady) then {AGM_isVectorReady = false; AGM_Vector_scriptHandle = 0 spawn AGM_Vector_fnc_tabAzimuthKey; 0 spawn AGM_Vector_fnc_abort;};";
|
||||
conditionUp = "true";
|
||||
statementUp = "AGM_vectorKey set [0, false];";
|
||||
key = 15;
|
||||
shift = 0;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
class vectorDistance {
|
||||
displayName = "$STR_AGM_Vector_DistanceKey";
|
||||
condition = "currentWeapon player == 'AGM_Vector' && {_vehicle == player} && {cameraView == 'Gunner'}";
|
||||
statement = "AGM_vectorKey set [1, true]; if (AGM_isVectorReady) then {AGM_isVectorReady = false; AGM_Vector_scriptHandle = 0 spawn AGM_Vector_fnc_tabDistanceKey; 0 spawn AGM_Vector_fnc_abort;};";
|
||||
conditionUp = "true";
|
||||
statementUp = "AGM_vectorKey set [1, false];";
|
||||
key = 19;
|
||||
shift = 0;
|
||||
control = 0;
|
||||
alt = 0;
|
||||
};
|
||||
};*/
|
||||
|
||||
#include "RscInGameUI.hpp"
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlVectorCrosshair", "_ctrlDigit0", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigit9", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_ctrlDigitE4", "_allControls"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlVectorCrosshair", "_ctrlDigit0", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigit9", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_ctrlDigitE4", "_allControls", "_isReticle", "_isNVG", "_time", "_theCount"];
|
||||
|
@ -4,6 +4,7 @@ this code is property of the ArmA 3 Bundeswehr modification
|
||||
ask us nicely at http://www.bwmod.de/ if you want to re-use any of this script
|
||||
we don't support changed code based on this work
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_number", "_return", "_isNegative", "_digit1", "_digit2", "_digit3", "_digit4"];
|
||||
|
@ -4,6 +4,7 @@ this code is property of the ArmA 3 Bundeswehr modification
|
||||
ask us nicely at http://www.bwmod.de/ if you want to re-use any of this script
|
||||
we don't support changed code based on this work
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_number", "_isNegative", "_digit1", "_digit2", "_digit3", "_digit4"];
|
||||
|
@ -4,6 +4,7 @@ this code is property of the ArmA 3 Bundeswehr modification
|
||||
ask us nicely at http://www.bwmod.de/ if you want to re-use any of this script
|
||||
we don't support changed code based on this work
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_number", "_coordinate", "_isNegative", "_digit0", "_digit1", "_digit2", "_digit3", "_digit4"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_dlgVectorOptics";
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define MIN_DISTANCE 10
|
||||
#define MAX_DISTANCE ([6000, 9000] select (AGM_vectorSettings select 3))
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_exit", "_time"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_exit", "_time", "_direction", "_azimuth", "_inclination", "_digits"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_exit", "_distance", "_digits"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_time", "_direction", "_azimuth", "_exit", "_distance", "_digits"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_direction", "_azimuth", "_exit", "_distance", "_digits", "_inclination", "_height", "_lenght"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigit9", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_directionP2", "_azimuthP2", "_abscissa", "_ordinate", "_applicate", "_distanceP2", "_digits", "_inclinationP2", "_height", "_lenght", "_digits0", "_digits1", "_digits2"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_directionP2", "_azimuthP2", "_distanceP2", "_inclinationP2", "_digits", "_relDirection", "_relDistance", "_relHeight", "_relLenght", "_digits0", "_digits1", "_digits2", "_lenghtP1", "_lenghtP2", "_relAzimuth"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_directionP2", "_azimuthP2", "_distanceP2", "_inclinationP2", "_relDirection", "_relDistance", "_distance", "_digits"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_distanceP1", "_directionP1", "_azimuthP1", "_inclinationP1", "_directionP2", "_azimuthP2", "_distanceP2", "_inclinationP2", "_azimuth", "_inclination", "_height", "_lenght", "_relDirection", "_relDistance", "_distance", "_digits"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_dlgVector", "_ctrlVectorCenter", "_ctrlVectorCrosshair", "_ctrlDigit0", "_ctrlDigit1", "_ctrlDigit2", "_ctrlDigit3", "_ctrlDigit4", "_ctrlDigit5", "_ctrlDigit6", "_ctrlDigit7", "_ctrlDigit8", "_ctrlDigit9", "_ctrlDigitE1", "_ctrlDigitE2", "_ctrlDigitE3", "_ctrlDigitE4", "_isFeet", "_isMil", "_time", "_theCount"];
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define DELAY 0.3
|
||||
|
@ -1,4 +1,5 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define DELAY 0.3
|
||||
|
1
addons/vector/functions/script_component.hpp
Normal file
1
addons/vector/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\vector\script_component.hpp"
|
12
addons/vector/script_component.hpp
Normal file
12
addons/vector/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT vector
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_VECTOR
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_VECTOR
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_VECTOR
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-11 -->
|
||||
<Project name="AGM">
|
||||
<Project name="ACE">
|
||||
<Package name="Vector">
|
||||
<Key ID="STR_AGM_Vector_VectorName">
|
||||
<Key ID="STR_ACE_Vector_VectorName">
|
||||
<English>Vector IV</English>
|
||||
<German>Vector IV</German>
|
||||
<Spanish>Vector IV</Spanish>
|
||||
@ -14,7 +14,7 @@
|
||||
<Portuguese>Vector IV</Portuguese>
|
||||
<Russian>Vector IV</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Vector_VectorDescription">
|
||||
<Key ID="STR_ACE_Vector_VectorDescription">
|
||||
<English>Rangefinder</English>
|
||||
<German>Laserentfernungsmesser</German>
|
||||
<Spanish>Telémetro</Spanish>
|
||||
@ -26,7 +26,7 @@
|
||||
<Portuguese>Telêmetro</Portuguese>
|
||||
<Russian>Дальномер</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Vector_AzimuthKey">
|
||||
<Key ID="STR_ACE_Vector_AzimuthKey">
|
||||
<English>Vector - Azimuth Key</English>
|
||||
<German>Vector - Azimuth-Taste</German>
|
||||
<Spanish>Vector - Tecla de acimut</Spanish>
|
||||
@ -38,7 +38,7 @@
|
||||
<Hungarian>Vector - Irányszög gomb</Hungarian>
|
||||
<Russian>Vector – Азимут</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Vector_DistanceKey">
|
||||
<Key ID="STR_ACE_Vector_DistanceKey">
|
||||
<English>Vector - Distance Key</English>
|
||||
<German>Vector - Entfernungs-Taste</German>
|
||||
<Spanish>Vector - Tecla de distancia</Spanish>
|
@ -1 +1 @@
|
||||
#include "\z\ace\addons\blank_module\script_component.hpp"
|
||||
#include "\z\ace\addons\blank\script_component.hpp"
|
Loading…
Reference in New Issue
Block a user