TheDarklingWolf/Cataclysm-DDA — pull request #927 by i2amroy (2013-05-10 05:42:48+00:00)
Title: Fine detail Darkness modifier

This replaces the simple Y/N darkness check for sewing and reading with a new modifier. This allows those characters utilizing night vision mutations or light amp goggles to read or sew in darkness at significant speed penalties. With this normal night vision still cannot read or sew in dark or dim areas, high night vision can in dim areas but not in dark, and full night vision can in any light level. Penalties range from a 1.5-2.5x increase in read/sew action times. Implanted night vision or light amp goggles can read in any light, but suffer from a flat 1.5x penalty. Glow sticks also have a slight nerf present, functioning the same in dim light but causing a 1.5x penalty in absolute darkness (which can be removed by any form of night vision).

This opens up the potential for future use of future dim light sources or vision amplification to allow for fine detail tasks in the dark.

This fix also stops characters from sewing or reading while blind, and updates the sewing function into allman style since I was having difficulties reading it (the only changes to that function by me are in the first 4 lines and lines 941 and 972)