-
Notifications
You must be signed in to change notification settings - Fork 739
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
Add Ability to Change Repair Times of Vehicles #5205
Conversation
This makes every type of repair take the same amount of time 🤔 |
Maybe make it a coefficent, defaulting to 1 |
setVar did have a higher priority, It's gone for now. Feel like static values are better than a coefficent for this case. |
Shouldn't repair time be based on amount of damage somehow? With a coefficient to modify how fast you can repair (which could also be setVar on individual players). |
The time can be dependent on your engineer level (none, engineer, repair specialist), I thought of it too but it's not really in the scope of this small PR. Additionally, the damage level doesn't change the repair time for all repair types. Changing a wheel takes the same amount of time weather it has 2 bullets in it or 20. |
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.
Please fix so its becomes easier to read the flow.
] call CBA_fnc_getConfigEntry; | ||
|
||
if (_repairTime < 0) then { | ||
_repairTime = if (isNumber (_config >> "repairingTime")) then { |
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.
Personal preference maybe but I think its better to have the if statement alone and set the _repairTime in each section.
So in the if statement you have _repairTime = getNumber() and in the else you have something else. It's hard to read what is happening like it is now.
When merged this pull request will:
GVAR(repairTime)
both as a variable on the vehicle and a config property. If either is found the function skips the regular method of determining time and goes with the new value.