mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 12:47:16 +01: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:
@@ -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