TPW STREETLIGHTS - Streetlights on A2/OA maps

Author: tpw
Requires: Community Base Addons A3
Compatibility: SP, MP client


IMPORTANT: With the release of All in Arma and CUP Terrains, all A2 and 3rd party maps now feature working streetlights! TPW STREETLIGHTS is now deprecated and disabled by default. 

Description
-----------
Those of you playing on A2/OA maps via AiA or @A3MP will have noticed by now that these maps are all pitch black at night because the none of the streetlamps work properly. I know there has been some work done to fix this by Atsche at the Community Update Project, but until these configs make it into AiA/A3MP you're stuck with either darkness or script based workarounds like the one I present to you here.

TPW STREETLIGHTS periodically scans for streetlamp objects within a defined radius of the player, and adds a simple A3 dynamic lightsource, attached at an appropriate position and with an appropriate brightnessd epending on the streetlamp class. Because of the large variance in map lighting configs, you can adjust the overall brightness of streetlights. You can specify an overall lighting colour (incandescent/sodium/fluorescent) and for that final touch of realism even have moths orbiting around the lights.

To a large extent the recent release of All in Arma Terrain Pack has largely invalidated the need for TPW STREETLIGHTS, by enabling A3 lights on A2 maps at a config level. TPW STREETLIGHTS will disable itself if it detects AiATP is running. 

Known bugs and shortcomings
---------------------------
	- Maps with lots of streetlights (eg Fallujah) will run into problems with so many dynamic lightsources (heavy CPU load, flickering etc)
	- Lights can cause weird lighting fx on some of the poles when viewed more than 100m away.
	- Lights cannot be shot out like real A3 bulbs
	- Not all lights will be lit. Many OA houses have lights for instance, but these are not lit by this script.