Cryonics Additions + IV Bag Stuff (#18415)

### Summary:
This PR fleshes out cryonics, both inside a cryotube and outside of a
cryotube, and gives a pharmacist a lot more to do during those high
energy rounds as they will be required to prepare and oversee any
cryonic mixes. Lots of ways you can go about doing with the biggest
reward being brain regeneration that bypasses oxygenation requirements,
at the cost of significant downsides if done improperly.

This generally empowers pharmacists and physicians and offers
non-surgical treatment alternatives, though often incurs a penalty or
takes a little longer than surgical treatment, so it doesn't make
surgeons redundant.

This list'll be exhaustive so medical players aren't left in the dark
and can just refer to this while a wiki update is worked on, instead of
digging through code.

 **Changes to Stasis/Cryotubes:**
- Stasis at temperates between 120K and 200K has been reduced to between
5 and 10, as opposed to 10 and 20. This means chemicals still have a
good chance of metabolising if you set a cryotube to above ~140K.
Cryotubes will still achieve good stasis if you cool below 120K -
upgraded stockparts from the workshop/R&D will help with this.
- (Bugfix) IPCs will not longer be knocked unconscious if they enter an
active cryotube.

**Misc. Reagent Additions/Tweaks:**
- Bicaridine now only requires 30u in the blood to begin attempting to
repair arterial bleeds, as opposed to 50u.
- Adds a Blood Thinning chemical effect. This prevents Coagzolug's blood
clotting effect from working and works in the opposite way - increasing
how much blood you lose per blood loss tick. Fluvectionem and
Synaptizine apply Blood Thinning at a strength of 25, translating to 25%
faster blood loss.

**Cryonic Chemicals:**
- Cryoxadone and Clonexadone both overdose at 5u. **_This is not a
problem when using a cryotube due to how cryotubes administer
reagents._** Overdosing either results in genetic damage and severe eye
damage.
- Cryoxadone and Clonexadone's organ healing capabilities have been
significantly nerfed. The organ healing is still noticable and useful
for pharmacist/surgeonless rounds; they cannot heal the brain though.
- Cryosurfactant has been renamed to Cryosilicate, mimicking
Pyrosilicate - the recipe now uses silicate instead of surfactant.
- Cryosilicate and Pyrosilicate now have an effect when used in the
body: cryosilicate will supercool a patient; pyrosilicate will
chemically incinerate someone. Leporazine will inhibit these functions.
- Bicaridine will repair arterial bleeds when used in cryogenic
conditions.
- Kelotane will repair disfigurement when used in cryogenic conditions.
- Peridaxon 2x effective in cryogenic conditions. Peridaxon can
denecrotise livers and kidneys in extracool cryogenic conditions - it
cannot denecrotise other organs. Using peridaxon in cryogenic conditions
will result in benign tumour growth (see below).
- Red Nightshade can repair bone breaks in cryogenic conditions. It will
still put a patient into a berserk state.
- Cataleptinol - see below.

**Cataleptinol Rework:**
Cataleptinol has been reworked from the ground up and is where
pharmacist's will be able to shine by making fancy cryotube beaker
mixers or cryonic mixtures for use in IV stands.
- The new recipe is 2 parts Alkysine, 0.5 parts Phoron, 1 part
Clonexadone and a 5u Cryosilicate catalyst. This translates to: 120u
Alkysine + 60u Clonexadone + 30u Phoron w/ 5u Cryosilicate = 60u (1
bottle) of Cataleptinol - expensive and lots of tricky precursors,
leaves enough left over to make a 2nd bottle without having to remake
all of the precursors.
- **In cryogenic conditions**, Cataleptinol will restore 7.5% brain
activity per metabolisation tick. This _bypasses the 85% oxygenation
requirement_, at the cost of hallucinations, blood thinning and liver
damage. The trade is roughly 40% brain activity (assuming nothing is
causing brain damage) for total liver failure.
- **Outside of cryogenic conditions**, Cataleptinol becomes a lot less
reliable and a lot more dangerous to use, with only a 75% chance of
restoring 2% brain activity per metabolisation tick. It will still
bypass oxygenation requirements, making it useful during _**severe
emergencies**_, at the cost of inducing painshock in addition to the
above hallucinations, blood thinning and liver damage. The trade is
roughly 25% brain activity (assuming nothing is causing brain damage)
for total liver failure.
- Cataleptinol _**overdoses at 3u**_ and has a fast metabolisation of
0.6u/tick - this makes it hard to dose without using an IV drip. If you
overdose Cataleptinol by using another method of administration, then
the patient's liver will crash, brain regeneration undone and the
patient will have severe seizures resulting in more pain. Using
Cataleptinol outside of cryogenic conditions **is high risk and only
potentially high reward**, but it could buy a couple more minutes.

**Tumours:**
- Adds Benign Tumours. Benign tumours simply drain nutrition and cause
frequent pain; they do not spread or affect nearby organs.
- Adds Malignant Tumours. Malignant tumours will begin by draining
nutrition then effecting symptoms based on the tumour's location (chest
tumours -> coughing, gasping, chest pain; brain tumours ->
disorientation, memory loss; abdominal -> vomiting, abdominal pain;
anywhere else -> lethargy). In the later stages, malignant tumours will
begin to damage the organs they are close to, then will eventually enter
the circulatory _~~and lymphatic~~_ system and spawn more malignant
tumours in other parts of the body.
- Peridaxon will result in benign tumour growth when overdosed or used
in cryogenic conditions.
- Genetic damage will result in malignant tumour growth.
- Ryetalyn is the anti-tumour drug and will put both benign and
malignant tumours into recession. You can also surgically intervene and
excise tumours as you would k'ois mycosis or fluke parasites.
- You cannot have more than 3 of any tumour - things won't get too out
of hand.

