mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
* Virology Rewrite/Virus3 - Part 2.5 of 3 : Rebase to Bleeding-Edge (#23391) * Virology Rewrite/Virus3 - Part 1 of 3 : pathogen spread, science goggles (#22036) * blud * cloud * clooooud * spread * scanner * I am the god of hellfire * oh god oh no * trimming fat * dsqdsqdqs * sdqdqsdqs * derp * pinky & the brain * gibs n meats * fix * FeetStab * working * overload * recipes * analyser sprites * analyser * fucktheflu * cures * scanner * scanner data * work * incubator * more incubator stuff * all of the centrifuge * some splicer stuff * more stuff * lab mouse and cage * way too much shit * rr * duh * travis u havin a stroke? * dangerousness * better spacing * some fixes * qdel * virus and immune system transfer * derp * pixels * fixing retardation * srccccccccc * geh * ahh * sterility scan * however * out of * conflicted dmi fixes * what's wrong with you git * aight travis now get your shit together. * ffff * hurr durr * setting up * oh shit nigga why have I not commit any of this yet * ugh * curb your pathogens * bleh * eh * runtime * sterilizine buff * fixes * sterile * fixes * gibbbb * gneh * eh * oh that too * fixing mouse refactor * lab mice packs * oh god oh fuck here we go * fucking pandemic circuitboard * chew * ERT * step on it travis * get on with it * fixing disease touch not really though * what's your problem byond * o minus * syntax error Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * spelling error Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * still that spelling error Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * boy am I bad at english Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * I mean just look at that Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * manual tweak and record * oxford comma or something Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * TRAsen Co-Authored-By: DamianX <DamianX@users.noreply.github.com> * wrong proc * weird process * chem chem chem * mouse balance * defines
108 lines
3.0 KiB
Plaintext
108 lines
3.0 KiB
Plaintext
/obj/machinery/disease2/isolator/
|
|
name = "Pathogenic Isolator"
|
|
density = 1
|
|
anchored = 1
|
|
icon = 'icons/obj/virology.dmi'
|
|
icon_state = "isolator"
|
|
var/datum/disease2/disease/isolated_disease = null
|
|
var/isolating = 0
|
|
var/beaker = null
|
|
|
|
/obj/machinery/disease2/isolator/attackby(var/W as obj, var/mob/user)
|
|
if(!istype(W,/obj/item/weapon/reagent_containers/syringe))
|
|
return
|
|
|
|
var/obj/item/weapon/reagent_containers/syringe/B = W
|
|
|
|
if(src.beaker)
|
|
to_chat(user, "A syringe is already loaded into the machine.")
|
|
return
|
|
|
|
if(user.drop_item(B, src))
|
|
src.beaker = B
|
|
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
|
to_chat(user, "You add the syringe to the machine!")
|
|
src.updateUsrDialog()
|
|
icon_state = "isolator_in"
|
|
|
|
/obj/machinery/disease2/isolator/Topic(href, href_list)
|
|
if(..())
|
|
return
|
|
|
|
usr.machine = src
|
|
if(!beaker)
|
|
return
|
|
var/datum/reagents/R = beaker:reagents
|
|
|
|
if (href_list["isolate"])
|
|
var/datum/reagent/blood/Blood
|
|
for(var/datum/reagent/blood/B in R.reagent_list)
|
|
if(B && B.data["virus2"])
|
|
Blood = B
|
|
break
|
|
// /vg/: Try to fix isolators
|
|
if(!Blood)
|
|
to_chat(usr, "<span class='warning'>ERROR: Unable to locate blood within the beaker. Bug?</span>")
|
|
// testing("Unable to locate blood in [beaker]!")
|
|
return
|
|
var/list/virus = virus_copylist(Blood.data["virus2"])
|
|
var/choice = text2num(href_list["isolate"])
|
|
for (var/ID in virus)
|
|
var/datum/disease2/disease/V = virus[ID]
|
|
if (V.uniqueID == choice)
|
|
isolated_disease = virus
|
|
isolating = 40
|
|
icon_state = "isolator_processing"
|
|
src.updateUsrDialog()
|
|
return
|
|
|
|
else if (href_list["main"])
|
|
attack_hand(usr)
|
|
return
|
|
else if (href_list["eject"])
|
|
beaker:forceMove(src.loc)
|
|
beaker = null
|
|
icon_state = "isolator"
|
|
src.updateUsrDialog()
|
|
return
|
|
|
|
/obj/machinery/disease2/isolator/attack_hand(mob/user as mob)
|
|
if(stat & BROKEN)
|
|
return
|
|
user.machine = src
|
|
var/dat = ""
|
|
if(!beaker)
|
|
|
|
dat = {"Please insert sample into the isolator.<BR>
|
|
<A href='?src=\ref[src];close=1'>Close</A>"}
|
|
else if(isolating)
|
|
dat = "Isolating"
|
|
else
|
|
var/datum/reagents/R = beaker:reagents
|
|
dat += "<A href='?src=\ref[src];eject=1'>Eject</A><BR><BR>"
|
|
if(!R.total_volume)
|
|
dat += "[beaker] is empty."
|
|
else
|
|
dat += "Contained reagents:<ul>"
|
|
for(var/datum/reagent/blood/G in R.reagent_list)
|
|
if(G.data["virus2"])
|
|
var/list/virus = G.data["virus2"]
|
|
for (var/ID in virus)
|
|
var/datum/disease2/disease/V = virus[ID]
|
|
dat += "<li>[G.name]: <A href='?src=\ref[src];isolate=[V.uniqueID]'>Isolate pathogen #[V.uniqueID]</a></li>"
|
|
else
|
|
dat += "<li><em>No pathogen</em></li>"
|
|
user << browse("<TITLE>Pathogenic Isolator</TITLE>Isolator menu:<BR><BR>[dat]</ul>", "window=isolator;size=575x400")
|
|
onclose(user, "isolator")
|
|
return
|
|
|
|
/obj/machinery/disease2/isolator/process()
|
|
if(isolating > 0)
|
|
isolating -= 1
|
|
if(isolating == 0)
|
|
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
|
|
d.contained_virus = isolated_disease.getcopy()
|
|
d.update_icon()
|
|
isolated_disease = null
|
|
icon_state = "isolator_in"
|