diff --git a/code/datums/diseases/advance/presets.dm b/code/datums/diseases/advance/presets.dm index 331364403e32..cf261da1df10 100644 --- a/code/datums/diseases/advance/presets.dm +++ b/code/datums/diseases/advance/presets.dm @@ -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" diff --git a/code/datums/diseases/advance/symptoms/tumors.dm b/code/datums/diseases/advance/symptoms/tumors.dm new file mode 100644 index 000000000000..08b8056bcc55 --- /dev/null +++ b/code/datums/diseases/advance/symptoms/tumors.dm @@ -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 diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index c49455f71b16..c989ec52a3fe 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -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) \ No newline at end of file + COOLDOWN_DECLARE(bleeding_message_cd) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index aaf01080f3f0..f563234e99ac 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -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" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index ba32915496ec..5b449ad1a480 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -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" diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 891f2d247526..8a3c9f7c40b6 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -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." diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 061a034a67a0..d84eee1304ce 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -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)) diff --git a/code/modules/surgery/organs/tumors.dm b/code/modules/surgery/organs/tumors.dm new file mode 100644 index 000000000000..b04a7d4c2145 --- /dev/null +++ b/code/modules/surgery/organs/tumors.dm @@ -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 diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 1519b52c16d6..24fba73d1dc2 100755 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/yogstation.dme b/yogstation.dme index e24438c62a06..cecfdfef576d 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -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" @@ -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"