Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix atmos #8537

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions code/ZAS/Connection.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ Class Procs:
return !(state & CONNECTION_INVALID)

/connection/proc/erase()
edge.remove_connection(src)
if(edge)
edge.remove_connection(src)
state |= CONNECTION_INVALID
//world << "Connection Erased: [state]"

/connection/proc/update()
//world << "Updated, \..."
if(!istype(A,/turf))
if(!A.is_simulated)
//world << "Invalid A."
erase()
return
Expand All @@ -118,10 +119,8 @@ Class Procs:
else
mark_direct()

var/b_is_space = !istype(B,/turf)

if(state & CONNECTION_SPACE)
if(!b_is_space)
if(B.is_simulated)
//world << "Invalid B."
erase()
return
Expand All @@ -131,16 +130,16 @@ Class Procs:
erase()
//world << "erased."
return
else
if(edge)
edge.remove_connection(src)
edge = SSair.get_edge(A.zone, B)
edge.add_connection(src)
zoneA = A.zone
zoneA = A.zone

//world << "valid."
return

else if(b_is_space)
else if(!B.is_simulated)
//world << "Invalid B."
erase()
return
Expand Down
8 changes: 5 additions & 3 deletions code/ZAS/Turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

var/previously_open = open_directions
open_directions = 0
var/list/postponed
var/list/postponed = list()
#ifdef ZLEVELS
for(var/d = 1, d < 64, d *= 2)
#else
Expand Down Expand Up @@ -96,8 +96,6 @@
// 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)))
//Postpone this tile rather than exit, since a connection can still be made.
if(!postponed)
postponed = list()
postponed.Add(neighbour_turf)
else
neighbour_turf.zone.add(src)
Expand All @@ -106,6 +104,10 @@
#endif
else if(neighbour_turf.zone != zone)
SSair.connect(src, neighbour_turf)
else if(zone)
SSair.connect(src, neighbour_turf)
else // This tile does not yet have a valid zone, but likely to get one from other neighbours
postponed.Add(neighbour_turf)

if(!TURF_HAS_VALID_ZONE(src)) //Still no zone, make a new one.
var/zone/newzone = new/zone()
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystems/air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ SUBSYSTEM_DEF(air)
#ifdef ZASDBG
ASSERT(isturf(A))
ASSERT(isturf(B))
if(istype(B, /turf/space))
return FALSE
#endif

var/ablock = A.c_airblock(B)
Expand Down
Loading