mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 13:32:32 +00:00
Another set of brainmed adjustment & miscellaneous things. (#11354)
This commit is contained in:
@@ -480,6 +480,8 @@
|
||||
var/datum/gas_mixture/breath = H.get_breath_from_environment()
|
||||
var/fail = L.handle_breath(breath, 1)
|
||||
if(!fail)
|
||||
if(!L.is_bruised())
|
||||
losebreath = 0
|
||||
to_chat(src, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
|
||||
|
||||
cpr(H) //Again.
|
||||
|
||||
@@ -156,20 +156,17 @@
|
||||
if(prob(damprob))
|
||||
take_internal_damage(1)
|
||||
if(prob(damprob))
|
||||
take_internal_damage(2)
|
||||
take_internal_damage(1)
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/brain/take_internal_damage(var/damage, var/silent)
|
||||
set waitfor = 0
|
||||
if(damage >= (max_damage / 4))
|
||||
damage *= 2
|
||||
..()
|
||||
if(damage >= (max_damage / 5)) //This probably won't be triggered by oxyloss or mercury. Probably.
|
||||
var/damage_secondary = damage * 0.20
|
||||
owner.eye_blurry += damage_secondary
|
||||
owner.confused += damage_secondary * 2
|
||||
owner.Weaken(round(damage_secondary * 3, 1))
|
||||
owner.adjustOxyLoss(damage)
|
||||
if(prob(30))
|
||||
addtimer(CALLBACK(src, .proc/brain_damage_callback, damage), rand(6, 20) SECONDS, TIMER_UNIQUE)
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#define HUMAN_MAX_OXYLOSS 1 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS ( 2.0 / 6) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 50HP to get through, so (1/6)*last_tick_duration per second. Breaths however only happen every 4 ticks. last_tick_duration = ~2.0 on average
|
||||
|
||||
/obj/item/organ/internal/lungs
|
||||
name = "lungs"
|
||||
@@ -67,7 +66,7 @@
|
||||
"<span class='danger'>You can't breathe!</span>",
|
||||
"You hear someone gasp for air!",
|
||||
)
|
||||
owner.losebreath += round(damage/2)
|
||||
owner.losebreath = max(round(damage / 2), owner.losebreath)
|
||||
|
||||
if(rescued)
|
||||
if(is_bruised())
|
||||
@@ -377,4 +376,3 @@
|
||||
rescued = FALSE
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/vital //Lose a vital limb, die immediately.
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
var/is_augment = FALSE
|
||||
var/death_time
|
||||
|
||||
//Organ damage stats.
|
||||
var/damage = 0 // amount of damage to the organ
|
||||
@@ -128,6 +129,7 @@
|
||||
return
|
||||
damage = max_damage
|
||||
status |= ORGAN_DEAD
|
||||
death_time = world.time
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
if(owner && vital)
|
||||
owner.death()
|
||||
@@ -141,8 +143,9 @@
|
||||
/obj/item/organ/proc/can_feel_pain()
|
||||
return (!BP_IS_ROBOTIC(src) && (!species || !(species.flags & NO_PAIN)))
|
||||
|
||||
#define ORGAN_RECOVERY_THRESHOLD (5 MINUTES)
|
||||
/obj/item/organ/proc/can_recover()
|
||||
return max_damage > 0
|
||||
return (max_damage > 0) && !(status & ORGAN_DEAD) || death_time >= world.time - ORGAN_RECOVERY_THRESHOLD
|
||||
|
||||
/obj/item/organ/process()
|
||||
if(loc != owner)
|
||||
|
||||
@@ -705,7 +705,6 @@
|
||||
if(alien != IS_DIONA)
|
||||
if (caffeine)
|
||||
M.add_up_to_chemical_effect(CE_SPEEDBOOST, caffeine)
|
||||
M.add_chemical_effect(CE_PULSE, 1)
|
||||
M.dizziness = max(0, M.dizziness + adj_dizzy)
|
||||
M.drowsyness = max(0, M.drowsyness + adj_drowsy)
|
||||
M.sleeping = max(0, M.sleeping + adj_sleepy)
|
||||
|
||||
@@ -48,15 +48,15 @@
|
||||
if(istype(tool, /obj/item/stack/medical/advanced/bruise_pack))
|
||||
tool_name = "regenerative membrane"
|
||||
else if(istype(tool, /obj/item/stack/medical/bruise_pack))
|
||||
tool_name = "the bandaid"
|
||||
tool_name = "some bandaids"
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0 && !BP_IS_ROBOTIC(I))
|
||||
if(I && I.damage > 0 && !BP_IS_ROBOTIC(I) && (!I.status & ORGAN_DEAD || I.can_recover()))
|
||||
user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \
|
||||
"You start treating damage to [target]'s [I.name] with [tool_name]." )
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!",100, affecting = affected)
|
||||
|
||||
target.custom_pain("The pain in your [affected.name] is living hell!", 75)
|
||||
..()
|
||||
|
||||
/decl/surgery_step/internal/fix_organ/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -72,12 +72,20 @@
|
||||
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0 && !BP_IS_ROBOTIC(I))
|
||||
user.visible_message("<b>[user]</b> finishes applying [tool_name] to [target]'s [I.name].", \
|
||||
SPAN_NOTICE("You treat damage to [target]'s [I.name] with [tool_name].") )
|
||||
if(I.status & ORGAN_DEAD && I.can_recover())
|
||||
user.visible_message("<span class='notice'>\The [user] treats damage to [target]'s [I.name] with [tool_name], though it needs to be recovered further.</span>", \
|
||||
"<span class='notice'>You treat damage to [target]'s [I.name] with [tool_name], though it needs to be recovered further.</span>" )
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
|
||||
"<span class='notice'>You treat damage to [target]'s [I.name] with [tool_name].</span>")
|
||||
I.surgical_fix(user)
|
||||
user.visible_message("\The [user] finishes treating damage within \the [target]'s [affected.name] with [tool_name].", \
|
||||
"You finish treating damage within \the [target]'s [affected.name] with [tool_name].")
|
||||
var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name[BP_BRAIN]
|
||||
if(sponge && istype(I, sponge))
|
||||
target.cure_all_traumas(cure_type = CURE_SURGERY)
|
||||
if(I.status & ORGAN_DEAD)
|
||||
to_chat(user, SPAN_DANGER("This organ is still dead! You must remove the dead tissue with a scalpel!"))
|
||||
|
||||
/decl/surgery_step/internal/fix_organ/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!ishuman(target))
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/decl/surgery_step/internal/fix_dead_tissue //Debridement
|
||||
name = "Debride damaged tissue"
|
||||
priority = 3
|
||||
priority = 4
|
||||
allowed_tools = list(
|
||||
/obj/item/surgery/scalpel = 100,
|
||||
/obj/item/material/knife = 75,
|
||||
@@ -77,7 +77,7 @@
|
||||
break
|
||||
if(!organ)
|
||||
return
|
||||
if(organ.damage >= organ.max_damage)
|
||||
if(organ.damage > organ.max_damage)
|
||||
to_chat(user, SPAN_WARNING("\The [organ] is too damaged. Repair it first."))
|
||||
return 0
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
user.visible_message(SPAN_NOTICE("[user] has cut away necrotic tissue from [target]'s [organ_to_fix.name] with \the [tool]."), \
|
||||
SPAN_NOTICE("You have cut away necrotic tissue in [target]'s [organ_to_fix.name] with \the [tool]."))
|
||||
organ_to_fix.status &= ~ORGAN_DEAD
|
||||
organ_to_fix.heal_damage(10) //so that they don't insta-die again
|
||||
|
||||
/decl/surgery_step/internal/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -114,7 +115,7 @@
|
||||
|
||||
/decl/surgery_step/treat_necrosis
|
||||
name = "Treat necrosis"
|
||||
priority = 2
|
||||
priority = 4
|
||||
allowed_tools = list(
|
||||
/obj/item/reagent_containers/dropper = 100,
|
||||
/obj/item/reagent_containers/glass/bottle = 75,
|
||||
@@ -126,8 +127,8 @@
|
||||
can_infect = FALSE
|
||||
blood_level = 0
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
min_duration = 100
|
||||
max_duration = 110
|
||||
|
||||
/decl/surgery_step/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!..())
|
||||
|
||||
Reference in New Issue
Block a user