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

Prevent vehicles with only PROTRUSION left #60458

Merged
merged 1 commit into from
Aug 27, 2022

Conversation

irwiss
Copy link
Contributor

@irwiss irwiss commented Aug 26, 2022

Summary

None

Purpose of change

Fixes #40427
Fixes part of #46594 (the forklift exploit part, but not running engine for hydraulics part)

Describe the solution

Check we are not left with PROTRUSION as the only "structural" part

Comment near by states * If size = 1, it's one protruding part (i.e., bicycle wheel), so OK, but apparently it's not OK after all, as it allows vehicles that have a supposedly "structural" part but it's leaving just a standalone ram / wing mirror / forklift "vehicle"

Describe alternatives you've considered

I'm not sure why wing mirrors and forklifts have "structure" for location, this also prevents walking on that tile not just for rams, even though it's either a small mirror part or it can go under stuff.
But checking for PROTRUSION specifically is likely the smallest change to close the loopholes.

Testing

Reproduction steps in #40427 should not work on step 3
Reproduction steps in #46594 should not work on step 4

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions 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 Aug 26, 2022
@irwiss irwiss marked this pull request as ready for review August 26, 2022 11:14
@dseguin dseguin merged commit a1e36da into CleverRaven:master Aug 27, 2022
@irwiss irwiss deleted the prevent-protrusion-vehicles branch August 27, 2022 06:39
Hirmuolio pushed a commit to Hirmuolio/Cataclysm-DDA that referenced this pull request Aug 27, 2022
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 [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.

[BUG?]Very simple vehicle can be used as ladder.
2 participants