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 - Add Manual Suction Pump #453

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
68da4fc
Add ManualSuctionPump, Add StringTable for Accuvac
Apricot-ale Dec 13, 2023
8500c61
I found readme typo so fix and add MSP
Apricot-ale Dec 13, 2023
214b576
change author
Apricot-ale Dec 13, 2023
a3fec31
Accuvac inherit Suction now
Apricot-ale Dec 13, 2023
3f1f69c
Add new setting category "Suction Device"
Apricot-ale Dec 13, 2023
d6bda36
Add Reuse setting
Apricot-ale Dec 13, 2023
8fdd2a5
tab to space
Apricot-ale Dec 13, 2023
3bcc1b2
change == to isEqualTo
Apricot-ale Dec 13, 2023
8c896b7
Reuse setting strings and descriptions
Apricot-ale Dec 13, 2023
0445527
Change strings. Uppercase ACCUVAC
Apricot-ale Dec 13, 2023
40ba29d
Reduced usage time from 14s to 12s, Increased maximum time range to 30s
Apricot-ale Dec 13, 2023
ff13b9a
Restore inheritance to Suction: Accuvac
Apricot-ale Dec 15, 2023
7d0c853
Replace todo with placeholder (old version accuvac sound)
Apricot-ale Dec 15, 2023
71e4f29
Update fnc_treatmentAdvanced_AccuvacStart.sqf
Apricot-ale Dec 16, 2023
22d92a5
fix misstypo naming treatment displayName
Apricot-ale Dec 16, 2023
88f638b
change item name to lowercase for fix duplicate item on arsenal
Apricot-ale Dec 16, 2023
98bd584
add 3den item version (cfgVehicles)
Apricot-ale Dec 16, 2023
6f7b8db
Change file the doing re-add script for reuse
Apricot-ale Dec 16, 2023
95080af
Add hint for suction success
Apricot-ale Dec 16, 2023
00bafc6
fix "private" scope for sound playing
Apricot-ale Dec 16, 2023
a3f3735
Rename display name on triage card
Apricot-ale Dec 16, 2023
6e036c9
Fixed playback sound branching was not done correctly.
Apricot-ale Dec 16, 2023
c7b86b5
Sound related changes
Apricot-ale Dec 18, 2023
74b2677
Change ACCUVAC texts to uppercase.
Apricot-ale Dec 18, 2023
c668e15
Remove redundant and unnecessary triage card treatment log distinctions
Apricot-ale Dec 18, 2023
9de1702
Update manualsuction sound
Apricot-ale Dec 18, 2023
30d8da4
no longer consumes items when medical suction not needed
Apricot-ale Dec 18, 2023
6cf0683
add reuse check for failed for accuvac
Apricot-ale Jan 23, 2024
7de2c94
revert to classname
Apricot-ale Jan 23, 2024
62faab7
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into ManualSuctionDevice
Apricot-ale Jan 23, 2024
2955430
Revert "revert to classname"
Apricot-ale Jan 24, 2024
8cc4c04
Triagecard treatmentlog localize
Apricot-ale Jan 24, 2024
da4f250
merge "remove arsenal" change
Apricot-ale Jan 24, 2024
3dfe902
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into ManualSuctionDevice
Apricot-ale Jan 24, 2024
57291cd
remove comment and hidden original line
Apricot-ale Jan 24, 2024
823f56c
make small suction device inventory size.
Apricot-ale Jan 30, 2024
7f178e7
Update addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf
MiszczuZPolski Jan 30, 2024
f38a455
Update addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf
MiszczuZPolski Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Originaly created by Katalam, currently maintained by Tomcat, Kygan, YetheSamart
- [x] Head hyper-extension
- [x] Intubation
- [x] Aspiration
- [x] Items such as Guedel Tube, King LT and Accuvacc
- [x] Items such as Guedel Tube, King LT and Suction Devices (Accuvac, Manual Suction Pump)
- [x] Recovery position
- Breathing
- [x] Oxygen saturation
Expand Down
15 changes: 12 additions & 3 deletions addons/airway/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ACE_Medical_Treatment_Actions {
callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem);
};
class Accuvac: Larynxtubus {
displayName = "Accuvac";
displayName = CSTRING(AccuvacTreatment_displayName);
treatmentTime = QGVAR(Accuvac_time);
items[] = {"kat_accuvac"};
condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus'));
Expand All @@ -64,10 +64,19 @@ class ACE_Medical_Treatment_Actions {
callbackStart = QFUNC(treatmentAdvanced_AccuvacStart);
callbackSuccess = QFUNC(treatmentAdvanced_accuvac);
callbackProgress = "";
sounds[] = {{QPATHTO_R(sounds\accuvac.wav),6,1,15}};
sounds[] = {{QPATHTO_R(sounds\accuvac_start.wav),6,1,15}};
};
class Suction: Accuvac {
displayName = CSTRING(SuctionTreatment_displayName);
treatmentTime = QGVAR(Suction_time);
items[] = {"kat_suction"};
icon = QPATHTOF(ui\suction.paa);
consumeItem = 1;
medicRequired = QGVAR(medLvl_Suction);
sounds[] = {{QPATHTO_R(sounds\manualpump_start.wav),6,1,15}};
};
class HyperextendHead: Larynxtubus {
displayName = CSTRING(Hyperextend_diplayName);
displayName = CSTRING(Hyperextend_displayName);
displayNameProgress = CSTRING(Hyperextend_progress);
treatmentTime = QGVAR(Hyperextend_Time);
medicRequired = 0;
Expand Down
13 changes: 12 additions & 1 deletion addons/airway/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@ class CfgVehicles {
class kat_accuvacItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName= "Accuvac";
displayName= CSTRING(Accuvac_Display);
author = "Katalam";
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(kat_accuvac,1);
};
};
class kat_suctionItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName= CSTRING(Suction_Display);
author = "Apricot_ale";
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(kat_suction,1);
};
};
class BloodSplatter_01_Small_Old_F;
class kat_vomit: BloodSplatter_01_Small_Old_F {
displayName = CSTRING(Vomit_Display);
Expand All @@ -45,6 +55,7 @@ class CfgVehicles {
class TransportItems: TransportItems {
MACRO_ADDITEM(kat_larynx,15);
MACRO_ADDITEM(kat_guedel,15);
MACRO_ADDITEM(kat_suction,15);
MACRO_ADDITEM(kat_accuvac,1);
};
};
Expand Down
13 changes: 12 additions & 1 deletion addons/airway/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CfgWeapons {
class kat_accuvac: ACE_ItemCore {
scope = 2;
author = "Katalam";
displayName= "Accuvac";
displayName= CSTRING(Accuvac_Display);
descriptionShort = CSTRING(Accuvac_Desc_Short);
picture = QPATHTOF(ui\accuvac_normal.paa);
model = QPATHTOF(models\accuvac\accuvac.p3d);
Expand All @@ -38,4 +38,15 @@ class CfgWeapons {
mass = 7;
};
};
class kat_suction: ACE_ItemCore {
scope = 2;
author = "Apricot_ale";
displayName= CSTRING(Suction_Display);
descriptionShort = CSTRING(Suction_Desc_Short);
picture = QPATHTOF(ui\suction_normal.paa);
ACE_isMedicalItem = 1;
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 0.5;
};
};
};
36 changes: 33 additions & 3 deletions addons/airway/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ In real life, this will happen sometimes, not quiet often.
QGVAR(medLvl_Accuvac),
"LIST",
[LLSTRING(ALLOW_ACCUVAC),LLSTRING(ALLOW_ACCUVAC_DESC)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)],
[[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0],
true
] call CBA_settings_fnc_init;
Expand All @@ -163,8 +163,38 @@ In real life, this will happen sometimes, not quiet often.
QGVAR(Accuvac_time),
"SLIDER",
[LLSTRING(TIME_ACCUVAC),LLSTRING(TIME_ACCUVAC_DESC)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)],
[1, 20, 8, 0],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)],
[1, 30, 8, 0],
true
] call CBA_Settings_fnc_init;

