mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Ported virus2 system and machinery.
Viruses2 do not spawn anywhere yet, until machinery is on map.
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
var/eye_op_stage = 0.0
|
||||
var/appendix_op_stage = 0.0
|
||||
*/
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/list/datum/disease2/disease/resistances2 = list()
|
||||
|
||||
var/antibodies = 0
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
/mob/living/carbon/human/proc/fixblood()
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null)
|
||||
B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null, "virus2" = null, "antobodies" = null)
|
||||
|
||||
|
||||
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
@@ -1367,7 +1367,28 @@
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
return
|
||||
|
||||
if(!virus2)
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2 && get_infection_chance())
|
||||
infect_virus2(src,B.virus2)
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2 && get_infection_chance())
|
||||
infect_virus2(src,M.virus2)
|
||||
else
|
||||
if(isnull(virus2)) // Trying to figure out a runtime error that keeps repeating
|
||||
CRASH("virus2 nulled before calling activate()")
|
||||
else
|
||||
virus2.activate(src)
|
||||
|
||||
// activate may have deleted the virus
|
||||
if(!virus2) return
|
||||
|
||||
// check if we're immune
|
||||
if(virus2.antigen & src.antibodies) virus2.dead = 1
|
||||
|
||||
|
||||
return
|
||||
|
||||
proc/handle_stomach()
|
||||
spawn(0)
|
||||
|
||||
Reference in New Issue
Block a user