Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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