mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user