Signal and moves it to the back

This commit is contained in:
Artur
2022-04-07 15:54:13 +03:00
parent 3980c97d61
commit 66ce34caa5
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -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)
+2 -2
View File
@@ -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!