Well it compiles; just synthtissue and TongueLoss now.
This commit is contained in:
@@ -254,6 +254,9 @@
|
||||
|
||||
#define MAX_QUIRKS 6 //The maximum amount of quirks one character can have at roundstart
|
||||
|
||||
#define MAX_REVIVE_FIRE_DAMAGE 180
|
||||
#define MAX_REVIVE_BRUTE_DAMAGE 180
|
||||
|
||||
// AI Toggles
|
||||
#define AI_CAMERA_LUMINOSITY 5
|
||||
#define AI_VOX // Comment out if you don't want VOX to be enabled and have players download the voice sounds.
|
||||
|
||||
@@ -295,7 +295,6 @@ Versioning
|
||||
var/sqlbrute = L.getBruteLoss()
|
||||
var/sqlfire = L.getFireLoss()
|
||||
var/sqlbrain = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
var/sqlbrain = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
var/sqloxy = L.getOxyLoss()
|
||||
var/sqltox = L.getToxLoss()
|
||||
var/sqlclone = L.getCloneLoss()
|
||||
@@ -309,7 +308,7 @@ Versioning
|
||||
|
||||
if(!SSdbcore.Connect())
|
||||
return
|
||||
|
||||
|
||||
sqlname = sanitizeSQL(sqlname)
|
||||
sqlkey = sanitizeSQL(sqlkey)
|
||||
sqljob = sanitizeSQL(sqljob)
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
unattached_flesh.Cut()
|
||||
|
||||
H.setCloneLoss(CLONE_INITIAL_DAMAGE) //Yeah, clones start with very low health, not with random, because why would they start with random health
|
||||
H.setBrainLoss(CLONE_INITIAL_DAMAGE)
|
||||
H.setOrganLoss(ORGAN_SLOT_BRAIN, CLONE_INITIAL_DAMAGE)
|
||||
// In addition to being cellularly damaged and having barely any
|
||||
|
||||
// brain function, they also have no limbs or internal organs.
|
||||
|
||||
@@ -451,7 +451,7 @@
|
||||
if(!heart || (heart.organ_flags & ORGAN_FAILING))
|
||||
return
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || BR.suicided)
|
||||
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || H.suiciding)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
@@ -568,12 +568,11 @@
|
||||
if(do_after(user, primetimer, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
|
||||
playsound(src, 'sound/machines/defib_charge.ogg', 75, 0)
|
||||
var/tplus = world.time - H.timeofdeath
|
||||
// patients rot when they are killed, and die when they are dead
|
||||
var/tplus = world.time - H.timeofdeath //length of time spent dead
|
||||
var/tloss = deathtimer
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
var/tplus = world.time - H.timeofdeath //length of time spent dead
|
||||
var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart)
|
||||
if(do_after(user, primetimer2, target = H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
|
||||
for(var/obj/item/carried_item in H.contents)
|
||||
@@ -614,11 +613,11 @@
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain tissue is damaged making recovery of patient impossible via defibrillator. Further attempts futile.</span>"
|
||||
if(BR.brain_death)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain damaged beyond point of no return. Further attempts futile.</span>"
|
||||
if(BR.suicided || BR.brainmob?.suiciding)
|
||||
if(H.suicided || BR.brainmob?.suiciding)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No intelligence pattern can be detected in patient's brain. Further attempts futile.</span>"
|
||||
else
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing. Further attempts futile.</span>"
|
||||
|
||||
|
||||
|
||||
if(failed)
|
||||
user.visible_message(failed)
|
||||
|
||||
@@ -243,11 +243,11 @@ SLIME SCANNER
|
||||
healthy = FALSE
|
||||
msg += "\t<span class='alert'>Subject is deaf.</span>\n"
|
||||
else
|
||||
if(ears.ear_damage)
|
||||
msg += "\t<span class='alert'>Subject has [ears.ear_damage > UNHEALING_EAR_DAMAGE? "permanent ": "temporary "]hearing damage.</span>\n"
|
||||
if(ears.damage)
|
||||
to_chat(user, "\t<span class='alert'>Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.</span>")
|
||||
healthy = FALSE
|
||||
if(ears.deaf)
|
||||
msg += "\t<span class='alert'>Subject is [ears.ear_damage > UNHEALING_EAR_DAMAGE ? "permanently ": "temporarily "] deaf.</span>\n"
|
||||
to_chat(user, "\t<span class='alert'>Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.</span>")
|
||||
healthy = FALSE
|
||||
if(healthy)
|
||||
msg += "\t<span class='info'>Healthy.</span>\n"
|
||||
@@ -263,13 +263,13 @@ SLIME SCANNER
|
||||
if(HAS_TRAIT(C, TRAIT_NEARSIGHT))
|
||||
msg += "\t<span class='alert'>Subject is nearsighted.</span>\n"
|
||||
healthy = FALSE
|
||||
if(eyes.eye_damage > 30)
|
||||
if(eyes.damage > 30)
|
||||
msg += "\t<span class='alert'>Subject has severe eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
else if(eyes.eye_damage > 20)
|
||||
else if(eyes.damage > 20)
|
||||
msg += "\t<span class='alert'>Subject has significant eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
else if(eyes.eye_damage)
|
||||
else if(eyes.damage)
|
||||
msg += "\t<span class='alert'>Subject has minor eye damage.</span>\n"
|
||||
healthy = FALSE
|
||||
if(healthy)
|
||||
@@ -292,7 +292,7 @@ SLIME SCANNER
|
||||
msg += "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>\n"
|
||||
for(var/obj/item/bodypart/org in damaged)
|
||||
msg += "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]\n"
|
||||
|
||||
|
||||
//Organ damages report
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -345,9 +345,6 @@ SLIME SCANNER
|
||||
to_chat(user, minor_damage)
|
||||
to_chat(user, major_damage)
|
||||
to_chat(user, max_damage)
|
||||
//Genetic damage
|
||||
if(advanced && H.has_dna())
|
||||
to_chat(user, "\t<span class='info'>Genetic Stability: [H.dna.stability]%.</span>")
|
||||
|
||||
|
||||
// Species and body temperature
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
if(istype(C))
|
||||
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
B.vital = FALSE
|
||||
B.organ_flags &= ~ORGAN_VITAL
|
||||
B.decoy_override = TRUE
|
||||
update_changeling_icons_added()
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
B = new C.dna.species.mutant_brain()
|
||||
else
|
||||
B = new()
|
||||
B.vital = FALSE
|
||||
B.organ_flags &= ~ORGAN_VITAL
|
||||
B.decoy_override = TRUE
|
||||
B.Insert(C)
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_BRAIN
|
||||
organ_flags |= ORGAN_VITAL
|
||||
organ_flags = ORGAN_VITAL
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
///The brain's organ variables are significantly more different than the other organs, with half the decay rate for balance reasons, and twice the maxHealth
|
||||
decay_factor = STANDARD_ORGAN_DECAY / 2 //30 minutes of decaying to result in a fully damaged brain, since a fast decay rate would be unfun gameplay-wise
|
||||
@@ -16,7 +16,7 @@
|
||||
low_threshold = 45
|
||||
high_threshold = 120
|
||||
var/mob/living/brain/brainmob = null
|
||||
var/organ_flags & ORGAN_FAILING = FALSE //whether the brain organ is damaged.
|
||||
var/brain_death = FALSE //if the brainmob was intentionally killed by attacking the brain after removal, or by severe braindamage
|
||||
var/decoy_override = FALSE //I apologize to the security players, and myself, who abused this, but this is going to go.
|
||||
//two variables necessary for calculating whether we get a brain trauma or not
|
||||
var/damage_delta = 0
|
||||
@@ -103,16 +103,16 @@
|
||||
|
||||
if((organ_flags & ORGAN_FAILING) && O.is_drainable() && O.reagents.has_reagent("neurine")) //Neurine fixes dead brains
|
||||
. = TRUE //don't do attack animation.
|
||||
var/cached_Bdamage = brainmob?.health
|
||||
var/cached_Bdamage = brainmob?.health
|
||||
var/datum/reagent/medicine/neurine/N = reagents.has_reagent("neurine")
|
||||
|
||||
if(O.reagents.has_reagent("mannitol")//Just a quick way to bolster the effects if someone mixes up a batch.
|
||||
if(O.reagents.has_reagent("mannitol"))//Just a quick way to bolster the effects if someone mixes up a batch.
|
||||
N.volume *= 1.5
|
||||
|
||||
if(!O.reagents.has_reagent("neurine", 10))
|
||||
to_chat(user, "<span class='warning'>There's not enough neurine in [O] to restore [src]!</span>")
|
||||
return
|
||||
|
||||
|
||||
user.visible_message("<span class='notice'>[user] starts to pour the contents of [O] onto [src].</span>", "<span class='notice'>You start to slowly pour the contents of [O] onto [src].</span>")
|
||||
if(!do_after(user, 60, TRUE, src))
|
||||
to_chat(user, "<span class='warning'>You failed to pour [O] onto [src]!</span>")
|
||||
@@ -123,10 +123,10 @@
|
||||
O.reagents.clear_reagents()
|
||||
|
||||
if(cached_Bdamage) //Fixing dead brains yeilds a trauma
|
||||
if(cached_Bdamage <= HEALTH_THRESHOLD_DEAD && brainmob.health > HEALTH_THRESHOLD_DEAD)
|
||||
if((cached_Bdamage <= HEALTH_THRESHOLD_DEAD) && (brainmob.health > HEALTH_THRESHOLD_DEAD))
|
||||
if(prob(90))
|
||||
gain_trauma_type(BRAIN_TRAUMA_MILD)
|
||||
if else(prob(50))
|
||||
else if(prob(50))
|
||||
gain_trauma_type(BRAIN_TRAUMA_SEVERE)
|
||||
else
|
||||
gain_trauma_type(BRAIN_TRAUMA_SPECIAL)
|
||||
@@ -136,8 +136,8 @@
|
||||
. = TRUE //don't do attack animation.
|
||||
var/datum/reagent/medicine/mannitol/M = reagents.has_reagent("mannitol")
|
||||
if(brain_death || brainmob?.health <= HEALTH_THRESHOLD_DEAD) //if the brain is fucked anyway, do nothing
|
||||
to_chat(user, "<span class='warning'>[src] is far too damaged, you'll have to use neurine on it!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='warning'>[src] is far too damaged, you'll have to use neurine on it!</span>")
|
||||
return
|
||||
|
||||
if(!O.reagents.has_reagent("mannitol", 10))
|
||||
to_chat(user, "<span class='warning'>There's not enough mannitol in [O] to restore [src]!</span>")
|
||||
@@ -152,13 +152,13 @@
|
||||
setOrganDamage((damage - (0.05 * maxHealth)*M.volume)) //heals a small amount, and by using "setorgandamage", we clear the failing variable if that was up
|
||||
O.reagents.clear_reagents()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/organ/brain/examine(mob/user)//BUG_PROBABLE_CAUSE to_chats changed to . +=
|
||||
|
||||
/obj/item/organ/brain/examine(mob/user)//BUG_PROBABLE_CAUSE to_chats changed to . +=
|
||||
. = ..()
|
||||
|
||||
if(suicided)
|
||||
if(user.suiciding)
|
||||
. += "<span class='info'>It's started turning slightly grey. They must not have been able to handle the stress of it all.</span>"
|
||||
else if(brainmob)
|
||||
if(brainmob.get_ghost(FALSE, TRUE))
|
||||
@@ -247,6 +247,10 @@
|
||||
owner.death()
|
||||
brain_death = TRUE
|
||||
|
||||
/obj/item/organ/brain/on_death()
|
||||
if(damage <= BRAIN_DAMAGE_DEATH) //rip
|
||||
brain_death = FALSE
|
||||
|
||||
/obj/item/organ/brain/process() //needs to run in life AND death
|
||||
..()
|
||||
//if we're not more injured than before, return without gambling for a trauma
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
else if(istype(loc, /obj/item/organ/brain))
|
||||
BR = loc
|
||||
if(BR)
|
||||
BR.organ_flags & ORGAN_FAILING = 1 //beaten to a pulp
|
||||
BR.brain_death = TRUE
|
||||
|
||||
/mob/living/brain/proc/handle_emp_damage()
|
||||
if(emp_damage)
|
||||
|
||||
@@ -814,7 +814,6 @@
|
||||
reagents.clear_reagents()
|
||||
var/obj/item/organ/brain/B = getorgan(/obj/item/organ/brain)
|
||||
if(B)
|
||||
B.organ_flags & ORGAN_FAILING = FALSE
|
||||
B.brain_death = FALSE
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
|
||||
@@ -405,16 +405,16 @@
|
||||
|
||||
if(istype(ears) && (deafen_pwr || damage_pwr))
|
||||
var/ear_damage = damage_pwr * effect_amount
|
||||
var/deaf = max(ears.deaf, deafen_pwr * effect_amount)
|
||||
var/deaf = deafen_pwr * effect_amount
|
||||
adjustEarDamage(ear_damage,deaf)
|
||||
|
||||
if(ears.ear_damage >= 15)
|
||||
if(ears.damage >= 15)
|
||||
to_chat(src, "<span class='warning'>Your ears start to ring badly!</span>")
|
||||
if(prob(ears.ear_damage - 5))
|
||||
if(prob(ears.damage - 5))
|
||||
to_chat(src, "<span class='userdanger'>You can't hear anything!</span>")
|
||||
ears.ear_damage = min(ears.ear_damage, UNHEALING_EAR_DAMAGE)
|
||||
ears.damage = min(ears.damage, ears.maxHealth)
|
||||
// you need earmuffs, inacusiate, or replacement
|
||||
else if(ears.ear_damage >= 5)
|
||||
else if(ears.damage >= 5)
|
||||
to_chat(src, "<span class='warning'>Your ears start to ring!</span>")
|
||||
SEND_SOUND(src, sound('sound/weapons/flash_ring.ogg',0,1,0,250))
|
||||
return effect_amount //how soundbanged we are
|
||||
|
||||
@@ -147,15 +147,15 @@
|
||||
if(O)
|
||||
return O.damage
|
||||
|
||||
/mob/living/carbon/adjustAllOrganLoss(amount, maximum)
|
||||
for(var/o in internal_organs)
|
||||
/mob/living/carbon/proc/adjustAllOrganLoss(amount, maximum)
|
||||
for(var/obj/item/organ/O in internal_organs)
|
||||
if(O && !(status_flags & GODMODE))
|
||||
continue
|
||||
if(!maximum)
|
||||
maximum = O.maxHealth
|
||||
O.applyOrganDamage(amount, maximum)
|
||||
O.onDamage(amount, maximum)
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/handle_breathing(times_fired)
|
||||
/mob/living/carbon/handle_breathing(times_fired)
|
||||
var/next_breath = 4
|
||||
var/obj/item/organ/lungs/L = getorganslot(ORGAN_SLOT_LUNGS)
|
||||
var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART)
|
||||
|
||||
@@ -500,10 +500,12 @@
|
||||
mood.sanity = SANITY_GREAT
|
||||
mood.update_mood()
|
||||
//Heal all organs
|
||||
if(internal_organs)
|
||||
for(var/organ in internal_organs)
|
||||
var/obj/item/organ/O = organ
|
||||
O.setOrganDamage(0)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
if(C.internal_organs)
|
||||
for(var/organ in C.internal_organs)
|
||||
var/obj/item/organ/O = organ
|
||||
O.setOrganDamage(0)
|
||||
|
||||
|
||||
//proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
O.setOxyLoss(getOxyLoss(), 0)
|
||||
O.setCloneLoss(getCloneLoss(), 0)
|
||||
O.adjustFireLoss(getFireLoss(), 0)
|
||||
O.setBrainLoss(getOrganLoss(ORGAN_SLOT_BRAIN), 0)
|
||||
O.setOrganLoss(ORGAN_SLOT_BRAIN, getOrganLoss(ORGAN_SLOT_BRAIN), 0)
|
||||
O.adjustStaminaLoss(getStaminaLoss(), 0)//CIT CHANGE - makes monkey transformations inherit stamina
|
||||
O.updatehealth()
|
||||
O.radiation = radiation
|
||||
@@ -236,7 +236,7 @@
|
||||
O.setOxyLoss(getOxyLoss(), 0)
|
||||
O.setCloneLoss(getCloneLoss(), 0)
|
||||
O.adjustFireLoss(getFireLoss(), 0)
|
||||
O.setBrainLoss(getOrganLoss(ORGAN_SLOT_BRAIN), 0)
|
||||
O.setOrganLoss(ORGAN_SLOT_BRAIN, getOrganLoss(ORGAN_SLOT_BRAIN), 0)
|
||||
O.adjustStaminaLoss(getStaminaLoss(), 0)//CIT CHANGE - makes monkey transformations inherit stamina
|
||||
O.updatehealth()
|
||||
O.radiation = radiation
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
M.heal_bodypart_damage(5,5)
|
||||
M.adjustToxLoss(-5, 0, TRUE)
|
||||
M.hallucination = 0
|
||||
M.setBrainLoss(0)
|
||||
M.setOrganLoss(ORGAN_SLOT_BRAIN, 0)
|
||||
REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT))
|
||||
M.set_blurriness(0)
|
||||
M.set_blindness(0)
|
||||
@@ -856,16 +856,16 @@
|
||||
if(M.notify_ghost_cloning(source = M))
|
||||
spawn (100) //so the ghost has time to re-enter
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
M.adjustOxyLoss(-20, 0)
|
||||
M.adjustToxLoss(-20, 0)
|
||||
var/mob/living/carbon/H = M
|
||||
for(var/organ in H.internal_organs)
|
||||
var/obj/item/organ/O = organ
|
||||
O.setOrganDamage(0)
|
||||
O.setOrganDamage(0)
|
||||
M.updatehealth()
|
||||
|
||||
|
||||
if(M.revive())
|
||||
M.emote("gasp")
|
||||
log_combat(M, M, "revived", src)
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN))
|
||||
return ..()
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/nanite_program/brain_heal_advanced/active_effect()
|
||||
host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2, TRUE)
|
||||
if(iscarbon(host_mob) && prob(10))
|
||||
@@ -232,7 +232,7 @@
|
||||
if(!C.getorgan(/obj/item/organ/heart)) //what are we even shocking
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/BR = C.getorgan(/obj/item/organ/brain)
|
||||
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || BR.suicided)
|
||||
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || C.suiciding)
|
||||
return FALSE
|
||||
if(C.get_ghost())
|
||||
return FALSE
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/datum/surgery/graft_synthtissue
|
||||
name = "Graft_synthtissue"
|
||||
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
steps = list(
|
||||
/datum/surgery_step/incise,
|
||||
@@ -16,8 +16,8 @@
|
||||
/datum/surgery_step/close
|
||||
)
|
||||
|
||||
//repair lungs step
|
||||
/datum/surgery_step/repair_synthtissue
|
||||
//repair organs
|
||||
/datum/surgery_step/graft_synthtissue
|
||||
name = "graft synthtissue"
|
||||
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
|
||||
repeatable = TRUE
|
||||
@@ -25,10 +25,8 @@
|
||||
chems_needed = list("synthtissue")
|
||||
var/obj/item/organ/chosen_organ
|
||||
|
||||
//Repair lungs
|
||||
/datum/surgery_step/repair_synthtissue/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(implement_type in implements_extract)
|
||||
current_type = "insert"
|
||||
/datum/surgery_step/graft_synthtissue/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(implement_type in implements)
|
||||
var/list/organs = target.getorganszone(target_zone)
|
||||
if(!organs.len)
|
||||
to_chat(user, "<span class='notice'>There are no targetable organs in [target]'s [parse_zone(target_zone)]!</span>")
|
||||
@@ -39,24 +37,23 @@
|
||||
organs -= O
|
||||
organs[O.name] = O
|
||||
chosen_organ = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
|
||||
if(chosen_organ.organ_flags & ORGAN_FAILING))
|
||||
if(chosen_organ.organ_flags & ORGAN_FAILING)
|
||||
to_chat(user, "<span class='notice'>[target]'s [chosen_organ] is too damaged to repair graft onto!</span>")
|
||||
return -1
|
||||
|
||||
|
||||
user.visible_message("[user] begins to repair damaged portions of [target]'s [chosen_organ].</span>")
|
||||
|
||||
/datum/surgery_step/repair_synthtissue/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
/datum/surgery_step/graft_synthtissue/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if((!chosen_organ)||(chosen_organ.organ_flags & ORGAN_FAILING))
|
||||
to_chat(user, "[target] has no [chosen_organ] capable of repair!")
|
||||
else
|
||||
user.visible_message("[user] successfully repairs part of [target]'s [chosen_organ].", "<span class='notice'>You succeed in repairing parts of [target]'s [chosen_organ].</span>")
|
||||
chosen_organ.applyOrganDamage(-10)
|
||||
|
||||
/datum/surgery_step/repair_synthtissue/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
/datum/surgery_step/graft_synthtissue/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if((!chosen_organ)||(chosen_organ.organ_flags & ORGAN_FAILING))
|
||||
to_chat(user, "[target] has no [chosen_organ] capable of repair!")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] accidentally damages part of [target]'s [chosen_organ]!</span>", "<span class='warning'>You damage [target]'s [chosen_organ]! Apply more synthtissue if it's run out.</span>")
|
||||
chosen_organ.applyOrganDamage(10)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
/obj/item/organ/cyberimp/brain/anti_stun/on_life()
|
||||
..()
|
||||
if((crit_fail || !(organ_flags & ORGAN_FAILING)) && amount > 0)
|
||||
if(crit_fail || !(organ_flags & ORGAN_FAILING))
|
||||
return
|
||||
owner.adjustStaminaLoss(-3.5) //Citadel edit, makes it more useful in Stamina based combat
|
||||
if(owner.AmountStun() > STUN_SET_AMOUNT)
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
healing_factor = STANDARD_ORGAN_HEALING
|
||||
decay_factor = STANDARD_ORGAN_DECAY
|
||||
|
||||
var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure
|
||||
var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol
|
||||
var/failing //is this liver failing?
|
||||
var/maxHealth = LIVER_DEFAULT_HEALTH
|
||||
var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off
|
||||
var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver
|
||||
var/filterToxins = TRUE //whether to filter toxins
|
||||
|
||||
@@ -416,13 +416,13 @@
|
||||
var/cold_modifier = H.dna.species.coldmod
|
||||
if(breath_temperature < cold_level_3_threshold)
|
||||
H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type)
|
||||
adjustOrganLoss(ORGAN_SLOT_LUNG, (cold_level_3_damage*cold_modifier*2))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_3_damage*cold_modifier*2))
|
||||
if(breath_temperature > cold_level_3_threshold && breath_temperature < cold_level_2_threshold)
|
||||
H.apply_damage_type(cold_level_2_damage*cold_modifier, cold_damage_type)
|
||||
adjustOrganLoss(ORGAN_SLOT_LUNG, (cold_level_2_damage*cold_modifier*2))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_2_damage*cold_modifier*2))
|
||||
if(breath_temperature > cold_level_2_threshold && breath_temperature < cold_level_1_threshold)
|
||||
H.apply_damage_type(cold_level_1_damage*cold_modifier, cold_damage_type)
|
||||
adjustOrganLoss(ORGAN_SLOT_LUNG, (cold_level_1_damage*cold_modifier*2))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_1_damage*cold_modifier*2))
|
||||
if(breath_temperature < cold_level_1_threshold)
|
||||
if(prob(20))
|
||||
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
|
||||
@@ -431,13 +431,13 @@
|
||||
var/heat_modifier = H.dna.species.heatmod
|
||||
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
|
||||
H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type)
|
||||
adjustOrganLoss(ORGAN_SLOT_LUNG, (heat_level_1_damage*heat_modifier*2))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_1_damage*heat_modifier*2))
|
||||
if(breath_temperature > heat_level_2_threshold && breath_temperature < heat_level_3_threshold)
|
||||
H.apply_damage_type(heat_level_2_damage*heat_modifier, heat_damage_type)
|
||||
adjustOrganLoss(ORGAN_SLOT_LUNG, (heat_level_2_damage*heat_modifier*2))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_2_damage*heat_modifier*2))
|
||||
if(breath_temperature > heat_level_3_threshold)
|
||||
H.apply_damage_type(heat_level_3_damage*heat_modifier, heat_damage_type)
|
||||
adjustOrganLoss(ORGAN_SLOT_LUNG, (heat_level_3_damage*heat_modifier*2))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_3_damage*heat_modifier*2))
|
||||
if(breath_temperature > heat_level_1_threshold)
|
||||
if(prob(20))
|
||||
to_chat(H, "<span class='warning'>You feel [hot_message] in your [name]!</span>")
|
||||
|
||||
@@ -29,17 +29,6 @@
|
||||
var/high_threshold_cleared
|
||||
var/low_threshold_cleared
|
||||
|
||||
/obj/item/organ/proc/Assemble_Failure_Message() //need to assemble a failure message since we can't have variables be based off of the same object's variables
|
||||
var/name_length
|
||||
//if no unique failure message is set, output the generic one, otherwise give the one we have set
|
||||
if(!Unique_Failure_Msg)
|
||||
name_length = lentext(name)
|
||||
if(name[name_length] == "s") //plural case, done without much sanitization since I don't know any organ that ends with an "s" that isn't plural at the moment
|
||||
Unique_Failure_Msg = "<span class='danger'>Subject's [name] are too damaged to function, and needs to be replaced or fixed!</span>"
|
||||
else
|
||||
Unique_Failure_Msg = "<span class='danger'>Subject's [name] is too damaged to function, and needs to be replaced or fixed!</span>"
|
||||
return Unique_Failure_Msg
|
||||
|
||||
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
if(!iscarbon(M) || owner == M)
|
||||
return
|
||||
@@ -94,8 +83,8 @@
|
||||
var/healing_amount = -(maxHealth * healing_factor)
|
||||
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's health
|
||||
healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
|
||||
applyOrganDamage(healing_amount) //FERMI_TWEAK
|
||||
|
||||
applyOrganDamage(healing_amount) //to FERMI_TWEAK
|
||||
|
||||
/obj/item/organ/examine(mob/user)
|
||||
. = ..()
|
||||
if(organ_flags & ORGAN_FAILING)
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
if(!(organ_flags & ORGAN_FAILING))
|
||||
H.dna.species.handle_digestion(H)
|
||||
handle_disgust(H)
|
||||
|
||||
if(Nutri)
|
||||
|
||||
|
||||
if(damage < low_threshold)
|
||||
return
|
||||
@@ -44,7 +41,7 @@
|
||||
H.vomit(damage)
|
||||
to_chat(H, "<span class='warning'>Your stomach reels in pain as you're incapable of holding down all that food!</span>")
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H)
|
||||
if(H.disgust)
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
var/list/languages_possible
|
||||
var/say_mod = null
|
||||
var/taste_sensitivity = 15 // lower is more sensitive.
|
||||
var/maxHealth = TONGUE_MAX_HEALTH
|
||||
var/damage = 0
|
||||
maxHealth = TONGUE_MAX_HEALTH
|
||||
var/modifies_speech = FALSE
|
||||
var/static/list/languages_possible_base = typecacheof(list(
|
||||
/datum/language/common,
|
||||
|
||||
@@ -230,8 +230,7 @@
|
||||
// owner.remove_status_effect(src)//At the moment, a user can enthrall themselves, toggle this back in if that should be removed.
|
||||
redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist)))) //Do resistance calc if resist is pressed#
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/owner_hear)
|
||||
var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN) //It's their brain!
|
||||
mental_capacity = 500 - B.get_brain_damage()
|
||||
mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain!
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H)//Prefs
|
||||
if(!H.canbearoused)
|
||||
|
||||
@@ -123,7 +123,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
|
||||
//Damage the clone
|
||||
SM.blood_volume = (BLOOD_VOLUME_NORMAL*SM.blood_ratio)/2
|
||||
SM.adjustCloneLoss(60, 0)
|
||||
SM.setBrainLoss(40)
|
||||
SM.setOrganLoss(ORGAN_SLOT_BRAIN, 40)
|
||||
SM.nutrition = startHunger/2
|
||||
|
||||
//Transfer remaining reagent to clone. I think around 30u will make a healthy clone, otherwise they'll have clone damage, blood loss, brain damage and hunger.
|
||||
@@ -249,7 +249,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
|
||||
SM.adjustToxLoss(-(bodydamage/10), 0)
|
||||
SM.blood_volume = (BLOOD_VOLUME_NORMAL*SM.blood_ratio)/1.5
|
||||
SM.adjustCloneLoss((bodydamage/10), 0)
|
||||
SM.setBrainLoss((bodydamage/10))
|
||||
SM.setOrganLoss(ORGAN_SLOT_BRAIN, (bodydamage/10))
|
||||
SM.nutrition = 400
|
||||
if(bodydamage>200)
|
||||
SM.gain_trauma_type(BRAIN_TRAUMA_MILD)
|
||||
@@ -289,7 +289,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
|
||||
if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
|
||||
M.blood_volume += 10
|
||||
M.adjustCloneLoss(-2, 0)
|
||||
M.setBrainLoss(-1)
|
||||
M.setOrganLoss(ORGAN_SLOT_BRAIN, -1)
|
||||
M.nutrition += 10
|
||||
..()
|
||||
|
||||
|
||||
@@ -287,8 +287,7 @@
|
||||
if((method==VAPOR) && (!C.wear_mask))
|
||||
if(prob(20))
|
||||
to_chat(C, "<span class='warning'>You can feel your lungs burning!</b></span>")
|
||||
var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
L.adjustOrganLoss(ORGAN_SLOT_LUNG, acidstr*2)
|
||||
C.adjustOrganLoss(ORGAN_SLOT_LUNGS, acidstr*2)
|
||||
C.apply_damage(acidstr/5, BURN, target)
|
||||
C.acid_act(acidstr, volume)
|
||||
..()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(T)
|
||||
T.adjustTongueLoss(C, -2)//Fix the inputs me!
|
||||
if(L)
|
||||
L.adjustOrganLoss(ORGAN_SLOT_LUNG, -5)
|
||||
C.adjustOrganLoss(ORGAN_SLOT_LUNGS, -5)
|
||||
C.adjustOxyLoss(-2)
|
||||
else
|
||||
C.adjustOxyLoss(-10)
|
||||
@@ -65,7 +65,7 @@
|
||||
holder.remove_reagent(src.id, "10")
|
||||
|
||||
if(!C.getorganslot(ORGAN_SLOT_LUNGS))
|
||||
var/obj/item/organ/lungs/yamero/L = new()
|
||||
var/obj/item/organ/lungs/yamerol/L = new()
|
||||
L.Insert(C)
|
||||
to_chat(C, "<span class='notice'>You feel the yamerol merge in your chest.</span>")
|
||||
holder.remove_reagent(src.id, "10")
|
||||
@@ -88,8 +88,27 @@
|
||||
if(T)
|
||||
T.adjustTongueLoss(C, 1)
|
||||
if(L)
|
||||
L.adjustOrganLoss(ORGAN_SLOT_LUNG, 4)
|
||||
C.adjustOrganLoss(ORGAN_SLOT_LUNGS, 4)
|
||||
C.adjustOxyLoss(3)
|
||||
else
|
||||
C.adjustOxyLoss(10)
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/fermi/synthtissue
|
||||
name = "Synthtissue"
|
||||
id = "synthtissue"
|
||||
description = "Synthetic tissue used for grafting onto damaged organs during surgery, or for treating limb damage."
|
||||
|
||||
/datum/reagent/fermi/synthtissue/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1)
|
||||
if(iscarbon(M))
|
||||
var/target = M.zone_selected
|
||||
if (M.stat == DEAD)
|
||||
show_message = 0
|
||||
if(method in list(PATCH, TOUCH))
|
||||
M.apply_damage(volume*1.25, BRUTE, target)
|
||||
M.apply_damage(volume*1.25, BURN, target)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='danger'>You feel your damaged [target] heal! It stings like hell!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
|
||||
..()
|
||||
|
||||
@@ -2483,7 +2483,6 @@
|
||||
#include "code\modules\projectiles\projectile\special\temperature.dm"
|
||||
#include "code\modules\projectiles\projectile\special\wormhole.dm"
|
||||
#include "code\modules\reagents\chem_splash.dm"
|
||||
#include "code\modules\reagents\chem_wiki_render.dm"
|
||||
#include "code\modules\reagents\reagent_containers.dm"
|
||||
#include "code\modules\reagents\reagent_dispenser.dm"
|
||||
#include "code\modules\reagents\chemistry\colors.dm"
|
||||
@@ -2718,13 +2717,16 @@
|
||||
#include "code\modules\surgery\brain_surgery.dm"
|
||||
#include "code\modules\surgery\cavity_implant.dm"
|
||||
#include "code\modules\surgery\core_removal.dm"
|
||||
#include "code\modules\surgery\coronary_bypass.dm"
|
||||
#include "code\modules\surgery\dental_implant.dm"
|
||||
#include "code\modules\surgery\embalming.dm"
|
||||
#include "code\modules\surgery\eye_surgery.dm"
|
||||
#include "code\modules\surgery\graft_synthtissue.dm"
|
||||
#include "code\modules\surgery\helpers.dm"
|
||||
#include "code\modules\surgery\implant_removal.dm"
|
||||
#include "code\modules\surgery\limb_augmentation.dm"
|
||||
#include "code\modules\surgery\lipoplasty.dm"
|
||||
#include "code\modules\surgery\lobectomy.dm"
|
||||
#include "code\modules\surgery\mechanic_steps.dm"
|
||||
#include "code\modules\surgery\nutcracker.dm"
|
||||
#include "code\modules\surgery\organ_manipulation.dm"
|
||||
|
||||
Reference in New Issue
Block a user