diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 604417f662f..de218b3b9cd 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -268,6 +268,7 @@ body += {" + @@ -541,6 +542,21 @@ body src.give_disease(M) href_list["datumrefresh"] = href_list["give_spell"] + else if(href_list["addcancer"]) + if(!check_rights(R_ADMIN|R_FUN)) return + + var/mob/living/carbon/human/H = locate(href_list["addcancer"]) + if(!ishuman(H)) + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + return + + if(alert(usr, "Are you sure you wish to inflict cancer upon [key_name(H)]?", "Confirm Cancer?" , "Yes" , "No") != "Yes") + return + + log_admin("[key_name(H)] was inflicted with cancer, courtesy of [key_name(usr)]") + message_admins("[key_name(H)] was inflicted with cancer, courtesy of [key_name(usr)]") + H.add_cancer() + else if(href_list["godmode"]) if(!check_rights(R_REJUVINATE)) return diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index cc525be2e58..bc34ba52b4d 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -525,6 +525,7 @@ var/splint = "" var/internal_bleeding = "" var/lung_ruptured = "" + var/e_cancer = "" dat += "" @@ -571,10 +572,20 @@ if(unknown_body || e.hidden) imp += "Unknown body present:" - if(!AN && !open && !infected & !imp) + switch(e.cancer_stage) + if(CANCER_STAGE_BENIGN to CANCER_STAGE_SMALL_TUMOR) + e_cancer = "Benign Tumor:" + if(CANCER_STAGE_SMALL_TUMOR to CANCER_STAGE_LARGE_TUMOR) + e_cancer = "Small Tumor:" + if(CANCER_STAGE_LARGE_TUMOR to CANCER_STAGE_METASTASIS) + e_cancer = "Large Tumor:" + if(CANCER_STAGE_METASTASIS to INFINITY) + e_cancer = "Metastatic Tumor:" + + if(!AN && !open && !infected && !e_cancer & !imp) AN = "None:" if(!(e.status & ORGAN_DESTROYED)) - dat += "[e.display_name][e.burn_dam][e.brute_dam][robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]" + dat += "[e.display_name][e.burn_dam][e.brute_dam][robot][bled][AN][splint][open][infected][imp][e_cancer][internal_bleeding][lung_ruptured]" else dat += "[e.display_name]--Not Found" dat += "" @@ -601,8 +612,19 @@ if (INFECTION_LEVEL_TWO + 300 to INFINITY) infection = "Acute Infection++:" + var/i_cancer + switch(i.cancer_stage) + if(CANCER_STAGE_BENIGN to CANCER_STAGE_SMALL_TUMOR) + i_cancer = "Benign Tumor:" + if(CANCER_STAGE_SMALL_TUMOR to CANCER_STAGE_LARGE_TUMOR) + i_cancer = "Small Tumor:" + if(CANCER_STAGE_LARGE_TUMOR to CANCER_STAGE_METASTASIS) + i_cancer = "Large Tumor:" + if(CANCER_STAGE_METASTASIS to INFINITY) + i_cancer = "Metastatic Tumor:" + dat += "" - dat += "[i.name]N/A[i.damage][infection]:[mech]" + dat += "[i.name]N/A[i.damage][infection][i_cancer][mech]" dat += "" dat += "" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index bbf7ec16098..7d72c5b4af4 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -237,6 +237,9 @@ Subject's pulse: ??? BPM"}) if(W.internal) message += text("
Internal bleeding detected. Advanced scan required for location.") break + if(e.cancer_stage > CANCER_STAGE_LARGE_TUMOR) //Health analyzers can detect large tumors and above in external limbs, if all else fails + message += text("
Serious cancerous growth detected. Advanced scan required for location.") + break if(H.vessel) var/blood_volume = round(H.vessel.get_reagent_amount("blood")) var/blood_percent = round((blood_volume / 560) * 100) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ec7dfd83f83..e5736c33177 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -201,6 +201,7 @@ var/global/floorIsLava = 0 Thunderdome Red | Thunderdome Admin | Thunderdome Observer | + Inflict Cancer | "} // language toggles diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index da87bc4ed21..ddbc7ba495c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1917,6 +1917,21 @@ feedback_inc("admin_cookies_spawned",1) to_chat(H, "Your prayers have been answered!! You received the best cookie!") + else if(href_list["addcancer"]) + if(!check_rights(R_ADMIN|R_FUN)) return + + var/mob/living/carbon/human/H = locate(href_list["addcancer"]) + if(!ishuman(H)) + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + return + + if(alert(src.owner, "Are you sure you wish to inflict cancer upon [key_name(H)]?", "Confirm Cancer?" , "Yes" , "No") != "Yes") + return + + log_admin("[key_name(H)] was inflicted with cancer, courtesy of [key_name(src.owner)]") + message_admins("[key_name(H)] was inflicted with cancer, courtesy of [key_name(src.owner)]") + H.add_cancer() + else if(href_list["BlueSpaceArtillery"]) if(!check_rights(R_ADMIN|R_FUN)) return diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 6fa8e8fe9bb..d56a15230d5 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -20,31 +20,31 @@ var/orig_message = msg var/image/cross = image('icons/obj/storage.dmi',"bible") - msg = "[bicon(cross)] PRAY (DEITY:[ticker.Bible_deity_name]): [key_name(src, 1)] (?) (PP) (VV) (SM) (JMP) (CA) (SC): [msg]" + msg = "[bicon(cross)] PRAY (DEITY:[ticker.Bible_deity_name]): [key_name(src, 1)] (?) (PP) (VV) (SM) (JMP) (CA) (SC) (CA) (CANCER): [msg]" - send_prayer_to_admins(msg,'sound/effects/prayer.ogg') + send_prayer_to_admins(msg, 'sound/effects/prayer.ogg') if(!stat) usr.whisper(orig_message) to_chat(usr, "Your prayers have been received by the gods.") - feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + feedback_add_details("admin_verb", "PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /proc/Centcomm_announce(var/text , var/mob/Sender) var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN) - msg = "CENTCOMM:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" - send_prayer_to_admins(msg,'sound/effects/msn.ogg') + msg = "CENTCOMM:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY) (CANCER): [msg]" + send_prayer_to_admins(msg, 'sound/effects/msn.ogg') /proc/Syndicate_announce(var/text , var/mob/Sender) var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN) - msg = "SYNDICATE:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" - send_prayer_to_admins(msg,'sound/effects/inception.ogg') + msg = "SYNDICATE:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY) (CANCER): [msg]" + send_prayer_to_admins(msg, 'sound/effects/inception.ogg') /proc/send_prayer_to_admins(var/msg,var/sound) for(var/client/C in admins) if(C.prefs.toggles & CHAT_PRAYER) if(C.prefs.special_popup) - C << output(msg, "window1.msay_output")//if i get told to make this a proc imma be fuckin mad + C << output(msg, "window1.msay_output") //If i get told to make this a proc imma be fuckin mad else to_chat(C, msg) - C << sound \ No newline at end of file + C << sound diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 16953b09f16..a9c817ceda6 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -349,3 +349,19 @@ This function restores all organs. update_icon = 1 qdel(F) return 1 + +//Adds cancer, including stage of cancer and limb +//Right now cancer is adminbus only. You can inflict it via the full (old) Player Panel and all "prayer types" (includes Centcomm message) +//Of course, should it ever come back for realsies, that's the right way to do it. But let's not be silly now +//IMPORTANT NOTE: Currently only works on external organs, because the person who wrote organ code has brain cancer, hopefully I will sweep back to fix this in a later PR +//Since I'd have to change hundreds of procs going through organs, that's not something I'll do now +/mob/living/carbon/human/proc/add_cancer(var/stage = 1, var/target) + + var/datum/organ/picked_organ + if(target) + picked_organ = organs_by_name["[target]"] + else + picked_organ = pick(organs) + + if(picked_organ) + picked_organ.cancer_stage += stage //This can pick a limb which already has cancer, in which case it will add to it diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 78c35089e72..d752ef31c29 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -9,6 +9,7 @@ //Links chemical IDs to number of ticks for which they'll stay in the blood var/germ_level = 0 //INTERNAL germs inside the organ, this is BAD if it's greater than INFECTION_LEVEL_ONE + var/cancer_stage = 0 //Cancer growth inside the organ, anything above 0 is very bad. See handle_cancer() below /datum/organ/proc/CanInsert(var/mob/living/carbon/human/H, var/mob/surgeon=null, var/quiet=0) return 1 @@ -92,7 +93,6 @@ //Takes care of organ related updates, such as broken and missing limbs /mob/living/carbon/human/proc/handle_organs() - number_wounds = 0 var/stand_broken = 0 //We cannot stand because one of our legs or foot is completely broken and unsplinted, or missing var/force_process = 0 @@ -100,15 +100,21 @@ if(damage_this_tick > last_dam) force_process = 1 last_dam = damage_this_tick - if(force_process) - bad_external_organs.len = 0 - for(var/datum/organ/external/Ex in organs) - bad_external_organs += Ex //Processing internal organs is pretty cheap, do that first. for(var/datum/organ/internal/I in internal_organs) I.process() + if(force_process) //Force all limbs to be updated, period + bad_external_organs.len = 0 + for(var/datum/organ/external/Ex in organs) + bad_external_organs += Ex + + //Cancer check + for(var/datum/organ/external/Ec in organs) + if(Ec.cancer_stage) + Ec.handle_cancer() + //Also handles some internal organ processing when the organs are missing completely. //Only handles missing liver and kidneys for now. //This is a bit harsh, but really if you're missing an entire bodily organ you're in deep shit. @@ -122,12 +128,13 @@ if(!kidney || kidney.status & ORGAN_CUT_AWAY) reagents.add_reagent("toxin", rand(1, 3)) - if(!force_process && !bad_external_organs.len) + if(!force_process && !bad_external_organs.len) //Nothing to update, just drop it return for(var/datum/organ/external/E in bad_external_organs) if(!E) continue + if(!E.need_process()) bad_external_organs -= E continue @@ -206,3 +213,36 @@ //Has limbs to move around if at least one arm or leg is at least partially there can_stand = (canstand_l && canstand_r) has_limbs = hasleg_l || hasleg_r || hasarm_l || hasarm_r + +//Cancer, right now adminbus only +//When triggered, cancer starts growing inside the affected organ. Once it grows worse enough, you start having really serious effects +//When it grows REALLY bad, it just metastates, and then you die really hard. Takes 30 minutes, 25 from firs visible symptoms, so no way you can't anticipate +//For limb-specific effects, check each limb for sub-procs + +/datum/organ/proc/handle_cancer() + + if(!cancer_stage) //This limb isn't cancerous, nothing to do in here + return 0 + + if(cancer_stage < CANCER_STAGE_BENIGN) //Abort immediately if the cancer has been suppresed + return 0 + + //List of reagents which will affect cancerous growth + //Phalanximine and Medical Nanobots are the only reagent which can reverse cancerous growth in high doses, the others can stall it, some can even accelerate it + //Every "unit" here corresponds to a tick of cancer growth, so for example 20 units of Phalanximine counters one unit of cancer growth + var/phalanximine = owner.reagents.get_reagent_amount("phalanximine") / 20 //Phalanximine only works in large doses, but can actually cure cancer past the threshold unlike all other reagents below + var/medbots = owner.reagents.get_reagent_amount("mednanobots") //Medical nanobots for a cancer-free future tomorrow. Try not to overdose them, powerful enough to not risk going above 5u + var/hardcores = owner.reagents.get_reagent_amount("bustanut") //Bustanuts contain the very essence of Bustatime, stalling even the most robust ailments with a small dose + var/ryetalyn = owner.reagents.get_reagent_amount("ryetalyn") //Ryetalin will very easily suppress the rogue DNA in cancer cells, but cannot actually cure it, you need to destroy the cells + var/holywater = owner.reagents.get_reagent_amount("holywater") / 10 //Holy water has very potent effects with stalling cancer + var/mutagen = owner.reagents.get_reagent_amount("mutagen") / 10 //Mutagen will cause disastrous cancer growth if there already is one. It's the virus food of tumors + + var/cancerous_growth = 1 //Every tick, cancer grows by one tick, without any external factors + + cancerous_growth -= min(1, hardcores + holywater + ryetalyn - mutagen) + phalanximine + medbots //Simple enough, mut helps cancer growth, hardcores and holywater stall it, phalanx and medbots cure it + cancer_stage += cancerous_growth + + //Cancer has a single universal sign. Coughing. Has a chance to happen every tick + //Most likely not medically accurate, but whocares.ru + if(prob(1)) + owner.emote("cough") diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 1597caa0f36..5ff2fa5cfd7 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -206,6 +206,8 @@ perma_injury = 0 brute_dam = 0 burn_dam = 0 + cancer_stage = 0 + germ_level = 0 //Handle internal organs for(var/datum/organ/internal/current_organ in internal_organs) @@ -294,6 +296,7 @@ return 0 /datum/organ/external/process() + //Process wounds, doing healing etc. Only do this every few ticks to save processing power if(owner.life_tick % wound_update_accuracy == 0) update_wounds() @@ -310,6 +313,7 @@ if(!destspawn && config.limbs_can_break) droplimb() return + if(parent) if(parent.status & ORGAN_DESTROYED) status |= ORGAN_DESTROYED @@ -323,7 +327,30 @@ perma_injury = 0 update_germs() - return + +//Cancer growth for external organs is simple, it grows, hurts, damages, and suddenly grows out of control +//Limb cancer is relatively benign until it grows large, then it cripples you and metastases +/datum/organ/external/handle_cancer() + + ..() + + switch(cancer_stage) + if(CANCER_STAGE_SMALL_TUMOR to CANCER_STAGE_LARGE_TUMOR) //Small tumors will not damage your limb, but might flash pain + if(prob(1)) + owner.custom_pain("You feel a stabbing pain in your [display_name]!", 1) + if(CANCER_STAGE_LARGE_TUMOR to CANCER_STAGE_METASTASIS) //Large tumors will start damaging your limb and give the owner DNA damage (bodywide, can't go per limb) + if(prob(20)) + take_damage(0.5, 0, 0, used_weapon = "tumor growth") + owner.custom_pain("You feel a stabbing pain in your [display_name]!", 1) + if(prob(1)) + owner.apply_damage(0.5, CLONE, src) + if(CANCER_STAGE_METASTASIS to INFINITY) //Metastasis achieved, limb will start breaking down very rapidly, and cancer will spread to all other limbs in short order through bloodstream + if(prob(50)) + take_damage(0.5, 0, 0, used_weapon = "tumor metastasis") + if(prob(20)) + owner.apply_damage(0.5, CLONE, src) + if(prob(1)) + owner.add_cancer() //Add a new cancerous growth //Updating germ levels. Handles organ germ levels and necrosis. /* @@ -344,6 +371,7 @@ INFECTION_LEVEL_THREE above this germ level the player will take additional toxi Note that amputating the affected organ does in fact remove the infection from the player's body. */ + /datum/organ/external/proc/update_germs() if(!is_existing() || !is_organic()) //Needs to be organic and existing germ_level = 0 diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 51ffca14a27..ad93d2388e7 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -32,7 +32,9 @@ return I /datum/organ/internal/proc/rejuvenate() - damage=0 + damage = 0 + germ_level = 0 + cancer_stage = 0 /datum/organ/internal/proc/is_bruised() return damage >= min_bruised_damage @@ -61,7 +63,7 @@ germ_level = 0 return - if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs + if(owner.bodytemperature >= 170) //cryo stops germs and cancer from moving and doing their bad stuffs //** Handle antibiotics and curing infections handle_antibiotics() @@ -108,6 +110,33 @@ take_damage(5) owner.reagents.add_reagent("toxin", rand(3,5)) + if(cancer_stage) + handle_cancer() + +/datum/organ/internal/handle_cancer() + + if(robotic == 2) //This is a fully robotic limb, no cells for cancer to grow from + return 0 + + var/datum/organ/external/parent = owner.get_organ(parent_organ) + + switch(cancer_stage) + if(CANCER_STAGE_SMALL_TUMOR to CANCER_STAGE_LARGE_TUMOR) //Small tumors will not damage your organ, but might flash pain + if(prob(1)) + owner.custom_pain("Something inside your [parent.display_name] hurts a lot.", 1) + if(CANCER_STAGE_LARGE_TUMOR to CANCER_STAGE_METASTASIS) //Large tumors will start damaging your organ and give the owner DNA damage (bodywide, can't go per limb) + if(prob(20)) + take_damage(0.25) + if(prob(1)) + owner.apply_damage(0.5, CLONE, parent) + if(CANCER_STAGE_METASTASIS to INFINITY) //Metastasis achieved, limb will start breaking down very rapidly, and cancer will spread to all other limbs in short order through bloodstream + if(prob(33)) + take_damage(0.25) + if(prob(10)) + owner.apply_damage(0.5, CLONE, parent) + if(prob(1)) + owner.add_cancer() //Add a new cancerous growth + /datum/organ/internal/proc/take_damage(amount, var/silent=0) if(!owner) return if(src.robotic == 2) @@ -159,7 +188,10 @@ INTERNAL ORGANS DEFINES ****************************************************/ -/datum/organ/internal/heart // This is not set to vital because death immediately occurs in blood.dm if it is removed. +//All the internal organs without specific code to them are below +//Hopefully this will be filled in soon ? + +/datum/organ/internal/heart //This is not set to vital because death immediately occurs in blood.dm if it is removed. name = "heart" parent_organ = "chest" removed_type = /obj/item/organ/heart diff --git a/code/modules/surgery/eye.dm b/code/modules/surgery/eye.dm index 760239dda1e..2ca38d7869f 100644 --- a/code/modules/surgery/eye.dm +++ b/code/modules/surgery/eye.dm @@ -123,8 +123,6 @@ target.apply_damage(10, BRUTE, affected) eyes.take_damage(5, 0) - - //////CAUTERIZE/////// /datum/surgery_step/eye/cauterize/tool_quality(obj/item/tool) if(tool.is_hot()) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 730169db19a..093ceb84772 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -338,7 +338,62 @@ "Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!") target.apply_damage(3, BURN, affected) +////////FIX LIMB CANCER//////// +/datum/surgery_step/generic/fix_limb_cancer + allowed_tools = list( + /obj/item/weapon/FixOVein = 100, + /obj/item/stack/cable_coil = 75, + ) + + priority = 4 //Maximum priority, even higher than fixing brain hematomas + min_duration = 90 + max_duration = 110 + blood_level = 1 + +/datum/surgery_step/internal/fix_organ_cancer/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(..()) + var/datum/organ/external/affected = target.get_organ(target_zone) + + var/cancer_found = 0 + if(affected.cancer_stage >= 1) + cancer_found = 1 + return affected.open == 1 && cancer_found + +/datum/surgery_step/internal/fix_organ_cancer/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + if(affected && affected.cancer_stage >= 1) + user.visible_message("[user] starts carefully removing the cancerous growths in [target]'s [affected.name] with \the [tool].", \ + "You start carefully removing the cancerous growths in [target]'s [affected.name] with \the [tool]." ) + + target.custom_pain("The pain in your [affected.display_name] is living hell!", 1) + ..() + +/datum/surgery_step/internal/fix_organ_cancer/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + if(affected && affected.cancer_stage >= 1) + user.visible_message("[user] carefully removes and mends the area around the cancerous growths in [target]'s [affected.name] with \the [tool].", \ + "You carefully remove and mends the area around the cancerous growths in [target]'s [affected.name] with \the [tool]." ) + affected.cancer_stage = 0 + +/datum/surgery_step/internal/fix_organ_cancer/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + user.visible_message("[user]'s hand slips, getting mess in and tearing the inside of [target]'s [affected.display_name] with \the [tool]!", \ + "Your hand slips, getting mess in and tearing the inside of [target]'s [affected.display_name] with \the [tool]!") + affected.createwound(CUT, 10) ////////CUT LIMB///////// /datum/surgery_step/generic/cut_limb diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 96f0be023ff..4e2d9de7fa1 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -150,7 +150,66 @@ if(I && I.damage > 0) I.take_damage(dam_amt,0) +//////FIX ORGAN CANCER//// +/datum/surgery_step/internal/fix_organ_cancer + allowed_tools = list( + /obj/item/weapon/FixOVein = 100, + /obj/item/stack/cable_coil = 75, + ) + priority = 4 //Maximum priority, even higher than fixing brain hematomas + min_duration = 90 + max_duration = 110 + blood_level = 1 + +/datum/surgery_step/internal/fix_organ_cancer/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + var/cancer_found = 0 + for(var/datum/organ/internal/I in affected.internal_organs) + if(I.cancer_stage >= 1) + cancer_found = 1 + break + return ..() && cancer_found + +/datum/surgery_step/internal/fix_organ_cancer/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + for(var/datum/organ/internal/I in affected.internal_organs) + if(I && I.cancer_stage >= 1) + user.visible_message("[user] starts carefully removing the cancerous growths in [target]'s [I.name] with \the [tool].", \ + "You start carefully removing the cancerous growths in [target]'s [I.name] with \the [tool]." ) + + target.custom_pain("The pain in your [affected.display_name] is living hell!", 1) + ..() + +/datum/surgery_step/internal/fix_organ_cancer/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + for(var/datum/organ/internal/I in affected.internal_organs) + if(I && I.cancer_stage >= 1) + user.visible_message("[user] carefully removes and mends the area around the cancerous growths in [target]'s [I.name] with \the [tool].", \ + "You carefully remove and mends the area around the cancerous growths in [target]'s [I.name] with \the [tool]." ) + I.cancer_stage = 0 + +/datum/surgery_step/internal/fix_organ_cancer/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + if(!hasorgans(target)) + return + var/datum/organ/external/affected = target.get_organ(target_zone) + + user.visible_message("[user]'s hand slips, getting mess on and tearing the inside of [target]'s [affected.display_name] with \the [tool]!", \ + "Your hand slips, getting mess on and tearing the inside of [target]'s [affected.display_name] with \the [tool]!") + affected.createwound(CUT, 10) //////FIX ORGAN ROBOTIC///// /datum/surgery_step/internal/fix_organ_robotic //For artificial organs diff --git a/code/setup.dm b/code/setup.dm index f2a90ebd6bf..79cdf238d2e 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -1478,3 +1478,9 @@ var/proccalls = 1 #define DMM_IGNORE_NPCS 8 #define DMM_IGNORE_PLAYERS 16 #define DMM_IGNORE_MOBS 24 + +//Cancer defines for the scanners +#define CANCER_STAGE_BENIGN 1 //Not 100 % medically correct, but we'll assume benign cancer never fails to worsen. No effect, but can be detected before it fucks you up. Instant +#define CANCER_STAGE_SMALL_TUMOR 300 //Cancer starts to have small effects depending on what the affected limb is, generally inconclusive ones. 5 minutes +#define CANCER_STAGE_LARGE_TUMOR 900 //Cancer starts to have serious effects depending on what the affected limb is, generally obvious one, up to visible tumor growth. 15 minutes +#define CANCER_STAGE_METASTASIS 1800 //Cancer has maximal effects, growing out of control in the organ, and can start "colonizing" other organs very quickly, dooming the patient. 30 minutes