Merge pull request #13027 from Fox-McCloud/goonchem-heparin

Goonchem: Heparin Rework
This commit is contained in:
variableundefined
2020-03-14 23:53:42 -04:00
committed by GitHub
9 changed files with 58 additions and 36 deletions
@@ -305,10 +305,7 @@
msg += "[p_they(TRUE)] [p_are()] bandaged with something.\n"
else if(bleed_rate)
var/bleed_message = !isSynthetic() ? "bleeding" : "leaking"
if(reagents.has_reagent("heparin"))
msg += "<B>[p_they(TRUE)] [p_are()] [bleed_message] uncontrollably!</B>\n"
else
msg += "<B>[p_they(TRUE)] [p_are()] [bleed_message]!</B>\n"
msg += "<B>[p_they(TRUE)] [p_are()] [bleed_message]!</B>\n"
if(reagents.has_reagent("teslium"))
msg += "[p_they(TRUE)] [p_are()] emitting a gentle blue glow!\n"
@@ -908,6 +908,43 @@
M.reagents.remove_reagent("sugar", 5)
return ..()
/datum/reagent/heparin
name = "Heparin"
id = "heparin"
description = "An anticoagulant used in heart surgeries, and in the treatment of heart attacks and blood clots."
reagent_state = LIQUID
color = "#eee6da"
overdose_threshold = 20
taste_description = "bitterness"
/datum/reagent/heparin/on_mob_life(mob/living/M)
M.reagents.remove_reagent("cholesterol", 2)
return ..()
/datum/reagent/heparin/overdose_process(mob/living/carbon/M, severity)
var/list/overdose_info = ..()
var/effect = overdose_info[REAGENT_OVERDOSE_EFFECT]
var/update_flags = overdose_info[REAGENT_OVERDOSE_FLAGS]
if(severity == 1)
if(effect <= 2)
M.vomit(0, TRUE, FALSE)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 4)
M.vomit(0, TRUE, FALSE)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
else if(severity == 2)
if(effect <= 2)
M.visible_message("<span class='warning'>[M] is bleeding from [M.p_their()] very pores!</span>")
M.bleed(rand(10, 20))
else if(effect <= 4)
M.vomit(0, TRUE, FALSE)
M.blood_volume = max(M.blood_volume - rand(5, 10), 0)
else if(effect <= 8)
M.vomit(0, TRUE, FALSE)
M.blood_volume = max(M.blood_volume - rand(1, 2), 0)
return list(effect, update_flags)
/datum/reagent/medicine/teporone
name = "Teporone"
id = "teporone"
@@ -924,23 +924,6 @@
M.AdjustLoseBreath(1)
return ..() | update_flags
/datum/reagent/heparin //Based on a real-life anticoagulant.
name = "Heparin"
id = "heparin"
description = "A powerful anticoagulant. Victims will bleed uncontrollably and suffer scaling bruising."
reagent_state = LIQUID
color = "#C8C8C8" //RGB: 200, 200, 200
metabolization_rate = 0.2 * REAGENTS_METABOLISM
taste_mult = 0
/datum/reagent/heparin/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.bleed_rate = min(H.bleed_rate + 2, 8)
update_flags |= H.adjustBruteLoss(1, FALSE)
return ..() | update_flags
/datum/reagent/sarin
name = "Sarin"
id = "sarin"
@@ -69,6 +69,13 @@
required_reagents = list("sodiumchloride" = 1, "water" = 1, "sugar" = 1)
result_amount = 3
/datum/chemical_reaction/heparin
name = "Heparin"
id = "Heparin"
result = "heparin"
required_reagents = list("sugar" = 1, "meatslurry" = 1, "phenol" = 1, "sacid" = 1)
result_amount = 2
/datum/chemical_reaction/synthflesh
name = "Synthflesh"
id = "synthflesh"
@@ -167,15 +167,6 @@
required_reagents = list("mutadone" = 3, "lithium" = 1)
result_amount = 4
/datum/chemical_reaction/heparin
name = "Heparin"
id = "Heparin"
result = "heparin"
required_reagents = list("formaldehyde" = 1, "sodium" = 1, "chlorine" = 1, "lithium" = 1)
result_amount = 4
mix_message = "The mixture thins and loses all color."
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/chemical_reaction/rotatium
name = "Rotatium"
id = "Rotatium"
@@ -194,6 +194,11 @@
desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself."
list_reagents = list("calomel" = 15)
/obj/item/reagent_containers/syringe/heparin
name = "Syringe (heparin)"
desc = "Contains heparin, a blood anticoagulant."
list_reagents = list("heparin" = 15)
/obj/item/reagent_containers/syringe/bioterror
name = "bioterror syringe"
desc = "Contains several paralyzing reagents."
+5 -3
View File
@@ -70,13 +70,15 @@
if(BP.internal_bleeding)
internal_bleeding_rate += 0.5
bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases
bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects naturally decreases
var/additional_bleed = round(Clamp((reagents.get_reagent_amount("heparin") / 10), 0, 2), 1) //Heparin worsens existing bleeding
if(internal_bleeding_rate && !(status_flags & FAKEDEATH))
bleed_internal(internal_bleeding_rate)
bleed_internal(internal_bleeding_rate + additional_bleed)
if(bleed_rate && !bleedsuppress && !(status_flags & FAKEDEATH))
bleed(bleed_rate)
bleed(bleed_rate + additional_bleed)
//Makes a blood drop, leaking amt units of blood from the mob
/mob/living/carbon/proc/bleed(amt)