From 2439a0654b57bb3c2b9ba179d97d7ffaab51527a Mon Sep 17 00:00:00 2001 From: raspy-on-osu Date: Mon, 24 Aug 2020 20:54:36 -0400 Subject: [PATCH] it likes moving grounding rod now it actually gets the dir instead of just adding the rod itself to the pick also moved declaration of move_dir because dm was freaking out because i had two declarations --- code/modules/power/tesla/energy_ball.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 7b247934d6..b4ca2062b3 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -92,6 +92,7 @@ /obj/singularity/energy_ball/proc/move_the_basket_ball(var/move_amount) //we face the last thing we zapped, so this lets us favor that direction a bit var/move_bias = pick(GLOB.alldirs) + var/move_dir var/rods = GLOB.grounding_rods if(rods) // grounding rods pull the tesla ball, picks the nearest one for(var/rod in rods) @@ -103,9 +104,9 @@ for(var/i in 0 to move_amount) if(rods) - var/move_dir = pick(GLOB.alldirs + move_bias + rodtarget) + move_dir = pick(GLOB.alldirs + get_dir(src,rodtarget)) else - var/move_dir = pick(GLOB.alldirs + move_bias) //ensures large-ball teslas don't just sit around + move_dir = pick(GLOB.alldirs + move_bias) //ensures large-ball teslas don't just sit around if(target && prob(10)) move_dir = get_dir(src,target) var/turf/T = get_step(src, move_dir)