//Settable list for using Manual Suction Pump per medical class
[
QGVAR(medLvl_Suction),
"LIST",
[LLSTRING(ALLOW_SUCTION),LLSTRING(ALLOW_SUCTION_DESC)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)],
[[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0],
true
] call CBA_settings_fnc_init;

// Settable action time for Manual Suction Pump
[
QGVAR(Suction_time),
"SLIDER",
[LLSTRING(TIME_SUCTION),LLSTRING(TIME_SUCTION_DESC)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)],
[1, 30, 12, 0],
true
] call CBA_Settings_fnc_init;

// Reuse Item checkbox for Manual Suction Pump
[
QGVAR(Suction_reuse),
"CHECKBOX",
[LLSTRING(SUCTION_REUSE),LLSTRING(SUCTION_REUSE_DESC)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)],
[false],
true
] call CBA_Settings_fnc_init;

Expand Down
2 changes: 2 additions & 0 deletions addons/airway/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ class CfgPatches {
units[] = {
"kat_guedelItem",
"kat_larynxItem",
"kat_suctionItem",
"kat_accuvacItem",
"kat_vomit"
};
weapons[] = {
"kat_guedel",
"kat_larynx",
"kat_suction",
"kat_accuvac"
};
magazines[] = {};
Expand Down
18 changes: 17 additions & 1 deletion addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,24 @@ params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];
if !(_patient getVariable [QGVAR(occluded), false]) exitWith {
private _output = LLSTRING(Accuvac_NA);
[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured);

if (_usedItem isEqualTo "kat_suction") then {
if (GVAR(Suction_reuse)) then {
_medic addItem "kat_suction";
};
};
};

