diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm
index 9a360ea0bd3..d86dbcaf175 100644
--- a/code/datums/spells/ethereal_jaunt.dm
+++ b/code/datums/spells/ethereal_jaunt.dm
@@ -34,6 +34,9 @@
target.buckled.unbuckle_mob()
if(target.pulledby)
target.pulledby.stop_pulling()
+ target.stop_pulling()
+ if(target.buckled_mob)
+ target.unbuckle_mob(force=1)
jaunt_disappear(animation, target)
target.loc = holder
target.notransform=0 //mob is safely inside holder now, no need for protection.
diff --git a/code/datums/spells/turf_teleport.dm b/code/datums/spells/turf_teleport.dm
index 7f8832ed436..1d2b47f11c0 100644
--- a/code/datums/spells/turf_teleport.dm
+++ b/code/datums/spells/turf_teleport.dm
@@ -36,5 +36,9 @@
return
if(!target.Move(picked))
+ if(target.buckled)
+ target.buckled.unbuckle_mob()
+ if(target.buckled_mob)
+ target.unbuckle_mob(force=1)
target.loc = picked
playsound(get_turf(usr), sound2, 50,1)
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 92645d94d87..7c6d2062ff5 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -183,13 +183,15 @@ Class Procs:
continue
else
target = C
- if(target)
+ if(target && !target.buckled && !target.buckled_mob)
if(target.client)
target.client.perspective = EYE_PERSPECTIVE
target.client.eye = src
occupant = target
target.loc = src
target.stop_pulling()
+ if(target.pulledby)
+ target.pulledby.stop_pulling()
updateUsrDialog()
update_icon()
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index a7ee3ead1b8..827a258508e 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -42,20 +42,12 @@
return
if(!istype(target))
return
- if(target.buckled)
- occupant_message("[target] will not fit into the sleeper because they are buckled to [target.buckled]!")
- return
- if(patient)
- occupant_message("The sleeper is already occupied!")
- return
- if(target.buckled_mob) //slime attached to them
- occupant_message("[target] will not fit into the sleeper because they have a slime latched onto their head!")
+ if(!patient_insertion_check(target))
return
occupant_message("You start putting [target] into [src]...")
chassis.visible_message("[chassis] starts putting [target] into \the [src].")
if(do_after_cooldown(target))
- if(patient)
- occupant_message("The sleeper is already occupied!")
+ if(!patient_insertion_check(target))
return
target.forceMove(src)
patient = target
@@ -66,6 +58,18 @@
chassis.visible_message("[chassis] loads [target] into [src].")
log_message("[target] loaded. Life support functions engaged.")
+/obj/item/mecha_parts/mecha_equipment/sleeper/proc/patient_insertion_check(mob/living/carbon/target)
+ if(target.buckled)
+ occupant_message("[target] will not fit into the sleeper because they are buckled to [target.buckled]!")
+ return
+ if(target.buckled_mob)
+ occupant_message("[target] will not fit into the sleeper because [target.buckled_mob] is attached to it!")
+ return
+ if(patient)
+ occupant_message("The sleeper is already occupied!")
+ return
+ return 1
+
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/go_out()
if(!patient)
return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index ad942a8ba65..cb2fdf03c96 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -668,8 +668,8 @@
user << "You are currently buckled and cannot move."
log_append_to_last("Permission denied.")
return
- if(user.buckled_mob) //slime attached to us
- user << "You're too busy getting your life sucked out of you!"
+ if(user.buckled_mob) //mob attached to us
+ user << "You can't enter the exosuit with [user.buckled_mob] attached to you!"
return
visible_message("[user] starts to climb into [src.name].")
@@ -680,7 +680,9 @@
else if(occupant)
user << "[src.occupant] was faster! Try better next time, loser."
else if(user.buckled)
- user << "You have been buckled and cannot move."
+ user << "You can't enter the exosuit while buckled."
+ else if(user.buckled_mob)
+ user << "You can't enter the exosuit with [user.buckled_mob] attached to you."
else
moved_inside(user)
else
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 8ee70dbe07d..361c29ba0cb 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -122,7 +122,7 @@
if(istype(AM, /mob/living))
var/mob/living/L = AM
- if(L.buckled || L.buckled_mob || L.mob_size > max_mob_size) //buckled mobs and mobs too big for the container don't get inside closets.
+ if(L.buckled || L.buckled_mob || L.mob_size > max_mob_size) //buckled mobs, mobs with another mob attached, and mobs too big for the container don't get inside closets.
return 0
if(L.mob_size > MOB_SIZE_TINY) //decently sized mobs take more space than objects.
var/mobs_stored = 0
@@ -133,6 +133,7 @@
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
+ L.stop_pulling()
else if(!istype(AM, /obj/item) && !istype(AM, /obj/effect/dummy/chameleon))
return 0
else if(AM.density || AM.anchored)
@@ -140,6 +141,8 @@
else if(AM.flags & NODROP)
return 0
AM.loc = src
+ if(AM.pulledby)
+ AM.pulledby.stop_pulling()
return 1
/obj/structure/closet/proc/close()
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 6b3040a1677..a1c4cce58f7 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -149,6 +149,10 @@
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]")
/proc/admin_forcemove(mob/mover, atom/newloc)
+ if(mover.buckled)
+ mover.buckled.unbuckle_mob()
+ if(mover.buckled_mob)
+ mover.unbuckle_mob(force=1)
mover.loc = newloc
mover.on_forcemove(newloc)