From 73a0a873ec79126adfd998874bdbc2aa52488878 Mon Sep 17 00:00:00 2001 From: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Date: Thu, 28 Oct 2021 02:19:27 -0700 Subject: [PATCH] Change ishumanbasic to not count felinids (#62376) ishumanbasic allowed felinids (human subtypes) to pass. This is something every check of ishumanbasic does not account for (some even check isfelinid explicitly!) --- code/__DEFINES/is_helpers.dm | 1 - code/__HELPERS/mobs.dm | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index c060d03067c..74e1ef679db 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -69,7 +69,6 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define iszombie(A) (is_species(A, /datum/species/zombie)) #define isskeleton(A) (is_species(A, /datum/species/skeleton)) #define ismoth(A) (is_species(A, /datum/species/moth)) -#define ishumanbasic(A) (is_species(A, /datum/species/human)) #define isfelinid(A) (is_species(A, /datum/species/human/felinid)) #define isethereal(A) (is_species(A, /datum/species/ethereal)) #define isvampire(A) (is_species(A,/datum/species/vampire)) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index beb98d0b234..dafb5451ae5 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -435,6 +435,15 @@ GLOBAL_LIST_EMPTY(species_list) if(H.dna && istype(H.dna.species, species_datum)) . = TRUE +/// Returns if the given target is a human. Like, a REAL human. +/// Not a moth, not a felinid (which are human subtypes), but a human. +/proc/ishumanbasic(target) + if (!ishuman(target)) + return FALSE + + var/mob/living/carbon/human/human_target = target + return human_target.dna?.species?.type == /datum/species/human + /proc/spawn_atom_to_turf(spawn_type, target, amount, admin_spawn=FALSE, list/extra_args) var/turf/T = get_turf(target) if(!T)