CleverRaven/Cataclysm-DDA — pull request #6981 by BevapDin (2014-03-29 11:15:42+00:00)
Title: Furinture as crafting tools [CR]

Currently furniture has nearly no usage at all. The new cvd control panel is a good step forward (it's a terrain, but that's nearly the same).

This PR goes another step. Furniture can provide a pseudo item, used when crafting (like the cvd control panel does). A furniture t_anvil for example might provide the item "anvil". That means one does not need an anvil item nearby, just the furniture.

This is exposed through json : The furniture property "crafting_pseudo_item" in the json data specifies which item the furniture provides:
```
{
"type" : "furniture",
"id" : "f_anvil",
"name": "anvil",
"symbol": "^",
"color": "ltred",
"move_cost_mod": -1,
"required_str": -1,
"crafting_pseudo_item": "anvil",
"flags": ["TRANSPARENT"]
}
```

The code in `inventory::form_from_map` automatically adds an anvil (pseudo) item to the crafting inventory. This allows additions of things like the cvd machine without any code changes, only adding stuff to json.

If the item that the furniture represents is a tool and uses ammo, one can also set reload_furniture as examine action. That function allows the player to put items of that specific ammo type of the tool "into" the furniture.

This is best used with furniture that has the SEALED flag, because otherwise the items in it will be available to crafting directly.

The items in it will automatically be used as charges (if the requested type matches the tool type) for the pseudo item:
```
{
"type" : "furniture",
"id" : "f_forge",
"name": "forge",
"symbol": "^",
"color": "ltred",
"move_cost_mod": -1,
"required_str": -1,
"crafting_pseudo_item": "char_forge",
"flags": ["SEALED", "CONTAINER", "NOITEM"],
"examine_action": "reload_furniture"
}
```

Testing: Grab some charcoal and examine the forge. It will ask how many charcoal to put into it. After you put some into it you can craft as usual and the charcoal in the forge will be used as charges of a charcoal forge. It wont be used as normal charcoal (as component).