Skip to content

Commit

Permalink
eh
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatethisengine committed Jul 3, 2024
1 parent c9cc58f commit a1c0792
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 19 additions & 1 deletion code/game/turfs/transit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions code/modules/movement/movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1c0792

Please sign in to comment.