Merge pull request #4064 from acemod/medical-rewrite

Medical rewrite
This commit is contained in:
PabstMirror 2019-03-30 15:20:15 -05:00 committed by GitHub
commit 16ed2a82c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
603 changed files with 16199 additions and 17979 deletions

View File

@ -40,7 +40,9 @@ Aleksey EpMAK Yermakov <epmak777@gmail.com>
Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com>
Arcanum417 <lubos.len@gmail.com>
Anton
Arcanum417 <lubos.len@gmail.com>
Arkhir <wonsz666@gmail.com >
Asgar Serran <piechottaf@web.de>
BaerMitUmlaut
@ -144,4 +146,5 @@ voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Winter <simon@agius-muscat.net>
xrufix
Zakant <Zakant@gmx.de>
zGuba

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,24 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
private _unit = ACE_player;
private _fatigue = _unit getVariable [QGVAR(aimFatigue), 0];
switch (stance _unit) do {
case ("CROUCH"): {
1.0 + _fatigue ^ 2 * 0.1
};
case ("PRONE"): {
1.0 + _fatigue ^ 2 * 2.0
};
default {
1.5 + _fatigue ^ 2 * 3.0
};
};
}] call EFUNC(common,arithmeticSetSource);
["ace_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
@ -30,7 +48,7 @@ if (!hasInterface) exitWith {};
linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true];
}] call FUNC(addDutyFactor);
[QEGVAR(medical,bloodVolume), { // 100->1.0, 90->1.1, 80->1.2
linearConversion [100, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 100]), 1, 2, true];
linearConversion [6, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 100]), 1, 2, true];
}] call FUNC(addDutyFactor);
};
if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then {

View File

@ -88,14 +88,7 @@ if (_overexhausted) then {
};
};
switch (stance _unit) do {
case ("CROUCH"): {
[_unit, QUOTE(ADDON), (1.0 + _fatigue ^ 2 * 0.1) * GVAR(swayFactor)] call EFUNC(common,setAimCoef);
};
case ("PRONE"): {
[_unit, QUOTE(ADDON), (1.0 + _fatigue ^ 2 * 2.0) * GVAR(swayFactor)] call EFUNC(common,setAimCoef);
};
default {
[_unit, QUOTE(ADDON), (1.5 + _fatigue ^ 2 * 3.0) * GVAR(swayFactor)] call EFUNC(common,setAimCoef);
};
};
_unit setVariable [QGVAR(aimFatigue), _fatigue];
private _aimCoef = [missionNamespace, "ACE_setCustomAimCoef", "max"] call EFUNC(common,arithmeticGetResult);
_unit setCustomAimCoef _aimCoef;

View File

@ -56,6 +56,8 @@ PREP(fixFloating);
PREP(fixLoweredRifleAnimation);
PREP(fixPosition);
PREP(getAllDefinedSetVariables);
PREP(getAwakeAnim);
PREP(getCountOfItem);
PREP(getDeathAnim);
PREP(getDefaultAnim);
PREP(getDefinedVariable);

View File

@ -39,6 +39,11 @@
_object allowSprint (_set == 0);
}] call CBA_fnc_addEventHandler;
[QGVAR(setAnimSpeedCoef), {
params ["_object", "_set"];
_object setAnimSpeedCoef _set;
}] call CBA_fnc_addEventHandler;
[QGVAR(setCaptive), {
params ["_object", "_set"];
TRACE_2("setCaptive EH",_object,_set);

View File

@ -10,7 +10,6 @@
* 0 = PlayMove
* 1 = PlayMoveNow
* 2 = SwitchMove (no transitional animation, doesn't overwrite priority 1)
* 3: Force overwritting unconscious (default: false) <BOOL>
*
* Return Value:
* None
@ -21,14 +20,8 @@
* Public: Yes
*/
params ["_unit", "_animation", ["_priority", 0], ["_force", false]];
TRACE_4("params",_unit,_animation,_priority,_force);
// don't overwrite more important animations
if (_unit getVariable ["ACE_isUnconscious", false] && {(_animation != "Unconscious")} && {!_force}) exitWith {};
// don't go unconscious if the unit isn't unconscious
if (_animation == "Unconscious" && {!((_unit getVariable ["ACE_isUnconscious", false]) || (_unit getVariable ["ACE_isDead", false]))}) exitWith {};
params ["_unit", "_animation", ["_priority", 0]];
TRACE_4("params",_unit,_animation,_priority);
// switchMove "" no longer works in dev 1.37
if (_animation == "") then {
@ -43,7 +36,7 @@ switch (_priority) do {
if (_unit == vehicle _unit) then {
[QGVAR(playMove), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles.
[QGVAR(playMove), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
@ -51,7 +44,7 @@ switch (_priority) do {
if (_unit == vehicle _unit) then {
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles.
[QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
@ -60,7 +53,7 @@ switch (_priority) do {
if (_unit == vehicle _unit) then {
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles.
[QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
};

View File

@ -0,0 +1,49 @@
#include "script_component.hpp"
/*
* Author: commy2
* Report awake animation of unit inside vehicle.
*
* Arguments:
* 0: The unit <OBJECT>
*
* ReturnValue:
* The animtaion <STRING>
*
* Example:
* player call ace_common_fnc_getAwakeAnim
*
* Public: no
*/
params ["_unit"];
private _vehicle = vehicle _unit;
// --- on foot
if (_vehicle isEqualTo _unit) exitWith {""};
// --- driver
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
if (_unit == driver _vehicle) exitWith {
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_config >> "driverAction")) // return
};
// --- turret
private _turret = _unit call CBA_fnc_turretPath;
if !(_turret isEqualTo []) exitWith {
private _turretConfig = [_vehicle, _turret] call CBA_fnc_getTurret;
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_turretConfig >> "gunnerAction")) // return
};
// --- cargo
private _cargoIndex = _vehicle getCargoIndex _unit;
if (_cargoIndex != -1) exitWith {
getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getArray (_config >> "cargoAction") select _cargoIndex) // return
};
// --- default
""

View File

@ -0,0 +1,31 @@
#include "script_component.hpp"
/*
* Author: Dedmen
* Return how many items of type _itemType the player has in his containers (Uniform, Vest, Backpack)
* Doesn't count assignedItems, weapons, weapon attachments, magazines in weapons
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Classname of item (Case-Sensitive) <STRING>
*
* Return Value:
* Item Count <NUMBER>
*
* Example:
* [bob, "FirstAidKit"] call ace_common_fnc_getCountOfItem
*
* Public: Yes
*/
params ["_unit", "_itemType"];
private _countItemsInContainer = {
(getItemCargo _this) params ["_itemTypes", "_itemCounts"];
private _index = _itemTypes find _itemType;
_itemCounts param [_index, 0]
};
((uniformContainer _unit) call _countItemsInContainer) +
((vestContainer _unit) call _countItemsInContainer) +
((backpackContainer _unit) call _countItemsInContainer)

View File

@ -17,4 +17,4 @@
params ["_unit"];
!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return
alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}

View File

@ -5,7 +5,7 @@
* Use this in INIT and RESPAWN eh scripts, because ACE_player isn't reset yet.
*
* Arguments:
* NONE.
* None
*
* Return Value:
* Player controlled unit <OBJECT>

View File

@ -38,32 +38,51 @@ if (count _emptyPos != 3) exitwith {
unassignVehicle _unit;
[_unit] orderGetIn false;
TRACE_1("Ejecting", alive _unit);
private _resetUncon = false;
if (lifeState _unit == "INCAPACITATED") then {
_resetUncon = true;
_unit setUnconscious false;
TRACE_1("pausing setUnconscious",_unit);
};
TRACE_1("Ejecting", alive _unit);
_unit action ["Eject", vehicle _unit];
[{
params ["_unit", "_emptyPos"];
params ["_unit", "_emptyPos", "_resetUncon"];
if ((vehicle _unit) != _unit) then {
WARNING_2("Failed to unload in time [%1 - %2]",_unit, vehicle _unit);
};
_unit setPosASL AGLToASL _emptyPos;
if !([_unit] call FUNC(isAwake)) then {
TRACE_1("Check if isAwake", [_unit] call FUNC(isAwake));
if (driver _unit == _unit) then {
private _anim = [_unit] call FUNC(getDeathAnim);
[_unit, _anim, 1, true] call FUNC(doAnimation);
[{
params ["_unit", "_anim"];
if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
[_unit, _anim, 2, true] call FUNC(doAnimation);
};
}, [_unit, _anim], 0.5] call CBA_fnc_waitAndExecute;
};
if (_resetUncon) then {
TRACE_1("resuming setUnconscious",_unit);
// This should reset the unit to an Unconscious animation
// Also has the hilarious effect of violently ragdolling the guy
_unit setUnconscious true;
};
}, [_unit, _emptyPos], 0.5] call CBA_fnc_waitAndExecute;
// ToDo [medical-rewrite]: verify we can remove the following commented code
// if !([_unit] call FUNC(isAwake)) then {
// TRACE_1("Check if isAwake", [_unit] call FUNC(isAwake));
// if (driver _unit == _unit) then {
// private _anim = [_unit] call FUNC(getDeathAnim);
// [_unit, _anim, 1, true] call FUNC(doAnimation);
// [{
// params ["_unit", "_anim"];
// if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then {
// [_unit, _anim, 2, true] call FUNC(doAnimation);
// };
// }, [_unit, _anim], 0.5] call CBA_fnc_waitAndExecute;
// };
// };
}, [_unit, _emptyPos, _resetUncon], 0.5] call CBA_fnc_waitAndExecute;
[_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide);

View File

@ -26,6 +26,20 @@
<Korean>ACE-Team</Korean>
<Chinese>ACE-製作團隊</Chinese>
<Chinesesimp>ACE-制作团队</Chinesesimp>
</Key>
<Key ID="STR_ACE_Common_Advanced">
<English>Advanced</English>
<Russian>Усложненный</Russian>
<Polish>Zaawansowany</Polish>
<Spanish>Avanzado</Spanish>
<German>Erweitert</German>
<Czech>Pokročilé</Czech>
<Portuguese>Avançada</Portuguese>
<French>Avancée</French>
<Hungarian>Fejlett</Hungarian>
<Italian>Avanzato</Italian>
<Japanese>アドバンスド</Japanese>
<Korean>고급</Korean>
</Key>
<Key ID="STR_ACE_Common_Save">
<English>Save</English>
@ -395,6 +409,20 @@
<Korean>알 수 없음</Korean>
<Chinese>未知的</Chinese>
<Chinesesimp>未知的</Chinesesimp>
</Key>
<Key ID="STR_ACE_Common_Normal">
<English>Normal</English>
<German>Normal</German>
<Italian>Normale</Italian>
<Russian>Нормальное</Russian>
<French>Normale</French>
<Polish>Normalne</Polish>
<Spanish>Normal</Spanish>
<Hungarian>Normális</Hungarian>
<Czech>Normální</Czech>
<Portuguese>Normal</Portuguese>
<Japanese>通常</Japanese>
<Korean>보통</Korean>
</Key>
<Key ID="STR_ACE_Common_NoVoice">
<English>No Voice</English>
@ -969,6 +997,51 @@
<Korean>활성화</Korean>
<Chinese>啟用</Chinese>
<Chinesesimp>启用</Chinesesimp>
</Key>
<Key ID="STR_ACE_Common_Always">
<English>Always</English>
</Key>
<Key ID="STR_ACE_Common_Anywhere">
<English>Anywhere</English>
<Russian>Где угодно</Russian>
<Polish>Wszędzie</Polish>
<Spanish>Donde sea</Spanish>
<German>Überall</German>
<Czech>Kdekoliv</Czech>
<Portuguese>Qualquer lugar</Portuguese>
<French>PArtout</French>
<Hungarian>Akárhol</Hungarian>
<Italian>Ovunque</Italian>
<Japanese>どこでも</Japanese>
<Korean>어디서나</Korean>
</Key>
<Key ID="STR_ACE_Common_Basic">
<English>Basic</English>
<Russian>Базовый</Russian>
<Polish>Podstawowy</Polish>
<Spanish>Básico</Spanish>
<German>Standard</German>
<Czech>Základní</Czech>
<Portuguese>Básica</Portuguese>
<French>Basique</French>
<Hungarian>Alap</Hungarian>
<Italian>Basico</Italian>
<Japanese>ベーシック</Japanese>
<Korean>기본</Korean>
</Key>
<Key ID="STR_ACE_Common_Vehicle">
<English>Medical vehicles</English>
<Russian>В медицинском транспорте</Russian>
<Polish>Pojazdy medyczne</Polish>
<Spanish>Vehiculos médicos</Spanish>
<German>Sanitätsfahrzeuge</German>
<Czech>Zdravotnická vozidla</Czech>
<Portuguese>Veículos médcos</Portuguese>
<French>Dans les véhicules médicals</French>
<Hungarian>Orvosi járművek</Hungarian>
<Italian>Veicoli medici</Italian>
<Japanese>医療車両のみ</Japanese>
<Korean>의료차량</Korean>
</Key>
<Key ID="STR_ACE_Common_Yes">
<English>Yes</English>
@ -1001,6 +1074,9 @@
<Korean>아니오</Korean>
<Chinese></Chinese>
<Chinesesimp></Chinesesimp>
</Key>
<Key ID="STR_ACE_Common_Never">
<English>Never</English>
</Key>
<Key ID="STR_ACE_Common_VehiclesOnly">
<English>Vehicles only</English>

View File

@ -30,8 +30,7 @@ if (isNil "ACE_maxWeightCarry") then {
//@todo Captivity?
//Add Keybind:
["ACE3 Common", QGVAR(drag), (localize LSTRING(DragKeybind)),
{
["ACE3 Common", QGVAR(drag), (localize LSTRING(DragKeybind)), {
if (!alive ACE_player) exitWith {false};
if !([ACE_player, objNull, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false};
@ -51,7 +50,6 @@ if (isNil "ACE_maxWeightCarry") then {
[ACE_player, _cursor] call FUNC(startDrag);
false
},
{false},
[-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND
}, {
false
}, [-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND

View File

@ -29,10 +29,9 @@ if (_player getVariable [QGVAR(isDragging), false]) then {
};
// handle waking up dragged unit
//if (_unit == _draggedObject) then {
// [_player, _draggedObject] call FUNC(dropObject);
//};
if (_unit == _draggedObject) then {
[_player, _draggedObject] call FUNC(dropObject);
};
};
if (_player getVariable [QGVAR(isCarrying), false]) then {
@ -45,8 +44,7 @@ if (_player getVariable [QGVAR(isCarrying), false]) then {
};
// handle waking up dragged unit
//if (_unit == _carriedObject) then {
// [_player, _carriedObject] call FUNC(dropObject_carry);
//};
if (_unit == _carriedObject) then {
[_player, _carriedObject] call FUNC(dropObject_carry);
};
};

View File

@ -72,7 +72,7 @@ private _gBlackOut = MAXVIRTUALG / _classCoef + MAXVIRTUALG / _suitCoef - MAXVIR
// Unconsciousness
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
[ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious);
[ACE_player, true, (10 + floor(random 5)), true] call EFUNC(medical,setUnconscious);
};
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];

View File

@ -36,11 +36,6 @@ if (_unit == ACE_player) then {
addCamShake [3, 5, _damage + random 10];
};
// play scream sound
if (!isNil QEFUNC(medical,playInjuredSound)) then {
[_unit,_damage] call EFUNC(medical,playInjuredSound);
};
private _vehicle = vehicle _unit;
// handle static weapons

View File

@ -1 +1 @@
z\ace\addons\medical
z\ace\addons\medical

View File

@ -1,789 +0,0 @@
class ACE_Head {
displayName = CSTRING(Head);
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\bandage.paa);
};
class CheckPulse: fieldDressing {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 Diagnose: CheckPulse {
displayName = CSTRING(Actions_Diagnose);
condition = QUOTE([ARR_4(_player, _target, 'head', 'Diagnose')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Diagnose')] call DFUNC(treatment));
EXCEPTIONS
};
};
class ACE_Torso {
displayName = CSTRING(Torso);
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
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;
enableInside = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PlaceInBodyBag {
displayName = CSTRING(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;
enableInside = 1;
};
class TriageCard {
displayName = CSTRING(Actions_TriageCard);
distance = 2.0;
condition = "true";
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
EXCEPTIONS
showDisabled = 1;
enableInside = 1;
icon = QPATHTOF(UI\icons\triageCard.paa);
};
class Diagnose {
displayName = CSTRING(Actions_Diagnose);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Diagnose')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Diagnose')] call DFUNC(treatment));
EXCEPTIONS
showDisabled = 0;
icon = "";
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(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;
enableInside = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\bandage.paa);
};
class SurgicalKit: fieldDressing {
displayName = CSTRING(Use_SurgicalKit);
condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment));
EXCEPTIONS
icon = QPATHTOF(UI\icons\surgicalKit.paa);
};
class PersonalAidKit: fieldDressing {
displayName = CSTRING(Use_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 = CSTRING(Actions_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 = ECSTRING(interaction,ArmLeft);
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\bandage.paa);
};
class Tourniquet: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment));
EXCEPTIONS
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class BloodIV: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = ECSTRING(interaction,ArmRight);
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment));
EXCEPTIONS
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(Actions_Plasma4_1000);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV')] call DFUNC(treatment));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = ECSTRING(interaction,LegLeft);
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
EXCEPTIONS
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(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 = CSTRING(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 = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(Actions_Plasma4_1000);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV')] call DFUNC(treatment));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = ECSTRING(interaction,LegRight);
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
ACTION_CONDITION
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
EXCEPTIONS
icon = QPATHTOF(UI\icons\medical_cross.paa);
distance = MEDICAL_ACTION_DISTANCE;
class Bandage {
displayName = CSTRING(Bandage);
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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(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;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(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 = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
EXCEPTIONS
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = QPATHTOF(UI\icons\iv.paa);
};
class BloodIV_500: BloodIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(Actions_Plasma4_1000);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV')] call DFUNC(treatment));
EXCEPTIONS
};
class PlasmaIV_500: PlasmaIV {
displayName = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(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 = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
EXCEPTIONS
};
};

View File

@ -1,520 +0,0 @@
class Medical {
displayName = CSTRING(Actions_Medical);
runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
condition = QUOTE(GVAR(menuTypeStyleSelf));
icon = QPATHTOF(UI\icons\medical_cross.paa);
class ACE_Head {
displayName = CSTRING(Head);
icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
runOnHover = 1;
class Bandage {
displayName = CSTRING(Bandage);
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(Actions_FieldDressing);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa);
};
class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse);
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
icon = "";
};
class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure);
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment));
};
};
class ACE_Torso {
displayName = CSTRING(Torso);
distance = 5.0;
condition = "true";
runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
showDisabled = 1;
icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class TriageCard {
displayName = CSTRING(Actions_TriageCard);
distance = 2.0;
condition = "true";
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
showDisabled = 1;
icon = QPATHTOF(UI\icons\triageCard.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(Actions_FieldDressing);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa);
};
};
class ACE_ArmLeft {
displayName = ECSTRING(interaction,ArmLeft);
runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(Actions_FieldDressing);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa);
};
class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
icon = "";
};
class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_ArmRight {
displayName = ECSTRING(interaction,ArmRight);
runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(Actions_FieldDressing);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
};
class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
icon = "";
};
class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_LegLeft {
displayName = ECSTRING(interaction,LegLeft);
runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(Actions_FieldDressing);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_LegRight {
displayName = ECSTRING(interaction,LegRight);
runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true";
icon = QPATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = CSTRING(Bandage);
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
icon = QPATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = CSTRING(Actions_FieldDressing);
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
icon = QPATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
};

File diff suppressed because it is too large Load Diff

View File

@ -1,329 +1,24 @@
class ACE_Settings {
class GVAR(level) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_level_DisplayName);
description = CSTRING(MedicalSettings_level_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "Basic", "Advanced"};
};
class GVAR(medicSetting) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_medicSetting_DisplayName);
description = CSTRING(MedicalSettings_medicSetting_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "Normal", "Advanced"};
};
class GVAR(increaseTrainingInLocations) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_increaseTrainingInLocations_DisplayName);
description = CSTRING(MedicalSettings_increaseTrainingInLocations_Description);
value = 0;
typeName = "BOOL";
};
/* @todo
class GVAR(enableFor) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableFor_Description);
value = 0;
displayName = CSTRING(MedicalSettings_enableFor_DisplayName);
description = CSTRING(MedicalSettings_enableFor_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Players only", "Players and AI"};
};
class GVAR(enableOverdosing) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_enableOverdosing_DisplayName);
description = CSTRING(MedicalSettings_enableOverdosing_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(bleedingCoefficient) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_bleedingCoefficient_DisplayName);
description = CSTRING(MedicalSettings_bleedingCoefficient_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 25, 1, 1};
};
class GVAR(painCoefficient) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_painCoefficient_DisplayName);
description = CSTRING(MedicalSettings_painCoefficient_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 25, 1, 1};
};
class GVAR(enableAdvancedWounds) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_Description);
typeName = "BOOL";
value = 0;
};
*/
/* @todo
class GVAR(enableVehicleCrashes) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_Description);
displayName = CSTRING(MedicalSettings_enableVehicleCrashes_DisplayName);
description = CSTRING(MedicalSettings_enableVehicleCrashes_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(enableScreams) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_enableScreams_DisplayName);
description = CSTRING(MedicalSettings_enableScreams_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(playerDamageThreshold) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_playerDamageThreshold_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 25, 1, 1};
};
class GVAR(AIDamageThreshold) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_AIDamageThreshold_Description);
typeName = "SCALAR";
value = 1;
sliderSettings[] = {0, 25, 1, 1};
};
class GVAR(enableUnconsciousnessAI) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_enableUnconsciousnessAI_DisplayName);
description = CSTRING(MedicalSettings_enableUnconsciousnessAI_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "50/50", "Enabled"};
};
class GVAR(remoteControlledAI) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName);
description = CSTRING(MedicalSettings_remoteControlledAI_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(preventInstaDeath) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName);
description = CSTRING(MedicalSettings_preventInstaDeath_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(enableRevive) {
category = CSTRING(Category_Medical);
displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
description = CSTRING(ReviveSettings_enableRevive_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Disabled", "Players only", "Players and AI"};
};
class GVAR(maxReviveTime) {
category = CSTRING(Category_Medical);
displayName = CSTRING(ReviveSettings_maxReviveTime_DisplayName);
description = CSTRING(ReviveSettings_maxReviveTime_Description);
typeName = "SCALAR";
value = 120;
sliderSettings[] = {0, 3600, 120, 0};
};
class GVAR(amountOfReviveLives) {
category = CSTRING(Category_Medical);
displayName = CSTRING(ReviveSettings_amountOfReviveLives_DisplayName);
description = CSTRING(ReviveSettings_amountOfReviveLives_Description);
typeName = "SCALAR";
value = -1;
sliderSettings[] = {-1, 25, -1, -1};
};
/*
class GVAR(allowDeadBodyMovement) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = 0;
};
*/
class GVAR(allowLitterCreation) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName);
description = CSTRING(MedicalSettings_allowLitterCreation_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(litterSimulationDetail) {
category = CSTRING(Category_Medical);
displayName = CSTRING(litterSimulationDetail);
description = CSTRING(litterSimulationDetail_Desc);
typeName = "SCALAR";
value = 3;
values[] = {"Off", "Low", "Medium", "High", "Ultra"};
_values[] = { 0, 50, 100, 1000, 5000 };
};
class GVAR(litterCleanUpDelay) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName);
description = CSTRING(MedicalSettings_litterCleanUpDelay_Description);
typeName = "SCALAR";
value = 0;
sliderSettings[] = {-1, 3600, 0, 0};
};
class GVAR(medicSetting_basicEpi) {
category = CSTRING(Category_Medical);
displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(consumeItem_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(consumeItem_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_Description);
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(useLocation_basicEpi) {
category = CSTRING(Category_Medical);
displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useLocation_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useLocation_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_PAK_Description);
typeName = "SCALAR";
value = 3;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useLocation_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description);
typeName = "SCALAR";
value = 2;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useCondition_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Anytime", "Stable"};
};
class GVAR(useCondition_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Anytime", "Stable"};
};
class GVAR(keepLocalSettingsSynced) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_keepLocalSettingsSynced_DisplayName);
description = CSTRING(MedicalSettings_keepLocalSettingsSynced_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(healHitPointAfterAdvBandage) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName);
description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(painIsOnlySuppressed) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName);
description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(painEffectType) {
category = CSTRING(Category_Medical);
displayName = CSTRING(painEffectType);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(painEffect_Flash), CSTRING(painEffect_Chroma)};
isClientSettable = 1;
};
class GVAR(allowUnconsciousAnimationOnTreatment) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_allowUnconsciousAnimationOnTreatment_DisplayName);
description = CSTRING(MedicalSettings_allowUnconsciousAnimationOnTreatment_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(moveUnitsFromGroupOnUnconscious) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_moveUnitsFromGroupOnUnconscious_DisplayName);
description = CSTRING(MedicalSettings_moveUnitsFromGroupOnUnconscious_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(menuTypeStyle) {
category = CSTRING(Category_Medical);
displayName = CSTRING(menuTypeDisplay);
description = CSTRING(menuTypeDescription);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(useSelection), CSTRING(useRadial), ECSTRING(common,Disabled)};
isClientSettable = 1;
};
class GVAR(menuTypeStyleSelf) {
category = CSTRING(Category_Medical);
displayName = CSTRING(menuTypeStyleSelf_displayName);
description = CSTRING(menuTypeStyleSelf_description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
};
class GVAR(delayUnconCaptive) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName);
description = CSTRING(MedicalSettings_delayUnconCaptive_Description);
typeName = "SCALAR";
value = 3;
sliderSettings[] = {0, 30, 3, 0};
};
class GVAR(convertItems) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_convertItems_DisplayName);
description = CSTRING(MedicalSettings_convertItems_Description);
typeName = "SCALAR";
value = 0;
values[] = {ECSTRING(common,Enabled), CSTRING(MedicalSettings_convertItems_remove), ECSTRING(common,Disabled)};
class GVAR(spontaneousWakeUpChance) {
movedToSQF = 1;
};
};

