CleverRaven/Cataclysm-DDA — pull request #9498 by BevapDin (2014-10-10 14:04:57+00:00)
Title: Specific requirements for vehicle actions [WIP] [CR]

Requirements (tools, qualities, components) for all vehicle interactions (install, repair, remove) are loaded from json and are vehicle part specific.

Currently only implmeneted for installations, therefor WIP, and to see how this works for other player.

Allows to fix #6090 by adding specific tools and such to the each vehicle part.

I had to change the UI to display the requirements: the window with the list of required items / tools is displayed over the vehicle display:
![screenschot-2014-10-10-13-35-32](https://cloud.githubusercontent.com/assets/5095435/4593492/5b42f38e-5086-11e4-847c-e2bc245882db.png)
![screenschot-2014-10-10-13-35-24](https://cloud.githubusercontent.com/assets/5095435/4593498/62cebe4e-5086-11e4-8f82-7e673f80e185.png)

In json, one can use the same syntax as with recipes, or refer to one of the default requirements:
- "welder" (some kind of welder, goggles, wrench)
- "duct_tape" (duct tape, wrench)
- "jack" (jack, wrench, only for part removal)
- "hacksaw" (hacksaw or similar, wrench, only for part removal)

Steel/iron based parts have been changed to use the "welder" requirement and wood based and similar parts use duct tape only.

As an example: the installation of the stereo system only requires a soldering iron (or toolset) and a SCREW_FINE quality.

One could also add a reference to books to make installing vehicle parts depend on knowledge of them (similar to crafting needs knowledge of the recipe).

----

It is not completely compatible with the existing system. I blame the recipe system:

Recipes have 3 types of requirement: qualities, tools and components. Each are completely separated from the others. There is no way to specify "(quality A and tool B) OR (quality C and tool D)". It's also not possible to require "(tool A and tool B) OR (tool C)" (e.g. welder and goggles or duct tape).

The system does not support things like "quality hacksaw or circular saw (10 charges)". Similar the requirement of the welding goggles when a welder is used is impossible. One can define a recipe as "(welder or primitive welder or integrated toolset) AND (welding goggles or goggles-bionic)", but adding duct tape here results in either:
- "(welder or primitive welder or integrated toolset) AND (welding goggles or goggles-bionic) AND (duct tape (100))" - with duct tape the other are not required, so this is wrong.
- "(welder or primitive welder or integrated toolset or duct tape (100)) AND (welding goggles or goggles-bionic)" - but with duct tape the welding goggles are not required.

The problem already exist to some extend with the crafting, but I'm not really aware of any specific recipe were this is a problem.