Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoBaltar committed Aug 22, 2023
2 parents c58c345 + da18b35 commit 3ce38d8
Show file tree
Hide file tree
Showing 105 changed files with 3,836 additions and 1,522 deletions.
8 changes: 7 additions & 1 deletion addons/airway/functions/fnc_updateLogList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ lbClear _ctrl;
_ctrl lbSetColor [_rowIdc, [1, 0, 0, 1]];
};
};
if (_messageWOlocalization isEqualTo ELSTRING(circulation,AEDX_StatusLog)) then {
if (_messageWOlocalization isEqualTo ELSTRING(circulation,VitalsMonitor_StatusLog)) then {
if (((_arguments select 0) < 45 )
|| ((_arguments select 0) > 120 )
|| ((_arguments select 1) < 50 )
Expand All @@ -58,6 +58,12 @@ lbClear _ctrl;
_ctrl lbSetColor [_rowIdc, [1, 0, 0, 1]];
};
};
if (_messageWOlocalization isEqualTo ELSTRING(circulation,VitalsMonitorInactive_StatusLog)) then {
if (((_arguments select 0) < 45 )
|| ((_arguments select 0) > 120 )) then {
_ctrl lbSetColor [_rowIdc, [1, 0, 0, 1]];
};
};
};

} forEach _logs;
7 changes: 5 additions & 2 deletions addons/breathing/functions/fnc_fullHealLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ _unit setVariable [QGVAR(pneumothorax), false, true];
_unit setVariable [QGVAR(hemopneumothorax), false, true];
_unit setVariable [QGVAR(tensionpneumothorax), false, true];

// KAT Circulation
_unit setVariable [QEGVAR(circulation,cprCount), 2, true];
_unit setVariable [QEGVAR(circulation,heartRestart), false, true];
_unit setVariable [QEGVAR(circulation,cardiacArrestType), 0, true];

// Update wound bleeding
[_unit] call ACEFUNC(medical_status,updateWoundBloodLoss);
[_unit] call EFUNC(circulation,updateInternalBleeding);
Expand Down Expand Up @@ -131,8 +136,6 @@ _unit setVariable [QACEGVAR(medical,painSuppress), 0, true];

// Medication
_unit setVariable [QACEGVAR(medical,medications), [], true];
_unit setVariable [QEGVAR(circulation,asystole), 0, true];
_unit setVariable [QEGVAR(circulation,CPRcount), 2, true];

// Reset triage card since medication is reset
_unit setVariable [QACEGVAR(medical,triageCard), [], true];
Expand Down
234 changes: 154 additions & 80 deletions addons/circulation/ACE_Medical_Treatment_Actions.hpp

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions addons/circulation/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class CfgFunctions {
class overwrite_medical_treatment {
tag = "ace_medical_treatment";
class ace_medical_treatment {
class canTreat {
file = QPATHTOF(functions\fnc_canTreat.sqf);
};
class cprLocal {
file = QPATHTOF(functions\fnc_cprLocal.sqf);
};
Expand All @@ -22,6 +25,9 @@ class CfgFunctions {
class treatment {
file = QPATHTOF(functions\fnc_treatment.sqf);
};
class treatmentSuccess {
file = QPATHTOF(functions\fnc_treatmentSuccess.sqf);
};
};
};
};
196 changes: 177 additions & 19 deletions addons/circulation/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,43 @@ class CfgVehicles {
class TransportItems {
MACRO_ADDITEM(kat_AED,1);
};

class ACE_Actions {
class ACE_MainActions {
selection = "interaction_point";
distance = 4;
displayName = "AED";
condition = "true";
class AED_AnalyzeRhythm {
displayName = CSTRING(AnalyzeRhythm);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player, _target, 1)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_2(_player, (_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]))] call FUNC(AED_Analyze));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_shock.paa);
};
class AED_Shock {
displayName = CSTRING(Defibrillator_Action_Shock);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player, _target, 2)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE((_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]) setVariable [ARR_3(QQGVAR(Defibrillator_Charged), false, true)]);
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_shock.paa);
};
class AED_PlacePads {
displayName = CSTRING(AED_Action_PlacePads);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED))] call ACEFUNC(medical_treatment,isMedic) && [ARR_2(_player, _target)] call FUNC(AEDXPlaced_CheckCondition));
statement = "";
insertChildren = QUOTE([ARR_2(_player, _target)] call FUNC(addDefibrillatorActions));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_pads.paa);
};
class AED_RemovePads: AED_PlacePads {
displayName = CSTRING(Defibrillator_Action_RemovePads);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player, _target, 3)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_4(_player, (_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]), 'body', 'DefibrillatorRemovePads')] call ace_medical_treatment_fnc_treatment);
insertChildren = "";
};
};
};
};

