Skip to content

Commit 83a45e2

Browse files
authored
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
2 parents c9a6a45 + b365921 commit 83a45e2

17 files changed

Lines changed: 83 additions & 9 deletions

addons/airway/ACE_Medical_Treatment_Actions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class ACE_Medical_Treatment_Actions {
140140
allowedSelections[] = {"Head"};
141141
allowSelfTreatment = 0;
142142
callbackSuccess = QFUNC(checkAirway);
143-
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !([_patient] call FUNC(checkMask)));
143+
condition = QUOTE((missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !([_patient] call FUNC(checkMask)));
144144
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
145145
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"};
146146
};

addons/airway/functions/fnc_checkAirway.sqf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ if (!(_patient getVariable [QGVAR(occluded), false]) && !(_patient getVariable [
5555
_hintWidth = 10;
5656
};
5757

58+
if (_patient getVariable [QEGVAR(chemical,airPoisoning), false]) exitWith {
59+
_message = LLSTRING(AirwayStatus_Poison);
60+
61+
[_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured);
62+
[_patient, "quick_view", LSTRING(checkAirway_log)] call EFUNC(circulation,removeLog);
63+
[_patient, "quick_view", LSTRING(checkAirway_poisonLog)] call EFUNC(circulation,removeLog);
64+
[_patient, "quick_view", LSTRING(checkAirway_poisonLog), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog);
65+
};
66+
5867
[_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured);
5968

6069
[_patient, "quick_view", LSTRING(checkAirway_log)] call EFUNC(circulation,removeLog);

addons/airway/stringtable.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
<Chinesesimp>%1 检查呼吸道: %2, %3</Chinesesimp>
196196
<Dutch>%1 Heeft de luchtwegen gecheckt: %2, %3</Dutch>
197197
</Key>
198+
<Key ID="STR_KAT_Airway_checkAirway_poisonLog">
199+
<English>%1 checked airways: Heavily Blistered</English>
200+
</Key>
198201
<Key ID="STR_KAT_Airway_airway_log">
199202
<English>%1 inserted a %2</English>
200203
<German>%1 intubierte mit %2</German>
@@ -399,6 +402,9 @@
399402
<Finnish>Tuuliputki on selkeä</Finnish>
400403
<Dutch>Luchtweg is vrij</Dutch>
401404
</Key>
405+
<Key ID="STR_KAT_Airway_AirwayStatus_Poison">
406+
<English>Airway is heavily blistered</English>
407+
</Key>
402408
<Key ID="STR_KAT_Airway_AirwayStatus_NotClearForItem">
403409
<English>Item could not be used, airways are not clear</English>
404410
<German>Gegenstand konnte nicht verwendet werden, Atemwege sind nicht frei</German>

addons/breathing/CfgMagazines.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ class CfgMagazines {
4747
picture = QPATHTOF(ui\oxygenTank.paa);
4848

4949
ammo = "";
50-
count = 60;
50+
count = 30;
5151
initSpeed = 0;
5252
tracersEvery = 0;
5353
lastRoundsTracer = 0;
54-
mass = 3;
54+
mass = 5;
5555
ACE_isMedicalItem = 1;
5656
ACE_asItem = 1;
5757
};

addons/breathing/CfgSounds.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ class CfgSounds
3030
sound[] = { QPATHTOF(audio\pneumothoraxcough.ogg), 5, 1, 2 };
3131
titles[] = {};
3232
};
33+
class GVAR(respiratorTone) {
34+
name = QGVAR(respiratorTone);
35+
36+
// filename, volume, pitch, distance (optional)
37+
sound[] = { QPATHTOF(audio\respiratorTone.ogg), 5, 1, 2 };
38+
titles[] = {};
39+
};
3340
};

addons/breathing/XEH_postInit.sqf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
_unit say3D [QGVAR(pneumothoraxcough), 15];
1515
}] call CBA_fnc_addEventHandler;
1616

