diff --git a/code/__DEFINES/dcs/signals/atom/signals_movable.dm b/code/__DEFINES/dcs/signals/atom/signals_movable.dm index ba889d0b5212..c207ce1468d5 100644 --- a/code/__DEFINES/dcs/signals/atom/signals_movable.dm +++ b/code/__DEFINES/dcs/signals/atom/signals_movable.dm @@ -11,6 +11,9 @@ #define COMPONENT_CANCEL_MOVE (1<<0) /// From /turf/open/gm/river/Entered(): (turf/open/gm/river/river, covered) #define COMSIG_MOVABLE_ENTERED_RIVER "movable_entered_river" +/// From /atom/Cross(): (atom) +#define COMSIG_MOVABLE_PRE_CROSSED "movable_pre_cross" + #define COMPONENT_IGNORE_CROSS (1<<0) ///from /mob/living/carbon/xenomorph/start_pulling(): (mob/living/carbon/xenomorph/X) #define COMSIG_MOVABLE_XENO_START_PULLING "movable_xeno_start_pulling" diff --git a/code/game/turfs/transit.dm b/code/game/turfs/transit.dm index 445a1658570d..7d44d34c1bc5 100644 --- a/code/game/turfs/transit.dm +++ b/code/game/turfs/transit.dm @@ -136,9 +136,14 @@ /atom/movable/proc/handle_paradrop(turf/target, dropship_name) clear_active_explosives() - ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) + //ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) ADD_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_DROPSHIP_INTERACTION) ADD_TRAIT(src, TRAIT_NO_STRAY, TRAIT_SOURCE_DROPSHIP_INTERACTION) + RegisterSignal(src, COMSIG_MOVABLE_PRE_CROSSED, PROC_REF(cancel_cross)) + RegisterSignal(src, list( + COMSIG_LIVING_FLAMER_FLAMED, + COMSIG_LIVING_PREIGNITION + ), PROC_REF(cancel_fire)) var/image/cables = image('icons/obj/structures/droppod_32x64.dmi', src, "chute_cables_static") overlays += cables var/image/chute = image('icons/obj/structures/droppod_64x64.dmi', src, "chute_static") @@ -165,8 +170,14 @@ REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) REMOVE_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_DROPSHIP_INTERACTION) REMOVE_TRAIT(src, TRAIT_NO_STRAY, TRAIT_SOURCE_DROPSHIP_INTERACTION) + UnregisterSignal(src, COMSIG_MOVABLE_PRE_CROSSED) + UnregisterSignal(src, COMSIG_LIVING_FLAMER_FLAMED) overlays -= cables overlays -= chute + for(var/atom/movable/atom in loc) + if(atom == src) + continue + atom.Cross(src) /atom/movable/proc/clear_active_explosives() for(var/obj/item/explosive/explosive in contents) @@ -234,6 +245,13 @@ death(last_damage_data) status_flags |= PERMANENTLY_DEAD +/atom/movable/proc/cancel_cross() + SIGNAL_HANDLER + return COMPONENT_IGNORE_CROSS + +/atom/movable/proc/cancel_fire() + SIGNAL_HANDLER + return COMPONENT_NO_BURN /turf/open/space/transit/dropship/alamo shuttle_tag = DROPSHIP_ALAMO diff --git a/code/modules/movement/movement.dm b/code/modules/movement/movement.dm index e12a5b439296..c160de82d346 100644 --- a/code/modules/movement/movement.dm +++ b/code/modules/movement/movement.dm @@ -140,11 +140,11 @@ destination.Entered(src, oldloc) if(destarea && (old_area != destarea || !isturf(oldloc))) destarea.Entered(src, oldloc) - - for(var/atom/movable/AM in destination) - if(AM == src) - continue - AM.Crossed(src, oldloc) + if(!(SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_CROSSED) & COMPONENT_IGNORE_CROSS)) + for(var/atom/movable/AM in destination) + if(AM == src) + continue + AM.Crossed(src, oldloc) Moved(oldloc, NONE, TRUE) . = TRUE