mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
- Added virology profession with a cosy lab in northwestern part of medbay.
- Virology related things, like taking blood samples, making vaccines, splashing contagious blood all over the station and so on. - Added one pathetic disease. - Virus crates are now available from the quartermasters for 20 points. - The DNA console bug (issue #40) was fixed, but I still made the DNA pod to lock itself while mutating someone. - Added icons for unpowered CheMaster and Pandemic computers - Added some sign decals. The icons were already there, but unused for reasons unknown. - Some map-related changes. - Removed all that MSOffice shit from changelog.html git-svn-id: http://tgstation13.googlecode.com/svn/trunk@312 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -57,10 +57,11 @@ datum
|
||||
|
||||
return the_id
|
||||
|
||||
trans_to(var/obj/target, var/amount=1, var/multiplier=1)
|
||||
trans_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
var/total_transfered = 0
|
||||
var/current_list_element = 1
|
||||
var/datum/reagents/R = target.reagents
|
||||
var/trans_data = null
|
||||
//if(R.total_volume + amount > R.maximum_volume) return 0
|
||||
|
||||
current_list_element = rand(1,reagent_list.len) //Eh, bandaid fix.
|
||||
@@ -72,8 +73,9 @@ datum
|
||||
|
||||
if(current_list_element > reagent_list.len) current_list_element = 1
|
||||
var/datum/reagent/current_reagent = reagent_list[current_list_element]
|
||||
|
||||
R.add_reagent(current_reagent.id, (1 * multiplier) )
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
R.add_reagent(current_reagent.id, (1 * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, 1)
|
||||
|
||||
current_list_element++
|
||||
@@ -175,7 +177,7 @@ datum
|
||||
if(isobj(A)) spawn(0) R.reaction_obj(A, R.volume+volume_modifier)
|
||||
return
|
||||
|
||||
add_reagent(var/reagent, var/amount)
|
||||
add_reagent(var/reagent, var/amount, var/data=null)
|
||||
if(!isnum(amount)) return 1
|
||||
update_total()
|
||||
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
|
||||
@@ -194,6 +196,12 @@ datum
|
||||
reagent_list += R
|
||||
R.holder = src
|
||||
R.volume = amount
|
||||
R.data = data
|
||||
//debug
|
||||
//world << "Adding data"
|
||||
//for(var/D in R.data)
|
||||
// world << "Container data: [D] = [R.data[D]]"
|
||||
//debug
|
||||
update_total()
|
||||
my_atom.on_reagent_change()
|
||||
return 0
|
||||
|
||||
@@ -228,4 +228,178 @@
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A>"
|
||||
user << browse("<TITLE>Chemmaster 3000</TITLE>Chemmaster menu:<BR><BR>[dat]", "window=chem_master;size=575x400")
|
||||
onclose(user, "chem_master")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/pandemic/
|
||||
name = "PanD.E.M.I.C 2200"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'chemical.dmi'
|
||||
icon_state = "mixer0"
|
||||
var/temphtml = ""
|
||||
var/wait = null
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(50))
|
||||
del(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
power_change()
|
||||
if(powered())
|
||||
icon_state = (src.beaker?"mixer1":"mixer0")
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = (src.beaker?"mixer1_nopower":"mixer0_nopower")
|
||||
stat |= NOPOWER
|
||||
|
||||
|
||||
attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob)
|
||||
if(!istype(B, /obj/item/weapon/reagent_containers/glass))
|
||||
return
|
||||
|
||||
if(src.beaker)
|
||||
user << "A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
user << "You add the beaker to the machine!"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "mixer1"
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
if(!beaker) return
|
||||
|
||||
if (href_list["create_vaccine"])
|
||||
if(!src.wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
var/vaccine_type = href_list["create_vaccine"]
|
||||
var/datum/disease/D = new vaccine_type
|
||||
var/name = input(usr,"Name:","Name the vaccine",D.name)
|
||||
if(!name || name == " ") name = D.name
|
||||
B.name = "[name] vaccine bottle"
|
||||
B.reagents.add_reagent("vaccine",10,vaccine_type)
|
||||
del(D)
|
||||
wait = 1
|
||||
spawn(1200)
|
||||
src.wait = null
|
||||
else
|
||||
src.temphtml = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["create_virus_culture"])
|
||||
if(!wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
B.icon_state = "bottle3"
|
||||
var/type = href_list["create_virus_culture"]
|
||||
var/datum/disease/D = new type
|
||||
var/list/data = list("virus"=D)
|
||||
var/name = input(usr,"Name:","Name the culture",D.name)
|
||||
if(!name || name == " ") name = D.name
|
||||
B.name = "[name] culture bottle"
|
||||
B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium."
|
||||
B.reagents.add_reagent("blood",20,data)
|
||||
src.updateUsrDialog()
|
||||
wait = 1
|
||||
spawn(3000)
|
||||
src.wait = null
|
||||
else
|
||||
src.temphtml = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker = null
|
||||
icon_state = "mixer0"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if(href_list["clear"])
|
||||
src.temphtml = ""
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else
|
||||
usr << browse(null, "window=pandemic")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(src.temphtml)
|
||||
dat = "[src.temphtml]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
|
||||
else if(!beaker)
|
||||
dat += "Please insert beaker.<BR>"
|
||||
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
|
||||
else
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/datum/reagent/blood/Blood = null
|
||||
for(var/datum/reagent/blood/B in R.reagent_list)
|
||||
if(B)
|
||||
Blood = B
|
||||
break
|
||||
if(!R.total_volume||!R.reagent_list.len)
|
||||
dat += "The beaker is empty<BR>"
|
||||
else if(!Blood)
|
||||
dat += "No blood sample found in beaker"
|
||||
else
|
||||
dat += "<h3>Blood sample data:</h3>"
|
||||
dat += "<b>Blood DNA:</b> [(Blood.data["blood_DNA"]||"none")]<BR>"
|
||||
dat += "<b>Blood Type:</b> [(Blood.data["blood_type"]||"none")]<BR>"
|
||||
var/datum/disease/D = Blood.data["virus"]
|
||||
dat += "<b>Agent of disease:</b> [D?"[D.agent] - <A href='?src=\ref[src];create_virus_culture=[D.type]'>Create virus culture bottle</A>":"none"]<BR>"
|
||||
dat += "<b>Contains antibodies to:</b> "
|
||||
if(Blood.data["resistances"])
|
||||
var/list/res = Blood.data["resistances"]
|
||||
if(res.len)
|
||||
dat += "<ul>"
|
||||
for(var/type in Blood.data["resistances"])
|
||||
var/datum/disease/DR = new type
|
||||
dat += "<li>[DR.name] - <A href='?src=\ref[src];create_vaccine=[type]'>Create vaccine bottle</A></li>"
|
||||
del(DR)
|
||||
dat += "</ul><BR>"
|
||||
else
|
||||
dat += "nothing<BR>"
|
||||
else
|
||||
dat += "nothing<BR>"
|
||||
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject beaker</A><BR>"
|
||||
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
|
||||
|
||||
user << browse("<TITLE>PanD.E.M.I.C 2200</TITLE><BR>[dat]", "window=pandemic;size=575x400")
|
||||
onclose(user, "pandemic")
|
||||
return
|
||||
@@ -73,7 +73,7 @@ About the Holder:
|
||||
contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.)
|
||||
More on the reaction in the reagent part of this readme.
|
||||
|
||||
add_reagent(var/reagent, var/amount)
|
||||
add_reagent(var/reagent, var/amount, var/data)
|
||||
Attempts to add X of the matching reagent to the holder.
|
||||
You wont use this much. Mostly in new procs for pre-filled
|
||||
objects.
|
||||
|
||||
@@ -58,6 +58,72 @@ datum
|
||||
M.bruteloss-=5
|
||||
..() //Code no work :< -- Urist
|
||||
*/
|
||||
|
||||
|
||||
blood
|
||||
data = new/list("donor"=null,"virus"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null)
|
||||
name = "Blood"
|
||||
id = "blood"
|
||||
reagent_state = LIQUID
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
if(M.virus) return //to prevent the healing of some serious shit with common cold injection.
|
||||
var/datum/reagent/blood/self = src
|
||||
src = null
|
||||
if(self.data["virus"])
|
||||
var/datum/disease/V = self.data["virus"]
|
||||
if(M.resistances.Find(V.type)) return
|
||||
if(method == TOUCH)//respect all protective clothing...
|
||||
M.contract_disease(new V.type)
|
||||
else //injected
|
||||
M.contract_disease(new V.type, 1)
|
||||
return
|
||||
|
||||
|
||||
reaction_turf(var/turf/T, var/volume)//splash the blood all over the place
|
||||
var/datum/reagent/blood/self = src
|
||||
src = null
|
||||
if(!istype(T, /turf/simulated/)) return
|
||||
if(istype(self.data["donor"], /mob/living/carbon/human) || !self.data["donor"])
|
||||
var/turf/simulated/source2 = T
|
||||
var/list/objsonturf = range(0,T)
|
||||
var/i
|
||||
for(i=1, i<=objsonturf.len, i++)
|
||||
if(istype(objsonturf[i],/obj/decal/cleanable/blood))
|
||||
return
|
||||
var/obj/decal/cleanable/blood/blood_prop = new /obj/decal/cleanable/blood(source2)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
blood_prop.blood_type = self.data["blood_type"]
|
||||
blood_prop.virus = self.data["virus"]
|
||||
|
||||
else if(istype(self.data["donor"], /mob/living/carbon/monkey))
|
||||
var/turf/simulated/source1 = T
|
||||
var/obj/decal/cleanable/blood/blood_prop = new /obj/decal/cleanable/blood(source1)
|
||||
blood_prop.blood_DNA = self.data["blood_DNA"]
|
||||
blood_prop.virus = self.data["virus"]
|
||||
|
||||
else if(istype(self.data["donor"], /mob/living/carbon/alien))
|
||||
var/turf/simulated/source2 = T
|
||||
var/obj/decal/cleanable/xenoblood/blood_prop = new /obj/decal/cleanable/xenoblood(source2)
|
||||
blood_prop.virus = self.data["virus"]
|
||||
|
||||
return
|
||||
|
||||
vaccine
|
||||
//data must contain virus type
|
||||
name = "Vaccine"
|
||||
id = "vaccine"
|
||||
reagent_state = LIQUID
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
var/datum/reagent/vaccine/self = src
|
||||
src = null
|
||||
if(self.data&&method == INGEST)
|
||||
if(M.resistances.Find(self.data)) return
|
||||
M.resistances += self.data
|
||||
return
|
||||
|
||||
|
||||
milk
|
||||
name = "Milk"
|
||||
id = "milk"
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
for(var/mob/living/carbon/M in D.loc)
|
||||
if(!istype(M,/mob/living/carbon)) continue
|
||||
if(M == user) continue
|
||||
D.reagents.reaction(M, INGEST)
|
||||
D.reagents.trans_to(M, 15)
|
||||
M.bruteloss += 5
|
||||
for(var/mob/O in viewers(world.view, D))
|
||||
@@ -406,7 +407,7 @@
|
||||
var/trans = src.reagents.trans_to(target, 10)
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
else if(reagents.total_volume && !istype(target,/obj/machinery/chem_master/) && !istype(target,/obj/table) && !istype(target,/obj/secure_closet) && !istype(target,/obj/closet) && !istype(target,/obj/item/weapon/storage) && !istype(target, /obj/machinery/atmospherics/unary/cryo_cell) && !istype(target, /obj/item/weapon/chem_grenade) && !istype(target, /obj/machinery/bot/medbot))
|
||||
else if(reagents.total_volume && !istype(target,/obj/machinery/chem_master/) && !istype(target,/obj/table) && !istype(target,/obj/secure_closet) && !istype(target,/obj/closet) && !istype(target,/obj/item/weapon/storage) && !istype(target, /obj/machinery/atmospherics/unary/cryo_cell) && !istype(target, /obj/item/weapon/chem_grenade) && !istype(target, /obj/machinery/bot/medbot) &&!istype(target, /obj/machinery/pandemic))
|
||||
user << "\blue You splash the solution onto [target]."
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
@@ -529,15 +530,49 @@
|
||||
|
||||
switch(mode)
|
||||
if("d")
|
||||
if(ismob(target)) return //Blood?
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red The syringe is full."
|
||||
return
|
||||
|
||||
if(ismob(target))//Blood!
|
||||
if(src.reagents.has_reagent("blood"))
|
||||
user << "\red There is already a blood sample in this syringe"
|
||||
return
|
||||
if(istype(target, /mob/living/carbon))//maybe just add a blood reagent to all mobs. Then you can suck them dry...With hundreds of syringes. Jolly good idea.
|
||||
var/amount = src.reagents.maximum_volume - src.reagents.total_volume
|
||||
var/mob/living/carbon/T = target
|
||||
var/datum/reagent/B = new /datum/reagent/blood
|
||||
B.holder = src
|
||||
B.volume = amount
|
||||
//set reagent data
|
||||
B.data["donor"] = T
|
||||
if(T.virus)
|
||||
B.data["virus"] = new T.virus.type
|
||||
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
|
||||
if(T.resistances&&T.resistances.len)
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
if(istype(target, /mob/living/carbon/human))//I wish there was some hasproperty operation...
|
||||
var/mob/living/carbon/human/HT = target
|
||||
B.data["blood_type"] = copytext(HT.b_type,1,0)
|
||||
//debug
|
||||
//for(var/D in B.data)
|
||||
// world << "Data [D] = [B.data[D]]"
|
||||
//debug
|
||||
src.reagents.reagent_list += B
|
||||
src.reagents.update_total()
|
||||
src.on_reagent_change()
|
||||
src.reagents.handle_reactions()
|
||||
user << "\blue You take a blood sample from [target]"
|
||||
for(var/mob/O in viewers(4, user))
|
||||
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
||||
return
|
||||
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red The syringe is full."
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/reagent_dispensers))
|
||||
user << "\red You cannot directly remove reagents from this object."
|
||||
@@ -1104,6 +1139,84 @@
|
||||
R.add_reagent("anti_toxin", 30)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/flu_virion
|
||||
name = "Flu virion culture bottle"
|
||||
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
|
||||
icon = 'chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(20)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
var/datum/disease/F = new /datum/disease/flu
|
||||
var/list/data = list("virus"= F)
|
||||
R.add_reagent("blood", 20, data)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold
|
||||
name = "Rhinovirus culture bottle"
|
||||
desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium."
|
||||
icon = 'chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(20)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
var/datum/disease/F = new /datum/disease/cold
|
||||
var/list/data = list("virus"= F)
|
||||
R.add_reagent("blood", 20, data)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS+ culture in synthblood medium."//Or simply - General BullShit
|
||||
icon = 'chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(20)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
var/datum/disease/F = new /datum/disease/gbs
|
||||
var/list/data = list("virus"= F)
|
||||
R.add_reagent("blood", 20, data)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS- culture in synthblood medium."//Or simply - General BullShit
|
||||
icon = 'chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(20)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
var/datum/disease/F = new /datum/disease/fake_gbs
|
||||
var/list/data = list("virus"= F)
|
||||
R.add_reagent("blood", 20, data)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/brainrot
|
||||
name = "Brainrot culture bottle"
|
||||
desc = "A small bottle. Contains Cryptococcus Cosmosis culture in synthblood medium."
|
||||
icon = 'chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(30)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
var/datum/disease/F = new /datum/disease/brainrot
|
||||
var/list/data = list("virus"= F)
|
||||
R.add_reagent("blood", 20, data)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
|
||||
Reference in New Issue
Block a user