Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction of lungrot as a complication of salbutamol usage in areas with miasma #15908

Merged
merged 5 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions code/modules/chemistry/Chemistry-Recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3659,6 +3659,27 @@
var/turf/location = pick(holder.covered_turf())
location.fluid_react_single("miasma", created_volume, airborne = 1)

lungrot
name = "lungrot"
id = "lungrot"
result = "lungrot_bloom"
// this reaction is a reference to salbutamol inhalers being a risk factor in getting oral thrush.
// Of course in RL, this is harmless for most people (so please take your meds), but we're in spaaaaaaaaceeeee!
required_reagents = list("salbutamol" = 0.1, "miasma" = 1)
result_amount = 1
instant = 0
reaction_speed = 0.5
//since we are talking about contraction of miasma on weakened lung tissue, make some common antibiotics prevent this
inhibitors = list("cold_medicine")
// no mixing sound or message. With lungrot decaying into miasma that would create a mass of message spam. And it should be kinda stealthy
mix_phrase = null
mix_sound = null

does_react(var/datum/reagents/holder)
//This reaction does only happen in carbon-based beings and for only as long as there is less than 15u lungrot in the person
return holder.my_atom && iscarbon(holder.my_atom) && (holder.get_reagent_amount("lungrot_bloom") < 15)


jenkem // moved this down so improperly mixed nutrients yield jenkem instead
name = "Jenkem"
id = "jenkem"
Expand Down
22 changes: 22 additions & 0 deletions code/modules/chemistry/Reagents-Diseases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,28 @@ datum
transparency = 235
disease = /datum/ailment/disease/cold


disease/lungrot
name = "lungrot bloom"
id = "lungrot_bloom"
description = "highly toxic fungal colonies created in the enviroment of a weakened lung."
reagent_state = SOLID
minimum_to_infect = 7.5
fluid_r = 43
fluid_b = 54
fluid_g = 25
transparency = 166
disease = /datum/ailment/disease/lungrot

on_mob_life(var/mob/affected_mob, var/mult = 1)
if(!affected_mob)
affected_mob = holder.my_atom
//let's not make the lungrot reaction effectively double the depletion rate of miasma
affected_mob.reagents.add_reagent("miasma", mult * depletion_rate)
..()



disease/stringy_gibbis // Fake GBS
name = "stringy gibbis"
id = "stringy gibbis"
Expand Down
86 changes: 86 additions & 0 deletions code/modules/medical/diseases/lungrot.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/datum/ailment/disease/lungrot
name = "Lungrot"
max_stages = 5
stage_prob = 4
spread = "Non-Contagious"
cure = "Robustissin application after removal of salbutamol."
associated_reagent = "lungrot_bloom"
reagentcure = list("cold_medicine")
//for as long as salbutamol is in the patient, robustissin is extremly ineffective
recureprob = 1
affected_species = list("Human")



/datum/ailment/disease/lungrot/stage_act(var/mob/living/affected_mob, var/datum/ailment_data/affecting_ailment, mult)
M-Earthfire marked this conversation as resolved.
Show resolved Hide resolved
//if salbutamol is out of the person, increase the cure chance by a lot
if (affected_mob.reagents.get_reagent_amount("salbutamol") > 0)
affecting_ailment.recureprob = 1
else
affecting_ailment.recureprob = 20

//if remissive, we deduct 2 stages from the disease. It should be significantly weaker, but not instantly gone on cure.
var/effective_ailment_stage = affecting_ailment.stage
if (affecting_ailment.state == "Remissive")
effective_ailment_stage -= 2

if (effective_ailment_stage > 0)
var/tox_damage_to_deal = 0.2 //how much damage does this deal on this stage
var/miasma_to_add = 0.6 //how much miasma does this generate in the victim at this stage
var/chance_for_breath = 0 //how high is the chance to cough out miasma
var/miasma_to_breath = 0 //how much miasma is emitted each cough
switch(effective_ailment_stage)
//We defined the values for stage one at the beginning
if(2)
miasma_to_add = 0.8
tox_damage_to_deal = 0.4
chance_for_breath = 5
miasma_to_breath = rand(3,8)
if(3)
miasma_to_add = 1
tox_damage_to_deal = 0.5
chance_for_breath = 8
miasma_to_breath = rand(8,12)
if(4)
miasma_to_add = 1.2
tox_damage_to_deal = 0.5
chance_for_breath = 12
miasma_to_breath = rand(12,18)
if(5)
miasma_to_add = 1.5
tox_damage_to_deal = 0.5
chance_for_breath = 17
miasma_to_breath = rand(18,28)

// Now we add the miasma and deal damage
affected_mob.reagents.add_reagent("miasma", miasma_to_add * mult)
affected_mob.take_toxin_damage(tox_damage_to_deal * mult)

// On later stages, we begin breathing out miasma
var/did_cough = FALSE
if (chance_for_breath > 0 && miasma_to_breath > 0)
if (probmult(chance_for_breath) && (!ON_COOLDOWN(affected_mob, "lungrot_breath", 15 SECONDS)))
did_cough = TRUE
var/turf/target_turf = get_turf(affected_mob)
//We want to smoke the stuff one tile in front of the person, if the space is not occupied by a wall or such
var/turf/potential_turf = get_step(target_turf, affected_mob.dir)
if (!potential_turf.density)
target_turf = potential_turf

//add some losebreath for a bit more damage and so you don't directly inhale the chemicals you just coughed out
affected_mob.visible_message("<span class='alert>[affected_mob] coughs out a [pick("nasty","noxious","concerning","rotten")] cloud of miasma!</span>", "<span class='alert'>You cough out a [pick("nasty","noxious","concerning","rotten")] cloud of miasma!</span>")
affected_mob.losebreath += (1 * mult)
affected_mob.emote("cough")

// the smoke breathed out is miasma and 35% of this amount out of the chempool in you on top of that.
var/datum/reagents/reagents_to_smoke = new /datum/reagents(miasma_to_breath * 1.35)
reagents_to_smoke.add_reagent("miasma", miasma_to_breath)
affected_mob.reagents.trans_to_direct(reagents_to_smoke, miasma_to_breath * 0.35)

// now we smoke the stuff and remove the temporary reagent holder
target_turf.fluid_react(reagents_to_smoke, reagents_to_smoke.total_volume, airborne = 1)
qdel(reagents_to_smoke)

// Once the chance exist we exhale miasma, we give the poor person some messages to warn them for whats about to come
if (effective_ailment_stage > 1 && !did_cough && probmult(10) && (!ON_COOLDOWN(affected_mob, "lungrot_message", 25 SECONDS)))
boutput(affected_mob, "<span class='alert'>You feel [pick("a burning sensation in your lungs", "like it's harder to breath", "a fur-like texture on your tongue")].</span>")
1 change: 1 addition & 0 deletions goonstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,7 @@ var/datum/preMapLoad/preMapLoad = new
#include "code\modules\medical\diseases\infection.dm"
#include "code\modules\medical\diseases\kuru.dm"
#include "code\modules\medical\diseases\leprosy.dm"
#include "code\modules\medical\diseases\lungrot.dm"
#include "code\modules\medical\diseases\lycanthropy.dm"
#include "code\modules\medical\diseases\malady.dm"
#include "code\modules\medical\diseases\medusa.dm"
Expand Down