From 0c80bda49d2a2fed1c179386c9c23bedbd0697d4 Mon Sep 17 00:00:00 2001
From: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
Date: Wed, 6 Jul 2022 14:31:46 -0400
Subject: [PATCH] adds istype check (#18228)
---
code/modules/station_goals/dna_vault.dm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm
index eed87341310..2ba70b37b61 100644
--- a/code/modules/station_goals/dna_vault.dm
+++ b/code/modules/station_goals/dna_vault.dm
@@ -296,10 +296,11 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m
return
if(!completed)
return
- var/datum/species/S = H.dna.species
- if(HAS_TRAIT(H, TRAIT_GENELESS))
+ if(!istype(H) || HAS_TRAIT(H, TRAIT_GENELESS))
to_chat(H, "Error, no DNA detected.")
return
+
+ var/datum/species/S = H.dna.species
switch(upgrade_type)
if(VAULT_TOXIN)
to_chat(H, "You feel resistant to airborne toxins.")