From 03412a24f8b08f6ea15e5468f1bbe57e9aec3f97 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 2 Jun 2015 23:26:45 -0400 Subject: [PATCH] Allows indirectly connected turfs to merge zones if either zone is small enough. Fixes #9235 --- code/ZAS/Controller.dm | 4 ++-- code/ZAS/_docs.dm | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm index 83d2a54ec3..a2d9bcd972 100644 --- a/code/ZAS/Controller.dm +++ b/code/ZAS/Controller.dm @@ -281,8 +281,8 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun var/direct = !(block & ZONE_BLOCKED) var/space = !istype(B) - if(direct && !space) - if(equivalent_pressure(A.zone,B.zone) || current_cycle == 0) + if(!space) + if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0))) merge(A.zone,B.zone) return diff --git a/code/ZAS/_docs.dm b/code/ZAS/_docs.dm index 8d084dc4c9..1f652ffaab 100644 --- a/code/ZAS/_docs.dm +++ b/code/ZAS/_docs.dm @@ -32,4 +32,6 @@ Notes for people who used ZAS before: #define AIR_BLOCKED 1 #define ZONE_BLOCKED 2 -#define BLOCKED 3 \ No newline at end of file +#define BLOCKED 3 + +#define ZONE_MIN_SIZE 14 //zones with less than this many turfs will always merge, even if the connection is not direct