Fixes grabbed mobs being lowered after being buckled to a bed (#21047)

Stops the lowering animation from triggering if the mob is buckled to a
roller bed while grabbed, screenshot shows live functionality with the
bed extended but the patient laying over the legs of the bed.

<img width="119" height="118" alt="image"
src="https://github.com/user-attachments/assets/b34fe654-9692-4771-bcca-6633068a9d8b"
/>
This commit is contained in:
AlaunusLux
2025-07-26 10:19:16 +00:00
committed by GitHub
parent 8b00bc3f2c
commit e6fd2b5f47
2 changed files with 65 additions and 3 deletions
+7 -3
View File
@@ -199,6 +199,9 @@
/obj/item/grab/proc/adjust_position()
if(!affecting)
return
var/buckled_to_bed = affecting.buckled_to ? istype(affecting.buckled_to, /obj/structure/bed/roller) : FALSE
if(buckled_to_bed)
return
if(affecting.buckled_to && affecting.buckled_to != assailant)
animate(affecting, pixel_x = affecting.get_standard_pixel_x(), pixel_y = affecting.get_standard_pixel_y(), 4, 1, LINEAR_EASING)
return
@@ -415,9 +418,10 @@
affecting.update_canmove()
affecting.anchored = FALSE
UnregisterSignal(assailant, COMSIG_MOVABLE_MOVED)
animate(affecting, pixel_x = affecting.get_standard_pixel_x(), pixel_y = affecting.get_standard_pixel_y(), 4, 1, LINEAR_EASING)
affecting.layer = initial(affecting.layer)
var/buckled_to_bed = affecting.buckled_to ? istype(affecting.buckled_to, /obj/structure/bed/roller) : FALSE
if(!buckled_to_bed)
animate(affecting, pixel_x = affecting.get_standard_pixel_x(), pixel_y = affecting.get_standard_pixel_y(), 4, 1, LINEAR_EASING)
affecting.layer = initial(affecting.layer)
if(affecting)
ADD_FALLING_ATOM(affecting) // Makes the grabbee check if they can fall.
affecting.grabbed_by -= src