Adds regenerate_organs proc and adds it to relevant regeneration code (#22740)

* Adds regenerate_organs proc to carbon and adds it to relevant regeneration code

I simply took the bit from the admin heal and made it into a proc and
added it to the necessary regeneration-related bits of code.

* Adds regenerate organs back to fully heal

For some reason this didn't get included in the previous commit.

* moves regenerate_organs to organ_internal

As suggested. It fits better here, anyways.
This commit is contained in:
TehZombehz
2017-01-07 00:38:29 -06:00
committed by oranges
parent a0c6052e53
commit 8cc9e6de50
8 changed files with 31 additions and 24 deletions
+1
View File
@@ -688,6 +688,7 @@
D.cure(0)
if(admin_revive)
regenerate_limbs()
regenerate_organs()
handcuffed = initial(handcuffed)
for(var/obj/item/weapon/restraints/R in contents) //actually remove cuffs from inventory
qdel(R)
+1 -23
View File
@@ -823,31 +823,9 @@
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
/mob/living/carbon/human/fully_heal(admin_revive = 0)
if(admin_revive)
regenerate_limbs()
if(!(NOBREATH in dna.species.species_traits) && !getorganslot("lungs"))
var/obj/item/organ/lungs/L = new()
L.Insert(src)
if(!(NOBLOOD in dna.species.species_traits) && !getorganslot("heart"))
var/obj/item/organ/heart/H = new()
H.Insert(src)
if(!getorganslot("tongue"))
var/obj/item/organ/tongue/T
for(var/tongue_type in dna.species.mutant_organs)
if(ispath(tongue_type, /obj/item/organ/tongue))
T = new tongue_type()
T.Insert(src)
// if they have no mutant tongues, give them a regular one
if(!T)
T = new()
T.Insert(src)
regenerate_organs()
remove_all_embedded_objects()
drunkenness = 0
for(var/datum/mutation/human/HM in dna.mutations)