From 85ecad411207294ff46df2be303a2baac17197ba Mon Sep 17 00:00:00 2001 From: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:12:22 -0500 Subject: [PATCH] Adds a disease that makes you reject gravity. (#87666) ## About The Pull Request This PR adds a small, pre-canned virus to the game, the "Localized Weightloss Malfunction" virus, or weightlessness virus. Weightlessness is a weak contact virus that can only spawn due to randomized virus spreading virus. The virus itself applies weightlessness via having the mob produce their own internal supply of gravitium, resulting in a lack of control from gravity. This is a bit of a patch job, and if we'd like to make this apply a more specific status debuff that can be managed, but this works well enough for proof of concept anyway. ![image](https://github.com/user-attachments/assets/fb1783b2-db7c-49b6-b973-1b7ee35565b7) The disease is cured via liquid dark matter, but has a reasonable chance to self-cure as well similar to most diseases do nowadays. ## Why It's Good For The Game Seemed like an interesting mechanical intersection, and while it can be frustrating, it is by no means a round removal virus. It is debilitating enough that it would necessitate a medbay visit. Liquid dark matter also serves as a occasional grenade chemical, but giving it a medical use provides another inch of plausible deniability. I made this PR a little bit ago on a whim, and it's been sitting on my repo for a hot second here, so I thought I'd get this moving if there's no major issues. --- code/datums/diseases/weightlessness.dm | 43 +++++++++++++++++++++++++ code/modules/events/disease_outbreak.dm | 3 +- tgstation.dme | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 code/datums/diseases/weightlessness.dm diff --git a/code/datums/diseases/weightlessness.dm b/code/datums/diseases/weightlessness.dm new file mode 100644 index 00000000000..c561b3c9205 --- /dev/null +++ b/code/datums/diseases/weightlessness.dm @@ -0,0 +1,43 @@ +/datum/disease/weightlessness + name = "Localized Weightloss Malfunction" + max_stages = 4 + spread_text = "On Contact" + spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS + cure_text = "Liquid dark matter" + cures = list(/datum/reagent/liquid_dark_matter) + agent = "Sub-quantum DNA Repulsion" + viable_mobtypes = list(/mob/living/carbon/human) + disease_flags = CAN_CARRY|CAN_RESIST|CURABLE + spreading_modifier = 0.5 + cure_chance = 4 + desc = "This disease results in a low level rewrite of the patient's bio-electric signature, causing them to reject the phenomena of \"weight\". Injestion of liquid dark matter tends to stabilize the field." + severity = DISEASE_SEVERITY_MEDIUM + infectable_biotypes = MOB_ORGANIC + + +/datum/disease/weightlessness/stage_act(seconds_per_tick, times_fired) + . = ..() + if(!.) + return + + switch(stage) + if(1) + if(SPT_PROB(1, seconds_per_tick)) + to_chat(affected_mob, span_danger("You almost lose your balance for a second.")) + if(2) + if(SPT_PROB(3, seconds_per_tick) && !HAS_TRAIT_FROM(affected_mob, TRAIT_MOVE_FLOATING, NO_GRAVITY_TRAIT)) + to_chat(affected_mob, span_danger("You feel yourself lift off the ground.")) + affected_mob.reagents.add_reagent(/datum/reagent/gravitum, 1) + + if(4) + if(SPT_PROB(3, seconds_per_tick) && !affected_mob.has_quirk(/datum/quirk/spacer_born)) + to_chat(affected_mob, span_danger("You feel sick as the world starts moving around you.")) + affected_mob.adjust_confusion(3 SECONDS) + if(SPT_PROB(8, seconds_per_tick) && !HAS_TRAIT_FROM(affected_mob, TRAIT_MOVE_FLOATING, NO_GRAVITY_TRAIT)) + to_chat(affected_mob, span_danger("You suddenly lift off the ground.")) + affected_mob.reagents.add_reagent(/datum/reagent/gravitum, 5) + +/datum/disease/weightlessness/cure(add_resistance) + . = ..() + affected_mob.vomit(VOMIT_CATEGORY_DEFAULT, lost_nutrition = 95, purge_ratio = 0.4) + to_chat(affected_mob, span_danger("You fall to the floor as your body stops rejecting gravity.")) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 3856bf550b4..43c7f98cf19 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -111,6 +111,7 @@ /datum/disease/flu, /datum/disease/fluspanish, /datum/disease/magnitis, + /datum/disease/weightlessness, /// And here are some that will never roll for real, just to mess around. /datum/disease/death_sandwich_poisoning, /datum/disease/dna_retrovirus, @@ -138,7 +139,7 @@ virus_candidates += list(/datum/disease/beesease, /datum/disease/brainrot, /datum/disease/fluspanish) //The wacky ones - virus_candidates += list(/datum/disease/magnitis, /datum/disease/anxiety) + virus_candidates += list(/datum/disease/magnitis, /datum/disease/anxiety, /datum/disease/weightlessness) //The rest of the diseases either aren't conventional "diseases" or are too unique/extreme to be considered for a normal event virus_type = pick(virus_candidates) diff --git a/tgstation.dme b/tgstation.dme index 6738e3a083a..fb2105463da 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1382,6 +1382,7 @@ #include "code\datums\diseases\rhumba_beat.dm" #include "code\datums\diseases\transformation.dm" #include "code\datums\diseases\tuberculosis.dm" +#include "code\datums\diseases\weightlessness.dm" #include "code\datums\diseases\wizarditis.dm" #include "code\datums\diseases\advance\advance.dm" #include "code\datums\diseases\advance\presets.dm"