TG: RIG helmets can now be used as flashlights, just like hardhats. Credit to Sly

for the sprites.
Revision: r3638
Author: 	 ericgfw...@hotmail.com
This commit is contained in:
Erthilo
2012-05-23 17:47:25 +01:00
parent 361e479ed5
commit 075e8730bc
4 changed files with 41 additions and 6 deletions
+26
View File
@@ -164,6 +164,32 @@
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
//RIG helmet light
/obj/item/clothing/head/helmet/space/rig/attack_self(mob/user)
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
return
on = !on
icon_state = "rig[on]-[color]"
item_state = "rig[on]-[color]"
if(on)
user.total_luminosity += brightness_on
else
user.total_luminosity -= brightness_on
/obj/item/clothing/head/helmet/space/rig/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(0)
/obj/item/clothing/head/helmet/space/rig/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
/obj/item/device/flashlight/lamp/verb/toggle_light()
set name = "Toggle light"
set category = "Object"