mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 06:40:08 +01:00
[MIRROR] Prevents virus stacking (#12841)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
c65d9f1078
commit
ea417f2bcc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user