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

Inserting into a belt by unwielding bypasses filters on nested container and produces incorrect message #60284

Open actually-a-cat opened 2 years ago

actually-a-cat commented 2 years ago

Describe the bug

Example: I'm wearing a firefighter belt. In the belt there is a pill bottle, filtered for codeine only. I'm wielding a lighter. I unwield the lighter and choose to insert it into the belt. The lighter goes in the bottle. Notably there is enough space in the belt to insert the lighter without nesting it.

Additionally, this produces the message "You clip your lighter to your firefighter belt > plastic prescription bottle > 2 items" even though the clip pocket is not involved.

Steps to reproduce

  1. Start with a naked character
  2. Spawn: firefighter belt, plastic prescription bottle, aspirin, lighter
  3. Wear the belt
  4. Pick up the bottle, make sure it's in the belt
  5. On the bottle's pocket, whitelist aspirin, and set priority to above 0
  6. Wield lighter
  7. Unwield lighter and choose to insert into the firefighter belt

Expected behavior

Filters shouldn't be ignored and "you clip" shouldn't come up unless actually using the belt clip.

Screenshots

No response

Versions and configuration

Additional context

No response

hexagonrecursion commented 2 years ago

/confirmed

image image