diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 3e7024ae57f..b96f022298f 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -61,6 +61,9 @@ ///keeps the name of the object from being overridden if it's vareditted. var/override_naming + ///If we should init and immediately start processing + var/init_processing = FALSE + armor_type = /datum/armor/machinery_atmospherics /datum/armor/machinery_atmospherics @@ -89,9 +92,8 @@ if(pipe_flags & PIPING_CARDINAL_AUTONORMALIZE) normalize_cardinal_directions() nodes = new(device_type) + init_processing = process ..() - if(process) - SSair.start_processing_machine(src) set_init_directions(init_dir) /obj/machinery/atmospherics/Initialize(mapload) @@ -103,6 +105,8 @@ turf_loc.add_blueprints_preround(src) SSspatial_grid.add_grid_awareness(src, SPATIAL_GRID_CONTENTS_TYPE_ATMOS) SSspatial_grid.add_grid_membership(src, turf_loc, SPATIAL_GRID_CONTENTS_TYPE_ATMOS) + if(init_processing) + SSair.start_processing_machine(src) return ..() /obj/machinery/atmospherics/Destroy() diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm index b87a1142e2c..50d7ead2e5f 100644 --- a/code/modules/mapping/map_template.dm +++ b/code/modules/mapping/map_template.dm @@ -157,9 +157,12 @@ if((T.y+height) - 1 > world.maxy) return + // Cache for sonic speed + var/list/to_rebuild = SSair.adjacent_rebuild // iterate over turfs in the border and clear them from active atmos processing for(var/turf/border_turf as anything in CORNER_BLOCK_OFFSET(T, width + 2, height + 2, -1, -1)) SSair.remove_from_active(border_turf) + to_rebuild -= border_turf for(var/turf/sub_turf as anything in border_turf.atmos_adjacent_turfs) sub_turf.atmos_adjacent_turfs?.Remove(border_turf) border_turf.atmos_adjacent_turfs?.Cut()