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 - Disable Painkiller stacking #459

Closed
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
9 changes: 9 additions & 0 deletions addons/pharma/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -609,4 +609,13 @@ PREP_RECOMPILE_END;
true
] call CBA_Settings_fnc_init;

[
QGVAR(painkillerStack),
"CHECKBOX",
[LLSTRING(SETTING_painkillerStack), LLSTRING(SETTING_painkillerStack_DESC)],
CBA_SETTINGS_CAT,
[false],
true
] call CBA_Settings_fnc_init;

ADDON = true;
5 changes: 3 additions & 2 deletions addons/pharma/functions/fnc_treatmentAdvanced_Painkillers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
*/

params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];
private _painkillerscount = [_patient, "Painkillers"] call ACEFUNC(medical_status,getMedicationCount);

[_patient, _classname] call ACEFUNC(medical_treatment,addToTriageCard);
[_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), _classname]] call ACEFUNC(medical_treatment,addToLog);

[QGVAR(medicationLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent;
[_patient] call EFUNC(circulation,wrongBloodTreatment);
if (_painkillerscount > 0 && GVAR(painkillerStack)) exitWith {[_patient, "Painkillers", 90, 600, 10, 0, -5] call ace_medical_status_fnc_addMedicationAdjustment};
[QGVAR(medicationLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent;
6 changes: 6 additions & 0 deletions addons/pharma/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2874,5 +2874,11 @@
<Portuguese>Permite que certos medicamentos modifiquem a Stamina (vanilla/fadiga avançada) como efeito colateral</Portuguese>
<Spanish>Permitir que ciertos medicamentos modifiquen la resistencia (fatiga convencional/avanzada) como efecto secundario</Spanish>
</Key>
<Key ID="STR_KAT_Pharma_SETTING_painkillerStack">
<English>Painkiller Pain Suppression Stacking</English>
</Key>
<Key ID="STR_KAT_Pharma_SETTING_painkillerStack_DESC">
<English>If Enabled, painkillers will not stack their pain suppression but will still have all the side effects </English>
</Key>
</Package>
</Project>