diff --git a/auxmos.dll b/auxmos.dll index 1393267d42..f0afc7338e 100644 Binary files a/auxmos.dll and b/auxmos.dll differ diff --git a/auxmos.pdb b/auxmos.pdb index 90d9099a53..3215d1e9a2 100644 Binary files a/auxmos.pdb and b/auxmos.pdb differ diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 248d5eb81c..818414be73 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -151,6 +151,7 @@ #define SSAIR_ACTIVETURFS 9 #define SSAIR_TURF_POST_PROCESS 10 #define SSAIR_FINALIZE_TURFS 11 +#define SSAIR_ATMOSMACHINERY_AIR 12 // |= on overlays is not actually guaranteed to not add same appearances but we're optimistically using it anyway. #define COMPILE_OVERLAYS(A)\ diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 50db62f4e7..f687ee2fd7 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -21,6 +21,7 @@ SUBSYSTEM_DEF(air) var/list/networks = list() var/list/pipenets_needing_rebuilt = list() var/list/obj/machinery/atmos_machinery = list() + var/list/obj/machinery/atmos_air_machinery = list() var/list/pipe_init_dirs_cache = list() //atmos singletons @@ -85,16 +86,8 @@ SUBSYSTEM_DEF(air) /datum/controller/subsystem/air/fire(resumed = 0) var/timer = TICK_USAGE_REAL - if(currentpart == SSAIR_ACTIVETURFS) - timer = TICK_USAGE_REAL - process_turfs(resumed) - cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) - if(state != SS_RUNNING) - return - resumed = 0 - currentpart = SSAIR_REBUILD_PIPENETS - if(currentpart == SSAIR_REBUILD_PIPENETS) + timer = TICK_USAGE_REAL var/list/pipenet_rebuilds = pipenets_needing_rebuilt for(var/thing in pipenet_rebuilds) var/obj/machinery/atmospherics/AT = thing @@ -106,22 +99,17 @@ SUBSYSTEM_DEF(air) if(state != SS_RUNNING) return resumed = FALSE - currentpart = SSAIR_ACTIVETURFS + currentpart = SSAIR_PIPENETS if(currentpart == SSAIR_PIPENETS || !resumed) + timer = TICK_USAGE_REAL process_pipenets(resumed) cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) if(state != SS_RUNNING) return resumed = 0 - currentpart = SSAIR_FINALIZE_TURFS - if(currentpart == SSAIR_FINALIZE_TURFS) - if(finish_turf_processing(MC_TICK_REMAINING_MS)) - pause() - if(state != SS_RUNNING) - return - resumed = 0 currentpart = SSAIR_ATMOSMACHINERY + if(currentpart == SSAIR_ATMOSMACHINERY) timer = TICK_USAGE_REAL process_atmos_machinery(resumed) @@ -129,6 +117,31 @@ SUBSYSTEM_DEF(air) if(state != SS_RUNNING) return resumed = 0 + currentpart = SSAIR_HIGHPRESSURE + + if(currentpart == SSAIR_HIGHPRESSURE) + timer = TICK_USAGE_REAL + process_high_pressure_delta(resumed) + cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) + if(state != SS_RUNNING) + return + resumed = 0 + currentpart = SSAIR_FINALIZE_TURFS + + if(currentpart == SSAIR_FINALIZE_TURFS) + finish_turf_processing(resumed) + if(state != SS_RUNNING) + return + resumed = 0 + currentpart = SSAIR_ATMOSMACHINERY_AIR + + if(currentpart == SSAIR_ATMOSMACHINERY_AIR) + timer = TICK_USAGE_REAL + process_atmos_air_machinery(resumed) + cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) + if(state != SS_RUNNING) + return + resumed = 0 currentpart = equalize_enabled ? SSAIR_EQUALIZE : SSAIR_EXCITEDGROUPS if(currentpart == SSAIR_EQUALIZE) @@ -151,21 +164,11 @@ SUBSYSTEM_DEF(air) if(currentpart == SSAIR_TURF_POST_PROCESS) timer = TICK_USAGE_REAL - if(post_process_turfs(resumed,MC_TICK_REMAINING_MS)) - pause() + post_process_turfs(resumed) cost_post_process = MC_AVERAGE(cost_post_process, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) if(state != SS_RUNNING) return resumed = 0 - currentpart = SSAIR_HIGHPRESSURE - - if(currentpart == SSAIR_HIGHPRESSURE) - timer = TICK_USAGE_REAL - process_high_pressure_delta(resumed) - cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) - if(state != SS_RUNNING) - return - resumed = 0 currentpart = SSAIR_HOTSPOTS if(currentpart == SSAIR_HOTSPOTS) @@ -175,8 +178,7 @@ SUBSYSTEM_DEF(air) if(state != SS_RUNNING) return resumed = 0 - if(heat_enabled) - currentpart = SSAIR_TURF_CONDUCTION + currentpart = heat_enabled ? SSAIR_TURF_CONDUCTION : SSAIR_ACTIVETURFS if(currentpart == SSAIR_TURF_CONDUCTION) timer = TICK_USAGE_REAL @@ -186,7 +188,16 @@ SUBSYSTEM_DEF(air) if(state != SS_RUNNING) return resumed = 0 - currentpart = SSAIR_ACTIVETURFS + currentpart = SSAIR_ACTIVETURFS + + if(currentpart == SSAIR_ACTIVETURFS) + timer = TICK_USAGE_REAL + process_turfs(resumed) + cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) + if(state != SS_RUNNING) + return + resumed = 0 + currentpart = SSAIR_REBUILD_PIPENETS /datum/controller/subsystem/air/proc/process_pipenets(resumed = 0) if (!resumed) @@ -221,6 +232,20 @@ SUBSYSTEM_DEF(air) if(MC_TICK_CHECK) return +/datum/controller/subsystem/air/proc/process_atmos_air_machinery(resumed = 0) + var/seconds = wait * 0.1 + if (!resumed) + src.currentrun = atmos_air_machinery.Copy() + //cache for sanic speed (lists are references anyways) + var/list/currentrun = src.currentrun + while(currentrun.len) + var/obj/machinery/M = currentrun[currentrun.len] + currentrun.len-- + if(!M || (M.process_atmos(seconds) == PROCESS_KILL)) + atmos_air_machinery.Remove(M) + if(MC_TICK_CHECK) + return + /datum/controller/subsystem/air/proc/process_turf_heat() /datum/controller/subsystem/air/proc/process_hotspots(resumed = 0) @@ -250,7 +275,7 @@ SUBSYSTEM_DEF(air) return /datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0) - if(process_turf_equalize_extools(resumed,MC_TICK_REMAINING_MS)) + if(process_turf_equalize_auxtools(resumed,MC_TICK_REMAINING_MS)) pause() /* //cache for sanic speed @@ -270,7 +295,7 @@ SUBSYSTEM_DEF(air) */ /datum/controller/subsystem/air/proc/process_turfs(resumed = 0) - if(process_turfs_extools(resumed,MC_TICK_REMAINING_MS)) + if(process_turfs_auxtools(resumed,MC_TICK_REMAINING_MS)) pause() /* //cache for sanic speed @@ -289,14 +314,22 @@ SUBSYSTEM_DEF(air) */ /datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0) - if(process_excited_groups_extools(resumed,MC_TICK_REMAINING_MS)) + if(process_excited_groups_auxtools(resumed,MC_TICK_REMAINING_MS)) pause() -/datum/controller/subsystem/air/proc/finish_turf_processing() -/datum/controller/subsystem/air/proc/process_turfs_extools() -/datum/controller/subsystem/air/proc/post_process_turfs() -/datum/controller/subsystem/air/proc/process_turf_equalize_extools() -/datum/controller/subsystem/air/proc/process_excited_groups_extools() +/datum/controller/subsystem/air/proc/finish_turf_processing(resumed = 0) + if(finish_turf_processing_auxtools(MC_TICK_REMAINING_MS)) + pause() + +/datum/controller/subsystem/air/proc/post_process_turfs(resumed = 0) + if(post_process_turfs_auxtools(resumed,MC_TICK_REMAINING_MS)) + pause() + +/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools() +/datum/controller/subsystem/air/proc/process_turfs_auxtools() +/datum/controller/subsystem/air/proc/post_process_turfs_auxtools() +/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools() +/datum/controller/subsystem/air/proc/process_excited_groups_auxtools() /datum/controller/subsystem/air/proc/get_amt_gas_mixes() /datum/controller/subsystem/air/proc/get_max_gas_mixes() /datum/controller/subsystem/air/proc/turf_process_time() @@ -323,7 +356,7 @@ SUBSYSTEM_DEF(air) CHECK_TICK /datum/controller/subsystem/air/proc/setup_atmos_machinery() - for (var/obj/machinery/atmospherics/AM in atmos_machinery) + for (var/obj/machinery/atmospherics/AM in atmos_machinery + atmos_air_machinery) AM.atmosinit() CHECK_TICK @@ -331,7 +364,7 @@ SUBSYSTEM_DEF(air) // all atmos machinery has to initalize before the first // pipenet can be built. /datum/controller/subsystem/air/proc/setup_pipenets() - for (var/obj/machinery/atmospherics/AM in atmos_machinery) + for (var/obj/machinery/atmospherics/AM in atmos_machinery + atmos_air_machinery) AM.build_network() CHECK_TICK @@ -359,12 +392,15 @@ SUBSYSTEM_DEF(air) return pipe_init_dirs_cache[type]["[dir]"] -/proc/get_extools_benchmarks() - #undef SSAIR_PIPENETS #undef SSAIR_ATMOSMACHINERY -#undef SSAIR_ACTIVETURFS #undef SSAIR_EXCITEDGROUPS #undef SSAIR_HIGHPRESSURE #undef SSAIR_HOTSPOTS #undef SSAIR_TURF_CONDUCTION +#undef SSAIR_REBUILD_PIPENETS +#undef SSAIR_EQUALIZE +#undef SSAIR_ACTIVETURFS +#undef SSAIR_TURF_POST_PROCESS +#undef SSAIR_FINALIZE_TURFS +#undef SSAIR_ATMOSMACHINERY_AIR diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index b74f1d46d3..9c8f3ea7ca 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -720,6 +720,8 @@ SUBSYSTEM_DEF(shuttle) preview_shuttle.register() + preview_shuttle.reset_air() + // TODO indicate to the user that success happened, rather than just // blanking the modification tab preview_shuttle = null diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 4ba8d9f3d3..cb15e8200d 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -72,11 +72,11 @@ /obj/machinery/air_sensor/Initialize() . = ..() - SSair.atmos_machinery += src + SSair.atmos_air_machinery += src set_frequency(frequency) /obj/machinery/air_sensor/Destroy() - SSair.atmos_machinery -= src + SSair.atmos_air_machinery -= src SSradio.remove_object(src, frequency) return ..() diff --git a/code/modules/atmospherics/environmental/LINDA_system.dm b/code/modules/atmospherics/environmental/LINDA_system.dm index 1e39cc50c5..9e7bdae1b0 100644 --- a/code/modules/atmospherics/environmental/LINDA_system.dm +++ b/code/modules/atmospherics/environmental/LINDA_system.dm @@ -58,10 +58,11 @@ if (T.atmos_adjacent_turfs) T.atmos_adjacent_turfs -= src UNSETEMPTY(T.atmos_adjacent_turfs) + T.set_sleeping(!length(T.atmos_adjacent_turfs)) T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()), -1) UNSETEMPTY(atmos_adjacent_turfs) src.atmos_adjacent_turfs = atmos_adjacent_turfs - set_sleeping(!(canpass || canvpass)) + set_sleeping(!length(atmos_adjacent_turfs)) __update_auxtools_turf_adjacency_info(isspaceturf(get_z_base_turf())) /turf/proc/set_sleeping(should_sleep) diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 2e2e878329..c4bd13fdc7 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -218,6 +218,18 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) //Performs various reactions such as combustion or fusion (LOL) //Returns: 1 if any reaction took place; 0 otherwise +/datum/gas_mixture/proc/adjust_heat(amt) + //Adjusts the thermal energy of the gas mixture, rather than having to do the full calculation. + //Returns: null + +/datum/gas_mixture/proc/equalize_with(datum/gas_mixture/giver) + //Makes this mix have the same temperature and gas ratios as the giver, but with the same pressure, accounting for volume. + //Returns: null + +/proc/equalize_all_gases_in_list(list/L) + //Makes every gas in the given list have the same pressure, temperature and gas proportions. + //Returns: null + /datum/gas_mixture/proc/__remove() /datum/gas_mixture/remove(amount) var/datum/gas_mixture/removed = new type diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 25e4084524..6865084c77 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -39,6 +39,7 @@ var/construction_type var/pipe_state //icon_state as a pipe item var/on = FALSE + var/interacts_with_air = FALSE /obj/machinery/atmospherics/examine(mob/user) . = ..() @@ -57,7 +58,10 @@ armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70) ..() if(process) - SSair.atmos_machinery += src + if(interacts_with_air) + SSair.atmos_air_machinery += src + else + SSair.atmos_machinery += src SetInitDirections() /obj/machinery/atmospherics/Destroy() @@ -65,6 +69,7 @@ nullifyNode(i) SSair.atmos_machinery -= src + SSair.atmos_air_machinery -= src SSair.pipenets_needing_rebuilt -= src dropContents() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index d1bb58b99a..729a6886df 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -15,6 +15,9 @@ desc = "Has a valve and pump attached to it. There are two ports." level = 1 + + interacts_with_air = TRUE + var/frequency = 0 var/id = null var/datum/radio_frequency/radio_connection diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 9aa3c8c16d..477c72a8d9 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -16,6 +16,7 @@ var/datum/radio_frequency/radio_connection level = 1 + interacts_with_air = TRUE layer = GAS_SCRUBBER_LAYER pipe_state = "injector" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm index 3f5bb818ce..b98cda9349 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm @@ -6,6 +6,7 @@ can_unwrench = TRUE level = 1 + interacts_with_air = TRUE layer = GAS_SCRUBBER_LAYER pipe_state = "pvent" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm index f0d0d1d856..d427a1abc3 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm @@ -5,6 +5,7 @@ icon_state = "relief_valve-e-map" can_unwrench = TRUE interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE + interacts_with_air = TRUE var/opened = FALSE var/open_pressure = ONE_ATMOSPHERE * 3 var/close_pressure = ONE_ATMOSPHERE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 1a86898f1f..e682b9160c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -15,6 +15,8 @@ level = 1 layer = GAS_SCRUBBER_LAYER + interacts_with_air = TRUE + var/id_tag = null var/pump_direction = RELEASING diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index 025c9734ca..a14eb38229 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -13,6 +13,8 @@ level = 1 layer = GAS_SCRUBBER_LAYER + interacts_with_air = TRUE + var/id_tag = null var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index 57e1471dc2..1d0c59f789 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -241,26 +241,4 @@ /datum/pipeline/proc/reconcile_air() var/list/datum/gas_mixture/GL = get_all_connected_airs() - - var/total_thermal_energy = 0 - var/total_heat_capacity = 0 - var/datum/gas_mixture/total_gas_mixture = new(0) - - for(var/i in GL) - var/datum/gas_mixture/G = i - total_gas_mixture.set_volume(total_gas_mixture.return_volume() + G.return_volume()) - - total_gas_mixture.merge(G) - - total_thermal_energy += G.thermal_energy() - total_heat_capacity += G.heat_capacity() - - if(total_heat_capacity) - total_gas_mixture.set_temperature(total_thermal_energy/total_heat_capacity) - - if(total_gas_mixture.return_volume() > 0) - //Update individual gas_mixtures by volume ratio - for(var/i in GL) - var/datum/gas_mixture/G = i - G.copy_from(total_gas_mixture) - G.multiply(G.return_volume()/total_gas_mixture.return_volume()) + equalize_all_gases_in_list(GL) diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm index 1842211fd2..4ade53eab3 100644 --- a/code/modules/atmospherics/machinery/other/miner.dm +++ b/code/modules/atmospherics/machinery/other/miner.dm @@ -12,6 +12,7 @@ icon_state = "miner" density = FALSE resistance_flags = INDESTRUCTIBLE|ACID_PROOF|FIRE_PROOF + interacts_with_air = TRUE var/spawn_id = null var/spawn_temp = T20C var/spawn_mol = MOLES_CELLSTANDARD * 10 diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm index 7c170f8afc..bd2ca07134 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm @@ -6,6 +6,7 @@ buckle_lying = 1 var/icon_temperature = T20C //stop small changes in temperature causing icon refresh resistance_flags = LAVA_PROOF | FIRE_PROOF + interacts_with_air = TRUE /obj/machinery/atmospherics/pipe/heat_exchanging/Initialize() . = ..() diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index fa57e683c4..43879038a9 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -16,7 +16,7 @@ /obj/machinery/portable_atmospherics/New() ..() - SSair.atmos_machinery += src + SSair.atmos_air_machinery += src air_contents = new(volume) air_contents.set_temperature(T20C) @@ -24,7 +24,7 @@ return 1 /obj/machinery/portable_atmospherics/Destroy() - SSair.atmos_machinery -= src + SSair.atmos_air_machinery -= src disconnect() qdel(air_contents) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index f385b640aa..065cea19ee 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -283,7 +283,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal/Initialize() . = ..() uid = gl_uid++ - SSair.atmos_machinery += src + SSair.atmos_air_machinery += src countdown = new(src) countdown.start() GLOB.poi_list |= src @@ -302,7 +302,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) /obj/machinery/power/supermatter_crystal/Destroy() investigate_log("has been destroyed.", INVESTIGATE_SUPERMATTER) - SSair.atmos_machinery -= src + SSair.atmos_air_machinery -= src QDEL_NULL(radio) GLOB.poi_list -= src QDEL_NULL(countdown) diff --git a/code/modules/shuttle/docking.dm b/code/modules/shuttle/docking.dm index 7295ab2832..5c96bca07c 100644 --- a/code/modules/shuttle/docking.dm +++ b/code/modules/shuttle/docking.dm @@ -205,3 +205,9 @@ var/turf/oldT = moved_atoms[moved_object] moved_object.lateShuttleMove(oldT, movement_force, movement_direction) +/obj/docking_port/mobile/proc/reset_air() + var/list/turfs = return_ordered_turfs(x, y, z, dir) + for(var/i in 1 to length(turfs)) + var/turf/open/T = turfs[i] + if(istype(T)) + T.air.copy_from_turf(T)