Fixes some antag datum related issues (#17351)

This commit is contained in:
SteelSlayer
2022-01-21 12:01:28 -06:00
committed by GitHub
parent 8334b65979
commit 9dccbc196e
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -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))
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()