tgstation/-tg-station — pull request #1114 by Carn (2013-08-11 12:38:37+00:00)
Title: Helper proc /proc/find_record(field, value, list/L)

It will search list/L for a /datum/data/record with fields[field] == value, and return it.

This removes a some copypasta (there's still so much left in there though). It also removes all the locate(\ref[record]) I could find, which were normally used with topic(), meaning it was susceptible to abuse.

Secbots, ed209s and turrets are now smarter with their record-checks. They now prefer to use face-name rather than id-name. ICly, this is the bot using facial recognition. This fixes an issue where it'd try to use the name variable which could be in the format "Unknown (as their id name)" when they were disfigured, etc. causing record-lookup to fail.

Additionally, these bots will treat those without a valid record in the security database, to be treated like criminals.

Note: assess_perp appears to be called twice per MC tick. I haven't looked into that though.