Skip to content

Commit

Permalink
yeah yeah
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOM authored and DOOM committed May 18, 2024
1 parent bd2e8c2 commit a932814
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -608,30 +608,34 @@
to_chat(usr, "You have added a new comment to the Security Record of [R.fields["name"]]. <a href='?src=\ref[src];secrecordComment=1'>\[View Comment Log\]</a>")

if(href_list["medical"])
if(hasHUD(usr,"medical"))
var/perpref = null
if(wear_id)
var/obj/item/card/id/ID = wear_id.GetID()
if(istype(ID))
perpref = ID.registered_ref
if(!hasHUD(usr,"medical"))
return
var/perpref = null
if(wear_id)
var/obj/item/card/id/ID = wear_id.GetID()
if(istype(ID))
perpref = ID.registered_ref

var/modified = FALSE
var/modified = FALSE

if(perpref)
var/datum/data/record/health_record = retrieve_record(mob_ref = perpref, record_type = RECORD_TYPE_GENERAL)
var/setmedical = tgui_input_list(usr, "Specify a new medical status for this person.", "Medical HUD", health_record.fields[MOB_HEALTH_STATUS], list(MOB_STAT_HEALTH_DECEASED, MOB_STAT_HEALTH_UNFIT, MOB_STAT_HEALTH_ACTIVE, "Cancel"))

if(hasHUD(usr,"medical"))
if(setmedical != "Cancel")
health_record.fields[MOB_HEALTH_STATUS] = setmedical
modified = TRUE
spawn()
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()
if(!perpref)
return

if(!modified)
to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person."))
var/datum/data/record/health_record = retrieve_record(mob_ref = perpref, record_type = RECORD_TYPE_GENERAL)
var/setmedical = tgui_input_list(usr, "Specify a new medical status for this person.", "Medical HUD", health_record.fields[MOB_HEALTH_STATUS], list(MOB_STAT_HEALTH_DECEASED, MOB_STAT_HEALTH_UNFIT, MOB_STAT_HEALTH_ACTIVE, "Cancel"))

if(!hasHUD(usr,"medical") || setmedical == "Cancel")
return

health_record.fields[MOB_HEALTH_STATUS] = setmedical
modified = TRUE
spawn()
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
U.handle_regular_hud_updates()

if(!modified)
to_chat(usr, SPAN_DANGER("Unable to locate a data core entry for this person."))

/* removed for now, will be modified in the future.
if(href_list["medrecord"])
Expand Down

0 comments on commit a932814

Please sign in to comment.