Adds Glowsticks

This commit is contained in:
redstryker
2016-05-08 18:22:15 -04:00
parent d476cac4f0
commit 8b5ed3d7ff
5 changed files with 75 additions and 3 deletions

View File

@@ -929,8 +929,10 @@
icon_deny = "tool-deny"
//req_access = list(access_maint_tunnels) //Maintenance access
products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/weapon/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/wirecutters = 5,
/obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5)
contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2)
/obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5,
/obj/item/device/flashlight/glowstick = 3, /obj/item/device/flashlight/glowstick/red = 3, /obj/item/device/flashlight/glowstick/blue = 3,
/obj/item/device/flashlight/glowstick/orange =3, /obj/item/device/flashlight/glowstick/yellow = 3)
contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2, )
premium = list(/obj/item/clothing/gloves/yellow = 1)
/obj/machinery/vending/engivend

View File

@@ -199,7 +199,7 @@
src.force = on_damage
src.damtype = "fire"
processing_objects += src
/obj/item/device/flashlight/flare/proc/ignite() //Used for flare launchers.
on = !on
update_icon()
@@ -208,6 +208,76 @@
processing_objects += src
return 1
//Glowsticks
/obj/item/device/flashlight/glowstick
name = "green glowstick"
desc = "A green military-grade glowstick."
w_class = 2.0
brightness_on = 4
light_power = 2
light_color = "#49F37C"
icon_state = "glowstick"
item_state = "glowstick"
var/fuel = 0
/obj/item/device/flashlight/glowstick/New()
fuel = rand(1600, 2000)
..()
/obj/item/device/flashlight/glowstick/process()
fuel = max(fuel - 1, 0)
if(!fuel || !on)
turn_off()
if(!fuel)
src.icon_state = "[initial(icon_state)]-empty"
processing_objects -= src
/obj/item/device/flashlight/glowstick/proc/turn_off()
on = 0
update_icon()
/obj/item/device/flashlight/glowstick/attack_self(mob/user)
if(!fuel)
user << "<span class='notice'>The glowstick has already been turned on.</span>"
return
if(on)
return
. = ..()
if(.)
user.visible_message("<span class='notice'>[user] cracks and shakes the glowstick.</span>", "<span class='notice'>You crack and shake the glowstick, turning it on!</span>")
processing_objects += src
/obj/item/device/flashlight/glowstick/red
name = "red glowstick"
desc = "A red military-grade glowstick."
light_color = "#FC0F29"
icon_state = "glowstick_red"
item_state = "glowstick_red"
/obj/item/device/flashlight/glowstick/blue
name = "blue glowstick"
desc = "A blue military-grade glowstick."
light_color = "#599DFF"
icon_state = "glowstick_blue"
item_state = "glowstick_blue"
/obj/item/device/flashlight/glowstick/orange
name = "orange glowstick"
desc = "A orange military-grade glowstick."
light_color = "#FA7C0B"
icon_state = "glowstick_orange"
item_state = "glowstick_orange"
/obj/item/device/flashlight/glowstick/yellow
name = "yellow glowstick"
desc = "A yellow military-grade glowstick."
light_color = "#FEF923"
icon_state = "glowstick_yellow"
item_state = "glowstick_yellow"
/obj/item/device/flashlight/slime
gender = PLURAL
name = "glowing slime extract"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 36 KiB