From f58487a0e9a944059dfbf303726253f00bb6fe49 Mon Sep 17 00:00:00 2001 From: LBraindead Date: Sat, 18 Jan 2014 00:14:01 +0100 Subject: [PATCH] Update ZAS_Zones.dm ZAS adjustments --- code/ZAS/ZAS_Zones.dm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index 1d92062e25..f6a3327ff2 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -151,6 +151,13 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs air.group_multiplier++ T.zone = src + +///// Z-Level Stuff + // also add the tile below it if its open space + if(istype(T, /turf/simulated/floor/open)) + var/turf/simulated/floor/open/T2 = T + src.AddTurf(T2.floorbelow) +///// Z-Level Stuff else if(!unsimulated_tiles) @@ -773,6 +780,32 @@ zone/proc/Rebuild() if(adjacent_id && (!lowest_id || adjacent_id < lowest_id)) lowest_id = adjacent_id +/////// Z-Level stuff + var/turf/controlerlocation = locate(1, 1, current.z) + for(var/obj/effect/landmark/zcontroler/controler in controlerlocation) + // upwards + if(controler.up) + var/turf/simulated/adjacent = locate(current.x, current.y, controler.up_target) + + if(adjacent in turfs && istype(adjacent, /turf/simulated/floor/open)) + current_adjacents += adjacent + adjacent_id = turfs[adjacent] + + if(adjacent_id && (!lowest_id || adjacent_id < lowest_id)) + lowest_id = adjacent_id + + // downwards + if(controler.down && istype(current, /turf/simulated/floor/open)) + var/turf/simulated/adjacent = locate(current.x, current.y, controler.down_target) + + if(adjacent in turfs) + current_adjacents += adjacent + adjacent_id = turfs[adjacent] + + if(adjacent_id && (!lowest_id || adjacent_id < lowest_id)) + lowest_id = adjacent_id +/////// Z-Level stuff + if(!lowest_id) lowest_id = current_identifier++ identical_ids += lowest_id