Skip to content

Commit

Permalink
Medical Treatment - Add settings for morphine and adenosine use (#10450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cplhardcore authored Oct 30, 2024
1 parent 00a20f4 commit b61d2e0
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
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 @@ -563,6 +563,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

0 comments on commit b61d2e0

Please sign in to comment.