upstream-merge-16484 [MDB IGNORE] (#9289)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2024-10-25 21:39:18 +02:00
committed by GitHub
parent b32c1ed032
commit 026253a175
277 changed files with 471452 additions and 36179 deletions

View File

@@ -80,7 +80,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
/obj/item/organ/internal/brain/Initialize() // CHOMPEdit
. = ..() // CHOMPEdit
health = CONFIG_GET(number/default_brain_health) // CHOMPEdit
health = CONFIG_GET(number/default_brain_health)
defib_timer = (CONFIG_GET(number/defib_timer) MINUTES) / 2 // CHOMPEdit
spawn(5)
if(brainmob)

View File

@@ -179,7 +179,7 @@ var/list/organ_cache = list()
if(B && prob(40) && !isbelly(loc)) //VOREStation Edit
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
if(CONFIG_GET(flag/organs_decay) && decays) damage += rand(1,3) // CHOMPEdit
if(CONFIG_GET(flag/organs_decay) && decays) damage += rand(1,3)
if(damage >= max_damage)
damage = max_damage
adjust_germ_level(rand(2,6))

View File

@@ -308,7 +308,7 @@
// push them faster into paincrit though, as the additional damage is converted into shock.
var/brute_overflow = 0
var/burn_overflow = 0
if(is_damageable(brute + burn) || !CONFIG_GET(flag/limbs_can_break)) // CHOMPedit
if(is_damageable(brute + burn) || !CONFIG_GET(flag/limbs_can_break))
if(brute)
if(can_cut)
if(sharp && !edge)
@@ -322,7 +322,7 @@
else
//If we can't inflict the full amount of damage, spread the damage in other ways
//How much damage can we actually cause?
var/can_inflict = max_damage * CONFIG_GET(number/organ_health_multiplier) - (brute_dam + burn_dam) // CHOMPEdit
var/can_inflict = max_damage * CONFIG_GET(number/organ_health_multiplier) - (brute_dam + burn_dam)
var/spillover = 0
if(can_inflict)
if (brute > 0)
@@ -339,7 +339,7 @@
//How much brute damage is left to inflict
spillover += max(0, brute - can_inflict)
can_inflict = max_damage * CONFIG_GET(number/organ_health_multiplier) - (brute_dam + burn_dam) //Refresh the can_inflict var, so burn doesn't overload the limb if it is set to take both. // CHOMPEdit
can_inflict = max_damage * CONFIG_GET(number/organ_health_multiplier) - (brute_dam + burn_dam) //Refresh the can_inflict var, so burn doesn't overload the limb if it is set to take both.
if (burn > 0 && can_inflict)
//Inflict all burn damage we can
@@ -350,7 +350,7 @@
//If there is pain to dispense.
if(spillover)
owner.shock_stage += spillover * CONFIG_GET(number/organ_damage_spillover_multiplier) // CHOMPEdit
owner.shock_stage += spillover * CONFIG_GET(number/organ_damage_spillover_multiplier)
// sync the organ's damage with its wounds
src.update_damages()
@@ -359,7 +359,7 @@
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner && !is_stump())
if(!cannot_amputate && CONFIG_GET(flag/limbs_can_break) && (brute_dam + burn_dam) >= (max_damage * CONFIG_GET(number/organ_health_multiplier))) // CHOMPEdit
if(!cannot_amputate && CONFIG_GET(flag/limbs_can_break) && (brute_dam + burn_dam) >= (max_damage * CONFIG_GET(number/organ_health_multiplier)))
//organs can come off in three cases
//1. If the damage source is edge_eligible and the brute damage dealt exceeds the edge threshold, then the organ is cut off.
//2. If the damage amount dealt exceeds the disintegrate threshold, the organ is completely obliterated.
@@ -548,7 +548,7 @@ This function completely restores a damaged organ to perfect condition.
owner.custom_pain("You feel something rip in your [name]!", 50)
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD))
var/fluid_loss = 0.1 * (damage/(owner.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal) // CHOMPEdit //CHOMPedit 2, reduce fluid loss 4-fold so lasers dont suck your blood
var/fluid_loss = 0.1 * (damage/(owner.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal) //CHOMPedit reduce fluid loss 4-fold so lasers dont suck your blood
owner.remove_blood(fluid_loss)
// first check whether we can widen an existing wound
if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90)))
@@ -772,7 +772,7 @@ Note that amputating the affected organ does in fact remove the infection from t
//we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime
heal_amt = heal_amt * wound_update_accuracy
//configurable regen speed woo, no-regen hardcore or instaheal hugbox, choose your destiny
heal_amt = heal_amt * CONFIG_GET(number/organ_regeneration_multiplier) // CHOMPEdit
heal_amt = heal_amt * CONFIG_GET(number/organ_regeneration_multiplier)
// amount of healing is spread over all the wounds
heal_amt = heal_amt / (wounds.len + 1)
// making it look prettier on scanners
@@ -822,7 +822,7 @@ Note that amputating the affected organ does in fact remove the infection from t
status |= ORGAN_BLEEDING
//Bone fractures
if(CONFIG_GET(flag/bones_can_break) && brute_dam > min_broken_damage * CONFIG_GET(number/organ_health_multiplier) && !(robotic >= ORGAN_ROBOT)) // CHOMPEdit
if(CONFIG_GET(flag/bones_can_break) && brute_dam > min_broken_damage * CONFIG_GET(number/organ_health_multiplier) && !(robotic >= ORGAN_ROBOT))
src.fracture()
update_health()
@@ -1112,7 +1112,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/mend_fracture()
if(robotic >= ORGAN_ROBOT)
return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs
if(brute_dam > min_broken_damage * CONFIG_GET(number/organ_health_multiplier)) // CHOMPEdit
if(brute_dam > min_broken_damage * CONFIG_GET(number/organ_health_multiplier))
return 0 //will just immediately fracture again
status &= ~ORGAN_BROKEN

View File

@@ -283,7 +283,7 @@
var/eyes_over_markings = FALSE //VOREStation edit
/obj/item/organ/external/head/Initialize()
if(CONFIG_GET(flag/allow_headgibs)) // CHOMPEdit
if(CONFIG_GET(flag/allow_headgibs))
cannot_gib = FALSE
return ..()