CleverRaven / Cataclysm-DDA

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

Items don't merge in AIM, different miners, different `"item_vars":{"activity_var"` #74288

Open Brambor opened 3 weeks ago

Brambor commented 3 weeks ago

Describe the bug

Moving items they display this way, not merging:

image

Opening the save file I found this for coal:

{"typeid":"coal_lump","charges":2891,"bday":7041581,"item_vars":{"activity_var":"Ching Harman, logger"},"owner":"your_followers","last_temp_check":0},
{"typeid":"coal_lump","charges":4927,"bday":6640969,"owner":"your_followers","last_temp_check":0},
{"typeid":"coal_lump","charges":3774,"bday":6891985,"item_vars":{"activity_var":"Jamie Kline"},"owner":"your_followers","last_temp_check":0},

I think it happened because each coal was probably mined by different NPCs in my faction.

Attach save file

Winter Beach-trimmed.tar.gz

Steps to reproduce

  1. Load attached save.
  2. / Open AIM.
  3. Observe: unmerged items.

Otherwise, probably:

  1. Designate a zone for mining.
  2. Let multiple characters mine there (order NPC to mine, mine yourself) until both of you mine coal or probably anything that should show as a single entry.
  3. Move the mined items to a single tile.
  4. Observe: items didn't merge.

Expected behavior

I expect the items to merge. I don't know why it needs the activity at all. I assume it is a bug.

Screenshots

No response

Versions and configuration

Additional context

Workaround:

  1. Delete "item_vars":{"activity_var":"Jamie Kline"}, from one of the coals in the save file.
  2. Load the game.
  3. Move the items back and forth.
  4. They correctly merge.
Brambor commented 3 weeks ago

I searched for "item_vars":{"activity_var":"Ching Harman, **logger"} in that save, it matched 324 items.

Here (disassembly) it seems to be to reserve items during disassembly: https://github.com/CleverRaven/Cataclysm-DDA/blob/26960ee03550dded3ba0123562fb92f8df5228f7/src/activity_actor.cpp#L5165-L5166

Many of the matches are for the logs and sticks I ordered NPCs to chop, which is set here: https://github.com/CleverRaven/Cataclysm-DDA/blob/26960ee03550dded3ba0123562fb92f8df5228f7/src/activity_actor.cpp#L6334-L6348

I already want to do too much. I wish somebody would look at it and say what this is for and if it is safe to delete.

Brambor commented 3 weeks ago

While AIM window does not merge the items, the V List items menu does merge them. List items: image

AIM: image

But! V List items menu also doesn't show ! stealing, which might be related.