Skip to content

Commit

Permalink
[MODULAR] Adds a new reagent meant for cooling synthetic burns: Dinit…
Browse files Browse the repository at this point in the history
…rogen Plasmide (#1625)

yahoo

Co-authored-by: nikothedude <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2024
1 parent 52ef800 commit 4a4f42f
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
/obj/item/storage/pill_bottle/system_cleaner = 6,
/obj/item/storage/pill_bottle/nanite_slurry = 6,
/obj/item/reagent_containers/spray/hercuri/chilled = 8,
/obj/item/reagent_containers/spray/dinitrogen_plasmide = 8,
)
8 changes: 4 additions & 4 deletions modular_nova/modules/medical/code/cargo/packs.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/datum/supply_pack/science/chilled_hercuri
name = "Chilled Hercuri Pack"
desc = "Contains 2 pre-chilled bottles of hercuri, 100u each. Useful for dealing with severely burnt synthetics!"
/datum/supply_pack/science/synthetic_burns
name = "Synthetic Burns Kit"
desc = "Contains a bottle of pre-chilled hercuri and a bottle of dinitrogen plasmide, perfect for treating synthetic burns!"
cost = CARGO_CRATE_VALUE * 2.5
contains = list(/obj/item/reagent_containers/spray/hercuri/chilled = 2)
contains = list(/obj/item/reagent_containers/spray/hercuri/chilled = 1, /obj/item/reagent_containers/spray/dinitrogen_plasmide = 1)
crate_name = "chilled hercuri crate"

access_view = FALSE
Expand Down
13 changes: 8 additions & 5 deletions modular_nova/modules/medical/code/medkit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// Slash/Pierce wound tools - can reduce intensity of electrical damage (wires can fix generic burn damage)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/wirecutters(src)
// Blunt/Brute tools
new /obj/item/weldingtool/largetank(src) // Used for repairing blunt damage or heating metal at T3 blunt
Expand All @@ -24,6 +23,7 @@
new /obj/item/clothing/glasses/hud/diagnostic(src) // When worn, generally improves wound treatment quality
// Reagent containers
new /obj/item/reagent_containers/spray/hercuri/chilled(src) // Highly effective (specifically coded to be) against burn wounds
new /obj/item/reagent_containers/spray/dinitrogen_plasmide(src) // same
// Generic medical items
new /obj/item/stack/medical/gauze/twelve(src)
new /obj/item/healthanalyzer(src)
Expand All @@ -41,8 +41,8 @@

/datum/storage/duffel/synth_trauma_kit
exception_max = 6
max_slots = 27
max_total_storage = 35
max_slots = 28
max_total_storage = 36

/datum/storage/duffel/synth_trauma_kit/New(atom/parent, max_slots, max_specific_storage, max_total_storage, numerical_stacking, allow_quick_gather, allow_quick_empty, collection_mode, attack_hand_interact)
. = ..()
Expand Down Expand Up @@ -121,6 +121,7 @@
new /obj/item/clothing/glasses/hud/diagnostic(src) // When worn, generally improves wound treatment quality
// Reagent containers
new /obj/item/reagent_containers/spray/hercuri/chilled(src) // Highly effective (specifically coded to be) against burn wounds
new /obj/item/reagent_containers/spray/dinitrogen_plasmide(src) // same
// Generic medical items
new /obj/item/stack/medical/gauze/twelve(src)
new /obj/item/healthanalyzer(src)
Expand All @@ -140,8 +141,8 @@

/datum/storage/duffel/synth_trauma_kit/advanced
exception_max = 10
max_slots = 31
max_total_storage = 48
max_slots = 33
max_total_storage = 50

