Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0ffc750
tumors
ToasterBiome Nov 21, 2021
d99b0b1
put organs anywhere
ToasterBiome Nov 22, 2021
298a312
tumors
ToasterBiome Nov 24, 2021
171ee82
nerf spread chance but make it so you lose clothing slots
ToasterBiome Dec 13, 2021
d62b4bf
adds sprites
ToasterBiome Dec 13, 2021
5617a99
regeneration
ToasterBiome Dec 21, 2021
8f1fd3d
nicer zone names
ToasterBiome Dec 21, 2021
eb9f19d
only deal half
ToasterBiome Dec 22, 2021
4763cfe
new shit
ToasterBiome Dec 24, 2021
65c71c0
no mask/hat/suit only when you have visible tumors
ToasterBiome Dec 26, 2021
bee9fb2
adds some nice to_chats and clarifies transmission
ToasterBiome Dec 26, 2021
c921433
no more putting tumors in limbs you dont have
ToasterBiome Dec 27, 2021
dc02f09
yeah cool
ToasterBiome Dec 28, 2021
16b38e2
free healing + maybe fixing the damn limb regeneration
ToasterBiome Jan 5, 2022
609ad7a
regeneration is now per tumor
ToasterBiome Jan 11, 2022
80fe87c
Update code/modules/surgery/organs/tumors.dm
ToasterBiome Feb 16, 2022
6a76541
Update code/modules/surgery/organs/tumors.dm
ToasterBiome Feb 16, 2022
cd069a0
Update code/modules/surgery/organs/tumors.dm
ToasterBiome Feb 16, 2022
30bf51e
Merge remote-tracking branch 'upstream/master' into tumor
ToasterBiome Feb 16, 2022
d721de6
Merge branch 'tumor' of https://github.com/ToasterBiome/Yogstation in…
ToasterBiome Feb 16, 2022
a03a007
Update surgery.dmi
ToasterBiome Feb 16, 2022
b0e1bed
fixes bibby shit
ToasterBiome Mar 18, 2022
20e0062
whoops
ToasterBiome Mar 18, 2022
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
9 changes: 9 additions & 0 deletions code/datums/diseases/advance/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
symptoms = list(new/datum/symptom/necroseed)
..()

/datum/disease/advance/tumor
copy_type = /datum/disease/advance

/datum/disease/advance/tumor/New()
name = "Tumors"
symptoms = list(new/datum/symptom/tumor,new/datum/symptom/sneeze,new/datum/symptom/fever,new/datum/symptom/shivering,new/datum/symptom/itching,new/datum/symptom/cough)
..()


//Randomly generated Disease, for virus crates and events
/datum/disease/advance/random
name = "Experimental Disease"
Expand Down
112 changes: 112 additions & 0 deletions code/datums/diseases/advance/symptoms/tumors.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
//benign, premalignant, malignant tumors

/datum/symptom/tumor
name = "Benign tumors"
desc = "The virus causes benign growths all over your body."
stealth = 0
resistance = 4
stage_speed = -4
transmittable = -4
level = 3
severity = 2
symptom_delay_min = 5
symptom_delay_max = 35
threshold_descs = list(
"Transmission 7" = "Gives visible growths on the host's body, eventually preventing some clothes from being worn.",
"Stealth 4" = "Regenerates limbs that are incredibly fragile.",
"Resistance 8" = "Heals brute and burn damage in exchange for toxin damage."
)
var/regeneration = FALSE
var/helpful = FALSE
var/tumor_chance = 0.5
var/obj/item/organ/tumor/tumortype = /obj/item/organ/tumor
var/datum/disease/advance/ownerdisease //what disease it comes from

/datum/symptom/tumor/Start(datum/disease/advance/A)
. = ..()
if(!.)
return
ownerdisease = A;
if(A.totalTransmittable() >= 7) //visible growths
if(ishuman(A.affected_mob))
A.affected_mob.visible_tumors = TRUE
if(A.totalStealth() >= 4) //regeneration of limbs
regeneration = TRUE
if(A.totalResistance() >= 8) //helpful healing instead of just toxin
helpful = TRUE

/datum/symptom/tumor/Activate(datum/disease/advance/A)
. = ..()

if(!.)
return
var/mob/living/carbon/human/M = A.affected_mob
if(!M)
return

if(M.visible_tumors)
//clothes wearing
if(A.stage > 2)
var/datum/species/S = M.dna?.species
if(S)
S.add_no_equip_slot(M, SLOT_WEAR_MASK)
S.add_no_equip_slot(M, SLOT_HEAD)

if(A.stage == 5)
var/datum/species/S = M.dna?.species
if(S)
S.add_no_equip_slot(M, SLOT_WEAR_SUIT)

