mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Minor ZAS-related cleanup
This commit is contained in:
@@ -50,7 +50,7 @@ atom/proc/c_airblock(turf/other)
|
|||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
ASSERT(isturf(other))
|
ASSERT(isturf(other))
|
||||||
#endif
|
#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)
|
turf/c_airblock(turf/other)
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
air_master.connect(sim, src)
|
air_master.connect(sim, src)
|
||||||
|
|
||||||
/turf/simulated/update_air_properties()
|
/turf/simulated/update_air_properties()
|
||||||
|
|
||||||
if(zone && zone.invalid)
|
if(zone && zone.invalid)
|
||||||
c_copy_air()
|
c_copy_air()
|
||||||
zone = null //Easier than iterating through the list at the zone.
|
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.
|
//Might have assigned a zone, since this happens for each direction.
|
||||||
if(!zone)
|
if(!zone)
|
||||||
|
|
||||||
//if((block & ZONE_BLOCKED) || (r_block & ZONE_BLOCKED && !(s_block & ZONE_BLOCKED)))
|
//We do not merge if
|
||||||
if(((block & ZONE_BLOCKED) && !(r_block & ZONE_BLOCKED)) || (r_block & ZONE_BLOCKED && !(s_block & ZONE_BLOCKED)))
|
// 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
|
#ifdef ZASDBG
|
||||||
if(verbose) world << "[d] is zone blocked."
|
if(verbose) world << "[d] is zone blocked."
|
||||||
//dbg(zone_blocked, d)
|
//dbg(zone_blocked, d)
|
||||||
|
|||||||
@@ -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
|
refined_trg -= B
|
||||||
continue moving
|
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)
|
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||||
if(!original)
|
if(!original)
|
||||||
|
|||||||
@@ -227,12 +227,6 @@
|
|||||||
if(S.zone) S.zone.rebuild()
|
if(S.zone) S.zone.rebuild()
|
||||||
|
|
||||||
if(ispath(N, /turf/simulated/floor))
|
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) )
|
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||||
//W.Assimilate_Air()
|
//W.Assimilate_Air()
|
||||||
@@ -249,7 +243,7 @@
|
|||||||
W.RemoveLattice()
|
W.RemoveLattice()
|
||||||
|
|
||||||
if(air_master)
|
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))
|
for(var/turf/space/S in range(W,1))
|
||||||
S.update_starlight()
|
S.update_starlight()
|
||||||
@@ -258,10 +252,6 @@
|
|||||||
return W
|
return W
|
||||||
|
|
||||||
else
|
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) )
|
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||||
W.lighting_lumcount += old_lumcount
|
W.lighting_lumcount += old_lumcount
|
||||||
|
|||||||
Reference in New Issue
Block a user