New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify the search function in Secmate to allow searching by criminal status. #18326
Modify the search function in Secmate to allow searching by criminal status. #18326
Conversation
@@ -587,6 +587,9 @@ | |||
var/list/datum/db_record/results = list() | |||
for(var/datum/db_record/R as anything in data_core.general.records) | |||
var/haystack = jointext(list(ckey(R["name"]), ckey(R["dna"]), ckey(R["id"]), ckey(R["fingerprint"]), ckey(R["rank"])), " ") | |||
var/haystack_secure_addition = data_core.security.find_record("name", R["name"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why name and not ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure! ID probably would've been better! It's more or less my first dive into it at all, so a bit of a learning experience. I'll change it to use ID instead, shortly.
[Game-Objects] [QoL]
About the PR
Changes the way the secmate search function works under the hood to allow it to check security records for criminal statuses that match the searched string.
Why's this needed?
Two reasons. First, quality of life in allowing quicker cataloguing of all that are set to a certain status such as arrest, or parole. Secondly, hopefully encouraging further use of secmate record updating so that this may be used as a way to quickly peek through all of a current status to see why they may be set to said status as either a way to jog your own memory during a rather hectic round, or if you happen to be a late comer to one.
Changelog