From c4a3bbe5c6e833d75984940bbda23611955a0c92 Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Mon, 16 May 2011 01:36:39 +0000 Subject: [PATCH] Cables can now be placed more freely. If there is a cable going from south to east and you wish to place a cable from south to center it will now allow you to do this. It now only checks if there is identical wire on a tile already to prevent two identical pieces from being placed one on top of the other. This should make wiring tight places slightly easier as well as more possibilities for wire art. Enjoy. Can't wait to see your whacky library wire-runes. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1592 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/power/cable.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index b62da8853ff..86f5034cb93 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -19,9 +19,8 @@ var/dirn = get_dir(user, src) - for(var/obj/cable/LC in T) - if(LC.d1 == dirn || LC.d2 == dirn) + if( (LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0) ) user << "There's already a cable at that position." return @@ -266,7 +265,7 @@ dirn = get_dir(F, user) for(var/obj/cable/LC in F) - if(LC.d1 == dirn || LC.d2 == dirn) + if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0)) user << "There's already a cable at that position." return