From 3b37aa162ae40efbfe2f30d534fcd4d4945aeed2 Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:05:42 -0400 Subject: [PATCH] crossed signal (#18405) --- code/__defines/dcs/signals.dm | 5 +++-- code/game/atoms_movable.dm | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/__defines/dcs/signals.dm b/code/__defines/dcs/signals.dm index c96cbb4767..16d622926f 100644 --- a/code/__defines/dcs/signals.dm +++ b/code/__defines/dcs/signals.dm @@ -229,8 +229,9 @@ #define COMSIG_MOVABLE_MOVED "movable_moved" ///from base of atom/movable/Cross(): (/atom/movable) #define COMSIG_MOVABLE_CROSS "movable_cross" -///when we cross over something (calling Crossed() on that atom) -#define COMSIG_CROSSED_MOVABLE "crossed_movable" + #define COMPONENT_BLOCK_CROSS (1<<0) +///from base of atom/movable/Move(): (/atom/movable) +#define COMSIG_MOVABLE_CROSS_OVER "movable_cross_am" ///from base of atom/movable/Bump(): (/atom) #define COMSIG_MOVABLE_BUMP "movable_bump" ///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index aea7c7657c..bd0ddfa915 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -265,6 +265,10 @@ // Make sure you know what you're doing if you call this, this is intended to only be called by byond directly. // You probably want CanPass() /atom/movable/Cross(atom/movable/AM) + if(SEND_SIGNAL(src, COMSIG_MOVABLE_CROSS, AM) & COMPONENT_BLOCK_CROSS) + return FALSE + if(SEND_SIGNAL(AM, COMSIG_MOVABLE_CROSS_OVER, src) & COMPONENT_BLOCK_CROSS) + return FALSE return CanPass(AM, loc) /atom/movable/CanPass(atom/movable/mover, turf/target)