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

Simple parts are always simple #79275

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Jan 21, 2025

Summary

Bugfixes "Can always repair simple parts on helicopters, inside or outside"

Purpose of change

vehicle::would_repair_prevent_flyable is a bit weird. For simple parts it checks if the part is outside. For some reason, a simple part is no longer simple if it's on the outside. But then why have the flag at all?

It doesn't check the aircraft mechanic proficiency at all for such simple parts(!). Which means that someone with the (debug only) proficiency could still not repair a simple part, by 'virtue' of the part being on the outside of the helicopter.

Describe the solution

Simple:

Simple parts are always simple.

Align the functionality of these two flags with their actually documented effect.

The debug proficiency remains as permissive as possible (although we still don't bother evaluating it if we're dealing with a simple part).

Describe alternatives you've considered

-Introduce more finely grained flags. SIMPLE_PART_INSIDE, SIMPLE_PART_OUTSIDE, etc. Needless.

-Change the order of evaluation so the proficiency is checked first. But then the weirdness with simple parts would remain

Testing

Did not personally test. Pretty simple code change IMO.
Testing suggestions for mergers:
Add SIMPLE_PART to one of the parts of the 'wings' of the apache helicopter. Try to repair, notice failure.

Apply patch. Try to repair, notice success.

Additional context

@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 21, 2025
@GuardianDll GuardianDll merged commit 77939d0 into CleverRaven:master Jan 23, 2025
30 checks passed
@RenechCDDA RenechCDDA deleted the fix_heli_repair_bug branch January 23, 2025 06:58
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.

2 participants