View File

@ -1,6 +0,0 @@
class CfgActions {
class None;
class Heal: None {
show = 0;
};
};

View File

@ -1,4 +1,3 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));

View File

@ -1,6 +0,0 @@
class CfgFactionClasses {
class NO_CATEGORY;
class ADDON: NO_CATEGORY {
displayName = CSTRING(Category_DisplayName);
};
};

View File

@ -1,956 +1,7 @@
#define MEDICAL_ACTION_DISTANCE 1.75
class CBA_Extended_EventHandlers;
class CfgVehicles {
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {
};
};
class ACE_Module;
class ACE_moduleMedicalSettings: ACE_Module {
// Left as dumb logic so that old missions don't error about missing vehicle
class ACE_moduleMedicalSettings: Logic {
scope = 1;
displayName = CSTRING(MedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleMedicalSettings));
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class level {
displayName = CSTRING(MedicalSettings_level_DisplayName);
description = CSTRING(MedicalSettings_level_Description);
typeName = "NUMBER";
class values {
class normal {
name = CSTRING(MedicalSettings_basic);
value = 1;
default = 1;
};
class full {
name = CSTRING(MedicalSettings_advanced);
value = 2;
};
};
};
class medicSetting {
displayName = CSTRING(MedicalSettings_medicSetting_DisplayName);
description = CSTRING(MedicalSettings_medicSetting_Description);
typeName = "NUMBER";
class values {
class disable {
name = CSTRING(MedicalSettings_medicSetting_disable);
value = 0;
};
class normal {
name = CSTRING(MedicalSettings_basic);
value = 1;
default = 1;
};
class full {
name = CSTRING(MedicalSettings_advanced);
value = 2;
};
};
};
class increaseTrainingInLocations {
displayName = CSTRING(MedicalSettings_increaseTrainingInLocations_DisplayName);
description = CSTRING(MedicalSettings_increaseTrainingInLocations_Description);
typeName = "BOOL";
defaultValue = 0;
};
class allowLitterCreation {
displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName);
description = CSTRING(MedicalSettings_allowLitterCreation_Description);
typeName = "BOOL";
defaultValue = 1;
};
class litterCleanUpDelay {
displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName);
description = CSTRING(MedicalSettings_litterCleanUpDelay_Description);
typeName = "NUMBER";
defaultValue = 1800;
};
class enableScreams {
displayName = CSTRING(MedicalSettings_enableScreams_DisplayName);
description = CSTRING(MedicalSettings_enableScreams_Description);
typeName = "BOOL";
defaultValue = 1;
};
class playerDamageThreshold {
displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_playerDamageThreshold_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class AIDamageThreshold {
displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_AIDamageThreshold_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class enableUnconsciousnessAI {
displayName = CSTRING(MedicalSettings_enableUnconsciousnessAI_DisplayName);
description = CSTRING(MedicalSettings_enableUnconsciousnessAI_Description);
typeName = "NUMBER";
class values {
class disable {
name = ECSTRING(common,Disabled);
value = 0;
};
class normal {
name = "50/50";
value = 1;
default = 1;
};
class full {
name = ECSTRING(common,Enabled);
value = 2;
};
};
};
class remoteControlledAI {
displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName);
description = CSTRING(MedicalSettings_remoteControlledAI_Description);
typeName = "BOOL";
defaultValue = 1;
};
class preventInstaDeath {
displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName);
description = CSTRING(MedicalSettings_preventInstaDeath_Description);
typeName = "BOOL";
defaultValue = 0;
};
class bleedingCoefficient {
displayName = CSTRING(MedicalSettings_bleedingCoefficient_DisplayName);
description = CSTRING(MedicalSettings_bleedingCoefficient_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class painCoefficient {
displayName = CSTRING(MedicalSettings_painCoefficient_DisplayName);
description = CSTRING(MedicalSettings_painCoefficient_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class keepLocalSettingsSynced {
displayName = CSTRING(MedicalSettings_keepLocalSettingsSynced_DisplayName);
description = CSTRING(MedicalSettings_keepLocalSettingsSynced_Description);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(MedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleBasicMedicalSettings: ACE_Module {
scope = 1;
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleBasicMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class medicSetting_basicEpi {
displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
typeName = "NUMBER";
class values {
class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; };
class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; };
class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; };
};
};
class useLocation_basicEpi {
displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
typeName = "NUMBER";
class values {
class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; default = 1; };
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; };
class disabled { name = ECSTRING(common,Disabled); value = 4;};
};
};
};
class ModuleDescription {
description = CSTRING(BasicMedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleAdvancedMedicalSettings: ACE_Module {
scope = 1;
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAdvancedMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enableFor {
displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableFor_Description);
typeName = "NUMBER";
class values {
class playableUnits {
name = CSTRING(playeronly);
value = 0;
default = 1;
};
class playableUnitsAndAI {
name = CSTRING(playersandai);
value = 1;
};
};
};
class enableAdvancedWounds {
displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_Description);
typeName = "BOOL";
defaultValue = 0;
};
class enableVehicleCrashes {
displayName = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_Description);
typeName = "BOOL";
defaultValue = 1;
};
class medicSetting_PAK {
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_Description);
typeName = "NUMBER";
class values {
class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; };
class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; };
class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; };
};
};
class consumeItem_PAK {
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "NUMBER";
class values {
class keep { name = ECSTRING(common,No); value = 0; };
class remove { name = ECSTRING(common,Yes); value = 1; default = 1; };
};
};
class useCondition_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
typeName = "NUMBER";
class values {
class AnyTime { name = CSTRING(AnyTime); value = 0; };
class Stable { name = CSTRING(Stable); value = 1; default = 1; };
};
};
class useLocation_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useLocation_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_PAK_Description);
typeName = "NUMBER";
class values {
class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; };
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; default = 1; };
class disabled { name = ECSTRING(common,Disabled); value = 4;};
};
};
class medicSetting_SurgicalKit: medicSetting_PAK {
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_Description);
};
class consumeItem_SurgicalKit: consumeItem_PAK {
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_Description);
};
class useLocation_SurgicalKit: useLocation_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description);
};
class useCondition_SurgicalKit: useCondition_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
class values {
class AnyTime { name = CSTRING(AnyTime); value = 0; default = 1; };
class Stable { name = CSTRING(Stable); value = 1; };
};
};
class healHitPointAfterAdvBandage {
displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName);
description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description);
typeName = "BOOL";
defaultValue = 0;
};
class painIsOnlySuppressed {
displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName);
description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(AdvancedMedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleReviveSettings: ACE_Module {
scope = 1;
displayName = CSTRING(ReviveSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleReviveSettings));
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enableRevive {
displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
description = CSTRING(ReviveSettings_enableRevive_Description);
typeName = "NUMBER";
defaultValue = 0;
class values {
class disable { name = ECSTRING(common,Disabled); value = 0; default = 1;};
class playerOnly { name = CSTRING(playeronly); value = 1; };
class playerAndAI { name = CSTRING(playersandai); value = 2; };
};
};
class maxReviveTime {
displayName = CSTRING(ReviveSettings_maxReviveTime_DisplayName);
description = CSTRING(ReviveSettings_maxReviveTime_Description);
typeName = "NUMBER";
defaultValue = 120;
};
class amountOfReviveLives {
displayName = CSTRING(ReviveSettings_amountOfReviveLives_DisplayName);
description = CSTRING(ReviveSettings_amountOfReviveLives_Description);
typeName = "NUMBER";
defaultValue = -1;
};
};
class ModuleDescription {
description = CSTRING(ReviveSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleAssignMedicRoles: Module_F {
scope = 1;
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAssignMedicRoles);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class EnableList {
displayName = CSTRING(AssignMedicRoles_EnableList_DisplayName);
description = CSTRING(AssignMedicRoles_EnableList_Description);
defaultValue = "";
typeName = "STRING";
};
class role {
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
description = CSTRING(AssignMedicRoles_role_Description);
typeName = "NUMBER";
class values {
class none {
name = CSTRING(AssignMedicRoles_role_none);
value = 0;
};
class medic {
name = CSTRING(AssignMedicRoles_role_medic);
value = 1;
default = 1;
};
class doctor {
name = CSTRING(AssignMedicRoles_role_doctor);
value = 2;
};
};
};
};
class ModuleDescription {
description = CSTRING(AssignMedicRoles_Module_Description);
sync[] = {};
};
};
class ACE_moduleAssignMedicVehicle: Module_F {
scope = 1;
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAssignMedicalVehicle);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class EnableList {
displayName = CSTRING(AssignMedicVehicle_EnableList_DisplayName);
description = CSTRING(AssignMedicVehicle_EnableList_Description);
defaultValue = "";
typeName = "STRING";
};
class enabled {
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
description = CSTRING(AssignMedicVehicle_enabled_Description);
typeName = "NUMBER";
class values {
class none {
name = ECSTRING(common,No);
value = 0;
};
class medic {
name = ECSTRING(common,Yes);
value = 1;
default = 1;
};
};
};
};
class ModuleDescription {
description = CSTRING(AssignMedicVehicle_Module_Description);
sync[] = {};
};
};
class ACE_moduleAssignMedicalFacility: Module_F {
scope = 1;
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAssignMedicalFacility);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enabled {
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
description = CSTRING(AssignMedicalFacility_enabled_Description);
typeName = "BOOL";
};
};
class ModuleDescription {
description = CSTRING(AssignMedicalFacility_Module_Description);
sync[] = {};
};
};
#define ARM_LEG_ARMOR_DEFAULT 1
#define ARM_LEG_ARMOR_BETTER 1
#define ARM_LEG_ARMOR_CSAT 1
#define ADD_ACE_HITPOINTS(ARM_ARMOR,LEG_ARMOR) \
class HitLeftArm { \
armor = ARM_ARMOR; \
material = -1; \
name = "hand_l"; \
passThrough = 1; \
radius = 0.08; \
explosionShielding = 1; \
visual = "injury_hands"; \
minimalHit = 0.01; \
}; \
class HitRightArm: HitLeftArm { \
name = "hand_r"; \
}; \
class HitLeftLeg { \
armor = LEG_ARMOR; \
material = -1; \
name = "leg_l"; \
passThrough = 1; \
radius = 0.1; \
explosionShielding = 1; \
visual = "injury_legs"; \
minimalHit = 0.01; \
}; \
class HitRightLeg: HitLeftLeg { \
name = "leg_r"; \
};
class Man;
class CAManBase: Man {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_DEFAULT,ARM_LEG_ARMOR_DEFAULT)
};
class ACE_SelfActions {
#include "ACE_Medical_SelfActions.hpp"
};
class ACE_Actions {
// Include actions in body parts for treatment while in the open
#define EXCEPTIONS exceptions[] = {"isNotSwimming"};
#define ACTION_CONDITION condition = QUOTE(GVAR(menuTypeStyle) == 0);
#include "ACE_Medical_Actions.hpp"
// Create a consolidates medical menu for treatment while boarded
class ACE_MainActions {
class Medical {
displayName = CSTRING(Actions_Medical);
runOnHover = 1;
exceptions[] = {"isNotInside"};
condition = QUOTE((vehicle _target != _target && vehicle _target == vehicle _player) || GVAR(menuTypeStyle) == 1);
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
icon = QPATHTOF(UI\icons\medical_cross.paa);
#undef EXCEPTIONS
#undef ACTION_CONDITION
#define EXCEPTIONS exceptions[] = {"isNotInside", "isNotSwimming"};
#define ACTION_CONDITION condition = "true";
#include "ACE_Medical_Actions.hpp"
};
class GVAR(loadPatient) {
displayName = CSTRING(LoadPatient);
distance = 5;
condition = QUOTE(_target getVariable [ARR_2(QUOTE(QUOTE(ACE_isUnconscious)), false)] && {alive _target} && {vehicle _target == _target});
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit));
showDisabled = 0;
icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotSwimming"};
insertChildren = QUOTE(call DFUNC(addLoadPatientActions));
};
class GVAR(UnLoadPatient) {
displayName = CSTRING(UnloadPatient);
distance = 5;
condition = QUOTE(_target getVariable [ARR_2(QUOTE(QUOTE(ACE_isUnconscious)), false)] && {alive _target} && {vehicle _target != _target} && {vehicle _player == _player});
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit));
showDisabled = 0;
icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside", "isNotSwimming"};
};
};
};
};
class SoldierWB: CAManBase {};
class SoldierEB: CAManBase {};
class SoldierGB: CAManBase {};
class B_Soldier_base_F: SoldierWB {};
class B_Soldier_04_f: B_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class B_Soldier_05_f: B_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class I_Soldier_base_F: SoldierGB {};
class I_Soldier_03_F: I_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class I_Soldier_04_F: I_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class O_Soldier_base_F: SoldierEB {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
class O_Soldier_diver_base_F: O_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
class O_Soldier_02_F: O_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
class O_officer_F: O_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
//These VR guys already have limb hitpoints that we should be able to use
//Note: the selections are a little weird, eg: class leg_l {name = "leg_l";};
// class B_Soldier_VR_F: B_Soldier_base_F { {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class O_Soldier_VR_F: O_Soldier_base_F { {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class I_Soldier_VR_F: I_Soldier_base_F { {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class C_Soldier_VR_F: C_man_1 {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class O_Protagonist_VR_F: O_Soldier_base_F {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
class MapBoard_altis_F;
class ACE_bodyBagObject: MapBoard_altis_F {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
scope = 1;
scopeCurator = 2;
side = -1;
model = QPATHTOEF(apl,ace_bodybag.p3d);
icon = "";
displayName = CSTRING(Bodybag_Display);
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {0,1.2,0};
EGVAR(dragging,dragDirection) = 0;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {QPATHTOEF(apl,data\bodybag_co.paa)};
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
distance = 5;
condition = QUOTE(true);
statement = "";
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
selection = "";
};
};
};
// Medical litter classes
class Thing;
class ACE_MedicalLitterBase: Thing {
scope = 1;
scopeCurator = 0;
displayName = " ";
destrType = "DestructNo";
model = QPATHTOF(data\littergeneric.p3d);
};
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_clean.p3d);
};
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages1.p3d);
};
class ACE_MedicalLitter_bandage2: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages2.p3d);
};
class ACE_MedicalLitter_bandage3: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages3.p3d);
};
class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_packingBandage.p3d);
};
class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_gloves.p3d);
};
class ACE_MedicalLitter_adenosine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_adenosine.p3d);
};
class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_atropine.p3d);
};
class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_epinephrine.p3d);
};
class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_morphine.p3d);
};
class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_Quikclot.p3d);
};
class Item_Base_F;
class ACE_fieldDressingItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bandage_Basic_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,1);
};
};
class ACE_packingBandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Packing_Bandage_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_packingBandage,1);
};
};
class ACE_elasticBandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bandage_Elastic_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_elasticBandage,1);
};
};
class ACE_tourniquetItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Tourniquet_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_tourniquet,1);
};
};
class ACE_morphineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Morphine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_morphine,1);
};
};
class ACE_adenosineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Adenosine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_adenosine,1);
};
};
class ACE_atropineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Atropine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_atropine,1);
};
};
class ACE_epinephrineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Epinephrine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_epinephrine,1);
};
};
class ACE_plasmaIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Plasma_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_plasmaIV,1);
};
};
class ACE_bloodIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Blood_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_bloodIV,1);
};
};
class ACE_salineIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Saline_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_salineIV,1);
};
};
class ACE_quikClotItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(QuikClot_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_quikclot,1);
};
};
class ACE_personalAidKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Aid_Kit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_personalAidKit,1);
};
};
class ACE_surgicalKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(SurgicalKit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_surgicalKit,1);
};
};
class ACE_bodyBagItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bodybag_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_bodyBag,1);
};
};
class ThingX;
class ReammoBox_F: ThingX {
class ACE_Actions;
};
class NATO_Box_Base: ReammoBox_F {
class ACE_Actions: ACE_Actions {
class ACE_MainActions;
};
};
class ACE_medicalSupplyCrate: NATO_Box_Base {
scope = 2;
scopeCurator = 2;
accuracy = 1000;
displayName = CSTRING(medicalSupplyCrate);
model = QPATHTOF(data\ace_medcrate.p3d);
author = "ElTyranos";
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,50);
MACRO_ADDITEM(ACE_morphine,25);
MACRO_ADDITEM(ACE_epinephrine,25);
MACRO_ADDITEM(ACE_bloodIV,15);
MACRO_ADDITEM(ACE_bloodIV_500,15);
MACRO_ADDITEM(ACE_bloodIV_250,15);
MACRO_ADDITEM(ACE_bodyBag,10);
};
class AnimationSources {
class Cover {
source = "user";
animPeriod = 1.5;
initPhase = 0;
minValue = 0;
maxValue = 1;
};
};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
selection = "cover_action";
class ACE_OpenLid {
displayName = CSTRING(openLid);
condition = QUOTE(alive _target && {_target animationPhase 'Cover' < 0.5});
statement = QUOTE(_target animate ARR_2(['Cover',1]));
showDisabled = 0;
};
class ACE_CloseLid {
displayName = CSTRING(closeLid);
condition = QUOTE(alive _target && {_target animationPhase 'Cover' >= 0.5});
statement = QUOTE(_target animate ARR_2(['Cover',0]));
showDisabled = 0;
};
};
};
};
class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate {
displayName = CSTRING(medicalSupplyCrate_advanced);
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,25);
MACRO_ADDITEM(ACE_packingBandage,25);
MACRO_ADDITEM(ACE_elasticBandage,25);
MACRO_ADDITEM(ACE_tourniquet,15);
MACRO_ADDITEM(ACE_morphine,15);
MACRO_ADDITEM(ACE_adenosine,15);
MACRO_ADDITEM(ACE_atropine,15);
MACRO_ADDITEM(ACE_epinephrine,15);
MACRO_ADDITEM(ACE_plasmaIV,7);
MACRO_ADDITEM(ACE_plasmaIV_500,7);
MACRO_ADDITEM(ACE_plasmaIV_250,7);
MACRO_ADDITEM(ACE_salineIV,7);
MACRO_ADDITEM(ACE_salineIV_500,7);
MACRO_ADDITEM(ACE_salineIV_250,7);
MACRO_ADDITEM(ACE_bloodIV,7);
MACRO_ADDITEM(ACE_bloodIV_500,7);
MACRO_ADDITEM(ACE_bloodIV_250,7);
MACRO_ADDITEM(ACE_quikClot,20);
MACRO_ADDITEM(ACE_personalAidKit,3);
MACRO_ADDITEM(ACE_surgicalKit,2);
MACRO_ADDITEM(ACE_bodyBag,5);
};
};
};

