5 Commits

Author SHA1 Message Date
dumb-kevin 7d157166ce Refresh inventory cache when stowing items into containers
- Pass carrier to put_in/fill_with in Character::store item overload
- Add wield_test regression for unwield-to-pocket cache refresh
2026-05-15 09:31:42 +04:00
dumb-kevin 253adde140 Teach npc::wield() to extract items from wielded containers
- npc::wield(item&): when target is inside the wielded container,
  copy the item out, remove from container, stow container, then wield
- Pre-check can_wield before extraction; fallback to stash/drop on failure
- Use item_retrieve_cost for skill-scaled draw speed (matches wield_contents)
- evaluate_best_weapon: change SKIP to NEXT on wielded weapon node so
  visitor enters container contents and finds better weapons inside
- Update test to verify extraction, wielding, and container stow
2026-03-10 10:51:16 +04:00
Andrew Krieger 0215b26cce Rewrite all tests to clear map without touching character map memory, for performance. 2026-02-08 23:05:55 -08:00
salartarium 88a2c7aac9 Merge pull request #84102 from salartarium/typo1
A vs An NPC
2025-12-22 09:11:30 +01:00
marilynias 3f010d8a39 add some wield tests i wish I had (#80448)
* add wield tests

* rename

* mroe tests, iwyu

* iwyu 2

* rm debug comments

* formatting

* allow npc to dispose_item in tests

* fix test, add charges test

* adjust info msg
2025-04-05 22:34:34 -05:00