mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Added a penlight. also slightly changed the way flashlights work, so we can easily add more kinds of flashlights. Now they have a brightness_on var, which determines their luminosity when on, an icon_on and icon_off var which determine their sprites when on and off. Jobs that spawn with a pen-light: medical doctor, CMO, geneticist, virologist. note that a pen-light is a pen-sized light, not a pen, that's also a light.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@892 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
#define FLASHLIGHT_LUM 4
|
||||
//#define FLASHLIGHT_LUM 4
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
icon_state = "flight[on]"
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
else
|
||||
icon_state = icon_off
|
||||
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity + FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
user.sd_SetLuminosity(user.luminosity - FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob)
|
||||
@@ -52,14 +55,14 @@
|
||||
/obj/item/device/flashlight/pickup(mob/user)
|
||||
if(on)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
|
||||
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity - FLASHLIGHT_LUM)
|
||||
src.sd_SetLuminosity(FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/attack_self(mob/user)
|
||||
on = !on
|
||||
@@ -67,18 +70,18 @@
|
||||
item_state = "hardhat[on]"
|
||||
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity + FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
user.sd_SetLuminosity(user.luminosity - FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/pickup(mob/user)
|
||||
if(on)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.sd_SetLuminosity(user.luminosity + FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity + brightness_on)
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/dropped(mob/user)
|
||||
if(on)
|
||||
user.sd_SetLuminosity(user.luminosity - FLASHLIGHT_LUM)
|
||||
src.sd_SetLuminosity(FLASHLIGHT_LUM)
|
||||
user.sd_SetLuminosity(user.luminosity - brightness_on)
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
Reference in New Issue
Block a user