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 condition for surgicial kit #6916

Merged
merged 5 commits into from
Apr 3, 2019
Merged

Medical - Add condition for surgicial kit #6916

merged 5 commits into from
Apr 3, 2019

Conversation

Katalam
Copy link
Contributor

@Katalam Katalam commented Apr 2, 2019

When merged this pull request will:

@Katalam Katalam changed the title Fix condition surgicial kit #6913 Fix condition surgicial kit Apr 2, 2019
@PabstMirror PabstMirror changed the title Fix condition surgicial kit Medical - Add condition for surgicial kit Apr 2, 2019
@PabstMirror PabstMirror added this to the Medical Rewrite milestone Apr 2, 2019
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Apr 2, 2019
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
* 2: Body part <STRING>
Copy link
Member

Choose a reason for hiding this comment

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

Parameters 2 and 3 are not used


params ["", "_patient"];

if ((count (_patient getVariable [QEGVAR(medical,bandagedWounds), []])) > 0) exitWith {true};
Copy link
Member

Choose a reason for hiding this comment

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

isEqualTo [] is faster than count

also you can substitute everything and spare conditionals and returns by making it a single line

params ["", "_patient"];

!((_patient getVariable [QEGVAR(medical,bandagedWounds), []]) isEqualTo [])

* Can Stitch <BOOL>
*
* Public: No
*/
Copy link
Member

Choose a reason for hiding this comment

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

Example is missing. Each header has to follow the same rules. For example: https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_canDig.sqf

@TheMagnetar TheMagnetar merged commit 55a7d53 into acemod:master Apr 3, 2019
@Katalam Katalam deleted the fixConditionSurgicialKit branch April 3, 2019 11:37
@alganthe alganthe mentioned this pull request May 18, 2019
28 tasks
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Added condition canStitch

* Update XEH_PREP.hpp

* Update addons/medical_treatment/functions/fnc_canStitch.sqf

Co-Authored-By: Katalam <[email protected]>

* Added example, removed arguments information and changed > to isEqualTo

* Added example in canBandage too
@PabstMirror PabstMirror modified the milestones: Medical Rewrite, 3.13.0, 3.13.0-temp3 Dec 30, 2019
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.

4 participants