Merge branch 'master' into ace_interactionCleanup

This commit is contained in:
Nicolás Badano 2015-03-01 17:15:24 -03:00
commit 8e0158209c
363 changed files with 4794 additions and 8568 deletions

View File

@ -1,7 +1,7 @@
root = true root = true
[*] [*]
end_of_line = lf end_of_line = crlf
insert_final_newline = true insert_final_newline = true
charset = utf-8 charset = utf-8
indent_style = space indent_style = space

View File

@ -9,7 +9,6 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit)); init = QUOTE(call COMPILE_FILE(XEH_postInit));
}; };
}; };
//release escorted captive when entering a vehicle //release escorted captive when entering a vehicle
class Extended_GetIn_EventHandlers { class Extended_GetIn_EventHandlers {
class All { class All {
@ -18,7 +17,6 @@ class Extended_GetIn_EventHandlers {
}; };
}; };
}; };
//reset captive animation after leaving vehicle //reset captive animation after leaving vehicle
class Extended_GetOut_EventHandlers { class Extended_GetOut_EventHandlers {
class All { class All {
@ -27,7 +25,6 @@ class Extended_GetOut_EventHandlers {
}; };
}; };
}; };
//reset captivity and escorting status when getting killed //reset captivity and escorting status when getting killed
class Extended_Killed_EventHandlers { class Extended_Killed_EventHandlers {
class CAManBase { class CAManBase {
@ -36,7 +33,6 @@ class Extended_Killed_EventHandlers {
}; };
}; };
}; };
//mission start //mission start
class Extended_InitPost_EventHandlers { class Extended_InitPost_EventHandlers {
class CAManBase { class CAManBase {
@ -45,4 +41,3 @@ class Extended_InitPost_EventHandlers {
}; };
}; };
}; };

View File

@ -72,7 +72,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
InterpolateTo[] = {"Unconscious",0.01}; InterpolateTo[] = {"Unconscious",0.01};
}; };
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon { class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
speed = 0.333; //for gameplay reasons, slow this down speed = 0.5; //for gameplay reasons, slow this down
actions = "CivilStandActions"; actions = "CivilStandActions";
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"; file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1}; ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};

View File

@ -82,7 +82,7 @@ class CfgVehicles {
class ACE_StartSurrenderingSelf { class ACE_StartSurrenderingSelf {
displayName = "$STR_ACE_Captives_StartSurrendering"; displayName = "$STR_ACE_Captives_StartSurrendering";
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender)); condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
statement = QUOTE([ARR_2(_player, true)] call FUNC(surrender)); statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
exceptions[] = {}; exceptions[] = {};
showDisabled = 0; showDisabled = 0;
priority = 0; priority = 0;
@ -90,7 +90,7 @@ class CfgVehicles {
class ACE_StopSurrenderingSelf { class ACE_StopSurrenderingSelf {
displayName = "$STR_ACE_Captives_StopSurrendering"; displayName = "$STR_ACE_Captives_StopSurrendering";
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender)); condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
statement = QUOTE([ARR_2(_player, false)] call FUNC(surrender)); statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
exceptions[] = {QGVAR(isNotSurrendering)}; exceptions[] = {QGVAR(isNotSurrendering)};
showDisabled = 0; showDisabled = 0;
priority = 0; priority = 0;

View File

@ -1,12 +1,9 @@
#include "script_component.hpp" #include "script_component.hpp"
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
//Handles when someone starts escorting and then disconnects, leaving the captive attached //Handles when someone starts escorting and then disconnects, leaving the captive attached
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC //This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
if (isServer) then { if (isServer) then {
addMissionEventHandler ["HandleDisconnect", { addMissionEventHandler ["HandleDisconnect", {
PARAMS_1(_disconnectedPlayer); PARAMS_1(_disconnectedPlayer);
@ -21,6 +18,15 @@ if (isServer) then {
}]; }];
}; };
["playerVehicleChanged", {_this call FUNC(handleVehicleChanged)}] call EFUNC(common,addEventHandler);
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
//TODO: Medical Integration Events??? //TODO: Medical Integration Events???
// [_unit, "knockedOut", { // [_unit, "knockedOut", {

View File

@ -23,9 +23,10 @@ PREP(handleKnockedOut);
PREP(handlePlayerChanged); PREP(handlePlayerChanged);
PREP(handleUnitInitPost); PREP(handleUnitInitPost);
PREP(handleWokeUp); PREP(handleWokeUp);
PREP(handleZeusDisplayChanged);
PREP(moduleSurrender); PREP(moduleSurrender);
PREP(setHandcuffed); PREP(setHandcuffed);
PREP(surrender); PREP(setSurrendered);
PREP(vehicleCaptiveMoveIn); PREP(vehicleCaptiveMoveIn);
PREP(vehicleCaptiveMoveOut); PREP(vehicleCaptiveMoveOut);

View File

@ -18,5 +18,12 @@
PARAMS_2(_unit,_newSurrenderState); PARAMS_2(_unit,_newSurrenderState);
//TODO: any other conditions?? private "_returnValue";
(!((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _newSurrenderState))
_returnValue = if (_newSurrenderState) then {
!(_unit getVariable [QGVAR(isSurrendering), false]); //Not currently surrendering
} else {
(_unit getVariable [QGVAR(isSurrendering), false]); //is Surrendering
};
_returnValue

View File

@ -19,6 +19,12 @@
PARAMS_3(_vehicle,_dontcare,_unit); PARAMS_3(_vehicle,_dontcare,_unit);
if ((local _unit) && (_unit getVariable [QGVAR(isEscorting), false])) then { if (local _unit) then {
_unit setVariable [QGVAR(isEscorting), false, true]; if (_unit getVariable [QGVAR(isEscorting), false]) then {
_unit setVariable [QGVAR(isEscorting), false, true];
};
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrender);
};
}; };

View File

@ -1,2 +1,25 @@
// by commy2 /*
* Author: commy2, PabstMirror
* Handles when a unit gets knocked out. Ends surrendering.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [bob, true] call ACE_captives_fnc_handleKnockedOut
*
* Public: No
*/
#include "script_component.hpp"
//ToDo: Waiting on medical integration
PARAMS_1(_unit);
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
[_unit, false] call FUNC(setSurrendered);
};

View File

@ -18,10 +18,16 @@
PARAMS_2(_newUnit,_oldUnit); PARAMS_2(_newUnit,_oldUnit);
//set showHUD based on new unit status:
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then { if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
TRACE_1("Player Change (showHUD false)",_newUnit); TRACE_1("Player Change (showHUD false)",_newUnit);
showHUD false; showHUD false;
} else { } else {
TRACE_1("Player Change (showHUD true)",_newUnit); TRACE_1("Player Change (showHUD true)",_newUnit);
showHUD true; showHUD true;
}; };
//If old player was escorting, stop
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
_oldUnit setVariable [QGVAR(isEscorting), false, true];
};

View File

@ -29,6 +29,6 @@ if (local _unit) then {
if (_unit getVariable [QGVAR(isSurrendering), false]) then { if (_unit getVariable [QGVAR(isSurrendering), false]) then {
_unit setVariable [QGVAR(isSurrendering), false]; _unit setVariable [QGVAR(isSurrendering), false];
[_unit, true] call FUNC(surrender); [_unit, true] call FUNC(setSurrendered);
}; };
}; };

View File

@ -0,0 +1,31 @@
/*
* Author: PabstMirror
* Handles ZeusDisplayChanged event
* Need to reset showHUD after closing zeus
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Display is now open <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* [bob1, false] call ACE_captives_fnc_handleZeusDisplayChanged
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_unit,_zeusIsOpen);
//set showHUD based on unit status:
if (!_zeusIsOpen) then {
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
TRACE_1("Player Change (showHUD false)",_unit);
showHUD false;
} else {
TRACE_1("Player Change (showHUD true)",_unit);
showHUD true;
};
};

View File

@ -27,19 +27,31 @@ if (local _logic) then {
if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed
_mouseOverObject = _bisMouseOver select 1; _mouseOverObject = _bisMouseOver select 1;
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then { if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)]; TRACE_2("Debug - module surrendering %1",_mouseOverObject,(name _mouseOverObject));
[_mouseOverObject, true] call FUNC(surrender); if (alive _mouseOverObject) then {
if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then {
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent);
} else {
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, false]] call EFUNC(common,targetEvent);
};
} else {
["STR_ACE_Captives_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured);
};
} else { } else {
systemChat format ["Only use on dismounted inf"]; ["STR_ACE_Captives_Zeus_OnlyInfentry"] call EFUNC(common,displayTextStructured);
}; };
} else { } else {
systemChat format ["Nothing under mouse"]; ["STR_ACE_Captives_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured);
}; };
} else {//an editor module } else {
{ //an editor module
systemChat format ["Debug - module surrendering %1", (name _x)]; //Modules run before postInit can instal the event handler, so we need to wait a little bit
[_x, true] call FUNC(surrender); [{
} forEach _units; PARAMS_1(_units);
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05, 0.05]call EFUNC(common,waitAndExecute);
}; };
deleteVehicle _logic; deleteVehicle _logic;

View File

@ -18,19 +18,23 @@
PARAMS_2(_unit,_state); PARAMS_2(_unit,_state);
// We only want this function to work on local machines
if (!local _unit) exitwith {
[_this, QUOTE(FUNC(setHandcuffed)), _unit] call EFUNC(common,execRemoteFnc);
TRACE_2("running setHandcuffed on remote unit",_unit,_state);
};
if (_state isEqualTo (_unit getVariable [QGVAR(isHandcuffed), false])) then { if (!local _unit) exitwith {
LOG("setHandcuffed: current state same as new"); ERROR("running setHandcuffed on remote unit");
};
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
ERROR("setHandcuffed: current state same as new");
}; };
if (_state) then { if (_state) then {
_unit setVariable [QGVAR(isHandcuffed), true, true]; _unit setVariable [QGVAR(isHandcuffed), true, true];
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus); [_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
[_unit, false] call FUNC(setSurrendered);
};
//Set unit cargoIndex (will be -1 if dismounted)
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true]; _unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
if (_unit == ACE_player) then { if (_unit == ACE_player) then {
@ -43,11 +47,30 @@ if (_state) then {
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then { if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
[_unit] call EFUNC(common,fixLoweredRifleAnimation); [_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
PARAMS_2(_unit,_newAnimation);
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
ERROR("Handcuff animation interrupted");
systemChat format ["debug %2: new %1", _newAnimation, time];
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
};
}];
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
}; };
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute); }, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
} else { } else {
_unit setVariable [QGVAR(isHandcuffed), false, true]; _unit setVariable [QGVAR(isHandcuffed), false, true];
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
//remove AnimChanged EH
_animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
if ((vehicle _unit) == _unit) then { if ((vehicle _unit) == _unit) then {
//Break out of hands up animation loop (doAnimation handles Unconscious prioity) //Break out of hands up animation loop (doAnimation handles Unconscious prioity)
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);

View File

@ -0,0 +1,101 @@
/*
* Author: commy2 PabstMirror
* Lets a unit surrender
*
* Arguments:
* 0: Unit <OBJECT>
* 1: True to surrender, false to un-surrender <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* [Pierre, true] call ACE_captives_fnc_setSurrendered;
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_unit,_state);
if (!local _unit) exitwith {
ERROR("running surrender on remote unit");
};
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWith {
ERROR("Surrender: current state same as new");
};
if (_state) then {
if ((vehicle _unit) != _unit) exitWith {ERROR("Cannot surrender while mounted");};
if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {ERROR("Cannot surrender while handcuffed");};
_unit setVariable [QGVAR(isSurrendering), true, true];
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
if (_unit == ACE_player) then {
showHUD false;
};
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
// fix anim on mission start (should work on dedicated servers)
[{
PARAMS_1(_unit);
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
PARAMS_2(_unit,_newAnimation);
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
ERROR("Surrender animation interrupted");
systemChat format ["debug %2: new %1", _newAnimation, time];
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
};
}];
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
};
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
} else {
_unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
//remove AnimChanged EH
_animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(surrenderAnimEHID), -1];
if (_unit == ACE_player) then {
//only re-enable HUD if not handcuffed
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
showHUD true;
};
};
if (_unit getVariable ["ACE_isUnconscious", false]) exitWith {}; //don't touch animations if unconscious
//if we are in "hands up" animationState, crack it now
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then {
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
} else {
//spin up a PFEH, to watching animationState for the next 20 seconds to make sure we don't enter "hands up"
//Handles long animation chains
[{
PARAMS_2(_args,_pfID);
EXPLODE_2_PVT(_args,_unit,_maxTime);
//If waited long enough or they re-surrendered or they are unconscious, exit loop
if ((time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
[_pfID] call CBA_fnc_removePerFrameHandler;
};
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith {
[_pfID] call CBA_fnc_removePerFrameHandler;
//Break out of hands up animation loop
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
};
}, 0, [_unit, (time + 20)]] call CBA_fnc_addPerFrameHandler;
};
};

View File

@ -1,76 +0,0 @@
/*
* Author: commy2 PabstMirror
* Lets a unit surrender
*
* Arguments:
* 0: Unit <OBJECT>
* 1: State <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* [Pierre, true] call ACE_captives_fnc_surrender;
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_unit,_state);
// We only want this function to work on local machines
if (!local _unit) exitwith {
[_this, QUOTE(FUNC(surrender)), _unit] call EFUNC(common,execRemoteFnc);
TRACE_2("running surrender on remote unit",_unit,_state);
};
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) then {
LOG("Surrender: current state same as new");
};
if (_state) then {
_unit setVariable [QGVAR(isSurrendering), true, true];
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
if (_unit == ACE_player) then {
showHUD false;
};
// fix anim on mission start (should work on dedicated servers)
[{
PARAMS_1(_unit);
if (_unit getVariable [QGVAR(isSurrendering), false] && {vehicle _unit == _unit}) then {
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
};
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
//PFEH - (TODO: move to event system?)
[{
EXPLODE_1_PVT((_this select 0),_unit);
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
//If unit dies, gets knocked out, or is handcuffed then end surrender
if ((!alive _unit) || {_unit getVariable ["ACE_isUnconscious", false]} || {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
[_unit, false] call FUNC(surrender);
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
};
} else {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
}, 0.0, [_unit]] call CBA_fnc_addPerFrameHandler;
} else {
_unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
if ((vehicle _unit) == _unit) then {
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
};
if (_unit == ACE_player) then {
//only re-enable HUD if not handcuffed
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
showHUD true;
};
};
};

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2015-02-06 --> <!-- Edited with tabler - 2015-02-24 -->
<Project name="ACE"> <Project name="ACE">
<Package name="Captives"> <Package name="Captives">
<Key ID="STR_ACE_Captives_SetCaptive"> <Key ID="STR_ACE_Captives_SetCaptive">
@ -136,5 +136,14 @@
<Key ID="STR_ACE_Captives_StopSurrendering"> <Key ID="STR_ACE_Captives_StopSurrendering">
<English>Stop Surrendering</English> <English>Stop Surrendering</English>
</Key> </Key>
<Key ID="STR_ACE_Captives_Zeus_OnlyAlive">
<English>Only use on alive units</English>
</Key>
<Key ID="STR_ACE_Captives_Zeus_OnlyInfentry">
<English>Only use on dismounted inf</English>
</Key>
<Key ID="STR_ACE_Captives_Zeus_NothingSelected">
<English>Nothing under mouse</English>
</Key>
</Package> </Package>
</Project> </Project>

View File

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

View File

@ -0,0 +1,708 @@
class ACE_Medical_Actions {
class Basic {
// @todo: localization
class Bandage {
displayName = "Bandage";
displayNameProgress = "Bandaging ...";
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 5;
treatmentTimeSelfCoef = 1;
items[] = {{QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(quikClot)}};
itemConsumed = 1;
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bandage));
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
};
class Morphine: Bandage {
displayName = "Morphine";
displayNameProgress = "Injecting Morphine ...";
treatmentTime = 2;
items[] = {QGVAR(morphine)};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class Epipen: Bandage {
displayName = "Epinephrine";
displayNameProgress = "Injecting Epinephrine ...";
requiredMedic = 1;
treatmentTime = 3;
items[] = {QGVAR(epipen)};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class Bloodbag: Bandage {
displayName = "Blood Bag";
displayNameProgress = "Transfusing Blood ...";
requiredMedic = 1;
treatmentTime = 20;
items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
};
class Advanced {
// cse_surgical_kit cse_bandage_basic cse_packing_bandage cse_bandageElastic cse_tourniquet cse_splint cse_morphine cse_atropine cse_epinephrine cse_plasma_iv cse_plasma_iv_500 cse_plasma_iv250 cse_blood_iv cse_blood_iv_500 cse_blood_iv_250 cse_saline_iv cse_saline_iv_500 cse_saline_iv_250 cse_quikclot cse_nasopharyngeal_tube cse_opa cse_liquidSkin cse_chestseal cse_personal_aid_kit
class FieldDressing {
// Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All.
treatmentLocations[] = {"All"};
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
requiredMedic = 0;
// The time it takes for a treatment action to complete. Time is in seconds.
treatmentTime = 5;
// Item required for the action. Leave empty for no item required.
items[] = {QGVAR(fieldDressing)};
// Callbacks
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage));
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationCaller = ""; // TODO
itemConsumed = 1;
};
class PackingBandage: fieldDressing {
items[] = {QGVAR(packingBandage)};
};
class ElasticBandage: fieldDressing {
items[] = {QGVAR(elasticBandage)};
};
class QuikClot: fieldDressing {
items[] = {QGVAR(quikClot)};
};
class Tourniquet: fieldDressing {
items[] = {QGVAR(tourniquet)};
treatmentTime = 6;
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
};
class Morphine: fieldDressing {
items[] = {QGVAR(morphine)};
treatmentTime = 3;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
};
class Atropine: fieldDressing {
items[] = {QGVAR(atropine)};
};
class Epinephrine: fieldDressing {
items[] = {QGVAR(epinephrine)};
};
class BloodIV: fieldDressing {
items[] = {QGVAR(bloodIV)};
requiredMedic = 1;
treatmentTime = 7;
callbackSuccess = QUOTE(DFUNC(treatmentIV));
};
class BloodIV_500: BloodIV {
items[] = {QGVAR(bloodIV_500)};
};
class BloodIV_250: BloodIV {
items[] = {QGVAR(bloodIV_250)};
};
class PlasmaIV: BloodIV {
items[] = {QGVAR(plasmaIV)};
};
class PlasmaIV_500: PlasmaIV {
items[] = {QGVAR(plasmaIV_500)};
};
class PlasmaIV_250: PlasmaIV {
items[] = {QGVAR(plasmaIV_250)};
};
class SalineIV: BloodIV {
items[] = {QGVAR(salineIV)};
};
class SalineIV_500: SalineIV {
items[] = {QGVAR(salineIV_500)};
};
class SalineIV_250: SalineIV {
items[] = {QGVAR(salineIV_250)};
};
class SurgicalKit: fieldDressing {
items[] = {QGVAR(surgicalKit)};
treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"};
requiredMedic = 2;
treatmentTime = 15;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_surgicalKit));
itemConsumed = 0;
};
class PersonalAidKit: fieldDressing {
items[] = {QGVAR(personalAidKit)};
treatmentLocations[] = {"All"};
requiredMedic = 1;
treatmentTime = 15;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal));
itemConsumed = 0;
};
class CheckPulse: fieldDressing {
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 2;
items[] = {};
callbackSuccess = QUOTE(DFUNC(actionCheckPulse));
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationCaller = ""; // TODO
itemConsumed = 0;
};
class CheckBloodPressure: CheckPulse {
callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure));
};
class CheckResponse: CheckPulse {
callbackSuccess = QUOTE(DFUNC(actionCheckResponse));
};
class RemoveTourniquet: CheckPulse {
treatmentTime = 2.5;
callbackSuccess = QUOTE(DFUNC(actionRemoveTourniquet));
};
class CPR: fieldDressing {
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 25;
items[] = {};
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
callbackFailure = "";
callbackProgress = "";
animationPatient = "";
animationCaller = ""; // TODO
itemConsumed = 0;
};
};
};
class ACE_Medical_Advanced {
// Defines all the possible injury types for advanced medical
class Injuries {
// All the possible wounds
class wounds {
// Source: Scarle
// Also called scrapes, they occur when the skin is rubbed away by friction against another rough surface (e.g. rope burns and skinned knees).
class Abrasion {
name = "Scrape";
selections[] = {"All"};
bleedingRate = 0.0001;
pain = 0.1;
causes[] = {"falling", "ropeburn", "vehiclecrash"};
minDamage = 0.01;
class Minor {
minDamage = 0.01;
bleedingRate = 0.0001;
};
class Medium {
minDamage = 0.2;
bleedingRate = 0.00015;
};
class Large {
minDamage = 0.3;
bleedingRate = 0.0002;
};
};
// Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions.
class Avulsions {
name = "Avulsion";
selections[] = {"All"};
bleedingRate = 0.01;
pain = 1;
causes[] = {"explosive", "vehiclecrash", "grenade", "shell", "bullet", "backblast", "bite"};
minDamage = 0.2;
class Minor {
minDamage = 0.2;
bleedingRate = 0.01;
};
class Medium {
minDamage = 0.3;
bleedingRate = 0.02;
};
class Large {
minDamage = 0.5;
bleedingRate = 0.05;
};
};
// Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions.
class Contusion {
name = "Bruise";
selections[] = {"All"};
bleedingRate = 0.0;
pain = 1;
causes[] = {"bullet", "backblast", "punch","vehiclecrash","falling"};
minDamage = 0.01;
class Minor {
minDamage = 0.01;
};
class Medium {
minDamage = 0.1;
};
class Large {
minDamage = 0.3;
};
};
// Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures.
class CrushWound {
name = "Crushed tissue";
selections[] = {"All"};
bleedingRate = 0.01;
pain = 1;
causes[] = {"falling", "vehiclecrash", "punch"};
minDamage = 0.1;
class Minor {
minDamage = 0.1;
bleedingRate = 0.005;
};
class Medium {
minDamage = 0.4;
bleedingRate = 0.007;
};
class Large {
minDamage = 0.6;
bleedingRate = 0.0095;
};
};
// Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision.
class Cut {
name = "Cut";
selections[] = {"All"};
bleedingRate = 0.01;
pain = 1;
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab"};
minDamage = 0.1;
class Minor {
minDamage = 0.1;
bleedingRate = 0.005;
};
class Medium {
minDamage = 0.3;
bleedingRate = 0.02;
};
class Large {
minDamage = 0.65;
bleedingRate = 0.05;
};
};
// Also called tears, these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source as in childbirth, or from an external source like a punch.
class Laceration {
name = "Tear";
selections[] = {"All"};
bleedingRate = 0.01;
pain = 1;
causes[] = {"vehiclecrash", "punch"};
minDamage = 0.01;
class Minor {
minDamage = 0.1;
bleedingRate = 0.005;
};
class Medium {
minDamage = 0.5;
bleedingRate = 0.01;
};
class Large {
minDamage = 0.7;
bleedingRate = 0.03;
};
};
// Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel.
class velocityWound {
name = "Velocity Wound";
selections[] = {"All"};
bleedingRate = 0.01;
pain = 1;
causes[] = {"bullet", "grenade","explosive", "shell"};
minDamage = 0.15;
class Minor {
minDamage = 0.15;
bleedingRate = 0.025;
};
class Medium {
minDamage = 0.3;
bleedingRate = 0.05;
};
class Large {
minDamage = 0.75;
bleedingRate = 0.1;
};
};
// Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass.
class punctureWound {
name = "Puncture Wound";
selections[] = {"All"};
bleedingRate = 0.01;
pain = 1;
causes[] = {"stab", "grenade"};
minDamage = 0.01;
class Minor {
minDamage = 0.01;
bleedingRate = 0.01;
};
class Medium {
minDamage = 0.5;
bleedingRate = 0.03;
};
class Large {
minDamage = 0.65;
bleedingRate = 0.08;
};
};
};
class fractures {
class Femur {
name = "Broken Femur";
selections[] = {"Head", "Torso"};
pain = 20;
causes[] = {"Bullet", "VehicleCrash", "Backblast", "Explosive", "Shell", "Grenade"};
minDamage = 0.5;
};
};
class damageTypes {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
class bullet {
// above damage, amount. Put the highest threshold to the left and lower the threshold with the elements to the right of it.
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class grenade {
thresholds[] = {{0.1, 3}, {0, 1}};
selectionSpecific = 0;
};
class explosive {
thresholds[] = {{1, 6}, {0.1, 4}, {0, 1}};
selectionSpecific = 0;
};
class shell {
thresholds[] = {{1, 7}, {0.1, 5}, {0, 1}};
selectionSpecific = 0;
};
class vehiclecrash {
thresholds[] = {{0.25, 5}};
selectionSpecific = 0;
};
class backblast {
thresholds[] = {{0.25, 5}};
selectionSpecific = 0;
};
class stab {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class punch {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class falling {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class ropeburn {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
};
};
class Treatment {
class Bandaging {
class FieldDressing {
// How effect is the bandage for treating one wounds type injury
effectiveness = 1;
// What is the chance and delays (in seconds) of the treated default injury reopening
reopeningChance = 0.1;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
class Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class Avulsions: Abrasion {
effectiveness = 0.3;
reopeningChance = 0.5;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class CrushWound: Abrasion {
effectiveness = 0.6;
reopeningChance = 0.2;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
class Cut: Abrasion {
effectiveness = 0.4;
reopeningChance = 0.5;
reopeningMinDelay = 220;
reopeningMaxDelay = 260;
};
class Laceration: Abrasion {
effectiveness = 0.7;
reopeningChance = 0.3;
reopeningMinDelay = 120;
reopeningMaxDelay = 260;
};
class velocityWound: Abrasion {
effectiveness = 0.3;
reopeningChance = 0.8;
reopeningMinDelay = 20;
reopeningMaxDelay = 300;
};
class punctureWound: Abrasion {
effectiveness = 0.5;
reopeningChance = 0.8;
reopeningMinDelay = 20;
reopeningMaxDelay = 300;
};
};
class PackingBandage: fieldDressing {
class Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class Avulsions: Abrasion {
effectiveness = 1;
reopeningChance = 0.3;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class CrushWound: Abrasion {
effectiveness = 0.6;
reopeningChance = 0.2;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
class Cut: Abrasion {
effectiveness = 0.2;
reopeningChance = 0.6;
reopeningMinDelay = 30;
reopeningMaxDelay = 260;
};
class Laceration: Abrasion {
effectiveness = 0.3;
reopeningChance = 0.3;
reopeningMinDelay = 120;
reopeningMaxDelay = 260;
};
class velocityWound: Abrasion {
effectiveness = 1;
reopeningChance = 0.5;
reopeningMinDelay = 20;
reopeningMaxDelay = 300;
};
class punctureWound: Abrasion {
effectiveness = 0.3;
reopeningChance = 0.5;
reopeningMinDelay = 20;
reopeningMaxDelay = 300;
};
};
class ElasticBandage: fieldDressing {
class Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class Avulsions: Abrasion {
effectiveness = 0.3;
reopeningChance = 0.4;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class CrushWound: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class Cut: Abrasion {
effectiveness = 1;
reopeningChance = 0.2;
reopeningMinDelay = 10;
reopeningMaxDelay = 400;
};
class Laceration: Abrasion {
effectiveness = 1;
reopeningChance = 0.3;
reopeningMinDelay = 120;
reopeningMaxDelay = 260;
};
class velocityWound: Abrasion {
effectiveness = 0.5;
reopeningChance = 0.5;
reopeningMinDelay = 20;
reopeningMaxDelay = 300;
};
class punctureWound: Abrasion {
effectiveness = 0.85;
reopeningChance = 0.5;
reopeningMinDelay = 20;
reopeningMaxDelay = 300;
};
};
class QuikClot: fieldDressing {
class Abrasion {
effectiveness = 0.7;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class Avulsions: Abrasion {
effectiveness = 0.2;
reopeningChance = 0.1;
reopeningMinDelay = 300;
reopeningMaxDelay = 350;
};
class Contusion: Abrasion {
effectiveness = 0.7;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class CrushWound: Abrasion {
effectiveness = 0.7;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class Cut: Abrasion {
effectiveness = 0.7;
reopeningChance = 0.2;
reopeningMinDelay = 100;
reopeningMaxDelay = 400;
};
class Laceration: Abrasion {
effectiveness = 0.7;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class velocityWound: Abrasion {
effectiveness = 0.7;
reopeningChance = 0.1;
reopeningMinDelay = 200;
reopeningMaxDelay = 300;
};
class punctureWound: Abrasion {
effectiveness = 0.5;
reopeningChance = 0.1;
reopeningMinDelay = 200;
reopeningMaxDelay = 300;
};
};
};
class Medication {
// How much does the pain get reduced?
painReduce = 0;
// How much will the heart rate be increased when the HR is low (below 55)? {minIncrease, maxIncrease, seconds}
hrIncreaseLow[] = {10, 20, 35};
hrIncreaseNormal[] = {10, 50, 40};
hrIncreaseHigh[] = {10, 40, 50};
// How long until this medication has disappeared
timeInSystem = 120;
// How many of this type of medication can be in the system before the patient overdoses?
maxDose = 4;
// specific details for the ACE_Morphine treatment action.
class Morphine {
painReduce = 1;
hrIncreaseLow[] = {-10, -30, 35};
hrIncreaseNormal[] = {-10, -50, 40};
hrIncreaseHigh[] = {-10, -40, 50};
timeInSystem = 120;
maxDose = 4;
inCompatableMedication[] = {};
};
class Epinephrine {
painReduce = 1;
hrIncreaseLow[] = {10, 20, 30};
hrIncreaseNormal[] = {10, 50, 20};
hrIncreaseHigh[] = {10, 40, 10};
timeInSystem = 120;
maxDose = 10;
inCompatableMedication[] = {};
};
class Atropine {
painReduce = 1;
hrIncreaseLow[] = {-10, -20, 15};
hrIncreaseNormal[] = {-10, -50, 20};
hrIncreaseHigh[] = {-10, -40, 10};
timeInSystem = 120;
maxDose = 6;
inCompatableMedication[] = {};
};
};
class IV {
// volume is in millileters
volume = 1000;
ratio[] = {};
type = "Blood";
class BloodIV {
volume = 1000;
ratio[] = {"Plasma", 1};
};
class BloodIV_500: BloodIV {
volume = 500;
};
class BloodIV_250: BloodIV {
volume = 250;
};
class PlasmaIV: BloodIV {
volume = 1000;
ratio[] = {"Blood", 1};
type = "Plasma";
};
class PlasmaIV_500: PlasmaIV {
volume = 500;
};
class PlasmaIV_250: PlasmaIV {
volume = 250;
};
class SalineIV: BloodIV {
volume = 1000;
type = "Saline";
ratio[] = {};
};
class SalineIV_500: SalineIV {
volume = 500;
};
class SalineIV_250: SalineIV {
volume = 250;
};
};
};
};

View File

@ -1,3 +1,4 @@
class Extended_PreInit_EventHandlers { class Extended_PreInit_EventHandlers {
class ADDON { class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit)); init = QUOTE(call COMPILE_FILE(XEH_preInit));
@ -6,30 +7,22 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers { class Extended_PostInit_EventHandlers {
class ADDON { class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit)); init = QUOTE(call COMPILE_FILE(XEH_postInit));
}; };
}; };
class Extended_Init_EventHandlers {
class Extended_Killed_Eventhandlers { class CAManBase {
class CaManBase {
class ADDON { class ADDON {
Killed = QUOTE(_this call FUNC(eh_killed)); init = QUOTE(call COMPILE_FILE(XEH_init));
}; };
}; };
}; };
class Extended_Local_Eventhandlers { class Extended_Respawn_EventHandlers {
class CaManBase { class CAManBase {
class ADDON { class ADDON {
Local = QUOTE(_this call FUNC(eh_local)); respawn = QUOTE(call COMPILE_FILE(XEH_respawn));
};
};
};
class Extended_Init_Eventhandlers {
class CaManBase {
class ADDON {
init = QUOTE(_this call FUNC(onInitForUnit););
}; };
}; };
}; };

View File

@ -1,7 +0,0 @@
class CfgFactionClasses
{
class NO_CATEGORY;
class ACE_medical: NO_CATEGORY {
displayName = "ACE Medical";
};
};

View File

@ -1,38 +0,0 @@
class CfgHints
{
class Combat_Space_Enhancement
{
displayName = "Combat Space Enhancement";
class ACE_Module
{
displayName = "Combat Medical System";
displayNameShort = "Combat Medical System";
description = "Combat Medical System is an advanced medical system for players and AI.";
tip = "";
arguments[] = {};
image = "";
noImage = true;
};
class Assessment
{
displayName = "Patient Assessment";
displayNameShort = "Patient Assessment";
description = "It is essential when treating a casualty that you fully assess each of the areas of the casualty to determine not only the injuries but the priority of each in severity. <br> You cna assess a patient by clicking on the Assessment ICON <br> Use Check Pulse, check Blood Pressure and Check Response to get an overview.";
tip = "Medics will get a faster and more accurate result when assessing patients.";
arguments[] = {};
image = "";
noImage = true;
};
class Bleeding
{
displayName = "Bandaging a wound";
displayNameShort = "Bandaging a wound";
description = "For casualties the first priority is to stop the bleeding. You will want to bandage the largest wounds first, before attending to the smaller ones. <br>You can apply a tourniquet on the limbs to stem the bleeding faster, but remember to remove it!";
tip = "Select a wound in the injury list to bandage that one first!";
arguments[] = {};
image = "";
noImage = true;
};
};
};

View File

@ -1,45 +1,37 @@
class CfgSounds class CfgSounds {
{ class ACE_heartbeat_fast_1 {
class GVAR(heartbeat_fast_1) name = "ACE_heartbeat_fast_1";
{ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_1.wav)), "db+1", 1};
name = QGVAR(heartbeat_fast_1);
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_1.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
class GVAR(heartbeat_fast_2) class ACE_heartbeat_fast_2 {
{ name = "ACE_heartbeat_fast_2";
name = QGVAR(heartbeat_fast_2); sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_2.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_2.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
class GVAR(heartbeat_fast_3) class ACE_heartbeat_fast_3 {
{ name = "ACE_heartbeat_fast_3";
name = QGVAR(heartbeat_fast_3); sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_3.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_3.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
class GVAR(heartbeat_norm_1) class ACE_heartbeat_norm_1 {
{ name = "ACE_heartbeat_norm_1";
name = QGVAR(heartbeat_norm_1); sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_1.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_1.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
class GVAR(heartbeat_norm_2) class ACE_heartbeat_norm_2 {
{ name = "ACE_heartbeat_norm_2";
name = QGVAR(heartbeat_norm_2); sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_2.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_2.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
class GVAR(heartbeat_slow_1) class ACE_heartbeat_slow_1 {
{ name = "ACE_heartbeat_slow_1";
name = QGVAR(heartbeat_slow_1); sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_1.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_1.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
class GVAR(heartbeat_slow_2) class ACE_heartbeat_slow_2 {
{ name = "ACE_heartbeat_slow_2";
name = QGVAR(heartbeat_slow_2); sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_2.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_2.wav)),"db-1",1};
titles[] = {}; titles[] = {};
}; };
}; };

View File

@ -1,817 +1,5 @@
class CfgVehicles
{
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {
};
};
class ACE_moduleCombatMedicalSystem: Module_F {
scope = 2;
displayName = "Combat Medical System [ACE]";
icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
category = "ACE_medical";
function = QUOTE(FUNC(initalizeModuleCMS));
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
author = "Glowbal";
class Arguments {
class advancedLevel {
displayName = "Advanced Level";
description = "How advanced can the medical system be?";
typeName = "NUMBER";
class values {
class basic {
name = "Basic. Only bleeding and pain.";
value = 0;
default = 1;
};
class normal {
name = "Normal. Bleeding, Pain, Blood pressure and heart rate";
value = 1;
};
class full {
name = "Full. Everything enabled.";
value = 2;
};
};
};
class openingOfWounds {
displayName = "Advanced Wounds";
description = "When set to true, bandaged wounds could on occasion re-open, resulting in new open wounds that need to be bandaged.";
typeName = "BOOL";
defaultValue = 1;
};
class mediACEtting {
displayName = "Advanced Medic roles";
description = "Medics only are able to view the detailed information";
typeName = "BOOL";
defaultValue = 1;
};
class difficultySetting {
displayName = "Survival Difficulty";
description = "Select the aggressiveness of the medical simulation";
typeName = "NUMBER";
class values {
class recruit {
name = "Recruit";
value = 0.5;
};
class regular {
name = "Regular";
value = 1;
default = 1;
};
class veteran {
name = "Veteran";
value = 1.2;
};
class expert {
name = "Expert";
value = 1.5;
};
};
};
class enableFor {
displayName = "Enabled for";
description = "Select what units CMS will be enabled for";
typeName = "NUMBER";
class values {
class playableUnits {
name = "Players only";
value = 0;
default = 1;
};
class playableUnitsAndAI {
name = "Players and AI";
value = 1;
};
};
};
class enableAirway {
displayName = "Enable Airway";
description = "Should CMS Airway system be enabled?";
typeName = "NUMBER";
class values {
class enable {
name = "Yes";
value = 1;
};
class disable {
name = "No";
value = 0;
default = 1;
};
};
};
class vehCrashes {
displayName = "Vehicle Crashes";
description = "Enable injuries on vehicle crashes";
typeName = "BOOL";
defaultValue = 1;
};
class aidKitUponUsage {
displayName = "Disposable Aid kit";
description = "Is a personal aid kit disposable?";
typeName = "BOOL";
defaultValue = false;
};
class aidKitMedicsOnly {
displayName = "Medics only";
description = "Are aid kits restricted to medics only?";
typeName = "BOOL";
defaultValue = false;
};
class aidKitRestrictions {
displayName = "Aid kit";
description = "When can an Aid kit be used?";
typeName = "NUMBER";
class values {
class medFacility {
name = "Medical Facility";
value = 0;
default = 1;
};
class medFAcilityNoBleeding {
name = "Medical Facility & No bleeding";
value = 1;
};
class Everywhere {
name = "Everywhere";
value = 2;
};
class EverywhereNoBleeding {
name = "Everywhere & No Bleeding";
value = 3;
};
};
};
class bandageTime {
displayName = "Bandage Time";
description = "Time it takes for a bandage action to be completed";
typeName = "NUMBER";
defaultValue = 5;
};
class stitchingAllow {
displayName = "Can Stitch";
description = "What units can use stitching?";
typeName = "NUMBER";
defaultValue = 0;
class values {
class medicsOnly {
name = "Medics Only";
value = 0;
default = 1;
};
class everyone {
name = "Everyone";
value = 1;
};
class noOne {
name = "No units";
value = -1;
};
};
};
};
class ModuleDescription {
description = "Provides a more realistic medical system for both players and AI."; // Short description, will be formatted as structured text
sync[] = {};
};
};
class ACE_moduleDamageSettings: Module_F {
scope = 2;
displayName = "Damage Settings [ACE]";
icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleDamageSettings));
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
author = "Glowbal";
class Arguments {
class damageThresholdAI {
displayName = "Damage Threshold AI";
description = "How much damage does it take for an AI to be killed?";
typeName = "NUMBER";
defaultValue = 1;
};
class damageThresholdPlayers {
displayName = "Damage Threshold Players";
description = "How much damage does it take for a player to be killed?";
typeName = "NUMBER";
defaultValue = 1;
};
};
class ModuleDescription {
description = "Custom damage threshold module";
sync[] = {};
};
};
class ACE_moduleAssignMedicRoles: Module_F {
scope = 2;
displayName = "Set Medic Class [ACE]";
icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicRoles));
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = "Glowbal";
class Arguments {
class EnableList {
displayName = "List";
description = "List of unit names that will be classified as medic, separated by commas.";
defaultValue = "";
};
class class {
displayName = "Is Medic";
description = "Medics allow for more advanced treatment in case of Advanced Medic roles enabled";
typeName = "BOOL";
defaultValue = true;
};
};
class ModuleDescription {
description = "Assigns the ACE medic class to a unit"; // Short description, will be formatted as structured text
sync[] = {};
};
};
class ACE_moduleAssignMedicalVehicle: Module_F {
scope = 2;
displayName = "set Medical Vehicle [ACE]";
icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalVehicle));
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = "Glowbal";
class Arguments {
class EnableList {
displayName = "List";
description = "List of object names that will be classified as medical vehicle, separated by commas.";
defaultValue = "";
};
class enabled {
displayName = "Is Medical Vehicle";
description = "Whatever or not the objects in the list will be a medical vehicle.";
typeName = "BOOL";
defaultValue = true;
};
};
class ModuleDescription {
description = "Assigns the ACE medical vehicle class to a vehicle.";
sync[] = {};
};
};
class ACE_moduleAssignMedicalFacility: Module_F {
scope = 2;
displayName = "Set Medical Facility [ACE]";
icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalFacility));
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = "Glowbal";
class Arguments {
class class {
displayName = "Is Medical Facility";
description = "Registers an object as a medical facility for CMS";
typeName = "BOOL";
};
};
class ModuleDescription {
description = "Defines an object as a medical facility for CMS. This allows for more advanced treatments. Can be used on buildings and vehicles. ";
sync[] = {};
};
};
class ACE_moduleAssignMedicalEquipment: Module_F {
scope = 2;
displayName = "Assign Medical Equipment [ACE]";
icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleAssignMedicalEquipment));
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
author = "Glowbal";
class Arguments {
class equipment {
displayName = "Assign Equipment";
description = "Assign Medical equipment to all players";
typeName = "NUMBER";
defaultValue = 0;
class values {
class AllPlayers {
name = "All Players";
value = 0;
default = 1;
};
class MedicsOnly {
name = "Medics only";
value = 1;
};
};
};
};
class ModuleDescription {
description = "Assigns medical equipment to units";
sync[] = {};
};
};
class MapBoard_altis_F;
class ACE_bodyBag: MapBoard_altis_F {
scope = 1;
side = -1;
model = QUOTE(PATHTOF(equipment\bodybag.p3d));
icon = "";
displayName = $STR_ACE_MAG_BODYBAG_DISPLAY;
};
class Item_Base_F;
class ACE_bandage_basicItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_BANDAGE_BASIC_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_bandage_basic
{
name = "ACE_bandage_basic";
count = 1;
};
};
};
class ACE_packing_bandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_PACKING_BANDAGE_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_packing_bandage
{
name = "ACE_packing_bandage";
count = 1;
};
};
};
class ACE_bandageElasticItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_BANDAGE_ELASTIC_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_bandageElastic
{
name = "ACE_bandageElastic";
count = 1;
};
};
};
class ACE_tourniquetItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_TOURNIQUET_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_tourniquet
{
name = "ACE_tourniquet";
count = 1;
};
};
};
class ACE_splintItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_SPLINT_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_splint
{
name = "ACE_splint";
count = 1;
};
};
};
class ACE_morphineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_MORPHINE_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_morphine
{
name = "ACE_morphine";
count = 1;
};
};
};
class ACE_atropineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_ATROPINE_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_atropine
{
name = "ACE_atropine";
count = 1;
};
};
};
class ACE_epinephrineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_EPINEPHRINE_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_epinephrine
{
name = "ACE_epinephrine";
count = 1;
};
};
};
class ACE_plasma_ivItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_PLASMA_IV;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_plasma_iv
{
name = "ACE_plasma_iv";
count = 1;
};
};
};
class ACE_plasma_iv_500Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_PLASMA_IV_500;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_plasma_iv_500
{
name = "ACE_plasma_iv_500";
count = 1;
};
};
};
class ACE_plasma_iv_250Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_PLASMA_IV_250;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_plasma_iv_250
{
name = "ACE_plasma_iv_250";
count = 1;
};
};
};
class ACE_blood_ivItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_BLOOD_IV;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_blood_iv
{
name = "ACE_blood_iv";
count = 1;
};
};
};
class ACE_blood_iv_500Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_BLOOD_IV_500;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_blood_iv_500
{
name = "ACE_blood_iv_500";
count = 1;
};
};
};
class ACE_blood_iv_250Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_BLOOD_IV_250;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_blood_iv_250
{
name = "ACE_blood_iv_250";
count = 1;
};
};
};
class ACE_saline_ivItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_SALINE_IV;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_saline_iv
{
name = "ACE_saline_iv";
count = 1;
};
};
};
class ACE_saline_iv_500Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_SALINE_IV_500;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_saline_iv_500
{
name = "ACE_saline_iv_500";
count = 1;
};
};
};
class ACE_saline_iv_250Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_SALINE_IV_250;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_saline_iv_250
{
name = "ACE_saline_iv_250";
count = 1;
};
};
};
class ACE_quikclotItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_QUIKCLOT_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_quikclot
{
name = "ACE_quikclot";
count = 1;
};
};
};
class ACE_nasopharyngeal_tubeItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_NPA_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_nasopharyngeal_tube
{
name = "ACE_nasopharyngeal_tube";
count = 1;
};
};
};
class ACE_opaItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_OPA_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_opa
{
name = "ACE_opa";
count = 1;
};
};
};
class ACE_liquidSkinItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_LIQUID_SKIN_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_liquidSkin
{
name = "ACE_liquidSkin";
count = 1;
};
};
};
class ACE_chestsealItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_CHEST_SEAL_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_chestseal
{
name = "ACE_chestseal";
count = 1;
};
};
};
class ACE_personal_aid_kitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_AID_KIT_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_personal_aid_kit
{
name = "ACE_personal_aid_kit";
count = 1;
};
};
};
class ACE_bodyBagItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = $STR_ACE_MAG_BODYBAG_DISPLAY;
author = "Glowbal";
vehicleClass = "Items";
class TransportItems
{
class ACE_itemBodyBag
{
name = "ACE_itemBodyBag";
count = 1;
};
};
};
class NATO_Box_Base;
class ACE_medical_supply_crate_cms : NATO_Box_Base {
scope = 2;
accuracy = 1000;
displayName = "Medical Supply Crate [ACE]";
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
author = "Glowbal";
class TransportItems {
class ACE_bandage_basic {
name = "ACE_bandage_basic";
count = 25;
};
class ACE_packing_bandage {
name = "ACE_packing_bandage";
count = 25;
};
class ACE_tourniquet {
name = "ACE_tourniquet";
count = 25;
};
class ACE_splint {
name = "ACE_splint";
count = 25;
};
class ACE_plasma_iv {
name = "ACE_plasma_iv";
count = 25;
};
class ACE_plasma_iv_500 {
name = "ACE_plasma_iv_500";
count = 25;
};
class ACE_plasma_iv_250 {
name = "ACE_plasma_iv_250";
count = 25;
};
class ACE_blood_iv {
name = "ACE_blood_iv";
count = 25;
};
class ACE_blood_iv_500 {
name = "ACE_blood_iv_500";
count = 25;
};
class ACE_blood_iv_250 {
name = "ACE_blood_iv_250";
count = 25;
};
class ACE_saline_iv {
name = "ACE_saline_iv";
count = 25;
};
class ACE_saline_iv_500 {
name = "ACE_saline_iv_500";
count = 25;
};
class ACE_saline_iv_250 {
name = "ACE_saline_iv_250";
count = 25;
};
class ACE_morphine {
name = "ACE_morphine";
count = 25;
};
class ACE_epinephrine {
name = "ACE_epinephrine";
count = 25;
};
class ACE_atropine {
name = "ACE_atropine";
count = 25;
};
class ACE_quikclot {
name = "ACE_quikclot";
count = 25;
};
class ACE_nasopharyngeal_tube {
name = "ACE_nasopharyngeal_tube";
count = 25;
};
class ACE_bandageElastic {
name = "ACE_bandageElastic";
count = 25;
};
class ACE_liquidSkin {
name = "ACE_liquidSkin";
count = 25;
};
class ACE_chestseal {
name = "ACE_chestseal";
count = 25;
};
class ACE_personal_aid_kit {
name = "ACE_personal_aid_kit";
count = 25;
};
class ACE_surgical_kit {
name = "ACE_surgical_kit";
count = 25;
};
class ACE_itemBodyBag {
name = "ACE_itemBodyBag";
count = 5;
};
};
};
class CfgVehicles {
#define ARM_LEG_ARMOR_DEFAULT 2 #define ARM_LEG_ARMOR_DEFAULT 2
#define ARM_LEG_ARMOR_BETTER 3 #define ARM_LEG_ARMOR_BETTER 3
#define ARM_LEG_ARMOR_CSAT 4 #define ARM_LEG_ARMOR_CSAT 4
@ -870,6 +58,50 @@ class CfgVehicles
name = "leg_r"; name = "leg_r";
}; };
}; };
class ACE_Actions {
class Bandage_Head {
displayName = "Bandage Head";
selection = "pilot";
distance = 2.0;
//condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage Head')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
};
class Bandage_Torso: Bandage_Head {
displayName = "Bandage Torso";
selection = "Spine3";
//condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
};
class Bandage_LeftArm: Bandage_Head {
displayName = "Bandage Right Arm";
selection = "LeftForeArm";
//condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
};
class Bandage_RightArm: Bandage_Head {
displayName = "Bandage Right Arm";
selection = "RightForeArm";
//condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
};
class Bandage_LeftLeg: Bandage_Head {
displayName = "Bandage Left Leg";
selection = "lknee";
//condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
};
class Bandage_RightLeg: Bandage_Head {
displayName = "Bandage Right Leg";
selection = "rknee";
//condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreat));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
};
};
}; };
class SoldierWB: CAManBase {}; class SoldierWB: CAManBase {};
@ -877,6 +109,7 @@ class CfgVehicles
class SoldierGB: CAManBase {}; class SoldierGB: CAManBase {};
class B_Soldier_base_F: SoldierWB {}; class B_Soldier_base_F: SoldierWB {};
class B_Soldier_04_f: B_Soldier_base_F { class B_Soldier_04_f: B_Soldier_base_F {
class HitPoints: HitPoints { class HitPoints: HitPoints {
class HitHead: HitHead {}; class HitHead: HitHead {};

View File

@ -1,317 +1,263 @@
class CfgWeapons { class CfgWeapons {
class ItemCore; class ItemCore;
class InventoryItem_Base_F; class InventoryItem_Base_F;
class ACE_bandage_basic: ItemCore class InventoryFirstAidKitItem_Base_F;
{ class MedikitItem;
scope = 2;
value = 1; // ITEMS
count = 1; class FirstAidKit: ItemCore {
type = 16; type = 0;
displayName = $STR_ACE_MAG_BANDAGE_BASIC_DISPLAY; class ItemInfo: InventoryFirstAidKitItem_Base_F {
picture = QUOTE(PATHTOF(equipment\img\field_dressing.paa)); mass = 4;
model = QUOTE(PATHTOF(equipment\bandages\fielddressing.p3d)); type = 201;
descriptionShort = $STR_ACE_MAG_BANDAGE_BASIC_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_BANDAGE_BASIC_DESC_USE;
class ItemInfo: InventoryItem_Base_F
{
mass=0.5;
type=201;
};
}; };
class ACE_packing_bandage: ItemCore };
{ class Medikit: ItemCore {
scope = 2; type = 0;
value = 1; class ItemInfo: MedikitItem {
count = 1; mass = 60;
type = 16; type = 201;
displayName = $STR_ACE_MAG_PACKING_BANDAGE_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\packing_bandage.paa));
model = QUOTE(PATHTOF(equipment\bandages\packingbandage.p3d));
descriptionShort = $STR_ACE_MAG_PACKING_BANDAGE_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_PACKING_BANDAGE_DESC_USE;
class ItemInfo: InventoryItem_Base_F
{
mass=1;
type=201;
};
}; };
class ACE_bandageElastic: ItemCore { };
// @todo localize
class ACE_ItemCore;
class GVAR(fieldDressing): ACE_ItemCore {
scope = 2; scope = 2;
value = 1;
count = 1;
type = 16;
displayName = $STR_ACE_MAG_BANDAGE_ELASTIC_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\bandageElastic.paa));
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = $STR_ACE_MAG_BANDAGE_ELASTIC_DESC_SHORT; picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa));
descriptionUse = $STR_ACE_MAG_BANDAGE_ELASTIC_DESC_USE; displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY;
class ItemInfo: InventoryItem_Base_F descriptionShort = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT;
{ descriptionUse = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_tourniquet: ItemCore class GVAR(packingBandage): ItemCore {
{
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_TOURNIQUET_DISPLAY; displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\tourniquet.paa)); picture = QUOTE(PATHTOF(ui\items\packingBandage.paa));
model = QUOTE(PATHTOF(equipment\Tourniquet.p3d)); model = QUOTE(PATHTOF(data\packingbandage.p3d));
descriptionShort = $STR_ACE_MAG_TOURNIQUET_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_TOURNIQUET_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_splint: ItemCore class GVAR(elasticBandage): ItemCore {
{
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_SPLINT_DISPLAY; displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\splint.paa)); picture = QUOTE(PATHTOF(ui\items\elasticBandage.paa));
descriptionUse = $STR_ACE_MAG_SPLINT_DESC_USE; model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = $STR_ACE_MAG_SPLINT_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT;
class ItemInfo: InventoryItem_Base_F descriptionUse = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE;
{ class ItemInfo: InventoryItem_Base_F {
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_morphine: ItemCore class GVAR(tourniquet): ItemCore {
{
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_MORPHINE_DISPLAY; displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\morphine.paa)); picture = QUOTE(PATHTOF(ui\items\tourniquet.paa));
model = QUOTE(PATHTOF(equipment\Morphinpen.p3d)); model = QUOTE(PATHTOF(data\tourniquet.p3d));
descriptionShort = $STR_ACE_MAG_MORPHINE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_MORPHINE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_TOURNIQUET_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_atropine: ItemCore { class GVAR(morphine): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_ATROPINE_DISPLAY; displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\atropine.paa)); picture = QUOTE(PATHTOF(ui\items\morphine.paa));
model = QUOTE(PATHTOF(equipment\Atropin-pen.p3d)); model = QUOTE(PATHTOF(data\morphine.p3d));
descriptionShort = $STR_ACE_MAG_ATROPINE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_MORPHINE_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_ATROPINE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_MORPHINE_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_epinephrine: ItemCore { class GVAR(atropine): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_EPINEPHRINE_DISPLAY; displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\epinephrine.paa)); picture = QUOTE(PATHTOF(ui\items\atropine.paa));
model = QUOTE(PATHTOF(equipment\Epipen.p3d)); model = QUOTE(PATHTOF(data\atropine.p3d));
descriptionShort = $STR_ACE_MAG_EPINEPHRINE_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_ATROPINE_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_EPINEPHRINE_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_ATROPINE_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_plasma_iv: ItemCore { class GVAR(epinephrine): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
displayName = $STR_ACE_MAG_PLASMA_IV; type = 16;
picture = QUOTE(PATHTOF(equipment\img\plasma_iv.paa)); displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY;
descriptionShort = $STR_ACE_MAG_PLASMA_IV_DESC_SHORT; picture = QUOTE(PATHTOF(ui\items\epinephrine.paa));
descriptionUse = $STR_ACE_MAG_PLASMA_IV_DESC_USE; model = QUOTE(PATHTOF(data\epinephrine.p3d));
class ItemInfo: InventoryItem_Base_F descriptionShort = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT;
{ descriptionUse = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass=1; mass=1;
type=201; type=201;
}; };
}; };
class ACE_plasma_iv_500: ACE_plasma_iv { class GVAR(plasmaIV): ItemCore {
displayName = $STR_ACE_MAG_PLASMA_IV_500; scope = 2;
value = 1;
count = 1;
displayName = $STR_ACE_MEDICAL_PLASMA_IV;
picture = QUOTE(PATHTOF(ui\items\plasmaIV.paa));
descriptionShort = $STR_ACE_MEDICAL_PLASMA_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_PLASMA_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
mass = 10;
type = 201;
};
}; };
class ACE_plasma_iv_250: ACE_plasma_iv_500 { class GVAR(plasmaIV_500): GVAR(plasmaIV) {
displayName = $STR_ACE_MAG_PLASMA_IV_250; displayName = $STR_ACE_MEDICAL_PLASMA_IV_500;
class ItemInfo: InventoryItem_Base_F {
mass = 5;
type = 201;
};
}; };
class ACE_blood_iv: ItemCore { class GVAR(plasmaIV_250): GVAR(plasmaIV) {
displayName = $STR_ACE_MEDICAL_PLASMA_IV_250;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
};
class GVAR(bloodIV): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d"; model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
displayName = $STR_ACE_MAG_BLOOD_IV; displayName = $STR_ACE_MEDICAL_BLOOD_IV;
picture = QUOTE(PATHTOF(equipment\img\bloodbag.paa)); picture = QUOTE(PATHTOF(ui\items\bloodIV.paa));
descriptionShort = $STR_ACE_MAG_BLOOD_IV_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BLOOD_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_BLOOD_IV_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_BLOOD_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{ mass = 10;
mass=1; type = 201;
type=201;
}; };
}; };
class ACE_blood_iv_500: ACE_blood_iv { class GVAR(bloodIV_500): GVAR(bloodIV) {
displayName = $STR_ACE_MAG_BLOOD_IV_500; displayName = $STR_ACE_MEDICAL_BLOOD_IV_500;
class ItemInfo: InventoryItem_Base_F {
mass = 5;
type = 201;
};
}; };
class ACE_blood_iv_250: ACE_blood_iv_500 { class GVAR(bloodIV_250): GVAR(bloodIV) {
displayName = $STR_ACE_MAG_BLOOD_IV_250; displayName = $STR_ACE_MEDICAL_BLOOD_IV_250;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
}; };
class ACE_saline_iv: ItemCore { class GVAR(salineIV): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
displayName = $STR_ACE_MAG_SALINE_IV; displayName = $STR_ACE_MEDICAL_SALINE_IV;
picture = QUOTE(PATHTOF(equipment\img\saline_iv.paa)); picture = QUOTE(PATHTOF(ui\items\salineIV.paa));
descriptionShort = $STR_ACE_MAG_SALINE_IV_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_SALINE_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_SALINE_IV_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_SALINE_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{ mass = 10;
mass=1; type = 201;
type=201;
}; };
}; };
class ACE_saline_iv_500: ACE_saline_iv { class GVAR(salineIV_500): GVAR(salineIV) {
displayName = $STR_ACE_MAG_SALINE_IV_500; displayName = $STR_ACE_MEDICAL_SALINE_IV_500;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
}; };
class ACE_saline_iv_250: ACE_saline_iv_500 { class GVAR(salineIV_250): GVAR(salineIV) {
displayName = $STR_ACE_MAG_SALINE_IV_250; displayName = $STR_ACE_MEDICAL_SALINE_IV_250;
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
type = 201;
};
}; };
class ACE_quikclot: ItemCore { class GVAR(quikclot): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_QUIKCLOT_DISPLAY; displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\quickclot.paa)); picture = QUOTE(PATHTOF(ui\items\quickclot.paa));
descriptionShort = $STR_ACE_MAG_QUIKCLOT_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_QUIKCLOT_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_QUIKCLOT_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_QUIKCLOT_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{ mass = 1;
mass=1; type = 201;
type=201;
}; };
}; };
class ACE_nasopharyngeal_tube: ItemCore { class GVAR(personalAidKit): ItemCore {
scope = 2; scope = 2;
value = 1; value = 1;
count = 1; count = 1;
type = 16; type = 16;
displayName = $STR_ACE_MAG_NPA_DISPLAY; displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\nasopharyngeal_tube.paa)); //picture = QUOTE(PATHTOF(ui\items\personal_aid_kit.paa));
descriptionUse = $STR_ACE_MAG_NPA_DESC_USE; //model = QUOTE(PATHTOF(equipment\Personal-aidkits\MTP.p3d));
descriptionShort = $STR_ACE_MAG_NPA_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_AID_KIT_DESC_SHORT;
class ItemInfo: InventoryItem_Base_F descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE;
{ class ItemInfo: InventoryItem_Base_F {
mass=1; mass = 2;
type=201; type = 201;
}; };
}; };
class ACE_opa: ItemCore { class GVAR(surgicalKit): ItemCore {
scope = 2;
value = 1;
count = 1;
type = 16;
displayName = $STR_ACE_MAG_OPA_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\nasopharyngeal_tube.paa));
descriptionShort = $STR_ACE_MAG_OPA_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_OPA_DESC_USE;
class ItemInfo: InventoryItem_Base_F
{
mass=1;
type=201;
};
};
class ACE_liquidSkin: ItemCore {
scope = 2;
value = 1;
count = 1;
type = 16;
displayName = $STR_ACE_MAG_LIQUID_SKIN_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\liquidSkin.paa));
model = QUOTE(PATHTOF(equipment\skinliquid.p3d));
descriptionShort = $STR_ACE_MAG_LIQUID_SKIN_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_LIQUID_SKIN_DESC_USE;
class ItemInfo: InventoryItem_Base_F
{
mass=1;
type=201;
};
};
class ACE_chestseal: ItemCore {
scope = 2;
value = 1;
count = 1;
type = 16;
displayName = $STR_ACE_MAG_CHEST_SEAL_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\chestseal.paa));
descriptionShort = $STR_ACE_MAG_CHEST_SEAL_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_CHEST_SEAL_DESC_USE;
class ItemInfo: InventoryItem_Base_F
{
mass=1;
type=201;
};
};
class ACE_personal_aid_kit: ItemCore {
scope = 2;
value = 1;
count = 1;
type = 16;
displayName = $STR_ACE_MAG_AID_KIT_DISPLAY;
picture = QUOTE(PATHTOF(equipment\img\personal_aid_kit.paa));
model = QUOTE(PATHTOF(equipment\Personal-aidkits\MTP.p3d));
descriptionShort = $STR_ACE_MAG_AID_KIT_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_AID_KIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F
{
mass=2;
type=201;
};
};
class ACE_surgical_kit: ItemCore
{
scope=2; scope=2;
displayName= $STR_ACE_MAG_SURGICALKIT_DISPLAY; displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
model = QUOTE(PATHTOF(equipment\surgical_kit.p3d)); model = QUOTE(PATHTOF(data\surgical_kit.p3d));
picture = QUOTE(PATHTOF(equipment\img\surgical_kit.paa)); //picture = QUOTE(PATHTOF(data\surgical_kit.paa));
descriptionShort = $STR_ACE_MAG_SURGICALKIT_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_SURGICALKIT_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{ mass = 5;
mass= 5; type = 201;
type=201;
}; };
}; };
class ACE_itemBodyBag: ItemCore class GVAR(bodyBag): ItemCore {
{
scope=2; scope=2;
displayName= $STR_ACE_MAG_BODYBAG_DISPLAY; displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY;
model = QUOTE(PATHTOF(equipment\bodybagItem.p3d)); model = QUOTE(PATHTOF(data\bodybagItem.p3d));
picture = QUOTE(PATHTOF(equipment\img\bodybag.paa)); picture = QUOTE(PATHTOF(ui\items\bodybag.paa));
descriptionShort = $STR_ACE_MAG_BODYBAG_DESC_SHORT; descriptionShort = $STR_ACE_MEDICAL_BODYBAG_DESC_SHORT;
descriptionUse = $STR_ACE_MAG_BODYBAG_DESC_USE; descriptionUse = $STR_ACE_MEDICAL_BODYBAG_DESC_USE;
class ItemInfo: InventoryItem_Base_F class ItemInfo: InventoryItem_Base_F {
{ mass = 15;
mass= 15; type = 201;
type=201;
}; };
}; };
}; };

View File

@ -8,3 +8,4 @@ Provides a basic and advanced medical system.
The people responsible for merging changes to this component or answering potential questions. The people responsible for merging changes to this component or answering potential questions.
- [Glowbal](https://github.com/Glowbal) - [Glowbal](https://github.com/Glowbal)
- [KoffeinFlummi](https://github.com/KoffeinFlummi)

View File

@ -0,0 +1,10 @@
#include "script_component.hpp"
private ["_unit"];
_unit = _this select 0;
if !(local _unit) exitWith {};
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
[_unit] call FUNC(init);

View File

@ -1,245 +1,235 @@
/** // ACE Medical System Visual Loop
* XEH_postInit.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp" #include "script_component.hpp"
#include "variable_defines.sqf"
GVAR(injuredUnitCollection) = []; if (!hasInterface) exitwith{};
[{
{
if (!alive _x || !local _x) then {
GVAR(injuredUnitCollection) set [ _forEachIndex, ObjNull];
} else {
[_x] call FUNC(handleUnitVitals);
private "_pain"; GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"];
_pain = _X getvariable [QGVAR(amountOfPain), 0]; GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
if (_pain > 5 && (random(1) > 0.5)) then { GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
_x setvariable [QGVAR(amountOfPain), _pain + 0.002];
};
if (_pain > 45) then {
if (random(1) > 0.6) then {
[_X] call FUNC(setUnconsciousState);
};
//[_X] call FUNC(playInjuredSound);
};
};
}foreach GVAR(injuredUnitCollection);
GVAR(injuredUnitCollection) = GVAR(injuredUnitCollection) - [ObjNull];
}, 1, [] ] call CBA_fnc_addPerFrameHandler;
[
{(([_this select 0,QGVAR(bloodVolume)] call EFUNC(common,getDefinedVariable)) < 65)},
{(([_this select 0,QGVAR(amountOfPain)] call EFUNC(common,getDefinedVariable)) > 48)},
{(((_this select 0) call FUNC(getBloodLoss)) > 0.25)},
{((_this select 0) getvariable ["ACE_inReviveState", false])}
] call FUNC(registerUnconsciousCondition);
call FUNC(handleDisplayEffects);
// Assigning all eventhandlers
["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler; ["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
["onStartMovingUnit", FUNC(onStartMovingUnit)] call ace_common_fnc_addEventHandler; ["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler;
["onUnconscious", FUNC(onUnconscious)] call ace_common_fnc_addEventHandler; ["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
["carryObjectDropped", FUNC(onCarryObjectDropped)] call ace_common_fnc_addEventHandler;
if (isNil QGVAR(ENABLE_REVIVE)) then { // Initialize all effects
GVAR(ENABLE_REVIVE) = 0; // @todo: make this a macro?
_fnc_createEffect = {
private ["_type", "_layer", "_default"];
_type = _this select 0;
_layer = _this select 1;
_default = _this select 2;
_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;
// Keybindings GVAR(effectUnconsciousRB) = [
GVAR(keyPressed) = false; "RadialBlur",
4202,
[0.01,0.01,0,0]
] call _fnc_createEffect;
["ACE3", GVAR(effectBlindingCC) = [
localize "STR_ACE_OPEN_CMS_MENU_DESC", "ColorCorrections",
{ if (!GVAR(keyPressed)) then { 4203,
GVAR(keyPressed) = true; [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]]
GVAR(timeMenuOpened) = time; ] call _fnc_createEffect;
[] call FUNC(openMenu);
true; GVAR(effectBloodVolumeCC) = [
} else { "ColorCorrections",
false; 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) = time;
// MAIN EFFECTS LOOP
[{
// Zeus interface is open or player is dead; disable everything
if (!(isNull (findDisplay 312)) 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 [QGVAR(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 EFUNC(common,waitAndExecute);
[{
GVAR(effectBlindingCC) ppEffectEnable false;
}, [], (_strength * 2) + 0.5, 0] call EFUNC(common,waitAndExecute);
GVAR(effectBlind) = false;
}; };
}, };
[ 0, [false, false, false]],
false,
"keydown"] call cba_fnc_registerKeybind;
["ACE3", // Bleeding Indicator
localize "STR_ACE_OPEN_CMS_MENU_DESC", // @todo: redo this after initial release
{ if (damage ACE_player > 0.1 and GVAR(effectTimeBlood) + 6 < time) then {
GVAR(keyPressed) = false; GVAR(effectTimeBlood) = time;
if (time - GVAR(timeMenuOpened) >= (0.25*accTime)) then { [500 * damage ACE_player] call BIS_fnc_bloodEffect;
disableSerialization; };
_display = uiNamespace getVariable QGVAR(medicalMenu);
if (!isnil "_display") then { // Blood Volume Effect
closeDialog 314412; _blood = (ACE_player getVariable [QGVAR(bloodVolume), 100]) / 100;
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) = time;
GVAR(lastHeartBeatSound) = time;
// @todo, remove once parameters are set up
if (isNil QGVAR(level)) then {
GVAR(level) = 0;
};
// HEARTRATE BASED EFFECTS
[{
_heartRate = ACE_player getVariable [QGVAR(heartRate), 70];
if (GVAR(level) == 0) then {
_heartRate = 60 + 40 * (ACE_player getVariable [QGVAR(pain), 0]);
};
if (_heartRate <= 0) exitwith {};
_interval = 60 / (_heartRate min 50);
if (time > GVAR(lastHeartBeat) + _interval) then {
GVAR(lastHeartBeat) = time;
// Pain effect
_strength = ACE_player getVariable [QGVAR(pain), 0];
// _strength = _strength * (ACE_player getVariable [QGVAR(coefPain), GVAR(coefPain)]); @todo
GVAR(alternativePainEffect) = false; // @todo
if (GVAR(alternativePainEffect)) then {
GVAR(effectPainCC) ppEffectEnable false;
if ((ACE_player getVariable [QGVAR(pain), 0]) > 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 EFUNC(common,waitAndExecute);
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit 0.01;
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,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 EFUNC(common,waitAndExecute);
} else {
GVAR(effectPainCA) ppEffectEnable false;
};
} else {
GVAR(effectPainCA) ppEffectEnable false;
if ((ACE_player getVariable [QGVAR(pain), 0]) > 0 && {alive ACE_player}) then {
_strength = _strength * 0.6;
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 EFUNC(common,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 EFUNC(common,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 EFUNC(common,waitAndExecute);
} else {
GVAR(effectPainCC) ppEffectEnable false;
}; };
}; };
false;
},
[ 0, [false, false, false]],
false,
"keyUp"] call cba_fnc_registerKeybind;
// Adding the treatment options for all available medical equipment.
// Advanced Treatment options
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_1000ml","STR_ACE_ACTION_BLOODIV_1000ML_TOOLTIP",'ACE_blood_iv');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_500ml","STR_ACE_ACTION_BLOODIV_500ML_TOOLTIP",'ACE_blood_iv_500');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_250ml","STR_ACE_ACTION_BLOODIV_250ML_TOOLTIP",'ACE_blood_iv_250');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_1000ml","STR_ACE_ACTION_PLASMAIV_1000ML_TOOLTIP",'ACE_plasma_iv');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_500ml","STR_ACE_ACTION_PLASMAIV_500ML_TOOLTIP",'ACE_plasma_iv_500');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_250ml","STR_ACE_ACTION_PLASMAIV_250ML_TOOLTIP",'ACE_plasma_iv_250');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_1000ml","STR_ACE_ACTION_SALINEIV_1000ML_TOOLTIP",'ACE_saline_iv');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_500ml","STR_ACE_ACTION_SALINEIV_500ML_TOOLTIP",'ACE_saline_iv_500');
ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_250ml","STR_ACE_ACTION_SALINEIV_250ML_TOOLTIP",'ACE_saline_iv_250');
["STR_ACE_ACTION_PERSONAL_AID_KIT","STR_ACE_ACTION_PERSONAL_AID_KIT_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
if !([_this select 0,_this select 1, 'ACE_personal_aid_kit'] call FUNC(hasEquipment)) exitwith {
false;
}; };
_inMedFacility = ([_caller] call FUNC(inMedicalFacility));
_hasOpenWounds = ([_target] call FUNC(hasOpenWounds));
if ((GVAR(setting_aidKitRestrictions) == 0 && _inMedFacility) || if (GVAR(level) > 0 && {_heartRate > 0}) then {
(GVAR(setting_aidKitRestrictions) == 1 && _inMedFacility && (!_hasOpenWounds)) || _minTime = 60 / _heartRate;
(GVAR(setting_aidKitRestrictions) == 2) || if (time - GVAR(lastHeartBeatSound) > _minTime) then {
(GVAR(setting_aidKitRestrictions) == 3 && (!_hasOpenWounds))) exitwith { GVAR(lastHeartBeatSound) = time;
// Heart rate sound effect
((GVAR(setting_aidKitMedicsOnly) && [_caller] call FUNC(isMedic) || !GVAR(setting_aidKitMedicsOnly))); if (_heartRate < 60) then {
_sound = GVAR(heartBeatSounds_Normal) select (random((count GVAR(heartBeatSounds_Normal)) -1));
playSound _sound;
} else {
if (_heartRate > 150) then {
playSound "ACE_heartbeat_fast_2";
};
};
};
}; };
false;
},TREATMENT_ADVANCED('ACE_personal_aid_kit'),'advanced'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_PERFORM_CPR","STR_ACE_ACTION_PERFORM_CPR_TOOLTIP",{ }, 0, []] call CBA_fnc_addPerFrameHandler;
_caller = _this select 0;
_target = _this select 1;
(!(_caller getvariable[QGVAR(isProvidingCPR), false]) && ((_target getvariable [QGVAR(inCardiacArrest),false]) || !([_target] call EFUNC(common,isAwake)))) // broadcast injuries to JIP clients in a MP session
},TREATMENT_ADVANCED('ACE_CPR'),'advanced'] call FUNC(addTreatmentOption); if (isMultiplayer && !isDedicated) then {
[QGVAR(onPlayerConnected), "onPlayerConnected", {
if (isNil QGVAR(InjuredCollection)) then {
GVAR(InjuredCollection) = [];
};
["STR_ACE_ACTION_STOP_CPR","STR_ACE_ACTION_STOP_CPR_TOOLTIP",{ {
_caller = _this select 0; _unit = _x;
_target = _this select 1; _openWounds = _unit getvariable [QGVAR(openWounds), []];
{
(_caller getvariable[QGVAR(isProvidingCPR), false]) ["medical_propagateWound", [_id], [_unit, _x]] call EFUNC(common,targetEvent);
},{((_this select 0) setvariable[QGVAR(isProvidingCPR), nil, true])},'advanced'] call FUNC(addTreatmentOption); }foreach _openWounds;
}foreach GVAR(InjuredCollection);
["STR_ACE_ACTION_STITCHING","STR_ACE_ACTION_STITCHING_TOOLTIP",{ }, []] call BIS_fnc_addStackedEventHandler;
_caller = _this select 0; };
_target = _this select 1;
((GVAR(setting_allowStitching) == 0 && [_Caller] call FUNC(isMedic)) || GVAR(setting_allowStitching) == 1)
},TREATMENT_ADVANCED('ACE_surgical_kit'),'advanced'] call FUNC(addTreatmentOption);
// Airway Management
["STR_ACE_ACTION_APPLY_NPA","STR_ACE_ACTION_APPLY_NPA_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
if !([_this select 0,_this select 1, 'ACE_nasopharyngeal_tube'] call FUNC(hasEquipment)) exitwith {
false;
};
(!([_target, QGVAR(airwayTreated)] call EFUNC(common,getDefinedVariable)) && !([_target] call EFUNC(common,isAwake)))
},TREATMENT_AIRWAY('ACE_nasopharyngeal_tube'),'advanced'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_REMOVE_NPA","STR_ACE_ACTION_REMOVE_NPA_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
([_target, QGVAR(airwayTreated)] call EFUNC(common,getDefinedVariable));
}, {GVAR(INTERACTION_TARGET) setvariable [QGVAR(airwayTreated), nil, true]; (_this select 0) addItem 'ACE_nasopharyngeal_tube';},'airway'] call FUNC(addTreatmentOption);
// Bandaging
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_BANDAGE_BASIC","STR_ACE_ACTION_BANDAGE_BASIC_TOOLTIP",'ACE_bandage_basic');
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_QUIKCLOT","STR_ACE_ACTION_QUIKCLOT_TOOLTIP",'ACE_quikclot');
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_BANDAGE_ELASTIC","STR_ACE_ACTION_BANDAGE_ELASTIC_TOOLTIP",'ACE_bandageElastic');
ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_PACKING_BANDAGE","STR_ACE_ACTION_PACKING_BANDAGE_TOOLTIP",'ACE_packing_bandage');
["STR_ACE_ACTION_REMOVE_TOURNIQUET","STR_ACE_ACTION_REMOVE_TOURNIQUET_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
([_target, call FUNC(getSelectedBodyPart)] call FUNC(hasTourniquetAppliedTo));
},{[_this select 0,_this select 1,call FUNC(getSelectedBodyPart)] call FUNC(actionRemoveTourniquet)},'bandage'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_APPLY_TOURNIQUET","STR_ACE_ACTION_APPLY_TOURNIQUET_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
(!([_target, call FUNC(getSelectedBodyPart)] call FUNC(hasTourniquetAppliedTo)) && ([_caller,_target,'ACE_tourniquet'] call FUNC(hasEquipment)));
},TREATMENT_BANDAGE('ACE_tourniquet'),'bandage'] call FUNC(addTreatmentOption);
// Medication
ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_MORPHINE","STR_ACE_ACTION_MORPHINE_TOOLTIP",'ACE_morphine');
ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_ATROPINE","STR_ACE_ACTION_ATROPINE_TOOLTIP",'ACE_atropine');
ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_EPINEPHRINE","STR_ACE_ACTION_EPINEPHRINE_TOOLTIP",'ACE_epinephrine');
// Examine
["STR_ACE_ACTION_CHECK_PULSE","STR_ACE_ACTION_CHECK_PULSE_TOOLTIP",{
true;
},{[_this select 0,_this select 1] call FUNC(actionCheckPulse)},'examine'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_CHECK_BP","STR_ACE_ACTION_CHECK_BP_TOOLTIP",{
true;
},{[_this select 0,_this select 1] call FUNC(actionCheckBloodPressure);},'examine'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_CHECK_RESPONSE","STR_ACE_ACTION_CHECK_RESPONSE_TOOLTIP",{
true;
},{[_this select 0,_this select 1] call FUNC(actionCheckResponse)},'examine'] call FUNC(addTreatmentOption);
// Drag/Movement
["STR_ACE_ACTION_DRAG_PATIENT","STR_ACE_ACTION_DRAG_PATIENT_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
(isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (_caller != _target) && (vehicle _target == _target));
}, {[_this select 0,_this select 1] call FUNC(actionDragUnit)},'drag'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_CARRY_PATIENT","STR_ACE_ACTION_CARRY_PATIENT_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
(isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (_caller != _target) && (vehicle _target == _target));
}, {[_this select 0,_this select 1] call FUNC(actionCarryUnit)},'drag'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_BODYBAG","STR_ACE_ACTION_BODYBAG_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
(isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (_caller != _target) && (vehicle _target == _target) && ([_caller, _target] call FUNC(canPutInBodyBag)));
}, {[_this select 0,_this select 1] call FUNC(actionPlaceInBodyBag)},'drag'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_DROP_PATIENT","STR_ACE_ACTION_DROP_PATIENT_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
(!(isNull ([_caller] call EFUNC(common,getCarriedObj))) && ([_caller] call FUNC(isMovingUnit)));
}, {[_this select 0,_this select 1] call FUNC(actionDropUnit)},'drag'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_LOAD_PATIENT","STR_ACE_ACTION_LOAD_PATIENT_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
((vehicle _target == _target));
}, {[_this select 0,_this select 1] call FUNC(actionLoadUnit)},'drag'] call FUNC(addTreatmentOption);
["STR_ACE_ACTION_UNLOAD_PATIENT","STR_ACE_ACTION_UNLOAD_PATIENT_TOOLTIP",{
_caller = _this select 0;
_target = _this select 1;
((vehicle _target != _target));
}, {[_this select 0,_this select 1] call FUNC(actionUnloadUnit)},'drag'] call FUNC(addTreatmentOption);

View File

@ -1,171 +1,83 @@
/**
* XEH_preInit);
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp" #include "script_component.hpp"
ADDON = false; ADDON = false;
PREP(actionCarryUnit); PREP(actionCheckBloodPressure);
PREP(ActioncheckBloodPressure); PREP(actionCheckBloodPressureLocal);
PREP(ActionCheckBloodPressureLocal); PREP(actionCheckPulse);
PREP(ActionCheckPulse);
PREP(actionCheckPulseLocal); PREP(actionCheckPulseLocal);
PREP(actionCheckResponse); PREP(actionCheckResponse);
PREP(actionDragUnit);
PREP(actionDropUnit);
PREP(actionLoadUnit);
PREP(actionPlaceInBodyBag); PREP(actionPlaceInBodyBag);
PREP(actionRemoveTourniquet); PREP(actionRemoveTourniquet);
PREP(actionLoadUnit);
PREP(actionUnloadUnit); PREP(actionUnloadUnit);
PREP(addActivityToLog);
PREP(addHeartRateAdjustment); PREP(addHeartRateAdjustment);
PREP(addOpenWounds);
PREP(addToInjuredCollection); PREP(addToInjuredCollection);
PREP(addToQuickViewLog); PREP(addToLog);
PREP(addToTriageList); PREP(addToTriageCard);
PREP(addTreatmentOption); PREP(addUnconsciousCondition);
PREP(canAccessMedicalEquipment); PREP(canAccessMedicalEquipment);
PREP(canPutInBodyBag); PREP(canTreat);
PREP(determineIfFatal); PREP(determineIfFatal);
PREP(determineIfUnconscious);
PREP(fromNumberToBodyPart);
PREP(effectPain);
PREP(effectBleeding);
PREP(effectBlackOut);
PREP(getActivityLog);
PREP(getBloodLoss); PREP(getBloodLoss);
PREP(getBloodPressure); PREP(getBloodPressure);
PREP(getBloodVolumeChange); PREP(getBloodVolumeChange);
PREP(getBodyPartNumber);
PREP(getCardiacOutput); PREP(getCardiacOutput);
PREP(getCurrentSelectedInjuryData);
PREP(getHeartRateChange);
PREP(getNewDamageBodyPart);
PREP(getQuickViewLog);
PREP(getSelectedBodyPart);
PREP(getTreatmentOptions);
PREP(getTriageList);
PREP(getTriageStatus);
PREP(getTypeOfDamage); PREP(getTypeOfDamage);
PREP(getUnconsciousCondition);
// Handling events & actions
PREP(handleBandageOpening);
PREP(handleDamage); PREP(handleDamage);
PREP(handleDisplayEffects); PREP(handleDamage_advanced);
PREP(handleHeal); PREP(handleDamage_advancedSetDamage);
PREP(handleReactionHit); PREP(handleDamage_airway);
PREP(handleTreatment); PREP(handleDamage_basic);
PREP(handleTreatment_Action_AdvancedLocal); PREP(handleDamage_caching);
PREP(handleTreatment_Action_AirwayLocal); PREP(handleDamage_fractures);
PREP(handleTreatment_Action_BandageLocal); PREP(handleDamage_internalInjuries);
PREP(handleTreatment_Action_CPR); PREP(handleDamage_wounds);
PREP(handleTreatment_Action_CPRLocal);
PREP(handleTreatment_Action_fullHeal);
PREP(handleTreatment_Action_fullHealLocal);
PREP(handleTreatment_Action_MedicationLocal);
PREP(handleTreatment_Action_Stitching);
PREP(handleTreatment_Action_tourniquet);
PREP(handleTreatment_Action_tourniquetLocal);
PREP(handleTreatment_Category_Advanced);
PREP(handleTreatment_Category_Airway);
PREP(handleTreatment_Category_Bandaging);
PREP(handleTreatment_Category_Medication);
PREP(handleUI_DisplayOptions);
PREP(handleUI_dropDownTriageCard);
PREP(handleUnitVitals); PREP(handleUnitVitals);
PREP(handleDropUnit); PREP(hasItem);
PREP(hasItems);
PREP(hasEquipment);
PREP(hasMedicalEnabled); PREP(hasMedicalEnabled);
PREP(hasOpenWounds);
PREP(hasTourniquetAppliedTo); PREP(hasTourniquetAppliedTo);
PREP(init);
PREP(increasePain); PREP(isInMedicalFacility);
PREP(initalizeModuleCMS);
PREP(inMedicalFacility);
PREP(isMedic); PREP(isMedic);
PREP(isMedicalVehicle); PREP(isMedicalVehicle);
PREP(isSetTreatmentMutex); PREP(onMedicationUsage);
PREP(isMovingUnit); PREP(onWoundUpdateRequest);
PREP(onPropagateWound);
PREP(moduleAssignMedicalEquipment); PREP(parseConfigForInjuries);
PREP(moduleAssignMedicalFacility);
PREP(moduleAssignMedicalVehicle);
PREP(moduleAssignMedicRoles);
PREP(moduleDamageSettings);
PREP(onInitForUnit);
PREP(onInjury_assignAirwayStatus);
PREP(onInjury_assignFractures);
PREP(onInjury_assignOpenWounds);
PREP(onKilled);
PREP(onLocal);
PREP(onMenuOpen);
PREP(onTreatmentCompleted);
PREP(onUnconscious);
PREP(onStartMovingUnit);
PREP(onCarryObjectDropped);
PREP(onDamage);
PREP(openMenu);
PREP(playInjuredSound); PREP(playInjuredSound);
PREP(reactionToDamage);
PREP(selectionNameToNumber);
PREP(setCardiacArrest); PREP(setCardiacArrest);
PREP(setDamageBodyPart);
PREP(setDead); PREP(setDead);
PREP(setMedicRole); PREP(setHitPointDamage);
PREP(setTriageStatus); PREP(setUnconscious);
PREP(treatmentMutex); 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_medication);
PREP(treatmentAdvanced_medicationLocal);
PREP(treatmentBasic_bandage);
PREP(treatmentBasic_bloodbag);
PREP(treatmentBasic_epipen);
PREP(treatmentBasic_morphine);
PREP(treatmentIV);
PREP(treatmentIVLocal);
PREP(treatmentTourniquet);
PREP(treatmentTourniquetLocal);
PREP(useItem);
PREP(useItems);
PREP(displayPatientInformation);
PREP(updateActivityLog); GVAR(injuredUnitCollection) = [];
PREP(updateBodyImg); call FUNC(parseConfigForInjuries);
PREP(updateIcons);
PREP(updateUIInfo);
PREP(useEquipment);
PREP(cacheHandledamageCall);
PREP(checkDamage);
PREP(setUnconsciousState);
PREP(isUnconscious);
PREP(getUnconsciousCondition);
PREP(registerUnconsciousCondition);
PREP(cleanUpCopyOfBody);
PREP(makeCopyOfBody);
PREP(canGoUnconsciousState);
PREP(setDead);
PREP(moduleBasicRevive);
PREP(setWeaponsCorrectUnconscious);
PREP(setCaptiveSwitch);
// initalize all module parameters.
GVAR(setting_allowInstantDead) = true;
GVAR(setting_AdvancedLevel) = 0;
GVAR(setting_advancedWoundsSetting) = false;
GVAR(setting_advancedMedicRoles) = false;
GVAR(setting_medicalDifficulty) = 1;
GVAR(setting_enableBandagingAid) = true;
GVAR(setting_allowAIFullHeal) = false;
GVAR(setting_enableForUnits) = 1;
GVAR(setting_allowAirwayInjuries) = false;
GVAR(setting_aidKitRestrictions) = 0;
GVAR(setting_removeAidKitOnUse) = true;
GVAR(setting_aidKitMedicsOnly) = false;
GVAR(setting_bandageWaitingTime) = 5;
GVAR(setting_allowVehicleCrashInjuries) = true;
GVAR(setting_allowStitching) = 0;
ADDON = true; ADDON = true;

View File

@ -0,0 +1,10 @@
#include "script_component.hpp"
private ["_unit"];
_unit = _this select 0;
if !(local _unit) exitWith {};
diag_log "running respawn";
[_unit] call FUNC(init);

View File

@ -1,31 +1,20 @@
#include "script_component.hpp" #include "script_component.hpp"
class CfgPatches class CfgPatches {
{ class ADDON {
class ADDON units[] = {};
{ weapons[] = {};
units[] = {"ACE_medical_supply_crate_cms", "ACE_bandage_basicItem","ACE_packing_bandageItem","ACE_bandageElasticItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_atropineItem","ACE_epinephrineItem","ACE_plasma_ivItem","ACE_plasma_iv_500Item","ACE_plasma_iv250Item","ACE_blood_ivItem","ACE_blood_iv_500Item","ACE_blood_iv_250Item","ACE_saline_ivItem","ACE_saline_iv_500Item","ACE_saline_iv_250Item","ACE_quikclotItem","ACE_nasopharyngeal_tubeItem","ACE_opaItem","ACE_liquidSkinItem","ACE_chestsealItem","ACE_personal_aid_kitItem"}; requiredVersion = REQUIRED_VERSION;
weapons[] = {"ACE_surgical_kit"}; requiredAddons[] = {ace_common, ace_interaction};
requiredVersion = REQUIRED_VERSION; author[] = {"Glowbal", "KoffienFlummi"};
requiredAddons[] = {"ACE_common"}; authorUrl = "";
version = VERSION; VERSION_CONFIG;
author[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
authorUrl = "http://csemod.com";
};
};
class CfgAddons {
class PreloadAddons {
class ADDON {
list[] = {QUOTE(ADDON)};
};
}; };
}; };
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgWeapons.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "ui\define.hpp" #include "CfgWeapons.hpp"
#include "ui\menu.hpp" #include "CFgSounds.hpp"
#include "ui\RscTitles.hpp" #include "ACE_Medical_Treatments.hpp"
#include "UI\RscTitles.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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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