CleverRaven/Cataclysm-DDA — pull request #3013 by atomicdryad (2013-09-13 21:22:42+00:00)
Title: Light consistency: held item lighting matches map item lighting, as per item functions & itype tags instead of ginormous if(hehe){lol;}else if(hehehe){lol;}{else if(jackie_chan){wtf;} thingy.

* player::active_light: simplified into only 1 inventory loop (which applies the same as before),
held item, and telglow/bio_light. All but the latter two calc luminance from LIGHT_ / CHARGEDIM + charge
as per item::getlight_emit(true)

* map: apply item lighting the same way, via:

* bool item::getlight(float & luminance, int & width, int & direction, bool calculate_dimming )
use values from item.light, if item.light_luminance > 0, else use values from itype via:

* int getlight_emit(bool calculate_dimming = true);
apply circular light as per tag LIGHT_*. Dim this in a linear fashion if charge < 20%, if tag CHARGEDIM is p
resent.

* data/raw/items/tools.json: flashlight bumped to LIGHT_100 (same as before when held, same dropoff),
others adjusted to match old held values

** item.light struct is a manual override of itag lighting, for functions to apply
light sources/arcs with specific angle and direction (ie, spotlights). Since player has no
direction it's not applicable atm, but a mechanic to point the flashlight while in 'x' look_around might be
good.