mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge branch 'master' into hook-kill-v10-final-ultimate-final
This commit is contained in:
@@ -141,9 +141,11 @@
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
|
||||
if(crit_fail || emp_proof)
|
||||
return
|
||||
crit_fail = 1
|
||||
spawn(90 / severity)
|
||||
crit_fail = 0
|
||||
crit_fail = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reboot), 90 / severity)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_stun/proc/reboot()
|
||||
crit_fail = FALSE
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/clown_voice
|
||||
name = "Comical implant"
|
||||
@@ -230,11 +232,13 @@
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
if(owner.nutrition <= hunger_threshold)
|
||||
synthesizing = 1
|
||||
synthesizing = TRUE
|
||||
to_chat(owner, "<span class='notice'>You feel less hungry...</span>")
|
||||
owner.adjust_nutrition(50)
|
||||
spawn(50)
|
||||
synthesizing = 0
|
||||
addtimer(CALLBACK(src, .proc/synth_cool), 50)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/proc/synth_cool()
|
||||
synthesizing = FALSE
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
|
||||
if(!owner || emp_proof)
|
||||
@@ -309,10 +313,15 @@
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.stat != DEAD && prob(50 / severity))
|
||||
H.set_heartattack(TRUE)
|
||||
spawn(600 / severity)
|
||||
H.set_heartattack(FALSE)
|
||||
if(H.stat == CONSCIOUS)
|
||||
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
addtimer(CALLBACK(src, .proc/undo_heart_attack), 600 / severity)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver/proc/undo_heart_attack()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(!istype(H))
|
||||
return
|
||||
H.set_heartattack(FALSE)
|
||||
if(H.stat == CONSCIOUS)
|
||||
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
|
||||
//BOX O' IMPLANTS
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects naturally decreases
|
||||
|
||||
var/additional_bleed = round(Clamp((reagents.get_reagent_amount("heparin") / 10), 0, 2), 1) //Heparin worsens existing bleeding
|
||||
var/additional_bleed = round(clamp((reagents.get_reagent_amount("heparin") / 10), 0, 2), 1) //Heparin worsens existing bleeding
|
||||
|
||||
if(internal_bleeding_rate && !(status_flags & FAKEDEATH))
|
||||
bleed_internal(internal_bleeding_rate + additional_bleed)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
// genetic deafness prevents the body from using the ears, even if healthy
|
||||
if(C.disabilities & DEAF)
|
||||
if(DEAF in C.mutations)
|
||||
deaf = max(deaf, 1)
|
||||
else
|
||||
if(ishuman(C))
|
||||
@@ -37,7 +37,7 @@
|
||||
ear_damage = 0
|
||||
|
||||
var/mob/living/carbon/C = owner
|
||||
if(istype(C) && C.disabilities & DEAF)
|
||||
if(istype(C) && (DEAF in C.mutations))
|
||||
deaf = 1
|
||||
|
||||
/obj/item/organ/internal/ears/proc/AdjustEarDamage(ddmg, ddeaf)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/list/colourmatrix = null
|
||||
var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white.
|
||||
var/list/replace_colours = LIST_GREYSCALE_REPLACE
|
||||
var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
|
||||
var/dependent_disabilities = list() //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
|
||||
var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will.
|
||||
|
||||
var/vision_flags = 0
|
||||
@@ -30,7 +30,7 @@
|
||||
return eyes_icon
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one.
|
||||
if(!is_robotic() && owner.disabilities & COLOURBLIND)
|
||||
if(!is_robotic() && (COLOURBLIND in owner.mutations))
|
||||
return colourblind_matrix
|
||||
else
|
||||
return colourmatrix
|
||||
@@ -44,16 +44,16 @@
|
||||
if(istype(M) && eye_colour)
|
||||
M.update_body() //Apply our eye colour to the target.
|
||||
|
||||
if(!(M.disabilities & COLOURBLIND) && (dependent_disabilities & COLOURBLIND)) //If the eyes are colourblind and we're not, carry over the gene.
|
||||
dependent_disabilities &= ~COLOURBLIND
|
||||
if(!(COLOURBLIND in M.mutations) && (COLOURBLIND in dependent_disabilities)) //If the eyes are colourblind and we're not, carry over the gene.
|
||||
dependent_disabilities -= COLOURBLIND
|
||||
M.dna.SetSEState(GLOB.colourblindblock,1)
|
||||
genemutcheck(M,GLOB.colourblindblock,null,MUTCHK_FORCED)
|
||||
else
|
||||
M.update_client_colour() //If we're here, that means the mob acquired the colourblindness gene while they didn't have eyes. Better handle it.
|
||||
|
||||
/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = 0)
|
||||
if(!special && (M.disabilities & COLOURBLIND)) //If special is set, that means these eyes are getting deleted (i.e. during set_species())
|
||||
if(!(dependent_disabilities & COLOURBLIND)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed.
|
||||
if(!special && (COLOURBLIND in M.mutations)) //If special is set, that means these eyes are getting deleted (i.e. during set_species())
|
||||
if(!(COLOURBLIND in dependent_disabilities)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed.
|
||||
dependent_disabilities |= COLOURBLIND
|
||||
M.dna.SetSEState(GLOB.colourblindblock,0)
|
||||
genemutcheck(M,GLOB.colourblindblock,null,MUTCHK_FORCED)
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
Stop()
|
||||
return
|
||||
|
||||
spawn(120)
|
||||
if(!owner)
|
||||
Stop()
|
||||
if(!special)
|
||||
addtimer(CALLBACK(src, .proc/stop_if_unowned), 120)
|
||||
|
||||
/obj/item/organ/internal/heart/emp_act(intensity)
|
||||
if(!is_robotic() || emp_proof)
|
||||
@@ -43,14 +42,16 @@
|
||||
return
|
||||
if(!beating)
|
||||
Restart()
|
||||
spawn(80)
|
||||
if(!owner)
|
||||
Stop()
|
||||
addtimer(CALLBACK(src, .proc/stop_if_unowned), 80)
|
||||
|
||||
/obj/item/organ/internal/heart/safe_replace(mob/living/carbon/human/target)
|
||||
Restart()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/heart/proc/stop_if_unowned()
|
||||
if(!owner)
|
||||
Stop()
|
||||
|
||||
/obj/item/organ/internal/heart/proc/Stop()
|
||||
beating = FALSE
|
||||
update_icon()
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath.nitrogen)
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath.toxins)
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath.carbon_dioxide)
|
||||
var/SA_pp = breath.get_breath_partial_pressure(breath.sleeping_agent)
|
||||
|
||||
|
||||
//-- OXY --//
|
||||
@@ -230,16 +231,14 @@
|
||||
|
||||
//-- TRACES --//
|
||||
|
||||
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = breath.get_breath_partial_pressure(SA.moles)
|
||||
if(SA_pp > SA_para_min)
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
H.emote(pick("giggle", "laugh"))
|
||||
if(breath.sleeping_agent) // If there's some other shit in the air lets deal with it here.
|
||||
if(SA_pp > SA_para_min)
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
H.emote(pick("giggle", "laugh"))
|
||||
|
||||
handle_breath_temperature(breath, H)
|
||||
|
||||
|
||||
@@ -116,18 +116,19 @@
|
||||
necrotize()
|
||||
|
||||
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
handle_germ_effects()
|
||||
// Handle antibiotics and curing infections
|
||||
if(germ_level)
|
||||
handle_germs()
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/proc/is_preserved()
|
||||
if(istype(loc,/obj/item/mmi))
|
||||
germ_level = max(0, germ_level - 1) // So a brain can slowly recover from being left out of an MMI
|
||||
return 1
|
||||
return TRUE
|
||||
if(is_found_within(/obj/structure/closet/crate/freezer))
|
||||
return 1
|
||||
return TRUE
|
||||
if(is_found_within(/obj/machinery/clonepod))
|
||||
return 1
|
||||
return TRUE
|
||||
if(isturf(loc))
|
||||
if(world.time - last_freezer_update_time > freezer_update_period)
|
||||
// I don't want to loop through everything in the tile constantly, especially since it'll be a pile of organs
|
||||
@@ -142,7 +143,7 @@
|
||||
return is_in_freezer // I'd like static varibles, please
|
||||
|
||||
// You can do your cool location temperature organ preserving effects here!
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/organ/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -152,33 +153,30 @@
|
||||
else
|
||||
. += "<span class='notice'>It looks in need of repairs.</span>"
|
||||
|
||||
/obj/item/organ/proc/handle_germ_effects()
|
||||
//** Handle the effects of infections
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if(germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
|
||||
/obj/item/organ/proc/handle_germs()
|
||||
if(germ_level > 0 && germ_level < INFECTION_LEVEL_ONE / 2 && prob(30))
|
||||
germ_level--
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
if(germ_level >= INFECTION_LEVEL_ONE / 2)
|
||||
//aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes
|
||||
if(antibiotics < 5 && prob(round(germ_level/6)))
|
||||
if(prob(round(germ_level / 6)))
|
||||
germ_level++
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
var/fever_temperature = (owner.dna.species.heat_level_1 - owner.dna.species.body_temperature - 5)* min(germ_level/INFECTION_LEVEL_TWO, 1) + owner.dna.species.body_temperature
|
||||
owner.bodytemperature += between(0, (fever_temperature - T20C)/BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
|
||||
var/fever_temperature = (owner.dna.species.heat_level_1 - owner.dna.species.body_temperature - 5) * min(germ_level / INFECTION_LEVEL_TWO, 1) + owner.dna.species.body_temperature
|
||||
owner.bodytemperature += between(0, (fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
|
||||
//spread germs
|
||||
if(antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
if(parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30)))
|
||||
parent.germ_level++
|
||||
|
||||
/obj/item/organ/internal/handle_germ_effects()
|
||||
/obj/item/organ/internal/handle_germs()
|
||||
..()
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
if(prob(3)) //about once every 30 seconds
|
||||
receive_damage(1,silent=prob(30))
|
||||
receive_damage(1, silent = prob(30))
|
||||
|
||||
/obj/item/organ/proc/rejuvenate()
|
||||
damage = 0
|
||||
@@ -200,21 +198,6 @@
|
||||
/obj/item/organ/proc/is_broken()
|
||||
return (damage >= min_broken_damage || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
|
||||
|
||||
//Germs
|
||||
/obj/item/organ/proc/handle_antibiotics()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if(!germ_level || antibiotics <= 0.4)
|
||||
return
|
||||
|
||||
if(germ_level < INFECTION_LEVEL_ONE)
|
||||
germ_level = 0 //cure instantly
|
||||
else if(germ_level < INFECTION_LEVEL_TWO)
|
||||
germ_level -= 24 //at germ_level == 500, this should cure the infection in 15 seconds
|
||||
else
|
||||
germ_level -= 8 // at germ_level == 1000, this will cure the infection in 1 minute, 15 seconds
|
||||
// Let's not drag this on, medbay has only so much antibiotics
|
||||
|
||||
//Adds autopsy data for used_weapon.
|
||||
/obj/item/organ/proc/add_autopsy_data(var/used_weapon = "Unknown", var/damage)
|
||||
var/datum/autopsy_data/W = autopsy_data[used_weapon]
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
icon_state = dead_icon
|
||||
if(owner)
|
||||
to_chat(owner, "<span class='notice'>You can't feel your [name] anymore...</span>")
|
||||
owner.update_body(update_sprite)
|
||||
owner.update_body()
|
||||
if(vital)
|
||||
owner.death()
|
||||
|
||||
@@ -305,10 +305,10 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
perma_injury = 0
|
||||
|
||||
//Infections
|
||||
update_germs()
|
||||
else
|
||||
..()
|
||||
if(..())
|
||||
if(owner.germ_level > germ_level && infection_check())
|
||||
//Open wounds can become infected
|
||||
germ_level++
|
||||
|
||||
//Updating germ levels. Handles organ germ levels and necrosis.
|
||||
/*
|
||||
@@ -325,40 +325,16 @@ the actual time is dependent on RNG.
|
||||
INFECTION_LEVEL_ONE below this germ level nothing happens, and the infection doesn't grow
|
||||
INFECTION_LEVEL_TWO above this germ level the infection will start to spread to internal and adjacent organs
|
||||
INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without
|
||||
antitox. also, above this germ level you will need to overdose on spaceacillin to reduce the germ_level.
|
||||
antitox..
|
||||
|
||||
Note that amputating the affected organ does in fact remove the infection from the player's body.
|
||||
*/
|
||||
/obj/item/organ/external/proc/update_germs()
|
||||
|
||||
if(is_robotic() || (NO_GERMS in owner.dna.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Syncing germ levels with external wounds
|
||||
handle_germ_sync()
|
||||
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
|
||||
//** Handle the effects of infections
|
||||
handle_germ_effects()
|
||||
|
||||
/obj/item/organ/external/proc/handle_germ_sync()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
if(antibiotics < 5)
|
||||
//Open wounds can become infected
|
||||
if(owner.germ_level > germ_level && infection_check())
|
||||
germ_level++
|
||||
|
||||
/obj/item/organ/external/handle_germ_effects()
|
||||
/obj/item/organ/external/handle_germs()
|
||||
|
||||
if(germ_level < INFECTION_LEVEL_TWO)
|
||||
return ..()
|
||||
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
//spread the infection to internal organs
|
||||
var/obj/item/organ/internal/target_organ = null //make internal organs become infected one at a time instead of all at once
|
||||
@@ -383,17 +359,16 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(children)
|
||||
for(var/obj/item/organ/external/child in children)
|
||||
if(child.germ_level < germ_level && !child.is_robotic())
|
||||
if(child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
if(child.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))
|
||||
child.germ_level++
|
||||
|
||||
if(parent)
|
||||
if(parent.germ_level < germ_level && !parent.is_robotic())
|
||||
if(parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
if(parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))
|
||||
parent.germ_level++
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections
|
||||
if(germ_level >= INFECTION_LEVEL_THREE)
|
||||
necrotize()
|
||||
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
@@ -672,12 +647,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/mutate()
|
||||
src.status |= ORGAN_MUTATED
|
||||
if(owner)
|
||||
owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly render the deformed sprite.
|
||||
owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly render the deformed sprite.
|
||||
|
||||
/obj/item/organ/external/proc/unmutate()
|
||||
src.status &= ~ORGAN_MUTATED
|
||||
if(owner)
|
||||
owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly return them to normal.
|
||||
owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly return them to normal.
|
||||
|
||||
/obj/item/organ/external/proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
|
||||
@@ -225,7 +225,6 @@
|
||||
slot = "brain_tumor"
|
||||
var/organhonked = 0
|
||||
var/suffering_delay = 900
|
||||
var/datum/component/waddle
|
||||
var/datum/component/squeak
|
||||
|
||||
/obj/item/organ/internal/honktumor/insert(mob/living/carbon/M, special = 0)
|
||||
@@ -237,7 +236,7 @@
|
||||
genemutcheck(M,GLOB.clumsyblock,null,MUTCHK_FORCED)
|
||||
genemutcheck(M,GLOB.comicblock,null,MUTCHK_FORCED)
|
||||
organhonked = world.time
|
||||
waddle = M.AddComponent(/datum/component/waddling)
|
||||
M.AddElement(/datum/element/waddling)
|
||||
squeak = M.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg' = 1), 50)
|
||||
|
||||
/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = 0)
|
||||
@@ -249,7 +248,7 @@
|
||||
M.dna.SetSEState(GLOB.comicblock,0)
|
||||
genemutcheck(M,GLOB.clumsyblock,null,MUTCHK_FORCED)
|
||||
genemutcheck(M,GLOB.comicblock,null,MUTCHK_FORCED)
|
||||
QDEL_NULL(waddle)
|
||||
M.RemoveElement(/datum/element/waddling)
|
||||
QDEL_NULL(squeak)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
user.visible_message("[user] shines light onto the tumor in [target]'s [E]!", "<span class='notice'>You cleanse the contamination from [target]'s brain!</span>")
|
||||
if(target.vision_type) //Turns off their darksight if it's still active.
|
||||
to_chat(target, "<span class='boldannounce'>Your eyes are suddenly wrought with immense pain as your darksight is forcibly dismissed!</span>")
|
||||
target.vision_type = null
|
||||
target.set_sight(null)
|
||||
SSticker.mode.remove_thrall(target.mind, 0)
|
||||
target.visible_message("<span class='warning'>A strange black mass falls from [target]'s [E]!</span>")
|
||||
var/obj/item/organ/thing = new /obj/item/organ/internal/shadowtumor(get_turf(target))
|
||||
|
||||
Reference in New Issue
Block a user