From a577fccccfc8bd4e717262e9bac79e2ee3323cf7 Mon Sep 17 00:00:00 2001 From: emmanuelbassil <6874235+emmanuelbassil@users.noreply.github.com> Date: Tue, 17 Oct 2023 08:35:16 +0300 Subject: [PATCH] [MIRROR] Fixes placing mobs in mounted sleepers --- code/_onclick/item_attack.dm | 2 +- code/modules/mob/mob.dm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 180465f46795c..6b1c8db6706bf 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -186,7 +186,7 @@ avoid code duplication. This includes items that may sometimes act as a standard return FALSE // Target checks - if (!Adjacent(target)) + if (isturf(target.loc) && !Adjacent(target)) if (!silent) FEEDBACK_FAILURE(src, "You must remain next to \the [target].") return FALSE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9f0434d1b0329..dfc0f452b63c1 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -523,7 +523,11 @@ /mob/proc/start_pulling(atom/movable/AM) - if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! + if ( !AM || !usr || src==AM || !isturf(src.loc)) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! + return + + if (!Adjacent(AM)) + to_chat(src, SPAN_WARNING("You must remain next to \the [AM].")) return if (AM.anchored)