/obj/item/storage/backpack/duffelbag/synth_treatment_kit/trauma/advanced/PopulateContents() // yes, this is all within the storage capacity
// Slash/Pierce wound tools - can reduce intensity of electrical damage (wires can fix generic burn damage)
Expand All @@ -162,6 +163,8 @@
// Reagent containers
new /obj/item/reagent_containers/spray/hercuri/chilled(src) // Highly effective (specifically coded to be) against burn wounds
new /obj/item/reagent_containers/spray/hercuri/chilled(src) // 2 of them
new /obj/item/reagent_containers/spray/dinitrogen_plasmide(src) // same
new /obj/item/reagent_containers/spray/dinitrogen_plasmide(src)
new /obj/item/storage/pill_bottle/nanite_slurry(src) // Heals blunt/burn
new /obj/item/storage/pill_bottle/liquid_solder(src) // Heals brain damage
new /obj/item/storage/pill_bottle/system_cleaner(src) // Heals toxin damage and purges chems
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// a potent coolant that treats synthetic burns at decent efficiency. compared to hercuri its worse, but without
// the lethal side effects, opting for a movement speed decrease instead
/datum/reagent/dinitrogen_plasmide
name = "Dinitrogen Plasmide"
description = "A compound of nitrogen and stabilized plasma, this substance has the ability to flash-cool overheated metals \
while avoiding excessive damage. Being a heavy compound, it has the effect of slowing anything that metabolizes it."
ph = 4.8
specific_heat = SPECIFIC_HEAT_PLASMA * 1.2
color = "#b779cc"
taste_description = "dull plasma"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
process_flags = REAGENT_ORGANIC | REAGENT_SYNTHETIC
metabolization_rate = 0.5 // fast
overdose_threshold = 60 // it takes a lot, if youre really messed up you CAN hit this but its unlikely
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED

/datum/reagent/dinitrogen_plasmide/on_mob_metabolize(mob/living/affected_mob)
. = ..()

affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/dinitrogen_plasmide)
to_chat(affected_mob, span_warning("Your joints suddenly feel stiff."))

/datum/reagent/dinitrogen_plasmide/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()

affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/dinitrogen_plasmide)
affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/dinitrogen_plasmide_overdose)
to_chat(affected_mob, span_warning("Your joints no longer feel stiff!"))

/datum/reagent/dinitrogen_plasmide/overdose_start(mob/living/affected_mob)
. = ..()

to_chat(affected_mob, span_danger("You feel like your joints are filling with some viscous fluid!"))
affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/dinitrogen_plasmide_overdose)

/datum/reagent/dinitrogen_plasmide/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()

holder.remove_reagent(type, 1.2 * seconds_per_tick) // decays
holder.add_reagent(/datum/reagent/stable_plasma, 0.4 * seconds_per_tick)
holder.add_reagent(/datum/reagent/nitrogen, 0.8 * seconds_per_tick)

/datum/movespeed_modifier/dinitrogen_plasmide
multiplicative_slowdown = 0.3

/datum/movespeed_modifier/dinitrogen_plasmide_overdose
multiplicative_slowdown = 1.3

/datum/chemical_reaction/dinitrogen_plasmide_formation
results = list(/datum/reagent/dinitrogen_plasmide = 3)
required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/nitrogen = 2)
required_catalysts = list(/datum/reagent/acetone = 0.1)
required_temp = 400
optimal_temp = 550
overheat_temp = 590

reaction_tags = REACTION_TAG_EASY | REACTION_TAG_UNIQUE | REACTION_TAG_HEALING

/obj/item/reagent_containers/spray/dinitrogen_plasmide
name = "coolant spray"
desc = "A medical spray bottle. This one contains dinitrogen plasmide, a potent coolant commonly used to treat synthetic burns. \
Has the side effect of causing movement slowdown."
icon = 'icons/obj/medical/chemical.dmi'
icon_state = "sprayer_med_yellow"
list_reagents = list(/datum/reagent/dinitrogen_plasmide = 100)
36 changes: 21 additions & 15 deletions modular_nova/modules/medical/code/wounds/synth/robotic_burns.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#define OVERHEAT_ON_STASIS_HEAT_MULT 0.25
/// At 100% hercuri composition, a spray of reagents will have its effective chem temp reduced by this. 50%, reduced by half this, etc.
#define ROBOTIC_BURN_REAGENT_EXPOSURE_HERCURI_MAX_HEAT_DECREMENT 60
/// At 100% hercuri composition, a spray of reagents will have its heat shock damage reduced by this. 50%, reduced by half this, etc.
#define ROBOTIC_BURN_REAGENT_EXPOSURE_HERCURI_HEAT_SHOCK_MULT_DECREMENT 0.3

/datum/wound_pregen_data/burnt_metal
abstract = TRUE
Expand Down Expand Up @@ -92,6 +88,19 @@
/// A bad system I'm using to track the worst scar we earned (since we can demote, we want the biggest our wound has been, not what it was when it was cured (probably moderate))
var/datum/scar/highest_scar

