mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
Prevents virus stacking (#19539)
This commit is contained in:
committed by
CHOMPStation2StaffMirrorBot
parent
12a19eb872
commit
fb445f1ac5
@@ -49,6 +49,9 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
|
||||
|
||||
/datum/disease/proc/infect(mob/living/infectee, make_copy = TRUE)
|
||||
var/datum/disease/D = make_copy ? Copy() : src
|
||||
if(infectee.HasDisease(D))
|
||||
qdel(D)
|
||||
return
|
||||
infectee.addDisease(D)
|
||||
D.affected_mob = infectee
|
||||
GLOB.active_diseases += D
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
var/datum/disease/D = ID
|
||||
if((D.spread_flags & DISEASE_SPREAD_SPECIAL) || (D.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS))
|
||||
continue
|
||||
if(M.HasDisease(D))
|
||||
continue
|
||||
D.try_infect(M)
|
||||
|
||||
/datum/reagent/blood/affect_touch(mob/living/carbon/M, alien, removed)
|
||||
|
||||
Reference in New Issue
Block a user