Makes check_teleport_valid pure & signal clean up (#90738)

- Closes #90704

The following changes were implemented for this
- Moved sending signals `COMSIG_MOVABLE_TELEPORTING` &
`COMSIG_ATOM_INTERCEPT_TELEPORTING` from `check_teleport_valid` into
`do_teleport`. These 2 signals were causing all the side effects
- Removed signals `COMSIG_ATOM_INTERCEPT_TELEPORTED` &
`COMSIG_MOVABLE_TELEPORTED` as the above 2 signals can do their jobs &
block the teleport if needed so these signals became obsolete
- Removed define `COMPONENT_BLOCK_TELEPORT` in favour of returning a
positive value if teleport was successfully blocked. Having 2 signals
located in 2 separate files use this same define doesn't look great.

🆑
code: cleans up teleportation code. `check_teleport_valid` is now a pure
function with no side effects
/🆑
This commit is contained in:
SyncIt21
2025-04-29 18:28:50 -06:00
committed by Shadow-Quill
parent 55aef9a5dc
commit c9a4060429
8 changed files with 16 additions and 24 deletions
+2 -2
View File
@@ -22,8 +22,8 @@
UnregisterSignal(loc, COMSIG_ATOM_INTERCEPT_TELEPORTING)
return ..()
/obj/effect/blessing/proc/block_cult_teleport(datum/source, channel, turf/origin, turf/destination)
/obj/effect/blessing/proc/block_cult_teleport(datum/source, channel, turf/origin)
SIGNAL_HANDLER
if(channel == TELEPORT_CHANNEL_CULT)
return COMPONENT_BLOCK_TELEPORT
return TRUE