View File

@ -1,119 +1,3 @@
PREP(actionCheckBloodPressure);
PREP(actionCheckBloodPressureLocal);
PREP(actionCheckPulse);
PREP(actionCheckPulseLocal);
PREP(actionCheckResponse);
PREP(actionDiagnose);
PREP(actionPlaceInBodyBag);
PREP(actionRemoveTourniquet);
PREP(actionLoadUnit);
PREP(actionUnloadUnit);
PREP(addDamageToUnit);
PREP(addHeartRateAdjustment);
PREP(addLoadPatientActions);
PREP(addToLog);
PREP(addToTriageCard);
PREP(addUnconsciousCondition);
PREP(addUnloadPatientActions);
PREP(addVitalLoop);
PREP(adjustPainLevel);
PREP(bodyCleanupLoop);
PREP(canAccessMedicalEquipment);
PREP(canTreat);
PREP(canTreatCached);
PREP(determineIfFatal);
PREP(getBloodLoss);
PREP(getBloodPressure);
PREP(getBloodVolumeChange);
PREP(getCardiacOutput);
PREP(getTypeOfDamage);
PREP(getHeartRateChange);
PREP(getTriageStatus);
PREP(getUnconsciousCondition);
PREP(handleDamage);
PREP(handleDamage_advanced);
PREP(handleDamage_advancedSetDamage);
PREP(handleDamage_airway);
PREP(handleDamage_caching);
PREP(handleDamage_fractures);
PREP(handleDamage_internalInjuries);
PREP(handleDamage_wounds);
PREP(handleDamage_woundsOld);
PREP(handleInit);
PREP(handleKilled);
PREP(handleLocal);
PREP(handleRespawn);
PREP(handleUnitVitals);
PREP(handleBandageOpening);
PREP(hasItem);
PREP(hasItems);
PREP(hasMedicalEnabled);
PREP(hasTourniquetAppliedTo);
PREP(init);
PREP(isBeingCarried);
PREP(isBeingDragged);
PREP(isInMedicalFacility);
PREP(isInMedicalVehicle);
PREP(isMedic);
PREP(isMedicalVehicle);
PREP(isInStableCondition);
PREP(itemCheck);
PREP(medicationEffectLoop);
PREP(modifyMedicalAction);
PREP(onMedicationUsage);
PREP(parseConfigForInjuries);
PREP(playInjuredSound);
PREP(reviveStateLoop);
PREP(selectionNameToNumber);
PREP(serverRemoveBody);
PREP(setCardiacArrest);
PREP(setDead);
PREP(setHitPointDamage);
PREP(setStructuralDamage);
PREP(setUnconscious);
PREP(showBloodEffect);
PREP(translateSelections);
PREP(treatment);
PREP(treatment_failure);
PREP(treatment_success);
PREP(treatmentAdvanced_bandage);
PREP(treatmentAdvanced_bandageLocal);
PREP(treatmentAdvanced_CPR);
PREP(treatmentAdvanced_CPRLocal);
PREP(treatmentAdvanced_fullHeal);
PREP(treatmentAdvanced_fullHealLocal);
PREP(treatmentAdvanced_fullHealTreatmentTime);
PREP(treatmentAdvanced_medication);
PREP(treatmentAdvanced_medicationLocal);
PREP(treatmentAdvanced_surgicalKit_onProgress);
PREP(treatmentBasic_bloodbag);
PREP(treatmentBasic_bloodbagLocal);
PREP(treatmentBasic_epipen);
PREP(treatmentBasic_morphine);
PREP(treatmentBasic_morphineLocal);
PREP(treatmentIV);
PREP(treatmentIVLocal);
PREP(treatmentTourniquet);
PREP(treatmentTourniquetLocal);
PREP(useItem);
PREP(useItems);
PREP(vitalLoop);
PREP(displayPatientInformation);
PREP(displayTriageCard);
PREP(dropDownTriageCard);
PREP(moduleMedicalSettings);
PREP(moduleBasicMedicalSettings);
PREP(moduleAdvancedMedicalSettings);
PREP(moduleReviveSettings);
PREP(moduleAssignMedicRoles);
PREP(moduleAssignMedicalVehicle);
PREP(moduleAssignMedicalFacility);
PREP(copyDeadBody);
PREP(unconsciousPFH);
PREP(updateTourniquets);
// Networked litter
PREP(createLitter);
PREP(handleCreateLitter);
PREP(litterCleanupLoop);

View File

