diff --git a/addons/apl/data/Jezek_kov.rvmat b/addons/apl/data/Jezek_kov.rvmat new file mode 100644 index 0000000000..d2133e6b5a --- /dev/null +++ b/addons/apl/data/Jezek_kov.rvmat @@ -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}; + }; +}; diff --git a/addons/apl/data/barbwire_a_co.paa b/addons/apl/data/barbwire_a_co.paa new file mode 100644 index 0000000000..1809c2c08e Binary files /dev/null and b/addons/apl/data/barbwire_a_co.paa differ diff --git a/addons/apl/data/barbwire_a_nohq.paa b/addons/apl/data/barbwire_a_nohq.paa new file mode 100644 index 0000000000..5612dc460a Binary files /dev/null and b/addons/apl/data/barbwire_a_nohq.paa differ diff --git a/addons/apl/data/barbwire_a_ns.rvmat b/addons/apl/data/barbwire_a_ns.rvmat new file mode 100644 index 0000000000..0a6ad7c316 --- /dev/null +++ b/addons/apl/data/barbwire_a_ns.rvmat @@ -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}; + }; +}; diff --git a/addons/apl/data/jezek_texture_co.paa b/addons/apl/data/jezek_texture_co.paa new file mode 100644 index 0000000000..7b2e16d0e7 Binary files /dev/null and b/addons/apl/data/jezek_texture_co.paa differ diff --git a/addons/apl/data/jezek_texture_nohq.paa b/addons/apl/data/jezek_texture_nohq.paa new file mode 100644 index 0000000000..6a34328e5f Binary files /dev/null and b/addons/apl/data/jezek_texture_nohq.paa differ diff --git a/addons/apl/data/jezek_texture_smdi.paa b/addons/apl/data/jezek_texture_smdi.paa new file mode 100644 index 0000000000..415d98a09f Binary files /dev/null and b/addons/apl/data/jezek_texture_smdi.paa differ diff --git a/addons/apl/data/plech.paa b/addons/apl/data/plech.paa new file mode 100644 index 0000000000..240e1ce03f Binary files /dev/null and b/addons/apl/data/plech.paa differ diff --git a/addons/concertina_wire/$PBOPREFIX$ b/addons/concertina_wire/$PBOPREFIX$ new file mode 100644 index 0000000000..0ca718ad15 --- /dev/null +++ b/addons/concertina_wire/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\concertina_wire \ No newline at end of file diff --git a/addons/concertina_wire/CfgEventHandlers.hpp b/addons/concertina_wire/CfgEventHandlers.hpp new file mode 100644 index 0000000000..026afb4e2d --- /dev/null +++ b/addons/concertina_wire/CfgEventHandlers.hpp @@ -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)); + }; + }; +}; diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp new file mode 100644 index 0000000000..2592bf5b77 --- /dev/null +++ b/addons/concertina_wire/CfgVehicles.hpp @@ -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; + }; +}; diff --git a/addons/concertina_wire/README.md b/addons/concertina_wire/README.md new file mode 100644 index 0000000000..ab62458de9 --- /dev/null +++ b/addons/concertina_wire/README.md @@ -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) \ No newline at end of file diff --git a/addons/concertina_wire/UI/icon_sandbag_ca.paa b/addons/concertina_wire/UI/icon_sandbag_ca.paa new file mode 100644 index 0000000000..5d6ea6d4d9 Binary files /dev/null and b/addons/concertina_wire/UI/icon_sandbag_ca.paa differ diff --git a/addons/concertina_wire/XEH_init.sqf b/addons/concertina_wire/XEH_init.sqf new file mode 100644 index 0000000000..dbce4a9b92 --- /dev/null +++ b/addons/concertina_wire/XEH_init.sqf @@ -0,0 +1,4 @@ +#include "script_component.hpp" + +PARAMS_1(_wire); +_wire addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; \ No newline at end of file diff --git a/addons/concertina_wire/XEH_postInit.sqf b/addons/concertina_wire/XEH_postInit.sqf new file mode 100644 index 0000000000..ff3b5c5167 --- /dev/null +++ b/addons/concertina_wire/XEH_postInit.sqf @@ -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); diff --git a/addons/concertina_wire/XEH_preInit.sqf b/addons/concertina_wire/XEH_preInit.sqf new file mode 100644 index 0000000000..f15feb48bd --- /dev/null +++ b/addons/concertina_wire/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(deploy); +PREP(dismount); +PREP(dismountSuccess); +PREP(handleDamage); +PREP(handleKilled); + +ADDON = true; diff --git a/addons/concertina_wire/config.cpp b/addons/concertina_wire/config.cpp new file mode 100644 index 0000000000..06b7bf5d86 --- /dev/null +++ b/addons/concertina_wire/config.cpp @@ -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" \ No newline at end of file diff --git a/addons/concertina_wire/data/ACE_ConcertinaWire.p3d b/addons/concertina_wire/data/ACE_ConcertinaWire.p3d new file mode 100644 index 0000000000..3e1c9c881c Binary files /dev/null and b/addons/concertina_wire/data/ACE_ConcertinaWire.p3d differ diff --git a/addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d b/addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d new file mode 100644 index 0000000000..24f6ebf0fe Binary files /dev/null and b/addons/concertina_wire/data/ACE_ConcertinaWireCoil.p3d differ diff --git a/addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d b/addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d new file mode 100644 index 0000000000..3af6a40a15 Binary files /dev/null and b/addons/concertina_wire/data/ACE_ConcertinaWireNoGeo.p3d differ diff --git a/addons/concertina_wire/data/model.cfg b/addons/concertina_wire/data/model.cfg new file mode 100644 index 0000000000..20845cfacb --- /dev/null +++ b/addons/concertina_wire/data/model.cfg @@ -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"; + }; + }; + }; +}; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf new file mode 100644 index 0000000000..c30e767266 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -0,0 +1,84 @@ +/* + * Author: Rocko, Ruthberg + * + * Deploys the concertina wire + * + * Arguments: + * 0: wire coil + * 1: unit + * + * 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)]; diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf new file mode 100644 index 0000000000..c9a5d1f9ff --- /dev/null +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -0,0 +1,41 @@ +/* + * Author: Ruthberg + * + * Start dismounting the concertina wire + * + * Arguments: + * 0: wire + * 1: unit + * + * 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); diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf new file mode 100644 index 0000000000..a6e34fe44f --- /dev/null +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -0,0 +1,42 @@ +/* + * Author: Rocko, Ruthberg + * + * Dismounts the concertina wire + * + * Arguments: + * 0: wire + * + * 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; diff --git a/addons/concertina_wire/functions/fnc_handleDamage.sqf b/addons/concertina_wire/functions/fnc_handleDamage.sqf new file mode 100644 index 0000000000..61cd1c4e7c --- /dev/null +++ b/addons/concertina_wire/functions/fnc_handleDamage.sqf @@ -0,0 +1,29 @@ +/* + * Author: Ruthberg + * + * Handles wire damage + * + * Arguments: + * 0: wire + * 1: selectionName + * 2: damage + * 3: source + * 4: projectile + * + * 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 diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf new file mode 100644 index 0000000000..2d2cd7f789 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -0,0 +1,135 @@ +/* + * Author: Rocko + * + * Handles wire and vehicle damage + * + * Arguments: + * 0: wire + * 1: killer (vehicle) + * + * 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 diff --git a/addons/concertina_wire/functions/script_component.hpp b/addons/concertina_wire/functions/script_component.hpp new file mode 100644 index 0000000000..5ec20093ef --- /dev/null +++ b/addons/concertina_wire/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\concertina_wire\script_component.hpp" \ No newline at end of file diff --git a/addons/concertina_wire/script_component.hpp b/addons/concertina_wire/script_component.hpp new file mode 100644 index 0000000000..f3f353f181 --- /dev/null +++ b/addons/concertina_wire/script_component.hpp @@ -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"] diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml new file mode 100644 index 0000000000..0583a9448d --- /dev/null +++ b/addons/concertina_wire/stringtable.xml @@ -0,0 +1,49 @@ + + + + + Concertina Wire + NATO-Draht + Проволочная спираль + Drut kolczasty + Concertina wire + Concertina wire + Ostnatý drát + Concertina wire + Concertina wire + + + Concertina Wire Coil + NATO-Draht Rolle + Проволочная спираль (моток) + Zwój drutu kolczastego + Concertina wire coil + Concertina wire coil + Smyčka ostnatého drátu + Concertina wire coil + Concertina wire coil + + + Dismount Concertina Wire + NATO-Draht abbauen + Демонтировать проволочную спираль + Zwiń drut kolczasty + Dismount Concertina wire + Dismount Concertina wire + Svinout ostnatý drát + Dismount Concertina wire + Dismount Concertina wire + + + Deploy Concertina Wire + NATO-Draht verlegen + Монтировать проволочную спираль + Rozwiń drut kolczasty + Deploy Concertina wire + Deploy Concertina wire + Rozvinout ostnatý drát + Deploy Concertina wire + Deploy Concertina wire + + + \ No newline at end of file diff --git a/addons/dagr/$PBOPREFIX$ b/addons/dagr/$PBOPREFIX$ new file mode 100644 index 0000000000..98e51ae9ea --- /dev/null +++ b/addons/dagr/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\dagr \ No newline at end of file diff --git a/addons/dagr/CfgEventHandlers.hpp b/addons/dagr/CfgEventHandlers.hpp new file mode 100644 index 0000000000..2a05b72298 --- /dev/null +++ b/addons/dagr/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; \ No newline at end of file diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp new file mode 100644 index 0000000000..96b81c15b6 --- /dev/null +++ b/addons/dagr/CfgVehicles.hpp @@ -0,0 +1,49 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(menu) { + displayName = "Configure DAGR"; + condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem)); + statement = QUOTE(call FUNC(menuInit)); + showDisabled = 0; + priority = 0.1; + icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa)); + exceptions[] = {"isNotInside"}; + class GVAR(toggle) { + displayName = "Toggle DAGR"; + condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem)); + statement = QUOTE(call FUNC(toggleOverlay)); + showDisabled = 0; + priority = 0.2; + icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa)); + exceptions[] = {"notOnMap", "isNotInside"}; + }; + }; + }; + }; + }; + + class Item_Base_F; + class ACE_Item_DAGR: Item_Base_F { + author[] = {"Rosuto", "Ruthberg"}; + scope = 2; + scopeCurator = 2; + displayName = "DAGR"; + vehicleClass = "Items"; + class TransportItems { + class ACE_DAGR { + name = "ACE_DAGR"; + count = 1; + }; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_DAGR,6); + }; + }; +}; diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp new file mode 100644 index 0000000000..31b0603ff2 --- /dev/null +++ b/addons/dagr/CfgWeapons.hpp @@ -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; + }; + }; +}; diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp new file mode 100644 index 0000000000..2faeb03879 --- /dev/null +++ b/addons/dagr/Dialog.hpp @@ -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; + }; +}; diff --git a/addons/dagr/README.md b/addons/dagr/README.md new file mode 100644 index 0000000000..33d095dca4 --- /dev/null +++ b/addons/dagr/README.md @@ -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) \ No newline at end of file diff --git a/addons/dagr/RscTitles.hpp b/addons/dagr/RscTitles.hpp new file mode 100644 index 0000000000..8467c70f66 --- /dev/null +++ b/addons/dagr/RscTitles.hpp @@ -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 + }; + }; +}; diff --git a/addons/dagr/UI/DAGR_Button.paa b/addons/dagr/UI/DAGR_Button.paa new file mode 100644 index 0000000000..f81a8cef4a Binary files /dev/null and b/addons/dagr/UI/DAGR_Button.paa differ diff --git a/addons/dagr/UI/DAGR_GPS.paa b/addons/dagr/UI/DAGR_GPS.paa new file mode 100644 index 0000000000..b0e05a5a65 Binary files /dev/null and b/addons/dagr/UI/DAGR_GPS.paa differ diff --git a/addons/dagr/UI/DAGR_GPS_SHOW.paa b/addons/dagr/UI/DAGR_GPS_SHOW.paa new file mode 100644 index 0000000000..71f93e5f01 Binary files /dev/null and b/addons/dagr/UI/DAGR_GPS_SHOW.paa differ diff --git a/addons/dagr/UI/DAGR_Icon.paa b/addons/dagr/UI/DAGR_Icon.paa new file mode 100644 index 0000000000..be4afe7b51 Binary files /dev/null and b/addons/dagr/UI/DAGR_Icon.paa differ diff --git a/addons/dagr/UI/DAGR_MENU.paa b/addons/dagr/UI/DAGR_MENU.paa new file mode 100644 index 0000000000..311e2a607a Binary files /dev/null and b/addons/dagr/UI/DAGR_MENU.paa differ diff --git a/addons/dagr/UI/DAGR_PSelection.paa b/addons/dagr/UI/DAGR_PSelection.paa new file mode 100644 index 0000000000..9e1eb679fa Binary files /dev/null and b/addons/dagr/UI/DAGR_PSelection.paa differ diff --git a/addons/dagr/UI/DAGR_Selection.paa b/addons/dagr/UI/DAGR_Selection.paa new file mode 100644 index 0000000000..16ecf82593 Binary files /dev/null and b/addons/dagr/UI/DAGR_Selection.paa differ diff --git a/addons/dagr/UI/DAGR_Vector.paa b/addons/dagr/UI/DAGR_Vector.paa new file mode 100644 index 0000000000..c414cbd7e7 Binary files /dev/null and b/addons/dagr/UI/DAGR_Vector.paa differ diff --git a/addons/dagr/UI/DAGR_WP.paa b/addons/dagr/UI/DAGR_WP.paa new file mode 100644 index 0000000000..e8e541a36f Binary files /dev/null and b/addons/dagr/UI/DAGR_WP.paa differ diff --git a/addons/dagr/XEH_postInit.sqf b/addons/dagr/XEH_postInit.sqf new file mode 100644 index 0000000000..17fa744074 --- /dev/null +++ b/addons/dagr/XEH_postInit.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" + +#include "initKeybinds.sqf" + +GVAR(outputPFH) = -1; + +GVAR(run) = false; +GVAR(hidden) = true; +GVAR(menuRun) = false; +GVAR(useDegrees) = true; +GVAR(updateInterval) = 0.5; + +GVAR(numWaypoints) = 0; +GVAR(wpString0) = ""; +GVAR(wpString1) = ""; +GVAR(wpString2) = ""; +GVAR(wpString3) = ""; +GVAR(wpString4) = ""; +GVAR(wp0) = 0; +GVAR(wp1) = 0; +GVAR(wp2) = 0; +GVAR(wp3) = 0; +GVAR(wp4) = 0; + +GVAR(displaySelection) = "DATA"; + +GVAR(vectorConnected) = false; +GVAR(noVectorData) = true; +GVAR(vectorGrid) = "00000000"; + +["RangerfinderData", {_this call FUNC(handleRangeFinderData)}] call EFUNC(common,addEventHandler); diff --git a/addons/dagr/XEH_preInit.sqf b/addons/dagr/XEH_preInit.sqf new file mode 100644 index 0000000000..7c61d71775 --- /dev/null +++ b/addons/dagr/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(handleRangeFinderData); +PREP(menuInit); +PREP(outputData); +PREP(outputVector); +PREP(outputWP); +PREP(toggleOverlay); + +ADDON = true; diff --git a/addons/dagr/config.cpp b/addons/dagr/config.cpp new file mode 100644 index 0000000000..9f46660aaa --- /dev/null +++ b/addons/dagr/config.cpp @@ -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" diff --git a/addons/dagr/functions/fnc_handleRangeFinderData.sqf b/addons/dagr/functions/fnc_handleRangeFinderData.sqf new file mode 100644 index 0000000000..59e10a1711 --- /dev/null +++ b/addons/dagr/functions/fnc_handleRangeFinderData.sqf @@ -0,0 +1,30 @@ +/* + * Author: Rosuto, Ruthberg + * Handles incoming data packets from the Vectronix Vector LRF + * + * Arguments: + * 0: Slope distance (Meters) + * 1: Azimuth (Degrees) + * 2: Inclination (Degrees) + * + * 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; +}; diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf new file mode 100644 index 0000000000..ae1eed9a2b --- /dev/null +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -0,0 +1,607 @@ +/* + * Author: Rosuto, Ruthberg + * Creates the DAGR menu dialog + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +#define __dsp (uiNamespace getVariable "DAGR_MENU") +#define __F1 266874 +#define __F2 266875 +#define __F3 266876 +#define __Option0 2668777 +#define __Option1 2668778 +#define __Option2 2668779 +#define __Option3 2668780 +#define __Option4 2668781 +#define __Selection0 2668783 +#define __Selection1 2668784 +#define __Selection2 2668785 +#define __Selection3 2668786 +#define __Selection4 2668787 +#define __mainText 2668782 +#define __PSelection1 2668788 +#define __PSelection2 2668789 +#define __PSelection3 2668790 +#define __PSelection4 2668791 +#define __PSelection5 2668792 +#define __PSelection6 2668793 +#define __PSelection7 2668794 +#define __PSelection8 2668795 + +135471 cutText ["", "PLAIN"]; +closeDialog 0; +createDialog "DAGR_MENU"; + +GVAR(menu) = "main"; +GVAR(selection) = 0; +GVAR(numSelections) = 5; +GVAR(tmpUpdateRate) = GVAR(updateInterval); +GVAR(edit) = false; +GVAR(add) = false; +GVAR(pointer) = 0; +GVAR(digit1) = 0; +GVAR(digit2) = 0; +GVAR(digit3) = 0; +GVAR(digit4) = 0; +GVAR(digit5) = 0; +GVAR(digit6) = 0; +GVAR(digit7) = 0; +GVAR(digit8) = 0; + +GVAR(busy) = false; +GVAR(busyTimer) = 0; + +GVAR(showNoWaypointsFound) = false; +GVAR(showInfoUpdatin) = false; +GVAR(showDeleting) = false; +GVAR(showOutOfSpace) = false; + +GVAR(PWR) = false; +GVAR(menuRun) = true; +[{ + if (!dialog || GVAR(PWR)) exitWith { + closeDialog 266860; + GVAR(menuRun) = false; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + if (GVAR(MENU_B)) then { + GVAR(menu) = "main"; + GVAR(selection) = 0; + GVAR(numSelections) = 5; + }; + + if (!GVAR(add) && !GVAR(edit)) then { + if (GVAR(DOWN)) then { + GVAR(selection) = (GVAR(numSelections) + GVAR(selection) + 1); + }; + if (GVAR(UP)) then { + GVAR(selection) = (GVAR(numSelections) + GVAR(selection) - 1); + }; + GVAR(selection) = if (GVAR(numSelections) > 0) then { GVAR(selection) % GVAR(numSelections) } else { 0 }; + }; + + if (GVAR(LEFT)) then { + GVAR(pointer) = (8 + GVAR(pointer) - 1); + }; + if (GVAR(RIGHT)) then { + GVAR(pointer) = (8 + GVAR(pointer) + 1); + }; + GVAR(pointer) = GVAR(pointer) % 8; + + (__dsp displayCtrl __PSelection1) ctrlSetText ""; + (__dsp displayCtrl __PSelection2) ctrlSetText ""; + (__dsp displayCtrl __PSelection3) ctrlSetText ""; + (__dsp displayCtrl __PSelection4) ctrlSetText ""; + (__dsp displayCtrl __PSelection5) ctrlSetText ""; + (__dsp displayCtrl __PSelection6) ctrlSetText ""; + (__dsp displayCtrl __PSelection7) ctrlSetText ""; + (__dsp displayCtrl __PSelection8) ctrlSetText ""; + + (__dsp displayCtrl __Selection0) ctrlSetText ""; + (__dsp displayCtrl __Selection1) ctrlSetText ""; + (__dsp displayCtrl __Selection2) ctrlSetText ""; + (__dsp displayCtrl __Selection3) ctrlSetText ""; + (__dsp displayCtrl __Selection4) ctrlSetText ""; + + (__dsp displayCtrl __F1) ctrlSetText ""; + (__dsp displayCtrl __F2) ctrlSetText ""; + (__dsp displayCtrl __F3) ctrlSetText ""; + + (__dsp displayCtrl __mainText) ctrlSetText ""; + (__dsp displayCtrl __Option0) ctrlSetText ""; + (__dsp displayCtrl __Option1) ctrlSetText ""; + (__dsp displayCtrl __Option2) ctrlSetText ""; + (__dsp displayCtrl __Option3) ctrlSetText ""; + (__dsp displayCtrl __Option4) ctrlSetText ""; + + switch (GVAR(menu)) do { + case "main": { + if (GVAR(SEL)) then { + switch (GVAR(selection)) do { + case 0: { + GVAR(displaySelection) = "DATA"; + GVAR(vectorConnected) = false; + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data."; + if (ACE_time - GVAR(busyTimer) > 0.5) then { + (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.0) then { + (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.5) then { + (__dsp displayCtrl __mainText) ctrlSetText "Position Acquired"; + }; + if (ACE_time - GVAR(busyTimer) > 3.0) then { + GVAR(busy) = false; + }; + }; + case 1: { + if (GVAR(numWaypoints) < 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "No Waypoints Found"; + if (!GVAR(busy)) then { + GVAR(showNoWaypointsFound) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + } else { + GVAR(menu) = "goto_wp"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0; + }; + }; + case 2: { GVAR(menu) = "wp_list"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0 }; + case 3: { GVAR(menu) = "connect"; GVAR(numSelections) = 1; }; + case 4: { GVAR(menu) = "options"; GVAR(numSelections) = 2; }; + }; + }; + if (GVAR(busy) && GVAR(showNoWaypointsFound)) then { + if (ACE_time - GVAR(busyTimer) > 2) then { + GVAR(showNoWaypointsFound) = false; + GVAR(busy) = false; + }; + }; + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText "DATA VIEW"; + (__dsp displayCtrl __Option1) ctrlSetText "GOTO WP"; + (__dsp displayCtrl __Option2) ctrlSetText "WP LIST"; + (__dsp displayCtrl __Option3) ctrlSetText "CONNECT TO"; + (__dsp displayCtrl __Option4) ctrlSetText "OPTIONS"; + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + }; + case "goto_wp": { + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0); + (__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1); + (__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2); + (__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3); + (__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4); + if (GVAR(numSelections) > 0) then { + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + }; + if (GVAR(SEL)) then { + GVAR(vectorConnected) = false; + GVAR(displaySelection) = "WP"; + switch (GVAR(selection)) do { + case 0: { DAGR_WP_INFO = GVAR(wp0); }; + case 1: { DAGR_WP_INFO = GVAR(wp1); }; + case 2: { DAGR_WP_INFO = GVAR(wp2); }; + case 3: { DAGR_WP_INFO = GVAR(wp3); }; + case 4: { DAGR_WP_INFO = GVAR(wp4); }; + }; + if (!GVAR(busy)) then { + GVAR(showInfoUpdating) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + }; + if (GVAR(busy) && GVAR(showInfoUpdating)) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Update."; + if (ACE_time - GVAR(busyTimer) > 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Update.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Update..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Info Updated"; + }; + if (ACE_time - GVAR(busyTimer) > 2.9) then { + GVAR(showInfoUpdating) = false; + GVAR(busy) = false; + }; + }; + }; + case "wp_list": { + if (!GVAR(add) && !GVAR(edit)) then { + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText GVAR(wpString0); + (__dsp displayCtrl __Option1) ctrlSetText GVAR(wpString1); + (__dsp displayCtrl __Option2) ctrlSetText GVAR(wpString2); + (__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3); + (__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4); + (__dsp displayCtrl __F1) ctrlSetText "Add"; + (__dsp displayCtrl __F2) ctrlSetText "Edit"; + (__dsp displayCtrl __F3) ctrlSetText "Delete"; + if (GVAR(numSelections) > 0) then { + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + }; + if (GVAR(F3) && GVAR(numWaypoints) > 0) then { + if (!GVAR(busy)) then { + switch (GVAR(selection)) do { + case 0: { + GVAR(wpString0) = GVAR(wpString1); + GVAR(wp0) = GVAR(wp1); + GVAR(wpString1) = GVAR(wpString2); + GVAR(wp1) = GVAR(wp2); + GVAR(wpString2) = GVAR(wpString3); + GVAR(wp2) = GVAR(wp3); + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 1: { + GVAR(wpString1) = GVAR(wpString2); + GVAR(wp1) = GVAR(wp2); + GVAR(wpString2) = GVAR(wpString3); + GVAR(wp2) = GVAR(wp3); + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 2: { + GVAR(wpString2) = GVAR(wpString3); + GVAR(wp2) = GVAR(wp3); + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 3: { + GVAR(wpString3) = GVAR(wpString4); + GVAR(wp3) = GVAR(wp4); + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + case 4: { + GVAR(wpString4) = ""; + GVAR(wp4) = ""; + }; + }; + GVAR(numWaypoints) = GVAR(numWaypoints) - 1; + GVAR(numSelections) = GVAR(numWaypoints); + GVAR(showDeleting) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + }; + if (GVAR(busy) && GVAR(showDeleting)) then { + (__dsp displayCtrl __mainText) ctrlSetText "Deleting."; + if (ACE_time - GVAR(busyTimer) > 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "Deleting.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Deleting..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Waypoint Deleted"; + }; + if (ACE_time - GVAR(busyTimer) > 2.9) then { + GVAR(showDeleting) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(F1)) then { + if (GVAR(numWaypoints) == 5) then { + if (!GVAR(busy)) then { + GVAR(showOutOfSpace) = true; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + } else { + GVAR(digit1) = 0; + GVAR(digit2) = 0; + GVAR(digit3) = 0; + GVAR(digit4) = 0; + GVAR(digit5) = 0; + GVAR(digit6) = 0; + GVAR(digit7) = 0; + GVAR(digit8) = 0; + GVAR(pointer) = 0; + GVAR(add) = true; + }; + }; + if (GVAR(busy) && GVAR(showOutOfSpace)) then { + (__dsp displayCtrl __mainText) ctrlSetText "Out of Space"; + if (ACE_time - GVAR(busyTimer) > 2.5) then { + GVAR(showOutOfSpace) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(F2) && GVAR(numWaypoints) > 0) then { + GVAR(pointer) = 0; + GVAR(edit) = true; + GVAR(add) = false; + switch (GVAR(selection)) do { + case 0: { + GVAR(digit1) = floor (GVAR(wp0) / 10000000); + GVAR(digit2) = floor (GVAR(wp0) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp0) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp0) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp0) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp0) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp0) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp0) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 1: { + GVAR(digit1) = floor (GVAR(wp1) / 10000000); + GVAR(digit2) = floor (GVAR(wp1) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp1) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp1) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp1) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp1) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp1) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp1) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 2: { + GVAR(digit1) = floor (GVAR(wp2) / 10000000); + GVAR(digit2) = floor (GVAR(wp2) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp2) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp2) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp2) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp2) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp2) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp2) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 3: { + GVAR(digit1) = floor (GVAR(wp3) / 10000000); + GVAR(digit2) = floor (GVAR(wp3) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp3) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp3) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp3) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp3) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp3) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp3) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + case 4: { + GVAR(digit1) = floor (GVAR(wp4) / 10000000); + GVAR(digit2) = floor (GVAR(wp4) / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor (GVAR(wp4) / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor (GVAR(wp4) / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor (GVAR(wp4) / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor (GVAR(wp4) / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor (GVAR(wp4) / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor (GVAR(wp4) - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + }; + }; + } else { + if (!GVAR(busy)) then { + (__dsp displayCtrl __F1) ctrlSetText "Save"; + (__dsp displayCtrl __F2) ctrlSetText "Vector"; + (__dsp displayCtrl __F3) ctrlSetText "Cancel"; + GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8); + (__dsp displayCtrl __mainText) ctrlSetText GVAR(output); + (__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QUOTE(PATHTOF(UI\DAGR_PSelection.paa)); + }; + if (GVAR(F1)) then { + if (!GVAR(busy)) then { + if (GVAR(add)) then { + switch (GVAR(numWaypoints)) do { + case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); }; + case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); }; + case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); }; + case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); }; + case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); }; + }; + GVAR(numWaypoints) = GVAR(numWaypoints) + 1; + GVAR(numSelections) = GVAR(numWaypoints); + GVAR(selection) = 0; + }; + if (GVAR(edit)) then { + switch (GVAR(selection)) do { + case 0: { GVAR(wpString0) = GVAR(output); GVAR(wp0) = parseNumber GVAR(output); }; + case 1: { GVAR(wpString1) = GVAR(output); GVAR(wp1) = parseNumber GVAR(output); }; + case 2: { GVAR(wpString2) = GVAR(output); GVAR(wp2) = parseNumber GVAR(output); }; + case 3: { GVAR(wpString3) = GVAR(output); GVAR(wp3) = parseNumber GVAR(output); }; + case 4: { GVAR(wpString4) = GVAR(output); GVAR(wp4) = parseNumber GVAR(output); }; + }; + }; + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __F1) ctrlSetText ""; + (__dsp displayCtrl __F2) ctrlSetText ""; + (__dsp displayCtrl __F3) ctrlSetText ""; + (__dsp displayCtrl __mainText) ctrlSetText "Saving."; + if (ACE_time - GVAR(busyTimer) > 1) then { + (__dsp displayCtrl __mainText) ctrlSetText "Saving.."; + }; + if (ACE_time - GVAR(busyTimer) > 1.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Saving..."; + }; + if (ACE_time - GVAR(busyTimer) > 1.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Waypoint Saved"; + }; + if (ACE_time - GVAR(busyTimer) > 2.9) then { + GVAR(edit) = false; + GVAR(add) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(F2)) then { + private ["_grid", "_gridVector"]; + _grid = toArray GVAR(vectorGrid); + _grid deleteAt 4; + _grid = toString _grid; + _gridVector = parseNumber _grid; + GVAR(digit1) = floor(_gridVector / 10000000); + GVAR(digit2) = floor(_gridVector / 1000000 - GVAR(digit1) *10); + GVAR(digit3) = floor(_gridVector / 100000 - GVAR(digit2) * 10 - GVAR(digit1) * 100); + GVAR(digit4) = floor(_gridVector / 10000 - GVAR(digit3) * 10 - GVAR(digit2) * 100 - GVAR(digit1) * 1000); + GVAR(digit5) = floor(_gridVector / 1000 - GVAR(digit4) * 10 - GVAR(digit3) * 100 - GVAR(digit2) * 1000 - GVAR(digit1) * 10000); + GVAR(digit6) = floor(_gridVector / 100 - GVAR(digit5) * 10 - GVAR(digit4) * 100 - GVAR(digit3) * 1000 - GVAR(digit2) * 10000 - GVAR(digit1) * 100000); + GVAR(digit7) = floor(_gridVector / 10- GVAR(digit6) * 10 - GVAR(digit5) * 100 - GVAR(digit4) * 1000 - GVAR(digit3) * 10000 - GVAR(digit2) * 100000 - GVAR(digit1) * 1000000); + GVAR(digit8) = floor(_gridVector - GVAR(digit7) * 10 - GVAR(digit6) * 100 - GVAR(digit5) * 1000 - GVAR(digit4) * 10000 - GVAR(digit3) * 100000 - GVAR(digit2) * 1000000 - GVAR(digit1) * 10000000); + }; + if (GVAR(F3)) then { + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + } else { + (__dsp displayCtrl __F1) ctrlSetText "Save"; + (__dsp displayCtrl __F2) ctrlSetText "Vector"; + (__dsp displayCtrl __F3) ctrlSetText "Cancel"; + GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8); + (__dsp displayCtrl __mainText) ctrlSetText GVAR(output); + }; + if (ACE_time - GVAR(busyTimer) > 0.1) then { + GVAR(add) = false; + GVAR(edit) = false; + GVAR(busy) = false; + }; + }; + if (GVAR(UP)) then { + switch (GVAR(pointer) + 1) do { + case 1: { GVAR(digit1) = (10 + GVAR(digit1) + 1) % 10 }; + case 2: { GVAR(digit2) = (10 + GVAR(digit2) + 1) % 10 }; + case 3: { GVAR(digit3) = (10 + GVAR(digit3) + 1) % 10 }; + case 4: { GVAR(digit4) = (10 + GVAR(digit4) + 1) % 10 }; + case 5: { GVAR(digit5) = (10 + GVAR(digit5) + 1) % 10 }; + case 6: { GVAR(digit6) = (10 + GVAR(digit6) + 1) % 10 }; + case 7: { GVAR(digit7) = (10 + GVAR(digit7) + 1) % 10 }; + case 8: { GVAR(digit8) = (10 + GVAR(digit8) + 1) % 10 }; + }; + }; + if (GVAR(DOWN)) then { + switch (GVAR(pointer) + 1) do { + case 1: { GVAR(digit1) = (10 + GVAR(digit1) - 1) % 10 }; + case 2: { GVAR(digit2) = (10 + GVAR(digit2) - 1) % 10 }; + case 3: { GVAR(digit3) = (10 + GVAR(digit3) - 1) % 10 }; + case 4: { GVAR(digit4) = (10 + GVAR(digit4) - 1) % 10 }; + case 5: { GVAR(digit5) = (10 + GVAR(digit5) - 1) % 10 }; + case 6: { GVAR(digit6) = (10 + GVAR(digit6) - 1) % 10 }; + case 7: { GVAR(digit7) = (10 + GVAR(digit7) - 1) % 10 }; + case 8: { GVAR(digit8) = (10 + GVAR(digit8) - 1) % 10 }; + }; + }; + }; + }; + case "connect": { + if (!GVAR(busy)) then { + (__dsp displayCtrl __Option0) ctrlSetText "Vector 21"; + (__dsp displayCtrl __Selection0) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + }; + if (GVAR(SEL)) then { + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __mainText) ctrlSetText "Connecting."; + if (ACE_time - GVAR(busyTimer) > 0.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Connecting.."; + }; + if (ACE_time - GVAR(busyTimer) > 0.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Connecting..."; + }; + if (ACE_time - GVAR(busyTimer) > 0.6) then { + if (ACE_player hasWeapon "ACE_Vector") then { + GVAR(displaySelection) = "VECTOR"; + (__dsp displayCtrl __mainText) ctrlSetText "Vector Connected"; + GVAR(vectorConnected) = true; + } else { + (__dsp displayCtrl __mainText) ctrlSetText "No Device Found"; + GVAR(vectorConnected) = false; + }; + }; + if (ACE_time - GVAR(busyTimer) > 3.1) then { + GVAR(busy) = false; + if (GVAR(vectorConnected)) then { + GVAR(menu) = "main"; GVAR(numSelections) = 5; + }; + }; + }; + }; + case "options": { + (__dsp displayCtrl __Option0) ctrlSetText "Signal Delay"; + (__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" }); + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + if (GVAR(SEL)) then { + GVAR(vectorConnected) = false; + switch (GVAR(selection)) do { + case 0: { GVAR(menu) = "update_rate"; GVAR(numSelections) = 1; GVAR(tmpUpdateRate) = GVAR(updateInterval); }; + case 1: { GVAR(useDegrees) = !GVAR(useDegrees); }; + }; + } + }; + case "update_rate": { + if (GVAR(F1)) then { + GVAR(updateInterval) = GVAR(tmpUpdateRate); + if (!GVAR(busy)) then { + GVAR(busy) = true; + GVAR(busyTimer) = ACE_time; + }; + (__dsp displayCtrl __mainText) ctrlSetText "Updating."; + if (ACE_time - GVAR(busyTimer) > 0.2) then { + (__dsp displayCtrl __mainText) ctrlSetText "Updating.."; + }; + if (ACE_time - GVAR(busyTimer) > 0.4) then { + (__dsp displayCtrl __mainText) ctrlSetText "Updating..."; + }; + if (ACE_time - GVAR(busyTimer) > 0.6) then { + (__dsp displayCtrl __mainText) ctrlSetText "Update Success"; + }; + if (ACE_time - GVAR(busyTimer) > 2.1) then { + GVAR(busy) = false; + GVAR(menu) = "options"; GVAR(numSelections) = 2; + }; + }; + if (GVAR(F3)) then { + GVAR(menu) = "options"; GVAR(numSelections) = 2; + }; + if (GVAR(DOWN)) then { + GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) - 0.1; + }; + if (GVAR(UP)) then { + GVAR(tmpUpdateRate) = GVAR(tmpUpdateRate) + 0.1; + }; + GVAR(tmpUpdateRate) = 0.1 max GVAR(tmpUpdateRate) min 2.0; + if (!GVAR(busy)) then { + (__dsp displayCtrl __mainText) ctrlSetText (Str(GVAR(tmpUpdateRate) * 1000) + "ms"); + (__dsp displayCtrl __F1) ctrlSetText "Save"; + (__dsp displayCtrl __F3) ctrlSetText "Cancel"; + }; + }; + }; + + if (!GVAR(busy)) then { + GVAR(F3) = false; + GVAR(F2) = false; + GVAR(F1) = false; + GVAR(MENU_B) = false; + GVAR(SEL) = false; + DAGR_NEXT = false; + GVAR(RIGHT) = false; + GVAR(LEFT) = false; + GVAR(UP) = false; + GVAR(DOWN) = false; + GVAR(PWR) = false; + }; +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf new file mode 100644 index 0000000000..ff7429fa0a --- /dev/null +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -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; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf new file mode 100644 index 0000000000..660e678a82 --- /dev/null +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -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]; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf new file mode 100644 index 0000000000..d1fc2a47f2 --- /dev/null +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -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; diff --git a/addons/dagr/functions/fnc_toggleOverlay.sqf b/addons/dagr/functions/fnc_toggleOverlay.sqf new file mode 100644 index 0000000000..b05cb23fe5 --- /dev/null +++ b/addons/dagr/functions/fnc_toggleOverlay.sqf @@ -0,0 +1,50 @@ +/* + * Author: Rosuto, Ruthberg + * Toggles the DAGR overlay + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(run) = !GVAR(run); + +if (GVAR(run)) then { + GVAR(hidden) = true; + [{ + EXPLODE_1_PVT(_this select 0,_vehicle); + if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith { + GVAR(run) = false; + 135471 cutText ["", "PLAIN"]; + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + if (cameraView == "GUNNER") then { + if (!GVAR(hidden)) then { + GVAR(hidden) = true; + 135471 cutText ["", "PLAIN"]; + }; + } else { + if (GVAR(hidden)) then { + GVAR(hidden) = false; + switch (toUpper GVAR(displaySelection)) do { + case "WP" : { + call FUNC(outputWP); + }; + case "VECTOR" : { + call FUNC(outputVector); + }; + case "DATA" : { + call FUNC(outputData); + }; + }; + }; + }; + }, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/dagr/functions/script_component.hpp b/addons/dagr/functions/script_component.hpp new file mode 100644 index 0000000000..18b02deaee --- /dev/null +++ b/addons/dagr/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\dagr\script_component.hpp" \ No newline at end of file diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf new file mode 100644 index 0000000000..a0a1107a08 --- /dev/null +++ b/addons/dagr/initKeybinds.sqf @@ -0,0 +1,30 @@ + +["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false}; + + // Statement + if (!GVAR(menuRun)) then { + [] call FUNC(menuInit); + } else { + GVAR(PWR) = true; // Simulate pressing the power button + }; + true +}, +{false}, +[199, [false, true, false]], false] call cba_fnc_addKeybind; // (CTRL + Home) + +["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR", +{ + // Conditions: canInteract + if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false}; + + // Statement + [] call FUNC(toggleOverlay); + true +}, +{false}, +[199, [false, false, false]], false] call cba_fnc_addKeybind; // (Home) diff --git a/addons/dagr/script_component.hpp b/addons/dagr/script_component.hpp new file mode 100644 index 0000000000..f7a723e533 --- /dev/null +++ b/addons/dagr/script_component.hpp @@ -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) diff --git a/addons/dagr/stringtable.xml b/addons/dagr/stringtable.xml new file mode 100644 index 0000000000..7da844d614 --- /dev/null +++ b/addons/dagr/stringtable.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/addons/huntir/XEH_preInit.sqf b/addons/huntir/XEH_preInit.sqf index 0ae45c1540..7737030571 100644 --- a/addons/huntir/XEH_preInit.sqf +++ b/addons/huntir/XEH_preInit.sqf @@ -3,6 +3,7 @@ ADDON = false; PREP(cam); +PREP(handleDamage); PREP(handleFired); PREP(huntir); PREP(huntirCompass); diff --git a/addons/huntir/data/huntir.p3d b/addons/huntir/data/huntir.p3d index ebf349672e..e9b9147416 100644 Binary files a/addons/huntir/data/huntir.p3d and b/addons/huntir/data/huntir.p3d differ diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index e922b2cbc1..64bf9e37b8 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -125,7 +125,7 @@ GVAR(no_cams) sort true; }; }; - private ["_cam_coord_y", "_cam_coord_x", "_speed", "_cam_time", "_cam_pos"]; + private ["_cam_coord_y", "_cam_coord_x", "_cam_time", "_cam_pos"]; GVAR(logic) setPosATL (GVAR(pos) vectorAdd [0, 0, -5]); GVAR(logic) setDir GVAR(ROTATE); @@ -138,8 +138,7 @@ GVAR(no_cams) sort true; ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]]; ctrlSetText [2, format["%1", GVAR(cur_cam) + 1]]; - _speed = 1 max abs((velocity GVAR(huntIR)) select 2); - _cam_time = ((GVAR(pos) select 2) - 20) / _speed; + _cam_time = ACE_time - (GVAR(huntIR) getVariable [QGVAR(startTime), ACE_time]); ctrlSetText [3, format["%1 s", round(_cam_time)]]; _cam_pos = getPosVisual GVAR(huntIR); _cam_pos = format ["X = %1, Y = %2", round (_cam_pos select 0), round (_cam_pos select 1)]; diff --git a/addons/huntir/functions/fnc_handleDamage.sqf b/addons/huntir/functions/fnc_handleDamage.sqf new file mode 100644 index 0000000000..34772d8a66 --- /dev/null +++ b/addons/huntir/functions/fnc_handleDamage.sqf @@ -0,0 +1,25 @@ +/* + * Author: Ruthberg + * + * Handles huntir damage + * + * Arguments: + * 0: huntir + * 1: selectionName + * 2: damage + * 3: source + * 4: projectile + * + * Return Value: + * Nothing + * + * Return value: + * None + */ +#include "script_component.hpp" + +PARAMS_5(_huntir,_selectionName,_damage,_source,_projectile); + +systemChat format["Selection: %1; Damage: %2", _selectionName, _damage]; + +_damage diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 91367ac864..447d5a4435 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -31,17 +31,21 @@ if (_ammo != "F_HuntIR") exitWith {}; private ["_huntir"]; _huntir = createVehicle ["ACE_HuntIR", _position, [], 0, "FLY"]; _huntir setPosATL _position; + _huntir setVariable [QGVAR(startTime), ACE_time, true]; + // TODO: Edit the .p3d to allow doing the following _huntir getHit "camera"; _huntir getHit "parachute"; + //_huntir addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; [{ EXPLODE_1_PVT(_this select 0,_huntir); - private ["_deltaT"]; if (isNull _huntir) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; if (damage _huntir > 0) then { - _deltaT = ACE_time - (_huntir getVariable [QGVAR(lastTime), ACE_time]); - _huntir setVelocity (velocity _huntir vectorAdd [0, 0, -9.8066 * (damage _huntir) * _deltaT]); - _huntir setVariable [QGVAR(lastTime), ACE_time]; + private ["_velocity"]; + _velocity = velocity _huntir; + _velocity set [2, -1 min -20 * sqrt(damage _huntir)]; + _huntir setVelocity _velocity; + _huntir setVectorUp [0, 0, 1]; }; - }, 0.1, [_huntir]] call CBA_fnc_addPerFrameHandler; - }, [getPosATL _projectile vectorAdd [0, 0, 400]], 5, 0] call EFUNC(common,waitAndExecute); + }, 0, [_huntir]] call CBA_fnc_addPerFrameHandler; + }, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call EFUNC(common,waitAndExecute); }, [_projectile], 5, 0] call EFUNC(common,waitAndExecute); diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 7ee56415bf..da74ddf639 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -23,15 +23,21 @@ private ["_actions"]; _actions = []; { - private ["_unit"]; + private ["_unit", "_icon"]; _unit = _x; if ((_unit != _player) && {(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"}) then { + _icon = switch _unit do { + case (driver _vehicle): { QUOTE(A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa) }; + case (gunner _vehicle): { QUOTE(A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_gunner_ca.paa) }; + case (commander _vehicle): { QUOTE(A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_commander_ca.paa) }; + default { "" }; + }; _actions pushBack [ [ str(_unit), [_unit, true] call EFUNC(common,getName), - "", + _icon, {}, {true}, {_this call FUNC(addPassengerActions);}, diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index c862801f29..9791715aee 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -666,7 +666,7 @@ class CfgVehicles { EGVAR(dragging,dragDirection) = 0; class ACE_Actions { class ACE_MainActions { - displayName = CSTRING(MainAction); + displayName = ECSTRING(interaction,MainAction); distance = 5; condition = QUOTE(true); statement = ""; diff --git a/addons/tacticalladder/$PBOPREFIX$ b/addons/tacticalladder/$PBOPREFIX$ new file mode 100644 index 0000000000..7d7735bb9e --- /dev/null +++ b/addons/tacticalladder/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\tacticalladder \ No newline at end of file diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp new file mode 100644 index 0000000000..737cae5e43 --- /dev/null +++ b/addons/tacticalladder/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + }; +}; diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp new file mode 100644 index 0000000000..07b48a8a3f --- /dev/null +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -0,0 +1,86 @@ + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_TacticalLadders { + displayName = CSTRING(Deploy); + condition = QUOTE((backpack ACE_player) == QUOTE(QUOTE(ACE_TacticalLadder_Pack))); + statement = QUOTE(call FUNC(deployTL)); + exceptions[] = {}; + showDisabled = 1; + priority = 4; + }; + }; + }; + + class Bag_Base; + class ACE_TacticalLadder_Pack: Bag_Base { + scope = 2; + displayName = CSTRING(DisplayName); + descriptionShort = ""; + model = PATHTOF(data\ace_tacticalladder_pack.p3d); + picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa); + maximumLoad = 0; + mass = 50; + }; + + class House; + class ACE_Tactical_Ladder: House { + XEH_ENABLED; + displayName = CSTRING(DisplayName); + class DestructionEffects {}; + model = PATHTOF(data\ace_tacticalladder.p3d); + animated = 1; + autocenter = 0; + featureSize = 12; + ladders[] = {{"start","end"}}; + class AnimationSources { + class rotate { + source = "user"; + animPeriod = 1e-007; + }; + class extract_1 { + source = "user"; + animPeriod = 1e-007; + }; + class extract_2: extract_1 {}; + class extract_3: extract_1 {}; + class extract_4: extract_1 {}; + class extract_5: extract_1 {}; + class extract_6: extract_1 {}; + class extract_7: extract_1 {}; + class extract_8: extract_1 {}; + class extract_9: extract_1 {}; + class extract_10: extract_1 {}; + class extract_11: extract_1 {}; + }; + class ACE_Actions { + class ACE_MainActions { + selection = "roadway"; + distance = 5; + condition = "true"; + class ACE_PickUp { + selection = ""; + displayName = CSTRING(Pickup); + distance = 4; + condition = QUOTE((backpack ACE_player) == ''); + statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickupTL)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + }; + class ACE_Position { + selection = ""; + displayName = CSTRING(Position); + distance = 4; + condition = "true"; + statement = QUOTE([ARR_2(_target,_player)] call FUNC(positionTL)); + showDisabled = 0; + exceptions[] = {}; + priority = 5; + }; + }; + }; + }; +}; diff --git a/addons/tacticalladder/README.md b/addons/tacticalladder/README.md new file mode 100644 index 0000000000..ff6b8ecad3 --- /dev/null +++ b/addons/tacticalladder/README.md @@ -0,0 +1,10 @@ +ace_tacticalladder +=============== + +Adds a packable tactical ladder. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [Ruthberg] (http://github.com/Ulteq) \ No newline at end of file diff --git a/addons/tacticalladder/UI/ace_tactical_ladder_pack_ca.paa b/addons/tacticalladder/UI/ace_tactical_ladder_pack_ca.paa new file mode 100644 index 0000000000..8388a8e605 Binary files /dev/null and b/addons/tacticalladder/UI/ace_tactical_ladder_pack_ca.paa differ diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf new file mode 100644 index 0000000000..f0091ec7fa --- /dev/null +++ b/addons/tacticalladder/XEH_postInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +GVAR(ladder) = objNull; +GVAR(cancelTime) = 0; +GVAR(currentStep) = 3; +GVAR(currentAngle) = 0; + +// Cancel tactical ladder deployment if the interact menu is opened +["interactMenuOpened", { + if ((ACE_time > GVAR(cancelTime)) && !isNull GVAR(ladder)) then { + GVAR(ladder) call FUNC(cancelTLdeploy); + }; +}] call EFUNC(common,addEventHandler); + +[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler); diff --git a/addons/tacticalladder/XEH_preInit.sqf b/addons/tacticalladder/XEH_preInit.sqf new file mode 100644 index 0000000000..e434974c9a --- /dev/null +++ b/addons/tacticalladder/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(cancelTLdeploy); +PREP(confirmTLdeploy); +PREP(deployTL); +PREP(handleScrollWheel); +PREP(pickupTL); +PREP(positionTL); + +ADDON = true; diff --git a/addons/tacticalladder/config.cpp b/addons/tacticalladder/config.cpp new file mode 100644 index 0000000000..2e26593c12 --- /dev/null +++ b/addons/tacticalladder/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"Rocko"}; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/tacticalladder/data/ace_ladder_co.paa b/addons/tacticalladder/data/ace_ladder_co.paa new file mode 100644 index 0000000000..d550108068 Binary files /dev/null and b/addons/tacticalladder/data/ace_ladder_co.paa differ diff --git a/addons/tacticalladder/data/ace_tacticalladder.p3d b/addons/tacticalladder/data/ace_tacticalladder.p3d new file mode 100644 index 0000000000..3126601117 Binary files /dev/null and b/addons/tacticalladder/data/ace_tacticalladder.p3d differ diff --git a/addons/tacticalladder/data/ace_tacticalladder_pack.p3d b/addons/tacticalladder/data/ace_tacticalladder_pack.p3d new file mode 100644 index 0000000000..e7b565ff11 Binary files /dev/null and b/addons/tacticalladder/data/ace_tacticalladder_pack.p3d differ diff --git a/addons/tacticalladder/data/model.cfg b/addons/tacticalladder/data/model.cfg new file mode 100644 index 0000000000..36b9918f2e --- /dev/null +++ b/addons/tacticalladder/data/model.cfg @@ -0,0 +1,137 @@ +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + 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_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"; + }; + }; + }; + class ArmaMan: Default { + htMin=60; + htMax=1800; + afMax=30; + mfMax=0; + mFact=1; + tBody=37; + sections[]= { + "osobnost", + "Head_Injury", + "Body_Injury", + "l_leg_injury", + "l_arm_injury", + "r_arm_injury", + "r_leg_injury", + "injury_body", + "injury_legs", + "injury_hands", + "clan", + "clan_sign", + "Camo", + "CamoB", + "Camo1", + "Camo2", + "personality", + "hl", + "injury_head" + }; + skeletonName="OFP2_ManSkeleton"; + }; + class ace_tacticalladder_pack: ArmaMan { + }; +}; \ No newline at end of file diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf new file mode 100644 index 0000000000..63a97d97e9 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -0,0 +1,32 @@ +/* + * Author: Rocko, Ruthberg + * Cancel tactical ladder deployment + * + * Arguments: + * 0: ladder + * + * Return Value: + * None + * + * Example: + * [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy; + * + * Public: No + */ +#include "script_component.hpp" + +#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] + +PARAMS_1(_ladder); + +detach _ladder; +_ladder animate ["rotate", 0]; +{ + _ladder animate [_x, 0]; +} forEach __ANIMS; + +call EFUNC(interaction,hideMouseHint); +[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); +[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); + +GVAR(ladder) = objNull; diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf new file mode 100644 index 0000000000..93263c6aa0 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -0,0 +1,32 @@ +/* + * Author: Rocko, Ruthberg + * Confirm tactical ladder deployment + * + * Arguments: + * 0: ladder + * + * Return Value: + * Success? + * + * Example: + * [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_ladder); + +private ["_pos1", "_pos2"]; +_pos1 = getPosASL GVAR(ladder); +_pos2 = (GVAR(ladder) modelToWorld (GVAR(ladder) selectionPosition "check2")) call EFUNC(common,positionToASL); +if (lineIntersects [_pos1, _pos2, GVAR(ladder)]) exitWith { false }; + +call EFUNC(interaction,hideMouseHint); +[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); +[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); + +detach _ladder; +GVAR(ladder) = objNull; + +true diff --git a/addons/tacticalladder/functions/fnc_deployTL.sqf b/addons/tacticalladder/functions/fnc_deployTL.sqf new file mode 100644 index 0000000000..7ad135ca90 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_deployTL.sqf @@ -0,0 +1,34 @@ +/* + * Author: Rocko, Ruthberg + * Deploy tactical ladder + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * call ace_tacticalladder_fnc_deployTL; + * + * Public: No + */ +#include "script_component.hpp" + +if ((backpack ACE_player) != "ACE_TacticalLadder_Pack") exitWith {}; + +private ["_pos", "_offset", "_ladder"]; + +removeBackpack ACE_player; + +_pos = ACE_player modelToWorld [0,0,0]; +_offset = if ((ACE_player call CBA_fnc_getUnitAnim select 0) == "prone") then { 1 } else {0.8}; +_pos set [0, (_pos select 0) + (sin (direction ACE_player) * _offset)]; +_pos set [1, (_pos select 1) + (cos (direction ACE_player) * _offset)]; +_pos set [2, [ACE_player] call CBA_fnc_realHeight]; + +_ladder = "ACE_Tactical_Ladder" createVehicle _pos; +_ladder setPos _pos; +_ladder setDir (direction ACE_player); + +ACE_player reveal _ladder; diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..d08cb6e208 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,48 @@ +/* + * Author: Rocko, Ruthberg + * Handles lengthening and tilting of the ladder + * + * Arguments: + * Amount scrolled + * + * Return Value: + * Handled + * + * Example: + * 1 call ace_tacticalladder_fnc_handleScrollWheel; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_scroll); + +if (isNull GVAR(ladder)) exitWith { false }; + +if (GETMVAR(ACE_Modifier,0) == 0) then { + private ["_currentStep"]; + // Lengthening + if (_scroll > 0) then { + _currentStep = GVAR(currentStep); + if (_currentStep == 11) exitWith {}; + _currentStep = _currentStep + 1; + if (GVAR(ladder) animationPhase (format["extract_%1", _currentStep]) == 0) then { + GVAR(ladder) animate [format["extract_%1", _currentStep], 1]; + GVAR(currentStep) = _currentStep; + }; + }; + if (_scroll < 0) then { + _currentStep = GVAR(currentStep); + if (_currentStep == 3) exitWith {}; + if (GVAR(ladder) animationPhase (format["extract_%1", _currentStep]) == 1) then { + GVAR(ladder) animate [format["extract_%1", _currentStep], 0]; + GVAR(currentStep) = _currentStep - 1; + }; + }; +} else { + // Tilting + GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 90; + GVAR(ladder) animate ["rotate", GVAR(currentAngle)]; +}; + +true \ No newline at end of file diff --git a/addons/tacticalladder/functions/fnc_pickupTL.sqf b/addons/tacticalladder/functions/fnc_pickupTL.sqf new file mode 100644 index 0000000000..c603f1feca --- /dev/null +++ b/addons/tacticalladder/functions/fnc_pickupTL.sqf @@ -0,0 +1,26 @@ +/* + * Author: Rocko, Ruthberg + * Pick up tactical ladder + * + * Arguments: + * 0: ladder + * 1: unit + * + * Return Value: + * Success? + * + * Example: + * [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL; + * + * Public: No + */ +#include "script_component.hpp" + +if ((backpack ACE_player) != "") exitWith { false }; + +PARAMS_2(_ladder,_unit); + +deleteVehicle _ladder; +_unit addBackpack "ACE_TacticalLadder_Pack"; + +true diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf new file mode 100644 index 0000000000..103792c851 --- /dev/null +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -0,0 +1,52 @@ +/* + * Author: Rocko, Ruthberg + * Position tactical ladder + * + * Arguments: + * 0: sandbag + * 1: unit + * + * Return Value: + * None + * + * Example: + * [_ladder, _unit] call ace_tacticalladder_fnc_positionTL; + * + * Public: No + */ +#include "script_component.hpp" + +#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] + +PARAMS_2(_ladder,_unit); + +{ + _ladder animate [_x, 0]; +} forEach __ANIMS; + +_unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03"; +_ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of player + +_ladder animate ["rotate", 0]; +{ + _ladder animate [_x, 1]; +} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) + +GVAR(ladder) = _ladder; +GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling +GVAR(currentStep) = 3; +GVAR(currentAngle) = 0; + +[localize LSTRING(Deploy), localize LSTRING(Drop), localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint); + +ACE_player setVariable [QGVAR(Deploy), + [ACE_player, "DefaultAction", + {!isNull GVAR(ladder)}, + {GVAR(ladder) call FUNC(confirmTLdeploy);} +] call EFUNC(common,AddActionEventHandler)]; + +ACE_player setVariable [QGVAR(Cancel), + [ACE_player, "zoomtemp", + {!isNull GVAR(ladder)}, + {GVAR(ladder) call FUNC(cancelTLdeploy);} +] call EFUNC(common,AddActionEventHandler)]; diff --git a/addons/tacticalladder/functions/script_component.hpp b/addons/tacticalladder/functions/script_component.hpp new file mode 100644 index 0000000000..53bdb8be62 --- /dev/null +++ b/addons/tacticalladder/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\tacticalladder\script_component.hpp" \ No newline at end of file diff --git a/addons/tacticalladder/script_component.hpp b/addons/tacticalladder/script_component.hpp new file mode 100644 index 0000000000..9905216ae7 --- /dev/null +++ b/addons/tacticalladder/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT tacticalladder +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_TACTICALLADDER + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_TACTICALLADDER + #define DEBUG_SETTINGS DEBUG_SETTINGS_TACTICALLADDER +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml new file mode 100644 index 0000000000..d9a9e3e761 --- /dev/null +++ b/addons/tacticalladder/stringtable.xml @@ -0,0 +1,64 @@ + + + + + Telescopic Ladder + Teleskopleiter + Телескопическая лестница + Drabina teleskopowa + Telescopic Ladder + Telescopic Ladder + Teleskopický žebřík + Telescopic Ladder + Telescopic Ladder + + + Deploy ladder + Leiter aufbauen + Установить лестницу + Rozłóż drabinę + Deploy ladder + Deploy ladder + Umístit žebřík + Deploy ladder + Deploy ladder + + + Drop ladder + Leiter ablegen + Положить лестницу + Zostaw drabinę + Drop ladder + Drop ladder + Položit žebřík + Drop ladder + Drop ladder + + + Adjust ladder + Leiter einstellen + + + Position ladder + Leiter positionieren + Перенести лестницу + Postaw drabinę + Position ladder + Position ladder + Přemístit žebřík + Position ladder + Position ladder + + + Pickup ladder + Leiter aufnehmen + Взять лестницу + Zabierz drabinę + Pickup ladder + Pickup ladder + Vzít žebřík + Pickup ladder + Pickup ladder + + + \ No newline at end of file diff --git a/documentation/development/setting-up-the-development-environment.md b/documentation/development/setting-up-the-development-environment.md index 9a2880b319..5264760785 100644 --- a/documentation/development/setting-up-the-development-environment.md +++ b/documentation/development/setting-up-the-development-environment.md @@ -17,8 +17,8 @@ This page describes how you can setup your development environment for ACE3, all - A properly setup P-drive - Run ArmA 3 and Arma 3 Tools directly from steam once to install registry entries (and again after every update) - Python 3.x, available [here](http://www.python.org) -- The following Mikero Tools (available [here](https://dev.withsix.com/projects/mikero-pbodll/files)): DePBO, Rapify, MakePBO, PBOProject -- A properly setup PATH variable (containing Python and the Mikero tools) +- The following Mikero Tools (available [here](https://dev.withsix.com/projects/mikero-pbodll/files)): DePBO, DeOgg, Rapify, MakePBO, PBOProject +- A properly setup PATH variable (containing Python ,the Mikero tools and git) ## 2. Why so complicated? diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index d3c9111c09..e2e1efc00e 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -6,74 +6,56 @@ class CfgWeapons class srifle_EBR_F; class launch_O_Titan_F; - class rhs_weap_XM2010_Base_F: Rifle_Base_F - { + class rhs_weap_XM2010_Base_F: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=609.6; }; class arifle_MX_Base_F; - class rhs_weap_m4_Base: arifle_MX_Base_F - { + class rhs_weap_m4_Base: arifle_MX_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; class rhs_weap_m4a1; - class rhs_weap_mk18: rhs_weap_m4a1 - { + class rhs_weap_mk18: rhs_weap_m4a1 { ACE_barrelTwist=177.8; ACE_barrelLength=261.62; }; - class rhs_weap_m16a4: rhs_weap_m4_Base - { + class rhs_weap_m16a4: rhs_weap_m4_Base { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class rhs_M249_base; - class rhs_weap_m249_pip: rhs_M249_base - { - ACE_barrelTwist=177.8; - ACE_barrelLength=414.02; - }; - class weap_m240_base; - class rhs_weap_m240B: weap_m240_base - { + class rhs_weap_m240_base; + class rhs_weap_m240B: rhs_weap_m240_base { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class rhs_weap_m14ebrri: srifle_EBR_F - { + class rhs_weap_m14ebrri: srifle_EBR_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class rhs_weap_sr25: rhs_weap_m14ebrri - { + class rhs_weap_sr25: rhs_weap_m14ebrri { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class rhs_weap_sr25_ec: rhs_weap_sr25 - { + class rhs_weap_sr25_ec: rhs_weap_sr25 { ACE_barrelTwist=285.75; ACE_barrelLength=508.0; }; - class rhs_weap_M590_5RD: Rifle_Base_F - { + class rhs_weap_M590_5RD: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=469.9; }; - class rhs_weap_M590_8RD: rhs_weap_M590_5RD - { + class rhs_weap_M590_8RD: rhs_weap_M590_5RD { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=508.0; }; class hgun_ACPC2_F; - class rhsusf_weap_m1911a1: hgun_ACPC2_F - { + class rhsusf_weap_m1911a1: hgun_ACPC2_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class rhsusf_acc_sniper_base; class rhsusf_acc_LEUPOLDMK4: rhsusf_acc_sniper_base { ACE_ScopeAdjust_Vertical[] = { -4, 30 }; @@ -87,7 +69,6 @@ class CfgWeapons ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; }; - class rhs_weap_fgm148 : launch_O_Titan_F { ace_javelin_enabled = 1; weaponInfoType = "ACE_RscOptics_javelin";