Merge pull request #4446 from KasparoVy/fix_rejuv

Fixes #4435, Refactors Rejuvenation, Fixes Flipping Runtime
This commit is contained in:
Fox McCloud
2016-05-22 18:39:38 -04:00
8 changed files with 113 additions and 13 deletions
+6 -1
View File
@@ -40,4 +40,9 @@
return O
/proc/is_int_organ(atom/A)
return istype(A, /obj/item/organ/internal)
return istype(A, /obj/item/organ/internal)
/mob/living/carbon/human/proc/get_limb_by_name(limb_name) //Look for a limb with the given limb name in the source mob, and return it if found.
for(var/obj/item/organ/external/O in organs)
if(limb_name == O.limb_name)
return O
+6 -1
View File
@@ -176,7 +176,12 @@ var/list/organ_cache = list()
/obj/item/organ/proc/rejuvenate()
damage = 0
germ_level = 0
status &= ~ORGAN_DEAD
if(status & ORGAN_ROBOT) //Robotic organs stay robotic.
status = ORGAN_ROBOT
else if (status & ORGAN_ASSISTED) //Assisted organs stay assisted.
status = ORGAN_ASSISTED
else
status = 0
if(!owner)
processing_objects |= src
@@ -308,14 +308,20 @@ This function completely restores a damaged organ to perfect condition.
*/
/obj/item/organ/external/rejuvenate()
damage_state = "00"
if(status & 128) //Robotic organs stay robotic. Fix because right click rejuvinate makes IPC's organs organic.
status = 128
if(status & ORGAN_ROBOT) //Robotic organs stay robotic.
status = ORGAN_ROBOT
else if (status & ORGAN_ASSISTED) //Assisted organs stay assisted.
status = ORGAN_ASSISTED
else
status = 0
germ_level = 0
perma_injury = 0
brute_dam = 0
burn_dam = 0
open = 0 //Closing all wounds.
wounds.Cut() //Clears all wounds! Good as new.
if(istype(src, /obj/item/organ/external/head) && disfigured) //If their head's disfigured, refigure it.
disfigured = 0
// handle internal organs
for(var/obj/item/organ/internal/current_organ in internal_organs)