CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.26k stars 4.12k forks source link

(condom) `can't to expand to add any more` (liquid) #74113

Open Brambor opened 3 months ago

Brambor commented 3 months ago

Describe the bug

I have a condom in my inventory. Condoms are awesome, they take up almost no space and have a capacity of 3.75L or smth.

When bleeding a corpse the condom cannot be used as a container for the blood (or other liquid).

image

image

Likewise, you cannot pour liquids into the condom while it is in your inventory, for example through AIM even if they would have fit had they been filled. A workaround is to put condoms on the ground and pick them up again. This cannot be done now when I have finished butchering anymore.

This issue has existed for quite a while, see

Attach save file

N/A

Steps to reproduce

  1. Have a condom in inventory.
  2. Try to fill it to the brim with a liquid. (Maybe it is bugged only for pockets that do expand?).

Expected behavior

I would like it if it expanded and fell out of inventory instead of not accepting the liquid. Now I have to spill the liquid.

Of course, if it does fit in the inventory, don't drop it.

Screenshots

No response

Versions and configuration

Additional context

No response

PavelZhd commented 3 months ago

If the condom (or other non rigid container) is inside another container, then if would only be able to fill up based on available volume in parent container. Wielding this container will allow it fill up fully. Or make sure the container it is stuck in has enough volume to accommodate

Brambor commented 3 months ago

But it is not correctly implemented. Put a condom in a bag. You cannot fill the condom up despite there being plenty of space in the bag.

If you were to argue that the current implementation makes sense, it doesn't. I am not carefully hovering the bleeding corpse over an open bag with a condom inside pouring the liquid carefully. I take the condom out, fill it up, and put it back.

PavelZhd commented 3 months ago

If the condom is in a bag with plenty of space - it would work correctly. However if you just grab an empty condom chances are it will go into jeans pocket while the actual large bags are reserved for large items that you will not be able to fin in a small pocket.

just having ample inventory space and condom being in inventory does not mean the condom has ample space to expand.

natsirt721 commented 3 months ago

image Cannot confirm. When given plenty of space to expand the condom and bag both expand as expected. I'm a few versions back on a dirty build but I haven't experienced the bug before. Although I will admit that the first time I ran into fill issues with expanding containers in rigid ones it took me a while to figure out what was going on. Maybe some better messaging would help?

The condom will be too large to fit in the jeans pocket. Fill condom anyway and drop it? (y/n?)
github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

Brambor commented 2 months ago

Solution I would like:

  1. In the "Pour into" menu, add "Could not be contained by parent pocket" as a red text.
  2. When pressed do what @ natsirt721 suggested, just don't drop it right away, ask the player if they want to put the item into different pocket of theirs:
    • The condom will be too large to fit in the jeans pocket. Fill condom and move it to a different pocket? (y/n?)
  3. On Y, silently move the container.
  4. If the item doesn't fit in inventory, popup Couldn't fit X in your inventory, dropping. Or the more general Some items didn't fit into your inventory.

I am trying to minimize the key presses while preventing the player to walk away without knowing their container dropped to the ground.