From ae274de2750b73a99daf4ad460ce1e247a8682d2 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 15 Nov 2014 20:10:53 +0100 Subject: [PATCH] Security Records Check When machinery checks security records they now only check for explicitly set arrest status. Previously they would check for either missing security records or arrest status. --- code/defines/procs/records.dm | 3 +++ code/game/machinery/machinery.dm | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm index 3bf23c5941..4e9fbcc9af 100644 --- a/code/defines/procs/records.dm +++ b/code/defines/procs/records.dm @@ -39,6 +39,9 @@ data_core.security += R return R +/proc/find_security_record(field, value) + return find_record(field, value, data_core.security) + /proc/find_record(field, value, list/L) for(var/datum/data/record/R in L) if(R.fields[field] == value) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 1d9a9aecda..c568372c8b 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -345,8 +345,8 @@ Class Procs: if(id) perpname = id.registered_name - var/datum/data/record/R = find_record("name", perpname, data_core.security) - if(!R || (R.fields["criminal"] == "*Arrest*")) + var/datum/data/record/R = find_security_record("name", perpname) + if(R && (R.fields["criminal"] == "*Arrest*")) threatcount += 4 return threatcount