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

Pharma - Improve - Medication - Pharmacokinetics and Delivery #593

Open
wants to merge 254 commits into
base: dev-Tomcat
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
254 commits
Select commit Hold shift + click to select a range
707cecb
Fix
Cplhardcore Sep 5, 2024
34e0ed5
Update stringtable.xml
Cplhardcore Sep 5, 2024
8d0eb59
Fixes
Cplhardcore Sep 5, 2024
29f1cee
Update config.cpp
Cplhardcore Sep 5, 2024
7aaaa29
Fixes for stringtable
Cplhardcore Sep 5, 2024
41537a9
fix
Cplhardcore Sep 8, 2024
13789ad
IV
Cplhardcore Sep 10, 2024
ff2eba3
iv actions
Cplhardcore Sep 10, 2024
873b542
Update launch.toml
Cplhardcore Sep 10, 2024
e73d64b
Update fnc_applyIV.sqf
Cplhardcore Sep 10, 2024
06492d6
Update fnc_applyIV.sqf
Cplhardcore Sep 10, 2024
52567c6
Update fnc_applyIV.sqf
Cplhardcore Sep 10, 2024
a444afb
Update fnc_applyIV.sqf
Cplhardcore Sep 10, 2024
ffa00c7
Removal
Cplhardcore Sep 10, 2024
5ed12ec
fixes
Cplhardcore Sep 10, 2024
c4fca7d
fixes
Cplhardcore Sep 10, 2024
7a01006
Update fnc_retrieveIV.sqf
Cplhardcore Sep 10, 2024
93dd5a2
Update fnc_retrieveIV.sqf
Cplhardcore Sep 10, 2024
7c2d797
Update fnc_retrieveIV.sqf
Cplhardcore Sep 11, 2024
b4488d5
fixes
Cplhardcore Sep 11, 2024
a1b4471
Update stringtable.xml
Cplhardcore Sep 11, 2024
f549e5d
Update fnc_gui_updateInjuryListPart.sqf
Cplhardcore Sep 11, 2024
f22081b
Update fnc_gui_updateInjuryListPart.sqf
Cplhardcore Sep 11, 2024
c77878e
Add rates and fixed blockages
Cplhardcore Sep 11, 2024
cf72974
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Sep 11, 2024
7c8e95e
Create fnc_overdose.sqf
Cplhardcore Sep 11, 2024
96dc842
EACA and TXA changes
Cplhardcore Sep 11, 2024
64b6201
Delete fnc_overdose.sqf
Cplhardcore Sep 11, 2024
ef38cf8
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into Medication_Rework
Cplhardcore Sep 11, 2024
c3ce17c
Merge branch 'Medication_Rework' of https://github.com/Cplhardcore/KA…
Cplhardcore Sep 11, 2024
4a3fa65
add actions try 1
Cplhardcore Sep 12, 2024
8d478e9
Fix
Cplhardcore Sep 12, 2024
d580f21
fix 2
Cplhardcore Sep 12, 2024
1ab030f
Update CfgVehicles.hpp
Cplhardcore Sep 12, 2024
2af6d16
Update CfgVehicles.hpp
Cplhardcore Sep 12, 2024
72b7695
Update CfgVehicles.hpp
Cplhardcore Sep 12, 2024
d35e672
Fix 4
Cplhardcore Sep 12, 2024
cc096d6
Update XEH_PREP.hpp
Cplhardcore Sep 12, 2024
d949ded
Update fnc_prepareSyringe.sqf
Cplhardcore Sep 12, 2024
28d7939
try?
Cplhardcore Sep 12, 2024
5e9d642
Stringtable fix
Cplhardcore Sep 12, 2024
f9b5f95
Update fnc_prepareSyringe.sqf
Cplhardcore Sep 12, 2024
43f3c70
Update
Cplhardcore Sep 12, 2024
ba35b8e
Update stringtable.xml
Cplhardcore Sep 12, 2024
454a742
Update fnc_insertChildrenSyringe.sqf
Cplhardcore Sep 12, 2024
fdcf239
Update fnc_insertChildrenSyringe.sqf
Cplhardcore Sep 12, 2024
c4b5044
Adding all meds to new system
Cplhardcore Sep 12, 2024
54c5fc1
Final?
Cplhardcore Sep 13, 2024
3ac8689
Update fnc_treatmentAdvanced_KetamineLocal.sqf
Cplhardcore Sep 13, 2024
8917c16
fixes
Cplhardcore Sep 13, 2024
15626b9
Update stringtable.xml
Cplhardcore Sep 13, 2024
c0a8298
Update stringtable.xml
Cplhardcore Sep 13, 2024
11cdc8f
weeee
Cplhardcore Sep 13, 2024
3ca8fea
weee
Cplhardcore Sep 13, 2024
ba07a79
weee
Cplhardcore Sep 13, 2024
3ae72e5
Scope
Cplhardcore Sep 13, 2024
219e968
Update fnc_treatmentAdvanced_KetamineLocal.sqf
Cplhardcore Sep 13, 2024
3b3480e
fixed
Cplhardcore Sep 13, 2024
c32ac6e
add to med checks
Cplhardcore Sep 13, 2024
b8ee551
Update fnc_applyIV.sqf
Cplhardcore Sep 13, 2024
adfcb02
oops
Cplhardcore Sep 13, 2024
dfbefb1
Start of AMS
Cplhardcore Sep 13, 2024
89a7c09
Update fnc_treatmentAdvanced_KetamineLocal.sqf
Cplhardcore Sep 14, 2024
ab08ae5
atropine fix
Cplhardcore Sep 14, 2024
7dcf17a
Update ACE_Medical_Treatment_Actions.hpp
Cplhardcore Sep 14, 2024
cac1bf6
Ketamine fixes
Cplhardcore Sep 14, 2024
f542aed
coding sucks
Cplhardcore Sep 14, 2024
fe7e241
cleanup
Cplhardcore Sep 20, 2024
d7046c5
woops
Cplhardcore Sep 20, 2024
0e2e2a7
weee
Cplhardcore Sep 20, 2024
fa0e3f7
try again
Cplhardcore Sep 20, 2024
cdc1af9
woops
Cplhardcore Sep 20, 2024
d702c68
Revert "woops"
Cplhardcore Sep 20, 2024
d951500
Merge branch 'Medication_Rework' of https://github.com/Cplhardcore/KA…
Cplhardcore Sep 20, 2024
43823a6
Revert "Merge branch 'Medication_Rework' of https://github.com/Cplhar…
Cplhardcore Sep 20, 2024
395614c
IV fixes and broken GUI
Cplhardcore Sep 30, 2024
4c4fe14
wellp, im eepy, sleep
Cplhardcore Sep 30, 2024
731464a
well
Cplhardcore Oct 1, 2024
87b981d
WEEE
Cplhardcore Oct 1, 2024
0a46e85
holy beans its almost done
Cplhardcore Oct 2, 2024
81eab33
tab fixes
Cplhardcore Oct 2, 2024
4a478c8
i hate GUI i hate GUI
Cplhardcore Oct 2, 2024
2ff2ca3
ITS FIXED
Cplhardcore Oct 2, 2024
9ef32db
Remove old ace actions, plus a suprise
Cplhardcore Oct 2, 2024
2aa1661
fixes
Cplhardcore Oct 3, 2024
f7f3cd3
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into Medication_Rework
Cplhardcore Oct 4, 2024
847b9d7
Forgot atropine
Cplhardcore Oct 4, 2024
7324748
Moving this to effects and overdose
Cplhardcore Oct 5, 2024
d4652da
Cleanup
Cplhardcore Oct 5, 2024
9239918
Woohoo
Cplhardcore Oct 5, 2024
6c9a0dd
prep fix
Cplhardcore Oct 8, 2024
de1a335
One small fix
Cplhardcore Oct 8, 2024
5f109a5
Squashed from effects, as these things are more for main PR
Cplhardcore Oct 8, 2024
fbc5047
Merge remote-tracking branch 'upstream/dev-Tomcat' into Medication_Re…
Cplhardcore Oct 8, 2024
dc0069b
Fixes from the upstream
Cplhardcore Oct 8, 2024
21a32e1
i hate stringtables
Cplhardcore Oct 8, 2024
510d79a
Merge pull request #9 from KAT-Advanced-Medical/dev-Tomcat
Cplhardcore Oct 11, 2024
af554ef
Merge remote-tracking branch 'upstream/dev-Tomcat' into Medication_Re…
Cplhardcore Oct 11, 2024
bacc9ed
GUI Fixes
Cplhardcore Oct 11, 2024
28e14ca
Initial
Cplhardcore Oct 12, 2024
437a7d4
Small changes
Cplhardcore Oct 12, 2024
c6ec349
Update gui.hpp
Cplhardcore Oct 12, 2024
3b9def0
Fixes
Cplhardcore Oct 12, 2024
440b569
Fix
Cplhardcore Oct 12, 2024
d971a20
Wee
Cplhardcore Oct 12, 2024
4b68466
Blood fix
Cplhardcore Oct 12, 2024
abd729a
Weight changes
Cplhardcore Oct 12, 2024
136257f
Motherforking misplaced };
Cplhardcore Oct 12, 2024
984b07e
WEEE
Cplhardcore Oct 12, 2024
5dd8661
weee
Cplhardcore Oct 12, 2024
1fc1af4
Update fnc_prepareSyringe.sqf
Cplhardcore Oct 12, 2024
d16f109
Merge branch 'Medication-Rework-Effects-and-OD' into Medication_Rework
Cplhardcore Oct 12, 2024
34bc05f
Merge pull request #10 from Cplhardcore/Medication_Rework
Cplhardcore Oct 12, 2024
fb93a59
Update launch.toml
Cplhardcore Oct 13, 2024
8616b7c
Update launch.toml
Cplhardcore Oct 13, 2024
1cb8672
weeehoo
Cplhardcore Oct 16, 2024
a22b5c2
Small fixes
Cplhardcore Oct 17, 2024
3a0ee86
Merge branch 'Medication_Rework' into Medication-Rework-Effects-and-OD
Cplhardcore Oct 17, 2024
33bf872
Merge remote-tracking branch 'upstream/dev-Tomcat' into Medication-Re…
Cplhardcore Oct 17, 2024
7f610f5
start of overdose effects
Cplhardcore Oct 23, 2024
b6ff6a2
More changes, weee!
Cplhardcore Oct 23, 2024
3ffee91
Fix tabs
Cplhardcore Oct 23, 2024
31ce10a
fixed ;
Cplhardcore Oct 23, 2024
a33dc71
more fixes
Cplhardcore Oct 23, 2024
500a9db
changes to TXA/EACA OD
Cplhardcore Oct 23, 2024
4be57a1
small fix
Cplhardcore Oct 23, 2024
20ef2d8
Weehoo
Cplhardcore Oct 23, 2024
46519a8
MORE OVERDOSES
Cplhardcore Oct 23, 2024
5d5c0c8
Fixes
Cplhardcore Oct 24, 2024
c6a6764
More oD
Cplhardcore Oct 24, 2024
8c341d9
More fun stuff
Cplhardcore Oct 24, 2024
54a6e38
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
Cplhardcore Oct 27, 2024
b1aa8af
Merge remote-tracking branch 'upstream/dev-Tomcat' into Medication_Re…
Cplhardcore Oct 27, 2024
6411ce3
small fixes
Cplhardcore Oct 27, 2024
81d0e1d
Fixes
Cplhardcore Oct 30, 2024
3d6e93e
Fun times
Cplhardcore Oct 30, 2024
9203ce8
Merge branch 'Medication-Rework-Effects-and-OD' into Medication_Rework
Cplhardcore Oct 30, 2024
c82f006
Merge pull request #11 from Cplhardcore/Medication_Rework
Cplhardcore Oct 30, 2024
f571088
Adds alteplase and effects
Cplhardcore Oct 30, 2024
3459d41
Adds a whole bunch of OD effects
Cplhardcore Nov 12, 2024
91d054b
More stuff
Cplhardcore Nov 13, 2024
e6a9877
fixes
Cplhardcore Nov 13, 2024
25c660e
More fixes
Cplhardcore Nov 13, 2024
780fd5e
Fixes
Cplhardcore Nov 16, 2024
6ca29ab
overwrites and small changes
Cplhardcore Nov 16, 2024
2d717f9
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into Medication_Rework
Cplhardcore Nov 16, 2024
4c5f7b6
Merge pull request #12 from Cplhardcore/Medication-Rework-Effects-and-OD
Cplhardcore Nov 16, 2024
d515753
HEMTT FIXES
Cplhardcore Nov 17, 2024
30c6a8a
HEMTT FIXES
Cplhardcore Nov 17, 2024
179b32d
holy shite its done
Cplhardcore Nov 17, 2024
70f5d62
Update fnc_medicationLocal.sqf
Cplhardcore Nov 17, 2024
893c4b1
WAEs are fun and im drunk
Cplhardcore Nov 17, 2024
433b645
I LIED, MORE CHANGES
Cplhardcore Nov 17, 2024
71d9c4b
commas
Cplhardcore Nov 17, 2024
1570548
More fixes
Cplhardcore Nov 17, 2024
fa4c345
Headers
Cplhardcore Nov 18, 2024
70ddc2b
why are you still here
Cplhardcore Nov 18, 2024
d454df2
small update
Cplhardcore Nov 18, 2024
e22c562
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
Cplhardcore Nov 18, 2024
15db74f
Adds WUAE to some overdoses
Cplhardcore Nov 22, 2024
8a11d72
Makes HR effect medications
Cplhardcore Nov 22, 2024
76d40a0
fixes
Cplhardcore Nov 22, 2024
4c3606e
adds counteractions and limits to lung surface area
Cplhardcore Nov 23, 2024
0d344e4
Initial
Cplhardcore Nov 24, 2024
421e51c
Tabs
Cplhardcore Nov 24, 2024
17e3115
oopsa
Cplhardcore Nov 24, 2024
44c5613
Adds else condition to packed RBCs
Cplhardcore Nov 24, 2024
404a3f4
Small changes
Cplhardcore Nov 25, 2024
67d873f
Help me ive gone down a rabbithole
Cplhardcore Nov 25, 2024
e06d113
First pass of IV complications
Cplhardcore Nov 26, 2024
a9a0e0e
Fixes
Cplhardcore Nov 27, 2024
a8fdbbb
Update fnc_handleLimbIVComplications.sqf
Cplhardcore Nov 27, 2024
2d1b2f4
Update fnc_getBloodVolumeChange.sqf
mazinskihenry Nov 27, 2024
5e3fabd
Update fnc_fluidLocal.sqf
mazinskihenry Nov 27, 2024
f9e70ef
Update fnc_fluidLocal.sqf
mazinskihenry Nov 27, 2024
c6fb7e5
Update fnc_treatmentAdvanced_CheckVein.sqf
mazinskihenry Nov 27, 2024
74a46a8
Update fnc_handleLimbIVComplications.sqf
mazinskihenry Nov 27, 2024
3174a4c
Update fnc_handleLimbIVComplications.sqf
mazinskihenry Nov 27, 2024
40f97ed
Update fnc_getBloodVolumeChange.sqf
mazinskihenry Nov 27, 2024
665a949
Fixes, stringtables, and small changes
Cplhardcore Nov 28, 2024
e99d5c8
Update fnc_medicationLocal.sqf
Cplhardcore Nov 28, 2024
aa9ba21
Fixes
Cplhardcore Nov 30, 2024
d255205
Update fnc_treatmentAdvanced_FlushLocal.sqf
Cplhardcore Nov 30, 2024
19e237d
Update fnc_treatmentAdvanced_FlushLocal.sqf
Cplhardcore Nov 30, 2024
166c3db
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
Cplhardcore Dec 1, 2024
196f6fd
More stuff
Cplhardcore Dec 1, 2024
a96a8b8
fixes
Cplhardcore Dec 2, 2024
f649f16
Wee
Cplhardcore Dec 2, 2024
af6ee7e
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Dec 2, 2024
14d378e
hehe, 20g iv time
Cplhardcore Dec 3, 2024
cd5396c
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Dec 3, 2024
579c2da
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Dec 3, 2024
10b226e
Initial
Cplhardcore Nov 24, 2024
00b1451
Tabs
Cplhardcore Nov 24, 2024
93c05bb
oopsa
Cplhardcore Nov 24, 2024
d888d82
Adds else condition to packed RBCs
Cplhardcore Nov 24, 2024
fbfed45
Small changes
Cplhardcore Nov 25, 2024
1f43d27
Help me ive gone down a rabbithole
Cplhardcore Nov 25, 2024
2e41a0c
First pass of IV complications
Cplhardcore Nov 26, 2024
f6c858a
Fixes
Cplhardcore Nov 27, 2024
57284c8
Update fnc_handleLimbIVComplications.sqf
Cplhardcore Nov 27, 2024
a18a75d
Update fnc_getBloodVolumeChange.sqf
mazinskihenry Nov 27, 2024
25d2b22
Update fnc_fluidLocal.sqf
mazinskihenry Nov 27, 2024
d33780a
Update fnc_fluidLocal.sqf
mazinskihenry Nov 27, 2024
de6a612
Update fnc_treatmentAdvanced_CheckVein.sqf
mazinskihenry Nov 27, 2024
716e294
Update fnc_handleLimbIVComplications.sqf
mazinskihenry Nov 27, 2024
a97cd6c
Update fnc_handleLimbIVComplications.sqf
mazinskihenry Nov 27, 2024
33ba2b2
Update fnc_getBloodVolumeChange.sqf
mazinskihenry Nov 27, 2024
5444dca
More stuff
Cplhardcore Dec 1, 2024
74832dc
fixes
Cplhardcore Dec 2, 2024
8cf9f7f
Wee
Cplhardcore Dec 2, 2024
17c68a7
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Dec 2, 2024
c95e51d
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Dec 3, 2024
aee36da
Update fnc_getBloodVolumeChange.sqf
Cplhardcore Dec 3, 2024
77f418c
Fixes
Cplhardcore Dec 3, 2024
5ae7cd5
q
Cplhardcore Dec 3, 2024
24b597d
Fixes
Cplhardcore Dec 3, 2024
05a45b5
Merge branch 'dev-Tomcat' into Medication_Rework
Cplhardcore Dec 3, 2024
7dc64e7
Update fnc_treatmentAdvanced_AlteplaseOverdoseLocal.sqf
Cplhardcore Dec 4, 2024
697bba9
fixes
Cplhardcore Dec 4, 2024
601c002
Merge branch 'dev-Tomcat' of https://github.com/Cplhardcore/KAM into …
Cplhardcore Dec 4, 2024
ea190e6
multipliers
Cplhardcore Dec 4, 2024
f346028
Merge branch 'dev-Tomcat' into Medication_Rework
Cplhardcore Dec 4, 2024
0102ed5
Update fnc_medicationLocal.sqf
Cplhardcore Dec 4, 2024
2501439
Merge branch 'Fluids-Rework' of https://github.com/Cplhardcore/KAM in…
Cplhardcore Dec 11, 2024
feabd78
Fixes, and new saline flush
Cplhardcore Dec 12, 2024
6654c68
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
Cplhardcore Dec 12, 2024
957d362
Weee
Cplhardcore Dec 15, 2024
fcf5537
Merge branch 'Medication_Rework' into Fluids-Rework
Cplhardcore Dec 15, 2024
c2c2c6c
Merge pull request #13 from Cplhardcore/Fluids-Rework
Cplhardcore Dec 15, 2024
aba8754
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
Cplhardcore Dec 15, 2024
63f5517
Merge branch 'Medication_Rework' into dev-Tomcat
Cplhardcore Dec 15, 2024
16e3874
Merge pull request #14 from Cplhardcore/dev-Tomcat
Cplhardcore Dec 15, 2024
a80f49a
Small fixes
Cplhardcore Dec 15, 2024
18987ca
Hemtt suggestions
Cplhardcore Dec 15, 2024
0b736a5
STAB STAB STAB STAB
Cplhardcore Dec 15, 2024
00c4015
Sigh, im going to bed
Cplhardcore Dec 15, 2024
7d7d100
more fixes
Cplhardcore Dec 15, 2024
0560220
More fixes and updates to complications
Cplhardcore Dec 15, 2024
c8bdb0c
tabs
Cplhardcore Dec 15, 2024
99f8009
Removal of IV complications and infusions
Cplhardcore Dec 16, 2024
56256c8
Updated
Cplhardcore Dec 17, 2024
9805c0e
Weeee
Cplhardcore Dec 19, 2024
b7b0deb
Readding IV complications
Cplhardcore Dec 19, 2024
2a5c578
adds Doxapram
Cplhardcore Dec 19, 2024
c9c2ae0
FINALLY
Cplhardcore Dec 20, 2024
0320717
Update fnc_medicationLocal.sqf
Cplhardcore Dec 23, 2024
f97b157
Update ACE_Medical_Treatment.hpp
Cplhardcore Dec 23, 2024
f5d88e6
Bugfixed
Cplhardcore Dec 31, 2024
7e353c9
Update fnc_applyIV.sqf
Cplhardcore Jan 1, 2025
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
1 change: 1 addition & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ workshop = [
"450814997", # CBA_A3's Workshop ID
"463939057", # ACE3's Workshop ID
"2369477168", # Advanced Developer Tools's Workshop ID
"1779063631", # ZEN
]
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* Public: No
*/

