Skip to content

Commit

Permalink
ditch simpleeyre fuck off
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Jun 10, 2024
1 parent bd4cedd commit b77f565
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 29 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ petgraph = "0.6.5"
bitflags = "2.5.0"
nom = "7.1.3"
mimalloc = { version = "0.1.42", default-features = false }
simple-eyre = "0.3.1"

tracing = { version = "0.1.40", optional = true }
tracing-tracy = { version = "0.11.0", optional = true }
Expand Down
17 changes: 7 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@ use gas::constants::{ReactionReturn, GAS_MIN_MOLES, MINIMUM_MOLES_DELTA_TO_MOVE}
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

#[cfg(feature = "tracy")]
#[byondapi::init]
pub fn init_eyre() {
simple_eyre::install().unwrap();
#[cfg(feature = "tracy")]
{
use tracing_subscriber::layer::SubscriberExt;

tracing::subscriber::set_global_default(
tracing_subscriber::registry().with(tracing_tracy::TracyLayer::default()),
)
.expect("setup tracy layer");
}
use tracing_subscriber::layer::SubscriberExt;

tracing::subscriber::set_global_default(
tracing_subscriber::registry().with(tracing_tracy::TracyLayer::default()),
)
.expect("setup tracy layer");
}

/// Args: (ms). Runs callbacks until time limit is reached. If time limit is omitted, runs all callbacks.
Expand Down
1 change: 0 additions & 1 deletion src/turfs/groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub fn send_to_groups(sent: BTreeSet<TurfID>) {
}

#[byondapi::bind("/datum/controller/subsystem/air/proc/process_excited_groups_auxtools")]
#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn groups_hook(mut src: ByondValue, remaining: ByondValue) {
let group_pressure_goal = src
.read_number_id(byond_string!("excited_group_pressure_goal"))
Expand Down
2 changes: 1 addition & 1 deletion src/turfs/katmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ fn explosively_depressurize(initial_index: TurfID, equalize_hard_turf_limit: usi

Ok(())
}

#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn flood_fill_zones(
(index_node, index_turf): (NodeIndex, TurfID),
Expand Down Expand Up @@ -722,7 +723,6 @@ fn send_pressure_differences(
}

#[byondapi::bind("/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools")]
#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn equalize_hook(mut src: ByondValue, remaining: ByondValue) {
let equalize_hard_turf_limit = src
.read_number_id(byond_string!("equalize_hard_turf_limit"))
Expand Down
5 changes: 0 additions & 5 deletions src/turfs/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ fn thread_running_hook() {
}

#[byondapi::bind("/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools")]
#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn finish_process_turfs(time_remaining: ByondValue) {
Ok(process_callbacks_for_millis(time_remaining.get_number()? as u64).into())
}

#[byondapi::bind("/datum/controller/subsystem/air/proc/process_turfs_auxtools")]
#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn process_turf_hook(src: ByondValue, remaining: ByondValue) {
let remaining_time = Duration::from_millis(remaining.get_number().unwrap_or(50.0) as u64);
let fdm_max_steps = src
Expand Down Expand Up @@ -99,7 +97,6 @@ fn process_turf(
Ok(())
}

#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn planet_process(planet_share_ratio: f32) {
with_turf_gases_read(|arena| {
GasArena::with_all_mixtures(|all_mixtures| {
Expand Down Expand Up @@ -228,7 +225,6 @@ fn process_cell(
}

// Solving the heat equation using a Finite Difference Method, an iterative stencil loop.
#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn fdm(
(start_time, remaining_time): (&Instant, Duration),
fdm_max_steps: i32,
Expand Down Expand Up @@ -387,7 +383,6 @@ fn post_process_cell<'a>(

// Goes through every turf, checks if it should reset to planet atmos, if it should
// update visuals, if it should react, sends a callback if it should.
#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))]
fn post_process() {
let vis = crate::gas::visibility_copies();
with_turf_gases_read(|arena| {
Expand Down

0 comments on commit b77f565

Please sign in to comment.