class kat_X_AEDItem: kat_AEDItem {
Expand All @@ -36,6 +73,100 @@ class CfgVehicles {
class TransportItems {
MACRO_ADDITEM(kat_X_AED,1);
};

class ACE_Actions {
class ACE_MainActions {
selection = "interaction_point";
distance = 4;
displayName = CSTRING(X_Display);
condition = "true";
class AED_X_ViewMonitor {
displayName = CSTRING(ViewMonitor);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic));
statement = QUOTE([ARR_3(_player, _target, 1)] call FUNC(AEDX_ViewMonitor));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aedx_monitor.paa);
};
class AED_X_ManualCharge {
displayName = CSTRING(Defibrillator_Action_Charge);
condition = QUOTE([ARR_3(_player, _target, 6)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_2(_player, (_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]))] call FUNC(Defibrillator_ManualCharge));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_shock.paa);
};
class AED_X_CancelCharge {
displayName = CSTRING(Defibrillator_Action_CancelCharge);
condition = QUOTE([ARR_3(_player, _target, 7)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE((_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]) setVariable [ARR_3(QQGVAR(DefibrillatorInUse), false, true)]; (_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]) setVariable [ARR_3(QQGVAR(Defibrillator_Charged), false, true)]);
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_shock.paa);
};
class AED_X_Shock {
displayName = CSTRING(Defibrillator_Action_Shock);
condition = QUOTE([ARR_3(_player, _target, 2)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE((_target getVariable QQGVAR(Defibrillator_Patient)) setVariable [ARR_3(QQGVAR(Defibrillator_Charged), false, true)]);
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_shock.paa);
};
class AED_X_AnalyzeRhythm {
displayName = CSTRING(AnalyzeRhythm);
condition = QUOTE([ARR_3(_player, _target, 1)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_3(_player, (_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]), 'AEDX')] call FUNC(AED_Analyze));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_shock.paa);
};
class AED_X_PlacePads {
displayName = CSTRING(AEDX_Action_PlacePads);
condition = QUOTE([ARR_2(_player, _target)] call FUNC(AEDXPlaced_CheckCondition));
statement = "";
insertChildren = QUOTE([ARR_3(_player, _target, 1)] call FUNC(addDefibrillatorActions));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_pads.paa);
};
class AED_X_RemovePads: AED_X_PlacePads {
displayName = CSTRING(Defibrillator_Action_RemovePads);
condition = QUOTE([ARR_3(_player, _target, 3)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_4(_player, (_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient), nil)]), 'body', 'DefibrillatorRemovePads')] call ace_medical_treatment_fnc_treatment);
insertChildren = "";
icon = QPATHTOF(ui\icon_aed_pads.paa);
};
class AED_X_ConnectMonitor {
displayName = CSTRING(AEDX_Action_ConnectMonitor);
condition = QUOTE([ARR_3(_player, _target, 4)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_4(_player, (_target getVariable QQGVAR(Defibrillator_Patient)), 'body', 'AEDXStationConnectVitalsMonitor')] call ACEFUNC(medical_treatment,treatment););
//insertChildren = QUOTE([ARR_3(_player, _target, 2)] call FUNC(addDefibrillatorActions));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_pads.paa);
};
class AED_X_DisconnectMonitor: AED_X_ConnectMonitor {
displayName = CSTRING(AEDX_Action_DisconnectMonitor);
condition = QUOTE([ARR_3(_player, _target, 5)] call FUNC(AEDXPlaced_CheckCondition));
statement = QUOTE([ARR_4(_player, (_target getVariable QQGVAR(AED_X_VitalsMonitor_Patient)), 'body', 'AEDXDisconnectVitalsMonitor')] call ACEFUNC(medical_treatment,treatment));
//insertChildren = "";
icon = QPATHTOF(ui\icon_aed_pads.paa);
};
class AED_X_EnableAudio {
displayName = CSTRING(AEDX_Action_EnableAudio);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic) && !(_target getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Volume), false)]));
statement = QUOTE(_target setVariable [ARR_3(QQGVAR(AED_X_VitalsMonitor_Volume), true, true)]; [ARR_2(_target, true)] call FUNC(AEDXPlaced_VitalsMonitor_SetVolume));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aedx_volume_on.paa);
};
class AED_X_DisableAudio: AED_X_EnableAudio {
displayName = CSTRING(AEDX_Action_DisableAudio);
condition = QUOTE([ARR_2(_player, GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic) && _target getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Volume), false)]);
statement = QUOTE(_target setVariable [ARR_3(QQGVAR(AED_X_VitalsMonitor_Volume), false, true)]; [ARR_2(_target, false)] call FUNC(AEDXPlaced_VitalsMonitor_SetVolume));
icon = QPATHTOF(ui\icon_aedx_volume_off.paa);
};
class AED_X_MeasureBloodPressure {
displayName = CSTRING(AEDX_Monitor_MeasureBloodPressure);
condition = QUOTE(!(_target getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Patient), objNull)] isEqualTo objNull) && {(missionNamespace getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_BloodPressureInterval), 0)] > 0)});
statement = QUOTE(_target getVariable QQGVAR(AED_X_VitalsMonitor_Patient) call FUNC(measureBloodPressure));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aed_pads.paa);
};
};
};
};

