Npcs delete range weapons when given to them

So I made a pneumatic rifle for an npc and gave it to them via the trading menu. The rifle disappeared form the npc’s inventory, mine and it was not wielding it. I gave them ammo to see if they would equip it and nothing. I spawned a zombie to see if they would use the gun to fight but nothing. Gave them a gun with ammo loaded and still disappeared. Use other types of ranged weapons and same effect.

Version aa3d161.

Sup Noct. have you tried this with other NPCs?
Also if you can open the Debug menu and see what happens after you trade it that’d be helpful.

Used debug menu to spawn npcs, strip them then give them ruck sacks. Used grant item by debug, convo and trade to give them item and ammo and still the same issue.

Edit: It now apparently works…it either wields it, drops it or puts it in inventory.

It seems that NPC really hate pneumatic rifle ammo anyway, because of high volume and maybe junk value too…

Turn on debug mode before giving the item to see how does the NPC value it.

I did, it seems they favor items with higher damage mostly, between a crossbow and repeating crossbow they take the normal crossbow (they are holding bolts in inventory).

I’ve had problems in the past with giving NPCs firearms and then the weapons being missing when I come back to find them dead. They drop all of their gear, but not the weapons that I gave them.