mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Ported virus2 system and machinery.
Viruses2 do not spawn anywhere yet, until machinery is on map.
This commit is contained in:
@@ -9,10 +9,13 @@ datum/reagent/antibodies
|
||||
color = "#0050F0"
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(istype(M,/mob/living/carbon))
|
||||
if(src.data && method == INGEST)
|
||||
if(src.data["antibodies"] & M:virus2.antigen)
|
||||
if(M:virus2) if(src.data["antibodies"] & M:virus2.antigen)
|
||||
M:virus2.dead = 1
|
||||
// if the virus is killed this way it immunizes
|
||||
// M:antibodies |= M:virus2.antigen
|
||||
M:antibodies |= src.data["antibodies"]
|
||||
return
|
||||
|
||||
// reserving some numbers for later special antigens
|
||||
@@ -42,7 +45,7 @@ var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTI
|
||||
icon_state = "health"
|
||||
w_class = 2.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
|
||||
|
||||
/obj/item/device/antibody_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
|
||||
@@ -44,6 +44,17 @@
|
||||
return 1
|
||||
|
||||
|
||||
proc/airborne_can_reach(turf/source, turf/target)
|
||||
var/obj/dummy = new(source)
|
||||
dummy.flags = FPRINT | TABLEPASS
|
||||
dummy.pass_flags = PASSTABLE
|
||||
|
||||
for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
|
||||
|
||||
var/rval = (dummy.loc in range(1,target))
|
||||
del dummy
|
||||
return rval
|
||||
|
||||
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
|
||||
if(M.virus2)
|
||||
return
|
||||
|
||||
@@ -40,7 +40,21 @@
|
||||
container = I
|
||||
C.drop_item()
|
||||
I.loc = src
|
||||
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"=null,"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
|
||||
//else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
@@ -68,6 +82,9 @@
|
||||
|
||||
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."
|
||||
@@ -121,9 +138,10 @@
|
||||
product.reagents.add_reagent("antibodies",30,data)
|
||||
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
|
||||
/*
|
||||
/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2)
|
||||
var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc)
|
||||
implanter.name = "Viral implanter (MAJOR BIOHAZARD)"
|
||||
implanter.works = 3
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
*/
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
|
||||
if(beaker)
|
||||
if(beaker.reagents.remove_reagent("virusfood",5))
|
||||
if(!beaker.reagents.remove_reagent("virusfood",5))
|
||||
foodsupply += 10
|
||||
if(beaker.reagents.remove_reagent("toxins",1))
|
||||
if(!beaker.reagents.remove_reagent("toxins",1))
|
||||
toxins += 1
|
||||
@@ -138,7 +138,7 @@
|
||||
growth = rand(5, 50)
|
||||
|
||||
/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
|
||||
if(istype(W,/obj/item/weapon/label) || istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
..()
|
||||
if(prob(50))
|
||||
|
||||
Reference in New Issue
Block a user