From 973d5b03cd2140deba7ebd11b8b544b054b63493 Mon Sep 17 00:00:00 2001 From: Katherine Kiefer Date: Thu, 29 Jun 2023 16:20:24 +1000 Subject: [PATCH] shiez --- src/turfs/groups.rs | 1 - src/turfs/katmos.rs | 1 - src/turfs/processing.rs | 8 ++++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/turfs/groups.rs b/src/turfs/groups.rs index a0b52ce..c3b87f6 100644 --- a/src/turfs/groups.rs +++ b/src/turfs/groups.rs @@ -23,7 +23,6 @@ pub fn send_to_groups(sent: BTreeSet) { #[hook("/datum/controller/subsystem/air/proc/process_excited_groups_auxtools")] fn _groups_hook(remaining: Value) { - rebuild_turf_graph()?; let group_pressure_goal = src .get_number(byond_string!("excited_group_pressure_goal")) .unwrap_or(0.5); diff --git a/src/turfs/katmos.rs b/src/turfs/katmos.rs index e10e09d..b8c7ee4 100644 --- a/src/turfs/katmos.rs +++ b/src/turfs/katmos.rs @@ -747,7 +747,6 @@ fn send_pressure_differences( #[hook("/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools")] fn _equalize_hook(remaining: Value) { - rebuild_turf_graph()?; let equalize_hard_turf_limit = src .get_number(byond_string!("equalize_hard_turf_limit")) .unwrap_or(2000.0) as usize; diff --git a/src/turfs/processing.rs b/src/turfs/processing.rs index 08bdaa3..6d7b90a 100644 --- a/src/turfs/processing.rs +++ b/src/turfs/processing.rs @@ -42,9 +42,14 @@ fn _thread_running_hook() { Ok(Value::from(TASKS.try_write().is_none())) } +#[hook("/datum/controller/subsystem/air/proc/update_adjacency_graph")] +fn _rebuild_turf_graph_hook() { + rebuild_turf_graph()?; + Ok(Value::null()) +} + #[hook("/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools")] fn _finish_process_turfs() { - rebuild_turf_graph()?; let arg_limit = args .get(0) .ok_or_else(|| runtime!("Wrong number of arguments to turf finishing: 0"))? @@ -66,7 +71,6 @@ fn _finish_process_turfs() { #[hook("/datum/controller/subsystem/air/proc/process_turfs_auxtools")] fn _process_turf_notify() { - rebuild_turf_graph()?; let sender = processing_callbacks_sender(); let fdm_max_steps = src .get_number(byond_string!("share_max_steps"))