Skip to content

Commit

Permalink
Pharma, Fix CWMP And Caffeine Treatment times and med level required (#…
Browse files Browse the repository at this point in the history
…727)

**When merged this pull request will:**
- Make caffeine and CWMP not use morphines med level and treatment times
- this was done on an Ipad, so not tested but its a simple fix
### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
Cplhardcore authored Feb 18, 2025
1 parent 7df26d9 commit 2f3c65b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/pharma/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class ACE_Medical_Treatment_Actions {
displayName = CSTRING(Give_CWMP);
displayNameProgress = CSTRING(Using);
allowedSelections[] = {"Head"};
medicRequired = QGVAR(medLvl_CWMP);
treatmentTime = QGVAR(treatmentTime_CWMP);
items[] = {"kat_Painkiller"};
condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)]));
callbackSuccess = QFUNC(treatmentAdvanced_CWMP);
Expand Down Expand Up @@ -92,7 +94,8 @@ class ACE_Medical_Treatment_Actions {
displayNameProgress = CSTRING(Using);
allowedSelections[] = {"Head"};
allowSelfTreatment = 1;
treatmentTime = 5;
medicRequired = QGVAR(medLvl_Caffeine);
treatmentTime = QGVAR(treatmentTime_Caffeine);
items[] = {"kat_Caffeine"};
condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)]));
callbackSuccess = QFUNC(treatmentAdvanced_Caffeine);
Expand Down
36 changes: 36 additions & 0 deletions addons/pharma/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -853,4 +853,40 @@ PREP_RECOMPILE_END;
true
] call CBA_Settings_fnc_init;

[
QGVAR(medLvl_Caffeine),
"LIST",
[LLSTRING(medLvl_Caffeine)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Caffeine)],
[[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0],
true
] call CBA_Settings_fnc_init;

[
QGVAR(treatmentTime_Caffeine),
"SLIDER",
[LLSTRING(treatmentTime_Caffeine)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Caffeine)],
[0.1, 10, 7, 1],
true
] call CBA_Settings_fnc_init;

[
QGVAR(medLvl_CWMP),
"LIST",
[LLSTRING(medLvl_CWMP)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_CWMP)],
[[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0],
true
] call CBA_Settings_fnc_init;

[
QGVAR(treatmentTime_CWMP),
"SLIDER",
[LLSTRING(treatmentTime_CWMP)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_CWMP)],
[0.1, 10, 7, 1],
true
] call CBA_Settings_fnc_init;

ADDON = true;
15 changes: 15 additions & 0 deletions addons/pharma/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4152,5 +4152,20 @@
<German>Verabreiche Epinephrine</German>
<Chinesesimp>推肾上腺素</Chinesesimp>
</Key>
<Key ID="STR_KAT_Pharma_medLvl_Caffeine">
<English>Allow using Caffeine</English>
</Key>
<Key ID="STR_KAT_Pharma_treatmentTime_Caffeine">
<English>Treatment time for Caffeine</English>
</Key>
<Key ID="STR_KAT_Pharma_medLvl_CWMP">
<English>Allow using CWMP</English>
</Key>
<Key ID="STR_KAT_Pharma_treatmentTime_CWMP">
<English>Treatment time for CWMP</English>
</Key>
<Key ID="STR_KAT_Pharma_SubCategory_CWMP">
<English>CWMP Settings</English>
</Key>
</Package>
</Project>

0 comments on commit 2f3c65b

Please sign in to comment.