class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate {
Expand Down Expand Up @@ -99,19 +230,6 @@ class CfgVehicles {
};
};
class ACE_Equipment {
class AED_X_removeSound {
displayName = CSTRING(X_Action_removeSound);
condition = QUOTE('kat_X_AED' in (items _player) && (_player getVariable [ARR_2(QQGVAR(AED_X_Volume), false])));
statement = QUOTE(_player setVariable [ARR_3(QQGVAR(AED_X_Volume), false, true)]);
showDisabled = 0;
exceptions[] = {"isNotInside", "isNotSitting"};
icon = QPATHTOF(ui\X_Series-Device_W.paa);
};
class AED_X_addSound : AED_X_removeSound {
displayName = CSTRING(X_Action_addSound);
condition = QUOTE('kat_X_AED' in (items _player) && !(_player getVariable [ARR_2(QQGVAR(AED_X_Volume), false])));
statement = QUOTE(_player setVariable [ARR_3(QQGVAR(AED_X_Volume), true, true)]);
};
class openCrossPanel {
displayName = CSTRING(open_crosspanel);
condition = "('kat_crossPanel' in (uniformItems _player)) || ('kat_crossPanel' in (vestItems _player))";
Expand All @@ -121,9 +239,9 @@ class CfgVehicles {
icon = "";
};
class placeAED {
displayName=CSTRING(place_AED);
condition="'kat_AED' in (items ACE_player)";
exceptions[]=
displayName = CSTRING(place_AED);
condition = QUOTE('kat_AED' in (items _player));
exceptions[] =
{
"notOnMap",
"isNotInside",
Expand All @@ -132,9 +250,49 @@ class CfgVehicles {
"isNotSwimming",
"isNotOnLadder"
};
statement="call kat_circulation_fnc_placeAED";
icon="";
showDisabled=0;
statement = QUOTE([ARR_2(_player,'kat_AED')] call FUNC(placeAED));
icon = "";
showDisabled = 0;
};
class placeAEDX : placeAED {
displayName = CSTRING(place_AEDX);
condition = QUOTE('kat_X_AED' in (items _player));
statement = QUOTE([ARR_2(_player,'kat_X_AED')] call FUNC(placeAED));
icon = QPATHTOF(ui\icon_aedx.paa);
};
class AEDX_Interactions {
displayName = CSTRING(AED_X);
condition = QUOTE('kat_X_AED' in (items _player));
exceptions[] =
{
"notOnMap",
"isNotInside",
"isNotHandcuffed",
"isNotSurrendering",
"isNotSwimming",
"isNotOnLadder"
};
icon = QPATHTOF(ui\icon_aedx.paa);
class AEDX_ViewMonitor {
displayName = CSTRING(ViewMonitor);
condition = "true";
statement = QUOTE([ARR_3(_player, objNull, 2)] call FUNC(AEDX_ViewMonitor));
showDisabled = 0;
icon = QPATHTOF(ui\icon_aedx_monitor.paa);
};
class AED_X_removeSound {
displayName = CSTRING(AEDX_Action_DisableAudio);
condition = QUOTE(_player getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Volume), false]));
statement = QUOTE(_player setVariable [ARR_3(QQGVAR(AED_X_VitalsMonitor_Volume), false, true)]);
showDisabled = 0;
icon = QPATHTOF(ui\icon_aedx_volume_off.paa);
};
class AED_X_addSound : AED_X_removeSound {
displayName = CSTRING(AEDX_Action_EnableAudio);
condition = QUOTE(!(_player getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Volume), false])));
statement = QUOTE(_player setVariable [ARR_3(QQGVAR(AED_X_VitalsMonitor_Volume), true, true)]);
icon = QPATHTOF(ui\icon_aedx_volume_on.paa);
};
};
};
};
Expand Down
36 changes: 24 additions & 12 deletions addons/circulation/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
PREP(AED_sound);
PREP(AEDanalyze);
PREP(AEDFailure);
PREP(AEDProgress);
PREP(AEDStart);
PREP(AEDStationCondition);
PREP(AEDSuccess);
PREP(AEDXCondition);
PREP(attachAEDX);
PREP(attachAEDXVehicle);
PREP(addDefibrillatorActions);
PREP(AED_Analyze);
PREP(AED_Charge);
PREP(AED_Shock);
PREP(AEDVehicleCondition);
PREP(AEDX_VitalsMonitor_CheckCondition);
PREP(AEDX_VitalsMonitor);
PREP(AEDXPlaced_CheckCondition);
PREP(AEDXPlaced_VitalsMonitor_SetVolume);
PREP(bloodType);
PREP(canCheckDogtag);
PREP(canDraw);
PREP(canTreat);
PREP(compatible);
PREP(cprLocal);
PREP(cprSuccess);
PREP(Defibrillator_AttachPads);
PREP(Defibrillator_CheckCondition);
PREP(AEDX_ConnectVitalsMonitor);
PREP(AEDX_DisconnectVitalsMonitor);
PREP(AEDX_ViewMonitor_Charging);
PREP(AEDX_ViewMonitor_Condition);
PREP(AEDX_ViewMonitor);
PREP(Defibrillator_ManualCharge);
PREP(Defibrillator_RemovePads);
PREP(DefibrillatorStation_CheckCondition);
PREP(drawBlood);
PREP(generateBloodType);
PREP(getCardiacArrestHeartRate);
PREP(getDogtagData);
PREP(groupID);
PREP(handleCardiacArrest);
PREP(handleTreatment);
PREP(init);
PREP(measureBloodPressure);
PREP(onCloseDialog);
PREP(placeAED);
PREP(removeLog);
PREP(returnAED_X);
PREP(treatment);
PREP(treatmentSuccess);
PREP(treatmentAdvanced_IV);
PREP(updateInternalBleeding);
PREP(vehicleCheck);
PREP(wrongBloodTreatment);
4 changes: 4 additions & 0 deletions addons/circulation/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include "script_component.hpp"

["ace_cardiacArrest", LINKFUNC(handleCardiacArrest)] call CBA_fnc_addEventHandler;

GVAR(AEDX_MonitorTarget) = objNull;

[QGVAR(setPreferredBloodType), {
params ["_unit"];
_unit setVariable [QGVAR(bloodTypePlayer), (profileNamespace getVariable [QGVAR(preferredBloodType), "O_N"]), true];
Expand Down
Loading

0 comments on commit 3ce38d8

Please sign in to comment.