-
Notifications
You must be signed in to change notification settings - Fork 740
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
Conversation
* Arguments: | ||
* 0: The medic <OBJECT> | ||
* 1: The patient <OBJECT> | ||
* 2: Body part <STRING> |
There was a problem hiding this comment.
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}; |
There was a problem hiding this comment.
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 | ||
*/ |
There was a problem hiding this comment.
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
* 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
When merged this pull request will: