Files
CHOMPStation2/code/modules/virus2/curer.dm
GinjaNinja32 a1e5194c34 Virology rebalance
- Effects can now appear and be spliced in at higher stages than their set stages (e.g. Waiting Syndrome can now occur in any block)
- Gibbingtons changed to not instantly gib infected on activation, instead either dealing massive brute damage or making humanoids' limbs fall off; this avoids three copies of Waiting Syndrome then Gibbingtons going undetected until it instagibs the entire station one after the other.
- New effect: chemical synthesis. Picks one reagent from its list, and keeps infected at 5-7u of that reagent. Infecting others, splicing the gene, etc does not change the reagent, only generating an entirely new chemical synthesis effect does that.
- Admin panel for spawning viruses
- Virus dish examine() now doesn't print 15+ lines to output, instead printing one line and a link to open a window with the rest (and it calls ..() now)
- Lowercased most virology machinery's names
- Renamed/reordered antigens, there are now 16 antigens rather than 11, and they don't use the blood markers' names despite not being affected by blood type at all
- Generating random effects does not rely so much on the GC
2015-01-20 09:57:47 +00:00

109 lines
2.9 KiB
Plaintext

/obj/machinery/computer/curer
name = "cure research machine"
icon = 'icons/obj/computer.dmi'
icon_state = "dna"
circuit = /obj/item/weapon/circuitboard/curefab
var/curing
var/virusing
var/obj/item/weapon/reagent_containers/container = null
/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/reagent_containers))
var/mob/living/carbon/C = user
if(!container)
container = I
C.drop_item()
I.loc = src
return
if(istype(I,/obj/item/weapon/virusdish))
if(virusing)
user << "<b>The pathogen materializer is still recharging.."
return
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=list(),"antibodies"=0)
data["virus2"] |= I:virus2
product.reagents.add_reagent("blood",30,data)
virusing = 1
spawn(1200) virusing = 0
state("The [src.name] Buzzes", "blue")
return
..()
return
/obj/machinery/computer/curer/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/curer/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
if(curing)
dat = "Antibody production in progress"
else if(virusing)
dat = "Virus production in progress"
else if(container)
// see if there's any blood in the container
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in container.reagents.reagent_list
if(B)
dat = "Blood sample inserted."
var/code = ""
for(var/V in ANTIGENS) if(text2num(V) & B.data["antibodies"]) code += ANTIGENS[V]
dat += "<BR>Antibodies: [code]"
dat += "<BR><A href='?src=\ref[src];antibody=1'>Begin antibody production</a>"
else
dat += "<BR>Please check container contents."
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject container</a>"
else
dat = "Please insert a container."
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/curer/process()
..()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
if(curing)
curing -= 1
if(curing == 0)
if(container)
createcure(container)
return
/obj/machinery/computer/curer/Topic(href, href_list)
if(..())
return
usr.machine = src
if (href_list["antibody"])
curing = 10
else if(href_list["eject"])
container.loc = src.loc
container = null
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/curer/proc/createcure(var/obj/item/weapon/reagent_containers/container)
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
var/datum/reagent/blood/B = locate() in container.reagents.reagent_list
var/list/data = list()
data["antibodies"] = B.data["antibodies"]
product.reagents.add_reagent("antibodies",30,data)
state("\The [src.name] buzzes", "blue")