mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user