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 flags to prevent modification of vehicle parts #40244

Merged
merged 1 commit into from
May 6, 2020

Conversation

anothersimulacrum
Copy link
Member

Summary

SUMMARY: None

Purpose of change

Prevent the hacky workarounds used to do this previously, such as in rotors.

Describe the solution

In can_install_part and can_remove_part, check if the vehicle part has the NO_INSTALL_PLAYER or NO_UNINSTALL flags respectively, and block installing or removing based on that.
In do_repair, bail out if the vehiclepart has the NO_REPAIR flag.

Describe alternatives you've considered

There are some more things this could be added to.

Testing

Spawn in an apache helicopter.
Attempt to install rotors.
Attempt to uninstall existing rotors.
Debug strength to around 200, and attempt to smash rotors (this is roughly what is necessary). Do this until they are damaged, then attempt to repair them.

Additional context

image
image
image
Slightly out of date screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants