-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Medical - Add Airway Management #8929
base: master
Are you sure you want to change the base?
Conversation
addons/medical_treatment/functions/fnc_airwayAdjunctProgress.sqf
Outdated
Show resolved
Hide resolved
addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf
Outdated
Show resolved
Hide resolved
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
dd04c5b
to
1ef3a65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thoughts from a quick first pass.
There is a decent amount of code style to fix up
@@ -44,6 +44,13 @@ | |||
#define DEFAULT_HEART_RATE 80 | |||
#define DEFAULT_PERIPH_RES 100 | |||
|
|||
// --- Airway | |||
#define DEFAULT_SPO2 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a closer to real life spo2 value personally.
Have it vary a bit over time, tie in with breathing speed, and change with altitude and other conditions.
Never been a huge fan of healthy is always 100%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this idea to a forum post in discord
[_unit, "blockSprint", QEGVAR(medical,airway), _spo2Level < 95] call EFUNC(common,statusEffect_set); | ||
[_unit, "forceWalk", QEGVAR(medical,airway), _spo2Level < 85] call EFUNC(common,statusEffect_set); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo these should be a little bit lower, but that'd again tie into a potential more realistic spo2 system. Right now this is more of a "how long have they had a lung problem" variable
if (HAS_PULSE_OXI_APPLIED_ON(_target,_selectionN)) then { | ||
private _spo2 = GET_SPO2(_target); | ||
private _hr = GET_HEART_RATE(_target); | ||
private _spo2Status = format ["HR: %1, SpO2: %2", (round _hr), (round _spo2)]; | ||
private _color = [1,1,1,1]; | ||
switch (true) do { | ||
case (_spo2 < 80 || {_hr < 30 || _hr > 140}): { | ||
_color = [1,0,0,1]; | ||
}; | ||
case ((_spo2 > 79 && _spo2 < 87) || {_hr < 40 || _hr > 120}): { | ||
_color = [1, 0.67,0,1]; | ||
}; | ||
case (_spo2 > 86 && _spo2 < 95): { | ||
_color = [1, 1,0,1]; | ||
}; | ||
}; | ||
_entries pushBack [_spo2Status,_color]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally not a fan of the entries list. It's good to put it here anyway, but maybe also a little picture UI that shows up when you look at the patient within 3m or something, and is off on the side when the medical menu is open?
Would givee the ability to glance over without opening the menu
case 1: {_message = "Head tilted to the side"}; | ||
case 2: {_message = "Basic airway inserted"}; | ||
case 3: {_message = "Advanced airway inserted"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to stringtables
_entries pushBack [_message, [0.2, 0.2, 1, 1]]; | ||
} else { | ||
if (GET_AIRWAY_COLLAPSED(_target)) then { | ||
_entries pushBack ["Airways has collapsed", [1, 0.67, 0, 1]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stringtables
if (GET_PNEUMO(_target) && {_selectionN == 1}) then { | ||
_entries pushBack [localize LSTRING(STATUS_HAS_PNUEMOTHORAX), [1, 0, 0, 1]]; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely need a way to diagnose this without just seeing this, stethoscope would be the most familiar for people, but maybe we could also tie into breath sounds? Play a different sound that indicates they are having troubles breathing, maybe coughing too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sound thing is nice, but normally it is not that easy to say it from the sounds without a stethoscope, but maybe a "Closer look at the chest" would diagnose it, since half of the body is not moving while ex or inhale
) then { | ||
_unit setVariable [VAR_AIRWAY_COLLAPSED, true, true]; | ||
_unit setVariable [VAR_AIRWAY_TREATMENT_LVL, 0, true]; // Reset treatment level so we can head tilt again | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should configure your editor to add newlines at the end of files and fix all these up
}; | |
}; | |
private _spo2 = GET_SPO2(_unit); | ||
if (_spo2 < 80) exitWith { false }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private _spo2 = GET_SPO2(_unit); | |
if (_spo2 < 80) exitWith { false }; | |
if (GET_SPO2(_unit) < 80) exitWith { false }; |
Is there a reason this can't work? Existing could possibly also be changed
if (HAS_PULSE_OXI_APPLIED_ON(_target,_selectionN)) then { | ||
private _spo2 = GET_SPO2(_target); | ||
private _hr = GET_HEART_RATE(_target); | ||
private _spo2Status = format ["HR: %1, SpO2: %2", (round _hr), (round _spo2)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe stringtable
}; | ||
if (_selectionN == 0) then { | ||
if (GET_AIRWAY_BLOCKED(_target)) then { | ||
_entries pushBack ["Airways blocked by debris", [1, 0.67, 0, 1]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stringtable
case 1: {_message = "Head tilted to the side"}; | ||
case 2: {_message = "Basic airway inserted"}; | ||
case 3: {_message = "Advanced airway inserted"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stringtable
_entries pushBack [_message, [0.2, 0.2, 1, 1]]; | ||
} else { | ||
if (GET_AIRWAY_COLLAPSED(_target)) then { | ||
_entries pushBack ["Airways has collapsed", [1, 0.67, 0, 1]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stringtable
_patient setVariable [VAR_PNEUMO, false, true]; | ||
|
||
[_patient, "ACE_chestSeal"] call FUNC(addToTriageCard); | ||
[_patient, "activity", "Applied chest seal", [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stringtable
@@ -0,0 +1,11 @@ | |||
#include "script_component.hpp" | |||
params ["_unit","_state"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function description is missing
class AirwayAdjunct { | ||
airwayRecoveryLevel = 1; | ||
class HeadTilt{ | ||
airwayRecoveryLevel = 1; | ||
}; | ||
class BasicAirwayy{ | ||
airwayRecoveryLevel = 2; | ||
}; | ||
class AdvancedAirway{ | ||
airwayRecoveryLevel = 3; | ||
}; | ||
}; | ||
|
||
class ManualBreathing { | ||
airwayRecoveryLevel = 1; | ||
class BVM{ | ||
airwayRecoveryLevel = 2; // Just as good as breathing | ||
}; | ||
class MouthToMouth{ | ||
airwayRecoveryLevel = 0.5; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some spaces in front of the curly brackets
category = "airway"; | ||
treatmentLocations = TREATMENT_LOCATIONS_ALL; | ||
allowedSelections[] = {"Head"}; | ||
allowSelfTreatment = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I shouldn't be able to tilt my on head (I think this doesn't make any difference)
treatmentLocations = TREATMENT_LOCATIONS_ALL; | ||
allowedSelections[] = {"Head"}; | ||
allowSelfTreatment = 0; | ||
medicRequired = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a setting, since there is a little bit of skill required
icon = ""; | ||
category = "examine"; | ||
treatmentLocations = TREATMENT_LOCATIONS_ALL; | ||
allowedSelections[] = {"Head", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't add a pulseoxi on the head, we can discuss limbs, but head is not possible (only earlobe, but that is absolutely Shit)
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.