diff --git a/auxmos.dll b/auxmos.dll index 70ca4a3e25..8d3b0e7320 100644 Binary files a/auxmos.dll and b/auxmos.dll differ diff --git a/auxmos.pdb b/auxmos.pdb index 8314fbf8b0..3127a1e7de 100644 Binary files a/auxmos.pdb and b/auxmos.pdb differ diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm index bad64846d6..8ebe7e40c4 100644 --- a/code/__DEFINES/MC.dm +++ b/code/__DEFINES/MC.dm @@ -1,5 +1,7 @@ #define MC_TICK_CHECK ( ( TICK_USAGE > Master.current_ticklimit || src.state != SS_RUNNING ) ? pause() : 0 ) +#define MC_TICK_REMAINING_MS ((Master.current_ticklimit - TICK_USAGE) * world.tick_lag) + #define MC_SPLIT_TICK_INIT(phase_count) var/original_tick_limit = Master.current_ticklimit; var/split_tick_phases = ##phase_count #define MC_SPLIT_TICK \ if(split_tick_phases > 1){\ diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 40ad108892..d30c7df18c 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -6,9 +6,7 @@ SUBSYSTEM_DEF(air) flags = SS_BACKGROUND runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME - var/cost_copy_from = 0 var/cost_turfs = 0 - var/cost_copy_to = 0 var/cost_groups = 0 var/cost_highpressure = 0 var/cost_hotspots = 0 @@ -46,6 +44,7 @@ SUBSYSTEM_DEF(air) msg += "C:{" msg += "AT:[round(cost_turfs,1)]|" msg += "TH:[round(turf_process_time(),1)]|" + msg += "EG:[round(cost_groups,1)]|" msg += "EQ:[round(cost_equalize,1)]|" msg += "HP:[round(cost_highpressure,1)]|" msg += "HS:[round(cost_hotspots,1)]|" @@ -121,6 +120,15 @@ SUBSYSTEM_DEF(air) if(state != SS_RUNNING) return resumed = 0 + currentpart = SSAIR_EXCITEDGROUPS + + if(currentpart == SSAIR_EXCITEDGROUPS) + timer = TICK_USAGE_REAL + process_excited_groups(resumed) + cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) + if(state != SS_RUNNING) + return + resumed = 0 currentpart = SSAIR_HIGHPRESSURE if(currentpart == SSAIR_HIGHPRESSURE) @@ -278,8 +286,17 @@ SUBSYSTEM_DEF(air) return */ +/proc/post_process_excited_turf(turf/open/T) + if(istype(T)) + T.update_visuals() + +/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0) + if(!process_excited_groups_extools(CALLBACK(GLOBAL_PROC,/proc/post_process_excited_turf))) + pause() + /datum/controller/subsystem/air/proc/process_turfs_extools() /datum/controller/subsystem/air/proc/process_turf_equalize_extools() +/datum/controller/subsystem/air/proc/process_excited_groups_extools() /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() diff --git a/code/controllers/subsystem/callback.dm b/code/controllers/subsystem/callback.dm index 7e57bf2e75..154dc513f6 100644 --- a/code/controllers/subsystem/callback.dm +++ b/code/controllers/subsystem/callback.dm @@ -9,5 +9,12 @@ SUBSYSTEM_DEF(callbacks) SScallbacks.flags |= SS_NO_FIRE CRASH("Auxtools not found! Callback subsystem shutting itself off.") +/proc/_process_callbacks_priority() + SScallbacks.can_fire = 0 + SScallbacks.flags |= SS_NO_FIRE + CRASH("Auxtools not found! Callback subsystem shutting itself off.") + /datum/controller/subsystem/callbacks/fire() - _process_callbacks() + _process_callbacks_priority() + if(TICK_CHECK || _process_callbacks(MC_TICK_REMAINING_MS)) + pause() diff --git a/tgstation.dme b/tgstation.dme index c0b5489bef..15ddc7cd9a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -298,7 +298,6 @@ #include "code\controllers\subsystem\acid.dm" #include "code\controllers\subsystem\adjacent_air.dm" #include "code\controllers\subsystem\air.dm" -#include "code\controllers\subsystem\air_turfs.dm" #include "code\controllers\subsystem\assets.dm" #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\augury.dm"