Merge branch 'master' into explosiveInteraction

Conflicts:
	addons/explosives/functions/fnc_placeExplosive.sqf
This commit is contained in:
Garth L-H de Wet 2015-04-06 22:30:27 +02:00
commit 513ab25f54
276 changed files with 10736 additions and 3372 deletions

View File

@ -6,12 +6,22 @@
# request, preferably including an email address.
# CORE TEAM
bux578 <github@jonathandavid.de>
commy2
esteldunedain <nicolas.d.badano@gmail.com>
Felix Wiegand <koffeinflummi@gmail.com>
Garth "L-H" de Wet <garthofhearts@gmail.com>
bux578 <github@jonathandavid.de>
Giallustio
Glowbal
Janus
Kieran
NouberNou
PabstMirror <pabstmirror@gmail.com>
Ruthberg
tpM
ViperMaul
VKing <kauestad@gmail.com>
Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
11RDP-LoupVert <loupvert@11rdp.fr>

View File

@ -95,29 +95,7 @@ class CfgVehicles {
};
};
class Heli_Attack_01_base_F: Helicopter_Base_F {
lockDetectionSystem = 12;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
class Turrets: Turrets {
class MainTurret: MainTurret {
canEject = 1;
showHMD = 1;
weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM"};
magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"};
};
};
class AnimationSources: AnimationSources {
class Gatling {
weapon = "ACE_gatling_20mm_Comanche";
};
class Muzzle_flash {
weapon = "ACE_gatling_20mm_Comanche";
};
};
};
#include "Heli_Attack_01_base_F.hpp"
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {};
@ -222,7 +200,7 @@ class CfgVehicles {
lockDetectionSystem = 0;
incomingMissileDetectionSystem = 16;
driverCanEject = 1;
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher"};
weapons[] = {"M134_minigun","missiles_DAR","CMFlareLauncher", "ACE_AIR_SAFETY" };
magazines[] = {"5000Rnd_762x51_Yellow_Belt","24Rnd_missiles","168Rnd_CMFlare_Chaff_Magazine"};
class Turrets: Turrets {

View File

@ -4,6 +4,23 @@ class Mode_Burst;
class Mode_FullAuto;
class CfgWeapons {
class RocketPods;
class ACE_AIR_SAFETY : RocketPods
{
CanLock = 0;
displayName = "SAFE";
displayNameMagazine = "SAFE";
shortNameMagazine = "SAFE";
nameSound = "cannon";
cursor = "EmptyCursor";
cursorAim = "EmptyCursor";
magazines[] = {"FakeMagazine"};
burst = 0;
reloadTime = 0.01;
magazineReloadTime = 0.1;
};
// Manual Switching Of Flare Mode
class SmokeLauncher;
class CMFlareLauncher: SmokeLauncher {

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@ ace_aircraft
Changes to air weaponry, flightmodels and HUDs.
* Contributations by Kimi for HUD updates
## Maintainers
@ -10,3 +11,4 @@ The people responsible for merging changes to this component or answering potent
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
- [commy2](https://github.com/commy2)
- [jaynus](https://github.com/walterpearce)

View File

@ -0,0 +1,578 @@
class RscControlsGroup;
class RscText;
class RangeText: RscText{};
class RscPicture;
class RscOpticsText;
class RscIGProgress;
class RscOpticsValue;
class VScrollbar;
class HScrollbar;
class RscLadderPicture;
class RscInGameUI
{
class RscUnitInfo;
class Rsc_ACE_Helo_UI_Turret: RscUnitInfo
{
idd = 300;
controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
class VScrollbar;
class HScrollbar;
class CA_IGUI_elements_group: RscControlsGroup
{
idc = 170;
class VScrollbar: VScrollbar
{
width = 0;
};
class HScrollbar: HScrollbar
{
height = 0;
};
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls
{
class CA_Distance: RscText
{
idc = 151;
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
x = "24.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Speed: RangeText
{
idc = 188;
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "120";
x = "14.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Alt: RangeText
{
idc = 189;
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "3825";
x = "34.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_VisionMode: RscText
{
idc = 152;
style = 0;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "VIS";
x = "12.58 * (0.01875 * SafezoneH)";
y = "8 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_FlirMode: RscText
{
idc = 153;
style = 0;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "BHOT";
x = "15.78 * (0.01875 * SafezoneH)";
y = "8 * (0.025 * SafezoneH)";
w = "4.5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class ValueGrid: RangeText
{
idc = 172;
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "12.20 * (0.01875 * SafezoneH)";
y = "3.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextTADS: RangeText
{
idc = 1010;
text = "TADS";
font = "EtelkaMonospacePro";
style = 2;
shadow = 0;
x = "12.30 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class ValueTime: RangeText
{
idc = 190;
text = "20:28:35";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "12.1 * (0.01875 * SafezoneH)";
y = "6.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class CA_Laser: RscText
{
idc = 158;
style = "0x30 + 0x800";
sizeEx = "0.038*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = PATHTOF(data\Helo_LaserON.paa);
x = "20.45 * (0.01875 * SafezoneH)";
y = "14.1 * (0.025 * SafezoneH)";
w = "12.5 * (0.01875 * SafezoneH)";
h = "12 * (0.025 * SafezoneH)";
};
class CA_Heading: RscText
{
idc = 156;
style = 0;
sizeEx = "0.038*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "023";
x = "24.83 * (0.01875 * SafezoneH)";
y = "6 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
};
};
};
class Rsc_ACE_Helo_UI_01: RscUnitInfo
{
controls[] = {"WeaponInfoControlsGroupRight","CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
};
class Rsc_ACE_Helo_UI_02: RscUnitInfo
{
controls[] = {"CA_TextFlaresMode","CA_TextFlares","CA_VehicleToggles","CA_Radar"};
};
class Rsc_ACE_Drones_UI_Turret: RscUnitInfo
{
idd = 300;
controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
class CA_IGUI_elements_group: RscControlsGroup
{
idc = 170;
class VScrollbar: VScrollbar
{
width = 0;
};
class HScrollbar: HScrollbar
{
height = 0;
};
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls
{
class CA_Distance: RscText
{
idc = 151;
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
x = "24.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Speed: RangeText
{
idc = 188;
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "120";
x = "14.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class CA_Alt: RangeText
{
idc = 189;
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "3825";
x = "34.78 * (0.01875 * SafezoneH)";
y = "30.88 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class ValueTime: RangeText
{
idc = 190;
text = "20:28:35";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "1.75 * (0.01875 * SafezoneH)";
y = "10.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class CA_VisionMode: RscText
{
idc = 152;
style = 0;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "VIS";
align = "right";
x = "2.6 * (0.01875 * SafezoneH)";
y = "12.0 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.0 * (0.025 * SafezoneH)";
};
class CA_FlirMode: RscText
{
idc = 153;
style = 0;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "BHOT";
align = "right";
x = "6.18 * (0.01875 * SafezoneH)";
y = "12.0 * (0.025 * SafezoneH)";
w = "4.5 * (0.01875 * SafezoneH)";
h = "1.0 * (0.025 * SafezoneH)";
};
class TgT_Grid_text: RangeText
{
idc = 1005;
text = "TGT:";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "1.20 * (0.01875 * SafezoneH)";
y = "13.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TGT_ValueGrid: RangeText
{
idc = 172;
font = "EtelkaMonospacePro";
colorText[] = {0.706,0.0745,0.0196,0.8};
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "5.20 * (0.01875 * SafezoneH)";
y = "13.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class OWN_Grid_text: RangeText
{
idc = 1005;
text = "OWN:";
font = "EtelkaMonospacePro";
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "1.20 * (0.01875 * SafezoneH)";
y = "15 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class OWN_ValueGrid: RangeText
{
idc = 171;
font = "EtelkaMonospacePro";
colorText[] = {0.15,1,0.15,0.8};
style = 2;
sizeEx = "0.0295*SafezoneH";
shadow = 0;
x = "5.20 * (0.01875 * SafezoneH)";
y = "15 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class CA_Laser: RscText
{
idc = 158;
style = "0x30 + 0x800";
sizeEx = "0.038*SafezoneH";
shadow = 0;
align = "right";
font = "EtelkaMonospacePro";
text = PATHTOF(data\Helo_LaserON.paa);
x = "20.45 * (0.01875 * SafezoneH)";
y = "14.1 * (0.025 * SafezoneH)";
w = "12.5 * (0.01875 * SafezoneH)";
h = "12 * (0.025 * SafezoneH)";
};
class CA_Heading: RscText
{
idc = 156;
style = 0;
sizeEx = "0.038*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
text = "023";
align = "right";
x = "25 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
};
};
};
class Rsc_ACE_Drones_UI_Pilots: RscUnitInfo
{
idd = 300;
controls[] = {"WeaponInfoControlsGroupRight","CA_BackgroundVehicle","CA_BackgroundVehicleTitle","CA_BackgroundVehicleTitleDark","CA_BackgroundFuel","CA_Vehicle","CA_VehicleRole","CA_HitZones","CA_SpeedBackground","CA_SpeedUnits","CA_Speed","CA_ValueFuel","CA_AltBackground","CA_AltUnits","CA_Alt","CA_VehicleToggles","CA_Radar","DriverOpticsGroup"};
class DriverOpticsGroup: RscControlsGroup
{
idc = 392;
class VScrollbar: VScrollbar
{
width = 0;
};
class HScrollbar: HScrollbar
{
height = 0;
};
x = "0 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 * (0.025 * SafezoneH) + (SafezoneY)";
w = "53.5 * (0.01875 * SafezoneH)";
h = "40 * (0.025 * SafezoneH)";
class controls
{
class TextGrid: RscText
{
style = 0;
sizeEx = "0.02*SafezoneH";
shadow = 0;
font = "EtelkaMonospacePro";
idc = 1005;
text = "GRID:";
x = "5.8 * (0.01875 * SafezoneH)";
y = "31.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class ValueGrid: TextGrid
{
idc = 189;
text = "382546";
x = "10.3 * (0.01875 * SafezoneH)";
y = "31.8 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextTime: TextGrid
{
idc = 1010;
text = "TIME [UTC]:";
x = "5.8 * (0.01875 * SafezoneH)";
y = "32.6 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class ValueTime: TextGrid
{
idc = 101;
text = "20:28:35";
x = "10 * (0.01875 * SafezoneH)";
y = "32.6 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextMag: TextGrid
{
idc = 1011;
text = "CAM MAG:";
x = "5.8 * (0.01875 * SafezoneH)";
y = "7 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class OpticsZoom: TextGrid
{
idc = 192;
text = "28x";
x = "10.3 * (0.01875 * SafezoneH)";
y = "7 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineSpdTop: RscPicture
{
idc = 1203;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "3.343 * (0.01875 * SafezoneH)";
y = "12.4 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineSpdBottom: RscPicture
{
idc = 1207;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "3.343 * (0.01875 * SafezoneH)";
y = "26.5 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineAltTop: RscPicture
{
idc = 1205;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "47.16 * (0.01875 * SafezoneH)";
y = "12.4 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class BorderLineAltBottom: RscPicture
{
idc = 1206;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\border_line_ca.paa";
x = "47.16 * (0.01875 * SafezoneH)";
y = "26.5 * (0.025 * SafezoneH)";
w = "3 * (0.01875 * SafezoneH)";
h = "1 * (0.025 * SafezoneH)";
};
class TextSpd: TextGrid
{
idc = 1004;
text = "SPD";
x = "4.8 * (0.01875 * SafezoneH)";
y = "11.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class SpeedValueBorder: RscPicture
{
idc = 1200;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\altimeter_value_ca.paa";
x = "6.3 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
};
class CA_Speed: TextGrid
{
idc = 190;
sizeEx = "0.03*SafezoneH";
text = "120";
x = "7.5 * (0.01875 * SafezoneH)";
y = "19.5 * (0.025 * SafezoneH)";
w = "6 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class AnalogueSpeed: RscLadderPicture
{
idc = 384;
topValue = 1312;
bottomValue = -345;
visibleRange = -1;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAVspeedLadder_ca.paa";
x = "1.5 * (0.01875 * SafezoneH)";
y = "13 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "14 * (0.025 * SafezoneH)";
};
class TextAlt: TextGrid
{
idc = 1006;
text = "ALT";
x = "46.9 * (0.01875 * SafezoneH)";
y = "11.8 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class AltValueBorder: RscPicture
{
idc = 1201;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\airspeed_value_ca.paa";
x = "42.25 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "5 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
};
class CA_Alt: TextGrid
{
idc = 191;
sizeEx = "0.03*SafezoneH";
style = 1;
text = "3825";
x = "43 * (0.01875 * SafezoneH)";
y = "19.5 * (0.025 * SafezoneH)";
w = "3.2 * (0.01875 * SafezoneH)";
h = "1.2 * (0.025 * SafezoneH)";
};
class AnalogueAlt: RscLadderPicture
{
idc = 385;
topValue = 14430;
bottomValue = -2110;
visibleRange = -1;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\UAValtLadder_ca.paa";
x = "47 * (0.01875 * SafezoneH)";
y = "13 * (0.025 * SafezoneH)";
w = "2.5 * (0.01875 * SafezoneH)";
h = "14 * (0.025 * SafezoneH)";
};
class AnalogueHorizon: RscLadderPicture
{
idc = 383;
topValue = 90;
bottomValue = -90;
visibleRange = -1;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_ladder_ca.paa";
x = "16.75 * (0.01875 * SafezoneH)";
y = "5 * (0.025 * SafezoneH)";
w = "20 * (0.01875 * SafezoneH)";
h = "30 * (0.025 * SafezoneH)";
};
class HorizonCenter: RscPicture
{
idc = 1202;
text = "\A3\Ui_f\data\IGUI\Cfg\HelicopterHUD\horizon_aircraft_ca.paa";
x = "24.75 * (0.01875 * SafezoneH)";
y = "19 * (0.025 * SafezoneH)";
w = "4 * (0.01875 * SafezoneH)";
h = "2 * (0.025 * SafezoneH)";
};
};
};
};
};

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"KoffeinFlummi","Crusty","commy2"};
author[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};
@ -16,3 +16,4 @@ class CfgPatches {
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "RscInGameUI.hpp"

Binary file not shown.

View File

@ -94,7 +94,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
_unit removeAction _actionID;
if (GVAR(placeAction) == 1) then {
_startingPosition = _tempObject modelToWorld [0,0,0];
_startingPosition = _tempObject modelToWorldVisual [0,0,0];
[_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAtachText, _startingPosition] call FUNC(placeApprove);
};
deleteVehicle _tempObject;

View File

@ -25,6 +25,6 @@ _itemName = [_args, 0, ""] call CBA_fnc_defaultParam;
_attachLimit = [6, 1] select (_player == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_playerPos = (ACE_player modelToWorld (ACE_player selectionPosition "pilot"));
_playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"));
(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemName in ((itemsWithMagazines _player) + [""])};

View File

@ -45,7 +45,7 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
// systemChat format ["Trying %1 from %2 start %3", _closeInDistance, [_closeInMax, _closeInMin], _startDistanceFromCenter];
_endPosTestOffset = _startingOffset vectorAdd (_closeInUnitVector vectorMultiply _closeInDistance);
_endPosTestOffset set [2, (_startingOffset select 2)];
_endPosTest = _attachToVehicle modelToWorld _endPosTestOffset;
_endPosTest = _attachToVehicle modelToWorldVisual _endPosTestOffset;
_doesIntersect = false;
{

View File

@ -37,7 +37,7 @@ _sounds = [
QUOTE(PATHTO_R(sounds\zip_out.wav))
];
_position = _target modelToWorld (_target selectionPosition "Spine3");
_position = _target modelToWorldVisual (_target selectionPosition "Spine3");
_position = _position call EFUNC(common,positionToASL);
playSound3D [

View File

@ -0,0 +1,20 @@
class CfgAmmo {
class BulletCore;
class BulletBase: BulletCore {
timeToLive = 15; // Default: 6, doubleplusgood all munition range.
};
class B_20mm : BulletBase {
timeToLive = 30;
};
class B_25mm : BulletBase {
timeToLive = 30;
};
class B_35mm_AA : BulletBase {
timeToLive = 30;
};
class B_30mm_AP : BulletBase {
timeToLive = 30;
};
};

View File

@ -14,3 +14,4 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgAmmo.hpp"

View File

@ -149,11 +149,6 @@ class CfgVehicles {
MACRO_LOADUNLOADCAPTIVE
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
MACRO_LOADUNLOADCAPTIVE
};
class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {

View File

@ -27,7 +27,7 @@ if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
_listedItemClasses = [];
_actions = [localize "STR_ACE_Captives_FriskMenuHeader", localize "STR_ACE_Captives_CancelSelection"] call ACE_Interaction_fnc_prepareSelectMenu;
_actions = [localize "STR_ACE_Captives_FriskMenuHeader", ""] call ACE_Interaction_fnc_prepareSelectMenu;
_allGear = [];

View File

@ -16,15 +16,13 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_isUnconc);
EXPLODE_2_PVT(_this,_unit,_isUnconc);
if (!local _unit) exitWith {};
systemChat format ["med: %1", _this];
if (_isUnconc) then {
//Knocked out: If surrendering, stop
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrendered);
};
} else {

View File

@ -107,4 +107,21 @@ class CfgVehicles {
class TransportItems {};
class TransportBackpacks {};
};
class Item_Base_F;
class ACE_bananaItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = "$STR_ACE_Common_bananaDisplayName";
author = "$STR_ACE_Common_ACETeam";
vehicleClass = "Items";
class TransportItems
{
class ACE_banana
{
name = "ACE_banana";
count = 1;
};
};
};
};

View File

@ -73,6 +73,15 @@ PREP(getStringFromMissionSQM);
PREP(getTargetAzimuthAndInclination);
PREP(getTargetDistance);
PREP(getTargetObject);
PREP(getTurretCommander);
PREP(getTurretConfigPath);
PREP(getTurretCopilot);
PREP(getTurretGunner);
PREP(getTurretIndex);
PREP(getTurrets);
PREP(getTurretsFFV);
PREP(getTurretsOther);
PREP(getTurretDirection);
PREP(getUavControlPosition);
PREP(getVehicleCargo);
PREP(getVehicleCodriver);
@ -81,6 +90,7 @@ PREP(getWeaponAzimuthAndInclination);
PREP(getWeaponIndex);
PREP(getWeaponState);
PREP(getWindDirection);
PREP(getZoom);
PREP(goKneeling);
PREP(hadamardProduct);
PREP(hasItem);

View File

@ -2,7 +2,7 @@
class CfgPatches {
class ADDON {
units[] = {"ACE_Box_Misc"};
units[] = {"ACE_Box_Misc", "ACE_bananaItem"};
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main"};

View File

@ -7,7 +7,6 @@ private ["_eventType", "_event", "_eventName", "_eventArgs", "_eventNames", "_ev
_eventType = _this select 0;
_event = _this select 1;
if(_eventType == "ACEg") then {
_eventName = _event select 0;
_eventArgs = _event select 1;
@ -16,9 +15,18 @@ if(_eventType == "ACEg") then {
_eventIndex = _eventNames find _eventName;
if(_eventIndex != -1) then {
_events = (GVAR(events) select 1) select _eventIndex;
#ifdef DEBUG_EVENTS
diag_log text format[ARR_2("* Net Event %1",_eventName)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
#endif
{
if(!isNil "_x") then {
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
#ifdef DEBUG_EVENTS_CALLSTACK
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
#endif
};
} forEach _events;
};

View File

@ -57,7 +57,7 @@ switch ((_type select 0)) do {
};
} else {
_addedToPlayer = false;
_pos = _unit modelToWorld [0,1,0.05];
_pos = _unit modelToWorldVisual [0,1,0.05];
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
_unit addWeaponCargoGlobal [_classname,1];
_unit setPosATL _pos;
@ -73,7 +73,7 @@ switch ((_type select 0)) do {
};
} else {
_addedToPlayer = false;
_pos = _unit modelToWorld [0,1,0.05];
_pos = _unit modelToWorldVisual [0,1,0.05];
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
_unit addMagazineCargoGlobal [_classname, 1];
_unit setPosATL _pos;
@ -89,7 +89,7 @@ switch ((_type select 0)) do {
};
} else {
_addedToPlayer = false;
_pos = _unit modelToWorld [0,1,0.05];
_pos = _unit modelToWorldVisual [0,1,0.05];
_unit = createVehicle ["WeaponHolder_Single_F",_pos,[],0,"NONE"];
_unit addItemCargoGlobal [_classname,1];
_unit setPosATL _pos;

View File

@ -242,10 +242,10 @@ _fnc_isInRange = {
private ["_unitPosition", "_distance"];
_unitPosition = getPos _unit;
_distance = _unitPosition distance (_vehicle modelToWorld _selectionPosition);
_distance = _unitPosition distance (_vehicle modelToWorldVisual _selectionPosition);
if (!isNil "_selectionPosition2") then {
_distance = _distance min (_unitPosition distance (_vehicle modelToWorld _selectionPosition2));
_distance = _distance min (_unitPosition distance (_vehicle modelToWorldVisual _selectionPosition2));
};
_distance < _radius

View File

@ -36,11 +36,7 @@ if (count _this > 3) then {
};
// don't overwrite more important animations
if (_unit getVariable ["ACE_isUnconscious", false] && {!_force}) exitWith {
if (_animation != "Unconscious") then {
[_unit, "Unconscious", 2] call FUNC(doAnimation);
};
};
if (_unit getVariable ["ACE_isUnconscious", false] && {(_animation != "Unconscious")} && {!_force}) exitWith {};
// don't go unconscious if the unit isn't unconscious
if (_animation == "Unconscious" && {!((_unit getVariable ["ACE_isUnconscious", false]) || (_unit getVariable ["ACE_isDead", false]))}) exitWith {};

View File

@ -2,16 +2,16 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
/*
diag_log text format["REGISTERED ACE PFH HANDLERS"];
diag_log text format["-------------------------------------------"];
if(!isNil "ACE_PFH") then {
if(!isNil "ACE_PFH_COUNTER") then {
{
private["_pfh"];
_pfh = _x select 0;
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
} forEach ACE_PFH;
};*/
} forEach ACE_PFH_COUNTER;
};
diag_log text format["ACE COUNTER RESULTS"];
diag_log text format["-------------------------------------------"];

View File

@ -0,0 +1,37 @@
/*
* Author: jaynus
*
* Get the absolute turret direction for FOV/PIP turret.
*
* Argument:
* 0: Vehicle (Object)
* 1: Turret Position
*
* Return value:
* [position, direction]
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_vehicle,_position);
private ["_turrets", "_turret", "_config", "_turret", "_povPos", "_povDir", "_gunBeginPos", "_gunEndPos", "_pov"];
_turret = [_vehicle, _position] call CBA_fnc_getTurret;
_pov = getText (_turret >> "memoryPointGunnerOptics");
_gunBeg = getText (_turret >> "gunBeg");
_gunEnd = getText (_turret >> "gunEnd");
TRACE_3("", _pov, _gunBeg, _gunEnd);
// Pull the PIP pov or barrel direction, depending on how the model is set up
_povPos = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition _pov ) );
_povDir = [0,0,0];
if(_pov == "pip0_pos") then {
_pipDir = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir" ) );
_povDir = _pipDir vectorDiff _povPos;
} else {
_gunBeginPos = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg ) );
_gunEndPos = ATLtoASL ( _vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd ) );
_povDir = _gunBeginPos vectorDiff _gunEndPos;
};
[_povPos, _povDir]

View File

@ -0,0 +1,14 @@
/*
* Author: commy2
*
* Returns a value depending on current zoom level.
*
* Argument:
* None.
*
* Return value:
* Zoom. (Number)
*/
#include "script_component.hpp"
(0.5 - ((worldToScreen positionCameraToWorld [0,1,1]) select 1)) * (getResolution select 5)

View File

@ -14,7 +14,7 @@ private ["_unit","_return","_aslPos"];
_unit = _this select 0;
_return = false;
if ((surfaceIsWater getPos _unit)) then {
_aslPos = _unit modelToWorld (_unit selectionPosition "head");
_aslPos = _unit modelToWorldVisual (_unit selectionPosition "head");
if ((_aslPos select 2) <= 0) then {
_return = true;
};

View File

@ -15,52 +15,38 @@
GVAR(settings) = [];
// Load settings from main config
_countOptions = count (configFile >> "ACE_Settings");
for "_index" from 0 to (_countOptions - 1) do {
_optionEntry = (configFile >> "ACE_Settings") select _index;
_parseConfigForSettings = {
private ["_config", "_countOptions", "_optionEntry", "_index"];
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
_x set [6, true];
} forEach GVAR(settings);
};
// @todo
// Load settings from server userconfig only if the ACE_ServerSettings is loaded
/*if (isClass (configFile >> "CfgPatches" >> "ACE_ServerSettings")) then {
DFUNC(serverUserConfig) = compile preprocessFileLineNumbers "\userconfig\ACE\ACE_Settings.hpp";
if !(isNil DFUNC(serverUserConfig)) then {
[] call FUNC(serverUserConfig);
_config = _this select 0;
_countOptions = count _config;
for "_index" from 0 to (_countOptions - 1) do {
_optionEntry = _config select _index;
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
if !(missionNamespace getVariable format ["%1_forced", _x]) then {
missionNamespace setVariable format ["%1_forced", _x, true];
publicVariable format ["%1_forced", _name];
};
} forEach GVAR(settingsList);
_x set [6, true];
} forEach GVAR(settings);
};
};*/
// Load settings from mission config
_countOptions = count (missionConfigFile >> "ACE_Settings");
for "_index" from 0 to (_countOptions - 1) do {
_optionEntry = (missionConfigFile >> "ACE_Settings") select _index;
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
_x set [6, true];
} forEach GVAR(settings);
};
// Order is this way because:
// ACE_Settings should never force any setting by default. Loading it first ensures that all settings from ACE_Settings exist.
// This way, ACE_ServerSettings will override ACE_Settings, even if no force is used.
// Mission settings will override the server config settings, if no force is used.
// This ensures that all settings are of their correct type, in case an outdated or corrupt server config is used , as well as have their correct localized display name and description
// Regular config
[configFile >> "ACE_Settings"] call _parseConfigForSettings;
// Server config
[configFile >> "ACE_ServerSettings"] call _parseConfigForSettings;
// mission side settings
[missionConfigFile >> "ACE_Settings"] call _parseConfigForSettings;
// Publish all settings data
publicVariable QGVAR(settings);
// Publish all setting values

View File

@ -12,16 +12,23 @@
*/
#include "script_component.hpp"
_eventName = _this select 0;
_eventArgs = _this select 1;
PARAMS_2(_eventName,_eventArgs);
_eventNames = GVAR(events) select 0;
_eventIndex = _eventNames find _eventName;
if(_eventIndex != -1) then {
_events = (GVAR(events) select 1) select _eventIndex;
#ifdef DEBUG_EVENTS
diag_log text format[ARR_2("* Local Event: %1",_eventName)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
#endif
{
if(!isNil "_x") then {
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Local Event %1 ID: %2",_eventName,_forEachIndex)]);
#ifdef DEBUG_EVENTS_CALLSTACK
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
#endif
};
} forEach _events;
};

View File

@ -16,6 +16,10 @@ private ["_eventName", "_eventArgs"];
_eventName = _this select 0;
_eventArgs = _this select 1;
#ifdef DEBUG_EVENTS
diag_log text format[ARR_2("* Server Event: %1",_eventName)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
#endif
ACEg = [_eventName, _eventArgs];
if(!isServer) then {

View File

@ -21,6 +21,11 @@ _eventName = _this select 0;
_eventTargets = _this select 1;
_eventArgs = _this select 2;
#ifdef DEBUG_EVENTS
diag_log text format[ARR_3("* Target Event: %1 - %2",_eventName,_eventTargets)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
#endif
ACEc = [_eventName, _eventTargets, _eventArgs];
if(!isServer) then {
publicVariableServer "ACEc";

View File

@ -1,351 +1,353 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-16 -->
<!-- Edited with tabler - 2015-04-06 -->
<Project name="ACE">
<Package name="Common">
<Key ID="STR_ACE_Common_ACETeam">
<English>ACE-Team</English>
<German>ACE-Team</German>
<Spanish>ACE-Team</Spanish>
<Polish>ACE-Team</Polish>
<Czech>ACE-Team</Czech>
<French>ACE-Team</French>
<Russian>Команда ACE</Russian>
<Portuguese>ACE-Team</Portuguese>
<Hungarian>ACE-Team</Hungarian>
<Italian>ACE-Team</Italian>
</Key>
<Key ID="STR_ACE_Common_Save">
<English>Save</English>
<German>Speichern</German>
<Spanish>Guardar</Spanish>
<Polish>Zapisz</Polish>
<Czech>Uložit</Czech>
<French>Sauvegarder</French>
<Russian>Сохранить</Russian>
<Portuguese>Salvar</Portuguese>
<Hungarian>Mentés</Hungarian>
<Italian>Salva</Italian>
</Key>
<Key ID="STR_ACE_Common_Cancel">
<English>Cancel</English>
<German>Abbrechen</German>
<Spanish>Cancelar</Spanish>
<Polish>Anuluj</Polish>
<Czech>Zrušit</Czech>
<French>Annuler</French>
<Russian>Отмена</Russian>
<Portuguese>Cancelar</Portuguese>
<Hungarian>Mégse</Hungarian>
<Italian>Annulla</Italian>
</Key>
<Key ID="STR_ACE_Common_Options">
<English>ACE Options</English>
<German>ACE Optionen</German>
<Spanish>Opciones ACE</Spanish>
<Polish>Opcje ACE</Polish>
<Czech>ACE Nastavení</Czech>
<French>ACE Options</French>
<Russian>ACE Настройки</Russian>
<Portuguese>Opções do ACE</Portuguese>
<Hungarian>ACE Opciók</Hungarian>
<Italian>Opzioni ACE</Italian>
</Key>
<!-- These are cardinal directions, in case you didn't guess. -->
<Key ID="STR_ACE_Common_N">
<English>N</English>
<German>N</German>
<Spanish>N</Spanish>
<Polish>N</Polish>
<Czech>S</Czech>
<French>N</French>
<Russian>С</Russian>
<Portuguese>N</Portuguese>
<Hungarian>É</Hungarian>
<Italian>N</Italian>
</Key>
<Key ID="STR_ACE_Common_NNE">
<English>NNE</English>
<German>NNO</German>
<Spanish>NNE</Spanish>
<Polish>NNE</Polish>
<Czech>SSV</Czech>
<French>NNE</French>
<Russian>ССВ</Russian>
<Portuguese>NNE</Portuguese>
<Hungarian>ÉÉK</Hungarian>
<Italian>NNE</Italian>
</Key>
<Key ID="STR_ACE_Common_NE">
<English>NE</English>
<German>NO</German>
<Spanish>NE</Spanish>
<Polish>NE</Polish>
<Czech>SV</Czech>
<French>NE</French>
<Russian>СВ</Russian>
<Portuguese>NE</Portuguese>
<Hungarian>ÉK</Hungarian>
<Italian>NE</Italian>
</Key>
<Key ID="STR_ACE_Common_ENE">
<English>ENE</English>
<German>ONO</German>
<Spanish>ENE</Spanish>
<Polish>ENE</Polish>
<Czech>VSV</Czech>
<French>ENE</French>
<Russian>ВСВ</Russian>
<Portuguese>LNE</Portuguese>
<Hungarian>KÉK</Hungarian>
<Italian>ENE</Italian>
</Key>
<Key ID="STR_ACE_Common_E">
<English>E</English>
<German>O</German>
<Spanish>E</Spanish>
<Polish>E</Polish>
<Czech>V</Czech>
<French>E</French>
<Russian>В</Russian>
<Portuguese>L</Portuguese>
<Hungarian>K</Hungarian>
<Italian>E</Italian>
</Key>
<Key ID="STR_ACE_Common_ESE">
<English>ESE</English>
<German>OSO</German>
<Spanish>ESE</Spanish>
<Polish>ESE</Polish>
<Czech>VJV</Czech>
<French>ESE</French>
<Russian>ВЮВ</Russian>
<Portuguese>LSE</Portuguese>
<Hungarian>KDK</Hungarian>
<Italian>ESE</Italian>
</Key>
<Key ID="STR_ACE_Common_SE">
<English>SE</English>
<German>SO</German>
<Spanish>SE</Spanish>
<Polish>SE</Polish>
<Czech>JV</Czech>
<French>SE</French>
<Russian>ЮВ</Russian>
<Portuguese>SE</Portuguese>
<Hungarian>DK</Hungarian>
<Italian>SE</Italian>
</Key>
<Key ID="STR_ACE_Common_SSE">
<English>SSE</English>
<German>SSO</German>
<Spanish>SSE</Spanish>
<Polish>SSE</Polish>
<Czech>JJV</Czech>
<French>SSE</French>
<Russian>ЮЮВ</Russian>
<Portuguese>SSE</Portuguese>
<Hungarian>DDK</Hungarian>
<Italian>SSE</Italian>
</Key>
<Key ID="STR_ACE_Common_S">
<English>S</English>
<German>S</German>
<Spanish>S</Spanish>
<Polish>S</Polish>
<Czech>J</Czech>
<French>S</French>
<Russian>Ю</Russian>
<Portuguese>S</Portuguese>
<Hungarian>D</Hungarian>
<Italian>S</Italian>
</Key>
<Key ID="STR_ACE_Common_SSW">
<English>SSW</English>
<German>SSW</German>
<Spanish>SSO</Spanish>
<Polish>SSW</Polish>
<Czech>JJZ</Czech>
<French>SSO</French>
<Russian>ЮЮЗ</Russian>
<Portuguese>SSO</Portuguese>
<Hungarian>DDNy</Hungarian>
<Italian>SSO</Italian>
</Key>
<Key ID="STR_ACE_Common_SW">
<English>SW</English>
<German>SW</German>
<Spanish>SO</Spanish>
<Polish>SW</Polish>
<Czech>JZ</Czech>
<French>SO</French>
<Russian>ЮЗ</Russian>
<Portuguese>SO</Portuguese>
<Hungarian>DNy</Hungarian>
<Italian>SO</Italian>
</Key>
<Key ID="STR_ACE_Common_WSW">
<English>WSW</English>
<German>WSW</German>
<Spanish>OSO</Spanish>
<Polish>WSW</Polish>
<Czech>ZJZ</Czech>
<French>OSO</French>
<Russian>ЗЮЗ</Russian>
<Portuguese>OSO</Portuguese>
<Hungarian>NyDNy</Hungarian>
<Italian>OSO</Italian>
</Key>
<Key ID="STR_ACE_Common_W">
<English>W</English>
<German>W</German>
<Spanish>O</Spanish>
<Polish>W</Polish>
<Czech>Z</Czech>
<French>O</French>
<Russian>З</Russian>
<Portuguese>O</Portuguese>
<Hungarian>Ny</Hungarian>
<Italian>O</Italian>
</Key>
<Key ID="STR_ACE_Common_WNW">
<English>WNW</English>
<German>WNW</German>
<Spanish>ONO</Spanish>
<Polish>WNW</Polish>
<Czech>ZSZ</Czech>
<French>ONO</French>
<Russian>ЗСЗ</Russian>
<Portuguese>ONO</Portuguese>
<Hungarian>NyÉNy</Hungarian>
<Italian>ONO</Italian>
</Key>
<Key ID="STR_ACE_Common_NW">
<English>NW</English>
<German>NW</German>
<Spanish>NO</Spanish>
<Polish>NW</Polish>
<Czech>SZ</Czech>
<French>NO</French>
<Russian>СЗ</Russian>
<Portuguese>NO</Portuguese>
<Hungarian>ÉNy</Hungarian>
<Italian>NO</Italian>
</Key>
<Key ID="STR_ACE_Common_NNW">
<English>NNW</English>
<German>NNW</German>
<Spanish>NNO</Spanish>
<Polish>NNW</Polish>
<Czech>SSZ</Czech>
<French>NNO</French>
<Russian>ССЗ</Russian>
<Portuguese>NNO</Portuguese>
<Hungarian>ÉÉNy</Hungarian>
<Italian>NNO</Italian>
</Key>
<Key ID="STR_ACE_Common_ActionAborted">
<English>Action cancelled.</English>
<German>Aktion abgebrochen.</German>
<Spanish>Acción cancelada.</Spanish>
<Polish>Przerwano czynność</Polish>
<Czech>Akce přerušena</Czech>
<French>Action annulée.</French>
<Russian>Действие отменено.</Russian>
<Portuguese>Ação cancelada.</Portuguese>
<Hungarian>Művelet megszakítva.</Hungarian>
<Italian>Azione cancellata.</Italian>
</Key>
<Key ID="STR_ACE_Common_MiscItems">
<English>[ACE] Miscellaneous Items</English>
<German>[ACE] Verschiedenes</German>
<Spanish>[ACE] Objetos varios</Spanish>
<Polish>[ACE] Różne przedmioty</Polish>
<Czech>[ACE] Ostatní předměty</Czech>
<French>[ACE] Objets divers</French>
<Russian>[ACE] Различные предметы</Russian>
<Portuguese>[ACE] Itens diversos</Portuguese>
<Hungarian>[ACE] Egyéb tárgyak</Hungarian>
<Italian>[ACE] Oggetti vari</Italian>
</Key>
<Key ID="STR_ACE_Common_EnableNumberHotkeys">
<English>Disable Command Menu</English>
<German>Befehlsmenü ausschalten</German>
<Spanish>Desactivar menú de mando</Spanish>
<Polish>Wyłącz menu dowodzenia</Polish>
<Czech>Vypnout velící menu</Czech>
<French>Désactiver Menu Commande</French>
<Russian>Выключить командное меню</Russian>
<Hungarian>Parancsnoki menü kikapcsolása</Hungarian>
</Key>
<Key ID="STR_ACE_Common_Unknown">
<English>Unknown</English>
<German>Unbekannt</German>
<Spanish>Desconocido</Spanish>
<Polish>Nieznany</Polish>
<Czech>Neznámý</Czech>
<Russian>Неизвестно</Russian>
<Hungarian>Ismeretlen</Hungarian>
</Key>
<Key ID="STR_ACE_Common_NoVoice">
<English>No Voice</English>
<German>Keine Stimme</German>
<Spanish>Sin voz</Spanish>
<Polish>Brak głosu</Polish>
<Czech>Žádný hlas</Czech>
<Russian>Без голоса</Russian>
<Hungarian>Nincs hang</Hungarian>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TITLE">
<Original>Accept Requests</Original>
<Polish>Akceptuj prośby</Polish>
<Spanish>Aceptar Peticiones</Spanish>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TITLE">
<Original>Decline Requests</Original>
<Polish>Ignoruj prośby</Polish>
<Spanish>Rechazar Peticiones</Spanish>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TOOLTIP">
<Original>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP">
<Original>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsName">
<English>Feedback icons</English>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsDesc">
<English>Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed.</English>
</Key>
<Key ID="STR_ACE_Common_SettingProgressbarLocationName">
<English>Progress bar location</English>
</Key>
<Key ID="STR_ACE_Common_SettingProgressbarLocationDesc">
<English>Set the desired location of the progress bar on your screen.</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextColorName">
<English>Hint Background color</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextColorDesc">
<English>The color of the background from the ACE hints.</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextFontColorName">
<English>Hint text font color</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextFontColorDesc">
<English>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.</English>
</Key>
<Key ID="STR_ACE_Common_bananaDisplayName">
<English>Banana</English>
</Key>
<Key ID="STR_ACE_Common_bananaDescr">
<English>A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa.</English>
</Key>
</Package>
<Package name="Common">
<Key ID="STR_ACE_Common_ACETeam">
<English>ACE-Team</English>
<German>ACE-Team</German>
<Spanish>ACE-Team</Spanish>
<Polish>ACE-Team</Polish>
<Czech>ACE-Team</Czech>
<French>ACE-Team</French>
<Russian>Команда ACE</Russian>
<Portuguese>ACE-Team</Portuguese>
<Hungarian>ACE-Team</Hungarian>
<Italian>ACE-Team</Italian>
</Key>
<Key ID="STR_ACE_Common_Save">
<English>Save</English>
<German>Speichern</German>
<Spanish>Guardar</Spanish>
<Polish>Zapisz</Polish>
<Czech>Uložit</Czech>
<French>Sauvegarder</French>
<Russian>Сохранить</Russian>
<Portuguese>Salvar</Portuguese>
<Hungarian>Mentés</Hungarian>
<Italian>Salva</Italian>
</Key>
<Key ID="STR_ACE_Common_Cancel">
<English>Cancel</English>
<German>Abbrechen</German>
<Spanish>Cancelar</Spanish>
<Polish>Anuluj</Polish>
<Czech>Zrušit</Czech>
<French>Annuler</French>
<Russian>Отмена</Russian>
<Portuguese>Cancelar</Portuguese>
<Hungarian>Mégse</Hungarian>
<Italian>Annulla</Italian>
</Key>
<Key ID="STR_ACE_Common_Options">
<English>ACE Options</English>
<German>ACE Optionen</German>
<Spanish>Opciones ACE</Spanish>
<Polish>Opcje ACE</Polish>
<Czech>ACE Nastavení</Czech>
<French>ACE Options</French>
<Russian>ACE Настройки</Russian>
<Portuguese>Opções do ACE</Portuguese>
<Hungarian>ACE Opciók</Hungarian>
<Italian>Opzioni ACE</Italian>
</Key>
<!-- These are cardinal directions, in case you didn't guess. -->
<Key ID="STR_ACE_Common_N">
<English>N</English>
<German>N</German>
<Spanish>N</Spanish>
<Polish>N</Polish>
<Czech>S</Czech>
<French>N</French>
<Russian>С</Russian>
<Portuguese>N</Portuguese>
<Hungarian>É</Hungarian>
<Italian>N</Italian>
</Key>
<Key ID="STR_ACE_Common_NNE">
<English>NNE</English>
<German>NNO</German>
<Spanish>NNE</Spanish>
<Polish>NNE</Polish>
<Czech>SSV</Czech>
<French>NNE</French>
<Russian>ССВ</Russian>
<Portuguese>NNE</Portuguese>
<Hungarian>ÉÉK</Hungarian>
<Italian>NNE</Italian>
</Key>
<Key ID="STR_ACE_Common_NE">
<English>NE</English>
<German>NO</German>
<Spanish>NE</Spanish>
<Polish>NE</Polish>
<Czech>SV</Czech>
<French>NE</French>
<Russian>СВ</Russian>
<Portuguese>NE</Portuguese>
<Hungarian>ÉK</Hungarian>
<Italian>NE</Italian>
</Key>
<Key ID="STR_ACE_Common_ENE">
<English>ENE</English>
<German>ONO</German>
<Spanish>ENE</Spanish>
<Polish>ENE</Polish>
<Czech>VSV</Czech>
<French>ENE</French>
<Russian>ВСВ</Russian>
<Portuguese>LNE</Portuguese>
<Hungarian>KÉK</Hungarian>
<Italian>ENE</Italian>
</Key>
<Key ID="STR_ACE_Common_E">
<English>E</English>
<German>O</German>
<Spanish>E</Spanish>
<Polish>E</Polish>
<Czech>V</Czech>
<French>E</French>
<Russian>В</Russian>
<Portuguese>L</Portuguese>
<Hungarian>K</Hungarian>
<Italian>E</Italian>
</Key>
<Key ID="STR_ACE_Common_ESE">
<English>ESE</English>
<German>OSO</German>
<Spanish>ESE</Spanish>
<Polish>ESE</Polish>
<Czech>VJV</Czech>
<French>ESE</French>
<Russian>ВЮВ</Russian>
<Portuguese>LSE</Portuguese>
<Hungarian>KDK</Hungarian>
<Italian>ESE</Italian>
</Key>
<Key ID="STR_ACE_Common_SE">
<English>SE</English>
<German>SO</German>
<Spanish>SE</Spanish>
<Polish>SE</Polish>
<Czech>JV</Czech>
<French>SE</French>
<Russian>ЮВ</Russian>
<Portuguese>SE</Portuguese>
<Hungarian>DK</Hungarian>
<Italian>SE</Italian>
</Key>
<Key ID="STR_ACE_Common_SSE">
<English>SSE</English>
<German>SSO</German>
<Spanish>SSE</Spanish>
<Polish>SSE</Polish>
<Czech>JJV</Czech>
<French>SSE</French>
<Russian>ЮЮВ</Russian>
<Portuguese>SSE</Portuguese>
<Hungarian>DDK</Hungarian>
<Italian>SSE</Italian>
</Key>
<Key ID="STR_ACE_Common_S">
<English>S</English>
<German>S</German>
<Spanish>S</Spanish>
<Polish>S</Polish>
<Czech>J</Czech>
<French>S</French>
<Russian>Ю</Russian>
<Portuguese>S</Portuguese>
<Hungarian>D</Hungarian>
<Italian>S</Italian>
</Key>
<Key ID="STR_ACE_Common_SSW">
<English>SSW</English>
<German>SSW</German>
<Spanish>SSO</Spanish>
<Polish>SSW</Polish>
<Czech>JJZ</Czech>
<French>SSO</French>
<Russian>ЮЮЗ</Russian>
<Portuguese>SSO</Portuguese>
<Hungarian>DDNy</Hungarian>
<Italian>SSO</Italian>
</Key>
<Key ID="STR_ACE_Common_SW">
<English>SW</English>
<German>SW</German>
<Spanish>SO</Spanish>
<Polish>SW</Polish>
<Czech>JZ</Czech>
<French>SO</French>
<Russian>ЮЗ</Russian>
<Portuguese>SO</Portuguese>
<Hungarian>DNy</Hungarian>
<Italian>SO</Italian>
</Key>
<Key ID="STR_ACE_Common_WSW">
<English>WSW</English>
<German>WSW</German>
<Spanish>OSO</Spanish>
<Polish>WSW</Polish>
<Czech>ZJZ</Czech>
<French>OSO</French>
<Russian>ЗЮЗ</Russian>
<Portuguese>OSO</Portuguese>
<Hungarian>NyDNy</Hungarian>
<Italian>OSO</Italian>
</Key>
<Key ID="STR_ACE_Common_W">
<English>W</English>
<German>W</German>
<Spanish>O</Spanish>
<Polish>W</Polish>
<Czech>Z</Czech>
<French>O</French>
<Russian>З</Russian>
<Portuguese>O</Portuguese>
<Hungarian>Ny</Hungarian>
<Italian>O</Italian>
</Key>
<Key ID="STR_ACE_Common_WNW">
<English>WNW</English>
<German>WNW</German>
<Spanish>ONO</Spanish>
<Polish>WNW</Polish>
<Czech>ZSZ</Czech>
<French>ONO</French>
<Russian>ЗСЗ</Russian>
<Portuguese>ONO</Portuguese>
<Hungarian>NyÉNy</Hungarian>
<Italian>ONO</Italian>
</Key>
<Key ID="STR_ACE_Common_NW">
<English>NW</English>
<German>NW</German>
<Spanish>NO</Spanish>
<Polish>NW</Polish>
<Czech>SZ</Czech>
<French>NO</French>
<Russian>СЗ</Russian>
<Portuguese>NO</Portuguese>
<Hungarian>ÉNy</Hungarian>
<Italian>NO</Italian>
</Key>
<Key ID="STR_ACE_Common_NNW">
<English>NNW</English>
<German>NNW</German>
<Spanish>NNO</Spanish>
<Polish>NNW</Polish>
<Czech>SSZ</Czech>
<French>NNO</French>
<Russian>ССЗ</Russian>
<Portuguese>NNO</Portuguese>
<Hungarian>ÉÉNy</Hungarian>
<Italian>NNO</Italian>
</Key>
<Key ID="STR_ACE_Common_ActionAborted">
<English>Action cancelled.</English>
<German>Aktion abgebrochen.</German>
<Spanish>Acción cancelada.</Spanish>
<Polish>Przerwano czynność</Polish>
<Czech>Akce přerušena</Czech>
<French>Action annulée.</French>
<Russian>Действие отменено.</Russian>
<Portuguese>Ação cancelada.</Portuguese>
<Hungarian>Művelet megszakítva.</Hungarian>
<Italian>Azione cancellata.</Italian>
</Key>
<Key ID="STR_ACE_Common_MiscItems">
<English>[ACE] Miscellaneous Items</English>
<German>[ACE] Verschiedenes</German>
<Spanish>[ACE] Objetos varios</Spanish>
<Polish>[ACE] Różne przedmioty</Polish>
<Czech>[ACE] Ostatní předměty</Czech>
<French>[ACE] Objets divers</French>
<Russian>[ACE] Различные предметы</Russian>
<Portuguese>[ACE] Itens diversos</Portuguese>
<Hungarian>[ACE] Egyéb tárgyak</Hungarian>
<Italian>[ACE] Oggetti vari</Italian>
</Key>
<Key ID="STR_ACE_Common_EnableNumberHotkeys">
<English>Disable Command Menu</English>
<German>Befehlsmenü ausschalten</German>
<Spanish>Desactivar menú de mando</Spanish>
<Polish>Wyłącz menu dowodzenia</Polish>
<Czech>Vypnout velící menu</Czech>
<French>Désactiver Menu Commande</French>
<Russian>Выключить командное меню</Russian>
<Hungarian>Parancsnoki menü kikapcsolása</Hungarian>
</Key>
<Key ID="STR_ACE_Common_Unknown">
<English>Unknown</English>
<German>Unbekannt</German>
<Spanish>Desconocido</Spanish>
<Polish>Nieznany</Polish>
<Czech>Neznámý</Czech>
<Russian>Неизвестно</Russian>
<Hungarian>Ismeretlen</Hungarian>
</Key>
<Key ID="STR_ACE_Common_NoVoice">
<English>No Voice</English>
<German>Keine Stimme</German>
<Spanish>Sin voz</Spanish>
<Polish>Brak głosu</Polish>
<Czech>Žádný hlas</Czech>
<Russian>Без голоса</Russian>
<Hungarian>Nincs hang</Hungarian>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TITLE">
<Original>Accept Requests</Original>
<Polish>Akceptuj prośby</Polish>
<Spanish>Aceptar Peticiones</Spanish>
<English>Accept Requests</English>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TITLE">
<Original>Decline Requests</Original>
<Polish>Ignoruj prośby</Polish>
<Spanish>Rechazar Peticiones</Spanish>
<English>Decline Requests</English>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TOOLTIP">
<Original>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP">
<Original>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsName">
<English>Feedback icons</English>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsDesc">
<English>Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed.</English>
</Key>
<Key ID="STR_ACE_Common_SettingProgressbarLocationName">
<English>Progress bar location</English>
</Key>
<Key ID="STR_ACE_Common_SettingProgressbarLocationDesc">
<English>Set the desired location of the progress bar on your screen.</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextColorName">
<English>Hint Background color</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextColorDesc">
<English>The color of the background from the ACE hints.</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextFontColorName">
<English>Hint text font color</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextFontColorDesc">
<English>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.</English>
</Key>
<Key ID="STR_ACE_Common_bananaDisplayName">
<English>Banana</English>
</Key>
<Key ID="STR_ACE_Common_bananaDescr">
<English>A banana is an edible fruit, botanically a berry, produced by several kinds of large herbaceous flowering plants in the genus Musa.</English>
</Key>
</Package>
</Project>

View File

@ -23,11 +23,6 @@ class Extended_Init_EventHandlers {
init = QUOTE(_this call DFUNC(initObject));
};
};
class StaticMortar {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ReammoBox_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));

View File

@ -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]} && {animationState _target in ["", "unconscious"]}
alive _target && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false])}

View File

@ -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]} && {animationState _target in ["", "unconscious"]}
alive _target && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getvariable ["ACE_isUnconscious", false])}

View File

@ -36,7 +36,7 @@ if (_target isKindOf "CAManBase") then {
// add height offset of model
private "_offset";
_offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2);
_offset = (_target modelToWorldVisual [0, 0, 0] select 2) - (_unit modelToWorldVisual [0, 0, 0] select 2);
_position = _position vectorAdd [0, 0, _offset];

View File

@ -25,7 +25,7 @@ _direction = _target getVariable [QGVAR(dragDirection), 0];
// add height offset of model
private "_offset";
_offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2);
_offset = (_target modelToWorldVisual [0, 0, 0] select 2) - (_unit modelToWorldVisual [0, 0, 0] select 2);
_position = _position vectorAdd [0, 0, _offset];

View File

@ -36,7 +36,7 @@ if (_carriedItem isKindOf "CAManBase") exitWith {false};
private ["_position", "_maxHeight"];
_position = getPosATL _carriedItem;
_maxHeight = (_unit ModelToWorld [0,0,0]) select 2;
_maxHeight = (_unit modelToWorldVisual [0,0,0]) select 2;
_position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) max _maxHeight];

View File

@ -56,11 +56,12 @@ if (_target isKindOf "CAManBase") then {
[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus);
// prevent multiple players from accessing the same object
[_unit, _target, true] call EFUNC(common,claim);
};
// 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];

View File

@ -19,7 +19,7 @@
#include "script_component.hpp"
EXPLODE_4_PVT(_this select 0,_unit,_i,_arr,_code);
if ((_i mod 4) == 0) then {
playSound3D [QUOTE(PATHTO_R(Data\Audio\DialTone.wss)), objNull, false, (_unit ModelToWorld [0,0.2,2]), 15,1,2.5];
playSound3D [QUOTE(PATHTO_R(Data\Audio\DialTone.wss)), objNull, false, (_unit modelToWorldVisual [0,0.2,2]), 15,1,2.5];
};
ctrlSetText [1400,format["Calling%1",_arr select (_i - 4)]];

View File

@ -15,7 +15,7 @@
* Placed explosive <OBJECT>
*
* Example:
* _explosive = [player, player modelToWorld [0,0.5, 0.1], 134,
* _explosive = [player, player modelToWorldVisual [0,0.5, 0.1], 134,
* "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_placeExplosive;
*
* Public: Yes

View File

@ -5,3 +5,6 @@ GVAR(time) = 0;
GVAR(position) = [0,0,0];
#include "initKeybinds.sqf"
// Register event for global updates
[QGVAR(forceUpdate), FUNC(onForceUpdate)] call ace_common_fnc_addEventHandler;

View File

@ -10,6 +10,7 @@ PREP(firedEH);
PREP(getAngle);
PREP(getRange);
PREP(handleAirBurstAmmunitionPFH);
PREP(onForceUpdate);
PREP(keyDown);
PREP(keyUp);
PREP(reset);

View File

@ -12,7 +12,7 @@
#include "script_component.hpp"
private ["_vehicle", "_turret", "_turretConfig", "_distance", "_magazines"];
private ["_vehicle", "_turret", "_turretConfig", "_distance", "_magazines", "_userChange"];
_vehicle = _this select 0;
_turret = _this select 1;
@ -46,7 +46,9 @@ if (_weaponDirection isEqualTo [0,0,0]) then { // dummy value for non main turr
_angleTarget = asin (_weaponDirection select 2);
if (count _this > 2) then {
_distance = _this select 2;
if((_this select 2) > -1) then {
_distance = _this select 2;
};
};
if (!(isNil QGVAR(backgroundCalculation)) and {!(scriptDone GVAR(backgroundCalculation))}) then {
@ -160,4 +162,11 @@ _FCSElevation = [];
[_vehicle, format ["%1_%2", QGVAR(Elevation), _turret], _FCSElevation] call EFUNC(common,setVariablePublic);
[_vehicle, format ["%1_%2", QGVAR(Azimuth), _turret], _FCSAzimuth] call EFUNC(common,setVariablePublic);
[format ["%1: %2", localize "STR_ACE_FCS_ZeroedTo", _distance]] call EFUNC(common,displayTextStructured);
_userChange = true;
if( (count _this) > 3) then {
_userChange = _this select 3;
};
if(_userChange) then {
[format ["%1: %2", localize "STR_ACE_FCS_ZeroedTo", _distance]] call EFUNC(common,displayTextStructured);
};

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -1, false] call FUNC(keyDown);
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -1, false] call FUNC(keyUp);

View File

@ -89,7 +89,7 @@ _gRedOut = MINVIRTUALG / _classCoef;
// @todo: Sort the interaction with medical
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
[ACE_player, (10 + floor(random 5))] call EFUNC(medical,knockOut);
[ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious);
};
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];

View File

@ -1,6 +1,8 @@
//XEH_clientInit.sqf
#include "script_component.hpp"
if (!hasInterface) exitWith {};
// Install the render EH on the main display
addMissionEventHandler ["Draw3D", DFUNC(render)];
@ -10,17 +12,41 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
// Wait until the map display is detected
waitUntil {(!isNull findDisplay 12)};
// Install the render EH on the map screen
// Install the render EH on the map screen
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", DFUNC(render)];
};
["ACE3", QGVAR(InteractKey), "Interact Key",
{[0] call FUNC(keyDown)},
["ACE3", QGVAR(InteractKey), (localize "STR_ACE_Interact_Menu_InteractKey"),
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[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",
{[1] call FUNC(keyDown)},
["ACE3", QGVAR(SelfInteractKey), (localize "STR_ACE_Interact_Menu_SelfInteractKey"),
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[1] call FUNC(keyDown)
},
{[1] call FUNC(keyUp)},
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
// Listens for the falling unconscious event, just in case the menu needs to be closed
["medical_onUnconscious", {
// If no menu is open just quit
if (GVAR(openedMenuType) < 0) exitWith {};
EXPLODE_2_PVT(_this,_unit,_isUnconscious);
if (_unit != ACE_player || !_isUnconscious) exitWith {};
GVAR(actionSelected) = false;
[] call FUNC(keyUp);
}] call EFUNC(common,addEventhandler);

View File

@ -83,11 +83,19 @@ private ["_baseDisplayName", "_baseIcon"];
_baseDisplayName = "";
_baseIcon = "";
if (_objectType isKindOf "CAManBase") then {
_baseDisplayName = "Self Actions";
_baseDisplayName = localize "STR_ACE_Interact_Menu_SelfActionsRoot";
_baseIcon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
} else {
_baseDisplayName = getText (configFile >> "CfgVehicles" >> _objectType >> "displayName");
//Alt would be to just use a static text, if veh names end up being too long:
// _baseDisplayName = localize "STR_ACE_Interact_Menu_VehicleActionsRoot";
//Pull the icon from the vehicle's config:
_baseIcon = getText (configFile >> "CfgVehicles" >> _objectType >> "Icon");
//icon could be a CfgVehicleIcons
if isText (configFile >> "CfgVehicleIcons" >> _baseIcon) then {
_baseIcon = getText (configFile >> "CfgVehicleIcons" >> _baseIcon);
};
};
// Create a master action to base on self action

View File

@ -89,7 +89,7 @@ _fnc_renderSelfActions = {
{
_action = _x;
_pos = if !(visibleMap) then {
_pos = if !(GVAR(useCursorMenu)) then {
(((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)) vectorAdd GVAR(selfMenuOffset)) call EFUNC(common,ASLToPosition)
} else {
[0.5, 0.5]

View File

@ -28,24 +28,22 @@ if((count _this) > 2) then {
_pos = _this select 2;
} else {
if(typeName (_actionData select 7) == "ARRAY") then {
_pos = _object modelToWorld (_actionData select 7);
_pos = _object modelToWorldVisual (_actionData select 7);
} else {
if ((_actionData select 7) == "weapon") then {
// Craft a suitable position for weapon interaction
_weaponDir = _object weaponDirection currentWeapon _object;
_ref = _weaponDir call EFUNC(common,createOrthonormalReference);
_pos = (_object modelToWorld (_object selectionPosition "righthand")) vectorAdd ((_ref select 2) vectorMultiply 0.1);
_pos = (_object modelToWorldVisual (_object selectionPosition "righthand")) vectorAdd ((_ref select 2) vectorMultiply 0.1);
} else {
_pos = _object modelToWorld (_object selectionPosition (_actionData select 7));
_pos = _object modelToWorldVisual (_object selectionPosition (_actionData select 7));
};
};
// Compensate for movement during the frame to get rid of jittering
_pos = _pos vectorAdd ((visiblePositionASL _object) vectorDiff (getPosASL _object));
};
// For non-self actions, exit if the action is too far away
if (GVAR(openedMenuType) == 0 && vehicle ACE_player == ACE_player &&
{(ACE_player modelToWorld (ACE_player selectionPosition "pilot")) distance _pos >= _distance}) exitWith {false};
{(ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")) distance _pos >= _distance}) exitWith {false};
// Exit if the action is behind you
_sPos = if (count _pos != 2) then {

View File

@ -35,7 +35,7 @@ GVAR(iconCount) = GVAR(iconCount) + 1;
if(_icon == "") then {
_icon = DEFAULT_ICON;
};
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center'>%4</t>", _icon, _color, _color, _text];
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='1' shadowColor='#000000' shadowOffset='0.07'>%4</t>", _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];

View File

@ -1,7 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2015-04-03 -->
<Project name="ACE">
<Package name="Interact_Menu">
<Key ID="STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction">
<English>Always display cursor for self interaction</English>
</Key>
</Project>
<Key ID="STR_ACE_Interact_Menu_InteractKey">
<English>Interact Key</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_SelfInteractKey">
<English>Self Interaction Key</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_SelfActionsRoot">
<English>Self Actions</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_VehicleActionsRoot">
<English>Vehicle Actions</English>
</Key>
</Package>
</Project>

View File

@ -525,26 +525,6 @@ class CfgVehicles {
};
};
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
class ACE_Actions {
class ACE_MainActions {
displayName = "$STR_ACE_Interaction_MainAction";
selection = "gunnerview";
distance = 2;
condition = "true";
};
};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class thingX;
class ReammoBox_F: thingX {
class ACE_Actions {

View File

@ -16,8 +16,6 @@
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
diag_log "addPassengerActions";
private ["_unit","_actions"];
_unit = _parameters select 0;

View File

@ -13,10 +13,12 @@ if (_target != ACE_player) exitWith {
addCamShake [4, 0.5, 5];
private "_message";
//localize is converting the escaped <> symbols, so just add them here instead of in the stringtable
if (_shoulderNum == 0) then {
_message = localize "STR_ACE_Interaction_YouWereTappedRight";
_message = format ["%1 &gt;", (localize "STR_ACE_Interaction_YouWereTappedRight")];
} else {
_message = localize "STR_ACE_Interaction_YouWereTappedLeft";
_message = format ["&lt; %1", (localize "STR_ACE_Interaction_YouWereTappedLeft")];
};
[_message] call EFUNC(common,displayTextStructured);
[parseText _message] call EFUNC(common,displayTextStructured);

View File

@ -363,28 +363,28 @@
<Italian>Dai un colpetto</Italian>
</Key>
<Key ID="STR_ACE_Interaction_YouWereTappedRight">
<English>You were tapped on the RIGHT shoulder &gt;</English>
<Spanish>Te tocaron el hombro DERECHO &gt;</Spanish>
<German>Dir wurde auf die Schulter geklopft &gt;</German>
<French>On te tape sur l'épaule &gt;</French>
<Polish>Zostałeś klepnięty po ramieniu &gt;</Polish>
<Hungarian>Vállonveregettek &gt;</Hungarian>
<Czech>Někdo tě poklepal na rameno &gt;</Czech>
<Russian>Вас похлопали по плечу &gt;</Russian>
<Portuguese>Você foi tocado no ombro &gt;</Portuguese>
<Italian>Ti è stato dato un colpetto sulla spalla &gt;</Italian>
<English>You were tapped on the RIGHT shoulder</English>
<Spanish>Te tocaron el hombro DERECHO</Spanish>
<German>Dir wurde auf die Schulter geklopft</German>
<French>On te tape sur l'épaule</French>
<Polish>Zostałeś klepnięty po ramieniu</Polish>
<Hungarian>Vállonveregettek</Hungarian>
<Czech>Někdo tě poklepal na rameno</Czech>
<Russian>Вас похлопали по плечу</Russian>
<Portuguese>Você foi tocado no ombro</Portuguese>
<Italian>Ti è stato dato un colpetto sulla spalla</Italian>
</Key>
<Key ID="STR_ACE_Interaction_YouWereTappedLeft">
<English>&lt; You were tapped on the LEFT shoulder.</English>
<Spanish>&lt; Te tocaron el hombro IZQUIERDO.</Spanish>
<German>&lt; Dir wurde auf die Schulter geklopft</German>
<French>&lt; On te tape sur l'épaule.</French>
<Polish>&lt; Zostałeś klepnięty po ramieniu</Polish>
<Hungarian>&lt; Vállonveregettek</Hungarian>
<Czech>&lt; Někdo tě poklepal na rameno.</Czech>
<Russian>&lt; Вас похлопали по плечу</Russian>
<Portuguese>&lt; Você foi tocado no ombro.</Portuguese>
<Italian>&lt; Ti è stato dato un colpetto sulla spalla</Italian>
<English>You were tapped on the LEFT shoulder.</English>
<Spanish>Te tocaron el hombro IZQUIERDO.</Spanish>
<German>Dir wurde auf die Schulter geklopft</German>
<French>On te tape sur l'épaule.</French>
<Polish>Zostałeś klepnięty po ramieniu</Polish>
<Hungarian>Vállonveregettek</Hungarian>
<Czech>Někdo tě poklepal na rameno.</Czech>
<Russian>Вас похлопали по плечу</Russian>
<Portuguese>Você foi tocado no ombro.</Portuguese>
<Italian>Ti è stato dato un colpetto sulla spalla</Italian>
</Key>
<Key ID="STR_ACE_Interaction_CancelSelection">
<English>Cancel</English>

View File

@ -1,11 +1,11 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
};
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 ADDON {
init = QUOTE(call COMPILE_FILE(XEH_post_init));
};
};

View File

@ -1,9 +1,9 @@
class CfgVehicles {
class All;
class All;
class LaserTarget: All {
class EventHandlers {
init = QUOTE(_this call FUNC(laser_init));
};
};
class LaserTarget: All {
class EventHandlers {
init = QUOTE(_this call FUNC(laser_init));
};
};
};

View File

@ -14,7 +14,7 @@ PREP(translateToWeaponSpace);
PREP(laser_init);
GVAR(laser) = nil; // a single hud draws 1 laser at a time
GVAR(laser) = nil; // a single hud draws 1 laser at a time
PREP(laserTargetPFH);

View File

@ -1,13 +1,13 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_common" };
VERSION_CONFIG;
};
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_common" };
VERSION_CONFIG;
};
};
#include "CfgEventhandlers.hpp"

View File

@ -7,7 +7,7 @@ _designator = _this select 2;
_seeker = _this select 3;
_spacing = 100;
if((count _this) > 4) then {
_spacing = _this select 4;
_spacing = _this select 4;
};
_return = true;
@ -21,11 +21,11 @@ _pos2 = [(_pos2 select 0) + _x, (_pos2 select 1) + _y, (_pos2 select 2) + _z];
// player sideChat format["new los check"];
if(terrainIntersect [_pos2, _pos1]) then {
_return = false;
_return = false;
} else {
if(lineIntersects [_pos2, _pos1]) then { // should take as arguments and add to this command objects to exclude - target and observer
// player sideChat format["with: %1", lineIntersectsWith [_pos1, _pos2]];
_return = false;
};
if(lineIntersects [_pos2, _pos1]) then { // should take as arguments and add to this command objects to exclude - target and observer
// player sideChat format["with: %1", lineIntersectsWith [_pos1, _pos2]];
_return = false;
};
};
_return;

View File

@ -1,70 +1,70 @@
#include "script_component.hpp"
private ["_missile", "_headingPitch", "_found", "_vectorTo", "_polarTo", "_dir", "_vertOk", "_horzOk", "_fov",
"_closestDistance", "_pos1", "_pos2", "_disCheck", "_currentTarget", "_potentialTargets", "_offset", "_vector"];
"_closestDistance", "_pos1", "_pos2", "_disCheck", "_currentTarget", "_potentialTargets", "_offset", "_vector"];
_missile = _this select 0;
_laserCode = _this select 1;
_fov = if (count _this > 2) then {_this select 2} else {75};
_vector = if (count _this > 3) then {_this select 3} else {vectorDir _missile};
_offset = if (count _this > 4) then {_this select 4} else {[0,0,0]};
_headingPitch = _vector call CBA_fnc_vect2polar;
_headingPitch = _vector call CBA_fnc_vect2polar;
_currentTarget = nil;
_found = false;
LOG("Searching lasers");
if(!(isNil "ACE_LASERS")) then {
_potentialTargets = [];
TRACE_1("", ACE_LASERS);
{
if(!(isNull _x)) then {
_sensorPos = ATLtoASL(_missile modelToWorld _offset);
_vectorTo = [_sensorPos, ([_x] call FUNC(getPosASL))] call BIS_fnc_vectorFromXToY;
_polarTo = _vectorTo call CBA_fnc_vect2polar;
_dir = _polarTo select 1;
_dir = _dir - (_headingPitch select 1);
TRACE_4("Calc", _sensorPos, _vectorTo, _polarTo, _dir);
if (_dir < 0) then {_dir = _dir + 360};
if (_dir > 360) then {_dir = _dir - 360};
_vertOk = false;
_horzOk = false;
if(_dir < _fov || {_dir > (360-_fov)}) then {
_horzOk = true;
};
if(abs((abs(_polarTo select 2))-(abs(_headingPitch select 2))) < _fov) then {
_vertOk = true;
};
TRACE_2("Results", _vertOk, _horzOk);
if(_vertOk && {_horzOk}) then {
// Does the laser currently have our current code, if we have one?
_targetCode = _x getVariable ["ACE_LASERTARGET_CODE", ACE_DEFAULT_LASER_CODE];
TRACE_1("Target in sight, checking code", _targetCode, _laserCode);
if(_targetCode == _laserCode) then {
_potentialTargets set[(count _potentialTargets), _x];
};
};
};
} forEach ACE_LASERS;
TRACE_1("", _potentialTargets);
_closestDistance = 100000;
{
_pos1 = (getPosASL _missile);
_pos2 = ([_x] call FUNC(getPosASL));
_disCheck = _pos1 distance _pos2;
// shouldn't this bail out when a valid target is found instead of iterating over all potential targets ?
if(_disCheck < _closestDistance && {[_pos1, _pos2, _x, _missile] call FUNC(checkLos)}) then {
_found = true;
_currentTarget = _x;
_closestDistance = _disCheck;
};
} forEach _potentialTargets;
_potentialTargets = [];
TRACE_1("", ACE_LASERS);
{
if(!(isNull _x)) then {
_sensorPos = ATLtoASL(_missile modelToWorldVisual _offset);
_vectorTo = [_sensorPos, ([_x] call FUNC(getPosASL))] call BIS_fnc_vectorFromXToY;
_polarTo = _vectorTo call CBA_fnc_vect2polar;
_dir = _polarTo select 1;
_dir = _dir - (_headingPitch select 1);
TRACE_4("Calc", _sensorPos, _vectorTo, _polarTo, _dir);
if (_dir < 0) then {_dir = _dir + 360};
if (_dir > 360) then {_dir = _dir - 360};
_vertOk = false;
_horzOk = false;
if(_dir < _fov || {_dir > (360-_fov)}) then {
_horzOk = true;
};
if(abs((abs(_polarTo select 2))-(abs(_headingPitch select 2))) < _fov) then {
_vertOk = true;
};
TRACE_2("Results", _vertOk, _horzOk);
if(_vertOk && {_horzOk}) then {
// Does the laser currently have our current code, if we have one?
_targetCode = _x getVariable ["ACE_LASERTARGET_CODE", ACE_DEFAULT_LASER_CODE];
TRACE_1("Target in sight, checking code", _targetCode, _laserCode);
if(_targetCode == _laserCode) then {
_potentialTargets set[(count _potentialTargets), _x];
};
};
};
} forEach ACE_LASERS;
TRACE_1("", _potentialTargets);
_closestDistance = 100000;
{
_pos1 = (getPosASL _missile);
_pos2 = ([_x] call FUNC(getPosASL));
_disCheck = _pos1 distance _pos2;
// shouldn't this bail out when a valid target is found instead of iterating over all potential targets ?
if(_disCheck < _closestDistance && {[_pos1, _pos2, _x, _missile] call FUNC(checkLos)}) then {
_found = true;
_currentTarget = _x;
_closestDistance = _disCheck;
};
} forEach _potentialTargets;
};
[_found, _currentTarget]

View File

@ -7,43 +7,43 @@ _outliers = [];
_spot = [];
_testPos = (_list select 0) select 0;
{
_samplePos = _x select 0;
if(!lineIntersects [_samplePos, _checkPos] && {!terrainIntersectASL [_samplePos, _checkPos]}) then {
if(_samplePos distance _testPos < 2) then {
_spot pushBack _samplePos;
} else {
_outliers pushBack _samplePos;
};
};
_samplePos = _x select 0;
if(!lineIntersects [_samplePos, _checkPos] && {!terrainIntersectASL [_samplePos, _checkPos]}) then {
if(_samplePos distance _testPos < 2) then {
_spot pushBack _samplePos;
} else {
_outliers pushBack _samplePos;
};
};
} forEach _list;
_spots pushBack _spot;
if(count _outliers > 0) then {
for "_i" from 1 to 3 do {
_remainingSpots = _outliers;
_outliers = [];
_spot = [];
_testPos = (_remainingSpots select 0);
{
_samplePos = _x;
if(!lineIntersects [_samplePos, _checkPos] && {!terrainIntersectASL [_samplePos, _checkPos]}) then {
if(_samplePos distance _testPos < 2) then {
_spot pushBack _samplePos;
} else {
_outliers pushBack _samplePos;
};
};
} forEach _remainingSpots;
_spots pushBack _spot;
};
for "_i" from 1 to 3 do {
_remainingSpots = _outliers;
_outliers = [];
_spot = [];
_testPos = (_remainingSpots select 0);
{
_samplePos = _x;
if(!lineIntersects [_samplePos, _checkPos] && {!terrainIntersectASL [_samplePos, _checkPos]}) then {
if(_samplePos distance _testPos < 2) then {
_spot pushBack _samplePos;
} else {
_outliers pushBack _samplePos;
};
};
} forEach _remainingSpots;
_spots pushBack _spot;
};
};
_largest = 0;
_largestSpot = [];
{
if((count _x) > _largest) then {
_largest = (count _x);
_largestSpot = _x;
};
if((count _x) > _largest) then {
_largest = (count _x);
_largestSpot = _x;
};
} forEach _spots;
// player sideChat format["g: %1", _spots];
_largestSpot select (random (floor(count _largestSpot)));

View File

@ -6,8 +6,8 @@ _args = _this select 0;
_laserTarget = _args select 0;
if(isNull _laserTarget || !alive player) exitWith {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
REM(ACE_LASERS, _laserTarget);
[(_this select 1)] call cba_fnc_removePerFrameHandler;
REM(ACE_LASERS, _laserTarget);
};
_end = diag_tickTime;
@ -18,8 +18,8 @@ _pos = [_laserTarget] call FUNC(getPosASL);
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoATL _pos), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"];
{
drawLine3D [ASLtoATL (_x select 0), ASLtoATL (_x select 1), (_x select 2)];
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", (_x select 2), ASLtoATL (_x select 1), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"];
drawLine3D [ASLtoATL (_x select 0), ASLtoATL (_x select 1), (_x select 2)];
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", (_x select 2), ASLtoATL (_x select 1), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"];
} forEach DRAW_LINES;
DRAW_LINES = [];
#endif

View File

@ -16,10 +16,10 @@ REM(ACE_LASERS, objNull);
if(!(local _laserTarget)) exitWith { };
// The target is local, so its on this client
if(!isDedicated) then {
_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", player, true];
[FUNC(laserTargetPFH), 0, [_laserTarget, player]] call cba_fnc_addPerFrameHandler;
_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", player, true];
[FUNC(laserTargetPFH), 0, [_laserTarget, player]] call cba_fnc_addPerFrameHandler;
} else {
// server side ownership of laser
//_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", nil, false];
// server side ownership of laser
//_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", nil, false];
};

View File

@ -17,50 +17,50 @@ _vecRotateMap = [_cp, _p1, _p2] call FUNC(rotateVectLineGetMap);
_result = [_pos, _vec] call FUNC(shootRay);
_resultPos = _result select 0;
if(!isNil "_resultPos") then {
_distance = _result select 1;
if(_distance < _shortestReturn) then {
_shortestReturn = _distance;
};
if(_distance > _longestReturn) then {
_longestReturn = _distance;
};
_resultPositions set[(count _resultPositions), _result];
_distance = _result select 1;
if(_distance < _shortestReturn) then {
_shortestReturn = _distance;
};
if(_distance > _longestReturn) then {
_longestReturn = _distance;
};
_resultPositions set[(count _resultPositions), _result];
#ifdef DEBUG_MODE_FULL
DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]];
DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]];
#endif
};
_count = 8;
_pos2 = [
(_pos select 0)+((_vec select 0)*1000),
(_pos select 1)+((_vec select 1)*1000),
(_pos select 2)+((_vec select 2)*1000)
];
(_pos select 0)+((_vec select 0)*1000),
(_pos select 1)+((_vec select 1)*1000),
(_pos select 2)+((_vec select 2)*1000)
];
{
for "_i" from 0 to ceil(_count*_x) do {
_radOffset = random 360;
_offset = [_vecRotateMap, (((360/_count)*_i)+_radOffset) mod 360] call FUNC(rotateVectLine);
_offsetPos = [
(_pos2 select 0)+((_offset select 0)*(_divergence*_x)),
(_pos2 select 1)+((_offset select 1)*(_divergence*_x)),
(_pos2 select 2)+((_offset select 2)*(_divergence*_x))
];
_offsetVector = [_pos, _offsetPos] call BIS_fnc_vectorFromXtoY;
_result = [_pos, _offsetVector] call FUNC(shootRay);
_resultPos = _result select 0;
if(!isNil "_resultPos") then {
_distance = _result select 1;
if(_distance < _shortestReturn) then {
_shortestReturn = _distance;
};
if(_distance > _longestReturn) then {
_longestReturn = _distance;
};
_resultPositions set[(count _resultPositions), _result];
for "_i" from 0 to ceil(_count*_x) do {
_radOffset = random 360;
_offset = [_vecRotateMap, (((360/_count)*_i)+_radOffset) mod 360] call FUNC(rotateVectLine);
_offsetPos = [
(_pos2 select 0)+((_offset select 0)*(_divergence*_x)),
(_pos2 select 1)+((_offset select 1)*(_divergence*_x)),
(_pos2 select 2)+((_offset select 2)*(_divergence*_x))
];
_offsetVector = [_pos, _offsetPos] call BIS_fnc_vectorFromXtoY;
_result = [_pos, _offsetVector] call FUNC(shootRay);
_resultPos = _result select 0;
if(!isNil "_resultPos") then {
_distance = _result select 1;
if(_distance < _shortestReturn) then {
_shortestReturn = _distance;
};
if(_distance > _longestReturn) then {
_longestReturn = _distance;
};
_resultPositions set[(count _resultPositions), _result];
#ifdef DEBUG_MODE_FULL
DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]];
DRAW_LINES set[(count DRAW_LINES), [_pos, _resultPos, [0, 1, 0, 1]]];
#endif
};
};
};
};
} forEach [1,0.5,0.25];
[_longestReturn, _shortestReturn, _resultPositions];

View File

@ -9,22 +9,22 @@ _resultPos = nil;
_fidelity = [1000,100,10,1,0.1];
_lastPos = +_pos;
{
scopeName "mainSearch";
for "_i" from 1 to 10 do {
_nextPos = [
(_lastPos select 0)+((_vec select 0)*_x),
(_lastPos select 1)+((_vec select 1)*_x),
(_lastPos select 2)+((_vec select 2)*_x)
];
if(lineIntersects [_lastPos, _nextPos] || terrainIntersectASL [_lastPos, _nextPos]) then {
_resultPos = _lastPos;
breakTo "mainSearch";
} else {
_distance = _distance + _x;
_lastPos = _nextPos;
};
};
scopeName "mainSearch";
for "_i" from 1 to 10 do {
_nextPos = [
(_lastPos select 0)+((_vec select 0)*_x),
(_lastPos select 1)+((_vec select 1)*_x),
(_lastPos select 2)+((_vec select 2)*_x)
];
if(lineIntersects [_lastPos, _nextPos] || terrainIntersectASL [_lastPos, _nextPos]) then {
_resultPos = _lastPos;
breakTo "mainSearch";
} else {
_distance = _distance + _x;
_lastPos = _nextPos;
};
};
} forEach _fidelity;
[_resultPos, _distance];

View File

@ -14,9 +14,9 @@ _y = _offset select 1;
_z = _offset select 2;
_out = [
((_xVec select 0)*_x) + ((_xVec select 1)*_y) + ((_xVec select 2)*_z),
((_yVec select 0)*_x) + ((_yVec select 1)*_y) + ((_yVec select 2)*_z),
((_zVec select 0)*_x) + ((_zVec select 1)*_y) + ((_zVec select 2)*_z)
];
((_xVec select 0)*_x) + ((_xVec select 1)*_y) + ((_xVec select 2)*_z),
((_yVec select 0)*_x) + ((_yVec select 1)*_y) + ((_yVec select 2)*_z),
((_zVec select 0)*_x) + ((_zVec select 1)*_y) + ((_zVec select 2)*_z)
];
_out;

View File

@ -2,11 +2,11 @@
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_LASER
#define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_LASER
#define DEBUG_SETTINGS DEBUG_SETTINGS_LASER
#define DEBUG_SETTINGS DEBUG_SETTINGS_LASER
#endif
#include "\z\ace\Addons\main\script_macros.hpp"

View File

@ -10,18 +10,10 @@ class Extended_PostInit_EventHandlers {
};
};
class Extended_GetIn_EventHandlers {
class B_Heli_Attack_01_F {
class Extended_Init_EventHandlers {
class Helicopter {
class ADDON {
getIn = QUOTE(call FUNC(onGetin));
init = QUOTE(_this call DFUNC(initDesignatorActions));
};
};
};
class Extended_GetOut_EventHandlers {
class B_Heli_Attack_01_F {
class ADDON {
getOut = QUOTE(call FUNC(onGetout));
};
};
};
};

View File

@ -23,7 +23,8 @@ class CfgVehicles {
class B_Heli_Attack_01_F: Heli_Attack_01_base_F {
class Turrets: Turrets {
class MainTurret: MainTurret {
stabilizedInAxes = 4; // This stablizes the turret a bit more for laser designation
GVAR(Enabled) = 1; // Enable laser self-designation
stabilizedInAxes = 4; // This stablizes the turret a bit more for laser designation
};
};
};

View File

@ -1,12 +1,11 @@
#include "script_component.hpp"
PREP(onGetIn);
PREP(onGetOut);
PREP(initDesignatorActions);
PREP(laserHudDesignateOn);
PREP(laserHudDesignateOff);
PREP(unitTurretHasDesignator);
GVAR(laser) = nil;
GVAR(laserActive) = false;
GVAR(laserActive) = false;
FUNC(getPosASL) = {visiblePositionASL (_this select 0)};
FUNC(getPosASL) = {visiblePositionASL (_this select 0)};

View File

@ -5,7 +5,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main", "ace_laser"};
requiredAddons[] = {"ace_interaction", "ace_laser"};
version = VERSION;
};
};

View File

@ -0,0 +1,57 @@
/*
* Author: esteldunedain
* Initializes the actions for turning on/off the laser for vehicles that have them
*
* Argument:
* 0: Vehicle <OBJECT>
*
* Return value:
* NONE.
*/
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_vehicle);
// Add action to class if it is not already done
private ["_type", "_initializedClasses"];
_type = typeOf _vehicle;
_initializedClasses = GETGVAR(initializedClasses,[]);
// do nothing if the class is already initialized
if (_type in _initializedClasses) exitWith {};
_initializedClasses pushBack _type;
GVAR(initializedClasses) = _initializedClasses;
{
private ["_turretConfig","_onAction","_offAction"];
_turretConfig = [configFile >> "CfgVehicles" >> _type, _x] call EFUNC(common,getTurretConfigPath);
if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) exitWith {
// @todo: Add the state variables to the vehicle, instead of to the client
// e.g.: _vehicle setVariable [format ["%1_%2", QGVAR(laserActive), _x], false];
// Add actions
_onAction = [QGVAR(LaserOn), localize "STR_ACE_Laser_SelfDesignate_DesignatorOn", "",
{
// Statement
_this call FUNC(laserHudDesignateOn)
},
{
// Condition
!GVAR(laserActive) && {[ACE_player] call FUNC(unitTurretHasDesignator)}
}] call EFUNC(interact_menu,createAction);
_offAction = [QGVAR(LaserOff), localize "STR_ACE_Laser_SelfDesignate_DesignatorOff", "",
{
// Statement
_this call FUNC(laserHudDesignateOff)
},
{
// Condition
GVAR(laserActive) && {[ACE_player] call FUNC(unitTurretHasDesignator)}
}] call EFUNC(interact_menu,createAction);
[_type, 1, ["ACE_SelfActions"], _onAction] call EFUNC(interact_menu,addActionToClass);
[_type, 1, ["ACE_SelfActions"], _offAction] call EFUNC(interact_menu,addActionToClass);
};
} forEach allTurrets _vehicle;

View File

@ -1,15 +1,15 @@
#include "script_component.hpp"
if(isNil QGVAR(laser)) exitWith {
false
false
};
if(!local GVAR(laser)) then {
false
false
};
_handle = GVAR(laser) getVariable ["ACE_PFH_HANDLE", nil];
if(!isNil "_handle") then {
[_handle] call cba_fnc_removePerFrameHandler;
[_handle] call cba_fnc_removePerFrameHandler;
};
REM(ACE_LASERS, GVAR(laser));

View File

@ -1,90 +1,112 @@
//#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
TRACE_1("enter", _this);
#define FCS_UPDATE_DELAY 2.0
FUNC(magnitude) = {
_this distance [0, 0, 0]
_this distance [0, 0, 0]
};
FUNC(mat_normalize3d) = {
private ["_mag"];
PARAMS_3(_vx,_vy,_vz);
private ["_mag"];
PARAMS_3(_vx,_vy,_vz);
_mag = _this call FUNC(magnitude);
if (_mag == 0) then {_mag = 1};
[(_vx/_mag), (_vy/_mag), (_vz/_mag)]
_mag = _this call FUNC(magnitude);
if (_mag == 0) then {_mag = 1};
[(_vx/_mag), (_vy/_mag), (_vz/_mag)]
};
FUNC(laserHudDesignatePFH) = {
_args = _this select 0;
_laserTarget = _args select 0;
_shooter = _args select 1;
_vehicle = vehicle _shooter;
_weapon = currentWeapon _vehicle;
if(!alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(laserActive) ) exitWith {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
// Retrieve the gunner and turret memory point information
_gunnerInfo = [_vehicle, _weapon] call CBA_fnc_getFirer;
_turret = [_vehicle, _gunnerInfo select 1] call CBA_fnc_getTurret;
_pov = getText (_turret >> "memoryPointGunnerOptics");
_gunBeg = getText (_turret >> "gunBeg");
_gunEnd = getText (_turret >> "gunEnd");
TRACE_3("", _pov, _gunBeg, _gunEnd);
private["_args", "_laserTarget", "_shooter", "_vehicle", "_weapon", "_gunnerInfo", "_turret", "_pov", "_gunBeg", "_gunEnd", "_povPos", "_povDir", "_result", "_resultPositions", "_firstResult", "_forceUpdateTime"];
_args = _this select 0;
_laserTarget = _args select 0;
_shooter = _args select 1;
if( (count _args) < 3) then {
_args set[2, diag_tickTime + FCS_UPDATE_DELAY];
};
_forceUpdateTime = _args select 2;
_vehicle = vehicle _shooter;
_weapon = currentWeapon _vehicle;
TRACE_1("", _args);
if(!alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(laserActive) ) exitWith {
[] call FUNC(laserHudDesignateOff);
};
if(!([ACE_player] call FUNC(unitTurretHasDesignator)) ) exitWith {
[] call FUNC(laserHudDesignateOff);
};
// Retrieve the gunner and turret memory point information
_gunnerInfo = [_vehicle, _weapon] call CBA_fnc_getFirer;
_turretInfo = [_vehicle, _gunnerInfo select 1] call EFUNC(common,getTurretDirection);
_povPos = _turretInfo select 0;
_povDir = _turretInfo select 1;
_result = [_povPos, _povDir] call EFUNC(laser,shootCone);
if((count _result) > 0) then {
_resultPositions = _result select 2;
// Pull the PIP pov or barrel direction, depending on how the model is set up
_povPos = ATLtoASL ( _vehicle modelToWorld (_vehicle selectionPosition _pov ) );
_povDir = [0,0,0];
if(_pov == "pip0_pos") then {
_pipDir = ATLtoASL ( _vehicle modelToWorld (_vehicle selectionPosition "pip0_dir" ) );
_povDir = [_povPos, _pipDir] call BIS_fnc_vectorDiff;
} else {
_gunBeginPos = ATLtoASL ( _vehicle modelToWorld (_vehicle selectionPosition _gunBeg ) );
_gunEndPos = ATLtoASL ( _vehicle modelToWorld (_vehicle selectionPosition _gunEnd ) );
_povDir = [_gunEndPos, _gunBeginPos] call BIS_fnc_vectorDiff;
};
TRACE_4("", _povDir, _povPos, _gunBeginPos, _gunEndPos);
_result = [_povPos, _povDir] call EFUNC(laser,shootCone);
if((count _result) > 0) then {
_resultPositions = _result select 2;
if((count _resultPositions) > 0) then {
_firstResult = _resultPositions select 0;
_pos = _firstResult select 0;
// If the laser has moved less than a half meter, then dont move it.
// Just regular use of lasers will commonly make them move this much,
// but not across multiple close frames.
// This loses accuracy a little, but saves position updates per frame.
//if( ((getPosASL _laserTarget) distance _pos) > 0.5) then {
_laserTarget setPosATL (ASLToATL _pos);
//};
if((count _resultPositions) > 0) then {
_firstResult = _resultPositions select 0;
_pos = _firstResult select 0;
// If the laser has moved less than a half meter, then dont move it.
// Just regular use of lasers will commonly make them move this much,
// but not across multiple close frames.
// This loses accuracy a little, but saves position updates per frame.
TRACE_5("", diag_tickTime, _forceUpdateTime, getPosASL _laserTarget, _pos, ((getPosASL _laserTarget) distance _pos));
if(diag_tickTime > _forceUpdateTime) then {
TRACE_1("FCS Update", "");
["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent;
};
if( ((getPosASL _laserTarget) vectorDistance _pos) > 2) then {
TRACE_1("LaserPos Update", "");
_laserTarget setPosATL (ASLToATL _pos);
};
if(diag_tickTime > _forceUpdateTime) then {
_args set[3, diag_tickTime + FCS_UPDATE_DELAY];
};
#ifdef DEBUG_MODE_FULL
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLToATL _pos, 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"];
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], (getPosATL _laserTarget), 0.75, 0.75, 0, "", 0.5, 0.025, "TahomaB"];
{
private["_position"];
_position = _x select 0;
drawLine3d [ASLToATL _povPos, ASLToATL _position, [0,0,1,1] ];
} forEach _resultPositions;
#endif
};
};
};
};
_this set[0, _args];
};
private "_laserTarget";
private "_handle";
if(isNil QGVAR(laser)) then {
_laserTarget = "LaserTarget" createVehicle (getpos player);
GVAR(laserActive) = true;
_handle = [FUNC(laserHudDesignatePFH), 0, [_laserTarget, player]] call cba_fnc_addPerFrameHandler;
_laserTarget setVariable ["ACE_PFH_HANDLE", _handle, false];
GVAR(laser) = _laserTarget;
_laserTarget = "LaserTargetW" createVehicle (getpos player);
GVAR(laserActive) = true;
_handle = [FUNC(laserHudDesignatePFH), 0, [_laserTarget, player]] call cba_fnc_addPerFrameHandler;
_laserTarget setVariable ["ACE_PFH_HANDLE", _handle, false];
GVAR(laser) = _laserTarget;
} else {
[] call FUNC(laserHudDesignateOff);
[] call FUNC(laserHudDesignateOn);
[] call FUNC(laserHudDesignateOff);
[] call FUNC(laserHudDesignateOn);
};

View File

@ -1,13 +0,0 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
// TODO: we should do this differently eventually
private["_onActionId", "_offActionId"];
TRACE_1("ENTER", _this);
// TODO: THIS SHOULD NOT BE ACTIONS EVENTUALLY
_onActionId = player addAction ["Laser Designator On", { _this call FUNC(laserHudDesignateOn) }, [], 1, false, false, "", QUOTE( (gunner (vehicle player)) == player && !GVAR(laserActive))];
player setVariable[QGVAR(onActionId), _onActionId, false];
_offActionId = player addAction ["Laser Designator Off", { _this call FUNC(laserHudDesignateOff) }, [], 1, false, false, "", QUOTE( (gunner (vehicle player)) == player && GVAR(laserActive))];
player setVariable[QGVAR(offActionId), _offActionId, false];

View File

@ -1,10 +0,0 @@
#include "script_component.hpp"
_onActionId = player getVariable[QGVAR(onActionId), -1];
_offActionId = player getVariable[QGVAR(offActionId), -1];
player removeAction _onActionId;
player removeAction _offActionId;
player setVariable[QGVAR(onActionId), -1, false];
player setVariable[QGVAR(offActionId), -1, false];

View File

@ -0,0 +1,21 @@
/*
* Author: esteldunedain
* Checks if the turret occupied by the given unit has a laser designator
*
* Argument:
* 0: Unit <OBJECT>
*
* Return value:
* Has designator? <BOOL>
*/
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_unit);
// Get the player turret path
private ["_turret","_config","_turretConfig"];
_turret = [_unit] call EFUNC(common,getTurretIndex);
_config = configFile >> "CfgVehicles" >> typeOf vehicle _unit;
_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath);
getNumber (_turretConfig >> QGVAR(Enabled)) > 0

View File

@ -2,11 +2,11 @@
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_LASER_SELFDESIGNATE
#define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_LASER_SELFDESIGNATE
#define DEBUG_SETTINGS DEBUG_SETTINGS_LASER_SELFDESIGNATE
#define DEBUG_SETTINGS DEBUG_SETTINGS_LASER_SELFDESIGNATE
#endif
#include "\z\ace\Addons\main\script_macros.hpp"

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2015-04-03 -->
<Project name="ACE">
<Package name="Laser_SelfDesignate">
<Key ID="STR_ACE_Laser_SelfDesignate_DesignatorOn">
<English>Laser&lt;br/&gt;Designator On</English>
</Key>
<Key ID="STR_ACE_Laser_SelfDesignate_DesignatorOff">
<English>Laser&lt;br/&gt;Designator Off</English>
</Key>
</Package>
</Project>

View File

@ -3,7 +3,7 @@
EXPLODE_3_PVT(_this,_unit,_range,_isGreen);
_p0Pos = _unit modelToWorld (_unit selectionPosition "righthand");
_p0Pos = _unit modelToWorldVisual (_unit selectionPosition "righthand");
// Convert _p0Pos to ASL
_p0 = + _p0Pos;

View File

@ -6,11 +6,9 @@ class CfgVehicles {
displayName = "$STR_ACE_MagazineRepack_RepackMagazines";
condition = QUOTE(true);
exceptions[] = {"isNotInside"};
statement = QUOTE([_player] call FUNC(openSelectMagazineUI));
showDisabled = 0;
insertChildren = QUOTE(_this call FUNC(getMagazineChildren));
priority = -2;
icon = QUOTE(PATHTOF(UI\repack_ca.paa));
hotkey = "R";
};
};
};

View File

@ -2,9 +2,9 @@
ADDON = false;
PREP(getMagazineChildren);
PREP(magazineRepackFinish);
PREP(magazineRepackProgress);
PREP(openSelectMagazineUI);
PREP(simulateRepackEvents);
PREP(startRepackingMagazine);

View File

@ -17,12 +17,19 @@ class CfgPatches {
#include "CfgVehicles.hpp"
class ACE_Settings {
//Time to move a round from one magazine to another
class GVAR(TimePerAmmo) {
value = 1.5;
typeName = "SCALAR";
};
//Time to swap between magazines when repacking
class GVAR(TimePerMagazine) {
value = 2.0;
typeName = "SCALAR";
};
//Time to relink 2 belts together
class GVAR(TimePerBeltLink) {
value = 8.0;
typeName = "SCALAR";
};
};

View File

@ -0,0 +1,54 @@
/*
* Author: PabstMirror,commy2, esteldunedain, Ruthberg
* Gets magazine children for interaciton menu
*
* Argument:
* 0: Target <OBJECT>
* 1: Player <OBJECT>
*
* Return value:
* ChildActiosn<ARRAY>
*
* Example:
* [player, player] call ace_magazinerepack_fnc_getMagazineChildren
*
* Public: No
*/
#include "script_component.hpp"
private ["_unitMagazines", "_unitMagCounts", "_xFullMagazineCount", "_index", "_actions", "_displayName", "_picture", "_action"];
PARAMS_2(_target,_player);
// get all mags and ammo count
_unitMagazines = [];
_unitMagCounts = [];
{
EXPLODE_4_PVT(_x,_xClassname,_xCount,_xLoaded,_xType);
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
//for every partial magazine, that is either in inventory or can be moved there
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _magazineClassname}}) then {
_index = _unitMagazines find _xClassname;
if (_index == -1) then {
_unitMagazines pushBack _xClassname;
_unitMagCounts pushBack [_xCount];
} else {
(_unitMagCounts select _index) pushBack _xCount;
};
};
} forEach (magazinesAmmoFull _player);
//Create the action children for all appropriate magazines
_actions = [];
{
if ((count (_unitMagCounts select _forEachIndex)) >= 2) then {// Ignore invalid magazines types (need 2+ partial mags to do anything)
_displayName = getText (configFile >> "CfgMagazines" >> _x >> "displayName");
_picture = getText (configFile >> "CfgMagazines" >> _x >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(startRepackingMagazine)}, {true}, {}, _x] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _player];
};
} forEach _unitMagazines;
_actions

View File

@ -19,13 +19,16 @@
*/
#include "script_component.hpp"
private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_fullMagazineCount"];
PARAMS_4(_args,_elapsedTime,_totalTime,_errorCode);
EXPLODE_2_PVT(_args,_magazineClassname,_lastAmmoCount);
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
_structuredOutputText =
//Don't show anything if player can't interact:
if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
if (_errorCode == 0) then {
_structuredOutputText = if (_errorCode == 0) then {
format ["<t align='center'>%1</t><br/>", (localize "STR_ACE_MagazineRepack_RepackComplete")];
} else {
format ["<t align='center'>%1</t><br/>", (localize "STR_ACE_MagazineRepack_RepackInterrupted")];
@ -34,19 +37,20 @@ if (_errorCode == 0) then {
_picture = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "picture");
_structuredOutputText = _structuredOutputText + format ["<img align='center' size='1.8' color='#ffffff' image='%1'/> <br/>", _picture];
_fullMags = 0;
_partialMags = 0;
{
EXPLODE_2_PVT(_x,_xClassname,_xCount);
if ((_xClassname == _magazineClassname) && {_xCount > 0}) then {
if (_xCount == _fullMagazineCount) then {
_fullMags = _fullMags + 1;
} else {
_partialMags = _partialMags + 1;
};
};
} forEach (magazinesAmmoFull ACE_player);
//EFUNC(common,displayTextStructured) doesn't have room for this, and I don't think it's nessacary, can fix in the future if wanted:
_structuredOutputText = _structuredOutputText + format [("<t align='center'>" + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + "</t>"), _fullMags, _partialMags];
// _fullMags = 0;
// _partialMags = 0;
// {
// EXPLODE_2_PVT(_x,_xClassname,_xCount);
// if ((_xClassname == _magazineClassname) && {_xCount > 0}) then {
// if (_xCount == _fullMagazineCount) then {
// _fullMags = _fullMags + 1;
// } else {
// _partialMags = _partialMags + 1;
// };
// };
// } forEach (magazinesAmmoFull ACE_player);
// _structuredOutputText = _structuredOutputText + format [("<t align='center'>" + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + "</t>"), _fullMags, _partialMags];
[parseText _structuredOutputText] call EFUNC(common,displayTextStructured);

View File

@ -1,58 +0,0 @@
/*
* Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg)
* Opens the selectMenu UI to chose which magazine to repack.
* Only shows classnames that have 2+ partial magazines
*
* Arguments:
* 0: Unit (player) <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [_player] call ace_magazinerepack_fnc_openSelectMagazineUI
*
* Public: No
*/
#include "script_component.hpp"
private ["_unitMagazines", "_unitMagCounts", "_xFullMagazineCount", "_index", "_actions", "_displayName", "_picture"];
PARAMS_1(_unit);
_unitMagazines = [];
_unitMagCounts = [];
// get all mags and ammo count
{
EXPLODE_2_PVT(_x,_xClassname,_xCount);
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
if ((_xCount != _xFullMagazineCount) && {_xCount > 0}) then {//for every partial magazine
_index = _unitMagazines find _xClassname;
if (_index == -1) then {
_unitMagazines pushBack _xClassname;
_unitMagCounts pushBack [_xCount];
} else {
(_unitMagCounts select _index) pushBack _xCount;
};
};
} forEach (magazinesAmmoFull _unit);
_actions = [localize "STR_ACE_MagazineRepack_SelectMagazineMenu", localize "STR_ACE_MagazineRepack_SelectMagazine"] call EFUNC(interaction,prepareSelectMenu);
{
if ((count (_unitMagCounts select _forEachIndex)) >= 2) then {// Ignore invalid magazines types (need 2+ partial mags to do anything)
_displayName = getText (configFile >> "CfgMagazines" >> _x >> "displayName");
_picture = getText (configFile >> "CfgMagazines" >> _x >> "picture");
_actions = [_actions, _displayName, _picture, _x] call EFUNC(interaction,addSelectableItem);
};
} forEach _unitMagazines;
[
_actions,
{ [_this] call FUNC(startRepackingMagazine); },
{
call EFUNC(interaction,hideMenu); //ToDo: Self Interaction Integration
}
] call EFUNC(interaction,openSelectMenu);

View File

@ -6,12 +6,13 @@
* Arguments:
* 0: How many rounds in a full magazine <NUMBER>
* 1: Array of rounds in magazines <ARRAY>
* 2: Magazine is a belt <BOOL>
*
* Return Value:
* Array in format [time, isBullet, array of ammo counts] <ARRAY>
*
* Example:
* [5, [1,2,3,8]] call ace_magazinerepack_fnc_simulateRepackEvents =
* [10, [1,2,3,8], false] call ace_magazinerepack_fnc_simulateRepackEvents =
* [[1.5,true,[0,2,3,9]],[3.5,false,[0,2,3,9]],[5,true,[0,1,3,10]],[7,false,[0,1,3,10]],[8.5,true,[0,0,4,10]],[10.5,false,[0,0,4,10]]]
*
* Public: No
@ -20,7 +21,7 @@
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded"];
PARAMS_2(_fullMagazineCount,_arrayOfAmmoCounts);
PARAMS_3(_fullMagazineCount,_arrayOfAmmoCounts,_isBelt);
// Sort Ascending - Don't modify original
_arrayOfAmmoCounts = (+_arrayOfAmmoCounts) call BIS_fnc_sortNum;
@ -29,13 +30,23 @@ _newMagFnc = {
_time = _time + GVAR(TimePerMagazine);
_events pushBack [_time, false, +_arrayOfAmmoCounts];
};
_swapAmmoFnc = {
for "_swapProgress" from 0 to (_ammoSwaped - 1) do {
_time = _time + GVAR(TimePerAmmo);
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - 1)];
_arrayOfAmmoCounts set [_highIndex, ((_arrayOfAmmoCounts select _highIndex) + 1)];
_swapAmmoFnc = if (_isBelt) then {
{
_time = _time + GVAR(TimePerBeltLink);
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - _ammoSwaped)];
_arrayOfAmmoCounts set [_highIndex, ((_arrayOfAmmoCounts select _highIndex) + _ammoSwaped)];
_events pushBack [_time, true, +_arrayOfAmmoCounts];
};
}
} else {
{
for "_swapProgress" from 0 to (_ammoSwaped - 1) do {
_time = _time + GVAR(TimePerAmmo);
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - 1)];
_arrayOfAmmoCounts set [_highIndex, ((_arrayOfAmmoCounts select _highIndex) + 1)];
_events pushBack [_time, true, +_arrayOfAmmoCounts];
};
}
};
_lowIndex = 0;

View File

@ -5,7 +5,9 @@
* Precalcs all the event timings and starts the progressBar.
*
* Arguments:
* 0: Magazine Classname <STRING>
* 0: Target <OBJECT>
* 1: Player <OBJECT>
* 2: Magazine Classname <STRING>
*
* Return Value:
* Nothing
@ -17,18 +19,21 @@
*/
#include "script_component.hpp"
private ["_unit", "_fullMagazineCount", "_startingAmmoCounts", "_simEvents", "_totalTime"];
private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts", "_simEvents", "_totalTime"];
PARAMS_3(_target,_player,_magazineClassname);
PARAMS_1(_magazineClassname);
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
_unit = ACE_player;
[ACE_player] call EFUNC(common,goKneeling);
call EFUNC(interaction,hideMenu);//ToDo: Self Interaction Integration
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname;
// Calculate actual ammo to transfer during repack
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
_fullMagazineCount = getNumber (_magazineCfg >> "count");
//Is linked belt magazine:
_isBelt = (isNumber (_magazineCfg >> "ACE_isBelt")) && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1};
//Check canInteractWith:
if (!([_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
[_player] call EFUNC(common,goKneeling);
_startingAmmoCounts = [];
{
@ -36,25 +41,25 @@ _startingAmmoCounts = [];
if ((_xClassname == _magazineClassname) && {(_xCount != _fullMagazineCount) && {_xCount > 0}}) then {
if (_xLoaded) then {
//Try to Remove from weapon and add to inventory, otherwise ignore
if (_unit canAdd _magazineClassname) then {
if (_player canAdd _magazineClassname) then {
switch (_xType) do {
case (1): {_unit removePrimaryWeaponItem _magazineClassname;};
case (2): {_unit removeHandgunItem _magazineClassname;};
case (4): {_unit removeSecondaryWeaponItem _magazineClassname;};
case (1): {_player removePrimaryWeaponItem _magazineClassname;};
case (2): {_player removeHandgunItem _magazineClassname;};
case (4): {_player removeSecondaryWeaponItem _magazineClassname;};
default {ERROR("Loaded Location Invalid");};
};
_unit addMagazine [_magazineClassname, _xCount];
_player addMagazine [_magazineClassname, _xCount];
_startingAmmoCounts pushBack _xCount;
};
} else {
_startingAmmoCounts pushBack _xCount;
};
};
} forEach (magazinesAmmoFull _unit);
} forEach (magazinesAmmoFull _player);
if ((count _startingAmmoCounts) < 2) exitwith {ERROR("Not Enough Mags to Repack");};
_simEvents = [_fullMagazineCount, _startingAmmoCounts] call FUNC(simulateRepackEvents);
_simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simulateRepackEvents);
_totalTime = (_simEvents select ((count _simEvents) - 1) select 0);
[
@ -63,5 +68,6 @@ _totalTime,
{_this call FUNC(magazineRepackFinish)},
{_this call FUNC(magazineRepackFinish)},
(localize "STR_ACE_MagazineRepack_RepackingMagazine"),
{_this call FUNC(magazineRepackProgress)}
{_this call FUNC(magazineRepackProgress)},
["isNotInside"]
] call EFUNC(common,progressBar);

View File

@ -2,6 +2,8 @@
STACK TRACING
**/
//#define ENABLE_CALLSTACK
//#define ENABLE_PERFORMANCE_COUNTERS
//#define DEBUG_EVENTS
#ifdef ENABLE_CALLSTACK
@ -29,7 +31,7 @@ PERFORMANCE COUNTERS SECTION
//#define ENABLE_PERFORMANCE_COUNTERS
#ifdef ENABLE_PERFORMANCE_COUNTERS
#define ADDPFH(function, timing, args) call { _ret = [function, timing, args, #function] call EFUNC(sys_sync,perFrame_add); if(isNil "ACE_PFH" ) then { ACE_PFH=[]; }; ACE_PFH pushBack [[_ret, __FILE__, __LINE__], [function, timing, args]]; _ret }
#define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret }
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
@ -37,8 +39,6 @@ PERFORMANCE COUNTERS SECTION
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
#else
#define ADDPFH(function, timing, args) [function, timing, args, #function] call EFUNC(sys_sync,perFrame_add)
#define CREATE_COUNTER(x) /* disabled */
#define BEGIN_COUNTER(x) /* disabled */
#define END_COUNTER(x) /* disabled */

View File

@ -0,0 +1,760 @@
class ACE_Head {
displayName = "$STR_ACE_Interaction_Head";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
EXCEPTIONS
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(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
EXCEPTIONS
icon = "";
};
class CheckBloodPressure: CheckPulse {
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));
EXCEPTIONS
};
class CheckResponse: CheckPulse {
displayName = "Check Response";
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment));
EXCEPTIONS
};
};
class ACE_Torso {
displayName = "$STR_ACE_Interaction_Torso";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
EXCEPTIONS
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));
EXCEPTIONS
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PlaceInBodyBag {
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'BodyBag')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'BodyBag')] call DFUNC(treatment));
EXCEPTIONS
showDisabled = 1;
priority = 2;
hotkey = "";
enableInside = 1;
};
class TriageCard {
displayName = "Triage Card";
distance = 2.0;
condition = "true";
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
EXCEPTIONS
showDisabled = 1;
priority = 2;
hotkey = "";
enableInside = 1;
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));
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
EXCEPTIONS
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));
EXCEPTIONS
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));
EXCEPTIONS
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));
EXCEPTIONS
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));
EXCEPTIONS
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));
EXCEPTIONS
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));
EXCEPTIONS
icon = "";
};
};
class ACE_ArmLeft {
displayName = "$STR_ACE_Interaction_ArmLeft";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
EXCEPTIONS
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(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
EXCEPTIONS
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class BloodIV: fieldDressing {
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));
EXCEPTIONS
icon = PATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
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));
EXCEPTIONS
};
class BloodIV_250: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
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));
EXCEPTIONS
};
class PlasmaIV_250: PlasmaIV {
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));
EXCEPTIONS
};
class SalineIV: BloodIV {
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));
EXCEPTIONS
};
class SalineIV_500: SalineIV {
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));
EXCEPTIONS
};
class SalineIV_250: SalineIV {
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));
EXCEPTIONS
};
class CheckPulse: fieldDressing {
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));
EXCEPTIONS
icon = "";
};
class CheckBloodPressure: CheckPulse {
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));
EXCEPTIONS
};
class RemoveTourniquet: Tourniquet {
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));
EXCEPTIONS
};
};
class ACE_ArmRight {
displayName = "$STR_ACE_Interaction_ArmRight";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
EXCEPTIONS
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(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
};
class QuikClot: fieldDressing {
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));
EXCEPTIONS
};
class Tourniquet: fieldDressing {
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));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
EXCEPTIONS
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
EXCEPTIONS
};
class BloodIV: fieldDressing {
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));
EXCEPTIONS
icon = PATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
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));
EXCEPTIONS
};
class BloodIV_250: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
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));
EXCEPTIONS
};
class PlasmaIV_250: PlasmaIV {
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));
EXCEPTIONS
};
class SalineIV: BloodIV {
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));
EXCEPTIONS
};
class SalineIV_500: SalineIV {
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));
EXCEPTIONS
};
class SalineIV_250: SalineIV {
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));
EXCEPTIONS
};
class CheckPulse: fieldDressing {
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));
EXCEPTIONS
icon = "";
};
class CheckBloodPressure: CheckPulse {
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));
EXCEPTIONS
};
class RemoveTourniquet: Tourniquet {
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));
EXCEPTIONS
};
};
class ACE_LegLeft {
displayName = "$STR_ACE_Interaction_LegLeft";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
EXCEPTIONS
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(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
};
class QuikClot: fieldDressing {
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));
EXCEPTIONS
};
class Tourniquet: fieldDressing {
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));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
EXCEPTIONS
};
class BloodIV: fieldDressing {
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));
EXCEPTIONS
icon = PATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
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));
EXCEPTIONS
};
class BloodIV_250: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
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));
EXCEPTIONS
};
class PlasmaIV_250: PlasmaIV {
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));
EXCEPTIONS
};
class SalineIV: BloodIV {
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));
EXCEPTIONS
};
class SalineIV_500: SalineIV {
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));
EXCEPTIONS
};
class SalineIV_250: SalineIV {
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));
EXCEPTIONS
};
class RemoveTourniquet: Tourniquet {
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));
EXCEPTIONS
};
};
class ACE_LegRight {
displayName = "$STR_ACE_Interaction_LegRight";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
EXCEPTIONS
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(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment));
EXCEPTIONS
};
class QuikClot: fieldDressing {
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));
EXCEPTIONS
};
class Tourniquet: fieldDressing {
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));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
EXCEPTIONS
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));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
EXCEPTIONS
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
EXCEPTIONS
};
class BloodIV: fieldDressing {
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));
EXCEPTIONS
icon = PATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
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));
EXCEPTIONS
};
class BloodIV_250: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV: BloodIV {
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));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
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));
EXCEPTIONS
};
class PlasmaIV_250: PlasmaIV {
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));
EXCEPTIONS
};
class SalineIV: BloodIV {
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));
EXCEPTIONS
};
class SalineIV_500: SalineIV {
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));
EXCEPTIONS
};
class SalineIV_250: SalineIV {
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));
EXCEPTIONS
};
class RemoveTourniquet: Tourniquet {
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));
EXCEPTIONS
};
};