//spreading
if(prob(tumor_chance)) //2% chance to make a new tumor somewhere
spread(M)

/datum/symptom/tumor/proc/spread(mob/living/carbon/human/M, from_tumor = FALSE)
if(!M)
return
var/list/possibleZones = list(BODY_ZONE_HEAD,BODY_ZONE_CHEST,BODY_ZONE_L_ARM,BODY_ZONE_R_ARM,BODY_ZONE_L_LEG,BODY_ZONE_R_LEG,BODY_ZONE_PRECISE_EYES,BODY_ZONE_PRECISE_GROIN) - M.get_missing_limbs() //no inserting into magic limbs you dont have
//check if we can put an organ in there
var/insertionZone = pick(possibleZones)
var/insertionAvailable = TRUE
for(var/obj/item/organ/tumor/IT in M.internal_organs)
if(IT.zone == insertionZone)
insertionAvailable = FALSE
if(insertionAvailable)
var/obj/item/organ/tumor/T = new tumortype()
T.name = T.name + " (" + parse_zone(insertionZone) + ")"
T.helpful = helpful
T.regeneration = regeneration
T.ownerdisease = ownerdisease
T.Insert(M,FALSE,FALSE,insertionZone)
if(from_tumor)
to_chat(M, span_warning("[pick("Your insides writhe.", "You feel your insides squirm.")]"))
else
to_chat(M, span_warning("Your [parse_zone(insertionZone)] hurts."))

/datum/symptom/tumor/End(datum/disease/advance/A)
..()
if(ishuman(A.affected_mob))
//unfuck their tumors
var/mob/living/carbon/human/M = A.affected_mob
M.visible_tumors = FALSE
var/datum/species/S = M.dna?.species
if(S)
S.remove_no_equip_slot(M, SLOT_WEAR_MASK)
S.remove_no_equip_slot(M, SLOT_HEAD)
S.remove_no_equip_slot(M, SLOT_WEAR_SUIT)

/datum/symptom/tumor/premalignant
name = "Premalignant tumors"
desc = "The virus causes premalignant growths all over your body."
level = 5
severity = 4
tumor_chance = 1
tumortype = /obj/item/organ/tumor/premalignant

/datum/symptom/tumor/malignant
name = "Malignant tumors"
desc = "The virus causes malignant growths all over your body."
level = 7
severity = 6
tumor_chance = 2
tumortype = /obj/item/organ/tumor/malignant
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/carbon_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@
var/list/all_wounds
/// All of the scars a carbon has afflicted throughout their limbs
var/list/all_scars
var/visible_tumors = FALSE //if you are seem with some tumors, for examine

COOLDOWN_DECLARE(bleeding_message_cd)
COOLDOWN_DECLARE(bleeding_message_cd)
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
if(fire_stacks < 0)
msg += "[t_He] look[p_s()] a little soaked.\n"

if(visible_tumors)
msg += "[t_He] [t_has] has growths all over [t_his] body...\n"

if(pulledby && pulledby.grab_state)
msg += "[t_He] [t_is] restrained by [pulledby]'s grip.\n"

Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@
if(fire_stacks < 0)
msg += "[t_He] look[p_s()] a little soaked.\n"

if(visible_tumors)
msg += "[t_He] [t_has] has growths all over [t_his] body...\n"

if(pulledby && pulledby.grab_state)
msg += "[t_He] [t_is] restrained by [pulledby]'s grip.\n"
Expand Down
5 changes: 5 additions & 0 deletions code/modules/reagents/reagent_containers/bottle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
spawned_disease = /datum/disease/advance/flu

/obj/item/reagent_containers/glass/bottle/tumor
name = "tumor culture bottle"
desc = "A small bottle. Contains tumor culture in synthblood medium."
spawned_disease = /datum/disease/advance/tumor

/obj/item/reagent_containers/glass/bottle/retrovirus
name = "Retrovirus culture bottle"
desc = "A small bottle. Contains a retrovirus culture in a synthblood medium."
Expand Down
7 changes: 5 additions & 2 deletions code/modules/surgery/organs/organ_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
var/high_threshold_cleared
var/low_threshold_cleared

/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE,special_zone = null)
if(!iscarbon(M) || owner == M)
return

if(special_zone)
zone = special_zone

var/obj/item/organ/replaced = M.getorganslot(slot)
if(replaced)
if(replaced && !special_zone)
replaced.Remove(M, special = 1)
if(drop_if_replaced)
replaced.forceMove(get_turf(M))
Expand Down
80 changes: 80 additions & 0 deletions code/modules/surgery/organs/tumors.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#define TUMOR_STRENGTH_WEAK 0.125
#define TUMOR_STRENGTH_AVERAGE 0.25
#define TUMOR_STRENGTH_STRONG 0.5

