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

Medical Treatment - Add settings for morphine and adenosine use #10450

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ class GVAR(actions) {
displayName = CSTRING(Inject_Morphine);
displayNameProgress = CSTRING(Injecting_Morphine);
icon = QPATHTOEF(medical_gui,ui\auto_injector.paa);
medicRequired = QGVAR(medicMorphine);
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
category = "medication";
items[] = {"ACE_morphine"};
treatmentLocations = QGVAR(locationMorphine);
condition = "";
treatmentTime = QGVAR(treatmentTimeAutoinjector);
callbackSuccess = QFUNC(medication);
Expand All @@ -128,8 +130,10 @@ class GVAR(actions) {
class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine);
displayNameProgress = CSTRING(Injecting_Adenosine);
medicRequired = QGVAR(medicAdenosine);
condition = QGVAR(advancedMedication);
items[] = {"ACE_adenosine"};
treatmentLocations = QGVAR(locationAdenosine);
litter[] = {{"ACE_MedicalLitter_adenosine"}};
};
class Epinephrine: Morphine {
Expand Down
36 changes: 36 additions & 0 deletions addons/medical_treatment/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,42 @@
true
] call CBA_fnc_addSetting;

[
QGVAR(medicMorphine),
"LIST",
[LSTRING(MedicMorphine_DisplayName), LSTRING(MedicMorphine_Description)],
LSTRING(Category),
[[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 0],
true
] call CBA_fnc_addSetting;

[
QGVAR(locationMorphine),
"LIST",
[LSTRING(LocationMorphine_DisplayName), LSTRING(LocationMorphine_Description)],
LSTRING(Category),
[[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0],
true
] call CBA_fnc_addSetting;

[
QGVAR(medicAdenosine),
"LIST",
[LSTRING(MedicAdenosine_DisplayName), LSTRING(MedicAdenosine_Description)],
LSTRING(Category),
[[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 0],
true
] call CBA_fnc_addSetting;

[
QGVAR(locationAdenosine),
"LIST",
[LSTRING(LocationAdenosine_DisplayName), LSTRING(LocationAdenosine_Description)],
LSTRING(Category),
[[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0],
true
] call CBA_fnc_addSetting;

[
QGVAR(medicPAK),
"LIST",
Expand Down
24 changes: 24 additions & 0 deletions addons/medical_treatment/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,30 @@
<Spanish>Controla donde puede sr usada la Epinefrina.</Spanish>
<Korean>에피네프린을 사용할 수 있는 장소를 정합니다.</Korean>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicMorphine_DisplayName">
<English>Allow Morphine</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicMorphine_Description">
<English>Training level required to use Morphine.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationMorphine_DisplayName">
<English>Locations Morphine</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationMorphine_Description">
<English>Controls where Morphine can be used.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicAdenosine_DisplayName">
<English>Allow Adenosine</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicAdenosine_Description">
<English>Training level required to use Adenosine.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationAdenosine_DisplayName">
<English>Locations Adenosine</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_LocationAdenosine_Description">
<English>Controls where Adenosine can be used.</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_MedicPAK_DisplayName">
<English>Allow PAK</English>
<Russian>Доступ к Аптечке</Russian>
Expand Down