mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #6026 from mwerezak/internal-bleeding
Implements IB changes discussed in forum thread
This commit is contained in:
@@ -972,7 +972,7 @@ mob/proc/yank_out_object()
|
|||||||
affected.take_damage((selection.w_class * 3), 0, 0, 1, "Embedded object extraction")
|
affected.take_damage((selection.w_class * 3), 0, 0, 1, "Embedded object extraction")
|
||||||
|
|
||||||
if(prob(selection.w_class * 5)) //I'M SO ANEMIC I COULD JUST -DIE-.
|
if(prob(selection.w_class * 5)) //I'M SO ANEMIC I COULD JUST -DIE-.
|
||||||
var/datum/wound/internal_bleeding/I = new (15)
|
var/datum/wound/internal_bleeding/I = new (min(selection.w_class * 5, 15))
|
||||||
affected.wounds += I
|
affected.wounds += I
|
||||||
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
|
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
|
||||||
|
|
||||||
|
|||||||
@@ -127,12 +127,12 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
|||||||
if(!(temp.status & ORGAN_BLEEDING) || temp.status & ORGAN_ROBOT)
|
if(!(temp.status & ORGAN_BLEEDING) || temp.status & ORGAN_ROBOT)
|
||||||
continue
|
continue
|
||||||
for(var/datum/wound/W in temp.wounds) if(W.bleeding())
|
for(var/datum/wound/W in temp.wounds) if(W.bleeding())
|
||||||
blood_max += W.damage / 4
|
blood_max += W.damage / 40
|
||||||
if (temp.open)
|
if (temp.open)
|
||||||
blood_max += 2 //Yer stomach is cut open
|
blood_max += 2 //Yer stomach is cut open
|
||||||
drip(blood_max)
|
drip(blood_max)
|
||||||
|
|
||||||
//Makes a blood drop, leaking certain amount of blood from the mob
|
//Makes a blood drop, leaking amt units of blood from the mob
|
||||||
/mob/living/carbon/human/proc/drip(var/amt as num)
|
/mob/living/carbon/human/proc/drip(var/amt as num)
|
||||||
|
|
||||||
if(species && species.flags & NO_BLOOD) //TODO: Make drips come from the reagents instead.
|
if(species && species.flags & NO_BLOOD) //TODO: Make drips come from the reagents instead.
|
||||||
@@ -141,12 +141,11 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
|||||||
if(!amt)
|
if(!amt)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/amm = 0.1 * amt
|
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
var/list/obj/effect/decal/cleanable/blood/drip/nums = list()
|
var/list/obj/effect/decal/cleanable/blood/drip/nums = list()
|
||||||
var/list/iconL = list("1","2","3","4","5")
|
var/list/iconL = list("1","2","3","4","5")
|
||||||
|
|
||||||
vessel.remove_reagent("blood",amm)
|
vessel.remove_reagent("blood",amt)
|
||||||
|
|
||||||
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
|
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
|
||||||
nums += G
|
nums += G
|
||||||
|
|||||||
@@ -223,11 +223,11 @@ This function completely restores a damaged organ to perfect condition.
|
|||||||
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
|
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
|
||||||
if(damage == 0) return
|
if(damage == 0) return
|
||||||
|
|
||||||
//moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage
|
//moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return)
|
||||||
//Possibly trigger an internal wound, too.
|
//Possibly trigger an internal wound, too.
|
||||||
var/local_damage = brute_dam + burn_dam + damage
|
var/local_damage = brute_dam + burn_dam + damage
|
||||||
if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT))
|
if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT))
|
||||||
var/datum/wound/internal_bleeding/I = new (15)
|
var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15))
|
||||||
wounds += I
|
wounds += I
|
||||||
owner.custom_pain("You feel something rip in your [display_name]!", 1)
|
owner.custom_pain("You feel something rip in your [display_name]!", 1)
|
||||||
|
|
||||||
@@ -463,16 +463,15 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
// let the GC handle the deletion of the wound
|
// let the GC handle the deletion of the wound
|
||||||
|
|
||||||
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
|
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
|
||||||
if(W.internal && !W.can_autoheal() && owner.bodytemperature >= 170)
|
if(W.internal && owner.bodytemperature >= 170)
|
||||||
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
|
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
|
||||||
var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline")
|
var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline")
|
||||||
if(!bicardose || !inaprovaline) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, and also stop bleeding
|
if(!(W.can_autoheal() || (bicardose && inaprovaline))) //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)
|
W.open_wound(0.1 * wound_update_accuracy)
|
||||||
owner.vessel.remove_reagent("blood",0.05 * W.damage * wound_update_accuracy)
|
|
||||||
if(bicardose >= 30) //overdose of bicaridine begins healing IB
|
if(bicardose >= 30) //overdose of bicaridine begins healing IB
|
||||||
W.damage = max(0, W.damage - 0.2)
|
W.damage = max(0, W.damage - 0.2)
|
||||||
|
|
||||||
owner.vessel.remove_reagent("blood",0.02 * W.damage * wound_update_accuracy)
|
owner.vessel.remove_reagent("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))
|
if(prob(1 * wound_update_accuracy))
|
||||||
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)
|
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)
|
||||||
|
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ datum/wound/cut/massive
|
|||||||
|
|
||||||
/datum/wound/internal_bleeding
|
/datum/wound/internal_bleeding
|
||||||
internal = 1
|
internal = 1
|
||||||
stages = list("severed vein" = 30, "cut vein" = 20, "damaged vein" = 10, "bruised vein" = 5)
|
stages = list("severed artery" = 30, "cut artery" = 20, "damaged artery" = 10, "bruised artery" = 5)
|
||||||
autoheal_cutoff = 5
|
autoheal_cutoff = 5
|
||||||
max_bleeding_stage = 0 //all stages bleed. It's called internal bleeding after all.
|
max_bleeding_stage = 0 //all stages bleed. It's called internal bleeding after all.
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
|
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
|
||||||
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
|
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
|
||||||
user << "\red You tear some blood vessels trying to fit such a big object in this cavity."
|
user << "\red You tear some blood vessels trying to fit such a big object in this cavity."
|
||||||
var/datum/wound/internal_bleeding/I = new (15)
|
var/datum/wound/internal_bleeding/I = new (10)
|
||||||
affected.wounds += I
|
affected.wounds += I
|
||||||
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1)
|
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1)
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
|
|||||||
Reference in New Issue
Block a user