mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 05:51:56 +00:00
* adding a 'rejuvinate' function to organs that fixes all types of damage
* adding a 'restore_all_organs' function to living creatures * adding a 'restore_blood_loss' function to humans * fixing changeling stasis power to heal organ and blood damage * fixing adming rejuvinate verb to fix organ and blood damage
This commit is contained in:
@@ -174,6 +174,21 @@
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
This function restores the subjects blood to max.
|
||||
*/
|
||||
/mob/living/carbon/human/proc/restore_blood()
|
||||
var/blood_volume = vessel.get_reagent_amount("blood")
|
||||
vessel.add_reagent("blood",560.0-blood_volume)
|
||||
|
||||
|
||||
/*
|
||||
This function restores all organs.
|
||||
*/
|
||||
/mob/living/carbon/human/restore_all_organs()
|
||||
for(var/datum/organ/external/current_organ in organs)
|
||||
current_organ.rejuvenate()
|
||||
|
||||
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
|
||||
var/datum/organ/external/E = get_organ(zone)
|
||||
if(istype(E, /datum/organ/external))
|
||||
|
||||
@@ -246,6 +246,9 @@
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
/mob/living/proc/restore_all_organs()
|
||||
return
|
||||
|
||||
/mob/living/proc/revive()
|
||||
setToxLoss(0)
|
||||
setOxyLoss(0)
|
||||
@@ -270,8 +273,15 @@
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
C.handcuffed = initial(C.handcuffed)
|
||||
|
||||
// restore all of the human's blood
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/human_mob = src
|
||||
human_mob.restore_blood()
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
restore_all_organs()
|
||||
if(stat == 2)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
|
||||
@@ -181,8 +181,31 @@
|
||||
|
||||
var/result = update_icon()
|
||||
return result
|
||||
|
||||
|
||||
|
||||
/*
|
||||
This function completely restores a damaged organ to perfect condition.
|
||||
*/
|
||||
/datum/organ/external/proc/rejuvenate()
|
||||
damage_state = "00"
|
||||
status = 0
|
||||
perma_injury = 0
|
||||
brute_dam = 0
|
||||
burn_dam = 0
|
||||
|
||||
// handle internal organs
|
||||
for(var/datum/organ/internal/current_organ in internal_organs)
|
||||
current_organ.rejuvenate()
|
||||
|
||||
// remove embedded objects and drop them on the floor
|
||||
for(var/obj/implanted_object in implants)
|
||||
if(!istype(implanted_object,/obj/item/weapon/implant)) // We don't want to remove REAL implants. Just shrapnel etc.
|
||||
implanted_object.loc = owner.loc
|
||||
implants -= implanted_object
|
||||
|
||||
owner.updatehealth()
|
||||
update_icon()
|
||||
|
||||
|
||||
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
|
||||
if(damage == 0) return
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
var/min_broken_damage = 30
|
||||
var/parent_organ = "chest"
|
||||
|
||||
/datum/organ/internal/proc/rejuvenate()
|
||||
damage=0
|
||||
|
||||
/datum/organ/internal/proc/is_bruised()
|
||||
return damage >= min_bruised_damage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user