Skip to content

Commit

Permalink
Fixes traps triggering when shuttlecrushed (#5820)
Browse files Browse the repository at this point in the history
# About the pull request

Nullspaces traps when they get shuttlecrushed.

Currently, if traps get shuttlecrushed, huggers/acid appear on the
dropship, instead of them simply getting deleted.

This might be a godawful way to do it, but this seemed the cleanest
solution to me. Fixes #5798

# Explain why it's good for the game

Shuttlecrushing should properly delete objects below them, it just
happens that hugger/acid traps forcibly trigger upon `Destroy()`.

# Testing Photographs and Procedure
Hugger and acid traps getting shuttlecrushed:

<details>
<summary>Screenshots & Videos</summary>



https://github.com/cmss13-devs/cmss13/assets/49321394/87540656-59b1-4299-aa73-b630b72dc1b1



</details>


# Changelog

:cl:
fix: Hugger and acid traps no longer activate when they get
shuttlecrushed.
/:cl:
  • Loading branch information
Vicacrov authored Mar 1, 2024
1 parent ca939fe commit 3136fd1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/modules/cm_aliens/structures/trap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,16 @@
to_chat(user, SPAN_XENONOTICE("You place a facehugger in [src]."))
qdel(FH)

/obj/effect/alien/resin/trap/healthcheck()
if(trap_type != RESIN_TRAP_EMPTY && loc)
trigger_trap()
..()

/obj/effect/alien/resin/trap/Crossed(atom/A)
if(ismob(A) || isVehicleMultitile(A))
HasProximity(A)

/obj/effect/alien/resin/trap/Destroy()
if(trap_type != RESIN_TRAP_EMPTY && loc)
trigger_trap()
QDEL_NULL_LIST(tripwires)
. = ..()

Expand Down

0 comments on commit 3136fd1

Please sign in to comment.