From 66ce34caa58579b4aadf6deb5194e497e2df9171 Mon Sep 17 00:00:00 2001 From: Artur <24881678+Arturlang@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:54:13 +0300 Subject: [PATCH] Signal and moves it to the back --- code/__DEFINES/dcs/signals.dm | 1 + code/modules/mob/living/life.dm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index dad0f49832..12ec74e619 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -385,6 +385,7 @@ #define COMSIG_LIVING_LIFE "life_tick" //from base of mob/living/Life() (seconds, times_fired) #define COMPONENT_INTERRUPT_LIFE_BIOLOGICAL 1 // interrupt biological processes #define COMPONENT_INTERRUPT_LIFE_PHYSICAL 2 // interrupt physical handling + #define COMPONET_INTERRUPT_STATUS_EFFECTS 3 // interrupt status effects #define COMSIG_LIVING_BIOLOGICAL_LIFE "biological_life" //from base of mob/living/BiologicalLife() (seconds, times_fired) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 05c2267b47..447256cb69 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -6,13 +6,13 @@ SHOULD_NOT_SLEEP(TRUE) if(mob_transforming) return - handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc . = SEND_SIGNAL(src, COMSIG_LIVING_LIFE, seconds, times_fired) if(!(. & COMPONENT_INTERRUPT_LIFE_PHYSICAL)) PhysicalLife(seconds, times_fired) if(!(. & COMPONENT_INTERRUPT_LIFE_BIOLOGICAL)) BiologicalLife(seconds, times_fired) - + if(!(. & COMPONET_INTERRUPT_STATUS_EFFECTS)) + handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc // CODE BELOW SHOULD ONLY BE THINGS THAT SHOULD HAPPEN NO MATTER WHAT AND CAN NOT BE SUSPENDED! // Otherwise, it goes into one of the two split Life procs!