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
@@ -28,7 +28,7 @@
UnregisterSignal(target, COMSIG_MOB_PRE_JAUNT)
return TRUE
/// Signal for COMSIG_MOVABLE_TELEPORTED that blocks teleports and stuns the would-be-teleportee.
/// Signal for COMSIG_MOVABLE_TELEPORTING that blocks teleports and stuns the would-be-teleportee.
/obj/item/implant/teleport_blocker/proc/on_teleport(mob/living/teleportee, atom/destination, channel)
SIGNAL_HANDLER
@@ -38,7 +38,7 @@
var/datum/effect_system/spark_spread/quantum/spark_system = new()
spark_system.set_up(5, TRUE, teleportee)
spark_system.start()
return COMPONENT_BLOCK_TELEPORT
return TRUE
/// Signal for COMSIG_MOB_PRE_JAUNT that prevents a user from entering a jaunt.
/obj/item/implant/teleport_blocker/proc/on_jaunt(mob/living/jaunter)