Skip to content

Commit dec8dcd

Browse files
authored
/mob/living/infect_disease() now compares the uniqueID and subID directly (#5484)
## About The Pull Request Previously, this line concatenated the unique ID and sub ID into a string, and compared that. However, the use of a string here was completely unnecessary, and we could just compare the values directly, which is infinitely faster. ## Why It's Good For The Game performance number go up weeee ## Changelog N/A no player-facing changes
1 parent c507422 commit dec8dcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

monkestation/code/modules/virology/living/spread_disease.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
if(!disease.spread_flags && !(disease.disease_flags & DISEASE_DORMANT))
3030
return FALSE
3131

32-
for(var/datum/disease/acute/D as anything in diseases)
33-
if("[disease.uniqueID]-[disease.subID]" == "[D.uniqueID]-[D.subID]") // child ids are for pathogenic mutations and aren't accounted for as thats fucked.
32+
for(var/datum/disease/acute/old_disease as anything in diseases)
33+
if(disease.uniqueID == old_disease.uniqueID && disease.subID == old_disease.subID) // child ids are for pathogenic mutations and aren't accounted for as thats fucked.
3434
return FALSE
3535

3636
if(immune_system && !immune_system.CanInfect(disease))

0 commit comments

Comments
 (0)