@ -1,313 +1,15 @@
// ACE Medical System Visual Loop
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"];
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
if (!hasInterface) exitWith {};
["ace_interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call CBA_fnc_addEventHandler;
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
private _pain = GET_PAIN_PERCEIVED(ACE_player);
//Treatment EventHandlers:
[QGVAR(actionCheckBloodPressureLocal), DFUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionCheckPulseLocal), DFUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
[QGVAR(addVitalLoop), DFUNC(addVitalLoop)] call CBA_fnc_addEventHandler;
[QGVAR(addToMedicalLog), DFUNC(addToLog)] call CBA_fnc_addEventHandler;
[QGVAR(addToTriageCard), DFUNC(addToTriageCard)] call CBA_fnc_addEventHandler;
[QGVAR(setDead), DFUNC(setDead)] call CBA_fnc_addEventHandler;
[QGVAR(setHitPointDamage), DFUNC(setHitPointDamage)] call CBA_fnc_addEventHandler;
[QGVAR(setUnconscious), DFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_bandageLocal), DFUNC(treatmentAdvanced_bandageLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_CPRLocal), DFUNC(treatmentAdvanced_CPRLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_fullHealLocal), DFUNC(treatmentAdvanced_fullHealLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_medicationLocal), DFUNC(treatmentAdvanced_medicationLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentBasic_bloodbagLocal), DFUNC(treatmentBasic_bloodbagLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentBasic_morphineLocal), DFUNC(treatmentBasic_morphineLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentIVLocal), DFUNC(treatmentIVLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentTourniquetLocal), DFUNC(treatmentTourniquetLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionPlaceInBodyBag), FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;
linearConversion [0, 1, _pain, 1, 5, true];
}] call EFUNC(common,arithmeticSetSource);
//Handle Deleting Bodies and creating litter on Server:
if (isServer) then {
["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler;
[QGVAR(createLitterServer), FUNC(handleCreateLitter)] call CBA_fnc_addEventHandler;
addMissionEventHandler ["BuildingChanged", {
if (isNil QGVAR(allCreatedLitter)) exitWith {};
params ["_buildingOld", "_buildingNew", "_isRuin"];
TRACE_3("BuildingChanged",_buildingOld,_buildingNew,_isRuin);
private _radius = sizeOf typeOf _buildingOld / 2;
TRACE_1("",_radius);
{
_x params ["", "_objects"];
if (({(_x distance2d _buildingOld) < _radius && {getPos _x select 2 > 0.1}} count _objects) > 0) then {
GVAR(allCreatedLitter) deleteAt (GVAR(allCreatedLitter) find _x);
{ TRACE_1("deleting",_x); deleteVehicle _x } forEach _objects;
};
} forEach (+GVAR(allCreatedLitter));
}];
};
["ace_unconscious", {
params ["_unit", "_status"];
if (local _unit) then {
if (_status) then {
_unit setVariable ["tf_voiceVolume", 0, true];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
} else {
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", false, true];
};
};
}] call CBA_fnc_addEventHandler;
// Initialize all effects
if (hasInterface) then {
_fnc_createEffect = {
params ["_type", "_layer", "_default"];
private _effect = ppEffectCreate [_type, _layer];
_effect ppEffectForceInNVG true;
_effect ppEffectAdjust _default;
_effect ppEffectCommit 0;
_effect
};
GVAR(effectUnconsciousCC) = [
"ColorCorrections",
4201,
[1,1,0, [0,0,0,1], [0,0,0,0], [1,1,1,1], [0.4,0.4,0,0,0,0.1,0.3]]
] call _fnc_createEffect;
GVAR(effectUnconsciousRB) = [
"RadialBlur",
4202,
[0.01,0.01,0,0]
] call _fnc_createEffect;
GVAR(effectBlindingCC) = [
"ColorCorrections",
4203,
[1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]]
] call _fnc_createEffect;
GVAR(effectBloodVolumeCC) = [
"ColorCorrections",
4204,
[1,1,0, [0,0,0,0], [1,1,1,1], [0.2,0.2,0.2,0]]
] call _fnc_createEffect;
GVAR(effectPainCA) = [
"chromAberration",
4205,
[0, 0, false]
] call _fnc_createEffect;
GVAR(effectPainCC) = [
"ColorCorrections",
4206,
[1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1.3,1.3,0,0,0,0.2,2]]
] call _fnc_createEffect;
// Initialize Other Variables
GVAR(effectBlind) = false;
GVAR(effectTimeBlood) = CBA_missionTime;
// MAIN EFFECTS LOOP
[{
// Zeus interface is open or player is dead; disable everything
if (!(isNull curatorCamera) or !(alive ACE_player)) exitWith {
GVAR(effectUnconsciousCC) ppEffectEnable false;
GVAR(effectUnconsciousRB) ppEffectEnable false;
GVAR(effectBlindingCC) ppEffectEnable false;
GVAR(effectBloodVolumeCC) ppEffectEnable false;
GVAR(effectPainCA) ppEffectEnable false;
GVAR(effectPainCC) ppEffectEnable false;
["unconscious", false] call EFUNC(common,setDisableUserInputStatus);
};
// Unconsciousness effect
if (ACE_player getVariable ["ACE_isUnconscious", false]) then {
GVAR(effectUnconsciousCC) ppEffectEnable true;
GVAR(effectUnconsciousRB) ppEffectEnable true;
GVAR(effectBlind) = true;
["unconscious", true] call EFUNC(common,setDisableUserInputStatus);
} else {
GVAR(effectUnconsciousCC) ppEffectEnable false;
GVAR(effectUnconsciousRB) ppEffectEnable false;
["unconscious", false] call EFUNC(common,setDisableUserInputStatus);
if (GVAR(effectBlind)) then {
_strength = 0.78 * (call EFUNC(common,ambientBrightness));
GVAR(effectBlindingCC) ppEffectEnable true;
GVAR(effectBlindingCC) ppEffectAdjust [1,1,_strength, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
GVAR(effectBlindingCC) ppEffectCommit 0;
[{
GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2);
}, [_strength], 0.01, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectBlindingCC) ppEffectEnable false;
}, [], (_strength * 2) + 0.5, 0] call CBA_fnc_waitAndExecute;
GVAR(effectBlind) = false;
};
};
private _bleeding = [ACE_player] call FUNC(getBloodLoss);
// Bleeding Indicator
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < CBA_missionTime) then {
GVAR(effectTimeBlood) = CBA_missionTime;
[600 * _bleeding] call FUNC(showBloodEffect);
};
// Blood Volume Effect
private _blood = if (GVAR(level) < 2) then {
(ACE_player getVariable [QGVAR(bloodVolume), 100]) / 100;
} else {
(((ACE_player getVariable [QGVAR(bloodVolume), 100]) - 60) max 0) / 40;
};
if (_blood > 0.99) then {
GVAR(effectBloodVolumeCC) ppEffectEnable false;
} else {
GVAR(effectBloodVolumeCC) ppEffectEnable true;
GVAR(effectBloodVolumeCC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,_blood], [0.2,0.2,0.2,0]];
GVAR(effectBloodVolumeCC) ppEffectCommit 0;
};
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
GVAR(lastHeartBeat) = CBA_missionTime;
GVAR(lastHeartBeatSound) = CBA_missionTime;
// HEARTRATE BASED EFFECTS
[{
private _heartRate = ACE_player getVariable [QGVAR(heartRate), 70];
private _pain = ACE_player getVariable [QGVAR(pain), 0];
if (GVAR(level) == 1) then {
_heartRate = 60 + 40 * _pain;
};
if (_heartRate <= 0) exitWith {};
private _interval = 60 / (_heartRate min 40);
if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCA) ppEffectEnable false;
} else {
GVAR(effectPainCC) ppEffectEnable false;
};
} else {
if ((CBA_missionTime > GVAR(lastHeartBeat) + _interval)) then {
GVAR(lastHeartBeat) = CBA_missionTime;
// Pain effect, no pain effect in zeus camera
if (isNull curatorCamera) then {
private _strength = ((_pain - (ACE_player getVariable [QGVAR(painSuppress), 0])) max 0) min 1;
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCC) ppEffectEnable false;
if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
_strength = _strength * 0.15;
GVAR(effectPainCA) ppEffectEnable true;
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
GVAR(effectPainCA) ppEffectCommit 0.01;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit 0.01;
}, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
} else {
GVAR(effectPainCA) ppEffectEnable false;
};
} else {
GVAR(effectPainCA) ppEffectEnable false;
if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
_strength = _strength * 0.9;
GVAR(effectPainCC) ppEffectEnable true;
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit 0.01;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit 0.01;
}, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
} else {
GVAR(effectPainCC) ppEffectEnable false;
};
};
};
};
};
if (GVAR(level) >= 2 && {_heartRate > 0}) then {
private _minTime = 60 / _heartRate;
if (CBA_missionTime - GVAR(lastHeartBeatSound) > _minTime) then {
GVAR(lastHeartBeatSound) = CBA_missionTime;
// Heart rate sound effect
if (_heartRate < 60) then {
private _sound = GVAR(heartBeatSounds_Normal) select (random((count GVAR(heartBeatSounds_Normal)) -1));
playSound _sound;
} else {
if (_heartRate > 150) then {
playSound "ACE_heartbeat_fast_2";
};
};
};
};
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
["ace_settingsInitialized", {
[
{(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 65)},
{(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9},
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getVariable [QGVAR(inCardiacArrest), false])},
{((_this select 0) getVariable ["ACE_isDead", false])}
] call FUNC(addUnconsciousCondition);
}] call CBA_fnc_addEventHandler;
// Prevent all types of interaction while unconscious
// @todo: probably remove this when CBA keybind hold key works properly
["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition);
// Item Event Handler
["loadout", FUNC(itemCheck)] call CBA_fnc_addPlayerEventHandler;
if (hasInterface) then {
["ace_playerJIP", {
INFO("JIP Medical init for player.");
[player] call FUNC(init);
}] call CBA_fnc_addEventHandler;
};
if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(arsenal,displayOpened), {
EGVAR(arsenal,virtualItems) set [17, (EGVAR(arsenal,virtualItems) select 17) - ["FirstAidKit", "Medikit"]];
}] call CBA_fnc_addEventHandler;
};
#ifdef DEBUG_MODE_FULL
call compile preprocessFileLineNumbers QPATHTOF(dev\watchVariable.sqf);
call compile preprocessFileLineNumbers QPATHTOF(dev\debugDisplay.sqf);
#endif

View File