if (_usedItem isEqualTo "kat_suction") then {
if (GVAR(Suction_reuse)) then {
_medic addItem "kat_suction";
};
};

[_patient, _classname] call ACEFUNC(medical_treatment,addToTriageCard);
private _treatmentName = LLSTRING(AccuvacTreatment_displayName);
[_patient, _treatmentName] call ACEFUNC(medical_treatment,addToTriageCard);

private _outputSuccess = LLSTRING(Accuvac_Success);
[_outputSuccess, 1.5, _medic] call ACEFUNC(common,displayTextStructured);

[QGVAR(accuvacLocal), _patient, _patient] call CBA_fnc_targetEvent;
28 changes: 20 additions & 8 deletions addons/airway/functions/fnc_treatmentAdvanced_AccuvacStart.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "..\script_component.hpp"
/*
* Author: Blue
* Play Accuvac suction sound
* Play Suction Devices sound
*
* Arguments:
* 0: Medic <OBJECT>
Expand All @@ -24,12 +24,24 @@ params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];

if !(_patient getVariable [QGVAR(occluded), false]) exitWith {};

private _accuvacSuction = playSound3D [QPATHTOF_SOUND(sounds\suction.wav), _patient, false, getPosASL _patient, 6, 1, 15];
if (_usedItem isEqualTo "kat_suction") then {
private _suctionSound = playSound3D [QPATHTOF_SOUND(sounds\manualpump_suction.wav), _patient, false, getPosASL _patient, 6, 1, 15];

[{
!dialog;
}, {
params ["_accuvacSuction"];
[{
!dialog;
}, {
params ["_suctionSound"];

stopSound _accuvacSuction;
}, [_accuvacSuction], 5.7] call CBA_fnc_waitUntilAndExecute;
stopSound _suctionSound;
}, [_suctionSound], 7.5] call CBA_fnc_waitUntilAndExecute;
} else {
private _suctionSound = playSound3D [QPATHTOF_SOUND(sounds\accuvac_suction.wav), _patient, false, getPosASL _patient, 6, 1, 15];

[{
!dialog;
}, {
params ["_suctionSound"];

stopSound _suctionSound;
}, [_suctionSound], 5.7] call CBA_fnc_waitUntilAndExecute;
};
Binary file added addons/airway/sounds/manualpump_start.wav
Binary file not shown.
Binary file added addons/airway/sounds/manualpump_suction.wav
Binary file not shown.
Loading
Loading