mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 23:49:21 +01:00
Various virology fixes (#17689)
* Update advance.dm * as anything * fixes * . --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Cameron Lennox
Kashargul
parent
e5cfa9023c
commit
3a5d360089
@@ -79,6 +79,9 @@
|
||||
if(!CanContractDisease(D))
|
||||
return FALSE
|
||||
|
||||
if(species.virus_immune && !global_flag_check(D.virus_modifiers, BYPASSES_IMMUNITY))
|
||||
return FALSE
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = TRUE
|
||||
|
||||
|
||||
@@ -72,15 +72,11 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
return TRUE
|
||||
|
||||
/datum/disease/advance/IsSame(datum/disease/advance/D)
|
||||
if(ispath(D))
|
||||
return FALSE
|
||||
|
||||
if(!istype(D, /datum/disease/advance))
|
||||
return FALSE
|
||||
|
||||
if(GetDiseaseID() != D.GetDiseaseID())
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/disease/advance/cure(resistance = TRUE)
|
||||
@@ -91,14 +87,27 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
remove_virus()
|
||||
qdel(src)
|
||||
|
||||
/datum/disease/advance/Copy(process = 0)
|
||||
return new /datum/disease/advance(process, src, 1)
|
||||
/datum/disease/advance/Copy()
|
||||
var/datum/disease/advance/A = ..()
|
||||
QDEL_LIST(A.symptoms)
|
||||
for(var/datum/symptom/S as anything in symptoms)
|
||||
A.symptoms += S.Copy()
|
||||
A.disease_flags = disease_flags
|
||||
A.resistance = resistance
|
||||
A.stealth = stealth
|
||||
A.stage_rate = stage_rate
|
||||
A.transmission = transmission
|
||||
A.severity = severity
|
||||
A.speed = speed
|
||||
A.id = id
|
||||
A.Refresh()
|
||||
return A
|
||||
|
||||
/datum/disease/advance/proc/Mix(datum/disease/advance/D)
|
||||
if(!(IsSame(D)))
|
||||
var/list/possible_symptoms = shuffle(D.symptoms)
|
||||
for(var/datum/symptom/S in possible_symptoms)
|
||||
AddSymptom(new S.type)
|
||||
AddSymptom(S.Copy())
|
||||
|
||||
/datum/disease/advance/proc/HasSymptom(datum/symptom/S)
|
||||
for(var/datum/symptom/symp in symptoms)
|
||||
@@ -180,12 +189,12 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
var/c2sev
|
||||
var/c3sev
|
||||
|
||||
for(var/datum/symptom/S as() in symptoms)
|
||||
for(var/datum/symptom/S as anything in symptoms)
|
||||
resistance += S.resistance
|
||||
stealth += S.stealth
|
||||
stage_rate += S.stage_speed
|
||||
transmission += S.transmission
|
||||
for(var/datum/symptom/S as() in symptoms)
|
||||
for(var/datum/symptom/S as anything in symptoms)
|
||||
S.severityset(src)
|
||||
switch(S.severity)
|
||||
if(-INFINITY to 0)
|
||||
@@ -303,7 +312,10 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
if(!id)
|
||||
var/list/L = list()
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
L += S.id
|
||||
if(S.neutered)
|
||||
L += "[S.id]N"
|
||||
else
|
||||
L += S.id
|
||||
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
|
||||
var/result = jointext(L, ":")
|
||||
id = result
|
||||
@@ -325,7 +337,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
else
|
||||
RemoveSymptom(pick(symptoms))
|
||||
symptoms += S
|
||||
return
|
||||
Refresh()
|
||||
|
||||
// Simply removes the symptom.
|
||||
/datum/disease/advance/proc/RemoveSymptom(datum/symptom/S)
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
for(var/guaranteed_symptom in guaranteed_symptoms)
|
||||
symptoms += new guaranteed_symptom
|
||||
Finalize()
|
||||
Refresh()
|
||||
|
||||
/datum/disease/advance/random/macrophage
|
||||
setsymptom = /datum/symptom/macrophage
|
||||
|
||||
@@ -77,7 +77,7 @@ BONUS
|
||||
if(!..())
|
||||
return
|
||||
if(!used)
|
||||
for(var/datum/symptom/S as() in A.symptoms)
|
||||
for(var/datum/symptom/S as anything in A.symptoms)
|
||||
if(S == src)
|
||||
return
|
||||
S.power += power
|
||||
@@ -156,13 +156,13 @@ BONUS
|
||||
if(!..())
|
||||
return
|
||||
if(A.stage >= 5)
|
||||
for(var/datum/symptom/S as() in captives)
|
||||
for(var/datum/symptom/S as anything in captives)
|
||||
S.stopped = FALSE
|
||||
captives -= S
|
||||
if(!LAZYLEN(captives))
|
||||
stopped = TRUE
|
||||
else if(!used)
|
||||
for(var/datum/symptom/S as() in A.symptoms)
|
||||
for(var/datum/symptom/S as anything in A.symptoms)
|
||||
if(S.neutered)
|
||||
continue
|
||||
if(S == src)
|
||||
|
||||
Reference in New Issue
Block a user