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

Ingested ryetalyn #20080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions code/modules/admin/view_variables/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/organs/internal/_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
32 changes: 16 additions & 16 deletions code/modules/organs/subtypes/parasite/tumours.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
59 changes: 59 additions & 0 deletions html/changelogs/fluffyghost-ingestedryetalyn.yml
Original file line number Diff line number Diff line change
@@ -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."
Loading