mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Only advance diseases have a limit
This commit is contained in:
@@ -42,10 +42,8 @@
|
||||
|
||||
//add this disease if the host does not already have too many
|
||||
/datum/disease/proc/try_infect(var/mob/living/infectee, make_copy = TRUE)
|
||||
if(infectee.diseases.len < DISEASE_LIMIT)
|
||||
infect(infectee, make_copy)
|
||||
return TRUE
|
||||
return FALSE
|
||||
infect(infectee, make_copy)
|
||||
return TRUE
|
||||
|
||||
//add the disease with no checks
|
||||
/datum/disease/proc/infect(var/mob/living/infectee, make_copy = TRUE)
|
||||
|
||||
@@ -56,13 +56,13 @@
|
||||
return ..()
|
||||
|
||||
/datum/disease/advance/try_infect(var/mob/living/infectee, make_copy = TRUE)
|
||||
var/replace_num = infectee.diseases.len + 1 - DISEASE_LIMIT
|
||||
//see if we are more transmittable than enough diseases to replace them
|
||||
//diseases replaced in this way do not confer immunity
|
||||
var/list/L = list()
|
||||
for(var/datum/disease/advance/P in infectee.diseases)
|
||||
L += P
|
||||
var/replace_num = L.len + 1 - DISEASE_LIMIT
|
||||
if(replace_num > 0)
|
||||
//see if we are more transmittable than enough diseases to replace them
|
||||
//diseases replaced in this way do not confer immunity
|
||||
var/list/L = list()
|
||||
for(var/datum/disease/advance/P in infectee.diseases)
|
||||
L += P
|
||||
sortTim(L, /proc/cmp_advdisease_resistance_asc)
|
||||
var/datum/disease/advance/competition = L[replace_num]
|
||||
if(totalTransmittable() > competition.totalResistance())
|
||||
|
||||
Reference in New Issue
Block a user