//NOTE: //This file contains the worst code ive ever written. //I dont fucking care. It looks pretty awesome. ////////////////////////////////////////////////////////// /obj/dummy/liquid name = "water" icon = 'icons/effects/effects.dmi' icon_state = "nothing" invisibility = 101 var/canmove = 1 density = 0 anchored = 1 // /obj/item/reagent_containers/glass/vial name = "glass test tube" icon = 'icons/obj/chemical.dmi' desc = "an incredibly fragile glass test tube" icon_state = "vial0" item_state = "vial" throwforce = 3.0 throw_speed = 1 throw_range = 8 force = 3.0 w_class = 1.0 amount_per_transfer_from_this = 5 flags = FPRINT | TABLEPASS | OPENCONTAINER var/contained = null New() var/datum/reagents/R = new/datum/reagents(30) reagents = R R.my_atom = src /obj/item/reagent_containers/glass/vial/green name = "glass test tube" icon = 'icons/obj/chemical.dmi' desc = "a glass vial filled with a strange green liquid" icon_state = "vialgreen" item_state = "vialgreen" contained = /datum/ailment/disease/gbs /obj/item/reagent_containers/glass/blue name = "glass test tube" icon = 'icons/obj/chemical.dmi' desc = "a glass vial filled with a shimmering blue liquid" icon_state = "vialblue" item_state = "vialblue" //This isn't a disease! I should make it one // contained = new ////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////*** /obj/item/reagent_containers/glass/vial/throw_impact(atom/hit_atom) ..(hit_atom) src.shatter() ////////////////////////////////////////////////////////////////Generic Vial Shatter /obj/item/reagent_containers/glass/vial/proc/shatter() var/A = src var/atom/sourceloc = get_turf(src.loc) src = null qdel(A) var/obj/overlay/O = new /obj/overlay( sourceloc ) var/obj/overlay/O2 = new /obj/overlay( sourceloc ) O.name = "green liquid" O.set_density(0) O.anchored = 1 O.icon = 'icons/effects/effects.dmi' O.icon_state = "greenshatter" O2.name = "broken bits of glass" O2.set_density(0) O2.anchored = 1 O2.icon = 'icons/obj/objects.dmi' O2.icon_state = "shards" if(istype(src.contained,/datum/ailment/)) for(var/mob/living/carbon/H in view(5, sourceloc)) H.contract_disease(src.contained,null,null,0) var/i for(i=0, i<5, i++) for(var/mob/living/carbon/H in view(5, sourceloc)) H.contract_disease(src.contained,null,null,0) sleep(20) flick("greenshatter2",O) O.icon_state = "nothing" sleep(5) qdel(O) return //Generic Vial Drink /obj/item/reagent_containers/glass/vial/proc/drink(user) var/A = src src = null qdel(A) if(istype(src.contained,/datum/ailment/)) var/mob/living/M = user switch(pick(1,2)) if(1) M.weakened += 5 M.contract_disease(src.contained,null,null,1) if(2) SPAWN_DBG(20 SECONDS) M.contract_disease(src.contained,null,null,1) return /obj/item/reagent_containers/glass/vial/blue/drink(user) var/A = src var/atom/sourceloc = get_turf(src.loc) src = null qdel(A) var/obj/overlay/O = new /obj/overlay( sourceloc ) var/obj/overlay/O2 = new /obj/overlay( sourceloc ) O.name = "green liquid" O.set_density(0) O.anchored = 1 O.icon = 'icons/effects/effects.dmi' O.icon_state = "blueshatter" O2.name = "broken bits of glass" O2.set_density(0) O2.anchored = 1 O2.icon = 'icons/obj/objects.dmi' O2.icon_state = "shards" liquify(user) sleep(20) flick("blueshatter2",O) O.icon_state = "nothing" sleep(5) qdel(O) /obj/item/reagent_containers/glass/vial/blue/shatter() var/A = src var/atom/sourceloc = get_turf(src.loc) src = null qdel(A) var/obj/overlay/O = new /obj/overlay( sourceloc ) var/obj/overlay/O2 = new /obj/overlay( sourceloc ) O.name = "green liquid" O.set_density(0) O.anchored = 1 O.icon = 'icons/effects/effects.dmi' O.icon_state = "blueshatter" O2.name = "broken bits of glass" O2.set_density(0) O2.anchored = 1 O2.icon = 'icons/obj/objects.dmi' O2.icon_state = "shards" for(var/mob/living/carbon/human/H in view(1, sourceloc)) liquify(H) sleep(20) flick("blueshatter2",O) O.icon_state = "nothing" sleep(5) qdel(O) /mob/proc/drop_vial() var/obj/item/reagent_containers/glass/vial/W = src.equipped() if (W) u_equip(W) if (W) W.set_loc(src.loc) // W.dropped(src) Get rid of this as it would smash a vial if (W) W.layer = initial(W.layer) var/turf/T = get_turf(src.loc) T.Entered(W) return /proc/liquify(var/mob/H, time = 150) if(H.stat) return SPAWN_DBG(0) var/mobloc = get_turf(H.loc) var/obj/dummy/liquid/holder = new /obj/dummy/liquid( mobloc ) var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc ) animation.name = "water" animation.set_density(0) animation.anchored = 1 animation.icon = 'icons/mob/mob.dmi' animation.icon_state = "liquify" animation.layer = MOB_EFFECT_LAYER animation.master = holder flick("liquify",animation) H.canmove = 0 sleep(4) H.set_loc(holder) H.canmove = 1 SPAWN_DBG(0) var/i for(i=0, i<10, i++) SPAWN_DBG(0) var/obj/effects/water/water1 = new /obj/effects/water( mobloc ) var/direction = pick(alldirs) water1.name = "water" water1.set_density(0) water1.icon = 'icons/effects/water.dmi' water1.icon_state = "extinguish" for(i=0, i= 7) boutput(user, "The test tube rack is full") return if(istype(W, /obj/item/reagent_containers/glass/vial)) boutput(user, "You insert the test tube into the test tube rack") user.drop_vial() W.set_loc(src) return ..() return attack_hand(mob/user as mob) if(src.contents.len > 0) boutput(user, "You slide a random test tube carefully out of the rack") var/obj/item/reagent_containers/glass/vial/V = pick(src.contents) src.contents -= V V.set_loc(src.loc) else boutput(user, "There are no test tubes in the rack") return */