[MIRROR] Various medical features and adjustments. Kiosk rework. (#10321)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-06 14:01:48 -07:00
committed by GitHub
parent aff135e946
commit 11e9fd3516
15 changed files with 317 additions and 109 deletions

View File

@@ -181,8 +181,34 @@ var/const/CE_STABLE_THRESHOLD = 0.5
//This 30 is the "baseline" of a cut in the "vital" regions (head and torso).
for(var/obj/item/organ/external/temp in bad_external_organs)
if(!(temp.status & ORGAN_BLEEDING) || (temp.robotic >= ORGAN_ROBOT))
///First, we make sure it's not robotic.
if(temp.robotic >= ORGAN_ROBOT)
continue
///Second, we process internal bleeding.
for(var/datum/wound/internal_bleeding/W in temp.wounds)
blood_loss_divisor = blood_loss_divisor+10 //IB is slower bloodloss than normal.
var/bicardose = reagents.get_reagent_amount(REAGENT_ID_BICARIDINE)
var/inaprovaline = reagents.get_reagent_amount(REAGENT_ID_INAPROVALINE)
var/myeldose = reagents.get_reagent_amount(REAGENT_ID_MYELAMINE)
if(!(W.can_autoheal() || (bicardose && inaprovaline) || myeldose)) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing
W.open_wound(0.1)
if(prob(1))
custom_pain("You feel a stabbing pain in your [name]!", 50)
if(CE_STABLE in chem_effects)
blood_loss_divisor = max(blood_loss_divisor + 30, 1) //Inaprovaline is great on internal wounds.
if(temp.applied_pressure) //Putting pressure on the afflicted wound helps stop the arterial bleeding.
if(ishuman(temp.applied_pressure))
var/mob/living/carbon/human/H = temp.applied_pressure
H.bloody_hands(src, 0)
blood_loss_divisor += 30 //If you're putting pressure on that limb due to there being an external bleed there, you apply some pressure to the internal bleed as well.
remove_blood(W.damage/blood_loss_divisor) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place. //Hi. 2025 here. Just did that. ~Diana
///Thirdly, we check to see if the limb is bleeding EXTERNALLY
if(!(temp.status & ORGAN_BLEEDING))
continue
///Finally, we process external wounds.
for(var/datum/wound/W in temp.wounds)
if(W.bleeding())
if(W.damage_type == PIERCE) //gunshots and spear stabs bleed more

View File

@@ -11,7 +11,6 @@
if(!owner)
return
//VOREStation Edit Start Lungs were a surprisingly lethal cause of bloodloss.
if(is_broken())
if(prob(4))
spawn owner?.custom_emote(VISIBLE_MESSAGE, "coughs up a large amount of blood!")
@@ -29,7 +28,6 @@
if(prob(4)) //Get to medical quickly. but shouldn't kill without exceedingly bad RNG.
spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
owner.AdjustLosebreath(10) //Losebreath is a DoT that does 1:1 damage and prevents oxyloss healing via breathing.
//VOREStation Edit End
if(owner.internal_organs_by_name[O_BRAIN]) // As the brain starts having Trouble, the lungs start malfunctioning.
var/obj/item/organ/internal/brain/Brain = owner.internal_organs_by_name[O_BRAIN]
@@ -39,7 +37,7 @@
owner.AdjustLosebreath(round(3 / max(0.1,Brain.get_control_efficiency())))
/obj/item/organ/internal/lungs/proc/rupture()
if(owner)
if(owner && damage < min_bruised_damage) //Anti spam prevention.
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if(istype(parent))
owner.custom_pain("You feel a stabbing pain in your [parent.name]!", 50)

View File

@@ -598,7 +598,8 @@ This function completely restores a damaged organ to perfect condition.
if((damage > 15) && (type != BURN) && (local_damage > 30) && prob(damage) && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD))
var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15))
wounds += I
owner.custom_pain("You feel something rip in your [name]!", 50)
owner.custom_pain("Something ruptures inside of your [name]. You get the feeling you'll need more than just a bandage to fix it.", 15, TRUE)
to_chat(owner, span_bolddanger(span_massive("OH GOD! Something just tore in your [name]!"))) //Let's make this CLEAR that an artery was severed. This was vague enough that most players didn't realize they had IB.
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 reduce fluid loss 4-fold so lasers dont suck your blood
@@ -802,19 +803,6 @@ Note that amputating the affected organ does in fact remove the infection from t
wounds -= W
continue
// let the GC handle the deletion of the wound
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
if(W.internal && owner.bodytemperature >= 170)
var/bicardose = owner.reagents.get_reagent_amount(REAGENT_ID_BICARIDINE)
var/inaprovaline = owner.reagents.get_reagent_amount(REAGENT_ID_INAPROVALINE)
var/myeldose = owner.reagents.get_reagent_amount(REAGENT_ID_MYELAMINE)
if(!(W.can_autoheal() || (bicardose && inaprovaline) || myeldose)) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing
W.open_wound(0.1 * wound_update_accuracy)
owner.remove_blood( wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place.
if(prob(1 * wound_update_accuracy))
owner.custom_pain("You feel a stabbing pain in your [name]!", 50)
// slow healing
var/heal_amt = 0

View File

@@ -48,11 +48,11 @@
//Staph infection symptoms for CHEST
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
/obj/item/organ/external/groin
name = "lower body"
@@ -78,11 +78,10 @@
//Staph infection symptoms for GROIN
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
/obj/item/organ/external/arm
organ_tag = BP_L_ARM
@@ -106,11 +105,10 @@
//Staph infection symptoms for ARM
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
if(organ_tag == BP_L_ARM) //Specific level 2 'feature
owner.drop_l_hand()
else if(organ_tag == BP_R_ARM)
@@ -147,11 +145,10 @@
//Staph infection symptoms for LEG
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
owner.Weaken(5)
/obj/item/organ/external/leg/right
@@ -191,11 +188,10 @@
//Staph infection symptoms for FOOT
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
owner.Weaken(5)
/obj/item/organ/external/foot/right
@@ -237,11 +233,10 @@
//Staph infection symptoms for HAND
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
if(organ_tag == BP_L_HAND) //Specific level 2 'feature
owner.drop_l_hand()
else if(organ_tag == BP_R_HAND)
@@ -327,11 +322,10 @@
//Staph infection symptoms for HEAD
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
owner.custom_pain("An alarming [pick("ache","pulse","throb")] radiates through your [name]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.custom_pain("Your [name] burns like it's on fire!",15)
owner.eye_blurry += 20 //Specific level 2 'feature
/obj/item/organ/external/head/attackby(obj/item/I as obj, mob/user as mob)

View File

@@ -204,18 +204,18 @@
/datum/wound/proc/bleeding()
if (src.internal)
return 0 // internal wounds don't bleed in the sense of this function
return FALSE // internal wounds don't bleed in the sense of this function
if (current_stage > max_bleeding_stage)
return 0
return FALSE
if (bandaged||clamped)
return 0
return FALSE
if (bleed_timer <= 0 && wound_damage() <= bleed_threshold)
return 0 //Bleed timer has run out. Once a wound is big enough though, you'll need a bandage to stop it
return FALSE //Bleed timer has run out. Once a wound is big enough though, you'll need a bandage to stop it
return 1
return TRUE
/** WOUND DEFINITIONS **/