Fixes runtime with yellow slime extracts.

This commit is contained in:
Ravensdale
2014-05-12 01:15:45 -07:00
parent 29a8059f53
commit 8e15a76da1
2 changed files with 27 additions and 4 deletions

View File

@@ -195,3 +195,25 @@
src.force = on_damage src.force = on_damage
src.damtype = "fire" src.damtype = "fire"
processing_objects += src processing_objects += src
/obj/item/device/flashlight/slime
gender = PLURAL
name = "glowing slime extract"
desc = "A glowing ball of what appears to be amber."
icon = 'icons/obj/lighting.dmi'
icon_state = "floor1" //not a slime extract sprite but... something close enough!
item_state = "slime"
w_class = 1
m_amt = 0
g_amt = 0
brightness_on = 6
on = 1 //Bio-luminesence has one setting, on.
/obj/item/device/flashlight/slime/New()
SetLuminosity(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
icon_state = initial(icon_state)
/obj/item/device/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.

View File

@@ -1227,9 +1227,10 @@ datum
required_other = 1 required_other = 1
on_reaction(var/datum/reagents/holder) on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null)) for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
O.show_message(text("\red The slime begins to emit a soft light."), 1) O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1)
var/obj/item/slime_extract/yellow/Y = holder var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
Y.luminosity = 6 F.loc = get_turf(holder.my_atom)
//Purple //Purple
slimepsteroid slimepsteroid