Fixes runtime in antagonist_helpers.dm, line 15: Cannot read null.mob_type (#7195)

This commit is contained in:
Atermonera
2020-05-19 18:52:06 -07:00
committed by VirgoBot
parent 37ec338ab3
commit 0177f86d4c

View File

@@ -12,8 +12,12 @@
return FALSE
if(avoid_silicons)
var/datum/job/J = SSjob.get_job(player.assigned_role)
if(J.mob_type & JOB_SILICON)
return FALSE
if(J)
if(J.mob_type & JOB_SILICON)
return FALSE
else // If SSjob couldn't find a job, they don't have one yet, so the next best thing we can switch on are job preferences
if((player.current.client.prefs.job_engsec_high | player.current.client.prefs.job_engsec_med | player.current.client.prefs.job_engsec_low) & (AI | CYBORG)) // If they have ANY chance of being silicon
return FALSE
return TRUE
/datum/antagonist/proc/antags_are_dead()