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

fix siphon from and fill to the same tank #50933

Merged
merged 4 commits into from
Aug 24, 2021

Conversation

Menschheit
Copy link
Contributor

Summary

Bugfixes "Fix vehicle tank water transfer infinite loop"

Purpose of change

Fix #50899

Describe the solution

Added filters for drain() and fuel_left() so that certain parts can be excluded (If the player is siphoning water from faucet and tries to fill a tank, the target tank is not an available source anymore).

Describe alternatives you've considered

Testing

Tested the save file in #50899, no infinite loop.

Additional context

I think my Astyle messed up, it generated some very ugly format..

@actual-nh actual-nh added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions labels Aug 20, 2021
@mqrause
Copy link
Contributor

mqrause commented Aug 20, 2021

I think my Astyle messed up, it generated some very ugly format..

Considering the check passed, astyle probably just can't handle ternary operators with inline lambdas.

@ZhilkinSerg ZhilkinSerg merged commit 2158392 into CleverRaven:master Aug 24, 2021
Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vehicle tank water transfer infinite loop
4 participants