diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index 036a7dbc9e3..d9b17834b33 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -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") diff --git a/code/modules/organs/internal/_internal.dm b/code/modules/organs/internal/_internal.dm index 53ea296fc11..b6f29f66e61 100644 --- a/code/modules/organs/internal/_internal.dm +++ b/code/modules/organs/internal/_internal.dm @@ -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. diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index dffdf66c0b0..7cc80ec1294 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -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 diff --git a/code/modules/organs/subtypes/parasite/tumours.dm b/code/modules/organs/subtypes/parasite/tumours.dm index df5cd9012dd..3e78ada1760 100644 --- a/code/modules/organs/subtypes/parasite/tumours.dm +++ b/code/modules/organs/subtypes/parasite/tumours.dm @@ -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("[owner] 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 diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 9b42df3bc6b..16518c14e4d 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -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." diff --git a/html/changelogs/fluffyghost-ingestedryetalyn.yml b/html/changelogs/fluffyghost-ingestedryetalyn.yml new file mode 100644 index 00000000000..91a91190d18 --- /dev/null +++ b/html/changelogs/fluffyghost-ingestedryetalyn.yml @@ -0,0 +1,59 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Ingested ryetalyn now cures tumors, and does its effect." + - code_imp: "Implemented time-constant STP_PROB in some procs."