mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Adds 'Execute' status
This commit is contained in:
@@ -197,6 +197,9 @@
|
||||
var/datum/data/record/R = find_record("name", perpname, data_core.security)
|
||||
if(R)
|
||||
switch(R.fields["criminal"])
|
||||
if("*Execute*")
|
||||
holder.icon_state = "hudexecute"
|
||||
return
|
||||
if("*Arrest*")
|
||||
holder.icon_state = "hudwanted"
|
||||
return
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
//Sorting Variables
|
||||
var/sortBy = "name"
|
||||
var/order = 1 // -1 = Descending - 1 = Ascending
|
||||
var/list/can_execute = list("Captain", "Magistrate")
|
||||
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
@@ -66,6 +67,8 @@
|
||||
break
|
||||
var/background = "''"
|
||||
switch(crimstat)
|
||||
if("*Execute*")
|
||||
background = "'background-color:#890E26'"
|
||||
if("*Arrest*")
|
||||
background = "'background-color:#890E26'"
|
||||
if("Incarcerated")
|
||||
@@ -167,12 +170,23 @@
|
||||
active2.fields["criminal"] = "None"
|
||||
if("arrest")
|
||||
active2.fields["criminal"] = "*Arrest*"
|
||||
if("execute")
|
||||
if(istype(active1, /datum/data/record) && can_execute.Find(rank))
|
||||
active2.fields["criminal"] = "*Execute*"
|
||||
var/their_name = active2.fields["name"]
|
||||
var/their_rank = active2.fields["rank"]
|
||||
message_admins("[key_name_admin(usr)] set [their_rank] [their_name] to Execute.")
|
||||
log_game("[key_name_admin(usr)] set [their_rank] [their_name] to Execute.")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Error: permission denied.</span>")
|
||||
if("incarcerated")
|
||||
active2.fields["criminal"] = "Incarcerated"
|
||||
if("parolled")
|
||||
active2.fields["criminal"] = "Parolled"
|
||||
if("released")
|
||||
active2.fields["criminal"] = "Released"
|
||||
var/newstatus = active2.fields["criminal"]
|
||||
active2.fields["comments"] += "[rank] [usr.name] changed status to [newstatus] on [current_date_string] [worldtime2text()]."
|
||||
|
||||
update_all_mob_security_hud()
|
||||
if("rank")
|
||||
@@ -458,6 +472,7 @@
|
||||
buttons[++buttons.len] = list("name" = "None", "icon" = "unlock", "href" = "criminal=none", "status" = (active2.fields["criminal"] == "None" ? "selected" : null))
|
||||
buttons[++buttons.len] = list("name" = "*Arrest*", "icon" = "lock", "href" = "criminal=arrest", "status" = (active2.fields["criminal"] == "*Arrest*" ? "selected" : null))
|
||||
buttons[++buttons.len] = list("name" = "Incarcerated", "icon" = "lock", "href" = "criminal=incarcerated", "status" = (active2.fields["criminal"] == "Incarcerated" ? "selected" : null))
|
||||
buttons[++buttons.len] = list("name" = "*Execute*", "icon" = "lock", "href" = "criminal=execute", "status" = (active2.fields["criminal"] == "*Execute*" ? "selected" : null))
|
||||
buttons[++buttons.len] = list("name" = "Parolled", "icon" = "unlock-alt", "href" = "criminal=parolled", "status" = (active2.fields["criminal"] == "Parolled" ? "selected" : null))
|
||||
buttons[++buttons.len] = list("name" = "Released", "icon" = "unlock", "href" = "criminal=released", "status" = (active2.fields["criminal"] == "Released" ? "selected" : null))
|
||||
setTemp("<h3>Criminal Status</h3>", buttons)
|
||||
|
||||
@@ -796,7 +796,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,15 +815,17 @@
|
||||
|
||||
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")
|
||||
|
||||
if(hasHUD(usr, "security"))
|
||||
if(setcriminal != "Cancel")
|
||||
if(hasHUD(usr, "security") && setcriminal != "Cancel")
|
||||
found_record = 1
|
||||
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
|
||||
R.fields["criminal"] = setcriminal
|
||||
modified = 1
|
||||
|
||||
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"])
|
||||
@@ -1761,6 +1763,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")
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user