Skip to content
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
1 change: 1 addition & 0 deletions mods/persistence/_persistence.dme
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "controllers\atoms.dm"
#include "controllers\autotransfer.dm"
#include "controllers\ticker.dm"
#include "controllers\subsystems\air.dm"
#include "controllers\subsystems\autosave.dm"
#include "controllers\subsystems\mapping.dm"
#include "controllers\subsystems\mining.dm"
Expand Down
14 changes: 14 additions & 0 deletions mods/persistence/controllers/subsystems/air.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// TODO: Solve this issue properly
// On load, we check turfs which have been marked for update and cull any which are outside. What's likely happening is they're being marked for update before
// all z-levels are initialized, but it will take some time to track this down
/datum/controller/subsystem/air/proc/cull_updated_turfs()

var/list/new_tiles_to_update = list()

var/list/curr_tiles = tiles_to_update
for(var/turf/T as anything in curr_tiles)
if(SHOULD_PARTICIPATE_IN_ZONES(T))
new_tiles_to_update += T

tiles_to_update.Cut()
tiles_to_update = new_tiles_to_update
3 changes: 3 additions & 0 deletions mods/persistence/controllers/subsystems/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
PRINT_STACK_TRACE("Missing z-level data object for loaded z[num2text(z)]!")
level.setup_level_data(TRUE)
report_progress_serializer("Finished setting up level data for loaded z-levels!")

// Stopgap fix. We do this here rather than in SSair.Initialize because SSair may be rebooted.
SSair.cull_updated_turfs()
else
report_progress_serializer("No existing save found. Loading from map files..")
#else
Expand Down