@ -6,57 +6,12 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
GVAR(injuredUnitCollection) = [];
private _versionEx = "ace_medical" callExtension "version";
DFUNC(handleDamage_assignWounds) = if (_versionEx == "") then {
DFUNC(handleDamage_woundsOld)
} else {
DFUNC(handleDamage_wounds)
};
call FUNC(parseConfigForInjuries);
GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
//Hack for #3168 (units in static weapons do not take any damage):
//doing a manual pre-load with a small distance seems to fix the LOD problems with handle damage not returning full results
GVAR(fixedStatics) = [];
private _fixStatic = {
params ["_vehicle"];
private _vehType = typeOf _vehicle;
TRACE_2("",_vehicle,_vehType);
if (!(_vehType in GVAR(fixedStatics))) then {
GVAR(fixedStatics) pushBack _vehType;
TRACE_1("starting preload",_vehType);
[{
1 preloadObject (_this select 0);
}, {
TRACE_1("preload done",_this);
}, [_vehType]] call CBA_fnc_waitUntilAndExecute;
};
};
["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
["Car", "init", _fixStatic] call CBA_fnc_addClassEventHandler;
["CAManBase", "Init", FUNC(handleInit)] call CBA_fnc_addClassEventHandler;
["CAManBase", "Respawn", FUNC(handleRespawn)] call CBA_fnc_addClassEventHandler;
["CAManBase", "Killed", FUNC(handleKilled)] call CBA_fnc_addClassEventHandler;
["CAManBase", "Local", FUNC(handleLocal)] call CBA_fnc_addClassEventHandler;
addMissionEventHandler ["Loaded",{
{
TRACE_1("starting preload (save load)",_x);
[{
1 preloadObject (_this select 0);
}, {
TRACE_1("preload done",_this);
}, [_x]] call CBA_fnc_waitUntilAndExecute;
} forEach GVAR(fixedStatics);
// Reload configs into extension (handle full game restart)
call FUNC(parseConfigForInjuries);
}];
#include "initSettings.sqf"
// Add warning for old functions that were technically public, Remove at 3.14.0
{
missionNamespace setVariable [_x, compileFinal format ['diag_log text "ACE Medical WARNING: Formerly public function [%1] has no effect in medical rewrite."; nil', _x]];
} forEach ["ace_medical_fnc_actionPlaceInBodyBag","ace_medical_fnc_actionRemoveTourniquet","ace_medical_fnc_addHeartRateAdjustment","ace_medical_fnc_addToLog","ace_medical_fnc_addToTriageCard
","ace_medical_fnc_addUnconsciousCondition","ace_medical_fnc_addVitalLoop","ace_medical_fnc_canAccessMedicalEquipment","ace_medical_fnc_canTreat","ace_medical_fnc_displayTriageCard","ace_medical_fnc_dropDownTriageCard","ace_medical_fnc_getTriageStatus","ace_medical_fnc_getUnconsciousCondition","ace_medical_fnc_hasItem","ace_medical_fnc_hasItems","ace_medical_fnc_hasTourniquetAppliedTo","ace_medical_fnc_isInMedicalFacility","ace_medical_fnc_isInMedicalVehicle","ace_medical_fnc_isMedic","ace_medical_fnc_isMedicalVehicle","ace_medical_fnc_itemCheck","ace_medical_fnc_selectionNameToNumber","ace_medical_fnc_setCardiacArrest","ace_medical_fnc_setDead","ace_medical_fnc_setHitPointDamage","ace_medical_fnc_showBloodEffect","ace_medical_fnc_treatment","ace_medical_fnc_treatmentAdvanced_bandage","ace_medical_fnc_treatmentAdvanced_CPR","ace_medical_fnc_treatmentAdvanced_CPRLocal","ace_medical_fnc_treatmentAdvanced_medication","ace_medical_fnc_treatmentAdvanced_medicationLocal","ace_medical_fnc_treatmentIV","ace_medical_fnc_treatmentIVLocal","ace_medical_fnc_unconsciousPFH","ace_medical_fnc_useItem","ace_medical_fnc_useItems"];
ADDON = true;

View File

@ -3,58 +3,17 @@
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {"ACE_medicalSupplyCrate", "ACE_medicalSupplyCrate_advanced", "ACE_fieldDressingItem", "ACE_packingBandageItem", "ACE_elasticBandageItem", "ACE_tourniquetItem", "ACE_morphineItem", "ACE_atropineItem", "ACE_epinephrineItem", "ACE_plasmaIVItem", "ACE_bloodIVItem", "ACE_salineIVItem", "ACE_quikclotItem", "ACE_personalAidKitItem", "ACE_surgicalKitItem", "ACE_bodyBagItem", "ACE_bodyBagObject"};
weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"};
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction", "ace_apl"};
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
authors[] = {"Glowbal", "KoffeinFlummi"};
authors[] = {"Glowbal", "KoffeinFlummi","Arcanum417"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgActions.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgSounds.hpp"
#include "CfgEden.hpp"
#include "ACE_Medical_Treatments.hpp"
#include "ACE_Settings.hpp"
#include "ui\CfgInGameUI.hpp"
#include "ui\RscTitles.hpp"
#include "ui\triagecard.hpp"
class ACE_newEvents {
medical_onUnconscious = "ace_unconscious";
medical_treatmentSuccess = "ace_treatmentSucceded";
medical_onSetDead = "ace_killed";
Medical_onEnteredCardiacArrest = "ace_cardiacArrestEntered";
Medical_onItemAddedToTriageCard = "ace_triageCardItemAdded";
medical_onLogEntryAdded = "ace_medicalLogEntryAdded";
Medical_onHeartRateAdjustmentAdded = "ace_heartRateAdjustmentAdded";
placedInBodyBag = "ace_placedInBodyBag";
actionPlaceInBodyBag = QGVAR(actionPlaceInBodyBag);
treatmentTourniquetLocal = QGVAR(treatmentTourniquetLocal);
treatmentIVLocal = QGVAR(treatmentIVLocal);
treatmentBasic_morphineLocal = QGVAR(treatmentBasic_morphineLocal);
treatmentBasic_bloodbagLocal = QGVAR(treatmentBasic_bloodbagLocal);
treatmentAdvanced_medicationLocal = QGVAR(treatmentAdvanced_medicationLocal);
treatmentAdvanced_fullHealLocal = QGVAR(treatmentAdvanced_fullHealLocal);
treatmentAdvanced_CPRLocal = QGVAR(treatmentAdvanced_CPRLocal);
treatmentAdvanced_bandageLocal = QGVAR(treatmentAdvanced_bandageLocal);
setUnconscious = QGVAR(setUnconscious);
setHitPointDamage = QGVAR(setHitPointDamage);
setDead = QGVAR(setDead);
addToTriageCard = QGVAR(addToTriageCard);
addToMedicalLog = QGVAR(addToMedicalLog);
actionCheckPulseLocal = QGVAR(actionCheckPulseLocal);
actionCheckBloodPressureLocal = QGVAR(actionCheckBloodPressureLocal);
addVitalLoop = QGVAR(addVitalLoop);
};
class ACE_Extensions {
extensions[] += {"ace_medical"};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,32 +0,0 @@
ambient[]={1,1,1,1};
diffuse[]={0.5,0.5,0.5,1};
forcedDiffuse[]={0.5,0.5,0.5,0};
emmisive[]={0,0,0,0};
specular[]={0,0,0,0};
specularPower=0;
PixelShaderID="NormalMapSpecularDIMap";
VertexShaderID="NormalMap";
class Stage1
{
texture="z\ace\addons\medical\data\packingbandage_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage2
{
texture= "#(argb,8,8,3)color(0,0,0,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={0,0,0};
up[]={0,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

View File

@ -1,82 +0,0 @@
class StageTI
{
texture="a3\data_f\default_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.050000008,0.050000008,0.050000008,1};
specularPower=50;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\medical\data\quikclot_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage2
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform
{
aside[]={0,9,0};
up[]={4.5,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage4
{
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage5
{
texture="#(argb,8,8,3)color(1,1,1,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage6
{
texture="#(ai,64,64,1)fresnel(1.5,1.22)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_land_co.paa";
uvSource="none";
};

Binary file not shown.

View File

@ -1,92 +0,0 @@
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.70399898,0.70399898,0.70399898,0};
specularPower=70;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\medical\data\surgical_kit_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage2
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage4
{
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage5
{
texture="#(argb,8,8,3)color(0,0.05,1,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage6
{
texture="#(ai,32,128,1)fresnel(0.98,1.02)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage7
{
texture="z\ace\addons\apl\data\env_co.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

Binary file not shown.

View File

@ -0,0 +1,29 @@
#include "\z\ace\addons\medical\script_component.hpp"
[{!isNull findDisplay 46}, {
INFO("Creating Debug Display");
if (!isNull (uiNamespace getVariable [QGVAR(debugControl), controlNull])) then {
ctrlDelete (uiNamespace getVariable [QGVAR(debugControl), controlNull]); // cleanup on SP Restart
};
private _ctrl = findDisplay 46 ctrlCreate ["RscText", -1];
_ctrl ctrlSetPosition [
safeZoneX,
safeZoneY,
safeZoneW,
40 * pixelH
];
_ctrl ctrlSetFontHeight (40 * pixelH);
_ctrl ctrlSetTextColor [0.6, 0, 0, 1];
_ctrl ctrlCommit 0;
uiNamespace setVariable [QGVAR(debugControl), _ctrl];
[{
private _playerState = [ACE_player, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
(uiNamespace getVariable [QGVAR(debugControl), controlNull]) ctrlSetText format ["Player state: %1", _playerState];
if (!isNull cursorTarget && {cursorTarget isKindOf "CAManBase"}) then {
private _targetState = [cursorTarget, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
drawIcon3D ["", [0.6, 0, 0, 1], cursorTarget modelToWorldVisual (cursorTarget selectionPosition "pelvis"), 0, 0, 0, format ["State: %1", _targetState], 2, 40 * pixelH, "RobotoCondensed"];
};
}, 0 ,[]] call CBA_fnc_addPerFrameHandler;
}, []] call CBA_fnc_waitUntilAndExecute;

View File

@ -0,0 +1,97 @@
#include "\z\ace\addons\medical\script_component.hpp"
["medical", {
// Hide when patient display is up because they might overlap
if (!isNull EGVAR(medical_gui,displayPatientInformationTarget)) exitWith {""};
private _unit = cursorTarget;
if (!(_unit isKindOf "CAManBase")) then {_unit = cursorObject};
if (!(_unit isKindOf "CAManBase")) then {_unit = ACE_player};
if ((_unit != ACE_player) && {IS_UNCONSCIOUS(ACE_player)}) then {_unit = ACE_player};
if (!(_unit isKindOf "CAManBase")) exitWith {"No Unit?"};
private _return = [];
// Header:
_return pushBack format ["<t size='1.2'><t color='#%1'>%2</t> [%3]", (["00FF00", "0000FF"] select (_unit == ACE_player)), [_unit] call EFUNC(common,getName), typeOf _unit];
_return pushBack "";
// State:
private _hasStableVitals = [_unit] call EFUNC(medical_status,hasStableVitals);
private _targetState = [_unit, EGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState;
if (!local _unit) then {_targetState = "NotLocal";};
private _color = switch (_targetState) do {case "Default": {"33FF33"}; case "Injured": {"FF3333"}; case "Unconscious": {"FF8833"}; case "CardiacArrest": {"FF33AA"}; default {"555555"}};
private _unconcFlag = if IS_UNCONSCIOUS(_unit) then {"[<t color='#FFFFFF'>U</t>]"} else {""};
_return pushBack format ["<t color='#%1'>State: %2</t> [StableVitals: %3] %4", _color, _targetState, _hasStableVitals, _unconcFlag];
// Blood:
private _bloodVolume = GET_BLOOD_VOLUME(_unit);
private _bloodLoss = GET_BLOOD_LOSS(_unit);
private _secondsToHeartstop = if (_bloodLoss != 0) then {format ["[<t color ='#FF9999'>Time Left:</t> %1 sec]", (((_bloodVolume - BLOOD_VOLUME_CLASS_4_HEMORRHAGE) max 0) / _bloodLoss) toFixed 1]} else {""};
_return pushBack format ["Blood: %1", _bloodVolume toFixed 3];
_return pushBack format [" - [Loss: %1] %2", _bloodLoss toFixed 5, _secondsToHeartstop];
// Heart:
private _cardiacOutput = [_unit] call EFUNC(medical_status,getCardiacOutput);
private _heartRate = GET_HEART_RATE(_unit);
GET_BLOOD_PRESSURE(_unit) params ["_bpLow", "_bpHigh"];
_return pushBack format ["CardiacOutput %1", _cardiacOutput toFixed 5];
_return pushBack format [" - [HR: %1] [BP: %2 / %3]", _heartRate toFixed 1, _bpLow toFixed 1, _bpHigh toFixed 1];
// Pain:
private _pain = GET_PAIN(_unit);
private _painSuppress = GET_PAIN_SUPPRESS(_unit);
private _painLevel = GET_PAIN_PERCEIVED(_unit);
_return pushBack format ["Effective Pain: %1", _painLevel toFixed 3];
_return pushBack format [" - [Pain: %1] [Suppress: %2]", _pain toFixed 3, _painSuppress toFixed 3];
// Damage:
private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]];
private _limping = if (_unit getVariable [QEGVAR(medical,isLimping), false]) then {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
_return pushBack format ["Damage: [H: %1] [B: %2] %3", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2, _limping];
_return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2];
// Tourniquets:
_return pushBack "------- Tourniquets: -------";
private _tourniquets = GET_TOURNIQUETS(_unit);
private _occludedMedications = _unit getVariable [QEGVAR(medical,occludedMedications), []];
{
private _tPartNum = _forEachIndex;
if (_x != 0) then {
_return pushBack format ["%1 [Time On: %2]", ALL_SELECTIONS select _tPartNum, (CBA_missionTime - _x) toFixed 1];
};
{
_x params ["", "_medClassname", "_medPartNum"];
if (_medPartNum == _tPartNum) then {
_return pushBack format [" - Occluded Med: %1", _medClassname];
};
} forEach _occludedMedications;
} forEach _tourniquets;
// Wounds:
_return pushBack "------- Wounds: -------";
private _wounds = _unit getVariable [QEGVAR(medical,openWounds), []];
{
_x params ["", "_xClassID", "_xBodyPartN", "_xAmountOf", "_xBleeding", "_xDamage", "_xCategory"];
_return pushBack format ["%1: [%2-%3] [x%4] [Bld: %5] [Dmg: %6]", ALL_SELECTIONS select _xBodyPartN, _xClassID, _xCategory, _xAmountOf toFixed 1, _xBleeding toFixed 4, _xDamage toFixed 2];
} forEach _wounds;
// IVs:
_return pushBack "------- IVs: -------";
private _ivBags = _unit getVariable [QEGVAR(medical,ivBags), []];
{
_x params ["_xVolumeAdded", "_xType", "_xBodyPartN"];
_return pushBack format ["%1: %2 [%3 ml]", ALL_SELECTIONS select _xBodyPartN, _xType, _xVolumeAdded];
} forEach _ivBags;
// Footer:
_return pushBack "</t>";
// Return:
_return joinString "<br/>"
}, [30]] call EFUNC(common,watchVariable);

View File

@ -1,24 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for checking the blood pressure of the patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ACE_medical_fnc_actionCheckBloodPressure
*
* Public: No
*/
params ["_caller", "_target", "_selectionName"];
if (local _target) then {
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
} else {
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
};

View File

@ -1,66 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for checking the blood pressure of a patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ACE_medical_fnc_actionCheckBloodPressureLocal
*
* Public: No
*/
params ["_caller", "_target", "_selectionName"];
private _bloodPressure = if (!alive _target) then {
[0,0]
} else {
[_target] call FUNC(getBloodPressure)
};
_bloodPressure params [ "_bloodPressureLow", "_bloodPressureHigh"];
private _output = "";
private _logOutPut = "";
if ([_caller] call FUNC(isMedic)) then {
_output = LSTRING(Check_Bloodpressure_Output_1);
_logOutPut = format["%1/%2",round(_bloodPressureHigh),round(_bloodPressureLow)];
} else {
if (_bloodPressureHigh > 20) then {
_output = LSTRING(Check_Bloodpressure_Output_2);
_logOutPut = LSTRING(Check_Bloodpressure_Low);
if (_bloodPressureHigh > 100) then {
_output = LSTRING(Check_Bloodpressure_Output_3);
_logOutPut = LSTRING(Check_Bloodpressure_Normal);
if (_bloodPressureHigh > 160) then {
_output = LSTRING(Check_Bloodpressure_Output_4);
_logOutPut = LSTRING(Check_Bloodpressure_High);
};
};
} else {
if (random(10) > 3) then {
_output = LSTRING(Check_Bloodpressure_Output_5);
_logOutPut = LSTRING(Check_Bloodpressure_NoBloodpressure);
} else {
_output = LSTRING(Check_Bloodpressure_Output_6);
//Fail to find pressure, no logoutput
};
};
};
if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(hasTourniquetAppliedTo)}) then {
_output = LSTRING(Check_Bloodpressure_Output_6);
_logOutPut = "";
};
[QEGVAR(common,displayTextStructured), [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller], [_caller]] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller, false, true] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
[_target,"quick_view", LSTRING(Check_Bloodpressure_Log), [[_caller, false, true] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
};

View File

@ -1,24 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for checking the pulse or heart rate of the patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ACE_medical_fnc_actionCheckPulse
*
* Public: No
*/
params ["_caller","_target", "_selectionName"];
if (local _target) then {
[QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
} else {
[QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
};

View File

@ -1,58 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Local callback for checking the pulse of a patient
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ACE_medical_fnc_actionCheckPulseLocal
*
* Public: No
*/
params ["_caller", "_unit", "_selectionName"];
private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
if (!alive _unit) then {
_heartRate = 0;
};
private _heartRateOutput = LSTRING(Check_Pulse_Output_5);
private _logOutPut = LSTRING(Check_Pulse_None);
if (_heartRate > 1.0) then {
if ([_caller] call FUNC(isMedic)) then {
_heartRateOutput = LSTRING(Check_Pulse_Output_1);
_logOutPut = format["%1",round(_heartRate)];
} else {
// non medical personel will only find a pulse/HR
_heartRateOutput = LSTRING(Check_Pulse_Output_2);
_logOutPut = LSTRING(Check_Pulse_Weak);
if (_heartRate > 60) then {
if (_heartRate > 100) then {
_heartRateOutput = LSTRING(Check_Pulse_Output_3);
_logOutPut = LSTRING(Check_Pulse_Strong);
} else {
_heartRateOutput = LSTRING(Check_Pulse_Output_4);
_logOutPut = LSTRING(Check_Pulse_Normal);
};
};
};
};
if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(hasTourniquetAppliedTo)}) then {
_heartRateOutput = LSTRING(Check_Pulse_Output_5);
_logOutPut = LSTRING(Check_Pulse_None);
};
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
[_unit,"quick_view", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
};

View File

@ -1,47 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for diagnosing in basic medical
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ACE_medical_fnc_actionDiagnose
*
* Public: No
*/
params ["_caller", "_target"];
private _genericMessages = [LSTRING(diagnoseMessage), [_target] call EFUNC(common,getName)];
if (alive _target) then {
_genericMessages pushBack LSTRING(diagnoseAlive);
} else {
_genericMessages pushBack LSTRING(diagnoseDead);
};
if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushBack LSTRING(lostBloodALot);
} else {
_genericMessages pushBack LSTRING(lostBlood);
};
} else {
_genericMessages pushBack LSTRING(noBloodloss);
};
if (alive _target) then {
if (_target getVariable[QGVAR(hasPain), false]) then {
_genericMessages pushBack LSTRING(inPain);
} else {
_genericMessages pushBack LSTRING(noPain);
};
};
[QEGVAR(common,displayTextStructured), [_genericMessages, 3.0, _caller], [_caller]] call CBA_fnc_targetEvent;

View File

@ -1,56 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Action for removing the tourniquet on specified selection
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: SelectionName <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, kevin, "selection"] call ace_medical_fnc_actionRemoveTourniquet
*
* Public: Yes
*/
params ["_caller", "_target", "_selectionName"];
TRACE_3("params",_caller,_target,_selectionName);
// grab the required data
private _part = [_selectionName] call FUNC(selectionNameToNumber);
private _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
// Check if there is a tourniquet on this bodypart
if ((_tourniquets select _part) == 0) exitWith {
[QEGVAR(common,displayTextStructured), [LSTRING(noTourniquetOnBodyPart), 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
// Removing the tourniquet
_tourniquets set [_part, 0];
_target setVariable [QGVAR(tourniquets), _tourniquets, true];
// Adding the tourniquet item to the caller
_caller addItem "ACE_tourniquet";
//Handle all injected medications now that blood is flowing:
private _delayedMedications = _target getVariable [QGVAR(occludedMedications), []];
private _updatedArray = false;
TRACE_2("meds",_part,_delayedMedications);
{
_x params ["", "", "_medPartNum"];
if (_part == _medPartNum) then {
TRACE_1("delayed medication call after tourniquet removeal",_x);
[QGVAR(treatmentAdvanced_medicationLocal), _x, [_target]] call CBA_fnc_targetEvent;
_delayedMedications set [_forEachIndex, -1];
_updatedArray = true;
};
} forEach _delayedMedications;
if (_updatedArray) then {
_delayedMedications = _delayedMedications - [-1];
_target setVariable [QGVAR(occludedMedications), _delayedMedications, true];
};

View File

@ -7,56 +7,57 @@
* Arguments:
* 0: The Unit <OBJECT>
* 1: Damage to Add <NUMBER>
* 2: Selection ("head", "body", "hand_l", "hand_r", "leg_l", "leg_r") <STRING>
* 2: Body part ("Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg") <STRING>
* 3: Projectile Type <STRING>
* 4: Source <OBJECT>
*
* Return Value:
* HandleDamage's return <NUMBER>
* Successful <BOOL>
*
* Example:
* [player, 0.8, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit
* [cursorTarget, 1, "body", "stab"] call ace_medical_fnc_addDamageToUnit
* [player, 0.8, "rightleg", "bullet"] call ace_medical_fnc_addDamageToUnit
* [cursorTarget, 1, "body", "stab", player] call ace_medical_fnc_addDamageToUnit
*
* Public: Yes
*/
// #define DEBUG_TESTRESULTS
params [["_unit", objNull, [objNull]], ["_damageToAdd", -1, [0]], ["_selection", "", [""]], ["_typeOfDamage", "", [""]]];
TRACE_4("params",_unit,_damageToAdd,_selection,_typeOfDamage);
params [["_unit", objNull, [objNull]], ["_damageToAdd", -1, [0]], ["_bodyPart", "", [""]], ["_typeOfDamage", "", [""]], ["_instigator", objNull, [objNull]]];
TRACE_5("params",_unit,_damageToAdd,_bodyPart,_typeOfDamage,_instigator);
_selection = toLower _selection;
if ((isNull _unit) || {!local _unit} || {!alive _unit}) exitWith {ERROR_1("addDamageToUnit - badUnit %1", _this); -1};
if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1", _this); -1};
if (!(_selection in GVAR(SELECTIONS))) exitWith {ERROR_1("addDamageToUnit - bad selection %1", _this); -1};
private _bodyPartIndex = ALL_BODY_PARTS find (toLower _bodyPart);
if (isNull _unit || {!local _unit} || {!alive _unit}) exitWith {ERROR_1("addDamageToUnit - badUnit %1", _this); false};
if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1", _this); false};
if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1", _this); false};
//Get the hitpoint and the index
private _hitpoint = [_unit, _selection, true] call FUNC(translateSelections);
(getAllHitPointsDamage _unit) params [["_allHitPoints", []]];
private _hitpointIndex = -1;
{ //case insensitive find
if (_x == _hitpoint) exitWith {_hitpointIndex = _forEachIndex;};
} forEach _allHitPoints;
if (_hitpointIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad hitpointIndex %1", _this); -1};
// Extension is case sensitive and expects this format (different from ALL_BODY_PARTS)
_bodyPart = ["Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"] select _bodyPartIndex;
private _currentDamage = _unit getHitIndex _hitpointIndex;
if (!isNull _instigator) then {
_unit setVariable [QEGVAR(medical_engine,lastShooter), _instigator];
_unit setVariable [QEGVAR(medical_engine,lastInstigator), _instigator];
};
#ifdef DEBUG_TESTRESULTS
private _checkAtFrame = diag_frameno + 5;
private _partNumber = [_selection] call FUNC(selectionNameToNumber);
private _startDmg = (_unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _partNumber;
private _debugCode = {
params ["", "_unit", "_startDmg", "_damageToAdd", "_partNumber"];
private _endDmg = (_unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _partNumber;
if ((!alive _unit) || {_endDmg > _startDmg}) then {
INFO_6("addDamageToUnit - PASSED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg);
} else {
ERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg);
};
};
[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call CBA_fnc_waitUntilAndExecute;
private _startDmg = +(_unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]]);
private _startPain = GET_PAIN(_unit);
#endif
private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex, objNull] call FUNC(handleDamage);
TRACE_1("handleDamage called",_return);
[QEGVAR(medical,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent;
_return
#ifdef DEBUG_TESTRESULTS
private _endDmg = _unit getVariable [QEGVAR(medical,bodyPartDamage), [-1]];
private _endPain = GET_PAIN(_unit);
private _typeOfDamageAdj = _typeOfDamage call EFUNC(medical_damage,getTypeOfDamage);
private _config = configFile >> "ACE_Medical_Injuries" >> "damageTypes" >> _typeOfDamageAdj;
private _selectionSpecific = true;
if (isClass _config) then {
_selectionSpecific = (getNumber (_config >> "selectionSpecific")) == 1;
} else {
WARNING_2("Damage type not in config [%1:%2]", _typeOfDamage, _config);
};
INFO_4("Debug AddDamageToUnit: Type [%1] - Selection Specific [%2] - HitPoint [%3 -> %4]",_typeOfDamage,_selectionSpecific,_startDmg select _bodyPartIndex,_endDmg select _bodyPartIndex);
INFO_4("Pain Change [%1 -> %2] - BodyPartDamage Change [%3 -> %4]",_startPain,_endPain,_startDmg,_endDmg);
#endif
true

View File

@ -1,27 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal, KoffeinFlummi
* Increase the Heart Rate of a local unit by given number within given amount of seconds.
*
* Arguments:
* 0: The unit <OBJECT>
* 1: value <NUMBER>
* 2: time in seconds <NUMBER>
* 3: callback <CODE>
*
* Return Value:
* None
*
* Example:
* [bob, 1, 5, {callback}] call ace_medical_fnc_addHeartRateAdjustment
*
* Public: Yes
*/
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
private _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
_adjustment pushBack [_value, _time, _callBack];
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment];
["ace_heartRateAdjustmentAdded", [_unit, _value, _time]] call CBA_fnc_localEvent;

View File

@ -1,27 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Adds new condition for the unconscious state. Conditions are not actively checked for units unless unit is in unconscious state.
*
* Arguments:
* 0-N: Code, should return a boolean <CODE>
*
* Return Value:
* None
*
* Example:
* [[{bob}]] call ace_medical_fnc_addUnconsciousCondition
*
* Public: Yes
*/
if (isnil QGVAR(unconsciousConditions)) then {
GVAR(unconsciousConditions) = [];
};
if (_this isEqualType []) then {
{
if (_x isEqualType {}) then {
GVAR(unconsciousConditions) pushback _x;
};
} foreach _this;
};

View File

@ -1,43 +0,0 @@
#include "script_component.hpp"
/*
* Author: esteldunedain
* Create one unload action per unconscious passenger
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return Value:
* Children actions <ARRAY>
*
* Example:
* [car, kevin, [params]] call ACE_medical_fnc_addUnloadPatientActions
*
* Public: No
*/
params ["_vehicle", "_player", "_parameters"];
private _actions = [];
{
private _unit = _x;
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
_actions pushBack
[
[
str(_unit),
[_unit, true] call EFUNC(common,getName),
"",
{[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);},
{true},
{},
[_unit]
] call EFUNC(interact_menu,createAction),
[],
_unit
];
};
} forEach crew _vehicle;
_actions

View File

@ -1,32 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Enabled the vitals loop for a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ace_medical_fnc_addVitalLoop
*
* Public: Yes
*/
params ["_unit", ["_force", false]];
if !([_unit] call FUNC(hasMedicalEnabled) || _force) exitWith {};
if !(local _unit) exitWith {
[QGVAR(addVitalLoop), [_unit, _force], _unit] call CBA_fnc_targetEvent;
};
// Quit if the unit already has a vital loop, or is dead, unless it's forced
if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
// Schedule the loop to be executed again 1 sec later
// @todo: should the loop be started righ away instead?
_unit setVariable [QGVAR(addedToUnitLoop), true, true];
[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute;

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Interface to allow external modules to safely adjust pain levels.
* Public interface to allow external modules to safely adjust pain levels.
*
* Arguments:
* 0: The patient <OBJECT>
@ -17,18 +17,11 @@
*/
params ["_unit", "_addedPain"];
//Only run on local units:
if (!local _unit) exitWith {ERROR("unit is not local");};
TRACE_3("ACE_DEBUG: adjustPainLevel Called",_unit, _pain, _addedPain);
//Ignore if medical system disabled:
if (GVAR(level) == 0) exitWith {};
if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit); };
private _pain = ((_unit getVariable [QGVAR(pain), 0]) + _addedPain) max 0;
private _pain = GET_PAIN(_unit);
_unit setVariable [QGVAR(pain), _pain];
_pain = 0 max (_pain + _addedPain) min 1;
//Start up the vital watching (if not already running)
[_unit] call FUNC(addVitalLoop);
_pain;
_unit setVariable [VAR_PAIN, _pain];

View File

@ -1,96 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Check if the treatment action can be performed.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
* 2: Selection name <STRING>
* 3: ACE_Medical_Treatments Classname <STRING>
*
* Return Value:
* Can Treat <BOOL>
*
* Example:
* [player, cursorTarget, "Head", "SurgicalKit"] call ace_medical_fnc_canTreat
*
* Public: Yes
*/
params ["_caller", "_target", "_selectionName", "_className"];
if !(_target isKindOf "CAManBase") exitWith { false };
private _config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className);
if !(isClass _config) exitwith {false};
// Allow self treatment check
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
private _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
getNumber (_config >> "requiredMedic");
} else {
// Check for required class
if (isText (_config >> "requiredMedic")) exitwith {
missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]
};
0;
};
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false };
private _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false };
private _allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false };
private _return = true;
if (getText (_config >> "condition") != "") then {
private _condition = getText (_config >> "condition");
if (isnil _condition) then {
_condition = compile _condition;
} else {
_condition = missionNamespace getVariable _condition;
};
if (_condition isEqualType false) then {
_return = _condition;
} else {
_return = [_caller, _target, _selectionName, _className] call _condition;
};
};
if (!_return) exitwith { false };
private _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
} else {
getNumber(_config >> "patientStateCondition")
};
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
private _locations = getArray (_config >> "treatmentLocations");
if ("All" in _locations) exitwith { true };
private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
{
if (_x == "field") exitwith {_return = true;};
if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;};
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
if !(isnil _x) exitwith {
private _val = missionNamespace getVariable _x;
if (_val isEqualType 0) then {
_return = switch (_val) do {
case 0: {true}; //AdvancedMedicalSettings_anywhere
case 1: {call _medVeh}; //AdvancedMedicalSettings_vehicle
case 2: {call _medFacility}; //AdvancedMedicalSettings_facility
case 3: {(call _medFacility) || {call _medVeh}}; //AdvancedMedicalSettings_vehicleAndFacility
default {false}; //Disabled
};
};
};
} foreach _locations;
_return;

View File

@ -1,83 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Makes a copy of a dead body. For handling dead bodies for actions such as load and carry.
*
* Arguments:
* 0: The oldbody <OBJECT>
* 1: The caller <OBJECT>
*
* Return Value:
* Returns the copy of the unit. If no copy could be made, returns the oldBody <OBJECT>
*
* Example:
* [bob, kevin] call ACE_medical_fnc_copyDeadBody
*
* Public: No
*/
params ["_oldBody", "_caller"];
if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies
private _name = _oldBody getVariable ["ACE_name", "unknown"];
private _class = typeOf _oldBody;
private _side = side _caller;
private _group = createGroup _side;
private _position = getPos _oldBody;
private _newUnit = _group createUnit [typeOf _oldBody, _position, [], 0, "NONE"];
_newUnit setVariable ["ACE_name", _name, true];
_newUnit disableAI "TARGET";
_newUnit disableAI "AUTOTARGET";
_newUnit disableAI "MOVE";
_newUnit disableAI "ANIM";
_newUnit disableAI "FSM";
removeallweapons _newUnit;
removeallassigneditems _newUnit;
removeUniform _newUnit;
removeHeadgear _newUnit;
removeBackpack _newUnit;
removeVest _newUnit;
_newUnit addHeadgear (headgear _oldBody);
_newUnit addBackpack (backpack _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
_newUnit addVest (vest _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
_newUnit addUniform (uniform _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
{_newUnit addMagazine _x} count (magazines _oldBody);
{_newUnit addWeapon _x} count (weapons _oldBody);
{_newUnit addItem _x} count (items _oldBody);
_newUnit selectWeapon (primaryWeapon _newUnit);
// We are attaching the old unit and hiding it, so we can keep the original unit until later.
_oldBody attachTo [_newUnit, [0,0,0]];
if (isMultiplayer) then {
hideObjectGlobal _oldBody;
} else {
hideObject _oldBody;
};
_newUnit setVariable [QGVAR(copyOfUnit), _oldBody, true];
_oldBody setVariable [QGVAR(hasCopy), _newUnit, true];
_newUnit setVariable ["ACE_isDead", true, true];
_newUnit setVariable ["ACE_isUnconscious", true, true];
_newUnit setVariable [QGVAR(disableInteraction), true, true];
_oldBody setVariable [QGVAR(disableInteraction), true, true];
[_newUnit, 0.89] call FUNC(setStructuralDamage);
_newUnit;

View File

@ -1,95 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Spawns litter for the treatment action on the ground around the target
*
* Arguments:
* 0: The Caller <OBJECT>
* 1: The target <OBJECT>
* 2: The treatment Selection Name <STRING>
* 3: The treatment classname <STRING>
* 4: ? <UNKNOWN>
* 5: Users of Items <UNKNOWN>
* 6: Blood Loss on selection (previously called _previousDamage) <NUMBER>
*
* Return Value:
* None
*
* Example:
* [bob, kevin, "selection", "classname", , , 5] call ACE_medical_fnc_createLitter
*
* Public: No
*/
#define MIN_ENTRIES_LITTER_CONFIG 3
params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"];
TRACE_6("params",_caller,_target,_selectionName,_className,_usersOfItems,_bloodLossOnSelection);
//Ensures comptibilty with other possible medical treatment configs
private _previousDamage = _bloodLossOnSelection;
if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || {vehicle _target != _target}) exitwith {};
private _config = if (GVAR(level) >= 2) then {
(configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
} else {
(configFile >> "ACE_Medical_Actions" >> "Basic" >> _className)
};
if !(isClass _config) exitwith {TRACE_1("No action config", _className);};
if !(isArray (_config >> "litter")) exitwith {TRACE_1("No litter config", _className);};
private _litter = getArray (_config >> "litter");
private _createLitter = {
params ["_unit", "_litterClass"];
// @TODO: handle carriers over water
// For now, don't spawn litter if we are over water to avoid floating litter
if (surfaceIsWater (getPos _unit)) exitWith { false };
private _position = getPosATL _unit;
_position params ["_posX", "_posY", "_posZ"];
_position = [_posX + (random 2) - 1, _posY + (random 2) - 1, _posZ];
private _direction = (random 360);
// Create the litter, and timeout the event based on the cleanup delay
// The cleanup delay for events in MP is handled by the server side
TRACE_3("Creating Litter on server",_litterClass,_position,_direction);
[QGVAR(createLitterServer), [_litterClass, _position, _direction]] call CBA_fnc_serverEvent;
true
};
private _createdLitter = [];
{
if (_x isEqualType []) then {
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {};
_x params ["_selection", "_litterCondition", "_litterOptions"];
if (toLower _selection in [toLower _selectionName, "all"]) then { // in is case sensitve. We can be forgiving here, so lets use toLower.
if (isnil _litterCondition) then {
_litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}};
} else {
_litterCondition = missionNamespace getVariable _litterCondition;
if (!(_litterCondition isEqualType {})) then {_litterCondition = {false}};
};
if !([_caller, _target, _selectionName, _className, _usersOfItems, _bloodLossOnSelection] call _litterCondition) exitwith {};
if (_litterOptions isEqualType []) then {
// Loop through through the litter options and place the litter
{
if (_x isEqualType [] && {(count _x > 0)}) then {
[_target, selectRandom _x] call _createLitter;
};
if (_x isEqualType "") then {
[_target, _x] call _createLitter;
};
} foreach _litterOptions;
};
};
};
} foreach _litter;

View File

@ -1,59 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Determine If Fatal
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Part <NUMBER>
* 2: with Damage <NUMBER> (default: 0)
*
* Return Value:
* None
*
* Example:
* [bob, 2, 5] call ACE_medical_fnc_determineIfFatal
*
* Public: No
*/
#define INCREASE_CHANCE_HEAD 0.05
#define INCREASE_CHANCE_TORSO 0.03
#define INCREASE_CHANGE_LIMB 0.01
#define CHANGE_FATAL_HEAD 0.7
#define CHANGE_FATAL_TORSO 0.6
#define CHANGE_FATAL_LIMB 0.1
params ["_unit", "_part", ["_withDamage", 0]];
if (!alive _unit) exitWith {true};
if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true };
if (_part < 0 || _part > 5) exitWith {false};
// Find the correct Damage threshold for unit.
private _damageThreshold = [1,1,1];
if ([_unit, GVAR(remoteControlledAI)] call EFUNC(common,isPlayer)) then {
_damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]];
} else {
_damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]];
};
_damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"];
private _damageBodyPart = ((_unit getVariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
// Check if damage to body part is higher as damage head
if (_part == 0) exitWith {
private _chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10);
(_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage torso
if (_part == 1) exitWith {
private _chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10);
(_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage limbs
// We use a slightly lower decrease for limbs, as we want any injuries done to those to be less likely to be fatal compared to head shots or torso.
private _chanceFatal = CHANGE_FATAL_LIMB + ((INCREASE_CHANGE_LIMB * (_damageBodyPart - _thresholdLimbs)) * 10);
(_damageBodyPart >= _thresholdLimbs && {(_chanceFatal >= random(1))});

View File

@ -1,196 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Displays the patient information for given unit.
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Show <BOOL> (default: true)
* 2: Selection <NUMBER> (default: 0)
*
* Return Value:
* None
*
* Example:
* [bob, true, 2] call ACE_medical_fnc_displayPatientInformation
*
* Public: No
*/
#define MAX_DISTANCE 10
// Exit for basic medical
if (GVAR(level) < 2) exitWith {};
params ["_target", ["_show", true], ["_selectionN", 0]];
GVAR(currentSelectedSelectionN) = [0, _selectionN] select (IS_SCALAR(_selectionN));
GVAR(displayPatientInformationTarget) = [ObjNull, _target] select _show;
if (_show) then {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];
[{
params ["_args", "_idPFH"];
_args params ["_target", "_selectionN"];
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
if ((ACE_player distance _target > MAX_DISTANCE) && {vehicle _target != vehicle ACE_player}) exitWith {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
[_idPFH] call CBA_fnc_removePerFrameHandler;
[QEGVAR(common,displayTextStructured), [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player], [ACE_player]] call CBA_fnc_targetEvent;
};
disableSerialization;
private _display = uiNamespace getVariable QGVAR(DisplayInformation);
if (isnil "_display") exitwith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
private _allInjuryTexts = [];
private _genericMessages = [];
private _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN;
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
if (_target getVariable[QGVAR(isBleeding), false]) then {
_genericMessages pushback [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]];
};
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushback [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]];
};
if (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
_genericMessages pushback [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
};
if (_target getVariable[QGVAR(hasPain), false]) then {
_genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
};
private _totalIvVolume = 0;
private _bloodBags = _target getVariable [QGVAR(ivBags), []];
{
_x params ["_bagVolumeRemaining"];
_totalIvVolume = _totalIvVolume + _bagVolumeRemaining;
} foreach _bloodBags;
if (_totalIvVolume >= 1) then {
_genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
};
private _damaged = [false, false, false, false, false, false];
private _selectionBloodLoss = [0,0,0,0,0,0];
private _openWounds = _target getVariable [QGVAR(openWounds), []];
{
_x params ["", "_x1", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding
if (_amountOf > 0) then {
_damaged set [_selectionX, true];
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
if (_selectionN == _selectionX) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf >= 1) then {
// TODO localization
_allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, ceil _amountOf], [1,1,1,1]];
} else {
// TODO localization
_allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]];
};
};
};
} foreach _openWounds;
private _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []];
{
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding
if !(_damaged select _selectionX) then {
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
};
if (_selectionN == _selectionX) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf > 0) then {
if (_amountOf >= 1) then {
// TODO localization
_allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, ceil _amountOf], [0.88,0.7,0.65,1]];
} else {
// TODO localization
_allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
};
};
};
} foreach _bandagedwounds;
// Handle the body image coloring
private _availableSelections = [50,51,52,53,54,55];
{
private _total = _x;
private _red = 1;
private _green = 1;
private _blue = 1;
if (_total > 0) then {
if (_damaged select _forEachIndex) then {
_green = (0.9 - _total) max 0;
_blue = _green;
} else {
_green = (0.9 - _total) max 0;
_red = _green;
//_blue = _green;
};
};
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
} foreach _selectionBloodLoss;
// update tourniquet information
[_display, _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]] call FUNC(updateTourniquets);
private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
{
_x params ["_add", "_color"];
_lbCtrl lbAdd _add;
_lbCtrl lbSetColor [_foreachIndex, _color];
} foreach _genericMessages;
private _amountOfGeneric = count _genericMessages;
{
_x params ["_add", "_color"];
_lbCtrl lbAdd _add;
_lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _color];
} foreach _allInjuryTexts;
if (count _allInjuryTexts == 0) then {
_lbCtrl lbAdd (localize LSTRING(NoInjuriesBodypart));
};
private _logCtrl = (_display displayCtrl 302);
lbClear _logCtrl;
private _logs = _target getVariable [QGVAR(logFile_Activity), []];
{
_x params ["_message", "_moment", "_type", "_arguments"];
if (isLocalized _message) then {
_message = localize _message;
};
{
if (_x isEqualType "" && {isLocalized _x}) then {
_arguments set [_foreachIndex, localize _x];
};
} foreach _arguments;
_message = format([_message] + _arguments);
_logCtrl lbAdd format["%1 %2", _moment, _message];
} foreach _logs;
private _triageStatus = [_target] call FUNC(getTriageStatus);
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
(_display displayCtrl 303) ctrlSetBackgroundColor (_triageStatus select 2);
}, 0, [_target, GVAR(currentSelectedSelectionN)]] call CBA_fnc_addPerFrameHandler;
} else {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
};

