Merge branch 'master' into medical-advanced

Conflicts:
	addons/medical/functions/fnc_handleUnitVitals.sqf
This commit is contained in:
Glowbal 2015-03-21 14:54:37 +01:00
commit 4bcfd1a0ba
117 changed files with 3220 additions and 1099 deletions

View File

@ -17,7 +17,7 @@
</p>
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a> | <a href="#">BIF thread</a></strong></sup></p>
**ACE 3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
This mod is entirely **open-source**, and everyone is free to propose changes or maintain their own, customized version as long as they make their changes open to the public in accordance with the GNU General Public License (for more information check the license file attached to this project).

Binary file not shown.

View File

@ -0,0 +1,25 @@
// TMR: Optics initialization and functions
// (C) 2013 Ryan Schultz. See LICENSE.
// Request a resource layer from the game engine.
AGM_Optics_scopeRSC = ["AGM_Optics_Scope"] call BIS_fnc_rscLayer;
// Set global variables
AGM_Optics_inScope = false; // Is the scope up?
AGM_Optics_currentOptic = ""; // What optic is attached right now?
0 = 0 spawn {
waituntil {!isNull (findDisplay 46)};
[] call AGM_Optics_fnc_initScope;
// PiP technique by BadBenson
AGM_Optics_Camera = "camera" camCreate (positioncameratoworld [0,0,0]);
AGM_Optics_Camera camSetFov 0.7;
AGM_Optics_Camera camSetTarget player;
AGM_Optics_Camera camCommit 1;
"agm_optics_rendertarget0" setPiPEffect [2, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0], [0.199, 0.587, 0.114, 0.0]];
AGM_Optics_Camera cameraEffect ["INTERNAL", "BACK","agm_optics_rendertarget0"];
waitUntil {[] call AGM_Optics_fnc_mainLoop; False};
};

View File

@ -0,0 +1,454 @@
class CfgPatches {
class AGM_Optics {
units[] = {};
weapons[] = {};
requiredVersion = 0.60;
requiredAddons[] = {AGM_Core};
version = 0.1;
author[] = {"Taosenai"};
authorUrl = "http://www.ryanschultz.org/tmr/";
};
};
class CfgFunctions {
class AGM_Optics {
class AGM_Optics {
file = "AGM_Optics\functions";
class firedEH;
class hideScope;
class initScope;
class mainLoop;
};
};
};
class Extended_PostInit_EventHandlers {
class AGM_Optics {
clientInit = "call compile preProcessFileLineNumbers '\AGM_Optics\clientInit.sqf'";
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class AGM_Optics {
clientFiredBIS = "_this call AGM_Optics_fnc_firedEH;";
};
};
};
class CfgOpticsEffect {
class AGM_OpticsRadBlur1 {
type = "radialblur";
params[] = {0.015, 0, 0.14, 0.2};
priority = 950;
};
};
class CfgWeapons {
class ItemCore;
class InventoryItem_Base_F;
class InventoryMuzzleItem_Base_F;
class InventoryOpticsItem_Base_F;
class optic_Hamr : ItemCore {
displayName = "HAMR 4x";
descriptionShort = "High Accuracy Multi-Range Optic<br />Magnification: 4x<br />Reticle: CM-RW 6.5mm";
scope = 2;
weaponInfoType = "AGM_RscWeapon";
AGM_Optics_enhanced = 1;
AGM_Optics_reticle = "\AGM_Optics\data\hamr\hamr-reticle65_ca.paa";
AGM_Optics_reticleIllum = "\AGM_Optics\data\hamr\hamr-reticle65Illum_ca.paa";
AGM_Optics_body = "\AGM_Optics\data\hamr\hamr-body_ca.paa";
AGM_Optics_bodyNight = "\AGM_Optics\data\hamr\hamr-bodyNight_ca.paa";
model = "\A3\weapons_f\acc\acco_hamr_F";
class ItemInfo : InventoryOpticsItem_Base_F {
mass = 4;
optics = 1;
optictype = 1;
rmbhint = "HAMR";
modeloptics = "\AGM_Optics\agm_optics_pip.p3d";
class OpticsModes {
class Hamr2Collimator {
AGM_Optics_enhanced = 0;
opticsID = 1;
useModelOptics = 0;
opticsppeffects[] = {};
opticsFlare = 0;
opticsDisablePeripherialVision = 0;
opticsZoomMin = 0.375;
opticsZoomMax = 1;
opticsZoomInit = 0.75;
memoryPointCamera = "eye";
visionMode[] = {};
distanceZoomMin = 300;
distanceZoomMax = 300;
};
class Hamr2Scope {
cameradir = "";
distanceZoomMin = 300;
distanceZoomMax = 300;
memorypointcamera = "opticView";
opticsdisableperipherialvision = 0;
opticsdisplayname = "IHAMR";
opticsflare = 1;
opticsid = 2;
opticsppeffects[] = {"OpticsCHAbera2", "OpticsBlur1", "AGM_OpticsRadBlur1"};
opticszoominit = 0.0872664626;
opticszoommax = 0.0872664626;
opticszoommin = 0.0872664626;
discretefov[] = {0.0872664626};
discreteinitindex = 0;
usemodeloptics = 1;
modeloptics = "\AGM_Optics\agm_optics_pip.p3d";
visionmode[] = {"Normal", "NVG"};
};
};
};
};
class optic_Arco : ItemCore {
descriptionshort = "Advanced Rifle Combat Optic<br />Magnification: 4x<br />Reticle: SpecterDR 6.5mm";
displayname = "ARCO 4x";
picture = "\A3\weapons_F\Data\UI\gear_acco_Arco_CA.paa";
scope = 2;
weaponInfoType = "AGM_RscWeapon";
model = "\A3\weapons_f\acc\acco_Arco_F";
AGM_Optics_enhanced = 1;
AGM_Optics_reticle = "\AGM_Optics\data\arco\arco-reticle65_ca.paa";
AGM_Optics_reticleIllum = "\AGM_Optics\data\arco\arco-reticle65Illum_ca.paa";
AGM_Optics_body = "\AGM_Optics\data\arco\arco-body_ca.paa";
AGM_Optics_bodyNight = "\AGM_Optics\data\arco\arco-bodyNight_ca.paa";
class ItemInfo: InventoryOpticsItem_Base_F {
mass = 4;
optics = 1;
optictype = 1;
rmbhint = "ARCO";
class OpticsModes {
class ARCO2collimator {
AGM_Optics_enhanced = 0;
cameradir = "";
distancezoommax = 300;
distancezoommin = 300;
memorypointcamera = "eye";
opticsdisableperipherialvision = 0;
opticsdisplayname = "CQB";
opticsflare = 0;
opticsid = 1;
opticsppeffects[] = {};
opticszoominit = 0.75;
opticszoommax = 1.1;
opticszoommin = 0.375;
usemodeloptics = 0;
visionmode[] = {};
};
class ARCO2scope: ARCO2collimator {
cameradir = "";
distanceZoomMin = 300;
distanceZoomMax = 300;
memorypointcamera = "opticView";
opticsdisableperipherialvision = 0;
opticsdisplayname = "ARCO";
opticsflare = 1;
opticsid = 2;
opticsppeffects[] = {"OpticsCHAbera2", "OpticsBlur1", "AGM_OpticsRadBlur1"};
opticszoominit = 0.0872664626; // 0.0872664626 rad = 5 degrees
opticszoommax = 0.0872664626; // SpecterDR 4x is 6 degrees
opticszoommin = 0.0872664626; // Scope graphic in game covers 1 degree
discretefov[] = {0.0872664626};
discreteinitindex = 0;
usemodeloptics = 1;
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
visionmode[] = {"Normal"};
};
};
};
};
class optic_MRCO : ItemCore {
displayName = "MRCO 1x/4x";
descriptionShort = "Medium Range Combat Optic<br />Magnification: 1x/4x<br />Reticle: Pitbull Gen II 5.56mm";
scope = 2;
weaponInfoType = "AGM_RscWeapon";
AGM_Optics_enhanced = 1;
AGM_Optics_reticle = "\AGM_Optics\data\mrco\mrco-reticle556_ca.paa";
AGM_Optics_reticleIllum = "\AGM_Optics\data\mrco\mrco-reticle556Illum_ca.paa";
AGM_Optics_body = "\AGM_Optics\data\mrco\mrco-body_ca.paa";
AGM_Optics_bodyNight = "\AGM_Optics\data\mrco\mrco-bodyNight_ca.paa";
class ItemInfo : InventoryOpticsItem_Base_F {
opticType = 1;
mass = 4;
optics = 1;
modelOptics = "\A3\Weapons_f_beta\acc\reticle_MRCO_F";
class OpticsModes {
class MRCOcq {
AGM_Optics_enhanced = 0;
opticsID = 1;
useModelOptics = 0;
opticsPPEffects[] = {};
opticsFlare = 0;
opticsDisablePeripherialVision = 0;
opticsZoomMin = 0.375;
opticsZoomMax = 1;
opticsZoomInit = 0.75;
memoryPointCamera = "eye";
visionMode[] = {};
distanceZoomMin = 100;
distanceZoomMax = 100;
};
class MRCOscope {
cameradir = "";
distanceZoomMin = 300;
distanceZoomMax = 300;
memorypointcamera = "eye";
opticsdisableperipherialvision = 0;
opticsdisplayname = "MRCO";
opticsflare = 1;
opticsid = 2;
opticsppeffects[] = {"OpticsCHAbera2", "OpticsBlur2", "AGM_OpticsRadBlur1"};
opticszoominit = 0.0872664626;
opticszoommax = 0.0872664626;
opticszoommin = 0.0872664626;
discretefov[] = {0.0872664626};
discreteinitindex = 0;
usemodeloptics = 1;
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
visionmode[] = {"Normal"};
};
};
};
};
class optic_Nightstalker : ItemCore {
class ItemInfo: InventoryOpticsItem_Base_F {
class OpticsModes {
class NCTALKEP {};
class Iron : NCTALKEP {
opticsppeffects[] = {}; // Fix Arma 3 bug
};
};
};
};
class optic_SOS: ItemCore {
class ItemInfo: InventoryOpticsItem_Base_F {
modelOptics = "\AGM_Optics\agm_optics_pip.p3d";
class OpticsModes {
class Snip {
visionMode[] = {"Normal","TI","NVG"};
thermalMode[] = {5,6};
opticsPPEffects[] = {"OpticsCHAbera1","radblur"};
modelOptics[] = {"\AGM_Optics\agm_optics_pip.p3d","\AGM_Optics\agm_optics_pip.p3d"};
};
};
};
};
class optic_DMS : ItemCore {
class ItemInfo: InventoryOpticsItem_Base_F {
class OpticsModes {
class Snip {};
class Iron : Snip {
opticsppeffects[] = {}; // Fix Arma 3 bug
};
};
};
};
class optic_LRPS : ItemCore {
descriptionshort = "Nightforce NXS Riflescope<br />Magnification: 5.5-22x";
displayname = "NXS 5.5-22x";
weaponinfotype = "AGM_RscWeapon";
AGM_Optics_enhanced = 1;
AGM_Optics_reticle = "\AGM_Optics\data\sos\sos-reticleMLR_ca.paa";
AGM_Optics_reticleIllum = "\AGM_Optics\data\sos\sos-reticleMLRIllum_ca.paa";
AGM_Optics_body = "\AGM_Optics\data\sos\sos-body_ca.paa";
AGM_Optics_bodyNight = "\AGM_Optics\data\sos\sos-bodyNight_ca.paa";
class ItemInfo: InventoryOpticsItem_Base_F {
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
weaponinfotype = "RscWeaponRangeZeroingFOV";
opticType = 2; // Sniper optics
class OpticsModes {
// Based on Nightforce NXS 5.5-22 scope
class Snip {
cameradir = "";
discretedistance[] = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300};
discretedistanceinitindex = 0;
discreteinitindex = 0;
distancezoommax = 2300;
distancezoommin = 100;
memorypointcamera = "opticView";
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
opticsdisableperipherialvision = 1;
opticsdisplayname = "SOS";
opticsflare = 1;
opticsid = 1;
opticsppeffects[] = {"OpticsCHAbera1", "OpticsBlur1", "AGM_OpticsRadBlur1"};
// How to determine opticszoom
// First do the basic math based on the listed FOV of the scope to
// get a baseline FOV
// 0.1 meter at 100 meters = 1 mrad
//
// 5.5x FOV -- 5.3 m at 100 m = 53 mrad
// = 0.053 rad = 3.037 deg FOV
// 22x FOV -- 1.4 m at 100m = 14 mrad
// = 0.014 rad = 0.802 deg
// The FOV you give the engine is based on a rather larger scope outline, so we
// have to do this extra work ourselves.
// At 1680x1050
// The width of a TMR optic viewfield is 864px
// The engine viewport width (which is what the below FOV is based on) is 980
// (864/980) = (FOV to give engine / true FOV of optic)
// 864/980 * 0.053 = 0.04673
// 864/980 * 0.014 = 0.01234
// Measured experimentally, these values seem quite right.
// Certainly they're close enough after you account for pixel density, etc.
opticszoominit = 0.01234;
opticszoommax = 0.04673;
opticszoommin = 0.01234;
discretefov[] = {};
usemodeloptics = 1;
visionmode[] = {"Normal"};
};
};
};
};
class optic_Yorris : ItemCore {
descriptionshort = "Burris FastFire II Red Dot Sight<br />Magnification: 1x";
displayname = "FastFire II";
};
class optic_MRD : ItemCore {
descriptionshort = "Eotech MRDS Red Dot Sight<br />Magnification: 1x";
displayname = "MRDS";
};
class optic_Holosight : ItemCore {
descriptionshort = "Eotech XPS3 Holographic Sight<br />Magnification: 1x";
displayname = "XPS3 Holo";
};
};
class RscOpticsText;
class RscOpticsValue;
class RscInGameUI {
class RscUnitInfo;
class RscWeaponZeroing;
class AGM_RscWeapon : RscWeaponZeroing {
idd = -1;
controls[] = {"CA_Zeroing", "CA_FOVMode"};
onLoad ="with uiNameSpace do { AGM_OpticsIGUI = _this select 0 }";
class CA_FOVMode : RscOpticsValue {
idc = 154;
style = 2;
colorText[] = {0, 0, 0, 0};
x = 0;
y = 0;
w = 0;
h = 0;
};
};
};
class RscTitles {
class AGM_Optics_Scope {
idd = -1;
onLoad = "with uiNameSpace do { AGM_Optics_Scope = _this select 0 };";
onUnload = "";
movingEnable = 1;
duration = 10000;
controls[] = {"Reticle", "ReticleNight", "BodyNight", "Body"};
class Reticle {
colorBackground[] = {0,0,0, 0};
colorText[] = {1,1,1, 1};
fade = 0;
font = "PuristaMedium";
h = SafeZoneH;
idc = 1;
lineSpacing = 1.0;
movingEnable = 1;
size = 0;
sizeEx = 1;
style = 48;
text = "";
type = 0;
w = SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1));
x = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1)))/2);
y = SafeZoneY;
};
class ReticleNight : Reticle {
idc = 2;
text = "";
};
class Body : Reticle {
idc = 6;
text = "";
x = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1))));
y = SafeZoneY - (SafeZoneH/2);
w = SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1)) * 2;
h = SafeZoneH * 2;
};
class BodyNight : Body {
idc = 5;
text = "";
};
};
};
class PreloadTextures {
class CfgWeapons {
class optic_hamr {
AGM_Optics_body= "*";
AGM_Optics_bodyNight = "*";
AGM_Optics_reticle = "*";
AGM_Optics_reticleIllum = "*";
};
class optic_arco {
AGM_Optics_body= "*";
AGM_Optics_bodyNight = "*";
AGM_Optics_reticle = "*";
AGM_Optics_reticleIllum = "*";
};
class optic_mrco {
AGM_Optics_body= "*";
AGM_Optics_bodyNight = "*";
AGM_Optics_reticle = "*";
AGM_Optics_reticleIllum = "*";
};
class optic_LRPS {
AGM_Optics_body= "*";
AGM_Optics_bodyNight = "*";
AGM_Optics_reticle = "*";
AGM_Optics_reticleIllum = "*";
};
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
ambient[]={0,0,0,0.89999998};
diffuse[]={0,0,0,0.89999998};
forcedDiffuse[]={0,0,0,1};
emmisive[]={0,0,0,1};
specular[]={0,0,0,0};
specularPower=1;
PixelShaderID="Normal";
VertexShaderID="Basic";

View File

@ -0,0 +1,20 @@
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={1,1,1,1};
specular[]={1,0.99956858,1,1};
specularPower=1;
PixelShaderID="Normal";
VertexShaderID="Basic";
class Stage1
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,149 @@
/*
* Original Author: Taosenai
* Adapted By: KoffeinFlummi
*
* Animates the scope when firing.
*
* Arguments:
* 0: Unit
* 1: Weapon
* 2: Muzzle
* 3: Mode
* 4: Ammo
* 5: Magazine
* 6: Projectile
*
* Return Value:
* None
*/
if (_this select 0 != AGM_player) exitwith {}; // Sanity check
0 = _this spawn {
disableSerialization;
_weaponType = _this select 1;
_config = configFile >> "CfgWeapons" >> _weaponType;
_scope = uiNameSpace getVariable "AGM_Optics_Scope";
// @todo
_recoilMulti = getNumber (_config >> "tmr_smallarms_recoil_shakeMultiplier"); // Will be 0 if undefined
if (_recoilMulti == 0) then {
_recoilMulti = 1;
};
if (_recoilMulti > 2.6) then {
_recoilMulti = 2.6; // Don't get too high
};
// Reduce the reticle movement as the player drops into lower, supported stances.
_detectStance = (player selectionPosition "Neck" select 2);
if (_detectStance < 1.3) then {
_recoilMulti = _recoilMulti - 0.10;
};
if (_detectStance < 0.7) then {
_recoilMulti = _recoilMulti - 0.20;
};
// Reduce reticle movement if the player is rested (tmr_autorest).
if (player getVariable ["tmr_autorest_rested", false]) then {
_recoilMulti = _recoilMulti - 0.20;
};
// Reduce reticle movement if the player is deployed (tmr_autorest).
if (player getVariable ["tmr_autorest_deployed", false]) then {
_recoilMulti = _recoilMulti - 0.30;
};
_recoilMulti = 1;
// @endtodo
// Constants which determine how the scope recoils
_recoilScope = 0.03 * _recoilMulti + random 0.0015;
_recoilRing = 0.03 * _recoilMulti + random 0.0015;
_randomScopeShiftX = 0.005 * _recoilMulti - random 0.011;
_randomReticleShiftX = 0.0036 * _recoilMulti + random 0.0045; // Always tend up and right;
_randomReticleShiftY = -0.0046 * _recoilMulti - random 0.0055;
/////////
// Center everything
// getResolution select 4 should return the aspect ratio, but it's totally wrong
// for triple head displays. We'll compute it manually.
_aspectRatio = (getResolution select 0) / (getResolution select 1);
_reticleX = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / _aspectRatio)/2);
_reticleY = SafeZoneY;
_reticleW = SafeZoneWAbs / _aspectRatio;
_reticleH = SafeZoneH;
// Reticle
(_scope displayCtrl 1) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
// Reticle night (illum)
(_scope displayCtrl 2) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
_bodyX = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / _aspectRatio));
_bodyY = SafeZoneY - (SafeZoneH/2);
_bodyW = SafeZoneWAbs / _aspectRatio * 2;
_bodyH = SafeZoneH * 2;
// Body night
(_scope displayCtrl 5) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
// Body
(_scope displayCtrl 6) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
_centerDelay = 0.01;
(_scope displayCtrl 1) ctrlCommit _centerDelay;
(_scope displayCtrl 2) ctrlCommit _centerDelay;
(_scope displayCtrl 5) ctrlCommit _centerDelay;
(_scope displayCtrl 6) ctrlCommit _centerDelay;
/////////
// Create and commit recoil effect
// Move reticle
(_scope displayCtrl 1) ctrlSetPosition [_reticleX - (_recoilScope/2) + _randomReticleShiftX, _reticleY - (_recoilScope/2) + _randomReticleShiftY, _reticleW + _recoilScope, _reticleH + _recoilScope];
(_scope displayCtrl 2) ctrlSetPosition [_reticleX - (_recoilScope/2) + _randomReticleShiftX, _reticleY - (_recoilScope/2) + _randomReticleShiftY, _reticleW + _recoilScope, _reticleH + _recoilScope];
// Move body
(_scope displayCtrl 5) ctrlSetPosition [_bodyX - (_recoilScope/2) + _randomScopeShiftX, _bodyY - (_recoilScope/2), _bodyW + _recoilScope, _bodyH + _recoilScope];
(_scope displayCtrl 6) ctrlSetPosition [_bodyX - (_recoilScope/2) + _randomScopeShiftX, _bodyY - (_recoilScope/2), _bodyW + _recoilScope, _bodyH + _recoilScope];
_recoilDelay = 0.036;
_fa = false;
_cwm = currentWeaponMode player;
if (_cwm == "FullAuto" || _cwm == "manual" || _cwm == "Burst") then {
_recoilDelay = getNumber (_config >> _cwm >> "reloadTime")/2.2;
_fa = true;
};
(_scope displayCtrl 1) ctrlCommit _recoilDelay;
(_scope displayCtrl 2) ctrlCommit _recoilDelay;
(_scope displayCtrl 5) ctrlCommit _recoilDelay;
(_scope displayCtrl 6) ctrlCommit _recoilDelay;
//////////////
waituntil {sleep 0.01; ctrlCommitted (_scope displayCtrl 6)};
//////////////
//////
// Bring them all back
(_scope displayCtrl 1) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
(_scope displayCtrl 2) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
(_scope displayCtrl 5) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
(_scope displayCtrl 6) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
_recenterDelay = 0.09;
if (_fa) then {
_recenterDelay = getNumber (_config >> _cwm >> "reloadTime")/2.2;
};
(_scope displayCtrl 1) ctrlCommit _recenterDelay;
(_scope displayCtrl 2) ctrlCommit _recenterDelay;
(_scope displayCtrl 5) ctrlCommit _recenterDelay;
(_scope displayCtrl 6) ctrlCommit _recenterDelay;
};

