mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
More macros (#2955)
changes: Holomaps now use an area flag instead of a proc to determine which areas do not draw on the holomap. The supply shuttle once more has a roof. The supply shuttle's landing zone is now dynamically lit. Turfs only generate visibility updates on Initialize() after mapload - visualnet is not initialized by then anyways. Merged /datum/gas_mixture/(init) into /datum/gas_mixture/New(). Converted a ZAS proc into a macro. Made ZAS attempt to remove a turf from a zone instead of always rebuilding it in a certain case. Macroized two misc procs. Fixes #2947.
This commit is contained in:
@@ -60,8 +60,8 @@ Class Procs:
|
||||
|
||||
/connection/New(turf/simulated/A, turf/simulated/B)
|
||||
#ifdef ZASDBG
|
||||
ASSERT(SSair.has_valid_zone(A))
|
||||
//ASSERT(SSair.has_valid_zone(B))
|
||||
ASSERT(TURF_HAS_VALID_ZONE(A))
|
||||
//ASSERT(TURF_HAS_VALID_ZONE(B))
|
||||
#endif
|
||||
src.A = A
|
||||
src.B = B
|
||||
|
||||
+10
-10
@@ -43,7 +43,7 @@
|
||||
if(istype(unsim, /turf/simulated))
|
||||
|
||||
var/turf/simulated/sim = unsim
|
||||
if(SSair.has_valid_zone(sim))
|
||||
if(TURF_HAS_VALID_ZONE(sim))
|
||||
|
||||
SSair.connect(sim, src)
|
||||
|
||||
@@ -150,11 +150,15 @@
|
||||
#endif
|
||||
|
||||
//Check that our zone hasn't been cut off recently.
|
||||
//This happens when windows move or are constructed. We need to rebuild.
|
||||
//This happens when windows move or are constructed. Try to remove first, otherwise we need to rebuild.
|
||||
if((previously_open & d) && istype(unsim, /turf/simulated))
|
||||
var/turf/simulated/sim = unsim
|
||||
if(zone && sim.zone == zone)
|
||||
zone.rebuild()
|
||||
if (can_safely_remove_from_zone())
|
||||
c_copy_air()
|
||||
zone.remove(src)
|
||||
else
|
||||
zone.rebuild()
|
||||
return
|
||||
|
||||
continue
|
||||
@@ -166,8 +170,7 @@
|
||||
var/turf/simulated/sim = unsim
|
||||
sim.open_directions |= reverse_dir[d]
|
||||
|
||||
if(SSair.has_valid_zone(sim))
|
||||
|
||||
if(TURF_HAS_VALID_ZONE(sim))
|
||||
//Might have assigned a zone, since this happens for each direction.
|
||||
if(!zone)
|
||||
|
||||
@@ -182,11 +185,8 @@
|
||||
#endif
|
||||
|
||||
//Postpone this tile rather than exit, since a connection can still be made.
|
||||
if(!postponed) postponed = list()
|
||||
postponed.Add(sim)
|
||||
|
||||
LAZYADD(postponed, sim)
|
||||
else
|
||||
|
||||
sim.zone.add(src)
|
||||
|
||||
#ifdef ZASDBG
|
||||
@@ -215,7 +215,7 @@
|
||||
if(!postponed) postponed = list()
|
||||
postponed.Add(unsim)
|
||||
|
||||
if(!SSair.has_valid_zone(src)) //Still no zone, make a new one.
|
||||
if(!TURF_HAS_VALID_ZONE(src)) //Still no zone, make a new one.
|
||||
var/zone/newzone = new/zone()
|
||||
newzone.add(src)
|
||||
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ Class Procs:
|
||||
#ifdef ZASDBG
|
||||
ASSERT(!invalid)
|
||||
ASSERT(istype(T))
|
||||
ASSERT(!SSair.has_valid_zone(T))
|
||||
ASSERT(!TURF_HAS_VALID_ZONE(T))
|
||||
#endif
|
||||
var/datum/gas_mixture/turf_air = T.return_air()
|
||||
add_tile_air(turf_air)
|
||||
|
||||
Reference in New Issue
Block a user