new object-based lighting system

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2015-05-10 20:54:25 +01:00
parent 733c6a4fb5
commit 16d50c645d
90 changed files with 790 additions and 1004 deletions
+6 -6
View File
@@ -95,7 +95,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
icon = 'icons/effects/fire.dmi'
icon_state = "1"
l_color = "#ED9200"
light_color = "#ED9200"
layer = TURF_LAYER
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
@@ -114,13 +114,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(firelevel > 6)
icon_state = "3"
SetLuminosity(7)
set_light(7)
else if(firelevel > 2.5)
icon_state = "2"
SetLuminosity(5)
set_light(5)
else
icon_state = "1"
SetLuminosity(3)
set_light(3)
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
for(var/mob/living/L in loc)
@@ -165,7 +165,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
qdel(src)
set_dir(pick(cardinal))
SetLuminosity(3)
set_light(3)
firelevel = fl
air_master.active_hotspots.Add(src)
@@ -178,7 +178,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
/obj/fire/proc/RemoveFire()
if (istype(loc, /turf))
SetLuminosity(0)
set_light(0)
loc = null
air_master.active_hotspots.Remove(src)