mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Doesn't Rejuvenate Limbs or Organs if ones Exist on Mob...
... with the same limb name (in the case of external organs) or the same slot (in the case of internal organs) to prevent duplication.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,8 +308,10 @@ 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.
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user