mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 16:38:22 +01:00
Ingested ryetalyn (#20080)
Ingested ryetalyn now cures tumors, and does its effect. Implemented time-constant STP_PROB in some procs. Fixes #20058
This commit is contained in:
@@ -432,8 +432,10 @@
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
|
||||
return
|
||||
|
||||
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
|
||||
if(!new_organ) return
|
||||
var/new_organ = tgui_input_list(usr, "Please choose an organ to add.", "Add Organ", (subtypesof(/obj/item/organ)))
|
||||
if(!new_organ)
|
||||
to_chat(usr, "No organs to add selected, aborting.")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
@@ -454,7 +456,11 @@
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
|
||||
return
|
||||
|
||||
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
|
||||
var/obj/item/organ/rem_organ = tgui_input_list(usr, "Please choose an organ to remove.", "Remove Organ", M.internal_organs)
|
||||
|
||||
if(!istype(rem_organ))
|
||||
to_chat(usr, "No organs to remove selected, aborting.")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
|
||||
@@ -138,10 +138,10 @@
|
||||
. = "necrotic and dead [.]"
|
||||
. = "[.][name]"
|
||||
|
||||
/obj/item/organ/internal/process()
|
||||
/obj/item/organ/internal/process(seconds_per_tick)
|
||||
..()
|
||||
if(istype(owner) && (toxin_type in owner.chem_effects))
|
||||
take_damage(owner.chem_effects[toxin_type] * 0.1 * PROCESS_ACCURACY, prob(1))
|
||||
take_damage(owner.chem_effects[toxin_type] * 0.1 * PROCESS_ACCURACY, SPT_PROB(1, seconds_per_tick))
|
||||
handle_regeneration()
|
||||
tick_surge_damage() //Yes, this is intentional.
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
/obj/item/organ/proc/can_recover()
|
||||
return (max_damage > 0) && !(status & ORGAN_DEAD) || death_time >= world.time - ORGAN_RECOVERY_THRESHOLD
|
||||
|
||||
/obj/item/organ/process()
|
||||
/obj/item/organ/process(seconds_per_tick)
|
||||
if(loc != owner)
|
||||
owner = null
|
||||
|
||||
|
||||
@@ -41,16 +41,16 @@
|
||||
if(BP_R_FOOT)
|
||||
name = "benign plantar fibroma (right foot)"
|
||||
|
||||
/obj/item/organ/internal/parasite/benign_tumour/process()
|
||||
/obj/item/organ/internal/parasite/benign_tumour/process(seconds_per_tick)
|
||||
..()
|
||||
if (!owner)
|
||||
if(!owner)
|
||||
return
|
||||
if(REAGENT_VOLUME(owner.reagents, /singleton/reagent/ryetalyn)) //10u will treat most tumours, 20u will nuke fully developed tumours
|
||||
if(LAZYACCESS(owner.chem_doses, /singleton/reagent/ryetalyn)) //10u will treat most tumours, 20u will nuke fully developed tumours
|
||||
recession = 20
|
||||
if(prob(2))
|
||||
if(SPT_PROB(2, seconds_per_tick))
|
||||
owner.adjustNutritionLoss(5)
|
||||
if(stage >= 2) //after ~5 minutes
|
||||
if(prob(5))
|
||||
if(SPT_PROB(5, seconds_per_tick))
|
||||
owner.adjustHalLoss(10*stage)
|
||||
|
||||
/obj/item/organ/internal/parasite/malignant_tumour
|
||||
@@ -98,44 +98,44 @@
|
||||
if(BP_R_FOOT)
|
||||
name = "malignant chondrosarcoma (right foot)"
|
||||
|
||||
/obj/item/organ/internal/parasite/malignant_tumour/process()
|
||||
/obj/item/organ/internal/parasite/malignant_tumour/process(seconds_per_tick)
|
||||
..()
|
||||
if (!owner)
|
||||
if(!owner)
|
||||
return
|
||||
if(REAGENT_VOLUME(owner.reagents, /singleton/reagent/ryetalyn)) //10u will treat most tumours, 20u will nuke fully developed tumours
|
||||
if(LAZYACCESS(owner.chem_doses, /singleton/reagent/ryetalyn)) //10u will treat most tumours, 20u will nuke fully developed tumours
|
||||
recession = 20
|
||||
if(prob(5))
|
||||
if(SPT_PROB(5, seconds_per_tick))
|
||||
owner.adjustNutritionLoss(5)
|
||||
if(prob(5))
|
||||
if(SPT_PROB(5, seconds_per_tick))
|
||||
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))
|
||||
if(SPT_PROB(5, seconds_per_tick))
|
||||
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))
|
||||
if(SPT_PROB(3, seconds_per_tick))
|
||||
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))
|
||||
if(SPT_PROB(3, seconds_per_tick))
|
||||
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))
|
||||
if(SPT_PROB(stage*2, seconds_per_tick))
|
||||
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))
|
||||
if(SPT_PROB(stage*stage, seconds_per_tick))
|
||||
O.damage = min(O.damage+stage, O.max_damage)
|
||||
|
||||
if(stage >= 4) //after 15 minutes
|
||||
if(prob(3))
|
||||
if(SPT_PROB(3, seconds_per_tick))
|
||||
owner.reagents.add_reagent(egg, 2) //malignant cells breaking off, enter circulatory/lymphatic nodes to spread
|
||||
|
||||
@@ -738,6 +738,22 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.update_mutations()
|
||||
|
||||
/singleton/reagent/ryetalyn/affect_ingest(mob/living/carbon/M, alien, removed, datum/reagents/holder)
|
||||
. = ..()
|
||||
|
||||
holder.remove_reagent(/singleton/reagent/toxin/malignant_tumour_cells, 2)
|
||||
|
||||
var/needs_mutation_update = M.mutations > 0
|
||||
M.mutations = 0
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
|
||||
// Might need to update appearance for hulk etc.
|
||||
if(needs_mutation_update && ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.update_mutations()
|
||||
|
||||
|
||||
/singleton/reagent/hyperzine
|
||||
name = "Hyperzine"
|
||||
description = "Hyperzine is a complex cardio-synaptic stimulant drug designed to increase the performance of the body. Downsides include violent muscle spasms and tremors."
|
||||
|
||||
Reference in New Issue
Block a user