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

Add Ability to Change Repair Times of Vehicles #5205

Merged
merged 5 commits into from
Jun 8, 2017
Merged

Add Ability to Change Repair Times of Vehicles #5205

merged 5 commits into from
Jun 8, 2017

Conversation

654wak654
Copy link
Contributor

@654wak654 654wak654 commented May 26, 2017

When merged this pull request will:

  • Allow repair times of vehicles to be changed by script or config. Currently there is a single global value used for every repair operation, which isn't convenient if you're trying to amp up your saturday go kart nights but still keep convoy ops realistic.
  • I just added a simple check for 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.

@654wak654 654wak654 changed the title Add Ability to Change Repair Time of Vehicles Add Ability to Change Repair Times of Vehicles May 26, 2017
@654wak654
Copy link
Contributor Author

This makes every type of repair take the same amount of time 🤔

@PabstMirror
Copy link
Contributor

Maybe make it a coefficent, defaulting to 1
Also I think a setVar should have higher priority than the new config.

@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label May 26, 2017
@PabstMirror PabstMirror added this to the 3.10.0 milestone May 26, 2017
@654wak654
Copy link
Contributor Author

654wak654 commented May 26, 2017

setVar did have a higher priority, It's gone for now.

Feel like static values are better than a coefficent for this case.

@kymckay
Copy link
Member

kymckay commented May 28, 2017

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).

@654wak654
Copy link
Contributor Author

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.

Copy link
Contributor

@Phyma Phyma left a 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 {
Copy link
Contributor

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.

@PabstMirror PabstMirror merged commit 225d15d into acemod:master Jun 8, 2017
@654wak654 654wak654 deleted the repair-times branch August 12, 2017 11:05
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