View File

@ -1,78 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Display triage card for a unit
*
* Arguments:
* 0: The unit <OBJECT>
* 1: Show <BOOL> (default: true)
*
* Return Value:
* None
*
* Example:
* [bob, true] call ace_medical_fnc_displayTriageCard
*
* Public: Yes
*/
params ["_target", ["_show", true]];
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
if (_show) then {
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"];
createDialog QGVAR(triageCard);
[{
params ["_args", "_idPFH"];
_args params ["_target"];
if (GVAR(TriageCardTarget) != _target) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
disableSerialization;
private _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
private _triageCardTexts = [];
// TODO fill the lb with the appropiate information for the patient
private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
private _log = _target getVariable [QGVAR(triageCard), []];
{
_x params ["_item", "_amount"];
private _message = _item;
if (isClass(configFile >> "CfgWeapons" >> _item)) then {
_message = getText(configFile >> "CfgWeapons" >> _item >> "DisplayName");
} else {
if (isLocalized _message) then {
_message = localize _message;
};
};
_triageCardTexts pushBack format["%1x - %2", _amount, _message];
} forEach _log;
if (count _triageCardTexts == 0) then {
_lbCtrl lbAdd (localize LSTRING(TriageCard_NoEntry));
};
{
_lbCtrl lbAdd _x;
} forEach _triageCardTexts;
private _triageStatus = [_target] call FUNC(getTriageStatus);
_triageStatus params ["_text", "", "_color"];
(_display displayCtrl 2000) ctrlSetText _text;
(_display displayCtrl 2000) ctrlSetBackgroundColor _color;
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
} else {
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
closeDialog 7010;
};

View File

@ -1,37 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Calculate the total blood loss of a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* Total blood loss of unit <NUMBER>
*
* Example:
* [bob] call ACE_medical_fnc_getBloodLoss
*
* Public: No
*/
#define BLOODLOSSRATE_BASIC 0.2
// TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical).
params ["_unit"];
private _totalBloodLoss = 0;
private _tourniquets = _unit getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
{
if ((_tourniquets select (_x select 2)) == 0) then {
// total bleeding ratio * percentage of injury left
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
// (((BLOODLOSS_SMALL_WOUNDS * (_x select 0))) + ((BLOODLOSS_MEDIUM_WOUNDS * (_x select 1))) + ((BLOODLOSS_LARGE_WOUNDS * (_x select 2))) * (_cardiacOutput / DEFAULT_CARDIAC_OUTPUT));
};
} forEach (_unit getVariable [QGVAR(openWounds), []]);
{
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
} forEach (_unit getVariable [QGVAR(internalWounds), []]);
_totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0);

View File

@ -1,56 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Calculates the blood volume change and decreases the IVs given to the unit.
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Global Sync Values (bloodbags) <BOOL>
*
* Return Value:
* Blood volume change (in % total) <NUMBER>
*
* Example:
* [bob, true] call ACE_medical_fnc_getBloodVolumeChange
*
* Public: No
*/
/*
IV Change per second calculation:
250ml should take 60 seconds to fill. 250/60 = 4.166.
Basic medical is 10x (will take 6 seconds for 250ml)
*/
#define IV_CHANGE_PER_SECOND ([41.66, 4.166] select (GVAR(level) >= 2))
params ["_unit", "_syncValues"];
private _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
private _bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
if (!isNil {_unit getVariable QGVAR(ivBags)}) then {
if (_bloodVolume < 100) then {
private _bloodBags = _unit getVariable [QGVAR(ivBags), []];
_bloodBags = _bloodBags apply {
_x params ["_bagVolumeRemaining"];
private _bagChange = IV_CHANGE_PER_SECOND min _bagVolumeRemaining; // absolute value of the change in miliLiters
_bagVolumeRemaining = _bagVolumeRemaining - _bagChange;
_bloodVolumeChange = _bloodVolumeChange + (_bagChange / 70); // ((bag change in ml) / (body total:7000ml)) out of 100 percent
if (_bagVolumeRemaining < 0.01) then {
[]
} else {
[_bagVolumeRemaining];
};
};
_bloodBags = _bloodBags - [[]]; // remove empty bags
if (_bloodBags isEqualTo []) then {
_unit setVariable [QGVAR(ivBags), nil, true]; // no bags left - clear variable (always globaly sync this)
} else {
_unit setVariable [QGVAR(ivBags), _bloodBags, _syncValues];
};
} else {
_unit setVariable [QGVAR(ivBags), nil, true]; // blood volume = 100% - clear variable (always globaly sync this)
};
};
_bloodVolumeChange;

View File

@ -1,86 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Get the change in the heart rate. Used for the vitals calculations. Calculated in one seconds.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* Change in heart Rate <NUMBER>
*
* Example:
* [bob] call ACE_medical_fnc_getHeartRateChange
*
* Public: No
*/
#define HEART_RATE_MODIFIER 0.02
params ["_unit"];
private _hrIncrease = 0;
if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then {
private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
private _bloodLoss = [_unit] call FUNC(getBloodLoss);
private _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
{
_x params ["_values", "_time", "_callBack"];
if (abs _values > 0) then {
if (_time <= 0) then {
_time = 1;
};
private _change = (_values / _time);
_hrIncrease = _hrIncrease + _change;
if ( (_time - 1) <= 0) then {
_time = 0;
_adjustment set [_forEachIndex, ObjNull];
[_unit] call _callBack;
} else {
_time = _time - 1;
_adjustment set [_forEachIndex, [_values - _change, _time]];
};
} else {
_adjustment set [_forEachIndex, ObjNull];
[_unit] call _callBack;
};
} forEach _adjustment;
_adjustment = _adjustment - [ObjNull];
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment];
private _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100];
if (_bloodVolume > 75) then {
if (_bloodLoss > 0.0) then {
if (_bloodLoss < 0.5) then {
if (_heartRate < 126) then {
_hrIncrease = _hrIncrease + 0.05;
};
} else {
if (_bloodLoss < 1) then {
if (_heartRate < 161) then {
_hrIncrease = _hrIncrease + 0.1;
};
} else {
if (_heartRate < 220) then {
_hrIncrease = _hrIncrease + 0.15;
};
};
};
} else {
// Stabalize it
if (_heartRate < (60 + round(random(10)))) then {
_hrIncrease = _hrIncrease + HEART_RATE_MODIFIER;
} else {
if (_heartRate > (77 + round(random(10)))) then {
_hrIncrease = _hrIncrease - HEART_RATE_MODIFIER;
};
};
};
} else {
_hrIncrease = _hrIncrease - HEART_RATE_MODIFIER;
};
};
_hrIncrease

