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 smash vehicle parts on removal #40594

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

anothersimulacrum
Copy link
Member

Summary

SUMMARY: Infrastructure "Add the ability to smash vehicle parts on removal"

Purpose of change

The inability to remove helicopter parts right now means you can get a little stuck because you can't disable a helicopters rotors to enable you to remove parts.

To fix this, add the ability to smash parts on removal, and makes this occur for rotors. As such, you can smash apart rotors and no longer need to worry about being unable to remove parts because there is rotor.

Describe the solution

in veh_interact::can_remove_part(), exclude parts with the SMASH_REMOVE flag from the NO_MODIFY_VEHICLE restriction. Also add special info for this part.

In veh_interact::complete_vehicle(), use the same logic as removing a broken part for populating the items given on removing the vehicle part. Also train skills when smashing these parts, as when removing non-broken parts.

Testing

Spawn in a helicopter. Remove the rotors. Receive scrap metal.

Additional context

image
This will likely also be useful for further adjustments to vehicles in the future.

@Night-Pryanik
Copy link

Honestly I don't understand why one can't carefully dismantle rotors from a helicopter and get them in good shape and not in a form of scrap metal.

@curstwist curstwist added the Vehicles Vehicles, parts, mechanics & interactions label May 18, 2020
The inability to remove helicopter parts right now means you can get a
little stuck because you can't disable a helicopters rotors to enable you
to remove parts.

To fix this, add the ability to smash parts on removal, and makes this
occur for rotors. As such, you can smash apart rotors and no longer need
to worry about being unable to remove parts because there is rotor.

This will likely also be useful for further adjustments to vehicles in
the future.
@ZhilkinSerg ZhilkinSerg merged commit a865ac0 into CleverRaven:master Jun 4, 2020
@anothersimulacrum anothersimulacrum deleted the hey-now branch June 4, 2020 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants