CleverRaven / Cataclysm-DDA

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

Unable to insert into the pocket, causing the inserted item to be accidentally deleted #74396

Open AsAoA801 opened 4 months ago

AsAoA801 commented 4 months ago

Describe the bug

Unable to insert into the pocket, causing the inserted item to be accidentally deleted This bug occurs when I choose to insert a hand-held item into the single point sling.

DEBUG : tried to put an item (lug_wrench) count (1) in a container (single_sling) that cannot contain it: pocket is unavailable because the item is too small

FUNCTION : ret_val item::put_in(const item&, pocket_type, bool, Character*) FILE : src/item.cpp LINE : 1791 VERSION : cdda-experimental-2024-06-07-2213 36fe02f

Attach save file

TEST-trimmed.tar.gz

Steps to reproduce

Reproduction steps:

Wear the single point sling, and insert a body bag into the single point sling. Hold an item that can be inserted into the single point sling, then choose to hold another item. Until a window pops up to choose the pocket to insert. Choose: "Store in ++ single point sling > body bag". An error occurs, and the item you tried to insert will disappear after ignoring the error.

Expected behavior

At least avoid items being deleted

Screenshots

image

Versions and configuration

Additional context

No response

github-actions[bot] commented 3 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.