Skip to content

Pharma, Fix CWMP And Caffeine Treatment times and med level required #727

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

Merged
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
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>
Loading