Skip to content
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

Merged
merged 8 commits into from Mar 27, 2024

Conversation

avanth89
Copy link
Contributor

[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

(u)Avanth
(+)Modified secmate to allow the search function to search by criminal status in addition to what it searched by previously.

@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 27, 2024
@keywordlabeler keywordlabeler bot added the C-QoL A quality of life improvement that makes the game easier to play label Mar 27, 2024
@@ -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"])
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@TobleroneSwordfish TobleroneSwordfish merged commit b91fdae into goonstation:master Mar 27, 2024
22 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-QoL A quality of life improvement that makes the game easier to play size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants