CleverRaven/Cataclysm-DDA — pull request #10348 by Coolthulhu (2014-12-06 04:57:38+00:00)
Title: Item action menu with few commonly used items (WIP)

I implemented some of #10240

I need some help in properly managing strings and bindings. Namely a "proper" way of translating function strings like "PICKLOCK" or "HAMMER" into proper names like "Pick a lock" or "Pry nails" and a way to add bindings to those actions, preferably without having to change 5 files each time a new item function is added and expected to be included in the menu.

Current version creates a menu populated with "ACTIONNAME [item that will get used (charges if >0)]" with predefined hotkeys (ascii table, starting at '0').
Items with uses are searched for naively, but the speed impact is not noticeable. It will probably require proper set intersections if it is to ever use crafting_inventory, though.
If two items perform the same function, the one that uses less charges is used.

List of functions that will be checked is hardcoded. Using the entire list in item_factory would be an obvious overkill, misleading in some cases - MP3 and MP3_ON and a giant clusterfuck without some clever sorting.

Item use menu doesn't change any existing behavior, it exists as a separate menu with a separate binding (not bound by default).