View File

@ -1,30 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Get the triage status and information from a unit
*
* Arguments:
* 0: The unit <OBJECT>
*
* Return Value:
* 0: Name <STRING>
* 1: Status ID <NUMBER>
* 2: Color <ARRAY <NUMBER>>
*
* Example:
* [bob] call ace_medical_fnc_getTriageStatus
*
* Public: Yes
*/
params ["_unit"];
private _status = _unit getVariable [QGVAR(triageLevel), -1];
private _return = switch (_status) do {
case 1: {[localize LSTRING(Triage_Status_Minor), 1, [0, 0.5, 0, 0.9]]};
case 2: {[localize LSTRING(Triage_Status_Delayed), 2, [0.7, 0.5, 0, 0.9]]};
case 3: {[localize LSTRING(Triage_Status_Immediate), 3, [0.4, 0.07, 0.07, 0.9]]};
case 4: {[localize LSTRING(Triage_Status_Deceased), 4, [0, 0, 0, 0.9]]};
default {[localize LSTRING(Triage_Status_None), 0, [0, 0, 0, 0.9]]};
};
_return

View File

@ -1,31 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Get whatever or not a unit should be or stay unconscious.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* Should the unit stay unconscious? <BOOL>
*
* Example:
* [bob] call ace_medical_fnc_getUnconsciousCondition
*
* Public: Yes
*/
params ["_unit"];
if (isnil QGVAR(unconsciousConditions)) then {
GVAR(unconsciousConditions) = [];
};
private _return = false;
{
if ((_x isEqualType {}) && {([_unit] call _x)}) exitwith {
_return = true;
};
} foreach GVAR(unconsciousConditions);
_return

View File

@ -1,121 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handles the bandage of a patient.
*
* Arguments:
* 0: The target <OBJECT>
* 1: The impact <NUMBER>
* 2: Selection part number <NUMBER>
* 3: Injury index <NUMBER>
* 4: Injury <ARRAY>
* 5: Used Bandage type <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, 5, 5, 1, [injury], "bandage"] call ACE_medical_fnc_handleBandageOpening
*
* Public: No
*/
params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage"];
private _classID = _injury select 1;
private _className = GVAR(woundClassNames) select _classID;
// default, just in case..
private _reopeningChance = 0.1;
private _reopeningMinDelay = 120;
private _reopeningMaxDelay = 200;
// Get the default values for the used bandage
private _config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging");
if (isClass (_config >> _bandage)) then {
_config = (_config >> _bandage);
_reopeningChance = getNumber (_config >> "reopeningChance");
_reopeningMinDelay = getNumber (_config >> "reopeningMinDelay");
_reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay;
} else {
WARNING_2("No config for bandage [%1] config base [%2]", _bandage, _config);
};
if (isClass (_config >> _className)) then {
private _woundTreatmentConfig = (_config >> _className);
if (isNumber (_woundTreatmentConfig >> "reopeningChance")) then {
_reopeningChance = getNumber (_woundTreatmentConfig >> "reopeningChance");
};
if (isNumber (_woundTreatmentConfig >> "reopeningMinDelay")) then {
_reopeningMinDelay = getNumber (_woundTreatmentConfig >> "reopeningMinDelay");
};
if (isNumber (_woundTreatmentConfig >> "reopeningMaxDelay")) then {
_reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay;
};
} else {
WARNING_2("No config for wound type [%1] config base [%2]", _className, _config);
};
TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay);
private _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
private _injuryType = _injury select 1;
private _exist = false;
private _bandagedInjury = [];
{
if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith {
_exist = true;
private _existingInjury = _x;
_existingInjury set [3, (_existingInjury select 3) + _impact];
_bandagedWounds set [_foreachIndex, _existingInjury];
_bandagedInjury = _existingInjury;
};
} foreach _bandagedWounds;
if !(_exist) then {
// [ID, classID, bodypart, percentage treated, bloodloss rate]
_bandagedInjury = [_injury select 0, _injury select 1, _injury select 2, _impact, _injury select 4];
_bandagedWounds pushback _bandagedInjury;
};
_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true];
TRACE_1("",_reopeningChance);
// Check if we are ever going to reopen this
if (random(1) <= _reopeningChance) then {
private _delay = _reopeningMinDelay + random(_reopeningMaxDelay - _reopeningMinDelay);
TRACE_1("Will open",_delay);
[{
params ["_target", "_impact", "_part", "_injuryIndex", "_injury"];
TRACE_5("params",_target,_impact,_part,_injuryIndex,_injury);
//if (alive _target) then {
private _openWounds = _target getVariable [QGVAR(openWounds), []];
if ((count _openWounds) - 1 < _injuryIndex) exitwith {};
private _selectedInjury = _openWounds select _injuryIndex;
if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs
private _bandagedWounds = _target getVariable [QGVAR(bandagedWounds), []];
private _exist = false;
private _injuryId = _injury select 1;
{
if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith {
_exist = true;
private _existingInjury = _x;
_existingInjury set [3, ((_existingInjury select 3) - _impact) max 0];
_bandagedWounds set [_foreachIndex, _existingInjury];
};
} foreach _bandagedWounds;
if (_exist) then {
TRACE_2("Reopening Wound",_bandagedWounds,_openWounds);
_selectedInjury set [3, (_selectedInjury select 3) + _impact];
_openWounds set [_injuryIndex, _selectedInjury];
_target setVariable [QGVAR(bandagedWounds), _bandagedWounds, true];
_target setVariable [QGVAR(openWounds), _openWounds, true];
};
};
// Otherwise something went wrong, we we don't reopen them..
//};
}, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute;
};

View File

@ -1,27 +0,0 @@
#include "script_component.hpp"
/*
* Author: commy2
*
*
* Arguments:
* 0: Unit <OBJECT>
* 1: New Damage <SCALAR>
*
* Return Value:
* None
*
* Example:
* [bob, 2] call ACE_medical_fnc_handleCollisionDamage
*
* Public: No
*/
params ["_unit", "_newDamage"];
private _selection = "body";
private _totalDamage = (_unit getHit _selection) + _newDamage;
_unit setHit [_selection, _totalDamage];
systemChat format ["collision: %1", _this];

View File

@ -1,147 +0,0 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, Glowbal, commy2
* Main HandleDamage EH function.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter <OBJECT>
* 4: Projectile <OBJECT, STRING>
* 5: HitPointIndex (-1 for structural) <NUMBER>
* 6: Shooter <OBJECT>
*
* Return Value:
* Damage To Be Inflicted <NUMBER>
*
* Example:
* [bob, "leg", 2, kevin, "bullet", -1, kevin] call ACE_medical_fnc_handleDamage
*
* Public: No
*/
_this = _this select [0, 7];
params ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_hitPointIndex"];
TRACE_5("ACE_DEBUG: HandleDamage Called",_unit, _selection, _damage, _shooter, _projectile);
// bug, apparently can fire for remote units in special cases
if !(local _unit) exitWith {
TRACE_2("ACE_DEBUG: HandleDamage on remote unit!",_unit, isServer);
nil
};
// bug, assumed fixed, @todo excessive testing, if nothing happens remove
if (_projectile isEqualType objNull) then {
_projectile = typeOf _projectile;
_this set [4, _projectile];
};
TRACE_3("ACE_DEBUG: HandleDamage",_selection,_damage,_unit);
// If damage is in dummy hitpoints, "hands" and "legs", don't change anything
if (_selection == "hands") exitWith {_unit getHit "hands"};
if (_selection == "legs") exitWith {_unit getHit "legs"};
if (_selection == "arms") exitWith {_unit getHit "arms"};
// Deal with the new hitpoint and selection names introduced with Arma v1.50 and later.
// This will convert new selection names into selection names that the medical system understands
// TODO This should be cleaned up when we revisit the medical system at a later stage
// and instead we should deal with the new hitpoints directly
_selection = [_unit, _selection, _hitPointIndex] call FUNC(translateSelections);
_this set [1, _selection]; // ensure that the parameters are set correctly
// If the damage is being weird, we just tell it to fuck off. Ignore: "hands", "legs", "arms"
if (_selection != "" && {!(_selection in GVAR(SELECTIONS))}) exitWith {0};
// Exit if we disable damage temporarily
if !(_unit getVariable [QGVAR(allowDamage), true]) exitWith {
TRACE_3("ACE_DEBUG: HandleDamage damage disabled.",_selection,damage _unit,_unit);
if (_selection == "") then {
damage _unit
} else {
_unit getHit _selection
};
};
// Get return damage
private _damageReturn = _damage;
private _newDamage = _this call FUNC(handleDamage_caching);
// handleDamage_caching may have modified the projectile string
private _typeOfDamage = [_projectile] call FUNC(getTypeOfDamage);
TRACE_3("ACE_DEBUG: HandleDamage caching new damage",_selection,_newDamage,_unit);
private _typeIndex = (GVAR(allAvailableDamageTypes) find _typeOfDamage);
private _minLethalDamage = if (_typeIndex >= 0) then {
GVAR(minLethalDamages) select _typeIndex
} else {
0.01
};
if (!isNull _shooter) then {
_unit setvariable [QGVAR(lastDamageSource), _shooter, false];
};
private _vehicle = vehicle _unit;
private _effectiveSelectionName = _selection;
if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_shooter in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selection == ""}) then {
if (GVAR(enableVehicleCrashes)) then {
_effectiveSelectionName = _this select 1; //pull random selection from HDC
};
};
if ((_minLethalDamage <= _newDamage) && {[_unit, [_effectiveSelectionName] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then {
if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitwith {
_damageReturn = 0.9;
};
if ([_unit, false, true] call FUNC(setDead)) then {
_damageReturn = 1;
} else {
_damageReturn = _damageReturn min 0.89;
};
} else {
_damageReturn = _damageReturn min 0.89;
};
// Start the loop that tracks the unit vitals
[_unit] call FUNC(addVitalLoop);
if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith {
private _delayedUnconsicous = false;
if (_vehicle != _unit and {damage _vehicle >= 1}) then {
[_unit] call EFUNC(common,unloadPerson);
_delayedUnconsicous = true;
};
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith {
if (_unit getVariable ["ACE_isUnconscious", false]) exitwith {
[_unit, false, true] call FUNC(setDead);
0.89;
};
if (_delayedUnconsicous) then {
[{
[_this select 0, true] call FUNC(setUnconscious);
}, [_unit], 0.7] call CBA_fnc_waitAndExecute;
} else {
[{
[_this select 0, true] call FUNC(setUnconscious);
}, [_unit]] call CBA_fnc_execNextFrame;
};
0.89;
};
_damageReturn min 0.89;
};
if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {
if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then {
[_unit] call EFUNC(common,unloadPerson);
};
[_unit, false, true] call FUNC(setDead);
0.89;
};
TRACE_3("ACE_DEBUG: HandleDamage damage return",_selection,_damageReturn,_unit);
_damageReturn

View File

@ -1,73 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Advanced HandleDamage EH function.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter <OBJECT>
* 4: Projectile <STRING>
* 5: Hit part index of the hit point <NUMBER>
* 6: Shooter? <OBJECT>
* 7: Current damage to be returned <NUMBER>
*
* Return Value:
* None
*
* Example:
* [bob, "leg", 2, kevin, "bullet", 2, kevin, 2] call ACE_medical_fnc_handleDamage_advanced
*
* Public: No
*/
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "", "_newDamage"];
// For burning damage we will get a ton of very small hits of damage; they are too small to create any wounds
// Save them up in a variable and run when it is over a noticable amount
if ((_typeOfProjectile == "") && {_newDamage < 0.15} && {
_newDamage = _newDamage + (_unit getVariable [QGVAR(trivialDamage), 0]);
if (_newDamage > 0.15) then {
// if the new sum is large enough, reset variable and continue with it added in
_unit setVariable [QGVAR(trivialDamage), 0];
false
} else {
// otherwise just save the new sum into the variable and exit
_unit setVariable [QGVAR(trivialDamage), _newDamage];
true // exit
};
}) exitWith {};
private _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitWith {};
private _hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
// Sorting out the damage
private _damageBodyParts = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
_damageBodyParts set [_part, (_damageBodyParts select _part) + _newDamage];
_unit setVariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
private _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_assignWounds);
// TODO Disabled until implemented fully
//if (GVAR(enableAirway)) then {
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway);
//};
//if (GVAR(enableFractures)) then {
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures);
//};
//if (GVAR(enableInternalBleeding)) then {
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries);
//};
if (alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
// If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed.
if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then {
[_unit] call FUNC(setUnconscious);
};
};

View File

