From 7aa9ac20009082f38035df8622a5b045b401e910 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 23 Dec 2015 03:03:13 -0500 Subject: [PATCH] fixes drilling bent pipes into walls --- code/game/turfs/simulated/floor.dm | 8 ++++---- code/game/turfs/simulated/walls.dm | 12 +++++------- code/game/turfs/simulated/walls_reinforced.dm | 12 +++++------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 9cddb5a9fa4..db878877b84 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -600,13 +600,13 @@ var/list/wood_icons = list("wood","wood-broken") "You slide [P] along \the [src].", \ "You hear the scrape of metal against something.") user.drop_item() - if (P.is_bent_pipe()) // bent pipe rotation fix see construction.dm + if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm P.dir = 5 - if (user.dir == 1) + if(user.dir == 1) P.dir = 6 - if (user.dir == 2) + else if(user.dir == 2) P.dir = 9 - if (user.dir == 4) + else if(user.dir == 4) P.dir = 10 else P.dir = user.dir diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 46cad11d9c5..cba8ed038f0 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -427,23 +427,21 @@ "[user] starts drilling a hole in \the [src].", \ "\blue You start drilling a hole in \the [src].", \ "You hear ratchet.") - if (do_after(user, 80, target = src)) + if(do_after(user, 80, target = src)) user.visible_message( \ "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ "\blue You have finished drilling in \the [src] and push the [P] into the void.", \ "You hear ratchet.") user.drop_item() - if (P.pipe_type in list (1,3,12)) // bent pipe rotation fix see construction.dm + if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm P.dir = 5 - if (user.dir == 1) + if(user.dir == 1) P.dir = 6 - if (user.dir == 2) + else if(user.dir == 2) P.dir = 9 - if (user.dir == 4) + else if(user.dir == 4) P.dir = 10 - if (user.dir == 5) - P.dir = 8 else P.dir = user.dir P.x = src.x diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 4c7f1baf020..7f2ffd07a31 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -249,23 +249,21 @@ "[user] starts drilling a hole in \the [src].", \ "\blue You start drilling a hole in \the [src]. This is going to take a while.", \ "You hear ratchet.") - if (do_after(user, 160, target = src)) + if(do_after(user, 160, target = src)) user.visible_message( \ "[user] drills a hole in \the [src] and pushes \a [P] into the void", \ "\blue You have finished drilling in \the [src] and push the [P] into the void.", \ "You hear ratchet.") user.drop_item() - if (P.pipe_type in list (1,3,12)) // bent pipe rotation fix see construction.dm + if(P.is_bent_pipe()) // bent pipe rotation fix see construction.dm P.dir = 5 - if (user.dir == 1) + if(user.dir == 1) P.dir = 6 - if (user.dir == 2) + else if(user.dir == 2) P.dir = 9 - if (user.dir == 4) + else if(user.dir == 4) P.dir = 10 - if (user.dir == 5) - P.dir = 8 else P.dir = user.dir P.x = src.x