hugboxes touch heal chems (#14135)

* hugboxes touch heal chems

* Update medicine_reagents.dm

* Update medicine_reagents.dm

* Update medicine_reagents.dm

* ..() .,.. > . .. . ... . =

* Update medicine_reagents.dm
This commit is contained in:
Theos
2022-05-16 16:11:25 -04:00
committed by GitHub
parent d6b0f3b988
commit c5035ac6e9

View File

@@ -1,6 +1,8 @@
#define PERF_BASE_DAMAGE 0.5 #define PERF_BASE_DAMAGE 0.5
/// Required strange reagent for revival. /// Required strange reagent for revival.
#define REQUIRED_STRANGE_REAGENT_FOR_REVIVAL 2 #define REQUIRED_STRANGE_REAGENT_FOR_REVIVAL 2
///maximum volume for touch chemicals to heal with
#define TOUCH_CHEM_MAX 60
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
// MEDICINE REAGENTS // MEDICINE REAGENTS
@@ -225,10 +227,9 @@
//Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects. //Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects.
/datum/reagent/medicine/silver_sulfadiazine /datum/reagent/medicine/silver_sulfadiazine
name = "Silver Sulfadiazine" name = "Silver Sulfadiazine"
description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. If ingested through other means or overdosed, deals minor toxin damage." description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. The chemical will heal up to 45 points of damage at 45 units applied. If ingested through other means, deals minor toxin damage."
reagent_state = LIQUID reagent_state = LIQUID
color = "#C8A5DC" color = "#C8A5DC"
overdose_threshold = 45
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) /datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(iscarbon(M) && M.stat != DEAD) if(iscarbon(M) && M.stat != DEAD)
@@ -237,21 +238,19 @@
if(show_message) if(show_message)
to_chat(M, span_warning("You don't feel so good...")) to_chat(M, span_warning("You don't feel so good..."))
else if(M.getFireLoss()) else if(M.getFireLoss())
M.adjustFireLoss(-reac_volume) var/datum/reagent/S = M.reagents?.get_reagent(/datum/reagent/medicine/silver_sulfadiazine)
var/heal_amt = clamp(reac_volume, 0, TOUCH_CHEM_MAX * 0.75 - S?.volume)
M.adjustFireLoss(-heal_amt)
if(show_message) if(show_message)
to_chat(M, span_danger("You feel your burns healing! It stings like hell!")) to_chat(M, span_danger("You feel your burns healing! It stings like hell!"))
M.emote("scream") M.emote("scream")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
if(method == TOUCH)
M.reagents.add_reagent(/datum/reagent/medicine/silver_sulfadiazine, reac_volume)
..() ..()
/datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/carbon/M) /datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/carbon/M)
M.adjustFireLoss(-2*REM, 0) M.adjustFireLoss(-0.5*REM, 0)
..()
. = 1
/datum/reagent/medicine/silver_sulfadiazine/overdose_process(mob/living/M)
M.adjustFireLoss(2.5*REM, 0)
M.adjustToxLoss(0.5, 0)
..() ..()
. = 1 . = 1
@@ -279,10 +278,9 @@
/datum/reagent/medicine/styptic_powder /datum/reagent/medicine/styptic_powder
name = "Styptic Powder" name = "Styptic Powder"
description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. If ingested through other means or overdosed, deals minor toxin damage." description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. The chemical will heal up to 45 points of damage at 45 units applied. If ingested through other means, deals minor toxin damage."
reagent_state = LIQUID reagent_state = LIQUID
color = "#FF9696" color = "#FF9696"
overdose_threshold = 45
/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) /datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(iscarbon(M) && M.stat != DEAD) if(iscarbon(M) && M.stat != DEAD)
@@ -291,22 +289,20 @@
if(show_message) if(show_message)
to_chat(M, span_warning("You don't feel so good...")) to_chat(M, span_warning("You don't feel so good..."))
else if(M.getBruteLoss()) else if(M.getBruteLoss())
M.adjustBruteLoss(-reac_volume) var/datum/reagent/S = M.reagents?.get_reagent(/datum/reagent/medicine/styptic_powder)
var/heal_amt = clamp(reac_volume, 0, TOUCH_CHEM_MAX * 0.75 - S?.volume)
M.adjustBruteLoss(-heal_amt)
if(show_message) if(show_message)
to_chat(M, span_danger("You feel your bruises healing! It stings like hell!")) to_chat(M, span_danger("You feel your bruises healing! It stings like hell!"))
M.emote("scream") M.emote("scream")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
if(method == TOUCH)
M.reagents.add_reagent(/datum/reagent/medicine/styptic_powder, reac_volume)
..() ..()
/datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/carbon/M) /datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/carbon/M)
M.adjustBruteLoss(-2*REM, 0) M.adjustBruteLoss(-0.5*REM, 0)
..()
. = 1
/datum/reagent/medicine/styptic_powder/overdose_process(mob/living/M)
M.adjustBruteLoss(2.5*REM, 0)
M.adjustToxLoss(0.5, 0)
..() ..()
. = 1 . = 1
@@ -412,7 +408,7 @@
M.adjustBruteLoss(-1.25 * reac_volume) M.adjustBruteLoss(-1.25 * reac_volume)
M.adjustFireLoss(-1.25 * reac_volume) M.adjustFireLoss(-1.25 * reac_volume)
else else
var/heal_amt = clamp(reac_volume, 0, 60 - S?.volume) var/heal_amt = clamp(reac_volume, 0, TOUCH_CHEM_MAX - S?.volume)
M.adjustBruteLoss(-2*heal_amt) M.adjustBruteLoss(-2*heal_amt)
M.adjustFireLoss(-2*heal_amt) M.adjustFireLoss(-2*heal_amt)
if(method == TOUCH) if(method == TOUCH)