mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Adds admin-only "Inflict Cancer" button
* Get cancer and die * Give Cancer added to VV * Change process method again * Restore that line * When are we going to fix .gitignore ?
This commit is contained in:
committed by
clusterfack
parent
e427c54239
commit
bfd48c1a99
@@ -268,6 +268,7 @@
|
||||
|
||||
body += {"<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>
|
||||
<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>
|
||||
<option value='?_src_=vars;addcancer=\ref[D]'>Inflict Cancer</option>
|
||||
<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>
|
||||
<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>
|
||||
<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -525,6 +525,7 @@
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/lung_ruptured = ""
|
||||
var/e_cancer = ""
|
||||
|
||||
dat += "<tr>"
|
||||
|
||||
@@ -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 += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
dat += "<td>[e.display_name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][e_cancer][internal_bleeding][lung_ruptured]</td>"
|
||||
else
|
||||
dat += "<td>[e.display_name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
@@ -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 += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection][i_cancer][mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
|
||||
@@ -237,6 +237,9 @@ Subject's pulse: ??? BPM"})
|
||||
if(W.internal)
|
||||
message += text("<br><span class='danger'>Internal bleeding detected. Advanced scan required for location.</span>")
|
||||
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("<br><span class='danger'>Serious cancerous growth detected. Advanced scan required for location.</span>")
|
||||
break
|
||||
if(H.vessel)
|
||||
var/blood_volume = round(H.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = round((blood_volume / 560) * 100)
|
||||
|
||||
@@ -201,6 +201,7 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];tdome2=\ref[M]'>Thunderdome Red</A> |
|
||||
<A href='?src=\ref[src];tdomeadmin=\ref[M]'>Thunderdome Admin</A> |
|
||||
<A href='?src=\ref[src];tdomeobserve=\ref[M]'>Thunderdome Observer</A> |
|
||||
<A href='?src=\ref[src];addcancer=\ref[M]'>Inflict Cancer</A> |
|
||||
"}
|
||||
|
||||
// language toggles
|
||||
|
||||
@@ -1917,6 +1917,21 @@
|
||||
feedback_inc("admin_cookies_spawned",1)
|
||||
to_chat(H, "<span class='notice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -20,31 +20,31 @@
|
||||
|
||||
var/orig_message = msg
|
||||
var/image/cross = image('icons/obj/storage.dmi',"bible")
|
||||
msg = "<span class='notice'>[bicon(cross)] <b><font color='purple'>PRAY (DEITY:[ticker.Bible_deity_name]): </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
|
||||
msg = "<span class='notice'>[bicon(cross)] <b><font color='purple'>PRAY (DEITY:[ticker.Bible_deity_name]): </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;addcancer=\ref[src]'>CANCER</a>):</b> [msg]</span>"
|
||||
|
||||
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 = "<span class='notice'><b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
send_prayer_to_admins(msg,'sound/effects/msn.ogg')
|
||||
msg = "<span class='notice'><b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>) (<A HREF='?_src_=holder;addcancer=\ref[src]'>CANCER</a>):</b> [msg]</span>"
|
||||
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 = "<span class='notice'><b><font color=crimson>SYNDICATE:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
send_prayer_to_admins(msg,'sound/effects/inception.ogg')
|
||||
msg = "<span class='notice'><b><font color=crimson>SYNDICATE:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>) (<A HREF='?_src_=holder;addcancer=\ref[src]'>CANCER</a>):</b> [msg]</span>"
|
||||
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
|
||||
C << sound
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -338,7 +338,62 @@
|
||||
"<span class='warning'>Your hand slips, leaving a small burn on [target]'s [affected.display_name] with \the [tool]!</span>")
|
||||
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("<span class='warning'>[user]'s hand slips, getting mess in and tearing the inside of [target]'s [affected.display_name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, getting mess in and tearing the inside of [target]'s [affected.display_name] with \the [tool]!</span>")
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
////////CUT LIMB/////////
|
||||
/datum/surgery_step/generic/cut_limb
|
||||
|
||||
@@ -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("<span class='warning'>[user]'s hand slips, getting mess on and tearing the inside of [target]'s [affected.display_name] with \the [tool]!</span>", \
|
||||
"<span class='warning'>Your hand slips, getting mess on and tearing the inside of [target]'s [affected.display_name] with \the [tool]!</span>")
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
//////FIX ORGAN ROBOTIC/////
|
||||
/datum/surgery_step/internal/fix_organ_robotic //For artificial organs
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user