Skip to content

Commit

Permalink
fix: stop damage to delivery chutes from items thrown through space (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
warriorstar-orion authored Sep 3, 2024
1 parent f6f19c3 commit d244f13
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions code/modules/recycling/sortingmachinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@
/obj/machinery/disposal/deliveryChute/update()
return

/obj/machinery/disposal/deliveryChute/CanPass(atom/movable/mover, turf/target, height)
// If the mover is a thrownthing passing through space, remove its thrown datum,
// ingest it like normal, and mark the chute as not passible.
// This prevents the mover from Entering the chute's turf
// while also bypassing thrownthing's /finalize, which would
// cause damage to the chute.
if(mover.throwing && !has_gravity(get_turf(mover)))
qdel(mover.throwing)
Bumped(mover)
return FALSE

. = ..()

/obj/machinery/disposal/deliveryChute/Bumped(atom/movable/AM) //Go straight into the chute
if(isprojectile(AM) || isAI(AM) || QDELETED(AM))
return
Expand Down

0 comments on commit d244f13

Please sign in to comment.