**IV Bag Stuff:**
- Adds 2 labels for IV bags: Cryonics Mixture, denoted by a CR; Other
Mixture, denoted by an M.
- Renames `blood packs` to `IV bags` and changes their formatting. What
was `blood pack O+` will now appear as `IV bag - O+ Blood`; `blood pack
Saline Plus` -> `IV bag - Saline Plus`.

**Misc.:**
- Only 20 genetic degradation on a limb is required to deform it instead
of 30. This should make it slightly more common, as 30 is a large number
to reach when this number is calculated per limb.
- Seizures can be given variable strengths.
- (Bugfix) Coolant tanks no longer just set a room's temperature to 0K
when destroyed. The amount it cools a room scales with the amount of
coolant still in the tank but cannot go below 173K/-100°C.
- Cryocells now have stockparts and can be upgraded/deconstructed.
This commit is contained in:
smellie
2024-04-13 17:14:51 +01:00
committed by GitHub
parent 34e3c3570c
commit 11f8eff319
31 changed files with 466 additions and 122 deletions
+1
View File
@@ -8,6 +8,7 @@
max_damage = 45
min_broken_damage = 25
relative_size = 5
toxin_type = CE_OCULOTOXIC
var/list/eye_colour = list(0,0,0)
var/singular_name = "eye"
+3 -1
View File
@@ -148,8 +148,10 @@
if(temp.status & ORGAN_ARTERY_CUT)
var/bleed_amount = FLOOR((owner.vessel.total_volume / (temp.applied_pressure || !open_wound ? 450 : 250)) * temp.arterial_bleed_severity, 1)
if(bleed_amount)
if(CE_BLOODCLOT in owner.chem_effects)
if((CE_BLOODCLOT in owner.chem_effects) && !(owner.chem_effects[CE_BLOODTHIN]))
bleed_amount *= 0.8 // won't do much, but it'll help
if(CE_BLOODTHIN in owner.chem_effects)
bleed_amount *= 1+(owner.chem_effects[CE_BLOODTHIN]/100)
if(open_wound)
blood_max += bleed_amount
do_spray += "[temp.name]"
+5 -3
View File
@@ -1526,7 +1526,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(genetic_degradation <= 30)
if(status & ORGAN_MUTATED)
unmutate()
to_chat(src, "<span class = 'notice'>Your [name] is shaped normally again.</span>")
to_chat(src, SPAN_NOTICE("Your [name] is shaped normally again."))
return -(genetic_degradation - last_gene_dam)
/obj/item/organ/external/proc/add_genetic_damage(var/amount)
@@ -1536,10 +1536,12 @@ Note that amputating the affected organ does in fact remove the infection from t
return
var/last_gene_dam = genetic_degradation
genetic_degradation = min(100,max(0,genetic_degradation + amount))
if(genetic_degradation > 30)
if(genetic_degradation > 10)
owner.infest_with_parasite(owner, BP_TUMOUR_SPREADING, src)
if(genetic_degradation > 20)
if(!(status & ORGAN_MUTATED) && prob(genetic_degradation))
mutate()
to_chat(owner, "<span class = 'notice'>Something is not right with your [name]...</span>")
to_chat(owner, SPAN_NOTICE("Something is not right with your [name]..."))
return (genetic_degradation - last_gene_dam)
// Pain/halloss
@@ -73,3 +73,25 @@
/obj/item/organ/internal/parasite/proc/stage_effect()
return
/mob/living/carbon/human/proc/infest_with_parasite(var/mob/living/carbon/victim, var/parasite_type, var/obj/item/organ/external/organ_to_infest, var/chance_to_infest = 100, var/parasite_limit = 3)
if(ishuman(victim))
var/mob/living/carbon/human/H = victim
if(BP_IS_ROBOTIC(organ_to_infest))
return
var/i = 0
for(var/obj/item/organ/internal/O in H.internal_organs) //dont want there to be a silly amount of parasites
if(istype(O, /obj/item/organ/internal/parasite))
i++
if((i < parasite_limit) && prob(chance_to_infest))
switch(parasite_type) //such a shitty way to do this but i couldnt get a better alternative to work in a sane amount of time :/
if("malignant tumour")
var/obj/item/organ/internal/parasite/malignant_tumour/P = new()
P.parent_organ = organ_to_infest
P.replaced(H, organ_to_infest)
P.generate_name()
if("benign tumour")
var/obj/item/organ/internal/parasite/benign_tumour/P = new()
P.parent_organ = organ_to_infest
P.replaced(H, organ_to_infest)
P.generate_name()
@@ -0,0 +1,141 @@
/obj/item/organ/internal/parasite/benign_tumour
name = "benign tumour"
icon = 'icons/obj/organs/organs.dmi'
icon_state = "tumour"
dead_icon = "tumour"
organ_tag = BP_TUMOUR_NONSPREADING
parent_organ = BP_CHEST
subtle = 1
drug_resistance = 1
max_stage = 3
stage_interval = 300 //~5 minutes minutes/stage
origin_tech = list(TECH_BIO = 2)
/obj/item/organ/internal/parasite/benign_tumour/proc/generate_name()
if(parent_organ)
switch(parent_organ)
if(BP_CHEST)
name = "benign chest lipoma"
if(BP_GROIN)
name = "benign abdominal tumour"
if(BP_HEAD)
name = "benign skull cavity tumour"
if(BP_L_ARM)
name = "benign lipoma (left arm)"
if(BP_R_ARM)
name = "benign lipoma (right arm)"
if(BP_L_HAND)
name = "benign chondroma (left hand)"
if(BP_R_HAND)
name = "benign chondroma (right hand)"
if(BP_L_LEG)
name = "benign lipoma (left leg)"
if(BP_R_LEG)
name = "benign lipoma (right leg)"
if(BP_L_FOOT)
name = "benign plantar fibroma (left foot)"
if(BP_R_FOOT)
name = "benign plantar fibroma (right foot)"
/obj/item/organ/internal/parasite/benign_tumour/process()
..()
if (!owner)
return
if(REAGENT_VOLUME(owner.reagents, /singleton/reagent/ryetalyn)) //10u will treat most tumours, 20u will nuke fully developed tumours
recession = 20
if(prob(2))
owner.adjustNutritionLoss(5)
if(stage >= 2) //after ~5 minutes
if(prob(5))
owner.adjustHalLoss(10*stage)
/obj/item/organ/internal/parasite/malignant_tumour
name = "malignant tumour"
icon = 'icons/obj/organs/organs.dmi'
icon_state = "tumour"
dead_icon = "tumour"
organ_tag = BP_TUMOUR_SPREADING
parent_organ = BP_CHEST
subtle = 1
drug_resistance = 1
max_stage = 4
stage_interval = 300 //~5 minutes minutes/stage
origin_tech = list(TECH_BIO = 3)
egg = /singleton/reagent/toxin/malignant_tumour_cells
/obj/item/organ/internal/parasite/malignant_tumour/proc/generate_name()
if(parent_organ)
switch(parent_organ)
if(BP_CHEST)
name = "malignant chest wall sarcoma"
if(BP_GROIN)
name = "gastric cancer"
if(BP_HEAD)
name = "malignant brain tumour"
if(BP_L_ARM)
name = "malignant melanoma (left arm)"
if(BP_R_ARM)
name = "malignant melanoma (right arm)"
if(BP_L_HAND)
name = "malignant chondrosarcoma (left hand)"
if(BP_R_HAND)
name = "malignant chondrosarcoma (right hand)"
if(BP_L_LEG)
name = "malignant melanoma (left leg)"
if(BP_R_LEG)
name = "malignant melanoma (right leg)"
if(BP_L_FOOT)
name = "malignant chondrosarcoma (left foot)"
if(BP_R_FOOT)
name = "malignant chondrosarcoma (right foot)"
/obj/item/organ/internal/parasite/malignant_tumour/process()
..()
if (!owner)
return
if(REAGENT_VOLUME(owner.reagents, /singleton/reagent/ryetalyn)) //10u will treat most tumours, 20u will nuke fully developed tumours
recession = 20
if(prob(5))
owner.adjustNutritionLoss(5)
if(prob(5))
owner.adjustHalLoss((10*stage)/2)
if(stage >= 2) //after ~5 minutes
switch(parent_organ)
if(BP_HEAD)
owner.confused = min(owner.confused + (stage*2), 10)
owner.slurring = min(owner.slurring + (stage*2), 50)
if(prob(5))
to_chat(owner, SPAN_WARNING(pick("You struggle to remember the last several moments.", "You smell something funny.", "You taste something funny.", "You can't figure out how to properly string words together.", "What was I just doing?")))
owner.emote("drool")
if(BP_CHEST)
if(prob(3))
to_chat(owner, SPAN_WARNING(pick("You feel a tightness in your chest.", "You feel a little lightheaded.", "You need to take larger breaths than normal.")))
owner.emote(pick("cough", "gasp"))
if(BP_GROIN)
if(prob(3))
to_chat(owner, SPAN_WARNING(pick("You feel a sharp pain in your gut.", "You feel a little bloated.")))
owner.visible_message("<b>[owner]</b> winces slightly.")
owner.delayed_vomit()
else
if(prob(stage*2))
to_chat(owner, SPAN_WARNING("You feel very lethargic."))
if(stage >= 3) //after ~10 minutes
for(var/obj/item/organ/internal/O in owner.internal_organs)
if(O.parent_organ == parent_organ)
if(BP_IS_ROBOTIC(O))
continue
if(prob(stage*stage))
O.damage = min(O.damage+stage, O.max_damage)
if(stage >= 4) //after 15 minutes
if(prob(3))
owner.reagents.add_reagent(egg, 2) //malignant cells breaking off, enter circulatory/lymphatic nodes to spread