/// A assoc list of (reagent typepath -> cooling), where cooling is how much its presence will reduce the effective temperature of a reagent spray for cooling us.
var/static/list/reagent_types_to_extra_cooling = list(
/datum/reagent/medicine/c2/hercuri = 60,
/datum/reagent/dinitrogen_plasmide = 50,
)

/// A assoc list of (reagent typepath -> damage mult), where the mult will be multiplied against the thermal shock damage.
var/static/list/reagent_types_to_thermal_shock_mult = list(
/datum/reagent/medicine/c2/hercuri = 0.3,
/datum/reagent/dinitrogen_plasmide = 0.6,
)


/datum/wound/burn/robotic/overheat/New(temperature)
chassis_temperature = (isnull(temperature) ? get_random_starting_temperature() : temperature)

Expand Down Expand Up @@ -232,20 +241,18 @@
return

var/total_reagent_amount = 0
var/hercuri_amount = 0
var/chem_temp_increment = 0
var/thermal_shock_mult = 1
// imperfect, this means you can microdose hercuri/plasmide in a huge tank of water and have the entire effect.
// really not a big deal, though, they arent really limited by availability
for (var/datum/reagent/iterated_reagent as anything in reagents)
total_reagent_amount += reagents[iterated_reagent]
if (iterated_reagent.type == /datum/reagent/medicine/c2/hercuri)
hercuri_amount = reagents[iterated_reagent]

var/hercuri_percent = (hercuri_amount / total_reagent_amount)

var/hercuri_chem_temp_increment = (ROBOTIC_BURN_REAGENT_EXPOSURE_HERCURI_MAX_HEAT_DECREMENT * hercuri_percent)
var/local_chem_temp = max(source.chem_temp - hercuri_chem_temp_increment, 0)
chem_temp_increment += reagent_types_to_extra_cooling[iterated_reagent.type]
thermal_shock_mult *= reagent_types_to_thermal_shock_mult[iterated_reagent.type]

var/heat_shock_damage_mult = 1 - (ROBOTIC_BURN_REAGENT_EXPOSURE_HERCURI_HEAT_SHOCK_MULT_DECREMENT * hercuri_percent)
var/local_chem_temp = max(source.chem_temp - chem_temp_increment, 0)

expose_temperature(local_chem_temp, (reagent_coeff * volume_modifier * total_reagent_amount), TRUE, heat_shock_damage_mult = heat_shock_damage_mult)
expose_temperature(local_chem_temp, (reagent_coeff * volume_modifier * total_reagent_amount), TRUE, heat_shock_damage_mult = thermal_shock_mult)

/// Adjusts chassis_temperature by the delta between temperature and itself, multiplied by coeff.
/// If heat_shock is TRUE, limb will receive brute damage based on the delta.
Expand Down Expand Up @@ -475,4 +482,3 @@
threshold_minimum = 140

#undef OVERHEAT_ON_STASIS_HEAT_MULT
#undef ROBOTIC_BURN_REAGENT_EXPOSURE_HERCURI_MAX_HEAT_DECREMENT
1 change: 1 addition & 0 deletions modular_nova/modules/modular_vending/code/wardrobes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
/obj/item/reagent_containers/cup/bottle/morphine = 2,
/obj/item/reagent_containers/syringe = 2,
/obj/item/reagent_containers/spray/hercuri/chilled = 2,
/obj/item/reagent_containers/spray/dinitrogen_plasmide = 2,
/obj/item/clothing/gloves/color/black = 2, // fire resistant, allows the robo to painlessly mold metal. also its down here because its a treatment item
/obj/item/bonesetter = 2, // for dislocations
/obj/item/stack/medical/gauze = 4, // for ALL wounds
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7475,6 +7475,7 @@
#include "modular_nova\modules\medical\code\wounds\medicine_reagents.dm"
#include "modular_nova\modules\medical\code\wounds\muscle.dm"
#include "modular_nova\modules\medical\code\wounds\wound_effects.dm"
#include "modular_nova\modules\medical\code\wounds\synth\medicine_reagents.dm"
#include "modular_nova\modules\medical\code\wounds\synth\robotic_burns.dm"
#include "modular_nova\modules\medical\code\wounds\synth\robotic_muscle.dm"
#include "modular_nova\modules\medical\code\wounds\synth\robotic_pierce.dm"
Expand Down

0 comments on commit 4a4f42f

Please sign in to comment.