CleverRaven/Cataclysm-DDA — pull request #8146 by BevapDin (2014-07-05 12:19:23+00:00)
Title: Enhanced check for auto-wielding

This should finally fix #6989, assign an invlet to picked up and wielded items. Also prints a message about it.

How I reproduced it:
- start new character, take off, unwield and drop all items.
- grab a rock (should be wielded, should have an invlet)
- unwield the rock (should be in inventory)
- grab another rock (should be wielded, but without invlet)

Other parts of the pickup code that put the picked up item into the weapon slot already call `assign_empty_invlet(..., true)` to force an invlet on the item.

----

Fixes #6920

If a martial art style is selected, wield the item if it is suitable for that style (e.g. javelin for Silit).

If unarmed skill is at level 2 or more (and no martial art style is selected), wield the item if it is suitable for unarmed combat (having the UNARMED_WEAPON tag, like knuckles).

Else use the existing system: `item::is_weap() || item::is_gun()`.

And of course (that is not changed at all): always wield the item if the main inventory is full.

When the character has some unarmed combat skill (>=2) but uses a martial art style, they (I guess) usually should use something that fits the style, therefor it is checked first. Through I'm not sure how martial art styles and unarmed combat work together. Any opinions from the users of that stuff?