From b52450f0531655bb439da6fb103dac84a10ae20f Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Thu, 14 Aug 2014 19:24:00 +0100 Subject: [PATCH] Allows wheelchair occupants to drive if the driving mob is incapacitated --- .../structures/stool_bed_chair_nest/wheelchair.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 705351acfc..9c00ee3896 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -18,12 +18,17 @@ buckled_mob.dir = dir /obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction) + // Redundant check? if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained()) if(user==pulling) pulling = null user.pulledby = null user << "\red You lost your grip!" return + if(buckled_mob && pulling && user == buckled_mob) + if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained()) + pulling.pulledby = null + pulling = null if(user.pulling && (user == pulling)) pulling = null user.pulledby = null @@ -136,12 +141,12 @@ if(propelled || (pulling && (pulling.a_intent == "hurt"))) var/mob/living/occupant = buckled_mob unbuckle() - + if (pulling && (pulling.a_intent == "hurt")) occupant.throw_at(A, 3, 3, pulling) else if (propelled) occupant.throw_at(A, 3, propelled) - + occupant.apply_effect(6, STUN, 0) occupant.apply_effect(6, WEAKEN, 0) occupant.apply_effect(6, STUTTER, 0)