From fbede7a1931df4d093f048c5e73a89145ac2b2f2 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 28 Apr 2015 23:00:56 -0400 Subject: [PATCH] Minor ZAS-related cleanup --- code/ZAS/Atom.dm | 2 +- code/ZAS/Turf.dm | 7 +++++-- code/__HELPERS/unsorted.dm | 24 ------------------------ code/game/turfs/turf.dm | 12 +----------- 4 files changed, 7 insertions(+), 38 deletions(-) diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index 6f75f4ea29..e655295f78 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -50,7 +50,7 @@ atom/proc/c_airblock(turf/other) #ifdef ZASDBG ASSERT(isturf(other)) #endif - return !CanPass(null, other, 0, 0) + 2*!CanPass(null, other, 1.5, 1) + return (AIR_BLOCKED*!CanPass(null, other, 0, 0))|(ZONE_BLOCKED*!CanPass(null, other, 1.5, 1)) turf/c_airblock(turf/other) diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index 9d031ce3d3..1b770590e1 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -46,6 +46,7 @@ air_master.connect(sim, src) /turf/simulated/update_air_properties() + if(zone && zone.invalid) c_copy_air() zone = null //Easier than iterating through the list at the zone. @@ -120,8 +121,10 @@ //Might have assigned a zone, since this happens for each direction. if(!zone) - //if((block & ZONE_BLOCKED) || (r_block & ZONE_BLOCKED && !(s_block & ZONE_BLOCKED))) - if(((block & ZONE_BLOCKED) && !(r_block & ZONE_BLOCKED)) || (r_block & ZONE_BLOCKED && !(s_block & ZONE_BLOCKED))) + //We do not merge if + // they are blocking us and we are not blocking them, or if + // we are blocking them and not blocking ourselves - this prevents tiny zones from forming on doorways. + if(((block & ZONE_BLOCKED) && !(r_block & ZONE_BLOCKED)) || ((r_block & ZONE_BLOCKED) && !(s_block & ZONE_BLOCKED))) #ifdef ZASDBG if(verbose) world << "[d] is zone blocked." //dbg(zone_blocked, d) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index c65698933c..564910d3df 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -922,30 +922,6 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl refined_trg -= B continue moving - var/list/doors = new/list() - - if(toupdate.len) - for(var/turf/simulated/T1 in toupdate) - for(var/obj/machinery/door/D2 in T1) - doors += D2 - /*if(T1.parent) - air_master.groups_to_rebuild += T1.parent - else - air_master.tiles_to_update += T1*/ - - if(fromupdate.len) - for(var/turf/simulated/T2 in fromupdate) - for(var/obj/machinery/door/D2 in T2) - doors += D2 - /*if(T2.parent) - air_master.groups_to_rebuild += T2.parent - else - air_master.tiles_to_update += T2*/ - - for(var/obj/O in doors) - O:update_nearby_tiles(1) - - proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0) if(!original) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 29f425d4a3..5e8e5747c0 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -227,12 +227,6 @@ if(S.zone) S.zone.rebuild() if(ispath(N, /turf/simulated/floor)) - //if the old turf had a zone, connect the new turf to it as well - Cael - //Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf. - //if(zone) - // zone.RemoveTurf(src) - // if(!zone.CheckStatus()) - // zone.SetStatus(ZONE_ACTIVE) var/turf/simulated/W = new N( locate(src.x, src.y, src.z) ) //W.Assimilate_Air() @@ -249,7 +243,7 @@ W.RemoveLattice() if(air_master) - air_master.mark_for_update(src) + air_master.mark_for_update(src) //handle the addition of the new turf. for(var/turf/space/S in range(W,1)) S.update_starlight() @@ -258,10 +252,6 @@ return W else - //if(zone) - // zone.RemoveTurf(src) - // if(!zone.CheckStatus()) - // zone.SetStatus(ZONE_ACTIVE) var/turf/W = new N( locate(src.x, src.y, src.z) ) W.lighting_lumcount += old_lumcount