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 - Add medication dosage support & improve overdose #10393

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

Cplhardcore
Copy link
Contributor

When merged this pull request will:

  • Rework overdose slightly, for better handling with external mods with multiple dose levels for one kind of medication
  • splits overdose into its own function
  • adds the getAllMedicationCount function, which gets all medications in a unit and outputs them in an array of arrays containing the medication's name, the dose, and the effectiveness

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@LinkIsGrim LinkIsGrim self-assigned this Oct 11, 2024
@LinkIsGrim
Copy link
Contributor

Don't worry about the failing pboProject build. Do worry about HEMTT warnings/errors though.

_return
TRACE_5("getMedicationCount",_target,_medication,_getCount,_return,_medDose);

[_medication, _medDose, _return]
Copy link
Contributor

@LinkIsGrim LinkIsGrim Oct 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why return one of the inputs here? If it's for the other functions' sake, modify its return instead IMO

Comment on lines 34 to 38
if (!isNil "_onOverDose" && {isText _onOverDose}) then {
_onOverDose = compile _onOverDose;
} else {
_onOverDose = missionNamespace getVariable _onOverDose;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't work, getText will never return nil and isText will always be true

@LinkIsGrim
Copy link
Contributor

Should've just started a review.

*/

params ["_unit", "_classname"];
private _medicationConfig = configFile >> "ace_medical_treatment" >> _classname;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you actually intend on dropping support for root-level onOverDose?

Also, won't work.

Suggested change
private _medicationConfig = configFile >> "ace_medical_treatment" >> _classname;
private _medicationConfig = configFile >> "ace_medical_treatment" >> "Medication";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants