Fixes bugs with shuttles breaking pipes, wires and disposals

This commit is contained in:
CitadelStationBot
2017-04-24 17:43:37 -05:00
parent a6f6317b51
commit 3afe339198
9 changed files with 166 additions and 47 deletions
+10 -14
View File
@@ -1,3 +1,8 @@
// Called before shuttle starts moving atoms.
/atom/movable/proc/beforeShuttleMove(turf/T1, rotation)
return
// Called when shuttle attempts to move an atom.
/atom/movable/proc/onShuttleMove(turf/T1, rotation)
if(rotation)
shuttleRotate(rotation)
@@ -6,25 +11,16 @@
update_parallax_contents()
return 1
// Called after all of the atoms on shuttle are moved.
/atom/movable/proc/afterShuttleMove()
return
/obj/onShuttleMove()
if(invisibility >= INVISIBILITY_ABSTRACT)
return 0
. = ..()
/obj/machinery/atmospherics/onShuttleMove()
. = ..()
for(DEVICE_TYPE_LOOP)
if(get_area(nodes[I]) != get_area(src))
nullifyNode(I)
#define DIR_CHECK_TURF_AREA(X) (get_area(get_ranged_target_turf(src, X, 1)) != A)
/obj/structure/cable/onShuttleMove()
. = ..()
var/A = get_area(src)
//cut cables on the edge
if(DIR_CHECK_TURF_AREA(NORTH) || DIR_CHECK_TURF_AREA(SOUTH) || DIR_CHECK_TURF_AREA(EAST) || DIR_CHECK_TURF_AREA(WEST))
cut_cable_from_powernet()
#undef DIR_CHECK_TURF_AREA
/atom/movable/light/onShuttleMove()
return 0