Sewing kit replication

Sewing kits can be picked up by using the amount system (like thread or batteries) and this splits the sewing kit into two different kits with one having the amount of thread that was selected.

This is for 0.9 by the way.

This first one is a sewing kit with 30 charges sitting on the ground.

This is selecting to only take 10 of said sewing kits…

This is what I picked up

and this is what is left on the ground. Another sewing kit with the 20 left over charges.

Another bug happens when the sewing kit has no charges in it.

Sewing kit with no charges, I picked it up selecting to only take 10.

The sewing kit in my inventory doesn’t look any different…

But there is another kit on the ground with 50 charges in it all of a sudden

This type of thing happens with every item that can be recharged. Welders, flashlights, spraycans, even the fiction novels. For weapons, if it already has ammo in it then the game just crashes and I can’t find any log in the debug or log txt files. I’m using the windows build.

I think when you pick up an item that can be recharged when it has nothing in it, you pick up the item and leaves the same item with the number of charges that it would have if it was naturally spawned in.

…Maybe they stack?

Nope, when you pick up the other one it gives you two. If they have the same number of stacks it does the “x2” thing, if they have a different number of stacks then they stay in your inventory as if they were always two different items.

This is a known bug and fixed in the experimental, see here https://github.com/CleverRaven/Cataclysm-DDA/issues/5518

Okay cool. I had checked the forum for duplication and sewing kits bugs, but not github. I’ll be sure to do that next time.