diff --git a/README.md b/README.md index 7bfec88dff..83950e8236 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@

- +

- - ACE version - - - ACE download - - - ACE issues - - - ACE license - + + ACE version + + + ACE download + + + ACE issues + + + ACE license +

Requires the latest version of CBA A3 | BIF thread

diff --git a/addons/wep_dragon/$PBOPREFIX$ b/TO_MERGE/wep_dragon/$PBOPREFIX$ similarity index 100% rename from addons/wep_dragon/$PBOPREFIX$ rename to TO_MERGE/wep_dragon/$PBOPREFIX$ diff --git a/addons/wep_dragon/CfgAmmo.hpp b/TO_MERGE/wep_dragon/CfgAmmo.hpp similarity index 97% rename from addons/wep_dragon/CfgAmmo.hpp rename to TO_MERGE/wep_dragon/CfgAmmo.hpp index 62769fec2b..3798470615 100644 --- a/addons/wep_dragon/CfgAmmo.hpp +++ b/TO_MERGE/wep_dragon/CfgAmmo.hpp @@ -1,77 +1,77 @@ -class CfgAmmo { - class MissileBase; - class ShellBase; - - class ace_m47_dragon_serviceCharge : ShellBase { - hit = 1; - indirectHit = 2; - indirectHitRange = 1; - typicalSpeed = 100; - explosive = 1; - cost = 300; - model = "\ca\weapons\empty"; - airFriction = 0; - timeToLive = 1; - explosionTime = 0.001; - soundFly[] = {"",1,1}; - soundEngine[] = {"",1,4}; - CraterEffects = ""; - explosionEffects = "ace_m47_serviceExplosion"; - hitarmor[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitbuilding[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitconcrete[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitdefault[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitfoliage[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitglass[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitglassarmored[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitgroundhard[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitgroundsoft[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitiron[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitman[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitmetal[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitmetalplate[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitplastic[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitrubber[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - hitwood[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; - sounddefault1[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800}; - sounddefault2[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800}; - sounddefault3[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800}; - soundHit[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject",56.23413,1,1800}; - }; - - class M_47_AT_EP1: MissileBase { - ace_towsmoke = 0; // no trail - six_tracerenable = 0; // can't find it? - ace_guidance_type = "dragon"; - soundFly[] = {"",0,1,0}; - soundEngine[] = {"",0,1,0}; - }; - - class ace_missile_dragon : M_47_AT_EP1 { - model = QUOTE(PATHTOF(models\dragon.p3d)); - maxSpeed = 120; - thrust = 0; - initTime = 0; - thrustTime = 0; - sideAirFriction = 0.025; - explosionEffects = ""; - CraterEffects = ""; - hitarmor[] = {"soundhit", 1}; - hitbuilding[] = {"soundhit", 1}; - hitconcrete[] = {"soundhit", 1}; - hitdefault[] = {"soundhit", 1}; - hitfoliage[] = {"soundhit", 1}; - hitglass[] = {"soundhit", 1}; - hitglassarmored[] = {"soundhit", 1}; - hitgroundhard[] = {"soundhit", 1}; - hitgroundsoft[] = {"soundhit", 1}; - hitiron[] = {"soundhit", 1}; - hitman[] = {"soundhit", 1}; - hitmetal[] = {"soundhit", 1}; - hitmetalplate[] = {"soundhit", 1}; - hitplastic[] = {"soundhit", 1}; - hitrubber[] = {"soundhit", 1}; - hitwood[] = {"soundhit", 1}; - soundhit[] = {"", 0, 1}; - }; +class CfgAmmo { + class MissileBase; + class ShellBase; + + class ace_m47_dragon_serviceCharge : ShellBase { + hit = 1; + indirectHit = 2; + indirectHitRange = 1; + typicalSpeed = 100; + explosive = 1; + cost = 300; + model = "\ca\weapons\empty"; + airFriction = 0; + timeToLive = 1; + explosionTime = 0.001; + soundFly[] = {"",1,1}; + soundEngine[] = {"",1,4}; + CraterEffects = ""; + explosionEffects = "ace_m47_serviceExplosion"; + hitarmor[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitbuilding[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitconcrete[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitdefault[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitfoliage[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitglass[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitglassarmored[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitgroundhard[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitgroundsoft[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitiron[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitman[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitmetal[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitmetalplate[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitplastic[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitrubber[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + hitwood[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33}; + sounddefault1[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800}; + sounddefault2[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800}; + sounddefault3[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800}; + soundHit[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject",56.23413,1,1800}; + }; + + class M_47_AT_EP1: MissileBase { + ace_towsmoke = 0; // no trail + six_tracerenable = 0; // can't find it? + ace_guidance_type = "dragon"; + soundFly[] = {"",0,1,0}; + soundEngine[] = {"",0,1,0}; + }; + + class ace_missile_dragon : M_47_AT_EP1 { + model = QUOTE(PATHTOF(models\dragon.p3d)); + maxSpeed = 120; + thrust = 0; + initTime = 0; + thrustTime = 0; + sideAirFriction = 0.025; + explosionEffects = ""; + CraterEffects = ""; + hitarmor[] = {"soundhit", 1}; + hitbuilding[] = {"soundhit", 1}; + hitconcrete[] = {"soundhit", 1}; + hitdefault[] = {"soundhit", 1}; + hitfoliage[] = {"soundhit", 1}; + hitglass[] = {"soundhit", 1}; + hitglassarmored[] = {"soundhit", 1}; + hitgroundhard[] = {"soundhit", 1}; + hitgroundsoft[] = {"soundhit", 1}; + hitiron[] = {"soundhit", 1}; + hitman[] = {"soundhit", 1}; + hitmetal[] = {"soundhit", 1}; + hitmetalplate[] = {"soundhit", 1}; + hitplastic[] = {"soundhit", 1}; + hitrubber[] = {"soundhit", 1}; + hitwood[] = {"soundhit", 1}; + soundhit[] = {"", 0, 1}; + }; }; \ No newline at end of file diff --git a/addons/wep_dragon/CfgEventhandlers.hpp b/TO_MERGE/wep_dragon/CfgEventhandlers.hpp similarity index 94% rename from addons/wep_dragon/CfgEventhandlers.hpp rename to TO_MERGE/wep_dragon/CfgEventhandlers.hpp index d22d71eb89..9aea97ee1a 100644 --- a/addons/wep_dragon/CfgEventhandlers.hpp +++ b/TO_MERGE/wep_dragon/CfgEventhandlers.hpp @@ -1,11 +1,11 @@ -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_pre_init)); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_post_init)); - }; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_pre_init)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_post_init)); + }; }; \ No newline at end of file diff --git a/addons/wep_dragon/CfgMagazines.hpp b/TO_MERGE/wep_dragon/CfgMagazines.hpp similarity index 94% rename from addons/wep_dragon/CfgMagazines.hpp rename to TO_MERGE/wep_dragon/CfgMagazines.hpp index 8b00f7b2fb..712e0eb4c6 100644 --- a/addons/wep_dragon/CfgMagazines.hpp +++ b/TO_MERGE/wep_dragon/CfgMagazines.hpp @@ -1,7 +1,7 @@ -class CfgMagazines { - class CA_LauncherMagazine; - - class Dragon_EP1: CA_LauncherMagazine { - model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d)); - }; +class CfgMagazines { + class CA_LauncherMagazine; + + class Dragon_EP1: CA_LauncherMagazine { + model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d)); + }; }; \ No newline at end of file diff --git a/addons/wep_dragon/CfgVehicles.hpp b/TO_MERGE/wep_dragon/CfgVehicles.hpp similarity index 95% rename from addons/wep_dragon/CfgVehicles.hpp rename to TO_MERGE/wep_dragon/CfgVehicles.hpp index 1d7d3841a7..65081083f6 100644 --- a/addons/wep_dragon/CfgVehicles.hpp +++ b/TO_MERGE/wep_dragon/CfgVehicles.hpp @@ -1,64 +1,64 @@ -class CfgVehicles { - class LandVehicle; - - class StaticWeapon : LandVehicle { - class Turrets; - }; - - class StaticATWeapon : StaticWeapon { - class Turrets: Turrets { - class MainTurret; - }; - }; - - class ACE_M47_Static_Base : StaticATWeapon { - class Turrets: Turrets { - class MainTurret : MainTurret { - class ViewOptics; - }; - }; - }; - - class ACE_M47_Static: ACE_M47_Static_Base { - scope = 1; // Hide it for now - model = QUOTE(PATHTOF(models\ace_m47_static.p3d)); - displayName = "M47 Dragon"; - class Turrets: Turrets { - class MainTurret: MainTurret { - gunnerAction = "LowKORD_Gunner"; - GVAR(tracker) = "TOWLauncherSingle"; - gunnerOpticsModel = "\ca\Weapons_e\optics_m47"; - weapons[] = {"ACE_M47StaticLauncher"}; - magazines[] = {}; - class ViewOptics : ViewOptics { - initFov = DRAGON_FOV; - minFov = DRAGON_FOV; - maxFov = DRAGON_FOV; - }; - }; - }; - class AnimationSources { - class rest_rotate { - source="user"; - animPeriod=0.00001; - initPhase=-0.35; - maxValue="3.60"; - minValue="-3.60"; - }; - class optic_hide { - source="user"; - animPeriod=0.0001; - initPhase=1; - maxValue="1"; - minValue="0"; - }; - class missile_hide { - source="user"; - animPeriod=0.0001; - initPhase=0; - maxValue="1"; - minValue="0"; - }; - }; - }; +class CfgVehicles { + class LandVehicle; + + class StaticWeapon : LandVehicle { + class Turrets; + }; + + class StaticATWeapon : StaticWeapon { + class Turrets: Turrets { + class MainTurret; + }; + }; + + class ACE_M47_Static_Base : StaticATWeapon { + class Turrets: Turrets { + class MainTurret : MainTurret { + class ViewOptics; + }; + }; + }; + + class ACE_M47_Static: ACE_M47_Static_Base { + scope = 1; // Hide it for now + model = QUOTE(PATHTOF(models\ace_m47_static.p3d)); + displayName = "M47 Dragon"; + class Turrets: Turrets { + class MainTurret: MainTurret { + gunnerAction = "LowKORD_Gunner"; + GVAR(tracker) = "TOWLauncherSingle"; + gunnerOpticsModel = "\ca\Weapons_e\optics_m47"; + weapons[] = {"ACE_M47StaticLauncher"}; + magazines[] = {}; + class ViewOptics : ViewOptics { + initFov = DRAGON_FOV; + minFov = DRAGON_FOV; + maxFov = DRAGON_FOV; + }; + }; + }; + class AnimationSources { + class rest_rotate { + source="user"; + animPeriod=0.00001; + initPhase=-0.35; + maxValue="3.60"; + minValue="-3.60"; + }; + class optic_hide { + source="user"; + animPeriod=0.0001; + initPhase=1; + maxValue="1"; + minValue="0"; + }; + class missile_hide { + source="user"; + animPeriod=0.0001; + initPhase=0; + maxValue="1"; + minValue="0"; + }; + }; + }; }; \ No newline at end of file diff --git a/addons/wep_dragon/CfgWeapons.hpp b/TO_MERGE/wep_dragon/CfgWeapons.hpp similarity index 96% rename from addons/wep_dragon/CfgWeapons.hpp rename to TO_MERGE/wep_dragon/CfgWeapons.hpp index b873219e04..8f16f0d564 100644 --- a/addons/wep_dragon/CfgWeapons.hpp +++ b/TO_MERGE/wep_dragon/CfgWeapons.hpp @@ -1,45 +1,45 @@ -class CfgWeapons { - class Weapon_Bag_Base; - class B_AT_01_weapon_F: Weapon_Bag_Base { - }; - class ACE_M47StaticLauncher: B_AT_01_weapon_F { - displayName = "M47 Dragon"; - canLock = 0; - handAnim[] = {"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\M47.rtm"}; - sound[] = {"Ca\Sounds_E\Weapons_E\M47\M47_1",3.1622777,1,1200}; - drySound[] = {"Ca\Sounds_E\Weapons_E\M47\dry",0.0001,1,10}; - reloadMagazineSound[] = {"Ca\Sounds_E\Weapons_E\M47\rocket_reload",1.0,1,30}; - soundFly[] = {"",3.1622777,1,500}; - initSpeed = 20; - magazines[] = {"Dragon_EP1"}; - reloadTime = 0; - magazineReloadTime = 0; - }; - - class Launcher; - class M47Launcher_EP1: Launcher { - displayName = "M47 Dragon"; - canlock = 0; - model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d)); - picture = QUOTE(PATHTOF(textures\m47_dragon_item_ca.paa)); - }; - class ACE_M47_Daysight: M47Launcher_EP1 { - displayName = $STR_DN_ACE_DRAGONSUP36; // Stay next to tubes in gear dialogs - model = QUOTE(PATHTOF(models\ace_m47_optic.p3d)); - picture = QUOTE(PATHTOF(textures\m47_daysight_item_ca.paa)); - optics = 1; - weaponInfoType = "RscWeaponEmpty"; - modelOptics = "\ca\Weapons_e\optics_m47"; - reloadaction = ""; - showSwitchAction = 1; - useAsBinocular = 1; - uipicture = ""; - descriptionshort = "SU-36/P Daysight"; - ace_disposable = 0; - magazines[] = {}; - type = 4096; - opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"}; - opticsZoomMin = 0.015; - opticsZoomMax = 0.015; - }; +class CfgWeapons { + class Weapon_Bag_Base; + class B_AT_01_weapon_F: Weapon_Bag_Base { + }; + class ACE_M47StaticLauncher: B_AT_01_weapon_F { + displayName = "M47 Dragon"; + canLock = 0; + handAnim[] = {"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\M47.rtm"}; + sound[] = {"Ca\Sounds_E\Weapons_E\M47\M47_1",3.1622777,1,1200}; + drySound[] = {"Ca\Sounds_E\Weapons_E\M47\dry",0.0001,1,10}; + reloadMagazineSound[] = {"Ca\Sounds_E\Weapons_E\M47\rocket_reload",1.0,1,30}; + soundFly[] = {"",3.1622777,1,500}; + initSpeed = 20; + magazines[] = {"Dragon_EP1"}; + reloadTime = 0; + magazineReloadTime = 0; + }; + + class Launcher; + class M47Launcher_EP1: Launcher { + displayName = "M47 Dragon"; + canlock = 0; + model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d)); + picture = QUOTE(PATHTOF(textures\m47_dragon_item_ca.paa)); + }; + class ACE_M47_Daysight: M47Launcher_EP1 { + displayName = $STR_DN_ACE_DRAGONSUP36; // Stay next to tubes in gear dialogs + model = QUOTE(PATHTOF(models\ace_m47_optic.p3d)); + picture = QUOTE(PATHTOF(textures\m47_daysight_item_ca.paa)); + optics = 1; + weaponInfoType = "RscWeaponEmpty"; + modelOptics = "\ca\Weapons_e\optics_m47"; + reloadaction = ""; + showSwitchAction = 1; + useAsBinocular = 1; + uipicture = ""; + descriptionshort = "SU-36/P Daysight"; + ace_disposable = 0; + magazines[] = {}; + type = 4096; + opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"}; + opticsZoomMin = 0.015; + opticsZoomMax = 0.015; + }; }; \ No newline at end of file diff --git a/addons/wep_dragon/README.md b/TO_MERGE/wep_dragon/README.md similarity index 100% rename from addons/wep_dragon/README.md rename to TO_MERGE/wep_dragon/README.md diff --git a/addons/wep_dragon/XEH_post_init.sqf b/TO_MERGE/wep_dragon/XEH_post_init.sqf similarity index 94% rename from addons/wep_dragon/XEH_post_init.sqf rename to TO_MERGE/wep_dragon/XEH_post_init.sqf index 6904ee6c47..a4e4806591 100644 --- a/addons/wep_dragon/XEH_post_init.sqf +++ b/TO_MERGE/wep_dragon/XEH_post_init.sqf @@ -1,3 +1,3 @@ -#include "script_component.hpp" -NO_DEDICATED; - +#include "script_component.hpp" +NO_DEDICATED; + diff --git a/addons/wep_dragon/XEH_pre_init.sqf b/TO_MERGE/wep_dragon/XEH_pre_init.sqf similarity index 94% rename from addons/wep_dragon/XEH_pre_init.sqf rename to TO_MERGE/wep_dragon/XEH_pre_init.sqf index dc30361926..6eccf9d1dd 100644 --- a/addons/wep_dragon/XEH_pre_init.sqf +++ b/TO_MERGE/wep_dragon/XEH_pre_init.sqf @@ -1,2 +1,2 @@ -#include "script_component.hpp" - +#include "script_component.hpp" + diff --git a/addons/wep_dragon/config.cpp b/TO_MERGE/wep_dragon/config.cpp similarity index 90% rename from addons/wep_dragon/config.cpp rename to TO_MERGE/wep_dragon/config.cpp index f654e815c9..00ea7d4a6c 100644 --- a/addons/wep_dragon/config.cpp +++ b/TO_MERGE/wep_dragon/config.cpp @@ -1,17 +1,17 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = { "ACE_M47_Static" }; - weapons[] = { "ACE_M47StaticLauncher", "M47Launcher_EP1", "ACE_M47_Daysight" }; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "ace_main", "ace_common" }; - VERSION_CONFIG; - }; -}; - -#include "CfgEventhandlers.hpp" -#include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" -#include "CfgAmmo.hpp" +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = { "ACE_M47_Static" }; + weapons[] = { "ACE_M47StaticLauncher", "M47Launcher_EP1", "ACE_M47_Daysight" }; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { "ace_main", "ace_common" }; + VERSION_CONFIG; + }; +}; + +#include "CfgEventhandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "CfgAmmo.hpp" #include "CfgMagazines.hpp" \ No newline at end of file diff --git a/addons/wep_dragon/functions/fnc_dragon_fired.sqf b/TO_MERGE/wep_dragon/functions/fnc_dragon_fired.sqf similarity index 97% rename from addons/wep_dragon/functions/fnc_dragon_fired.sqf rename to TO_MERGE/wep_dragon/functions/fnc_dragon_fired.sqf index ff97232aea..1038e64a23 100644 --- a/addons/wep_dragon/functions/fnc_dragon_fired.sqf +++ b/TO_MERGE/wep_dragon/functions/fnc_dragon_fired.sqf @@ -1,135 +1,135 @@ -//fnc_fired.sqf -#include "script_component.hpp" -#define DRAGON_VELOCITY 100 -#define SERVICE_INTERVAL 0.3 -#define DRAGON_SERVICE_COUNT 60 -#define DRAGON_TRIM 1 -#define TRACKINTERVAL 0.025 - -if ((_this select 0) == player || {(gunner (_this select 0)) == player}) then { - if ((typeOf (_this select 6)) == "M_47_AT_EP1") then { - _missile = (_this select 6); - _vel = velocity _missile; - _ppos = getPosASL _missile; - _missile setPosATL [_ppos select 0, _ppos select 1, 5000]; - _unitVec = _vel call ACE_fnc_unitVector; - _spawnPos = [(_ppos select 0) + (_unitVec select 0), (_ppos select 1) + (_unitVec select 1), (_ppos select 2) + (_unitVec select 2)]; - _shell = "ace_missile_dragon" createVehicle _spawnPos; - _this set[6, _shell]; - _shell setPosASL _spawnPos; - - _newVel = [_unitVec, DRAGON_VELOCITY*1.25] call ACE_fnc_vectorMultiply; - _shell setVelocity _newVel; - _shell setVectorDir _unitVec; - _gunner = _this select 0; - //setAccTime 0.2; - - [ - { - _unitVec = (velocity _shell) call ACE_fnc_unitVector; - _polar = _unitVec call CBA_fnc_vect2polar; - _spos = getPosATL _shell; - _ppos = getPosASL _shell; - _screenPos = if (_spos select 2 > _ppos select 2) then {worldToScreen _ppos} else {worldToScreen _spos}; - - if (count _screenPos > 0 && {alive _gunner}) then { - _x = (((_screenPos select 0) - 0.5) max -1) min 1; - _y = (((_screenPos select 1) - 0.45) max -1) min 1; - _m = ((_shell distance _gunner)*0.009); - - //player sideChat format["x: %1, y: %2 m: %3 di: %4 spd: %5", _x*_m, _y*_m*-1, _m, (_shell distance _gunner), (speed _shell)]; - - _yDeg = 2.1; - _xDeg = 1.6; - _difEl = _yDeg*(_y*_m); - _difEl = ((_difEl min _yDeg) max (_yDeg*-1)); - if(_difEl < 0) then { - _difEl = _difEl / 2; - }; - _dir = _xDeg*(_x*_m)*-1; - _dir = ((_dir min _xDeg) max (_xDeg*-1)); - _difDir = (_polar select 1) + _dir; - if (_difDir < 0) then {_difDir = _difDir + 360}; - if (_difDir > 360) then {_difDir = _difDir - 360}; - //drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,0.25]],[0],0.0,2.0,"","",""]; - _firedAdjust = false; - _shellVelocity = velocity _shell; - _speed = (3.6*sqrt((_shellVelocity select 0)^2 + (_shellVelocity select 1)^2 + (_shellVelocity select 2)^2))*0.278; - //hint format["speed: %1\ndistance: %2\ntime: %3", _speed, (_gunner distance _shell), diag_tickTime-_startTime]; - if (diag_tickTime >= _timerCorrect && {_chargeCount > 0}) then { - if ((abs _dir) >= _xDeg/2) then { - _firedAdjust = true; - _difDir = (_polar select 1) + (_dir*0.25); - if (_difDir < 0) then {_difDir = _difDir + 360}; - if (_difDir > 360) then {_difDir = _difDir - 360}; - //player sideChat "CORRECT!"; - _timerCorrect = diag_tickTime+(SERVICE_INTERVAL*2); - _newVel = [DRAGON_VELOCITY, (_difDir), (_polar select 2)+(_difEl*0.25)+DRAGON_TRIM] call CBA_fnc_polar2vect; - _shell setVelocity _newVel; - _shell setVectorDir (_newVel call ACE_fnc_unitVector); - "ace_m47_dragon_serviceCharge" createVehicle (getPos _shell); - _chargeCount = _chargeCount - 1; - }; - }; - - if (!_firedAdjust && {diag_tickTime >= _timer} && {_chargeCount > 0}) then { - _timer = diag_tickTime+SERVICE_INTERVAL; - - _newVel = [DRAGON_VELOCITY, _difDir, (_polar select 2)+(_difEl)+DRAGON_TRIM] call CBA_fnc_polar2vect; - //_newVel = [(velocity _shell), _newVel] call ACE_fnc_vectorAdd; - // if(_difEl > 0) then { - // drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""]; - // } else { - // drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,0,1,1]],[0],0.0,2.0,"","",""]; - // }; - _shell setVelocity _newVel; - _shell setVectorDir (_newVel call ACE_fnc_unitVector); - - // charge FX - _shellCharge = "ace_m47_dragon_serviceCharge" createVehicle _ppos; - _shellCharge setPosASL _ppos; - _chargeCount = _chargeCount - 1; - }; - }; - _missile setPosATL [_ppos select 0, _ppos select 1, 5000]; - _prevTime = diag_tickTime; - }, - [_shell,_gunner,_unitVec,_missile], - 0.0, // delay - { - //init - _shell = _this select 0; - _gunner = _this select 1; - _chargeCount = DRAGON_SERVICE_COUNT; - _timer = diag_tickTime+SERVICE_INTERVAL; - _timerCorrect = _timer; - _originalVec = _this select 2; - _originalPolar = _originalVec call CBA_fnc_vect2polar; - _targetPolar = +_originalPolar; - _startTime = diag_tickTime; - _lastX = 1000; - _lastY = 1000; - // Return original missile at explosion - _missile = _this select 3; - // start from beginning - _prevTime = diag_tickTime - TRACKINTERVAL; - }, - { - // exit - if !(isNull _missile) then { - _missile setVelocity _newVel; - _missile setVectorDir (_newVel call ACE_fnc_unitVector); - _missile setPosASL _ppos; - }; - }, - { - diag_tickTime - _prevTime > TRACKINTERVAL - }, - {!alive _shell}, - [ - "_shell", "_gunner", "_chargeCount", "_timer", "_originalVec", "_originalPolar", "_timerCorrect", "_startTime", "_lastX", "_lastY", - "_missile", "_ppos", "_newVel", "_prevTime" - ] - ] call cba_common_fnc_addPerFrameHandlerLogic; - }; +//fnc_fired.sqf +#include "script_component.hpp" +#define DRAGON_VELOCITY 100 +#define SERVICE_INTERVAL 0.3 +#define DRAGON_SERVICE_COUNT 60 +#define DRAGON_TRIM 1 +#define TRACKINTERVAL 0.025 + +if ((_this select 0) == player || {(gunner (_this select 0)) == player}) then { + if ((typeOf (_this select 6)) == "M_47_AT_EP1") then { + _missile = (_this select 6); + _vel = velocity _missile; + _ppos = getPosASL _missile; + _missile setPosATL [_ppos select 0, _ppos select 1, 5000]; + _unitVec = _vel call ACE_fnc_unitVector; + _spawnPos = [(_ppos select 0) + (_unitVec select 0), (_ppos select 1) + (_unitVec select 1), (_ppos select 2) + (_unitVec select 2)]; + _shell = "ace_missile_dragon" createVehicle _spawnPos; + _this set[6, _shell]; + _shell setPosASL _spawnPos; + + _newVel = [_unitVec, DRAGON_VELOCITY*1.25] call ACE_fnc_vectorMultiply; + _shell setVelocity _newVel; + _shell setVectorDir _unitVec; + _gunner = _this select 0; + //setAccTime 0.2; + + [ + { + _unitVec = (velocity _shell) call ACE_fnc_unitVector; + _polar = _unitVec call CBA_fnc_vect2polar; + _spos = getPosATL _shell; + _ppos = getPosASL _shell; + _screenPos = if (_spos select 2 > _ppos select 2) then {worldToScreen _ppos} else {worldToScreen _spos}; + + if (count _screenPos > 0 && {alive _gunner}) then { + _x = (((_screenPos select 0) - 0.5) max -1) min 1; + _y = (((_screenPos select 1) - 0.45) max -1) min 1; + _m = ((_shell distance _gunner)*0.009); + + //player sideChat format["x: %1, y: %2 m: %3 di: %4 spd: %5", _x*_m, _y*_m*-1, _m, (_shell distance _gunner), (speed _shell)]; + + _yDeg = 2.1; + _xDeg = 1.6; + _difEl = _yDeg*(_y*_m); + _difEl = ((_difEl min _yDeg) max (_yDeg*-1)); + if(_difEl < 0) then { + _difEl = _difEl / 2; + }; + _dir = _xDeg*(_x*_m)*-1; + _dir = ((_dir min _xDeg) max (_xDeg*-1)); + _difDir = (_polar select 1) + _dir; + if (_difDir < 0) then {_difDir = _difDir + 360}; + if (_difDir > 360) then {_difDir = _difDir - 360}; + //drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,0.25]],[0],0.0,2.0,"","",""]; + _firedAdjust = false; + _shellVelocity = velocity _shell; + _speed = (3.6*sqrt((_shellVelocity select 0)^2 + (_shellVelocity select 1)^2 + (_shellVelocity select 2)^2))*0.278; + //hint format["speed: %1\ndistance: %2\ntime: %3", _speed, (_gunner distance _shell), diag_tickTime-_startTime]; + if (diag_tickTime >= _timerCorrect && {_chargeCount > 0}) then { + if ((abs _dir) >= _xDeg/2) then { + _firedAdjust = true; + _difDir = (_polar select 1) + (_dir*0.25); + if (_difDir < 0) then {_difDir = _difDir + 360}; + if (_difDir > 360) then {_difDir = _difDir - 360}; + //player sideChat "CORRECT!"; + _timerCorrect = diag_tickTime+(SERVICE_INTERVAL*2); + _newVel = [DRAGON_VELOCITY, (_difDir), (_polar select 2)+(_difEl*0.25)+DRAGON_TRIM] call CBA_fnc_polar2vect; + _shell setVelocity _newVel; + _shell setVectorDir (_newVel call ACE_fnc_unitVector); + "ace_m47_dragon_serviceCharge" createVehicle (getPos _shell); + _chargeCount = _chargeCount - 1; + }; + }; + + if (!_firedAdjust && {diag_tickTime >= _timer} && {_chargeCount > 0}) then { + _timer = diag_tickTime+SERVICE_INTERVAL; + + _newVel = [DRAGON_VELOCITY, _difDir, (_polar select 2)+(_difEl)+DRAGON_TRIM] call CBA_fnc_polar2vect; + //_newVel = [(velocity _shell), _newVel] call ACE_fnc_vectorAdd; + // if(_difEl > 0) then { + // drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""]; + // } else { + // drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,0,1,1]],[0],0.0,2.0,"","",""]; + // }; + _shell setVelocity _newVel; + _shell setVectorDir (_newVel call ACE_fnc_unitVector); + + // charge FX + _shellCharge = "ace_m47_dragon_serviceCharge" createVehicle _ppos; + _shellCharge setPosASL _ppos; + _chargeCount = _chargeCount - 1; + }; + }; + _missile setPosATL [_ppos select 0, _ppos select 1, 5000]; + _prevTime = diag_tickTime; + }, + [_shell,_gunner,_unitVec,_missile], + 0.0, // delay + { + //init + _shell = _this select 0; + _gunner = _this select 1; + _chargeCount = DRAGON_SERVICE_COUNT; + _timer = diag_tickTime+SERVICE_INTERVAL; + _timerCorrect = _timer; + _originalVec = _this select 2; + _originalPolar = _originalVec call CBA_fnc_vect2polar; + _targetPolar = +_originalPolar; + _startTime = diag_tickTime; + _lastX = 1000; + _lastY = 1000; + // Return original missile at explosion + _missile = _this select 3; + // start from beginning + _prevTime = diag_tickTime - TRACKINTERVAL; + }, + { + // exit + if !(isNull _missile) then { + _missile setVelocity _newVel; + _missile setVectorDir (_newVel call ACE_fnc_unitVector); + _missile setPosASL _ppos; + }; + }, + { + diag_tickTime - _prevTime > TRACKINTERVAL + }, + {!alive _shell}, + [ + "_shell", "_gunner", "_chargeCount", "_timer", "_originalVec", "_originalPolar", "_timerCorrect", "_startTime", "_lastX", "_lastY", + "_missile", "_ppos", "_newVel", "_prevTime" + ] + ] call cba_common_fnc_addPerFrameHandlerLogic; + }; }; \ No newline at end of file diff --git a/addons/wep_dragon/functions/script_component.hpp b/TO_MERGE/wep_dragon/functions/script_component.hpp similarity index 100% rename from addons/wep_dragon/functions/script_component.hpp rename to TO_MERGE/wep_dragon/functions/script_component.hpp diff --git a/addons/wep_dragon/license.txt b/TO_MERGE/wep_dragon/license.txt similarity index 99% rename from addons/wep_dragon/license.txt rename to TO_MERGE/wep_dragon/license.txt index ff5ec3e450..7113bf4340 100644 --- a/addons/wep_dragon/license.txt +++ b/TO_MERGE/wep_dragon/license.txt @@ -1,79 +1,79 @@ -License (short) -=============== - -You are free: -- to Share — to copy, distribute and transmit the work - -Under the following conditions: -- Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). -- Noncommercial — You may not use this work for commercial purposes. -- No Derivative Works — You may not alter, transform, or build upon this work. - -With the understanding that: - -Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. - -Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. - -Other Rights — In no way are any of the following rights affected by the license: - - Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; - - The author's moral rights; - - Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. - -Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. - - -Full license text -================= - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - -1. Definitions - -"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. -"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - -to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, -to Distribute and Publicly Perform the Work including as incorporated in Collections. -The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). - -4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - -You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. -You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. -For the avoidance of doubt: - -Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b). -Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - -This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. -8. Miscellaneous - -Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. +License (short) +=============== + +You are free: +- to Share — to copy, distribute and transmit the work + +Under the following conditions: +- Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). +- Noncommercial — You may not use this work for commercial purposes. +- No Derivative Works — You may not alter, transform, or build upon this work. + +With the understanding that: + +Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. + +Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. + +Other Rights — In no way are any of the following rights affected by the license: + - Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; + - The author's moral rights; + - Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. + +Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. + + +Full license text +================= + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + +"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. +"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. +"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. +"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. +"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. +"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. +"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. +"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. +"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + +to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, +to Distribute and Publicly Perform the Work including as incorporated in Collections. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + +You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. +You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. +If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. +For the avoidance of doubt: + +Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; +Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, +Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b). +Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + +This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. +Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. +8. Miscellaneous + +Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. +If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. +This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. +The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/addons/wep_dragon/model.cfg b/TO_MERGE/wep_dragon/model.cfg similarity index 95% rename from addons/wep_dragon/model.cfg rename to TO_MERGE/wep_dragon/model.cfg index 6aeaf2e95e..7c113bf821 100644 --- a/addons/wep_dragon/model.cfg +++ b/TO_MERGE/wep_dragon/model.cfg @@ -1,96 +1,96 @@ -class CfgSkeletons { - class Default { - isDiscrete = 1; - skeletonInherit = ""; - skeletonBones[] = {}; - }; - - class ace_m47_static_skeleton: Default { - skeletonInherit = "Default"; - skeletonBones[] = { - "bipod","", - "grav_box","bipod", - "launcher","grav_box", - "optic","launcher", - "missile","launcher" - }; - }; -}; - -class CfgModels { - class Default { - sectionsInherit = ""; - sections[] = {}; - }; - - class ace_m47_static: Default { - sectionsInherit = "Default"; - sections[] = {}; - skeletonName = "ace_m47_static_skeleton"; - class Animations { - class MainGun { - type="rotation"; - selection="launcher"; - sourceAddress = "clamp"; - source="MainGun"; - axis="elevate_axis"; - animPeriod=0.01; - initPhase=0; - maxValue="rad 360"; - minValue="rad -360"; - angle1="rad 360"; - angle0="rad -360"; - }; - class MainTurret { - type="rotation"; - source="MainTurret"; - selection="bipod"; - sourceAddress = "loop"; - axis="rotate_axis"; - animPeriod=0.005; - minValue="rad -360"; - maxValue="rad +360"; - angle0="rad -360"; - angle1="rad +360"; - }; - class rest_rotate { - type="rotation"; - selection="grav_box"; - sourceAddress = "clamp"; - source="user"; - axis="elevate_axis"; - animPeriod=0.00001; - initPhase=-0.35; - maxValue="3.60"; - minValue="-3.60"; - angle1="rad -360"; - angle0="rad 360"; - }; - class optic_hide - { - type = "hide"; - source = "user"; - selection = "optic"; - animPeriod = 0.0001; - minValue = 0; - maxValue = 1; - minPhase = 0; - maxPhase = 1; - hideValue = 0.99; - initPhase = 1; - }; - class missile_hide - { - type = "hide"; - source = "user"; - selection = "missile"; - animPeriod = 0.0001; - minValue = 0; - maxValue = 1; - minPhase = 0; - maxPhase = 1; - hideValue = 0.99; - }; - }; - }; -}; +class CfgSkeletons { + class Default { + isDiscrete = 1; + skeletonInherit = ""; + skeletonBones[] = {}; + }; + + class ace_m47_static_skeleton: Default { + skeletonInherit = "Default"; + skeletonBones[] = { + "bipod","", + "grav_box","bipod", + "launcher","grav_box", + "optic","launcher", + "missile","launcher" + }; + }; +}; + +class CfgModels { + class Default { + sectionsInherit = ""; + sections[] = {}; + }; + + class ace_m47_static: Default { + sectionsInherit = "Default"; + sections[] = {}; + skeletonName = "ace_m47_static_skeleton"; + class Animations { + class MainGun { + type="rotation"; + selection="launcher"; + sourceAddress = "clamp"; + source="MainGun"; + axis="elevate_axis"; + animPeriod=0.01; + initPhase=0; + maxValue="rad 360"; + minValue="rad -360"; + angle1="rad 360"; + angle0="rad -360"; + }; + class MainTurret { + type="rotation"; + source="MainTurret"; + selection="bipod"; + sourceAddress = "loop"; + axis="rotate_axis"; + animPeriod=0.005; + minValue="rad -360"; + maxValue="rad +360"; + angle0="rad -360"; + angle1="rad +360"; + }; + class rest_rotate { + type="rotation"; + selection="grav_box"; + sourceAddress = "clamp"; + source="user"; + axis="elevate_axis"; + animPeriod=0.00001; + initPhase=-0.35; + maxValue="3.60"; + minValue="-3.60"; + angle1="rad -360"; + angle0="rad 360"; + }; + class optic_hide + { + type = "hide"; + source = "user"; + selection = "optic"; + animPeriod = 0.0001; + minValue = 0; + maxValue = 1; + minPhase = 0; + maxPhase = 1; + hideValue = 0.99; + initPhase = 1; + }; + class missile_hide + { + type = "hide"; + source = "user"; + selection = "missile"; + animPeriod = 0.0001; + minValue = 0; + maxValue = 1; + minPhase = 0; + maxPhase = 1; + hideValue = 0.99; + }; + }; + }; +}; diff --git a/addons/wep_dragon/models/ace_m47_magazine.p3d b/TO_MERGE/wep_dragon/models/ace_m47_magazine.p3d similarity index 100% rename from addons/wep_dragon/models/ace_m47_magazine.p3d rename to TO_MERGE/wep_dragon/models/ace_m47_magazine.p3d diff --git a/addons/wep_dragon/models/ace_m47_optic.p3d b/TO_MERGE/wep_dragon/models/ace_m47_optic.p3d similarity index 100% rename from addons/wep_dragon/models/ace_m47_optic.p3d rename to TO_MERGE/wep_dragon/models/ace_m47_optic.p3d diff --git a/addons/wep_dragon/models/ace_m47_static.p3d b/TO_MERGE/wep_dragon/models/ace_m47_static.p3d similarity index 100% rename from addons/wep_dragon/models/ace_m47_static.p3d rename to TO_MERGE/wep_dragon/models/ace_m47_static.p3d diff --git a/addons/wep_dragon/models/dragon.p3d b/TO_MERGE/wep_dragon/models/dragon.p3d similarity index 100% rename from addons/wep_dragon/models/dragon.p3d rename to TO_MERGE/wep_dragon/models/dragon.p3d diff --git a/addons/wep_dragon/script_component.hpp b/TO_MERGE/wep_dragon/script_component.hpp similarity index 95% rename from addons/wep_dragon/script_component.hpp rename to TO_MERGE/wep_dragon/script_component.hpp index 1898fac04c..e593c3d367 100644 --- a/addons/wep_dragon/script_component.hpp +++ b/TO_MERGE/wep_dragon/script_component.hpp @@ -1,12 +1,12 @@ -#define COMPONENT wep_dragon -#include "\z\ace\Addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_WEP_DRAGON - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_WEP_DRAGON - #define DEBUG_SETTINGS DEBUG_SETTINGS_WEP_DRAGON -#endif - -#include "\z\ace\Addons\main\script_macros.hpp" +#define COMPONENT wep_dragon +#include "\z\ace\Addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_WEP_DRAGON + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_WEP_DRAGON + #define DEBUG_SETTINGS DEBUG_SETTINGS_WEP_DRAGON +#endif + +#include "\z\ace\Addons\main\script_macros.hpp" diff --git a/addons/wep_dragon/textures/dragon_text.paa b/TO_MERGE/wep_dragon/textures/dragon_text.paa similarity index 100% rename from addons/wep_dragon/textures/dragon_text.paa rename to TO_MERGE/wep_dragon/textures/dragon_text.paa diff --git a/addons/wep_dragon/textures/m47_daysight_item_ca.paa b/TO_MERGE/wep_dragon/textures/m47_daysight_item_ca.paa similarity index 100% rename from addons/wep_dragon/textures/m47_daysight_item_ca.paa rename to TO_MERGE/wep_dragon/textures/m47_daysight_item_ca.paa diff --git a/addons/wep_dragon/textures/m47_dragon_item_ca.paa b/TO_MERGE/wep_dragon/textures/m47_dragon_item_ca.paa similarity index 100% rename from addons/wep_dragon/textures/m47_dragon_item_ca.paa rename to TO_MERGE/wep_dragon/textures/m47_dragon_item_ca.paa diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index 047549dfba..15eca2fb62 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -6,7 +6,7 @@ displayName = "$STR_ACE_Attach_AttachDetach"; \ condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \ statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \ - exceptions[] = {"ACE_Drag_isNotDragging"}; \ + exceptions[] = {"isNotDragging"}; \ showDisabled = 0; \ priority = 0; \ icon = PATHTOF(UI\attach_ca.paa); \ @@ -16,7 +16,7 @@ displayName = "$STR_ACE_Attach_Detach"; \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \ statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \ - exceptions[] = {"ACE_Drag_isNotDragging"}; \ + exceptions[] = {"isNotDragging"}; \ showDisabled = 0; \ priority = 0; \ icon = PATHTOF(UI\detach_ca.paa); \ @@ -57,7 +57,7 @@ class CfgVehicles { displayName = "$STR_ACE_Attach_AttachDetach"; condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach))); statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); ); - exceptions[] = {"ACE_Drag_isNotDragging"}; + exceptions[] = {"isNotDragging"}; showDisabled = 0; priority = 5; icon = PATHTOF(UI\attach_ca.paa); @@ -67,7 +67,7 @@ class CfgVehicles { displayName = "$STR_ACE_Attach_Detach"; condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canDetach))); statement = QUOTE( [ARR_2(_player, _player)] call FUNC(detach) ); - exceptions[] = {"ACE_Drag_isNotDragging"}; + exceptions[] = {"isNotDragging"}; showDisabled = 0; priority = 5; icon = PATHTOF(UI\detach_ca.paa); diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp index dd7e1add3b..e8983cefde 100644 --- a/addons/attach/config.cpp +++ b/addons/attach/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_IR_Strobe_Item"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"}; + author[] = {"KoffeinFlummi","eRazeri","esteldunedain"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 3aa06bacc2..655cac598b 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -1,5 +1,5 @@ /* - * Author: eRazeri and CAA-Picard + * Author: eRazeri and esteldunedain * Attach an item to the unit * * Arguments: diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 8fb9e3cc9c..7b0d82dec1 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -1,5 +1,5 @@ /* - * Author: eRazeri and CAA-Picard + * Author: eRazeri and esteldunedain * Detach an item from a unit * * Arguments: diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp deleted file mode 100644 index 6e11038924..0000000000 --- a/addons/ballistics/CfgAmmo.hpp +++ /dev/null @@ -1,41 +0,0 @@ - -class CfgAmmo { - - /* 6.5x39mm Grendel */ - - class BulletBase; - class B_65x39_Caseless: BulletBase { - typicalSpeed = 724; - airFriction = -0.000915; - }; - - - /* 5.56x45mm NATO */ - - class B_556x45_Ball: BulletBase { - typicalSpeed = 911; - airFriction = -0.001335; - }; - - - /* 7.62x51mm NATO */ - - class B_762x51_Ball: BulletBase { - typicalSpeed = 853; - //airfriction = - }; - - - /* Other */ - - class B_9x21_Ball; - class B_9x19_Ball: B_9x21_Ball { - typicalSpeed = 381; - airfriction = -0.00213; - }; - - class B_45ACP_Ball: BulletBase { - typicalSpeed = 250; - airfriction = -0.0009; - }; -}; diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp deleted file mode 100644 index 1c5dabacd8..0000000000 --- a/addons/ballistics/CfgMagazines.hpp +++ /dev/null @@ -1,65 +0,0 @@ - -class CfgMagazines { - - /* 6.5x39mm Grendel - MX */ - - class CA_Magazine; - class 30Rnd_65x39_caseless_mag: CA_Magazine { - initSpeed = 724; - }; - - class 100Rnd_65x39_caseless_mag: CA_Magazine { - initSpeed = 724; - }; - - - /* 6.5x39mm Grendel - Katiba */ - - class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag { - initSpeed = 724; - }; - - class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag { - initSpeed = 691; - }; - - - /* 5.56x45mm NATO */ - - class 30Rnd_556x45_Stanag: CA_Magazine { - initSpeed = 911; - }; - - - /* 7.62x51mm NATO */ - - class 20Rnd_762x51_Mag: CA_Magazine { - initSpeed = 792; // 18" M14 EBR barrel - }; - - class 150Rnd_762x51_Box: CA_Magazine { - ammo = "B_762x51_Ball"; - initSpeed = 853; // Typical MV for M240 - }; - - - /* Other */ - - class 30Rnd_9x21_Mag: CA_Magazine { - ammo = "B_9x19_Ball"; - initSpeed = 370; - }; - - class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag { - ammo = "B_9x19_Ball"; - initSpeed = 381; - }; - - class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag { - initSpeed = 259; - }; - - class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 { - initSpeed = 250; - }; -}; diff --git a/addons/ballistics/config.cpp b/addons/ballistics/config.cpp index e94c9f4efb..c526b0f7d4 100644 --- a/addons/ballistics/config.cpp +++ b/addons/ballistics/config.cpp @@ -12,7 +12,5 @@ class CfgPatches { }; }; -#include "CfgAmmo.hpp" -#include "CfgMagazines.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/captives/CfgEventHandlers.hpp b/addons/captives/CfgEventHandlers.hpp index 0ce09280a7..9d1a69f4fd 100644 --- a/addons/captives/CfgEventHandlers.hpp +++ b/addons/captives/CfgEventHandlers.hpp @@ -41,3 +41,11 @@ class Extended_InitPost_EventHandlers { }; }; }; +//make sure captiveNum is reset on respawn +class Extended_Respawn_EventHandlers { + class CAManBase { + class ADDON { + respawn = QUOTE(_this call FUNC(handleRespawn)); + }; + }; +}; diff --git a/addons/captives/CfgMoves.hpp b/addons/captives/CfgMoves.hpp index d60fab5a33..aa64e85e22 100644 --- a/addons/captives/CfgMoves.hpp +++ b/addons/captives/CfgMoves.hpp @@ -39,6 +39,7 @@ class CfgMovesMaleSdr: CfgMovesBasic { interpolationRestart = 2; ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1}; InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1}; + canReload = 0; }; class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon { file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease"; @@ -63,6 +64,7 @@ class CfgMovesMaleSdr: CfgMovesBasic { interpolationRestart = 2; ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1}; InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1}; + canReload = 0; }; class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon { file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon"; @@ -80,4 +82,3 @@ class CfgMovesMaleSdr: CfgMovesBasic { }; }; }; - diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 930f2b27d8..89ab74d5bb 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -39,7 +39,7 @@ class CfgVehicles { distance = 4; condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting)); statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive)); - exceptions[] = {QGVAR(isNotEscorting)}; + exceptions[] = {"isNotEscorting"}; showDisabled = 0; icon = QUOTE(PATHTOF(UI\captive_ca.paa)); priority = 2.3; @@ -50,7 +50,7 @@ class CfgVehicles { distance = 4; condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive)); statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive)); - exceptions[] = {QGVAR(isNotEscorting)}; + exceptions[] = {"isNotEscorting"}; showDisabled = 0; icon = QUOTE(PATHTOF(UI\captive_ca.paa)); priority = 2.2; @@ -74,7 +74,7 @@ class CfgVehicles { displayName = "$STR_ACE_Captives_StopEscorting"; condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting)); statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive)); - exceptions[] = {QGVAR(isNotEscorting)}; + exceptions[] = {"isNotEscorting"}; showDisabled = 0; priority = 2.3; hotkey = "C"; @@ -91,7 +91,7 @@ class CfgVehicles { displayName = "$STR_ACE_Captives_StopSurrendering"; condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender)); statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered)); - exceptions[] = {QGVAR(isNotSurrendering)}; + exceptions[] = {"isNotSurrendering"}; showDisabled = 0; priority = 0; }; @@ -107,7 +107,7 @@ class CfgVehicles { distance = 4; \ condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \ statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \ - exceptions[] = {QGVAR(isNotEscorting)}; \ + exceptions[] = {"isNotEscorting"}; \ showDisabled = 0; \ priority = 1.2; \ hotkey = "L"; \ @@ -178,7 +178,7 @@ class CfgVehicles { curatorCost = 0; //??? isGlobal = 1; //run global isTriggerActivated = 1; //Wait for triggers - // icon = QUOTE(PATHTOF(ui\todo.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa)); functionPriority = 0; class Arguments {}; class ModuleDescription: ModuleDescription { diff --git a/addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa b/addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa new file mode 100644 index 0000000000..1f030359ec Binary files /dev/null and b/addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa differ diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index c09f81e51b..bc6a61bc4f 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -21,6 +21,7 @@ PREP(handleGetOut); PREP(handleKilled); PREP(handleOnUnconscious); PREP(handlePlayerChanged); +PREP(handleRespawn); PREP(handleUnitInitPost); PREP(handleZeusDisplayChanged); PREP(moduleSurrender); diff --git a/addons/captives/functions/fnc_handleKilled.sqf b/addons/captives/functions/fnc_handleKilled.sqf index 9e9c5e1ac8..720bde9df7 100644 --- a/addons/captives/functions/fnc_handleKilled.sqf +++ b/addons/captives/functions/fnc_handleKilled.sqf @@ -18,7 +18,7 @@ PARAMS_1(_oldUnit); if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then { - _oldUnit setVariable [QGVAR(isHandcuffed), false, true]; + [_oldUnit, false] call FUNC(setSurrendered); }; if (_oldUnit getVariable [QGVAR(isEscorting), false]) then { @@ -26,5 +26,5 @@ if (_oldUnit getVariable [QGVAR(isEscorting), false]) then { }; if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then { - _oldUnit setVariable [QGVAR(isSurrendering), false, true]; + [_oldUnit, false] call FUNC(setSurrendered); }; diff --git a/addons/captives/functions/fnc_handleRespawn.sqf b/addons/captives/functions/fnc_handleRespawn.sqf new file mode 100644 index 0000000000..02888c27a0 --- /dev/null +++ b/addons/captives/functions/fnc_handleRespawn.sqf @@ -0,0 +1,39 @@ +/* + * Author: commy2 PabstMirror + * Fix, because captiveNum doesn't reset properly on respawn + * + * Arguments: + * 0: Unit + * 1: Corpse + * + * Return Value: + * Nothing + * + * Example: + * [alive, body] call ACE_captives_fnc_handleRespawn; + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_unit,_dead); + +if (!local _unit) exitWith {}; + +//With respawn="group", we could be respawning into a unit that is handcuffed/captive +//If they are, reset and rerun the SET function +//if not, make sure to explicity disable the setCaptivityStatus, because captiveNum does not work correctly on respawn + +if (_unit getVariable [QGVAR(isHandcuffed), false]) then { + _unit setVariable [QGVAR(isHandcuffed), false]; + [_unit, true] call FUNC(setHandcuffed); +} else { + [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); +}; + +if (_unit getVariable [QGVAR(isSurrendering), false]) then { + _unit setVariable [QGVAR(isSurrendering), false]; + [_unit, true] call FUNC(setSurrendered); +} else { + [_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus); +}; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 3a7436abc7..73451863dd 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -75,6 +75,7 @@ if (_state) then { }; }; + if (!alive _unit) exitWith {}; if (_unit getVariable ["ACE_isUnconscious", false]) exitWith {}; //don't touch animations if unconscious //if we are in "hands up" animationState, crack it now diff --git a/addons/common/FixPickup.hpp b/addons/common/CfgActions.hpp similarity index 61% rename from addons/common/FixPickup.hpp rename to addons/common/CfgActions.hpp index 79ddf77026..8e556b38e3 100644 --- a/addons/common/FixPickup.hpp +++ b/addons/common/CfgActions.hpp @@ -1,5 +1,6 @@ class CfgActions { + // fixes pick up action on mine detectors, because all ACE items are of that simulationClass and BI doesn't seem to care class None; class TakeWeapon: None { show = 0; diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index 522df03d4f..eef90451ae 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -42,19 +42,3 @@ class Extended_Respawn_EventHandlers { }; }; }; - -class Extended_Killed_EventHandlers { - class CAManBase { - class GVAR(dropObject) { - Killed = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};); - }; - }; -}; - -class Extended_GetIn_EventHandlers { - class CAManBase { - class GVAR(dropObject) { - GetIn = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};); - }; - }; -}; diff --git a/addons/common/CfgMoves.hpp b/addons/common/CfgMoves.hpp new file mode 100644 index 0000000000..b0df9a4466 --- /dev/null +++ b/addons/common/CfgMoves.hpp @@ -0,0 +1,76 @@ + +class CfgMovesBasic { + class Default; + class Actions { + // fixes grab animation with equipped pistol + class NoActions; + class PistolStandActions: NoActions { + grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2"; + }; + class LauncherKneelActions: NoActions { + grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2"; + }; + class CivilStandActions: NoActions { + grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2"; + }; + }; +}; + +class CfgMovesMaleSdr: CfgMovesBasic { + class AgonyBase; + class AgonyBaseRfl; + class StandBase; + class HealBase; + + class States { + // fixes being able to reload in some animations, can't remember now what exactly + class AinjPfalMstpSnonWnonDnon_carried_Down: AgonyBase { + canReload = 0; + }; + class AinjPfalMstpSnonWnonDnon_carried_Up: AgonyBase { + canReload = 0; + }; + class AinjPfalMstpSnonWrflDnon_carried_Down: AgonyBase { + canReload = 0; + }; + class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl { + canReload = 0; + }; + + class AmovPpneMstpSnonWnonDnon_injured; + class AinjPpneMstpSnonWnonDnon: AmovPpneMstpSnonWnonDnon_injured { + canReload = 0; + }; + class AmovPpneMstpSrasWrflDnon_injured; + class AinjPpneMstpSnonWrflDnon: AmovPpneMstpSrasWrflDnon_injured { + canReload = 0; + }; + + // mark as on ladder animation + class LadderCivilStatic: StandBase { + ACE_isLadder = 1; + }; + + // dunno, important + class AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1; + class AcinPknlMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1 { + enableDirectControl = 1; + }; + class AcinPknlMwlkSnonWnonDb: AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1 { + enableDirectControl = 1; + }; + + // fix falling back to unconsciousness animation and disable rotating in that state + class Unconscious: Default { + ConnectTo[] = {}; + head = "headNo"; + forceAim = 1; + static = 1; + }; + + // idk. Flummi? + class AinvPknlMstpSnonWnonDnon_medic0: HealBase { + variantsPlayer[] = {}; + }; + }; +}; diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index d54dec7150..45f384eaf8 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -33,7 +33,7 @@ class CfgVehicles { function = QFUNC(moduleCheckPBOs); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(UI\IconCheckPBO_ca.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa)); class Arguments { class Action { displayName = "Action"; @@ -87,6 +87,7 @@ class CfgVehicles { displayName = "LSD Vehicles"; function = "ACE_Common_fnc_moduleLSDVehicles"; scope = 2; + icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa)); isGlobal = 1; class Arguments { }; diff --git a/addons/common/NoVoice.hpp b/addons/common/CfgVoice.hpp similarity index 99% rename from addons/common/NoVoice.hpp rename to addons/common/CfgVoice.hpp index a34e30c08e..9c53338e6e 100644 --- a/addons/common/NoVoice.hpp +++ b/addons/common/CfgVoice.hpp @@ -218,6 +218,7 @@ class CfgVoice { displayName = "$STR_ACE_Common_NoVoice"; }; }; + class CfgVoiceTypes { class ACE_NoVoice { name = "$STR_ACE_Common_NoVoice"; diff --git a/addons/common/CfgWeapons.hpp b/addons/common/CfgWeapons.hpp index 5da1bff649..6035ee84bf 100644 --- a/addons/common/CfgWeapons.hpp +++ b/addons/common/CfgWeapons.hpp @@ -25,4 +25,20 @@ class CfgWeapons { mass = 0; }; }; + + class InventoryItem_Base_F; + class ACE_Banana: ACE_ItemCore { + author = "$STR_ACE_Common_ACETeam"; + scope = 2; + displayName = "$STR_ACE_Common_bananaDisplayName"; + descriptionShort = "$STR_ACE_Common_bananaDescr"; + model = PATHTOF(data\banana.p3d); + picture = PATHTOF(data\icon_banana_ca.paa); + icon = "iconObject_circle"; + mapSize = 0.034; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + }; + }; }; + diff --git a/addons/common/DefaultItems.hpp b/addons/common/DefaultItems.hpp deleted file mode 100644 index 539eb3beff..0000000000 --- a/addons/common/DefaultItems.hpp +++ /dev/null @@ -1,1030 +0,0 @@ -/* - -Autoexported while playing the unmodded game. - - -A = "_c = _x >> 'items'; isArray _c" configClasses (configFile >> "CfgVehicles"); - -B = []; {B set [_forEachIndex, inheritsFrom _x]} forEach A; -E = B - A; - -C = []; {C set [_forEachIndex, getArray (_x >> "items")]} forEach A; -D = []; {D set [_forEachIndex, getArray (_x >> "respawnItems")]} forEach A; - -{A set [_forEachIndex, configName _x]} forEach A; -{B set [_forEachIndex, configName _x]} forEach B; -{E set [_forEachIndex, configName _x]} forEach E; - -diag_log text "====================="; - -{ - diag_log text format ["class %1;", _x]; -} forEach E; - -{ - diag_log text format ["class %1: %2 {", _x, B select _forEachIndex]; - _s = str (C select _forEachIndex); _s = toString (toArray _s - [91,93]); - diag_log text format [" items[] = {%1};", _s]; - _s = str (D select _forEachIndex); _s = toString (toArray _s - [91,93]); - diag_log text format [" respawnItems[] = {%1};", _s]; - diag_log text "};"; -} forEach A; - -*/ - -class SoldierWB; -class SoldierGB; -class SoldierEB; -class C_man_1; -class B_Soldier_base_F: SoldierWB { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_02_f: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_03_f: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_04_f: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_05_f: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_RangeMaster_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_lite_F: B_Soldier_03_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_GL_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_AR_F: B_Soldier_02_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_SL_F: B_Soldier_03_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_TL_F: B_Soldier_03_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_M_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_LAT_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_medic_F: B_Soldier_02_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_repair_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_exp_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Helipilot_F: B_Soldier_04_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_A_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_AT_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_AA_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_engineer_F: B_Soldier_03_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_crew_F: B_Soldier_03_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_officer_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Competitor_F: B_RangeMaster_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Pilot_F: B_Soldier_05_f { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_helicrew_F: B_Helipilot_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_PG_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_UAV_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class b_soldier_unarmed_f: B_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_diver_base_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_diver_F: B_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_diver_TL_F: B_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_diver_exp_F: B_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_recon_base: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_LAT_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_exp_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_medic_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_TL_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_M_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_recon_JTAC_F: B_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_sniper_base_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_spotter_F: B_Soldier_sniper_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_sniper_F: B_Soldier_sniper_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Story_SF_Captain_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Story_Protagonist_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Story_Engineer_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Story_Colonel_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Story_Pilot_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Story_Tank_Commander_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class b_soldier_survival_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_CTRG_soldier_GL_LAT_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_CTRG_soldier_engineer_exp_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_CTRG_soldier_M_medic_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_CTRG_soldier_AR_A_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_support_base_F: B_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_AAR_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_AAT_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_soldier_AAA_F: B_soldier_AAT_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_support_MG_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_support_GMG_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_support_Mort_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_support_AMG_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_support_AMort_F: B_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_base_F: SoldierGB { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_lite_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_SL_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_TL_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_AR_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_medic_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_engineer_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_exp_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_GL_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_M_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_LAT_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Soldier_A_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_officer_F: I_G_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_F: I_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_F: I_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_lite_F: I_G_Soldier_lite_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_lite_F: I_G_Soldier_lite_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_SL_F: I_G_Soldier_SL_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_SL_F: I_G_Soldier_SL_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_TL_F: I_G_Soldier_TL_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_TL_F: I_G_Soldier_TL_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_AR_F: I_G_Soldier_AR_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_AR_F: I_G_Soldier_AR_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_medic_F: I_G_medic_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_medic_F: I_G_medic_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_engineer_F: I_G_engineer_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_engineer_F: I_G_engineer_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_exp_F: I_G_Soldier_exp_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_exp_F: I_G_Soldier_exp_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_GL_F: I_G_Soldier_GL_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_GL_F: I_G_Soldier_GL_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_M_F: I_G_Soldier_M_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_M_F: I_G_Soldier_M_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_LAT_F: I_G_Soldier_LAT_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_LAT_F: I_G_Soldier_LAT_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_Soldier_A_F: I_G_Soldier_A_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_Soldier_A_F: I_G_Soldier_A_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_G_officer_F: I_G_officer_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_G_officer_F: I_G_officer_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class i_g_soldier_unarmed_f: I_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class b_g_soldier_unarmed_f: B_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class o_g_soldier_unarmed_f: O_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class i_g_survivor_F: I_G_Soldier_F { - items[] = {}; - respawnItems[] = {}; -}; -class b_g_survivor_F: B_G_Soldier_F { - items[] = {}; - respawnItems[] = {}; -}; -class o_g_survivor_F: O_G_Soldier_F { - items[] = {}; - respawnItems[] = {}; -}; -class I_G_Story_Protagonist_F: B_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_Story_SF_Captain_F: B_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_resistanceLeader_F: I_G_Story_Protagonist_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_G_resistanceCommander_F: I_G_Story_Protagonist_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_base_F: SoldierGB { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_02_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_03_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_04_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_soldier_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_lite_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_A_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_GL_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_AR_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_SL_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_TL_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_M_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_LAT_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_AT_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_AA_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_medic_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_repair_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_exp_F: I_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_engineer_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_crew_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_helipilot_F: I_Soldier_03_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_pilot_F: I_Soldier_04_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_helicrew_F: I_helipilot_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_officer_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Story_Colonel_F: I_officer_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_soldier_UAV_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class i_soldier_unarmed_f: I_soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_diver_base_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_diver_F: I_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_diver_exp_F: I_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_diver_TL_F: I_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_sniper_base_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Spotter_F: I_Soldier_sniper_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Sniper_F: I_Soldier_sniper_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_support_base_F: I_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_AAR_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_AAT_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_Soldier_AAA_F: I_Soldier_AAT_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_support_MG_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_support_GMG_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_support_Mort_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_support_AMG_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_support_AMort_F: I_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_base_F: SoldierEB { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_officer_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_02_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_lite_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_GL_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_AR_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_SL_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_TL_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldier_M_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_LAT_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_medic_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldier_repair_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldier_exp_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_helipilot_F: O_Soldier_02_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_A_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_AT_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_AA_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_engineer_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_crew_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Pilot_F: O_helipilot_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_helicrew_F: O_helipilot_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldier_PG_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Story_Colonel_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Story_CEO_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldier_UAV_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class o_soldier_unarmed_f: O_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_diver_base_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_diver_F: O_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_diver_TL_F: O_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_diver_exp_F: O_Soldier_diver_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_sniper_base_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_spotter_F: O_Soldier_sniper_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_sniper_F: O_Soldier_sniper_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_recon_base: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_M_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_LAT_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_medic_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_exp_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_JTAC_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_recon_TL_F: O_Soldier_recon_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_support_base_F: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_AAR_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_AAT_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_AAA_F: O_Soldier_AAT_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_support_MG_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_support_GMG_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_support_Mort_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_support_AMG_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_support_AMort_F: O_Soldier_support_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_Soldier_Urban_base: O_Soldier_base_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_AR_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_AAR_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_LAT_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_AT_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_AAT_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_AA_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_AAA_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_TL_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_SoldierU_SL_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_medic_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_repair_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_exp_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_engineer_U_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_M_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_soldierU_A_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_SoldierU_GL_F: O_Soldier_Urban_base { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class C_Marshal_F: B_RangeMaster_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class B_Soldier_VR_F: B_Soldier_base_F { - items[] = {}; - respawnItems[] = {}; -}; -class O_Soldier_VR_F: O_Soldier_base_F { - items[] = {}; - respawnItems[] = {}; -}; -class I_Soldier_VR_F: I_Soldier_base_F { - items[] = {}; - respawnItems[] = {}; -}; -class C_Soldier_VR_F: C_man_1 { - items[] = {}; - respawnItems[] = {}; -}; -class B_Protagonist_VR_F: B_Soldier_base_F { - items[] = {}; - respawnItems[] = {}; -}; -class O_Protagonist_VR_F: O_Soldier_base_F { - items[] = {}; - respawnItems[] = {}; -}; -class I_Protagonist_VR_F: I_Soldier_base_F { - items[] = {}; - respawnItems[] = {}; -}; -class B_UAV_AI: B_Helipilot_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class O_UAV_AI: O_helipilot_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class I_UAV_AI: O_UAV_AI { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class Underwear_F: B_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class b_survivor_F: B_Soldier_F { - items[] = {}; - respawnItems[] = {}; -}; -class o_survivor_F: O_Soldier_F { - items[] = {}; - respawnItems[] = {}; -}; -class i_survivor_F: I_soldier_F { - items[] = {}; - respawnItems[] = {}; -}; -class b_soldier_universal_f: B_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class b_g_soldier_universal_f: B_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class o_soldier_universal_f: O_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class o_g_soldier_universal_f: O_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class i_soldier_universal_f: I_soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; -class i_g_soldier_universal_f: I_G_Soldier_F { - items[] = {"FirstAidKit"}; - respawnItems[] = {"FirstAidKit"}; -}; diff --git a/addons/common/FixAnimations.hpp b/addons/common/FixAnimations.hpp deleted file mode 100644 index d389391ba1..0000000000 --- a/addons/common/FixAnimations.hpp +++ /dev/null @@ -1,35 +0,0 @@ - -class CfgMovesBasic; -class CfgMovesMaleSdr: CfgMovesBasic { - class AgonyBase; - class AgonyBaseRfl; - class StandBase; - - class States { - class AinjPfalMstpSnonWnonDnon_carried_Down: AgonyBase { - canReload = 0; - }; - class AinjPfalMstpSnonWnonDnon_carried_Up: AgonyBase { - canReload = 0; - }; - class AinjPfalMstpSnonWrflDnon_carried_Down: AgonyBase { - canReload = 0; - }; - class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl { - canReload = 0; - }; - - class AmovPpneMstpSnonWnonDnon_injured; - class AinjPpneMstpSnonWnonDnon: AmovPpneMstpSnonWnonDnon_injured { - canReload = 0; - }; - class AmovPpneMstpSrasWrflDnon_injured; - class AinjPpneMstpSnonWrflDnon: AmovPpneMstpSrasWrflDnon_injured { - canReload = 0; - }; - - class LadderCivilStatic: StandBase { - ACE_isLadder = 1; - }; - }; -}; diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index 5dc0e6384a..bd74ac510a 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -53,17 +53,6 @@ class RscTitles { }; }; - class ACE_EventHandlerHelper: ACE_Rsc_Display_Base { - idd = -1; - class controls { - class CameraView: RscMapControl { - onDraw = "if (cameraView != uiNamespace getVariable 'ACE_EventHandler_CameraMode') then {uiNamespace setVariable ['ACE_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'ACE_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_CameraMode') select 2);};"; - idc = -1; - w = 0; - h = 0; - }; - }; - }; class ACE_EventHandlerHelper2: ACE_Rsc_Display_Base { class controls { class MapMarkerCreated: RscMapControl { diff --git a/addons/common/UI/IconCheckPBO_ca.paa b/addons/common/UI/IconCheckPBO_ca.paa deleted file mode 100644 index fff094413e..0000000000 Binary files a/addons/common/UI/IconCheckPBO_ca.paa and /dev/null differ diff --git a/addons/common/UI/Icon_Module_CheckPBO_ca.paa b/addons/common/UI/Icon_Module_CheckPBO_ca.paa new file mode 100644 index 0000000000..8ca937dbd8 Binary files /dev/null and b/addons/common/UI/Icon_Module_CheckPBO_ca.paa differ diff --git a/addons/common/UI/Icon_Module_LSD_ca.paa b/addons/common/UI/Icon_Module_LSD_ca.paa new file mode 100644 index 0000000000..fa4c106177 Binary files /dev/null and b/addons/common/UI/Icon_Module_LSD_ca.paa differ diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 1d951c3ceb..237791ff5b 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -33,6 +33,9 @@ if (hasInterface) then { _this lock (_this getVariable [QGVAR(lockStatus), locked _this]); }] call FUNC(addEventhandler); +["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler); +["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler); + // hack to get PFH to work in briefing [QGVAR(onBriefingPFH), "onEachFrame", { if (time > 0) exitWith { @@ -171,15 +174,9 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player; }, 0, []] call cba_fnc_addPerFrameHandler; [QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable); -[QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable); -[QGVAR(carriedObj),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable); - -["VehicleSetFuel", { -PARAMS_2(_vehicle,_fuelLevel); -_vehicle setFuel _fuelLevel; -}] call FUNC(addEventhandler); ["displayTextStructured", FUNC(displayTextStructured)] call FUNC(addEventhandler); ["displayTextPicture", FUNC(displayTextPicture)] call FUNC(addEventhandler); ["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition); +["isNotInside", {_this select 0 == _this select 1 || {vehicle (_this select 0) == _this select 0}}] call FUNC(addCanInteractWithCondition); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index de848941fd..2a20c69bcb 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -6,9 +6,7 @@ ADDON = false; // ACE Common Function PREP(addActionEventHandler); PREP(addActionMenuEventHandler); -PREP(addCameraEventHandler); PREP(addCanInteractWithCondition); -PREP(addCustomEventHandler); PREP(addLineToDebugDraw); PREP(addMapMarkerCreatedEventHandler); PREP(addScrollWheelEventHandler); @@ -17,18 +15,13 @@ PREP(adminKick); PREP(ambientBrightness); PREP(applyForceWalkStatus); PREP(ASLToPosition); -PREP(beingCarried); PREP(binarizeNumber); PREP(blurScreen); PREP(cachedCall); -PREP(callCustomEventHandlers); -PREP(callCustomEventHandlersGlobal); PREP(canGetInPosition); PREP(canInteract); PREP(canInteractWith); PREP(canUseWeapon); -PREP(carriedByObj); -PREP(carryObj); PREP(changeProjectileDirection); PREP(checkPBOs); PREP(claim); @@ -62,8 +55,6 @@ PREP(fixPosition); PREP(getAllDefinedSetVariables); PREP(getAllGear); PREP(getCaptivityStatus); -PREP(getCarriedBy); -PREP(getCarriedObj); PREP(getConfigCommander); PREP(getConfigGunner); PREP(getDeathAnim); @@ -104,6 +95,9 @@ PREP(getVehicleCrew); PREP(getVersion); PREP(getWeaponAzimuthAndInclination); PREP(getWeaponIndex); +PREP(getWeaponModes); +PREP(getWeaponMuzzles); +PREP(getWeaponState); PREP(getWeaponType); PREP(getWindDirection); PREP(goKneeling); @@ -126,7 +120,6 @@ PREP(isModLoaded); PREP(isPlayer); PREP(isTurnedOut); PREP(letterToCode); -PREP(limitMovementSpeed); PREP(loadPerson); PREP(loadPersonLocal); PREP(loadSettingsFromProfile); @@ -150,9 +143,7 @@ PREP(readSettingFromModule); PREP(receiveRequest); PREP(removeActionEventHandler); PREP(removeActionMenuEventHandler); -PREP(removeCameraEventHandler); PREP(removeCanInteractWithCondition); -PREP(removeCustomEventHandler); PREP(removeMapMarkerCreatedEventHandler); PREP(removeScrollWheelEventHandler); PREP(removeSpecificMagazine); @@ -166,7 +157,6 @@ PREP(serverLog); PREP(setArrestState); PREP(setCanInteract); PREP(setCaptivityStatus); -PREP(setCarriedBy); PREP(setDefinedVariable); PREP(setDisableUserInputStatus); PREP(setForceWalkStatus); @@ -258,14 +248,15 @@ if (hasInterface) then { ACE_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player]; uiNamespace setVariable ["ACE_player", ACE_player]; - // Raise custom event. @todo, remove - [missionNamespace, "playerChanged", [ACE_player, _oldPlayer]] call FUNC(callCustomEventHandlers); // Raise ACE event ["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent); }; }, 0, []] call cba_fnc_addPerFrameHandler; }; +// Init toHex +[0] call FUNC(toHex); + ADDON = true; isHC = !(hasInterface || isDedicated); diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 8081a05637..afd118ff1c 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { units[] = {"ACE_Box_Misc"}; - weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon"}; + weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_main"}; author[] = {"KoffeinFlummi"}; @@ -13,11 +13,16 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" + #include "CfgSounds.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "CfgMagazines.hpp" +#include "CfgActions.hpp" +#include "CfgMoves.hpp" +#include "CfgVoice.hpp" + class ACE_Rsc_Display_Base { idd = -1; type = 0; @@ -82,12 +87,12 @@ class ACE_Settings { value = 0; typeName = "BOOL"; }; - class GVAR(enableNumberHotkeys) { + /*class GVAR(enableNumberHotkeys) { value = 1; typeName = "BOOL"; isClientSetable = 1; displayName = "$STR_ACE_Common_EnableNumberHotkeys"; - }; + };*/ class GVAR(settingFeedbackIcons) { value = 1; typeName = "SCALAR"; @@ -126,9 +131,6 @@ class ACE_Settings { #include #include #include -#include -#include -#include class CfgUIGrids { class IGUI { diff --git a/addons/common/data/banana.p3d b/addons/common/data/banana.p3d new file mode 100644 index 0000000000..f347ab17eb Binary files /dev/null and b/addons/common/data/banana.p3d differ diff --git a/addons/common/data/banana_co.paa b/addons/common/data/banana_co.paa new file mode 100644 index 0000000000..55d7651721 Binary files /dev/null and b/addons/common/data/banana_co.paa differ diff --git a/addons/common/data/icon_banana_ca.paa b/addons/common/data/icon_banana_ca.paa new file mode 100644 index 0000000000..0d96102bbd Binary files /dev/null and b/addons/common/data/icon_banana_ca.paa differ diff --git a/addons/common/functions/fnc_ASLToPosition.sqf b/addons/common/functions/fnc_ASLToPosition.sqf index 41e532d39b..4ff880c019 100644 --- a/addons/common/functions/fnc_ASLToPosition.sqf +++ b/addons/common/functions/fnc_ASLToPosition.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Converts ASL to Arma "Position" * * Arguments: diff --git a/addons/common/functions/fnc_addCameraEventHandler.sqf b/addons/common/functions/fnc_addCameraEventHandler.sqf deleted file mode 100644 index 45fdb3bdca..0000000000 --- a/addons/common/functions/fnc_addCameraEventHandler.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: commy2 - * - * Add a camera view event handler. The event script is called when the camera view changes. - * The argument of the called function is stored in the _this variable and has as first element the new camera mode. Possible arguments are ["INTERNAL"], ["EXTERNAL"], ["GUNNER"] and ["GROUP"]. - * - * Argument: - * 0: Code to execute (Code or String) - * - * Return value: - * ID of the event script (used to remove it later). - */ -#include "script_component.hpp" - -private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; - -_statement = _this select 0; - -if (typeName _statement == "STRING") then { - _statement = compile _statement; -}; - -_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]]; - -_id = (_actionsVar select 0) + 1; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -if (_id == 0) then { - uiNamespace setVariable ["ACE_EventHandler_CameraMode", cameraView]; - (QGVAR(EventHandlerHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(EventHandlerHelper), "PLAIN"]; -}; - -_actionIDs pushBack _id; -_actions pushBack _statement; - -missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_id, _actionIDs, _actions]]; - -_id diff --git a/addons/common/functions/fnc_addCustomEventHandler.sqf b/addons/common/functions/fnc_addCustomEventHandler.sqf deleted file mode 100644 index e31730dbb3..0000000000 --- a/addons/common/functions/fnc_addCustomEventHandler.sqf +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Author: commy2 - * - * Add a custom event to a unit. The event scripts are called by FUNC(callCustomEventHandlers). - * - * Argument: - * 0: Object the event should be assigned to or namespace (Object OR Namespace) - * 1: Name of the event (String) - * 2: Code to execute (Code or String) - * - * Return value: - * ID of the event script (used to remove it later). - */ -#include "script_component.hpp" - -private ["_object", "_type", "_statement", "_name", "_actionsVar", "_id", "_actionIDs", "_actions"]; - -_object = _this select 0; -_type = _this select 1; -_statement = _this select 2; - -if (typeName _statement == "STRING") then { - _statement = compile _statement; -}; - -_name = format ["ACE_CustomEventHandlers_%1", _type]; - -_actionsVar = _object getVariable [_name, [-1, [], []]]; - -_id = (_actionsVar select 0) + 1; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -_actionIDs pushBack _id; -_actions pushBack _statement; - -_object setVariable [_name, [_id, _actionIDs, _actions]]; - -_id diff --git a/addons/common/functions/fnc_addLineToDebugDraw.sqf b/addons/common/functions/fnc_addLineToDebugDraw.sqf index 1c7d5d5cd1..4b8b235811 100644 --- a/addons/common/functions/fnc_addLineToDebugDraw.sqf +++ b/addons/common/functions/fnc_addLineToDebugDraw.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Add line to draw on debug * diff --git a/addons/common/functions/fnc_addSetting.sqf b/addons/common/functions/fnc_addSetting.sqf index 866b7fb35b..d3f97f8ae0 100644 --- a/addons/common/functions/fnc_addSetting.sqf +++ b/addons/common/functions/fnc_addSetting.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Adds a new setting at runtime, with all it's metadata. * If has only local effects. * diff --git a/addons/common/functions/fnc_beingCarried.sqf b/addons/common/functions/fnc_beingCarried.sqf deleted file mode 100644 index ed0c7832bb..0000000000 --- a/addons/common/functions/fnc_beingCarried.sqf +++ /dev/null @@ -1,12 +0,0 @@ -/** - * fn_beingCarried.sqf - * @Descr: Check if object is being carried - * @Author: Glowbal - * - * @Arguments: [object OBJECT] - * @Return: BOOL True if object is being carried - * @PublicAPI: true - */ -#include "script_component.hpp" - -!(isNull ([_this select 0] call FUNC(getCarriedObj))); \ No newline at end of file diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index 0c9aafcfc8..ac6687fd4f 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -1,6 +1,6 @@ /* - * Author: CAA-Picard and Jaynus - * Returns the result of the function and caches it up to a given time + * Author: esteldunedain and Jaynus + * Returns the result of the function and caches it up to a given time or event * * Arguments: * 0: Parameters @@ -8,6 +8,7 @@ * 2: Namespace to store the cache on * 3: Cache uid * 4: Max duration of the cache + * 5: Event that clears the cache (Optional) * * Return Value: * Result of the function @@ -20,6 +21,40 @@ EXPLODE_5_PVT(_this,_params,_function,_namespace,_uid,_duration); if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then { _namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]]; + + // Does the cache needs to be cleared on an event? + if (count _this > 5) then { + private ["_event","_varName","_cacheList"]; + _event = _this select 5; + _varName = format [QGVAR(clearCache_%1),_event]; + _cacheList = missionNamespace getVariable _varName; + + // If there was no EH to clear these caches, add one + if (isNil {_cacheList}) then { + _cacheList = []; + missionNamespace setVariable [_varName, _cacheList]; + + [_event, { + private ["_varName","_cacheList"]; + // _eventName is defined on the function that calls the event + #ifdef DEBUG_MODE_FULL + diag_log text format ["ACE: Clear cached variables on event: %1", _eventName]; + #endif + // Get the list of caches to clear + _varName = format [QGVAR(clearCache_%1),_eventName]; + _cacheList = missionNamespace getVariable [_varName, []]; + // Erase all the cached results + { + _x call FUNC(eraseCache); + } forEach _cacheList; + // Empty the list + missionNamespace setVariable [_varName, []]; + }] call FUNC(addEventhandler); + }; + + // Add this cache to the list of the event + _cacheList pushBack [_namespace, _uid]; + }; #ifdef DEBUG_MODE_FULL diag_log format ["Calculated result: %1 %2", _namespace, _uid]; } else { diff --git a/addons/common/functions/fnc_callCustomEventHandlers.sqf b/addons/common/functions/fnc_callCustomEventHandlers.sqf deleted file mode 100644 index 4b822e0754..0000000000 --- a/addons/common/functions/fnc_callCustomEventHandlers.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: commy2 - * - * Execute all custom event script assigned to this object. - * - * Argument: - * 0: Object the eventhandlers are assigned to or namespace (Object or Namespace) - * 1: Name of the event (String) - * 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to]) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -private ["_object", "_type", "_argument", "_name", "_actions"]; - -_object = _this select 0; -_type = _this select 1; -_argument = _this select 2; - -if (isNil "_argument") then {_argument = [_object]}; - -_name = format ["ACE_CustomEventHandlers_%1", _type]; - -_actions = (_object getVariable [_name, [-1, [], []]]) select 2; - -{ - _argument call _x; nil; -} count _actions; -nil diff --git a/addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf b/addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf deleted file mode 100644 index e1dddd5916..0000000000 --- a/addons/common/functions/fnc_callCustomEventHandlersGlobal.sqf +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Author: commy2 - * - * Execute all custom event script assigned to this object on every machine. - * - * Argument: - * 0: Object the eventhandlers are assigned to or namespace (Object or Namespace) - * 1: Name of the event (String) - * 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to]) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -[_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc); diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index 859d8ed461..5ac4c527fd 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -69,7 +69,7 @@ switch (_position) do { case "gunner" : { private "_turretConfig"; - _turret = [typeOf _vehicle] call FUNC(getTurretGunner); + _turret = [_vehicle] call FUNC(getTurretGunner); if (_turret isEqualTo []) exitWith {false}; _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); @@ -82,7 +82,7 @@ switch (_position) do { case "commander" : { private "_turretConfig"; - _turret = [typeOf _vehicle] call FUNC(getTurretCommander); + _turret = [_vehicle] call FUNC(getTurretCommander); if (_turret isEqualTo []) exitWith {false}; _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); @@ -95,7 +95,7 @@ switch (_position) do { case "copilot" : { private "_turretConfig"; - _turret = [typeOf _vehicle] call FUNC(getTurretCopilot); + _turret = [_vehicle] call FUNC(getTurretCopilot); if (_turret isEqualTo []) exitWith {false}; _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath); @@ -108,7 +108,7 @@ switch (_position) do { case "turret" : { private ["_turrets", "_turretConfig"]; - _turrets = [typeOf _vehicle] call FUNC(getTurretsOther); + _turrets = [_vehicle] call FUNC(getTurretsOther); if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX @@ -136,7 +136,7 @@ switch (_position) do { case "ffv" : { private ["_turrets", "_turretConfig"]; - _turrets = [typeOf _vehicle] call FUNC(getTurretsFFV); + _turrets = [_vehicle] call FUNC(getTurretsFFV); if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX diff --git a/addons/common/functions/fnc_carriedByObj.sqf b/addons/common/functions/fnc_carriedByObj.sqf deleted file mode 100644 index 139a449c77..0000000000 --- a/addons/common/functions/fnc_carriedByObj.sqf +++ /dev/null @@ -1,13 +0,0 @@ -/** - * fn_carriedByObj.sqf - * @Descr: Check if object A is being carried by object B. - * @Author: Glowbal - * - * @Arguments: [object OBJECT, unit OBJECT] - * @Return: BOOL True if B is carrying A. - * @PublicAPI: true - */ - -#include "script_component.hpp" - -([(_this select 0)] call FUNC(getCarriedBy) == [(_this select 1)] call FUNC(getCarriedBy)); \ No newline at end of file diff --git a/addons/common/functions/fnc_carryObj.sqf b/addons/common/functions/fnc_carryObj.sqf deleted file mode 100644 index 6d911029a2..0000000000 --- a/addons/common/functions/fnc_carryObj.sqf +++ /dev/null @@ -1,72 +0,0 @@ -/** - * fn_carryObj.sqf - * @Descr: Have a unit carry an object. Use ObjNull for second parameter if you want the unit to carry nothing - * @Author: Glowbal - * - * @Arguments: [unit OBJECT, objectToCarry OBJECT, attachToVector ARRAY (Optional)] - * @Return: BOOL Returns true if succesful - * @PublicAPI: true - */ - -#include "script_component.hpp" - -private ["_unit","_to","_return", "_fallDown", "_carriedObj", "_positionUnit"]; -_unit = [_this, 0,ObjNull, [ObjNull]] call bis_fnc_param; -_to = [_this, 1,ObjNull, [ObjNull]] call bis_fnc_param; -_fallDown = false; -if (count _this > 3) then { - _fallDown = _this select 3; -}; -_return = false; - -[format["fnc_carryObj - UNIT: %1 ATTEMPTS TO CARRY %2",_unit,_to],2] call FUNC(debug); - -if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj)))) || isNull _to) then { - if (vehicle _unit != _unit) exitwith {}; - if (!isNull _to) then { - if ((isNull ([_to] call FUNC(getCarriedObj))) && ([_unit] call FUNC(canInteract))) then { - _return = true; - _unit setvariable [QGVAR(carriedObj),_to,true]; - if (_fallDown) then { - // [_unit,_fallDown] call FUNC(limitMovementSpeed); - }; - [_to, _unit] call FUNC(setCarriedBy); - if (count _this > 2) then { - if (count (_this select 2) == 3) then { - _to attachTo [_unit,(_this select 2)]; - [format["fnc_carryObj - UNIT: %1 TO %2 - attachTo offset: %3",_unit,_to,(_this select 2)],2] call FUNC(debug); - }; - }; - ["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent); - // ["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent; - }; - } else { - if (!isNull ([_unit] call FUNC(getCarriedObj))) then { - [format["fnc_carryObj - UNIT: %1 DROPING CARRIED OBJECT",_unit],2] call FUNC(debug); - _carriedObj = ([_unit] call FUNC(getCarriedObj)); - - detach _carriedObj; - //_carriedObj setPosATL [(getPosATL _carriedObj) select 0, (getPosATL _carriedObj) select 1,0]; - if (!surfaceIsWater getPos _unit) then { - _positionUnit = getPosATL _carriedObj; - _positionUnit set [2, ((getPosATL _unit) select 2) + 0.1]; - _carriedObj setPosATL _positionUnit; - } else { - _positionUnit = getPosASL _carriedObj; - _positionUnit set [2, ((getPosASL _unit) select 2) + 0.1]; - _carriedObj setPosASL _positionUnit; - }; - - [[_unit] call FUNC(getCarriedObj), objNull] call FUNC(setCarriedBy); - _unit setvariable [QGVAR(carriedObj),_to,true]; - _return = true; - - ["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent); - // ["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent; - - }; - }; -} else { - [format["fnc_carryObj - UNIT: %1 FAILED TO CARRY %2 - not an object or already carrying",_unit,_to],2] call FUNC(debug); -}; -_return diff --git a/addons/common/functions/fnc_createOrthonormalReference.sqf b/addons/common/functions/fnc_createOrthonormalReference.sqf index a92464a7f3..346127c658 100644 --- a/addons/common/functions/fnc_createOrthonormalReference.sqf +++ b/addons/common/functions/fnc_createOrthonormalReference.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Returns a orthonormal system of reference aligned with the supplied vector * diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index 923575dd97..57be44fe43 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -50,13 +50,13 @@ if (_state) then { }; _ctrl = _dlg displayctrl 103; - _ctrl ctrlSetEventHandler ["buttonClick", "while {!isNull (uiNamespace getVariable ['GVAR(dlgDisableMouse)', displayNull])} do {closeDialog 0}; failMission 'LOSER'; [false] call FUNC(disableUserInput);"]; + _ctrl ctrlSetEventHandler ["buttonClick", QUOTE(while {!isNull (uiNamespace getVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),displayNull)])} do {closeDialog 0}; failMission 'LOSER'; [false] call DFUNC(disableUserInput);)]; _ctrl ctrlEnable true; _ctrl ctrlSetText "ABORT"; _ctrl ctrlSetTooltip "Abort."; _ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer); - _ctrl ctrlSetEventHandler ["buttonClick", "closeDialog 0; player setDamage 1; [false] call FUNC(disableUserInput);"]; + _ctrl ctrlSetEventHandler ["buttonClick", QUOTE(closeDialog 0; player setDamage 1; [false] call DFUNC(disableUserInput);)]; _ctrl ctrlEnable (call {_config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}}); _ctrl ctrlSetText "RESPAWN"; _ctrl ctrlSetTooltip "Respawn."; diff --git a/addons/common/functions/fnc_eraseCache.sqf b/addons/common/functions/fnc_eraseCache.sqf index 00f49f4833..94592ad409 100644 --- a/addons/common/functions/fnc_eraseCache.sqf +++ b/addons/common/functions/fnc_eraseCache.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Deletes a cached result * * Arguments: diff --git a/addons/common/functions/fnc_execNextFrame.sqf b/addons/common/functions/fnc_execNextFrame.sqf index e0dd49e86c..a0f71f9d51 100644 --- a/addons/common/functions/fnc_execNextFrame.sqf +++ b/addons/common/functions/fnc_execNextFrame.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Executes a code on the next frame * diff --git a/addons/common/functions/fnc_getCarriedBy.sqf b/addons/common/functions/fnc_getCarriedBy.sqf deleted file mode 100644 index 2b3c374eb3..0000000000 --- a/addons/common/functions/fnc_getCarriedBy.sqf +++ /dev/null @@ -1,13 +0,0 @@ -/** - * fn_getCarriedBy.sqf - * @Descr: Get the object that is carrying given unit or object - * @Author: Glowbal - * - * @Arguments: [unit OBJECT] - * @Return: OBJECT Returns the object that is carrying the unit. Otherwise returns ObjNull - * @PublicAPI: true - */ - -#include "script_component.hpp" - -((_this select 0) getvariable [QGVAR(carriedBy),objNull]); \ No newline at end of file diff --git a/addons/common/functions/fnc_getCarriedObj.sqf b/addons/common/functions/fnc_getCarriedObj.sqf deleted file mode 100644 index 8cb1209791..0000000000 --- a/addons/common/functions/fnc_getCarriedObj.sqf +++ /dev/null @@ -1,13 +0,0 @@ -/** - * fn_getCarriedObj.sqf - * @Descr: Grab the registered carried object - * @Author: Glowbal - * - * @Arguments: [unit OBJECT] - * @Return: OBJECT Returns the object that the unit is currently carrying. If not carrying, returns ObjNull - * @PublicAPI: true - */ - -#include "script_component.hpp" - -((_this select 0) getvariable [QGVAR(carriedObj),objNull]); diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index 5fca3af81c..4003c2a51f 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -4,7 +4,7 @@ * Get the commander config of a vehicles turret. * * Argument: - * 0: vehicle type (String) + * 0: vehicle (Object) * * Return value: * Commander config (Config) @@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"]; _vehicle = _this select 0; -_config = configFile >> "CfgVehicles" >> _vehicle; +_config = configFile >> "CfgVehicles" >> typeOf _vehicle; _turret = [_vehicle] call FUNC(getTurretCommander); [_config, _turret] call FUNC(getTurretConfigPath) diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index 0c09461a04..80bdfb2cfa 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -4,7 +4,7 @@ * Get the gunner config of a vehicles turret. * * Argument: - * 0: vehicle type (String) + * 0: vehicle (Object) * * Return value: * Gunner config (Config) @@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"]; _vehicle = _this select 0; -_config = configFile >> "CfgVehicles" >> _vehicle; +_config = configFile >> "CfgVehicles" >> typeOf _vehicle; _turret = [_vehicle] call FUNC(getTurretGunner); [_config, _turret] call FUNC(getTurretConfigPath) diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index eadaeb2000..cfa7e0532c 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -4,23 +4,23 @@ * Gets the turret index of door gunners * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret indexes of the door gunner. Empty array means no gunner position. (Array) */ #include "script_component.hpp" -private ["_vehicleType", "_turrets", "_doorTurrets", "_config"]; +private ["_vehicle", "_turrets", "_doorTurrets", "_config"]; -_vehicleType = _this select 0; +_vehicle = _this select 0; -_turrets = [_vehicleType] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _doorTurrets = []; { - _config = configFile >> "CfgVehicles" >> _vehicleType; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then { diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index 0cfce1e124..062cc6cae4 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -64,7 +64,7 @@ switch (_position) do { }; case "gunner" : { - _turret = [typeOf _vehicle] call FUNC(getTurretGunner); + _turret = [_vehicle] call FUNC(getTurretGunner); if (CANGETINTURRETINDEX) then { _script = [ @@ -75,7 +75,7 @@ switch (_position) do { }; case "commander" : { - _turret = [typeOf _vehicle] call FUNC(getTurretCommander); + _turret = [_vehicle] call FUNC(getTurretCommander); if (CANGETINTURRETINDEX) then { _script = [ @@ -86,7 +86,7 @@ switch (_position) do { }; case "copilot" : { - _turret = [typeOf _vehicle] call FUNC(getTurretCopilot); + _turret = [_vehicle] call FUNC(getTurretCopilot); if (CANGETINTURRETINDEX) then { _script = [ @@ -100,7 +100,7 @@ switch (_position) do { case "turret" : { private "_turrets"; - _turrets = [typeOf _vehicle] call FUNC(getTurretsOther); + _turrets = [_vehicle] call FUNC(getTurretsOther); if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then { _script = [ @@ -127,7 +127,7 @@ switch (_position) do { case "ffv" : { private "_turrets"; - _turrets = [typeOf _vehicle] call FUNC(getTurretsFFV); + _turrets = [_vehicle] call FUNC(getTurretsFFV); if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then { _script = [ diff --git a/addons/common/functions/fnc_getSettingData.sqf b/addons/common/functions/fnc_getSettingData.sqf index 3dd2582860..a3733560da 100644 --- a/addons/common/functions/fnc_getSettingData.sqf +++ b/addons/common/functions/fnc_getSettingData.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Returns the metadata of a setting if it exists * * Arguments: diff --git a/addons/common/functions/fnc_getTurretCommander.sqf b/addons/common/functions/fnc_getTurretCommander.sqf index 4c2b1139c8..b26060b221 100644 --- a/addons/common/functions/fnc_getTurretCommander.sqf +++ b/addons/common/functions/fnc_getTurretCommander.sqf @@ -4,7 +4,7 @@ * Get the turret index of a vehicles commander. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret index of the vehicles commander. Empty array means no observer position. (Array) @@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"]; _vehicle = _this select 0; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretCopilot.sqf b/addons/common/functions/fnc_getTurretCopilot.sqf index c2a7e81778..9f51f8724c 100644 --- a/addons/common/functions/fnc_getTurretCopilot.sqf +++ b/addons/common/functions/fnc_getTurretCopilot.sqf @@ -4,7 +4,7 @@ * Get the turret index of a vehicles copilot. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret index of the vehicles gunner. Empty array means no copilot position. (Array) @@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"]; _vehicle = _this select 0; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretGunner.sqf b/addons/common/functions/fnc_getTurretGunner.sqf index fd1134dc83..ba1802c37f 100644 --- a/addons/common/functions/fnc_getTurretGunner.sqf +++ b/addons/common/functions/fnc_getTurretGunner.sqf @@ -4,7 +4,7 @@ * Get the turret index of a vehicles gunner. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret index of the vehicles gunner. Empty array means no gunner position. (Array) @@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"]; _vehicle = _this select 0; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index fd75d221fd..85d69b6828 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -18,7 +18,6 @@ _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {[]}; -//_turrets = [typeOf _vehicle] call FUNC(getTurrets); _turrets = allTurrets [_vehicle, true]; _units = []; diff --git a/addons/common/functions/fnc_getTurretsFFV.sqf b/addons/common/functions/fnc_getTurretsFFV.sqf index b09dfed027..f915d6c096 100644 --- a/addons/common/functions/fnc_getTurretsFFV.sqf +++ b/addons/common/functions/fnc_getTurretsFFV.sqf @@ -4,7 +4,7 @@ * Get the turret indices of ffv turrets. * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret index of the vehicles gunner. Empty array means no ffv turrets. (Array) @@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"]; _vehicle = _this select 0; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getTurretsOther.sqf b/addons/common/functions/fnc_getTurretsOther.sqf index 53673b5a8d..102c1a9d1c 100644 --- a/addons/common/functions/fnc_getTurretsOther.sqf +++ b/addons/common/functions/fnc_getTurretsOther.sqf @@ -4,7 +4,7 @@ * Get the turret indices of other turrets (not gunner, commander, copilot or ffv). * * Argument: - * 0: Vehicle type (String) + * 0: Vehicle (Object) * * Return value: * Turret index of the vehicles gunner. Empty array means no other turrets. (Array) @@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"]; _vehicle = _this select 0; -_turrets = [_vehicle] call FUNC(getTurrets); +_turrets = allTurrets [_vehicle, true]; _turret = []; { - _config = configFile >> "CfgVehicles" >> _vehicle; + _config = configFile >> "CfgVehicles" >> typeOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/weaponselect/functions/fnc_getWeaponModes.sqf b/addons/common/functions/fnc_getWeaponModes.sqf similarity index 100% rename from addons/weaponselect/functions/fnc_getWeaponModes.sqf rename to addons/common/functions/fnc_getWeaponModes.sqf diff --git a/addons/weaponselect/functions/fnc_getWeaponMuzzles.sqf b/addons/common/functions/fnc_getWeaponMuzzles.sqf similarity index 100% rename from addons/weaponselect/functions/fnc_getWeaponMuzzles.sqf rename to addons/common/functions/fnc_getWeaponMuzzles.sqf diff --git a/addons/common/functions/fnc_getWeaponState.sqf b/addons/common/functions/fnc_getWeaponState.sqf new file mode 100644 index 0000000000..4ec54cc787 --- /dev/null +++ b/addons/common/functions/fnc_getWeaponState.sqf @@ -0,0 +1,73 @@ +/* + * Author: commy2 + * + * Return current state of the weapon. Attachments and magazines with ammo. + * + * Argument: + * 0: A unit (Object) + * 1: A weapon (String) + * + * Return value: + * Weapon info, format: [attachments, muzzles, magazines, ammo] (Array) + */ + #include "script_component.hpp" + +private ["_unit", "_weapon"]; + +_unit = _this select 0; +_weapon = _this select 1; + +private "_muzzles"; +_muzzles = [_weapon] call FUNC(getWeaponMuzzles); + +private "_weaponInfo"; +_weaponInfo = []; + +switch (_weapon) do { + case (primaryWeapon _unit): { + _weaponInfo pushBack primaryWeaponItems _unit; + + }; + + case (secondaryWeapon _unit): { + _weaponInfo pushBack secondaryWeaponItems _unit; + + }; + + case (handgunWeapon _unit): { + _weaponInfo pushBack handgunItems _unit; + + }; + + default { + _weaponInfo pushBack ["","","",""]; + + }; +}; + +// get loaded magazines and ammo +private ["_magazines", "_ammo"]; + +_magazines = []; +_ammo = []; + +{ + _magazines pushBack ""; + _ammo pushBack 0; +} forEach _muzzles; + +{ + if (_x select 2) then { + private "_index"; + _index = _muzzles find (_x select 4); + + if (_index != -1) then { + _magazines set [_index, _x select 0]; + _ammo set [_index, _x select 1]; + }; + }; +} forEach magazinesAmmoFull _unit; + +_weaponInfo append [_muzzles, _magazines, _ammo]; + +_weaponInfo diff --git a/addons/common/functions/fnc_hadamardProduct.sqf b/addons/common/functions/fnc_hadamardProduct.sqf index dd614f8dd0..db52a48d80 100644 --- a/addons/common/functions/fnc_hadamardProduct.sqf +++ b/addons/common/functions/fnc_hadamardProduct.sqf @@ -19,7 +19,7 @@ _vector2 = _this select 1; _newVector = []; for "_i" from 0 to (((count _vector1) min (count _vector2)) - 1) do { - _newVector = _newVector + [(_vector1 select _i) * (_vector2 select _i)]; + _newVector pushBack ((_vector1 select _i) * (_vector2 select _i)); }; _newVector diff --git a/addons/common/functions/fnc_limitMovementSpeed.sqf b/addons/common/functions/fnc_limitMovementSpeed.sqf deleted file mode 100644 index ad3d08c66c..0000000000 --- a/addons/common/functions/fnc_limitMovementSpeed.sqf +++ /dev/null @@ -1,53 +0,0 @@ -/** - * fn_limitMovementSpeed.sqf - * @Descr: Limits the movement speed of a unit - * @Author: Glowbal - * - * @Arguments: [unit OBJECT, fallDown BOOL (Optional)] - * @Return: void - * @PublicAPI: true - */ - -#include "script_component.hpp" - -private ["_unit","_carriedObj"]; -_unit = _this select 0; -_fallDown = false; -if (count _this > 1) then { - _fallDown = _this select 1; -}; - -if ((_unit getvariable [QGVAR(limitMovementSpeed),false])) exitwith { - _unit setvariable [QGVAR(limitMovementSpeed),nil,true]; -}; - -[{ - private["_unit","_fallDown","_carriedObj"]; - _unit = (_this select 0) select 0; - _fallDown = (_this select 0) select 1; - - _carriedObj = [_unit] call FUNC(getCarriedObj); - - if !(_unit getvariable [QGVAR(limitMovementSpeed),false]) exitwith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; - }; - if !((!isNull _carriedObj) && (alive _unit)) exitwith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; - }; - - if (speed _unit > 12 && vehicle _unit == _unit && isTouchingGround _unit) then { - - _unit setVelocity [0,0,0]; - - if (_fallDown) then { - _unit playMove "amovppnemstpsraswrfldnon"; - }; - - if (_carriedObj isKindOf "Man") then { - hint "You can not move this fast while transporting this person."; - } else { - hint "You can not move this fast while carrying this object"; - }; - [_unit,ObjNull] call FUNC(carryObj); - }; -}, 0.5, [_unit,_fallDown] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index 0d2995db1b..53bf51d599 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -35,8 +35,6 @@ if (_unit distance _loadcar <= 10) then { }; if (!isNull _vehicle) then { [_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide); - [_caller,objNull] call FUNC(carryObj); - [_unit,objNull] call FUNC(carryObj); [[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc); }; _vehicle \ No newline at end of file diff --git a/addons/common/functions/fnc_loadSettingsFromProfile.sqf b/addons/common/functions/fnc_loadSettingsFromProfile.sqf index 1e8e9001aa..69d86eac98 100644 --- a/addons/common/functions/fnc_loadSettingsFromProfile.sqf +++ b/addons/common/functions/fnc_loadSettingsFromProfile.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Load the user setable settings from the user profile. * Config < Server UserConfig < Mission Config < Client settings * diff --git a/addons/common/functions/fnc_loadSettingsOnServer.sqf b/addons/common/functions/fnc_loadSettingsOnServer.sqf index 20a7e1c40f..2548c44bec 100644 --- a/addons/common/functions/fnc_loadSettingsOnServer.sqf +++ b/addons/common/functions/fnc_loadSettingsOnServer.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Load the parameters on the server. * Config < Server UserConfig < Mission Config * diff --git a/addons/common/functions/fnc_logControls.sqf b/addons/common/functions/fnc_logControls.sqf index 5a0a17c317..5bcaea779b 100644 --- a/addons/common/functions/fnc_logControls.sqf +++ b/addons/common/functions/fnc_logControls.sqf @@ -1,15 +1,4 @@ // by commy2 #include "script_component.hpp" -private ["_array", "_index"]; - -_array = []; - -for "_index" from 0 to 10000 do { - if (str (findDisplay _this displayCtrl _index) != "No control") then { - diag_log text str (findDisplay _this displayCtrl _index); - _array pushBack _index; - }; -}; - -_array; +[allControls findDisplay _this, {ctrlIDC _this}] call FUNC(map) diff --git a/addons/common/functions/fnc_logDisplays.sqf b/addons/common/functions/fnc_logDisplays.sqf index 81598facf4..0ab4fbe5bc 100644 --- a/addons/common/functions/fnc_logDisplays.sqf +++ b/addons/common/functions/fnc_logDisplays.sqf @@ -1,15 +1,4 @@ // by commy2 #include "script_component.hpp" -private ["_array", "_index"]; - -_array = []; - -for "_index" from 0 to 10000 do { - if (str (findDisplay _index) != "No Display") then { - diag_log text str findDisplay _index; - _array pushBack _index; - }; -}; - -_array; +[allDisplays, {ctrlIDD _this}] call FUNC(map) diff --git a/addons/common/functions/fnc_numberToDigits.sqf b/addons/common/functions/fnc_numberToDigits.sqf index 465955b455..fe62ab626b 100644 --- a/addons/common/functions/fnc_numberToDigits.sqf +++ b/addons/common/functions/fnc_numberToDigits.sqf @@ -12,33 +12,29 @@ */ #include "script_component.hpp" -private ["_number", "_minLength", "_length", "_digits", "_index", "_count"]; +private ["_number", "_minLength", "_length", "_digits"]; _number = _this select 0; _minLength = _this select 1; _number = _number min 999999; -_length = floor (log _number + 1); -if !(isNil "_minLength") then {_length = (_length max _minLength) min 6}; +_number = str _number; + +_length = count _number; + +if (isNil "_minLength") then {_minLength = _length}; + +_minLength = _minLength min 6; + +while {_length < _minLength} do { + _number = "0" + _number; + _length = _length + 1; +}; _digits = []; - -if (_number < 1) exitWith { - for "_index" from 0 to (_length - 1) do { - _digits set [_index, 0]; - }; - _digits +for "_x" from 0 to (_length - 1) do { + _digits pushBack parseNumber (_number select [_x, 1]); }; -while { - _count = count _digits; - _count < _length -} do { - _digit = floor (_number / (10 ^ (_length - _count - 1))); - { - _digit = _digit - _x * (10 ^ (_count - _forEachIndex)); - } forEach _digits; - _digits set [_count, _digit]; -}; _digits diff --git a/addons/common/functions/fnc_numberToDigitsString.sqf b/addons/common/functions/fnc_numberToDigitsString.sqf index db4e33e6cb..24b3791d68 100644 --- a/addons/common/functions/fnc_numberToDigitsString.sqf +++ b/addons/common/functions/fnc_numberToDigitsString.sqf @@ -12,14 +12,24 @@ */ #include "script_component.hpp" -private ["_digits", "_count", "_string", "_index"]; +private ["_number", "_minLength", "_length"]; -_digits = _this call FUNC(numberToDigits); +_number = _this select 0; +_minLength = _this select 1; -_count = count _digits; +_number = _number min 999999; -_string = ""; -for "_index" from 0 to (_count - 1) do { - _string = _string + str (_digits select _index); +_number = str _number; + +_length = count _number; + +if (isNil "_minLength") then {_minLength = _length}; + +_minLength = _minLength min 6; + +while {_length < _minLength} do { + _number = "0" + _number; + _length = _length + 1; }; -_string + +_number diff --git a/addons/common/functions/fnc_positionToASL.sqf b/addons/common/functions/fnc_positionToASL.sqf index 916184eb33..d933e67125 100644 --- a/addons/common/functions/fnc_positionToASL.sqf +++ b/addons/common/functions/fnc_positionToASL.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Converts Arma "Position" to ASL * * Arguments: diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 69b91237e6..3191a57d72 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -53,6 +53,7 @@ _perFrameFunction = { _elapsedTime = time - _startTime; _errorCode = -1; + // this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all. if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then { _errorCode = 1; } else { diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index 0f3ab447b1..c92bb4ab94 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module. * Must be called on the server, effect is global. diff --git a/addons/common/functions/fnc_removeCameraEventHandler.sqf b/addons/common/functions/fnc_removeCameraEventHandler.sqf deleted file mode 100644 index 0fe8953078..0000000000 --- a/addons/common/functions/fnc_removeCameraEventHandler.sqf +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Author: commy2 - * - * Remove a camera view event handler. - * - * Argument: - * 0: ID of the event handler (Number) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; - -_id = _this select 0; - -_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]]; - -_currentId = _actionsVar select 0; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -_id = _actionIDs find _id; - -if (_id == -1) exitWith {}; - -_actionIDs set [_id, -1]; -_actionIDs = _actionIDs - [-1]; - -_actions set [_id, []];//{} -_actions = _actions - [[]];//[{}] - -missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_currentId, _actionIDs, _actions]]; diff --git a/addons/common/functions/fnc_removeCustomEventHandler.sqf b/addons/common/functions/fnc_removeCustomEventHandler.sqf deleted file mode 100644 index 771ea9f5bf..0000000000 --- a/addons/common/functions/fnc_removeCustomEventHandler.sqf +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Author: commy2 - * - * Remove a custom event handler from an object. - * - * Argument: - * 0: Unit the event handler is assigned to or namespace (Object OR Namespace) - * 1: Name of the event (String) - * 2: ID of the event handler (Number) - * - * Return value: - * None. - */ -#include "script_component.hpp" - -private ["_object", "_type", "_id", "_name", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; - -_object = _this select 0; -_type = _this select 1; -_id = _this select 2; - -_name = format ["ACE_CustomEventHandlers_%1", _type]; - -_actionsVar = _object getVariable [_name, [-1, [], []]]; - -_currentId = _actionsVar select 0; -_actionIDs = _actionsVar select 1; -_actions = _actionsVar select 2; - -_id = _actionIDs find _id; - -if (_id == -1) exitWith {}; - -_actionIDs set [_id, -1]; -_actionIDs = _actionIDs - [-1]; - -_actions set [_id, []];//{} -_actions = _actions - [[]];//[{}] - -_object setVariable [_name, [_currentId, _actionIDs, _actions]]; diff --git a/addons/common/functions/fnc_removeSpecificMagazine.sqf b/addons/common/functions/fnc_removeSpecificMagazine.sqf index 7f29cf979c..ec24dbf618 100644 --- a/addons/common/functions/fnc_removeSpecificMagazine.sqf +++ b/addons/common/functions/fnc_removeSpecificMagazine.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Removes a magazine from the unit that has an specific ammo count * * Argument: diff --git a/addons/common/functions/fnc_sanitizeString.sqf b/addons/common/functions/fnc_sanitizeString.sqf index 44717915db..85f743150e 100644 --- a/addons/common/functions/fnc_sanitizeString.sqf +++ b/addons/common/functions/fnc_sanitizeString.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard, based on Killzone-Kid code + * Author: esteldunedain, based on Killzone-Kid code * * Removes quotation marks to avoid exploits and optionally html tags from text to avoid conflicts with structured text. * diff --git a/addons/common/functions/fnc_serverLog.sqf b/addons/common/functions/fnc_serverLog.sqf index e2c981302d..058b68b3cc 100644 --- a/addons/common/functions/fnc_serverLog.sqf +++ b/addons/common/functions/fnc_serverLog.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" if (isServer) then { diff --git a/addons/common/functions/fnc_setCarriedBy.sqf b/addons/common/functions/fnc_setCarriedBy.sqf deleted file mode 100644 index 2ea5f3f469..0000000000 --- a/addons/common/functions/fnc_setCarriedBy.sqf +++ /dev/null @@ -1,21 +0,0 @@ -/** - * fn_setCarriedBy.sqf - * @Descr: Registers an object being carried by another object - * @Author: Glowbal - * - * @Arguments: [unitToBeCarried OBJECT, objectCarrying OBJECT] - * @Return: BOOL True if succesfully registered - * @PublicAPI: false - */ - -#include "script_component.hpp" - -private ["_unit","_to","_return"]; -_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param; -_to = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param; -_return = false; -if ((isNull ([_unit] call FUNC(getCarriedBy))) || isNull _to) then { - _return = true; - _unit setvariable [QGVAR(carriedBy),_to,true]; -}; -_return \ No newline at end of file diff --git a/addons/common/functions/fnc_setParameter.sqf b/addons/common/functions/fnc_setParameter.sqf index 889c242bb3..4dbc5fc84e 100644 --- a/addons/common/functions/fnc_setParameter.sqf +++ b/addons/common/functions/fnc_setParameter.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Sets the value of an ACE_Parameter and makes it public. * diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index ae4b1d6655..67068c6ad1 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Change the value of an existing setting if it was not previously forced. Force if neccesary. * If executed on clients it has local effect. * If executed on server it can have global effect if the last parameter is set to true. diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf index 27c727acab..9d93b9e62d 100644 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ b/addons/common/functions/fnc_setSettingFromConfig.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Load a setting from config if it was not previosuly forced. Force if neccesary. * * Arguments: diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index 6953d39fb5..e5e30b6664 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Schedules the publishment of an object variable to reduce network overhead * * Arguments: diff --git a/addons/common/functions/fnc_toHex.sqf b/addons/common/functions/fnc_toHex.sqf index df8f3654de..2d7d7a383e 100644 --- a/addons/common/functions/fnc_toHex.sqf +++ b/addons/common/functions/fnc_toHex.sqf @@ -1,47 +1,48 @@ /* -Author: commy2 +Author: commy2, esteldunedain Description: Converts number to hexadecimal number Arguments: -A number +A number between 0 and 255 Return Value: A hexadecimal number, String */ #include "script_component.hpp" -private ["_number", "_minLength", "_sign", "_hex", "_rest"]; +private ["_number"]; +_number = ((round abs (_this select 0)) max 0) min 255; -_number = _this select 0; -_minLength = _this select 1; +if (isNil QGVAR(hexArray)) then { + private ["_minLength", "_i", "_num", "_hex", "_rest"]; -if (isNil "_minLength") then {_minLength = 1}; + GVAR(hexArray) = []; + _minLength = 2; + for [{_i = 0;}, {_i < 256}, {_i = _i + 1}] do { + _num = _i; + _hex = ["", "0"] select (_i == 0); -_sign = ["", "-"] select (_number < 0); - -_number = round abs _number; -_hex = ["", "0"] select (_number == 0); - -while {_number > 0} do { - _rest = _number mod 16; - _rest = switch _rest do { - case 10 : {"A"}; - case 11 : {"B"}; - case 12 : {"C"}; - case 13 : {"D"}; - case 14 : {"E"}; - case 15 : {"F"}; - default {str _rest}; - }; - _number = floor (_number / 16); - - _hex = _rest + _hex; + while {_num > 0} do { + _rest = _num mod 16; + _rest = switch _rest do { + case 10 : {"A"}; + case 11 : {"B"}; + case 12 : {"C"}; + case 13 : {"D"}; + case 14 : {"E"}; + case 15 : {"F"}; + default {str _rest}; + }; + _num = floor (_num / 16); + _hex = _rest + _hex; + }; + while {count toArray _hex < _minLength} do { + _hex = "0" + _hex; + }; + GVAR(hexArray) pushBack _hex; + }; }; -while {count toArray _hex < _minLength} do { - _hex = "0" + _hex; -}; - -_sign + _hex +(GVAR(hexArray) select _number) diff --git a/addons/common/functions/fnc_waitAndExecute.sqf b/addons/common/functions/fnc_waitAndExecute.sqf index 7b106cc0c1..777cd72c0a 100644 --- a/addons/common/functions/fnc_waitAndExecute.sqf +++ b/addons/common/functions/fnc_waitAndExecute.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Executes a code once with a given game time delay, using a PFH * diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index d1462c1214..71d7bcd5a0 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -339,6 +339,13 @@ The color of the text font from the ACE hints. This color is the default color for all text displayed through the ACE Hint system, if the hint text has no other color specified. + + + Banana + + + A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa. + \ No newline at end of file diff --git a/addons/disposable/CfgEventHandlers.hpp b/addons/disposable/CfgEventHandlers.hpp index 304f304774..02d0cb625f 100644 --- a/addons/disposable/CfgEventHandlers.hpp +++ b/addons/disposable/CfgEventHandlers.hpp @@ -1,44 +1,44 @@ class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_preInit) ); - }; + class ADDON { + init = QUOTE( call COMPILE_FILE(XEH_preInit) ); + }; }; class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) ); - }; + class ADDON { + clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) ); + }; }; class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - firedBIS = QUOTE( _this call FUNC(replaceATWeapon) ); + class CAManBase { + class ADDON { + firedBIS = QUOTE( _this call FUNC(replaceATWeapon) ); + }; }; - }; }; // handle preloaded missile class Extended_Init_EventHandlers { - class CAManBase { - class ADDON { - init = QUOTE( _this call FUNC(takeLoadedATWeapon) ); + class CAManBase { + class ADDON { + init = QUOTE( _this call FUNC(takeLoadedATWeapon) ); + }; }; - }; }; class Extended_Take_EventHandlers { - class CAManBase { - class ADDON { - take = QUOTE( _this call FUNC(takeLoadedATWeapon); [_this select 0] call FUNC(updateInventoryDisplay); ); + class CAManBase { + class ADDON { + take = QUOTE( _this call FUNC(takeLoadedATWeapon); [_this select 0] call FUNC(updateInventoryDisplay); ); + }; }; - }; }; class Extended_Put_EventHandlers { - class CAManBase { - class ADDON { - put = QUOTE( [_this select 0] call FUNC(updateInventoryDisplay); ); + class CAManBase { + class ADDON { + put = QUOTE( [_this select 0] call FUNC(updateInventoryDisplay); ); + }; }; - }; }; diff --git a/addons/disposable/CfgMagazines.hpp b/addons/disposable/CfgMagazines.hpp index 993d53f46c..8fbae08dfd 100644 --- a/addons/disposable/CfgMagazines.hpp +++ b/addons/disposable/CfgMagazines.hpp @@ -1,24 +1,24 @@ class CfgMagazines { - class NLAW_F; - class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine - author = "$STR_ACE_Common_ACETeam"; - scope = 1; - displayName = "$STR_ACE_Disposable_PreloadedMissileDummy"; - picture = PATHTOEF(common,UI\blank_CO.paa); - weaponPoolAvailable = 0; - mass = 0; - }; - class ACE_FiredMissileDummy: ACE_PreloadedMissileDummy { - count = 0; - }; - class ACE_UsedTube_F: NLAW_F { - author = "$STR_ACE_Common_ACETeam"; - displayName = "$STR_ACE_Disposable_UsedTube"; - descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription"; - displayNameShort = "-"; - count = 0; - weaponPoolAvailable = 0; - modelSpecial = ""; - mass = 0; - }; + class NLAW_F; + class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine + author = "$STR_ACE_Common_ACETeam"; + scope = 1; + displayName = "$STR_ACE_Disposable_PreloadedMissileDummy"; + picture = PATHTOEF(common,UI\blank_CO.paa); + weaponPoolAvailable = 0; + mass = 0; + }; + class ACE_FiredMissileDummy: ACE_PreloadedMissileDummy { + count = 0; + }; + class ACE_UsedTube_F: NLAW_F { + author = "$STR_ACE_Common_ACETeam"; + displayName = "$STR_ACE_Disposable_UsedTube"; + descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription"; + displayNameShort = "-"; + count = 0; + weaponPoolAvailable = 0; + modelSpecial = ""; + mass = 0; + }; }; diff --git a/addons/disposable/CfgVehicles.hpp b/addons/disposable/CfgVehicles.hpp index b3b9436484..13d4cedf4b 100644 --- a/addons/disposable/CfgVehicles.hpp +++ b/addons/disposable/CfgVehicles.hpp @@ -1,146 +1,146 @@ class CfgVehicles { - #define MACRO_NONLAW \ - class TransportMagazines { \ - class _xx_NLAW_F { \ - count = 0; \ - }; \ +#define MACRO_NONLAW \ + class TransportMagazines { \ + class _xx_NLAW_F { \ + count = 0; \ + }; \ + }; + + class ReammoBox_F; + class NATO_Box_Base: ReammoBox_F {}; + class Box_NATO_Ammo_F: NATO_Box_Base { + MACRO_NONLAW + }; + class Box_NATO_WpsLaunch_F: NATO_Box_Base { + MACRO_NONLAW }; - class ReammoBox_F; - class NATO_Box_Base: ReammoBox_F {}; - class Box_NATO_Ammo_F: NATO_Box_Base { - MACRO_NONLAW - }; - class Box_NATO_WpsLaunch_F: NATO_Box_Base { - MACRO_NONLAW - }; + class IND_Box_Base: ReammoBox_F {}; + class Box_IND_WpsLaunch_F: IND_Box_Base { + MACRO_NONLAW + }; + class Box_IND_Ammo_F: IND_Box_Base { + MACRO_NONLAW + }; - class IND_Box_Base: ReammoBox_F {}; - class Box_IND_WpsLaunch_F: IND_Box_Base { - MACRO_NONLAW - }; - class Box_IND_Ammo_F: IND_Box_Base { - MACRO_NONLAW - }; + class B_supplyCrate_F: ReammoBox_F { + MACRO_NONLAW + }; + class I_supplyCrate_F: B_supplyCrate_F { + MACRO_NONLAW + }; + class C_supplyCrate_F: ReammoBox_F { + MACRO_NONLAW + }; - class B_supplyCrate_F: ReammoBox_F { - MACRO_NONLAW - }; - class I_supplyCrate_F: B_supplyCrate_F { - MACRO_NONLAW - }; - class C_supplyCrate_F: ReammoBox_F { - MACRO_NONLAW - }; + class B_AssaultPack_rgr; + class B_AssaultPack_rgr_LAT: B_AssaultPack_rgr { + MACRO_NONLAW + }; + class B_AssaultPack_rgr_ReconLAT: B_AssaultPack_rgr { + MACRO_NONLAW + }; - class B_AssaultPack_rgr; - class B_AssaultPack_rgr_LAT: B_AssaultPack_rgr { - MACRO_NONLAW - }; - class B_AssaultPack_rgr_ReconLAT: B_AssaultPack_rgr { - MACRO_NONLAW - }; + class B_Carryall_mcamo; + class B_AssaultPack_mcamo_Ammo: B_Carryall_mcamo { + MACRO_NONLAW + }; + class B_Carryall_oli; + class I_Fieldpack_oli_Ammo: B_Carryall_oli { + MACRO_NONLAW + }; - class B_Carryall_mcamo; - class B_AssaultPack_mcamo_Ammo: B_Carryall_mcamo { - MACRO_NONLAW - }; - class B_Carryall_oli; - class I_Fieldpack_oli_Ammo: B_Carryall_oli { - MACRO_NONLAW - }; + class B_AssaultPack_dgtl; + class I_Fieldpack_oli_LAT: B_AssaultPack_dgtl { + MACRO_NONLAW + }; - class B_AssaultPack_dgtl; - class I_Fieldpack_oli_LAT: B_AssaultPack_dgtl { - MACRO_NONLAW - }; + class CargoNet_01_ammo_base_F; + class B_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F { + MACRO_NONLAW + }; + class I_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F { + MACRO_NONLAW + }; - class CargoNet_01_ammo_base_F; - class B_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F { - MACRO_NONLAW - }; - class I_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F { - MACRO_NONLAW - }; + class Slingload_01_Base_F; + class B_Slingload_01_Cargo_F: Slingload_01_Base_F { + MACRO_NONLAW + }; - class Slingload_01_Base_F; - class B_Slingload_01_Cargo_F: Slingload_01_Base_F { + class Tank_F; + class APC_Tracked_01_base_F: Tank_F { + MACRO_NONLAW + }; + /*class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F { MACRO_NONLAW - }; - - class Tank_F; - class APC_Tracked_01_base_F: Tank_F { - MACRO_NONLAW - }; - /*class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F { - MACRO_NONLAW - }; - class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { - MACRO_NONLAW - }; - class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { - MACRO_NONLAW - }; - class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { - MACRO_NONLAW - };*/ - - class Car_F; - class MRAP_01_base_F: Car_F { - MACRO_NONLAW - }; - /*class MRAP_01_gmg_base_F: MRAP_01_base_F { - MACRO_NONLAW - }; - class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F { - MACRO_NONLAW - }; - class B_MRAP_01_F: MRAP_01_base_F { - MACRO_NONLAW - }; - class B_MRAP_01_gmg_F: MRAP_01_gmg_base_F { - MACRO_NONLAW - }; - class B_MRAP_01_hmg_F: MRAP_01_hmg_base_F { - MACRO_NONLAW - };*/ - - class MRAP_03_base_F: Car_F { - MACRO_NONLAW - }; - /*class MRAP_03_hmg_base_F: MRAP_03_base_F { - MACRO_NONLAW - }; - class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F { - MACRO_NONLAW - }; - class I_MRAP_03_F: MRAP_03_base_F { - MACRO_NONLAW - }; - class I_MRAP_03_hmg_F: MRAP_03_hmg_base_F { - MACRO_NONLAW - }; - class I_MRAP_03_gmg_F: MRAP_03_gmg_base_F { - MACRO_NONLAW - };*/ - - class Wheeled_APC_F: Car_F {}; - class APC_Wheeled_03_base_F: Wheeled_APC_F { - MACRO_NONLAW - }; - class APC_Wheeled_01_base_F: Wheeled_APC_F { - MACRO_NONLAW - }; - /*class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F { - MACRO_NONLAW - }; - class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { - MACRO_NONLAW - }; - class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F { - MACRO_NONLAW - }; - class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F { - MACRO_NONLAW - };*/ +}; +class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { + MACRO_NONLAW +}; +class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { + MACRO_NONLAW +}; +class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { + MACRO_NONLAW +};*/ + + class Car_F; + class MRAP_01_base_F: Car_F { + MACRO_NONLAW + }; + /*class MRAP_01_gmg_base_F: MRAP_01_base_F { + MACRO_NONLAW +}; +class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F { + MACRO_NONLAW +}; +class B_MRAP_01_F: MRAP_01_base_F { + MACRO_NONLAW +}; +class B_MRAP_01_gmg_F: MRAP_01_gmg_base_F { + MACRO_NONLAW +}; +class B_MRAP_01_hmg_F: MRAP_01_hmg_base_F { + MACRO_NONLAW +};*/ + + class MRAP_03_base_F: Car_F { + MACRO_NONLAW + }; + /*class MRAP_03_hmg_base_F: MRAP_03_base_F { + MACRO_NONLAW +}; +class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F { + MACRO_NONLAW +}; +class I_MRAP_03_F: MRAP_03_base_F { + MACRO_NONLAW +}; +class I_MRAP_03_hmg_F: MRAP_03_hmg_base_F { + MACRO_NONLAW +}; +class I_MRAP_03_gmg_F: MRAP_03_gmg_base_F { + MACRO_NONLAW +};*/ + + class Wheeled_APC_F: Car_F {}; + class APC_Wheeled_03_base_F: Wheeled_APC_F { + MACRO_NONLAW + }; + class APC_Wheeled_01_base_F: Wheeled_APC_F { + MACRO_NONLAW + }; + /*class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F { + MACRO_NONLAW +}; +class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { + MACRO_NONLAW +}; +class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F { + MACRO_NONLAW +}; +class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F { + MACRO_NONLAW +};*/ }; diff --git a/addons/disposable/CfgWeapons.hpp b/addons/disposable/CfgWeapons.hpp index 4bd36ce3ed..965d97521c 100644 --- a/addons/disposable/CfgWeapons.hpp +++ b/addons/disposable/CfgWeapons.hpp @@ -1,18 +1,18 @@ class CfgWeapons { - class Launcher_Base_F; - class launch_NLAW_F: Launcher_Base_F { - ACE_UsedTube = "ACE_launch_NLAW_Used_F"; // The class name of the used tube. - magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine - }; - class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher - scope = 1; - ACE_isUsedLauncher = 1; - author = "$STR_ACE_Common_ACETeam"; - displayName = "$STR_ACE_Disposable_UsedTube"; - descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription"; - magazines[] = {"ACE_FiredMissileDummy"}; // This will disable the used launcher class from being fired again. - //picture = ""; @todo - //model = ""; @todo - weaponPoolAvailable = 0; - }; + class Launcher_Base_F; + class launch_NLAW_F: Launcher_Base_F { + ACE_UsedTube = "ACE_launch_NLAW_Used_F"; // The class name of the used tube. + magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine + }; + class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher + scope = 1; + ACE_isUsedLauncher = 1; + author = "$STR_ACE_Common_ACETeam"; + displayName = "$STR_ACE_Disposable_UsedTube"; + descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription"; + magazines[] = {"ACE_FiredMissileDummy"}; // This will disable the used launcher class from being fired again. + //picture = ""; @todo + //model = ""; @todo + weaponPoolAvailable = 0; + }; }; diff --git a/addons/disposable/README.md b/addons/disposable/README.md index 7dd85fff32..73418cd49d 100644 --- a/addons/disposable/README.md +++ b/addons/disposable/README.md @@ -1,7 +1,7 @@ ace_disposable ============== -Makes the NLAW a disposable one-way weapon. +Makes the NLAW a disposable one-shot weapon. ## Maintainers diff --git a/addons/disposable/XEH_postInitClient.sqf b/addons/disposable/XEH_postInitClient.sqf index 17911f5da5..1fe598137f 100644 --- a/addons/disposable/XEH_postInitClient.sqf +++ b/addons/disposable/XEH_postInitClient.sqf @@ -4,10 +4,8 @@ #include "script_component.hpp" -if (isNil QGVAR(UpdateInventoryDisplay_EHID)) then { - GVAR(UpdateInventoryDisplay_EHID) = ["inventoryDisplayLoaded",{ +["inventoryDisplayLoaded",{ _player = ACE_player; - [_player, secondaryWeapon _player] call FUNC(takeLoadedATWeapon); + [_player] call FUNC(takeLoadedATWeapon); [_player, (_this select 0)] call FUNC(updateInventoryDisplay); - }] call EFUNC(common,addEventHandler); -}; +}] call EFUNC(common,addEventHandler); \ No newline at end of file diff --git a/addons/disposable/XEH_preInit.sqf b/addons/disposable/XEH_preInit.sqf index 26543c369a..020187b730 100644 --- a/addons/disposable/XEH_preInit.sqf +++ b/addons/disposable/XEH_preInit.sqf @@ -2,7 +2,6 @@ ADDON = false; -PREP(aiDropWeaponCallback); PREP(replaceATWeapon); PREP(takeLoadedATWeapon); PREP(updateInventoryDisplay); diff --git a/addons/disposable/config.cpp b/addons/disposable/config.cpp index be2b52735a..0f256824d7 100644 --- a/addons/disposable/config.cpp +++ b/addons/disposable/config.cpp @@ -1,15 +1,15 @@ #include "script_component.hpp" class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; - VERSION_CONFIG; - }; + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2/"; + VERSION_CONFIG; + }; }; #include "CfgEventHandlers.hpp" diff --git a/addons/disposable/functions/fnc_aiDropWeaponCallback.sqf b/addons/disposable/functions/fnc_aiDropWeaponCallback.sqf deleted file mode 100644 index f6947f7e44..0000000000 --- a/addons/disposable/functions/fnc_aiDropWeaponCallback.sqf +++ /dev/null @@ -1,32 +0,0 @@ -/* -* Author: bux, commy2 -* -* Remove the ai's missle launcher tube -* -* Return value: -* Nothing -*/ - -#include "script_component.hpp" - -private ["_unit", "_tube", "_projectile", "_logic"]; - -_unit = (_this select 0) select 0; -_tube = (_this select 0) select 1; -_projectile = (_this select 0) select 2; - -if (!isNull _projectile) exitWith {}; - -//remove frameEH -[(_this select 1)] call cba_fnc_removePerFrameHandler; - -if ([_unit] call EFUNC(common,isPlayer)) exitWith {}; //Just in case a player took control -if (!alive _unit) exitWith {}; //No point doing this for dead - -//If AI still has tube, throw it on ground -if (secondaryWeapon _unit == _tube) then { - _logic = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"]; - _logic addWeaponCargoGlobal [_tube, 1]; // @todo secondary weapon items - - _unit removeWeaponGlobal _tube; -}; diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index ea107d1643..8c55209123 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -1,38 +1,79 @@ /* - * Author: commy2 - * + * Author: bux, commy2 * Replace the disposable launcher with the used dummy. - * - * Argument: - * Input from "Fired" eventhandler - * - * Return value: + * + * Arguments: + * 0: unit - Object the event handler is assigned to + * 1: weapon - Fired weapon + * 2: muzzle - Muzzle that was used + * 3: mode - Current mode of the fired weapon + * 4: ammo - Ammo used + * 5: magazine - magazine name which was used + * 6: projectile - Object of the projectile that was shot + * + * Return Value: * Nothing + * + * Example: + * [fromBisFiredEH] call ace_disposable_fnc_replaceATWeapon; + * + * Public: No */ - #include "script_component.hpp" -private ["_unit", "_tube", "_projectile"]; +private ["_unit", "_weapon", "_projectile", "_replacementTube", "_items"]; _unit = _this select 0; -_tube = getText (configFile >> "CfgWeapons" >> (_this select 1) >> "ACE_UsedTube"); +_weapon = _this select 1; _projectile = _this select 6; if (!local _unit) exitWith {}; -if (_tube == "") exitWith {}; -private "_items"; +_replacementTube = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_UsedTube"); +if (_replacementTube == "") exitWith {}; //If no replacement defined just exit +if (_weapon != (secondaryWeapon _unit)) exitWith {}; //just to be sure + +//Save array of items attached to launcher _items = secondaryWeaponItems _unit; - -_unit addWeapon _tube; -_unit selectWeapon _tube; +//Replace the orginal weapon with the 'usedTube' weapon +_unit addWeapon _replacementTube; +//Makes sure the used tube is still equiped +_unit selectWeapon _replacementTube; +//Re-add all attachments to the used tube { - if (_x != "") then {_unit addSecondaryWeaponItem _x}; + if (_x != "") then {_unit addSecondaryWeaponItem _x}; } forEach _items; -// AI + +// AI - Remove the ai's missle launcher tube after the missle has exploded if !([_unit] call EFUNC(common,isPlayer)) then { - //waits until _projectile is null, so random 0-2 tickTime seconds after that - [FUNC(aiDropWeaponCallback), 2, [_unit, _tube, _projectile]] call CBA_fnc_addPerFrameHandler; + [{ + EXPLODE_2_PVT(_this,_params,_pfhId); + EXPLODE_3_PVT(_params,_unit,_tube,_projectile); + + //don't do anything until projectile is null (exploded/max range) + if (isNull _projectile) then { + //Remove PFEH: + [_pfhId] call cba_fnc_removePerFrameHandler; + + //If (tube is dropped) OR (is dead) OR (is player) just exit + if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {}; + + private ["_items", "_container"]; + + // _items = secondaryWeaponItems _unit; + _container = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"]; + _container setPosAsl (getPosAsl _unit); + _container addWeaponCargoGlobal [_tube, 1]; + + //This will duplicate attachements, because we will be adding a weapon that may already have attachments on it + //We either need a way to add a clean weapon, or a way to add a fully configured weapon to a container: + // { + // if (_x != "") then {_container addItemCargoGlobal [_x, 1];}; + // } forEach _items; + + _unit removeWeaponGlobal _tube; + }; + }, 1, [_unit, _replacementTube, _projectile]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf index ea1b1fb379..de3875dfa0 100644 --- a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf +++ b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf @@ -1,48 +1,50 @@ /* * Author: commy2 - * * Handle the take event. Add a dummy magazine if a disposable rocket launcher is taken. - * - * Argument: - * Input from "Take" eventhandler - * - * Return value: - * Nothing + * + * Arguments: + * 0: unit - Object the event handler is assigned to + * + * Return Value: + * None + * + * Example: + * [fromTakeEH] call ace_disposable_fnc_takeLoadedATWeapon; + * + * Public: No */ - #include "script_component.hpp" private ["_unit", "_launcher", "_config"]; -_unit = _this select 0; -_launcher = secondaryWeapon _unit; - +PARAMS_1(_unit); if (!local _unit) exitWith {}; +_launcher = secondaryWeapon _unit; _config = configFile >> "CfgWeapons" >> _launcher; if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber (_config >> "ACE_isUsedLauncher") != 1} && {count secondaryWeaponMagazine _unit == 0}) then { - private ["_magazine", "_isLauncherSelected"]; + private ["_magazine", "_isLauncherSelected"]; - _magazine = getArray (_config >> "magazines") select 0; + _magazine = getArray (_config >> "magazines") select 0; - _isLauncherSelected = currentWeapon _unit == _launcher; + _isLauncherSelected = currentWeapon _unit == _launcher; - _unit removeMagazines _magazine; + _unit removeMagazines _magazine; - if (backpack _unit == "") then { - _unit addBackpack "Bag_Base"; + if (backpack _unit == "") then { + _unit addBackpack "Bag_Base"; - _unit addMagazine _magazine; - _unit addWeapon _launcher; + _unit addMagazine _magazine; + _unit addWeapon _launcher; - removeBackpack _unit; - } else { - _unit addMagazine _magazine; - _unit addWeapon _launcher; - }; + removeBackpack _unit; + } else { + _unit addMagazine _magazine; + _unit addWeapon _launcher; + }; - if (_isLauncherSelected) then { - _unit selectWeapon _launcher; - }; + if (_isLauncherSelected) then { + _unit selectWeapon _launcher; + }; }; diff --git a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf index f33ed0dc73..3f9d6f9802 100644 --- a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf +++ b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf @@ -1,26 +1,28 @@ /* * Author: bux, commy2 - * * Hide or show the secondary weapon magazine inventory slot to prevent unloading of dummy magazines. - * - * Argument: - * 0: The player. (Object) - * - * Return value: - * Nothing + * + * Arguments: + * 0: unit - Object the event handler is assigned to + * + * Return Value: + * None + * + * Example: + * [player] call ace_disposable_fnc_updateInventoryDisplay; + * + * Public: No */ - #include "script_component.hpp" -private ["_player", "_display"]; +disableSerialization; -_player = _this select 0; +PARAMS_1(_player); +DEFAULT_PARAM(1,_display,(findDisplay 602)); _player removeMagazines "ACE_PreloadedMissileDummy"; _player removeMagazines "ACE_FiredMissileDummy"; -disableSerialization; -_display = [_this, 1, (findDisplay 602)] call BIS_fnc_param; if (isNull _display) exitWith {}; private ["_launcher", "_control", "_config"]; @@ -28,21 +30,21 @@ private ["_launcher", "_control", "_config"]; _launcher = secondaryWeapon _player; if (_launcher == "" || {getText (configFile >> "CfgWeapons" >> _launcher >> "ACE_UsedTube") == ""}) then { - _control = _display displayCtrl 627; - _config = configFile >> "RscDisplayInventory" >> "controls" >> "SlotSecondaryMagazine"; - _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; - _control ctrlCommit 0; + _control = _display displayCtrl 627; + _config = configFile >> "RscDisplayInventory" >> "controls" >> "SlotSecondaryMagazine"; + _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; + _control ctrlCommit 0; - _control = _display displayCtrl 1251; - _config = configFile >> "RscDisplayInventory" >> "controls" >> "BackgroundSlotSecondaryMagazine"; - _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; - _control ctrlCommit 0; + _control = _display displayCtrl 1251; + _config = configFile >> "RscDisplayInventory" >> "controls" >> "BackgroundSlotSecondaryMagazine"; + _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; + _control ctrlCommit 0; } else { - _control = _display displayCtrl 627; - _control ctrlSetPosition [0, 0, 0, 0]; - _control ctrlCommit 0; + _control = _display displayCtrl 627; + _control ctrlSetPosition [0, 0, 0, 0]; + _control ctrlCommit 0; - _control = _display displayCtrl 1251; - _control ctrlSetPosition [0, 0, 0, 0]; - _control ctrlCommit 0; + _control = _display displayCtrl 1251; + _control ctrlSetPosition [0, 0, 0, 0]; + _control ctrlCommit 0; }; diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index 6a6aa440f7..f568eace4e 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -13,6 +13,11 @@ class Extended_PostInit_EventHandlers { }; class Extended_Init_EventHandlers { + class CAManBase { + class ADDON { + init = QUOTE(_this call DFUNC(initPerson)); + }; + }; class StaticWeapon { class ADDON { init = QUOTE(_this call DFUNC(initObject)); diff --git a/addons/dragging/XEH_clientInit.sqf b/addons/dragging/XEH_clientInit.sqf index da9c6eefd6..21d699c688 100644 --- a/addons/dragging/XEH_clientInit.sqf +++ b/addons/dragging/XEH_clientInit.sqf @@ -16,4 +16,10 @@ if (isNil "ACE_maxWeightCarry") then { // release object on player change. This does work when returning to lobby, but not when hard disconnecting. ["playerChanged", {_this call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); +["playerVehicleChanged", {[ACE_player, objNull] call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerWeaponChanged", {_this call DFUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler); + +// handle waking up dragged unit and falling unconscious while dragging +["medical_onUnconscious", {_this call DFUNC(handleUnconscious)}] call EFUNC(common,addEventhandler); + +//@todo Captivity? diff --git a/addons/dragging/XEH_preInit.sqf b/addons/dragging/XEH_preInit.sqf index 7a0be053ad..f596a89493 100644 --- a/addons/dragging/XEH_preInit.sqf +++ b/addons/dragging/XEH_preInit.sqf @@ -18,10 +18,14 @@ PREP(handleKilled); PREP(handlePlayerChanged); PREP(handlePlayerWeaponChanged); PREP(handleScrollWheel); +PREP(handleUnconscious); PREP(initObject); +PREP(initPerson); PREP(isObjectOnObject); PREP(setCarryable); PREP(setDraggable); +PREP(startCarry); +PREP(startCarryPFH); PREP(startDrag); PREP(startDragPFH); diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 13402b53b5..dbbacae915 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -22,4 +22,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false}; -alive _target && {_target getVariable [QGVAR(canCarry), false]} +alive _target && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"]} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 9771496aa2..be3cda7e6c 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -22,4 +22,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false}; -alive _target && {_target getVariable [QGVAR(canDrag), false]} +alive _target && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"]} diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index 5fe3f36ccb..2037dfc3f0 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -17,37 +17,34 @@ private ["_unit", "_target"]; _unit = _this select 0; _target = _this select 1; -// check weight -private "_weight"; -_weight = [_target] call FUNC(getWeight); - -if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith { - [localize "STR_ACE_Dragging_UnableToDrag"] call EFUNC(common,displayTextStructured); -}; - -// select no weapon and stop sprinting -_unit action ["SwitchWeapon", _unit, _unit, 99]; - -[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus); - -// prevent multiple players from accessing the same object -[_unit, _target, true] call EFUNC(common,claim); - // get attachTo offset and direction. private ["_position", "_direction"]; _position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]]; _direction = _target getVariable [QGVAR(carryDirection), 0]; -// add height offset of model -private "_offset"; -_offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2); +// handle objects vs persons +if (_target isKindOf "CAManBase") then { -_position = _position vectorAdd [0, 0, _offset]; + [_unit, "AcinPercMstpSnonWnonDnon", 2, true] call EFUNC(common,doAnimation); + [_target, "AinjPfalMstpSnonWnonDf_carried_dead", 2, true] call EFUNC(common,doAnimation); -// attach object -_target attachTo [_unit, _position]; -_target setDir _direction; + // attach person + _target attachTo [_unit, _position, "LeftShoulder"]; + +} else { + + // add height offset of model + private "_offset"; + _offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2); + + _position = _position vectorAdd [0, 0, _offset]; + + // attach object + _target attachTo [_unit, _position]; + +}; +["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent); _unit setVariable [QGVAR(isCarrying), true, true]; _unit setVariable [QGVAR(carriedObject), _target, true]; @@ -74,7 +71,7 @@ _actionID = _unit addAction [ _unit setVariable [QGVAR(ReleaseActionID), _actionID]; // check everything -[FUNC(carryObjectPFH), 0, [_unit, _target]] call CBA_fnc_addPerFrameHandler; +[FUNC(carryObjectPFH), 0.5, [_unit, _target]] call CBA_fnc_addPerFrameHandler; // reset current dragging height. GVAR(currentHeightChange) = 0; diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index 81b2369624..8afa0f541a 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -1,11 +1,19 @@ // by commy2 #include "script_component.hpp" +#ifdef DEBUG_ENABLED_DRAGGING + systemChat format ["%1 carryObjectPFH running", time]; +#endif + private ["_unit", "_target"]; _unit = _this select 0 select 0; _target = _this select 0 select 1; +if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; +}; + // drop if the crate is destroyed if !([_target] call EFUNC(common,isAlive)) then { [_unit, _target] call FUNC(dropObject_carry); diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index 2f04e0e599..f614af9548 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -31,7 +31,11 @@ _position = _position vectorAdd [0, 0, _offset]; // attach object _target attachTo [_unit, _position]; -_target setDir _direction; +["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent); + +if (_target isKindOf "CAManBase") then { + [_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation); +}; _unit setVariable [QGVAR(isDragging), true, true]; _unit setVariable [QGVAR(draggedObject), _target, true]; @@ -58,7 +62,7 @@ _actionID = _unit addAction [ _unit setVariable [QGVAR(ReleaseActionID), _actionID]; // check everything -[FUNC(dragObjectPFH), 0, [_unit, _target]] call CBA_fnc_addPerFrameHandler; +[FUNC(dragObjectPFH), 0.5, [_unit, _target]] call CBA_fnc_addPerFrameHandler; // reset current dragging height. GVAR(currentHeightChange) = 0; diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index e741b01f17..2290c65e9d 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -1,11 +1,19 @@ // by commy2 #include "script_component.hpp" +#ifdef DEBUG_ENABLED_DRAGGING + systemChat format ["%1 dragObjectPFH running", time]; +#endif + private ["_unit", "_target"]; _unit = _this select 0 select 0; _target = _this select 0 select 1; +if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; +}; + // drop if the crate is destroyed if !([_target] call EFUNC(common,isAlive)) then { [_unit, _target] call FUNC(dropObject); diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 00aa7a6bca..489457bfbc 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -27,12 +27,20 @@ _inBuilding = [_unit] call FUNC(isObjectOnObject); _unit playAction "released"; // prevent collision damage -["fixCollision", _unit, _unit] call EFUNC(common,targetEvent); +["fixCollision", _unit] call EFUNC(common,localEvent); ["fixCollision", _target, _target] call EFUNC(common,targetEvent); // release object detach _target; +if (_target isKindOf "CAManBase") then { + if (_target getVariable ["ACE_isUnconscious", false]) then { + [_target, "unconscious", 2, true] call EFUNC(common,doAnimation); + } else { + [_target, "", 2, true] call EFUNC(common,doAnimation); //@todo "AinjPpneMrunSnonWnonDb_release" seems to fall back to unconsciousness anim. + }; +}; + _unit removeWeapon "ACE_FakePrimaryWeapon"; // prevent object from flipping inside buildings @@ -46,5 +54,7 @@ _unit setVariable [QGVAR(draggedObject), objNull, true]; // make object accesable for other units [objNull, _target, true] call EFUNC(common,claim); -["fixPosition", _target, _target] call EFUNC(common,targetEvent); -["fixFloating", _target, _target] call EFUNC(common,targetEvent); +if !(_target isKindOf "CAManBase") then { + ["fixPosition", _target, _target] call EFUNC(common,targetEvent); + ["fixFloating", _target, _target] call EFUNC(common,targetEvent); +}; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index 497b96b95c..5e2ea8b8c1 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -24,12 +24,28 @@ private "_inBuilding"; _inBuilding = [_unit] call FUNC(isObjectOnObject); // prevent collision damage -["fixCollision", _unit, _unit] call EFUNC(common,targetEvent); +["fixCollision", _unit] call EFUNC(common,localEvent); ["fixCollision", _target, _target] call EFUNC(common,targetEvent); // release object detach _target; +// fix anim when aborting carrying persons +if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then { + if (vehicle _unit == _unit) then { + [_unit, "", 2, true] call EFUNC(common,doAnimation); + }; + + if (_target getVariable ["ACE_isUnconscious", false]) then { + [_target, "unconscious", 2, true] call EFUNC(common,doAnimation); + } else { + [_target, "", 2, true] call EFUNC(common,doAnimation); //@todo + }; +}; + +// properly remove fake weapon +_unit removeWeapon "ACE_FakePrimaryWeapon"; + // reselect weapon and re-enable sprint _unit selectWeapon primaryWeapon _unit; @@ -46,5 +62,7 @@ _unit setVariable [QGVAR(carriedObject), objNull, true]; // make object accesable for other units [objNull, _target, true] call EFUNC(common,claim); -["fixPosition", _target, _target] call EFUNC(common,targetEvent); -["fixFloating", _target, _target] call EFUNC(common,targetEvent); +if !(_target isKindOf "CAManBase") then { + ["fixPosition", _target, _target] call EFUNC(common,targetEvent); + ["fixFloating", _target, _target] call EFUNC(common,targetEvent); +}; diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index b5eb4d4d8f..14b2eff611 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -13,19 +13,23 @@ if (_unit getVariable [QGVAR(isDragging), false]) then { private "_draggedObject"; _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull]; - [_unit, _draggedObject] call FUNC(dropObject); + if (!isNull _draggedObject) then { + [_unit, _draggedObject] call FUNC(dropObject); + }; }; }; if (_unit getVariable [QGVAR(isCarrying), false]) then { - // drop carried object when not standing - if (stance _unit != "STAND") then { + // drop carried object when not standing; also some exceptions when picking up crate + if (stance _unit != "STAND" && {_anim != "amovpercmstpsnonwnondnon"}) then { private "_carriedObject"; _carriedObject = _unit getVariable [QGVAR(carriedObject), objNull]; - [_unit, _carriedObject] call FUNC(dropObject_carry); + if (!isNull _carriedObject) then { + [_unit, _carriedObject] call FUNC(dropObject_carry); + }; }; }; diff --git a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf index 44160b54c1..a7f9be7681 100644 --- a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf @@ -20,12 +20,21 @@ if (_unit getVariable [QGVAR(isDragging), false]) then { if (_unit getVariable [QGVAR(isCarrying), false]) then { - // drop carried object when selecting any weapon - if (_weapon != "") then { - private "_carriedObject"; - _carriedObject = _unit getVariable [QGVAR(carriedObject), objNull]; + private "_carriedObject"; + _carriedObject = _unit getVariable [QGVAR(carriedObject), objNull]; + + if (_carriedObject isKindOf "CAManBase") then { + + if (_weapon != primaryWeapon _unit) then { + [_unit, _carriedObject] call FUNC(dropObject_carry); + }; + + } else { + + // drop carried object when selecting any weapon + if (_weapon != "") then { + [_unit, _carriedObject] call FUNC(dropObject_carry); + }; - [_unit, _carriedObject] call FUNC(dropObject_carry); }; - }; diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index ce100abf50..0782e64db7 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -28,7 +28,10 @@ _scrollAmount = _this select 0; _scrollAmount = _scrollAmount * 0.15; private "_carriedItem"; -_carriedItem = _unit getVariable [QGVAR(carriedObject),objNull]; +_carriedItem = _unit getVariable [QGVAR(carriedObject), objNull]; + +//disabled for persons +if (_carriedItem isKindOf "CAManBase") exitWith {false}; private ["_position", "_maxHeight"]; diff --git a/addons/dragging/functions/fnc_handleUnconscious.sqf b/addons/dragging/functions/fnc_handleUnconscious.sqf new file mode 100644 index 0000000000..6ca9609b63 --- /dev/null +++ b/addons/dragging/functions/fnc_handleUnconscious.sqf @@ -0,0 +1,44 @@ +// by commy2 +#include "script_component.hpp" + +private ["_unit", "_isUnconscious"]; + +_unit = _this select 0; +_isUnconscious = _this select 1; + +private "_player"; +_player = ACE_player; + +if (_player getVariable [QGVAR(isDragging), false]) then { + + private "_draggedObject"; + _draggedObject = _player getVariable [QGVAR(draggedObject), objNull]; + + // handle falling unconscious + if (_unit == _player) then { + [_unit, _draggedObject] call FUNC(dropObject); + }; + + // handle waking up dragged unit + if (_unit == _draggedObject) then { + [_player, _draggedObject] call FUNC(dropObject); + }; + +}; + +if (_player getVariable [QGVAR(isCarrying), false]) then { + + private "_carriedObject"; + _carriedObject = _player getVariable [QGVAR(carriedObject), objNull]; + + // handle falling unconscious + if (_unit == _player) then { + [_unit, _carriedObject] call FUNC(dropObject_carry); + }; + + // handle waking up dragged unit + if (_unit == _carriedObject) then { + [_player, _carriedObject] call FUNC(dropObject_carry); + }; + +}; diff --git a/addons/dragging/functions/fnc_initPerson.sqf b/addons/dragging/functions/fnc_initPerson.sqf new file mode 100644 index 0000000000..0dc2af1389 --- /dev/null +++ b/addons/dragging/functions/fnc_initPerson.sqf @@ -0,0 +1,19 @@ +/* + * Author: commy2 + * + * Initialize variables for drag or carryable persons. Called from init EH. + * + * Argument: + * 0: Any Unit (Object) + * + * Return value: + * NONE. + */ +#include "script_component.hpp" + +private "_unit"; + +_unit = _this select 0; + +[_unit, true, [0,1.1,0.092], 180] call FUNC(setDraggable); +[_unit, true, [0.4,-0.1,-1.25], 195] call FUNC(setCarryable); // hard-coded selection: "LeftShoulder" diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf index 630f212b97..bc6da1f04d 100644 --- a/addons/dragging/functions/fnc_setCarryable.sqf +++ b/addons/dragging/functions/fnc_setCarryable.sqf @@ -48,8 +48,8 @@ if (_type in _initializedClasses) exitWith {}; _initializedClasses pushBack _type; GVAR(initializedClasses_carry) = _initializedClasses; -_carryAction = [QGVAR(drag), localize "STR_ACE_Dragging_Carry", "", {[_player, _target] call FUNC(carryObject)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction); -_dropAction = [QGVAR(drop), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction); +_carryAction = [QGVAR(carry), localize "STR_ACE_Dragging_Carry", "", {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction); +_dropAction = [QGVAR(drop_carry), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction); [_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass); -[_type, 0, ["ACE_MainActions"], _dropAction] call EFUNC(interact_menu,addActionToClass); +[_type, 0, [], _dropAction] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index b6e26a6f0a..da2d0310b4 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -52,4 +52,4 @@ _dragAction = [QGVAR(drag), localize "STR_ACE_Dragging_Drag", "", {[_player, _ta _dropAction = [QGVAR(drop), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction); [_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass); -[_type, 0, ["ACE_MainActions"], _dropAction] call EFUNC(interact_menu,addActionToClass); +[_type, 0, [], _dropAction] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf new file mode 100644 index 0000000000..9f1c0bca23 --- /dev/null +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -0,0 +1,70 @@ +/* + * Author: commy2 + * + * Start the carrying process. + * + * Argument: + * 0: Unit that should do the carrying (Object) + * 1: Object to carry (Object) + * + * Return value: + * NONE. + */ +#include "script_component.hpp" + +private ["_unit", "_target"]; + +_unit = _this select 0; +_target = _this select 1; + +// check weight +private "_weight"; +_weight = [_target] call FUNC(getWeight); + +if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith { + [localize "STR_ACE_Dragging_UnableToDrag"] call EFUNC(common,displayTextStructured); +}; + +private "_timer"; +_timer = time + 5; + +// handle objects vs persons +if (_target isKindOf "CAManBase") then { + + // add a primary weapon if the unit has none. + if (primaryWeapon _unit == "") then { + _unit addWeapon "ACE_FakePrimaryWeapon"; + }; + + // select primary, otherwise the drag animation actions don't work. + _unit selectWeapon primaryWeapon _unit; + + // move a bit closer and adjust direction when trying to pick up a person + _target setDir (getDir _unit + 180); + _target setPos (getPos _unit vectorAdd vectorDir _unit); + + [_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation); + [_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation); + + _timer = time + 15; + +} else { + + // select no weapon and stop sprinting + _unit action ["SwitchWeapon", _unit, _unit, 99]; + [_unit, "AmovPercMstpSnonWnonDnon", 0] call EFUNC(common,doAnimation); + + [_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus); + + // prevent multiple players from accessing the same object + [_unit, _target, true] call EFUNC(common,claim); + +}; + +// prevents draging and carrying at the same time +_unit setVariable [QGVAR(isCarrying), true, true]; + +// required for aborting animation +_unit setVariable [QGVAR(carriedObject), _target, true]; + +[FUNC(startCarryPFH), 0.2, [_unit, _target, _timer]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dragging/functions/fnc_startCarryPFH.sqf b/addons/dragging/functions/fnc_startCarryPFH.sqf new file mode 100644 index 0000000000..a932d4e189 --- /dev/null +++ b/addons/dragging/functions/fnc_startCarryPFH.sqf @@ -0,0 +1,49 @@ +// by commy2 +#include "script_component.hpp" + +#ifdef DEBUG_ENABLED_DRAGGING + systemChat format ["%1 startCarryPFH running", time]; +#endif + +private ["_unit", "_target", "_timeOut"]; + +_unit = _this select 0 select 0; +_target = _this select 0 select 1; +_timeOut = _this select 0 select 2; + +// handle aborting carry +if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; +}; + +// same as dragObjectPFH, checks if object is deleted or dead. +if !([_target] call EFUNC(common,isAlive)) then { + [_unit, _target] call FUNC(dropObject); + [_this select 1] call CBA_fnc_removePerFrameHandler; +}; + +// handle persons vs objects +if (_target isKindOf "CAManBase") then { + if (time > _timeOut) exitWith { + [_unit, _target] call FUNC(carryObject); + + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; +} else { + if (time > _timeOut) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + + // drop if in timeout + private "_draggedObject"; + _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull]; + [_unit, _draggedObject] call FUNC(dropObject); + }; + + // wait for the unit to stand up + if (stance _unit == "STAND") exitWith { + [_unit, _target] call FUNC(carryObject); + + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + +}; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 1e286fb4a4..fbf0f4608c 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -40,4 +40,15 @@ _unit selectWeapon primaryWeapon _unit; // can't play action that depends on weapon if it was added the same frame [{_this playActionNow "grabDrag";}, _unit] call EFUNC(common,execNextFrame); +// move a bit closer and adjust direction when trying to pick up a person +if (_target isKindOf "CAManBase") then { + _target setDir (getDir _unit + 180); + _target setPos (getPos _unit vectorAdd (vectorDir _unit vectorMultiply 1.5)); + + [_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation); +}; + +// prevents draging and carrying at the same time +_unit setVariable [QGVAR(isDragging), true, true]; + [FUNC(startDragPFH), 0.2, [_unit, _target, time + 5]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf index b6515aa2d9..10d9d896a8 100644 --- a/addons/dragging/functions/fnc_startDragPFH.sqf +++ b/addons/dragging/functions/fnc_startDragPFH.sqf @@ -1,15 +1,35 @@ // by commy2 #include "script_component.hpp" +#ifdef DEBUG_ENABLED_DRAGGING + systemChat format ["%1 startDragPFH running", time]; +#endif + private ["_unit", "_target", "_timeOut"]; _unit = _this select 0 select 0; _target = _this select 0 select 1; _timeOut = _this select 0 select 2; +// handle aborting drag +if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { + [_this select 1] call CBA_fnc_removePerFrameHandler; +}; + +// same as dragObjectPFH, checks if object is deleted or dead. +if !([_target] call EFUNC(common,isAlive)) then { + [_unit, _target] call FUNC(dropObject); + [_this select 1] call CBA_fnc_removePerFrameHandler; +}; + // timeout. Do nothing. Quit. time, because anim length is linked to ingame time. if (time > _timeOut) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; + + // drop if in timeout + private "_draggedObject"; + _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull]; + [_unit, _draggedObject] call FUNC(dropObject); }; // unit is ready to start dragging diff --git a/addons/dragging/script_component.hpp b/addons/dragging/script_component.hpp index 0f601ae8d9..2427f89739 100644 --- a/addons/dragging/script_component.hpp +++ b/addons/dragging/script_component.hpp @@ -1,6 +1,8 @@ #define COMPONENT dragging #include "\z\ace\addons\main\script_mod.hpp" +//#define DEBUG_ENABLED_DRAGGING + #ifdef DEBUG_ENABLED_DRAGGING #define DEBUG_MODE_FULL #endif @@ -12,3 +14,4 @@ #include "\z\ace\addons\main\script_macros.hpp" #define DRAG_ANIMATIONS ["amovpercmstpslowwrfldnon_acinpknlmwlkslowwrfldb_2", "amovpercmstpsraswpstdnon_acinpknlmwlksnonwpstdb_2", "amovpercmstpsnonwnondnon_acinpknlmwlksnonwnondb_2", "acinpknlmstpsraswrfldnon", "acinpknlmstpsnonwpstdnon", "acinpknlmstpsnonwnondnon", "acinpknlmwlksraswrfldb", "acinpknlmwlksnonwnondb"] +#define CARRY_ANIMATIONS ["acinpercmstpsnonwnondnon", "acinpknlmstpsnonwnondnon_acinpercmrunsnonwnondnon"] diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index 0e2503f7a0..fe467cbb53 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -1,12 +1,12 @@ class Module_F; class ACE_ModuleExplosive: Module_F { - author = "ACE Team"; + author = "$STR_ACE_Common_ACETeam"; category = "ACE"; displayName = "Explosive System"; function = QUOTE(FUNC(module)); scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconExplosives_ca.paa); + icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa); class Arguments { class RequireSpecialist { displayName = "Require specialists?"; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index e62b31aa56..af2ed90cb6 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { displayName = $STR_ACE_Explosives_Menu; condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)])); statement = ""; - exceptions[] = {"ACE_Interaction_isNotSwimming"}; + exceptions[] = {"isNotSwimming"}; showDisabled = 1; priority = 4; icon = PATHTOF(UI\Explosives_Menu_ca.paa); @@ -17,7 +17,7 @@ class CfgVehicles { displayName = $STR_ACE_Explosives_Detonate; condition = QUOTE([_player] call FUNC(canDetonate)); statement = QUOTE([_player] call FUNC(openTransmitterUI);); - exceptions[] = {"ACE_Interaction_isNotSwimming"}; + exceptions[] = {"isNotSwimming"}; showDisabled = 1; icon = PATHTOF(UI\Explosives_Menu_ca.paa); priority = 2; @@ -27,7 +27,7 @@ class CfgVehicles { displayName = $STR_ACE_Explosives_Place; condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)}); statement = QUOTE([_player] call FUNC(openPlaceUI);); - exceptions[] = {"ACE_Interaction_isNotSwimming"}; + exceptions[] = {"isNotSwimming"}; showDisabled = 1; icon = PATHTOF(UI\Place_Explosive_ca.paa); priority = 1; @@ -37,7 +37,7 @@ class CfgVehicles { displayName = $STR_ACE_Explosives_Defuse; condition = QUOTE([_player] call FUNC(canDefuse)); statement = QUOTE([ARR_2(_player,EGVAR(Interaction,Target))] call FUNC(startDefuse);); - exceptions[] = {"ACE_Interaction_isNotSwimming"}; + exceptions[] = {"isNotSwimming"}; showDisabled = 0; icon = PATHTOF(UI\Defuse_ca.paa); priority = 0.8; @@ -47,7 +47,7 @@ class CfgVehicles { displayName = $STR_ACE_Explosives_cellphone_displayName; condition = "('ACE_Cellphone' in (items ace_player))"; statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';"; - exceptions[] = {"ACE_Interaction_isNotSwimming"}; + exceptions[] = {"isNotSwimming"}; showDisabled = 0; icon = PATHTOF(Data\UI\Cellphone_UI.paa); priority = 0.8; diff --git a/addons/explosives/UI/IconExplosives_ca.paa b/addons/explosives/UI/IconExplosives_ca.paa deleted file mode 100644 index 628df3f657..0000000000 Binary files a/addons/explosives/UI/IconExplosives_ca.paa and /dev/null differ diff --git a/addons/explosives/UI/Icon_Module_Explosives_ca.paa b/addons/explosives/UI/Icon_Module_Explosives_ca.paa new file mode 100644 index 0000000000..a9fd23307b Binary files /dev/null and b/addons/explosives/UI/Icon_Module_Explosives_ca.paa differ diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 0b67fe5a7e..c19c65ccb2 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -3,16 +3,16 @@ - Explosives >> - Sprengstoffe >> - Explosivos >> - Åadunki wybuchowe >> - Explosifs >> - VýbuÅ¡niny >> - Esplosivi >> - Robbanóanyagok >> - Explosivos >> - Взрывчатка >> + Explosives + Sprengstoffe + Explosivos + Åadunki wybuchowe + Explosifs + VýbuÅ¡niny + Esplosivi + Robbanóanyagok + Explosivos + Взрывчатка Place >> diff --git a/addons/fcs/CfgVehicles.hpp b/addons/fcs/CfgVehicles.hpp index 45f07ddbda..97628b58ea 100644 --- a/addons/fcs/CfgVehicles.hpp +++ b/addons/fcs/CfgVehicles.hpp @@ -26,7 +26,6 @@ class CfgVehicles { class ACE_SelfActions { class ResetFCS { displayName = $STR_ACE_FCS_ResetFCS; - enableInside = 1; condition = QUOTE(call FUNC(canResetFCS)); statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset);); showDisabled = 0; @@ -40,7 +39,6 @@ class CfgVehicles { class ACE_SelfActions { class ResetFCS { displayName = $STR_ACE_FCS_ResetFCS; - enableInside = 1; condition = QUOTE(call FUNC(canResetFCS)); statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset);); showDisabled = 0; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 7699b82a20..8646ce8468 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -30,7 +30,7 @@ if (_distance == 0) then { _weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets -if (_turret isEqualTo ([typeOf _vehicle] call EFUNC(common,getTurretCommander))) then { +if (_turret isEqualTo ([_vehicle] call EFUNC(common,getTurretCommander))) then { _weaponDirection = eyeDirection _vehicle; }; diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index 1e5878f0b5..d33bd08893 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -35,7 +35,7 @@ private ["_weaponDirection", "_angleTarget"]; _weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets -if (_turret isEqualTo ([typeOf _vehicle] call EFUNC(common,getTurretCommander))) then { +if (_turret isEqualTo ([_vehicle] call EFUNC(common,getTurretCommander))) then { _weaponDirection = eyeDirection _vehicle; }; diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp index c9d13d3ce3..58ed5573e1 100644 --- a/addons/frag/CfgAmmo.hpp +++ b/addons/frag/CfgAmmo.hpp @@ -26,7 +26,7 @@ class CfgAmmo { ACE_FRAG_SKIP = 0; ACE_FRAG_FORCE = 1; // This is a good high-drag frag type for grenades. - ACE_FRAG_CLASSES[] = {"ACE_frag_medium_HD"}; + ACE_FRAG_CLASSES[] = {"ACE_frag_tiny_HD"}; /* These values are based on the M67 Grenade, should be tweaked for individual grenades. diff --git a/addons/frag/XEH_post_init.sqf b/addons/frag/XEH_post_init.sqf index 25cb5132c8..ed0e715376 100644 --- a/addons/frag/XEH_post_init.sqf +++ b/addons/frag/XEH_post_init.sqf @@ -1,8 +1,8 @@ #include "script_component.hpp" -[QUOTE(ffsBIS), "oneachframe", QUOTE(FUNC(onFrame))] call BIS_fnc_addStackedEventHandler; if(isServer) then { - [QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addClientToServerEventhandler; + [QGVAR(frag_eh), { _this call FUNC(frago); }] call ace_common_fnc_addEventHandler; }; +/* GVAR(replacedBisArtyWrapper) = false; [] spawn { waitUntil { @@ -15,3 +15,4 @@ GVAR(replacedBisArtyWrapper) = false; GVAR(replacedBisArtyWrapper) }; }; +*/ \ No newline at end of file diff --git a/addons/frag/XEH_pre_Init.sqf b/addons/frag/XEH_pre_Init.sqf index 406e6e7f63..5b3aa36b18 100644 --- a/addons/frag/XEH_pre_Init.sqf +++ b/addons/frag/XEH_pre_Init.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -#define ACE_TRACE_DRAW_INC 1 + ADDON = false; PREP(fired); @@ -14,7 +14,7 @@ GVAR(trackedObjects) = []; GVAR(blackList) = []; GVAR(traceFrags) = false; -GVAR(replacedBisArtyWrapper) = false; +GVAR(replacedBisArtyWrapper) = true; GVAR(TOTALFRAGS) = 0; diff --git a/addons/frag/functions/fnc_addManualTrack.sqf b/addons/frag/functions/fnc_addManualTrack.sqf index 1719842240..066499f6aa 100644 --- a/addons/frag/functions/fnc_addManualTrack.sqf +++ b/addons/frag/functions/fnc_addManualTrack.sqf @@ -3,5 +3,5 @@ private ["_round"]; _round = _this select 0; if(alive _round) then { GVAR(trackedObjects) set[(count GVAR(trackedObjects)), _round]; - [FUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), (typeOf _round), time, objNull, false, 0, 0]] call cba_fnc_addPerFrameHandler; + [DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), (typeOf _round), time, objNull, false, 0, 0]] call cba_fnc_addPerFrameHandler; }; \ No newline at end of file diff --git a/addons/frag/functions/fnc_addTrack.sqf b/addons/frag/functions/fnc_addTrack.sqf index 4ffaef5a7c..65ad3b6a22 100644 --- a/addons/frag/functions/fnc_addTrack.sqf +++ b/addons/frag/functions/fnc_addTrack.sqf @@ -17,4 +17,4 @@ _objTVel = sqrt((_objVel select 0)^2 + (_objVel select 1)^2 + (_objVel select 2) _positions set[(count _positions), [(getPos _obj), _objTVel]]; _data = [_origin, typeOf _origin, typeOf _obj, _objTVel, _positions, _color]; GVAR(traces) set[_index, _data]; -[FUNC(trackTrace), 0, [_obj, _index, time]] call cba_fnc_addPerFrameHandler; \ No newline at end of file +[DFUNC(trackTrace), 0, [_obj, _index, time]] call cba_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf index 92b67e0256..5560a4f0af 100644 --- a/addons/frag/functions/fnc_doSpall.sqf +++ b/addons/frag/functions/fnc_doSpall.sqf @@ -44,13 +44,12 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then { _exit = false; _vm = 1; _velocity = _initialData select 5; - _unitDir = _velocity call BIS_fnc_unitVector; _oldVelocity = _velocity call BIS_fnc_magnitude; _curVelocity = (velocity _round) call BIS_fnc_magnitude; if(alive _round) then { - _diff = [_velocity, (velocity _round)] call FUNC(vectorDiffFast); + _diff = _velocity vectorDiff (velocity _round); _polar = _diff call CBA_fnc_vect2polar; // player sideChat format["polar: %1", _polar]; if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then { @@ -63,7 +62,7 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then { }; }; if(!_exit) then { - _unitDir = _velocity call BIS_fnc_unitVector; + _unitDir = vectorNormalized _velocity; _pos = _hpData select 3; _spallPos = nil; for "_i" from 0 to 100 do { @@ -137,7 +136,6 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then { _fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000]; _fragment setPosASL _spallPos; _fragment setVelocity _spallFragVect; - // [fnc_spallTrackPFH, 0, [_fragment, diag_tickTime]] call cba_fnc_addPerFrameHandler; if(GVAR(traceFrags)) then { [player, _fragment, [1,0.5,0,1]] call FUNC(addTrack); }; @@ -159,7 +157,6 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then { _fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000]; _fragment setPosASL _spallPos; _fragment setVelocity _spallFragVect; - // [fnc_spallTrackPFH, 0, [_fragment, diag_tickTime]] call cba_fnc_addPerFrameHandler; if(GVAR(traceFrags)) then { [player, _fragment, [1,0,0,1]] call FUNC(addTrack); }; diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index 5910d2481b..a6e934c667 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -1,5 +1,4 @@ #include "script_component.hpp" -/* private ["_gun", "_type", "_round", "_doFragTrack", "_doSpall"]; if !(isNil QGVAR(enabled) && {GVAR(enabled)}) exitWith {}; @@ -23,7 +22,7 @@ if(_gun == player) then { }; }; }; -_doSpall = true; +_doSpall = false; if(_doSpall) then { if(GVAR(spallIsTrackingCount) <= 0) then { GVAR(spallHPData) = []; @@ -36,15 +35,14 @@ if(_doSpall) then { }; }; // player sideChat format["c: %1", GVAR(spallIsTrackingCount)]; -[player, _round, [1,0,0,1]] call FUNC(addTrack); +[player, _round, [1,0,0,1]] call nou_fnc_addTrack; if(_doFragTrack && alive _round) then { - GVAR(trackedObjects) set[(count GVAR(trackedObjects)), _round]; + GVAR(trackedObjects) pushBack _round; _spallTrack = []; _spallTrackID = []; - [FUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler; + [DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler; if(_doSpall) then { [_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack); }; // player sideChat "WTF2"; }; -*/ \ No newline at end of file diff --git a/addons/frag/functions/fnc_frag_trace.sqf b/addons/frag/functions/fnc_frag_trace.sqf index 9b0c8dc3db..f4e14fa12a 100644 --- a/addons/frag/functions/fnc_frag_trace.sqf +++ b/addons/frag/functions/fnc_frag_trace.sqf @@ -6,5 +6,5 @@ _shell = _params select 0; if(alive _shell) then { drop ["\Ca\Data\Cl_basic","","Billboard",1,30,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""]; } else { - [_this select 1] call FUNC(removeBISPFH); + [_this select 1] call cba_fnc_removePerFrameHandler; }; \ No newline at end of file diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 88ec0c4742..79eea53cd7 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -130,11 +130,12 @@ if(_isArmed && (count _objects) > 0) then { _targetVel = (velocity _target); - _targetPos set[2, (_targetPos select 2)+_add]; + _targetPos set[0, (_targetPos select 0)+((_targetVel select 0)*(_distance/_fragPower))]; _targetPos set[1, (_targetPos select 1)+((_targetVel select 1)*(_distance/_fragPower))]; - - _baseVec = [_lastPos, _targetPos] call BIS_fnc_vectorFromXToY; + _targetPos set[2, (_targetPos select 2)+_add]; + + _baseVec = _lastPos vectorFromTo _targetPos; _dir = floor(_baseVec call CBA_fnc_vectDir); _currentCount = _fragArcs select _dir; @@ -213,7 +214,6 @@ if(_isArmed && (count _objects) > 0) then { _fragObj setVelocity _vel; #ifdef DEBUG_MODE_FULL GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1; - // [FUNC(frag_trace), 0, [_fragObj]] call cba_fnc_addPerFrameHandler; GVAR(traceFrags) = true; #endif if(GVAR(traceFrags)) then { diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf index aeba4e7a5d..89ba572ce2 100644 --- a/addons/frag/functions/fnc_spallHP.sqf +++ b/addons/frag/functions/fnc_spallHP.sqf @@ -21,7 +21,7 @@ if((_this select 0) <= (count GVAR(spallHPData))) then { // diag_log text format["%1: %2", _forEachIndex, _x]; // } forEach _hp; // } forEach (_this select 1); - [FUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler; + [DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler; // player sideChat "WEEE"; } forEach (_this select 1); }; diff --git a/addons/frag/functions/fnc_stopTracing.sqf b/addons/frag/functions/fnc_stopTracing.sqf index 02b4fd7f59..693390fff2 100644 --- a/addons/frag/functions/fnc_stopTracing.sqf +++ b/addons/frag/functions/fnc_stopTracing.sqf @@ -1,5 +1,5 @@ #include "script_component.hpp" if(GVAR(tracesStarted)) then { GVAR(tracesStarted) = false; - [GVAR(traceID)] call FUNC(removeBISPFH); + [GVAR(traceID)] call cba_fnc_removePerFrameHandler; }; \ No newline at end of file diff --git a/addons/frag/functions/fnc_trackFragRound.sqf b/addons/frag/functions/fnc_trackFragRound.sqf index 2780a85664..0a8e3948d0 100644 --- a/addons/frag/functions/fnc_trackFragRound.sqf +++ b/addons/frag/functions/fnc_trackFragRound.sqf @@ -12,7 +12,7 @@ _spallTrack = _params select 7; _foundObjectHPIds = _params select 8; if (!alive _round) then { - [_this select 1] call FUNC(removeBISPFH); + [_this select 1] call cba_fnc_removePerFrameHandler; if(_time != time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then { GVAR(trackedObjects) = GVAR(trackedObjects) - [_round]; _skip = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_SKIP"); @@ -22,7 +22,7 @@ if (!alive _round) then { _force = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_FORCE"); _fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt(_indirectRange)); if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then { - [QGVAR(frag_eh), _params] call CBA_fnc_clientToServerEvent; + [QGVAR(frag_eh), _params] call ace_common_fnc_serverEvent; GVAR(trackedObjects) = GVAR(trackedObjects) - [_round]; }; }; @@ -38,7 +38,7 @@ if (!alive _round) then { }; } else { if(!(_round in GVAR(trackedObjects)) || {_round in GVAR(blackList)}) then { - [_this select 1] call FUNC(removeBISPFH); + [_this select 1] call cba_fnc_removePerFrameHandler; if(_round in GVAR(blackList)) then { GVAR(blackList) = GVAR(blackList) - [_round]; }; diff --git a/addons/frag/functions/fnc_trackTrace.sqf b/addons/frag/functions/fnc_trackTrace.sqf index 71b4a9a866..628fece605 100644 --- a/addons/frag/functions/fnc_trackTrace.sqf +++ b/addons/frag/functions/fnc_trackTrace.sqf @@ -10,5 +10,5 @@ if(alive _tracerObj && (count GVAR(traces)) > 0) then { _objTVel = sqrt((_objVel select 0)^2 + (_objVel select 1)^2 + (_objVel select 2)^2); _positions set[(count _positions), [(getPos _tracerObj), _objTVel]]; } else { - [(_this select 1)] call FUNC(removeBISPFH); + [(_this select 1)] call cba_fnc_removePerFrameHandler; }; \ No newline at end of file diff --git a/addons/frag/script_component.hpp b/addons/frag/script_component.hpp index 274270cbbb..371067db3e 100644 --- a/addons/frag/script_component.hpp +++ b/addons/frag/script_component.hpp @@ -1,7 +1,7 @@ #define COMPONENT frag #include "\z\ace\Addons\main\script_mod.hpp" -#define DEBUG_ENABLED_FRAG +//#define DEBUG_ENABLED_FRAG #ifdef DEBUG_ENABLED_FRAG #define DEBUG_MODE_FULL @@ -11,4 +11,6 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG #endif -#include "\z\ace\Addons\main\script_macros.hpp" \ No newline at end of file +#include "\z\ace\Addons\main\script_macros.hpp" + +#define ACE_TRACE_DRAW_INC 1 \ No newline at end of file diff --git a/addons/gforces/config.cpp b/addons/gforces/config.cpp index e81b034fd9..6c40f4ce1c 100644 --- a/addons/gforces/config.cpp +++ b/addons/gforces/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi", "CAA-Picard"}; + author[] = {"KoffeinFlummi", "esteldunedain"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index 839110fd2b..c2a08ee73f 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and CAA-Picard + * Author: KoffeinFlummi and esteldunedain * Calculates average g-forces and triggers g-effects * * Argument: diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index c4ea1f2349..6c77255384 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -6,22 +6,22 @@ class CfgVehicles { class ACE_PutInEarplugs { displayName = "$STR_ACE_Hearing_EarPlugs_On"; condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} ); + exceptions[] = {"isNotInside"}; statement = QUOTE( [_player] call FUNC(putInEarPlugs) ); showDisabled = 0; priority = 2.5; icon = PATHTOF(UI\ACE_earplugs_x_ca.paa); hotkey = "E"; - enableInside = 1; }; class ACE_RemoveEarplugs { displayName = "$STR_ACE_Hearing_EarPlugs_Off"; condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) ); + exceptions[] = {"isNotInside"}; statement = QUOTE( [_player] call FUNC(removeEarPlugs) ); showDisabled = 0; priority = 2.5; icon = PATHTOF(UI\ACE_earplugs_x_ca.paa); hotkey = "E"; - enableInside = 1; }; }; }; @@ -102,7 +102,7 @@ class CfgVehicles { function = QFUNC(moduleHearing); scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconHearing_ca.paa); + icon = PATHTOF(UI\Icon_Module_Hearing_ca.paa); class Arguments { class EnableCombatDeafness { displayName = "Enable combat deafness?"; diff --git a/addons/hearing/UI/IconHearing_ca.paa b/addons/hearing/UI/IconHearing_ca.paa deleted file mode 100644 index 128f08f6f0..0000000000 Binary files a/addons/hearing/UI/IconHearing_ca.paa and /dev/null differ diff --git a/addons/hearing/UI/Icon_Module_Hearing_ca.paa b/addons/hearing/UI/Icon_Module_Hearing_ca.paa new file mode 100644 index 0000000000..5c51645e09 Binary files /dev/null and b/addons/hearing/UI/Icon_Module_Hearing_ca.paa differ diff --git a/addons/hearing/config.cpp b/addons/hearing/config.cpp index 0616ffa0e1..b822204484 100644 --- a/addons/hearing/config.cpp +++ b/addons/hearing/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_EarPlugs"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common", "ace_interaction"}; - author[] = {"KoffeinFlummi", "CAA-Picard", "HopeJ", "commy2"}; + author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/hearing/functions/fnc_moduleHearing.sqf b/addons/hearing/functions/fnc_moduleHearing.sqf index 78e79d971e..d7b43e0092 100644 --- a/addons/hearing/functions/fnc_moduleHearing.sqf +++ b/addons/hearing/functions/fnc_moduleHearing.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Initializes the Map module. * * Arguments: diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index 634537922c..1aa38848a5 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * Updates and applys the current deafness. Called every 0.1 sec from a PFEH. * * Arguments: diff --git a/addons/hitreactions/$PBOPREFIX$ b/addons/hitreactions/$PBOPREFIX$ new file mode 100644 index 0000000000..b2a9a05ac5 --- /dev/null +++ b/addons/hitreactions/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\hitreactions \ No newline at end of file diff --git a/addons/hitreactions/CfgEventHandlers.hpp b/addons/hitreactions/CfgEventHandlers.hpp new file mode 100644 index 0000000000..1eea968973 --- /dev/null +++ b/addons/hitreactions/CfgEventHandlers.hpp @@ -0,0 +1,14 @@ + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_Hit_EventHandlers { + class CAManBase { + class ADDON { + hit = QUOTE(_this call FUNC(fallDown)); + }; + }; +}; diff --git a/addons/hitreactions/XEH_preInit.sqf b/addons/hitreactions/XEH_preInit.sqf new file mode 100644 index 0000000000..d3c0973ee7 --- /dev/null +++ b/addons/hitreactions/XEH_preInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(fallDown); + +ADDON = true; diff --git a/addons/hitreactions/config.cpp b/addons/hitreactions/config.cpp new file mode 100644 index 0000000000..33d2665311 --- /dev/null +++ b/addons/hitreactions/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf new file mode 100644 index 0000000000..ea368b79af --- /dev/null +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -0,0 +1,83 @@ +// by commy2 +#include "script_component.hpp" + +private ["_unit", "_firer", "_damage"]; + +_unit = _this select 0; +_firer = _this select 1; +_damage = _this select 2; + +// don't fall on collision damage +if (_unit == _firer) exitWith {}; + +// cam shake for player +if (_unit == ACE_player) then { + addCamShake [3, 5, _damage + random 10]; +}; + +private "_vehicle"; +_vehicle = vehicle _unit; + +// handle static weapons +if (_vehicle isKindOf "StaticWeapon") exitwith { + if (!alive _unit) then { + _unit action ["Eject", _vehicle]; + unassignVehicle _unit; + }; +}; + +// don't fall after minor damage +if (_damage < 0.1) exitWith {}; + +// play sound +if (!isNil QUOTE(EFUNC(medical,playInjuredSound))) then { + [_unit] call EFUNC(medical,playInjuredSound); +}; + +// this checks most things, so it doesn't mess with being inside vehicles or while dragging etc. +if !([_unit, _vehicle] call EFUNC(common,canInteractWith)) exitWith {}; + +// handle ladders +if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _unit >> "AGM_isLadder") == 1) exitWith { + _unit action ["LadderOff", nearestObject [position _unit, "House"]]; +}; + +// only play animation when standing due to lack of animations, sry +if !(stance _unit in ["CROUCH", "STAND"]) exitWith {}; + +private "_velocity"; +_velocity = vectorMagnitude velocity _unit; + +// only fall when moving +if (_velocity < 2) exitWith {}; + +// get correct animation by weapon +private "_anim"; +_anim = switch (currentWeapon _unit) do { + case (""): {"AmovPercMsprSnonWnonDf_AmovPpneMstpSnonWnonDnon"}; + case (primaryWeapon _unit): { + [ + ["AmovPercMsprSlowWrfldf_AmovPpneMstpSrasWrflDnon_2", "AmovPercMsprSlowWrfldf_AmovPpneMstpSrasWrflDnon"] select (_velocity > 4), + ["AmovPercMsprSlowWrfldf_AmovPpneMstpSrasWrflDnon_2", "AmovPercMsprSlowWrfldf_AmovPpneMstpSrasWrflDnon"] select (_velocity > 4), + "AmovPercMstpSrasWrflDnon_AadjPpneMstpSrasWrflDleft", + "AmovPercMstpSrasWrflDnon_AadjPpneMstpSrasWrflDright" + ] select floor random 4; + }; + case (handgunWeapon _unit): { + [ + "AmovPercMsprSlowWpstDf_AmovPpneMstpSrasWpstDnon", + "AmovPercMsprSlowWpstDf_AmovPpneMstpSrasWpstDnon", + "AmovPercMstpSrasWpstDnon_AadjPpneMstpSrasWpstDleft", + "AmovPercMstpSrasWpstDnon_AadjPpneMstpSrasWpstDright" + ] select floor random 4; + }; + default {""}; +}; + +// exit if no animation for this weapon exists, i.E. binocular or rocket launcher +if (_anim == "") exitWith {}; + +// don't mess with transitions. don't fall then. +if ([_unit] call EFUNC(common,inTransitionAnim)) exitWith {}; + +[_unit, _anim, 2] call EFUNC(common,doAnimation); diff --git a/addons/hitreactions/functions/script_component.hpp b/addons/hitreactions/functions/script_component.hpp new file mode 100644 index 0000000000..ba26402e2b --- /dev/null +++ b/addons/hitreactions/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\hitreactions\script_component.hpp" \ No newline at end of file diff --git a/addons/hitreactions/script_component.hpp b/addons/hitreactions/script_component.hpp new file mode 100644 index 0000000000..011a3b6c31 --- /dev/null +++ b/addons/hitreactions/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT hitreactions +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_HITREACTIONS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_HITREACTIONS + #define DEBUG_SETTINGS DEBUG_ENABLED_HITREACTIONS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index b804ea970f..72bea512d6 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -1,17 +1,26 @@ //XEH_clientInit.sqf #include "script_component.hpp" -_fnc = { - _this call FUNC(render); +// Install the render EH on the main display +addMissionEventHandler ["Draw3D", DFUNC(render)]; + +// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is. +// The thread dies as soon as the mission start, so it's not really compiting for scheduler space. +[] spawn { + // Wait until the map display is detected + waitUntil {(!isNull findDisplay 12)}; + + // Install the render EH on the map screen + ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", DFUNC(render)]; }; -addMissionEventHandler ["Draw3D", _fnc]; + ["ACE3", QGVAR(InteractKey), "Interact Key", -{_this call FUNC(keyDown)}, -{_this call FUNC(keyUp)}, +{[0] call FUNC(keyDown)}, +{[0] call FUNC(keyUp)}, [219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key ["ACE3", QGVAR(SelfInteractKey), "Self Actions Key", -{_this call FUNC(keyDownSelfAction)}, -{_this call FUNC(keyUpSelfAction)}, +{[1] call FUNC(keyDown)}, +{[1] call FUNC(keyUp)}, [219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index 2b5150a0ea..c15f8d388d 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -11,26 +11,26 @@ PREP(createAction); PREP(findActionNode); PREP(isSubPath); PREP(keyDown); -PREP(keyDownSelfAction); PREP(keyUp); -PREP(keyUpSelfAction); PREP(removeActionFromClass); PREP(removeActionFromObject); PREP(render); +PREP(renderActionPoints); PREP(renderBaseMenu); PREP(renderIcon); PREP(renderMenu); +PREP(renderSelector); PREP(splitPath); GVAR(keyDown) = false; GVAR(keyDownSelfAction) = false; GVAR(keyDownTime) = 0; +GVAR(openedMenuType) = -1; GVAR(lastTime) = diag_tickTime; GVAR(rotationAngle) = 0; GVAR(selectedAction) = [[],[]]; -GVAR(selectedStatement) = {}; GVAR(actionSelected) = false; GVAR(selectedTarget) = objNull; diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index 20fc30805e..17900c2f6b 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"NouberNou", "CAA-Picard"}; + author[] = {"NouberNou", "esteldunedain"}; authorUrl = ""; VERSION_CONFIG; }; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index c93342cfda..7a8278c72d 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Insert an ACE action to a class, under a certain path * Note: This function is NOT global. * diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index 223247057a..5c736a2da6 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Insert an ACE action to an object, under a certain config path * Note: This function is NOT global. * @@ -13,7 +13,7 @@ * The entry full path, which can be used to remove the entry, or add children entries . * * Example: - * [typeOf cursorTarget, 0, ["ACE_TapShoulderRight"],VulcanPinchAction] call ace_interact_menu_fnc_addActionToClass; + * [cursorTarget, 0, ["ACE_TapShoulderRight"],VulcanPinchAction] call ace_interact_menu_fnc_addActionToObject; * * Public: No */ diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 36d4dc548d..582fe750a8 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Collect a entire tree of active actions * * Argument: diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 0fd4f6adb4..a0b9b31dd4 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -1,5 +1,5 @@ /* - * Author: NouberNou and CAA-Picard + * Author: NouberNou and esteldunedain * Compile the action menu from config for an object's class * * Argument: diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index ebccc2ca42..195d741761 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -1,5 +1,5 @@ /* - * Author: NouberNou and CAA-Picard + * Author: NouberNou and esteldunedain * Compile the self action menu from config for an object's class * * Argument: @@ -86,8 +86,11 @@ _actions = [ "ACE_SelfActions", "Self Actions", "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa", - {}, - { true }, + { + // Dummy statement so it's not collapsed when there's no available actions + true + }, + {[ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)}, {}, [], "Spine3", diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index 785db2c8b9..172bbea3a4 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Creates an isolated ACE action * Note: This function is NOT global. * @@ -19,7 +19,7 @@ * Action * * Example: - * [VulcanPinch","Vulcan Pinch",{_target setDamage 1;},{true},{},[parameters], [0,0,0], 100] call ace_interact_menu_fnc_createAction; + * [VulcanPinch","Vulcan Pinch","",{_target setDamage 1;},{true},{},[parameters], [0,0,0], 100] call ace_interact_menu_fnc_createAction; * * Public: No */ diff --git a/addons/interact_menu/functions/fnc_findActionNode.sqf b/addons/interact_menu/functions/fnc_findActionNode.sqf index 41dd32b7d8..4027b7a852 100644 --- a/addons/interact_menu/functions/fnc_findActionNode.sqf +++ b/addons/interact_menu/functions/fnc_findActionNode.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Return action point from path * Note: This function is NOT global. * diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index e90aa12300..ec22b0aa9e 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Check if the first path is a subpath of the other * * Argument: @@ -20,7 +20,7 @@ _isSubPath = true; if (count _shortPath > count _longPath) exitWith {false}; -for [{_i = 0},{_i < (count _shortPath) - 1},{_i = _i + 1}] do { +for [{_i = 0},{_i < count _shortPath},{_i = _i + 1}] do { if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith { _isSubPath = false; }; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 4c8ffd8b3a..faa5b0f453 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -1,9 +1,9 @@ /* - * Author: NouberNou - * Handle interaction key down + * Author: NouberNou and esteldunedain + * Handle interactions key down * * Argument: - * None + * 0: Type of key: 0 interaction / 1 self interaction * * Return value: * true @@ -12,14 +12,42 @@ */ #include "script_component.hpp" -if(!GVAR(keyDown)) then { +EXPLODE_1_PVT(_this,_menuType); - // Only interact with others if on foot - if (vehicle ACE_player != ACE_player) exitWith {}; +if (GVAR(openedMenuType) == _menuType) exitWith {true}; - GVAR(keyDown) = true; - GVAR(keyDownTime) = diag_tickTime; - - ["interactMenuOpened", [0]] call EFUNC(common,localEvent); +while {dialog} do { + closeDialog 0; }; + +if (_menuType == 0) then { + GVAR(keyDown) = true; + GVAR(keyDownSelfAction) = false; +} else { + GVAR(keyDown) = false; + GVAR(keyDownSelfAction) = true; +}; +GVAR(keyDownTime) = diag_tickTime; +GVAR(openedMenuType) = _menuType; + +GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || + visibleMap || + (GVAR(AlwaysUseCursorSelfInteraction) && _menuType == 1); +if (GVAR(useCursorMenu)) then { + createDialog QGVAR(cursorMenu); + // The dialog sets: + // uiNamespace getVariable QGVAR(dlgCursorMenu); + // uiNamespace getVariable QGVAR(cursorMenuOpened); + ctrlEnable [91921, true]; + ((finddisplay 91919) displayctrl 91921) ctrlAddEventHandler ["MouseMoving", { + GVAR(cursorPos) = [_this select 1, _this select 2, 0]; + }]; + setMousePosition [0.5, 0.5]; +}; + +GVAR(selfMenuOffset) = ((positionCameraToWorld [0, 0, 2]) call EFUNC(common,positionToASL)) vectorDiff + ((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)); + +["interactMenuOpened", [_menuType]] call EFUNC(common,localEvent); + true diff --git a/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf b/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf deleted file mode 100644 index 63c81b58bc..0000000000 --- a/addons/interact_menu/functions/fnc_keyDownSelfAction.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: NouberNou - * Handle self action key down - * - * Argument: - * None - * - * Return value: - * true - * - * Public: No - */ -#include "script_component.hpp" - -if(!GVAR(keyDownSelfAction)) then { - GVAR(keyDownSelfAction) = true; - GVAR(keyDown) = false; - GVAR(keyDownTime) = diag_tickTime; - - ["interactMenuOpened", [1]] call EFUNC(common,localEvent); - - GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || visibleMap; - - if (GVAR(useCursorMenu)) then { - closeDialog 0; - createDialog QGVAR(cursorMenu); - // The dialog sets: - // uiNamespace getVariable QGVAR(dlgCursorMenu); - // uiNamespace getVariable QGVAR(cursorMenuOpened); - ctrlEnable [91921, true]; - ((finddisplay 91919) displayctrl 91921) ctrlAddEventHandler ["MouseMoving", { - GVAR(cursorPos) = [_this select 1, _this select 2, 0]; - }]; - setMousePosition [0.5, 0.5]; - - }; - - GVAR(selfMenuOffset) = ((positionCameraToWorld [0, 0, 2]) call EFUNC(common,positionToASL)) vectorDiff - ((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)); -}; -true diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index 69f9697449..5ab9b61788 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -1,9 +1,9 @@ /* - * Author: NouberNou - * Handle interaction key up + * Author: NouberNou and esteldunedain + * Handle interactions key up * * Argument: - * None + * 0: Type of key: 0 interaction / 1 self interaction * * Return value: * true @@ -12,19 +12,42 @@ */ #include "script_component.hpp" +// Exit if there's no menu opened +if (GVAR(openedMenuType) < 0) exitWith {true}; + if(GVAR(actionSelected)) then { this = GVAR(selectedTarget); + + private ["_player","_target","_actionData"]; _player = ACE_Player; _target = GVAR(selectedTarget); - [GVAR(selectedTarget), ACE_player, (GVAR(selectedAction) select 0) select 6] call GVAR(selectedStatement); + + // Clear the conditions caches + ["clearConditionCaches", []] call EFUNC(common,localEvent); + + // Check the action conditions + _actionData = GVAR(selectedAction) select 0; + if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { + // Call the statement + [_target, _player, _actionData select 6] call (_actionData select 3); + + // Clear the conditions caches again if the action was performed + ["clearConditionCaches", []] call EFUNC(common,localEvent); + }; }; -if (GVAR(keyDown)) then { - GVAR(keyDown) = false; - ["interactMenuClosed", [0]] call EFUNC(common,localEvent); +GVAR(keyDown) = false; +GVAR(keyDownSelfAction) = false; +GVAR(openedMenuType) = -1; + +if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then { + closeDialog 0; }; GVAR(expanded) = false; GVAR(lastPath) = []; GVAR(menuDepthPath) = []; + +["interactMenuClosed", [GVAR(openedMenuType)]] call EFUNC(common,localEvent); + true diff --git a/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf b/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf deleted file mode 100644 index dd54490532..0000000000 --- a/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Author: NouberNou - * Handle self action key up - * - * Argument: - * None - * - * Return value: - * true - * - * Public: No - */ -#include "script_component.hpp" - -if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then { - closeDialog 0; -}; - -if(GVAR(actionSelected)) then { - this = GVAR(selectedTarget); - _player = ACE_Player; - _target = GVAR(selectedTarget); - [GVAR(selectedTarget), ACE_player, (GVAR(selectedAction) select 0) select 6] call GVAR(selectedStatement); -}; - -if (GVAR(keyDownSelfAction)) then { - GVAR(keyDownSelfAction) = false; - ["interactMenuClosed", [1]] call EFUNC(common,localEvent); -}; - -GVAR(expanded) = false; -GVAR(lastPath) = []; -GVAR(menuDepthPath) = []; -true diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf index aee1675fa7..898228d6d8 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Removes an action from a class * * Argument: diff --git a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf index dc5fdc05f0..bab740c578 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2, NouberNou and CAA-Picard + * Author: commy2, NouberNou and esteldunedain * Removes an action from an object * * Argument: diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index df97b232de..b9afa75616 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -1,5 +1,5 @@ /* - * Author: NouberNou and CAA-Picard + * Author: NouberNou and esteldunedain * Render all available nearby interactions * * Argument: @@ -12,102 +12,21 @@ */ #include "script_component.hpp" +BEGIN_COUNTER(fnc_render); + private ["_cursorPos1", "_cursorPos2", "_cursorVec", "_p1", "_p2", "_p", "_v", "_cp", "_forEachIndex", "_renderTargets", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_pos", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i"]; _foundTarget = false; _cursorPos1 = positionCameraToWorld [0, 0, 0]; _cursorPos2 = positionCameraToWorld [0, 0, 2]; -GVAR(selfMenuScale) = (((worldToScreen (positionCameraToWorld [1,0,2])) select 0) - - ((worldToScreen (positionCameraToWorld [0,0,2])) select 0)) / 0.6; -//systemChat format ["selfMenuScale: %1", GVAR(selfMenuScale)]; -GVAR(currentOptions) = []; -private ["_actionsVarName","_classActions","_objectActions","_target","_player","_action","_actionData","_active"]; -_player = ACE_player; -if (GVAR(keyDown)) then { +if (GVAR(openedMenuType) >= 0) then { + // Render all available nearby interactions + call FUNC(renderActionPoints); - // Render all nearby interaction menus - #define MAXINTERACTOBJECTS 3 - private ["_numInteractObjects","_numInteractions"]; - _numInteractObjects = 0; - - _nearestObjects = nearestObjects [(getPos ACE_player), ["All"], 15]; - { - _target = _x; - - _numInteractions = 0; - // Prevent interacting with yourself or your own vehicle - if (_target != ACE_player && {_target != vehicle ACE_player}) then { - - // Iterate through object actions, find base level actions and render them if appropiate - _actionsVarName = format [QGVAR(Act_%1), typeOf _target]; - GVAR(objectActionList) = _target getVariable [QGVAR(actions), []]; - { - // Only render them directly if they are base level actions - if (count (_x select 1) == 0) then { - // Try to render the menu - _action = [_x,[]]; - if ([_target, _action] call FUNC(renderBaseMenu)) then { - _numInteractions = _numInteractions + 1; - }; - }; - } forEach GVAR(objectActionList); - - // Iterate through base level class actions and render them if appropiate - _classActions = missionNamespace getVariable [_actionsVarName, []]; - { - _action = _x; - // Try to render the menu - if ([_target, _action] call FUNC(renderBaseMenu)) then { - _numInteractions = _numInteractions + 1; - }; - } forEach _classActions; - - // Limit the amount of objects the player can interact with - if (_numInteractions > 0) then { - _numInteractObjects = _numInteractObjects + 1; - }; - }; - if (_numInteractObjects >= MAXINTERACTOBJECTS) exitWith {}; - - } forEach _nearestObjects; - -} else { - if (GVAR(keyDownSelfAction)) then { - - // Render only the self action menu - _target = vehicle ACE_player; - - // Iterate through object actions, find base level actions and render them if appropiate - _actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target]; - GVAR(objectActionList) = _target getVariable [QGVAR(selfActions), []]; - /* - { - _action = _x; - // Only render them directly if they are base level actions - if (count (_action select 7) == 1) then { - [_target, _action, 0, [180, 360]] call FUNC(renderMenu); - }; - } forEach GVAR(objectActionList); - */ - - // Iterate through base level class actions and render them if appropiate - _actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target]; - _classActions = missionNamespace getVariable [_actionsVarName, []]; - { - _action = _x; - - _pos = (((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)) vectorAdd GVAR(selfMenuOffset)) call EFUNC(common,ASLToPosition); - [_target, _action, _pos] call FUNC(renderBaseMenu); - } forEach _classActions; - }; -}; - - -if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then { // Draw the red selector only when there's no cursor if !(uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then { - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selected_ca.paa", [1,0,0,1], _cursorPos2, 1, 1, 0, "", 0.5, 0.025, "TahomaB"]; + [[0.5,0.5], "\a3\ui_f\data\IGUI\Cfg\Cursors\selected_ca.paa"] call FUNC(renderSelector); }; _cursorScreenPos = [worldToScreen _cursorPos2, GVAR(cursorPos)] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); @@ -115,14 +34,11 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then { _closestDistance = 1000000; _closestSelection = -1; { - _pos = _x select 1; - _sPos = worldToScreen _pos; - if(count _sPos > 0) then { - _disSq = (((_cursorScreenPos select 0) - (_sPos select 0))^2 + ((_cursorScreenPos select 1) - (_sPos select 1))^2); - if(_disSq < 0.0125 && _disSq < _closestDistance) then { - _closestDistance = _disSq; - _closestSelection = _forEachIndex; - }; + _sPos = _x select 1; + _disSq = (((_cursorScreenPos select 0) - (_sPos select 0))^2 + ((_cursorScreenPos select 1) - (_sPos select 1))^2); + if(_disSq < 0.0125 && _disSq < _closestDistance) then { + _closestDistance = _disSq; + _closestSelection = _forEachIndex; }; } forEach GVAR(currentOptions); @@ -131,20 +47,18 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then { _closest = GVAR(currentOptions) select _closestSelection; - _pos = _closest select 1; + _sPos = _closest select 1; _cTime = diag_tickTime; _delta = _cTime - GVAR(lastTime); GVAR(lastTime) = _cTime; - GVAR(rotationAngle) = GVAR(rotationAngle) + (180*_delta); - if(GVAR(rotationAngle) > 360) then { - GVAR(rotationAngle) = GVAR(rotationAngle) - 360; - }; - drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,.75], _pos, 0.6*SafeZoneW, 0.6*SafeZoneW, GVAR(rotationAngle), "", 0.5, 0.025, "TahomaB"]; + + GVAR(rotationAngle) = (GVAR(rotationAngle) + (270*_delta)) mod 360; + [_sPos, format [QUOTE(PATHTOF(ui\selector%1.paa)), floor (((abs GVAR(rotationAngle)) mod 90) / 6)]] call FUNC(renderSelector); + _foundTarget = true; GVAR(actionSelected) = true; GVAR(selectedAction) = (_closest select 0) select 1; GVAR(selectedTarget) = (GVAR(selectedAction)) select 2; - GVAR(selectedStatement) = ((GVAR(selectedAction)) select 0) select 3; _misMatch = false; _hoverPath = (_closest select 2); @@ -180,7 +94,19 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then { this = GVAR(selectedTarget); _player = ACE_Player; _target = GVAR(selectedTarget); - [GVAR(selectedTarget), ACE_player, (GVAR(selectedAction) select 0) select 6] call GVAR(selectedStatement); + + // Clear the conditions caches + ["clearConditionCaches", []] call EFUNC(common,localEvent); + + // Check the action conditions + _actionData = GVAR(selectedAction) select 0; + if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { + // Call the statement + [_target, _player, _actionData select 6] call (_actionData select 3); + + // Clear the conditions caches again if the action was performed + ["clearConditionCaches", []] call EFUNC(common,localEvent); + }; }; }; }; @@ -196,3 +122,5 @@ for "_i" from GVAR(iconCount) to (count GVAR(iconCtrls))-1 do { }; GVAR(iconCtrls) resize GVAR(iconCount); GVAR(iconCount) = 0; + +END_COUNTER(fnc_render); diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf new file mode 100644 index 0000000000..a2f9d929c1 --- /dev/null +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -0,0 +1,113 @@ +/* + * Author: NouberNou and esteldunedain + * Render all action points + * + * Argument: + * None + * + * Return value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(currentOptions) = []; + +private ["_player","_numInteractObjects","_numInteractions","_actionsVarName","_classActions","_objectActions","_target","_player","_action","_actionData","_active"]; +_player = ACE_player; + + +_fnc_renderNearbyActions = { + // Render all nearby interaction menus + #define MAXINTERACTOBJECTS 3 + + _numInteractObjects = 0; + _nearestObjects = nearestObjects [(getPos ACE_player), ["All"], 15]; + { + _target = _x; + + _numInteractions = 0; + // Prevent interacting with yourself or your own vehicle + if (_target != ACE_player && {_target != vehicle ACE_player}) then { + + // Iterate through object actions, find base level actions and render them if appropiate + _actionsVarName = format [QGVAR(Act_%1), typeOf _target]; + GVAR(objectActionList) = _target getVariable [QGVAR(actions), []]; + { + // Only render them directly if they are base level actions + if (count (_x select 1) == 0) then { + // Try to render the menu + _action = _x; + if ([_target, _action] call FUNC(renderBaseMenu)) then { + _numInteractions = _numInteractions + 1; + }; + }; + } forEach GVAR(objectActionList); + + // Iterate through base level class actions and render them if appropiate + _classActions = missionNamespace getVariable [_actionsVarName, []]; + { + _action = _x; + // Try to render the menu + if ([_target, _action] call FUNC(renderBaseMenu)) then { + _numInteractions = _numInteractions + 1; + }; + } forEach _classActions; + + // Limit the amount of objects the player can interact with + if (_numInteractions > 0) then { + _numInteractObjects = _numInteractObjects + 1; + }; + }; + if (_numInteractObjects >= MAXINTERACTOBJECTS) exitWith {}; + + } forEach _nearestObjects; +}; + + + +_fnc_renderSelfActions = { + _target = _this; + + // Iterate through object actions, find base level actions and render them if appropiate + _actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target]; + GVAR(objectActionList) = _target getVariable [QGVAR(selfActions), []]; + /* + { + _action = _x; + // Only render them directly if they are base level actions + if (count (_action select 7) == 1) then { + [_target, _action, 0, [180, 360]] call FUNC(renderMenu); + }; + } forEach GVAR(objectActionList); + */ + + // Iterate through base level class actions and render them if appropiate + _actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target]; + _classActions = missionNamespace getVariable [_actionsVarName, []]; + { + _action = _x; + + _pos = if !(visibleMap) then { + (((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)) vectorAdd GVAR(selfMenuOffset)) call EFUNC(common,ASLToPosition) + } else { + [0.5, 0.5] + }; + [_target, _action, _pos] call FUNC(renderBaseMenu); + } forEach _classActions; +}; + + +// Render nearby actions, unit self actions or vehicle self actions as appropiate +if (GVAR(openedMenuType) == 0) then { + + if (vehicle ACE_player == ACE_player) then { + call _fnc_renderNearbyActions; + } else { + (vehicle ACE_player) call _fnc_renderSelfActions; + }; + +} else { + ACE_player call _fnc_renderSelfActions; +}; diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 277f79c141..077a9239f0 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -1,11 +1,11 @@ /* - * Author: NouberNou and CAA-Picard + * Author: NouberNou and esteldunedain * Render the interaction menu for a base action * * Argument: * 0: Object * 1: Action node - * 2: 3D position (Optional) + * 2: 3D position or 2D position (Optional) * * Return value: * Was the menu rendered @@ -14,6 +14,8 @@ */ #include "script_component.hpp" +BEGIN_COUNTER(fnc_renderBaseMenu) + private ["_distance","_pos","_weaponDir","_ref","_cameraPos","_sPos","_activeActionTree"]; EXPLODE_2_PVT(_this,_object,_baseActionNode); @@ -41,15 +43,16 @@ if((count _this) > 2) then { _pos = _pos vectorAdd ((visiblePositionASL _object) vectorDiff (getPosASL _object)); }; -_cameraToActionVec = (_pos call EFUNC(common,positionToASL)) vectorDiff ((positionCameraToWorld [0,0,0]) call EFUNC(common,positionToASL)); -GVAR(refSystem) = _cameraToActionVec call EFUNC(common,createOrthonormalReference); - // For non-self actions, exit if the action is too far away -if (GVAR(keyDown) && +if (GVAR(openedMenuType) == 0 && vehicle ACE_player == ACE_player && {(ACE_player modelToWorld (ACE_player selectionPosition "pilot")) distance _pos >= _distance}) exitWith {false}; // Exit if the action is behind you -_sPos = worldToScreen _pos; +_sPos = if (count _pos != 2) then { + worldToScreen _pos +} else { + _pos +}; if(count _sPos == 0) exitWith {false}; // Exit if the action is off screen @@ -57,14 +60,19 @@ if ((_sPos select 0) < safeZoneXAbs || (_sPos select 0) > safeZoneXAbs + safeZon if ((_sPos select 1) < safeZoneY || (_sPos select 1) > safeZoneY + safeZoneH) exitWith {false}; +BEGIN_COUNTER(fnc_collectActiveActionTree) + // Collect active tree private "_uid"; _uid = format [QGVAR(ATCache_%1), _actionData select 0]; _activeActionTree = [ [_object, _baseActionNode, []], DFUNC(collectActiveActionTree), - _object, _uid, 0.2 + _object, _uid, 1.0, "interactMenuClosed" ] call EFUNC(common,cachedCall); + +END_COUNTER(fnc_collectActiveActionTree) + /* diag_log "Printing: _activeActionTree"; _fnc_print = { @@ -82,6 +90,12 @@ if (count _activeActionTree == 0) exitWith {false}; //EXPLODE_2_PVT(_activeActionTree,_actionData,_actionChildren); -[[], _activeActionTree, _pos, [180,360]] call FUNC(renderMenu); +BEGIN_COUNTER(fnc_renderMenus); + +[[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu); + +END_COUNTER(fnc_renderMenus); + +END_COUNTER(fnc_renderBaseMenu) true diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 9d845eab3f..8054e9d800 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -1,11 +1,11 @@ /* - * Author: NouberNou and CAA-Picard + * Author: NouberNou and esteldunedain * Render a single interaction icon * * Argument: * 0: Text * 1: Color - * 2: 3d position ASL + * 2: 2d position * 3: ? * 4: ? * 5: ? @@ -18,32 +18,25 @@ */ #include "script_component.hpp" #define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa) -private ["_color", "_pos", "_sPos", "_ctrl", "_icon"]; +private ["_color", "_sPos", "_ctrl", "_icon"]; _text = _this select 0; _color = _this select 1; -_pos = _this select 2; +_sPos = _this select 2; _icon = _this select 6; -//systemChat format ["Icon %1 - %2,%3,%4", _text, _pos select 0, _pos select 1, _pos select 2]; +//systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1]; -_sPos = worldToScreen _pos; -// _sPos = _pos; -if(count _sPos > 0) then { - - if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { - _displayNum = [46,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); - //systemChat format ["Displaynum: %1", _displayNum]; - GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]); - }; - _ctrl = GVAR(iconCtrls) select GVAR(iconCount); - GVAR(iconCount) = GVAR(iconCount) + 1; - if(_icon == "") then { - _icon = DEFAULT_ICON; - }; - _text = format ["
%4", _icon, _color, _color, _text]; - _ctrl ctrlSetStructuredText (parseText _text); - _ctrl ctrlSetPosition [(_sPos select 0)-(0.2*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.4*SafeZoneW, 0.035*SafeZoneW]; - //_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1]; - //_ctrl ctrlSetBackgroundColor [1,0,0,1]; - _ctrl ctrlCommit 0; +if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { + _displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); + GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]); }; +_ctrl = GVAR(iconCtrls) select GVAR(iconCount); +GVAR(iconCount) = GVAR(iconCount) + 1; +if(_icon == "") then { + _icon = DEFAULT_ICON; +}; +_text = format ["
%4", _icon, _color, _color, _text]; +_ctrl ctrlSetStructuredText (parseText _text); +_ctrl ctrlSetPosition [(_sPos select 0)-(0.125*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.25*SafeZoneW, 0.1*SafeZoneW]; +//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1]; +_ctrl ctrlCommit 0; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 26b07dd475..42e8de16a2 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -1,11 +1,11 @@ /* - * Author: NouberNou and CAA-Picard + * Author: NouberNou and esteldunedain * Render an interaction menu and it's children recursively * * Argument: * 0: Parent path * 1: Action data - * 2: 3D position + * 2: 2D position * 3: Angle range available for rendering * * Return value: @@ -17,12 +17,14 @@ private ["_menuInSelectedPath", "_path", "_menuDepth", "_currentRenderDepth", "_x", "_offset", "_newPos", "_forEachIndex"]; -EXPLODE_4_PVT(_this,_parentPath,_action,_pos,_angles); +EXPLODE_4_PVT(_this,_parentPath,_action,_sPos,_angles); EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject); EXPLODE_2_PVT(_angles,_centerAngle,_maxAngleSpan); _menuDepth = (count GVAR(menuDepthPath)); +//BEGIN_COUNTER(constructing_paths); + // Store path to action _path = +_parentPath; _path pushBack [_actionData select 0,_actionObject]; @@ -38,68 +40,80 @@ _menuInSelectedPath = true; }; } forEach _path; +//END_COUNTER(constructing_paths); +//BEGIN_COUNTER(constructing_colors); + // Render icon // ARGB Color (First Hex Pair is transparancy) _color = "#FFFFFFFF"; -if(!_menuInSelectedPath) then { //_menuDepth > 0 && +if(!_menuInSelectedPath) then { if (_menuDepth > 0) then { _color = format ["#%1FFFFFF", [255 * ((((count _path) - 1)/_menuDepth) max 0.25)] call EFUNC(common,toHex)]; } else { _color = format ["#%1FFFFFF", [255 * 0.75] call EFUNC(common,toHex)]; }; }; -[_actionData select 1, _color, _pos, 1, 1, 0, _actionData select 2, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon); + +//END_COUNTER(constructing_colors); +//BEGIN_COUNTER(fnc_renderIcons); + +[_actionData select 1, _color, _sPos, 1, 1, 0, _actionData select 2, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon); + +//END_COUNTER(fnc_renderIcons); + +//BEGIN_COUNTER(currentOptions); // Add the action to current options -GVAR(currentOptions) pushBack [_this, _pos, _path]; +GVAR(currentOptions) pushBack [_this, _sPos, _path]; + +//END_COUNTER(currentOptions); // Exit without rendering children if it isn't if !(_menuInSelectedPath) exitWith {true}; -private ["_angleSpan","_angle","_angleInterval","_scale"]; -_angleSpan = _maxAngleSpan min (55 * ((count _activeChildren) - 1)); +//BEGIN_COUNTER(children); + +private ["_numChildren","_angleSpan","_angle","_angleInterval","_scale","_offset"]; +_numChildren = count _activeChildren; +_angleSpan = _maxAngleSpan min (55 * ((_numChildren) - 1)); if (_angleSpan >= 305) then { _angleSpan = 360; }; _angleInterval = 55; if (_angleSpan < 360) then { - if (count _activeChildren > 1) then { - _angleInterval = _angleSpan / (count _activeChildren - 1); + if (_numChildren > 1) then { + _angleInterval = _angleSpan / (_numChildren - 1); }; } else { - _angleSpan / (count _activeChildren); + _angleInterval = _angleSpan / (_numChildren); }; -if (count _activeChildren == 1) then { - _angleInterval = 60; +if (_numChildren == 1) then { + _angleInterval = 55; }; -// Scale menu based on distance -_scale = (0.15 max (0.15 * ((positionCameraToWorld [0, 0, 0]) distance _pos))) / GVAR(selfMenuScale); // Scale menu based on the amount of children -_scale = _scale * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.4) max 0.5); +_scale = 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5); // Animate menu scale if (_menuInSelectedPath && (_menuDepth == count _path)) then { _scale = _scale * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * 8) min 1)); }; +_target = _actionObject; +_player = ACE_player; + +//END_COUNTER(children); _angle = _centerAngle - _angleSpan / 2; { - _target = _actionObject; - _player = ACE_player; - - _offset = ((GVAR(refSystem) select 1) vectorMultiply (-_scale * cos _angle)) vectorAdd - ((GVAR(refSystem) select 2) vectorMultiply (-_scale * sin _angle)); - _newPos = ((_pos call EFUNC(common,positionToASL)) vectorAdd _offset) call EFUNC(common,ASLToPosition); + //BEGIN_COUNTER(children); + private ["_offset","_newPos"]; + _newPos = [(_sPos select 0) -_scale * cos _angle, + (_sPos select 1) +_scale * (sin _angle) * 4/3]; //drawLine3D [_pos, _newPos, [1,0,0,0.8]]; + //END_COUNTER(children); + [_path, _x, _newPos, [_angle, 150]] call FUNC(renderMenu); - [_path, _x, _newPos, [_angle, 140]] call FUNC(renderMenu); - - if (_angleSpan == 360) then { - _angle = _angle + _angleSpan / (count _activeChildren); - } else { - _angle = _angle + _angleSpan / (((count _activeChildren)-1) max 1); - }; + _angle = _angle + _angleInterval; } forEach _activeChildren; true diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf new file mode 100644 index 0000000000..44ed15e9c4 --- /dev/null +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -0,0 +1,30 @@ +/* + * Author: esteldunedain + * Render a single interaction icon + * + * Argument: + * 0: 2d position + * 1: Icon + * + * Return value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +EXPLODE_2_PVT(_this,_sPos,_icon); + +if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then { + _displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]); + GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]); +}; + +private "_ctrl"; +_ctrl = GVAR(iconCtrls) select GVAR(iconCount); +GVAR(iconCount) = GVAR(iconCount) + 1; + +_ctrl ctrlSetStructuredText (parseText format ["", _icon]); +_ctrl ctrlSetPosition [(_sPos select 0)-(0.05*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW]; +//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1]; +_ctrl ctrlCommit 0; diff --git a/addons/interact_menu/functions/fnc_splitPath.sqf b/addons/interact_menu/functions/fnc_splitPath.sqf index 87140d0482..609f26f972 100644 --- a/addons/interact_menu/functions/fnc_splitPath.sqf +++ b/addons/interact_menu/functions/fnc_splitPath.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Take full path and split it between parent path and action name * * Argument: diff --git a/addons/interact_menu/ui/selector0.paa b/addons/interact_menu/ui/selector0.paa new file mode 100644 index 0000000000..107c0df8ba Binary files /dev/null and b/addons/interact_menu/ui/selector0.paa differ diff --git a/addons/interact_menu/ui/selector1.paa b/addons/interact_menu/ui/selector1.paa new file mode 100644 index 0000000000..17f95562ee Binary files /dev/null and b/addons/interact_menu/ui/selector1.paa differ diff --git a/addons/interact_menu/ui/selector10.paa b/addons/interact_menu/ui/selector10.paa new file mode 100644 index 0000000000..ed783b45ec Binary files /dev/null and b/addons/interact_menu/ui/selector10.paa differ diff --git a/addons/interact_menu/ui/selector11.paa b/addons/interact_menu/ui/selector11.paa new file mode 100644 index 0000000000..cc70b12ef3 Binary files /dev/null and b/addons/interact_menu/ui/selector11.paa differ diff --git a/addons/interact_menu/ui/selector12.paa b/addons/interact_menu/ui/selector12.paa new file mode 100644 index 0000000000..b7aac55c75 Binary files /dev/null and b/addons/interact_menu/ui/selector12.paa differ diff --git a/addons/interact_menu/ui/selector13.paa b/addons/interact_menu/ui/selector13.paa new file mode 100644 index 0000000000..1adcca3c8e Binary files /dev/null and b/addons/interact_menu/ui/selector13.paa differ diff --git a/addons/interact_menu/ui/selector14.paa b/addons/interact_menu/ui/selector14.paa new file mode 100644 index 0000000000..f46fde1063 Binary files /dev/null and b/addons/interact_menu/ui/selector14.paa differ diff --git a/addons/interact_menu/ui/selector2.paa b/addons/interact_menu/ui/selector2.paa new file mode 100644 index 0000000000..7da669f90b Binary files /dev/null and b/addons/interact_menu/ui/selector2.paa differ diff --git a/addons/interact_menu/ui/selector3.paa b/addons/interact_menu/ui/selector3.paa new file mode 100644 index 0000000000..c9becb268a Binary files /dev/null and b/addons/interact_menu/ui/selector3.paa differ diff --git a/addons/interact_menu/ui/selector4.paa b/addons/interact_menu/ui/selector4.paa new file mode 100644 index 0000000000..eccec64c3a Binary files /dev/null and b/addons/interact_menu/ui/selector4.paa differ diff --git a/addons/interact_menu/ui/selector5.paa b/addons/interact_menu/ui/selector5.paa new file mode 100644 index 0000000000..0647f14c2e Binary files /dev/null and b/addons/interact_menu/ui/selector5.paa differ diff --git a/addons/interact_menu/ui/selector6.paa b/addons/interact_menu/ui/selector6.paa new file mode 100644 index 0000000000..a9555c2497 Binary files /dev/null and b/addons/interact_menu/ui/selector6.paa differ diff --git a/addons/interact_menu/ui/selector7.paa b/addons/interact_menu/ui/selector7.paa new file mode 100644 index 0000000000..b64f36af46 Binary files /dev/null and b/addons/interact_menu/ui/selector7.paa differ diff --git a/addons/interact_menu/ui/selector8.paa b/addons/interact_menu/ui/selector8.paa new file mode 100644 index 0000000000..4c3a422258 Binary files /dev/null and b/addons/interact_menu/ui/selector8.paa differ diff --git a/addons/interact_menu/ui/selector9.paa b/addons/interact_menu/ui/selector9.paa new file mode 100644 index 0000000000..c39a780c4f Binary files /dev/null and b/addons/interact_menu/ui/selector9.paa differ diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index a3b6187c6c..02dd078a2b 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { function = "ACE_Interaction_fnc_moduleInteraction"; scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconInteraction_ca.paa); + icon = PATHTOF(UI\Icon_Module_Interaction_ca.paa); class Arguments { class EnableTeamManagement { displayName = "Enable Team Management"; @@ -31,7 +31,7 @@ class CfgVehicles { condition = QUOTE(true); statement = ""; icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa"; - selection = "spine3"; + selection = "pelvis"; class ACE_TeamManagement { displayName = "$STR_ACE_Interaction_TeamManagement"; @@ -42,7 +42,6 @@ class CfgVehicles { priority = 3.2; icon = PATHTOF(UI\team\team_management_ca.paa); hotkey = "M"; - enableInside = 1; class ACE_JoinTeamRed { displayName = "$STR_ACE_Interaction_JoinTeamRed"; @@ -53,7 +52,6 @@ class CfgVehicles { icon = PATHTOF(UI\team\team_red_ca.paa); priority = 2.4; hotkey = "R"; - enableInside = 1; }; class ACE_JoinTeamGreen { displayName = "$STR_ACE_Interaction_JoinTeamGreen"; @@ -64,7 +62,6 @@ class CfgVehicles { icon = PATHTOF(UI\team\team_green_ca.paa); priority = 2.3; hotkey = "G"; - enableInside = 1; }; class ACE_JoinTeamBlue { displayName = "$STR_ACE_Interaction_JoinTeamBlue"; @@ -75,7 +72,6 @@ class CfgVehicles { icon = PATHTOF(UI\team\team_blue_ca.paa); priority = 2.2; hotkey = "B"; - enableInside = 1; }; class ACE_JoinTeamYellow { displayName = "$STR_ACE_Interaction_JoinTeamYellow"; @@ -86,7 +82,6 @@ class CfgVehicles { icon = PATHTOF(UI\team\team_yellow_ca.paa); priority = 2.1; hotkey = "Y"; - enableInside = 1; }; class ACE_LeaveTeam { @@ -98,7 +93,6 @@ class CfgVehicles { icon = PATHTOF(UI\team\team_white_ca.paa); priority = 2.5; hotkey = "N"; - enableInside = 1; }; }; @@ -111,7 +105,6 @@ class CfgVehicles { priority = 2.6; icon = PATHTOF(UI\team\team_management_ca.paa); hotkey = "J"; - enableInside = 1; }; class ACE_GetDown { @@ -137,48 +130,54 @@ class CfgVehicles { statement = QUOTE([ARR_3(_target,'{_this addRating -rating _this}',_target)] call DEFUNC(common,execRemoteFnc)); showDisabled = 0; priority = 2.5; - enableInside = 1; }; }; + class ACE_Torso { + displayName = "$STR_ACE_Interaction_Torso"; + selection = "spine3"; + distance = 1.50; + condition = ""; + statement = ""; + }; class ACE_Head { displayName = "$STR_ACE_Interaction_Head"; selection = "pilot"; - distance = 2.0; + distance = 1.50; condition = ""; statement = ""; }; class ACE_ArmLeft { displayName = "$STR_ACE_Interaction_ArmLeft"; selection = "LeftForeArm"; - distance = 2.0; + distance = 1.50; condition = ""; statement = ""; }; class ACE_ArmRight { displayName = "$STR_ACE_Interaction_ArmRight"; selection = "RightForeArm"; - distance = 2.0; + distance = 1.50; condition = ""; statement = ""; }; class ACE_LegLeft { displayName = "$STR_ACE_Interaction_LegLeft"; selection = "LKnee"; - distance = 2.0; + distance = 1.50; condition = ""; statement = ""; }; class ACE_LegRight { displayName = "$STR_ACE_Interaction_LegRight"; selection = "RKnee"; - distance = 2.0; + distance = 1.50; condition = ""; statement = ""; }; class ACE_Weapon { displayName = "$STR_ACE_Interaction_Weapon"; selection = "weapon"; - distance = 2.0; + distance = 1.50; condition = ""; statement = ""; }; @@ -203,83 +202,83 @@ class CfgVehicles { class ACE_TeamManagement { displayName = "$STR_ACE_Interaction_TeamManagement"; condition = QUOTE(GVAR(EnableTeamManagement)); + exceptions[] = {"isNotInside"}; statement = ""; showDisabled = 1; priority = 3.2; icon = PATHTOF(UI\team\team_management_ca.paa); - enableInside = 1; hotkey = "M"; class ACE_JoinTeamRed { displayName = "$STR_ACE_Interaction_JoinTeamRed"; condition = QUOTE(true); + exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.4; icon = PATHTOF(UI\team\team_red_ca.paa); - enableInside = 1; hotkey = "R"; }; class ACE_JoinTeamGreen { displayName = "$STR_ACE_Interaction_JoinTeamGreen"; condition = QUOTE(true); + exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.3; icon = PATHTOF(UI\team\team_green_ca.paa); - enableInside = 1; hotkey = "G"; }; class ACE_JoinTeamBlue { displayName = "$STR_ACE_Interaction_JoinTeamBlue"; condition = QUOTE(true); + exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_2(_player,'BLUE')] call FUNC(joinTeam)); showDisabled = 1; priority = 2.2; icon = PATHTOF(UI\team\team_blue_ca.paa); - enableInside = 1; hotkey = "B"; }; class ACE_JoinTeamYellow { displayName = "$STR_ACE_Interaction_JoinTeamYellow"; condition = QUOTE(true); + exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_2(_player,'YELLOW')] call FUNC(joinTeam)); showDisabled = 1; priority = 2.1; icon = PATHTOF(UI\team\team_yellow_ca.paa); - enableInside = 1; hotkey = "Y"; }; class ACE_LeaveTeam { displayName = "$STR_ACE_Interaction_LeaveTeam"; condition = QUOTE(assignedTeam _player != 'MAIN'); + exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_2(_player,'MAIN')] call FUNC(joinTeam)); showDisabled = 1; priority = 2.5; icon = PATHTOF(UI\team\team_white_ca.paa); - enableInside = 1; hotkey = "N"; }; class ACE_BecomeLeader { displayName = "$STR_ACE_Interaction_BecomeLeader"; condition = QUOTE(count (units group _player) > 1 && {leader group _player != _player}); + exceptions[] = {"isNotInside"}; statement = QUOTE(_newGroup = createGroup side group _player; (units group _player) joinSilent _newGroup; _newGroup selectLeader _player;); showDisabled = 1; priority = 1.0; icon = PATHTOF(UI\team\team_white_ca.paa); - enableInside = 1; hotkey = "L"; }; class ACE_LeaveGroup { displayName = "$STR_ACE_Interaction_LeaveGroup"; condition = QUOTE(count (units group _player) > 1); + exceptions[] = {"isNotInside"}; statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;); showDisabled = 1; priority = 1.2; icon = PATHTOF(UI\team\team_management_ca.paa); - enableInside = 1; hotkey = "M"; }; }; @@ -392,11 +391,11 @@ class CfgVehicles { class ACE_Equipment { displayName = "$STR_ACE_Interaction_Equipment"; condition = QUOTE(true); + exceptions[] = {"isNotInside","notOnMap"}; statement = ""; showDisabled = 1; priority = 4.5; icon = ""; // @todo - enableInside = 1; hotkey = "E"; }; }; diff --git a/addons/interaction/UI/IconInteraction_ca.paa b/addons/interaction/UI/IconInteraction_ca.paa deleted file mode 100644 index 000c4bc9c6..0000000000 Binary files a/addons/interaction/UI/IconInteraction_ca.paa and /dev/null differ diff --git a/addons/interaction/UI/Icon_Module_Interaction_ca.paa b/addons/interaction/UI/Icon_Module_Interaction_ca.paa new file mode 100644 index 0000000000..8eb5be3f22 Binary files /dev/null and b/addons/interaction/UI/Icon_Module_Interaction_ca.paa differ diff --git a/addons/interaction/XEH_clientInit.sqf b/addons/interaction/XEH_clientInit.sqf index 76647e54a3..1ed3883f02 100644 --- a/addons/interaction/XEH_clientInit.sqf +++ b/addons/interaction/XEH_clientInit.sqf @@ -1,4 +1,4 @@ -// by commy2 and CAA-Picard +// by commy2 and esteldunedain #include "script_component.hpp" diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index d5d9d63d69..cfca73a90b 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interact_menu"}; - author[] = {"commy2", "KoffeinFlummi", "CAA-Picard", "bux578"}; + author[] = {"commy2", "KoffeinFlummi", "esteldunedain", "bux578"}; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index d4a5da3788..1a079b1ac6 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -1,7 +1,6 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Mount unit actions inside passenger submenu - * Note: This function is NOT global. * * Argument: * 0: Vehicle diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 678cbc55db..c446be3737 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -1,7 +1,6 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Create one action per passenger - * Note: This function is NOT global. * * Argument: * 0: Vehicle @@ -29,7 +28,7 @@ _actions = []; str(_unit), [_unit, true] call EFUNC(common,getName), "", - {systemChat "selected passenger"}, + {}, {true}, {_this call FUNC(addPassengerActions);}, [_unit] diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 4b82908f2f..a4417df4e8 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -3,25 +3,28 @@ - Interactions >> + Interactions + + + Torso - Head >> + Head - Left Arm >> + Left Arm - Right Arm >> + Right Arm - Left Leg >> + Left Leg - Right Leg >> + Right Leg - Weapon >> + Weapon Interaction Menu @@ -180,16 +183,16 @@ << Indietro - Gestures >> - Gesten >> - Gestos >> - Gesty >> - Gesta >> - Signaux >> - ЖеÑÑ‚Ñ‹ >> - Kézjelek >> - Gestos >> - Segnali gestuali >> + Gestures + Gesten + Gestos + Gesty + Gesta + Signaux + ЖеÑÑ‚Ñ‹ + Kézjelek + Gestos + Segnali gestuali Attack @@ -432,16 +435,16 @@ A Terra! - Team Management >> - Team Management >> - Gestión de equipo >> - Gestion d'équipe >> - ZarzÄ…dzanie oddziaÅ‚em >> - Správa týmu >> - Управление группой >> - Gerenciamento de Equipe >> - Organizzazione Squadra >> - Csapat kezelés >> + Team<br/>Management + Team<br/>Management + Gestión<br/>de equipo + Gestion<br/>d'équipe + ZarzÄ…dzanie<br/>oddziaÅ‚em + Správa<br/>týmu + Управление<br/>группой + Gerenciamento<br/>de Equipe + Organizzazione<br/>Squadra + Csapat<br/>kezelés Red @@ -492,52 +495,52 @@ Sárga - Join Team Red - Team Rot beitreten - Unirse al equipo rojo - Rejoindre Rouge - DoÅ‚Ä…cz do drużyny czerwonej - PÅ™ipojit do ÄŒerveného Týmu - ПриÑоединитьÑÑ Ðº краÑной группе - Unir-se à Equipe Vermelha - Entra nella Squadra Rossa - Csatlakozás a piros csapathoz + Join Team<br/>Red + Team Rot<br/>beitreten + Unirse al<br/>equipo rojo + Rejoindre<br/>Rouge + DoÅ‚Ä…cz do drużyny<br/>czerwonej + PÅ™ipojit do<br/>ÄŒerveného Týmu + ПриÑоединитьÑÑ<br/>к краÑной группе + Unir-se à<br/>Equipe Vermelha + Entra nella<br/>Squadra Rossa + Csatlakozás a<br/>piros csapathoz - Join Team Green - Team Grün beitreten - Unirse al equipo verde - Rejoindre Verte - DoÅ‚Ä…cz do drużyny zielonej - PÅ™ipojit do Zeleného Týmu - ПриÑоединитьÑÑ Ðº зеленой группе - Unir-se à Equipe Verde - Entra nella Squadra Verde - Csatlakozás a zöld csapathoz + Join Team<br/>Green + Team Grün<br/>beitreten + Unirse al<br/>equipo verde + Rejoindre<br/>Verte + DoÅ‚Ä…cz do<br/>drużyny zielonej + PÅ™ipojit do<br/>Zeleného Týmu + ПриÑоединитьÑÑ<br/>к зеленой группе + Unir-se à<br/>Equipe Verde + Entra nella<br/>Squadra Verde + Csatlakozás a<br/>zöld csapathoz - Join Team Blue - Team Blau beitreten - Unirse al equipo azul - Rejoindre Bleue - DoÅ‚Ä…cz do drużyny niebieskiej - PÅ™ipojit do Modrého Týmu - ПриÑоединитьÑÑ Ðº Ñиней группе - Unir-se à Equipe Azul - Entra nella Squadra Blu - Csatlakozás a kék csapathoz + Join Team<br/>Blue + Team Blau<br/>beitreten + Unirse al<br/>equipo azul + Rejoindre<br/>Bleue + DoÅ‚Ä…cz do<br/>drużyny niebieskiej + PÅ™ipojit do<br/>Modrého Týmu + ПриÑоединитьÑÑ<br/>к Ñиней группе + Unir-se à<br/>Equipe Azul + Entra nella<br/>Squadra Blu + Csatlakozás a<br/>kék csapathoz - Join Team Yellow - Team Gelb beitreten - Unirse al equipo amarillo - Rejoindre Jaune - DoÅ‚Ä…cz do drużyny żółtej - PÅ™ipojit do Žlutého Týmu - ПриÑоединитьÑÑ Ðº желтой группе - Unir-se à Equipe Amarela - Entra nella Squadra Gialla - Csatlakozás a sárga csapathoz + Join Team<br/>Yellow + Team Gelb<br/>beitreten + Unirse al<br/>equipo amarillo + Rejoindre<br/>Jaune + DoÅ‚Ä…cz do<br/>drużyny żółtej + PÅ™ipojit do<br/>Žlutého Týmu + ПриÑоединитьÑÑ<br/>к желтой группе + Unir-se à<br/>Equipe Amarela + Entra nella<br/>Squadra Gialla + Csatlakozás a<br/>sárga csapathoz You joined Team %1 @@ -623,14 +626,14 @@ Mimo dosah - Equipment >> - Ausrüstung >> - Equipamiento >> - Équipment >> - Ekwipunek >> - Vybavení >> - Felszerelés >> - СнарÑжение >> + Equipment + Ausrüstung + Equipamiento + Équipment + Ekwipunek + Vybavení + Felszerelés + СнарÑжение Push @@ -651,7 +654,7 @@ Interactuar - Passengers >> + Passengers diff --git a/addons/kestrel/config.cpp b/addons/kestrel/config.cpp index 61735f1697..b79dcd5825 100644 --- a/addons/kestrel/config.cpp +++ b/addons/kestrel/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_Kestrel"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common","ace_interaction"}; - author[] = {"Falke","commy2","KoffeinFlummi","CAA-Picard"}; + author[] = {"Falke","commy2","KoffeinFlummi","esteldunedain"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf index 626e0e3abc..969607f987 100644 --- a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf +++ b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf @@ -1,4 +1,4 @@ -// by commy2 and CAA-Picard +// by commy2 and esteldunedain #include "script_component.hpp" EXPLODE_3_PVT(_this,_unit,_range,_isGreen); diff --git a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf index a23969aa9f..b5c6664657 100644 --- a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf +++ b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf @@ -24,7 +24,7 @@ _onFinish = { EXPLODE_2_PVT((_this select 0),_caller,_target); _caller removeItem "ACE_UAVBattery"; playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10]; - ["VehicleSetFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local + ["setFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local }; _onFailure = { diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index c81fc46c40..6dace9c42d 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -17,6 +17,7 @@ PARAMS_1(_interactionType); +//Ignore self-interaction menu if (_interactionType != 0) exitWith {}; //for performance only do stuff it they have a wirecutter item @@ -32,16 +33,19 @@ if (!("ACE_wirecutter" in (items ace_player))) exitWith {}; {deleteVehicle _x;} forEach _addedHelpers; [_pfID] call CBA_fnc_removePerFrameHandler; } else { - //If play moved >5 meters from last pos, then rescan + // Prevent Rare Error when ending mission with interact key down: + if (isNull ace_player) exitWith {}; + + //If player moved >5 meters from last pos, then rescan if (((getPosASL ace_player) distance _setPosition) > 5) then { _fncStatement = { - _attachedFence = _target getVariable [QGVAR(attachedFence), objNull]; - [ace_player, _attachedFence] call FUNC(cutDownFence); + PARAMS_3(_dummyTarget,_player,_attachedFence); + [_player, _attachedFence] call FUNC(cutDownFence); }; _fncCondition = { - _attachedFence = _target getVariable [QGVAR(attachedFence), objNull]; - ((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items ace_player))}) + PARAMS_3(_dummyTarget,_player,_attachedFence); + ((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items _player))}) }; { @@ -49,10 +53,10 @@ if (!("ACE_wirecutter" in (items ace_player))) exitWith {}; if ([_x] call FUNC(isFence)) then { _fencesHelped pushBack _x; _helper = "Sign_Sphere25cm_F" createVehicleLocal (getpos _x); - [_helper, 0, [""], (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), [0,0,0], _fncStatement, _fncCondition, 5] call EFUNC(interact_menu,addAction); + _action = [QGVAR(helperCutFence), (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, [0,0,0], 5] call EFUNC(interact_menu,createAction); + [_helper, 0, [],_action] call EFUNC(interact_menu,addActionToObject); _helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]); _helper hideObject true; - _helper setVariable [QGVAR(attachedFence), _x]; _addedHelpers pushBack _helper; }; }; diff --git a/addons/magazinerepack/CfgVehicles.hpp b/addons/magazinerepack/CfgVehicles.hpp index acd1c76c3d..eba2edac68 100644 --- a/addons/magazinerepack/CfgVehicles.hpp +++ b/addons/magazinerepack/CfgVehicles.hpp @@ -5,12 +5,12 @@ class CfgVehicles { class ACE_RepackMagazines { displayName = "$STR_ACE_MagazineRepack_RepackMagazines"; condition = QUOTE(true); + exceptions[] = {"isNotInside"}; statement = QUOTE([_player] call FUNC(openSelectMagazineUI)); showDisabled = 0; priority = -2; icon = QUOTE(PATHTOF(UI\repack_ca.paa)); hotkey = "R"; - enableInside = 1; }; }; }; diff --git a/addons/magazinerepack/config.cpp b/addons/magazinerepack/config.cpp index 514a74350a..7011d28c0c 100644 --- a/addons/magazinerepack/config.cpp +++ b/addons/magazinerepack/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2","CAA-Picard"}; + author[] = {"commy2","esteldunedain"}; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index 937cfcbf9a..d8fd5ca177 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -3,16 +3,16 @@ - Repack Magazines - Magazine umpacken - Reorganizar cargadores - Réorganiser chargeurs - Przepakuj magazynki - PÅ™epáskovat Zásobníky - Ricarica Caricatori - Reorganizar Carregadores - Újratárazás - Перепаковать магазины + Repack<br/>Magazines + Magazine<br/>umpacken + Reorganizar<br/>cargadores + Réorganiser<br/>chargeurs + Przepakuj<br/>magazynki + PÅ™epáskovat<br/>Zásobníky + Ricarica<br/>Caricatori + Reorganizar<br/>Carregadores + Újratárazás<br/> + Перепаковать<br/>магазины Select Magazine Menu diff --git a/addons/magazines/CfgWeapons.hpp b/addons/magazines/CfgWeapons.hpp index 2b24d578fe..46344d5f06 100644 --- a/addons/magazines/CfgWeapons.hpp +++ b/addons/magazines/CfgWeapons.hpp @@ -230,7 +230,7 @@ class CfgWeapons { class muzzle_snds_H: ItemCore { class ItemInfo: InventoryMuzzleItem_Base_F { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; }; class AmmoCoef { @@ -263,7 +263,7 @@ class CfgWeapons { class muzzle_snds_L: muzzle_snds_H { class ItemInfo: ItemInfo { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; }; class AmmoCoef { @@ -296,7 +296,7 @@ class CfgWeapons { class muzzle_snds_M: muzzle_snds_H { class ItemInfo: ItemInfo { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; }; class AmmoCoef { @@ -329,7 +329,7 @@ class CfgWeapons { class muzzle_snds_B: muzzle_snds_H { class ItemInfo: ItemInfo { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; }; class AmmoCoef { @@ -362,7 +362,7 @@ class CfgWeapons { class muzzle_snds_H_MG: muzzle_snds_H { class ItemInfo: ItemInfo { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; }; class AmmoCoef { @@ -395,7 +395,7 @@ class CfgWeapons { class muzzle_snds_H_SW: muzzle_snds_H_MG { class ItemInfo: ItemInfo { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; }; class AmmoCoef { @@ -428,7 +428,73 @@ class CfgWeapons { class muzzle_snds_acp: muzzle_snds_H { class ItemInfo: ItemInfo { class MagazineCoef { - initSpeed = 1.0; + initSpeed = 1.05; + }; + + class AmmoCoef { + hit = 0.9; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_338_black: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.05; + }; + + class AmmoCoef { + hit = 0.9; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.8f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "1.0f"; + recoilProneCoef = "1.0f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; + + class muzzle_snds_93mmg: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.05; }; class AmmoCoef { diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 8425c4ad1e..ff2c4d615e 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -190,15 +190,21 @@ #define GETVAR(var1,var2,var3) var1 GETVAR_SYS(var2,var3) #define GETMVAR(var1,var2) missionNamespace GETVAR_SYS(var1,var2) #define GETUVAR(var1,var2) uiNamespace GETVAR_SYS(var1,var2) +#define GETPRVAR(var1,var2) profileNamespace GETVAR_SYS(var1,var2) +#define GETPAVAR(var1,var2) parsingNamespace GETVAR_SYS(var1,var2) #define SETVAR(var1,var2,var3) var1 SETVAR_SYS(var2,var3) #define SETPVAR(var1,var2,var3) var1 SETPVAR_SYS(var2,var3) #define SETMVAR(var1,var2) missionNamespace SETVAR_SYS(var1,var2) #define SETUVAR(var1,var2) uiNamespace SETVAR_SYS(var1,var2) +#define SETPRVAR(var1,var2) profileNamespace SETVAR_SYS(var1,var2) +#define SETPAVAR(var1,var2) parsingNamespace SETVAR_SYS(var1,var2) #define GETGVAR(var1,var2) GETMVAR(GVAR(var1),var2) #define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3) +#define ARR_SELECT(ARRAY,INDEX,DEFAULT) if (count ARRAY > INDEX) then {ARRAY select INDEX} else {DEFAULT} + #define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ weapon = #WEAPON; \ diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 7960fe67ee..b8d3a54d96 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { function = QFUNC(moduleMap); scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconMap_ca.paa); + icon = PATHTOF(UI\Icon_Module_Map_ca.paa); class Arguments { class MapIllumination { displayName = "Map illumination?"; @@ -46,7 +46,7 @@ class CfgVehicles { function = QFUNC(blueForceTrackingModule); scope = 2; isGlobal = 1; - icon = PATHTOF(UI\IconBFTracking_ca.paa); + icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Interval { displayName = "Interval"; diff --git a/addons/map/UI/IconBFTracking_ca.paa b/addons/map/UI/IconBFTracking_ca.paa deleted file mode 100644 index 128f08f6f0..0000000000 Binary files a/addons/map/UI/IconBFTracking_ca.paa and /dev/null differ diff --git a/addons/map/UI/IconMap_ca.paa b/addons/map/UI/IconMap_ca.paa deleted file mode 100644 index 128f08f6f0..0000000000 Binary files a/addons/map/UI/IconMap_ca.paa and /dev/null differ diff --git a/addons/map/UI/Icon_Module_BFTracking_ca.paa b/addons/map/UI/Icon_Module_BFTracking_ca.paa new file mode 100644 index 0000000000..485be04e84 Binary files /dev/null and b/addons/map/UI/Icon_Module_BFTracking_ca.paa differ diff --git a/addons/map/UI/Icon_Module_Map_ca.paa b/addons/map/UI/Icon_Module_Map_ca.paa new file mode 100644 index 0000000000..ebd2d0ef4f Binary files /dev/null and b/addons/map/UI/Icon_Module_Map_ca.paa differ diff --git a/addons/map/config.cpp b/addons/map/config.cpp index c779caa9b2..e544a67c12 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common", "ace_interaction"}; - author[] = {"KoffeinFlummi","Rocko","CAA-Picard"}; + author[] = {"KoffeinFlummi","Rocko","esteldunedain"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index 370bcdb167..e342ae82df 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -1,5 +1,5 @@ /* -* Author: Rocko and CAA-Picard +* Author: Rocko and esteldunedain * Calculates the current map illumination for a given unit * * Arguments: diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 4fdea61420..b6e556c92e 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Initializes the Map module. * * Arguments: diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index ad32a02632..027197a150 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -1,5 +1,5 @@ /* -* Author: Rocko and CAA-Picard +* Author: Rocko and esteldunedain * On map draw, updates the effects * * Arguments: diff --git a/addons/maptools/$PBOPREFIX$ b/addons/maptools/$PBOPREFIX$ index 11a24a58d8..15fe8ae13f 100644 --- a/addons/maptools/$PBOPREFIX$ +++ b/addons/maptools/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\Addons\map \ No newline at end of file +z\ace\Addons\maptools \ No newline at end of file diff --git a/addons/maptools/CfgVehicles.hpp b/addons/maptools/CfgVehicles.hpp index 4ecc649893..d9eb295871 100644 --- a/addons/maptools/CfgVehicles.hpp +++ b/addons/maptools/CfgVehicles.hpp @@ -7,73 +7,65 @@ class CfgVehicles { displayName = "$STR_ACE_MapTools_MapTools_Menu"; condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)})); statement = ""; - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 0; priority = 100; - enableInside = 1; class ACE_MapToolsHide { displayName = "$STR_ACE_MapTools_MapToolsHide"; condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 1; priority = 5; - enableInside = 1; }; class ACE_MapToolsShowNormal { displayName = "$STR_ACE_MapTools_MapToolsShowNormal"; condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1})); statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 1; priority = 4; - enableInside = 1; }; class ACE_MapToolsShowSmall { displayName = "$STR_ACE_MapTools_MapToolsShowSmall"; condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2})); statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 1; priority = 3; - enableInside = 1; }; class ACE_MapToolsAlignNorth { displayName = "$STR_ACE_MapTools_MapToolsAlignNorth"; condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0})); statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 1; priority = 2; - enableInside = 1; }; class ACE_MapToolsAlignCompass { displayName = "$STR_ACE_MapTools_MapToolsAlignCompass"; condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}})); statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 1; priority = 1; - enableInside = 1; }; class ACE_MapGpsShow { displayName = "$STR_ACE_MapTools_MapGpsShow"; condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)})); statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 0; priority = 0; - enableInside = 1; }; class ACE_MapGpsHide { displayName = "$STR_ACE_MapTools_MapGpsHide"; condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)})); statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps)); - exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)}; + exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"}; showDisabled = 0; priority = 0; - enableInside = 1; }; }; }; diff --git a/addons/maptools/UI/IconBFTracking_ca.paa b/addons/maptools/UI/IconBFTracking_ca.paa deleted file mode 100644 index 128f08f6f0..0000000000 Binary files a/addons/maptools/UI/IconBFTracking_ca.paa and /dev/null differ diff --git a/addons/maptools/XEH_postInitClient.sqf b/addons/maptools/XEH_postInitClient.sqf index 5267a8c802..e94cdaf266 100644 --- a/addons/maptools/XEH_postInitClient.sqf +++ b/addons/maptools/XEH_postInitClient.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" diff --git a/addons/maptools/config.cpp b/addons/maptools/config.cpp index ea39ca7708..d5b1f26396 100644 --- a/addons/maptools/config.cpp +++ b/addons/maptools/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_MapTools"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common", "ace_interaction"}; - author[] = {"CAA-Picard"}; + author[] = {"esteldunedain"}; authorUrl = "https://github.com/esteldunedain/"; VERSION_CONFIG; }; diff --git a/addons/maptools/functions/fnc_addLineMarker.sqf b/addons/maptools/functions/fnc_addLineMarker.sqf index 24446c18a6..a55792e98a 100644 --- a/addons/maptools/functions/fnc_addLineMarker.sqf +++ b/addons/maptools/functions/fnc_addLineMarker.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Add the line marker * diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf index 3c3fc33d53..d8ed1cfcb9 100644 --- a/addons/maptools/functions/fnc_calculateMapScale.sqf +++ b/addons/maptools/functions/fnc_calculateMapScale.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Returns the equivalent of 100m in screen coordinates * diff --git a/addons/maptools/functions/fnc_canDraw.sqf b/addons/maptools/functions/fnc_canDraw.sqf index 2c3cc68e21..a5088f668b 100644 --- a/addons/maptools/functions/fnc_canDraw.sqf +++ b/addons/maptools/functions/fnc_canDraw.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index af6840f7fa..f3d0b10c56 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" diff --git a/addons/maptools/functions/fnc_canUseMapTools.sqf b/addons/maptools/functions/fnc_canUseMapTools.sqf index f06408d929..fe0bf012da 100644 --- a/addons/maptools/functions/fnc_canUseMapTools.sqf +++ b/addons/maptools/functions/fnc_canUseMapTools.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" diff --git a/addons/maptools/functions/fnc_cancelDrawing.sqf b/addons/maptools/functions/fnc_cancelDrawing.sqf index 1cd9f4fa77..09396e61fe 100644 --- a/addons/maptools/functions/fnc_cancelDrawing.sqf +++ b/addons/maptools/functions/fnc_cancelDrawing.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Cancel the drawing of the current line marker * diff --git a/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf b/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf index dcae05c572..d2675a2b06 100644 --- a/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf +++ b/addons/maptools/functions/fnc_copyMapReceiveMarkers.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Copy recieved markers to map * diff --git a/addons/maptools/functions/fnc_copyMapRemoteSend.sqf b/addons/maptools/functions/fnc_copyMapRemoteSend.sqf index 27e0a61b72..f4aebf6093 100644 --- a/addons/maptools/functions/fnc_copyMapRemoteSend.sqf +++ b/addons/maptools/functions/fnc_copyMapRemoteSend.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Send Map markers to other player * diff --git a/addons/maptools/functions/fnc_copyMapStart.sqf b/addons/maptools/functions/fnc_copyMapStart.sqf index d3a1efaa80..11464d7573 100644 --- a/addons/maptools/functions/fnc_copyMapStart.sqf +++ b/addons/maptools/functions/fnc_copyMapStart.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Send request to remote player * @@ -15,7 +15,7 @@ * Return value: * Return */ - + #include "script_component.hpp" PARAMS_1(_player,_target); diff --git a/addons/maptools/functions/fnc_handleKeyDown.sqf b/addons/maptools/functions/fnc_handleKeyDown.sqf index 0dfc4d895e..4553ed62ab 100644 --- a/addons/maptools/functions/fnc_handleKeyDown.sqf +++ b/addons/maptools/functions/fnc_handleKeyDown.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Handle key down on map. * diff --git a/addons/maptools/functions/fnc_handleMouseButton.sqf b/addons/maptools/functions/fnc_handleMouseButton.sqf index 0a1309d456..b0eb848e61 100644 --- a/addons/maptools/functions/fnc_handleMouseButton.sqf +++ b/addons/maptools/functions/fnc_handleMouseButton.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Handle mouse buttons. * diff --git a/addons/maptools/functions/fnc_handleMouseMove.sqf b/addons/maptools/functions/fnc_handleMouseMove.sqf index aac19ba883..6df07cfead 100644 --- a/addons/maptools/functions/fnc_handleMouseMove.sqf +++ b/addons/maptools/functions/fnc_handleMouseMove.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Handle mouse movement over the map tool. * diff --git a/addons/maptools/functions/fnc_handleMouseZChanged.sqf b/addons/maptools/functions/fnc_handleMouseZChanged.sqf index 3f68512d4d..483efc56b7 100644 --- a/addons/maptools/functions/fnc_handleMouseZChanged.sqf +++ b/addons/maptools/functions/fnc_handleMouseZChanged.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Handle mouse wheel. * @@ -21,10 +21,11 @@ diag_log "Scroll"; diag_log _this; _handled = false; +_handled = true; // If drawing, change line color -//@todo AGM bug: +//@todo AGM bug: // ACE_Map_drawColors is never defined /* if (count GVAR(drawing_tempLineMarker) > 0) then { @@ -37,7 +38,7 @@ _handled = false; }; GVAR(drawing_tempLineMarker) set [3, ACE_Map_drawColor]; GVAR(drawing_tempLineMarker) call ACE_Map_fnc_updateLineMarker; - + _handled = true; }; */ _handled diff --git a/addons/maptools/functions/fnc_isInsideMapTool.sqf b/addons/maptools/functions/fnc_isInsideMapTool.sqf index 98b88651a6..4e2339f9f1 100644 --- a/addons/maptools/functions/fnc_isInsideMapTool.sqf +++ b/addons/maptools/functions/fnc_isInsideMapTool.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Return true if the position is inside the map marker (to allow dragging). * diff --git a/addons/maptools/functions/fnc_openMapGps.sqf b/addons/maptools/functions/fnc_openMapGps.sqf index c89416401b..03b3f5525c 100644 --- a/addons/maptools/functions/fnc_openMapGps.sqf +++ b/addons/maptools/functions/fnc_openMapGps.sqf @@ -1,5 +1,5 @@ /* -* Author: CAA-Picard +* Author: esteldunedain * * Opens or closes the gps on the map screen, showing coordinates * diff --git a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf index ea022b4cf2..a4d25f8157 100644 --- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf +++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf @@ -1,4 +1,4 @@ -//CAA-Picard +//esteldunedain //update gps display #include "script_component.hpp" @@ -11,7 +11,7 @@ disableSerialization; _mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]; _ctrl = _mapGpsDisplay displayCtrl 913590; -_ctrl ctrlSetText str(round(getDir player)); //set Heading +_ctrl ctrlSetText str(round(getDir player)); //set Heading _ctrl = _mapGpsDisplay displayCtrl 913591; _ctrl ctrlSetText str(round((getPosASL player) select 2)); //set Altitude _ctrl = _mapGpsDisplay displayCtrl 913592; diff --git a/addons/maptools/functions/fnc_removeLineMarker.sqf b/addons/maptools/functions/fnc_removeLineMarker.sqf index 124d4b031c..15af48217e 100644 --- a/addons/maptools/functions/fnc_removeLineMarker.sqf +++ b/addons/maptools/functions/fnc_removeLineMarker.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Remove the line marker * diff --git a/addons/maptools/functions/fnc_updateLineMarker.sqf b/addons/maptools/functions/fnc_updateLineMarker.sqf index 34c8be2a04..9635dc02fa 100644 --- a/addons/maptools/functions/fnc_updateLineMarker.sqf +++ b/addons/maptools/functions/fnc_updateLineMarker.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Updates the line marker position and scale * @@ -19,7 +19,7 @@ _startPos = _this select 1; _difPos = (_this select 2) vectorDiff _startPos ; _color = _this select 3; - + _name setMarkerShapeLocal "RECTANGLE"; _name setMarkerAlphaLocal 1; _name setMarkerColorLocal GVAR(drawing_drawColor); diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index a167a8eb45..bb096bd064 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Update the map tool markers, position, size, rotation and visibility. * diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index 1658856128..5dd4578976 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -27,16 +27,16 @@ КартографичеÑкие инÑтрументы позволÑÑŽÑ‚ измерÑÑ‚ÑŒ раÑÑтоÑÐ½Ð¸Ñ Ð¸ углы на карте. - Map Tools >> - Herramientas de mapa >> - Outils de navigation >> - NarzÄ™dzia nawigacyjne >> - Kartenwerkzeug >> - Pomůcky k MapÄ› >> - Strumenti Cartografici >> - Ferramentas de Mapa >> - Térképészeti eszközök >> - ИнÑтрументы карты >> + Map Tools + Herramientas de mapa + Outils de navigation + NarzÄ™dzia nawigacyjne + Kartenwerkzeug + Pomůcky k MapÄ› + Strumenti Cartografici + Ferramentas de Mapa + Térképészeti eszközök + ИнÑтрументы карты Hide Map Tool diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 24a638ac5f..da8c723c8a 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -9,7 +9,7 @@ class ACE_Medical_Actions { requiredMedic = 0; treatmentTime = 5; treatmentTimeSelfCoef = 1; - items[] = {{QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(quikClot)}}; + items[] = {{"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"}}; condition = ""; itemConsumed = 1; @@ -27,7 +27,7 @@ class ACE_Medical_Actions { displayName = "$STR_ACE_Medical_Inject_Morphine"; displayNameProgress = "$STR_ACE_Medical_Injecting_Morphine"; treatmentTime = 2; - items[] = {QGVAR(morphine)}; + items[] = {"ACE_morphine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; @@ -36,7 +36,7 @@ class ACE_Medical_Actions { displayNameProgress = "$STR_ACE_Medical_Injecting_Epinephrine"; requiredMedic = 1; treatmentTime = 3; - items[] = {QGVAR(epinephrine)}; + items[] = {"ACE_epinephrine"}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; @@ -45,10 +45,34 @@ class ACE_Medical_Actions { displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood"; requiredMedic = 1; treatmentTime = 20; - items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}}; + items[] = {{"ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"}}; callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; + class Carry: Bandage { + displayName = ""; + displayNameProgress = ""; + treatmentLocations[] = {"All"}; + requiredMedic = 0; + treatmentTime = 0; + items[] = {}; + condition = QUOTE(DFUNC(canCarry)); + callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, true)] call DFUNC(actionCarryUnit)); + callbackFailure = ""; + callbackProgress = ""; + itemConsumed = 0; + animationPatient = ""; + animationCaller = ""; + animationCallerProne = ""; + animationCallerSelf = ""; + animationCallerSelfProne = ""; + }; + class Drag: Carry { + displayName = ""; + displayNameProgress = ""; + condition = QUOTE(DFUNC(canCarry)); + callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, false)] call DFUNC(actionCarryUnit)); + }; }; class Advanced { @@ -60,7 +84,7 @@ class ACE_Medical_Actions { // The time it takes for a treatment action to complete. Time is in seconds. treatmentTime = 5; // Item required for the action. Leave empty for no item required. - items[] = {QGVAR(fieldDressing)}; + items[] = {"ACE_fieldDressing"}; condition = ""; // Callbacks callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage)); @@ -74,67 +98,67 @@ class ACE_Medical_Actions { animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; }; class PackingBandage: fieldDressing { - items[] = {QGVAR(packingBandage)}; + items[] = {"ACE_packingBandage"}; }; class ElasticBandage: fieldDressing { - items[] = {QGVAR(elasticBandage)}; + items[] = {"ACE_elasticBandage"}; }; class QuikClot: fieldDressing { - items[] = {QGVAR(quikClot)}; + items[] = {"ACE_quikclot"}; }; class Tourniquet: fieldDressing { - items[] = {QGVAR(tourniquet)}; + items[] = {"ACE_tourniquet"}; treatmentTime = 6; callbackSuccess = QUOTE(DFUNC(treatmentTourniquet)); condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo))); }; class Morphine: fieldDressing { - items[] = {QGVAR(morphine)}; + items[] = {"ACE_morphine"}; treatmentTime = 3; callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class Atropine: Morphine { - items[] = {QGVAR(atropine)}; + items[] = {"ACE_atropine"}; }; class Epinephrine: Morphine { - items[] = {QGVAR(epinephrine)}; + items[] = {"ACE_epinephrine"}; }; class BloodIV: fieldDressing { - items[] = {QGVAR(bloodIV)}; + items[] = {"ACE_bloodIV"}; requiredMedic = 1; treatmentTime = 7; callbackSuccess = QUOTE(DFUNC(treatmentIV)); animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class BloodIV_500: BloodIV { - items[] = {QGVAR(bloodIV_500)}; + items[] = {"ACE_bloodIV_500"}; }; class BloodIV_250: BloodIV { - items[] = {QGVAR(bloodIV_250)}; + items[] = {"ACE_bloodIV_250"}; }; class PlasmaIV: BloodIV { - items[] = {QGVAR(plasmaIV)}; + items[] = {"ACE_plasmaIV"}; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class PlasmaIV_500: PlasmaIV { - items[] = {QGVAR(plasmaIV_500)}; + items[] = {"ACE_plasmaIV_500"}; }; class PlasmaIV_250: PlasmaIV { - items[] = {QGVAR(plasmaIV_250)}; + items[] = {"ACE_plasmaIV_250"}; }; class SalineIV: BloodIV { - items[] = {QGVAR(salineIV)}; + items[] = {"ACE_salineIV"}; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class SalineIV_500: SalineIV { - items[] = {QGVAR(salineIV_500)}; + items[] = {"ACE_salineIV_500"}; }; class SalineIV_250: SalineIV { - items[] = {QGVAR(salineIV_250)}; + items[] = {"ACE_salineIV_250"}; }; class SurgicalKit: fieldDressing { - items[] = {QGVAR(surgicalKit)}; + items[] = {"ACE_surgicalKit"}; treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"}; requiredMedic = 2; treatmentTime = 15; @@ -143,7 +167,7 @@ class ACE_Medical_Actions { animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; }; class PersonalAidKit: fieldDressing { - items[] = {QGVAR(personalAidKit)}; + items[] = {"ACE_personalAidKit"}; treatmentLocations[] = {"All"}; requiredMedic = 1; treatmentTime = 15; @@ -191,7 +215,7 @@ class ACE_Medical_Actions { treatmentLocations[] = {"All"}; requiredMedic = 0; treatmentTime = 7.5; - items[] = {QGVAR(bodyBag)}; + items[] = {"ACE_bodyBag"}; condition = "!alive (_this select 1);"; callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag)); callbackFailure = ""; @@ -199,6 +223,30 @@ class ACE_Medical_Actions { animationPatient = ""; itemConsumed = 0; }; + class Carry: fieldDressing { + displayName = ""; + displayNameProgress = ""; + treatmentLocations[] = {"All"}; + requiredMedic = 0; + treatmentTime = 0; + items[] = {}; + condition = QUOTE(DFUNC(canCarry)); + callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, true)] call DFUNC(actionCarryUnit)); + callbackFailure = ""; + callbackProgress = ""; + itemConsumed = 0; + animationPatient = ""; + animationCaller = ""; + animationCallerProne = ""; + animationCallerSelf = ""; + animationCallerSelfProne = ""; + }; + class Drag: Carry { + displayName = ""; + displayNameProgress = ""; + condition = QUOTE(DFUNC(canCarry)); + callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, false)] call DFUNC(actionCarryUnit)); + }; }; }; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index a57bc43dff..003d9897b8 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -68,4 +68,8 @@ class ACE_Settings { typeName = "NUMBER"; value = 120; }; + class GVAR(allowDeadBodyMovement) { + typeName = "BOOL"; + value = false; + }; }; diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp index 9600675e46..6330819daa 100644 --- a/addons/medical/CfgEventHandlers.hpp +++ b/addons/medical/CfgEventHandlers.hpp @@ -42,3 +42,11 @@ class Extended_Local_EventHandlers { }; }; }; + +class Extended_Take_EventHandlers { + class CAManBase { + class ADDON { + take = QUOTE(call FUNC(itemCheck)); + }; + }; +}; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index ad9302a2e8..9f3f2c25b7 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -1,4 +1,6 @@ +#define MEDICAL_ACTION_DISTANCE 1.75 + class CfgVehicles { class Logic; @@ -6,17 +8,18 @@ class CfgVehicles { class ArgumentsBaseUnits { }; }; + class ACE_Module; // TODO localization for all the modules - class ACE_moduleMedicalSettings: Module_F { + class ACE_moduleMedicalSettings: ACE_Module { scope = 2; displayName = "Medical Settings [ACE]"; - icon = QUOTE(PATHTOF(ui\moduleIcon.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); category = "ACE_medical"; function = QUOTE(DFUNC(moduleMedicalSettings)); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class Arguments { class level { displayName = "Medical Level"; @@ -129,17 +132,17 @@ class CfgVehicles { }; }; - class ACE_moduleTreatmentConfiguration: Module_F { + class ACE_moduleTreatmentConfiguration: ACE_Module { scope = 2; displayName = "Treatment Configuration [ACE]"; - icon = QUOTE(PATHTOF(ui\moduleIcon.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); category = "ACE_medical"; function = QUOTE(FUNC(moduleTreatmentConfiguration)); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; isDisposable = 0; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class Arguments { class medicSetting { displayName = "Medics setting"; @@ -189,14 +192,14 @@ class CfgVehicles { class ACE_moduleAssignMedicRoles: Module_F { scope = 2; displayName = "Set Medic Class [ACE]"; - icon = QUOTE(PATHTOF(ui\moduleIcon.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); category = "ACE_medical"; function = QUOTE(FUNC(moduleAssignMedicRoles)); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; isDisposable = 0; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class Arguments { class EnableList { displayName = "List"; @@ -235,14 +238,14 @@ class CfgVehicles { class ACE_moduleAssignMedicVehicle: Module_F { scope = 2; displayName = "Set Medical Vehicle [ACE]"; - icon = QUOTE(PATHTOF(ui\moduleIcon.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); category = "ACE_medical"; function = QUOTE(FUNC(moduleAssignMedicalVehicle)); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; isDisposable = 0; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class Arguments { class EnableList { displayName = "List"; @@ -265,14 +268,14 @@ class CfgVehicles { class ACE_moduleAssignMedicalFacility: Module_F { scope = 2; displayName = "Set Medical Facility [ACE]"; - icon = QUOTE(PATHTOF(ui\moduleIcon.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); category = "ACE_medical"; function = QUOTE(FUNC(moduleAssignMedicalFacility)); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; isDisposable = 0; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class Arguments { class enabled { displayName = "Is Medical Facility"; @@ -344,385 +347,939 @@ class CfgVehicles { name = "leg_r"; }; }; + class ACE_SelfActions { + class Medical { + displayName = "$STR_ACE_MEDICAL_ACTIONS_Medical"; + runOnHover = 1; + hotkey = "M"; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + + class ACE_Head { + displayName = "$STR_ACE_Interaction_Head"; + icon = PATHTOF(UI\icons\medical_cross.paa); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); + runOnHover = 1; + + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitHead"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = "B"; + icon = PATHTOF(UI\icons\bandage.paa); + }; + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class CheckPulse: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; + }; + class CheckBloodPressure: CheckPulse { + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment)); + }; + }; + class ACE_Torso { + displayName = "$STR_ACE_Interaction_Torso"; + distance = 5.0; + condition = "true"; + runOnHover = 1; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + showDisabled = 1; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\medical_cross.paa); + + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitBody"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = "B"; + icon = PATHTOF(UI\icons\bandage.paa); + }; + + class TriageCard { + displayName = "$STR_ACE_MEDICAL_ACTIONS_TriageCard"; + distance = 2.0; + condition = "true"; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard)); + showDisabled = 1; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\triageCard.paa); + }; + + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + }; + class ACE_ArmLeft { + displayName = "$STR_ACE_Interaction_ArmLeft"; + runOnHover = 1; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = "B"; + icon = PATHTOF(UI\icons\bandage.paa); + }; + + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class Tourniquet: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); + }; + class Morphine: fieldDressing { + displayName = "$STR_ACE_Medical_Inject_Morphine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class Atropine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class Epinephrine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Epinephrine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class CheckPulse: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; + }; + class CheckBloodPressure: CheckPulse { + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment)); + }; + class RemoveTourniquet: Tourniquet { + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment)); + }; + }; + class ACE_ArmRight { + displayName = "$STR_ACE_Interaction_ArmRight"; + runOnHover = 1; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = "B"; + icon = PATHTOF(UI\icons\bandage.paa); + }; + + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment)); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment)); + }; + class Tourniquet: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); + }; + class Morphine: fieldDressing { + displayName = "$STR_ACE_Medical_Inject_Morphine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class Atropine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment)); + }; + class Epinephrine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Epinephrine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment)); + }; + class CheckPulse: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; + }; + class CheckBloodPressure: CheckPulse { + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment)); + }; + class RemoveTourniquet: Tourniquet { + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment)); + }; + }; + class ACE_LegLeft { + displayName = "$STR_ACE_Interaction_LegLeft"; + runOnHover = 1; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = "B"; + icon = PATHTOF(UI\icons\bandage.paa); + }; + + + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment)); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment)); + }; + class Tourniquet: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); + }; + class Morphine: fieldDressing { + displayName = "$STR_ACE_Medical_Inject_Morphine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class Atropine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class Epinephrine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Epinephrine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment)); + }; + class RemoveTourniquet: Tourniquet { + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment)); + }; + }; + class ACE_LegRight { + displayName = "$STR_ACE_Interaction_LegRight"; + runOnHover = 1; + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = "B"; + icon = PATHTOF(UI\icons\bandage.paa); + }; + + + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment)); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment)); + }; + class Tourniquet: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); + }; + class Morphine: fieldDressing { + displayName = "$STR_ACE_Medical_Inject_Morphine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); + }; + class Atropine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment)); + }; + class Epinephrine: Morphine { + displayName = "$STR_ACE_Medical_Inject_Epinephrine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment)); + }; + class RemoveTourniquet: Tourniquet { + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); + exceptions[] = {"isNotInside"}; + statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); + }; + }; + }; + }; class ACE_Actions { class ACE_Head { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); - + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitHead"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { - displayName = "Field Dressing"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; hotkey = ""; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { - displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { - displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { - displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class CheckPulse: fieldDressing { - displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; }; class CheckBloodPressure: CheckPulse { - displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure"; + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment)); }; class CheckResponse: CheckPulse { displayName = "Check Response"; - condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment)); }; }; - class ACE_MainActions { - class Medical { - displayName = "Medical"; - distance = 5.0; - condition = "true"; - runOnHover = 1; - statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + class ACE_Torso { + runOnHover = 1; + statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; + class Bandage { + displayName = "$STR_ACE_Medical_Bandage_HitBody"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - hotkey = "M"; + hotkey = "B"; enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class Carry { + displayName = "$STR_ACE_MEDICAL_CARRY"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = ""; + enableInside = 1; + //icon = PATHTOF(UI\icons\bandage.paa); + }; + class Drag { + displayName = "$STR_ACE_MEDICAL_DRAG"; + distance = 2.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(treatment)); + showDisabled = 1; + priority = 2; + hotkey = ""; + enableInside = 1; + //icon = PATHTOF(UI\icons\bandage.paa); + }; - class Bandage { - displayName = "$STR_ACE_Medical_Bandage_HitBody"; - distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); - showDisabled = 1; - priority = 2; - hotkey = "B"; - enableInside = 1; - }; + class TriageCard { + displayName = "Triage Card"; + distance = 2.0; + condition = "true"; + statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard)); + showDisabled = 1; + priority = 2; + hotkey = ""; + enableInside = 1; + icon = PATHTOF(UI\icons\triageCard.paa); + }; - // Advanced medical - class FieldDressing { - displayName = "Field Dressing"; - distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); - showDisabled = 0; - priority = 2; - hotkey = ""; - enableInside = 1; - }; - class PackingBandage: fieldDressing { - displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); - }; - class ElasticBandage: fieldDressing { - displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); - }; - class QuikClot: fieldDressing { - displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); - }; - class Morphine: fieldDressing { - displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(treatment)); - }; - class Atropine: Morphine { - displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call DFUNC(treatment)); - }; - class Epinephrine: Morphine { - displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(treatment)); - }; - class SurgicalKit: fieldDressing { - displayName = "Use Surgical Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); - }; - class PersonalAidKit: fieldDressing { - displayName = "Use Personal Aid Kit"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); - }; - class CPR: fieldDressing { - displayName = "CPR"; - condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); - }; + // Advanced medical + class FieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; + distance = 5.0; + condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); + showDisabled = 0; + priority = 2; + hotkey = ""; + enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); + }; + class PackingBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); + }; + class ElasticBandage: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class QuikClot: fieldDressing { + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); + }; + class SurgicalKit: fieldDressing { + displayName = "Use Surgical Kit"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\surgicalKit.paa); + }; + class PersonalAidKit: fieldDressing { + displayName = "Use Personal Aid Kit"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(treatment)); + icon = ""; + }; + class CPR: fieldDressing { + displayName = "CPR"; + condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment)); + icon = ""; }; }; class ACE_ArmLeft { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftArm"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { - displayName = "Field Dressing"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; hotkey = ""; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { - displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { - displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { - displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\bandage.paa); }; class Tourniquet: fieldDressing { - displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { - displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreat)); + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class BloodIV: fieldDressing { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreat)); - statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV')] call DFUNC(canTreatCached)); + statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { - displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; }; class CheckBloodPressure: CheckPulse { - displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { - displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; class ACE_ArmRight { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; + class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightArm"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { - displayName = "Field Dressing"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; hotkey = ""; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { - displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { - displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { - displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { - displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { - displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreat)); + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(treatment)); }; class CheckPulse: fieldDressing { - displayName = "Check Pulse"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment)); + icon = ""; }; class CheckBloodPressure: CheckPulse { - displayName = "Check Blood Pressure"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { - displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; @@ -730,224 +1287,239 @@ class CfgVehicles { class ACE_LegLeft { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; + class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { - displayName = "Field Dressing"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; hotkey = ""; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { - displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { - displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { - displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { - displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { - displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreat)); + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { - displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; class ACE_LegRight { runOnHover = 1; statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); + icon = PATHTOF(UI\icons\medical_cross.paa); + distance = MEDICAL_ACTION_DISTANCE; + class Bandage { displayName = "$STR_ACE_Medical_Bandage_HitRightLeg"; distance = 2.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; hotkey = "B"; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { - displayName = "Field Dressing"; + displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing"; distance = 5.0; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; hotkey = ""; - enableInside = 1; + icon = PATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { - displayName = "Packing Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { - displayName = "Elastic Bandage"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment)); }; class QuikClot: fieldDressing { - displayName = "QuikClot"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment)); }; class Tourniquet: fieldDressing { - displayName = "Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = "$STR_ACE_Medical_Inject_Morphine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { - displayName = "Atropine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreat)); + displayName = "$STR_ACE_Medical_Inject_Atropine"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment)); }; class Epinephrine: Morphine { displayName = "$STR_ACE_Medical_Inject_Epinephrine"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreat)); + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment)); }; class BloodIV: fieldDressing { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); + icon = PATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(treatment)); }; class BloodIV_250: BloodIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(treatment)); }; class PlasmaIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); }; class PlasmaIV_500: PlasmaIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(treatment)); }; class PlasmaIV_250: PlasmaIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(treatment)); }; class SalineIV: BloodIV { - displayName = "Give Blood IV (1000ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(treatment)); }; class SalineIV_500: SalineIV { - displayName = "Give Blood IV (500ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(treatment)); }; class SalineIV_250: SalineIV { - displayName = "Give Blood IV (250ml)"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(treatment)); }; class RemoveTourniquet: Tourniquet { - displayName = "Remove Tourniquet"; - condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreat)); + displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet"; + condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); }; }; @@ -1128,306 +1700,400 @@ class CfgVehicles { displayName = $STR_ACE_MEDICAL_BODYBAG_DISPLAY; }; class Item_Base_F; - class GVAR(fieldDressingItem): Item_Base_F { + class ACE_fieldDressingItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(fieldDressing) + class ACE_fieldDressing { - name = QGVAR(fieldDressing); + name = "ACE_fieldDressing"; count = 1; }; }; }; - class GVAR(packingBandageItem): Item_Base_F { + class ACE_packingBandageItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(packingBandage) + class ACE_packingBandage { - name = QGVAR(packingBandage); + name = "ACE_packingBandage"; count = 1; }; }; }; - class GVAR(elasticBandageItem): Item_Base_F { + class ACE_elasticBandageItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(elasticBandage) + class ACE_elasticBandage { - name = QGVAR(elasticBandage); + name = "ACE_elasticBandage"; count = 1; }; }; }; - class GVAR(tourniquetItem): Item_Base_F { + class ACE_tourniquetItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(tourniquet) + class ACE_tourniquet { - name = QGVAR(tourniquet); + name = "ACE_tourniquet"; count = 1; }; }; }; - class GVAR(morphineItem): Item_Base_F { + class ACE_morphineItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(morphine) + class ACE_morphine { - name = QGVAR(morphine); + name = "ACE_morphine"; count = 1; }; }; }; - class GVAR(atropineItem): Item_Base_F { + class ACE_atropineItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(atropine) + class ACE_atropine { - name = QGVAR(atropine); + name = "ACE_atropine"; count = 1; }; }; }; - class GVAR(epinephrineItem): Item_Base_F { + class ACE_epinephrineItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(epinephrine) + class ACE_epinephrine { - name = QGVAR(epinephrine); + name = "ACE_epinephrine"; count = 1; }; }; }; - class GVAR(plasmaIVItem): Item_Base_F { + class ACE_plasmaIVItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_PLASMA_IV; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(plasmaIV) + class ACE_plasmaIV { - name = QGVAR(plasmaIV); + name = "ACE_plasmaIV"; count = 1; }; }; }; - class GVAR(bloodIVItem): Item_Base_F { + class ACE_bloodIVItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BLOOD_IV; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(bloodIV) + class ACE_bloodIV { - name = QGVAR(bloodIV); + name = "ACE_bloodIV"; count = 1; }; }; }; - class GVAR(salineIVItem): Item_Base_F { + class ACE_salineIVItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_SALINE_IV; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(salineIV) + class ACE_salineIV { - name = QGVAR(salineIV); + name = "ACE_salineIV"; count = 1; }; }; }; - class GVAR(quikClotItem): Item_Base_F { + class ACE_quikClotItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(quikClot) + class ACE_quikClot { - name = QGVAR(quikClot); + name = "ACE_quikclot"; count = 1; }; }; }; - class GVAR(personalAidKitItem): Item_Base_F { + class ACE_personalAidKitItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(personalAidKit) + class ACE_personalAidKit { - name = QGVAR(personalAidKit); + name = "ACE_personalAidKit"; count = 1; }; }; }; - class GVAR(surgicalKitItem): Item_Base_F { + class ACE_surgicalKitItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(surgicalKit) + class ACE_surgicalKit { - name = QGVAR(surgicalKit); + name = "ACE_surgicalKit"; count = 1; }; }; }; - class GVAR(bodyBagItem): Item_Base_F { + class ACE_bodyBagItem: Item_Base_F { scope = 2; scopeCurator = 2; displayName = $STR_ACE_MEDICAL_BODYBAG_DISPLAY; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; vehicleClass = "Items"; class TransportItems { - class GVAR(bodyBag) + class ACE_bodyBag { - name = QGVAR(bodyBag); + name = "ACE_bodyBag"; count = 1; }; }; }; class NATO_Box_Base; - class GVAR(supplyCrate): NATO_Box_Base { + class ACE_medicalSupplyCrate: NATO_Box_Base { scope = 2; accuracy = 1000; - displayName = "Medical Supply Crate [ACE]"; + displayName = "[ACE] Medical Supply Crate"; model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F"; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class TransportItems { - class GVAR(fieldDressing) { - name = QGVAR(fieldDressing); + class ACE_fieldDressing { + name = "ACE_fieldDressing"; count = 25; }; - class GVAR(packingBandage) { - name = QGVAR(packingBandage); + class ACE_packingBandage { + name = "ACE_packingBandage"; count = 25; }; - class GVAR(elasticBandage) { - name = QGVAR(elasticBandage); + class ACE_elasticBandage { + name = "ACE_elasticBandage"; count = 25; }; - class GVAR(tourniquet) { - name = QGVAR(tourniquet); + class ACE_tourniquet { + name = "ACE_tourniquet"; count = 15; }; - class GVAR(morphine) { - name = QGVAR(morphine); + class ACE_morphine { + name = "ACE_morphine"; count = 15; }; - class GVAR(atropine) { - name = QGVAR(atropine); + class ACE_atropine { + name = "ACE_atropine"; count = 15; }; - class GVAR(epinephrine) { - name = QGVAR(epinephrine); + class ACE_epinephrine { + name = "ACE_epinephrine"; count = 15; }; - class GVAR(plasmaIV) { - name = QGVAR(plasmaIV); + class ACE_plasmaIV { + name = "ACE_plasmaIV"; count = 7; }; - class GVAR(plasmaIV_500) { - name = QGVAR(plasmaIV_500); + class ACE_plasmaIV_500 { + name = "ACE_plasmaIV_500"; count = 7; }; - class GVAR(plasmaIV_250) { - name = QGVAR(plasmaIV_250); + class ACE_plasmaIV_250 { + name = "ACE_plasmaIV_250"; count = 7; }; - class GVAR(salineIV) { - name = QGVAR(salineIV); + class ACE_salineIV { + name = "ACE_salineIV"; count = 7; }; - class GVAR(salineIV_500) { - name = QGVAR(salineIV_500); + class ACE_salineIV_500 { + name = "ACE_salineIV_500"; count = 7; }; - class GVAR(salineIV_250) { - name = QGVAR(salineIV_250); + class ACE_salineIV_250 { + name = "ACE_salineIV_250"; count = 7; }; - class GVAR(bloodIV) { - name = QGVAR(bloodIV); + class ACE_bloodIV { + name = "ACE_bloodIV"; count = 7; }; - class GVAR(bloodIV_500) { - name = QGVAR(bloodIV_500); + class ACE_bloodIV_500 { + name = "ACE_bloodIV_500"; count = 7; }; - class GVAR(bloodIV_250) { - name = QGVAR(bloodIV_250); + class ACE_bloodIV_250 { + name = "ACE_bloodIV_250"; count = 7; }; - class GVAR(quikClot) { - name = QGVAR(quikClot); + class ACE_quikClot { + name = "ACE_quikclot"; count = 20; }; - class GVAR(personalAidKit) { - name = QGVAR(personalAidKit); + class ACE_personalAidKit { + name = "ACE_personalAidKit"; count = 3; }; - class GVAR(surgicalKit) { - name = QGVAR(surgicalKit); + class ACE_surgicalKit { + name = "ACE_surgicalKit"; count = 2; }; - class GVAR(bodyBag) { - name = QGVAR(bodyBag); + class ACE_bodyBag { + name = "ACE_bodyBag"; count = 5; }; }; }; + + // Patient unload from vehicle actions + class LandVehicle; + class Car: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + class Tank: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class Air; + class Helicopter: Air { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + class Plane: Air { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class Ship; + class Ship_F: Ship { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class StaticWeapon: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; + + class StaticMortar; + class Mortar_01_base_F: StaticMortar { + class ACE_Actions { + class ACE_MainActions { + class ACE_UnloadPatients { + displayName = "$STR_ACE_Medical_UnloadPatient"; + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions)); + }; + }; + }; + }; }; diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 81d9491d78..d0b1b786ed 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class InventoryItem_Base_F; class InventoryFirstAidKitItem_Base_F; class MedikitItem; - + // ITEMS class FirstAidKit: ItemCore { type = 0; @@ -23,7 +23,7 @@ class CfgWeapons { // @todo localize class ACE_ItemCore; - class GVAR(fieldDressing): ACE_ItemCore { + class ACE_fieldDressing: ACE_ItemCore { scope = 2; model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa)); @@ -35,7 +35,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(packingBandage): ItemCore { + class ACE_packingBandage: ItemCore { scope = 2; value = 1; count = 1; @@ -50,7 +50,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(elasticBandage): ItemCore { + class ACE_elasticBandage: ItemCore { scope = 2; value = 1; count = 1; @@ -65,7 +65,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(tourniquet): ItemCore { + class ACE_tourniquet: ItemCore { scope = 2; value = 1; count = 1; @@ -80,7 +80,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(morphine): ItemCore { + class ACE_morphine: ItemCore { scope = 2; value = 1; count = 1; @@ -95,7 +95,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(atropine): ItemCore { + class ACE_atropine: ItemCore { scope = 2; value = 1; count = 1; @@ -110,7 +110,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(epinephrine): ItemCore { + class ACE_epinephrine: ItemCore { scope = 2; value = 1; count = 1; @@ -125,7 +125,7 @@ class CfgWeapons { type=201; }; }; - class GVAR(plasmaIV): ItemCore { + class ACE_plasmaIV: ItemCore { scope = 2; value = 1; count = 1; @@ -138,21 +138,21 @@ class CfgWeapons { type = 201; }; }; - class GVAR(plasmaIV_500): GVAR(plasmaIV) { + class ACE_plasmaIV_500: ACE_plasmaIV { displayName = $STR_ACE_MEDICAL_PLASMA_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class GVAR(plasmaIV_250): GVAR(plasmaIV) { + class ACE_plasmaIV_250: ACE_plasmaIV { displayName = $STR_ACE_MEDICAL_PLASMA_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(bloodIV): ItemCore { + class ACE_bloodIV: ItemCore { scope = 2; value = 1; count = 1; @@ -166,21 +166,21 @@ class CfgWeapons { type = 201; }; }; - class GVAR(bloodIV_500): GVAR(bloodIV) { + class ACE_bloodIV_500: ACE_bloodIV { displayName = $STR_ACE_MEDICAL_BLOOD_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class GVAR(bloodIV_250): GVAR(bloodIV) { + class ACE_bloodIV_250: ACE_bloodIV { displayName = $STR_ACE_MEDICAL_BLOOD_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(salineIV): ItemCore { + class ACE_salineIV: ItemCore { scope = 2; value = 1; count = 1; @@ -193,21 +193,21 @@ class CfgWeapons { type = 201; }; }; - class GVAR(salineIV_500): GVAR(salineIV) { + class ACE_salineIV_500: ACE_salineIV { displayName = $STR_ACE_MEDICAL_SALINE_IV_500; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(salineIV_250): GVAR(salineIV) { + class ACE_salineIV_250: ACE_salineIV { displayName = $STR_ACE_MEDICAL_SALINE_IV_250; class ItemInfo: InventoryItem_Base_F { mass = 2.5; type = 201; }; }; - class GVAR(quikclot): ItemCore { + class ACE_quikclot: ItemCore { scope = 2; value = 1; count = 1; @@ -221,7 +221,7 @@ class CfgWeapons { type = 201; }; }; - class GVAR(personalAidKit): ItemCore { + class ACE_personalAidKit: ItemCore { scope = 2; value = 1; count = 1; @@ -236,19 +236,19 @@ class CfgWeapons { type = 201; }; }; - class GVAR(surgicalKit): ItemCore { + class ACE_surgicalKit: ItemCore { scope=2; displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY; model = QUOTE(PATHTOF(data\surgical_kit.p3d)); picture = QUOTE(PATHTOF(ui\items\surgicalKit.paa)); descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT; descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE; - class ItemInfo: InventoryItem_Base_F { + class ItemInfo: InventoryItem_Base_F { mass = 5; type = 201; }; }; - class GVAR(bodyBag): ItemCore { + class ACE_bodyBag: ItemCore { scope=2; displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY; model = QUOTE(PATHTOF(data\bodybagItem.p3d)); diff --git a/addons/medical/XEH_init.sqf b/addons/medical/XEH_init.sqf index 4d92575f9b..0ded7d471f 100644 --- a/addons/medical/XEH_init.sqf +++ b/addons/medical/XEH_init.sqf @@ -3,8 +3,8 @@ private ["_unit"]; _unit = _this select 0; -if !(local _unit) exitWith {}; - _unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; -[_unit] call FUNC(init); +if (local _unit) then { + [_unit] call FUNC(init); +}; diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index bddd1893d8..6aa001b9ef 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -2,7 +2,6 @@ #include "script_component.hpp" -if (!hasInterface) exitwith{}; GVAR(enabledFor) = 1; // TODO remove this once we implement settings. Just here to get the vitals working. GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"]; @@ -12,6 +11,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; ["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler; ["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler; ["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler; +["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler; // Initialize all effects _fnc_createEffect = { @@ -82,7 +82,7 @@ GVAR(effectTimeBlood) = time; }; // Unconsciousness effect - if (ACE_player getVariable [QGVAR(isUnconscious), false]) then { + if (ACE_player getVariable ["ACE_isUnconscious", false]) then { GVAR(effectUnconsciousCC) ppEffectEnable true; GVAR(effectUnconsciousRB) ppEffectEnable true; GVAR(effectBlind) = true; @@ -110,10 +110,11 @@ GVAR(effectTimeBlood) = time; }; }; + _bleeding = ACE_player call FUNC(getBloodLoss); // Bleeding Indicator - if (damage ACE_player > 0.1 and GVAR(effectTimeBlood) + 6 < time) then { + if (_bleeding > 0 and GVAR(effectTimeBlood) + 6 < time) then { GVAR(effectTimeBlood) = time; - [500 * damage ACE_player] call BIS_fnc_bloodEffect; + [500 * _bleeding] call BIS_fnc_bloodEffect; }; // Blood Volume Effect @@ -217,23 +218,15 @@ if (isNil QGVAR(level)) then { }, 0, []] call CBA_fnc_addPerFrameHandler; // broadcast injuries to JIP clients in a MP session -if (isMultiplayer and GVAR(level) >= 2) then { - [QGVAR(onPlayerConnected), "onPlayerConnected", { - if (isNil QGVAR(InjuredCollection)) then { - GVAR(InjuredCollection) = []; - }; - +if (isMultiplayer) then { + // We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them. + if (hasInterface) then { { - _unit = _x; - _openWounds = _unit getvariable [QGVAR(openWounds), []]; - { - ["medical_propagateWound", [_id], [_unit, _x]] call EFUNC(common,targetEvent); - }foreach _openWounds; - }foreach GVAR(InjuredCollection); - }, []] call BIS_fnc_addStackedEventHandler; + [_x, player] call FUNC(requestWoundSync); + }foreach units group player; + }; }; - [ {(((_this select 0) getvariable [QGVAR(bloodVolume), 0]) < 65)}, {(((_this select 0) getvariable [QGVAR(pain), 0]) > 0.9)}, diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index c6ddbf0783..04fb2364a8 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -11,19 +11,25 @@ PREP(actionPlaceInBodyBag); PREP(actionRemoveTourniquet); PREP(actionLoadUnit); PREP(actionUnloadUnit); +PREP(actionCarryUnit); +PREP(actionDropUnit); PREP(addHeartRateAdjustment); PREP(addToInjuredCollection); PREP(addToLog); PREP(addToTriageCard); PREP(addUnconsciousCondition); +PREP(addUnloadPatientActions); PREP(canAccessMedicalEquipment); PREP(canTreat); +PREP(canTreatCached); +PREP(canCarry); PREP(determineIfFatal); PREP(getBloodLoss); PREP(getBloodPressure); PREP(getBloodVolumeChange); PREP(getCardiacOutput); PREP(getTypeOfDamage); +PREP(getHeartRateChange); PREP(getTriageStatus); PREP(getUnconsciousCondition); PREP(handleDamage); @@ -46,12 +52,13 @@ PREP(init); PREP(isInMedicalFacility); PREP(isMedic); PREP(isMedicalVehicle); +PREP(itemCheck); PREP(onMedicationUsage); PREP(onWoundUpdateRequest); PREP(onPropagateWound); +PREP(onCarryObjectDropped); PREP(parseConfigForInjuries); PREP(playInjuredSound); -PREP(reactionToDamage); PREP(selectionNameToNumber); PREP(setCardiacArrest); PREP(setDead); @@ -79,13 +86,19 @@ PREP(treatmentTourniquetLocal); PREP(useItem); PREP(useItems); PREP(displayPatientInformation); +PREP(displayTriageCard); +PREP(dropDownTriageCard); PREP(moduleMedicalSettings); PREP(moduleAssignMedicRoles); PREP(moduleAssignMedicalVehicle); PREP(moduleAssignMedicalFacility); PREP(moduleTreatmentConfiguration); +PREP(copyDeadBody); +PREP(requestWoundSync); GVAR(injuredUnitCollection) = []; +GVAR(IVBags) = []; + call FUNC(parseConfigForInjuries); ADDON = true; diff --git a/addons/medical/XEH_respawn.sqf b/addons/medical/XEH_respawn.sqf index f9ead5a801..b2101b1d4e 100644 --- a/addons/medical/XEH_respawn.sqf +++ b/addons/medical/XEH_respawn.sqf @@ -8,3 +8,8 @@ if !(local _unit) exitWith {}; diag_log "running respawn"; [_unit] call FUNC(init); + +//Reset captive status for respawning unit +if (!(_unit getVariable ["ACE_isUnconscious", false])) then { + [_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus); +}; diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 3e8aaa8d55..28e07fe4d4 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -2,10 +2,10 @@ class CfgPatches { class ADDON { - units[] = {QGVAR(fieldDressingItem), QGVAR(packingBandageItem), QGVAR(elasticBandageItem), QGVAR(tourniquetItem), QGVAR(morphineItem), QGVAR(atropineItem), QGVAR(epinephrineItem), QGVAR(plasmaIVItem), QGVAR(bloodIVItem), QGVAR(salineIVItem), QGVAR(quikclotItem), QGVAR(personalAidKitItem), QGVAR(surgicalKitItem), QGVAR(bodyBagItem)}; - weapons[] = {QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(tourniquet), QGVAR(morphine), QGVAR(atropine), QGVAR(epinephrine), QGVAR(plasmaIV), QGVAR(plasmaIV_500), QGVAR(plasmaIV_250), QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250), QGVAR(salineIV), QGVAR(salineIV_500), QGVAR(salineIV_250), QGVAR(quikclot), QGVAR(personalAidKit), QGVAR(surgicalKit), QGVAR(bodyBag)}; + units[] = {"ACE_medicalSupplyCrate", "ACE_fieldDressingItem", "ACE_packingBandageItem", "ACE_elasticBandageItem", "ACE_tourniquetItem", "ACE_morphineItem", "ACE_atropineItem", "ACE_epinephrineItem", "ACE_plasmaIVItem", "ACE_bloodIVItem", "ACE_salineIVItem", "ACE_quikclotItem", "ACE_personalAidKitItem", "ACE_surgicalKitItem", "ACE_bodyBagItem"}; + weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {ace_common, ace_interaction}; + requiredAddons[] = {ace_common, ace_interaction, ace_modules}; author[] = {"Glowbal", "KoffienFlummi"}; authorUrl = ""; VERSION_CONFIG; @@ -20,3 +20,4 @@ class CfgPatches { #include "ACE_Medical_Treatments.hpp" #include "ACE_Settings.hpp" #include "UI\RscTitles.hpp" +#include "UI\triagecard.hpp" diff --git a/addons/medical/functions/fnc_actionCarryUnit.sqf b/addons/medical/functions/fnc_actionCarryUnit.sqf new file mode 100644 index 0000000000..1653c11027 --- /dev/null +++ b/addons/medical/functions/fnc_actionCarryUnit.sqf @@ -0,0 +1,87 @@ +/* + * Author: Glowbal + * makes the calling unit start carrying the specified unit + * + * Arguments: + * 0: The caller + * 1: The target + * 2: Carry object. True is carry, false is dragging + * + * Return Value: + * NONE + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_caller", "_target", "_positionUnit", "_carry"]; +_caller = _this select 0; +_target = _this select 1; +_carry = _this select 2; + +if (!(_target isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{ }; +if (vehicle _caller != _caller || vehicle _target != _target) exitwith {}; +if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _target} || {(([_target] call EFUNC(common,isAwake)))}) exitwith {}; + +if (!alive _target) exitwith { + if (GVAR(allowDeadBodyMovement)) then { + [{ + _this call FUNC(actionCarryUnit); + }, [_caller, ([_target,_caller] call FUNC(copyDeadBody)), _carry], 0.25, 0.25] call EFUNC(common,waitAndExecute); + }; +}; + +if !([_caller,_target] call EFUNC(common,carryObj)) exitwith {}; + +if (primaryWeapon _caller == "") then { + _caller addWeapon "ACE_FakePrimaryWeapon"; +}; +if (currentWeapon _caller != (primaryWeapon _caller)) then { + _caller selectWeapon (primaryWeapon _caller); +}; + +if (_carry) then { + _target attachTo [_caller, [0.1, -0.1, -1.25], "LeftShoulder"]; + [_target, "AinjPfalMstpSnonWnonDf_carried_dead", 2, true] call EFUNC(common,doAnimation); + [_caller, "acinpercmstpsraswrfldnon", 1] call EFUNC(common,doAnimation); +} else { + _target attachTo [_caller, [0.125, 1.007, 0]]; + _target setDir (getDir _target + 180) % 360; + _target setPos ((getPos _target) vectorAdd ((vectorDir _caller) vectorMultiply 1.5)); + [_caller, "AcinPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); + [_target, "AinjPpneMstpSnonWrflDb", 2, true] call EFUNC(common,doAnimation); +}; + +[ + 2, + [_caller, _target, _carry], + { + private ["_caller","_target", "_carry", "_args"]; + _args = _this select 0; + _caller = _args select 0; + _target = _args select 1; + _carry = _args select 2; + + _target setvariable [QGVAR(beingCarried), _caller, true]; + _caller setvariable [QGVAR(carrying), _target, true]; + _caller setvariable [QGVAR(isCarrying), if (_carry) then {1} else {0}, true]; + + // Removing any old drop scroll wheel actions + // TODO Do we still want scroll wheel actions? + if (!isnil QGVAR(DROP_ADDACTION)) then { + _caller removeAction GVAR(DROP_ADDACTION); + GVAR(DROP_ADDACTION) = nil; + }; + // Adding the drop scroll wheel action. + GVAR(DROP_ADDACTION) = _caller addAction [format["Drop %1",[_target] call EFUNC(common,getName)], {[_this select 1, _this select 2] call FUNC(actionDropUnit);}]; + + [_target, true] call EFUNC(common,disableAI); + }, + { + [(_this select 0), objNull,[0, 0, 0]] call EFUNC(common,carryObj); + // TODO reset animations.. + }, + if (_carry) then {localize "STR_ACE_MEDICAL_ACTION_CARRY"} else {localize "STR_ACE_MEDICAL_ACTION_DRAG"}, + {true} +] call EFUNC(common,progressBar); diff --git a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf index 7db155483e..e8e03bb4c0 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf @@ -11,7 +11,9 @@ * * Public: No */ + #include "script_component.hpp" + private ["_caller","_target"]; _caller = _this select 0; _target = _this select 1; diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index f2d01573f0..cd66556609 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -56,5 +56,5 @@ if ([_caller] call FUNC(isMedic)) then { ["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_target,"examine", format["%1 checked Blood Pressure: %2", [_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); + [_target,"examine", "%1 checked Blood Pressure: %2", [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionCheckPulse.sqf b/addons/medical/functions/fnc_actionCheckPulse.sqf index 9fa79b2183..f545c11144 100644 --- a/addons/medical/functions/fnc_actionCheckPulse.sqf +++ b/addons/medical/functions/fnc_actionCheckPulse.sqf @@ -11,7 +11,9 @@ * * Public: No */ + #include "script_component.hpp" + private ["_caller","_target","_title","_content"]; _caller = _this select 0; _target = _this select 1; diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index df5966849c..d7b46a38fc 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -49,5 +49,5 @@ if (_heartRate > 1.0) then { ["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_unit,"examine",format["%1 checked Heart Rate: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); + [_unit,"examine","%1 checked Heart Rate: %2",[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf index 5f27e17f4e..5823e99fbb 100644 --- a/addons/medical/functions/fnc_actionCheckResponse.sqf +++ b/addons/medical/functions/fnc_actionCheckResponse.sqf @@ -20,11 +20,11 @@ _target = _this select 1; _output = ""; if ([_target] call EFUNC(common,isAwake)) then { - _output = ["STR_ACE_MEDICAL_CHECK_REPONSE_RESPONSIVE",[_target] call EFUNC(common,getName)]; + _output = "STR_ACE_MEDICAL_CHECK_REPONSE_RESPONSIVE"; } else { - _output = ["STR_ACE_MEDICAL_CHECK_REPONSE_UNRESPONSIVE",[_target] call EFUNC(common,getName)]; + _output = "STR_ACE_MEDICAL_CHECK_REPONSE_UNRESPONSIVE"; }; -["displayTextStructured", [_caller], [_output, 2, _caller]] call EFUNC(common,targetEvent); +["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent); -[_target,"examine",_output] call FUNC(addToLog); +[_target,"examine",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical/functions/fnc_actionDropUnit.sqf b/addons/medical/functions/fnc_actionDropUnit.sqf new file mode 100644 index 0000000000..db1c02aced --- /dev/null +++ b/addons/medical/functions/fnc_actionDropUnit.sqf @@ -0,0 +1,23 @@ +/* + * Author: Glowbal + * Drop a unit if the caller nit is currently dragging or carrying a unit + * + * Arguments: + * 0: The caller + * + * Return Value: + * NONE + * + * Public: No + */ + +#include "script_component.hpp" + +private "_caller"; +_caller = _this select 0; + +if (!isnil QGVAR(DROP_ADDACTION)) then { + [_caller,objNull] call EFUNC(common,carryObj); + _caller removeAction GVAR(DROP_ADDACTION); + GVAR(DROP_ADDACTION) = nil; +}; diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf index f88adc02d7..7f55d585d6 100644 --- a/addons/medical/functions/fnc_actionLoadUnit.sqf +++ b/addons/medical/functions/fnc_actionLoadUnit.sqf @@ -12,10 +12,8 @@ * Public: No */ - #include "script_component.hpp" - private ["_caller", "_target","_vehicle", "_loaded"]; _caller = _this select 0; _target = _this select 1; diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index 2944c2f6e2..75d7b67daa 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -36,6 +36,6 @@ _tourniquets set[_part, 0]; _target setvariable [QGVAR(tourniquets), _tourniquets, true]; // Adding the tourniquet item to the caller -_caller addItem QGVAR(tourniquet); +_caller addItem "ACE_tourniquet"; // "AinvPknlMstpSlayWrflDnon_medic diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf index 92c06e176a..8c05a43fc9 100644 --- a/addons/medical/functions/fnc_actionUnloadUnit.sqf +++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf @@ -27,7 +27,7 @@ if (([_target] call cse_fnc_isAwake)) exitwith {}; if ([_caller, _target] call EFUNC(common,unloadPerson)) then { if (_drag) then { if ((vehicle _caller) == _caller) then { - [[_caller, _target], QUOTE(DFUNC(actionDragUnit)), _caller, false] call BIS_fnc_MP; + [[_caller, _target, true], QUOTE(DFUNC(actionDragUnit)), _caller, false] call EFUNC(common,execRemoteFnc); // TODO replace by event }; }; }; diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index 587b4ca1fb..82c385f0e1 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -18,16 +18,13 @@ _unit = _this select 0; _force = if (count _this > 1) then {_this select 1} else {false}; if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { - if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{}; + if !(local _unit) exitwith { [[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; - _unit setvariable [QGVAR(addedToUnitLoop), true, true]; - if (isNil QGVAR(InjuredCollection)) then { - GVAR(InjuredCollection) = []; - }; - GVAR(InjuredCollection) pushback _unit; + if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{}; + _unit setvariable [QGVAR(addedToUnitLoop), true, true]; [{ private "_unit"; @@ -41,7 +38,6 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { }; _unit setvariable [QGVAR(bloodVolume), _unit getvariable [QGVAR(bloodVolume), 0], true]; }; - GVAR(InjuredCollection) = GVAR(InjuredCollection) - [_unit]; } else { [_unit] call FUNC(handleUnitVitals); diff --git a/addons/medical/functions/fnc_addUnloadPatientActions.sqf b/addons/medical/functions/fnc_addUnloadPatientActions.sqf new file mode 100644 index 0000000000..c792746d47 --- /dev/null +++ b/addons/medical/functions/fnc_addUnloadPatientActions.sqf @@ -0,0 +1,42 @@ +/* + * Author: esteldunedain + * Create one unload action per unconscious passenger + * + * Argument: + * 0: Vehicle + * 1: Player + * 3: Parameters + * + * Return value: + * Children actions + * + * Public: No + */ +#include "script_component.hpp" + +EXPLODE_3_PVT(_this,_vehicle,_player,_parameters); + +private ["_actions"]; +_actions = []; + +{ + _unit = _x; + if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then { + _actions pushBack + [ + [ + str(_unit), + [_unit, true] call EFUNC(common,getName), + "", + {[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);}, + {true}, + {}, + [_unit] + ] call EFUNC(interact_menu,createAction), + [], + _unit + ]; + }; +} forEach crew _vehicle; + +_actions diff --git a/addons/medical/functions/fnc_canCarry.sqf b/addons/medical/functions/fnc_canCarry.sqf new file mode 100644 index 0000000000..a7db1f6cc3 --- /dev/null +++ b/addons/medical/functions/fnc_canCarry.sqf @@ -0,0 +1,29 @@ +/* + * Author: Glowbal + * Check if caller can carry or drag the target + * + * Arguments: + * 0: The caller + * 1: The target + * + * Return Value: + * NONE + * + * Public: No + */ + +#include "script_component.hpp" + + private ["_caller", "_target", "_positionUnit", "_carry"]; +_caller = _this select 0; +_target = _this select 1; + +if (!(_target isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{false}; + +if (vehicle _caller != _caller || vehicle _target != _target) exitwith {false}; + +if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _target} || {(([_target] call EFUNC(common,isAwake)))}) exitwith {false}; + +if (!alive _target) exitwith {GVAR(allowDeadBodyMovement)}; + +((isNull ([_caller] call FUNC(getCarriedObj))) && {isNull ([_target] call FUNC(getCarriedObj))} && {isNull ([_caller] call FUNC(getCarriedBy))} && {isNull ([_target] call FUNC(getCarriedBy))}) diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 6a49652301..5467031cea 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -40,6 +40,7 @@ _locations = getArray (_config >> "treatmentLocations"); _return = true; if (getText (_config >> "condition") != "") then { + _condition = getText (_config >> "condition"); if (isnil _condition) then { _condition = compile _condition; } else { diff --git a/addons/medical/functions/fnc_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf new file mode 100644 index 0000000000..34d753b119 --- /dev/null +++ b/addons/medical/functions/fnc_canTreatCached.sqf @@ -0,0 +1,22 @@ +/* + * Author: Glowbal + * Cached Check if the treatment action can be performed. + * + * Arguments: + * 0: The caller + * 1: The target + * 2: Selection name + * 3: ACE_Medical_Treatments Classname + * + * ReturnValue: + * Can Treat + * + * Public: No + */ + +#include "script_component.hpp" + +#define MAX_DURATION_CACHE 2 + +// parameters, function, namespace, uid +[_this, DFUNC(canTreat), _this select 0, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall); diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf new file mode 100644 index 0000000000..68d5a356ec --- /dev/null +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -0,0 +1,83 @@ +/* + * Author: Glowbal + * Makes a copy of a dead body. For handling dead bodies for actions such as load and carry. + * + * Arguments: + * 0: The oldbody + * 1: The caller + * + * Return Value: + * OBJECT Returns the copy of the unit. If no copy could be made, returns the oldBody + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_oldBody","_newUnit","_class","_group","_position","_side","_allVariables"]; +_oldBody = _this select 0; +_caller = _this select 1; + +if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies + +_name = _oldBody getvariable ["ACE_name", "unknown"]; +_class = typeof _oldBody; +_side = side _caller; +_group = createGroup _side; +_position = getPos _oldBody; + +_newUnit = _group createUnit [typeof _oldBody, _position, [], 0, "NONE"]; +_newUnit setVariable ["ACE_name", _name, true]; + +_newUnit disableAI "TARGET"; +_newUnit disableAI "AUTOTARGET"; +_newUnit disableAI "MOVE"; +_newUnit disableAI "ANIM"; +_newUnit disableAI "FSM"; + +removeallweapons _newUnit; +removeallassigneditems _newUnit; +removeUniform _newUnit; +removeHeadgear _newUnit; +removeBackpack _newUnit; +removeVest _newUnit; + +_newUnit addHeadgear (headgear _oldBody); +_newUnit addBackpack (backpack _oldBody); +clearItemCargoGlobal (backpackContainer _newUnit); +clearMagazineCargoGlobal (backpackContainer _newUnit); +clearWeaponCargoGlobal (backpackContainer _newUnit); + +_newUnit addVest (vest _oldBody); +clearItemCargoGlobal (backpackContainer _newUnit); +clearMagazineCargoGlobal (backpackContainer _newUnit); +clearWeaponCargoGlobal (backpackContainer _newUnit); + +_newUnit addUniform (uniform _oldBody); +clearItemCargoGlobal (backpackContainer _newUnit); +clearMagazineCargoGlobal (backpackContainer _newUnit); +clearWeaponCargoGlobal (backpackContainer _newUnit); + +{_newUnit addMagazine _x} count (magazines _oldBody); +{_newUnit addWeapon _x} count (weapons _oldBody); +{_newUnit addItem _x} count (items _oldBody); + +_newUnit selectWeapon (primaryWeapon _newUnit); + +// We are attaching the old unit and hiding it, so we can keep the original unit until later. +_oldBody attachTo [_newUnit, [0,0,0]]; +if (isMultiplayer) then { + hideObjectGlobal _oldBody; +} else { + hideObject _oldBody; +}; + +_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, true]; +_oldBody setvariable [QGVAR(hasCopy), _newUnit, true]; +_newUnit setvariable ["ACE_isDead", true, true]; +_newUnit setvariable ["ACE_isUnconscious", true, true]; +_newUnit setvariable [QGVAR(disableInteraction), true, true]; +_oldBody setvariable [QGVAR(disableInteraction), true, true]; + +_newUnit setDamage 0.89; +_newUnit; diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 0387547720..24605a3f97 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -21,6 +21,8 @@ GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} els GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull}; +[_target, ACE_player] call FUNC(requestWoundSync); + if (_show) then { ("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"]; @@ -47,7 +49,7 @@ if (_show) then { }; if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select GVAR(currentSelectedSelectionN)) > 0) then { - _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.5, 0.5, 0, 1]]; + _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.77, 0.51, 0.08, 1]]; }; if (_target getvariable[QGVAR(hasPain), false]) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_PAIN", [1, 1, 1, 1]]; diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf new file mode 100644 index 0000000000..95e6713d9a --- /dev/null +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -0,0 +1,78 @@ +/* + * Author: Glowbal + * Display triage card for a unit + * + * Arguments: + * 0: The unit + * + * Return Value: + * nil + * + * Public: Yes + */ + +#include "script_component.hpp" + +private ["_target", "_show"]; +_target = _this select 0; +_show = if (count _this > 1) then {_this select 1} else {true}; +GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0}; + +GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull}; + +if (_show) then { + //("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"]; + createDialog QGVAR(triageCard); + + [{ + private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"]; + _target = (_this select 0) select 0; + if (GVAR(TriageCardTarget) != _target) exitwith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + disableSerialization; + _display = uiNamespace getvariable QGVAR(triageCard); + if (isnil "_display") exitwith { + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + + _triageCardTexts = []; + + // TODO fill the lb with the appropiate information for the patient + _lbCtrl = (_display displayCtrl 200); + lbClear _lbCtrl; + + _log = _target getvariable ["myVariableTESTKOEAKJR", []]; + { + // [_message,_moment,_type, _arguments] + _message = _x select 0; + _moment = _x select 1; + _arguments = _x select 3; + if (isLocalized _message) then { + _message = localize _message; + }; + + { + if (typeName _x == "STRING" && {isLocalized _x}) then { + _arguments set [_foreachIndex, localize _x]; + }; + }foreach _arguments; + _message = format([_message] + _arguments); + _lbCtrl lbAdd format["%1 %2", _moment, _message]; + }foreach _log; + + if (count _triageCardTexts == 0) then { + _lbCtrl lbAdd "No entries on this triage card.."; + }; + + _triageStatus = [_target] call FUNC(getTriageStatus); + (_display displayCtrl 2000) ctrlSetText (_triageStatus select 0); + (_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2); + + }, 0, [_target]] call CBA_fnc_addPerFrameHandler; + +} else { + //("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; + closeDialog 7010; +}; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf new file mode 100644 index 0000000000..5e763822db --- /dev/null +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -0,0 +1,32 @@ +/* + * Author: Glowbal + * Display triage card for a unit + * + * Arguments: + * 0: The unit + * + * Return Value: + * nil + * + * Public: Yes + */ + +#include "script_component.hpp" + +private ["_show"]; +_show = _this select 0; +disableSerialization; + +_display = uiNamespace getvariable QGVAR(triageCard); +if (isnil "_display") exitwith {}; + +_pos = [0,0,0,0]; +if (_show) then { + _pos = ctrlPosition (_display displayCtrl 2001); +}; +for "_idc" from 2002 to 2006 step 1 do { + _pos set [1, (_pos select 1) + (_pos select 3)]; + _ctrl = (_display displayCtrl _idc); + _ctrl ctrlSetPosition _pos; + _ctrl ctrlCommit 0; +}; diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index 92b4408fbf..b031ae4585 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -37,21 +37,13 @@ _bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100]; _bloodVolumeChange = -(_unit call FUNC(getBloodLoss)); if (_bloodVolume < 100.0) then { - if ((_unit getvariable [QGVAR(salineIVVolume), 0]) > 0) then { - _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND; - _ivVolume = (_unit getvariable [QGVAR(salineIVVolume), 0]) + IV_CHANGE_PER_SECOND; - _unit setvariable [QGVAR(salineIVVolume),_ivVolume]; - }; - if ((_unit getvariable [QGVAR(plasmaIVVolume), 0]) > 0) then { - _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND; - _ivVolume = (_unit getvariable [QGVAR(plasmaIVVolume), 0]) + IV_CHANGE_PER_SECOND; - _unit setvariable [QGVAR(plasmaIVVolume),_ivVolume]; - }; - if ((_unit getvariable [QGVAR(bloodIVVolume), 0]) > 0) then { - _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND; - _ivVolume = (_unit getvariable [QGVAR(bloodIVVolume), 0]) + IV_CHANGE_PER_SECOND; - _unit setvariable [QGVAR(bloodIVVolume),_ivVolume]; - }; + { + if ((_unit getvariable [_x, 0]) > 0) then { + _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND; + _ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND; + _unit setvariable [_x,_ivVolume]; + }; + }foreach GVAR(IVBags); }; _bloodVolumeChange; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 0158608067..1f943d98d0 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -45,19 +45,18 @@ _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true]; [_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds); -if (GVAR(enableAirway)) then { - [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway); -}; -if (GVAR(enableFractures)) then { - [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures); -}; -if (GVAR(enableInternalBleeding)) then { - [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); -}; +// TODO Disabled until implemented fully +//if (GVAR(enableAirway)) then { +// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway); +//}; +//if (GVAR(enableFractures)) then { +// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures); +//}; +//if (GVAR(enableInternalBleeding)) then { +// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries); +//}; if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then { - [_unit, _newDamage] call FUNC(reactionToDamage); - // If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed. if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then { [_unit] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index 600101e7eb..5beacc16c2 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -181,7 +181,7 @@ if (_selection == "") then { if (_selection == "" and _damageReturn >= UNCONSCIOUSNESSTRESHOLD and _damageReturn < 1 and - !(_unit getVariable [QGVAR(isUnconscious), False] + !(_unit getVariable ["ACE_isUnconscious", False] )) then { if (_unit getVariable [QGVAR(allowUnconscious), ([_unit] call EFUNC(common,isPlayer)) or random 1 > 0.3]) then { [_unit, true] call FUNC(setUnconscious); diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index 0a22365044..31fa1c8873 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -70,5 +70,5 @@ if (_amountOfDamage > 0.05) then { _fractureID = (_fractures select (_amountOf - 1) select 0) + 1; }; _fractures pushback [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */]; - _unit setvariable [GVAR(fractures), _fractures, true]; -}; \ No newline at end of file + _unit setvariable [QGVAR(fractures), _fractures, true]; +}; diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index c156a842c5..91475a03dc 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -22,4 +22,9 @@ if (GVAR(level) >= 2) then { _unit setvariable [QGVAR(heartRate), 0]; _unit setvariable [QGVAR(bloodPressure), [0, 0]]; _unit setvariable [QGVAR(airwayStatus), 0]; + + _openWounds = _unit getvariable [QGVAR(openWounds), []]; + { + ["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent); + }foreach _openWounds; }; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index fc8522b93c..992ccdc3f2 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -81,7 +81,7 @@ if (GVAR(level) == 1) then { _blood = (_blood - 0.4 * (damage _unit) * _interval) max 0; if (_blood != (_unit getVariable [QGVAR(bloodVolume), 100])) then { _unit setVariable [QGVAR(bloodVolume), _blood, _syncValues]; - if (_blood <= 35 and !(_unit getVariable [QGVAR(isUnconscious), false])) then { + if (_blood <= 35 and !(_unit getVariable ["ACE_isUnconscious", false])) then { [_unit, true] call FUNC(setUnconscious); }; if (_blood == 0) then { @@ -105,14 +105,15 @@ if (GVAR(level) >= 2) then { }; // Set the vitals - _heartRate = (_unit getvariable [QGVAR(heartRate), 0]) + ([_unit] call FUNC(getHeartRateChange)) * _interval; + _heartRate = (_unit getvariable [QGVAR(heartRate), 0]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); _unit setvariable [QGVAR(heartRate), _heartRate, _syncValues]; _bloodPressure = [_unit] call FUNC(getBloodPressure); _unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; + // TODO Disabled until implemented fully // Handle airway - if (GVAR(setting_allowAirwayInjuries)) then { + /*if (GVAR(setting_allowAirwayInjuries)) then { _airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100]; if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then { if (_airwayStatus >= 0.5) then { @@ -131,11 +132,10 @@ if (GVAR(level) >= 2) then { [_unit, true] call FUNC(setDead); }; }; - }; + };*/ // Check vitals for medical status // TODO check for in revive state instead of variable - // TODO Implement cardiac arrest. _bloodPressureL = _bloodPressure select 0; _bloodPressureH = _bloodPressure select 1; diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index d02abb9187..551d532ae4 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -32,7 +32,7 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitwith { }; _return = false; -if ([vehicle _medic] call FUNC(isMedicalVehicle) && {(vehicle _medic != _medic)}) then { +if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then { _crew = crew vehicle _medic; { if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith { diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index c58cccedb4..0410e2a7ba 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -57,7 +57,7 @@ _unit setvariable [QGVAR(airwayCollapsed), false, true]; // generic medical admin _unit setvariable [QGVAR(addedToUnitLoop), false, true]; _unit setvariable [QGVAR(inCardiacArrest), false, true]; -_unit setVariable [QGVAR(isUnconscious), false, true]; +_unit setVariable ["ACE_isUnconscious", false, true]; _unit setvariable [QGVAR(hasLostBlood), false, true]; _unit setvariable [QGVAR(isBleeding), false, true]; _unit setvariable [QGVAR(hasPain), false, true]; @@ -74,3 +74,8 @@ _logs = _unit getvariable [QGVAR(allLogs), []]; _unit setvariable [_x, nil, true]; } foreach _logs; _unit setvariable [QGVAR(allLogs), [], true]; + +// items +[{ + _this call FUNC(itemCheck); +}, [_unit], 0.5, 0.1] call EFUNC(common,waitAndExecute); diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf new file mode 100644 index 0000000000..c903417dfc --- /dev/null +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -0,0 +1,51 @@ +/* + * Author: KoffeinFlummi + * Replaces vanilla items with ACE ones. + * + * Arguments: + * 0: The unit + * + * ReturnValue: + * nil + * + * Public: Yes + */ + +#include "script_component.hpp" + +private ["_unit"]; +_unit = _this select 0; + +while {({_x == "FirstAidKit"} count items _unit) > 0} do { + _unit removeItem "FirstAidKit"; + if (GVAR(level) >= 2) then { + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_packingBandage"; + _unit addItem "ACE_morphine"; + _unit addItem "ACE_tourniquet"; + } else { + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_fieldDressing"; + _unit addItem "ACE_morphine"; + }; +}; + +while {({_x == "Medikit"} count items _unit) > 0} do { + _unit removeItem "Medikit"; + if (GVAR(level) >= 2) then { + _unit addItemToBackpack "ACE_fieldDressing"; + _unit addItemToBackpack "ACE_packingBandage"; + _unit addItemToBackpack "ACE_packingBandage"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_morphine"; + _unit addItemToBackpack "ACE_salineIV_250"; + _unit addItemToBackpack "ACE_tourniquet"; + } else { + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_epinephrine"; + _unit addItemToBackpack "ACE_bloodIV"; + _unit addItemToBackpack "ACE_bloodIV"; + }; +}; diff --git a/addons/medical/functions/fnc_onCarryObjectDropped.sqf b/addons/medical/functions/fnc_onCarryObjectDropped.sqf new file mode 100644 index 0000000000..8f6dd57310 --- /dev/null +++ b/addons/medical/functions/fnc_onCarryObjectDropped.sqf @@ -0,0 +1,85 @@ +/* + * Author: Glowbal + * Called on event CarryObjectDropped + * + * Arguments: + * 0: The caller + * + * Return Value: + * NONE + * + * Public: No + */ + +#include "script_component.hpp" + +private ["_unit","_params"]; +_caller = _this select 0; +_target = _caller getvariable [QGVAR(carrying), objNull]; +_carrying = _caller getvariable [QGVAR(isCarrying), -1]; + +if (_carrying >= 0) then { + if !(isNull (_target getvariable [QGVAR(copyOfUnit), objNull])) then { + _copy = _target; + _target = _copy getvariable [QGVAR(copyOfUnit), objNull]; + if (isMultiplayer) then { + _target hideObjectGlobal false; + } else { + _target hideObject false; + }; + detach _copy; + deleteVehicle _copy; + _target setvariable [QGVAR(disableInteraction), nil, true]; + _target setvariable [QGVAR(hasCopy), nil, true]; + }; + + _caller setvariable [QGVAR(isCarrying), -1, true]; + if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { + _caller removeWeapon "ACE_FakePrimaryWeapon"; + }; + + [_target, false] call EFUNC(common,disableAI); + _caller setvariable[QGVAR(onStartMovingUnitParams), nil]; + + // handle the drag & carry administration + if (_carrying == 0) then { + _target setvariable [QGVAR(beingDragged), nil, true]; + _caller setvariable [QGVAR(dragging), nil, true]; + } else { + _target setvariable [QGVAR(beingCarried), nil, true]; + _caller setvariable [QGVAR(carrying), nil, true]; + }; + + // handle the drag & carry animiations + if ([_caller] call EFUNC(common,isAwake) && (vehicle _caller == _caller)) then { + [_caller,"amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon", 1] call EFUNC(common,doAnimation); + }; + + if (vehicle _target == _target) then { + if (_carrying == 0) then { + [_target,"AinjPpneMstpSnonWrflDb_release", 2, true] call EFUNC(common,doAnimation); + } else { + [_target,"AinjPfalMstpSnonWrflDnon_carried_Down", 2, true] call EFUNC(common,doAnimation); + }; + } else { + if ([_target] call EFUNC(common,isAwake)) then { + [_target,"", 2] call EFUNC(common,doAnimation); // TODO play animation for the current seat instead + } else { + // this might not work properly + [_target,([_target] call EFUNC(common,getDeathAnim)), 1] call EFUNC(common,doAnimation); + }; + }; + + // Ensure that the unit does not get dropped through the floor of a building + if (!surfaceIsWater getPos _caller) then { + [{ + EXPLODE_3_PVT(_this,_caller,_target,_killOnDrop); + if (vehicle _target == _target && (vehicle _caller == _caller)) then { + // This will set the target body/unit on the correct position, so it doesn't fall through floors. + _positionUnit = getPosATL _target; + _positionUnit set [2, (getPosATL _caller) select 2]; + _target setPosATL _positionUnit; + }; + }, [_caller,_target], 0.5, 0.5] call EFUNC(common,waitAndExecute); + }; +}; \ No newline at end of file diff --git a/addons/medical/functions/fnc_onPropagateWound.sqf b/addons/medical/functions/fnc_onPropagateWound.sqf index 762afa762c..934899eac4 100644 --- a/addons/medical/functions/fnc_onPropagateWound.sqf +++ b/addons/medical/functions/fnc_onPropagateWound.sqf @@ -33,5 +33,5 @@ if (!local _unit) then { if (!_exists) then { _openWounds pushback _injury; }; - _unit setvariable [GVAR(openWounds), _openWounds]; + _unit setvariable [QGVAR(openWounds), _openWounds]; }; diff --git a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf index 8204ed2539..a32288d0a6 100644 --- a/addons/medical/functions/fnc_onWoundUpdateRequest.sqf +++ b/addons/medical/functions/fnc_onWoundUpdateRequest.sqf @@ -19,9 +19,9 @@ _unit = _this select 0; _lastId = _this select 1; _originOfrequest = _this select 2; -_openWounds = _unit getvariable [QGVAR(openWounds), []]; -if (count _openWounds > _lastId) then { - { - ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent); - }foreach _openWounds; +if (local _unit) then { + _openWounds = _unit getvariable [QGVAR(openWounds), []]; + { + ["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent); + }foreach _openWounds; }; diff --git a/addons/medical/functions/fnc_reactionToDamage.sqf b/addons/medical/functions/fnc_reactionToDamage.sqf deleted file mode 100644 index b8c9256bde..0000000000 --- a/addons/medical/functions/fnc_reactionToDamage.sqf +++ /dev/null @@ -1,52 +0,0 @@ -/** - * fn_handleReactionHit.sqf - * @Descr: triggers a reaction to being hit for a unit and spawns on screen effects. - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -private ["_unit","_amountOfDamage"]; -_unit = _this select 0; -_amountOfDamage = _this select 1; - -if (_amountOfDamage > 0.2) then { - - [_unit] call FUNC(playInjuredSound); - if ((vehicle _unit) isKindOf "StaticWeapon") exitwith { - if (_amountOfDamage > 1) then { - _unit action ["eject", vehicle _unit]; - unassignVehicle _unit; - }; - }; - if (animationState _unit in ["ladderriflestatic","laddercivilstatic"]) exitwith { - _unit action ["ladderOff", (nearestBuilding _unit)]; - }; - - if (vehicle _unit == _unit && [_unit] call EFUNC(common,isAwake)) then { - if (random(1) > 0.5) then { - _unit setDir ((getDir _unit) + 1 + random(30)); - } else { - _unit setDir ((getDir _unit) - (1 + random(30))); - }; - }; - if (_amountOfDamage > 0.6) then { - if (random(1)>0.6) then { - [_unit] call EFUNC(common,setProne); - }; - }; - if (_unit == ACE_player) then { - //76 cutRsc [QGVAR(ScreenEffectsHit),"PLAIN"]; - addCamShake [3, 5, _amountOfDamage + random 10]; - }; -} else { - if (_amountOfDamage > 0) then { - if (_unit == ACE_player) then { - // 76 cutRsc [QGVAR(ScreenEffectsHit),"PLAIN"]; - }; - }; -}; diff --git a/addons/medical/functions/fnc_requestWoundSync.sqf b/addons/medical/functions/fnc_requestWoundSync.sqf new file mode 100644 index 0000000000..bf6f881930 --- /dev/null +++ b/addons/medical/functions/fnc_requestWoundSync.sqf @@ -0,0 +1,24 @@ +/* + * Author: Glowbal + * Ask for the latest wound information. + * + * Arguments: + * 0: The target + * 1: object belonging to the caller + * + * ReturnValue: + * + * + * Public: Yes + */ + +#include "script_component.hpp" + +private [ "_target", "_caller", "_openWounds","_lastId"]; +_target = _this select 0; +_caller = _this select 1; + +if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information +if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {}; +_target setvariable [QGVAR(isWoundSynced), true]; +["medical_woundUpdateRequest", [_target], [_target, _lastId, _caller]] call EFUNC(common,targetEvent); diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index e27d7f21f7..5418421872 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -28,9 +28,6 @@ if (!local _unit) exitwith { [[_unit], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ }; -// Get rid of the object we are carrying, before we go unconscious. -[_unit, ObjNull, [0,0,0]] call EFUNC(common,carryObj); - // Set the unit in the unconscious state. _unit setvariable ["ACE_isUnconscious", true, true]; _unit setUnconscious true; @@ -110,7 +107,7 @@ _minWaitingTime = (round(random(10)+5)); if (!_hasMovedOut) then { // Reset the unit back to the previous captive state. [_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus); - + // Swhich the unit back to its original group [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); @@ -118,7 +115,7 @@ _minWaitingTime = (round(random(10)+5)); _unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP) _unit setUnconscious false; - ["medical_onUnconscious", [_unit], [_unit, false]] call EFUNC(common,targetEvent); + ["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent); // ensure this statement runs only once _args set [6, true]; }; @@ -142,4 +139,4 @@ _minWaitingTime = (round(random(10)+5)); }, 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler; -["medical_onUnconscious", [_unit], [_unit, true]] call EFUNC(common,targetEvent); +["medical_onUnconscious", [_unit, true]] call EFUNC(common,globalEvent); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index 91d7678f93..6707c8d109 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -36,7 +36,7 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { }foreach _items;*/ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; - [_target, "activity", "STR_ACE_HAS_BANDAGED_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_bandagedPatient", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); }; true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index 5125a93bd0..afcc31367b 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -52,7 +52,7 @@ if (alive _unit) exitwith { // generic medical admin _unit setvariable [QGVAR(addedToUnitLoop), false, true]; _unit setvariable [QGVAR(inCardiacArrest), false, true]; - _unit setVariable [QGVAR(isUnconscious), false, true]; + _unit setVariable ["ACE_isUnconscious", false, true]; _unit setvariable [QGVAR(hasLostBlood), false, true]; _unit setvariable [QGVAR(isBleeding), false, true]; _unit setvariable [QGVAR(hasPain), false, true]; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index 38f522bc7d..f9a5b2f9d9 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -35,7 +35,7 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { }foreach _items; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; - [_target, "activity", "STR_ACE_HAS_MEDICATION_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_usedItem", [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog); }; true; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index a3d3e26d1d..714f0f7e7f 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -73,11 +73,7 @@ if (alive _target) then { // Reduce the pain level _pain = _target getvariable [QGVAR(pain), 0]; -_pain = _pain * _painReduce; -if (_pain <= 0) then { - _pain = 0; -}; -_target setvariable [QGVAR(pain), _pain]; +_target setvariable [QGVAR(pain), (_pain - _painReduce) max 0]; _resistance = _unit getvariable [QGVAR(peripheralResistance), 100]; _resistance = _resistance + _viscosityChange; diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index 2581c1f0d2..098e134be7 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -31,5 +31,5 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { [[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; [_target, _removeItem] call FUNC(addToTriageCard); - [_target, "activity", "STR_ACE_HAS_GIVEN_IV_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 190498a8a6..6dd8cbf979 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -21,8 +21,8 @@ _ivItem = _this select 1; // Find the proper attributes for the used IV _config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV"); -_volumeAdded = getNumber (_medicationConfig >> "volume"); -_typeOf = getText (_medicationConfig >> "type"); +_volumeAdded = getNumber (_config >> "volume"); +_typeOf = getText (_config >> "type"); if (isClass (_config >> _className)) then { _config = (_config >> _className); @@ -33,6 +33,11 @@ if (isClass (_config >> _className)) then { _varName = format["ACE_Medical_IVVolume_%1",_typeOf]; _target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded]; +if !(_varName in GVAR(IVBags)) then { + GVAR(IVBags) pushback _varName; + publicVariable QGVAR(IVBags); +}; + // TODO localization //[_target,"treatment",format["%1 has given %4 a %2(%3ml)",[_caller] call EFUNC(common,getName),_attributes select 2,_attributes select 1,_target]] call FUNC(addActivityToLog); //[_target,_removeItem] call FUNC(addToTriageList); diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index cd1e9f72e7..3094b3a53e 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -44,7 +44,7 @@ if ([_caller, _target, _items] call FUNC(useItems)) then { [[_target, _removeItem], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; [_target, _removeItem] call FUNC(addToTriageCard); - [_target, "activity", "STR_ACE_HAS_APPLIED_TOURNIQUET_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); + [_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); }; true; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 6317f97b06..0d5c985273 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1,731 +1,871 @@ - + + - - - - Inject Morphine - Morphin injizieren - Inyectar Morfina - Wstrzyknij morfinÄ™ - Aplikovat Morfin - ВвеÑти морфин - Morphine - Morfium - Injetar Morfina - Inietta Morfina - - - Inject Epinephrine - Epinephrine injizieren - Inyectar Epinefrina - Wtrzyknij adrenalinÄ™ - Aplikovat Adrenalin - ВвеÑти андреналил - Adrénaline - Adrenalin - Injetar Epinefrina - Inietta Epinefrina - - - Transfuse Blood - Bluttransfusion - Transfundir sangre - Przetocz krew - Transfúze krve - Перелить кровь - Transfusion - Infúzió - Transfundir Sangue - Effettua Trasfusione - - - Bandage - Verbinden - Venda - Bandaż - Obvázat - Pansement - Benda - Kötözés - Atadura - ПеревÑзать - - - Bandage Head - Kopf verbinden - Vendar la cabeza - Bandażuj gÅ‚owÄ™ - Obvázat hlavu - ПеревÑзать голову - Pansement Tête - Fej kötözése - Atar Cabeça - Benda la testa - - - Bandage Torso - Torso verbinden - Vendar el torso - Bandażuj tors - Obvázat hruÄ - ПеревÑзать Ñ‚Ð¾Ñ€Ñ - Pansement Torse - FelsÅ‘test kötözése - Atar Tronco - Benda il torso - - - Bandage Left Arm - Arm links verbinden - Vendar el brazo izquierdo - Bandażuj lewe ramiÄ™ - Obvázat levou ruku - ПеревÑзать левую руку - Pansement Bras Gauche - Bal kar kötözése - Atar Braço Esquerdo - Benda il braccio sinistro - - - Bandage Right Arm - Arm rechts verbinden - Vendar el brazo derecho - Bandażuj prawe ramiÄ™ - Obvázat pravou ruku - ПеревÑзать правую руку - Pansement Bras Droit - Jobb kar kötözése - Atar Braço Direito - Benda il braccio destro - - - Bandage Left Leg - Bein links verbinden - Vendar la pierna izquierda - Bandażuj lewÄ… nogÄ™ - Obvázat levou nohu - ПеревÑзать левую ногу - Pansement Jambe Gauche - Bal láb kötözése - Atar Perna Esquerda - Benda la gamba sinistra - - - Bandage Right Leg - Bein rechts verbinden - Vendar la pierna derecha - Bandażuj prawÄ… nogÄ™ - Obvázat pravou nohu - ПеревÑзать правую ногу - Pansement Jambe Droite - Jobb láb kötözése - Atar Perna Direita - Benda la gamba destra - - - Injecting Morphine ... - Morphin injizieren ... - Inyectando Morfina ... - Wstrzykiwanie morfiny ... - Aplikuju Morfin ... - Введение морфина... - Injection de Morphine... - Morfium beadása... - Injetando Morfina ... - Inietto la morfina ... - - - Injecting Epinephrine ... - Epinephrine injizieren ... - Inyectando Epinefrina ... - Wstrzykiwanie adrenaliny ... - Aplikuju Adrenalin ... - Введение андреналина - Injection d'Adrénaline ... - Adrenalin beadása... - Injetando Epinefrina ... - Inietto l'epinefrina ... - - - Transfusing Blood ... - Bluttransfusion ... - Realizando transfusión ... - Przetaczanie krwi ... - Probíhá transfúze krve ... - Переливание крови... - Transfusion Sanguine ... - Infúzió... - Transfundindo Sangue ... - Effettuo la trasfusione ... - - - Bandaging ... - Verbinden ... - Vendando ... - Bandażowanie ... - Obvazuji ... - Pansement ... - Sto applicando la benda ... - Bekötözés... - Atando ... - ПеревÑзывание.... - - - - - Minor - - - Delayed - - - Immediate - - - Deceased - - - None - - - Normal breathing - Дыхание в норме - Respiración normal - Respiration Normale - Normalny oddech - - - No breathing - Ð”Ñ‹Ñ…Ð°Ð½Ð¸Ñ Ð½ÐµÑ‚ - No respira - Apnée - Brak oddechu - - - Difficult breathing - Дыхание затруднено - Dificultad para respirar - Difficultée Respiratoire - TrudnoÅ›ci z oddychaniem - - - Almost no breathing - Ð”Ñ‹Ñ…Ð°Ð½Ð¸Ñ Ð¿Ð¾Ñ‡Ñ‚Ð¸ нет - Casi sin respirar - Respiration Faible - Prawie brak oddechu - - - Bleeding - Кровотечение - Sangrando - Seignement - Krwawienie zewnÄ™trzne - - - In Pain - ИÑпытывает боль - Con Dolor - A De La Douleur - W bólu - - - Lost a lot of Blood - Ð‘Ð¾Ð»ÑŒÑˆÐ°Ñ ÐºÑ€Ð¾Ð²Ð¾Ð¿Ð¾Ñ‚ÐµÑ€Ñ - Mucha Sangre perdida - A Perdu Bcp de Sang - StraciÅ‚ dużo krwi - - - Tourniquet [CAT] - Жгут - Torniquete [CAT] - Garot [CAT] - Opaska uciskowa [CAT] - - - - - Bandage (Basic) - ПовÑзка (обычнаÑ) - Vendaje (Básico) - Bandage (Standard) - Bandaż (jaÅ‚owy) - - - Used to cover a wound - Ð”Ð»Ñ Ð¿ÐµÑ€ÐµÐ²Ñзки ран - Utilizado para cubrir una herida - Utilisé Pour Couvrir Une Blessure - Używany w celu przykrycia i ochrony miejsca zranienia - - - A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed. - ПовÑзка, Ð½Ð°ÐºÐ»Ð°Ð´Ñ‹Ð²Ð°ÐµÐ¼Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ñ… раны поÑле оÑтановки кровотечениÑ. - Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar. - C'est un bandage, qui est fait d'un matériel spécial utiliser pour couvrir une blessure, qui peut etre appliquer des que le seignement as ete stopper. - Opatrunek materiaÅ‚owy, używany do przykrywania ran, zakÅ‚adany na ranÄ™ po zatamowaniu krwawienia. - - - Packing Bandage - Ð¢Ð°Ð¼Ð¿Ð¾Ð½Ð¸Ñ€ÑƒÑŽÑ‰Ð°Ñ Ð¿Ð¾Ð²Ñзка - Vendaje Compresivo - Bandage Mèche - Bandaż (uciskowy) - - - Used to pack medium to large wounds and stem the bleeding - Ð”Ð»Ñ Ñ‚Ð°Ð¼Ð¿Ð¾Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð½ Ñреднего и большого размера и оÑтановки кровотечениÑ. - Se utiliza para vendar heridas medianas y grandes y detener el sangrado - Utiliser pour remplire la cavité créé dans une blessure moyenne et grande. - Używany w celu opatrywania Å›rednich i dużych ran oraz tamowania krwawienia. - - - A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries. - ПовÑзка Ð´Ð»Ñ Ñ‚Ð°Ð¼Ð¿Ð¾Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð½Ñ‹, оÑтановки ÐºÑ€Ð¾Ð²Ð¾Ñ‚ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸ лучшего заживлениÑ. При Ñ‚Ñжелых Ñочетанных ранениÑÑ… возможно тампонирование раны. - Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos. - Un bandage servent a etre inseré dans les blessure pour éponger le seignement et faciliter la guerrison. Ce bandage est une option pour soigner les lession de politrauma. - Opatrunek stosowany w celu zatrzymania krwawienia i osÅ‚ony wiÄ™kszych ran. - - - Bandage (Elastic) - ПовÑзка (давÑщаÑ) - Vendaje (Elástico) - Bandage (Élastique) - Bandaż (elastyczny) - - - Bandage kit, Elastic - ДавÑÑ‰Ð°Ñ Ð¿Ð¾Ð²Ñзка - Vendaje (Elástico) - Bandage Compressif Élastique - Zestaw bandaży elastycznych. - - - - - Ce bandage peut etre utiliser pour compresser la plaie afin de ralentire le seignement et assurer la tenue du bandage lors de mouvment. - Elastyczna opaska podtrzymujÄ…ca opatrunek oraz usztywniajÄ…ca okolice stawów. - Brinda una compresión uniforme y ofrece soporte extra a una zona lesionada - - - Tourniquet (CAT) - Жгут - Torniquete (CAT) - Garot (CAT) - Staza (typ. CAT) - - - Slows down blood loss when bleeding - Уменьшает кровопотерю при кровотечении. - Reduce la velocidad de pérdida de sangre - Ralentit le seignement - Zmniejsza ubytek krwi z koÅ„czyn w przypadku krwawienia. - - - A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood. - Жгут иÑпользуетÑÑ Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¶Ð°Ñ‚Ð¸Ñ ÑоÑудов, приводÑщего к оÑтановке или значительному уменьшению ÐºÑ€Ð¾Ð²Ð¾Ñ‚ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸ Ñокращению кровопотери. - Dispositivo utilizado para eliminar el pulso distal y de ese modo controlar la pérdida de sangre - Un appareil servent a compresser les artères et veines afin de reduire la perte de sang. - Opaska zaciskowa CAT sÅ‚uży do tamowanie krwotoków w sytuacji zranienia koÅ„czyn z masywnym krwawieniem tÄ™tniczym lub żylnym. - - - Morphine auto-injector - Морфин в автоматичеÑком шприце - Morfina auto-inyectable - Auto-injecteur de Morphine - Autostrzykawka z morfinÄ… - - - Used to combat moderate to severe pain experiences - Ð”Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ñредних и Ñильных болевых ощущений. - Usado para combatir los estados dolorosos moderados a severos - Utiliser pour contrer les douleurs modéré à severes. - Morfina. Ma silne dziaÅ‚anie przeciwbólowe. - - - An analgesic used to combat moderate to severe pain experiences. - Ðнальгетик Ð´Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ñредних и Ñильных болевых ощущений. - Analgésico usado para combatir los estados dolorosos de moderado a severo. - Un Analgésique puissant servant a contrer les douleur modéré a severe. - Organiczny zwiÄ…zek chemiczny z grupy alkaloidów. Ma silne dziaÅ‚anie przeciwbólowe. - - - Atropin auto-injector - Ðтропин в автоматичеÑком шприце - Atropina auto-inyectable - Auto-injecteur d'Atropine - Autostrzykawka AtroPen - - - Used in NBC scenarios - ПрименÑетÑÑ Ð´Ð»Ñ Ð·Ð°Ñ‰Ð¸Ñ‚Ñ‹ от ОМП - Usado en escenarios NBQ - Utiliser en cas d'attaque CBRN - Atropina. Stosowana jako lek rozkurczowy i Å›rodek rozszerzajÄ…cy źrenice. - - - A drug used by the Military in NBC scenarios. - Препарат, иÑпользуемый в войÑках Ð´Ð»Ñ Ð·Ð°Ñ‰Ð¸Ñ‚Ñ‹ от Ð¾Ñ€ÑƒÐ¶Ð¸Ñ Ð¼Ð°ÑÑового поражениÑ. - Medicamento usado por Militares en escenarios NBQ - Médicament utilisé par l'armée en cas d'attaque CBRN - Atropina. Stosowana jako lek rozkurczowy i Å›rodek rozszerzajÄ…cy źrenice. Åšrodek stosowany w przypadku zagrożeÅ„ NBC. - - - Epinephrine auto-injector - Ðдреналин в автоматичеÑком шприце - Epinefrina auto-inyectable - Auto-injecteur d'épinéphrine - Autostrzykawka EpiPen - - - Increase heart rate and counter effects given by allergic reactions - Стимулирует работу Ñердца и купирует аллергичеÑкие реакции. - Aumenta la frecuencia cardiaca y contraresta los efectos de las reacciones alérgicas - Augmente la Fréquance cadiaque et contré les effet d'une reaction Anaphylactique - Adrenalina. ZwiÄ™ksza puls i przeciwdziaÅ‚a efektom wywoÅ‚anym przez reakcje alergiczne - - - A drug that works on a sympathetic response to dilate the bronchi, increase heart rate and counter such effects given by allergic reactions (anaphylaxis). Used in sudden cardiac arrest scenarios with decreasing positive outcomes. - Препарат, вызывающий ÑимпатичеÑкую реакцию, приводÑщую к раÑширению бронхов, увеличению чаÑтоты Ñердечных Ñокращений и купированию аллергичеÑких реакций (анафилактичеÑкого шока). ПрименÑетÑÑ Ð¿Ñ€Ð¸ оÑтановке Ñердца Ñ ÑƒÐ¼ÐµÐ½ÑŒÑˆÐµÐ½Ð¸ÐµÐ¼ вероÑтноÑти благоприÑтного иÑхода. - Medicamento que dilata los bronquios, aumenta la frecuencia cardiaca y contrarresta los efectos de las reacciones alérgicas (anafilaxis). Se utiliza en caso de paros cardiacos repentinos. - Un medicament qui fonctione sur le systeme sympatique créan une dilatation des bronches, augmente la fréquance cardiaque et contre les effet d'une reaction alergique (anaphylaxie). Utiliser lors d'arret cardio-respiratoire pour augmenté les chances retrouver un ryhtme. - EpiPen z adrenalinÄ… ma dziaÅ‚anie sympatykomimetyczne, tj. pobudza receptory alfa- i beta-adrenergiczne. Pobudzenie ukÅ‚adu współczulnego prowadzi do zwiÄ™kszenia czÄ™stotliwoÅ›ci pracy serca, zwiÄ™kszenia pojemnoÅ›ci wyrzutowej serca i przyÅ›pieszenia krążenia wieÅ„cowego. Pobudzenie oskrzelowych receptorów beta-adrenergicznych wywoÅ‚uje rozkurcz mięśni gÅ‚adkich oskrzeli, co w efekcie zmniejsza towarzyszÄ…ce oddychaniu Å›wisty i dusznoÅ›ci. - - - Plasma IV (1000ml) - Плазма Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (1000 мл) - Plasma Intravenoso (1000ml) - Plasma Sanguin IV (1000ml) - Osocze IV (1000ml) - - - A volume-expanding blood supplement. - Дополнительный препарат, применÑемый при возмещении объема крови. - Suplemento para expandir el volumen sanguíneo. - Supplement visant a remplacer les volume sanguin - SkÅ‚adnik krwi, używany do zwiÄ™kszenia jej objÄ™toÅ›ci. - - - A volume-expanding blood supplement. - Дополнительный препарат, применÑемый при возмещении объема крови. - Suplemento para expandir el volumen sanguíneo. - Supplement visant a remplacer le volume sanguin et remplace les plaquettes. - SkÅ‚adnik krwi, używany do zwiÄ™kszenia jej objÄ™toÅ›ci. - - - Plasma IV (500ml) - Плазма Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (500 мл) - Plasma Intravenoso (500ml) - Plasma Sanguin IV (500ml) - Osocze IV (500ml) - - - Plasma IV (250ml) - Плазма Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (250 мл) - Plasma Intravenoso (250ml) - Plasma Sanguin (250ml) - Osocze IV (250ml) - - - Blood IV (1000ml) - Кровь Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ»Ð¸Ð²Ð°Ð½Ð¸Ñ (1000 мл) - Sangre Intravenosa (1000ml) - Cullot Sanguin IV (1000ml) - Krew IV (1000ml) - - - Blood IV, for restoring a patients blood (keep cold) - Пакет крови Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови (хранить в холодильнике) - Sangre Intravenosa, para restarurar el volumen sanguíneo (mantener frío) - Cullot Sanguin IV, pour remplacer le volume sanguin (garder Réfrigeré) - Krew IV, używana do uzupeÅ‚nienia krwi u pacjenta, trzymać w warunkach chÅ‚odniczych - - - O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. - Кровь I группы, резуÑ-отрицательнаÑ, применÑетÑÑ Ð¿Ð¾ жизненным показаниÑм Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови на догоÑпитальном Ñтапе Ð¾ÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¼ÐµÐ´Ð¸Ñ†Ð¸Ð½Ñкой помощи. - Cullot Sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin. - Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupeÅ‚nienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala. - Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdido. Uso habitual durante el transporte de heridos. - - - Blood IV (500ml) - Кровь Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ»Ð¸Ð²Ð°Ð½Ð¸Ñ (500 мл) - Sangre Intravenosa (500ml) - Cullot Sanguin IV (500ml) - Krew IV (500ml) - - - Blood IV (250ml) - Кровь Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ»Ð¸Ð²Ð°Ð½Ð¸Ñ (250 мл) - Sangre Intravenosa (250ml) - Cullot Sanguin IV (250ml) - Krew IV (250ml) - - - Saline IV (1000ml) - ФизраÑтвор Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (1000 мл) - Solución Salina Intravenosa (1000ml) - solution Saline 0.9% IV (1000ml) - Solanka 0,9% IV (1000ml) - - - Saline IV, for restoring a patients blood - Пакет физраÑтвора Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови - Solución Salina Intravenosa, para restaurar el volumen sanguíneo - Solution Saline 0.9% IV, pour retablir temporairement la tention arteriel - Solanka 0,9%, podawana dożylnie (IV), używana w celu uzupeÅ‚nienia krwi u pacjenta - - - A medical volume-replenishing agent introduced into the blood system through an IV infusion. - Пакет физиологичеÑкого раÑтвора Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови путем внутривенного вливаниÑ. - Suero fisiológico inoculado al torrente sanguíneo de forma intravenosa. - Un remplacment temporaire pour rétablir la tention artériel lors de perte sanguine, étant ajouter par intraveineuse - Używany w medycynie w formie pÅ‚ynu infuzyjnego jako Å›rodek nawadniajÄ…cy i uzupeÅ‚niajÄ…cy niedobór elektrolitów, podawany dożylnie (IV). - - - Saline IV (500ml) - ФизраÑтвор Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (500 мл) - Solución Salina Intravenosa (500ml) - Solution Saline 0.9% IV (500ml) - Solanka 0,9% IV (500ml) - - - Saline IV (250ml) - ФизраÑтвор Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (250 мл) - Solución Salina Intravenosa (250ml) - Solution Saline 0.9% IV (250ml) - Solanka 0,9% IV (250ml) - - - Basic Field Dressing (QuikClot) - Первичный перевÑзочный пакет (QuikClot) - Vendaje Básico (Coagulante) - Bandage Regulier (Coagulant) - Opatrunek QuikClot - - - QuikClot bandage - ГемоÑтатичеÑкий пакет QuikClot - Venda Coagulante - Bandage coagulant - Podstawowy opatrunek stosowany na rany - - - - - Un bandage servant a coaguler les seignements mineur à moyen. - Proszkowy opatrunek adsorbcyjny przeznaczony do tamowania zagrażajÄ…cych życiu krwawieÅ„ Å›redniej i dużej intensywnoÅ›ci. - Vendaje Hemostático con coagulante que detiene el sangrado. - - - Personal Aid Kit - Ðптечка - Kit de Soporte Vital Avanzado - Équipement de support Vitale - Apteczka osobista - - - Includes various treatment kit needed for stitching or advanced treatment - Содержит различные материалы и инÑтрументы Ð´Ð»Ñ Ð·Ð°ÑˆÐ¸Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð½ и Ð¾ÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñпециальной медпомощи. - Incluye material médico para tratamientos avanzados - Inclue du matériel medical pour les traitement avancé, tel les point de suture. - Zestaw Å›rodków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego - - - - - - - - - Surgical Kit - ХирургичеÑкий набор - Kit Quirúrgico - - - Surgical Kit for in field advanced medical treatment - Ðабор Ð´Ð»Ñ Ñ…Ð¸Ñ€ÑƒÑ€Ð³Ð¸Ñ‡ÐµÑкой помощи в полевых уÑловиÑÑ… - Kit Quirúrgico para el tratamiento avanzado en el campo de batalla - - - Surgical Kit for in field advanced medical treatment - Ðабор Ð´Ð»Ñ Ñ…Ð¸Ñ€ÑƒÑ€Ð³Ð¸Ñ‡ÐµÑкой помощи в полевых уÑловиÑÑ… - Kit Quirúrgico para el tratamiento avanzado en el campo de batalla - - - Bodybag - Мешок Ð´Ð»Ñ Ñ‚Ñ€ÑƒÐ¿Ð¾Ð² - Bolsa para cadáveres - - - A bodybag for dead bodies - Мешок Ð´Ð»Ñ ÑƒÐ¿Ð°ÐºÐ¾Ð²ÐºÐ¸ трупов - Bolsa para cadáveres - - - A bodybag for dead bodies - Мешок Ð´Ð»Ñ ÑƒÐ¿Ð°ÐºÐ¾Ð²ÐºÐ¸ трупов - Bolsa para cadáveres - - - - - Blood Pressure - Ðртериальное давление - Presión Arterial - - - Checking Blood Pressure.. - Проверка артериального давлениÑ... - Comprobando Presión Arterial... - - - You checked %1 - Ð’Ñ‹ оÑмотрели раненого %1 - Examinando a %1 - - - You find a blood pressure of %2/%3 - Ðртериальное давление %2/%3 - La Presión Arterial es %2/%3 - - - You find a low blood pressure - Давление низкое - La Presión Arterial es baja - - - You find a normal blood pressure - Давление нормальное - La Presión Arterial es normal - - - You find a high blood pressure - Давление выÑокое - La Presión Arterial es alta - - - You find no blood pressure - Ð”Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÑ‚ - No hay Presión Arterial - - - You fail to find a blood pressure - Ðртериальное давление не определÑетÑÑ - No puedes encontrar Presión Arterial - - - Pulse - ÐŸÑƒÐ»ÑŒÑ - Pulso - - - Checking Heart Rate.. - Проверка пульÑа... - Comprobando Pulso... - - - You checked %1 - Ð’Ñ‹ оÑмотрели раненого %1 - Examinando a %1 - - - You find a Heart Rate of %2 - ÐŸÑƒÐ»ÑŒÑ %2 уд./мин. - El Pulso es %2 - - - You find a weak Heart Rate - ÐŸÑƒÐ»ÑŒÑ Ñлабый - El Pulso es débil - - - You find a strong Heart Rate - ÐŸÑƒÐ»ÑŒÑ ÑƒÑ‡Ð°Ñ‰ÐµÐ½Ð½Ñ‹Ð¹ - El Pulso está acelerado - - - You find a normal Heart Rate - ÐŸÑƒÐ»ÑŒÑ Ð² норме - El Pulso es bueno - - - You find no Heart Rate - ÐŸÑƒÐ»ÑŒÑ Ð½Ðµ прощупываетÑÑ - No tiene Pulso - - - Response - Ð ÐµÐ°ÐºÑ†Ð¸Ñ - Reacciona - - - You check response of patient - Ð’Ñ‹ проверÑете реакцию раненого - Compruebas si el paciente reacciona - - - %1 is responsive - %1 реагирует на раздражители - %1 ha reaccionado - - - %1 is not responsive - %1 не реагирует - %1 no reacciona - - - You checked %1 - Ð’Ñ‹ оÑмотрели раненого %1 - Examinas a %1 - - - Bandaging - ПеревÑзка... - Vendando - - - Bandaged - ПовÑзка наложена - Vendado - - - You bandage %1 (%2) - Ð’Ñ‹ перевÑзали раненого %1 (%2) - Aplicas vendaje a %1 en %2 - - - %1 is bandaging you - %1 перевÑзывает Ð²Ð°Ñ - %1 te está vendando - - - You start stitching injures from %1 (%2) - Ð’Ñ‹ зашиваете Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¾Ñ‚ %1 (%2) - Estás suturando heridas de %1 en %2 - - - Stitching - Ðаложение швов - Suturando - - - You treat the airway of %1 - Ð’Ñ‹ интубируете раненого %1 - Estás intubando a %1 - - - Airway - Дыхательные пути - Vías Aéreas - - - %1 is treating your airway - %1 проводит вам интубацию - %1 te está intubando - - - - - + + + + Inject Atropine + + + Inject Epinephrine + Epinephrine injizieren + Inyectar Epinefrina + Wtrzyknij adrenalinÄ™ + Aplikovat Adrenalin + ВвеÑти андреналил + Adrénaline + Adrenalin + Injetar Epinefrina + Inietta Epinefrina + + + Inject Morphine + Morphin injizieren + Inyectar Morfina + Wstrzyknij morfinÄ™ + Aplikovat Morfin + ВвеÑти морфин + Morphine + Morfium + Injetar Morfina + Inietta Morfina + + + Transfuse Blood + Bluttransfusion + Transfundir sangre + Przetocz krew + Transfúze krve + Перелить кровь + Transfusion + Infúzió + Transfundir Sangue + Effettua Trasfusione + + + Bandage + Verbinden + Venda + Bandaż + Obvázat + Pansement + Benda + Kötözés + Atadura + ПеревÑзать + + + Bandage Head + Kopf verbinden + Vendar la cabeza + Bandażuj gÅ‚owÄ™ + Obvázat hlavu + ПеревÑзать голову + Pansement Tête + Fej kötözése + Atar Cabeça + Benda la testa + + + Bandage Torso + Torso verbinden + Vendar el torso + Bandażuj tors + Obvázat hruÄ + ПеревÑзать Ñ‚Ð¾Ñ€Ñ + Pansement Torse + FelsÅ‘test kötözése + Atar Tronco + Benda il torso + + + Bandage Left Arm + Arm links verbinden + Vendar el brazo izquierdo + Bandażuj lewe ramiÄ™ + Obvázat levou ruku + ПеревÑзать левую руку + Pansement Bras Gauche + Bal kar kötözése + Atar Braço Esquerdo + Benda il braccio sinistro + + + Bandage Right Arm + Arm rechts verbinden + Vendar el brazo derecho + Bandażuj prawe ramiÄ™ + Obvázat pravou ruku + ПеревÑзать правую руку + Pansement Bras Droit + Jobb kar kötözése + Atar Braço Direito + Benda il braccio destro + + + Bandage Left Leg + Bein links verbinden + Vendar la pierna izquierda + Bandażuj lewÄ… nogÄ™ + Obvázat levou nohu + ПеревÑзать левую ногу + Pansement Jambe Gauche + Bal láb kötözése + Atar Perna Esquerda + Benda la gamba sinistra + + + Bandage Right Leg + Bein rechts verbinden + Vendar la pierna derecha + Bandażuj prawÄ… nogÄ™ + Obvázat pravou nohu + ПеревÑзать правую ногу + Pansement Jambe Droite + Jobb láb kötözése + Atar Perna Direita + Benda la gamba destra + + + Injecting Morphine ... + Morphin injizieren ... + Inyectando Morfina ... + Wstrzykiwanie morfiny ... + Aplikuju Morfin ... + Введение морфина... + Injection de Morphine... + Morfium beadása... + Injetando Morfina ... + Inietto la morfina ... + + + Injecting Epinephrine ... + Epinephrine injizieren ... + Inyectando Epinefrina ... + Wstrzykiwanie adrenaliny ... + Aplikuju Adrenalin ... + Введение андреналина + Injection d'Adrénaline ... + Adrenalin beadása... + Injetando Epinefrina ... + Inietto l'epinefrina ... + + + Transfusing Blood ... + Bluttransfusion ... + Realizando transfusión ... + Przetaczanie krwi ... + Probíhá transfúze krve ... + Переливание крови... + Transfusion Sanguine ... + Infúzió... + Transfundindo Sangue ... + Effettuo la trasfusione ... + + + Bandaging ... + Verbinden ... + Vendando ... + Bandażowanie ... + Obvazuji ... + Pansement ... + Sto applicando la benda ... + Bekötözés... + Atando ... + ПеревÑзывание.... + + + Medical + Zdravotní + Médical + Sanitäter + Medico + Medyczne + Médico + Медик + Médico + + + Field Dressing + + + Packing Bandage + + + Elastic Bandage + + + QuikClot + + + Check Pulse + + + Check Blood Pressure + + + Triage Card + + + Tourniquet + + + Remove Tourniquet + + + Give Blood IV (1000ml) + + + Give Blood IV (500ml) + + + Give Blood IV (250ml) + + + Give Plasma IV (1000ml) + + + Give Plasma IV (500ml) + + + Give Plasma IV (250ml) + + + Give Saline IV (1000ml) + + + Give Saline IV (500ml) + + + Give Saline IV (250ml) + + + + + Minor + + + Delayed + + + Immediate + + + Deceased + + + None + + + Normal breathing + Дыхание в норме + Respiración normal + Respiration Normale + Normalny oddech + + + No breathing + Ð”Ñ‹Ñ…Ð°Ð½Ð¸Ñ Ð½ÐµÑ‚ + No respira + Apnée + Brak oddechu + + + Difficult breathing + Дыхание затруднено + Dificultad para respirar + Difficultée Respiratoire + TrudnoÅ›ci z oddychaniem + + + Almost no breathing + Ð”Ñ‹Ñ…Ð°Ð½Ð¸Ñ Ð¿Ð¾Ñ‡Ñ‚Ð¸ нет + Casi sin respirar + Respiration Faible + Prawie brak oddechu + + + Bleeding + Кровотечение + Sangrando + Seignement + Krwawienie zewnÄ™trzne + + + In Pain + ИÑпытывает боль + Con Dolor + A De La Douleur + W bólu + + + Lost a lot of Blood + Ð‘Ð¾Ð»ÑŒÑˆÐ°Ñ ÐºÑ€Ð¾Ð²Ð¾Ð¿Ð¾Ñ‚ÐµÑ€Ñ + Mucha Sangre perdida + A Perdu Bcp de Sang + StraciÅ‚ dużo krwi + + + Tourniquet [CAT] + Жгут + Torniquete [CAT] + Garot [CAT] + Opaska uciskowa [CAT] + + + + + Bandage (Basic) + ПовÑзка (обычнаÑ) + Vendaje (Básico) + Bandage (Standard) + Bandaż (jaÅ‚owy) + + + Used to cover a wound + Ð”Ð»Ñ Ð¿ÐµÑ€ÐµÐ²Ñзки ран + Utilizado para cubrir una herida + Utilisé Pour Couvrir Une Blessure + Używany w celu przykrycia i ochrony miejsca zranienia + + + A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed. + ПовÑзка, Ð½Ð°ÐºÐ»Ð°Ð´Ñ‹Ð²Ð°ÐµÐ¼Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ñ… раны поÑле оÑтановки кровотечениÑ. + Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar. + C'est un bandage, qui est fait d'un matériel spécial utiliser pour couvrir une blessure, qui peut etre appliquer des que le seignement as ete stopper. + Opatrunek materiaÅ‚owy, używany do przykrywania ran, zakÅ‚adany na ranÄ™ po zatamowaniu krwawienia. + + + Packing Bandage + Ð¢Ð°Ð¼Ð¿Ð¾Ð½Ð¸Ñ€ÑƒÑŽÑ‰Ð°Ñ Ð¿Ð¾Ð²Ñзка + Vendaje Compresivo + Bandage Mèche + Bandaż (uciskowy) + + + Used to pack medium to large wounds and stem the bleeding + Ð”Ð»Ñ Ñ‚Ð°Ð¼Ð¿Ð¾Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð½ Ñреднего и большого размера и оÑтановки кровотечениÑ. + Se utiliza para vendar heridas medianas y grandes y detener el sangrado + Utiliser pour remplire la cavité créé dans une blessure moyenne et grande. + Używany w celu opatrywania Å›rednich i dużych ran oraz tamowania krwawienia. + + + A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries. + ПовÑзка Ð´Ð»Ñ Ñ‚Ð°Ð¼Ð¿Ð¾Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð½Ñ‹, оÑтановки ÐºÑ€Ð¾Ð²Ð¾Ñ‚ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸ лучшего заживлениÑ. При Ñ‚Ñжелых Ñочетанных ранениÑÑ… возможно тампонирование раны. + Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos. + Un bandage servent a etre inseré dans les blessure pour éponger le seignement et faciliter la guerrison. Ce bandage est une option pour soigner les lession de politrauma. + Opatrunek stosowany w celu zatrzymania krwawienia i osÅ‚ony wiÄ™kszych ran. + + + Bandage (Elastic) + ПовÑзка (давÑщаÑ) + Vendaje (Elástico) + Bandage (Élastique) + Bandaż (elastyczny) + + + Bandage kit, Elastic + ДавÑÑ‰Ð°Ñ Ð¿Ð¾Ð²Ñзка + Vendaje (Elástico) + Bandage Compressif Élastique + Zestaw bandaży elastycznych. + + + + + Ce bandage peut etre utiliser pour compresser la plaie afin de ralentire le seignement et assurer la tenue du bandage lors de mouvment. + Elastyczna opaska podtrzymujÄ…ca opatrunek oraz usztywniajÄ…ca okolice stawów. + Brinda una compresión uniforme y ofrece soporte extra a una zona lesionada + + + Tourniquet (CAT) + Жгут + Torniquete (CAT) + Garot (CAT) + Staza (typ. CAT) + + + Slows down blood loss when bleeding + Уменьшает кровопотерю при кровотечении. + Reduce la velocidad de pérdida de sangre + Ralentit le seignement + Zmniejsza ubytek krwi z koÅ„czyn w przypadku krwawienia. + + + A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood. + Жгут иÑпользуетÑÑ Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð¶Ð°Ñ‚Ð¸Ñ ÑоÑудов, приводÑщего к оÑтановке или значительному уменьшению ÐºÑ€Ð¾Ð²Ð¾Ñ‚ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸ Ñокращению кровопотери. + Dispositivo utilizado para eliminar el pulso distal y de ese modo controlar la pérdida de sangre + Un appareil servent a compresser les artères et veines afin de reduire la perte de sang. + Opaska zaciskowa CAT sÅ‚uży do tamowanie krwotoków w sytuacji zranienia koÅ„czyn z masywnym krwawieniem tÄ™tniczym lub żylnym. + + + Morphine autoinjector + Морфин в автоматичеÑком шприце + Morfina auto-inyectable + Auto-injecteur de Morphine + Autostrzykawka z morfinÄ… + + + Used to combat moderate to severe pain experiences + Ð”Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ñредних и Ñильных болевых ощущений. + Usado para combatir los estados dolorosos moderados a severos + Utiliser pour contrer les douleurs modéré à severes. + Morfina. Ma silne dziaÅ‚anie przeciwbólowe. + + + An analgesic used to combat moderate to severe pain experiences. + Ðнальгетик Ð´Ð»Ñ ÑнÑÑ‚Ð¸Ñ Ñредних и Ñильных болевых ощущений. + Analgésico usado para combatir los estados dolorosos de moderado a severo. + Un Analgésique puissant servant a contrer les douleur modéré a severe. + Organiczny zwiÄ…zek chemiczny z grupy alkaloidów. Ma silne dziaÅ‚anie przeciwbólowe. + + + Atropin autoinjector + Ðтропин в автоматичеÑком шприце + Atropina auto-inyectable + Auto-injecteur d'Atropine + Autostrzykawka AtroPen + + + Used in NBC scenarios + ПрименÑетÑÑ Ð´Ð»Ñ Ð·Ð°Ñ‰Ð¸Ñ‚Ñ‹ от ОМП + Usado en escenarios NBQ + Utiliser en cas d'attaque CBRN + Atropina. Stosowana jako lek rozkurczowy i Å›rodek rozszerzajÄ…cy źrenice. + + + A drug used by the Military in NBC scenarios. + Препарат, иÑпользуемый в войÑках Ð´Ð»Ñ Ð·Ð°Ñ‰Ð¸Ñ‚Ñ‹ от Ð¾Ñ€ÑƒÐ¶Ð¸Ñ Ð¼Ð°ÑÑового поражениÑ. + Medicamento usado por Militares en escenarios NBQ + Médicament utilisé par l'armée en cas d'attaque CBRN + Atropina. Stosowana jako lek rozkurczowy i Å›rodek rozszerzajÄ…cy źrenice. Åšrodek stosowany w przypadku zagrożeÅ„ NBC. + + + Epinephrine autoinjector + Ðдреналин в автоматичеÑком шприце + Epinefrina auto-inyectable + Auto-injecteur d'épinéphrine + Autostrzykawka EpiPen + + + Increase heart rate and counter effects given by allergic reactions + Стимулирует работу Ñердца и купирует аллергичеÑкие реакции. + Aumenta la frecuencia cardiaca y contraresta los efectos de las reacciones alérgicas + Augmente la Fréquance cadiaque et contré les effet d'une reaction Anaphylactique + Adrenalina. ZwiÄ™ksza puls i przeciwdziaÅ‚a efektom wywoÅ‚anym przez reakcje alergiczne + + + A drug that works on a sympathetic response to dilate the bronchi, increase heart rate and counter such effects given by allergic reactions (anaphylaxis). Used in sudden cardiac arrest scenarios with decreasing positive outcomes. + Препарат, вызывающий ÑимпатичеÑкую реакцию, приводÑщую к раÑширению бронхов, увеличению чаÑтоты Ñердечных Ñокращений и купированию аллергичеÑких реакций (анафилактичеÑкого шока). ПрименÑетÑÑ Ð¿Ñ€Ð¸ оÑтановке Ñердца Ñ ÑƒÐ¼ÐµÐ½ÑŒÑˆÐµÐ½Ð¸ÐµÐ¼ вероÑтноÑти благоприÑтного иÑхода. + Medicamento que dilata los bronquios, aumenta la frecuencia cardiaca y contrarresta los efectos de las reacciones alérgicas (anafilaxis). Se utiliza en caso de paros cardiacos repentinos. + Un medicament qui fonctione sur le systeme sympatique créan une dilatation des bronches, augmente la fréquance cardiaque et contre les effet d'une reaction alergique (anaphylaxie). Utiliser lors d'arret cardio-respiratoire pour augmenté les chances retrouver un ryhtme. + EpiPen z adrenalinÄ… ma dziaÅ‚anie sympatykomimetyczne, tj. pobudza receptory alfa- i beta-adrenergiczne. Pobudzenie ukÅ‚adu współczulnego prowadzi do zwiÄ™kszenia czÄ™stotliwoÅ›ci pracy serca, zwiÄ™kszenia pojemnoÅ›ci wyrzutowej serca i przyÅ›pieszenia krążenia wieÅ„cowego. Pobudzenie oskrzelowych receptorów beta-adrenergicznych wywoÅ‚uje rozkurcz mięśni gÅ‚adkich oskrzeli, co w efekcie zmniejsza towarzyszÄ…ce oddychaniu Å›wisty i dusznoÅ›ci. + + + Plasma IV (1000ml) + Плазма Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (1000 мл) + Plasma Intravenoso (1000ml) + Plasma Sanguin IV (1000ml) + Osocze IV (1000ml) + + + A volume-expanding blood supplement. + Дополнительный препарат, применÑемый при возмещении объема крови. + Suplemento para expandir el volumen sanguíneo. + Supplement visant a remplacer les volume sanguin + SkÅ‚adnik krwi, używany do zwiÄ™kszenia jej objÄ™toÅ›ci. + + + A volume-expanding blood supplement. + Дополнительный препарат, применÑемый при возмещении объема крови. + Suplemento para expandir el volumen sanguíneo. + Supplement visant a remplacer le volume sanguin et remplace les plaquettes. + SkÅ‚adnik krwi, używany do zwiÄ™kszenia jej objÄ™toÅ›ci. + + + Plasma IV (500ml) + Плазма Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (500 мл) + Plasma Intravenoso (500ml) + Plasma Sanguin IV (500ml) + Osocze IV (500ml) + + + Plasma IV (250ml) + Плазма Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (250 мл) + Plasma Intravenoso (250ml) + Plasma Sanguin (250ml) + Osocze IV (250ml) + + + Blood IV (1000ml) + Кровь Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ»Ð¸Ð²Ð°Ð½Ð¸Ñ (1000 мл) + Sangre Intravenosa (1000ml) + Cullot Sanguin IV (1000ml) + Krew IV (1000ml) + + + Blood IV, for restoring a patients blood (keep cold) + Пакет крови Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови (хранить в холодильнике) + Sangre Intravenosa, para restarurar el volumen sanguíneo (mantener frío) + Cullot Sanguin IV, pour remplacer le volume sanguin (garder Réfrigeré) + Krew IV, używana do uzupeÅ‚nienia krwi u pacjenta, trzymać w warunkach chÅ‚odniczych + + + O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. + Кровь I группы, резуÑ-отрицательнаÑ, применÑетÑÑ Ð¿Ð¾ жизненным показаниÑм Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови на догоÑпитальном Ñтапе Ð¾ÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¼ÐµÐ´Ð¸Ñ†Ð¸Ð½Ñкой помощи. + Cullot Sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin. + Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupeÅ‚nienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala. + Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdido. Uso habitual durante el transporte de heridos. + + + Blood IV (500ml) + Кровь Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ»Ð¸Ð²Ð°Ð½Ð¸Ñ (500 мл) + Sangre Intravenosa (500ml) + Cullot Sanguin IV (500ml) + Krew IV (500ml) + + + Blood IV (250ml) + Кровь Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ»Ð¸Ð²Ð°Ð½Ð¸Ñ (250 мл) + Sangre Intravenosa (250ml) + Cullot Sanguin IV (250ml) + Krew IV (250ml) + + + Saline IV (1000ml) + ФизраÑтвор Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (1000 мл) + Solución Salina Intravenosa (1000ml) + solution Saline 0.9% IV (1000ml) + Solanka 0,9% IV (1000ml) + + + Saline IV, for restoring a patients blood + Пакет физраÑтвора Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови + Solución Salina Intravenosa, para restaurar el volumen sanguíneo + Solution Saline 0.9% IV, pour retablir temporairement la tention arteriel + Solanka 0,9%, podawana dożylnie (IV), używana w celu uzupeÅ‚nienia krwi u pacjenta + + + A medical volume-replenishing agent introduced into the blood system through an IV infusion. + Пакет физиологичеÑкого раÑтвора Ð´Ð»Ñ Ð²Ð¾Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¾Ð±ÑŠÐµÐ¼Ð° потерÑнной крови путем внутривенного вливаниÑ. + Suero fisiológico inoculado al torrente sanguíneo de forma intravenosa. + Un remplacment temporaire pour rétablir la tention artériel lors de perte sanguine, étant ajouter par intraveineuse + Używany w medycynie w formie pÅ‚ynu infuzyjnego jako Å›rodek nawadniajÄ…cy i uzupeÅ‚niajÄ…cy niedobór elektrolitów, podawany dożylnie (IV). + + + Saline IV (500ml) + ФизраÑтвор Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (500 мл) + Solución Salina Intravenosa (500ml) + Solution Saline 0.9% IV (500ml) + Solanka 0,9% IV (500ml) + + + Saline IV (250ml) + ФизраÑтвор Ð´Ð»Ñ Ð²/в Ð²Ð»Ð¸Ð²Ð°Ð½Ð¸Ñ (250 мл) + Solución Salina Intravenosa (250ml) + Solution Saline 0.9% IV (250ml) + Solanka 0,9% IV (250ml) + + + Basic Field Dressing (QuikClot) + Первичный перевÑзочный пакет (QuikClot) + Vendaje Básico (Coagulante) + Bandage Regulier (Coagulant) + Opatrunek QuikClot + + + QuikClot bandage + ГемоÑтатичеÑкий пакет QuikClot + Venda Coagulante + Bandage coagulant + Podstawowy opatrunek stosowany na rany + + + + + Un bandage servant a coaguler les seignements mineur à moyen. + Proszkowy opatrunek adsorbcyjny przeznaczony do tamowania zagrażajÄ…cych życiu krwawieÅ„ Å›redniej i dużej intensywnoÅ›ci. + Vendaje Hemostático con coagulante que detiene el sangrado. + + + Personal Aid Kit + Ðптечка + Kit de Soporte Vital Avanzado + Équipement de support Vitale + Apteczka osobista + + + Includes various treatment kit needed for stitching or advanced treatment + Содержит различные материалы и инÑтрументы Ð´Ð»Ñ Ð·Ð°ÑˆÐ¸Ð²Ð°Ð½Ð¸Ñ Ñ€Ð°Ð½ и Ð¾ÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñпециальной медпомощи. + Incluye material médico para tratamientos avanzados + Inclue du matériel medical pour les traitement avancé, tel les point de suture. + Zestaw Å›rodków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego + + + + + + + + + Surgical Kit + ХирургичеÑкий набор + Kit Quirúrgico + + + Surgical Kit for in field advanced medical treatment + Ðабор Ð´Ð»Ñ Ñ…Ð¸Ñ€ÑƒÑ€Ð³Ð¸Ñ‡ÐµÑкой помощи в полевых уÑловиÑÑ… + Kit Quirúrgico para el tratamiento avanzado en el campo de batalla + + + Surgical Kit for in field advanced medical treatment + Ðабор Ð´Ð»Ñ Ñ…Ð¸Ñ€ÑƒÑ€Ð³Ð¸Ñ‡ÐµÑкой помощи в полевых уÑловиÑÑ… + Kit Quirúrgico para el tratamiento avanzado en el campo de batalla + + + Bodybag + Мешок Ð´Ð»Ñ Ñ‚Ñ€ÑƒÐ¿Ð¾Ð² + Bolsa para cadáveres + + + A bodybag for dead bodies + Мешок Ð´Ð»Ñ ÑƒÐ¿Ð°ÐºÐ¾Ð²ÐºÐ¸ трупов + Bolsa para cadáveres + + + A bodybag for dead bodies + Мешок Ð´Ð»Ñ ÑƒÐ¿Ð°ÐºÐ¾Ð²ÐºÐ¸ трупов + Bolsa para cadáveres + + + + + Blood Pressure + Ðртериальное давление + Presión Arterial + + + Checking Blood Pressure.. + Проверка артериального давлениÑ... + Comprobando Presión Arterial... + + + You checked %1 + Ð’Ñ‹ оÑмотрели раненого %1 + Examinando a %1 + + + You find a blood pressure of %2/%3 + Ðртериальное давление %2/%3 + La Presión Arterial es %2/%3 + + + You find a low blood pressure + Давление низкое + La Presión Arterial es baja + + + You find a normal blood pressure + Давление нормальное + La Presión Arterial es normal + + + You find a high blood pressure + Давление выÑокое + La Presión Arterial es alta + + + You find no blood pressure + Ð”Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÑ‚ + No hay Presión Arterial + + + You fail to find a blood pressure + Ðртериальное давление не определÑетÑÑ + No puedes encontrar Presión Arterial + + + Pulse + ÐŸÑƒÐ»ÑŒÑ + Pulso + + + Checking Heart Rate.. + Проверка пульÑа... + Comprobando Pulso... + + + You checked %1 + Ð’Ñ‹ оÑмотрели раненого %1 + Examinando a %1 + + + You find a Heart Rate of %2 + ÐŸÑƒÐ»ÑŒÑ %2 уд./мин. + El Pulso es %2 + + + You find a weak Heart Rate + ÐŸÑƒÐ»ÑŒÑ Ñлабый + El Pulso es débil + + + You find a strong Heart Rate + ÐŸÑƒÐ»ÑŒÑ ÑƒÑ‡Ð°Ñ‰ÐµÐ½Ð½Ñ‹Ð¹ + El Pulso está acelerado + + + You find a normal Heart Rate + ÐŸÑƒÐ»ÑŒÑ Ð² норме + El Pulso es bueno + + + You find no Heart Rate + ÐŸÑƒÐ»ÑŒÑ Ð½Ðµ прощупываетÑÑ + No tiene Pulso + + + Response + Ð ÐµÐ°ÐºÑ†Ð¸Ñ + Reacciona + + + You check response of patient + Ð’Ñ‹ проверÑете реакцию раненого + Compruebas si el paciente reacciona + + + %1 is responsive + %1 реагирует на раздражители + %1 ha reaccionado + + + %1 is not responsive + %1 не реагирует + %1 no reacciona + + + You checked %1 + Ð’Ñ‹ оÑмотрели раненого %1 + Examinas a %1 + + + Bandaged + ПовÑзка наложена + Vendado + + + You bandage %1 (%2) + Ð’Ñ‹ перевÑзали раненого %1 (%2) + Aplicas vendaje a %1 en %2 + + + %1 is bandaging you + %1 перевÑзывает Ð²Ð°Ñ + %1 te está vendando + + + You start stitching injures from %1 (%2) + Ð’Ñ‹ зашиваете Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¾Ñ‚ %1 (%2) + Estás suturando heridas de %1 en %2 + + + Stitching + Ðаложение швов + Suturando + + + You treat the airway of %1 + Ð’Ñ‹ интубируете раненого %1 + Estás intubando a %1 + + + Airway + Дыхательные пути + Vías Aéreas + + + %1 is treating your airway + %1 проводит вам интубацию + %1 te está intubando + + + Drag + Ziehen + Arrastrar + CiÄ…gnij + Táhnout + Тащить + Tracter + Húzás + Arrastar + Trascina + + + Carry + Tragen + Cargar + NieÅ› + Nést + ÐеÑти + Porter + Cipelés + Carregar + Trasporta + + + Release + Loslassen + Soltar + Połóż + Položit + ОтпуÑтить + Déposer + Elenged + Largar + Lascia + + + Load Patient Into + Patient Einladen + Cargar el paciente en + ZaÅ‚aduj pacjenta + Naložit pacianta do + Погрузить пациента в + Embarquer le Patient + Sebesült berakása + Carregar Paciente Em + Carica paziente nel + + + Unload Patient + Patient Ausladen + Descargar el paciente + WyÅ‚aduj pacjenta + Vyložit pacienta + Выгрузить пациента + Débarquer le Patient + Sebesült kihúzása + Descarregar Paciente + Scarica il paziente + + + Unload patient + + + + + %1 has bandaged patient + + + %1 used %2 + + + %1 has given an IV + + + %1 applied a tourniquet + + + + \ No newline at end of file diff --git a/addons/medical/ui/Icon_Module_Medical_ca.paa b/addons/medical/ui/Icon_Module_Medical_ca.paa new file mode 100644 index 0000000000..d66921dfcc Binary files /dev/null and b/addons/medical/ui/Icon_Module_Medical_ca.paa differ diff --git a/addons/medical/ui/icons/autoInjector.paa b/addons/medical/ui/icons/autoInjector.paa new file mode 100644 index 0000000000..f1707d2b82 Binary files /dev/null and b/addons/medical/ui/icons/autoInjector.paa differ diff --git a/addons/medical/ui/icons/bandage.paa b/addons/medical/ui/icons/bandage.paa new file mode 100644 index 0000000000..e8de331ae3 Binary files /dev/null and b/addons/medical/ui/icons/bandage.paa differ diff --git a/addons/medical/ui/icons/bodybag.paa b/addons/medical/ui/icons/bodybag.paa new file mode 100644 index 0000000000..ec35ad0796 Binary files /dev/null and b/addons/medical/ui/icons/bodybag.paa differ diff --git a/addons/medical/ui/icons/iv.paa b/addons/medical/ui/icons/iv.paa new file mode 100644 index 0000000000..ef7048dfd1 Binary files /dev/null and b/addons/medical/ui/icons/iv.paa differ diff --git a/addons/medical/ui/icons/medical_cross.paa b/addons/medical/ui/icons/medical_cross.paa new file mode 100644 index 0000000000..656ebc000b Binary files /dev/null and b/addons/medical/ui/icons/medical_cross.paa differ diff --git a/addons/medical/ui/icons/packingBandage.paa b/addons/medical/ui/icons/packingBandage.paa new file mode 100644 index 0000000000..0fb1a3650c Binary files /dev/null and b/addons/medical/ui/icons/packingBandage.paa differ diff --git a/addons/medical/ui/icons/surgicalKit.paa b/addons/medical/ui/icons/surgicalKit.paa new file mode 100644 index 0000000000..212c56c78c Binary files /dev/null and b/addons/medical/ui/icons/surgicalKit.paa differ diff --git a/addons/medical/ui/icons/tourniquet.paa b/addons/medical/ui/icons/tourniquet.paa new file mode 100644 index 0000000000..6497420e54 Binary files /dev/null and b/addons/medical/ui/icons/tourniquet.paa differ diff --git a/addons/medical/ui/icons/triageCard.paa b/addons/medical/ui/icons/triageCard.paa new file mode 100644 index 0000000000..0a1865fc9f Binary files /dev/null and b/addons/medical/ui/icons/triageCard.paa differ diff --git a/addons/medical/ui/triage_card_corner_l.paa b/addons/medical/ui/triage_card_corner_l.paa new file mode 100644 index 0000000000..a713f43e2d Binary files /dev/null and b/addons/medical/ui/triage_card_corner_l.paa differ diff --git a/addons/medical/ui/triage_card_corner_r.paa b/addons/medical/ui/triage_card_corner_r.paa new file mode 100644 index 0000000000..5d095321b9 Binary files /dev/null and b/addons/medical/ui/triage_card_corner_r.paa differ diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp new file mode 100644 index 0000000000..f1b98f1e2d --- /dev/null +++ b/addons/medical/ui/triagecard.hpp @@ -0,0 +1,191 @@ +class ACE_gui_buttonBase; + +class GVAR(triageCard) { + idd = 7010; + movingenable = 0; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(triageCard))), _this select 0)]); + onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(triageCard))), nil)]); + class controlsBackground { + class Background: ACE_gui_backgroundBase { + idc = -1; + type = CT_STATIC; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "19 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_LEFT + ST_SHADOW; + font = "PuristaMedium"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.0, 0.0, 0.0, 1}; + colorBackground[] = {1,1,1,1}; + text = ""; + }; + class cornor_top_l: ACE_gui_backgroundBase { + idc = -1; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + font = "PuristaMedium"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {1,1,0,1}; + colorBackground[] = {0,0,0,0}; + text = QUOTE(PATHTOF(ui\triage_card_corner_l.paa)); + }; + class cornor_top_r: cornor_top_l { + x = "20 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + text = QUOTE(PATHTOF(ui\triage_card_corner_r.paa)); + }; + + class TriageCardLabel { + idc = 199; + type = CT_STATIC; + x = "14.25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + style = 0x02 + 0x100; // ST_LEFT + ST_SHADOW + font = "PuristaMedium"; + colorText[] = {0,0,0,1}; + colorBackground[] = {0,0,0,0}; + text = "TRIAGE CARD"; + }; + class TriageList: ACE_gui_listBoxBase { + idc = 200; + x = "11 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "13 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + rowHeight = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + colorBackground[] = {0, 0, 0, 0}; + colorText[] = {0,0,0, 1.0}; + colorScrollbar[] = {0.95, 0.95, 0.95, 0}; + colorSelect[] = {0.0, 0.0, 0.0, 1}; + colorSelect2[] = {0.0, 0.0, 0.0, 1}; + colorSelectBackground[] = {0, 0, 0, 0.0}; + colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0}; + }; + class TriageTextBottom: TriageCardLabel { + idc = 2000; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "20 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = 0x02; + colorText[] = {1, 1, 1.0, 1}; + colorBackground[] = {0,0.0,0.0,0.7}; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = ""; + }; + class selectTriageStatus: ACE_gui_buttonBase { + idc = 2001; + x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "20 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)"; + action = QUOTE([true] call FUNC(dropDownTriageCard);); + text = ""; + }; + class selectTriageStatusNone: selectTriageStatus { + idc = 2002; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_NONE; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',0,true)];); + }; + class selectTriageStatusMinor: selectTriageStatus { + idc = 2003; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_MINOR; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0,0.5,0,0.9)"; + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',1,true)];); + }; + class selectTriageStatusDelayed: selectTriageStatus { + idc = 2004; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_DELAYED; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)"; + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',2,true)];); + }; + class selectTriageStatusImmediate: selectTriageStatus { + idc = 2005; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_IMMEDIATE; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureOver = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(1,0.2,0.2,0.9)"; + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 3, true)];); + }; + class selectTriageStatusDeceased: selectTriageStatus { + idc = 2006; + x = 0; + y = 0; + w = 0; + h = 0; + text = $STR_ACE_MEDICAL_TRIAGE_STATUS_DECEASED; + style = 0x02; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)"; + action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 4, true)];); + }; + }; +}; \ No newline at end of file diff --git a/addons/microdagr/$PBOPREFIX$ b/addons/microdagr/$PBOPREFIX$ new file mode 100644 index 0000000000..e2de546eaf --- /dev/null +++ b/addons/microdagr/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\microdagr \ No newline at end of file diff --git a/addons/microdagr/CfgEventHandlers.hpp b/addons/microdagr/CfgEventHandlers.hpp new file mode 100644 index 0000000000..6d1d3b6dfb --- /dev/null +++ b/addons/microdagr/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 { + clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) ); + }; +}; diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp new file mode 100644 index 0000000000..f7c22bc30e --- /dev/null +++ b/addons/microdagr/CfgVehicles.hpp @@ -0,0 +1,76 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class GVAR(show) { + //Opens the mini map + displayName = "$STR_ACE_microdagr_show"; + condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY}); + statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay)); + showDisabled = 0; + priority = 0.2; + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + exceptions[] = {"notOnMap"}; + }; + class GVAR(configure) { + //Opens the dialog + displayName = "$STR_ACE_microdagr_configure"; + condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG}); + statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay)); + showDisabled = 0; + priority = 0.1; + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + exceptions[] = {"notOnMap"}; + }; + class GVAR(close) { + displayName = "$STR_ACE_microdagr_closeUnit"; + condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED); + statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay)); + showDisabled = 0; + priority = 0.3; + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + exceptions[] = {"notOnMap"}; + }; + }; + }; + }; + + class Logic; + class Module_F: Logic { + class ArgumentsBaseUnits {}; + class ModuleDescription {}; + }; + class GVAR(dagrModule): Module_F { + author = "$STR_ACE_Common_ACETeam"; + category = "ACE"; + displayName = "MicroDAGR Map Fill"; + function = QFUNC(moduleMapFill); + scope = 2; + isGlobal = 1; + icon = QUOTE(PATHTOF(UI\Icon_Module_microDAGR_ca.paa)); + functionPriority = 0; + class Arguments { + class MapDataAvailable { + displayName = "MicroDAGR Map Fill"; // Argument label + description = "How much map data is filled on MicroDAGR's "; // Tooltip description + typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL" + class values { + class None {name = "Full Satellite + Buildings"; value = MAP_DETAIL_SAT; default = 1;}; + class Side {name = "Topographical + Roads"; value = MAP_DETAIL_TOPOROADS;}; + class Unique {name = "None (Cannot use map view)"; value = MAP_DETAIL_NONE;}; + }; + }; + }; + class ModuleDescription: ModuleDescription { + description = "Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap.
Source: microDAGR.pbo"; + }; + }; + + class Box_NATO_Support_F; + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_microDAGR,10); + }; + }; +}; diff --git a/addons/microdagr/CfgWeapons.hpp b/addons/microdagr/CfgWeapons.hpp new file mode 100644 index 0000000000..73615ea6b6 --- /dev/null +++ b/addons/microdagr/CfgWeapons.hpp @@ -0,0 +1,15 @@ +class CfgWeapons { + class ACE_ItemCore; + class InventoryItem_Base_F; + + class ACE_microDAGR: ACE_ItemCore { + author = "$STR_ACE_Common_ACETeam"; + scope = 2; + displayName = "$STR_ACE_microdagr_itemName"; + descriptionShort = "$STR_ACE_microdagr_itemDescription"; + picture = QUOTE(PATHTOF(images\microDAGR_item.paa)); + class ItemInfo: InventoryItem_Base_F { + mass = 2; + }; + }; +}; diff --git a/addons/microdagr/UI/Icon_Module_microDAGR_ca.paa b/addons/microdagr/UI/Icon_Module_microDAGR_ca.paa new file mode 100644 index 0000000000..48be13c9c2 Binary files /dev/null and b/addons/microdagr/UI/Icon_Module_microDAGR_ca.paa differ diff --git a/addons/microdagr/UI/icon_microDAGR.paa b/addons/microdagr/UI/icon_microDAGR.paa new file mode 100644 index 0000000000..04307ec581 Binary files /dev/null and b/addons/microdagr/UI/icon_microDAGR.paa differ diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf new file mode 100644 index 0000000000..61f857cfed --- /dev/null +++ b/addons/microdagr/XEH_clientInit.sqf @@ -0,0 +1,73 @@ +//XEH_clientInit.sqf +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +//Add Keybinds: +["ACE3", QGVAR(openGPS), (localize "STR_ACE_microdagr_toggleUnit"), +{ + // canInteractWith (can use on map) + if !([ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!("ACE_microDAGR" in (items ace_player))) exitWith {false}; + + [] call FUNC(openDisplay); //toggle display mode + true; +}, +{false}, +[0xC7, [false, false, false]], false] call cba_fnc_addKeybind; //Home Key + +["ACE3", QGVAR(closeGPS), (localize "STR_ACE_microdagr_closeUnit"), +{ + // canInteractWith (can use on map) + if !([ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if (!("ACE_microDAGR" in (items ace_player))) exitWith {false}; + if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {false}; + + [DISPLAY_MODE_CLOSED] call FUNC(openDisplay); //close unit + true; +}, +{false}, +[0xC7, [false, true, false]], false] call cba_fnc_addKeybind; //CTRL + Home Key + +//Add Eventhandler: +["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler); + +//Global Variables to default: +GVAR(gpsPositionASL) = [0,0,0]; +GVAR(mapAutoTrackPosition) = true; +GVAR(mapShowTexture) = false; +GVAR(mapPosition) = [-999, -999]; +GVAR(mapZoom) = 0.075; +GVAR(currentApplicationPage) = APP_MODE_NULL; +GVAR(currentShowMode) = DISPLAY_MODE_CLOSED; + +//User Settings +GVAR(settingUseMils) = false; +GVAR(settingShowAllWaypointsOnMap) = true; + +GVAR(newWaypointPosition) = []; +GVAR(currentWaypoint) = -1; +GVAR(rangeFinderPositionASL) = []; + + +GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset"); + +//Calculate the map's MGRS: +_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude"); +_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude"); +//Pull UTM grid from world's long/lat +_zone = 1 + (floor ((_worldMapLong + 180) / 6)); +_band = "Z"; +if (_worldMapLat <= -80) then { + _band = "A"; +} else { + if (_worldMapLat < 84) then { + _band = "CDEFGHJKLMNPQRSTUVWXX" select [(floor ((_worldMapLat / 8) + 10)), 1]; + }; +}; +//calculating square ID from long/lat is a pain in the ass, just fake it unless someone wants to actualy do this +_squareID = if ((count worldName) > 2) then {toUpper(worldName select [0,2])} else {"XG"}; +GVAR(mgrsGridZoneDesignator) = format ["%1%2 %3", _zone, _band, _squareID]; + diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf new file mode 100644 index 0000000000..4e6ed561c3 --- /dev/null +++ b/addons/microdagr/XEH_preInit.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(appMarkKeypadEntry); +PREP(appMenuButtonConnectRangefinder); +PREP(appSettingsLBClick); +PREP(appWaypointsButtonDeleteWP); +PREP(appWaypointsButtonSetWP); +PREP(canShow); +PREP(deviceAddWaypoint); +PREP(deviceDeleteWaypoint); +PREP(deviceGetWaypoints); +PREP(dialogClosedEH); +PREP(mapButtonDownEH); +PREP(mapDoubleTapEH); +PREP(mapOnDrawEH); +PREP(modeMapButtons); +PREP(moduleMapFill); +PREP(openDisplay); +PREP(recieveRangefinderData); +PREP(saveCurrentAndSetNewMode); +PREP(showApplicationPage); +PREP(updateDisplay); + +ADDON = true; diff --git a/addons/microdagr/config.cpp b/addons/microdagr/config.cpp new file mode 100644 index 0000000000..e337aa96d5 --- /dev/null +++ b/addons/microdagr/config.cpp @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {"ACE_microDAGR"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"PabstMirror"}; + authorUrl = "https://github.com/PabstMirror/"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" +#include "gui.hpp" + +class ACE_Settings { + class GVAR(MapDataAvailable) { + value = 2; + typeName = "SCALAR"; + isClientSetable = 0; + }; +}; diff --git a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf new file mode 100644 index 0000000000..066b44508d --- /dev/null +++ b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf @@ -0,0 +1,57 @@ +/* + * Author: PabstMirror + * Handles the keypad entries from the "Mark" Application + * + * Arguments: + * 0: String version of Keypad entry ["ok","del","1",...] + * + * Return Value: + * Nothing + * + * Example: + * ["ok"] call ace_microdagr_fnc_appMarkKeypadEntry + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_editText", "_gridPosTuple", "_actualPos"]; +PARAMS_1(_keypadButton); + +disableSerialization; +_display = displayNull; +if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { + _display = (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull]); +} else { + _display = (uiNamespace getVariable [QGVAR(RscTitleDisplay), displayNull]); +}; +if (isNull _display) exitWith {ERROR("No Display");}; + +if (GVAR(currentApplicationPage) != APP_MODE_MARK) exitWith {}; + +_editText = ctrlText (_display displayCtrl IDC_MODEMARK_CORDSEDIT); + +switch (_keypadButton) do { +case ("ok"): { + if ((count GVAR(newWaypointPosition)) == 0) then { + _gridPosTuple = [_editText] call BIS_fnc_gridToPos; + _actualPos = [(((_gridPosTuple select 0) select 0) + 0.5 * ((_gridPosTuple select 1) select 0)), (((_gridPosTuple select 0) select 1) + 0.5 * ((_gridPosTuple select 1) select 1))]; + _actualPos set [2, (getTerrainHeightASL _actualPos)]; + GVAR(newWaypointPosition) = _actualPos; + [APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode); + } else { + [_editText, GVAR(newWaypointPosition)] call FUNC(deviceAddWaypoint); + [APP_MODE_WAYPOINTS] call FUNC(saveCurrentAndSetNewMode); + }; + }; +case ("del"): { + _editText = _editText select [0, (((count _editText) - 1) max 0)]; + (_display displayCtrl IDC_MODEMARK_CORDSEDIT) ctrlSetText _editText; + ctrlSetFocus (_display displayCtrl IDC_MODEMARK_CORDSEDIT); + }; + default { + _editText = _editText + _keypadButton; + (_display displayCtrl IDC_MODEMARK_CORDSEDIT) ctrlSetText _editText; + ctrlSetFocus (_display displayCtrl IDC_MODEMARK_CORDSEDIT); + }; +}; diff --git a/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf b/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf new file mode 100644 index 0000000000..1cf81963f5 --- /dev/null +++ b/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf @@ -0,0 +1,20 @@ +/* + * Author: PabstMirror + * Handles the "Connect To" button from the menu application + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_microdagr_fnc_appMenuButtonConnectRangefinder + * + * Public: No + */ +#include "script_component.hpp" + +GVAR(currentWaypoint) = if (GVAR(currentWaypoint) == -2) then {-1} else {-2}; +GVAR(rangeFinderPositionASL) = []; +[APP_MODE_INFODISPLAY] call FUNC(saveCurrentAndSetNewMode); diff --git a/addons/microdagr/functions/fnc_appSettingsLBClick.sqf b/addons/microdagr/functions/fnc_appSettingsLBClick.sqf new file mode 100644 index 0000000000..bc6779c10a --- /dev/null +++ b/addons/microdagr/functions/fnc_appSettingsLBClick.sqf @@ -0,0 +1,27 @@ +/* + * Author: PabstMirror + * Handles double clicking on the setting listbox + * + * Arguments: + * 0: Setting List box (not used) + * 1: Index + * + * Return Value: + * Nothing + * + * Example: + * [settingList, 1] call ace_microdagr_fnc_appSettingsLBClick + * + * Public: No + */ +#include "script_component.hpp" + +disableSerialization; +PARAMS_2(_control,_itemClicked); + +switch (_itemClicked) do { + case (0): { GVAR(settingUseMils) = ! GVAR(settingUseMils)}; + case (1): { GVAR(settingShowAllWaypointsOnMap) = ! GVAR(settingShowAllWaypointsOnMap)}; +}; + +[] call FUNC(updateDisplay); diff --git a/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf b/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf new file mode 100644 index 0000000000..1acd936370 --- /dev/null +++ b/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf @@ -0,0 +1,37 @@ +/* + * Author: PabstMirror + * Handles clicking the delete button from the waypoint application + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_microdagr_fnc_appWaypointsButtonDeleteWP + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_wpIndex"]; + +disableSerialization; +_display = displayNull; +if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { + _display = (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull]); +} else { + _display = (uiNamespace getVariable [QGVAR(RscTitleDisplay), displayNull]); +}; +if (isNull _display) exitWith {ERROR("No Display");}; + +_wpIndex = lbCurSel (_display displayCtrl IDC_MODEWAYPOINTS_LISTOFWAYPOINTS); + +//If it's our currentWP then deactivate +if (GVAR(currentWaypoint) == _wpIndex) then {GVAR(currentWaypoint) = -1}; + +//Delete from list: +[_wpIndex] call FUNC(deviceDeleteWaypoint); +//Update list now: +[] call FUNC(updateDisplay); diff --git a/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf b/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf new file mode 100644 index 0000000000..1836e50da2 --- /dev/null +++ b/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf @@ -0,0 +1,33 @@ +/* + * Author: PabstMirror + * Handles clicking the setWP button from the waypoint application + * + * Arguments: + * The "SetWP" button + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_microdagr_fnc_appWaypointsButtonSetWP + * + * Public: No + */ +#include "script_component.hpp" + +private ["_wpListBox", "_newWpIndex", "_waypoints"]; + +disableSerialization; +PARAMS_1(_wpButton); + +_wpListBox = (ctrlParent _wpButton) displayCtrl 144501; +_newWpIndex = lbCurSel _wpListBox; +_waypoints = [] call FUNC(deviceGetWaypoints); + +if ((_newWpIndex < 0) || (_newWpIndex > ((count _waypoints) - 1))) exitWith { + GVAR(currentWaypoint) = -1; + ERROR("out of bounds wp"); +}; + +GVAR(currentWaypoint) = _newWpIndex; +[APP_MODE_COMPASS] call FUNC(saveCurrentAndSetNewMode); diff --git a/addons/microdagr/functions/fnc_canShow.sqf b/addons/microdagr/functions/fnc_canShow.sqf new file mode 100644 index 0000000000..19b7b8f0c6 --- /dev/null +++ b/addons/microdagr/functions/fnc_canShow.sqf @@ -0,0 +1,37 @@ +/* + * Author: PabstMirror + * Tests if the dagr can be shown in a mode + * + * Arguments: + * The display mode to test showing + * + * Return Value: + * Nothing + * + * Example: + * [mode] call ace_microdagr_fnc_canShow + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_showType); + +private ["_returnValue"]; + +_returnValue = false; + +switch (_showType) do { +case (DISPLAY_MODE_CLOSED): {_returnValue = true}; //Can always close +case (DISPLAY_MODE_HIDDEN): {_returnValue = true}; //Can always hide + +case (DISPLAY_MODE_DIALOG): { + _returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)}; + }; +case (DISPLAY_MODE_DISPLAY): { + //Can't have minimap up while zoomed in + _returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap"]] call EFUNC(common,canInteractWith)}; + }; +}; + +_returnValue diff --git a/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf b/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf new file mode 100644 index 0000000000..6912810f58 --- /dev/null +++ b/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf @@ -0,0 +1,24 @@ +/* + * Author: PabstMirror + * Adds a waypoint to the "device" + * Device saving not implemented yet, just save to player object + * + * Arguments: + * 0: Waypoint name + * 1: Waypoint Position ASL + * + * Return Value: + * Nothing + * + * Example: + * ["Hill 55", [41,324, 12]] call ace_microdagr_fnc_deviceAddWaypoint + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_2(_waypointName,_waypointPosASL); + +_waypoints = ace_player getVariable [QGVAR(waypoints), []]; +_waypoints pushBack [_waypointName, _waypointPosASL]; +ace_player setVariable [QGVAR(waypoints), _waypoints]; diff --git a/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf b/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf new file mode 100644 index 0000000000..3d1e8ec852 --- /dev/null +++ b/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf @@ -0,0 +1,26 @@ +/* + * Author: PabstMirror + * Deletes a waypoint from the "device" + * Device saving not implemented yet, just save to player object + * + * Arguments: + * 0: Waypoint Index + * + * Return Value: + * Nothing + * + * Example: + * ["Hill 55", [41,324, 12]] call ace_microdagr_fnc_deviceDeleteWaypoint + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_wpIndex); + +_waypoints = ace_player getVariable [QGVAR(waypoints), []]; + +if ((_wpIndex < 0) || (_wpIndex > ((count _waypoints) - 1))) exitWith {ERROR("out of bounds wp");}; + +_waypoints deleteAt _wpIndex; +ace_player setVariable [QGVAR(waypoints), _waypoints]; diff --git a/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf b/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf new file mode 100644 index 0000000000..f90ecb06be --- /dev/null +++ b/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf @@ -0,0 +1,19 @@ +/* + * Author: PabstMirror + * Gets all waypoints from the "device" + * Device saving not implemented yet, just save to player object + * + * Arguments: + * Nothing + * + * Return Value: + * Waypoints + * + * Example: + * [["Hill 55", [41,324, 12]]] = [] call ace_microdagr_fnc_deviceGetWaypoint + * + * Public: No + */ +#include "script_component.hpp" + +(ace_player getVariable [QGVAR(waypoints), []]) diff --git a/addons/microdagr/functions/fnc_dialogClosedEH.sqf b/addons/microdagr/functions/fnc_dialogClosedEH.sqf new file mode 100644 index 0000000000..0a7e5e5115 --- /dev/null +++ b/addons/microdagr/functions/fnc_dialogClosedEH.sqf @@ -0,0 +1,21 @@ +/* + * Author: PabstMirror + * Handles the dialog closeing, switches back to display mode + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_microdagr_fnc_dialogClosedEH + * + * Public: No + */ +#include "script_component.hpp" + +if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { + [-1] call FUNC(saveCurrentAndSetNewMode); + [DISPLAY_MODE_DISPLAY] call FUNC(openDisplay); +}; diff --git a/addons/microdagr/functions/fnc_mapButtonDownEH.sqf b/addons/microdagr/functions/fnc_mapButtonDownEH.sqf new file mode 100644 index 0000000000..e7d2618160 --- /dev/null +++ b/addons/microdagr/functions/fnc_mapButtonDownEH.sqf @@ -0,0 +1,30 @@ +/* + * Author: PabstMirror + * Handles right clicking on the map ('dragging' the map) + * Release autotrack if enabled. + * + * Arguments: + * 0: The Map + * 1: MouseButton + * 2: MousePosX + * 3: MousePosY + * + * Return Value: + * Nothing + * + * Example: + * [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapButtonDownEH + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_4(_theMap,_mouseButton,_xPos,_yPos); + +//Only handle RMB +if (_mouseButton != 1) exitWith {}; + +if (GVAR(mapAutoTrackPosition)) then { + GVAR(mapAutoTrackPosition) = false; + [] call FUNC(showApplicationPage); +}; diff --git a/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf b/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf new file mode 100644 index 0000000000..f36d5f2548 --- /dev/null +++ b/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf @@ -0,0 +1,30 @@ +/* + * Author: PabstMirror + * Handles the double tapping either of the 2 mini-maps + * + * Arguments: + * 0: The Map + * 1: MouseButton + * 2: MousePosX + * 3: MousePosY + * + * Return Value: + * Nothing + * + * Example: + * [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapDoubleTapEH + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_4(_theMap,_mouseButton,_xPos,_yPos); + +//Only handle LMB +if (_mouseButton != 0) exitWith {}; + +_worldPos = _theMap ctrlMapScreenToWorld [_xPos, _yPos]; +_worldPos set [2, (getTerrainHeightASL _worldPos)]; + +GVAR(newWaypointPosition) = _worldPos; +[APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode); diff --git a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf new file mode 100644 index 0000000000..3acf3e889c --- /dev/null +++ b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf @@ -0,0 +1,65 @@ +/* + * Author: PabstMirror + * Handles the draw event from all 3 maps (compass + 2 minimaps) + * + * Arguments: + * 0: The Map + * + * Return Value: + * Nothing + * + * Example: + * [compassMap] call ace_microdagr_fnc_mapOnDrawEH + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_theMap); + +_theMap = _this select 0; +_mapSize = (ctrlPosition _theMap) select 3; + +_waypoints = [] call FUNC(deviceGetWaypoints); + +if (GVAR(currentApplicationPage) == 1) then { + _theMap ctrlMapAnimAdd [0, DUMMY_ZOOM, DUMMY_POS]; + ctrlMapAnimCommit _theMap; + _size = 412 * _mapSize; + _theMap drawIcon [QUOTE(PATHTO_R(images\compass_starInverted.paa)), [1,1,1,1], DUMMY_POS, _size, _size, (-1 * (getDir ace_player)), '', 0 ]; + _theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [0.533,0.769,0.76,1], DUMMY_POS, _size, _size, 0, '', 0 ]; + + if (GVAR(currentWaypoint) != -1) then { + _targetPos = []; + if (GVAR(currentWaypoint) == -2) then { + if ((count GVAR(rangeFinderPositionASL)) == 3) then { + _targetPos = GVAR(rangeFinderPositionASL); + }; + } else { + if (GVAR(currentWaypoint) < (count _waypoints)) then { + _targetPos = (_waypoints select GVAR(currentWaypoint)) select 1; + }; + }; + if ((count _targetPos) == 3) then { + _relBearing = [ace_player, _targetPos] call BIS_fnc_relativeDirTo; + _theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [1,0.564,0.564,1], DUMMY_POS, _size, _size, _relBearing, '', 0 ]; + }; + }; + +} else { //Map Mode: + if (GVAR(mapAutoTrackPosition)) then { + _theMap ctrlMapAnimAdd [0, (GVAR(mapZoom)/_mapSize), GVAR(gpsPositionASL)]; + ctrlMapAnimCommit _theMap; + }; + _size = 48 * _mapSize; + _theMap drawIcon [QUOTE(PATHTO_R(images\icon_self.paa)), [0.533,0.769,0.76,0.75], GVAR(gpsPositionASL), _size, _size, (getDir ace_player), '', 0 ]; + + if (GVAR(settingShowAllWaypointsOnMap)) then { + _size = 32 * _mapSize; + { + EXPLODE_2_PVT(_x,_wpName,_wpPos); + _alpha = if (_forEachIndex == GVAR(currentWaypoint)) then {1} else {0.5}; + _theMap drawIcon [QUOTE(PATHTO_R(images\icon_mapWaypoints.paa)), [1,1,1,_alpha], _wpPos, _size, _size, 0, '', 0 ]; + } forEach _waypoints; + }; +}; diff --git a/addons/microdagr/functions/fnc_modeMapButtons.sqf b/addons/microdagr/functions/fnc_modeMapButtons.sqf new file mode 100644 index 0000000000..5de4bf9ca7 --- /dev/null +++ b/addons/microdagr/functions/fnc_modeMapButtons.sqf @@ -0,0 +1,31 @@ +/* + * Author: PabstMirror + * Takes some arguments and returns something or other. + * + * Arguments: + * 0: String of the map button pressed + * + * Return Value: + * Nothing + * + * Example: + * ["autotrack"] call ace_microdagr_fnc_modeMapButtons + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_1(_mode); + +[-1] call FUNC(saveCurrentAndSetNewMode); //backup current draw pos/zoom + +if (_mode == "autotrack") then { + GVAR(mapAutoTrackPosition) = !GVAR(mapAutoTrackPosition); +} else { + if (_mode == "zoomin") then { + GVAR(mapZoom) = GVAR(mapZoom) * (10/11); + } else { + GVAR(mapZoom) = GVAR(mapZoom) * (11/10); + }; +}; +[] call FUNC(showApplicationPage); diff --git a/addons/microdagr/functions/fnc_moduleMapFill.sqf b/addons/microdagr/functions/fnc_moduleMapFill.sqf new file mode 100644 index 0000000000..d07b0bc518 --- /dev/null +++ b/addons/microdagr/functions/fnc_moduleMapFill.sqf @@ -0,0 +1,26 @@ +/* + * Author: PabstMirror + * Function for the module (handles the map fill level) + * + * Arguments: + * 0: logic + * 1: synced units-not used + * 2: Module Activated + * + * Return Value: + * Nothing + * + * Example: + * [module, [], true] call ace_microdagr_fnc_moduleMapFill + * + * Public: No + */ +#include "script_component.hpp" + +PARAMS_3(_logic,_syncedUnits,_activated); + +if (!_activated) exitWith {WARNING("Module Placed but not active");}; + +if (isServer) then { + [_logic, QGVAR(MapDataAvailable), "MapDataAvailable"] call EFUNC(common,readSettingFromModule); +}; diff --git a/addons/microdagr/functions/fnc_openDisplay.sqf b/addons/microdagr/functions/fnc_openDisplay.sqf new file mode 100644 index 0000000000..ae5f7f47f5 --- /dev/null +++ b/addons/microdagr/functions/fnc_openDisplay.sqf @@ -0,0 +1,101 @@ +/* + * Author: PabstMirror + * Changes the display mode of the microDAGR + * + * Arguments: + * 0: Display Mode to show the microDAGR in + * + * Return Value: + * Nothing + * + * Example: + * [1] call ace_microdagr_fnc_openDisplay + * + * Public: No + */ +#include "script_component.hpp" + +private ["_oldShowMode", "_args", "_pfID", "_player"]; + +DEFAULT_PARAM(0,_newDisplayShowMode,-1); +_oldShowMode = GVAR(currentShowMode); + +if (_newDisplayShowMode == -1) then { + //Toggle mode button: + if (_oldShowMode in [DISPLAY_MODE_DISPLAY, DISPLAY_MODE_HIDDEN]) then {_newDisplayShowMode = DISPLAY_MODE_DIALOG}; + if (_oldShowMode in [DISPLAY_MODE_DIALOG, DISPLAY_MODE_CLOSED]) then {_newDisplayShowMode = DISPLAY_MODE_DISPLAY}; +}; + +if ((_newDisplayShowMode == DISPLAY_MODE_DISPLAY) && {!([DISPLAY_MODE_DISPLAY] call FUNC(canShow))}) then {_newDisplayShowMode = DISPLAY_MODE_HIDDEN}; +if ((_newDisplayShowMode == DISPLAY_MODE_DIALOG) && {!([DISPLAY_MODE_DIALOG] call FUNC(canShow))}) then {_newDisplayShowMode = DISPLAY_MODE_HIDDEN}; + + + +//On first-startup +if (GVAR(currentApplicationPage) == APP_MODE_NULL) then { + GVAR(currentApplicationPage) = APP_MODE_INFODISPLAY; + GVAR(mapPosition) = getPos ace_player; +}; + +if (_newDisplayShowMode in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) then { + + //If Dialog is open, back it up before closing: + if (dialog && {!isNull (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull])}) then { + [-1] call FUNC(saveCurrentAndSetNewMode); + closeDialog 0; + }; + + //Close the display: + (QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; +} else { + if (_newDisplayShowMode == DISPLAY_MODE_DISPLAY) then { + //If Dialog is open, back it up before closing: + if (dialog && {!isNull (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull])}) then { + [-1] call FUNC(saveCurrentAndSetNewMode); + closeDialog 0; + }; + //Open the display: + (QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutRsc [QGVAR(TheRscTitleDisplay), "PLAIN", 0, true]; + } else { //DISPLAY_MODE_DIALOG + //Close the display: + (QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + //Open the dialog: + createDialog QGVAR(TheDialog); + }; +}; + +GVAR(currentShowMode) = _newDisplayShowMode; +//Update display applicaiton if open: +if (GVAR(currentShowMode) in [DISPLAY_MODE_DIALOG, DISPLAY_MODE_DISPLAY]) then { + [] call FUNC(showApplicationPage); +}; + +if ((_oldShowMode == DISPLAY_MODE_CLOSED) && {GVAR(currentShowMode) != DISPLAY_MODE_CLOSED}) then { + //Start a pfeh to update display and handle hiding display + + [{ + PARAMS_2(_args,_pfID); + EXPLODE_1_PVT(_args,_player); + if ((isNull ace_player) || {!alive ace_player} || {ace_player != _player} || {!("ACE_microDAGR" in (items ace_player))} || {GVAR(currentShowMode) == DISPLAY_MODE_CLOSED}) then { + //Close Display if still open: + if (GVAR(currentShowMode) != DISPLAY_MODE_CLOSED) then { + [DISPLAY_MODE_CLOSED] call FUNC(openDisplay); + }; + [_pfID] call CBA_fnc_removePerFrameHandler; + } else { + GVAR(gpsPositionASL) = getPosAsl ace_player; + if (GVAR(currentShowMode) == DISPLAY_MODE_HIDDEN) then { + //If display is hidden, and we can show, then swithc modes: + if ([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) then { + [DISPLAY_MODE_DISPLAY] call FUNC(openDisplay); + }; + } else { + if ([GVAR(currentShowMode)] call FUNC(canShow)) then { + [] call FUNC(updateDisplay); + } else { + [DISPLAY_MODE_HIDDEN] call FUNC(openDisplay); + }; + }; + }; + }, 0.1, [ace_player]] call CBA_fnc_addPerFrameHandler; +}; diff --git a/addons/microdagr/functions/fnc_recieveRangefinderData.sqf b/addons/microdagr/functions/fnc_recieveRangefinderData.sqf new file mode 100644 index 0000000000..154dfff94a --- /dev/null +++ b/addons/microdagr/functions/fnc_recieveRangefinderData.sqf @@ -0,0 +1,34 @@ +/* + * Author: PabstMirror + * Recieves the data packet from the vector rangefinder + * + * Arguments: + * 0: Slope distance (Meters) + * 1: Azimuth (Degrees) + * 2: Inclination (Degrees) + * + * Return Value: + * Nothing + * + * Example: + * [1000, 45, 1] call ace_microdagr_fnc_recieveRangefinderData + * + * Public: No + */ +#include "script_component.hpp" + +private ["_horizontalDistance", "_verticleDistance", "_targetOffset", "_targetPosASL"]; + +PARAMS_3(_slopeDistance,_azimuth,_inclination); + +if (GVAR(currentWaypoint) != -2) exitWith {}; //Only take waypoint when "connected" +if (_slopeDistance < 0) exitWith {}; //Bad Data + +_horizontalDistance = (cos _inclination) * _slopeDistance; +_verticleDistance = (sin _inclination) * _slopeDistance; + +_targetOffset = [((sin _azimuth) * _horizontalDistance), ((cos _azimuth) * _horizontalDistance), _verticleDistance]; +//This assumes the "rangefinder view" pos is very close to player, at worst the turret should only be a few meters different +_targetPosASL = (getPosASL ace_player) vectorAdd _targetOffset; + +GVAR(rangeFinderPositionASL) = _targetPosASL; diff --git a/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf b/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf new file mode 100644 index 0000000000..1f4982d87f --- /dev/null +++ b/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf @@ -0,0 +1,62 @@ +/* + * Author: PabstMirror + * Saves the current mode and sets a new mode + * Used to backup display when switching display modes + * + * Arguments: + * 0: New Mode + * + * Return Value: + * Nothing + * + * Example: + * [2] call ace_microdagr_fnc_saveCurrentAndSetNewMode + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_theMap", "_mapSize", "_centerPos"]; + +PARAMS_1(_newMode); + +disableSerialization; +_display = displayNull; +if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { + _display = (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull]); +} else { + _display = (uiNamespace getVariable [QGVAR(RscTitleDisplay), displayNull]); +}; +if (isNull _display) exitWith {ERROR("No Display");}; + +if (GVAR(currentApplicationPage) == 2) then { + _theMap = if (!GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPPLAIN} else {_display displayCtrl IDC_MAPDETAILS}; + _mapCtrlPos = ctrlPosition _theMap; + _mapSize = _mapCtrlPos select 3; + _centerPos = [((_mapCtrlPos select 0) + (_mapCtrlPos select 2) / 2), ((_mapCtrlPos select 1) + (_mapCtrlPos select 3) / 2)]; + GVAR(mapPosition) = _theMap ctrlMapScreenToWorld _centerPos; + GVAR(mapZoom) = (ctrlMapScale _theMap) * _mapSize; + + //Hit button again, toggle map modes: + if (_newMode == 2) then { + if (GVAR(mapShowTexture)) then { + GVAR(mapShowTexture) = false; + } else { + if (GVAR(MapDataAvailable) == MAP_DETAIL_SAT) then { + GVAR(mapShowTexture) = true; + }; + }; + }; +}; + +//Can't switch to map if no map loaded +if (_newMode == APP_MODE_MAP) then { + if (GVAR(MapDataAvailable) == MAP_DETAIL_NONE) then { + _newMode = -1; + }; +}; + +if (_newMode != -1) then { + GVAR(currentApplicationPage) = _newMode; + [] call FUNC(showApplicationPage); +}; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf new file mode 100644 index 0000000000..a9e6d10db7 --- /dev/null +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -0,0 +1,127 @@ +/* + * Author: PabstMirror + * Changes the "application page" shown on the microDAGR + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_microdagr_fnc_showApplicationPage + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_daylight", "_theMap", "_mapSize"]; + +disableSerialization; + +_display = displayNull; +if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { + _display = (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull]); +} else { + _display = (uiNamespace getVariable [QGVAR(RscTitleDisplay), displayNull]); +}; +if (isNull _display) exitWith {ERROR("No Display");}; + +//Fade "shell" at night +_daylight = 0.05 max (((1 - overcast)/2 + ((1 - cos (daytime * 360/24)) / 4)) * (linearConversion [0, 1, sunOrMoon, (0.25 * moonIntensity), 1])); +(_display displayCtrl IDC_MICRODAGRSHELL) ctrlSetTextColor [_daylight, _daylight, _daylight, 1]; + +//TopBar +(_display displayCtrl IDC_RANGEFINDERCONNECTEDICON) ctrlShow (GVAR(currentWaypoint) == -2); + +//Mode: Info: +(_display displayCtrl IDC_MODEDISPLAY) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY); + +if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { + (_display displayCtrl IDC_MODEDISPLAY_UTMGRID) ctrlSetText GVAR(mgrsGridZoneDesignator); + if (GVAR(currentWaypoint) == -1) then { + (_display displayCtrl IDC_MODEDISPLAY_MODEPOSTIMECG) ctrlShow true; + (_display displayCtrl IDC_MODEDISPLAY_MODEPOSTARGETCG) ctrlShow false; + } else { + (_display displayCtrl IDC_MODEDISPLAY_MODEPOSTIMECG) ctrlShow false; + (_display displayCtrl IDC_MODEDISPLAY_MODEPOSTARGETCG) ctrlShow true; + if (GVAR(currentWaypoint) == -2) then { + (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa" + } else { + (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText QUOTE(PATHTOF(images\icon_menuMark.paa)); + }; + }; +}; + +//Mode: Compass: +(_display displayCtrl IDC_MODECOMPASS) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_COMPASS); +(_display displayCtrl IDC_MAPCOMPASS) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_COMPASS); + + +//Mode: Map +(_display displayCtrl IDC_MODEMAP_MAPTRACKBUTTON) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_MAP); +(_display displayCtrl IDC_MODEMAP_MAPZOOMIN) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_MAP); +(_display displayCtrl IDC_MODEMAP_MAPZOOMOUT) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_MAP); + +(_display displayCtrl IDC_MAPPLAIN) ctrlShow ((GVAR(currentApplicationPage) == APP_MODE_MAP) && {!GVAR(mapShowTexture)}); +(_display displayCtrl IDC_MAPDETAILS) ctrlShow ((GVAR(currentApplicationPage) == APP_MODE_MAP) && {GVAR(mapShowTexture)}); + +if (GVAR(currentApplicationPage) == APP_MODE_MAP) then { + _theMap = if (!GVAR(mapShowTexture)) then {_display displayCtrl IDC_MAPPLAIN} else {_display displayCtrl IDC_MAPDETAILS}; + _mapSize = (ctrlPosition _theMap) select 3; + _theMap ctrlMapAnimAdd [0, (GVAR(mapZoom) / _mapSize), GVAR(mapPosition)]; + ctrlMapAnimCommit _theMap; + if (GVAR(mapAutoTrackPosition)) then { + (_display displayCtrl IDC_MODEMAP_MAPTRACKBUTTON) ctrlSetTextColor [1,1,1,0.8]; + } else { + (_display displayCtrl IDC_MODEMAP_MAPTRACKBUTTON) ctrlSetTextColor [1,1,1,0.4]; + }; +}; + +//Mode: Menu +(_display displayCtrl IDC_MODEMENU) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_MENU); + +//Mode: Mark +if (GVAR(currentApplicationPage) == APP_MODE_MARK) then { + (_display displayCtrl IDC_MODEMARK) ctrlShow true; + //not backed up for displayMode swap, not a big deal + + + if ((count GVAR(newWaypointPosition)) == 0) then { + (_display displayCtrl IDC_MODEMARK_HEADER) ctrlSetText (localize "STR_ACE_microdagr_wpEnterCords"); + (_display displayCtrl IDC_MODEMARK_CORDSEDIT) ctrlSetText ""; + } else { + (_display displayCtrl IDC_MODEMARK_HEADER) ctrlSetText format [(localize "STR_ACE_microdagr_wpEnterName"), mapGridPosition GVAR(newWaypointPosition)]; + (_display displayCtrl IDC_MODEMARK_CORDSEDIT) ctrlSetText format ["[%1]", mapGridPosition GVAR(newWaypointPosition)]; + }; + ctrlSetFocus (_display displayCtrl IDC_MODEMARK_CORDSEDIT); +} else { + (_display displayCtrl IDC_MODEMARK) ctrlShow false; + GVAR(newWaypointPosition) = []; +}; + +//Mode: Waypoints +(_display displayCtrl IDC_MODEWAYPOINTS) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_WAYPOINTS); + +//Mode: Setting +(_display displayCtrl IDC_MODESETTINGS) ctrlShow (GVAR(currentApplicationPage) == APP_MODE_SETUP); + +//Buttons pushed: +if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { + (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa)); +} else { + (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa)); +}; +if (GVAR(currentApplicationPage) == APP_MODE_COMPASS) then { + (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa)); +} else { + (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa)); +}; +if (GVAR(currentApplicationPage) == APP_MODE_MAP) then { + (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa)); +} else { + (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa)); +}; + +//Update the page now: +[] call FUNC(updateDisplay); diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf new file mode 100644 index 0000000000..af577049a0 --- /dev/null +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -0,0 +1,198 @@ +/* + * Author: PabstMirror + * Updates the display (several times a second) called from the pfeh + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_microdagr_fnc_updateDisplay + * + * Public: No + */ +#include "script_component.hpp" + +private ["_display", "_waypoints", "_posString", "_eastingText", "_northingText", "_numASL", "_aboveSeaLevelText", "_compassAngleText", "_targetPosName", "_targetPosLocationASL", "_bearingText", "_rangeText", "_targetName", "_bearing", "_2dDistanceKm", "_SpeedText", "_playerPos2d", "_wpListBox", "_currentIndex", "_wpName", "_wpPos", "_settingListBox", "_yearString", "_monthSring", "_dayString"]; + +disableSerialization; +_display = displayNull; +if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { + _display = (uiNamespace getVariable [QGVAR(DialogDisplay), displayNull]); +} else { + _display = (uiNamespace getVariable [QGVAR(RscTitleDisplay), displayNull]); +}; +if (isNull _display) exitWith {ERROR("No Display");}; + +(_display displayCtrl IDC_CLOCKTEXT) ctrlSetText ([daytime, "HH:MM"] call bis_fnc_timeToString); + +_waypoints = [] call FUNC(deviceGetWaypoints); + +switch (GVAR(currentApplicationPage)) do { +case (APP_MODE_INFODISPLAY): { + //Easting/Northing: + _posString = mapGridPosition ACE_player; + _eastingText = ""; + _northingText = ""; + if (count _posString > 0) then { + _eastingText = (_posString select [0, ((count _posString)/2)]) + "e"; + _northingText = (_posString select [(count _posString)/2, (count _posString - 1)]) + "n"; + }; + (_display displayCtrl IDC_MODEDISPLAY_EASTING) ctrlSetText _eastingText; + (_display displayCtrl IDC_MODEDISPLAY_NORTHING) ctrlSetText _northingText; + + //Elevation: + _numASL = (GVAR(gpsPositionASL) select 2) + GVAR(mapAltitude); + _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; + _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; + (_display displayCtrl IDC_MODEDISPLAY_ELEVATIONNUM) ctrlSetText _aboveSeaLevelText; + + //Heading: + _compassAngleText = if (GVAR(settingUseMils)) then { + [(floor ((6400 / 360) * (getDir ace_player))), 4, 0] call CBA_fnc_formatNumber; + } else { + ([(floor (getDir ace_player)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 + }; + (_display displayCtrl IDC_MODEDISPLAY_HEADINGNUM) ctrlSetText _compassAngleText; + + //Speed: + (_display displayCtrl IDC_MODEDISPLAY_SPEEDNUM) ctrlSetText format ["%1kph", (round (speed (vehicle ace_player)))];; + + + if (GVAR(currentWaypoint) == -1) then { + _yearString = (date select 0); + _monthSring = localize (["error","str_january","str_february","str_march","str_april","str_may","str_june","str_july","str_august","str_september","str_october","str_november","str_december"] select (date select 1)); + _dayString = if ((date select 2) < 10) then {"0" + str (date select 2)} else {str (date select 2)}; + + (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN1) ctrlSetText format ["%1-%2-%3", _yearString, _monthSring, _dayString]; //"18-Feb-2010"; + (_display displayCtrl IDC_MODEDISPLAY_TIMEDISPLAYGREEN2) ctrlSetText ([daytime, "HH:MM:SS"] call bis_fnc_timeToString); + } else { + _targetPosName = ""; + _targetPosLocationASL = []; + _bearingText = "----"; + _rangeText = "----"; + _aboveSeaLevelText = "----"; + _targetName = "----"; + + if (GVAR(currentWaypoint) == -2) then { + if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { + _targetPosName = format ["[%1]", (mapGridPosition GVAR(rangeFinderPositionASL))]; + _targetPosLocationASL = GVAR(rangeFinderPositionASL); + }; + } else { + if (GVAR(currentWaypoint) > ((count _waypoints) - 1)) exitWith {ERROR("bounds");}; + _targetPosName = (_waypoints select GVAR(currentWaypoint)) select 0; + _targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1; + }; + + if (!(_targetPosLocationASL isEqualTo [])) then { + _bearing = [GVAR(gpsPositionASL), _targetPosLocationASL] call BIS_fnc_dirTo; + _bearingText = if (GVAR(settingUseMils)) then { + [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; + } else { + ([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 + }; + _2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000; + _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; + _numASL = (_targetPosLocationASL select 2) + GVAR(mapAltitude); + _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; + _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; + }; + + (_display displayCtrl IDC_MODEDISPLAY_TRACKNUM) ctrlSetText _bearingText; + (_display displayCtrl IDC_MODEDISPLAY_TARGETRANGENUM) ctrlSetText _rangeText; + (_display displayCtrl IDC_MODEDISPLAY_TARGETELEVATIONNUM) ctrlSetText _aboveSeaLevelText; + (_display displayCtrl IDC_MODEDISPLAY_TARGETNAME) ctrlSetText _targetPosName; + }; + }; +case (APP_MODE_COMPASS): { + //Heading: + _compassAngleText = if (GVAR(settingUseMils)) then { + [(floor ((6400 / 360) * (getDir ace_player))), 4, 0] call CBA_fnc_formatNumber; + } else { + ([(floor (getDir ace_player)), 3, 1] call CBA_fnc_formatNumber) + "°M" //degree symbol is in UTF-8 + }; + (_display displayCtrl IDC_MODECOMPASS_HEADING) ctrlSetText _compassAngleText; + + //Speed: + _SpeedText = format ["%1kph", (round (speed (vehicle ace_player)))];; + (_display displayCtrl IDC_MODECOMPASS_SPEED) ctrlSetText _SpeedText; + + if (GVAR(currentWaypoint) == -1) then { + (_display displayCtrl IDC_MODECOMPASS_BEARING) ctrlSetText ""; + (_display displayCtrl IDC_MODECOMPASS_RANGE) ctrlSetText ""; + (_display displayCtrl IDC_MODECOMPASS_TARGET) ctrlSetText ""; + } else { + _playerPos2d = GVAR(gpsPositionASL) select [0,2]; + + _targetPosName = ""; + _targetPosLocationASL = []; + + if (GVAR(currentWaypoint) == -2) then { + if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { + _targetPosName = format ["[%1]", (mapGridPosition GVAR(rangeFinderPositionASL))]; + _targetPosLocationASL = GVAR(rangeFinderPositionASL); + }; + } else { + if (GVAR(currentWaypoint) > ((count _waypoints - 1))) exitWith {ERROR("bounds");}; + _targetPosName = (_waypoints select GVAR(currentWaypoint)) select 0; + _targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1; + }; + + _bearing = "---"; + _rangeText = "---"; + + if (!(_targetPosLocationASL isEqualTo [])) then { + _bearing = [GVAR(gpsPositionASL), _targetPosLocationASL] call BIS_fnc_dirTo; + _bearingText = if (GVAR(settingUseMils)) then { + [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; + } else { + ([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°M" //degree symbol is in UTF-8 + }; + _2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_targetPosLocationASL select [0,2])) / 1000; + _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; + }; + + (_display displayCtrl IDC_MODECOMPASS_BEARING) ctrlSetText _bearingText; + (_display displayCtrl IDC_MODECOMPASS_RANGE) ctrlSetText _rangeText; + (_display displayCtrl IDC_MODECOMPASS_TARGET) ctrlSetText _targetPosName; + }; + }; + +case (APP_MODE_WAYPOINTS): { + _wpListBox = _display displayCtrl IDC_MODEWAYPOINTS_LISTOFWAYPOINTS; + _currentIndex = lbCurSel _wpListBox; + + lbClear _wpListBox; + { + EXPLODE_2_PVT(_x,_wpName,_wpPos); + _wpListBox lbAdd _wpName; + _2dDistanceKm = ((GVAR(gpsPositionASL) select [0,2]) distance (_wpPos select [0,2])) / 1000; + _wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)])]; + } forEach _waypoints; + + _currentIndex = (_currentIndex max 0) min (count _waypoints); + _wpListBox lbSetCurSel _currentIndex; + }; + +case (APP_MODE_SETUP): { + _settingListBox = _display displayCtrl IDC_MODESETTINGS; + lbClear _settingListBox; + + _settingListBox lbAdd (localize "STR_ACE_microdagr_settingUseMils"); + if (GVAR(settingUseMils)) then { + _settingListBox lbSetTextRight [0, (localize "STR_ACE_microdagr_settingMils")]; + } else { + _settingListBox lbSetTextRight [0, (localize "STR_ACE_microdagr_settingDegrees")]; + }; + + _settingListBox lbAdd (localize "STR_ACE_microdagr_settingShowWP"); + if (GVAR(settingShowAllWaypointsOnMap)) then { + _settingListBox lbSetTextRight [1, (localize "STR_ACE_microdagr_settingOn")]; + } else { + _settingListBox lbSetTextRight [1, (localize "STR_ACE_microdagr_settingOff")]; + }; + }; +}; diff --git a/addons/microdagr/functions/script_component.hpp b/addons/microdagr/functions/script_component.hpp new file mode 100644 index 0000000000..13fbbcf5fe --- /dev/null +++ b/addons/microdagr/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\microdagr\script_component.hpp" \ No newline at end of file diff --git a/addons/microdagr/gui.hpp b/addons/microdagr/gui.hpp new file mode 100644 index 0000000000..2eeb99563c --- /dev/null +++ b/addons/microdagr/gui.hpp @@ -0,0 +1,83 @@ +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 + +class RscActiveText; +class RscText; +class RscPicture; +class RscMapControl { + class hospital; + class church; + class lighthouse; + class power; + class fuelstation; + class transmitter; +}; +class RscMapControlEmpty; +class RscControlsGroupNoScrollbars; +class RscEdit; +class RscButton; +class RscListBox; + + +class GVAR(RscActiveTextPicture): RscActiveText { + style = 48; + colorText[] = {1,1,1,1}; + colorActive[] = {1,1,1,1}; + color[] = {1,1,1,1}; + color2[] = {1,1,1,1}; + colorFocused[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,1}; + colorBackground[] = {1,1,1,1}; + colorBackground2[] = {1,1,1,1}; + colorBackgroundFocused[] = {1,1,1,1}; +}; + +class GVAR(RscText): RscText { + font = "EtelkaMonospacePro"; + //Design note: I think less contrast in font color makes it look more natural and less "eye catching" + colorText[] = {0.75,0.75,0.75,1}; +}; + +//Redfine Scaling for the Dialog +#define X_PART(num) QUOTE((((60 - 25)/2) + (num)) * (safeZoneH / 64) + (safezoneX + (safezoneW - safeZoneH)/2)) +#define Y_PART(num) QUOTE((0 + (num)) * (safeZoneH / 36) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) +#define W_PART(num) QUOTE((num) * (safeZoneH / 64)) +#define H_PART(num) QUOTE((num) * (safeZoneH / 36)) + +class GVAR(TheDialog) { + idd = -1; + movingEnable = 1; + duration = 9999999; + fadein = 0; + fadeout = 0; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(DialogDisplay)),_this select 0)];); + onUnload = QUOTE([] call FUNC(dialogClosedEH)); + + #include "gui_controls.hpp" +}; + + +//Redfine Scaling for the RscTitle +#define PROFILE_X (profilenamespace getvariable ['IGUI_GRID_GPS_X', 0]) +#define PROFILE_Y (profilenamespace getvariable ['IGUI_GRID_GPS_Y', 0]) +#define PROFILE_W (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1]) +#define PROFILE_H ((16/9) * (profilenamespace getvariable ['IGUI_GRID_GPS_W', 1])) + +#define X_PART(num) QUOTE((num) / 25 * PROFILE_W + PROFILE_X) +#define Y_PART(num) QUOTE((num) / 25 * PROFILE_H + PROFILE_Y) +#define W_PART(num) QUOTE((num) / 25 * PROFILE_W) +#define H_PART(num) QUOTE((num) / 25 * PROFILE_H) + +class RscTitles { + class GVAR(TheRscTitleDisplay) { + idd = -1; + movingEnable = 1; + duration = 9999999; + fadein = 0; + fadeout = 0; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RscTitleDisplay)),_this select 0)];); + + #include "gui_controls.hpp" + }; +}; diff --git a/addons/microdagr/gui_controls.hpp b/addons/microdagr/gui_controls.hpp new file mode 100644 index 0000000000..9d73393e08 --- /dev/null +++ b/addons/microdagr/gui_controls.hpp @@ -0,0 +1,771 @@ +class controlsBackground { + class BackgroundBlackScreen: GVAR(RscText) { + idc = -1; + x = X_PART(-1); + y = Y_PART(-1); + //Cover the "seams" and make it bigger + w = W_PART(27); + h = H_PART(27); + colorBackground[] = {0,0,0,1}; + }; + class StatusBarBS: RscPicture { + idc = -1; + text = QUOTE(PATHTOF(images\microDAGR_topBar.paa)); + x = X_PART(0); + y = Y_PART(0); + w = W_PART(25); + h = H_PART(2); + }; + class RangefinderConnectedIcon: RscPicture { + idc = IDC_RANGEFINDERCONNECTEDICON; + text = "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa"; + x = X_PART(6.35); + y = Y_PART(0.1); + w = W_PART(2.7); + h = H_PART(1.8); + }; + class ClockText: GVAR(RscText) { + idc = IDC_CLOCKTEXT; + style = ST_RIGHT; + // text = "12:00"; + x = X_PART(0); + y = Y_PART(0.2); + w = W_PART(15); + h = H_PART(1.8); + sizeEx = H_PART(1.5); + colorText[] = {0,0.67,0.22,1}; + }; + class ClockText2: GVAR(RscText) { + idc = -1; + style = ST_LEFT; + text = "L"; + x = X_PART(14.75); + y = Y_PART(0.2); + w = W_PART(2); + h = H_PART(1.8); + sizeEx = H_PART(1.5); + }; + class MapPlain: RscMapControl { + idc = IDC_MAPPLAIN; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + onDraw = QUOTE(_this call FUNC(mapOnDrawEH)); + onMouseButtonDblClick = QUOTE(_this call FUNC(mapDoubleTapEH)); + onMouseButtonDown = QUOTE(_this call FUNC(mapButtonDownEH)); + + scaleMin = 0.005; + scaleMax = 10; //Lets the mini display zoom out far enough + drawObjects = 0; + text = "#(argb,8,8,3)color(1,1,1,1)"; + maxSatelliteAlpha = 0; + alphaFadeStartScale = 100; + alphaFadeEndScale = 100; + colorSea[] = {0.467,0.631,0.851,0.25}; + colorCountlinesWater[] = {0.491,0.577,0.702,0.3}; + colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6}; + colorGrid[] = {0,0,0,0.15}; + colorGridMap[] = {0,0,0,0.2}; + + //Text sizes: + sizeExLabel = 0; + sizeExGrid = H_PART(0.5); + sizeExUnits = 0; + sizeExNames = H_PART(2); //Marker's Text + sizeExInfo = 0; + sizeExLevel = 0; + sizeEx = H_PART(1); + + ptsPerSquareSea = 5; + ptsPerSquareTxt = 20; + ptsPerSquareRoad = 0.01; + ptsPerSquareObj = 2000; //don't show buildings + ptsPerSquareCLn = 100; + ptsPerSquareCost = 200; + ptsPerSquareFor = 9; + ptsPerSquareForEdge = 9; + + showCountourInterval = 0; + + //Copy style from ace_map's config.cpp: + colorTracks[] = {1.0,0.0,0.0,1}; + colorTracksFill[] = {1.0,1.0,0.0,1}; + colorRoads[] = {0.0,0.0,0.0,1}; + colorRoadsFill[] = {1,1,0,1}; + colorMainRoads[] = {0.0,0.0,0.0,1}; + colorMainRoadsFill[] = {1,0.6,0.4,1}; + colorRailWay[] = {0.8,0.2,0,1}; + + colorBackground[] = {0.929412, 0.929412, 0.929412, 1.0}; + colorOutside[] = {0.929412, 0.929412, 0.929412, 1.0}; + colorCountlines[] = {0.647059, 0.533333, 0.286275, 0.5}; + colorMainCountlines[] = {0.858824, 0, 0,0.5}; + colorForest[] = {0.6, 0.8, 0.2, 0.1}; + colorForestBorder[] = {0,1,0,0.25}; + colorLevels[] = {0.0, 0.0, 0.0, 0.5}; + colorRocks[] = {0.50, 0.50, 0.50, 0}; + }; + class MapDetails: MapPlain { + idc = IDC_MAPDETAILS; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + onDraw = QUOTE(_this call FUNC(mapOnDrawEH)); + onMouseButtonDblClick = QUOTE(_this call FUNC(mapDoubleTapEH)); + onMouseButtonDown = QUOTE(_this call FUNC(mapButtonDownEH)); + + // ptsPerSquareSea = 5; + // ptsPerSquareTxt = 20; + // ptsPerSquareRoad = 0.01; + ptsPerSquareObj = 9; + // ptsPerSquareCLn = 100; + // ptsPerSquareCost = 200; + // ptsPerSquareFor = 9; + // ptsPerSquareForEdge = 9; + + maxSatelliteAlpha = 0.5; + + colorRocks[] = {0.50, 0.50, 0.50, 0.50}; + + class hospital: Hospital {color[] = {0,0,0,0.25};}; + class church: Church {color[] = {0,0,0,0.25};}; + class lighthouse: Lighthouse {color[] = {0,0,0,0.25};}; + class power: power {color[] = {0,0,0,0.25};}; + class fuelstation: Fuelstation {color[] = {0,0,0,0.25};}; + class transmitter: Transmitter {color[] = {0,0,0,0.25};}; + + }; + class MapCompass: RscMapControlEmpty { + idc = IDC_MAPCOMPASS; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + onDraw = QUOTE(_this call FUNC(mapOnDrawEH)); + + colorBackground[] = {0,0,0,1}; + colorOutside[] = {0,0,0,1}; + moveOnEdges = 0; + }; +}; + +class controls { + class TopMenuClick: GVAR(RscActiveTextPicture) { + idc = -1; + text = "#(argb,8,8,3)color(0,0,0,0)"; + x = X_PART(0); + y = Y_PART(0); + w = W_PART(25); + h = H_PART(2); + onbuttonclick = QUOTE([3] call FUNC(saveCurrentAndSetNewMode)); + }; + + //Mode: Display + class ModeDisplay: RscControlsGroupNoScrollbars { + idc = IDC_MODEDISPLAY; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + class Controls { + class MGRSNew: GVAR(RscText) { + idc = -1; + text = "$STR_ACE_microdagr_controlMGRS"; + x = W_PART(0.5); + y = H_PART(0); + w = W_PART(10); + h = H_PART(1); + sizeEx = H_PART(1); + }; + class WGD: GVAR(RscText) { + idc = -1; + style = ST_RIGHT; + text = "$STR_ACE_microdagr_controlWGD"; + x = W_PART(14.5); + y = H_PART(0); + w = W_PART(10); + h = H_PART(1); + sizeEx = H_PART(1); + }; + class UTMGrid: GVAR(RscText) { + idc = IDC_MODEDISPLAY_UTMGRID; + // text = "15T XG"; + x = W_PART(4.5); + y = H_PART(1.5); + w = W_PART(10); + h = H_PART(2); + sizeEx = H_PART(2); + }; + class selfIcon: RscPicture { + idc = -1; + text = QUOTE(PATHTOF(images\icon_self.paa)); + x = W_PART(0.5); + y = H_PART(2); + w = W_PART(4); + h = H_PART(3); + }; + class Easting: GVAR(RscText) { + idc = IDC_MODEDISPLAY_EASTING; + // text = "11994e"; //--- ToDo: Localize; + style = ST_RIGHT; + x = W_PART(14.5); + y = H_PART(1.5); + w = W_PART(10); + h = H_PART(2); + sizeEx = H_PART(2); + }; + class Northing: GVAR(RscText) { + idc = IDC_MODEDISPLAY_NORTHING; + // text = "11994n"; //--- ToDo: Localize; + style = ST_RIGHT; + x = W_PART(14.5); + y = H_PART(3.5); + w = W_PART(10); + h = H_PART(2); + sizeEx = H_PART(2); + }; + class ElevationText: GVAR(RscText) { + idc = -1; + text = "$STR_A3_disp_editor_elevation"; + x = W_PART(0.5); + y = H_PART(6); + w = W_PART(10); + h = H_PART(1.5); + sizeEx = H_PART(1.25); + }; + class ElevationNum: GVAR(RscText) { + idc = IDC_MODEDISPLAY_ELEVATIONNUM; + // text = "+000232 MSL"; //--- ToDo: Localize; + style = ST_RIGHT; + x = W_PART(12); + y = H_PART(6); + w = W_PART(12.5); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class RscPicture_1201: RscPicture { + idc = -1; + text = "#(argb,8,8,3)color(1,1,1,0.75)"; + x = W_PART(0.5); + y = H_PART(8.115); + w = W_PART(24); + h = H_PART(0.05); + }; + class CompasIcon: RscPicture { + idc = -1; + text = QUOTE(PATHTOF(images\icon_infoCompass.paa)); + x = W_PART(0.5); + y = H_PART(8.5); + w = W_PART(2); + h = H_PART(1.5); + }; + class HeadingNum: GVAR(RscText) { + idc = IDC_MODEDISPLAY_HEADINGNUM; + // text = "097.2oM"; //--- ToDo: Localize; + x = W_PART(4); + y = H_PART(8.5); + w = W_PART(10); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class SpeedNum: GVAR(RscText) { + idc = IDC_MODEDISPLAY_SPEEDNUM; + // text = "34kph"; //--- ToDo: Localize; + style = ST_RIGHT; + x = W_PART(14.5); + y = H_PART(8.5); + w = W_PART(7.5); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class RscPicture_1204: RscPicture { + idc = -1; + text = "#(argb,8,8,3)color(1,1,1,0.75)"; + x = W_PART(0.5); + y = H_PART(10.45); + w = W_PART(24); + h = H_PART(0.05); + }; + class modePosTimeCG: RscControlsGroupNoScrollbars { + idc = IDC_MODEDISPLAY_MODEPOSTIMECG; + x = W_PART(0); + y = H_PART(10.5); + w = W_PART(25); + h = H_PART(8.5); + class controls { + class TimeIcon: RscPicture { + idc = -1; + text = QUOTE(PATHTOF(images\icon_infoClock.paa)); + x = W_PART(0.5); + y = H_PART(3.5); + w = W_PART(2); + h = H_PART(1.5); + }; + class TimeDisplayGreen1: GVAR(RscText) { + idc = IDC_MODEDISPLAY_TIMEDISPLAYGREEN1; + x = W_PART(5); + y = H_PART(2.75); + w = W_PART(15); + h = H_PART(1.5); + style = ST_CENTER; + sizeEx = H_PART(1.5); + colorText[] = {0,0.67,0.22,1}; + }; + class TimeDisplayGreen2: TimeDisplayGreen1 { + idc = IDC_MODEDISPLAY_TIMEDISPLAYGREEN2; + y = H_PART(4.25); + }; + }; + }; + class modePosTargetCG: RscControlsGroupNoScrollbars { + idc = IDC_MODEDISPLAY_MODEPOSTARGETCG; + x = W_PART(0); + y = H_PART(10.5); + w = W_PART(25); + h = H_PART(8.5); + class controls { + class TargetIcon: RscPicture { + idc = IDC_MODEDISPLAY_TARGETICON; + text = QUOTE(PATHTOF(images\icon_menuMark.paa)); + x = W_PART(0.5); + y = H_PART(0.5); + w = W_PART(2); + h = H_PART(1.5); + }; + class TrackNum: GVAR(RscText) { + idc = IDC_MODEDISPLAY_TRACKNUM; + // text = "097.2oM"; //--- ToDo: Localize; + x = W_PART(4); + y = H_PART(0.5); + w = W_PART(10); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class TargetRangeText: GVAR(RscText) { + idc = -1; + text = "$STR_ACE_microdagr_controlRange"; + x = W_PART(0.5); + y = H_PART(2); + w = W_PART(7.5); + h = H_PART(1.5); + sizeEx = H_PART(1.25); + }; + class TargetRangeNum: GVAR(RscText) { + idc = IDC_MODEDISPLAY_TARGETRANGENUM; + // text = "1250 m"; + style = ST_RIGHT; + x = W_PART(14.5); + y = H_PART(2); + w = W_PART(10); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class TargetElevationText: GVAR(RscText) { + idc = -1; + text = "$STR_A3_disp_editor_elevation"; //--- ToDo: Localize; + x = W_PART(0.5); + y = H_PART(3.5); + w = W_PART(10); + h = H_PART(1.5); + sizeEx = H_PART(1.25); + }; + class TargetElevationNum: GVAR(RscText) { + idc = IDC_MODEDISPLAY_TARGETELEVATIONNUM; + // text = "+000232 MSL"; //--- ToDo: Localize; + style = ST_RIGHT; + x = W_PART(12); + y = H_PART(3.5); + w = W_PART(12.5); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class TargetName: GVAR(RscText) { + idc = IDC_MODEDISPLAY_TARGETNAME; + // text = "43243 33432"; //--- ToDo: Localize; + style = ST_CENTER; + x = W_PART(1); + y = H_PART(5.5); + w = W_PART(23); + h = H_PART(2); + sizeEx = H_PART(2); + }; + }; + }; + }; + }; + + //Mode: Compass + class ModeCompass: RscControlsGroupNoScrollbars { + idc = IDC_MODECOMPASS; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + class Controls { + + class CompassHeader: GVAR(RscText) { + idc = -1; + style = ST_CENTER; + text = "$STR_ACE_microdagr_compasDirection"; + x = W_PART(0); + y = H_PART(0); + w = W_PART(25); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + }; + class CompassHeading: GVAR(RscText) { + idc = IDC_MODECOMPASS_HEADING; + style = ST_LEFT; + x = W_PART(0); + y = H_PART(1.5); + w = W_PART(25); + h = H_PART(1.25); + sizeEx = H_PART(1.25); + colorText[] = {0.533,0.769,0.76,1}; + }; + class CompassSpeed: CompassHeading { + idc = IDC_MODECOMPASS_SPEED; + style = ST_RIGHT; + }; + class CompassBearing: CompassHeading { + idc = IDC_MODECOMPASS_BEARING; + y = H_PART(16.25); + style = ST_LEFT; + colorText[] = {1,0.564,0.564,1}; + }; + class CompassRange: CompassHeading { + idc = IDC_MODECOMPASS_RANGE; + y = H_PART(16.25); + style = ST_RIGHT; + colorText[] = {1,0.564,0.564,1}; + }; + class CompassTARGET: CompassHeader { + idc = IDC_MODECOMPASS_TARGET; + y = H_PART(17.5); + }; + }; + }; + + + //Mode: Map + class mapTrackButton: GVAR(RscActiveTextPicture) { + onbuttonclick = QUOTE(['autotrack'] call FUNC(modeMapButtons)); + idc = IDC_MODEMAP_MAPTRACKBUTTON; + text = QUOTE(PATHTOF(images\icon_mapTrack.paa)); + x = X_PART(11); + y = Y_PART(18.75); + w = W_PART(3); + h = H_PART(2.25); + }; + class mapZoomIn: mapTrackButton { + onbuttonclick = QUOTE(['zoomin'] call FUNC(modeMapButtons)); + idc = IDC_MODEMAP_MAPZOOMIN; + text = QUOTE(PATHTOF(images\icon_mapPlus.paa)); + color[] = {1,1,1,0.4}; + x = X_PART(4); + }; + class mapZoomOut: mapTrackButton { + onbuttonclick = QUOTE(['zoomout'] call FUNC(modeMapButtons)); + idc = IDC_MODEMAP_MAPZOOMOUT; + text = QUOTE(PATHTOF(images\icon_mapMinus.paa)); + color[] = {1,1,1,0.4}; + x = X_PART(18); + }; + + + // Mode: Menu + class ModeMenu: RscControlsGroupNoScrollbars { + idc = IDC_MODEMENU; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + class Controls { + class ButtonTL: GVAR(RscActiveTextPicture) { + idc = -1; + text = QUOTE(PATHTOF(images\icon_menuMark.paa)); + x = W_PART(3); + y = H_PART(1.5); + w = W_PART(8); + h = H_PART(6); + onbuttonclick = QUOTE([4] call FUNC(saveCurrentAndSetNewMode)); + }; + class ButtonTR: ButtonTL { + text = QUOTE(PATHTOF(images\icon_menuWaypoints.paa)); + x = W_PART(14); + y = H_PART(1.5); + onbuttonclick = QUOTE([5] call FUNC(saveCurrentAndSetNewMode)); + }; + class ButtonBL: ButtonTL { + text = "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa"; + x = W_PART(3); + y = H_PART(10.5); + onbuttonclick = QUOTE(_this call FUNC(appMenuButtonConnectRangefinder)); + }; + class ButtonBR: ButtonTL { + text = QUOTE(PATHTOF(images\icon_menuSettings.paa)); + x = W_PART(14); + y = H_PART(10.5); + onbuttonclick = QUOTE([6] call FUNC(saveCurrentAndSetNewMode)); + }; + class TextTL: GVAR(RscText) { + idc = -1; + style = ST_CENTER; + text = "$STR_ACE_microdagr_menuMark"; + x = W_PART(0); + y = H_PART(7.5); + w = W_PART(14); + h = H_PART(1.2); + sizeEx = H_PART(1.2); + }; + class TextTR: TextTL { + text = "$STR_ACE_microdagr_menuWaypoints"; + x = W_PART(11); + y = H_PART(7.5); + }; + class TextBL: TextTL { + text = "$STR_ACE_microdagr_menuConnectTo"; + x = W_PART(0); + y = H_PART(16.5); + }; + class TextBR: TextTL { + text = "$STR_ACE_microdagr_menuSettings"; + x = W_PART(11); + y = H_PART(16.5); + }; + }; + }; + + // Mode: Mark + class ModeMark: RscControlsGroupNoScrollbars { + idc = IDC_MODEMARK; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + class Controls { + class InfoText: GVAR(RscText) { + idc = IDC_MODEMARK_HEADER; + x = W_PART(3); + y = H_PART(1); + w = W_PART(19); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + colorText[] = {0.95,0.95,0.95,1}; + }; + class RscEdit_1400: RscEdit { + idc = IDC_MODEMARK_CORDSEDIT; + x = W_PART(3); + y = H_PART(2.75); + w = W_PART(17); + h = H_PART(1.5); + size = H_PART(1.5); + sizeEx = H_PART(1.5); + colorText[] = {0.95,0.95,0.95,1}; + font = "EtelkaMonospacePro"; + }; + class DeleteButton: GVAR(RscActiveTextPicture) { + idc = -1; + text = QUOTE(PATHTOF(images\icon_deleteButton.paa)); + x = W_PART(20); + y = H_PART(2.75); + w = W_PART(2); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + onbuttonclick = QUOTE(['del'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad1: RscButton { + idc = -1; + text = "1"; + x = W_PART(3); + y = H_PART(5); + w = W_PART(6); + h = H_PART(3); + sizeEx = H_PART(3); + colorText[] = {0.95,0.95,0.95,1}; + colorBackground[] = {0.3,0.3,0.3,1}; + colorBackgroundDisabled[] = {0.3,0.3,0.3,1}; + colorBackgroundActive[] = {0.3,0.3,0.3,1}; + colorFocused[] = {0.3,0.3,0.3,1}; + onbuttonclick = QUOTE(['1'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad2: Keypad1 { + text = "2"; + x = W_PART(9.5); + onbuttonclick = QUOTE(['2'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad3: Keypad1 { + text = "3"; + x = W_PART(16); + onbuttonclick = QUOTE(['3'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad4: Keypad1 { + text = "4"; + x = W_PART(3); + y = H_PART(8.5); + onbuttonclick = QUOTE(['4'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad5: Keypad4 { + text = "5"; + x = W_PART(9.5); + onbuttonclick = QUOTE(['5'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad6: Keypad4 { + text = "6"; + x = W_PART(16); + onbuttonclick = QUOTE(['6'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad7: Keypad1 { + text = "7"; + x = W_PART(3); + y = H_PART(12); + onbuttonclick = QUOTE(['7'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad8: Keypad7 { + text = "8"; + x = W_PART(9.5); + onbuttonclick = QUOTE(['8'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad9: Keypad7 { + text = "9"; + x = W_PART(16); + onbuttonclick = QUOTE(['9'] call FUNC(appMarkKeypadEntry)); + }; + class Keypad0: Keypad1 { + text = "0"; + x = W_PART(3); + y = H_PART(15.5); + w = W_PART(12.5); + onbuttonclick = QUOTE(['0'] call FUNC(appMarkKeypadEntry)); + }; + class KeypadEnter: Keypad1 { + text = "OK"; + x = W_PART(16); + y = H_PART(15.5); + onbuttonclick = QUOTE(['ok'] call FUNC(appMarkKeypadEntry)); + }; + }; + }; + + // Mode: Waypoints + class ModeWaypoints: RscControlsGroupNoScrollbars { + idc = IDC_MODEWAYPOINTS; + x = X_PART(0); + y = Y_PART(2); + w = W_PART(25); + h = H_PART(19); + class Controls { + class ListOfWaypoints: RscListBox { + idc = IDC_MODEWAYPOINTS_LISTOFWAYPOINTS; + sizeEx = H_PART(1.5); + sizeEx2 = H_PART(1.5); + rowHeight = H_PART(1.75); + colorText[] = {0.75,0.75,0.75,1}; + colorSelect[] = {0.75,0.75,0.75,1}; + colorSelect2[] = {0.75,0.75,0.75,1}; + colorBackground[] = {0,0,0,1}; + colorSelectBackground[] = {0.3,0.3,0.3,1}; + colorSelectBackground2[] = {0.3,0.3,0.3,1}; + + itemSpacing = 0.001; + x = W_PART(0.2); + y = H_PART(0.5); + w = W_PART(24.6); + h = H_PART(16.5); + }; + + class ButtonSetWP: RscButton { + idc = -1; + text = "$STR_ACE_microdagr_waypointsSet"; + x = W_PART(1); + y = H_PART(17); + w = W_PART(7); + h = H_PART(1.5); + sizeEx = H_PART(1.5); + font = "EtelkaMonospacePro"; + colorText[] = {0.95,0.95,0.95,1}; + colorBackground[] = {0.3,0.3,0.3,1}; + colorBackgroundDisabled[] = {0.3,0.3,0.3,1}; + colorBackgroundActive[] = {0.3,0.3,0.3,1}; + colorFocused[] = {0.3,0.3,0.3,1}; + onbuttonclick = QUOTE(_this call FUNC(appWaypointsButtonSetWP)); + }; + class ButtonAdd: ButtonSetWP { + text = "$STR_ACE_microdagr_waypointsAdd"; + x = W_PART(9); + onbuttonclick = QUOTE([APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode)); + }; + class ButtonDelete: ButtonSetWP { + text = "$STR_ACE_microdagr_waypointsDelete"; + x = W_PART(17); + onbuttonclick = QUOTE(_this call FUNC(appWaypointsButtonDeleteWP)); + }; + }; + }; + + class SettingsMenu: RscListBox { + idc = IDC_MODESETTINGS; + x = X_PART(0.2); + y = Y_PART(2); + w = W_PART(24.6); + h = H_PART(19); + onLBDblClick = QUOTE(_this call FUNC(appSettingsLBClick)); + sizeEx = H_PART(1.5); + sizeEx2 = H_PART(1.5); + rowHeight = H_PART(1.75); + itemSpacing = 0.001; + colorText[] = {0.75,0.75,0.75,1}; + colorSelect[] = {0.75,0.75,0.75,1}; + colorSelect2[] = {0.75,0.75,0.75,1}; + colorBackground[] = {0.05,0.05,0.05,1}; + colorSelectBackground[] = {0.05,0.05,0.05,1}; + colorSelectBackground2[] = {0.05,0.05,0.05,1}; + }; + + class ButtonBG0: RscPicture { + idc = IDC_BUTTONBG0; + text = QUOTE(PATHTOF(images\button_pushedDown.paa)); + x = X_PART(0 * (25/3)); + y = Y_PART(21); + w = W_PART((25/3)); + h = H_PART(4); + }; + class ButtonBG1: ButtonBG0 { + idc = IDC_BUTTONBG1; + x = X_PART(1 * (25/3)); + }; + class ButtonBG2: ButtonBG0 { + idc = IDC_BUTTONBG2; + x = X_PART(2 * (25/3)); + }; + class ButtonIcon0: GVAR(RscActiveTextPicture) { + idc = -1; + text = QUOTE(PATHTOF(images\icon_info.paa)); + x = X_PART(0 * (25/3)); + y = Y_PART(21); + w = W_PART((25/3)); + h = H_PART(4); + onbuttonclick = QUOTE([APP_MODE_INFODISPLAY] call FUNC(saveCurrentAndSetNewMode)); + }; + class ButtonIcon1: ButtonIcon0 { + text = QUOTE(PATHTOF(images\icon_compass.paa)); + x = X_PART(1 * (25/3)); + onbuttonclick = QUOTE([APP_MODE_COMPASS] call FUNC(saveCurrentAndSetNewMode)); + }; + class ButtonIcon2: ButtonIcon0 { + text = QUOTE(PATHTOF(images\icon_map.paa)); + x = X_PART(2 * (25/3)); + onbuttonclick = QUOTE([APP_MODE_MAP] call FUNC(saveCurrentAndSetNewMode)); + }; + //At the end: The Big Shell overlay + class MicroDagrShell: RscPicture { + idc = IDC_MICRODAGRSHELL; + text = QUOTE(PATHTOF(images\microDAGR_shellPicture.paa)); + x = X_PART(-14.77); + y = Y_PART(-5.875); + w = W_PART(53.62); + h = H_PART(39.9); + }; +}; diff --git a/addons/microdagr/images/button_pushedDown.paa b/addons/microdagr/images/button_pushedDown.paa new file mode 100644 index 0000000000..fc519a3235 Binary files /dev/null and b/addons/microdagr/images/button_pushedDown.paa differ diff --git a/addons/microdagr/images/button_pushedUp.paa b/addons/microdagr/images/button_pushedUp.paa new file mode 100644 index 0000000000..5aa18986be Binary files /dev/null and b/addons/microdagr/images/button_pushedUp.paa differ diff --git a/addons/microdagr/images/compass_needle.paa b/addons/microdagr/images/compass_needle.paa new file mode 100644 index 0000000000..048518c8ad Binary files /dev/null and b/addons/microdagr/images/compass_needle.paa differ diff --git a/addons/microdagr/images/compass_starInverted.paa b/addons/microdagr/images/compass_starInverted.paa new file mode 100644 index 0000000000..cc911848e3 Binary files /dev/null and b/addons/microdagr/images/compass_starInverted.paa differ diff --git a/addons/microdagr/images/icon_compass.paa b/addons/microdagr/images/icon_compass.paa new file mode 100644 index 0000000000..777eaffde4 Binary files /dev/null and b/addons/microdagr/images/icon_compass.paa differ diff --git a/addons/microdagr/images/icon_deleteButton.paa b/addons/microdagr/images/icon_deleteButton.paa new file mode 100644 index 0000000000..a1af618ea7 Binary files /dev/null and b/addons/microdagr/images/icon_deleteButton.paa differ diff --git a/addons/microdagr/images/icon_info.paa b/addons/microdagr/images/icon_info.paa new file mode 100644 index 0000000000..5dc94a444c Binary files /dev/null and b/addons/microdagr/images/icon_info.paa differ diff --git a/addons/microdagr/images/icon_infoClock.paa b/addons/microdagr/images/icon_infoClock.paa new file mode 100644 index 0000000000..292cf29afb Binary files /dev/null and b/addons/microdagr/images/icon_infoClock.paa differ diff --git a/addons/microdagr/images/icon_infoCompass.paa b/addons/microdagr/images/icon_infoCompass.paa new file mode 100644 index 0000000000..8390a24509 Binary files /dev/null and b/addons/microdagr/images/icon_infoCompass.paa differ diff --git a/addons/microdagr/images/icon_map.paa b/addons/microdagr/images/icon_map.paa new file mode 100644 index 0000000000..52c3931c68 Binary files /dev/null and b/addons/microdagr/images/icon_map.paa differ diff --git a/addons/microdagr/images/icon_mapMinus.paa b/addons/microdagr/images/icon_mapMinus.paa new file mode 100644 index 0000000000..8c9be4fb7d Binary files /dev/null and b/addons/microdagr/images/icon_mapMinus.paa differ diff --git a/addons/microdagr/images/icon_mapPlus.paa b/addons/microdagr/images/icon_mapPlus.paa new file mode 100644 index 0000000000..5272bce099 Binary files /dev/null and b/addons/microdagr/images/icon_mapPlus.paa differ diff --git a/addons/microdagr/images/icon_mapTrack.paa b/addons/microdagr/images/icon_mapTrack.paa new file mode 100644 index 0000000000..f16ccbfe86 Binary files /dev/null and b/addons/microdagr/images/icon_mapTrack.paa differ diff --git a/addons/microdagr/images/icon_mapWaypoints.paa b/addons/microdagr/images/icon_mapWaypoints.paa new file mode 100644 index 0000000000..89f167f4c1 Binary files /dev/null and b/addons/microdagr/images/icon_mapWaypoints.paa differ diff --git a/addons/microdagr/images/icon_menuMark.paa b/addons/microdagr/images/icon_menuMark.paa new file mode 100644 index 0000000000..2c77aac04b Binary files /dev/null and b/addons/microdagr/images/icon_menuMark.paa differ diff --git a/addons/microdagr/images/icon_menuSettings.paa b/addons/microdagr/images/icon_menuSettings.paa new file mode 100644 index 0000000000..cfb340247e Binary files /dev/null and b/addons/microdagr/images/icon_menuSettings.paa differ diff --git a/addons/microdagr/images/icon_menuWaypoints.paa b/addons/microdagr/images/icon_menuWaypoints.paa new file mode 100644 index 0000000000..74ca3a59c1 Binary files /dev/null and b/addons/microdagr/images/icon_menuWaypoints.paa differ diff --git a/addons/microdagr/images/icon_self.paa b/addons/microdagr/images/icon_self.paa new file mode 100644 index 0000000000..79c41eaa69 Binary files /dev/null and b/addons/microdagr/images/icon_self.paa differ diff --git a/addons/microdagr/images/microDAGR_item.paa b/addons/microdagr/images/microDAGR_item.paa new file mode 100644 index 0000000000..ce6336c8a6 Binary files /dev/null and b/addons/microdagr/images/microDAGR_item.paa differ diff --git a/addons/microdagr/images/microDAGR_shellPicture.paa b/addons/microdagr/images/microDAGR_shellPicture.paa new file mode 100644 index 0000000000..93a14c3c11 Binary files /dev/null and b/addons/microdagr/images/microDAGR_shellPicture.paa differ diff --git a/addons/microdagr/images/microDAGR_topBar.paa b/addons/microdagr/images/microDAGR_topBar.paa new file mode 100644 index 0000000000..c4c28307f0 Binary files /dev/null and b/addons/microdagr/images/microDAGR_topBar.paa differ diff --git a/addons/microdagr/readme.md b/addons/microdagr/readme.md new file mode 100644 index 0000000000..f2dc25a656 --- /dev/null +++ b/addons/microdagr/readme.md @@ -0,0 +1,24 @@ +ace_microdagr +=============== + +Adds a microDAGR infentry GPS device. +Press home to open. Then home again to toggle an interactive version. Press CTRL+Home to close. +Info/Compass/Minimap modes are selectable by the bottom buttons. Tap the top bar to open the menu and access Mark/Waypoints/Connect To/Settings modes. +Tap the minimap button again to toggle map modes (if available). +Enter waypoints from the menu or double tapping on the minimap. +Can interface with the `ace_vector`. Hold Azimuth+Range and release (see page 14 of vector's manual) + +#### Items Added: + +`ACE_microDAGR` + +## For Mission Makers: + +#### Modules: +* MicroDAGR Map Fill - Controls the amount of map data avaialbe for the minimap. Can limit to just roads/topographical or disable entirely. + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/microdagr/script_component.hpp b/addons/microdagr/script_component.hpp new file mode 100644 index 0000000000..72c5c125bc --- /dev/null +++ b/addons/microdagr/script_component.hpp @@ -0,0 +1,83 @@ +#define COMPONENT microdagr +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MICRODAGR + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MICRODAGR + #define DEBUG_SETTINGS DEBUG_SETTINGS_MICRODAGR +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define DUMMY_POS [-1,-1] +#define DUMMY_ZOOM 0.1 + +#define MAP_DETAIL_NONE 0 +#define MAP_DETAIL_TOPOROADS 1 +#define MAP_DETAIL_SAT 2 + +#define APP_MODE_NULL -1 +#define APP_MODE_INFODISPLAY 0 +#define APP_MODE_COMPASS 1 +#define APP_MODE_MAP 2 +#define APP_MODE_MENU 3 +#define APP_MODE_MARK 4 +#define APP_MODE_WAYPOINTS 5 +#define APP_MODE_SETUP 6 + +#define DISPLAY_MODE_CLOSED 0 +#define DISPLAY_MODE_DISPLAY 1 +#define DISPLAY_MODE_DIALOG 2 +#define DISPLAY_MODE_HIDDEN 3 + +#define IDC_RANGEFINDERCONNECTEDICON 77700 +#define IDC_CLOCKTEXT 77701 +#define IDC_MAPPLAIN 77702 +#define IDC_MAPDETAILS 77703 +#define IDC_MAPCOMPASS 77704 + +#define IDC_MODEDISPLAY 144000 +#define IDC_MODEDISPLAY_UTMGRID 144001 +#define IDC_MODEDISPLAY_EASTING 144002 +#define IDC_MODEDISPLAY_NORTHING 144003 +#define IDC_MODEDISPLAY_ELEVATIONNUM 144004 +#define IDC_MODEDISPLAY_HEADINGNUM 144005 +#define IDC_MODEDISPLAY_SPEEDNUM 144006 +#define IDC_MODEDISPLAY_MODEPOSTIMECG 144010 +#define IDC_MODEDISPLAY_TIMEDISPLAYGREEN1 144011 +#define IDC_MODEDISPLAY_TIMEDISPLAYGREEN2 144012 +#define IDC_MODEDISPLAY_MODEPOSTARGETCG 144020 +#define IDC_MODEDISPLAY_TARGETICON 144021 +#define IDC_MODEDISPLAY_TRACKNUM 144022 +#define IDC_MODEDISPLAY_TARGETRANGENUM 144023 +#define IDC_MODEDISPLAY_TARGETELEVATIONNUM 144024 +#define IDC_MODEDISPLAY_TARGETNAME 144025 + +#define IDC_MODECOMPASS 144100 +#define IDC_MODECOMPASS_HEADING 144110 +#define IDC_MODECOMPASS_SPEED 144111 +#define IDC_MODECOMPASS_BEARING 144112 +#define IDC_MODECOMPASS_RANGE 144113 +#define IDC_MODECOMPASS_TARGET 144114 + +#define IDC_MODEMAP_MAPTRACKBUTTON 144211 +#define IDC_MODEMAP_MAPZOOMIN 144212 +#define IDC_MODEMAP_MAPZOOMOUT 144213 + +#define IDC_MODEMENU 144300 + +#define IDC_MODEMARK 144400 +#define IDC_MODEMARK_HEADER 144411 +#define IDC_MODEMARK_CORDSEDIT 144412 + +#define IDC_MODEWAYPOINTS 144500 +#define IDC_MODEWAYPOINTS_LISTOFWAYPOINTS 144501 + +#define IDC_MODESETTINGS 144600 + +#define IDC_BUTTONBG0 77710 +#define IDC_BUTTONBG1 77711 +#define IDC_BUTTONBG2 77712 +#define IDC_MICRODAGRSHELL 77713 diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml new file mode 100644 index 0000000000..772a7a172f --- /dev/null +++ b/addons/microdagr/stringtable.xml @@ -0,0 +1,109 @@ + + + + + + MicroDAGR GPS + + + MicroDAGR advanced GPS receiver + + + Angular Unit: + + + Mils + + + Show Waypoints On Map: + + + Degrees + + + On + Zapnuto + Oui + Ein + Sì + WÅ‚. + Ativar + Вкл. + Sí + + + Off + Vypnuto + Non + Aus + No + WyÅ‚. + Desativar + Выкл. + No + + + Enter Grid Cords: + + + Name of [%1] + + + MGRS-New + + + WGD + + + Range: + Reichweite: + + + Compass Direction + + + Mark + + + Waypoints + Wegpunkte + + + Connect To + + + Settings + Einstellungen + Configuración + + + SetWP + + + Add + + + Delete + Smazat + Supprimer + Löschen + Elimina + UsuÅ„ + Excluir + Удалить + Suprimir + + + Toggle MicroDAGR Display Mode + + + Show MicoDAGR + + + Configure MicroDAGR + + + Close MicroDAGR + + + \ No newline at end of file diff --git a/addons/missionmodules/CfgVehicles.hpp b/addons/missionmodules/CfgVehicles.hpp index 92c379efb2..a38d651c75 100644 --- a/addons/missionmodules/CfgVehicles.hpp +++ b/addons/missionmodules/CfgVehicles.hpp @@ -9,13 +9,13 @@ class CfgVehicles { class ACE_moduleAmbianceSound: Module_F { scope = 2; displayName = "Ambiance Sounds [ACE]"; - icon = QUOTE(PATHTOF(data\moduleSound.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Ambient_Sounds_ca.paa)); category = "ACE_missionModules"; function = QUOTE(FUNC(moduleAmbianceSound)); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; - author = "Glowbal"; + author = "$STR_ACE_Common_ACETeam"; class Arguments { class soundFiles { displayName = "Sounds"; diff --git a/addons/missionmodules/UI/Icon_Module_Ambient_Sounds_ca.paa b/addons/missionmodules/UI/Icon_Module_Ambient_Sounds_ca.paa new file mode 100644 index 0000000000..6a385839d7 Binary files /dev/null and b/addons/missionmodules/UI/Icon_Module_Ambient_Sounds_ca.paa differ diff --git a/addons/missionmodules/data/moduleSound.paa b/addons/missionmodules/data/moduleSound.paa deleted file mode 100644 index bfe3b80327..0000000000 Binary files a/addons/missionmodules/data/moduleSound.paa and /dev/null differ diff --git a/addons/modules/$PBOPREFIX$ b/addons/modules/$PBOPREFIX$ new file mode 100644 index 0000000000..4660d73776 --- /dev/null +++ b/addons/modules/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\modules \ No newline at end of file diff --git a/addons/modules/CfgEventHandlers.hpp b/addons/modules/CfgEventHandlers.hpp new file mode 100644 index 0000000000..82d1c55d10 --- /dev/null +++ b/addons/modules/CfgEventHandlers.hpp @@ -0,0 +1,13 @@ + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + + +class Extended_PostInit_EventHandlers { + class _ACE_modules { // using a _ so it is the first postInit to be executed + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf new file mode 100644 index 0000000000..b6aecf5f90 --- /dev/null +++ b/addons/modules/XEH_postInit.sqf @@ -0,0 +1,44 @@ + +#include "script_component.hpp" + +// TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it. +// We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution. +{ + [_x] call { + private ["_logic", "_logicType", "_config", "_isGlobal", "_isDisposable", "_isPersistent","_function"]; + _logic = _this select 0; + _logicType = typeof _logic; + _logic hideobject true; + + if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; + _config = (configFile >> "CfgVehicles" >> _logicType); + if !(isClass _config) exitwith {}; + + // isGlobal = 1; + _isGlobal = getNumber (_config >> "isGlobal") > 0; + _isDisposable = getNumber (_config >> "isDisposable") > 0; + _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; + _function = getText (_config >> "function"); + if (isnil _function) then { + _function = compile _function; + } else { + _function = missionNamespace getvariable _function; + }; + + if (_isGlobal) then { + [_logic, [], true] call _function; + } else { + if (isServer) then { + [_logic, [], true] call _function; + }; + }; + + if !(_isPersistent) then { + _logic setvariable [QGVAR(initalized), true]; + }; + + if (_isDisposable) then { + deleteVehicle _logic; + }; + }; +}foreach GVAR(moduleInitCollection); diff --git a/addons/modules/XEH_preInit.sqf b/addons/modules/XEH_preInit.sqf new file mode 100644 index 0000000000..a8b9bd061e --- /dev/null +++ b/addons/modules/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(moduleInit); +GVAR(moduleInitCollection) = []; + +ADDON = true; diff --git a/addons/modules/config.cpp b/addons/modules/config.cpp new file mode 100644 index 0000000000..bffcec4faf --- /dev/null +++ b/addons/modules/config.cpp @@ -0,0 +1,28 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Glowbal"}; + authorUrl = ""; + VERSION_CONFIG; + }; +}; + +class CfgVehicles { + class Logic; + class Module_F: Logic { + class ArgumentsBaseUnits { + }; + }; + class ACE_Module: Module_F { + class EventHandlers { + init = QUOTE(_this call DFUNC(moduleInit)); + }; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/modules/functions/fnc_moduleInit.sqf b/addons/modules/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..30d8046d81 --- /dev/null +++ b/addons/modules/functions/fnc_moduleInit.sqf @@ -0,0 +1,19 @@ +/* + * Author: Glowbal + * IV Treatment local callback + * + * Arguments: + * 0: The logic object + * + * + * Return Value: + * nil + * + * Public: No + */ + +#include "script_component.hpp" + +if ((_this select 0) isKindOf "Module_F") then { + GVAR(moduleInitCollection) pushback (_this select 0); +}; diff --git a/addons/modules/functions/script_component.hpp b/addons/modules/functions/script_component.hpp new file mode 100644 index 0000000000..ffd50bc09b --- /dev/null +++ b/addons/modules/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\modules\script_component.hpp" diff --git a/addons/modules/script_component.hpp b/addons/modules/script_component.hpp new file mode 100644 index 0000000000..807540960b --- /dev/null +++ b/addons/modules/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT modules +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MODULES + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MODULES + #define DEBUG_SETTINGS DEBUG_SETTINGS_MODULES +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index d61c761bfc..ec005c8218 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { function = QFUNC(moduleNameTags); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(UI\IconNameTags_ca.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_NameTags_ca.paa)); class Arguments { class PlayerNamesViewDistance { displayName = "Player Names View Dist."; diff --git a/addons/nametags/UI/IconNameTags_ca.paa b/addons/nametags/UI/IconNameTags_ca.paa deleted file mode 100644 index a6c50e22b9..0000000000 Binary files a/addons/nametags/UI/IconNameTags_ca.paa and /dev/null differ diff --git a/addons/nametags/UI/Icon_Module_NameTags_ca.paa b/addons/nametags/UI/Icon_Module_NameTags_ca.paa new file mode 100644 index 0000000000..3f2d7f08b1 Binary files /dev/null and b/addons/nametags/UI/Icon_Module_NameTags_ca.paa differ diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index 47a176b1dd..ab3cd03391 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by commy2 and CAA-Picard +// by commy2 and esteldunedain #include "script_component.hpp" [] call FUNC(initIsSpeaking); diff --git a/addons/nametags/config.cpp b/addons/nametags/config.cpp index 25992c0174..42c970b1e9 100644 --- a/addons/nametags/config.cpp +++ b/addons/nametags/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_main", "ace_common", "ace_interaction" }; - author[] = { "commy2", "CAA-Picard" }; + author[] = { "commy2", "esteldunedain" }; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; @@ -46,7 +46,7 @@ class ACE_Settings { typeName = "BOOL"; isClientSetable = 1; displayName = "$STR_ACE_NameTags_ShowNamesForAI"; - }; + }; class GVAR(showCursorTagForVehicles) { value = 0; typeName = "BOOL"; diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index 8ccbfc9b4a..f0a9bb89d4 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2, CAA-Picard + * Author: commy2, esteldunedain * * Draw the nametag and rank icon. * diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index a998e5d8a3..6050b99c67 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Initializes the name tags module. * diff --git a/addons/nightvision/functions/fnc_updatePPEffects.sqf b/addons/nightvision/functions/fnc_updatePPEffects.sqf index 3edfe28e74..a90186fe10 100644 --- a/addons/nightvision/functions/fnc_updatePPEffects.sqf +++ b/addons/nightvision/functions/fnc_updatePPEffects.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2, PabstMirror and CAA-Picard + * Author: commy2, PabstMirror and esteldunedain * Update the ppEffects everytime something changes * * Arguments: diff --git a/addons/noidle/$PBOPREFIX$ b/addons/noidle/$PBOPREFIX$ new file mode 100644 index 0000000000..e2dfb2cad3 --- /dev/null +++ b/addons/noidle/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\noidle \ No newline at end of file diff --git a/addons/noidle/CfgMoves.hpp b/addons/noidle/CfgMoves.hpp new file mode 100644 index 0000000000..1b8848ff00 --- /dev/null +++ b/addons/noidle/CfgMoves.hpp @@ -0,0 +1,35 @@ + +class CfgMovesBasic { + class StandBase; +}; + +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + // rifle + class AmovPercMstpSlowWrflDnon: StandBase { + variantsPlayer[] = {/*"AidlPercMstpSlowWrflDnon_G01",0.5,"AidlPercMstpSlowWrflDnon_G02",0.125,"AidlPercMstpSlowWrflDnon_G03",0.125,"AidlPercMstpSlowWrflDnon_G04",0.125,"AidlPercMstpSlowWrflDnon_G05",0.125*/}; + }; + class AmovPknlMstpSlowWrflDnon: AmovPercMstpSlowWrflDnon { + variantsPlayer[] = {/*"AidlPknlMstpSlowWrflDnon_G01",0.25,"AidlPknlMstpSlowWrflDnon_G02",0.25,"AidlPknlMstpSlowWrflDnon_G03",0.25*/}; + }; + + // pistol + class AmovPercMstpSrasWpstDnon; + class AmovPercMstpSlowWpstDnon: AmovPercMstpSrasWpstDnon { + variantsPlayer[] = {/*"AidlPercMstpSlowWpstDnon_G01",0.333,"AidlPercMstpSlowWpstDnon_G02",0.333,"AidlPercMstpSlowWpstDnon_G03",0.334*/}; + }; + + class AmovPknlMstpSrasWpstDnon; + class AmovPknlMstpSlowWpstDnon: AmovPknlMstpSrasWpstDnon { + variantsPlayer[] = {/*"AidlPknlMstpSlowWpstDnon_G03",0.333,"AidlPknlMstpSlowWpstDnon_G02",0.333,"AidlPknlMstpSlowWpstDnon_G01",0.334*/}; + }; + + // none + class AmovPercMstpSnonWnonDnon: StandBase { + variantsPlayer[] = {/*"AidlPercMstpSnonWnonDnon_G01",0.16,"AidlPercMstpSnonWnonDnon_G02",0.16,"AidlPercMstpSnonWnonDnon_G03",0.16,"AidlPercMstpSnonWnonDnon_G04",0.16,"AidlPercMstpSnonWnonDnon_G05",0.16,"AidlPercMstpSnonWnonDnon_G06",0.16*/}; + }; + class AmovPknlMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon { + variantsPlayer[] = {/*"AidlPknlMstpSnonWnonDnon_G01",0.33,"AidlPknlMstpSnonWnonDnon_G02",0.33,"AidlPknlMstpSnonWnonDnon_G03",0.33*/}; + }; + }; +}; diff --git a/addons/noidle/config.cpp b/addons/noidle/config.cpp new file mode 100644 index 0000000000..3c2ac1a9d6 --- /dev/null +++ b/addons/noidle/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2"; + VERSION_CONFIG; + }; +}; + +#include "CfgMoves.hpp" diff --git a/addons/noidle/script_component.hpp b/addons/noidle/script_component.hpp new file mode 100644 index 0000000000..5a7623b0ba --- /dev/null +++ b/addons/noidle/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT noidle +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_NOIDLE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_NOIDLE + #define DEBUG_SETTINGS DEBUG_ENABLED_NOIDLE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/norearm/$PBOPREFIX$ b/addons/norearm/$PBOPREFIX$ new file mode 100644 index 0000000000..c6ac3a0406 --- /dev/null +++ b/addons/norearm/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\norearm \ No newline at end of file diff --git a/addons/norearm/CfgActions.hpp b/addons/norearm/CfgActions.hpp new file mode 100644 index 0000000000..336c31273a --- /dev/null +++ b/addons/norearm/CfgActions.hpp @@ -0,0 +1,7 @@ + +class CfgActions { + class None; + class Rearm: None { + show = 0; + }; +}; diff --git a/addons/norearm/config.cpp b/addons/norearm/config.cpp new file mode 100644 index 0000000000..3477258612 --- /dev/null +++ b/addons/norearm/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = "https://github.com/commy2"; + VERSION_CONFIG; + }; +}; + +#include "CfgActions.hpp" diff --git a/addons/norearm/script_component.hpp b/addons/norearm/script_component.hpp new file mode 100644 index 0000000000..d2e95ee569 --- /dev/null +++ b/addons/norearm/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT norearm +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_NOREARM + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_NOREARM + #define DEBUG_SETTINGS DEBUG_ENABLED_NOREARM +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index 411e0a702d..aa01c66ec7 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -17,6 +17,7 @@ class CfgVehicles { class ACE_CheckTemperature { displayName = "$STR_ACE_Overheating_CheckTemperatureShort"; condition = QUOTE( currentWeapon _player in [ARR_3(primaryWeapon _player, secondaryWeapon _player, handgunWeapon _player)] ); + exceptions[] = {"isNotInside"}; statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(CheckTemperature); ); showDisabled = 0; priority = 3.1; diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 4755b9c869..2281a1eeac 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" if !(hasInterface) exitWith {}; diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index b72660ce72..1d932d1f51 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {"ACE_SpareBarrel"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common", "ace_interaction"}; - author[] = {"commy2", "KoffeinFlummi", "CAA-Picard"}; + author[] = {"commy2", "KoffeinFlummi", "esteldunedain"}; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; diff --git a/addons/overheating/functions/fnc_checkTemperature.sqf b/addons/overheating/functions/fnc_checkTemperature.sqf index 02747b0129..6c15068815 100644 --- a/addons/overheating/functions/fnc_checkTemperature.sqf +++ b/addons/overheating/functions/fnc_checkTemperature.sqf @@ -1,5 +1,5 @@ /* - * Author: Commy2 and CAA-Picard + * Author: Commy2 and esteldunedain * Make the player check the temperature of his weapon * * Arguments: diff --git a/addons/overheating/functions/fnc_cooldown.sqf b/addons/overheating/functions/fnc_cooldown.sqf index 718c77474f..f5a7f68c36 100644 --- a/addons/overheating/functions/fnc_cooldown.sqf +++ b/addons/overheating/functions/fnc_cooldown.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Calculate cooling down of the weapon. * * Argument: diff --git a/addons/overheating/functions/fnc_displayTemperature.sqf b/addons/overheating/functions/fnc_displayTemperature.sqf index 9af817f8fd..5c17794cde 100644 --- a/addons/overheating/functions/fnc_displayTemperature.sqf +++ b/addons/overheating/functions/fnc_displayTemperature.sqf @@ -1,5 +1,5 @@ /* - * Author: Commy2 and CAA-Picard + * Author: Commy2 and esteldunedain * Displays the weapon temperature * * Arguments: diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index 9f26d51869..d1f7a737d9 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -1,5 +1,5 @@ /* - * Author: Commy2 and CAA-Picard + * Author: Commy2 and esteldunedain * Handle weapon fire, heat up the weapon * * Argument: diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index bea2c61ca2..5d2c9595df 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -117,16 +117,16 @@ Проверить температуру Ð¾Ñ€ÑƒÐ¶Ð¸Ñ - Check temperature - Temperatur prüfen - Verificar temperatura - Sprawdź temperaturÄ™ - Vérifier la température - HÅ‘mérséklet ellenÅ‘rzése - Zjistit teplotu - Conferir temperatura - Controlla la temperatura - Проверить температуру + Check<br/>temperature + Temperatur<br/>prüfen + Verificar<br/>temperatura + Sprawdź<br/>temperaturÄ™ + Vérifier la<br/>température + HÅ‘mérséklet<br/>ellenÅ‘rzése + Zjistit<br/>teplotu + Conferir<br/>temperatura + Controlla la<br/>temperatura + Проверить<br/>температуру Checking temperature ... diff --git a/addons/overpressure/config.cpp b/addons/overpressure/config.cpp index 4f866beedc..0524f6e4c9 100644 --- a/addons/overpressure/config.cpp +++ b/addons/overpressure/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","KoffeinFlummi","CAA-Picard"}; + author[] = {"commy2","KoffeinFlummi","esteldunedain"}; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; diff --git a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf index f42ffd23ed..d63f3b2359 100644 --- a/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf +++ b/addons/overpressure/functions/fnc_fireLauncherBackblast.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * * Handle fire of local launchers * diff --git a/addons/overpressure/functions/fnc_fireOverpressureZone.sqf b/addons/overpressure/functions/fnc_fireOverpressureZone.sqf index cc4918275d..4438e4a859 100644 --- a/addons/overpressure/functions/fnc_fireOverpressureZone.sqf +++ b/addons/overpressure/functions/fnc_fireOverpressureZone.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * * Handle fire of local vehicle weapons creating overpressure zones * diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index 6ffa60f7af..4fe380fbaf 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * * Calculate the distance to the first intersection of a line * diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index c19fed1c04..2fbbcf9aa8 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * * Calculate and apply backblast damage to potentially affected local units * diff --git a/addons/protection/FixHelmets.hpp b/addons/protection/FixHelmets.hpp index 6c3d6a9e2f..eb2c515e50 100644 --- a/addons/protection/FixHelmets.hpp +++ b/addons/protection/FixHelmets.hpp @@ -7,224 +7,224 @@ /*class InventoryItem_Base_F; class HeadgearItem: InventoryItem_Base_F { - armor = 0; - passThrough = 1; + armor = 0; + passThrough = 1; }; class H_HelmetB: ItemCore { - class ItemInfo: HeadgearItem { - //mass = 40; - armor = 4; - passThrough = 0.5; - }; + class ItemInfo: HeadgearItem { + //mass = 40; + armor = 4; + passThrough = 0.5; + }; }; class H_HelmetB_camo: H_HelmetB { - class ItemInfo: HeadgearItem { - //mass = 40; - armor = 4; - passThrough = 0.5; - }; + class ItemInfo: HeadgearItem { + //mass = 40; + armor = 4; + passThrough = 0.5; + }; }; class H_HelmetB_light: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 30; - armor = 3; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 30; + armor = 3; + passThrough = 0.5; + }; }; class H_Booniehat_khk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 10; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 10; + armor = 0; + passThrough = 1; + }; }; class H_HelmetB_plain_mcamo: H_HelmetB {}; class H_HelmetSpecB: H_HelmetB_plain_mcamo { - class ItemInfo: ItemInfo { - //mass = 50; - armor = 5; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 50; + armor = 5; + passThrough = 0.5; + }; }; class H_HelmetIA: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 40; - armor = 4; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 40; + armor = 4; + passThrough = 0.5; + }; }; class H_Cap_red: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 4; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 4; + armor = 0; + passThrough = 1; + }; }; class H_Cap_headphones: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 8; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 8; + armor = 0; + passThrough = 1; + }; }; class H_HelmetCrew_B: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 40; - armor = 4; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 40; + armor = 4; + passThrough = 0.5; + }; }; class H_PilotHelmetFighter_B: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 50; - armor = 5; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 50; + armor = 5; + passThrough = 0.5; + }; }; class H_PilotHelmetHeli_B: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 30; - armor = 3; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 30; + armor = 3; + passThrough = 0.5; + }; }; class H_CrewHelmetHeli_B: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 30; - armor = 3; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 30; + armor = 3; + passThrough = 0.5; + }; }; class H_HelmetO_ocamo: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 50; - armor = 5; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 50; + armor = 5; + passThrough = 0.5; + }; }; class H_HelmetLeaderO_ocamo: H_HelmetO_ocamo { - class ItemInfo: ItemInfo { - //mass = 60; - armor = 6; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 60; + armor = 6; + passThrough = 0.5; + }; }; class H_MilCap_ocamo: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_BandMask_blk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 8; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 8; + armor = 0; + passThrough = 1; + }; }; class H_HelmetSpecO_ocamo: H_HelmetO_ocamo { - class ItemInfo: ItemInfo { - //mass = 40; - armor = 4; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 40; + armor = 4; + passThrough = 0.5; + }; }; class H_Bandanna_surfer: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 8; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 8; + armor = 0; + passThrough = 1; + }; }; class H_Shemag_khk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_ShemagOpen_khk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_Beret_blk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_Beret_02: H_Beret_blk { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_Watchcap_blk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_TurbanO_blk: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 8; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 8; + armor = 0; + passThrough = 1; + }; }; class H_StrawHat: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_Hat_blue: H_HelmetB { - class ItemInfo: ItemInfo { - //mass = 6; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + //mass = 6; + armor = 0; + passThrough = 1; + }; }; class H_RacingHelmet_1_F: H_HelmetB_camo { - class ItemInfo: ItemInfo { - //mass = 50; - armor = 5; - passThrough = 0.5; - }; + class ItemInfo: ItemInfo { + //mass = 50; + armor = 5; + passThrough = 0.5; + }; };*/ diff --git a/addons/protection/FixUniforms.hpp b/addons/protection/FixUniforms.hpp index add1524c8a..24c02b79aa 100644 --- a/addons/protection/FixUniforms.hpp +++ b/addons/protection/FixUniforms.hpp @@ -1,62 +1,62 @@ class Man; class CAManBase: Man { - class HitPoints { - class HitHead { - /*armor = 1; - passThrough = 1; - radius = 0.1; - explosionShielding = 0.5; - minimalHit = 0;*/ + class HitPoints { + class HitHead { + /*armor = 1; + passThrough = 1; + radius = 0.1; + explosionShielding = 0.5; + minimalHit = 0;*/ + }; + + class HitBody { + /*armor = 1; + passThrough = 1; + radius = 0.15; + explosionShielding = 10; + minimalHit = 0;*/ + }; + + class HitHands { + /*armor = 1; + passThrough = 1; + radius = 0.08; + explosionShielding = 1; + minimalHit = 0;*/ + }; + + class HitLegs { + /*armor = 1; + passThrough = 1; + radius = 0.1; + explosionShielding = 1; + minimalHit = 0;*/ + }; }; - class HitBody { - /*armor = 1; - passThrough = 1; - radius = 0.15; - explosionShielding = 10; - minimalHit = 0;*/ - }; - - class HitHands { - /*armor = 1; - passThrough = 1; - radius = 0.08; - explosionShielding = 1; - minimalHit = 0;*/ - }; - - class HitLegs { - /*armor = 1; - passThrough = 1; - radius = 0.1; - explosionShielding = 1; - minimalHit = 0;*/ - }; - }; - - /*armor = 2; - armorStructural = 5;*/ + /*armor = 2; + armorStructural = 5;*/ }; class Civilian: CAManBase { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 2; - }; + class HitHands: HitHands { + armor = 2; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ }; /*class Civilian_F: Civilian {}; @@ -67,503 +67,503 @@ class SoldierEB: CAManBase {}; class SoldierGB: CAManBase {}; class B_Soldier_base_F: SoldierWB { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + }; + + class HitBody: HitBody { + armor = 2; + }; + + class HitHands: HitHands { + armor = 2; + }; + + class HitLegs: HitLegs { + armor = 2; + }; }; - class HitBody: HitBody { - armor = 2; - }; - - class HitHands: HitHands { - armor = 2; - }; - - class HitLegs: HitLegs { - armor = 2; - }; - }; - - armor = 2; - armorStructural = 5;*/ + armor = 2; + armorStructural = 5;*/ }; class B_Soldier_02_f: B_Soldier_base_F { // t-shirt - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + }; - class HitBody: HitBody { - armor = 1; - }; + class HitBody: HitBody { + armor = 1; + }; - class HitHands: HitHands { - armor = 1; - }; + class HitHands: HitHands { + armor = 1; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ - armorStructural = 5; //7; + armorStructural = 5; //7; }; class B_Soldier_03_f: B_Soldier_base_F { // sleeves - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 1; - }; + class HitHands: HitHands { + armor = 1; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ - armorStructural = 5; //7; + armorStructural = 5; //7; }; class B_Soldier_04_f: B_Soldier_base_F { // heli pilot - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ - }; + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; - class HitBody: HitBody { - /*armor = 2;*/ - passThrough = 1; //0.5; - /*explosionShielding = 2.4;*/ - }; + class HitBody: HitBody { + /*armor = 2;*/ + passThrough = 1; //0.5; + /*explosionShielding = 2.4;*/ + }; - class HitHands: HitHands { - armor = 2; //8; - passThrough = 1; //0.5; - /*explosionShielding = 1.2;*/ - }; + class HitHands: HitHands { + armor = 2; //8; + passThrough = 1; //0.5; + /*explosionShielding = 1.2;*/ + }; - class HitLegs: HitLegs { - armor = 2; //8; - passThrough = 1; //0.5; - /*explosionShielding = 1.2;*/ + class HitLegs: HitLegs { + armor = 2; //8; + passThrough = 1; //0.5; + /*explosionShielding = 1.2;*/ + }; }; - }; }; class B_Soldier_05_f: B_Soldier_base_F { // cas pilot - armorStructural = 5; //3; + armorStructural = 5; //3; - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ - }; + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; - class HitBody: HitBody { - armor = 3; //2; - passThrough = 1; //0.5; - /*explosionShielding = 2.4;*/ - }; + class HitBody: HitBody { + armor = 3; //2; + passThrough = 1; //0.5; + /*explosionShielding = 2.4;*/ + }; - class HitHands: HitHands { - armor = 3; //8; - /*passThrough = 1; - explosionShielding = 1.2;*/ - }; + class HitHands: HitHands { + armor = 3; //8; + /*passThrough = 1; + explosionShielding = 1.2;*/ + }; - class HitLegs: HitLegs { - armor = 3; //8; - /*passThrough = 1; - explosionShielding = 1.2;*/ + class HitLegs: HitLegs { + armor = 3; //8; + /*passThrough = 1; + explosionShielding = 1.2;*/ + }; }; - }; }; class B_Soldier_diver_base_F: B_Soldier_base_F { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 2; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 2; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 2; - }; + class HitHands: HitHands { + armor = 2; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ }; // these appear to be broken, remnants from A2? /*class C_man_p_fugitive_F: C_man_1 { - class HitPoints: HitPoints { - class HitBody: HitBody { - armor = "0.3*10"; - }; + class HitPoints: HitPoints { + class HitBody: HitBody { + armor = "0.3*10"; + }; - class HitLegs: HitLegs { - armor = "0.3*5"; + class HitLegs: HitLegs { + armor = "0.3*5"; + }; }; - }; }; class C_man_w_worker_F: C_man_1 { - class HitPoints: HitPoints { - class HitBody: HitBody { - armor = "0.6*10"; - }; + class HitPoints: HitPoints { + class HitBody: HitBody { + armor = "0.6*10"; + }; - class HitHands: HitHands { - armor = "0.5*5"; - }; + class HitHands: HitHands { + armor = "0.5*5"; + }; - class HitLegs: HitLegs { - armor = "0.5*5"; + class HitLegs: HitLegs { + armor = "0.5*5"; + }; }; - }; }; class C_man_hunter_1_F: C_man_1 { - class HitPoints: HitPoints { - class HitBody: HitBody { - armor = "0.6*10"; - }; + class HitPoints: HitPoints { + class HitBody: HitBody { + armor = "0.6*10"; + }; - class HitHands: HitHands { - armor = "0.5*5"; - }; + class HitHands: HitHands { + armor = "0.5*5"; + }; - class HitLegs: HitLegs { - armor = "0.5*5"; + class HitLegs: HitLegs { + armor = "0.5*5"; + }; }; - }; }; class C_man_p_shorts_1_F: C_man_1 { - class HitPoints: HitPoints { - class HitLegs: HitLegs { - armor = "0.3*5"; + class HitPoints: HitPoints { + class HitLegs: HitLegs { + armor = "0.3*5"; + }; }; - }; }; class C_man_pilot_F: C_man_1 { - class HitPoints: HitPoints { - class HitBody: HitBody { - armor = "0.6*10"; - }; + class HitPoints: HitPoints { + class HitBody: HitBody { + armor = "0.6*10"; + }; - class HitHands: HitHands { - armor = "0.5*5"; - }; + class HitHands: HitHands { + armor = "0.5*5"; + }; - class HitLegs: HitLegs { - armor = "0.5*5"; + class HitLegs: HitLegs { + armor = "0.5*5"; + }; }; - }; };*/ class I_Soldier_base_F: SoldierGB { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 2; - }; + class HitHands: HitHands { + armor = 2; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ - /*armor = 2;*/ - armorStructural = 5; //7; + /*armor = 2;*/ + armorStructural = 5; //7; }; class I_Soldier_02_F: I_Soldier_base_F { // sleeves - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 1; - }; + class HitHands: HitHands { + armor = 1; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ }; class I_Soldier_03_F: I_Soldier_base_F { // heli pilot - /*armorStructural = 5;*/ + /*armorStructural = 5;*/ - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ - }; + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; - class HitBody: HitBody { - /*armor = 2;*/ - passThrough = 1; //0.5; - /*explosionShielding = 2.4;*/ - }; + class HitBody: HitBody { + /*armor = 2;*/ + passThrough = 1; //0.5; + /*explosionShielding = 2.4;*/ + }; - class HitHands: HitHands { - armor = 2; //8; - passThrough = 1; //0.5; - /*explosionShielding = 1.2;*/ - }; + class HitHands: HitHands { + armor = 2; //8; + passThrough = 1; //0.5; + /*explosionShielding = 1.2;*/ + }; - class HitLegs: HitLegs { - armor = 2; //8; - passThrough = 1; //0.5; - /*explosionShielding = 1.2;*/ + class HitLegs: HitLegs { + armor = 2; //8; + passThrough = 1; //0.5; + /*explosionShielding = 1.2;*/ + }; }; - }; }; class I_Soldier_04_F: I_Soldier_base_F { // cas pilot - armorStructural = 5; //3; + armorStructural = 5; //3; - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ - }; + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; - class HitBody: HitBody { - armor = 3; //2; - passThrough = 1; //0.5; - /*explosionShielding = 2.4;*/ - }; + class HitBody: HitBody { + armor = 3; //2; + passThrough = 1; //0.5; + /*explosionShielding = 2.4;*/ + }; - class HitHands: HitHands { - armor = 3; //8; - /*passThrough = 1; - explosionShielding = 1.2;*/ - }; + class HitHands: HitHands { + armor = 3; //8; + /*passThrough = 1; + explosionShielding = 1.2;*/ + }; - class HitLegs: HitLegs { - armor = 3; //8; - /*passThrough = 1; - explosionShielding = 1.2;*/ + class HitLegs: HitLegs { + armor = 3; //8; + /*passThrough = 1; + explosionShielding = 1.2;*/ + }; }; - }; }; class I_Soldier_diver_base_F: I_Soldier_base_F { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 2; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 2; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 2; - }; + class HitHands: HitHands { + armor = 2; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ }; class O_Soldier_base_F: SoldierEB { - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; + + class HitBody: HitBody { + armor = 4; //6; + passThrough = 0.85; //0.5; + /*explosionShielding = 1.5;*/ + }; + + class HitHands: HitHands { + armor = 4; //8; + passThrough = 0.85; //0.5; + /*explosionShielding = 0.8;*/ + }; + + class HitLegs: HitLegs { + armor = 4; //8; + passThrough = 0.85; //0.5; + /*explosionShielding = 0.8;*/ + }; }; - class HitBody: HitBody { - armor = 4; //6; - passThrough = 0.85; //0.5; - /*explosionShielding = 1.5;*/ - }; - - class HitHands: HitHands { - armor = 4; //8; - passThrough = 0.85; //0.5; - /*explosionShielding = 0.8;*/ - }; - - class HitLegs: HitLegs { - armor = 4; //8; - passThrough = 0.85; //0.5; - /*explosionShielding = 0.8;*/ - }; - }; - - /*armor = 2; - armorStructural = 5;*/ + /*armor = 2; + armorStructural = 5;*/ }; class O_officer_F: O_Soldier_base_F { - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ - }; + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; - class HitBody: HitBody { - /*armor = 2; - passThrough = 1; - explosionShielding = 10;*/ - }; + class HitBody: HitBody { + /*armor = 2; + passThrough = 1; + explosionShielding = 10;*/ + }; - class HitHands: HitHands { - /*armor = 2; - passThrough = 1; - explosionShielding = 1;*/ - }; + class HitHands: HitHands { + /*armor = 2; + passThrough = 1; + explosionShielding = 1;*/ + }; - class HitLegs: HitLegs { - armor = 2; //8; - passThrough = 1; //0.5; - /*explosionShielding = 1;*/ + class HitLegs: HitLegs { + armor = 2; //8; + passThrough = 1; //0.5; + /*explosionShielding = 1;*/ + }; }; - }; }; class O_Soldier_02_F: O_Soldier_base_F { // crew ? - armorStructural = 5; //3; + armorStructural = 5; //3; - class HitPoints: HitPoints { - class HitHead: HitHead { - /*armor = 1; - passThrough = 1; - explosionShielding = 0.5;*/ - }; + class HitPoints: HitPoints { + class HitHead: HitHead { + /*armor = 1; + passThrough = 1; + explosionShielding = 0.5;*/ + }; - class HitBody: HitBody { - armor = 4; //6; - passThrough = 0.85; //0.5; - /*explosionShielding = 1.5;*/ - }; + class HitBody: HitBody { + armor = 4; //6; + passThrough = 0.85; //0.5; + /*explosionShielding = 1.5;*/ + }; - class HitHands: HitHands { - armor = 4; //8; - passThrough = 0.85; //1; - /*explosionShielding = 0.8;*/ - }; + class HitHands: HitHands { + armor = 4; //8; + passThrough = 0.85; //1; + /*explosionShielding = 0.8;*/ + }; - class HitLegs: HitLegs { - armor = 4; //8; - passThrough = 0.85; //1; - /*explosionShielding = 0.8;*/ + class HitLegs: HitLegs { + armor = 4; //8; + passThrough = 0.85; //1; + /*explosionShielding = 0.8;*/ + }; }; - }; }; class O_Soldier_diver_base_F: O_Soldier_base_F { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 2; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 2; + }; - class HitBody: HitBody { - armor = 2; - }; + class HitBody: HitBody { + armor = 2; + }; - class HitHands: HitHands { - armor = 2; - }; + class HitHands: HitHands { + armor = 2; + }; - class HitLegs: HitLegs { - armor = 2; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + }; + };*/ }; class O_Soldier_VR_F: O_Soldier_base_F { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - passThrough = 1; - explosionShielding = 0.5; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + passThrough = 1; + explosionShielding = 0.5; + }; - class HitBody: HitBody { - armor = 2; - passThrough = 1; - explosionShielding = 10; - }; + class HitBody: HitBody { + armor = 2; + passThrough = 1; + explosionShielding = 10; + }; - class HitHands: HitHands { - armor = 2; - passThrough = 1; - explosionShielding = 1; - }; + class HitHands: HitHands { + armor = 2; + passThrough = 1; + explosionShielding = 1; + }; - class HitLegs: HitLegs { - armor = 2; - passThrough = 1; - explosionShielding = 1; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + passThrough = 1; + explosionShielding = 1; + }; + };*/ }; class O_Protagonist_VR_F: O_Soldier_base_F { - /*class HitPoints: HitPoints { - class HitHead: HitHead { - armor = 1; - passThrough = 1; - explosionShielding = 0.5; - }; + /*class HitPoints: HitPoints { + class HitHead: HitHead { + armor = 1; + passThrough = 1; + explosionShielding = 0.5; + }; - class HitBody: HitBody { - armor = 2; - passThrough = 1; - explosionShielding = 10; - }; + class HitBody: HitBody { + armor = 2; + passThrough = 1; + explosionShielding = 10; + }; - class HitHands: HitHands { - armor = 2; - passThrough = 1; - explosionShielding = 1; - }; + class HitHands: HitHands { + armor = 2; + passThrough = 1; + explosionShielding = 1; + }; - class HitLegs: HitLegs { - armor = 2; - passThrough = 1; - explosionShielding = 1; - }; - };*/ + class HitLegs: HitLegs { + armor = 2; + passThrough = 1; + explosionShielding = 1; + }; + };*/ }; diff --git a/addons/protection/FixVests.hpp b/addons/protection/FixVests.hpp index 19e5d777d6..f3d1ad2b3d 100644 --- a/addons/protection/FixVests.hpp +++ b/addons/protection/FixVests.hpp @@ -3,294 +3,301 @@ class ItemCore; class VestItem; class Vest_Camo_Base: ItemCore { - class ItemInfo: VestItem { - /*containerClass = "Supply0"; - mass = 0; - armor = 0; - passThrough = 1;*/ - }; + class ItemInfo: VestItem { + /*containerClass = "Supply0"; + mass = 0; + armor = 0; + passThrough = 1;*/ + }; }; class Vest_NoCamo_Base: ItemCore { - class ItemInfo: VestItem { - /*containerClass = "Supply0"; - mass = 0; - armor = 0; - passThrough = 1;*/ - }; + class ItemInfo: VestItem { + /*containerClass = "Supply0"; + mass = 0; + armor = 0; + passThrough = 1;*/ + }; }; // belts class V_Rangemaster_belt: Vest_NoCamo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply40"; - mass = 10; - armor = 0; - passThrough = 1;*/ - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply40"; + mass = 10; + armor = 0; + passThrough = 1;*/ + }; }; // bandolliers class V_BandollierB_khk: Vest_Camo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply80"; - mass = 15; - armor = 0;*/ - passThrough = 0.85; //1; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply80"; + mass = 15; + armor = 0;*/ + passThrough = 0.85; //1; + }; }; /*class V_BandollierB_cbr: V_BandollierB_khk { - class ItemInfo: ItemInfo {}; + class ItemInfo: ItemInfo {}; }; class V_BandollierB_rgr: V_BandollierB_khk { - class ItemInfo: ItemInfo {}; + class ItemInfo: ItemInfo {}; }; class V_BandollierB_blk: V_BandollierB_khk { - class ItemInfo: ItemInfo {}; + class ItemInfo: ItemInfo {}; }; class V_BandollierB_oli: V_BandollierB_khk { - class ItemInfo: ItemInfo {}; + class ItemInfo: ItemInfo {}; };*/ // plate carriers class V_PlateCarrier1_rgr: Vest_NoCamo_Base { // lite - class ItemInfo: ItemInfo { - /*containerClass = "Supply140"; - mass = 80;*/ - armor = 8; //20; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140"; + mass = 80;*/ + armor = 8; //20; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrier2_rgr: V_PlateCarrier1_rgr { // heavy - class ItemInfo: ItemInfo { - /*containerClass = "Supply140"; - mass = 100;*/ - armor = 12; //30; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140"; + mass = 100;*/ + armor = 12; //30; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrier3_rgr: Vest_NoCamo_Base { // heavy (us) - class ItemInfo: ItemInfo { - /*containerClass = "Supply140"; - mass = 100;*/ - armor = 12; //30; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140"; + mass = 100;*/ + armor = 12; //30; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrierGL_rgr: Vest_NoCamo_Base { // lite (gl) - class ItemInfo: ItemInfo { - containerClass = "Supply160"; //"Supply140"; - /*mass = 100;*/ - armor = 8; //100; - passThrough = 0.75; //0.7; - }; + class ItemInfo: ItemInfo { + containerClass = "Supply160"; //"Supply140"; + /*mass = 100;*/ + armor = 8; //100; + passThrough = 0.75; //0.7; + }; }; class V_PlateCarrier1_blk: Vest_Camo_Base { // heavy (black) - class ItemInfo: ItemInfo { - /*containerClass = "Supply140";*/ - mass = 100; //80; - armor = 12; //20; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140";*/ + mass = 100; //80; + armor = 12; //20; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrierSpec_rgr: Vest_NoCamo_Base { // lite (special) - class ItemInfo: ItemInfo { - /*containerClass = "Supply100"; - mass = 120;*/ - armor = 16; //40; - passThrough = 0.75; //0.1; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply100"; + mass = 120;*/ + armor = 16; //40; + passThrough = 0.75; //0.1; + }; }; // chestrigs /*class V_Chestrig_khk: Vest_Camo_Base { - class ItemInfo: ItemInfo { - containerClass = "Supply140"; - mass = 20; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + containerClass = "Supply140"; + mass = 20; + armor = 0; + passThrough = 1; + }; }; class V_Chestrig_rgr: V_Chestrig_khk {}; class V_Chestrig_blk: V_Chestrig_khk {}; class V_Chestrig_oli: Vest_Camo_Base { - class ItemInfo: ItemInfo { - containerClass = "Supply140"; - mass = 20; - armor = 0; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + containerClass = "Supply140"; + mass = 20; + armor = 0; + passThrough = 1; + }; };*/ // tactical vests class V_TacVest_khk: Vest_Camo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply100"; - mass = 40;*/ - armor = 8; //20; - /*passThrough = 1;*/ - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply100"; + mass = 40;*/ + armor = 8; //20; + /*passThrough = 1;*/ + }; }; class V_TacVest_brn: V_TacVest_khk {}; class V_TacVest_oli: V_TacVest_khk {}; class V_TacVest_blk: V_TacVest_khk {}; class V_TacVest_camo: Vest_Camo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply100"; - mass = 40;*/ - armor = 8; //20; - /*passThrough = 1;*/ - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply100"; + mass = 40;*/ + armor = 8; //20; + /*passThrough = 1;*/ + }; }; class V_TacVest_blk_POLICE: Vest_Camo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply100";*/ - mass = 40; //60; - armor = 8; //100; - passThrough = 1; //0.7; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply100";*/ + mass = 40; //60; + armor = 8; //100; + passThrough = 1; //0.7; + }; }; class V_TacVestIR_blk: Vest_NoCamo_Base { // raven vest - class ItemInfo: VestItem { - /*containerClass = "Supply100"; - mass = 50;*/ - armor = 8; //20; - passThrough = 0.85; //0.5; - }; + class ItemInfo: VestItem { + /*containerClass = "Supply100"; + mass = 50;*/ + armor = 8; //20; + passThrough = 0.85; //0.5; + }; }; class V_TacVestCamo_khk: Vest_Camo_Base { - class ItemInfo: VestItem { - /*containerClass = "Supply100"; - mass = 40;*/ - armor = 8; //20; - /*passThrough = 1;*/ - }; + class ItemInfo: VestItem { + /*containerClass = "Supply100"; + mass = 40;*/ + armor = 8; //20; + /*passThrough = 1;*/ + }; }; // harnesses class V_HarnessO_brn: Vest_NoCamo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply160"; - mass = 30; - armor = 0;*/ - passThrough = 0.85; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply160"; + mass = 30; + armor = 0;*/ + passThrough = 0.85; //0.5; + }; }; class V_HarnessOGL_brn: Vest_NoCamo_Base { // gl - class ItemInfo: ItemInfo { - /*containerClass = "Supply120"; - mass = 20; - armor = 0;*/ - passThrough = 0.85; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply120"; + mass = 20; + armor = 0;*/ + passThrough = 0.85; //0.5; + }; }; class V_HarnessO_gry: V_HarnessO_brn { - class ItemInfo: ItemInfo { - /*containerClass = "Supply160"; - mass = 30; - armor = 0;*/ - passThrough = 0.85; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply160"; + mass = 30; + armor = 0;*/ + passThrough = 0.85; //0.5; + }; }; class V_HarnessOGL_gry: V_HarnessO_gry { // gl - class ItemInfo: ItemInfo { - /*containerClass = "Supply120"; - mass = 20; - armor = 0;*/ - passThrough = 0.85; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply120"; + mass = 20; + armor = 0;*/ + passThrough = 0.85; //0.5; + }; }; class V_HarnessOSpec_brn: V_HarnessO_brn { - class ItemInfo: VestItem { - /*containerClass = "Supply160"; - mass = 30; - armor = 0;*/ - passThrough = 0.85; //0.5; - }; + class ItemInfo: VestItem { + /*containerClass = "Supply160"; + mass = 30; + armor = 0;*/ + passThrough = 0.85; //0.5; + }; }; class V_HarnessOSpec_gry: V_HarnessO_gry { - class ItemInfo: ItemInfo { - /*containerClass = "Supply160"; - mass = 30; - armor = 0;*/ - passThrough = 0.85; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply160"; + mass = 30; + armor = 0;*/ + passThrough = 0.85; //0.5; + }; }; // indep plate carriers class V_PlateCarrierIA1_dgtl: Vest_NoCamo_Base { // lite - class ItemInfo: VestItem { - /*containerClass = "Supply120"; - mass = 60;*/ - armor = 8; //20; - passThrough = 0.75; //0.5; - }; + class ItemInfo: VestItem { + /*containerClass = "Supply120"; + mass = 60;*/ + armor = 8; //20; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrierIA2_dgtl: V_PlateCarrierIA1_dgtl { // heavy - class ItemInfo: VestItem { - /*containerClass = "Supply120"; - mass = 80;*/ - armor = 12; //30; - passThrough = 0.75; //0.5; - }; + class ItemInfo: VestItem { + /*containerClass = "Supply120"; + mass = 80;*/ + armor = 12; //30; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrierIAGL_dgtl: V_PlateCarrierIA2_dgtl { // heavy (gl) - class ItemInfo: VestItem { - containerClass = "Supply140"; //"Supply120"; - mass = 100; //80; - armor = 12; //100; - passThrough = 0.75; //0.7; - }; + class ItemInfo: VestItem { + containerClass = "Supply140"; //"Supply120"; + mass = 100; //80; + armor = 12; //100; + passThrough = 0.75; //0.7; + }; }; // rebreather /*class V_RebreatherB: Vest_Camo_Base { - class ItemInfo: ItemInfo { - containerClass = "Supply0"; - mass = 80; - armor = 20; - passThrough = 1; - }; + class ItemInfo: ItemInfo { + containerClass = "Supply0"; + mass = 80; + armor = 20; + passThrough = 1; + }; }; class V_RebreatherIR: V_RebreatherB {}; class V_RebreatherIA: V_RebreatherB {};*/ // more plate carriers class V_PlateCarrier_Kerry: V_PlateCarrier1_rgr { // lighter - class ItemInfo: ItemInfo { - /*containerClass = "Supply140"; - mass = 80;*/ - armor = 8; //30; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140"; + mass = 80;*/ + armor = 8; //30; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrierL_CTRG: V_PlateCarrier1_rgr { // lite - class ItemInfo: ItemInfo { - /*containerClass = "Supply140"; - mass = 80;*/ - armor = 8; //20; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140"; + mass = 80;*/ + armor = 8; //20; + passThrough = 0.75; //0.5; + }; }; class V_PlateCarrierH_CTRG: V_PlateCarrier2_rgr { // heavy - class ItemInfo: ItemInfo { - /*containerClass = "Supply140"; - mass = 100;*/ - armor = 12; //30; - passThrough = 0.75; //0.5; - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply140"; + mass = 100;*/ + armor = 12; //30; + passThrough = 0.75; //0.5; + }; }; // another tactical vest class V_I_G_resistanceLeader_F: V_TacVest_camo { - class ItemInfo: ItemInfo {}; + class ItemInfo: ItemInfo {}; }; // press vest class V_Press_F: Vest_Camo_Base { - class ItemInfo: ItemInfo { - /*containerClass = "Supply40"; - mass = 20;*/ - armor = 8; //0; ? - /*passThrough = 1;*/ - }; + class ItemInfo: ItemInfo { + /*containerClass = "Supply40"; + mass = 20;*/ + armor = 8; //0; ? + /*passThrough = 1;*/ + }; }; + +// marksman dlc +/*class V_PlateCarrierGL_blk: V_PlateCarrierGL_rgr {}; +class V_PlateCarrierGL_mtp: V_PlateCarrierGL_rgr {}; +class V_PlateCarrierSpec_blk: V_PlateCarrierSpec_rgr {}; +class V_PlateCarrierSpec_mtp: V_PlateCarrierSpec_rgr {}; +class V_PlateCarrierIAGL_oli: V_PlateCarrierIAGL_dgtl {};*/ diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index 218e04ff09..0fa3111243 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -552,4 +552,85 @@ class CfgVehicles { class Weapon_srifle_DMR_01_F: Weapon_Base_F { displayName = "$STR_ACE_RealisticNames_srifle_DMR_01_Name"; }; + + // marksmen + /*class Weapon_srifle_DMR_02_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_02"; + }; + + class Weapon_srifle_DMR_02_camo_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_02_camo"; + }; + + class Weapon_srifle_DMR_02_sniper_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_02_sniper"; + }; + + class Weapon_srifle_DMR_03_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03"; + }; + + class Weapon_srifle_DMR_03_khaki_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_khaki"; + }; + + class Weapon_srifle_DMR_03_tan_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_tan"; + }; + + class Weapon_srifle_DMR_03_multicam_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_multicam"; + }; + + class Weapon_srifle_DMR_03_woodland_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_woodland"; + }; + + class Weapon_srifle_DMR_04_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_04"; + }; + + class Weapon_srifle_DMR_04_Tan_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_04_Tan"; + }; + + class Weapon_srifle_DMR_05_blk_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_05_blk"; + }; + + class Weapon_srifle_DMR_05_hex_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_05_hex"; + }; + + class Weapon_srifle_DMR_05_tan_f: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_05_tan"; + }; + + class Weapon_srifle_DMR_06_camo_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_06_camo"; + }; + + class Weapon_srifle_DMR_06_olive_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_06_olive"; + }; + + class Weapon_MMG_01_hex_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_01_hex"; + }; + + class Weapon_MMG_01_tan_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_01_tan"; + }; + + class Weapon_MMG_02_camo_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_02_camo"; + }; + + class Weapon_MMG_02_black_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_02_black"; + }; + + class Weapon_MMG_02_sand_F: Weapon_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_02_sand"; + };*/ }; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 8e64434bd4..56d9e3b7c8 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -192,6 +192,120 @@ class CfgWeapons { displayName = "$STR_ACE_RealisticNames_launch_NLAW_Name"; }; + // marksmen marksman + /*class DMR_02_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_DMR_02"; //MAR-10 .338"; + }; + + class srifle_DMR_02_F: DMR_02_base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_02"; //MAR-10 .338 (Black)"; + }; + + class srifle_DMR_02_camo_F: srifle_DMR_02_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_02_camo"; //MAR-10 .338 (Camo)"; + }; + + class srifle_DMR_02_sniper_F: srifle_DMR_02_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_02_sniper"; //MAR-10 .338 (Sand)"; + }; + + class DMR_03_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_DMR_03"; //Mk-I EMR 7.62 mm"; + }; + + class srifle_DMR_03_F: DMR_03_base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03"; //Mk-I EMR 7.62 mm (Black)"; + }; + + class srifle_DMR_03_khaki_F: srifle_DMR_03_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_khaki"; //Mk-I EMR 7.62 mm (Khaki)"; + }; + + class srifle_DMR_03_tan_F: srifle_DMR_03_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_tan"; //Mk-I EMR 7.62 mm (Sand)"; + }; + + class srifle_DMR_03_multicam_F: srifle_DMR_03_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_multicam"; //Mk-I EMR 7.62 mm (Camo)"; + }; + + class srifle_DMR_03_woodland_F: srifle_DMR_03_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_woodland"; //Mk-I EMR 7.62 mm (Woodland)"; + }; + + class srifle_DMR_03_spotter_F: srifle_DMR_03_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_03_spotter"; //NATO DMR (provisional) spotter"; + }; + + class DMR_04_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_DMR_04"; //ASP-1 Kir 12.7 mm"; + }; + + class srifle_DMR_04_F: DMR_04_base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_04"; //ASP-1 Kir 12.7 mm (Black)"; + }; + + class srifle_DMR_04_Tan_F: srifle_DMR_04_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_04_Tan"; //ASP-1 Kir 12.7 mm (Tan)"; + }; + + class DMR_05_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_DMR_05"; //Cyrus 9.3 mm"; + }; + + class srifle_DMR_05_blk_F: DMR_05_base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_05_blk"; //Cyrus 9.3 mm (Black) + }; + + class srifle_DMR_05_hex_F: srifle_DMR_05_blk_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_05_hex"; //Cyrus 9.3 mm (Hex)"; + }; + + class srifle_DMR_05_tan_f: srifle_DMR_05_blk_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_05_tan"; //Cyrus 9.3 mm (Tan)"; + }; + + class DMR_06_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_DMR_06"; //Mk14 7.62 mm"; + }; + + class srifle_DMR_06_camo_F: DMR_06_base_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_06_camo"; //Mk14 7.62 mm (Camo) + }; + + class srifle_DMR_06_olive_F: srifle_DMR_06_camo_F { + displayName = "$STR_ACE_RealisticNames_srifle_DMR_06_olive"; //Mk14 7.62 mm (Olive)"; + }; + + // marksmen mgs + class MMG_01_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_01"; //Navid 9.3 mm"; + }; + + class MMG_01_hex_F: MMG_01_base_F { + displayName = "$STR_ACE_RealisticNames_MMG_01_hex"; //Navid 9.3 mm (Hex)"; + }; + + class MMG_01_tan_F: MMG_01_hex_F { + displayName = "$STR_ACE_RealisticNames_MMG_01_tan"; //Navid 9.3 mm (Tan)"; + }; + + class MMG_02_base_F: Rifle_Long_Base_F { + displayName = "$STR_ACE_RealisticNames_MMG_02"; //SPMG .338"; + }; + + class MMG_02_camo_F: MMG_02_base_F { + displayName = "$STR_ACE_RealisticNames_MMG_02_camo"; //SPMG .338 (MTP)"; + }; + + class MMG_02_black_F: MMG_02_camo_F { + displayName = "$STR_ACE_RealisticNames_MMG_02_black"; //SPMG .338 (Black)"; + }; + + class MMG_02_sand_F: MMG_02_camo_F { + displayName = "$STR_ACE_RealisticNames_MMG_02_sand"; //SPMG .338 (Sand)"; + };*/ + // vehicle weapons // gatlings diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 8c1483ead2..9ccd7752d2 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1214,5 +1214,97 @@ VS-121 VS-121 + + + TODO: MAR-10 .338 + + + TODO: MAR-10 .338 (Black) + + + TODO: MAR-10 .338 (Camo) + + + TODO: MAR-10 .338 (Sand) + + + + TODO: Mk-I EMR 7.62 mm + + + TODO: Mk-I EMR 7.62 mm (Black) + + + TODO: Mk-I EMR 7.62 mm (Khaki) + + + TODO: Mk-I EMR 7.62 mm (Sand) + + + TODO: Mk-I EMR 7.62 mm (Camo) + + + TODO: Mk-I EMR 7.62 mm (Woodland) + + + TODO: NATO DMR (provisional) spotter + + + + TODO: ASP-1 Kir 12.7 mm + + + TODO: ASP-1 Kir 12.7 mm (Black) + + + TODO: ASP-1 Kir 12.7 mm (Tan) + + + + TODO: Cyrus 9.3 mm + + + TODO: Cyrus 9.3 mm (Black) + + + TODO: Cyrus 9.3 mm (Hex) + + + TODO: Cyrus 9.3 mm (Tan) + + + + TODO: Mk14 7.62 mm + + + TODO: Mk14 7.62 mm (Camo) + + + TODO: Mk14 7.62 mm (Olive) + + + + TODO: Navid 9.3 mm + + + TODO: Navid 9.3 mm (Hex) + + + TODO: Navid 9.3 mm (Tan) + + + + TODO: SPMG .338 + + + TODO: SPMG .338 (MTP) + + + TODO: SPMG .338 (Black) + + + TODO: SPMG .338 (Sand) + + - \ No newline at end of file + diff --git a/addons/reload/XEH_postInit.sqf b/addons/reload/XEH_postInit.sqf index b3ca31cd5d..faefbe449d 100644 --- a/addons/reload/XEH_postInit.sqf +++ b/addons/reload/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" if !(hasInterface) exitWith {}; diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp index 611cf7d6aa..372292de89 100644 --- a/addons/reload/config.cpp +++ b/addons/reload/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2","KoffeinFlummi","CAA-Picard"}; + author[] = {"commy2","KoffeinFlummi","esteldunedain"}; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; diff --git a/addons/reload/functions/fnc_canCheckAmmo.sqf b/addons/reload/functions/fnc_canCheckAmmo.sqf index 2cabe6edc2..63c302bf07 100644 --- a/addons/reload/functions/fnc_canCheckAmmo.sqf +++ b/addons/reload/functions/fnc_canCheckAmmo.sqf @@ -15,7 +15,17 @@ EXPLODE_2_PVT(_this,_player,_target); // Return true for static weapons if they have been fired once, @todo 1.40 this work-around doesn't work anymore if (_target isKindOf "StaticWeapon") exitWith { - (currentMagazine _target) != "" + if (currentMagazine _target != "") exitWith {true}; + + private ["_magazines","_found"]; + _magazines = magazinesAmmoFull _target; + _found = false; + { + if (_x select 2) exitWith { + _found = true; + }; + } forEach _magazines; + _found }; // Return false for all other vehicles diff --git a/addons/reload/functions/fnc_canLinkBelt.sqf b/addons/reload/functions/fnc_canLinkBelt.sqf index b06a69fafa..4461b4f3e3 100644 --- a/addons/reload/functions/fnc_canLinkBelt.sqf +++ b/addons/reload/functions/fnc_canLinkBelt.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Check if the target has an MG equiped with belt system that the player can link * * Argument: diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf index 2ab656fe47..a1001890cd 100644 --- a/addons/reload/functions/fnc_checkAmmo.sqf +++ b/addons/reload/functions/fnc_checkAmmo.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * Count the ammo of the currently loaded magazine or count rifle grenades. Play animation and display message. * * Argument: diff --git a/addons/reload/functions/fnc_displayAmmo.sqf b/addons/reload/functions/fnc_displayAmmo.sqf index 07e1a4593a..77578caa68 100644 --- a/addons/reload/functions/fnc_displayAmmo.sqf +++ b/addons/reload/functions/fnc_displayAmmo.sqf @@ -1,5 +1,5 @@ /* - * Author: commy2 and CAA-Picard + * Author: commy2 and esteldunedain * Display the ammo of the currently loaded magazine of the target or count rifle grenades. * * Argument: @@ -28,8 +28,20 @@ if (_target isKindOf "StaticWeapon") then { _muzzle = _weapon; }; }; + + if (_magazine == "") then { + // Try to get magazine using magazinesAmmoFull + private ["_magazines"]; + _magazines = magazinesAmmoFull _target; + { + if (_x select 2) exitWith { + _magazine = _x select 0; + }; + } forEach _magazines; + }; }; +if (_magazine == "") exitWith {}; if (_weapon == "") exitWith {}; if (typeName _muzzle != "STRING") then {_muzzle = _weapon}; diff --git a/addons/reload/functions/fnc_startLinkingBelt.sqf b/addons/reload/functions/fnc_startLinkingBelt.sqf index d739cd8c56..412fcabb97 100644 --- a/addons/reload/functions/fnc_startLinkingBelt.sqf +++ b/addons/reload/functions/fnc_startLinkingBelt.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * Start linking the belt * * Argument: @@ -60,7 +60,7 @@ _onFailure = { _player addMagazine _magazine; }; -[_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation); +_player playActionNow "PutDown"; // Remove the magazine with maximum remaining ammo [_player, _magazineType, _maxAmmo] call EFUNC(common,removeSpecificMagazine); diff --git a/addons/reloadlaunchers/$PBOPREFIX$ b/addons/reloadlaunchers/$PBOPREFIX$ new file mode 100644 index 0000000000..3425681cde --- /dev/null +++ b/addons/reloadlaunchers/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\reloadlaunchers \ No newline at end of file diff --git a/addons/reloadlaunchers/CfgEventHandlers.hpp b/addons/reloadlaunchers/CfgEventHandlers.hpp new file mode 100644 index 0000000000..0cd959a047 --- /dev/null +++ b/addons/reloadlaunchers/CfgEventHandlers.hpp @@ -0,0 +1,12 @@ + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/reloadlaunchers/CfgVehicles.hpp b/addons/reloadlaunchers/CfgVehicles.hpp new file mode 100644 index 0000000000..617aa26b5c --- /dev/null +++ b/addons/reloadlaunchers/CfgVehicles.hpp @@ -0,0 +1,15 @@ + +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_Actions { + class GVAR(ReloadLauncher) { + displayName = "$STR_ACE_ReloadLaunchers_LoadLauncher"; + selection = "launcher"; + distance = 4; + condition = ""; + insertChildren = QUOTE(_this call FUNC(addMissileReloadActions)); + }; + }; + }; +}; diff --git a/addons/reloadlaunchers/CfgWeapons.hpp b/addons/reloadlaunchers/CfgWeapons.hpp new file mode 100644 index 0000000000..08fbdb76b0 --- /dev/null +++ b/addons/reloadlaunchers/CfgWeapons.hpp @@ -0,0 +1,11 @@ + +class CfgWeapons { + class Launcher_Base_F; + class launch_Titan_base: Launcher_Base_F { + GVAR(enabled) = 1; + }; + + class launch_RPG32_F: Launcher_Base_F { + GVAR(enabled) = 1; + }; +}; diff --git a/addons/reloadlaunchers/XEH_postInit.sqf b/addons/reloadlaunchers/XEH_postInit.sqf new file mode 100644 index 0000000000..437927602a --- /dev/null +++ b/addons/reloadlaunchers/XEH_postInit.sqf @@ -0,0 +1,4 @@ +// by commy2 +#include "script_component.hpp" + +["reloadLauncher", {_this call DFUNC(reloadLauncher)}] call EFUNC(common,addEventhandler); diff --git a/addons/reloadlaunchers/XEH_preInit.sqf b/addons/reloadlaunchers/XEH_preInit.sqf new file mode 100644 index 0000000000..3b60f99b8e --- /dev/null +++ b/addons/reloadlaunchers/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP(addMissileReloadActions); +PREP(canLoad); +PREP(getLoadableMissiles); +PREP(load); +PREP(reloadLauncher); + +ADDON = true; diff --git a/addons/reloadlaunchers/config.cpp b/addons/reloadlaunchers/config.cpp new file mode 100644 index 0000000000..a039ef87c4 --- /dev/null +++ b/addons/reloadlaunchers/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common","ace_interaction","ace_interact_menu"}; + author[] = {""}; + authorUrl = ""; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" + +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf new file mode 100644 index 0000000000..58cd53699e --- /dev/null +++ b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf @@ -0,0 +1,48 @@ +/* + * Author: commy2 + * Create one action per reloadable missile + * + * Argument: + * 1: Player (Object) + * 0: Target (Object) + * 2: Parameters ??? (Array) + * + * Return value: + * Children actions (Array) + * + */ +#include "script_component.hpp" + +private ["_unit", "_target", "_parameters"]; + +_unit = _this select 1; +_target = _this select 0; +_parameters = _this select 2; // ??? + +private ["_actions", "_weapon", "_loadableMissiles"]; + +_actions = []; + +_weapon = secondaryWeapon _target; +_loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles); + +{ + private ["_name", "_displayName", "_statement", "_condition", "_action"]; + + _name = format [QGVAR(Missile_%1), _x]; + _displayName = format [localize "STR_ACE_ReloadLaunchers_LoadMagazine", getText (configFile >> "CfgMagazines" >> _x >> "displayName")]; + + _statement = { + (_this select 2) call DFUNC(load); + }; + + _condition = { + (_this select 2) call DFUNC(canLoad) + }; + + _action = [_name, _displayName, "", _statement, _condition, {}, [_unit, _target, _weapon, _x], "", 4] call EFUNC(interact_menu,createAction); + + _actions pushBack [_action, [], _unit]; +} forEach _loadableMissiles; + +_actions diff --git a/addons/reloadlaunchers/functions/fnc_canLoad.sqf b/addons/reloadlaunchers/functions/fnc_canLoad.sqf new file mode 100644 index 0000000000..5bbfe4dd87 --- /dev/null +++ b/addons/reloadlaunchers/functions/fnc_canLoad.sqf @@ -0,0 +1,41 @@ +/* + * Author: commy2 + * + * Check of the unit can reload the launcher of target unit. + * + * Argument: + * 0: Unit to do the reloading (Object) + * 1: Unit eqipped with launcher (Object) + * 2: weapon name (String) + * 3: missile name (String) + * + * Return value: + * NONE + */ +#include "script_component.hpp" + +private ["_unit", "_target", "_weapon", "_magazine"]; + +_unit = _this select 0; +_target = _this select 1; +_weapon = _this select 2; +_magazine = _this select 3; + +if (!alive _target) exitWith {false}; +if (vehicle _target != _target) exitWith {false}; +if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; + +// target is awake +if (_target getVariable ["ACE_isUnconscious", false]) exitWith {false}; + +// has secondary weapon equipped +if !(_weapon in weapons _target) exitWith {false}; + +// check if the target really needs to be reloaded +if (count secondaryWeaponMagazine _target > 0) exitWith {false}; + +// check if the launcher is compatible +if (getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(enabled)) == 0) exitWith {false}; + +// check if the magazine compatible with targets launcher +_magazine in ([_unit, _weapon] call FUNC(getLoadableMissiles)) diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf new file mode 100644 index 0000000000..9b083a04c6 --- /dev/null +++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf @@ -0,0 +1,28 @@ +/* + * Author: commy2 + * + * Return all magazine types from reloaders inventory that are compatible with given weapon. + * + * Argument: + * 0: Unit to to the reload (Object) + * 1: A launcher (String) + * + * Return value: + * Reloable magazines (Array) + */ +#include "script_component.hpp" + +private ["_unit", "_weapon"]; + +_unit = _this select 0; +_weapon = _this select 1; + +// get available magazines of reloader, Note: "magazines" does not include currently loaded magazines +private "_magazines"; +_magazines = magazines _unit; + +// case sensitvity +_magazines = [_magazines, {toLower _this}] call EFUNC(common,map); + +// get reloaders magazine types compatible with targets launcher. No duplicates. +[getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"), {toLower _this in _magazines}] call EFUNC(common,filter) diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf new file mode 100644 index 0000000000..f6ad07e357 --- /dev/null +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -0,0 +1,48 @@ +/* + * Author: commy2 + * + * Reload a launcher + * + * Argument: + * 0: Unit with magazine (Object) + * 1: Unit with launcher (Object) + * 2: weapon name (String) + * 3: missile name (String) + * + * Return value: + * NONE + */ +#include "script_component.hpp" + +private ["_unit", "_target", "_weapon", "_magazine"]; + +_unit = _this select 0; +_target = _this select 1; +_weapon = _this select 2; +_magazine = _this select 3; + +private "_reloadTime"; +_reloadTime = getNumber (configFile >> "CfgWeapons" >> _weapon >> "magazineReloadTime"); + +// do animation +[_unit] call EFUNC(common,goKneeling); + +// show progress bar +private ["_onSuccess", "_onFailure", "_condition"]; + +_onSuccess = { + (_this select 0 select 0) removeMagazine (_this select 0 select 3); + ["reloadLauncher", _this select 0 select 0, _this select 0] call DEFUNC(common,targetEvent); + + [localize "STR_ACE_ReloadLaunchers_LauncherLoaded"] call DEFUNC(common,displayTextStructured); +}; + +_onFailure = { + [localize "STR_ACE_Common_ActionAborted"] call DEFUNC(common,displayTextStructured); +}; + +_condition = { + (_this select 0) call DFUNC(canLoad) && {(_this select 0 select 0) distance (_this select 0 select 1) < 4} +}; + +[_reloadTime, [_unit, _target, _weapon, _magazine], _onSuccess, _onFailure, localize "STR_ACE_ReloadLaunchers_LoadingLauncher", _condition] call EFUNC(common,progressBar); diff --git a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf new file mode 100644 index 0000000000..36772f9dfd --- /dev/null +++ b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf @@ -0,0 +1,30 @@ +/* + * Author: commy2 + * + * Reload a launcher + * + * Argument: + * 0: Unit to do the reloading (Object) + * 1: Target to rload (Object) + * 2: weapon name (String) + * 3: missile name (String) + * + * Return value: + * NONE + */ +#include "script_component.hpp" + +private ["_unit", "_weapon", "_magazine"]; + +_unit = _this select 0; +_target = _this select 1; +_weapon = _this select 2; +_magazine = _this select 3; + +_target selectWeapon _weapon; + +if (currentWeapon _target != _weapon) exitWith {}; +if (currentMagazine _target != "") exitWith {}; + +// command is wip, reload time for launchers is not intended. +_target addWeaponItem [_weapon, _magazine]; diff --git a/addons/reloadlaunchers/functions/script_component.hpp b/addons/reloadlaunchers/functions/script_component.hpp new file mode 100644 index 0000000000..9c129f36b1 --- /dev/null +++ b/addons/reloadlaunchers/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\reloadlaunchers\script_component.hpp" \ No newline at end of file diff --git a/addons/reloadlaunchers/script_component.hpp b/addons/reloadlaunchers/script_component.hpp new file mode 100644 index 0000000000..bc6b7f6e6c --- /dev/null +++ b/addons/reloadlaunchers/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT reloadlaunchers +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_RELOADLAUNCHERS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_RELOADLAUNCHERS + #define DEBUG_SETTINGS DEBUG_ENABLED_RELOADLAUNCHERS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml new file mode 100644 index 0000000000..6677153419 --- /dev/null +++ b/addons/reloadlaunchers/stringtable.xml @@ -0,0 +1,24 @@ + + + + + + Load launcher + Panzerabwehr laden + + + Loading launcher ... + Panzerabwehr wird geladen ... + + + Launcher loaded + Panzerabwehr geladen + + + + Load %1 + Lade %1 + + + + diff --git a/addons/respawn/UI/Icon_Module_FriendlyFire_ca.paa b/addons/respawn/UI/Icon_Module_FriendlyFire_ca.paa index 200d02732c..69181bac20 100644 Binary files a/addons/respawn/UI/Icon_Module_FriendlyFire_ca.paa and b/addons/respawn/UI/Icon_Module_FriendlyFire_ca.paa differ diff --git a/addons/respawn/UI/Icon_Module_Rallypoint_ca.paa b/addons/respawn/UI/Icon_Module_Rallypoint_ca.paa index ef6ce002c4..fcd4844665 100644 Binary files a/addons/respawn/UI/Icon_Module_Rallypoint_ca.paa and b/addons/respawn/UI/Icon_Module_Rallypoint_ca.paa differ diff --git a/addons/respawn/UI/Icon_Module_Respawn_ca.paa b/addons/respawn/UI/Icon_Module_Respawn_ca.paa index 3edf597185..81977cc162 100644 Binary files a/addons/respawn/UI/Icon_Module_Respawn_ca.paa and b/addons/respawn/UI/Icon_Module_Respawn_ca.paa differ diff --git a/addons/respawn/functions/fnc_module.sqf b/addons/respawn/functions/fnc_module.sqf index 5ba52fd40e..6d03c1eda3 100644 --- a/addons/respawn/functions/fnc_module.sqf +++ b/addons/respawn/functions/fnc_module.sqf @@ -2,7 +2,7 @@ Name: ACE_Respawn_fnc_module Author(s): - KoffeinFlummi, bux578, CAA-Picard, commy2 + KoffeinFlummi, bux578, esteldunedain, commy2 Description: initializes the respawn module diff --git a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf index 7d1b374252..1fdd10da4e 100644 --- a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf +++ b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf @@ -25,8 +25,6 @@ _killer = _this select 1; if (_unit != _killer && side group _unit in [side group ACE_player, civilian] && {side group _killer == side group ACE_player}) then { systemChat format ["%1 was killed by %2", [_unit] call EFUNC(common,getName), [_killer] call EFUNC(common,getName)]; - // Raise custom event. @todo: remove - [_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(common,callCustomEventHandlers); // Raise ACE globalEvent ["killedByFriendly", [_unit, _killer]] call EFUNC(common,globalEvent); }; diff --git a/addons/resting/XEH_postInit.sqf b/addons/resting/XEH_postInit.sqf index ec80100523..bd78ae0044 100644 --- a/addons/resting/XEH_postInit.sqf +++ b/addons/resting/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" if !(hasInterface) exitWith {}; diff --git a/addons/resting/config.cpp b/addons/resting/config.cpp index 599c15d318..f1cc20c6e2 100644 --- a/addons/resting/config.cpp +++ b/addons/resting/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi", "TaoSensai", "CAA-Picard"}; + author[] = {"KoffeinFlummi", "TaoSensai", "esteldunedain"}; authorUrl = "https://github.com/KoffeinFlummi/"; VERSION_CONFIG; }; diff --git a/addons/resting/functions/fnc_getIntersection.sqf b/addons/resting/functions/fnc_getIntersection.sqf index cadddff1e1..395b83f0a4 100644 --- a/addons/resting/functions/fnc_getIntersection.sqf +++ b/addons/resting/functions/fnc_getIntersection.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, edited by commy2 and CAA-Picard + * Author: KoffeinFlummi, edited by commy2 and esteldunedain * * Prepares intersects * diff --git a/addons/resting/functions/fnc_pfhCheckRest.sqf b/addons/resting/functions/fnc_pfhCheckRest.sqf index ad0f73ad06..0f6fea300b 100644 --- a/addons/resting/functions/fnc_pfhCheckRest.sqf +++ b/addons/resting/functions/fnc_pfhCheckRest.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, edited by commy2 and CAA-Picard + * Author: KoffeinFlummi, edited by commy2 and esteldunedain * * PFH that check for player moving away, changing weapon, etc * and unrests the weapon if necessary diff --git a/addons/resting/functions/fnc_restWeapon.sqf b/addons/resting/functions/fnc_restWeapon.sqf index 793ef4fff3..75d16a62be 100644 --- a/addons/resting/functions/fnc_restWeapon.sqf +++ b/addons/resting/functions/fnc_restWeapon.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, edited by commy2 and CAA-Picard + * Author: KoffeinFlummi, edited by commy2 and esteldunedain * * Rests the player's weapon if possible. * diff --git a/addons/resting/functions/fnc_unRestWeapon.sqf b/addons/resting/functions/fnc_unRestWeapon.sqf index 2cf885676f..ef5a52b824 100644 --- a/addons/resting/functions/fnc_unRestWeapon.sqf +++ b/addons/resting/functions/fnc_unRestWeapon.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi, edited by commy2 and CAA-Picard + * Author: KoffeinFlummi, edited by commy2 and esteldunedain * * Un Rests the player's weapon * diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index 6754038bd1..ff6a76d834 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" //["Soldier", {_player = ACE_player; if (currentWeapon _player in (_player getVariable [QGVAR(safedWeapons), []])) then {[false] call FUNC(setSafeModeVisual)}] call EFUNC(common,addInfoDisplayEventHandler); diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 6d4485e1b0..9a1b0e8ef3 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and CAA-Picard + * Author: KoffeinFlummi and esteldunedain * * Watches for scope changes. * Defines key bindings diff --git a/addons/scopes/config.cpp b/addons/scopes/config.cpp index 50ff6528d0..d94e066767 100644 --- a/addons/scopes/config.cpp +++ b/addons/scopes/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_common" }; - author[] = {"KoffeinFlummi", "CAA-Picard"}; + author[] = {"KoffeinFlummi", "esteldunedain"}; authorUrl = "https://github.com/KoffeinFlummi"; VERSION_CONFIG; }; diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index 371d1e5f33..8185e00ea0 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and CAA-Picard + * Author: KoffeinFlummi and esteldunedain * Adjusts the flight path of the bullet according to the zeroing * * Argument: diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index 836f69b2df..bd1a04f326 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -1,5 +1,5 @@ /* - * Author: KoffeinFlummi and CAA-Picard + * Author: KoffeinFlummi and esteldunedain * Display the adjustment knobs, update their value and fade them out later * * Arguments: diff --git a/addons/smallarms/$PBOPREFIX$ b/addons/smallarms/$PBOPREFIX$ index 9d0480659e..9d177151a4 100644 --- a/addons/smallarms/$PBOPREFIX$ +++ b/addons/smallarms/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\switchunits \ No newline at end of file +z\ace\addons\smallarms \ No newline at end of file diff --git a/addons/switchunits/CfgVehicles.hpp b/addons/switchunits/CfgVehicles.hpp index f4c69a565b..429970b1a0 100644 --- a/addons/switchunits/CfgVehicles.hpp +++ b/addons/switchunits/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { function = FUNC(module); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(UI\IconSwitchUnits_ca.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_SwitchUnits_ca.paa)); class Arguments { class SwitchToWest { displayName = "Switch to West?"; diff --git a/addons/switchunits/UI/IconSwitchUnits_ca.paa b/addons/switchunits/UI/IconSwitchUnits_ca.paa deleted file mode 100644 index b5868f0423..0000000000 Binary files a/addons/switchunits/UI/IconSwitchUnits_ca.paa and /dev/null differ diff --git a/addons/switchunits/UI/Icon_Module_SwitchUnits_ca.paa b/addons/switchunits/UI/Icon_Module_SwitchUnits_ca.paa new file mode 100644 index 0000000000..2b0bf1249f Binary files /dev/null and b/addons/switchunits/UI/Icon_Module_SwitchUnits_ca.paa differ diff --git a/addons/vector/XEH_preInit.sqf b/addons/vector/XEH_preInit.sqf index a0a20d3315..21ca573118 100644 --- a/addons/vector/XEH_preInit.sqf +++ b/addons/vector/XEH_preInit.sqf @@ -6,6 +6,7 @@ PREP(clearDisplay); PREP(convertToTexturesDegree); PREP(convertToTexturesDistance); PREP(convertToTexturesFOS); +PREP(dataTransfer); PREP(showCenter); PREP(showP1); PREP(onKeyDown); diff --git a/addons/vector/functions/fnc_dataTransfer.sqf b/addons/vector/functions/fnc_dataTransfer.sqf new file mode 100644 index 0000000000..25403b82ee --- /dev/null +++ b/addons/vector/functions/fnc_dataTransfer.sqf @@ -0,0 +1,25 @@ +/* + * Author: PabstMirror + * Data transfer over a connected cable. Based on page 14 of pdf. + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_vector_fnc_dataTransfer + * + * Public: No + */ +#include "script_component.hpp" + +private ["_distance", "_direction", "_azimuth", "_inclination"]; + +_distance = call FUNC(getDistance); +_direction = call FUNC(getDirection); +_azimuth = _direction select 0; +_inclination = _direction select 1; +//Send Data to connected GPS +["RangerfinderData", [_distance, _azimuth, _inclination]] call EFUNC(common,localEvent); \ No newline at end of file diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index 57e76d57ea..aca31d95a5 100644 --- a/addons/vector/functions/fnc_onKeyHold.sqf +++ b/addons/vector/functions/fnc_onKeyHold.sqf @@ -74,6 +74,7 @@ switch (_this select 0) do { if (_isReady) then { call FUNC(showDistance); [false] call FUNC(showCenter); + [] call FUNC(dataTransfer); }; [_this select 1] call CBA_fnc_removePerFrameHandler; diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index 1a7da461ca..65ad0568d6 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -7,7 +7,7 @@ statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \ showDisabled = 0; \ priority = 0.3; \ - icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \ + icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ }; \ class ACE_lockVehicle { \ displayName = "$STR_ACE_Vehicle_Action_Lock"; \ @@ -16,7 +16,7 @@ statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \ showDisabled = 0; \ priority = 0.2; \ - icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \ + icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ }; \ class ACE_lockpickVehicle { \ displayName = "$STR_ACE_Vehicle_Action_Lockpick"; \ @@ -58,7 +58,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleInit)); scope = 2; isGlobal = 0; - icon = QUOTE(PATHTOF(ui\IconLock_ca.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleLock_ca.paa)); functionPriority = 0; class Arguments { class LockVehicleInventory { @@ -96,7 +96,7 @@ class CfgVehicles { function = QUOTE(DFUNC(moduleSync)); scope = 2; isGlobal = 0; - icon = QUOTE(PATHTOF(ui\IconLock_ca.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleKey_ca.paa)); functionPriority = 0; class Arguments {}; class ModuleDescription: ModuleDescription { diff --git a/addons/vehiclelock/UI/Icon_Module_VehicleKey_ca.paa b/addons/vehiclelock/UI/Icon_Module_VehicleKey_ca.paa new file mode 100644 index 0000000000..81d5be3672 Binary files /dev/null and b/addons/vehiclelock/UI/Icon_Module_VehicleKey_ca.paa differ diff --git a/addons/vehiclelock/UI/Icon_Module_VehicleLock_ca.paa b/addons/vehiclelock/UI/Icon_Module_VehicleLock_ca.paa new file mode 100644 index 0000000000..c6605f0439 Binary files /dev/null and b/addons/vehiclelock/UI/Icon_Module_VehicleLock_ca.paa differ diff --git a/addons/vehiclelock/script_component.hpp b/addons/vehiclelock/script_component.hpp index 1700ce4b79..43d49a8028 100644 --- a/addons/vehiclelock/script_component.hpp +++ b/addons/vehiclelock/script_component.hpp @@ -1,6 +1,6 @@ #define COMPONENT vehiclelock -#define DEBUG_MODE_FULL +// #define DEBUG_MODE_FULL #include "\z\ace\addons\main\script_mod.hpp" diff --git a/addons/vehiclelock/ui/IconLock_ca.paa b/addons/vehiclelock/ui/IconLock_ca.paa deleted file mode 100644 index 11d6dedf01..0000000000 Binary files a/addons/vehiclelock/ui/IconLock_ca.paa and /dev/null differ diff --git a/addons/vehicles/XEH_postInit.sqf b/addons/vehicles/XEH_postInit.sqf index 7b1a0c575e..8f714105b6 100644 --- a/addons/vehicles/XEH_postInit.sqf +++ b/addons/vehicles/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" if !(hasInterface) exitWith {}; diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index 14c4f1aa51..6dc648d54c 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -1,4 +1,4 @@ -// by CAA-Picard +// by esteldunedain #include "script_component.hpp" if !(hasInterface) exitWith {}; @@ -7,7 +7,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectPistol), localize "STR_ACE_WeaponSelect_SelectPistol", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -21,7 +21,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectRifle), localize "STR_ACE_WeaponSelect_SelectRifle", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -35,7 +35,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectRifleMuzzle), localize "STR_ACE_WeaponSelect_SelectRifleMuzzle", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -49,7 +49,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectLauncher), localize "STR_ACE_WeaponSelect_SelectLauncher", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -63,7 +63,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectBinocular), localize "STR_ACE_WeaponSelect_SelectBinocular", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -77,7 +77,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectGrenadeFrag), localize "STR_ACE_WeaponSelect_SelectGrenadeFrag", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -91,7 +91,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectGrenadeOther), localize "STR_ACE_WeaponSelect_SelectGrenadeOther", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -105,7 +105,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(HolsterWeapon), localize "STR_ACE_WeaponSelect_HolsterWeapon", { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false}; @@ -119,7 +119,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(EngineOn), localize "STR_ACE_WeaponSelect_EngineOn", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {!isEngineOn vehicle ACE_player}) exitWith {false}; @@ -133,7 +133,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(EngineOff), localize "STR_ACE_WeaponSelect_EngineOff", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {isEngineOn vehicle ACE_player}) exitWith {false}; @@ -147,7 +147,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectMainGun), localize "STR_ACE_WeaponSelect_SelectMainGun", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player != vehicle ACE_player) exitWith {false}; @@ -161,7 +161,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectMachineGun), localize "STR_ACE_WeaponSelect_SelectMachineGun", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player != vehicle ACE_player) exitWith {false}; @@ -175,7 +175,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(SelectMissiles), localize "STR_ACE_WeaponSelect_SelectMissiles", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player != vehicle ACE_player) exitWith {false}; @@ -189,7 +189,7 @@ if !(hasInterface) exitWith {}; ["ACE3", QGVAR(FireSmokeLauncher), localize "STR_ACE_WeaponSelect_FireSmokeLauncher", { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if !(ACE_player != vehicle ACE_player && {ACE_player == commander vehicle ACE_player}) exitWith {false}; diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index 0dfb72f353..790dfe7a99 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -8,8 +8,6 @@ PREP(findNextGrenadeMagazine); PREP(findNextGrenadeMuzzle); PREP(fireSmokeLauncher); PREP(getSelectedGrenade); -PREP(getWeaponModes); -PREP(getWeaponMuzzles); PREP(playChangeFiremodeSound); PREP(putWeaponAway); PREP(selectGrenadeAll); diff --git a/addons/weaponselect/config.cpp b/addons/weaponselect/config.cpp index 9bf9c7c39c..80be936e98 100644 --- a/addons/weaponselect/config.cpp +++ b/addons/weaponselect/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","KoffeinFlummi","CAA-Picard"}; + author[] = {"commy2","KoffeinFlummi","esteldunedain"}; authorUrl = "https://github.com/commy2/"; VERSION_CONFIG; }; diff --git a/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf index 4803978902..f73f2444c4 100644 --- a/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Count how many grenade magazines the unit has on the uniform and vest. * diff --git a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf index 4605bd3861..1922ffdbb9 100644 --- a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf +++ b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Display a grenade type and quantity. * diff --git a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf index 14c86f78dd..6b58fc7bc5 100644 --- a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf +++ b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf @@ -5,7 +5,7 @@ private ["_vehicle", "_turret", "_weapons"]; _vehicle = _this select 0; -_turret = [typeOf _vehicle] call EFUNC(common,getTurretCommander); +_turret = [_vehicle] call EFUNC(common,getTurretCommander); _weapons = _vehicle weaponsTurret _turret; diff --git a/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf b/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf index 72977e6ad6..31999ad0b9 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard, commy2 + * Author: esteldunedain, commy2 * * Cycle through all grenades. * diff --git a/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf b/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf index 6eb1714b51..408cf0e608 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard, commy2 + * Author: esteldunedain, commy2 * * Cycle through frags. * diff --git a/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf b/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf index 32c0e43666..c732010a2b 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard, commy2 + * Author: esteldunedain, commy2 * * Cycle through non explosive grenades. * diff --git a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf index 236f934257..aea777d709 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf @@ -29,8 +29,8 @@ if (_weapon in (_unit getVariable [QEGVAR(safemode,safedWeapons), []])) exitWith private ["_muzzles", "_modes"]; -_muzzles = [_weapon] call FUNC(getWeaponMuzzles); -_modes = [_weapon] call FUNC(getWeaponModes); +_muzzles = [_weapon] call EFUNC(common,getWeaponMuzzles); +_modes = [_weapon] call EFUNC(common,getWeaponModes); private ["_index", "_muzzle", "_mode"]; diff --git a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf index 95e5a9a2aa..011108e448 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf @@ -19,7 +19,7 @@ _weapon = _this select 1; if (_weapon == "") exitWith {}; private "_muzzles"; -_muzzles = [_weapon] call FUNC(getWeaponMuzzles); +_muzzles = [_weapon] call EFUNC(common,getWeaponMuzzles); if (currentWeapon _unit != _weapon) exitWith { if (count _muzzles > 1) then { diff --git a/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf index 67ab15e1a7..ced1fa87b3 100644 --- a/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf @@ -1,5 +1,5 @@ /* - * Author: CAA-Picard + * Author: esteldunedain * * Select the next grenade muzzle to throw. * @@ -104,18 +104,18 @@ _throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles" // Readd magazines { for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do { - _unit addItemToUniform (_x select 0); + _unit addItemToUniform (_x select 0); }; } forEach _uniformMagsToRemove; { for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do { - _unit addItemToVest (_x select 0); + _unit addItemToVest (_x select 0); }; } forEach _vestMagsToRemove; { for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do { - _unit addItemToBackpack (_x select 0); + _unit addItemToBackpack (_x select 0); }; } forEach _backPackMagsToRemove; diff --git a/addons/weather/config.cpp b/addons/weather/config.cpp index f59267690f..3f2bb4e15a 100644 --- a/addons/weather/config.cpp +++ b/addons/weather/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { weapons[] = {};// "ACE_Kestrel4500" }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"q1184", "Rocko", "CAA-Picard"}; + author[] = {"q1184", "Rocko", "esteldunedain"}; VERSION_CONFIG; }; }; diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index c610b07f59..ebd37053e3 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -1,5 +1,5 @@ /* - * Author: Ruthberg, CAA-Picard + * Author: Ruthberg, esteldunedain * * Get the weather data for the current map * diff --git a/addons/winddeflection/CfgVehicles.h b/addons/winddeflection/CfgVehicles.hpp similarity index 90% rename from addons/winddeflection/CfgVehicles.h rename to addons/winddeflection/CfgVehicles.hpp index e84727b94e..f6e7b38b4f 100644 --- a/addons/winddeflection/CfgVehicles.h +++ b/addons/winddeflection/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { function = FUNC(enableModule); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(data\module_icon.paa)); + icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa)); class Arguments { class EnableForAI { displayName = "Enable for AI"; diff --git a/addons/winddeflection/UI/Icon_Module_Wind_ca.paa b/addons/winddeflection/UI/Icon_Module_Wind_ca.paa new file mode 100644 index 0000000000..176fe700a7 Binary files /dev/null and b/addons/winddeflection/UI/Icon_Module_Wind_ca.paa differ diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index 972a012a89..3d342d50fe 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -30,4 +30,4 @@ class ACE_Settings { }; #include "CfgEventHandlers.hpp" -#include "CfgVehicles.h" +#include "CfgVehicles.hpp" diff --git a/addons/winddeflection/data/module_icon.paa b/addons/winddeflection/data/module_icon.paa deleted file mode 100644 index f386713736..0000000000 Binary files a/addons/winddeflection/data/module_icon.paa and /dev/null differ diff --git a/extras/assets/icons/Icons_Modules.psd b/extras/assets/icons/Icons_Modules.psd index d240738a19..9dcfa6a38b 100644 Binary files a/extras/assets/icons/Icons_Modules.psd and b/extras/assets/icons/Icons_Modules.psd differ diff --git a/extras/assets/icons/icon_microDAGR.png b/extras/assets/icons/icon_microDAGR.png new file mode 100644 index 0000000000..47bb75a146 Binary files /dev/null and b/extras/assets/icons/icon_microDAGR.png differ diff --git a/extras/assets/icons/png/Icon_Module_Ambient_Sounds_ca.png b/extras/assets/icons/png/Icon_Module_Ambient_Sounds_ca.png new file mode 100644 index 0000000000..9e0ae27b7f Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Ambient_Sounds_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_BFTracking_ca.png b/extras/assets/icons/png/Icon_Module_BFTracking_ca.png new file mode 100644 index 0000000000..af7835ede0 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_BFTracking_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_CheckPBO_ca.png b/extras/assets/icons/png/Icon_Module_CheckPBO_ca.png new file mode 100644 index 0000000000..53f079bd19 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_CheckPBO_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Explosives_ca.png b/extras/assets/icons/png/Icon_Module_Explosives_ca.png new file mode 100644 index 0000000000..d960349cd4 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Explosives_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_FriendlyFire_ca.png b/extras/assets/icons/png/Icon_Module_FriendlyFire_ca.png new file mode 100644 index 0000000000..ad4804fae2 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_FriendlyFire_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Hearing_ca.png b/extras/assets/icons/png/Icon_Module_Hearing_ca.png new file mode 100644 index 0000000000..ad48e0dd57 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Hearing_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Interaction_ca.png b/extras/assets/icons/png/Icon_Module_Interaction_ca.png new file mode 100644 index 0000000000..c6e5b5ac24 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Interaction_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_LSD_ca.png b/extras/assets/icons/png/Icon_Module_LSD_ca.png new file mode 100644 index 0000000000..aba6e67b82 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_LSD_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Make_Unit_Surrender_ca.png b/extras/assets/icons/png/Icon_Module_Make_Unit_Surrender_ca.png new file mode 100644 index 0000000000..a1ab4abaab Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Make_Unit_Surrender_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Map_ca.png b/extras/assets/icons/png/Icon_Module_Map_ca.png new file mode 100644 index 0000000000..651b1c106d Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Map_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Medical_ca.png b/extras/assets/icons/png/Icon_Module_Medical_ca.png new file mode 100644 index 0000000000..a13408e1ea Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Medical_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_NameTags_ca.png b/extras/assets/icons/png/Icon_Module_NameTags_ca.png new file mode 100644 index 0000000000..cea5dd15a6 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_NameTags_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Rallypoint_ca.png b/extras/assets/icons/png/Icon_Module_Rallypoint_ca.png new file mode 100644 index 0000000000..dbeb206ad4 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Rallypoint_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Respawn_ca.png b/extras/assets/icons/png/Icon_Module_Respawn_ca.png new file mode 100644 index 0000000000..a4aa5877e9 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Respawn_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_SwitchUnits_ca.png b/extras/assets/icons/png/Icon_Module_SwitchUnits_ca.png new file mode 100644 index 0000000000..5d897e36c0 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_SwitchUnits_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_VehicleKey_ca.png b/extras/assets/icons/png/Icon_Module_VehicleKey_ca.png new file mode 100644 index 0000000000..7ff1ef0225 Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_VehicleKey_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_VehicleLock_ca.png b/extras/assets/icons/png/Icon_Module_VehicleLock_ca.png new file mode 100644 index 0000000000..3d212c542b Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_VehicleLock_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_Wind_ca.png b/extras/assets/icons/png/Icon_Module_Wind_ca.png new file mode 100644 index 0000000000..9e4612533f Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_Wind_ca.png differ diff --git a/extras/assets/icons/png/Icon_Module_microDAGR_ca.png b/extras/assets/icons/png/Icon_Module_microDAGR_ca.png new file mode 100644 index 0000000000..6010cabe0f Binary files /dev/null and b/extras/assets/icons/png/Icon_Module_microDAGR_ca.png differ diff --git a/extras/assets/selector/selector0.png b/extras/assets/selector/selector0.png new file mode 100644 index 0000000000..f744338e2a Binary files /dev/null and b/extras/assets/selector/selector0.png differ diff --git a/extras/assets/selector/selector1.png b/extras/assets/selector/selector1.png new file mode 100644 index 0000000000..f9b6dd1938 Binary files /dev/null and b/extras/assets/selector/selector1.png differ diff --git a/extras/assets/selector/selector10.png b/extras/assets/selector/selector10.png new file mode 100644 index 0000000000..5cc738dc4a Binary files /dev/null and b/extras/assets/selector/selector10.png differ diff --git a/extras/assets/selector/selector11.png b/extras/assets/selector/selector11.png new file mode 100644 index 0000000000..8fadc4ccee Binary files /dev/null and b/extras/assets/selector/selector11.png differ diff --git a/extras/assets/selector/selector12.png b/extras/assets/selector/selector12.png new file mode 100644 index 0000000000..3267afcd53 Binary files /dev/null and b/extras/assets/selector/selector12.png differ diff --git a/extras/assets/selector/selector13.png b/extras/assets/selector/selector13.png new file mode 100644 index 0000000000..37db70e41a Binary files /dev/null and b/extras/assets/selector/selector13.png differ diff --git a/extras/assets/selector/selector14.png b/extras/assets/selector/selector14.png new file mode 100644 index 0000000000..9521b05c4c Binary files /dev/null and b/extras/assets/selector/selector14.png differ diff --git a/extras/assets/selector/selector2.png b/extras/assets/selector/selector2.png new file mode 100644 index 0000000000..313c788f03 Binary files /dev/null and b/extras/assets/selector/selector2.png differ diff --git a/extras/assets/selector/selector3.png b/extras/assets/selector/selector3.png new file mode 100644 index 0000000000..8268eca772 Binary files /dev/null and b/extras/assets/selector/selector3.png differ diff --git a/extras/assets/selector/selector4.png b/extras/assets/selector/selector4.png new file mode 100644 index 0000000000..5aadafc90e Binary files /dev/null and b/extras/assets/selector/selector4.png differ diff --git a/extras/assets/selector/selector5.png b/extras/assets/selector/selector5.png new file mode 100644 index 0000000000..a1e98e9489 Binary files /dev/null and b/extras/assets/selector/selector5.png differ diff --git a/extras/assets/selector/selector6.png b/extras/assets/selector/selector6.png new file mode 100644 index 0000000000..a1a8e6abcf Binary files /dev/null and b/extras/assets/selector/selector6.png differ diff --git a/extras/assets/selector/selector7.png b/extras/assets/selector/selector7.png new file mode 100644 index 0000000000..2735c5b95a Binary files /dev/null and b/extras/assets/selector/selector7.png differ diff --git a/extras/assets/selector/selector8.png b/extras/assets/selector/selector8.png new file mode 100644 index 0000000000..1ac4b51426 Binary files /dev/null and b/extras/assets/selector/selector8.png differ diff --git a/extras/assets/selector/selector9.png b/extras/assets/selector/selector9.png new file mode 100644 index 0000000000..1d7ed98ce7 Binary files /dev/null and b/extras/assets/selector/selector9.png differ