From fa14d7b73421d360985ff603c5cfdcf8544bee63 Mon Sep 17 00:00:00 2001 From: dovydas12345 <37041561+dovydas12345@users.noreply.github.com> Date: Sat, 27 Oct 2018 20:32:15 +0300 Subject: [PATCH] Update pulling.dm --- code/modules/mob/pulling.dm | 43 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/code/modules/mob/pulling.dm b/code/modules/mob/pulling.dm index e284276677f..9a53be72326 100644 --- a/code/modules/mob/pulling.dm +++ b/code/modules/mob/pulling.dm @@ -5,30 +5,31 @@ return if(!AM || !isturf(AM.loc)) //if there's no object or the object being pulled is inside something: abort! return - if(!(AM.anchored) && !usr.incapacitated()) - AM.add_fingerprint(src) + if(!(AM.anchored)) + if(!incapacitated()) + AM.add_fingerprint(src) - // If we're pulling something then drop what we're currently pulling and pull this instead. - if(pulling) - // Are we trying to pull something we are already pulling? Then just stop here, no need to continue. - if(AM == pulling) - return - stop_pulling() + // If we're pulling something then drop what we're currently pulling and pull this instead. + if(pulling) + // Are we trying to pull something we are already pulling? Then just stop here, no need to continue. + if(AM == pulling) + return + stop_pulling() - if(AM.pulledby) - visible_message("[src] has pulled [AM] from [AM.pulledby]'s grip.") - AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once. + if(AM.pulledby) + visible_message("[src] has pulled [AM] from [AM.pulledby]'s grip.") + AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once. - pulling = AM - AM.pulledby = src - if(pullin) - pullin.update_icon(src) - if(ismob(AM)) - var/mob/M = AM - if(!iscarbon(src)) - M.LAssailant = null - else - M.LAssailant = usr + pulling = AM + AM.pulledby = src + if(pullin) + pullin.update_icon(src) + if(ismob(AM)) + var/mob/M = AM + if(!iscarbon(src)) + M.LAssailant = null + else + M.LAssailant = usr /mob/verb/stop_pulling() set name = "Stop Pulling"