params ["_patient"];
params ["_patient", "_classname"];
if (_classname isEqualTo "syringe_kat_atropine_5ml_1") exitWith {};

_patient setVariable [QGVAR(airPoisoning), false, true];
_patient setVariable [QGVAR(isTreated), true, true];
Expand Down
22 changes: 21 additions & 1 deletion addons/circulation/functions/fnc_cprLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private _fnc_advRhythm = {
{
case "Epinephrine":
{
_epiBoost = 1.5;
_epiBoost = 1.2;
};
case "EpinephrineIV":
{
Expand All @@ -87,6 +87,26 @@ private _fnc_advRhythm = {
{
_lidoBoost = _lidoBoost + 8;
};
case "syringe_kat_epinephrineIV_5ml_1":
{
_epiBoost = 1.3;
};
case "syringe_kat_epinephrineIV_5ml_3":
{
_epiBoost = 1.5;
};
case "syringe_kat_lidocaine_5ml_3":
{
_lidoBoost = _lidoBoost + 8;
};
case "syringe_kat_amiodarone_5ml_1":
{
_amiBoost = _amiBoost + (random [6,10,16]);
};
case "syringe_kat_amiodarone_5ml_3":
{
_amiBoost = _amiBoost + (random [8,14,20]);
};
};
} forEach (_patient getVariable [QACEGVAR(medical,medications), []]);

Expand Down
7 changes: 6 additions & 1 deletion addons/gui/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ PREP(updateCategories);
PREP(updateInjuryList);
PREP(updateBodyImage);
PREP(updateIVStatus);
PREP(updateABGStatus);
PREP(updateABGStatus);
PREP(updateSyringes);
PREP(updateMedications);
PREP(prepSyringe);
PREP(openSyringeMenu);
PREP(closeSyringeMenu);
21 changes: 21 additions & 0 deletions addons/gui/functions/fnc_closeSyringeMenu.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "..\script_component.hpp"
/*
* Author: Cplhardcore
* closes the syringe menu
*
* Arguments:
* none
*
* Return Value:
* None
*
* Example:
* [] call kat_medical_gui_fnc_closeSyringeMenu;
*
* Public: No
*/
[{player setVariable ["SyringeMenu", false];
ctrlShow [71300, false];
ctrlShow [71301, false];
ctrlShow [71311, false];
ctrlShow [71310, true];}, []] call CBA_fnc_execNextFrame;
8 changes: 8 additions & 0 deletions addons/gui/functions/fnc_onMenuOpen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,11 @@ if (ACEGVAR(medical_gui,target) == ACE_player) then {
_ctrl ctrlSetText QACEPATHTOF(medical_gui,data\categories\toggle_to_self.paa);
_ctrl ctrlSetTooltip ACELLSTRING(medical_gui,ToggleToSelf);
};
[] call FUNC(updateMedications);
[] call FUNC(updateSyringes);
private _syringeMenuStatus = player getVariable ["SyringeMenu", false];
if (_syringeMenuStatus == true) then {
[] call FUNC(openSyringeMenu);
} else {
[] call FUNC(closeSyringeMenu);
};
21 changes: 21 additions & 0 deletions addons/gui/functions/fnc_openSyringeMenu.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "..\script_component.hpp"
/*
* Author: Cplhardcore
* opens the syringe menu
*
* Arguments:
* none
*
* Return Value:
* None
*
* Example:
* [] call kat_medical_gui_fnc_openSyringeMenu;
*
* Public: No
*/
[{player setVariable ["SyringeMenu", true];
ctrlShow [71300, true];
ctrlShow [71301, true];
ctrlShow [71311, true];
ctrlShow [71310, false];}, []] call CBA_fnc_execNextFrame;
36 changes: 36 additions & 0 deletions addons/gui/functions/fnc_prepSyringe.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include "..\script_component.hpp"
/*
* Author: Cplhardcore
* Checks the medications in the players inventory and then populates the listbox with the medications,
*
* Arguments:
* none
*
* Return Value:
* None
*
* Example:
* [] call kat_medical_gui_fnc_prepSyringe;
*
* Public: No
*/
if !(EGVAR(pharma,AMS_Enabled)) exitWith {};
private _playerMedicalLevel = [_player] call ace_medical_fnc_getMedicLevel;
private _requiredMedicalLevel = GVAR(medLvl_PrepSyringe);
if (_playerMedicalLevel < _requiredMedicalLevel) exitWith {};

[EGVAR(pharma,prepTime_PrepSyringe), [], {
private _syringeBox = findDisplay 38580 displayCtrl 71303;
private _medicationBox = findDisplay 38580 displayCtrl 71305;
private _doseCombo = findDisplay 38580 displayCtrl 71307;

private _syringeSelected = lbCurSel _syringeBox;
private _medicationSelected = lbCurSel _medicationBox;
private _doseSelected = lbCurSel _doseCombo;

private _syringeType = _syringeBox lbData _syringeSelected;
private _medicationType = _medicationBox lbData _medicationSelected;
private _doseType = _doseCombo lbValue _doseSelected;


[player, _medicationType, _syringeType, _doseType] call kat_pharma_fnc_prepareSyringe;}, {}, "Preparing Syringe..."] call ace_common_fnc_progressBar;
90 changes: 90 additions & 0 deletions addons/gui/functions/fnc_updateMedications.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#include "..\script_component.hpp"
/*
* Author: Cplhardcore
* Checks the medications in the players inventory and then populates the listbox with the medications,
*
* Arguments:
* none
*
* Return Value:
* None
*
* Example:
* [] call kat_medical_gui_fnc_updateMedication;
*
* Public: No
*/

if !(EGVAR(pharma,AMS_Enabled)) exitWith {};
disableSerialization;

[{private _medications = [
"kat_amiodarone",
"kat_atropine",
"kat_EACA",
"kat_epinephrineIV",
"kat_etomidate",
"kat_fentanyl",
"kat_flumazenil",
"kat_ketamine",
"kat_lidocaine",
"kat_lorazepam",
"kat_nalbuphine",
"kat_nitroglycerin",
"kat_norepinephrine",
"kat_phenylephrine",
"kat_TXA",
"kat_morphineIV",
"kat_adenosineIV",
"kat_atropineIV"
];

private _medicationsFound = {
params ["_medications"];

private _inventory = (items player) + (magazines player);
private _found = [];

{
private _item = _x;
if (_item in _medications) then {
private _existingIndex = -1;
{
if ((_x select 0) == _item) exitWith {_existingIndex = _forEachIndex};
} forEach _found;

if (_existingIndex == -1) then {
_found pushBack [_item, 1];
} else {
_found set [_existingIndex, [_item, (_found select _existingIndex select 1) + 1]];
};
};
} forEach _inventory;

_found
};

private _listBox = findDisplay 38580 displayCtrl 71305;
private _foundMedications = [_medications] call _medicationsFound;

private _populateListBox = {
params ["_foundMedications", "_listBox"];

lbClear _listBox;
{
private _medItem = _x select 0;
private _medCount = _x select 1;
if (_medItem != "") then {
private _config = configFile >> "CfgWeapons" >> _medItem;
private _displayName = getText (_config >> "displayName");
private _picture = getText (_config >> "picture");
private _data = toLower ((_medItem splitString "_") select 1);
private _entryText = format ["%1 (x%2)", _displayName, _medCount];
private _index = _listBox lbAdd _entryText;
_listBox lbSetPicture [_index, _picture];
_listBox lbSetData [_index, _data];
};
} forEach _foundMedications;
};

[_foundMedications, _listBox] call _populateListBox; }, [], 0.01] call CBA_fnc_waitAndExecute;
73 changes: 73 additions & 0 deletions addons/gui/functions/fnc_updateSyringes.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#include "..\script_component.hpp"
/*
* Author: Cplhardcore
* Checks the syringes in the players inventory and then populates the listbox with the syringes,
*
* Arguments:
* none
*
* Return Value:
* None
*
* Example:
* [] call kat_medical_gui_fnc_updateSyringes;
*
* Public: No
*/
if !(EGVAR(pharma,AMS_Enabled)) exitWith {};
disableSerialization;

[{private _syringes = [
"kat_10ml_syringe",
"kat_5ml_syringe"
];

private _syringesFound = {
params ["_syringes"];

private _inventory = (items player) + (magazines player);
private _found = [];

{
private _item = _x;
if (_item in _syringes) then {
private _existingIndex = -1;
{
if ((_x select 0) == _item) exitWith {_existingIndex = _forEachIndex};
} forEach _found;

if (_existingIndex == -1) then {
_found pushBack [_item, 1];
} else {
_found set [_existingIndex, [_item, (_found select _existingIndex select 1) + 1]];
};
};
} forEach _inventory;

_found
};

private _listBox = findDisplay 38580 displayCtrl 71303;
private _foundSyringes = [_syringes] call _syringesFound;

private _populateListBox = {
params ["_foundSyringes", "_listBox"];

lbClear _listBox;
{
private _syringeItem = _x select 0;
private _syringeCount = _x select 1;
if (_syringeItem != "") then {
private _config = configFile >> "CfgWeapons" >> _syringeItem;
private _displayName = getText (_config >> "displayName");
private _picture = getText (_config >> "picture");
private _data = toLower ((_syringeItem splitString "_") select 1);
private _entryText = format ["%1 (x%2)", _displayName, _syringeCount];
private _index = _listBox lbAdd _entryText;
_listBox lbSetPicture [_index, _picture];
_listBox lbSetData [_index, _data];
};
} forEach _foundSyringes;
};

[_foundSyringes, _listBox] call _populateListBox; }, [], 0.01] call CBA_fnc_waitAndExecute;
Loading
Loading