#define TUMOR_SPREAD_WEAK 0.5
#define TUMOR_SPREAD_AVERAGE 1
#define TUMOR_SPREAD_STRONG 2

/obj/item/organ/tumor
name = "benign tumor"
desc = "Hope there aren't more of these."
icon_state = "tumor"

var/strength = TUMOR_STRENGTH_WEAK
var/spread_chance = TUMOR_SPREAD_WEAK

var/helpful = FALSE //keeping track if they're helpful or not
var/regeneration = FALSE //if limbs are regenerating
var/datum/disease/advance/tumor/ownerdisease //what disease it comes from

/obj/item/organ/tumor/Insert(mob/living/carbon/M, special = 0)
. = ..()
START_PROCESSING(SSobj, src)

/obj/item/organ/tumor/Remove(mob/living/carbon/M, special = 0)
. = ..()
var/tumors_left = FALSE
for(var/obj/item/organ/tumor/IT in owner.internal_organs)
if(IT.ownerdisease == ownerdisease)
tumors_left = TRUE
if(!tumors_left)
//cure the disease, removing all tumors
ownerdisease.cure()
STOP_PROCESSING(SSobj, src)

/obj/item/organ/tumor/process()
if(!owner)
return
if(!(src in owner.internal_organs))
Remove(owner)
if(helpful)
if(owner.getBruteLoss() + owner.getFireLoss() > 0)
owner.adjustToxLoss(strength/2)
owner.adjustBruteLoss(-(strength/2))
owner.adjustFireLoss(-(strength/2))
else
owner.adjustToxLoss(strength) //just take toxin damage
//regeneration
if(regeneration && prob(spread_chance))
var/list/missing_limbs = owner.get_missing_limbs() - list(BODY_ZONE_HEAD, BODY_ZONE_CHEST) //don't regenerate the head or chest
if(missing_limbs.len)
var/limb_to_regenerate = pick(missing_limbs)
owner.regenerate_limb(limb_to_regenerate,TRUE)
var/obj/item/bodypart/new_limb = owner.get_bodypart(limb_to_regenerate)
new_limb.receive_damage(45); //45 brute damage should be fine I think??????
owner.emote("scream")
owner.visible_message(span_warning("Gnarly tumors burst out of [owner]'s stump and form into a [parse_zone(limb_to_regenerate)]!"), span_notice("You scream as your [parse_zone(limb_to_regenerate)] reforms."))
if(prob(spread_chance))
if(ownerdisease)
ownerdisease.spread(owner, TRUE)


/obj/item/organ/tumor/premalignant
name = "premalignant tumor"
desc = "It doesn't look too bad... at least you're not dead, right?"
strength = TUMOR_STRENGTH_AVERAGE
spread_chance = TUMOR_SPREAD_AVERAGE

/obj/item/organ/tumor/malignant
name = "malignant tumor"
desc = "Yikes. There's probably more of these in you."
strength = TUMOR_STRENGTH_STRONG
spread_chance = TUMOR_SPREAD_STRONG

#undef TUMOR_STRENGTH_WEAK
#undef TUMOR_STRENGTH_AVERAGE
#undef TUMOR_STRENGTH_STRONG
#undef TUMOR_SPREAD_WEAK
#undef TUMOR_SPREAD_AVERAGE
#undef TUMOR_SPREAD_STRONG
Binary file modified icons/obj/surgery.dmi
Binary file not shown.
2 changes: 2 additions & 0 deletions yogstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@
#include "code\datums\diseases\advance\symptoms\sneeze.dm"
#include "code\datums\diseases\advance\symptoms\species.dm"
#include "code\datums\diseases\advance\symptoms\symptoms.dm"
#include "code\datums\diseases\advance\symptoms\tumors.dm"
#include "code\datums\diseases\advance\symptoms\viral.dm"
#include "code\datums\diseases\advance\symptoms\vision.dm"
#include "code\datums\diseases\advance\symptoms\voice_change.dm"
Expand Down Expand Up @@ -3100,6 +3101,7 @@
#include "code\modules\surgery\organs\stomach.dm"
#include "code\modules\surgery\organs\tails.dm"
#include "code\modules\surgery\organs\tongue.dm"
#include "code\modules\surgery\organs\tumors.dm"
#include "code\modules\surgery\organs\vocal_cords.dm"
#include "code\modules\swarmers\swarmer.dm"
#include "code\modules\swarmers\swarmer_act.dm"
Expand Down