View File

@ -0,0 +1,509 @@
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));
};
};
};

View File

@ -18,10 +18,13 @@ class ACE_Medical_Actions {
callbackProgress = "";
animationPatient = "";
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
animationCaller = "AinvPknlMstpSlayWnonDnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = { {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} };
};
class Morphine: Bandage {
displayName = "$STR_ACE_Medical_Inject_Morphine";
@ -30,6 +33,7 @@ class ACE_Medical_Actions {
items[] = {"ACE_morphine"};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
};
class Epinephrine: Bandage {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
@ -39,6 +43,7 @@ class ACE_Medical_Actions {
items[] = {"ACE_epinephrine"};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
};
class BloodIV: Bandage {
displayName = "$STR_ACE_Medical_Transfuse_Blood";
@ -48,35 +53,39 @@ class ACE_Medical_Actions {
items[] = {{"ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"}};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = {};
};
class Carry: Bandage {
displayName = "";
displayNameProgress = "";
class Tourniquet: Bandage {
displayName = "$STR_ACE_Medical_Apply_Tourniquet";
displayNameProgress = "$STR_ACE_Medical_Applying_Tourniquet";
items[] = {"ACE_tourniquet"};
treatmentTime = 6;
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)));
litter[] = {};
};
class BodyBag: Bandage {
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
displayNameProgress = "$STR_ACE_MEDICAL_PlacingInBodyBag";
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));
treatmentTime = 2;
items[] = {"ACE_bodyBag"};
condition = "!alive (_this select 1);";
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
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));
animationPatientUnconscious = "";
itemConsumed = 1;
litter[] = {};
};
};
class Advanced {
class FieldDressing {
displayName = "$STR_ACE_Medical_Bandage";
displayNameProgress = "$STR_ACE_Medical_Bandaging";
// Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All.
treatmentLocations[] = {"All"};
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
@ -92,10 +101,13 @@ class ACE_Medical_Actions {
callbackProgress = "";
itemConsumed = 1;
animationPatient = "";
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
animationCaller = "AinvPknlMstpSlayWnonDnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = { {"All", "", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} };
};
class PackingBandage: fieldDressing {
items[] = {"ACE_packingBandage"};
@ -107,29 +119,44 @@ class ACE_Medical_Actions {
items[] = {"ACE_quikclot"};
};
class Tourniquet: fieldDressing {
displayName = "$STR_ACE_Medical_Apply_Tourniquet";
displayNameProgress = "$STR_ACE_Medical_Applying_Tourniquet";
items[] = {"ACE_tourniquet"};
treatmentTime = 6;
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)));
litter[] = {};
};
class Morphine: fieldDressing {
displayName = "$STR_ACE_Medical_Inject_Morphine";
displayNameProgress = "$STR_ACE_Medical_Injecting_Morphine";
items[] = {"ACE_morphine"};
treatmentTime = 3;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
};
class Atropine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Atropine";
displayNameProgress = "$STR_ACE_Medical_Injecting_Atropine";
items[] = {"ACE_atropine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_atropine"}} };
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
displayNameProgress = "$STR_ACE_Medical_Injecting_Epinephrine";
items[] = {"ACE_epinephrine"};
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
};
class BloodIV: fieldDressing {
displayName = "$STR_ACE_Medical_Transfuse_Blood";
displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood";
items[] = {"ACE_bloodIV"};
requiredMedic = 1;
treatmentTime = 7;
callbackSuccess = QUOTE(DFUNC(treatmentIV));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = {};
};
class BloodIV_500: BloodIV {
items[] = {"ACE_bloodIV_500"};
@ -138,6 +165,8 @@ class ACE_Medical_Actions {
items[] = {"ACE_bloodIV_250"};
};
class PlasmaIV: BloodIV {
displayName = "$STR_ACE_Medical_Transfuse_Plasma";
displayNameProgress = "$STR_ACE_Medical_Transfusing_Plasma";
items[] = {"ACE_plasmaIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
@ -148,6 +177,8 @@ class ACE_Medical_Actions {
items[] = {"ACE_plasmaIV_250"};
};
class SalineIV: BloodIV {
displayName = "$STR_ACE_Medical_Transfuse_Saline";
displayNameProgress = "$STR_ACE_Medical_Transfusing_Saline";
items[] = {"ACE_salineIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
@ -158,24 +189,37 @@ class ACE_Medical_Actions {
items[] = {"ACE_salineIV_250"};
};
class SurgicalKit: fieldDressing {
displayName = "";
displayNameProgress = "";
items[] = {"ACE_surgicalKit"};
treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"};
requiredMedic = 2;
treatmentTime = 15;
treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)};
requiredMedic = QGVAR(medicSetting_SurgicalKit);
treatmentTime = 10;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_surgicalKit));
itemConsumed = 0;
itemConsumed = QGVAR(consumeItem_SurgicalKit);
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"} }};
};
class PersonalAidKit: fieldDressing {
displayName = "";
displayNameProgress = "";
items[] = {"ACE_personalAidKit"};
treatmentLocations[] = {"All"};
requiredMedic = 1;
treatmentTime = 15;
treatmentLocations[] = {QGVAR(useLocation_PAK)};
requiredMedic = QGVAR(medicSetting_PAK);
treatmentTime = 10;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
itemConsumed = 0;
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
itemConsumed = QGVAR(consumeItem_PAK);
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationCaller = "AinvPknlMstpSlayWnonDnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "";
animationCallerSelfProne = "";
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}}, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}} }, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} };
};
class CheckPulse: fieldDressing {
displayName = "";
displayNameProgress = "";
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 2;
@ -186,6 +230,7 @@ class ACE_Medical_Actions {
animationPatient = "";
animationCaller = ""; // TODO
itemConsumed = 0;
litter[] = {};
};
class CheckBloodPressure: CheckPulse {
callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure));
@ -199,55 +244,41 @@ class ACE_Medical_Actions {
condition = QUOTE([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo));
};
class CPR: fieldDressing {
displayName = "CPR";
displayNameProgress = "Performing CPR";
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 25;
treatmentTime = 15;
items[] = {};
condition = ""; // unconscious?
condition = "((_this select 1) getvariable ['ACE_medical_inCardiacArrest', false])";
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
callbackFailure = "";
callbackProgress = "";
callbackProgress = "(((_this select 0) select 1) getvariable ['ACE_medical_inCardiacArrest', false])";
animationPatient = "";
animationCaller = ""; // TODO
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationCaller = "AinvPknlMstpSlayWnonDnon_medic";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "";
animationCallerSelfProne = "";
itemConsumed = 0;
litter[] = {};
};
class BodyBag: fieldDressing {
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
displayNameProgress = "$STR_ACE_MEDICAL_PlacingInBodyBag";
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 7.5;
treatmentTime = 2;
items[] = {"ACE_bodyBag"};
condition = "!alive (_this select 1);";
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
itemConsumed = 0;
animationPatientUnconscious = "";
itemConsumed = 1;
litter[] = {};
};
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));
};
};
};
@ -443,6 +474,8 @@ class ACE_Medical_Advanced {
class damageTypes {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
lethalDamage = 0.01;
class bullet {
// above damage, amount. Put the highest threshold to the left and lower the threshold with the elements to the right of it.
thresholds[] = {{0.1, 1}};
@ -465,8 +498,9 @@ class ACE_Medical_Advanced {
selectionSpecific = 0;
};
class backblast {
thresholds[] = {{0.25, 5}};
thresholds[] = {{0, 2},{0.55, 5}, {1, 6}};
selectionSpecific = 0;
lethalDamage = 1;
};
class stab {
thresholds[] = {{0.1, 1}};

View File

@ -14,19 +14,14 @@ class ACE_Settings {
typeName = "SCALAR";
values[] = {"Players only", "Players and AI"};
};
class GVAR(maxRevives) {
typeName = "NUMBER";
value = 1;
};
class GVAR(enableOverdosing) {
typeName = "BOOL";
value = true;
};
class GVAR(bleedingCoefficient) {
typeName = "NUMBER";
value = 1;
};
class GVAR(bleedingCoefficient) {
typeName = "SCALAR";
value = 1;
};
class GVAR(enableAirway) {
typeName = "BOOL";
value = false;
@ -41,35 +36,81 @@ class ACE_Settings {
};
class GVAR(enableVehicleCrashes) {
typeName = "BOOL";
value = true;
value = 1;
};
class GVAR(enableScreams) {
typeName = "BOOL";
value = true;
value = 1;
};
class GVAR(playerDamageThreshold) {
typeName = "NUMBER";
typeName = "SCALAR";
value = 1;
};
class GVAR(AIDamageThreshold) {
typeName = "NUMBER";
typeName = "SCALAR";
value = 1;
};
class GVAR(enableUnsconsiousnessAI) {
value = 1;
typeName = "NUMBER";
typeName = "SCALAR";
values[] = {"Disabled", "Enabled", "50/50"};
};
class GVAR(preventInstaDeath) {
typeName = "BOOL";
value = false;
value = 0;
};
class GVAR(maxReviveTime) {
typeName = "NUMBER";
typeName = "SCALAR";
value = 120;
};
class GVAR(amountOfReviveLives) {
typeName = "SCALAR";
value = -1;
};
class GVAR(allowDeadBodyMovement) {
typeName = "BOOL";
value = false;
value = 0;
};
class GVAR(allowLitterCreation) {
typeName = "BOOL";
value = true;
};
class GVAR(litterCleanUpDelay) {
typeName = "SCALAR";
value = 1800;
};
class GVAR(medicSetting_PAK) {
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_SurgicalKit) {
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(consumeItem_PAK) {
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(consumeItem_SurgicalKit) {
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(useLocation_PAK) {
typeName = "SCALAR";
value = 3;
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
};
class GVAR(useLocation_SurgicalKit) {
typeName = "SCALAR";
value = 2;
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
};
class GVAR(keepLocalSettingsSynced) {
typeName = "BOOL";
value = 1;
};
};

View File

@ -17,6 +17,11 @@ class Extended_Init_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_init));
};
};
class ACE_bodyBagObject {
class ADDON {
init = QUOTE(_this call DEFUNC(dragging,initObject));
};
};
};
class Extended_Respawn_EventHandlers {

File diff suppressed because it is too large Load Diff

View File

@ -10,14 +10,12 @@ class CfgWeapons {
type = 0;
class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 4;
type = 201;
};
};
class Medikit: ItemCore {
type = 0;
class ItemInfo: MedikitItem {
mass = 60;
type = 201;
};
};
@ -25,17 +23,16 @@ class CfgWeapons {
class ACE_ItemCore;
class ACE_fieldDressing: ACE_ItemCore {
scope = 2;
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
model = QUOTE(PATHTOF(data\bandage.p3d));
picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa));
displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY;
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_packingBandage: ItemCore {
class ACE_packingBandage: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -46,11 +43,10 @@ class CfgWeapons {
descriptionShort = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_elasticBandage: ItemCore {
class ACE_elasticBandage: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -61,11 +57,10 @@ class CfgWeapons {
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_tourniquet: ItemCore {
class ACE_tourniquet: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -76,11 +71,10 @@ class CfgWeapons {
descriptionShort = $STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_TOURNIQUET_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_morphine: ItemCore {
class ACE_morphine: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -91,11 +85,10 @@ class CfgWeapons {
descriptionShort = $STR_ACE_MEDICAL_MORPHINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_MORPHINE_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_atropine: ItemCore {
class ACE_atropine: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -106,11 +99,11 @@ class CfgWeapons {
descriptionShort = $STR_ACE_MEDICAL_ATROPINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_ATROPINE_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_epinephrine: ItemCore {
class ACE_epinephrine: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -121,11 +114,10 @@ class CfgWeapons {
descriptionShort = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1;
type=201;
mass = 1;
};
};
class ACE_plasmaIV: ItemCore {
class ACE_plasmaIV: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -135,24 +127,21 @@ class CfgWeapons {
descriptionUse = $STR_ACE_MEDICAL_PLASMA_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 10;
type = 201;
};
};
class ACE_plasmaIV_500: ACE_plasmaIV {
displayName = $STR_ACE_MEDICAL_PLASMA_IV_500;
class ItemInfo: InventoryItem_Base_F {
mass = 5;
type = 201;
};
};
class ACE_plasmaIV_250: ACE_plasmaIV {
displayName = $STR_ACE_MEDICAL_PLASMA_IV_250;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
};
class ACE_bloodIV: ItemCore {
class ACE_bloodIV: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -163,24 +152,21 @@ class CfgWeapons {
descriptionUse = $STR_ACE_MEDICAL_BLOOD_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 10;
type = 201;
};
};
class ACE_bloodIV_500: ACE_bloodIV {
displayName = $STR_ACE_MEDICAL_BLOOD_IV_500;
class ItemInfo: InventoryItem_Base_F {
mass = 5;
type = 201;
};
};
class ACE_bloodIV_250: ACE_bloodIV {
displayName = $STR_ACE_MEDICAL_BLOOD_IV_250;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
};
class ACE_salineIV: ItemCore {
class ACE_salineIV: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -190,24 +176,21 @@ class CfgWeapons {
descriptionUse = $STR_ACE_MEDICAL_SALINE_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 10;
type = 201;
};
};
class ACE_salineIV_500: ACE_salineIV {
displayName = $STR_ACE_MEDICAL_SALINE_IV_500;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
};
class ACE_salineIV_250: ACE_salineIV {
displayName = $STR_ACE_MEDICAL_SALINE_IV_250;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
};
class ACE_quikclot: ItemCore {
class ACE_quikclot: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
@ -218,25 +201,22 @@ class CfgWeapons {
descriptionUse = $STR_ACE_MEDICAL_QUIKCLOT_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
type = 201;
};
};
class ACE_personalAidKit: ItemCore {
class ACE_personalAidKit: ACE_ItemCore {
scope = 2;
value = 1;
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\personal_aid_kit.paa));
//model = QUOTE(PATHTOF(equipment\Personal-aidkits\MTP.p3d));
descriptionShort = $STR_ACE_MEDICAL_AID_KIT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 2;
type = 201;
};
};
class ACE_surgicalKit: ItemCore {
class ACE_surgicalKit: ACE_ItemCore {
scope=2;
displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
model = QUOTE(PATHTOF(data\surgical_kit.p3d));
@ -245,10 +225,9 @@ class CfgWeapons {
descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 5;
type = 201;
};
};
class ACE_bodyBag: ItemCore {
class ACE_bodyBag: ACE_ItemCore {
scope=2;
displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY;
model = QUOTE(PATHTOF(data\bodybagItem.p3d));
@ -257,7 +236,6 @@ class CfgWeapons {
descriptionUse = $STR_ACE_MEDICAL_BODYBAG_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 15;
type = 201;
};
};
};

View File

@ -13,6 +13,28 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
["medical_onUnconscious", {
if (local (_this select 0)) then {
_unit = _this select 0;
if (_this select 1) then {
_unit setVariable ["tf_globalVolume", 0.4];
_unit setVariable ["tf_voiceVolume", 0, true];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
_unit setVariable ["acre_sys_core_globalVolume", 0.4];
} else {
_unit setVariable ["tf_globalVolume", 1];
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
_unit setVariable ["acre_sys_core_globalVolume", 1];
};
};
}] call ace_common_fnc_addEventHandler;
// Initialize all effects
_fnc_createEffect = {
private ["_type", "_layer", "_default"];
@ -217,13 +239,18 @@ if (isNil QGVAR(level)) then {
}, 0, []] call CBA_fnc_addPerFrameHandler;
// broadcast injuries to JIP clients in a MP session
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 {
{
[_x, player] call FUNC(requestWoundSync);
}foreach units group player;
if (USE_WOUND_EVENT_SYNC) then {
// broadcast injuries to JIP clients in a MP session
if (isMultiplayer && hasInterface) then {
["playerChanged", {
EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer);
if (alive _newPlayer) then {
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
{
[_x, _newPlayer] call FUNC(requestWoundSync);
}foreach units group player;
};
}] call EFUNC(common,addEventhandler);
};
};
@ -232,6 +259,11 @@ if (isMultiplayer) then {
{(((_this select 0) getvariable [QGVAR(pain), 0]) > 0.9)},
{(((_this select 0) call FUNC(getBloodLoss)) > 0.25)},
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])},
{((_this select 0) getvariable ["ACE_isDead", false])},
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)}
] call FUNC(addUnconsciousCondition);
// Prevent all types of interaction while unconscious
// @todo: probably remove this when CBA keybind hold key works properly
["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition);

Some files were not shown because too many files have changed in this diff Show More