-
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
(repair) - isRepairVehicle handling values according to wiki #6278
Conversation
Hmh, I'd rather change wiki, that leaves open possibilities for repair levels or something. |
So does adding the numbering back when we want repair levels. |
I may be nitpicking here, but why the outer parenthesis? Why the Disregarding that, I agree with dedmen. The is prefix implies that it's a boolean and it's fully backwards compatible. I don't see us moving to multiple repair levels this late into A3. |
In CBA |
I do that whenever it's not clear what a return value is. It's debateable here, because on the one hand, this expression is huge, on the other, it is the last line of the script. What bugs me more about this PR is: [false, true] select |
|
That's what I had at first, with a small edit to cover > 1 numbers |
[false, true] select 😱 heresy! |
So would you guys prefer 74f5b99 or something else or current |
Nah it's best as is because the |
Yeah I was talking to everyone who's commenting here 👍 |
My preference would be a slightly modified variant of Cuel@74f5b99
Shorter and faster. |
@dedmen |
^ That is slower though... |
But you'd be checking if |
Any decision? |
Honestly I don't think we need to handle values greater than one for the time being. The variable name doesn't imply that anyway and I really don't foresee a need for us to add it. If we want to add repair levels in future we can PR it separately. I say keep this code simple |
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.
I hate the ``// return`, but will approve anyway 😄
:( |
* handle boolean and integer * check if value is 1 or true
The wiki states that
ACE_isRepairVehicle
is a boolean but this function only checked for integer values, resulting in a script error for whoever used the wiki value.When merged this pull request will: