From adc96816b8b13465fc50200641a59e2b5c67d6c7 Mon Sep 17 00:00:00 2001 From: Morrow Date: Sat, 29 Jul 2023 18:29:10 -0400 Subject: [PATCH 1/2] initial --- code/modules/mob/living/carbon/human/life.dm | 2 +- .../mob/living/carbon/human/life/handle_organs.dm | 4 ++-- code/modules/organs/organ_internal.dm | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d64e5d1bfde0..fded3d5e3f77 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -41,7 +41,7 @@ handle_chemicals_in_body(delta_time) //Organs and blood - handle_organs() + handle_organs(delta_time) handle_blood() //Random events (vomiting etc) diff --git a/code/modules/mob/living/carbon/human/life/handle_organs.dm b/code/modules/mob/living/carbon/human/life/handle_organs.dm index 8d0a0dbc3e15..2c978f2295ed 100644 --- a/code/modules/mob/living/carbon/human/life/handle_organs.dm +++ b/code/modules/mob/living/carbon/human/life/handle_organs.dm @@ -1,11 +1,11 @@ // Takes care of organ & limb related updates, such as broken and missing limbs -/mob/living/carbon/human/proc/handle_organs() +/mob/living/carbon/human/proc/handle_organs(delta_time) last_dam = getBruteLoss() + getFireLoss() + getToxLoss() // Processing internal organs is pretty cheap, do that first. for(var/datum/internal_organ/I as anything in internal_organs) - I.process() + I.process(delta_time) for(var/obj/limb/E as anything in limbs_to_process) if(!E) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 1038f2a86e8a..aacb40acde07 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -247,6 +247,20 @@ robotic_type = /obj/item/organ/brain/prosthetic vital = 1 +/datum/internal_organ/brain/process(delta_time) + ..() + + if(organ_status >= ORGAN_BRUISED && prob(10 * delta_time)) + var/dir_choice = pick(list(NORTH, SOUTH, EAST, WEST)) + owner.Move(get_step(get_turf(owner), dir_choice)) + owner.drop_held_items() + to_chat(owner, SPAN_NOTICE("Your mind wanders and goes blank a moment...")) + + if(organ_status >= ORGAN_BROKEN && prob(10 * delta_time)) + owner.apply_effect(1, PARALYZE) + owner.make_jittery(50) + to_chat(owner, SPAN_NOTICE("Your body seizes against your control!")) + /datum/internal_organ/brain/prosthetic //used by synthetic species robotic = ORGAN_ROBOT removed_type = /obj/item/organ/brain/prosthetic From 51ce68e49e3cd36a0d38024e49936fc30da88317 Mon Sep 17 00:00:00 2001 From: Morrow Date: Sat, 29 Jul 2023 19:14:09 -0400 Subject: [PATCH 2/2] da review --- code/modules/organs/organ_internal.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index aacb40acde07..5325e89910ba 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -250,16 +250,16 @@ /datum/internal_organ/brain/process(delta_time) ..() - if(organ_status >= ORGAN_BRUISED && prob(10 * delta_time)) + if(organ_status >= ORGAN_BRUISED && prob(5 * delta_time)) var/dir_choice = pick(list(NORTH, SOUTH, EAST, WEST)) - owner.Move(get_step(get_turf(owner), dir_choice)) owner.drop_held_items() - to_chat(owner, SPAN_NOTICE("Your mind wanders and goes blank a moment...")) + owner.Move(get_step(get_turf(owner), dir_choice)) + to_chat(owner, SPAN_DANGER("Your mind wanders and goes blank for a moment...")) - if(organ_status >= ORGAN_BROKEN && prob(10 * delta_time)) + if(organ_status >= ORGAN_BROKEN && prob(5 * delta_time)) owner.apply_effect(1, PARALYZE) owner.make_jittery(50) - to_chat(owner, SPAN_NOTICE("Your body seizes against your control!")) + to_chat(owner, SPAN_DANGER("Your body seizes up!")) /datum/internal_organ/brain/prosthetic //used by synthetic species robotic = ORGAN_ROBOT