17+
[QGVAR(playRespiratorTone), {
18+
params ["_unit"];
19+
_unit say3D [QGVAR(respiratorTone), 10];
20+
}] call CBA_fnc_addEventHandler;
21+
22+
1723
[QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler;
1824

1925
[QACEGVAR(medical_status,initialized), LINKFUNC(handleBreathingConditions)] call CBA_fnc_addEventHandler;
20.8 KB
Binary file not shown.

addons/breathing/functions/fnc_attachPersonalOxygen.sqf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ _patient removeMagazines "kat_personal_oxygen";
4242

4343
_patient setVariable [QGVAR(oxygenMaskStatus), [(_largestTankValue + 1), 1], true];
4444

45+
[QGVAR(playRespiratorTone), [_patient], _patient] call CBA_fnc_targetEvent;
46+
4547
[{
4648
_this params ["_args", "_pfhID"];
4749
_args params ["_patient"];
@@ -68,6 +70,11 @@ _patient setVariable [QGVAR(oxygenMaskStatus), [(_largestTankValue + 1), 1], tru
6870
};
6971

7072
private _maskStatus = _patient getVariable [QGVAR(oxygenMaskStatus), [0,0]];
73+
_patient setVariable [QGVAR(oxygenMaskStatus), [((_maskStatus select 0) - 1), _pfhID]];
74+
75+
if ((_maskStatus select 0) < 4) then {
76+
[QGVAR(playRespiratorTone), [_patient], _patient] call CBA_fnc_targetEvent;
77+
};
7178

7279
if ((_maskStatus select 0) == 0) exitWith {
7380
[LLSTRING(PersonalOxygen_Empty), 1.5, _patient] call ACEFUNC(common,displayTextStructured);
@@ -78,7 +85,6 @@ _patient setVariable [QGVAR(oxygenMaskStatus), [(_largestTankValue + 1), 1], tru
7885
_pfhID call CBA_fnc_removePerFrameHandler;
7986
};
8087

81-
_patient setVariable [QGVAR(oxygenMaskStatus), [((_maskStatus select 0) - 1), _pfhID]];
8288
}, 60, [
8389
_patient
8490
]] call CBA_fnc_addPerFrameHandler;

addons/breathing/functions/fnc_attachVehicleOxygen.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ if (_patient getVariable [QGVAR(oxygenMaskActive), false]) exitWith {
2424

2525
_patient setVariable [QGVAR(oxygenMaskActive), true, true];
2626

27+
[QGVAR(playRespiratorTone), [_patient], _patient] call CBA_fnc_targetEvent;
28+
2729
[{
2830
_this params ["_args", "_pfhID"];
2931
_args params ["_patient"];

addons/breathing/functions/fnc_checkBreathing.sqf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private _breathing = LLSTRING(breathing_isNormal);
2828
private _breathing_log = localize ACELSTRING(medical_treatment,Check_Pulse_Normal);
2929
private _breath = "";
3030

31-
if (_patient getVariable [QGVAR(pneumothorax), 0] > 0) then {
31+
if ((_patient getVariable [QGVAR(pneumothorax), 0] > 0) || (_patient getVariable [QEGVAR(chemical,airPoisoning), false])) then {
3232
_breathing = LLSTRING(breathing_isShallow);
3333
_breathing_log = LLSTRING(breathing_shallow);
3434
};
@@ -44,6 +44,7 @@ if (_ph < 7.2) then {
4444
_output = format ["%1%2", _breathing ,_breath];
4545
_output_log = format ["%1%2", _breathing_log, _breath];
4646

47+
4748
if (_hr == 0 || !(alive _patient) || (_patient getVariable [QEGVAR(airway,obstruction), false] && !(_patient getVariable [QEGVAR(airway,overstretch), false])) || _patient getVariable [QEGVAR(airway,occluded), false] || _patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then {
4849
_output = LLSTRING(breathing_none);
4950
_output_log = ACELSTRING(medical_treatment,Check_Pulse_None);

0 commit comments

Comments
 (0)