Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TRADER_AVOID flag is applied inconsistently #22743
Game version: 0.C-7052
Operating system: Windows XP SP3 x86
Tiles or curses: tiles
Mods active: default only
Sometimes items with
Steps to reproduce the behavior
Wish for some items with the flag (tinfoil hat and heavy crossbow, or active emp grenade and lit Louisville Slaughterer, for example) and try to trade them with some NPC.
TRADER_AVOID is supposed to prevent that item from appearing in the generated inventory of any NPC. It does not mean the NPC can't/won't/shouldn't take that item. From the documentation in "doc/JSON_FLAGS.md": "NPCs will not start with this item."
It's implied by the
NPCs flat out don't want to buy anything that has a price below 80 (in cent, I believe), except when they are your friend. I just tested this: the tinfoil hat does not appear when trading with a neutral NCP, but appears (with price 0.21) when the NPC is a friend.
The flag works as intended, but it might have a slightly misleading name. But the documentation clearly states what it does.