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
5 changes: 4 additions & 1 deletion code/modules/networks/computer3/sec_rec.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
src.print_index()

if ("2") //Search records
src.print_text("Please enter target name, ID, DNA, rank, or fingerprint.")
src.print_text("Please enter target name, ID, DNA, rank, fingerprint, or criminal status.")

src.menu = MENU_SEARCH_INPUT
return
Expand Down Expand Up @@ -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/datum/db_record/haystack_secure_addition = data_core.security.find_record("id", R["id"])
if(istype(haystack_secure_addition, /datum/db_record))
haystack = jointext(list(haystack, ckey(haystack_secure_addition["criminal"])), " ")
if(findtext(haystack, searchText))
results += R

Expand Down