TheDarklingWolf/Cataclysm-DDA — pull request #787 by kevingranade (2013-05-02 00:25:40+00:00)
Title: Text snippet class

Obviously not functional, it needs snippets and items to attach them to and adjustments to examine functions to call it, but I'd like some feedback on the approach.

When an item is created with an "extended description" flag, it must have a category, and it passes that category to the snippets class to select a random match, the hash of the string is assigned to that instance of the item (in the mode member). When examined, the same flag triggers a lookup of the snippet based on the hash in the item.