mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3
This commit is contained in:
commit
e3e17d8fcb
@ -40,7 +40,6 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
|
||||
// Listens for the falling unconscious event, just in case the menu needs to be closed
|
||||
["medical_onUnconscious", {
|
||||
diag_log ["im_onUn 1:",_this];
|
||||
// If no menu is open just quit
|
||||
if (GVAR(openedMenuType) < 0) exitWith {};
|
||||
|
||||
@ -50,5 +49,4 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
|
||||
GVAR(actionSelected) = false;
|
||||
[] call FUNC(keyUp);
|
||||
diag_log ["im_onUn 2:",_this];
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
|
||||
|
||||
diag_log "addPassengerActions";
|
||||
|
||||
private ["_unit","_actions"];
|
||||
_unit = _parameters select 0;
|
||||
|
||||
|
@ -13,10 +13,12 @@ if (_target != ACE_player) exitWith {
|
||||
|
||||
addCamShake [4, 0.5, 5];
|
||||
|
||||
private "_message";
|
||||
//localize is converting the escaped <> symbols, so just add them here instead of in the stringtable
|
||||
if (_shoulderNum == 0) then {
|
||||
_message = localize "STR_ACE_Interaction_YouWereTappedRight";
|
||||
_message = format ["%1 >", (localize "STR_ACE_Interaction_YouWereTappedRight")];
|
||||
} else {
|
||||
_message = localize "STR_ACE_Interaction_YouWereTappedLeft";
|
||||
_message = format ["< %1", (localize "STR_ACE_Interaction_YouWereTappedLeft")];
|
||||
};
|
||||
|
||||
[_message] call EFUNC(common,displayTextStructured);
|
||||
[parseText _message] call EFUNC(common,displayTextStructured);
|
||||
|
@ -363,28 +363,28 @@
|
||||
<Italian>Dai un colpetto</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_YouWereTappedRight">
|
||||
<English>You were tapped on the RIGHT shoulder ></English>
|
||||
<Spanish>Te tocaron el hombro DERECHO ></Spanish>
|
||||
<German>Dir wurde auf die Schulter geklopft ></German>
|
||||
<French>On te tape sur l'épaule ></French>
|
||||
<Polish>Zostałeś klepnięty po ramieniu ></Polish>
|
||||
<Hungarian>Vállonveregettek ></Hungarian>
|
||||
<Czech>Někdo tě poklepal na rameno ></Czech>
|
||||
<Russian>Вас похлопали по плечу ></Russian>
|
||||
<Portuguese>Você foi tocado no ombro ></Portuguese>
|
||||
<Italian>Ti è stato dato un colpetto sulla spalla ></Italian>
|
||||
<English>You were tapped on the RIGHT shoulder</English>
|
||||
<Spanish>Te tocaron el hombro DERECHO</Spanish>
|
||||
<German>Dir wurde auf die Schulter geklopft</German>
|
||||
<French>On te tape sur l'épaule</French>
|
||||
<Polish>Zostałeś klepnięty po ramieniu</Polish>
|
||||
<Hungarian>Vállonveregettek</Hungarian>
|
||||
<Czech>Někdo tě poklepal na rameno</Czech>
|
||||
<Russian>Вас похлопали по плечу</Russian>
|
||||
<Portuguese>Você foi tocado no ombro</Portuguese>
|
||||
<Italian>Ti è stato dato un colpetto sulla spalla</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_YouWereTappedLeft">
|
||||
<English>< You were tapped on the LEFT shoulder.</English>
|
||||
<Spanish>< Te tocaron el hombro IZQUIERDO.</Spanish>
|
||||
<German>< Dir wurde auf die Schulter geklopft</German>
|
||||
<French>< On te tape sur l'épaule.</French>
|
||||
<Polish>< Zostałeś klepnięty po ramieniu</Polish>
|
||||
<Hungarian>< Vállonveregettek</Hungarian>
|
||||
<Czech>< Někdo tě poklepal na rameno.</Czech>
|
||||
<Russian>< Вас похлопали по плечу</Russian>
|
||||
<Portuguese>< Você foi tocado no ombro.</Portuguese>
|
||||
<Italian>< Ti è stato dato un colpetto sulla spalla</Italian>
|
||||
<English>You were tapped on the LEFT shoulder.</English>
|
||||
<Spanish>Te tocaron el hombro IZQUIERDO.</Spanish>
|
||||
<German>Dir wurde auf die Schulter geklopft</German>
|
||||
<French>On te tape sur l'épaule.</French>
|
||||
<Polish>Zostałeś klepnięty po ramieniu</Polish>
|
||||
<Hungarian>Vállonveregettek</Hungarian>
|
||||
<Czech>Někdo tě poklepal na rameno.</Czech>
|
||||
<Russian>Вас похлопали по плечу</Russian>
|
||||
<Portuguese>Você foi tocado no ombro.</Portuguese>
|
||||
<Italian>Ti è stato dato un colpetto sulla spalla</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Interaction_CancelSelection">
|
||||
<English>Cancel</English>
|
||||
|
@ -6,11 +6,9 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_MagazineRepack_RepackMagazines";
|
||||
condition = QUOTE(true);
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([_player] call FUNC(openSelectMagazineUI));
|
||||
showDisabled = 0;
|
||||
insertChildren = QUOTE(_this call FUNC(getMagazineChildren));
|
||||
priority = -2;
|
||||
icon = QUOTE(PATHTOF(UI\repack_ca.paa));
|
||||
hotkey = "R";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(getMagazineChildren);
|
||||
PREP(magazineRepackFinish);
|
||||
PREP(magazineRepackProgress);
|
||||
PREP(openSelectMagazineUI);
|
||||
PREP(simulateRepackEvents);
|
||||
PREP(startRepackingMagazine);
|
||||
|
||||
|
@ -17,12 +17,19 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_Settings {
|
||||
//Time to move a round from one magazine to another
|
||||
class GVAR(TimePerAmmo) {
|
||||
value = 1.5;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
//Time to swap between magazines when repacking
|
||||
class GVAR(TimePerMagazine) {
|
||||
value = 2.0;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
//Time to relink 2 belts together
|
||||
class GVAR(TimePerBeltLink) {
|
||||
value = 8.0;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
};
|
||||
|
54
addons/magazinerepack/functions/fnc_getMagazineChildren.sqf
Normal file
54
addons/magazinerepack/functions/fnc_getMagazineChildren.sqf
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Author: PabstMirror,commy2, esteldunedain, Ruthberg
|
||||
* Gets magazine children for interaciton menu
|
||||
*
|
||||
* Argument:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return value:
|
||||
* ChildActiosn<ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [player, player] call ace_magazinerepack_fnc_getMagazineChildren
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unitMagazines", "_unitMagCounts", "_xFullMagazineCount", "_index", "_actions", "_displayName", "_picture", "_action"];
|
||||
|
||||
PARAMS_2(_target,_player);
|
||||
|
||||
// get all mags and ammo count
|
||||
_unitMagazines = [];
|
||||
_unitMagCounts = [];
|
||||
{
|
||||
EXPLODE_4_PVT(_x,_xClassname,_xCount,_xLoaded,_xType);
|
||||
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
|
||||
|
||||
//for every partial magazine, that is either in inventory or can be moved there
|
||||
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _magazineClassname}}) then {
|
||||
_index = _unitMagazines find _xClassname;
|
||||
if (_index == -1) then {
|
||||
_unitMagazines pushBack _xClassname;
|
||||
_unitMagCounts pushBack [_xCount];
|
||||
} else {
|
||||
(_unitMagCounts select _index) pushBack _xCount;
|
||||
};
|
||||
};
|
||||
} forEach (magazinesAmmoFull _player);
|
||||
|
||||
//Create the action children for all appropriate magazines
|
||||
_actions = [];
|
||||
{
|
||||
if ((count (_unitMagCounts select _forEachIndex)) >= 2) then {// Ignore invalid magazines types (need 2+ partial mags to do anything)
|
||||
_displayName = getText (configFile >> "CfgMagazines" >> _x >> "displayName");
|
||||
_picture = getText (configFile >> "CfgMagazines" >> _x >> "picture");
|
||||
|
||||
_action = [_x, _displayName, _picture, {_this call FUNC(startRepackingMagazine)}, {true}, {}, _x] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _player];
|
||||
};
|
||||
} forEach _unitMagazines;
|
||||
|
||||
_actions
|
@ -19,13 +19,16 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_fullMagazineCount"];
|
||||
|
||||
PARAMS_4(_args,_elapsedTime,_totalTime,_errorCode);
|
||||
EXPLODE_2_PVT(_args,_magazineClassname,_lastAmmoCount);
|
||||
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
|
||||
|
||||
_structuredOutputText =
|
||||
//Don't show anything if player can't interact:
|
||||
if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
|
||||
|
||||
if (_errorCode == 0) then {
|
||||
_structuredOutputText = if (_errorCode == 0) then {
|
||||
format ["<t align='center'>%1</t><br/>", (localize "STR_ACE_MagazineRepack_RepackComplete")];
|
||||
} else {
|
||||
format ["<t align='center'>%1</t><br/>", (localize "STR_ACE_MagazineRepack_RepackInterrupted")];
|
||||
@ -34,19 +37,20 @@ if (_errorCode == 0) then {
|
||||
_picture = getText (configFile >> "CfgMagazines" >> _magazineClassname >> "picture");
|
||||
_structuredOutputText = _structuredOutputText + format ["<img align='center' size='1.8' color='#ffffff' image='%1'/> <br/>", _picture];
|
||||
|
||||
_fullMags = 0;
|
||||
_partialMags = 0;
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_xClassname,_xCount);
|
||||
if ((_xClassname == _magazineClassname) && {_xCount > 0}) then {
|
||||
if (_xCount == _fullMagazineCount) then {
|
||||
_fullMags = _fullMags + 1;
|
||||
} else {
|
||||
_partialMags = _partialMags + 1;
|
||||
};
|
||||
};
|
||||
} forEach (magazinesAmmoFull ACE_player);
|
||||
//EFUNC(common,displayTextStructured) doesn't have room for this, and I don't think it's nessacary, can fix in the future if wanted:
|
||||
|
||||
_structuredOutputText = _structuredOutputText + format [("<t align='center'>" + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + "</t>"), _fullMags, _partialMags];
|
||||
// _fullMags = 0;
|
||||
// _partialMags = 0;
|
||||
// {
|
||||
// EXPLODE_2_PVT(_x,_xClassname,_xCount);
|
||||
// if ((_xClassname == _magazineClassname) && {_xCount > 0}) then {
|
||||
// if (_xCount == _fullMagazineCount) then {
|
||||
// _fullMags = _fullMags + 1;
|
||||
// } else {
|
||||
// _partialMags = _partialMags + 1;
|
||||
// };
|
||||
// };
|
||||
// } forEach (magazinesAmmoFull ACE_player);
|
||||
// _structuredOutputText = _structuredOutputText + format [("<t align='center'>" + (localize "STR_ACE_MagazineRepack_RepackedMagazinesCount") + "</t>"), _fullMags, _partialMags];
|
||||
|
||||
[parseText _structuredOutputText] call EFUNC(common,displayTextStructured);
|
||||
|
@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg)
|
||||
* Opens the selectMenu UI to chose which magazine to repack.
|
||||
* Only shows classnames that have 2+ partial magazines
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit (player) <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [_player] call ace_magazinerepack_fnc_openSelectMagazineUI
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unitMagazines", "_unitMagCounts", "_xFullMagazineCount", "_index", "_actions", "_displayName", "_picture"];
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_unitMagazines = [];
|
||||
_unitMagCounts = [];
|
||||
|
||||
// get all mags and ammo count
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_xClassname,_xCount);
|
||||
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
|
||||
|
||||
if ((_xCount != _xFullMagazineCount) && {_xCount > 0}) then {//for every partial magazine
|
||||
_index = _unitMagazines find _xClassname;
|
||||
if (_index == -1) then {
|
||||
_unitMagazines pushBack _xClassname;
|
||||
_unitMagCounts pushBack [_xCount];
|
||||
} else {
|
||||
(_unitMagCounts select _index) pushBack _xCount;
|
||||
};
|
||||
};
|
||||
} forEach (magazinesAmmoFull _unit);
|
||||
|
||||
_actions = [localize "STR_ACE_MagazineRepack_SelectMagazineMenu", localize "STR_ACE_MagazineRepack_SelectMagazine"] call EFUNC(interaction,prepareSelectMenu);
|
||||
|
||||
{
|
||||
if ((count (_unitMagCounts select _forEachIndex)) >= 2) then {// Ignore invalid magazines types (need 2+ partial mags to do anything)
|
||||
_displayName = getText (configFile >> "CfgMagazines" >> _x >> "displayName");
|
||||
_picture = getText (configFile >> "CfgMagazines" >> _x >> "picture");
|
||||
_actions = [_actions, _displayName, _picture, _x] call EFUNC(interaction,addSelectableItem);
|
||||
};
|
||||
} forEach _unitMagazines;
|
||||
|
||||
[
|
||||
_actions,
|
||||
{ [_this] call FUNC(startRepackingMagazine); },
|
||||
{
|
||||
call EFUNC(interaction,hideMenu); //ToDo: Self Interaction Integration
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
@ -6,12 +6,13 @@
|
||||
* Arguments:
|
||||
* 0: How many rounds in a full magazine <NUMBER>
|
||||
* 1: Array of rounds in magazines <ARRAY>
|
||||
* 2: Magazine is a belt <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Array in format [time, isBullet, array of ammo counts] <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [5, [1,2,3,8]] call ace_magazinerepack_fnc_simulateRepackEvents =
|
||||
* [10, [1,2,3,8], false] call ace_magazinerepack_fnc_simulateRepackEvents =
|
||||
* [[1.5,true,[0,2,3,9]],[3.5,false,[0,2,3,9]],[5,true,[0,1,3,10]],[7,false,[0,1,3,10]],[8.5,true,[0,0,4,10]],[10.5,false,[0,0,4,10]]]
|
||||
*
|
||||
* Public: No
|
||||
@ -20,7 +21,7 @@
|
||||
|
||||
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded"];
|
||||
|
||||
PARAMS_2(_fullMagazineCount,_arrayOfAmmoCounts);
|
||||
PARAMS_3(_fullMagazineCount,_arrayOfAmmoCounts,_isBelt);
|
||||
|
||||
// Sort Ascending - Don't modify original
|
||||
_arrayOfAmmoCounts = (+_arrayOfAmmoCounts) call BIS_fnc_sortNum;
|
||||
@ -29,13 +30,23 @@ _newMagFnc = {
|
||||
_time = _time + GVAR(TimePerMagazine);
|
||||
_events pushBack [_time, false, +_arrayOfAmmoCounts];
|
||||
};
|
||||
_swapAmmoFnc = {
|
||||
for "_swapProgress" from 0 to (_ammoSwaped - 1) do {
|
||||
_time = _time + GVAR(TimePerAmmo);
|
||||
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - 1)];
|
||||
_arrayOfAmmoCounts set [_highIndex, ((_arrayOfAmmoCounts select _highIndex) + 1)];
|
||||
|
||||
_swapAmmoFnc = if (_isBelt) then {
|
||||
{
|
||||
_time = _time + GVAR(TimePerBeltLink);
|
||||
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - _ammoSwaped)];
|
||||
_arrayOfAmmoCounts set [_highIndex, ((_arrayOfAmmoCounts select _highIndex) + _ammoSwaped)];
|
||||
_events pushBack [_time, true, +_arrayOfAmmoCounts];
|
||||
};
|
||||
}
|
||||
} else {
|
||||
{
|
||||
for "_swapProgress" from 0 to (_ammoSwaped - 1) do {
|
||||
_time = _time + GVAR(TimePerAmmo);
|
||||
_arrayOfAmmoCounts set [_lowIndex, ((_arrayOfAmmoCounts select _lowIndex) - 1)];
|
||||
_arrayOfAmmoCounts set [_highIndex, ((_arrayOfAmmoCounts select _highIndex) + 1)];
|
||||
_events pushBack [_time, true, +_arrayOfAmmoCounts];
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
_lowIndex = 0;
|
||||
|
@ -5,7 +5,9 @@
|
||||
* Precalcs all the event timings and starts the progressBar.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Magazine Classname <STRING>
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
* 2: Magazine Classname <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
@ -17,18 +19,21 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_fullMagazineCount", "_startingAmmoCounts", "_simEvents", "_totalTime"];
|
||||
private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts", "_simEvents", "_totalTime"];
|
||||
|
||||
PARAMS_3(_target,_player,_magazineClassname);
|
||||
|
||||
PARAMS_1(_magazineClassname);
|
||||
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
|
||||
|
||||
_unit = ACE_player;
|
||||
|
||||
[ACE_player] call EFUNC(common,goKneeling);
|
||||
call EFUNC(interaction,hideMenu);//ToDo: Self Interaction Integration
|
||||
|
||||
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname;
|
||||
// Calculate actual ammo to transfer during repack
|
||||
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
|
||||
_fullMagazineCount = getNumber (_magazineCfg >> "count");
|
||||
//Is linked belt magazine:
|
||||
_isBelt = (isNumber (_magazineCfg >> "ACE_isBelt")) && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1};
|
||||
|
||||
//Check canInteractWith:
|
||||
if (!([_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
|
||||
|
||||
[_player] call EFUNC(common,goKneeling);
|
||||
|
||||
_startingAmmoCounts = [];
|
||||
{
|
||||
@ -36,25 +41,25 @@ _startingAmmoCounts = [];
|
||||
if ((_xClassname == _magazineClassname) && {(_xCount != _fullMagazineCount) && {_xCount > 0}}) then {
|
||||
if (_xLoaded) then {
|
||||
//Try to Remove from weapon and add to inventory, otherwise ignore
|
||||
if (_unit canAdd _magazineClassname) then {
|
||||
if (_player canAdd _magazineClassname) then {
|
||||
switch (_xType) do {
|
||||
case (1): {_unit removePrimaryWeaponItem _magazineClassname;};
|
||||
case (2): {_unit removeHandgunItem _magazineClassname;};
|
||||
case (4): {_unit removeSecondaryWeaponItem _magazineClassname;};
|
||||
case (1): {_player removePrimaryWeaponItem _magazineClassname;};
|
||||
case (2): {_player removeHandgunItem _magazineClassname;};
|
||||
case (4): {_player removeSecondaryWeaponItem _magazineClassname;};
|
||||
default {ERROR("Loaded Location Invalid");};
|
||||
};
|
||||
_unit addMagazine [_magazineClassname, _xCount];
|
||||
_player addMagazine [_magazineClassname, _xCount];
|
||||
_startingAmmoCounts pushBack _xCount;
|
||||
};
|
||||
} else {
|
||||
_startingAmmoCounts pushBack _xCount;
|
||||
};
|
||||
};
|
||||
} forEach (magazinesAmmoFull _unit);
|
||||
} forEach (magazinesAmmoFull _player);
|
||||
|
||||
if ((count _startingAmmoCounts) < 2) exitwith {ERROR("Not Enough Mags to Repack");};
|
||||
|
||||
_simEvents = [_fullMagazineCount, _startingAmmoCounts] call FUNC(simulateRepackEvents);
|
||||
_simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simulateRepackEvents);
|
||||
_totalTime = (_simEvents select ((count _simEvents) - 1) select 0);
|
||||
|
||||
[
|
||||
@ -63,5 +68,6 @@ _totalTime,
|
||||
{_this call FUNC(magazineRepackFinish)},
|
||||
{_this call FUNC(magazineRepackFinish)},
|
||||
(localize "STR_ACE_MagazineRepack_RepackingMagazine"),
|
||||
{_this call FUNC(magazineRepackProgress)}
|
||||
{_this call FUNC(magazineRepackProgress)},
|
||||
["isNotInside"]
|
||||
] call EFUNC(common,progressBar);
|
||||
|
760
addons/medical/ACE_Medical_Actions.hpp
Normal file
760
addons/medical/ACE_Medical_Actions.hpp
Normal file
@ -0,0 +1,760 @@
|
||||
class ACE_Head {
|
||||
displayName = "$STR_ACE_Interaction_Head";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
distance = MEDICAL_ACTION_DISTANCE;
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitHead";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class CheckResponse: CheckPulse {
|
||||
displayName = "Check Response";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckResponse')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
};
|
||||
class ACE_Torso {
|
||||
displayName = "$STR_ACE_Interaction_Torso";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
distance = MEDICAL_ACTION_DISTANCE;
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitBody";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
enableInside = 1;
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PlaceInBodyBag {
|
||||
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'BodyBag')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'BodyBag')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
enableInside = 1;
|
||||
};
|
||||
class TriageCard {
|
||||
displayName = "Triage Card";
|
||||
distance = 2.0;
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
enableInside = 1;
|
||||
icon = PATHTOF(UI\icons\triageCard.paa);
|
||||
};
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
enableInside = 1;
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class SurgicalKit: fieldDressing {
|
||||
displayName = "Use Surgical Kit";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\surgicalKit.paa);
|
||||
};
|
||||
class PersonalAidKit: fieldDressing {
|
||||
displayName = "Use Personal Aid Kit";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'PersonalAidKit')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = "";
|
||||
};
|
||||
class CPR: fieldDressing {
|
||||
displayName = "CPR";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'CPR')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = "";
|
||||
};
|
||||
};
|
||||
class ACE_ArmLeft {
|
||||
displayName = "$STR_ACE_Interaction_ArmLeft";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
distance = MEDICAL_ACTION_DISTANCE;
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitLeftArm";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class BloodIV: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\iv.paa);
|
||||
};
|
||||
class BloodIV_500: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV_250: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_500: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_250: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_500: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_250: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
};
|
||||
class ACE_ArmRight {
|
||||
displayName = "$STR_ACE_Interaction_ArmRight";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
distance = MEDICAL_ACTION_DISTANCE;
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitRightArm";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\iv.paa);
|
||||
};
|
||||
class BloodIV_500: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV_250: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_500: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_250: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_500: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_250: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
|
||||
};
|
||||
class ACE_LegLeft {
|
||||
displayName = "$STR_ACE_Interaction_LegLeft";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
distance = MEDICAL_ACTION_DISTANCE;
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\iv.paa);
|
||||
};
|
||||
class BloodIV_500: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV_250: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_500: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_250: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_500: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_250: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
};
|
||||
class ACE_LegRight {
|
||||
displayName = "$STR_ACE_Interaction_LegRight";
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
distance = MEDICAL_ACTION_DISTANCE;
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitRightLeg";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
icon = PATHTOF(UI\icons\iv.paa);
|
||||
};
|
||||
class BloodIV_500: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class BloodIV_250: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Blood4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_500: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class PlasmaIV_250: PlasmaIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Plasma4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV: BloodIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_1000";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_500: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_500";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class SalineIV_250: SalineIV {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Saline4_250";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
EXCEPTIONS
|
||||
};
|
||||
};
|
509
addons/medical/ACE_Medical_SelfActions.hpp
Normal file
509
addons/medical/ACE_Medical_SelfActions.hpp
Normal file
@ -0,0 +1,509 @@
|
||||
class Medical {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Medical";
|
||||
runOnHover = 1;
|
||||
hotkey = "M";
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class ACE_Head {
|
||||
displayName = "$STR_ACE_Interaction_Head";
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitHead";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_Torso {
|
||||
displayName = "$STR_ACE_Interaction_Torso";
|
||||
distance = 5.0;
|
||||
condition = "true";
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitBody";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
class TriageCard {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_TriageCard";
|
||||
distance = 2.0;
|
||||
condition = "true";
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\triageCard.paa);
|
||||
};
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
};
|
||||
class ACE_ArmLeft {
|
||||
displayName = "$STR_ACE_Interaction_ArmLeft";
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitLeftArm";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_ArmRight {
|
||||
displayName = "$STR_ACE_Interaction_ArmRight";
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitRightArm";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment));
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment));
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
|
||||
};
|
||||
class CheckPulse: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckPulse";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
|
||||
icon = "";
|
||||
};
|
||||
class CheckBloodPressure: CheckPulse {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_CheckBloodPressure";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment));
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_LegLeft {
|
||||
displayName = "$STR_ACE_Interaction_LegLeft";
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment));
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment));
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
class ACE_LegRight {
|
||||
displayName = "$STR_ACE_Interaction_LegRight";
|
||||
runOnHover = 1;
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||
|
||||
class Bandage {
|
||||
displayName = "$STR_ACE_Medical_Bandage_HitRightLeg";
|
||||
distance = 2.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "B";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
|
||||
|
||||
// Advanced medical
|
||||
class FieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_FieldDressing";
|
||||
distance = 5.0;
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
hotkey = "";
|
||||
icon = PATHTOF(UI\icons\bandage.paa);
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_PackingBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\packingBandage.paa);
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_ElasticBandage";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment));
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_QuikClot";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment));
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_Tourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\tourniquet.paa);
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
|
||||
icon = PATHTOF(UI\icons\autoInjector.paa);
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
|
||||
};
|
||||
class RemoveTourniquet: Tourniquet {
|
||||
displayName = "$STR_ACE_MEDICAL_ACTIONS_RemoveTourniquet";
|
||||
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
|
||||
exceptions[] = {"isNotInside"};
|
||||
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
|
||||
};
|
||||
};
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,9 @@ _usersOfItems = _args select 5;
|
||||
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
||||
_caller removeWeapon "ACE_FakePrimaryWeapon";
|
||||
};
|
||||
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
||||
if (vehicle _caller == _caller) then {
|
||||
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
||||
|
||||
{
|
||||
|
@ -27,7 +27,9 @@ _className = _args select 3;
|
||||
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
||||
_caller removeWeapon "ACE_FakePrimaryWeapon";
|
||||
};
|
||||
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
||||
if (vehicle _caller == _caller) then {
|
||||
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
||||
|
||||
// Record specific callback
|
||||
|
@ -1,12 +1,11 @@
|
||||
class CfgMagazines {
|
||||
class CA_Magazine;
|
||||
class 150Rnd_762x51_Box : CA_Magazine {
|
||||
ACE_isBelt = 1;
|
||||
};
|
||||
|
||||
class CA_Magazine;
|
||||
class 150Rnd_762x51_Box : CA_Magazine {
|
||||
ACE_isBelt = 1;
|
||||
};
|
||||
|
||||
class 100Rnd_65x39_caseless_mag;
|
||||
class 200Rnd_65x39_cased_Box : 100Rnd_65x39_caseless_mag {
|
||||
ACE_isBelt = 1;
|
||||
};
|
||||
};
|
||||
class 100Rnd_65x39_caseless_mag;
|
||||
class 200Rnd_65x39_cased_Box : 100Rnd_65x39_caseless_mag {
|
||||
ACE_isBelt = 1;
|
||||
};
|
||||
};
|
||||
|
1266
tools/cba/addons/main/script_macros_common.hpp
Normal file
1266
tools/cba/addons/main/script_macros_common.hpp
Normal file
File diff suppressed because it is too large
Load Diff
99
tools/cba/addons/xeh/script_xeh.hpp
Normal file
99
tools/cba/addons/xeh/script_xeh.hpp
Normal file
@ -0,0 +1,99 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// MACRO: EXTENDED_EVENTHANDLERS
|
||||
// XEH uses all existing event handlers
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#define EXTENDED_EVENTHANDLERS init = QUOTE(if(isNil'SLX_XEH_MACHINE')then{call compile preProcessFileLineNumbers '\x\cba\addons\xeh\init_pre.sqf'};_this call SLX_XEH_EH_Init); \
|
||||
fired = "_this call SLX_XEH_EH_Fired"; \
|
||||
animChanged = "_this call SLX_XEH_EH_AnimChanged"; \
|
||||
animDone = "_this call SLX_XEH_EH_AnimDone"; \
|
||||
animStateChanged = "_this call SLX_XEH_EH_AnimStateChanged"; \
|
||||
containerClosed = "_this call SLX_XEH_EH_ContainerClosed"; \
|
||||
containerOpened = "_this call SLX_XEH_EH_ContainerOpened"; \
|
||||
controlsShifted = "_this call SLX_XEH_EH_ControlsShifted"; \
|
||||
dammaged = "_this call SLX_XEH_EH_Dammaged"; \
|
||||
engine = "_this call SLX_XEH_EH_Engine"; \
|
||||
epeContact = "_this call SLX_XEH_EH_EpeContact"; \
|
||||
epeContactEnd = "_this call SLX_XEH_EH_EpeContactEnd"; \
|
||||
epeContactStart = "_this call SLX_XEH_EH_EpeContactStart"; \
|
||||
explosion = "_this call SLX_XEH_EH_Explosion"; \
|
||||
firedNear = "_this call SLX_XEH_EH_FiredNear"; \
|
||||
fuel = "_this call SLX_XEH_EH_Fuel"; \
|
||||
gear = "_this call SLX_XEH_EH_Gear"; \
|
||||
getIn = "_this call SLX_XEH_EH_GetIn"; \
|
||||
getOut = "_this call SLX_XEH_EH_GetOut"; \
|
||||
handleHeal = "_this call SLX_XEH_EH_HandleHeal"; \
|
||||
hit = "_this call SLX_XEH_EH_Hit"; \
|
||||
hitPart = "_this call SLX_XEH_EH_HitPart"; \
|
||||
incomingMissile = "_this call SLX_XEH_EH_IncomingMissile"; \
|
||||
inventoryClosed = "_this call SLX_XEH_EH_InventoryClosed"; \
|
||||
inventoryOpened = "_this call SLX_XEH_EH_InventoryOpened"; \
|
||||
killed = "_this call SLX_XEH_EH_Killed"; \
|
||||
landedTouchDown = "_this call SLX_XEH_EH_LandedTouchDown"; \
|
||||
landedStopped = "_this call SLX_XEH_EH_LandedStopped"; \
|
||||
local = "_this call SLX_XEH_EH_Local"; \
|
||||
respawn = "_this call SLX_XEH_EH_Respawn"; \
|
||||
put = "_this call SLX_XEH_EH_Put"; \
|
||||
take = "_this call SLX_XEH_EH_Take"; \
|
||||
soundPlayed = "_this call SLX_XEH_EH_SoundPlayed"; \
|
||||
weaponAssembled = "_this call SLX_XEH_EH_WeaponAssembled"; \
|
||||
weaponDisAssembled = "_this call SLX_XEH_EH_WeaponDisassembled";
|
||||
|
||||
//handleDamage = "_this call SLX_XEH_EH_HandleDamage"; \
|
||||
//mpHit = "_this call SLX_XEH_EH_MPHit"; \
|
||||
//mpKilled = "_this call SLX_XEH_EH_MPKilled"; \
|
||||
//mpRespawn = "_this call SLX_XEH_EH_MPRespawn";
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// MACRO: DELETE_EVENTHANDLERS
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// class DefaultEventhandlers;
|
||||
// class Car_F;
|
||||
// class MRAP_01_base_F: Car_F {
|
||||
// class EventHandlers;
|
||||
// };
|
||||
// class B_MRAP_01_F: MRAP_01_base_F {
|
||||
// class Eventhandlers: EventHandlers {
|
||||
// DELETE_EVENTHANDLERS
|
||||
// };
|
||||
// };
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define DELETE_EVENTHANDLERS delete init; \
|
||||
delete fired; \
|
||||
delete animChanged; \
|
||||
delete animDone; \
|
||||
delete animStateChanged; \
|
||||
delete containerClosed; \
|
||||
delete containerOpened; \
|
||||
delete controlsShifted; \
|
||||
delete dammaged; \
|
||||
delete engine; \
|
||||
delete epeContact; \
|
||||
delete epeContactEnd; \
|
||||
delete epeContactStart; \
|
||||
delete explosion; \
|
||||
delete firedNear; \
|
||||
delete fuel; \
|
||||
delete gear; \
|
||||
delete getIn; \
|
||||
delete getOut; \
|
||||
delete handleHeal; \
|
||||
delete hit; \
|
||||
delete hitPart; \
|
||||
delete incomingMissile; \
|
||||
delete inventoryClosed; \
|
||||
delete inventoryOpened; \
|
||||
delete killed; \
|
||||
delete landedTouchDown; \
|
||||
delete landedStopped; \
|
||||
delete local; \
|
||||
delete respawn; \
|
||||
delete put; \
|
||||
delete take; \
|
||||
delete soundPlayed; \
|
||||
delete weaponAssembled; \
|
||||
delete weaponDisAssembled;
|
118
tools/setup.py
Normal file
118
tools/setup.py
Normal file
@ -0,0 +1,118 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
#######################
|
||||
# ACE3 Setup Script #
|
||||
#######################
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import platform
|
||||
import subprocess
|
||||
import winreg
|
||||
|
||||
|
||||
def main():
|
||||
print("""
|
||||
######################################
|
||||
# ACE3 Development Environment Setup #
|
||||
######################################
|
||||
|
||||
This script will create your ACE3 dev environment for you.
|
||||
|
||||
Before you run this, you should already have:
|
||||
- The Arma 3 Tools installed properly via Steam
|
||||
- A properly set up P-drive
|
||||
|
||||
If you have not done those things yet, please abort this script in the next step and do so first.
|
||||
|
||||
This script will create two hard links on your system, both pointing to your ACE3 project folder:
|
||||
[Arma 3 installation directory]\\z\\ace => ACE3 project folder
|
||||
P:\\z\\ace => ACE3 project folder
|
||||
|
||||
It will also copy the required CBA includes to P:\\x\\cba, if you do not have the CBA source code already.""")
|
||||
print("\n")
|
||||
|
||||
try:
|
||||
reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
|
||||
key = winreg.OpenKey(reg,
|
||||
r"SOFTWARE\Wow6432Node\bohemia interactive\arma 3")
|
||||
armapath = winreg.EnumValue(key,1)[1]
|
||||
except:
|
||||
print("Failed to determine Arma 3 Path.")
|
||||
return 1
|
||||
|
||||
if not os.path.exists("P:\\"):
|
||||
print("No P-drive detected.")
|
||||
return 2
|
||||
|
||||
scriptpath = os.path.realpath(__file__)
|
||||
projectpath = os.path.dirname(os.path.dirname(scriptpath))
|
||||
|
||||
print("# Detected Paths:")
|
||||
print(" Arma Path: {}".format(armapath))
|
||||
print(" Project Path: {}".format(projectpath))
|
||||
|
||||
repl = input("\nAre these correct? (y/n): ")
|
||||
if repl.lower() != "y":
|
||||
return 3
|
||||
|
||||
print("\n# Creating links ...")
|
||||
|
||||
if os.path.exists("P:\\z\\ace"):
|
||||
print("Link on P: already exists. Please finish the setup manually.")
|
||||
return 4
|
||||
|
||||
if os.path.exists(os.path.join(armapath, "z", "ace")):
|
||||
print("Link in Arma directory already exists. Please finish the setup manually.")
|
||||
return 5
|
||||
|
||||
try:
|
||||
if not os.path.exists("P:\\z"):
|
||||
os.mkdir("P:\\z")
|
||||
if not os.path.exists(os.path.join(armapath, "z")):
|
||||
os.mkdir(os.path.join(armapath, "z"))
|
||||
|
||||
if platform.win32_ver()[0] == "7":
|
||||
subprocess.call(["cmd", "/c", "mklink", "/D", "P:\\z\\ace", projectpath])
|
||||
subprocess.call(["cmd", "/c", "mklink", "/D", os.path.join(armapath, "z", "ace"), projectpath])
|
||||
else:
|
||||
subprocess.call(["cmd", "/c", "mklink", "/D", "/J", "P:\\z\\ace", projectpath])
|
||||
subprocess.call(["cmd", "/c", "mklink", "/D", "/J", os.path.join(armapath, "z", "ace"), projectpath])
|
||||
except:
|
||||
raise
|
||||
print("Something went wrong during the link creation. Please finish the setup manually.")
|
||||
return 6
|
||||
|
||||
print("# Links created successfully.")
|
||||
|
||||
|
||||
print("\n# Copying required CBA includes ...")
|
||||
|
||||
if os.path.exists("P:\\x\\cba"):
|
||||
print("P:\\x\\cba already exists, skipping.")
|
||||
return -1
|
||||
|
||||
try:
|
||||
shutil.copytree(os.path.join(projectpath, "tools", "cba"), "P:\\x\\cba")
|
||||
except:
|
||||
raise
|
||||
print("Something went wrong while copying CBA includes. Please copy tools\\cba to P:\\x\\cba manually.")
|
||||
return 7
|
||||
|
||||
print("# CBA includes copied successfully to P:\\x\\cba.")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
exitcode = main()
|
||||
|
||||
if exitcode > 0:
|
||||
print("\nSomething went wrong during the setup. Make sure you run this script as administrator. If these issues persist, please follow the instructions on the ACE3 wiki to perform the setup manually.")
|
||||
else:
|
||||
print("\nSetup successfully completed.")
|
||||
|
||||
input("\nPress enter to exit ...")
|
||||
sys.exit(exitcode)
|
Loading…
Reference in New Issue
Block a user