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 Treatment - Add Additional Conditions for PAK Use #8964

Closed

Conversation

dgibso29
Copy link
Contributor

@dgibso29 dgibso29 commented Jul 12, 2022

When merged this pull request will:
Personal Aid Kits now have additional optional conditions for use:

  • Minimum Blood Level
  • Minimum Heart Rate
  • Patient must not be in pain
  • Patient must have no untreated fractures
  • Patient must have no open wounds
  • Patient must have no open or bandaged wounds (Must be fully stitched)

This PR is an attempt to resuscitate the work done in stale PR #7684, which was created prior to major build pipeline changes. The actual feature work has been recreated and re-tested here.

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}.

Personal Aid Kits now have additional optional conditions for use:
- Minimum Blood Level
- Minimum Heart Rate
- Patient must not be in pain
- Patient must have no open wounds
- Patient must have no open or bandaged wounds (Must be fully stitched)

Co-Authored-By: André Vennberg <andre.vennberg@gmail.com>
@Cre8or
Copy link
Contributor

Cre8or commented Jul 12, 2022

It seems reasonable to give mission makers more control over the "embedded" aspects of ACE's medical system. Without PRs like these, communities have to resort to making in-house mods to expose the underlying features as CBA options. Which is fine if you only have to do this for one mod, but repeat that process a few times and your addon dependency graph quickly becomes more intricate than the lineage of the British royal family.

Jokes aside - I appreciate your dedication for keeping this submission going, and hope this gets more attention this time! 🤞

@Joecuronium
Copy link

As a missionmaker I would very much appreciate this being added, since currently I don't give out PAKs since it represents an "auto-heal" button in an otherwise pretty realistic representation of how med-care should work.
Tying the PAK to a condition would allow to be an actual tool that rewards proper care by lower-tier medics until the pt can be seen ba a doc.

Comment on lines 31 to 32
// Untreated fractures have a value of 1. Treated are -1.
if (EGVAR(medical_treatment,allowFracturesPAK) == 0 && { ((GET_FRACTURES(_unit) findIf {_x isEqualTo 1}) != -1) }) exitWith {false};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an additional option to allow fractures to prevent PAK use.

@dgibso29
Copy link
Contributor Author

Current state of PR has been successfully tested on dedicated server.

Copy link
Contributor

@rautamiekka rautamiekka left a comment

Choose a reason for hiding this comment

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

What little I know about ACE's workings it's good, I'll leave the rest to others.

@dgibso29
Copy link
Contributor Author

dgibso29 commented Mar 7, 2023

@rautamiekka Just bumping this as it seems to be falling under the radar. Thanks for any context you can provide.

@dgibso29
Copy link
Contributor Author

@veteran29 Apologies for the ping, but you have been active in the repository recently and am trying to get movement on this PR. These changes have been approved in the past and gone through several rounds of feedback from @mharis001, but it seems to be falling under the radar since.

Thanks!

@BrettMayson BrettMayson added this to the 3.16.0 milestone May 16, 2023
if (EGVAR(medical_treatment,allowPainPAK) == 0 && { IS_IN_PAIN(_unit) }) exitWith {false};

// Untreated fractures have a value of 1. Treated are -1.
if (EGVAR(medical_treatment,allowFracturesPAK) == 0 && { ((GET_FRACTURES(_unit) findIf {_x isEqualTo 1}) != -1) }) exitWith {false};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (EGVAR(medical_treatment,allowFracturesPAK) == 0 && { ((GET_FRACTURES(_unit) findIf {_x isEqualTo 1}) != -1) }) exitWith {false};
if (EGVAR(medical_treatment,allowFracturesPAK) == 0 && {1 in (GET_FRACTURES(_unit))}) exitWith {false};

Minor optimization.

if (_requiredWoundState == PAK_REQ_OPEN) exitWith {true};

// Parameterize this value to reduce duplication.
private _hasOpenWounds = (GET_OPEN_WOUNDS(_unit) findIf {_x select 2 > 0 && {_x select 3 > 0}}) != -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs to be updated for #8926.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO this should be moved to its own category, but out of scope for this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a fan of these setting titles.

<English>Required Wound State PAK</English>
</Key>
<Key ID="STR_ACE_Medical_Treatment_RequiredWoundStatePAK_Description">
<English>Controls whether a patient's wounds must be bandaged or stitched in order to use a PAK.</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Controls whether a patient's wounds must be bandaged or stitched in order to use a PAK.</English>
<English>Controls whether a patient's wounds must be bandaged or stitched in order to use a Personal Aid Kit.</English>

) exitWith {false};

private _requiredBloodVolume = DEFAULT_BLOOD_VOLUME * (EGVAR(medical_treatment,minBloodPAK) / 100);
if (GET_BLOOD_VOLUME(_unit) < _requiredBloodVolume) exitWith {false};
Copy link
Contributor

Choose a reason for hiding this comment

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

This'd be more intuitive if it used qualitative blood loss (hemmorhage class, "Lost some/a lot of/etc blood") instead.

@@ -176,6 +176,14 @@ Self IV Transfusion: See "Self PAK Usage".

Time Coefficient PAK: This setting controls how long a PAK takes to apply. Set to higher values to increase, lower to decrease. PAK has a minimum of 10 seconds usage time.

Required Wounds State PAK: Controls whether a patient's wounds must be bandaged or stitched in order to use a PAK.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Required Wounds State PAK: Controls whether a patient's wounds must be bandaged or stitched in order to use a PAK.
Required Wounds State PAK: Controls whether a patient's wounds must be bandaged or stitched in order to use a Personal Aid Kit.

@@ -176,6 +176,14 @@ Self IV Transfusion: See "Self PAK Usage".

Time Coefficient PAK: This setting controls how long a PAK takes to apply. Set to higher values to increase, lower to decrease. PAK has a minimum of 10 seconds usage time.

Required Wounds State PAK: Controls whether a patient's wounds must be bandaged or stitched in order to use a PAK.

Allow Pain PAK: Controls whether PAKs can be used on patients in pain.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Allow Pain PAK: Controls whether PAKs can be used on patients in pain.
Allow Pain PAK: Controls whether Personal Aid Kits can be used on patients in pain.


Allow Pain PAK: Controls whether PAKs can be used on patients in pain.

Min Blood PAK: Minimum blood volume percentage required to use a PAK.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Min Blood PAK: Minimum blood volume percentage required to use a PAK.
Min Blood PAK: Minimum blood volume percentage required to use a Personal Aid Kit.


Min Blood PAK: Minimum blood volume percentage required to use a PAK.

Min Heart Rate PAK: Minimum heart rate required to use a PAK.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Min Heart Rate PAK: Minimum heart rate required to use a PAK.
Min Heart Rate PAK: Minimum heart rate required to use a Personal Aid Kit.

@dgibso29
Copy link
Contributor Author

dgibso29 commented Jul 5, 2023

Kindly, after nearly 3 years of trying to get this merged, it is no longer worth redeveloping this yet again versus maintaining an override in our framework.

@dgibso29 dgibso29 closed this Jul 5, 2023
@LinkIsGrim LinkIsGrim modified the milestones: 3.16.0, Backlog Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants