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

Crafting from vehicle tanks doesn't consume liquids #21389

Closed
Tharn opened this Issue Jul 8, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@Tharn

Tharn commented Jul 8, 2017

Expected Behavior

When crafting a batch of 20 diesel, it correctly recognizes a vehicle with a faucet and the denatured alcohol / cooking oil as the only source. It should subtract from these two tanks.

Actual behavior

You can craft the batch of diesel, but the amount of oil and denatured alcohol stored never decreases. You get the diesel for free, essentially. The only liquid it does decrease is water from a vehicle tank.

Steps to reproduce the behavior

Have a vehicle with tanks filled with cooking oil and ethanol / denatured alcohol as well as a faucet in range. Make sure it's the only source.

Possibly to do with #21102

@Night-Pryanik

This comment has been minimized.

Show comment
Hide comment
@Night-Pryanik

Night-Pryanik Sep 10, 2017

Member

The bug is here:

Cataclysm-DDA/src/map.cpp

Lines 5060 to 5071 in a09391d

itype_id ftype = "null";
if (type == "water_clean") {
ftype = "water_clean";
} else if (type == "water") {
ftype = "water";
} else if (type == "hotplate") {
ftype = "battery";
}
item tmp(type, 0); //TODO add a sane birthday arg
tmp.charges = veh->drain(ftype, quantity);

It drains only the hardcoded water, clean water and batteries.

Member

Night-Pryanik commented Sep 10, 2017

The bug is here:

Cataclysm-DDA/src/map.cpp

Lines 5060 to 5071 in a09391d

itype_id ftype = "null";
if (type == "water_clean") {
ftype = "water_clean";
} else if (type == "water") {
ftype = "water";
} else if (type == "hotplate") {
ftype = "battery";
}
item tmp(type, 0); //TODO add a sane birthday arg
tmp.charges = veh->drain(ftype, quantity);

It drains only the hardcoded water, clean water and batteries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment