From 52457ebdf67d588beb369922700047de32860685 Mon Sep 17 00:00:00 2001 From: dovydas12345 Date: Sat, 27 Oct 2018 20:20:51 +0300 Subject: [PATCH 1/3] No more zombie arms --- code/modules/mob/pulling.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/pulling.dm b/code/modules/mob/pulling.dm index 5a532ee1a42..e284276677f 100644 --- a/code/modules/mob/pulling.dm +++ b/code/modules/mob/pulling.dm @@ -5,7 +5,7 @@ return if(!AM || !isturf(AM.loc)) //if there's no object or the object being pulled is inside something: abort! return - if(!(AM.anchored)) + if(!(AM.anchored) && !usr.incapacitated()) AM.add_fingerprint(src) // If we're pulling something then drop what we're currently pulling and pull this instead. 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 2/3] 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" From 10c235378ffb5c79574632a81243caf949d98812 Mon Sep 17 00:00:00 2001 From: dovydas12345 <37041561+dovydas12345@users.noreply.github.com> Date: Sat, 27 Oct 2018 20:35:34 +0300 Subject: [PATCH 3/3] Updates to the way asked. --- code/modules/mob/pulling.dm | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/code/modules/mob/pulling.dm b/code/modules/mob/pulling.dm index 9a53be72326..e15bd9930e8 100644 --- a/code/modules/mob/pulling.dm +++ b/code/modules/mob/pulling.dm @@ -5,31 +5,31 @@ return if(!AM || !isturf(AM.loc)) //if there's no object or the object being pulled is inside something: abort! return + if(!incapacitated()) + return if(!(AM.anchored)) - if(!incapacitated()) - AM.add_fingerprint(src) + 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"