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

Fix vehicle parts being unrepairable after removing from vehicle #79391

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

Kilvoctu
Copy link
Contributor

@Kilvoctu Kilvoctu commented Jan 28, 2025

Summary

SUMMARY: Bugfixes "Fix vehicle parts being unrepairable after removing from vehicle"

Purpose of change

Repairable damaged vehicle parts, when removed from their respective vehicle, can no longer be repaired.
They can't be repaired neither as an item nor when installed into a (same or different) vehicle.
Doesn't seem like this is intended behavior to me, but idunno.
Fixes #74035

Describe the solution

Just applying the changes I found in #69696; the work is @lispcoc's. All I've done is the testing.
The contributor closed the PR due to not having time to test it, and hasn't followed up since. If they or anyone wants to reopen that PR, I will close this one.

Describe alternatives you've considered

I tried some different approaches to fixing this behavior before digging around and finding the PR (and issue) above, which is a simple 1-line change.

Testing

Game compiles and loads.
Look at a damaged part in a vehicle that is repairable (a steel frame).
Remove the part, and confirm I am able to repair it.
Install the part back into the vehicle, and confirm I am able to repair it.

Look at a damaged part in a vehicle that is not repairable (a windshield).
Remove the part. Confirm it's still not repairable.
Reinstall the part. Confirm it's still not repairable.

Additional context

This issue still persists on d95d165. I had encountered it during play when moving a motor from one vehicle to another. My character has high mechanics skill, so I thought it didn't feel right.

The supplied save from #74035 can be used to check this behavior (just skip past the many errors on loading)

@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 28, 2025
@Kilvoctu Kilvoctu changed the title Fix vehicles parts being unrepairable after removing from vehicle Fix vehicle parts being unrepairable after removing from vehicle Jan 28, 2025
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jan 28, 2025
Kilvoctu and others added 2 commits January 28, 2025 00:16
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels Jan 28, 2025
@Maleclypse Maleclypse merged commit 203edf8 into CleverRaven:master Jan 29, 2025
27 checks passed
@Kilvoctu Kilvoctu deleted the repair_removed_vehicle_parts branch January 29, 2025 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing parts from vehicles reduces max durability to current durability
2 participants