From 9dccbc196e0e77dedaee39bc49c132373cbbbe40 Mon Sep 17 00:00:00 2001 From: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Date: Fri, 21 Jan 2022 12:01:28 -0600 Subject: [PATCH] Fixes some antag datum related issues (#17351) --- code/datums/mind.dm | 3 +-- code/modules/admin/admin.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b4555beff0b..80a1b2c8489 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1515,8 +1515,7 @@ /datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE) if(!datum_type) - return FALSE - . = FALSE + return for(var/a in antag_datums) var/datum/antagonist/A = a if(check_subtypes && istype(A, datum_type)) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index d346aec4358..f60fa5a266a 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -661,7 +661,7 @@ GLOBAL_VAR_INIT(nologevent, 0) antag_list += "Shadowling Thrall" if(M.mind.has_antag_datum(/datum/antagonist/traitor)) antag_list += "Traitor" - if(M.mind.has_antag_datum(/datum/antagonist/mindslave)) + if(M.mind.has_antag_datum(/datum/antagonist/mindslave, FALSE)) antag_list += "Mindslave" if(isrobot(M)) var/mob/living/silicon/robot/R = M diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a387758fb6a..4261821121e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -365,7 +365,7 @@ else bodytemperature += (BODYTEMP_HEATING_MAX + (fire_stacks * 12)) var/datum/antagonist/vampire/V = mind?.has_antag_datum(/datum/antagonist/vampire) - if(V && !V.get_ability(/datum/vampire_passive/full) && stat != DEAD) // V?. doesn't work here because `has_antag_datum` return FALSE if there is no datum and ?. doesn't like that + if(!V?.get_ability(/datum/vampire_passive/full) && stat != DEAD) V.bloodusable = max(V.bloodusable - 5, 0) /mob/living/carbon/human/proc/get_thermal_protection()