Fixes a runtime in mind traits and makes IS_HOLY work versus vampires (#23200)

* Fixes mind trait runtime

* DGamerL suggested changes

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Contrabang  suggested changes

* Contra suggestions and improvements

---------

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
ppi13
2023-11-20 14:10:04 -05:00
committed by GitHub
co-authored by DGamerL
parent be1f2d9e54
commit 5ac1cc817d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -127,7 +127,7 @@
: FALSE)
#define HAS_TRAIT_NOT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (length(target.status_traits[trait] - source) > 0) : FALSE) : FALSE)
/// A simple helper for checking traits in a mob's mind
#define HAS_MIND_TRAIT(target, trait) (HAS_TRAIT(target, trait) || (target.mind ? HAS_TRAIT(target.mind, trait) : FALSE))
#define HAS_MIND_TRAIT(target, trait) (istype(target, /datum/mind) ? HAS_TRAIT(target, trait) : (target.mind ? HAS_TRAIT(target.mind, trait) : FALSE))
/// Gives a unique trait source for any given datum
#define UNIQUE_TRAIT_SOURCE(target) "unique_source_[UID(target)]"
@@ -8,7 +8,7 @@
if(V?.get_ability(/datum/vampire_passive/full))
return TRUE
//Holy characters are resistant to vampire powers
if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
if(HAS_MIND_TRAIT(src, TRAIT_HOLY))
return FALSE
return TRUE