mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +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:
@@ -330,12 +330,25 @@
|
||||
desc = "A hand-held emergency light."
|
||||
icon_state = "flight0"
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/icon_on = "flight1"
|
||||
var/icon_off = "flight0"
|
||||
w_class = 2
|
||||
item_state = "flight"
|
||||
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light."
|
||||
icon_state = "plight0"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
item_state = ""
|
||||
icon_on = "plight1"
|
||||
icon_off = "plight0"
|
||||
brightness_on = 3
|
||||
|
||||
/obj/item/device/healthanalyzer
|
||||
name = "Health Analyzer"
|
||||
icon_state = "health"
|
||||
|
||||
@@ -286,6 +286,7 @@
|
||||
icon_state = "hardhat0"
|
||||
flags = FPRINT | TABLEPASS | SUITSPACE
|
||||
item_state = "hardhat0"
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
|
||||
|
||||
@@ -540,7 +541,7 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
permeability_coefficient = 0.25
|
||||
heat_transfer_coefficient = 0.75
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/weapon/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer)
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/weapon/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen)
|
||||
|
||||
/obj/item/clothing/suit/labcoat/cmo
|
||||
name = "chief medical officer's labcoat"
|
||||
|
||||
@@ -315,6 +315,7 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/under/rank/geneticist(src), slot_w_uniform)
|
||||
src.equip_if_possible(new /obj/item/clothing/shoes/white(src), slot_shoes)
|
||||
src.equip_if_possible(new /obj/item/clothing/suit/labcoat(src), slot_wear_suit)
|
||||
src.equip_if_possible(new /obj/item/device/flashlight/pen(src), slot_r_store)
|
||||
|
||||
if ("Chemist")
|
||||
src.equip_if_possible(new /obj/item/device/radio/headset/headset_med (src), slot_ears) // -- TLE
|
||||
@@ -392,6 +393,7 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/shoes/white(src), slot_shoes)
|
||||
src.equip_if_possible(new /obj/item/clothing/suit/labcoat(src), slot_wear_suit)
|
||||
src.equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(src), slot_l_hand)
|
||||
src.equip_if_possible(new /obj/item/device/flashlight/pen(src), slot_r_store)
|
||||
|
||||
if ("Captain")
|
||||
src.equip_if_possible(new /obj/item/device/radio/headset/headset_com (src), slot_ears) // -- TLE
|
||||
@@ -567,6 +569,7 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/suit/labcoat(src), slot_wear_suit)
|
||||
src.equip_if_possible(new /obj/item/weapon/pen(src), slot_l_hand)
|
||||
src.equip_if_possible(new /obj/item/weapon/clipboard(src), slot_r_hand)
|
||||
src.equip_if_possible(new /obj/item/device/flashlight/pen(src), slot_r_store)
|
||||
|
||||
if ("Chief Medical Officer")
|
||||
src.equip_if_possible(new /obj/item/device/radio/headset/headset_med (src), slot_ears) // -- TLE
|
||||
@@ -576,6 +579,7 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/under/rank/medical(src), slot_w_uniform)
|
||||
src.equip_if_possible(new /obj/item/clothing/suit/labcoat/cmo(src), slot_wear_suit)
|
||||
src.equip_if_possible(new /obj/item/weapon/storage/firstaid/regular(src), slot_l_hand)
|
||||
src.equip_if_possible(new /obj/item/device/flashlight/pen(src), slot_r_store)
|
||||
|
||||
if ("Virologist")
|
||||
src.equip_if_possible(new /obj/item/device/radio/headset/headset_med (src), slot_ears) // -- TLE
|
||||
@@ -584,6 +588,7 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/under/rank/medical(src), slot_w_uniform)
|
||||
src.equip_if_possible(new /obj/item/clothing/shoes/white(src), slot_shoes)
|
||||
src.equip_if_possible(new /obj/item/clothing/suit/labcoat(src), slot_wear_suit)
|
||||
src.equip_if_possible(new /obj/item/device/flashlight/pen(src), slot_r_store)
|
||||
|
||||
else
|
||||
src << "RUH ROH! Your job is [rank] and the game just can't handle it! Please report this bug to an administrator."
|
||||
|
||||
@@ -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