From bf9d249a42ce33059b1cf1eb491dfc087e5d202f Mon Sep 17 00:00:00 2001 From: YPOQ <30683121+YPOQ@users.noreply.github.com> Date: Wed, 1 May 2019 06:54:37 -0600 Subject: [PATCH] Fixes borg wheelchairs going super fast (#43761) --- code/modules/vehicles/wheelchair.dm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm index ecca7638caf..29dee838e64 100644 --- a/code/modules/vehicles/wheelchair.dm +++ b/code/modules/vehicles/wheelchair.dm @@ -35,17 +35,16 @@ return ..() /obj/vehicle/ridden/wheelchair/driver_move(mob/living/user, direction) - var/mob/living/carbon/human/H = user - if(istype(H)) - if(canmove && (H.get_num_arms() < arms_required)) - to_chat(H, "You don't have enough arms to operate the wheels!") + if(istype(user)) + if(canmove && (user.get_num_arms() < arms_required)) + to_chat(user, "You don't have enough arms to operate the wheels!") canmove = FALSE - addtimer(VARSET_CALLBACK(src, canmove , TRUE), 20) + addtimer(VARSET_CALLBACK(src, canmove, TRUE), 20) return FALSE var/datum/component/riding/D = GetComponent(/datum/component/riding) //1.5 (movespeed as of this change) multiplied by 6.7 gets ABOUT 10 (rounded), the old constant for the wheelchair that gets divided by how many arms they have //if that made no sense this simply makes the wheelchair speed change along with movement speed delay - D.vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * 6.7) / min(H.get_num_arms(), 2) + D.vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * 6.7) / min(user.get_num_arms(), 2) return ..() /obj/vehicle/ridden/wheelchair/Moved() @@ -104,8 +103,7 @@ return FALSE /obj/vehicle/ridden/wheelchair/the_whip/driver_move(mob/living/user, direction) - var/mob/living/carbon/human/H = user - if(istype(H)) + if(istype(user)) var/datum/component/riding/D = GetComponent(/datum/component/riding) - D.vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * 6.7) / H.get_num_arms() + D.vehicle_move_delay = round(CONFIG_GET(number/movedelay/run_delay) * 6.7) / user.get_num_arms() return ..()