Cataclysm-dda: Aluminum cans not filling with water

Created on 20 Jul 2020  路  10Comments  路  Source: CleverRaven/Cataclysm-DDA

Empty Aluminum cans do not register as a container for pouring water into. Ones with contents already in them then drank from till empty will register as a valid container, but upon selecting it when trying to fill a container an error message is received.

DEBUG : tried to put an item (water) in a container (can_drink) that cannot contain it

FUNCTION : int item::fill_with(const itype&, int)
FILE : src/item.cpp
LINE : 8486

Steps To Reproduce

1.Find an empty aluminum can and try to fill it with water
2.Find an aluminum can that is full, drink the contents, then repeat step 1

Aluminum Cans should be able to hold water? Even if we have to set them down after filling multiple since they can't be resealed.

Build 10854
No mods

<Bug>

Most helpful comment

I'm human so i could totally be wrong. all i did was read the PR to the best of my ability because i didn't have an hour to compile and try to reproduce exactly what was going on, and i noticed that the comments didn't really line up very well with the issue body. I've been going through issues and adding them to release blockers and i didn't think "you can't put water in an aluminum can in your backpack" sounded like a bug. please let me know if i interpreted this incorrectly.

All 10 comments

cans spill when opened, so i suppose the bug is that it lets you try and spits out a debug message.

The water also vanishes after the error message. I don't see why an open can can't hold water?

According to JSON_INFO.MD open containers are supposed to spill when placed inside another item. This makes sense. However, if the container is wielded or sitting on a flat surface (like a table or counter), it should be able to hold liquids.

That was essentialy what i was trying to say. Thankyou for putting it in better terms.

I am closing this as "not a bug" at least related to the title.

I am closing this as "not a bug" at least related to the title.

@KorGgenT

How should i title it then? Because i can't use aluminum cans to pour water into at all without the error and that seems buggy plus the water vanishing isn't normal. (At time of reporting. Unsure if any changes fixed it.)

I'm human so i could totally be wrong. all i did was read the PR to the best of my ability because i didn't have an hour to compile and try to reproduce exactly what was going on, and i noticed that the comments didn't really line up very well with the issue body. I've been going through issues and adding them to release blockers and i didn't think "you can't put water in an aluminum can in your backpack" sounded like a bug. please let me know if i interpreted this incorrectly.

Yea no this just won't let me try to put the water into the can at all. I FULLY agree that it should spill in bags. I didn't think it would take a compile just to test?

Edit: Also, i never even mentioned a backpack?

Is this still a thing? I can't reproduce it in current master. Aluminum cans inside a container can't be selected to be filled and wielded cans or cans on the ground can be filled.

Tested in master 2d68329042 from August 22, and the behavior of aluminum cans is as I would expect.

In my inventory are 2 aluminum cans - one is wielded, one is not:
image

I also have an aluminum can on the floor at my feet:

image

When I examine a toilet, I can use the water to fill the can I am wielding, or the can on the floor, but not the can in my inventory:

image

This is consistent with behavior of the spillable pouch described in #42301 . It looks like it is working correctly now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tinukedaya picture tinukedaya  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments

Tsunder picture Tsunder  路  3Comments

2birdie picture 2birdie  路  3Comments