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 unmounting carried and carrying parts #60460

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 #39457
Fixes #48154

Describe the solution

Prevent unmounting bike racks that carry parts.
Prevent unmounting parts that are carried.

Describe alternatives you've considered

Tried preventing unmounting on just the carrier parts, but this has it's own bugs for carried parts;

  • racking a bike, then removing middle part of a bike (therefore slicing it) produces unracking task failed when unracking
  • lifting requirements are wrong; try removing a wheel from said bike - it requires 22 str (or whatever parent vehicle mass requires), when it normally requires 2 str

Testing

Step 3 in fixed issue isn't allowed.
Any parts on racked vehicles shouldn't be removable until they're unracked

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:55
@chrispikula
Copy link
Contributor

Prevent unmounting bike racks that carry parts.
Prevent unmounting parts that are carried.

By this do you mean uninstalling things from the primary vehicle, or unmounting the entire bike, which may itself carry equipment?

'cause if it's the later, I'll be a bit say that my mobile welding bike is no more. :-(

@irwiss
Copy link
Contributor Author

irwiss commented Aug 26, 2022

I mean you can't rack a bike and start sawing parts off of it
Or rack a bike and then saw off the racks you put it on

@chrispikula
Copy link
Contributor

Yeah, I get that logic, it's just 'unmounting' is a multi-meaning word, and I am confused.

I could see the logic in preventing large things, like equipment, from going on bike racks. Or, heck, even impassible tile stuff. I just wouldn't really like it, as I currently use that 'exploit'.

@irwiss
Copy link
Contributor Author

irwiss commented Aug 26, 2022

Unmounting in the sense of vehicle::*unmount*() functions, in my last few PRs I'm not doing bikerack balance pass, I'm just knocking out the weird edge case issues that currently make bikeracks "feel" unstable before digging into more serious bugs

@dseguin dseguin merged commit bcd0fa1 into CleverRaven:master Aug 27, 2022
@irwiss irwiss deleted the prevent-removing-racked branch August 27, 2022 06:40
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.

Issue with bike rack Bike rack can be uninstalled with bike loaded
3 participants