mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Merge pull request #8044 from Kyep/sec_status_execute
Adds 'Execute' status, sec status change logging
This commit is contained in:
@@ -797,7 +797,7 @@
|
||||
if(href_list["criminal"])
|
||||
if(hasHUD(usr,"security"))
|
||||
|
||||
var/modified = 0
|
||||
var/found_record = 0
|
||||
var/perpname = "wot"
|
||||
if(wear_id)
|
||||
var/obj/item/weapon/card/id/I = wear_id.GetID()
|
||||
@@ -815,16 +815,33 @@
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
|
||||
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
|
||||
var/t1 = copytext(trim(sanitize(input("Enter Reason:", "Security HUD", null, null) as text)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1)
|
||||
t1 = "(none)"
|
||||
|
||||
if(hasHUD(usr, "security") && setcriminal != "Cancel")
|
||||
found_record = 1
|
||||
var/their_name = R.fields["name"]
|
||||
var/their_rank = R.fields["rank"]
|
||||
if(R.fields["criminal"] == "*Execute*")
|
||||
to_chat(usr, "<span class='warning'>Unable to modify the sec status of a person with an active Execution order. Use a security computer instead.</span>")
|
||||
else
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/U = usr
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()] with comment: [t1]<BR>"
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()] with comment: [t1]<BR>"
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.name] (artificial intelligence) on [current_date_string] [worldtime2text()] with comment: [t1]<BR>"
|
||||
|
||||
if(hasHUD(usr, "security"))
|
||||
if(setcriminal != "Cancel")
|
||||
R.fields["criminal"] = setcriminal
|
||||
modified = 1
|
||||
|
||||
log_admin("[key_name_admin(usr)] set secstatus of [their_rank] [their_name] to [setcriminal], comment: [t1]")
|
||||
spawn()
|
||||
sec_hud_set_security_status()
|
||||
|
||||
if(!modified)
|
||||
if(!found_record)
|
||||
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
|
||||
|
||||
if(href_list["secrecord"])
|
||||
@@ -1762,6 +1779,8 @@
|
||||
var/datum/data/record/R = find_record("name", perpname, data_core.security)
|
||||
if(R && R.fields["criminal"])
|
||||
switch(R.fields["criminal"])
|
||||
if("*Execute*")
|
||||
threatcount += 7
|
||||
if("*Arrest*")
|
||||
threatcount += 5
|
||||
if("Incarcerated")
|
||||
|
||||
Reference in New Issue
Block a user