View File

@ -0,0 +1,19 @@
/*
* Original Author: Taosenai
* Adapted By: KoffeinFlummi
*
* Hides the scope.
*
*/
private ["_scope"];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlCommit 0;
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlCommit 0;
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlCommit 0;
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlCommit 0;

View File

@ -0,0 +1,25 @@
/*
* Original Author: Taosenai
* Adapted By: KoffeinFlummi
*
* Initializes the scope resources.
*
*/
private ["_display"];
// Make sure we only cutRsc when the resource isn't already available
if (isNil {uiNameSpace getVariable "AGM_Optics_Scope"} or {isNull (uiNameSpace getVariable "AGM_Optics_Scope")}) exitWith {
AGM_Optics_scopeRSC cutRsc ["AGM_Optics_Scope","PLAIN",0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlSetTextColor [1,1,1,0];
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlCommit 0;
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlCommit 0;
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlCommit 0;
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlCommit 0;
True
};
False

View File

@ -0,0 +1,94 @@
/*
* Original Author: Taosenai
* Adapted By: KoffeinFlummi
*
* Monitors the RscInGameUI and displays the overlays when needed.
*
* Arguments:
* None
*
* Return Value:
* None
*/
if !(cameraOn == AGM_player && {alive AGM_player} && {!visibleMap} && {ctrlShown ((uinamespace getVariable "AGM_OpticsIGUI") displayCtrl 154)}) exitWith {
// Failed the state check, hide the scope if it's up
if (AGM_Optics_inScope) then {
// Hide the scope
AGM_Optics_inScope = false;
AGM_Optics_inScope_FOV = ([] call cba_fnc_getFOV) select 0;
[] call AGM_Optics_fnc_hideScope;
};
};
AGM_Optics_Camera setposATL (positioncameratoworld [0,0,0.4]);
AGM_Optics_Camera camPrepareTarget (positioncameratoworld [0,0,50]);
AGM_Optics_Camera camCommitPrepared 0;
if (cameraView == "Gunner") then {
AGM_Optics_Camera camsetFOV 0.7;
AGM_Optics_Camera camcommit 0;
} else {
AGM_Optics_Camera camsetFOV 0.01;
AGM_Optics_Camera camcommit 0;
};
private ["_optic", "_scope"];
disableSerialization;
// Get the name of the attached optic
_optic = (primaryWeaponItems AGM_player) select 2;
_scope = uiNameSpace getVariable "AGM_Optics_Scope";
// Init the scope (if needed)
[] call AGM_Optics_fnc_initScope;
// Check if the optic has changed since we last drew it
_doUpdateAllLayers = false;
if (AGM_Optics_currentOptic != _optic) then {
AGM_Optics_currentOptic = _optic;
_doUpdateAllLayers = true;
};
// Check if Splendid Camera, unit switch, etc. has blanked out our displays for no good reason (grrr)
if (ctrlText (_scope displayCtrl 1) == "") then {
_doUpdateAllLayers = true;
};
// Draw the correct layers (don't show them)
if (_doUpdateAllLayers) then {
(_scope displayCtrl 1) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_reticle");
(_scope displayCtrl 2) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_reticleIllum");
(_scope displayCtrl 5) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_bodyNight");
(_scope displayCtrl 6) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_body");
};
// Stop processing if already in the scope view and FOV hasn't changed
if (AGM_Optics_inScope) exitwith {};
// Mark that we're in enhanced scope view
AGM_Optics_inScope = true;
// Calculate lighting
_lighting = sunOrMoon; // 1 is day, 0 is night
_nightOpacity = 1;
_dayOpacity = (0 max moonIntensity * (1 - (0 max overcast)))/5;
if (_lighting == 1) then {
_nightOpacity = 0;
_dayOpacity = 1;
};
// Apply lighting and make layers visible
(_scope displayCtrl 1) ctrlSetTextColor [1,1,1,1];
(_scope displayCtrl 2) ctrlSetTextColor [1,1,1,_nightOpacity];
(_scope displayCtrl 5) ctrlSetTextColor [1,1,1,_nightOpacity];
(_scope displayCtrl 6) ctrlSetTextColor [1,1,1,_dayOpacity];
(_scope displayCtrl 1) ctrlCommit 0;
(_scope displayCtrl 2) ctrlCommit 0;
(_scope displayCtrl 5) ctrlCommit 0;
(_scope displayCtrl 6) ctrlCommit 0;

View File

@ -1,16 +1,16 @@
/*
* Author: commy2
*
* Check if the unit can interact.
*
* Arguments:
* 0: The player. (Object)
* 1: The interaction target. objNull to ignore. (Object)
* 2: Exceptions. What general conditions are to skip? (Array)
* 0: The player. <OBJECT>
* 1: The interaction target. objNull to ignore. <OBJECT>
* 2: Exceptions. What general conditions are to skip? <ARRAY> (Optional)
*
* Return Value:
* Unit can interact?
*
* Public: No
*/
#include "script_component.hpp"
@ -18,7 +18,11 @@ private ["_unit", "_target", "_exceptions"];
_unit = _this select 0;
_target = _this select 1;
_exceptions = _this select 2;
_exceptions = if (count _this > 2) then {
_this select 2;
} else {
[];
};
_exceptions = [_exceptions, {toLower _this}] call FUNC(map);

View File

@ -1,24 +1,24 @@
/*
* Author: commy2, Glowbal, PabstMirror
*
* Draw progress bar and execute given function if succesful.
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
*
* Argument:
* 0: NUMBER - Total Time (in game "time" seconds)
* 1: ARRAY - Arguments, passed to condition, fail and finish
* 2: CODE or STRING - On Finish: Code called or STRING raised as event.
* 3: CODE or STRING - On Failure: Code called or STRING raised as event.
* 4: STRING - (Optional) Localized Title
* 5: CODE - (Optional) Code to check each frame
* 6: ARRAY - (Optional) Exceptions for checking EGVAR(common,canInteractWith)
*
* Return value:
* Nothing
*
* Example:
* [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar
*/
* Author: commy2, Glowbal, PabstMirror
*
* Draw progress bar and execute given function if succesful.
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
*
* Argument:
* 0: NUMBER - Total Time (in game "time" seconds)
* 1: ARRAY - Arguments, passed to condition, fail and finish
* 2: CODE or STRING - On Finish: Code called or STRING raised as event.
* 3: CODE or STRING - On Failure: Code called or STRING raised as event.
* 4: STRING - (Optional) Localized Title
* 5: CODE - (Optional) Code to check each frame
* 6: ARRAY - (Optional) Exceptions for checking EFUNC(common,canInteractWith)
*
* Return value:
* Nothing
*
* Example:
* [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar
*/
#include "script_component.hpp"
@ -36,65 +36,69 @@ createDialog QGVAR(ProgressBar_Dialog);
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle;
if (GVAR(SettingProgressBarLocation) == 1) then {
private "_ctrlPos";
_ctrlPos = [1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2), 29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2), 38 * (((safezoneW / safezoneH) min 1.2) / 40), 0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)];
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
private "_ctrlPos";
_ctrlPos = [1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2), 29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2), 38 * (((safezoneW / safezoneH) min 1.2) / 40), 0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)];
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
};
_perFrameFunction = {
PARAMS_2(_parameters,_pfhID);
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
private ["_elapsedTime", "_errorCode"];
PARAMS_2(_parameters,_pfhID);
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
private ["_elapsedTime", "_errorCode"];
_elapsedTime = time - _startTime;
_errorCode = -1;
_elapsedTime = time - _startTime;
_errorCode = -1;
if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
_errorCode = 1;
} else {
if (ACE_player != _player) then {
_errorCode = 2;
if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
_errorCode = 1;
} else {
if (!([_args, _elapsedTime, _totalTime, _errorCode] call _condition)) then {
_errorCode = 3;
} else {
if (!([_player, objNull, _exceptions] call EGVAR(common,canInteractWith))) then {
_errorCode = 4;
if (ACE_player != _player) then {
_errorCode = 2;
} else {
if (_elapsedTime >= _totalTime) then {
_errorCode = 0;
};
if (!([_args, _elapsedTime, _totalTime, _errorCode] call _condition)) then {
_errorCode = 3;
} else {
if (!([_player, objNull, _exceptions] call EFUNC(common,canInteractWith))) then {
_errorCode = 4;
} else {
if (_elapsedTime >= _totalTime) then {
_errorCode = 0;
};
};
};
};
};
};
};
if (_errorCode != -1) then {
//Error or Success, close dialog and remove PFEH
closeDialog 0;
[_pfhID] call CBA_fnc_removePerFrameHandler;
if (_errorCode != -1) then {
//Error or Success, close dialog and remove PFEH
if (_errorCode == 0) then {
if ((typeName _onFinish) == (typeName "")) then {
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
};
//Only close dialog if it's the progressBar:
if (!isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
closeDialog 0;
};
[_pfhID] call CBA_fnc_removePerFrameHandler;
if (_errorCode == 0) then {
if ((typeName _onFinish) == (typeName "")) then {
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
};
} else {
if ((typeName _onFail) == (typeName "")) then {
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
};
};
} else {
if ((typeName _onFail) == (typeName "")) then {
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
};
//Update Progress Bar (ratio of elepased:total)
(uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition (_elapsedTime / _totalTime);
};
} else {
//Update Progress Bar (ratio of elepased:total)
(uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition (_elapsedTime / _totalTime);
};
};
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler;

View File

@ -48,5 +48,8 @@ if (_type in _initializedClasses) exitWith {};
_initializedClasses pushBack _type;
GVAR(initializedClasses_carry) = _initializedClasses;
[_type, 0, ["ACE_MainActions", QGVAR(carry)], localize "STR_ACE_Dragging_Carry", "", "", {[_player, _target] call FUNC(carryObject)}, {[_player, _target] call FUNC(canCarry)}, 2] call EFUNC(interact_menu,addClassAction);
[_type, 0, ["ACE_MainActions", QGVAR(drop_carry)], localize "STR_ACE_Dragging_Drop", "", "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}, 2] call EFUNC(interact_menu,addClassAction);
_carryAction = [QGVAR(drag), localize "STR_ACE_Dragging_Carry", "", {[_player, _target] call FUNC(carryObject)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
_dropAction = [QGVAR(drop), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass);
[_type, 0, ["ACE_MainActions"], _dropAction] call EFUNC(interact_menu,addActionToClass);

View File

@ -48,5 +48,8 @@ if (_type in _initializedClasses) exitWith {};
_initializedClasses pushBack _type;
GVAR(initializedClasses) = _initializedClasses;
[_type, 0, ["ACE_MainActions", QGVAR(drag)], localize "STR_ACE_Dragging_Drag", "", "", {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}, 2] call EFUNC(interact_menu,addClassAction);
[_type, 0, ["ACE_MainActions", QGVAR(drop)], localize "STR_ACE_Dragging_Drop", "", "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}, 2] call EFUNC(interact_menu,addClassAction);
_dragAction = [QGVAR(drag), localize "STR_ACE_Dragging_Drag", "", {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction);
_dropAction = [QGVAR(drop), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass);
[_type, 0, ["ACE_MainActions"], _dropAction] call EFUNC(interact_menu,addActionToClass);

View File

@ -3,7 +3,7 @@
["ACE3", QGVAR(lazeTarget), localize "STR_ACE_FCS_LaseTarget",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
@ -20,7 +20,7 @@
GVAR(isDownStateKey1) = false;
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {false};
@ -33,7 +33,7 @@
["ACE3", QGVAR(adjustRangeUp), localize "STR_ACE_FCS_AdjustRangeUp",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
@ -47,7 +47,7 @@
["ACE3", QGVAR(adjustRangDown), localize "STR_ACE_FCS_AdjustRangeDown",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};

View File

@ -13,7 +13,7 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
["ACE3", QGVAR(switchGrenadeMode), localize "STR_ACE_Grenades_SwitchGrenadeMode",
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};

View File

@ -2,21 +2,25 @@
ADDON = false;
PREP(addAction);
PREP(addClassAction);
PREP(addActionToClass);
PREP(addActionToObject);
PREP(compileMenu);
PREP(compileMenuSelfAction);
PREP(collectActiveActionTree);
PREP(createAction);
PREP(findActionNode);
PREP(isSubPath);
PREP(keyDown);
PREP(keyDownSelfAction);
PREP(keyUp);
PREP(keyUpSelfAction);
PREP(removeAction);
PREP(removeClassAction);
PREP(removeActionFromClass);
PREP(removeActionFromObject);
PREP(render);
PREP(renderIcon);
PREP(renderBaseMenu);
PREP(renderIcon);
PREP(renderMenu);
PREP(splitPath);
GVAR(keyDown) = false;
GVAR(keyDownSelfAction) = false;
@ -40,6 +44,7 @@ GVAR(lastPath) = [];
GVAR(expanded) = false;
GVAR(startHoverTime) = diag_tickTime;
GVAR(expandedTime) = diag_tickTime;
GVAR(iconCtrls) = [];
GVAR(iconCount) = 0;

View File

@ -1,59 +0,0 @@
/*
* Author: commy2, NouberNou and CAA-Picard
* Add an ACE action to an object, under a certain config path
* Note: This function is NOT global.
*
* Argument:
* 0: Object the action should be assigned to <OBJECT>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Full path of the new action <ARRAY>
* 3: Name of the action shown in the menu <STRING>
* 4: Icon <STRING>
* 5: Position (Position or Selection Name) <POSITION> or <STRING>
* 6: Statement <CODE>
* 7: Condition <CODE>
* 8: Distance <NUMBER>
* 9: Other parameters <ARRAY> (Optional)
*
* Return value:
* The entry full path, which can be used to remove the entry, or add children entries <ARRAY>.
*
* Example:
* [cursorTarget,0,["ACE_TapShoulderRight","VulcanPinch"],"Vulcan Pinch","",[0,0,0],{_target setDamage 1;},{true},100] call ace_interact_menu_fnc_addAction;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_9_PVT(_this,_object,_typeNum,_fullPath,_displayName,_icon,_position,_statement,_condition,_distance);
private ["_varName","_actions","_params","_entry"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
_actions = _object getVariable [_varName, []];
if((count _actions) == 0) then {
_object setVariable [_varName, _actions];
};
_params = [false,false,false,false];
if (count _this > 9) then {
_params = _this select 9;
};
_entry = [
[
_displayName,
_icon,
_position,
_statement,
_condition,
_distance,
_params,
+ _fullPath
],
[]
];
_actions pushBack _entry;
_fullPath

View File

@ -0,0 +1,45 @@
/*
* Author: CAA-Picard
* Insert an ACE action to a class, under a certain path
* Note: This function is NOT global.
*
* Argument:
* 0: TypeOf of the class <STRING>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Parent path of the new action <ARRAY>
* 3: Action <ARRAY>
*
* Return value:
* The entry full path, which can be used to remove the entry, or add children entries <ARRAY>.
*
* Example:
* [typeOf cursorTarget, 0, ["ACE_TapShoulderRight"],VulcanPinchAction] call ace_interact_menu_fnc_addActionToClass;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_4_PVT(_this,_objectType,_typeNum,_parentPath,_action);
// Ensure the config menu was compiled first
if (_typeNum == 0) then {
[_objectType] call FUNC(compileMenu);
} else {
[_objectType] call FUNC(compileMenuSelfAction);
};
private ["_varName","_actionTrees", "_parentNode"];
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actionTrees = missionNamespace getVariable [_varName, []];
if((count _actionTrees) == 0) then {
missionNamespace setVariable [_varName, _actionTrees];
};
_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
if (isNil {_parentNode}) exitWith {};
// Add action node as children of the correct node of action tree
(_parentNode select 1) pushBack [_action,[]];
// Return the full path
(+ _parentPath) pushBack (_action select 0)

View File

@ -0,0 +1,35 @@
/*
* Author: CAA-Picard
* Insert an ACE action to an object, under a certain config path
* Note: This function is NOT global.
*
* Argument:
* 0: Object the action should be assigned to <OBJECT>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Parent path of the new action <ARRAY>
* 3: Action <ARRAY>
*
* Return value:
* The entry full path, which can be used to remove the entry, or add children entries <ARRAY>.
*
* Example:
* [typeOf cursorTarget, 0, ["ACE_TapShoulderRight"],VulcanPinchAction] call ace_interact_menu_fnc_addActionToClass;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_4_PVT(_this,_object,_typeNum,_parentPath,_action);
private ["_varName","_actionList"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
_actionList = _object getVariable [_varName, []];
if((count _actionList) == 0) then {
_object setVariable [_varName, _actionList];
};
// Add action and parent path to the list of object actions
_actionList pushBack [_action, +_parentPath];
// Return the full path
(+ _parentPath) pushBack (_action select 0)

View File

@ -1,94 +0,0 @@
/*
* Author: CAA-Picard
* Add an ACE action to a class, under a certain path
* Note: This function is NOT global.
*
* Argument:
* 0: TypeOf of the class <STRING>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Full path of the new action <ARRAY>
* 3: Name of the action shown in the menu <STRING>
* 4: Icon <STRING>
* 5: Position (Position or Selection Name) <POSITION> or <STRING>
* 6: Statement <CODE>
* 7: Condition <CODE>
* 8: Distance <NUMBER>
* 9: Other parameters <ARRAY> (Optional)
*
* Return value:
* The entry full path, which can be used to remove the entry, or add children entries <ARRAY>.
*
* Example:
* [typeOf cursorTarget, 0,["ACE_TapShoulderRight","VulcanPinch"],"Vulcan Pinch","",[0,0,0],{_target setDamage 1;},{true},100] call ace_interact_menu_fnc_addClassAction;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_9_PVT(_this,_objectType,_typeNum,_fullPath,_displayName,_icon,_position,_statement,_condition,_distance);
// Ensure the config menu was compiled first
if (_typeNum == 0) then {
[_objectType] call FUNC(compileMenu);
} else {
[_objectType] call FUNC(compileMenuSelfAction);
};
private ["_varName","_actions","_params","_entry", "_parentLevel", "_foundParentLevel", "_fnc_findFolder"];
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actions = missionNamespace getVariable [_varName, []];
if((count _actions) == 0) then {
missionNamespace setVariable [_varName, _actions];
};
_params = [false,false,false,false];
if (count _this > 9) then {
_params = _this select 9;
};
// Search the class action trees and find where to insert the entry
_parentLevel = _actions;
_foundParentLevel = false;
_fnc_findFolder = {
EXPLODE_3_PVT(_this,_fullPath,_level,_classActions);
if (count _fullPath == _level + 1) then {
_parentLevel = _classActions;
_foundParentLevel = true;
};
if (_foundParentLevel) exitWith {};
{
EXPLODE_2_PVT(_x,_actionData,_actionChildren);
if (((_actionData select 7) select _level) isEqualTo (_fullPath select _level)) exitWith {
// The action should go somewhere in here
[_fullPath, _level + 1, _actionChildren] call _fnc_findFolder;
};
} forEach _classActions;
};
[_fullPath, 0, _actions] call _fnc_findFolder;
// Exit if there's no entry point to insert this action
if (!_foundParentLevel) exitWith {};
_entry = [
[
_displayName,
_icon,
_position,
_statement,
_condition,
_distance,
_params,
+ _fullPath
],
[]
];
_parentLevel pushBack _entry;
_fullPath

View File

@ -5,6 +5,7 @@
* Argument:
* 0: Object <OBJECT>
* 1: Original action tree <ARRAY>
* 2: Parent path <ARRAY>
*
* Return value:
* Active children <ARRAY>
@ -13,24 +14,39 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_object,_origAction);
EXPLODE_3_PVT(_this,_object,_origAction,_parentPath);
EXPLODE_2_PVT(_origAction,_origActionData,_origActionChildren);
private ["_resultingAction","_target","_player","_activeChildren","_action","_actionData","_x"];
private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_action","_actionData","_x"];
_target = _object;
_player = ACE_player;
// Return nothing if the action itself is not active
if !([_target, ACE_player] call (_origActionData select 4)) exitWith {
if !([_target, ACE_player, _origActionData select 6] call (_origActionData select 4)) exitWith {
[]
};
_fullPath = +_parentPath;
_fullPath pushBack (_origActionData select 0);
_activeChildren = [];
// If there's a statement to dynamically insert children then execute it
if !({} isEqualTo (_origActionData select 5)) then {
_dynamicChildren = [_target, ACE_player, _origActionData select 6] call (_origActionData select 5);
// Collect dynamic children class actions
{
_action = [_x select 2, _x, _fullPath] call FUNC(collectActiveActionTree);
if ((count _action) > 0) then {
_activeChildren pushBack _action;
};
} forEach _dynamicChildren;
};
// Collect children class actions
{
_action = [_object, _x] call FUNC(collectActiveActionTree);
_action = [_object, _x, _fullPath] call FUNC(collectActiveActionTree);
if ((count _action) > 0) then {
_activeChildren pushBack _action;
};
@ -38,26 +54,15 @@ _activeChildren = [];
// Collect children object actions
{
_action = _x;
_actionData = _action select 0;
EXPLODE_2_PVT(_x,_actionData,_pPath);
// Check if the action is children of the original action
if ((count (_actionData select 7)) == (count (_origActionData select 7) + 1)) then {
if (count _pPath == count _fullPath &&
{_pPath isEqualTo _fullPath}) then {
// Compare parent path to see if it's a suitable child
private "_isChild";
_isChild = true;
{
if !(_x isEqualTo ((_actionData select 7) select _forEachIndex)) exitWith {
_isChild = false;
};
} forEach (_origActionData select 7);
if (_isChild) then {
_action = [_object, _action] call FUNC(collectActiveActionTree);
if ((count _action) > 0) then {
_activeChildren pushBack _action;
};
_action = [_object, _action, _fullPath] call FUNC(collectActiveActionTree);
if ((count _action) > 0) then {
_activeChildren pushBack _action;
};
};
} forEach GVAR(objectActions);
@ -69,4 +74,5 @@ if ((count _activeChildren) == 0 && ((_origActionData select 3) isEqualTo {})) e
[]
};
[_origActionData, _activeChildren]
[_origActionData, _activeChildren, _object]

View File

@ -27,8 +27,8 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_fullPath"];
EXPLODE_2_PVT(_this,_actionsCfg,_parentPath);
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren"];
EXPLODE_1_PVT(_this,_actionsCfg);
_actions = [];
for "_i" from 0 to (count _actionsCfg) - 1 do {
@ -46,29 +46,30 @@ _recurseFnc = {
if (_condition == "") then {_condition = "true"};
// Add canInteract (including exceptions) and canInteractWith to condition
_condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EGVAR(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
_condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
_insertChildren = compile (getText (_entryCfg >> "insertChildren"));
_showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0;
_enableInside = (getNumber (_entryCfg >> "enableInside")) > 0;
_canCollapse = (getNumber (_entryCfg >> "canCollapse")) > 0;
_runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0;
_fullPath = (+ _parentPath);
_fullPath pushBack (configName _entryCfg);
_condition = compile _condition;
_children = [_entryCfg, _fullPath] call _recurseFnc;
_children = [_entryCfg] call _recurseFnc;
_entry = [
[
configName _entryCfg,
_displayName,
_icon,
_selection,
_statement,
_condition,
_insertChildren,
[],
_selection,
_distance,
[_showDisabled,_enableInside,_canCollapse,_runOnHover],
_fullPath
[_showDisabled,_enableInside,_canCollapse,_runOnHover]
],
_children
];
@ -81,20 +82,22 @@ _recurseFnc = {
private "_actionsCfg";
_actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions";
missionNamespace setVariable [_actionsVarName, [_actionsCfg, []] call _recurseFnc];
missionNamespace setVariable [_actionsVarName, [_actionsCfg] call _recurseFnc];
/*
[
[
[
"MyAction",
"My Action",
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
[0,0,0],
{ (_this select 0) setVelocity [0,0,10]; },
{ true },
{},
[],
[0,0,0],
1,
[false,false,false]
["ACE_MainActions","TeamManagement","MyAction"]
],
[children actions]
]

View File

@ -27,8 +27,8 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_fullPath"];
EXPLODE_2_PVT(_this,_actionsCfg,_parentPath);
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren"];
EXPLODE_1_PVT(_this,_actionsCfg);
_actions = [];
for "_i" from 0 to (count _actionsCfg) - 1 do {
@ -43,29 +43,30 @@ _recurseFnc = {
if (_condition == "") then {_condition = "true"};
// Add canInteract (including exceptions) and canInteractWith to condition
_condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, objNull, %1)] call EGVAR(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
_condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, objNull, %1)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
_insertChildren = compile (getText (_entryCfg >> "insertChildren"));
_showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0;
_enableInside = (getNumber (_entryCfg >> "enableInside")) > 0;
_canCollapse = (getNumber (_entryCfg >> "canCollapse")) > 0;
_runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0;
_fullPath = (+ _parentPath);
_fullPath pushBack (configName _entryCfg);
_condition = compile _condition;
_children = [_entryCfg, _fullPath] call _recurseFnc;
_children = [_entryCfg] call _recurseFnc;
_entry = [
[
configName _entryCfg,
_displayName,
_icon,
[0,0,0],
_statement,
_condition,
_insertChildren,
[],
[0,0,0],
10, //distace
[_showDisabled,_enableInside,_canCollapse,_runOnHover],
_fullPath
[_showDisabled,_enableInside,_canCollapse,_runOnHover]
],
_children
];
@ -82,16 +83,18 @@ _actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_SelfActions";
_actions = [
[
[
"ACE_SelfActions",
"Self Actions",
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
{},
{ true },
{},
[],
"Spine3",
{ true },
{ true },
10,
[false,true,false],
["ACE_SelfActions"]
[false,true,false]
],
[_actionsCfg, ["ACE_SelfActions"]] call _recurseFnc
[_actionsCfg] call _recurseFnc
]
];

View File

@ -0,0 +1,74 @@
/*
* Author: CAA-Picard
* Creates an isolated ACE action
* Note: This function is NOT global.
*
* Argument:
* 0: Action name <STRING>
* 1: Name of the action shown in the menu <STRING>
* 2: Icon <STRING>
* 3: Statement <CODE>
* 4: Condition <CODE>
* 5: Insert children code <CODE> (Optional)
* 6: Action parameters <ANY> (Optional)
* 7: Position (Position or Selection Name) <POSITION> or <STRING> (Optional)
* 8: Distance <NUMBER> (Optional)
* 9: Other parameters <ARRAY> (Optional)
*
* Return value:
* Action <ARRAY>
*
* Example:
* [VulcanPinch","Vulcan Pinch",{_target setDamage 1;},{true},{},[parameters], [0,0,0], 100] call ace_interact_menu_fnc_createAction;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_5_PVT(_this,_actionName,_displayName,_icon,_statement,_condition);
private ["_insertChildren","_customParams","_position","_distance","_params"];
_insertChildren = if (count _this > 5) then {
_this select 5
} else {
{}
};
_customParams = if (count _this > 6) then {
_this select 6
} else {
[]
};
_position = if (count _this > 7) then {
_this select 7
} else {
[0,0,0]
};
_distance = if (count _this > 8) then {
_this select 8
} else {
2
};
_params = if (count _this > 9) then {
_this select 9
} else {
[false,false,false,false]
};
[
_actionName,
_displayName,
_icon,
_statement,
_condition,
_insertChildren,
_customParams,
_position,
_distance,
_params
]

View File

@ -0,0 +1,56 @@
/*
* Author: CAA-Picard
* Return action point from path
* Note: This function is NOT global.
*
* Argument:
* 0: List of Action Tree <ARRAY>
* 1: Path <ARRAY>
*
* Return value:
* Action node <ARRAY>.
*
* Example:
* [_actionTree, ["ACE_TapShoulderRight","VulcanPinchAction"]] call ace_interact_menu_fnc_findActionNode;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_actionTreeList,_parentPath);
private ["_parentNode", "_foundParentNode", "_fnc_findFolder"];
// Hack to make this work on the root node too
if (count _parentPath == 0) exitWith {
[[],_actionTreeList]
};
// Search the class action trees and find where to insert the entry
_parentNode = [[],_actionTreeList];
_foundParentNode = false;
_fnc_findFolder = {
EXPLODE_3_PVT(_this,_parentPath,_level,_actionNode);
{
EXPLODE_2_PVT(_x,_actionData,_actionChildren);
if ((_actionData select 0) isEqualTo (_parentPath select _level)) exitWith {
if (count _parentPath == _level + 1) exitWith {
_parentNode = _x;
_foundParentNode = true;
};
// The action should go somewhere in here
[_parentPath, _level + 1, _x] call _fnc_findFolder;
};
} forEach (_actionNode select 1);
};
[_parentPath, 0, [[],_actionTreeList]] call _fnc_findFolder;
// Exit if there's no entry point to insert this action
if (!_foundParentNode) exitWith {};
_parentNode

View File

@ -0,0 +1,29 @@
/*
* Author: CAA-Picard
* Check if the first path is a subpath of the other
*
* Argument:
* 0: LongPath <ARRAY>
* 1: ShortPath <STRING>
*
* Return value:
* Bool
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_longPath,_shortPath);
private ["_isSubPath","_i"];
_isSubPath = true;
if (count _shortPath > count _longPath) exitWith {false};
for [{_i = 0},{_i < (count _shortPath) - 1},{_i = _i + 1}] do {
if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith {
_isSubPath = false;
};
};
_isSubPath

View File

@ -16,7 +16,7 @@ if(GVAR(actionSelected)) then {
this = GVAR(selectedTarget);
_player = ACE_Player;
_target = GVAR(selectedTarget);
[GVAR(selectedTarget), ACE_player] call GVAR(selectedStatement);
[GVAR(selectedTarget), ACE_player, (GVAR(selectedAction) select 0) select 6] call GVAR(selectedStatement);
};
if (GVAR(keyDown)) then {

View File

@ -20,7 +20,7 @@ if(GVAR(actionSelected)) then {
this = GVAR(selectedTarget);
_player = ACE_Player;
_target = GVAR(selectedTarget);
[GVAR(selectedTarget), ACE_player] call GVAR(selectedStatement);
[GVAR(selectedTarget), ACE_player, (GVAR(selectedAction) select 0) select 6] call GVAR(selectedStatement);
};
if (GVAR(keyDownSelfAction)) then {

View File

@ -0,0 +1,39 @@
/*
* Author: CAA-Picard
* Removes an action from a class
*
* Argument:
* 0: TypeOf of the class <STRING>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Full path of the new action <ARRAY>
*
* Return value:
* None
*
* Example:
* [typeOf cursorTarget, 0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeActionFromClass;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
private ["_res","_varName","_actionTrees"];
_res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName);
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actionTrees = missionNamespace getVariable [_varName, []];
_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
if (isNil {_parentNode}) exitWith {};
// Iterate through children of the father
{
if (((_x select 0) select 0) == _actionName) exitWith {
(_parentNode select 1) deleteAt _forEachIndex;
};
} forEach (_parentNode select 1);
_parentLevel deleteAt _actionIndex;

View File

@ -1,30 +1,33 @@
/*
* Author: commy2, NouberNou and CAA-Picard
* Remove an action from an object
*
* Argument:
* 0: Object the action is assigned to <OBJECT>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Full path of the action to remove <ARRAY>
*
* Return value:
* None
*
* Example:
* [cursorTarget,0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeAction;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath);
private ["_varName","_actions"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
_actions = _object getVariable [_varName, []];
{
if (((_x select 0) select 7) isEqualTo _fullPath) exitWith {
_actions deleteAt _forEachIndex;
};
} forEach _actions;
/*
* Author: commy2, NouberNou and CAA-Picard
* Removes an action from an object
*
* Argument:
* 0: Object the action is assigned to <OBJECT>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Full path of the action to remove <ARRAY>
*
* Return value:
* None
*
* Example:
* [cursorTarget,0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeActionFromObject;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath);
private ["_res","_varName","_actionList"];
_res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName);
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
_actionList = _object getVariable [_varName, []];
{
if (((_x select 0) select 0) isEqualTo _actionName &&
{(_x select 1) isEqualTo _parentPath}) exitWith {
_actionList deleteAt _forEachIndex;
};
} forEach _actionList;

View File

@ -1,72 +0,0 @@
/*
* Author: CAA-Picard
* Removes a class action from a class
* Note: This function is NOT global.
*
* Argument:
* 0: TypeOf of the class <STRING>
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
* 2: Full path of the new action <ARRAY>
*
* Return value:
* None
*
* Example:
* [typeOf cursorTarget, 0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeClassAction;
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
private ["_varName","_actions","_parentLevel", "_actionIndex", "_foundAction", "_fnc_findFolder"];
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actions = missionNamespace getVariable [_varName, []];
// Search the class action trees and find where to insert the entry
_parentLevel = _actions;
_actionIndex = -1;
_foundAction = false;
_fnc_findFolder = {
EXPLODE_3_PVT(_this,_fullPath,_level,_classActions);
if (count _fullPath == _level + 1) then {
_parentLevel = _classActions;
};
{
EXPLODE_2_PVT(_x,_actionData,_actionChildren);
if (((_actionData select 7) select _level) isEqualTo (_fullPath select _level)) exitWith {
if (_level + 1 == count _fullPath) exitWith {
_actionIndex = _forEachIndex;
_foundAction = true;
};
[_fullPath, _level + 1, _actionChildren] call _fnc_findFolder;
};
if (_foundAction) exitWith {};
} forEach _classActions;
};
[_fullPath, 0, _actions] call _fnc_findFolder;
// Exit if the action was not found
if (!_foundAction) exitWith {};
_entry = [
[
_displayName,
_icon,
_position,
_statement,
_condition,
_distance,
_params,
+ _fullPath
],
[]
];
_parentLevel deleteAt _actionIndex;

View File

@ -41,17 +41,17 @@ if (GVAR(keyDown)) then {
// Iterate through object actions, find base level actions and render them if appropiate
_actionsVarName = format [QGVAR(Act_%1), typeOf _target];
GVAR(objectActions) = _target getVariable [QGVAR(actions), []];
GVAR(objectActionList) = _target getVariable [QGVAR(actions), []];
{
_action = _x;
// Only render them directly if they are base level actions
if (count ((_action select 0) select 7) == 1) then {
if (count (_x select 1) == 0) then {
// Try to render the menu
_action = [_x,[]];
if ([_target, _action] call FUNC(renderBaseMenu)) then {
_numInteractions = _numInteractions + 1;
};
};
} forEach GVAR(objectActions);
} forEach GVAR(objectActionList);
// Iterate through base level class actions and render them if appropiate
_classActions = missionNamespace getVariable [_actionsVarName, []];
@ -80,7 +80,7 @@ if (GVAR(keyDown)) then {
// Iterate through object actions, find base level actions and render them if appropiate
_actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target];
GVAR(objectActions) = _target getVariable [QGVAR(selfActions), []];
GVAR(objectActionList) = _target getVariable [QGVAR(selfActions), []];
/*
{
_action = _x;
@ -88,7 +88,7 @@ if (GVAR(keyDown)) then {
if (count (_action select 7) == 1) then {
[_target, _action, 0, [180, 360]] call FUNC(renderMenu);
};
} forEach GVAR(objectActions);
} forEach GVAR(objectActionList);
*/
// Iterate through base level class actions and render them if appropiate
@ -142,8 +142,8 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,.75], _pos, 0.6*SafeZoneW, 0.6*SafeZoneW, GVAR(rotationAngle), "", 0.5, 0.025, "TahomaB"];
_foundTarget = true;
GVAR(actionSelected) = true;
GVAR(selectedTarget) = (_closest select 0) select 0;
GVAR(selectedAction) = (_closest select 0) select 1;
GVAR(selectedTarget) = (GVAR(selectedAction)) select 2;
GVAR(selectedStatement) = ((GVAR(selectedAction)) select 0) select 3;
_misMatch = false;
@ -153,29 +153,34 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
_misMatch = true;
} else {
{
if(_x != (_hoverPath select _forEachIndex)) exitWith {
if !(_x isEqualTo (_hoverPath select _forEachIndex)) exitWith {
_misMatch = true;
};
} forEach GVAR(lastPath);
};
if(_misMatch) then {
GVAR(lastPath) = _hoverPath;
if(_misMatch && {diag_tickTime-GVAR(expandedTime) > 0.25}) then {
GVAR(startHoverTime) = diag_tickTime;
GVAR(lastPath) = _hoverPath;
GVAR(expanded) = false;
} else {
if(!GVAR(expanded) && diag_tickTime-GVAR(startHoverTime) > 0.25) then {
GVAR(expanded) = true;
// Start the expanding menu animation only if the user is not going up the menu
if !([GVAR(menuDepthPath),GVAR(lastPath)] call FUNC(isSubPath)) then {
GVAR(expandedTime) = diag_tickTime;
};
GVAR(menuDepthPath) = +GVAR(lastPath);
// Execute the current action if it's run on hover
private "_runOnHover";
_runOnHover = ((GVAR(selectedAction) select 0) select 6) select 3;
_runOnHover = ((GVAR(selectedAction) select 0) select 9) select 3;
if (_runOnHover) then {
this = GVAR(selectedTarget);
_player = ACE_Player;
_target = GVAR(selectedTarget);
[GVAR(selectedTarget), ACE_player] call GVAR(selectedStatement);
[GVAR(selectedTarget), ACE_player, (GVAR(selectedAction) select 0) select 6] call GVAR(selectedStatement);
};
};
};

View File

@ -4,7 +4,7 @@
*
* Argument:
* 0: Object <OBJECT>
* 1: Action data <ARRAY>
* 1: Action node <ARRAY>
* 2: 3D position <ARRAY> (Optional)
*
* Return value:
@ -16,25 +16,25 @@
private ["_distance","_pos","_weaponDir","_ref","_cameraPos","_sPos","_activeActionTree"];
EXPLODE_2_PVT(_this,_object,_baseAction);
EXPLODE_1_PVT(_baseAction,_actionData);
EXPLODE_2_PVT(_this,_object,_baseActionNode);
EXPLODE_1_PVT(_baseActionNode,_actionData);
_distance = _actionData select 5;
_distance = _actionData select 8;
// Obtain a 3D position for the action
if((count _this) > 2) then {
_pos = _this select 2;
} else {
if(typeName (_actionData select 2) == "ARRAY") then {
_pos = _object modelToWorld (_actionData select 2);
if(typeName (_actionData select 7) == "ARRAY") then {
_pos = _object modelToWorld (_actionData select 7);
} else {
if ((_actionData select 2) == "weapon") then {
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);
} else {
_pos = _object modelToWorld (_object selectionPosition (_actionData select 2));
_pos = _object modelToWorld (_object selectionPosition (_actionData select 7));
};
};
// Compensate for movement during the frame to get rid of jittering
@ -59,19 +59,29 @@ if ((_sPos select 1) < safeZoneY || (_sPos select 1) > safeZoneY + safeZon
// Collect active tree
private "_uid";
_uid = format [QGVAR(ATCache_%1), (_actionData select 7) select 0];
_uid = format [QGVAR(ATCache_%1), _actionData select 0];
_activeActionTree = [
[_object, _baseAction],
[_object, _baseActionNode, []],
DFUNC(collectActiveActionTree),
_object, _uid, 0.2
] call EFUNC(common,cachedCall);
/*
diag_log "Printing: _activeActionTree";
_fnc_print = {
EXPLODE_2_PVT(_this,_level,_node);
EXPLODE_3_PVT(_node,_actionData,_children,_object);
diag_log text format ["Level %1 -> %2 on %3", _level, _actionData select 0, _object];
{
[_level + 1, _x] call _fnc_print;
} forEach _children;
};
[0, _activeActionTree] call _fnc_print;
*/
// Check if there's something left for rendering
if (count _activeActionTree == 0) exitWith {false};
//EXPLODE_2_PVT(_activeActionTree,_actionData,_actionChildren);
[_object, _activeActionTree, _pos, [180,360]] call FUNC(renderMenu);
[[], _activeActionTree, _pos, [180,360]] call FUNC(renderMenu);
true

View File

@ -3,7 +3,7 @@
* Render an interaction menu and it's children recursively
*
* Argument:
* 0: Object <OBJECT>
* 0: Parent path <ARRAY>
* 1: Action data <ARRAY>
* 2: 3D position <ARRAY>
* 3: Angle range available for rendering <ARRAY>
@ -17,14 +17,15 @@
private ["_menuInSelectedPath", "_path", "_menuDepth", "_currentRenderDepth", "_x", "_offset", "_newPos", "_forEachIndex"];
EXPLODE_4_PVT(_this,_object,_action,_pos,_angles);
EXPLODE_2_PVT(_action,_actionData,_activeChildren);
EXPLODE_4_PVT(_this,_parentPath,_action,_pos,_angles);
EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject);
EXPLODE_2_PVT(_angles,_centerAngle,_maxAngleSpan);
_menuDepth = (count GVAR(menuDepthPath)) - 1;
_menuDepth = (count GVAR(menuDepthPath));
// Store path to action
_path = [_object] + (_actionData select 7);
_path = +_parentPath;
_path pushBack [_actionData select 0,_actionObject];
// Check if the menu is on the selected path
_menuInSelectedPath = true;
@ -32,7 +33,7 @@ _menuInSelectedPath = true;
if (_forEachIndex >= (count GVAR(menuDepthPath))) exitWith {
_menuInSelectedPath = false;
};
if (_x != (GVAR(menuDepthPath) select _forEachIndex)) exitWith {
if !(_x isEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith {
_menuInSelectedPath = false;
};
} forEach _path;
@ -42,12 +43,12 @@ _menuInSelectedPath = true;
_color = "#FFFFFFFF";
if(!_menuInSelectedPath) then { //_menuDepth > 0 &&
if (_menuDepth > 0) then {
_color = format ["#%1FFFFFF", [255 * ((((count _path) - 2)/_menuDepth) max 0.25)] call EFUNC(common,toHex)];
_color = format ["#%1FFFFFF", [255 * ((((count _path) - 1)/_menuDepth) max 0.25)] call EFUNC(common,toHex)];
} else {
_color = format ["#%1FFFFFF", [255 * 0.75] call EFUNC(common,toHex)];
};
};
[_actionData select 0, _color, _pos, 1, 1, 0, _actionData select 1, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon);
[_actionData select 1, _color, _pos, 1, 1, 0, _actionData select 2, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon);
// Add the action to current options
GVAR(currentOptions) pushBack [_this, _pos, _path];
@ -55,26 +56,44 @@ GVAR(currentOptions) pushBack [_this, _pos, _path];
// Exit without rendering children if it isn't
if !(_menuInSelectedPath) exitWith {true};
private ["_angleSpan","_angle"];
private ["_angleSpan","_angle","_angleInterval","_scale"];
_angleSpan = _maxAngleSpan min (55 * ((count _activeChildren) - 1));
if (_angleSpan >= 305) then {
_angleSpan = 360;
};
_angleInterval = 55;
if (_angleSpan < 360) then {
if (count _activeChildren > 1) then {
_angleInterval = _angleSpan / (count _activeChildren - 1);
};
} else {
_angleSpan / (count _activeChildren);
};
if (count _activeChildren == 1) then {
_angleInterval = 60;
};
// Scale menu based on distance
_scale = (0.15 max (0.15 * ((positionCameraToWorld [0, 0, 0]) distance _pos))) / GVAR(selfMenuScale);
// Scale menu based on the amount of children
_scale = _scale * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.4) max 0.5);
// Animate menu scale
if (_menuInSelectedPath && (_menuDepth == count _path)) then {
_scale = _scale * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * 8) min 1));
};
_angle = _centerAngle - _angleSpan / 2;
{
_target = _object;
_target = _actionObject;
_player = ACE_player;
_mod = (0.15 max (0.15 * ((positionCameraToWorld [0, 0, 0]) distance _pos))) / GVAR(selfMenuScale);
_offset = ((GVAR(refSystem) select 1) vectorMultiply (-_mod * cos _angle)) vectorAdd
((GVAR(refSystem) select 2) vectorMultiply (-_mod * sin _angle));
_offset = ((GVAR(refSystem) select 1) vectorMultiply (-_scale * cos _angle)) vectorAdd
((GVAR(refSystem) select 2) vectorMultiply (-_scale * sin _angle));
_newPos = ((_pos call EFUNC(common,positionToASL)) vectorAdd _offset) call EFUNC(common,ASLToPosition);
//drawLine3D [_pos, _newPos, [1,0,0,0.5]];
//drawLine3D [_pos, _newPos, [1,0,0,0.8]];
[_object, _x, _newPos, [_angle, 140]] call FUNC(renderMenu);
[_path, _x, _newPos, [_angle, 140]] call FUNC(renderMenu);
if (_angleSpan == 360) then {
_angle = _angle + _angleSpan / (count _activeChildren);

View File

@ -0,0 +1,27 @@
/*
* Author: CAA-Picard
* Take full path and split it between parent path and action name
*
* Argument:
* Full path of the action to remove <ARRAY>
*
* Return value:
* 0: Parent path <ARRAY>
* 1: Action name <STRING>
*
* Public: No
*/
#include "script_component.hpp"
private ["_parentPath","_actionName"];
_parentPath = [];
for [{_i = 0},{_i < (count _this) - 1},{_i = _i + 1}] do {
_parentPath pushBack (_this select _i);
};
_actionName = if (count _this > 0) then {
_this select ((count _this) - 1);
} else {
""
};
[_parentPath, _actionName]

View File

@ -412,7 +412,14 @@ class CfgVehicles {
condition = "true";
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class Tank: LandVehicle {
class ACE_Actions {
@ -423,7 +430,14 @@ class CfgVehicles {
condition = "true";
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class Air;
@ -436,7 +450,14 @@ class CfgVehicles {
condition = "true";
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class Plane: Air {
class ACE_Actions {
@ -447,7 +468,14 @@ class CfgVehicles {
condition = "true";
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class Ship;
@ -469,7 +497,14 @@ class CfgVehicles {
};
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class StaticWeapon: LandVehicle {
@ -481,7 +516,14 @@ class CfgVehicles {
condition = "true";
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class StaticMortar;
@ -494,7 +536,14 @@ class CfgVehicles {
condition = "true";
};
};
class ACE_SelfActions {};
class ACE_SelfActions {
class ACE_Passengers {
displayName = "$STR_ACE_Interaction_Passengers";
condition = "true";
statement = "";
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
};
};
};
class thingX;

View File

@ -19,7 +19,7 @@ GVAR(isOpeningDoor) = false;
["ACE3", QGVAR(openDoor), localize "STR_ACE_Interaction_OpenDoor",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
@ -39,7 +39,7 @@ GVAR(isOpeningDoor) = false;
["ACE3", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
@ -53,7 +53,7 @@ GVAR(isOpeningDoor) = false;
["ACE3", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey",
{
// Conditions: canInteract
//if !([ACE_player, objNull, ["isNotDragging"]] call EGVAR(common,canInteractWith)) exitWith {false}; // not needed
//if !([ACE_player, objNull, ["isNotDragging"]] call EFUNC(common,canInteractWith)) exitWith {false}; // not needed
// Statement
ACE_Modifier = 1;

View File

@ -2,6 +2,8 @@
ADDON = false;
PREP(addPassengerActions);
PREP(addPassengersActions);
PREP(addSelectableItem);
PREP(applyButtons);
PREP(canInteractWithCivilian);

View File

@ -5,7 +5,7 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
requiredAddons[] = {"ace_interact_menu"};
author[] = {"commy2", "KoffeinFlummi", "CAA-Picard", "bux578"};
authorUrl = "https://github.com/commy2/";
VERSION_CONFIG;

View File

@ -0,0 +1,32 @@
/*
* Author: CAA-Picard
* Mount unit actions inside passenger submenu
* Note: This function is NOT global.
*
* Argument:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return value:
* Children actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
diag_log "addPassengerActions";
private ["_unit","_actions"];
_unit = _parameters select 0;
_varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit];
_actionTrees = missionNamespace getVariable [_varName, []];
_actions = [];
// Mount unit MainActions menu
_actions pushBack [(_actionTrees select 0) select 0, (_actionTrees select 0) select 1, _unit];
_actions

View File

@ -0,0 +1,43 @@
/*
* Author: CAA-Picard
* Create one action per passenger
* Note: This function is NOT global.
*
* Argument:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return value:
* Children actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
private ["_actions"];
_actions = [];
{
_unit = _x;
if (_x != _player) then {
_actions pushBack
[
[
str(_unit),
[_unit, true] call EFUNC(common,getName),
"",
{systemChat "selected passenger"},
{true},
{_this call FUNC(addPassengerActions);},
[_unit]
] call EFUNC(interact_menu,createAction),
[],
_unit
];
};
} forEach crew _vehicle;
_actions

View File

@ -47,7 +47,7 @@ playSound "ACE_Sound_Click";
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
};
if (!_usedMouseWheel && {time < _time} && {[ACE_player, objNull, []] call EGVAR(common,canInteractWith)}) then {
if (!_usedMouseWheel && {time < _time} && {[ACE_player, objNull, []] call EFUNC(common,canInteractWith)}) then {
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
{_house animate [_x, _phase]} forEach _animations;

View File

@ -5,7 +5,7 @@ EXPLODE_3_PVT(_this,_tapper,_target,_shoulderNum);
if (_target != ACE_player) exitWith {
addCamShake [4, 0.5, 5];
ACE_player playActionNow 'gestureAdvance';
ACE_player playActionNow "PutDown";
if !(local _target) then {
[[_tapper, _target, _shoulderNum], QUOTE(DFUNC(tapShoulder)), _target] call EFUNC(common,execRemoteFnc);
};

View File

@ -650,5 +650,8 @@
<Polish>Interakcja</Polish>
<Spanish>Interactuar</Spanish>
</Key>
<Key ID="STR_ACE_Interaction_Passengers">
<English>Passengers &gt;&gt;</English>
</Key>
</Package>
</Project>

View File

@ -1,10 +1,9 @@
class ACE_Medical_Actions {
class Basic {
// @todo: localization
class Bandage {
displayName = "Bandage";
displayNameProgress = "Bandaging ...";
displayName = "$STR_ACE_Medical_Bandage";
displayNameProgress = "$STR_ACE_Medical_Bandaging";
treatmentLocations[] = {"All"};
requiredMedic = 0;
@ -25,25 +24,25 @@ class ACE_Medical_Actions {
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
};
class Morphine: Bandage {
displayName = "Morphine";
displayNameProgress = "Injecting Morphine ...";
displayName = "$STR_ACE_Medical_Inject_Morphine";
displayNameProgress = "$STR_ACE_Medical_Injecting_Morphine";
treatmentTime = 2;
items[] = {QGVAR(morphine)};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class Epipen: Bandage {
displayName = "Epinephrine";
displayNameProgress = "Injecting Epinephrine ...";
class Epinephrine: Bandage {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
displayNameProgress = "$STR_ACE_Medical_Injecting_Epinephrine";
requiredMedic = 1;
treatmentTime = 3;
items[] = {QGVAR(epipen)};
items[] = {QGVAR(epinephrine)};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class Bloodbag: Bandage {
displayName = "Blood Bag";
displayNameProgress = "Transfusing Blood ...";
class BloodIV: Bandage {
displayName = "$STR_ACE_Medical_Transfuse_Blood";
displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood";
requiredMedic = 1;
treatmentTime = 20;
items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}};

View File

@ -350,8 +350,8 @@ class CfgVehicles {
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
class Bandage_Head {
displayName = "Bandage Head";
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitHead";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
@ -413,8 +413,9 @@ class CfgVehicles {
priority = 2;
hotkey = "M";
enableInside = 1;
class Bandage_Torso {
displayName = "Bandage Torso";
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitBody";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
@ -451,7 +452,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Morphine')] call DFUNC(treatment));
};
@ -461,7 +462,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'body', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Epinephrine')] call DFUNC(treatment));
};
@ -486,8 +487,8 @@ class CfgVehicles {
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
class Bandage_LeftArm {
displayName = "Bandage Left Arm";
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitLeftArm";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
@ -529,7 +530,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
};
@ -539,7 +540,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
};
@ -607,8 +608,8 @@ class CfgVehicles {
class ACE_ArmRight {
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
class Bandage_RightArm {
displayName = "Bandage Right Arm";
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitRightArm";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
@ -650,7 +651,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
};
@ -660,7 +661,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
};
@ -729,8 +730,8 @@ class CfgVehicles {
class ACE_LegLeft {
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
class Bandage_LeftLeg {
displayName = "Bandage Left Leg";
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
@ -773,7 +774,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
};
@ -783,7 +784,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
};
@ -841,8 +842,8 @@ class CfgVehicles {
class ACE_LegRight {
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
class Bandage_RightLeg {
displayName = "Bandage Right Leg";
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitRightLeg";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
@ -885,7 +886,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
};
class Morphine: fieldDressing {
displayName = "Morphine";
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
};
@ -895,7 +896,7 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "Epinephrine";
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
};

View File

@ -1,25 +1,25 @@
class CfgWeapons {
class ItemCore;
class InventoryItem_Base_F;
class InventoryFirstAidKitItem_Base_F;
class MedikitItem;
// ITEMS
class FirstAidKit: ItemCore {
type = 0;
class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 4;
type = 201;
class ItemCore;
class InventoryItem_Base_F;
class InventoryFirstAidKitItem_Base_F;
class MedikitItem;
// ITEMS
class FirstAidKit: ItemCore {
type = 0;
class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 4;
type = 201;
};
};
};
class Medikit: ItemCore {
type = 0;
class ItemInfo: MedikitItem {
mass = 60;
type = 201;
class Medikit: ItemCore {
type = 0;
class ItemInfo: MedikitItem {
mass = 60;
type = 201;
};
};
};
// @todo localize
class ACE_ItemCore;

View File

@ -12,7 +12,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler;
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
["InteractionMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
// Initialize all effects
_fnc_createEffect = {
@ -218,7 +218,7 @@ if (isNil QGVAR(level)) then {
}, 0, []] call CBA_fnc_addPerFrameHandler;
// broadcast injuries to JIP clients in a MP session
if (isMultiplayer) then {
if (isMultiplayer and GVAR(level) >= 2) then {
[QGVAR(onPlayerConnected), "onPlayerConnected", {
if (isNil QGVAR(InjuredCollection)) then {
GVAR(InjuredCollection) = [];

View File

@ -39,19 +39,16 @@ if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exi
_locations = getArray (_config >> "treatmentLocations");
_return = true;
if (isText (_config >> "Condition")) then {
_condition = getText(_config >> "condition");
if (_condition != "") then {
if (isnil _condition) then {
_condition = compile _condition;
} else {
_condition = missionNamespace getvariable _condition;
};
if (typeName _condition == "BOOL") then {
_return = _condition;
} else {
_return = [_caller, _target, _selectionName, _className] call _condition;
};
if (getText (_config >> "condition") != "") then {
if (isnil _condition) then {
_condition = compile _condition;
} else {
_condition = missionNamespace getvariable _condition;
};
if (typeName _condition == "BOOL") then {
_return = _condition;
} else {
_return = [_caller, _target, _selectionName, _className] call _condition;
};
};
if (!_return) exitwith {false};

View File

@ -75,9 +75,17 @@ if (_show) then {
};
}foreach _openWounds;
} else {
// TODO handle basic medical colors for body part selections here
{
_selectionBloodLoss set [_forEachIndex, _target getHitPointDamage _x];
if (_target getHitPointDamage _x > 0.1) then {
// @todo localize
_allInjuryTexts pushBack format ["%1 %2",
["Lightly wounded", "Heavily wounded"] select (_target getHitPointDamage _x > 0.5),
["head", "torso", "left arm", "right arm", "left leg", "right leg"] select _forEachIndex
];
};
} forEach ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
};
// Handle the body image coloring

View File

@ -112,8 +112,20 @@ if (_selection == "") then {
};
// Assign orphan structural damage to torso;
// @todo
// Assign orphan structural damage to torso
[{
private ["_unit", "_damagesum"];
_unit = _this select 0;
_damagesum = (_unit getHitPointDamage "HitHead") +
(_unit getHitPointDamage "HitBody") +
(_unit getHitPointDamage "HitLeftArm") +
(_unit getHitPointDamage "HitRightArm") +
(_unit getHitPointDamage "HitLeftLeg") +
(_unit getHitPointDamage "HitRightLeg");
if (_damagesum < 0.06 and damage _unit > 0.06 and alive _unit) then {
_unit setHitPointDamage ["HitBody", damage _unit];
};
}, [_unit], 2, 0.1] call EFUNC(common,waitAndExecute);
if (_selection == "") then {
@ -137,7 +149,7 @@ if (_legdamage >= LEGDAMAGETRESHOLD1) then {
} else {
if (_unit getHitPointDamage "HitLegs" != 0) then {_unit setHitPointDamage ["HitLegs", 0]};
};
// @ŧodo: force prone for completely fucked up legs.
// @todo: force prone for completely fucked up legs.
// Arm Damage
@ -171,9 +183,8 @@ if (_selection == "" and
_damageReturn < 1 and
!(_unit getVariable [QGVAR(isUnconscious), False]
)) then {
// random chance to kill AI instead of knocking them out
if (_unit getVariable [QGVAR(allowUnconscious), ([_unit] call EFUNC(common,isPlayer)) or random 1 > 0.5]) then {
hint "unconscious"; // @todo
if (_unit getVariable [QGVAR(allowUnconscious), ([_unit] call EFUNC(common,isPlayer)) or random 1 > 0.3]) then {
[_unit, true] call FUNC(setUnconscious);
} else {
_damageReturn = 1;
};

View File

@ -16,6 +16,11 @@
private ["_unit", "_heartRate","_bloodPressure","_bloodVolume","_painStatus", "_lastTimeValuesSynced", "_syncValues"];
_unit = _this select 0;
_interval = time - (_unit getVariable [QGVAR(lastMomentVitalsHandled), 0]);
_unit setVariable [QGVAR(lastMomentVitalsHandled), time];
if (_interval == 0) exitWith {};
_lastTimeValuesSynced = _unit getvariable [QGVAR(lastMomentValuesSynced), 0];
_syncValues = time - _lastTimeValuesSynced >= (10 + floor(random(10)));
if (_syncValues) then {
@ -60,24 +65,47 @@ if (_painStatus > 0) then {
};
};
if (GVAR(level) == 1) then {
// reduce pain
if (_unit getVariable [QGVAR(pain), 0] > 0) then {
_unit setVariable [QGVAR(pain), ((_unit getVariable QGVAR(pain)) - 0.001 * _interval) max 0, _syncValues];
};
if (_bloodVolume < 30) exitwith {
[_unit] call FUNC(setDead);
};
// reduce painkillers
if (_unit getVariable [QGVAR(morphine), 0] > 0) then {
_unit setVariable [QGVAR(morphine), ((_unit getVariable QGVAR(morphine)) - 0.0015 * _interval) max 0, _syncValues];
};
if ([_unit] call EFUNC(common,isAwake)) then {
if (_bloodVolume < 60) then {
if (random(1) > 0.9) then {
[_unit] call FUNC(setUnconscious);
// bleeding
_blood = _unit getVariable [QGVAR(bloodVolume), 100];
_blood = (_blood - 0.4 * (damage _unit) * _interval) max 0;
if (_blood != (_unit getVariable [QGVAR(bloodVolume), 100])) then {
_unit setVariable [QGVAR(bloodVolume), _blood, _syncValues];
if (_blood <= 35 and !(_unit getVariable [QGVAR(isUnconscious), false])) then {
[_unit, true] call FUNC(setUnconscious);
};
if (_blood == 0) then {
[_unit] call FUNC(setDead);
};
};
};
// handle advanced medical, with vitals
if (GVAR(level) >= 2) then {
if (_bloodVolume < 30) exitwith {
[_unit] call FUNC(setDead);
};
if ([_unit] call EFUNC(common,isAwake)) then {
if (_bloodVolume < 60) then {
if (random(1) > 0.9) then {
[_unit] call FUNC(setUnconscious);
};
};
};
// Set the vitals
_heartRate = (_unit getvariable [QGVAR(heartRate), 0]) + ([_unit] call FUNC(getHeartRateChange));
_heartRate = (_unit getvariable [QGVAR(heartRate), 0]) + ([_unit] call FUNC(getHeartRateChange)) * _interval;
_unit setvariable [QGVAR(heartRate), _heartRate, _syncValues];
_bloodPressure = [_unit] call FUNC(getBloodPressure);
@ -89,12 +117,12 @@ if (GVAR(level) >= 2) then {
_airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100];
if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then {
if (_airwayStatus >= 0.5) then {
_unit setvariable [QGVAR(airwayStatus), _airwayStatus - 0.5, _syncValues];
_unit setvariable [QGVAR(airwayStatus), _airwayStatus - 0.5 * _interval, _syncValues];
};
} else {
if !((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) then {
if (_airwayStatus < 100) then {
_unit setvariable [QGVAR(airwayStatus), (_airwayStatus + 1.5) min 100, _syncValues];
_unit setvariable [QGVAR(airwayStatus), (_airwayStatus + 1.5 * _interval) min 100, _syncValues];
};
};
};

View File

@ -0,0 +1,23 @@
/*
* Author: KoffeinFlummi
* Checks if a unit is in a medical vehicle.
*
* Arguments:
* 0: unit to be checked <OBJECT>
*
* Return Value:
* Is unit in medical vehicle? <BOOL>
*
* Public: Yes
*/
private ["_unit", "_vehicle"];
_unit = _this select 0;
_vehicle = vehicle _unit;
if (_unit == _vehicle) exitWith {false};
if (_unit in [driver _vehicle, gunner _vehicle, commander _vehicle]) exitWith {false};
// @todo: variable names standard?
_vehicle getVariable [QGVAR(isMedic), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1]

View File

@ -1,5 +1,5 @@
/*
* Author: Glowbal
* Author: Glowbal, KoffeinFlummi
* Check if a unit is any medical class
*
* Arguments:
@ -18,18 +18,7 @@ private ["_unit","_class","_return"];
_unit = _this select 0;
_medicN = if (count _this > 1) then {_this select 1} else {1};
_return = false;
if (GVAR(medicSetting) >= 1) then {
_class = _unit getvariable [QGVAR(medicClass), 0];
if (GVAR(medicSetting) == 1) then {
_return = _class > 0;
} else {
if (_class >= _medicN) then {
_return = true;
};
};
} else {
_return = true;
};
_class = _unit getVariable [QGVAR(medicClass),
getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")];
_return;
_class >= _medicN min GVAR(medicSetting)

View File

@ -1,6 +1,6 @@
/*
* Author: KoffeinFlummi
* My very own setHitPointDamage since BIS's one is buggy when affecting a remote unit.
* My very own setHitPointDamage since BIS' one is buggy when affecting a remote unit.
* It also doesn't change the overall damage. This does.
*
* Arguments:
@ -16,6 +16,10 @@
*/
#include "script_component.hpp"
#define LEGDAMAGETRESHOLD1 1
#define LEGDAMAGETRESHOLD2 1.7
#define ARMDAMAGETRESHOLD1 1
#define ARMDAMAGETRESHOLD2 1.7
private ["_unit", "_selection", "_damage", "_selections", "_damages", "_damageOld", "_damageSumOld", "_damageNew", "_damageSumNew", "_damageFinal"];
@ -76,3 +80,22 @@ _unit setDamage _damageNew;
_damageFinal = (_damages select _forEachIndex);
_unit setHitPointDamage [_x, _damageFinal];
} forEach _selections;
// Leg Damage
_legdamage = (_unit getHitPointDamage "HitLeftLeg") + (_unit getHitPointDamage "HitRightLeg");
if (_legdamage >= LEGDAMAGETRESHOLD1) then {
if (_unit getHitPointDamage "HitLegs" != 1) then {_unit setHitPointDamage ["HitLegs", 1]};
} else {
if (_unit getHitPointDamage "HitLegs" != 0) then {_unit setHitPointDamage ["HitLegs", 0]};
};
// @ŧodo: force prone for completely fucked up legs.
// Arm Damage
_armdamage = (_unit getHitPointDamage "HitLeftArm") + (_unit getHitPointDamage "HitRightArm");
if (_armdamage >= ARMDAMAGETRESHOLD1) then {
if (_unit getHitPointDamage "HitHands" != 1) then {_unit setHitPointDamage ["HitHands", 1]};
} else {
if (_unit getHitPointDamage "HitHands" != 0) then {_unit setHitPointDamage ["HitHands", 0]};
};
// @todo: Drop weapon for full damage.

View File

@ -35,6 +35,12 @@ if (!local _unit) exitwith {
_unit setvariable ["ACE_isUnconscious", true, true];
_unit setUnconscious true;
// @todo: mute player?
if (_unit == ACE_player) then {
if (visibleMap) then {openMap false};
closeDialog 0;
};
// If a unit has the launcher out, it will sometimes start selecting the primairy weapon while unconscious,
// therefor we force it to select the primairy weapon before going unconscious
if ((vehicle _unit) isKindOf "StaticWeapon") then {

View File

@ -32,6 +32,4 @@ if (_selection == "all") then {
_damage = ((_target getHitPointDamage _point) - BANDAGEHEAL) max 0;
[_target, _point, _damage] call FUNC(setHitPointDamage);
// @todo: leg/arm damage - in setHitPointDamage?
};

View File

@ -15,7 +15,6 @@
*/
#include "script_component.hpp"
#define BLOODBAGHEAL 70
private ["_caller", "_target","_className"];
_caller = _this select 0;

View File

@ -23,11 +23,9 @@ _target = _this select 1;
_className = _this select 3;
// reduce pain, pain sensitivity
_morphine = (_target getVariable [QGVAR(morphine), 0] + MORPHINEHEAL) min 1;
_morphine = ((_target getVariable [QGVAR(morphine), 0]) + MORPHINEHEAL) min 1;
_target setVariable [QGVAR(morphine), _morphine, true];
_pain = ((_target getVariable [QGVAR(pain), 0]) - MORPHINEHEAL) max 0;
_target setVariable [QGVAR(pain), _pain, true];
// @todo overdose
// @todo pain, painkiller reduction

View File

@ -1,73 +1,243 @@
<?xml version="1.0"encoding="UTF-8"?>
<Project name="ACE">
<Package name="Medical">
<Container name="Basic">
<Key ID="STR_ACE_Medical_Inject_Morphine">
<English>Inject Morphine</English>
<German>Morphin injizieren</German>
<Spanish>Inyectar Morfina</Spanish>
<Polish>Wstrzyknij morfinę</Polish>
<Czech>Aplikovat Morfin</Czech>
<Russian>Ввести морфин</Russian>
<French>Morphine</French>
<Hungarian>Morfium</Hungarian>
<Portuguese>Injetar Morfina</Portuguese>
<Italian>Inietta Morfina</Italian>
</Key>
<Key ID="STR_ACE_Medical_Inject_Epinephrine">
<English>Inject Epinephrine</English>
<German>Epinephrine injizieren</German>
<Spanish>Inyectar Epinefrina</Spanish>
<Polish>Wtrzyknij adrenalinę</Polish>
<Czech>Aplikovat Adrenalin</Czech>
<Russian>Ввести андреналил</Russian>
<French>Adrénaline</French>
<Hungarian>Adrenalin</Hungarian>
<Portuguese>Injetar Epinefrina</Portuguese>
<Italian>Inietta Epinefrina</Italian>
</Key>
<Key ID="STR_ACE_Medical_Transfuse_Blood">
<English>Transfuse Blood</English>
<German>Bluttransfusion</German>
<Spanish>Transfundir sangre</Spanish>
<Polish>Przetocz krew</Polish>
<Czech>Transfúze krve</Czech>
<Russian>Перелить кровь</Russian>
<French>Transfusion</French>
<Hungarian>Infúzió</Hungarian>
<Portuguese>Transfundir Sangue</Portuguese>
<Italian>Effettua Trasfusione</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandage">
<English>Bandage</English>
<German>Verbinden</German>
<Spanish>Venda</Spanish>
<Polish>Bandaż</Polish>
<Czech>Obvázat</Czech>
<French>Pansement</French>
<Italian>Benda</Italian>
<Hungarian>Kötözés</Hungarian>
<Portuguese>Atadura</Portuguese>
<Russian>Перевязать</Russian>
</Key>
<Key ID="STR_ACE_Medical_Bandage_HitHead">
<English>Bandage Head</English>
<German>Kopf verbinden</German>
<Spanish>Vendar la cabeza</Spanish>
<Polish>Bandażuj głowę</Polish>
<Czech>Obvázat hlavu</Czech>
<Russian>Перевязать голову</Russian>
<French>Pansement Tête</French>
<Hungarian>Fej kötözése</Hungarian>
<Portuguese>Atar Cabeça</Portuguese>
<Italian>Benda la testa</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandage_HitBody">
<English>Bandage Torso</English>
<German>Torso verbinden</German>
<Spanish>Vendar el torso</Spanish>
<Polish>Bandażuj tors</Polish>
<Czech>Obvázat hruď</Czech>
<Russian>Перевязать торс</Russian>
<French>Pansement Torse</French>
<Hungarian>Felsőtest kötözése</Hungarian>
<Portuguese>Atar Tronco</Portuguese>
<Italian>Benda il torso</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandage_HitLeftArm">
<English>Bandage Left Arm</English>
<German>Arm links verbinden</German>
<Spanish>Vendar el brazo izquierdo</Spanish>
<Polish>Bandażuj lewe ramię</Polish>
<Czech>Obvázat levou ruku</Czech>
<Russian>Перевязать левую руку</Russian>
<French>Pansement Bras Gauche</French>
<Hungarian>Bal kar kötözése</Hungarian>
<Portuguese>Atar Braço Esquerdo</Portuguese>
<Italian>Benda il braccio sinistro</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandage_HitRightArm">
<English>Bandage Right Arm</English>
<German>Arm rechts verbinden</German>
<Spanish>Vendar el brazo derecho</Spanish>
<Polish>Bandażuj prawe ramię</Polish>
<Czech>Obvázat pravou ruku</Czech>
<Russian>Перевязать правую руку</Russian>
<French>Pansement Bras Droit</French>
<Hungarian>Jobb kar kötözése</Hungarian>
<Portuguese>Atar Braço Direito</Portuguese>
<Italian>Benda il braccio destro</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandage_HitLeftLeg">
<English>Bandage Left Leg</English>
<German>Bein links verbinden</German>
<Spanish>Vendar la pierna izquierda</Spanish>
<Polish>Bandażuj lewą nogę</Polish>
<Czech>Obvázat levou nohu</Czech>
<Russian>Перевязать левую ногу</Russian>
<French>Pansement Jambe Gauche</French>
<Hungarian>Bal láb kötözése</Hungarian>
<Portuguese>Atar Perna Esquerda</Portuguese>
<Italian>Benda la gamba sinistra</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandage_HitRightLeg">
<English>Bandage Right Leg</English>
<German>Bein rechts verbinden</German>
<Spanish>Vendar la pierna derecha</Spanish>
<Polish>Bandażuj prawą nogę</Polish>
<Czech>Obvázat pravou nohu</Czech>
<Russian>Перевязать правую ногу</Russian>
<French>Pansement Jambe Droite</French>
<Hungarian>Jobb láb kötözése</Hungarian>
<Portuguese>Atar Perna Direita</Portuguese>
<Italian>Benda la gamba destra</Italian>
</Key>
<Key ID="STR_ACE_Medical_Injecting_Morphine">
<English>Injecting Morphine ...</English>
<German>Morphin injizieren ...</German>
<Spanish>Inyectando Morfina ...</Spanish>
<Polish>Wstrzykiwanie morfiny ...</Polish>
<Czech>Aplikuju Morfin ...</Czech>
<Russian>Введение морфина...</Russian>
<French>Injection de Morphine...</French>
<Hungarian>Morfium beadása...</Hungarian>
<Portuguese>Injetando Morfina ...</Portuguese>
<Italian>Inietto la morfina ...</Italian>
</Key>
<Key ID="STR_ACE_Medical_Injecting_Epinephrine">
<English>Injecting Epinephrine ...</English>
<German>Epinephrine injizieren ...</German>
<Spanish>Inyectando Epinefrina ...</Spanish>
<Polish>Wstrzykiwanie adrenaliny ...</Polish>
<Czech>Aplikuju Adrenalin ...</Czech>
<Russian>Введение андреналина</Russian>
<French>Injection d'Adrénaline ...</French>
<Hungarian>Adrenalin beadása...</Hungarian>
<Portuguese>Injetando Epinefrina ...</Portuguese>
<Italian>Inietto l'epinefrina ...</Italian>
</Key>
<Key ID="STR_ACE_Medical_Transfusing_Blood">
<English>Transfusing Blood ...</English>
<German>Bluttransfusion ...</German>
<Spanish>Realizando transfusión ...</Spanish>
<Polish>Przetaczanie krwi ...</Polish>
<Czech>Probíhá transfúze krve ...</Czech>
<Russian>Переливание крови...</Russian>
<French>Transfusion Sanguine ...</French>
<Hungarian>Infúzió...</Hungarian>
<Portuguese>Transfundindo Sangue ...</Portuguese>
<Italian>Effettuo la trasfusione ...</Italian>
</Key>
<Key ID="STR_ACE_Medical_Bandaging">
<English>Bandaging ...</English>
<German>Verbinden ...</German>
<Spanish>Vendando ...</Spanish>
<Polish>Bandażowanie ...</Polish>
<Czech>Obvazuji ...</Czech>
<French>Pansement ...</French>
<Italian>Sto applicando la benda ...</Italian>
<Hungarian>Bekötözés...</Hungarian>
<Portuguese>Atando ...</Portuguese>
<Russian>Перевязывание....</Russian>
</Key>
</Container>
<Container name="UI">
<Key ID="STR_ACE_MEDICAL_TRIAGE_STATUS_MINOR">
<Original>Minor</Original>
<English>Minor</English>
</Key>
<Key ID="STR_ACE_MEDICAL_TRIAGE_STATUS_DELAYED">
<Original>Delayed</Original>
<English>Delayed</English>
</Key>
<Key ID="STR_ACE_MEDICAL_TRIAGE_STATUS_IMMEDIATE">
<Original>Immediate</Original>
<English>Immediate</English>
</Key>
<Key ID="STR_ACE_MEDICAL_TRIAGE_STATUS_DECEASED">
<Original>Deceased</Original>
<English>Deceased</English>
</Key>
<Key ID="STR_ACE_MEDICAL_TRIAGE_STATUS_NONE">
<Original>None</Original>
<English>None</English>
</Key>
<Key ID="STR_ACE_MEDICAL_NORMAL_BREATHING">
<Original>Normal breathing</Original>
<English>Normal breathing</English>
<Russian>Дыхание в норме</Russian>
<Spanish>Respiración normal</Spanish>
<French>Respiration Normale</French>
<Polish>Normalny oddech</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_NO_BREATHING">
<Original>No breathing</Original>
<English>No breathing</English>
<Russian>Дыхания нет</Russian>
<Spanish>No respira</Spanish>
<French>Apnée</French>
<Polish>Brak oddechu</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_DIFFICULT_BREATHING">
<Original>Difficult breathing</Original>
<English>Difficult breathing</English>
<Russian>Дыхание затруднено</Russian>
<Spanish>Dificultad para respirar</Spanish>
<French>Difficultée Respiratoire</French>
<Polish>Trudności z oddychaniem</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_ALMOST_NO_BREATHING">
<Original>Almost no breathing</Original>
<English>Almost no breathing</English>
<Russian>Дыхания почти нет</Russian>
<Spanish>Casi sin respirar</Spanish>
<French>Respiration Faible</French>
<Polish>Prawie brak oddechu</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_STATUS_BLEEDING">
<Original>Bleeding</Original>
<English>Bleeding</English>
<Russian>Кровотечение</Russian>
<Spanish>Sangrando</Spanish>
<French>Seignement</French>
<Polish>Krwawienie zewnętrzne</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_STATUS_PAIN">
<Original>In Pain</Original>
<English>In Pain</English>
<Russian>Испытывает боль</Russian>
<Spanish>Con Dolor</Spanish>
<French>A De La Douleur</French>
<Polish>W bólu</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_STATUS_LOST_BLOOD">
<Original>Lost a lot of Blood</Original>
<English>Lost a lot of Blood</English>
<Russian>Большая кровопотеря</Russian>
<Spanish>Mucha Sangre perdida</Spanish>
<French>A Perdu Bcp de Sang</French>
<Polish>Stracił dużo krwi</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED">
<Original>Tourniquet [CAT]</Original>
<English>Tourniquet [CAT]</English>
<Russian>Жгут</Russian>
<Spanish>Torniquete [CAT]</Spanish>
<French>Garot [CAT]</French>
@ -76,487 +246,486 @@
</Container>
<Container name="CfgWeapons">
<Key ID="STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY">
<Original>Bandage (Basic)</Original>
<English>Bandage (Basic)</English>
<Russian>Повязка (обычная)</Russian>
<Spanish>Vendaje (Básico)</Spanish>
<French>Bandage (Standard)</French>
<Polish>Bandaż (jałowy)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT">
<Original>Used to cover a wound</Original>
<English>Used to cover a wound</English>
<Russian>Для перевязки ран</Russian>
<Spanish>Utilizado para cubrir una herida</Spanish>
<French>Utilisé Pour Couvrir Une Blessure</French>
<Polish>Używany w celu przykrycia i ochrony miejsca zranienia</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE">
<Original>A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed.</Original>
<English>A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed.</English>
<Russian>Повязка, накладываемая поверх раны после остановки кровотечения.</Russian>
<Spanish>Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar.</Spanish>
<French>C'est un bandage, qui est fait d'un matériel spécial utiliser pour couvrir une blessure, qui peut etre appliquer des que le seignement as ete stopper.</French>
<Polish>Opatrunek materiałowy, używany do przykrywania ran, zakładany na ranę po zatamowaniu krwawienia.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY">
<Original>Packing Bandage</Original>
<English>Packing Bandage</English>
<Russian>Тампонирующая повязка</Russian>
<Spanish>Vendaje Compresivo</Spanish>
<French>Bandage Mèche</French>
<Polish>Bandaż (uciskowy)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT">
<Original>Used to pack medium to large wounds and stem the bleeding</Original>
<English>Used to pack medium to large wounds and stem the bleeding</English>
<Russian>Для тампонирования ран среднего и большого размера и остановки кровотечения.</Russian>
<Spanish>Se utiliza para vendar heridas medianas y grandes y detener el sangrado</Spanish>
<French>Utiliser pour remplire la cavité créé dans une blessure moyenne et grande.</French>
<Polish>Używany w celu opatrywania średnich i dużych ran oraz tamowania krwawienia.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE">
<Original>A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries.</Original>
<English>A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries.</English>
<Russian>Повязка для тампонирования раны, остановки кровотечения и лучшего заживления. При тяжелых сочетанных ранениях возможно тампонирование раны.</Russian>
<Spanish>Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos.</Spanish>
<French>Un bandage servent a etre inseré dans les blessure pour éponger le seignement et faciliter la guerrison. Ce bandage est une option pour soigner les lession de politrauma.</French>
<Polish>Opatrunek stosowany w celu zatrzymania krwawienia i osłony większych ran.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY">
<Original>Bandage (Elastic)</Original>
<English>Bandage (Elastic)</English>
<Russian>Повязка (давящая)</Russian>
<Spanish>Vendaje (Elástico)</Spanish>
<French>Bandage (Élastique)</French>
<Polish>Bandaż (elastyczny)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT">
<Original>Bandage kit, Elastic</Original>
<English>Bandage kit, Elastic</English>
<Russian>Давящая повязка</Russian>
<Spanish>Vendaje (Elástico)</Spanish>
<French>Bandage Compressif Élastique</French>
<Polish>Zestaw bandaży elastycznych.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE">
<Original></Original>
<English></English>
<Russian></Russian>
<French>Ce bandage peut etre utiliser pour compresser la plaie afin de ralentire le seignement et assurer la tenue du bandage lors de mouvment.</French>
<Polish>Elastyczna opaska podtrzymująca opatrunek oraz usztywniająca okolice stawów.</Polish>
<Spanish>Brinda una compresión uniforme y ofrece soporte extra a una zona lesionada</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_TOURNIQUET_DISPLAY">
<Original>Tourniquet (CAT)</Original>
<English>Tourniquet (CAT)</English>
<Russian>Жгут</Russian>
<Spanish>Torniquete (CAT)</Spanish>
<French>Garot (CAT)</French>
<Polish>Staza (typ. CAT)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT">
<Original>Slows down blood loss when bleeding</Original>
<English>Slows down blood loss when bleeding</English>
<Russian>Уменьшает кровопотерю при кровотечении.</Russian>
<Spanish>Reduce la velocidad de pérdida de sangre</Spanish>
<French>Ralentit le seignement</French>
<Polish>Zmniejsza ubytek krwi z kończyn w przypadku krwawienia.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_TOURNIQUET_DESC_USE">
<Original>A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood.</Original>
<English>A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood.</English>
<Russian>Жгут используется для прижатия сосудов, приводящего к остановке или значительному уменьшению кровотечения и сокращению кровопотери.</Russian>
<Spanish>Dispositivo utilizado para eliminar el pulso distal y de ese modo controlar la pérdida de sangre</Spanish>
<French>Un appareil servent a compresser les artères et veines afin de reduire la perte de sang.</French>
<Polish>Opaska zaciskowa CAT służy do tamowanie krwotoków w sytuacji zranienia kończyn z masywnym krwawieniem tętniczym lub żylnym.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_MORPHINE_DISPLAY">
<Original>Morphine auto-injector</Original>
<English>Morphine auto-injector</English>
<Russian>Морфин в автоматическом шприце</Russian>
<Spanish>Morfina auto-inyectable</Spanish>
<French>Auto-injecteur de Morphine</French>
<Polish>Autostrzykawka z morfiną</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_MORPHINE_DESC_SHORT">
<Original>Used to combat moderate to severe pain experiences</Original>
<English>Used to combat moderate to severe pain experiences</English>
<Russian>Для снятия средних и сильных болевых ощущений.</Russian>
<Spanish>Usado para combatir los estados dolorosos moderados a severos</Spanish>
<French>Utiliser pour contrer les douleurs modéré à severes.</French>
<Polish>Morfina. Ma silne działanie przeciwbólowe.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_MORPHINE_DESC_USE">
<Original>An analgesic used to combat moderate to severe pain experiences.</Original>
<English>An analgesic used to combat moderate to severe pain experiences.</English>
<Russian>Анальгетик для снятия средних и сильных болевых ощущений.</Russian>
<Spanish>Analgésico usado para combatir los estados dolorosos de moderado a severo.</Spanish>
<French>Un Analgésique puissant servant a contrer les douleur modéré a severe.</French>
<Polish>Organiczny związek chemiczny z grupy alkaloidów. Ma silne działanie przeciwbólowe.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_ATROPINE_DISPLAY">
<Original>Atropin auto-injector</Original>
<English>Atropin auto-injector</English>
<Russian>Атропин в автоматическом шприце</Russian>
<Spanish>Atropina auto-inyectable</Spanish>
<French>Auto-injecteur d'Atropine</French>
<Polish>Autostrzykawka AtroPen</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_ATROPINE_DESC_SHORT">
<Original>Used in NBC scenarios</Original>
<English>Used in NBC scenarios</English>
<Russian>Применяется для защиты от ОМП</Russian>
<Spanish>Usado en escenarios NBQ</Spanish>
<French>Utiliser en cas d'attaque CBRN</French>
<Polish>Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_ATROPINE_DESC_USE">
<Original>A drug used by the Military in NBC scenarios.</Original>
<English>A drug used by the Military in NBC scenarios.</English>
<Russian>Препарат, используемый в войсках для защиты от оружия массового поражения.</Russian>
<Spanish>Medicamento usado por Militares en escenarios NBQ</Spanish>
<French>Médicament utilisé par l'armée en cas d'attaque CBRN</French>
<Polish>Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. Środek stosowany w przypadku zagrożeń NBC.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY">
<Original>Epinephrine auto-injector</Original>
<English>Epinephrine auto-injector</English>
<Russian>Адреналин в автоматическом шприце</Russian>
<Spanish>Epinefrina auto-inyectable</Spanish>
<French>Auto-injecteur d'épinéphrine</French>
<Polish>Autostrzykawka EpiPen</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT">
<Original>Increase heart rate and counter effects given by allergic reactions</Original>
<English>Increase heart rate and counter effects given by allergic reactions</English>
<Russian>Стимулирует работу сердца и купирует аллергические реакции.</Russian>
<Spanish>Aumenta la frecuencia cardiaca y contraresta los efectos de las reacciones alérgicas</Spanish>
<French>Augmente la Fréquance cadiaque et contré les effet d'une reaction Anaphylactique</French>
<Polish>Adrenalina. Zwiększa puls i przeciwdziała efektom wywołanym przez reakcje alergiczne</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE">
<Original>A drug that works on a sympathetic response to dilate the bronchi, increase heart rate and counter such effects given by allergic reactions (anaphylaxis). Used in sudden cardiac arrest scenarios with decreasing positive outcomes.</Original>
<English>A drug that works on a sympathetic response to dilate the bronchi, increase heart rate and counter such effects given by allergic reactions (anaphylaxis). Used in sudden cardiac arrest scenarios with decreasing positive outcomes.</English>
<Russian>Препарат, вызывающий симпатическую реакцию, приводящую к расширению бронхов, увеличению частоты сердечных сокращений и купированию аллергических реакций (анафилактического шока). Применяется при остановке сердца с уменьшением вероятности благоприятного исхода.</Russian>
<Spanish>Medicamento que dilata los bronquios, aumenta la frecuencia cardiaca y contrarresta los efectos de las reacciones alérgicas (anafilaxis). Se utiliza en caso de paros cardiacos repentinos.</Spanish>
<French>Un medicament qui fonctione sur le systeme sympatique créan une dilatation des bronches, augmente la fréquance cardiaque et contre les effet d'une reaction alergique (anaphylaxie). Utiliser lors d'arret cardio-respiratoire pour augmenté les chances retrouver un ryhtme.</French>
<Polish>EpiPen z adrenaliną ma działanie sympatykomimetyczne, tj. pobudza receptory alfa- i beta-adrenergiczne. Pobudzenie układu współczulnego prowadzi do zwiększenia częstotliwości pracy serca, zwiększenia pojemności wyrzutowej serca i przyśpieszenia krążenia wieńcowego. Pobudzenie oskrzelowych receptorów beta-adrenergicznych wywołuje rozkurcz mięśni gładkich oskrzeli, co w efekcie zmniejsza towarzyszące oddychaniu świsty i duszności.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PLASMA_IV">
<Original>Plasma IV (1000ml)</Original>
<English>Plasma IV (1000ml)</English>
<Russian>Плазма для в/в вливания (1000 мл)</Russian>
<Spanish>Plasma Intravenoso (1000ml)</Spanish>
<French>Plasma Sanguin IV (1000ml)</French>
<Polish>Osocze IV (1000ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PLASMA_IV_DESC_SHORT">
<Original>A volume-expanding blood supplement.</Original>
<English>A volume-expanding blood supplement.</English>
<Russian>Дополнительный препарат, применяемый при возмещении объема крови.</Russian>
<Spanish>Suplemento para expandir el volumen sanguíneo.</Spanish>
<French>Supplement visant a remplacer les volume sanguin</French>
<Polish>Składnik krwi, używany do zwiększenia jej objętości.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PLASMA_IV_DESC_USE">
<Original>A volume-expanding blood supplement.</Original>
<English>A volume-expanding blood supplement.</English>
<Russian>Дополнительный препарат, применяемый при возмещении объема крови.</Russian>
<Spanish>Suplemento para expandir el volumen sanguíneo.</Spanish>
<French>Supplement visant a remplacer le volume sanguin et remplace les plaquettes.</French>
<Polish>Składnik krwi, używany do zwiększenia jej objętości.</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PLASMA_IV_500">
<Original>Plasma IV (500ml)</Original>
<English>Plasma IV (500ml)</English>
<Russian>Плазма для в/в вливания (500 мл)</Russian>
<Spanish>Plasma Intravenoso (500ml)</Spanish>
<French>Plasma Sanguin IV (500ml)</French>
<Polish>Osocze IV (500ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_PLASMA_IV_250">
<Original>Plasma IV (250ml)</Original>
<English>Plasma IV (250ml)</English>
<Russian>Плазма для в/в вливания (250 мл)</Russian>
<Spanish>Plasma Intravenoso (250ml)</Spanish>
<French>Plasma Sanguin (250ml)</French>
<Polish>Osocze IV (250ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BLOOD_IV">
<Original>Blood IV (1000ml)</Original>
<English>Blood IV (1000ml)</English>
<Russian>Кровь для переливания (1000 мл)</Russian>
<Spanish>Sangre Intravenosa (1000ml)</Spanish>
<French>Cullot Sanguin IV (1000ml)</French>
<Polish>Krew IV (1000ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BLOOD_IV_DESC_SHORT">
<Original>Blood IV, for restoring a patients blood (keep cold)</Original>
<English>Blood IV, for restoring a patients blood (keep cold)</English>
<Russian>Пакет крови для возмещения объема потерянной крови (хранить в холодильнике)</Russian>
<Spanish>Sangre Intravenosa, para restarurar el volumen sanguíneo (mantener frío)</Spanish>
<French>Cullot Sanguin IV, pour remplacer le volume sanguin (garder Réfrigeré)</French>
<Polish>Krew IV, używana do uzupełnienia krwi u pacjenta, trzymać w warunkach chłodniczych</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BLOOD_IV_DESC_USE">
<Original>O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care.</Original>
<English>O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care.</English>
<Russian>Кровь I группы, резус-отрицательная, применяется по жизненным показаниям для возмещения объема потерянной крови на догоспитальном этапе оказания медицинской помощи.</Russian>
<French>Cullot Sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin. </French>
<Polish>Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupełnienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala.</Polish>
<Spanish>Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdido. Uso habitual durante el transporte de heridos.</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_BLOOD_IV_500">
<Original>Blood IV (500ml)</Original>
<English>Blood IV (500ml)</English>
<Russian>Кровь для переливания (500 мл)</Russian>
<Spanish>Sangre Intravenosa (500ml)</Spanish>
<French>Cullot Sanguin IV (500ml)</French>
<Polish>Krew IV (500ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_BLOOD_IV_250">
<Original>Blood IV (250ml)</Original>
<English>Blood IV (250ml)</English>
<Russian>Кровь для переливания (250 мл)</Russian>
<Spanish>Sangre Intravenosa (250ml)</Spanish>
<French>Cullot Sanguin IV (250ml)</French>
<Polish>Krew IV (250ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_SALINE_IV">
<Original>Saline IV (1000ml)</Original>
<English>Saline IV (1000ml)</English>
<Russian>Физраствор для в/в вливания (1000 мл)</Russian>
<Spanish>Solución Salina Intravenosa (1000ml)</Spanish>
<French>solution Saline 0.9% IV (1000ml)</French>
<Polish>Solanka 0,9% IV (1000ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_SALINE_IV_DESC_SHORT">
<Original>Saline IV, for restoring a patients blood</Original>
<English>Saline IV, for restoring a patients blood</English>
<Russian>Пакет физраствора для возмещения объема потерянной крови</Russian>
<Spanish>Solución Salina Intravenosa, para restaurar el volumen sanguíneo</Spanish>
<French>Solution Saline 0.9% IV, pour retablir temporairement la tention arteriel</French>
<Polish>Solanka 0,9%, podawana dożylnie (IV), używana w celu uzupełnienia krwi u pacjenta</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_SALINE_IV_DESC_USE">
<Original>A medical volume-replenishing agent introduced into the blood system through an IV infusion.</Original>
<English>A medical volume-replenishing agent introduced into the blood system through an IV infusion.</English>
<Russian>Пакет физиологического раствора для возмещения объема потерянной крови путем внутривенного вливания.</Russian>
<Spanish>Suero fisiológico inoculado al torrente sanguíneo de forma intravenosa.</Spanish>
<French> Un remplacment temporaire pour rétablir la tention artériel lors de perte sanguine, étant ajouter par intraveineuse</French>
<Polish>Używany w medycynie w formie płynu infuzyjnego jako środek nawadniający i uzupełniający niedobór elektrolitów, podawany dożylnie (IV).</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_SALINE_IV_500">
<Original>Saline IV (500ml)</Original>
<English>Saline IV (500ml)</English>
<Russian>Физраствор для в/в вливания (500 мл)</Russian>
<Spanish>Solución Salina Intravenosa (500ml)</Spanish>
<French>Solution Saline 0.9% IV (500ml)</French>
<Polish>Solanka 0,9% IV (500ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_SALINE_IV_250">
<Original>Saline IV (250ml)</Original>
<English>Saline IV (250ml)</English>
<Russian>Физраствор для в/в вливания (250 мл)</Russian>
<Spanish>Solución Salina Intravenosa (250ml)</Spanish>
<French>Solution Saline 0.9% IV (250ml)</French>
<Polish>Solanka 0,9% IV (250ml)</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_QUIKCLOT_DISPLAY">
<Original>Basic Field Dressing (QuikClot)</Original>
<English>Basic Field Dressing (QuikClot)</English>
<Russian>Первичный перевязочный пакет (QuikClot)</Russian>
<Spanish>Vendaje Básico (Coagulante)</Spanish>
<French>Bandage Regulier (Coagulant)</French>
<Polish>Opatrunek QuikClot</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_QUIKCLOT_DESC_SHORT">
<Original>QuikClot bandage</Original>
<English>QuikClot bandage</English>
<Russian>Гемостатический пакет QuikClot</Russian>
<Spanish>Venda Coagulante</Spanish>
<French>Bandage coagulant</French>
<Polish>Podstawowy opatrunek stosowany na rany</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_QUIKCLOT_DESC_USE">
<Original></Original>
<English></English>
<Russian></Russian>
<French>Un bandage servant a coaguler les seignements mineur à moyen.</French>
<Polish>Proszkowy opatrunek adsorbcyjny przeznaczony do tamowania zagrażających życiu krwawień średniej i dużej intensywności.</Polish>
<Spanish>Vendaje Hemostático con coagulante que detiene el sangrado.</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_AID_KIT_DISPLAY">
<Original>Personal Aid Kit</Original>
<English>Personal Aid Kit</English>
<Russian>Аптечка</Russian>
<Spanish>Kit de Soporte Vital Avanzado</Spanish>
<French>Équipement de support Vitale</French>
<Polish>Apteczka osobista</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_AID_KIT_DESC_SHORT">
<Original>Includes various treatment kit needed for stitching or advanced treatment</Original>
<English>Includes various treatment kit needed for stitching or advanced treatment</English>
<Russian>Содержит различные материалы и инструменты для зашивания ран и оказания специальной медпомощи.</Russian>
<Spanish>Incluye material médico para tratamientos avanzados</Spanish>
<French>Inclue du matériel medical pour les traitement avancé, tel les point de suture.</French>
<Polish>Zestaw środków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego</Polish>
</Key>
<Key ID="STR_ACE_MEDICAL_AID_KIT_DESC_USE">
<Original></Original>
<English></English>
<Russian></Russian>
<French></French>
<Spanish></Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_SURGICALKIT_DISPLAY">
<Original>Surgical Kit</Original>
<English>Surgical Kit</English>
<Russian>Хирургический набор</Russian>
<Spanish>Kit Quirúrgico</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT">
<Original>Surgical Kit for in field advanced medical treatment</Original>
<English>Surgical Kit for in field advanced medical treatment</English>
<Russian>Набор для хирургической помощи в полевых условиях</Russian>
<Spanish>Kit Quirúrgico para el tratamiento avanzado en el campo de batalla</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_SURGICALKIT_DESC_USE">
<Original>Surgical Kit for in field advanced medical treatment</Original>
<English>Surgical Kit for in field advanced medical treatment</English>
<Russian>Набор для хирургической помощи в полевых условиях</Russian>
<Spanish>Kit Quirúrgico para el tratamiento avanzado en el campo de batalla</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_BODYBAG_DISPLAY">
<Original>Bodybag</Original>
<English>Bodybag</English>
<Russian>Мешок для трупов</Russian>
<Spanish>Bolsa para cadáveres</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_BODYBAG_DESC_SHORT">
<Original>A bodybag for dead bodies</Original>
<English>A bodybag for dead bodies</English>
<Russian>Мешок для упаковки трупов</Russian>
<Spanish>Bolsa para cadáveres</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_BODYBAG_DESC_USE">
<Original>A bodybag for dead bodies</Original>
<English>A bodybag for dead bodies</English>
<Russian>Мешок для упаковки трупов</Russian>
<Spanish>Bolsa para cadáveres</Spanish>
</Key>
</Container>
<Container name="Actions">
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE">
<Original>Blood Pressure</Original>
<English>Blood Pressure</English>
<Russian>Артериальное давление</Russian>
<Spanish>Presión Arterial</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_CONTENT">
<Original>Checking Blood Pressure..</Original>
<English>Checking Blood Pressure..</English>
<Russian>Проверка артериального давления...</Russian>
<Spanish>Comprobando Presión Arterial...</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_CHECKED_MEDIC">
<Original>You checked %1</Original>
<English>You checked %1</English>
<Russian>Вы осмотрели раненого %1</Russian>
<Spanish>Examinando a %1</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_OUTPUT_1">
<Original>You find a blood pressure of %2/%3</Original>
<English>You find a blood pressure of %2/%3</English>
<Russian>Артериальное давление %2/%3</Russian>
<Spanish>La Presión Arterial es %2/%3</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_OUTPUT_2">
<Original>You find a low blood pressure</Original>
<English>You find a low blood pressure</English>
<Russian>Давление низкое</Russian>
<Spanish>La Presión Arterial es baja</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_OUTPUT_3">
<Original>You find a normal blood pressure</Original>
<English>You find a normal blood pressure</English>
<Russian>Давление нормальное</Russian>
<Spanish>La Presión Arterial es normal</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_OUTPUT_4">
<Original>You find a high blood pressure</Original>
<English>You find a high blood pressure</English>
<Russian>Давление высокое</Russian>
<Spanish>La Presión Arterial es alta</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_OUTPUT_5">
<Original>You find no blood pressure</Original>
<English>You find no blood pressure</English>
<Russian>Давления нет</Russian>
<Spanish>No hay Presión Arterial</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_BLOODPRESSURE_OUTPUT_6">
<Original>You fail to find a blood pressure</Original>
<English>You fail to find a blood pressure</English>
<Russian>Артериальное давление не определяется</Russian>
<Spanish>No puedes encontrar Presión Arterial</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE">
<Original>Pulse</Original>
<English>Pulse</English>
<Russian>Пульс</Russian>
<Spanish>Pulso</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_CONTENT">
<Original>Checking Heart Rate..</Original>
<English>Checking Heart Rate..</English>
<Russian>Проверка пульса...</Russian>
<Spanish>Comprobando Pulso...</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_CHECKED_MEDIC">
<Original>You checked %1</Original>
<English>You checked %1</English>
<Russian>Вы осмотрели раненого %1</Russian>
<Spanish>Examinando a %1</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_OUTPUT_1">
<Original>You find a Heart Rate of %2</Original>
<English>You find a Heart Rate of %2</English>
<Russian>Пульс %2 уд./мин.</Russian>
<Spanish>El Pulso es %2</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_OUTPUT_2">
<Original>You find a weak Heart Rate</Original>
<English>You find a weak Heart Rate</English>
<Russian>Пульс слабый</Russian>
<Spanish>El Pulso es débil</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_OUTPUT_3">
<Original>You find a strong Heart Rate</Original>
<English>You find a strong Heart Rate</English>
<Russian>Пульс учащенный</Russian>
<Spanish>El Pulso está acelerado</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_OUTPUT_4">
<Original>You find a normal Heart Rate</Original>
<English>You find a normal Heart Rate</English>
<Russian>Пульс в норме</Russian>
<Spanish>El Pulso es bueno</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_PULSE_OUTPUT_5">
<Original>You find no Heart Rate</Original>
<English>You find no Heart Rate</English>
<Russian>Пульс не прощупывается</Russian>
<Spanish>No tiene Pulso</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_RESPONSE">
<Original>Response</Original>
<English>Response</English>
<Russian>Реакция</Russian>
<Spanish>Reacciona</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_RESPONSE_CONTENT">
<Original>You check response of patient</Original>
<English>You check response of patient</English>
<Russian>Вы проверяете реакцию раненого</Russian>
<Spanish>Compruebas si el paciente reacciona</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_REPONSE_RESPONSIVE">
<Original>%1 is responsive</Original>
<English>%1 is responsive</English>
<Russian>%1 реагирует на раздражители</Russian>
<Spanish>%1 ha reaccionado</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_REPONSE_UNRESPONSIVE">
<Original>%1 is not responsive</Original>
<English>%1 is not responsive</English>
<Russian>%1 не реагирует</Russian>
<Spanish>%1 no reacciona</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_CHECK_REPONSE_YOU_CHECKED">
<Original>You checked %1</Original>
<English>You checked %1</English>
<Russian>Вы осмотрели раненого %1</Russian>
<Spanish>Examinas a %1</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGING">
<Original>Bandaging</Original>
<English>Bandaging</English>
<Russian>Перевязка...</Russian>
<Spanish>Vendando</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_BANDAGED">
<Original>Bandaged</Original>
<English>Bandaged</English>
<Russian>Повязка наложена</Russian>
<Spanish>Vendado</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_APPLY_BANDAGE">
<Original>You bandage %1 (%2)</Original>
<English>You bandage %1 (%2)</English>
<Russian>Вы перевязали раненого %1 (%2)</Russian>
<Spanish>Aplicas vendaje a %1 en %2</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_IS_BANDAGING_YOU">
<Original>%1 is bandaging you</Original>
<English>%1 is bandaging you</English>
<Russian>%1 перевязывает вас</Russian>
<Spanish>%1 te está vendando</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_START_STITCHING_INJURIES">
<Original>You start stitching injures from %1 (%2)</Original>
<English>You start stitching injures from %1 (%2)</English>
<Russian>Вы зашиваете ранения от %1 (%2)</Russian>
<Spanish>Estás suturando heridas de %1 en %2</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_STITCHING">
<Original>Stitching</Original>
<English>Stitching</English>
<Russian>Наложение швов</Russian>
<Spanish>Suturando</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_YOU_TREAT_AIRWAY">
<Original>You treat the airway of %1</Original>
<English>You treat the airway of %1</English>
<Russian>Вы интубируете раненого %1</Russian>
<Spanish>Estás intubando a %1</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_AIRWAY">
<Original>Airway</Original>
<English>Airway</English>
<Russian>Дыхательные пути</Russian>
<Spanish>Vías Aéreas</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_IS_TREATING_YOUR_AIRWAY">
<Original>%1 is treating your airway</Original>
<English>%1 is treating your airway</English>
<Russian>%1 проводит вам интубацию</Russian>
<Spanish>%1 te está intubando</Spanish>
</Key>
</Container>
</Package>
</Project>
</Project>

View File

@ -21,7 +21,7 @@
["ACE3", QGVAR(climb), localize "STR_ACE_Movement_Climb",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (ACE_player != (vehicle ACE_player)) exitWith {false};

View File

@ -10,7 +10,7 @@ if (!hasInterface) exitWith {};
["ACE3", QGVAR(showNameTags), localize "STR_ACE_NameTags_ShowNames",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
GVAR(ShowNamesTime) = time;

View File

@ -40,7 +40,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
["ACE3", QGVAR(IncreaseNVGBrightness), localize "STR_ACE_NightVision_IncreaseNVGBrightness",
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if ((currentVisionMode _player != 1)) exitWith {false};
@ -54,7 +54,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
["ACE3", QGVAR(DecreaseNVGBrightness), localize "STR_ACE_NightVision_DecreaseNVGBrightness",
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if ((currentVisionMode _player != 1)) exitWith {false};

View File

@ -7,7 +7,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(unjamWeapon), localize "STR_ACE_Overheating_UnjamWeapon",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
{currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}

View File

@ -19,7 +19,7 @@ if (!hasInterface) exitWith {};
["ACE3", QGVAR(showAltimeter), localize "STR_ACE_Parachute_showAltimeter",
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false};
if (!(missionNamespace getVariable [QGVAR(AltimeterActive), false])) then {
[ace_player] call FUNC(showAltimeter);

View File

@ -7,7 +7,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(checkAmmo), localize "STR_ACE_Reload_checkAmmo",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon) ||
{(vehicle ACE_player) isKindOf 'StaticWeapon'}) exitWith {false};

View File

@ -31,6 +31,10 @@ if (count _this > 1) then {
};
};
_unit playActionNow "Gear";
if (_unit == _target) then {
_unit playActionNow "Gear";
} else {
_unit playActionNow "PutDown";
};
[FUNC(displayAmmo), [_target], 1, 0.1] call EFUNC(common,waitAndExecute);

View File

@ -7,7 +7,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(RestWeapon), localize "STR_ACE_Resting_RestWeapon",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
{inputAction 'reloadMagazine' == 0} &&

View File

@ -9,7 +9,7 @@
["ACE3", QGVAR(safeMode), localize "STR_ACE_SafeMode_SafeMode",
{
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};

View File

@ -36,7 +36,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(AdjustUp), localize "STR_ACE_Scopes_AdjustUp",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
[ACE_player] call FUNC(inventoryCheck);
if !([ACE_player, 0, 0.1] call FUNC(canAdjustScope)) exitWith {false};
@ -51,7 +51,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(AdjustDown), localize "STR_ACE_Scopes_AdjustDown",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
[ACE_player] call FUNC(inventoryCheck);
if !([ACE_player, 0, -0.1] call FUNC(canAdjustScope)) exitWith {false};
@ -66,7 +66,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(AdjustLeft), localize "STR_ACE_Scopes_AdjustLeft",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
[ACE_player] call FUNC(inventoryCheck);
if !([ACE_player, -0.1, 0] call FUNC(canAdjustScope)) exitWith {false};
@ -81,7 +81,7 @@ if !(hasInterface) exitWith {};
["ACE3", QGVAR(AdjustRight), localize "STR_ACE_Scopes_AdjustRight",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
[ACE_player] call FUNC(inventoryCheck);
if !([ACE_player, 0.1, 0] call FUNC(canAdjustScope)) exitWith {false};

View File

@ -3,7 +3,7 @@
["ACE3", QGVAR(AzimuthKey), localize "STR_ACE_Vector_AzimuthKey",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(currentWeapon ACE_player == "ACE_Vector" && {ACE_player == cameraOn} && {cameraView == "GUNNER"}) exitWith {false};
@ -20,7 +20,7 @@
GVAR(isDownStateKey1) = false;
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
["azimuth"] call FUNC(onKeyUp);
@ -32,7 +32,7 @@
["ACE3", QGVAR(DistanceKey), localize "STR_ACE_Vector_DistanceKey",
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(currentWeapon ACE_player == "ACE_Vector" && {ACE_player == cameraOn} && {cameraView == "GUNNER"}) exitWith {false};
@ -49,7 +49,7 @@
GVAR(isDownStateKey2) = false;
// Conditions: canInteract
if !([ACE_player, objNull, []] call EGVAR(common,canInteractWith)) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
["distance"] call FUNC(onKeyUp);

View File

@ -3,3 +3,15 @@ class Extended_PreInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_InventoryOpened_EventHandlers {
class CAManBase {
class ADDON {
clientInventoryOpened = QUOTE(_this call FUNC(onOpenInventory););
};
};
};

View File

@ -1,9 +1,10 @@
class CfgMagazines {
class CA_Magazine;
class ACE_key_customKeyMagazine: CA_Magazine {
picture = QUOTE(PATHTOF(ui\keyBlack.paa));
displayName = "ACE Vehicle Key"; //!!!CANNONT be localized!!!, because it is used as part of the magazineDetail string
descriptionShort = "$STR_ACE_Vehicle_Item_Custom_Description";
count = 1;
};
class CA_Magazine;
class ACE_key_customKeyMagazine: CA_Magazine {
picture = QUOTE(PATHTOF(ui\keyBlack.paa));
displayName = "ACE Vehicle Key"; //!!!CANNOT be localized!!!: because it is used as part of the magazineDetail string
descriptionShort = "$STR_ACE_Vehicle_Item_Custom_Description";
count = 1;
mass = 0;
};
};

View File

@ -1,102 +1,107 @@
#define MACRO_LOCK_ACTIONS \
class ACE_MainActions { \
class ACE_unlockVehicle { \
displayName = "$STR_ACE_Vehicle_Action_UnLock"; \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
statement = QUOTE([ARR_3('SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
showDisabled = 0; \
priority = 0.3; \
icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \
}; \
class ACE_lockVehicle { \
displayName = "$STR_ACE_Vehicle_Action_Lock"; \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
statement = QUOTE([ARR_3('SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
showDisabled = 0; \
priority = 0.2; \
icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \
}; \
class ACE_lockpickVehicle { \
displayName = "$STR_ACE_Vehicle_Action_Lockpick"; \
distance = 4; \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
showDisabled = 0; \
priority = 0.1; \
}; \
};
class ACE_MainActions { \
class ACE_unlockVehicle { \
displayName = "$STR_ACE_Vehicle_Action_UnLock"; \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
showDisabled = 0; \
priority = 0.3; \
icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \
}; \
class ACE_lockVehicle { \
displayName = "$STR_ACE_Vehicle_Action_Lock"; \
distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
showDisabled = 0; \
priority = 0.2; \
icon = QUOTE(PATHTOF(ui\key_menuIcon_ca.paa)); \
}; \
class ACE_lockpickVehicle { \
displayName = "$STR_ACE_Vehicle_Action_Lockpick"; \
distance = 4; \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
showDisabled = 0; \
priority = 0.1; \
}; \
};
class CfgVehicles {
class LandVehicle;
class Car: LandVehicle {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Tank: LandVehicle {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Air;
class Helicopter: Air {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {};
class ModuleDescription {};
};
class ACE_VehicleLock_ModuleSetup: Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Vehicle Lock Setup";
function = "ACE_VehicleLock_fnc_moduleInit";
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(ui\IconLock_ca.paa));
functionPriority = 0;
class Arguments {
class SetLockState {
displayName = "Set Lock State"; // Argument label
description = "Set lock state for all vehicles on map at start"; // Tooltip description
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
class values {
class None {name = "As Is"; value = 0; default = 1;};
class Side {name = "Locked"; value = 1;};
class Unique {name = "Unlocked"; value = 2;};
class LandVehicle;
class Car: LandVehicle {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class LockpickStrength {
displayName = "Global Lockpick Strength";
description = "Global Time to lockpick (in seconds). Default: 10";
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
defaultValue = "10"; // Default text filled in the input box
};
};
class ModuleDescription: ModuleDescription {
description = "Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br/>Source: vehiclelock.pbo";
class Tank: LandVehicle {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
class Air;
class Helicopter: Air {
class ACE_Actions {
MACRO_LOCK_ACTIONS
};
};
};
class ACE_VehicleLock_ModuleSyncedAssign: Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Vehicle Key Assign";
function = "ACE_VehicleLock_fnc_moduleSync";
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(ui\IconLock_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = "Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start.<br/>Source: vehiclelock.pbo";
sync[] = {"AnyPlayer", "AnyVehicle"};
class Logic;
class Module_F: Logic {
class ModuleDescription {};
};
class ACE_VehicleLock_ModuleSetup: Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Vehicle Lock Setup";
function = QUOTE(DFUNC(moduleInit));
scope = 2;
isGlobal = 0;
icon = QUOTE(PATHTOF(ui\IconLock_ca.paa));
functionPriority = 0;
class Arguments {
class LockVehicleInventory {
displayName = "Lock Vehicle Inventory";
description = "Locks the inventory of locked vehicles";
typeName = "BOOL";
defaultValue = 0;
};
class SetLockState {
displayName = "Set Lock State"; // Argument label
description = "Set lock state for all vehicles on map at start"; // Tooltip description
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
class values {
class None {name = "As Is"; value = 0; default = 1;};
class Side {name = "Locked"; value = 1;};
class Unique {name = "Unlocked"; value = 2;};
};
};
class DefaultLockpickStrength {
displayName = "Default Lockpick Strength";
description = "Default Time to lockpick (in seconds). Default: 10";
typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
defaultValue = "10"; // Default text filled in the input box
};
};
class ModuleDescription: ModuleDescription {
description = "Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br/>Source: vehiclelock.pbo";
};
};
class ACE_VehicleLock_ModuleSyncedAssign: Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Vehicle Key Assign";
function = QUOTE(DFUNC(moduleSync));
scope = 2;
isGlobal = 0;
icon = QUOTE(PATHTOF(ui\IconLock_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = "Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start.<br/>Source: vehiclelock.pbo";
sync[] = {"AnyPlayer", "AnyVehicle"};
};
};
};
};

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