CleverRaven / Cataclysm-DDA

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

Storing a knife to a specific backpack or other pocket yields completely wrong move cost if there is a sheath in the pocket #76227

Closed CoroNaut closed 1 week ago

CoroNaut commented 2 weeks ago

Describe the bug

As title. I have a knife of some sort and when I want to put it into my inventory, I can select the hiking backpack, which says its 331 moves to store my knife. This is a complete lie and it's actually only 30 or so because the sheathe holds the knife. I can can wield it and store it back into the hiking backpack multiple times before a second passes.

Also, selecting the 'Store in inventory' option always uses at least its move cost (i don't know if it also adds +30 for the sheathing) for putting the item into the SAME sheath pocket that the unwield to backpack selection uses.

So both options should be exactly the same move cost because they both go into exactly the same pocket, and both are completely wrong.

Attach save file

Grafton-trimmed.tar.gz

Steps to reproduce

  1. Get hiking backpack
  2. Get a knife that can fit into its sheath
  3. notice the 'put away' move cost is like 10x more than it should be for putting it into the backpack
  4. also notice that selecting 'Store in inventory' always uses at least 100 move cost, despite it only needing to take 30 to sheath the knife

Expected behavior

The move cost calculated correctly for both options. They should both be the same move cost to store the knife in the case that both options will put the knife into the same pocket.

Screenshots

image

Versions and configuration

Additional context

No response

l29ah commented 1 week ago

Probably related to https://github.com/CleverRaven/Cataclysm-DDA/issues/57679

CoroNaut commented 1 week ago

It does seem like a close duplicate. The only difference I see is that in my issue, the displayed move cost to put the knife into the backpack is just plain wrong, since it only takes like 30 moves. I'll close mine in favor of the old issue, which seems to be the consensus on duplicate issues.