CleverRaven/Cataclysm-DDA — pull request #10575 by Coolthulhu (2014-12-21 23:27:42+00:00)
Title: Manual turret aiming

A new option for turreted vehicles: aim a turret.
Forces a target for the turret rather than letting it pick one automatically.

Modifies and uses game::target, but in a way that doesn't affect existing uses. Makes game::target public.

Target is referred to by location. Uses the "std::pair target" originally declared for jumper cables. Second point of the pair is original location of the turret - if it changes, the vehicles "sights" have moved and so will the target (not sure if it's possible for a vehicle to move between player's turn and turret handling).

Currently no support for burst fire/single fire selection - if the turret is configured for single fire, manual aiming will fire once. If not (off or burst) it will fire a burst. If it was off before manual aim, will turn it off after firing.

Will force turret_mode on if it wasn't.

Doesn't respect player's safety or warn about possible friendly fire.

Doesn't respect the hardcoded distance limit of 12 (or 5 in case of gasoline fuel) that automatic target acquirement has.

Checks for tag: "MANUAL". Turrets with this tag will not acquire targets by themselves and can't be configured.