mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
First big chunk of the refactor
mid-refactor of `take_overall_damage` Fully refactors the (?:take|heal)_(?:overall|organ)_damage procs Allows the dead to examine Removes the `blinded` var Refactor cyborg components so vision loss is instant Robot life/death updates instantly Adds instant updates for damage overlays and HUD icons for humans Final reconciliation with the species refactor Adds a stat debugging system and debugging logs Also fixes instant death on species change "Debugging logs" are used for stuff an admin wouldn't care about but someone debugging would I used it to fix people dying instantly when changing species due to temporary deletion of the brain Fox's requests Adds a more careful updating system to our reagents system
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
DAMAGE PROCS
|
||||
****************************************************/
|
||||
|
||||
/obj/item/organ/external/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE)
|
||||
/obj/item/organ/external/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE)
|
||||
if(tough && !ignore_resists)
|
||||
brute = max(0, brute - 5)
|
||||
burn = max(0, burn - 4)
|
||||
@@ -232,14 +232,14 @@
|
||||
droplimb(0, DROPLIMB_SHARP)
|
||||
|
||||
if(owner_old)
|
||||
owner_old.updatehealth()
|
||||
owner_old.updatehealth("limb receive damage")
|
||||
return update_icon()
|
||||
|
||||
#undef LIMB_SHARP_THRESH_INT_DMG
|
||||
#undef LIMB_THRESH_INT_DMG
|
||||
#undef LIMB_DMG_PROB
|
||||
|
||||
/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
|
||||
/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0, updating_health = TRUE)
|
||||
if(is_robotic() && !robo_repair)
|
||||
return
|
||||
|
||||
@@ -250,7 +250,8 @@
|
||||
status &= ~ORGAN_BROKEN
|
||||
perma_injury = 0
|
||||
|
||||
owner.updatehealth()
|
||||
if(updating_health)
|
||||
owner.updatehealth("limb heal damage")
|
||||
|
||||
return update_icon()
|
||||
|
||||
@@ -279,7 +280,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
EO.rejuvenate()
|
||||
|
||||
if(owner)
|
||||
owner.updatehealth()
|
||||
owner.updatehealth("limb rejuvenate")
|
||||
update_icon()
|
||||
if(!owner)
|
||||
processing_objects |= src
|
||||
@@ -497,7 +498,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
dir = 2
|
||||
|
||||
if(victim)
|
||||
victim.updatehealth()
|
||||
victim.updatehealth("droplimb")
|
||||
victim.UpdateDamageIcon()
|
||||
victim.regenerate_icons()
|
||||
|
||||
@@ -708,6 +709,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
var/atom/movable/thing = O.remove(victim)
|
||||
if(thing)
|
||||
thing.forceMove(src)
|
||||
victim.updatehealth("limb remove")
|
||||
|
||||
// Grab all the internal giblets too.
|
||||
for(var/obj/item/organ/internal/organ in internal_organs)
|
||||
|
||||
@@ -231,7 +231,7 @@ var/static/regex/multispin_words = regex("like a record baby")
|
||||
else if((findtext(message, heal_words)))
|
||||
for(var/V in listeners)
|
||||
var/mob/living/L = V
|
||||
L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier, 0, 0)
|
||||
L.heal_overall_damage(10 * power_multiplier, 10 * power_multiplier, TRUE, 0, 0)
|
||||
next_command = world.time + cooldown_damage
|
||||
|
||||
//BRUTE DAMAGE
|
||||
|
||||
Reference in New Issue
Block a user