mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge pull request #6500 from davipatury/secure_data-ui
Security Records Nano-UI-ification
This commit is contained in:
@@ -923,12 +923,11 @@
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"security"))
|
||||
read = 1
|
||||
var/counter = 1
|
||||
while(R.fields[text("com_[]", counter)])
|
||||
to_chat(usr, text("[]", R.fields[text("com_[]", counter)]))
|
||||
counter++
|
||||
if(counter == 1)
|
||||
to_chat(usr, "No comment found")
|
||||
if(length(R.fields["comments"]))
|
||||
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, "<a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>")
|
||||
|
||||
if(!read)
|
||||
@@ -950,21 +949,18 @@
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"security"))
|
||||
var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
|
||||
if( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
|
||||
var/t1 = copytext(trim(sanitize(input("Add Comment:", "Sec. records", null, null) as message)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || usr.stat || usr.restrained() || !hasHUD(usr, "security"))
|
||||
return
|
||||
var/counter = 1
|
||||
while(R.fields[text("com_[]", counter)])
|
||||
counter++
|
||||
if(istype(usr,/mob/living/carbon/human))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/U = usr
|
||||
R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
|
||||
if(istype(usr,/mob/living/silicon/robot))
|
||||
R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
|
||||
if(istype(usr,/mob/living/silicon/ai))
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
R.fields[text("com_[counter]")] = text("Made by [U.name] (artificial intelligence) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
|
||||
R.fields["comments"] += "Made by [U.name] (artificial intelligence) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
|
||||
if(href_list["medical"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
|
||||
@@ -110,17 +110,15 @@
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
var/datum/data/record/S
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"]))
|
||||
if(R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"])
|
||||
S = R
|
||||
break
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
|
||||
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
|
||||
P.info += "<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: [S.fields["criminal"]]<BR>\n<BR>\nMinor Crimes: [S.fields["mi_crim"]]<BR>\nDetails: [S.fields["mi_crim_d"]]<BR>\n<BR>\nMajor Crimes: [S.fields["ma_crim"]]<BR>\nDetails: [S.fields["ma_crim_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[S.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
var/counter = 1
|
||||
while(S.fields["com_[counter]"])
|
||||
P.info += "[S.fields["com_[counter]"]]<BR>"
|
||||
counter++
|
||||
for(var/c in S.fields["comments"])
|
||||
P.info += "[c]<BR>"
|
||||
P.info += "</TT>"
|
||||
P.name = "paper - '[G.fields["name"]]'"
|
||||
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
|
||||
|
||||
Reference in New Issue
Block a user