Lighting overhaul.

This commit overhauls the lighting system to Bay12 standards. It is better
in pretty much every way.
This commit is contained in:
Tigercat2000
2015-05-10 12:03:27 -07:00
parent 73838ac55d
commit e1249fc640
141 changed files with 1195 additions and 1449 deletions
+5 -27
View File
@@ -316,7 +316,7 @@
user.drop_item()
user << "<span class='notice'>You click [S] into place on [src].</span>"
if(S.on)
SetLuminosity(0)
set_light(0)
F = S
A.loc = src
update_icon()
@@ -359,32 +359,10 @@
/obj/item/weapon/gun/proc/update_gunlight(var/mob/user = null)
if(F)
if(F.on)
if(loc == user)
user.AddLuminosity(F.brightness_on)
else if(isturf(loc))
SetLuminosity(F.brightness_on)
set_light(F.brightness_on)
else
if(loc == user)
user.AddLuminosity(-F.brightness_on)
else if(isturf(loc))
SetLuminosity(0)
set_light(0)
update_icon()
else
if(loc == user)
user.AddLuminosity(-5)
else if(isturf(loc))
SetLuminosity(0)
return
/obj/item/weapon/gun/pickup(mob/user)
if(F)
if(F.on)
user.AddLuminosity(F.brightness_on)
SetLuminosity(0)
/obj/item/weapon/gun/dropped(mob/user)
if(F)
if(F.on)
user.AddLuminosity(-F.brightness_on)
SetLuminosity(F.brightness_on)
set_light(0)
return