CleverRaven/Cataclysm-DDA — pull request #8324 by BevapDin (2014-07-24 17:32:21+00:00)
Title: Fix availability check when a component is also used as tool

Fixes #7582 aka the "pebble crafting with one rock only" bug.

Also fixes the "boil something in a non-empty tin can" bug: http://smf.cataclysmdda.com/index.php?topic=6466

Also fixes #6755:

> 1. Then using tool qualities, the recipe doesn't differentiate between tool and component used. For example you can smash the stone into pebbles using the stone itself.
> 2. Tool qualities can't be used for construction recipes.
> 3. I think, "level" and "amount" fields of tool quality for recipe definition are mixed up.

Number 1 is fixed hereby, number 2 is already fixed by the common consumption PR, number 3 was fixed quite some time ago.

----

Added the DIG quality ("digging") to those items:
Shovel and entrenching tool (e_tool) - level 3
Primitive shovel - level 2
Digging stick - level 1
I replaced them in the construction recipes where possible.

Added the AXE quality ("tree cutting") to those items:
Axe - level 3
fire axe - level 2 (is probably not designed for tree-cutting?), still suitable for cutting trees.
combat chain saw - level 2
chain saw - level 2
battle axe - level 1
primitive axe - level 2
I replaced them in the construction recipes. "Chop Tree trunk into planks" can now be done with the combat chain saw.

Increased the SAW_W (wood sawing) quality level of the wood saw to 2, so it can be used to "Chop Tree trunk into planks", but the other items with SAW_W quality (they have level 1) can not be used. The construction only allowed the wood saw or the items with the "AXE" quality, keeping the quality requirement at level 1, would allow the player to use all the other SAW_W tools, I don't know if this would be correct.

Most (or all?) constructions should be reviewed for further usage of tool qualities. Some allow only a small amount of alternative tools (hammer or toolset), other allow many different tools ("hammer", "primitive_hammer", "hatchet", "nailgun", "toolbox", "toolset")/("hammer", "primitive_hammer", "shovel", "e_tool", "primitive_shovel", "toolbox", "toolset").