mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Medical Records nano-ui.
This commit is contained in:
@@ -1049,12 +1049,11 @@
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
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()];medrecordadd=`'>\[Add comment\]</a>")
|
||||
|
||||
if(!read)
|
||||
@@ -1076,18 +1075,15 @@
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
|
||||
if( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
|
||||
var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || usr.stat || usr.restrained() || !hasHUD(usr, "medical"))
|
||||
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]")
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
|
||||
if(href_list["lookitem"])
|
||||
var/obj/item/I = locate(href_list["lookitem"])
|
||||
|
||||
@@ -146,17 +146,15 @@
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
var/datum/data/record/M
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
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"])
|
||||
M = R
|
||||
break
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.info = "<CENTER><B>Medical 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>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["b_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[M.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
|
||||
var/counter = 1
|
||||
while(M.fields["com_[counter]"])
|
||||
P.info += "[M.fields["com_[counter]"]]<BR>"
|
||||
counter++
|
||||
for(var/c in M.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