Open Deiskos opened 3 years ago
Moving furniture over spilled liquids and destroying them in the process isn't a bug, it's working as intended, see #29921.
OK, but moving liquid after it's spilled by deploying a thing on top of it is definitely a bug.
Confirmed in 0.E-7641-g1e0c90ea69. Here I have 200 L of water spilled on the ground:
I can deploy a brazier on top of the water, then drag it around - the water moves with it:
Not only liquids are affected; it appears to work for any pile of items in the tile where the brazier is deployed.
This also works for some other furnitures such as: ovens, refrigerators, deployed fire barrel, wooden crates, cardboard boxes, etc...
They all have at least one of these flags: CONTAINER
, FIRE_CONTAINER
, or SEALED
. (I'll use the term container to refer to these types of items.)
When you grab-move containers, they collect all the items in its path like how hauling would (can spill if too full). I think this part is inteded behavior. I could imagine the character clearing the destination tile and then putting the items back after moving. Or putting the items into the furniture first then moving.
When you deploy containers on top of other items, they also collect those items when moving, including liquids.
A general fix could be to destroy all spilled liquids on the tile where the container is, regardless if it was just deployed or after moving. It already does this when moving into tiles which only contains liquids. Though what should happen when liquid is poured on top of it?
Relevant code: https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/game.cpp#L10226
I don't see how this could be exploited, please comment if it could.
Describe the bug
Deploying brazier over spilled liquid and moving the brazier also moves the spilled liquid. Moving the brazier over the spilled liquid destroys the liquid.
Steps To Reproduce
Expected behavior
Spilled liquid stays on the same tile. Spilled liquid doesn't disappear.
Screenshots
Spill
Deploy
Move
Versions and configuration
Also reproducible on latest experimental: