Brain Traumas
This commit is contained in:
@@ -962,6 +962,42 @@
|
||||
manipulate_organs(C)
|
||||
href_list["datumrefresh"] = href_list["editorgans"]
|
||||
|
||||
else if(href_list["givetrauma"])
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = locate(href_list["givetrauma"]) in GLOB.mob_list
|
||||
if(!istype(C))
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
|
||||
return
|
||||
|
||||
var/list/traumas = subtypesof(/datum/brain_trauma)
|
||||
var/result = input(usr, "Choose the brain trauma to apply","Traumatize") as null|anything in traumas
|
||||
var/permanent = alert("Do you want to make the trauma unhealable?", "Permanently Traumatize", "Yes", "No")
|
||||
if(!usr)
|
||||
return
|
||||
if(QDELETED(C))
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(result)
|
||||
C.gain_trauma(result, permanent)
|
||||
|
||||
href_list["datumrefresh"] = href_list["givetrauma"]
|
||||
|
||||
else if(href_list["curetraumas"])
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = locate(href_list["curetraumas"]) in GLOB.mob_list
|
||||
if(!istype(C))
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
|
||||
return
|
||||
|
||||
C.cure_all_traumas(TRUE, TRUE)
|
||||
|
||||
href_list["datumrefresh"] = href_list["curetraumas"]
|
||||
|
||||
else if(href_list["hallucinate"])
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user