diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm index 4ea49e9010d..95168ec3606 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm @@ -83,9 +83,6 @@ #define COMSIG_ATOM_PROCESSED "atom_processed" ///called when teleporting into a possibly protected turf: (channel, turf/origin, turf/destination) #define COMSIG_ATOM_INTERCEPT_TELEPORTING "intercept_teleporting" -///called after teleporting into a protected turf: (channel, turf/origin) -#define COMSIG_ATOM_INTERCEPT_TELEPORTED "intercept_teleported" - #define COMPONENT_BLOCK_TELEPORT (1<<0) ///called when an atom is added to the hearers on get_hearers_in_view(): (list/processing_list, list/hearers) #define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" ///called when an atom starts orbiting another atom: (atom) diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movable.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movable.dm index 648ba4dc72a..2d257b6ffda 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movable.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movable.dm @@ -88,8 +88,6 @@ #define COMSIG_MOVABLE_CHANGE_DUCT_LAYER "movable_change_duct_layer" ///Called before a movable is being teleported from `check_teleport_valid()`: (destination, channel) #define COMSIG_MOVABLE_TELEPORTING "movable_teleporting" -///Called when a movable is being teleported from `do_teleport()`: (destination, channel) -#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" ///Called after a movable is teleported from `do_teleport()`: () #define COMSIG_MOVABLE_POST_TELEPORT "movable_post_teleport" /// from /mob/living/can_z_move, sent to whatever the mob is buckled to. Only ridable movables should be ridden up or down btw. diff --git a/code/datums/components/chasm.dm b/code/datums/components/chasm.dm index 4f8b0148372..449d7ce5d1d 100644 --- a/code/datums/components/chasm.dm +++ b/code/datums/components/chasm.dm @@ -67,7 +67,7 @@ drop_stuff(movable) /datum/component/chasm/proc/block_teleport() - return COMPONENT_BLOCK_TELEPORT + return TRUE /datum/component/chasm/proc/on_chasm_stopped(datum/source) SIGNAL_HANDLER diff --git a/code/datums/components/leanable.dm b/code/datums/components/leanable.dm index 8eea45793c2..e8f8150b8e6 100644 --- a/code/datums/components/leanable.dm +++ b/code/datums/components/leanable.dm @@ -105,12 +105,12 @@ COMSIG_LIVING_GET_PULLED, ), PROC_REF(stop_leaning)) - RegisterSignal(src, COMSIG_MOVABLE_TELEPORTED, PROC_REF(teleport_away_while_leaning)) + RegisterSignal(src, COMSIG_MOVABLE_POST_TELEPORT, PROC_REF(teleported_away_while_leaning)) // RegisterSignal(src, COMSIG_ATOM_POST_DIR_CHANGE, PROC_REF(lean_dir_changed)) // BUBBER EDIT REMOVE - Don't reset leaning on direction change update_fov() /// You fall on your face if you get teleported while leaning -/mob/living/proc/teleport_away_while_leaning() +/mob/living/proc/teleported_away_while_leaning() SIGNAL_HANDLER // Make sure we unregister signal handlers and reset animation @@ -127,7 +127,7 @@ COMSIG_LIVING_DISARM_HIT, COMSIG_LIVING_GET_PULLED, COMSIG_ATOM_POST_DIR_CHANGE, - COMSIG_MOVABLE_TELEPORTED, + COMSIG_MOVABLE_POST_TELEPORT, )) remove_offsets(LEANING_TRAIT) remove_traits(list(TRAIT_UNDENSE, TRAIT_EXPANDED_FOV), LEANING_TRAIT) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 8224e47a524..8dcaa2ecfaf 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -70,8 +70,10 @@ teleatom.balloon_alert(teleatom, "something holds you back!") return FALSE - SEND_SIGNAL(teleatom, COMSIG_MOVABLE_TELEPORTED, destination, channel) - SEND_SIGNAL(destturf, COMSIG_ATOM_INTERCEPT_TELEPORTED, channel, curturf, destturf) + if(SEND_SIGNAL(teleatom, COMSIG_MOVABLE_TELEPORTING, destination, channel)) + return FALSE + if(SEND_SIGNAL(destturf, COMSIG_ATOM_INTERCEPT_TELEPORTING, channel, curturf)) + return FALSE if(isobserver(teleatom)) teleatom.abstract_move(destturf) @@ -210,11 +212,12 @@ /// Validates that the teleport being attempted is valid or not /proc/check_teleport_valid(atom/teleported_atom, atom/destination, channel, atom/original_destination = null) + SHOULD_BE_PURE(TRUE) + if(isnull(destination)) return FALSE // Teleporting FROM nullspace is fine, but TO nullspace is not var/area/origin_area = get_area(teleported_atom) - var/turf/origin_turf = get_turf(teleported_atom) var/area/destination_area = get_area(destination) var/turf/destination_turf = get_turf(destination) @@ -234,10 +237,4 @@ if(((origin_area.area_flags & LOCAL_TELEPORT) || (destination_area.area_flags & LOCAL_TELEPORT)) && destination_area != origin_area) return FALSE - if(SEND_SIGNAL(teleported_atom, COMSIG_MOVABLE_TELEPORTING, destination, channel) & COMPONENT_BLOCK_TELEPORT) - return FALSE - - if(SEND_SIGNAL(destination_turf, COMSIG_ATOM_INTERCEPT_TELEPORTING, channel, origin_turf, destination_turf) & COMPONENT_BLOCK_TELEPORT) - return FALSE - return TRUE diff --git a/code/game/objects/effects/blessing.dm b/code/game/objects/effects/blessing.dm index d1267c59c74..5308625a4d9 100644 --- a/code/game/objects/effects/blessing.dm +++ b/code/game/objects/effects/blessing.dm @@ -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 diff --git a/code/game/objects/items/implants/security/implant_noteleport.dm b/code/game/objects/items/implants/security/implant_noteleport.dm index a757e2cc0cd..a246738608e 100644 --- a/code/game/objects/items/implants/security/implant_noteleport.dm +++ b/code/game/objects/items/implants/security/implant_noteleport.dm @@ -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) diff --git a/code/modules/antagonists/heretic/status_effects/mark_effects.dm b/code/modules/antagonists/heretic/status_effects/mark_effects.dm index 3fc632852fe..3069eb9b19d 100644 --- a/code/modules/antagonists/heretic/status_effects/mark_effects.dm +++ b/code/modules/antagonists/heretic/status_effects/mark_effects.dm @@ -172,7 +172,7 @@ return COMPONENT_CANCEL_THROW -/// Signal proc for [COMSIG_MOVABLE_TELEPORTED] that blocks any teleports from our locked area. +/// Signal proc for [COMSIG_MOVABLE_TELEPORTING] that blocks any teleports from our locked area. /datum/status_effect/eldritch/blade/proc/on_teleport(mob/living/source, atom/destination, channel) SIGNAL_HANDLER @@ -182,7 +182,7 @@ to_chat(source, span_hypnophrase("An otherworldly force prevents your escape from [get_area_name(locked_to)]!")) source.Stun(1 SECONDS) - return COMPONENT_BLOCK_TELEPORT + return TRUE /// Signal proc for [COMSIG_MOVABLE_MOVED] that blocks any movement out of our locked area /datum/status_effect/eldritch/blade/proc/on_move(mob/living/source, turf/old_loc, movement_dir, forced)