diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 1ca1fe01036..c307716c374 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -238,6 +238,32 @@ proc/age2agedescription(age) if(70 to INFINITY) return "elderly" else return "unknown" +proc/set_criminal_status(mob/living/user, datum/data/record/target_records , criminal_status, comment, user_rank, var/list/authcard_access = list()) + var/status = criminal_status + var/their_name = target_records.fields["name"] + var/their_rank = target_records.fields["rank"] + switch(criminal_status) + if("arrest") + status = "*Arrest*" + if("none") + status = "None" + if("execute") + if((access_magistrate in authcard_access) || (access_armory in authcard_access)) + status = "*Execute*" + message_admins("[ADMIN_FULLMONTY(usr)] authorized EXECUTION for [their_rank] [their_name], with comment: [comment]") + else + return 0 + if("incarcerated") + status = "Incarcerated" + if("parolled") + status = "Parolled" + if("released") + status = "Released" + target_records.fields["criminal"] = status + log_admin("[key_name_admin(user)] set secstatus of [their_rank] [their_name] to [status], comment: [comment]") + target_records.fields["comments"] += "Set to [status] by [user.name] ([user_rank]) on [current_date_string] [station_time_timestamp()], comment: [comment]" + update_all_mob_security_hud() + return 1 /* Proc for attack log creation, because really why not diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index d489a559b38..a6bf35e397f 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -324,6 +324,7 @@ var/record_id_num = 1001 S.fields["notes"] = H.sec_record else S.fields["notes"] = "No notes." + S.fields["comments"] = list() security += S //Locked Record diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index e31fc239580..c0c8c2d349e 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -169,41 +169,16 @@ screen = SEC_DATA_R_LIST if("criminal") if(active2) - var/their_name = active2.fields["name"] - var/their_rank = active2.fields["rank"] var/t1 if(temp_href[2] == "execute") t1 = copytext(trim(sanitize(input("Explain why they are being executed. Include a list of their crimes, and victims.", "EXECUTION ORDER", null, null) as text)), 1, MAX_MESSAGE_LEN) else t1 = copytext(trim(sanitize(input("Enter Reason:", "Secure. records", null, null) as text)), 1, MAX_MESSAGE_LEN) - var/visible_reason - if(t1) - visible_reason = t1 - else + if(!t1) t1 = "(none)" - visible_reason = "NO REASON PROVIDED" - switch(temp_href[2]) - if("none") - active2.fields["criminal"] = "None" - if("arrest") - active2.fields["criminal"] = "*Arrest*" - if("execute") - if((access_magistrate in authcard_access) || (access_armory in authcard_access)) - active2.fields["criminal"] = "*Execute*" - message_admins("[ADMIN_FULLMONTY(usr)] authorized EXECUTION for [their_rank] [their_name], with comment: [visible_reason]") - else - setTemp("