mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Adds new SecHUD designations and tweaks secHUD on examining (updated 22 May) (#12666)
* Add new criminal_status
* Add new criminal_status
* Update security.dm
Add new criminal_statuses to sec records console
* Fix beepsky not arresting executees
* Sechud now shows latest comment on examination
* Update human.dm
Add new criminal_status
* Update hud.dmi
Add new sechud icons, animated hudexecute
* Sechud now shows latest comment on examination
Simplified it according to farie's notes
* Sechud now shows latest comment on examination
Once more, thanks Henk!
* Sechud now shows latest comment on examination
Per Henk's review, another one bites the dust.
* Machinery threatcounts fixed
I just noticed that actually this doesn't affect beepsky, but turrets at portable_turret.dm. Well, now there they are.
* Turret threatcounts fixed
Now it should be proper: execute status now counts as threat to turrets.
* Update hud.dmi
New sechud statuses. Hourglass symbol for search status
* Update hud.dmi
DISREGARD: Test commit for affected on icondiffbot
* Update hud.dmi
New sechud statuses. Hourglass symbol for search status
* Revert "Update hud.dmi"
This reverts commit 8deaf40679.
* New sechud statuses. Zoomglass for search status (now).
* New sechud statuses
Make ghosts with all HUDs or sechud enabled able to use the examine function of sechud.
* Add new sec statuses
LF and conflicts resolved
* add new sec statuses
LF and conflicts resolved
* fix turret threatcounts
LF and conflicts resolved
* add new sec statuses
LF and conflicts resolved
* add new sec statuses, add sechud ghost examine
LF and conflicts resolved
* Add new sec statuses
LF and conflict resolving take2
* Add new sec stasuses
LF and conflict resolve take2, rid with empty lines
* Fixing Travis warning on list access at 355
* On built fail
trailing newlines accidentially forgotten, check, warning on list access, better but still not gone (got to git gut)
* Fixing usage of LAZYACCESS
Yeah - there was just un-necessary stuff there. Thanks to AA and Farie for help
* One last un-necessary thing off
* Move criminal status to defines.
Per Farie request: criminal statuses are now defines, every usage of them moved to utilize them. Minor: CC evilfax uses now 'demote' status in demote reply
* Beepsky prisoner threatcount: status quo
back to what it was since indeed, it becomes a nuisance if he tried to chase prisoners in jail
* Requests done
Removed useless check from secrecordComment, used isobserver at ghost omnihud
* re-add isobserver check
My bad, this check actually gives ghosts the View Comment Log from the HUD where they can't interact with the other buttons. I guess this is exactly why you comment code
* More sane expression on check at secrecordComment
As requested!
Co-authored-by: xXx-RegularJoe-xXx <53127823+xXx-RegularJoe-xXx@users.noreply.github.com>
This commit is contained in:
@@ -346,6 +346,7 @@
|
||||
if(hasHUD(user,"security"))
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/criminal = "None"
|
||||
var/commentLatest = "ERROR: Unable to locate a data core entry for this person." //If there is no datacore present, give this
|
||||
|
||||
if(perpname)
|
||||
for(var/datum/data/record/E in GLOB.data_core.general)
|
||||
@@ -353,9 +354,16 @@
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
criminal = R.fields["criminal"]
|
||||
if(LAZYLEN(R.fields["comments"])) //if the commentlist is present
|
||||
var/list/comments = R.fields["comments"]
|
||||
commentLatest = LAZYACCESS(comments, comments.len) //get the latest entry from the comment log
|
||||
else
|
||||
commentLatest = "No entries." //If present but without entries (=target is recognized crew)
|
||||
|
||||
var/criminal_status = hasHUD(user, "read_only_security") ? "\[[criminal]\]" : "<a href='?src=[UID()];criminal=1'>\[[criminal]\]</a>"
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> [criminal_status]\n"
|
||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=[UID()];secrecord=`'>\[View\]</a> <a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=[UID()];secrecordComment=`'>\[View comment log\]</a> <a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Latest entry:</span> [commentLatest]\n"
|
||||
|
||||
if(hasHUD(user,"medical"))
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
@@ -398,17 +406,25 @@
|
||||
if("medical")
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(CIH,/obj/item/organ/internal/cyberimp/eyes/hud/medical)
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
else if(isrobot(M) || isAI(M)) //Stand-in/Stopgap to prevent pAIs from freely altering records, pending a more advanced Records system
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
return 1
|
||||
return TRUE
|
||||
if("medical")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
else if(isobserver(M))
|
||||
var/mob/dead/observer/O = M
|
||||
if(O.data_hud_seen == DATA_HUD_SECURITY_ADVANCED || O.data_hud_seen == DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
// Ignores robotic limb branding prefixes like "Morpheus Cybernetics"
|
||||
/proc/ignore_limb_branding(limb_name)
|
||||
|
||||
@@ -715,14 +715,14 @@
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
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/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list(SEC_RECORD_STATUS_NONE, SEC_RECORD_STATUS_ARREST, SEC_RECORD_STATUS_SEARCH, SEC_RECORD_STATUS_MONITOR, SEC_RECORD_STATUS_DEMOTE, SEC_RECORD_STATUS_INCARCERATED, SEC_RECORD_STATUS_PAROLLED, SEC_RECORD_STATUS_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
|
||||
if(R.fields["criminal"] == "*Execute*")
|
||||
if(R.fields["criminal"] == SEC_RECORD_STATUS_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
|
||||
var/rank
|
||||
@@ -768,7 +768,7 @@
|
||||
|
||||
if(href_list["secrecordComment"])
|
||||
if(hasHUD(usr,"security"))
|
||||
if(usr.incapacitated())
|
||||
if(usr.incapacitated() && !isobserver(usr)) //give the ghosts access to "View Comment Log" while they can't manipulate it
|
||||
return
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/read = 0
|
||||
@@ -783,7 +783,7 @@
|
||||
for(var/c in R.fields["comments"])
|
||||
to_chat(usr, c)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>No comment found</span>")
|
||||
to_chat(usr, "<span class='warning'>No comments found</span>")
|
||||
to_chat(usr, "<a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>")
|
||||
|
||||
if(!read)
|
||||
@@ -1554,13 +1554,13 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.security)
|
||||
if(R && R.fields["criminal"])
|
||||
switch(R.fields["criminal"])
|
||||
if("*Execute*")
|
||||
if(SEC_RECORD_STATUS_EXECUTE)
|
||||
threatcount += 7
|
||||
if("*Arrest*")
|
||||
if(SEC_RECORD_STATUS_ARREST)
|
||||
threatcount += 5
|
||||
if("Incarcerated")
|
||||
if(SEC_RECORD_STATUS_INCARCERATED)
|
||||
threatcount += 2
|
||||
if("Parolled")
|
||||
if(SEC_RECORD_STATUS_PAROLLED)
|
||||
threatcount += 2
|
||||
|
||||
//Check for dresscode violations
|
||||
|
||||
@@ -694,11 +694,17 @@
|
||||
H.makeCluwne()
|
||||
else if(myeffect == "Demote")
|
||||
GLOB.event_announcement.Announce("[target.real_name] is hereby demoted to the rank of Civilian. Process this demotion immediately. Failure to comply with these orders is grounds for termination.","CC Demotion Order")
|
||||
for(var/datum/data/record/R in sortRecord(GLOB.data_core.security))
|
||||
if(R.fields["name"] == target.real_name)
|
||||
R.fields["criminal"] = SEC_RECORD_STATUS_DEMOTE
|
||||
R.fields["comments"] += "Central Command Demotion Order, given on [GLOB.current_date_string] [station_time_timestamp()]<BR> Process this demotion immediately. Failure to comply with these orders is grounds for termination."
|
||||
update_all_mob_security_hud()
|
||||
else if(myeffect == "Demote with Bot")
|
||||
GLOB.event_announcement.Announce("[target.real_name] is hereby demoted to the rank of Civilian. Process this demotion immediately. Failure to comply with these orders is grounds for termination.","CC Demotion Order")
|
||||
for(var/datum/data/record/R in sortRecord(GLOB.data_core.security))
|
||||
if(R.fields["name"] == target.real_name)
|
||||
R.fields["criminal"] = "*Arrest*"
|
||||
R.fields["criminal"] = SEC_RECORD_STATUS_ARREST
|
||||
R.fields["comments"] += "Central Command Demotion Order, given on [GLOB.current_date_string] [station_time_timestamp()]<BR> Process this demotion immediately. Failure to comply with these orders is grounds for termination."
|
||||
update_all_mob_security_hud()
|
||||
if(fax)
|
||||
var/turf/T = get_turf(fax)
|
||||
|
||||
Reference in New Issue
Block a user