@ -1,34 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Sets the hitpoint damage for au nit to the correct values
*
* Arguments:
* 0: Unit for which the hitpoint damage will be sorted out <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleDamage_advancedSetDamage
*
* Public: No
*/
params ["_unit"];
if (!local _unit) exitWith {};
// ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]
private _bodyStatus = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
_bodyStatus params ["_headDamage", "_torsoDamage", "_handsDamageR", "_handsDamageL", "_legsDamageR", "_legsDamageL"];
_unit setHitPointDamage ["hitHead", _headDamage min 0.95];
_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95];
_unit setHitPointDamage ["hitHands", (_handsDamageR + _handsDamageL) min 0.95];
_unit setHitPointDamage ["hitLegs", (_legsDamageR + _legsDamageL) min 0.95];
if (_bodyStatus isEqualTo [0,0,0,0,0,0]) then {
_unit setDamage 0;
};

View File

@ -1,33 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handling of the airway injuries upon the handleDamage eventhandler.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter or source of the damage <OBJECT>
* 4: Type of the damage done <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_airway
*
* Public: No
*/
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"];
private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
if (_bodyPartn > 1) exitWith {};
if (_amountOfDamage > 0.5) then {
if (random(1) >= 0.8) then {
if !(_unit getVariable[QGVAR(airwayCollapsed), false]) then {
_unit setVariable [QGVAR(airwayCollapsed), true, true];
};
};
};

View File

@ -1,152 +0,0 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi, Glowbal
* Cache a handleDamage call to execute it 3 frames later
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter <OBJECT>
* 4: Projectile <STRING>
* 5: HitPointIndex (-1 for structural) <NUMBER>
*
* Return Value:
* None
*
* Example:
* [bob, "leg", 2, kevin, "bullet", -1] call ACE_medical_fnc_handleDamage_caching
*
* Public: No
*/
params ["_unit", "_selectionName", "_damage", "_source", "_projectile", "_hitPointIndex"];
private _hitSelections = GVAR(SELECTIONS);
// Calculate change in damage - use getHitIndex because selection is translated (hitdiaphragm->body)
private _newDamage = _damage - (damage _unit);
if (_hitPointIndex >= 0) then {_newDamage = _damage - (_unit getHitIndex _hitPointIndex)};
TRACE_7("ACE_DEBUG: HandleDamage_Caching Called",_unit, _selectionName, _damage, _source, _projectile,_hitPointIndex,_newDamage);
// Check for vehicle crash
private _vehicle = vehicle _unit;
if ((_vehicle != _unit) && {!(_vehicle isKindOf "StaticWeapon")} && {_source in [objNull, driver _vehicle, _vehicle]} && {_projectile == ""} && {_selectionName == ""}) then {
if (GVAR(enableVehicleCrashes)) then {
_selectionName = selectRandom _hitSelections;
_projectile = "vehiclecrash";
_this set [1, _selectionName];
_this set [4, _projectile];
};
};
// Handle falling damage
private _impactVelocity = (velocity _unit) select 2;
if (_impactVelocity < -5 && {_vehicle == _unit}) then {
TRACE_1("Starting isFalling", time);
_unit setVariable [QGVAR(isFalling), true];
_unit setVariable [QGVAR(impactVelocity), _impactVelocity];
} else {
if ((_unit getVariable [QGVAR(isFalling), false]) && {diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2}) then {
TRACE_1("Ending isFalling", time);
_unit setVariable [QGVAR(isFalling), false];
};
};
if (_unit getVariable [QGVAR(isFalling), false]) then {
if !(_selectionName in ["", "leg_l", "leg_r"]) then {
if (_selectionName == "body") then {
_newDamage = _newDamage * abs(_unit getVariable [QGVAR(impactVelocity), _impactVelocity]) / 50;
} else {
_newDamage = _newDamage * 0.5;
};
if (_newDamage < 0.075) then {_newDamage = 0;}; //Filter minor falling damage to non-leg hitpoints
} else {
if (_selectionName == "") then {
_selectionName = selectRandom ["leg_l", "leg_r"];
_this set [1, _selectionName];
};
_newDamage = _newDamage * 0.7;
};
_projectile = "falling";
_this set [4, "falling"];
};
// Finished with the current frame, reset variables
// Note: sometimes handleDamage spans over 2 or even 3 frames.
if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) then {
_unit setVariable [QGVAR(frameNo_damageCaching), diag_frameno];
// handle the cached damages 2 frames later
[{
[{
params ["_unit"];
_unit setDamage 0;
private _cache_params = _unit getVariable [QGVAR(cachedHandleDamageParams), []];
private _cache_damages = _unit getVariable QGVAR(cachedDamages);
{
(_x + [_cache_damages select _forEachIndex]) call FUNC(handleDamage_advanced);
} forEach _cache_params;
[_unit] call FUNC(handleDamage_advancedSetDamage);
}, _this] call CBA_fnc_execNextFrame;
}, _unit] call CBA_fnc_execNextFrame;
_unit setVariable [QGVAR(cachedProjectiles), []];
_unit setVariable [QGVAR(cachedHitPoints), []];
_unit setVariable [QGVAR(cachedDamages), []];
_unit setVariable [QGVAR(cachedHandleDamageParams), []];
};
// Caching of the damage events
if (_selectionName != "") then {
private _cache_projectiles = _unit getVariable QGVAR(cachedProjectiles);
private _index = _cache_projectiles find _projectile;
// Check if the current projectile has already been handled once
if (_index >= 0 && {_projectile != "falling"}) exitWith {
private _cache_damages = _unit getVariable QGVAR(cachedDamages);
private _otherDamage = (_cache_damages select _index); // Find the previous damage this projectile has done
// Take the highest damage of the two
if (_newDamage > _otherDamage) then {
private _cache_params = _unit getVariable QGVAR(cachedHandleDamageParams);
private _cache_hitpoints = _unit getVariable QGVAR(cachedHitPoints);
// Restore the damage before the previous damage was processed
private _hitPoint = _cache_hitpoints select _index;
private _restore = ((_unit getHitIndex _hitPoint) - _otherDamage) max 0;
_unit setHitIndex [_hitPoint, _restore];
_cache_hitpoints set [_index, _hitPointIndex];
_cache_damages set [_index, _newDamage];
_cache_params set[_index, _this];
_unit setVariable [QGVAR(cachedProjectiles), _cache_projectiles];
_unit setVariable [QGVAR(cachedHitPoints), _cache_hitpoints];
_unit setVariable [QGVAR(cachedDamages), _cache_damages];
_unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params];
};
};
private _cache_hitpoints = _unit getVariable QGVAR(cachedHitPoints);
private _cache_damages = _unit getVariable QGVAR(cachedDamages);
private _cache_params = _unit getVariable QGVAR(cachedHandleDamageParams);
// This is an unhandled projectile
_cache_projectiles pushBack _projectile;
_cache_hitpoints pushBack _hitPointIndex;
_cache_damages pushBack _newDamage;
_cache_params pushBack _this;
// Store the new cached values
_unit setVariable [QGVAR(cachedProjectiles), _cache_projectiles];
_unit setVariable [QGVAR(cachedHitPoints), _cache_hitpoints];
_unit setVariable [QGVAR(cachedDamages), _cache_damages];
_unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params];
};
TRACE_8("ACE_DEBUG: HandleDamage_Caching",_unit, _newDamage, _cache_params, _cache_damages, _unit getVariable QGVAR(cachedProjectiles), _unit getVariable QGVAR(cachedHitPoints), _unit getVariable QGVAR(cachedDamages), _unit getVariable QGVAR(cachedHandleDamageParams));
_newDamage

View File

@ -1,70 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handling of the fracture injuries upon the handleDamage eventhandler.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter or source of the damage <OBJECT>
* 4: Type of the damage done <STRING>
*
* Return Value:
* None <NIL>
*
* Example:
* [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_handleDamage_fractures
*
* Public: No
*/
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"];
private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
private _fractureType = 1;
if (_amountOfDamage > 0.05) then {
// TODO specify fractures based off typeOfInjury details better.
switch (_typeOfDamage) do {
case "Bullet": {
_fractureType = round(random(2));
};
case "Grenade": {
_fractureType = round(random(2));
if (_fractureType < 1) then {
_fractureType = 1;
};
};
case "Explosive": {
_fractureType = round(random(2));
if (_fractureType < 1) then {
_fractureType = 1;
};
};
case "Shell": {
_fractureType = round(random(2));
if (_fractureType < 1) then {
_fractureType = 1;
};
};
case "Unknown": {
_fractureType = round(random(1));
};
case "VehicleCrash": {
_fractureType = round(random(0));
};
default {
_fractureType = round(random(1));
};
};
private _fractures = _unit getVariable[QGVAR(fractures), []];
private _fractureID = 1;
private _amountOf = count _fractures;
if (_amountOf > 0) then {
_fractureID = (_fractures select (_amountOf - 1) select 0) + 1;
};
_fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */];
_unit setVariable [QGVAR(fractures), _fractures, true];
};

View File

@ -1,25 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handling of the internal injuries upon the handleDamage eventhandler.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter or source of the damage <OBJECT>
* 4: Type of the damage done <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_handleDamage_internalInjuries
*
* Public: No
*/
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"];
private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
// TODO implement internal injuries

View File

@ -1,67 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handling of the open wounds & injuries upon the handleDamage eventhandler.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter or source of the damage <OBJECT>
* 4: Type of the damage done <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, "leg", 2, kevin, "shot"] call ACE_medical_fnc_handleDamage_wounds
*
* Public: No
*/
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
if (_typeOfDamage == "") then {_typeOfDamage = "unknown";};
// Administration for open wounds and ids
private _openWounds = _unit getVariable[QGVAR(openWounds), []];
private _woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1];
private _extensionOutput = "ace_medical" callExtension format ["HandleDamageWounds,%1,%2,%3,%4", _selectionName, _damage, _typeOfDamage, _woundID];
private _painToAdd = 0;
private _woundsCreated = [];
call compile _extensionOutput;
{
_x params ["", "_toAddClassID", "_bodyPartNToAdd"];
_foundIndex = -1;
{
_x params ["", "_compareId", "_comparyBodyPartN"];
// Check if we have an id of the given class on the given bodypart already
if (_compareId == _toAddClassID && {_comparyBodyPartN == _bodyPartNToAdd}) exitWith {
_foundIndex = _forEachIndex;
};
} forEach _openWounds;
if (_foundIndex < 0) then {
// Since it is a new injury, we will have to add it to the open wounds array to store it
_openWounds pushBack _x;
} else {
// We already have one of these, so we are just going to increase the number that we have of it with a new one.
private _injury = _openWounds select _foundIndex;
_injury set [3, (_injury select 3) + 1];
};
} forEach _woundsCreated;
_unit setVariable [QGVAR(openWounds), _openWounds, true];
// Only update if new wounds have been created
if (count _woundsCreated > 0) then {
_unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true];
};
private _painLevel = _unit getVariable [QGVAR(pain), 0];
_unit setVariable [QGVAR(pain), _painLevel + _painToAdd];
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated);

View File

@ -1,134 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Handling of the open wounds & injuries upon the handleDamage eventhandler.
*
* Arguments:
* 0: Unit That Was Hit <OBJECT>
* 1: Name Of Hit Selection <STRING>
* 2: Amount Of Damage <NUMBER>
* 3: Shooter or source of the damage <OBJECT>
* 4: Type of the damage done <STRING>
*
* Return Value:
* None <NIL>
*
* Example:
* [bob, "leg", 1, kevin, "shot"] call ACE_medical_fnc_handleDamage_woundsOld
*
* Public: No
*/
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
// Convert the selectionName to a number and ensure it is a valid selection.
private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
if (_bodyPartn < 0) exitWith {};
// Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes]
private _injuryTypeInfo = missionNamespace getVariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]];
// This are the available injuries for this damage type. Format [[classtype, selections, bloodloss, minimalDamage, pain], ..]
private _allInjuriesForDamageType = _injuryTypeInfo select 2;
// It appears we are dealing with an unknown type of damage.
if (count _allInjuriesForDamageType == 0) then {
// grabbing the configuration for unknown damage type
_injuryTypeInfo = missionNamespace getVariable [QGVAR(woundInjuryType_unknown),[[], false, []]];
_allInjuriesForDamageType = _injuryTypeInfo select 2;
};
// find the available injuries for this damage type and damage amount
private _highestPossibleSpot = -1;
private _highestPossibleDamage = -1;
private _allPossibleInjuries = [];
{
private _damageLevels = _x select 4;
_damageLevels params ["_minDamage","_maxDamage"];
// Check if the damage is higher as the min damage for the specific injury
if (_damage >= _minDamage && {_damage <= _maxDamage || _maxDamage < 0}) then {
//private _classType = _x select 0;
private _selections = _x select 1;
//private _bloodLoss = _x select 2;
//private _pain = _x select 3;
// Check if the injury can be applied to the given selection name
if ("All" in _selections || _selectionName in _selections) then {
// Find the wound which has the highest minimal damage, so we can use this later on for adding the correct injuries
if (_minDamage > _highestPossibleDamage) then {
_highestPossibleSpot = _forEachIndex;
_highestPossibleDamage = _minDamage;
};
// Store the valid possible injury for the damage type, damage amount and selection
_allPossibleInjuries pushBack _x;
};
};
} forEach _allInjuriesForDamageType;
// No possible wounds available for this damage type or damage amount.
if (_highestPossibleSpot < 0) exitWith {};
// Administration for open wounds and ids
private _openWounds = _unit getVariable[QGVAR(openWounds), []];
private _woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1];
private _painToAdd = 0;
private _woundsCreated = [];
{
if (_x select 0 <= _damage) exitWith {
for "_i" from 0 to ((_x select 1)-1) do {
// Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage]
private _toAddInjury = if (random(1) >= 0.85) then {_allInjuriesForDamageType select _highestPossibleSpot} else {selectRandom _allPossibleInjuries};
private _toAddClassID = _toAddInjury select 0;
private _foundIndex = -1;
private _bodyPartNToAdd = if (_injuryTypeInfo select 1) then {_bodyPartn} else {floor(random(6))};
// If the injury type is selection part specific, we will check if one of those injury types already exists and find the spot for it..
if ((_injuryTypeInfo select 1)) then {
{
// Check if we have an id of the given class on the given bodypart already
if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith {
_foundIndex = _forEachIndex;
};
} forEach _openWounds;
};
private _injury = [];
if (_foundIndex < 0) then {
// Create a new injury. Format [ID, classID, bodypart, percentage treated, bloodloss rate]
_injury = [_woundID, _toAddInjury select 0, _bodyPartNToAdd, 1, _toAddInjury select 2];
// Since it is a new injury, we will have to add it to the open wounds array to store it
_openWounds pushBack _injury;
// New injuries will also increase the wound ID
_woundID = _woundID + 1;
} else {
// We already have one of these, so we are just going to increase the number that we have of it with a new one.
_injury = _openWounds select _foundIndex;
_injury set [3, (_injury select 3) + 1];
};
// Store the injury so we can process it later correctly.
_woundsCreated pushBack _injury;
// Collect the pain that is caused by this injury
_painToAdd = _painToAdd + (_toAddInjury select 3);
};
};
} forEach (_injuryTypeInfo select 0); // forEach damage thresholds
_unit setVariable [QGVAR(openWounds), _openWounds, true];
// Only update if new wounds have been created
if (count _woundsCreated > 0) then {
_unit setVariable [QGVAR(lastUniqueWoundID), _woundID, true];
};
private _painLevel = _unit getVariable [QGVAR(pain), 0];
_unit setVariable [QGVAR(pain), _painLevel + _painToAdd];
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getVariable QGVAR(pain), _unit getVariable QGVAR(openWounds),_woundsCreated);

View File

@ -1,27 +0,0 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi
* Called when a unit is initialized via XEH_init
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleInit
*
* Public: No
*/
params ["_unit"];
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
if (local _unit) then {
if (!EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(init), [_unit]];
};
[_unit] call FUNC(init);
};

View File

@ -1,26 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Called when a unit is killed
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleKilled
*
* Public: No
*/
params ["_unit"];
if (!local _unit) exitWith {};
_unit setVariable [QGVAR(pain), 0];
if (GVAR(level) >= 2) then {
_unit setVariable [QGVAR(heartRate), 0];
_unit setVariable [QGVAR(bloodPressure), [0, 0]];
_unit setVariable [QGVAR(airwayStatus), 0];
};

View File

@ -1,34 +0,0 @@
#include "script_component.hpp"
/*
* Author: Glowbal
* Called when a unit switched locality
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Is local <BOOL>
*
* Return Value:
* None
*
* Example:
* [bob, true] call ACE_medical_fnc_handleLocal
*
* Public: No
*/
params ["_unit", "_local"];
if (_local) then {
// If the unit had a loop tracking its vitals, restart it locally
if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then {
[_unit, true] call FUNC(addVitalLoop);
};
if ((_unit getVariable ["ACE_isUnconscious",false]) && {count (_unit getVariable [QGVAR(unconsciousArguments), []]) >= 6}) then {
private _arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]);
_arguments set [2, CBA_missionTime];
[DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler;
_unit setVariable [QGVAR(unconsciousArguments), nil, true];
};
};

View File

@ -1,32 +0,0 @@
#include "script_component.hpp"
/*
* Author: KoffeinFlummi
* Called when a unit is Respawned
*
* Arguments:
* 0: The Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob] call ACE_medical_fnc_handleRespawn
*
* Public: No
*/
params ["_unit"];
// reset all variables. @todo GROUP respawn?
[_unit] call FUNC(init);
// Reset captive status for respawning unit
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
[_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
};
// Remove maximum unconsciousness time handler
_maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1];
if (_maxUnconHandle > 0) then {
[_maxUnconHandle] call CBA_fnc_removePerFrameHandler;
};

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