Skip to content
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

Airway/Breathing/Chemical - Add option for intoxication status visibility #657

Merged
2 changes: 1 addition & 1 deletion addons/airway/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class ACE_Medical_Treatment_Actions {
allowedSelections[] = {"Head"};
allowSelfTreatment = 0;
callbackSuccess = QFUNC(checkAirway);
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !([_patient] call FUNC(checkMask)));
condition = QUOTE((missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !([_patient] call FUNC(checkMask)));
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"};
};
Expand Down
9 changes: 9 additions & 0 deletions addons/airway/functions/fnc_checkAirway.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ if (!(_patient getVariable [QGVAR(occluded), false]) && !(_patient getVariable [
_hintWidth = 10;
};

if (_patient getVariable [QEGVAR(chemical,airPoisoning), false]) exitWith {
_message = LLSTRING(AirwayStatus_Poison);

[_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured);
[_patient, "quick_view", LSTRING(checkAirway_log)] call EFUNC(circulation,removeLog);
[_patient, "quick_view", LSTRING(checkAirway_poisonLog)] call EFUNC(circulation,removeLog);
[_patient, "quick_view", LSTRING(checkAirway_poisonLog), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog);
};

[_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured);

[_patient, "quick_view", LSTRING(checkAirway_log)] call EFUNC(circulation,removeLog);
Expand Down
6 changes: 6 additions & 0 deletions addons/airway/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@
<Chinesesimp>%1 检查呼吸道: %2, %3</Chinesesimp>
<Dutch>%1 Heeft de luchtwegen gecheckt: %2, %3</Dutch>
</Key>
<Key ID="STR_KAT_Airway_checkAirway_poisonLog">
<English>%1 checked airways: Heavily Blistered</English>
</Key>
<Key ID="STR_KAT_Airway_airway_log">
<English>%1 inserted a %2</English>
<German>%1 intubierte mit %2</German>
Expand Down Expand Up @@ -399,6 +402,9 @@
<Finnish>Tuuliputki on selkeä</Finnish>
<Dutch>Luchtweg is vrij</Dutch>
</Key>
<Key ID="STR_KAT_Airway_AirwayStatus_Poison">
<English>Airway is heavily blistered</English>
</Key>
<Key ID="STR_KAT_Airway_AirwayStatus_NotClearForItem">
<English>Item could not be used, airways are not clear</English>
<German>Gegenstand konnte nicht verwendet werden, Atemwege sind nicht frei</German>
Expand Down
2 changes: 1 addition & 1 deletion addons/breathing/functions/fnc_checkBreathing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (_ph < 7.2) then {
_output = format ["%1%2", _breathing ,_breath];
_output_log = format ["%1%2", _breathing_log, _breath];

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 {
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] || _patient getVariable [QEGVAR(chemical,airPoisoning), false]) then {
_output = LLSTRING(breathing_none);
_output_log = ACELSTRING(medical_treatment,Check_Pulse_None);
};
Expand Down
10 changes: 10 additions & 0 deletions addons/chemical/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@ PREP_RECOMPILE_END;
[0, 3600, 60],
true
] call CBA_Settings_fnc_init;

// Shows poisioning image
[
QGVAR(showPoisoning),
"CHECKBOX",
[LLSTRING(SETTING_showPoisoning), LLSTRING(SETTING_showPoisoning_DESC)],
mazinskihenry marked this conversation as resolved.
Show resolved Hide resolved
CBA_SETTINGS_CHEM,
[true],
true
] call CBA_Settings_fnc_init;
ADDON = true;
2 changes: 1 addition & 1 deletion addons/chemical/functions/fnc_gui_updateBodyImage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
params ["_ctrlGroup", "_target", "_selectionN"];

private _ctrlAirInfected = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_I;
if (_target getVariable [QGVAR(airPoisoning), false]) then {
if ((_target getVariable [QGVAR(airPoisoning), false]) && (missionNamespace getVariable [QGVAR(showPoisoning),true])) then {
mazinskihenry marked this conversation as resolved.
Show resolved Hide resolved
_ctrlAirInfected ctrlShow true;
} else {
_ctrlAirInfected ctrlShow false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
params ["_ctrl", "_target", "_selectionN", "_entries"];

private _poisontype = _target getVariable [QGVAR(poisonType),""];
if (_target getVariable [QGVAR(airPoisoning),false]) then{

if (_target getVariable [QGVAR(airPoisoning),false] && (missionNamespace getVariable [QGVAR(showPoisoning),true])) then{
mazinskihenry marked this conversation as resolved.
Show resolved Hide resolved
_entries pushBack [LLSTRING(Intoxication), [0.4,0,0.5,1]];
};
Loading
Loading