diff --git a/Cargo.lock b/Cargo.lock index 1400d88e..5ee2a063 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,9 +123,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byondapi" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f5f2db7fe690ad05a8600aa59d7c1d2487a0797865c7eba196259dcc86cfcbe" +checksum = "8f40d3a2391202c43ee2e3ab29cbc83164e060d94b2786ae442c7e5868ffb4d6" dependencies = [ "byondapi-sys", "inventory", @@ -154,11 +154,12 @@ dependencies = [ [[package]] name = "byondapi-sys" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f99182dc81511dc2d37ceda7d29c47a2eea89da81a32e6ff1ad85083e3c1272" +checksum = "c9af927e23e24ff6a01b117a5cd59f8df3f288a544c91cce5fd4a96cf4520669" dependencies = [ "bindgen", + "doxygen-rs", "libloading 0.8.1", "rustc_version", "walkdir", @@ -263,6 +264,15 @@ dependencies = [ "rayon", ] +[[package]] +name = "doxygen-rs" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9" +dependencies = [ + "phf", +] + [[package]] name = "either" version = "1.9.0" @@ -583,6 +593,48 @@ dependencies = [ "indexmap", ] +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "prettyplease" version = "0.2.15" @@ -611,6 +663,21 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + [[package]] name = "rayon" version = "1.8.0" @@ -724,6 +791,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "smallvec" version = "1.11.2" diff --git a/Cargo.toml b/Cargo.toml index 5b18b08d..162329f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ members = ["crates/*"] [workspace.dependencies] -byondapi = { git = "https://github.com/jupyterkat/byondapi-rs", package = "byondapi" } +byondapi = "0.3.1" byondapi-binds = { path = "./crates/byondapi-binds" } [package] @@ -39,7 +39,7 @@ crate-type = ["cdylib"] [dependencies] auxcallback = { path = "./crates/auxcallback" } byondapi-binds = { path = "./crates/byondapi-binds" } -byondapi = "0.3.0" +byondapi = "0.3.1" itertools = "0.12.0" rayon = "1.8.0" float-ord = "0.3.2" diff --git a/crates/auxcallback/src/lib.rs b/crates/auxcallback/src/lib.rs index 9b6e207f..d9961500 100644 --- a/crates/auxcallback/src/lib.rs +++ b/crates/auxcallback/src/lib.rs @@ -1,6 +1,6 @@ use std::convert::TryInto; -use byondapi::{prelude::*, typecheck_trait::ByondTypeCheck}; +use byondapi::prelude::*; use coarsetime::{Duration, Instant}; diff --git a/src/gas/types.rs b/src/gas/types.rs index 6850517e..d69d3a61 100644 --- a/src/gas/types.rs +++ b/src/gas/types.rs @@ -1,5 +1,5 @@ use auxcallback::byond_callback_sender; -use byondapi::{prelude::*, typecheck_trait::ByondTypeCheck}; +use byondapi::prelude::*; use fxhash::FxBuildHasher; diff --git a/src/lib.rs b/src/lib.rs index 6304599c..28584970 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ pub mod init_shutdown; mod parser; -use byondapi::{map::byond_length, prelude::*, typecheck_trait::ByondTypeCheck}; +use byondapi::{map::byond_length, prelude::*}; use gas::{ amt_gases, constants, gas_idx_from_string, gas_idx_from_value, gas_idx_to_id, tot_gases, types, diff --git a/src/reaction.rs b/src/reaction.rs index af68282c..1e93ce49 100644 --- a/src/reaction.rs +++ b/src/reaction.rs @@ -1,7 +1,7 @@ #[cfg(feature = "reaction_hooks")] mod hooks; -use byondapi::{prelude::*, typecheck_trait::ByondTypeCheck}; +use byondapi::prelude::*; use crate::gas::{gas_idx_to_id, total_num_gases, GasIDX, Mixture}; diff --git a/src/turfs.rs b/src/turfs.rs index 2db67ad0..a129ec42 100644 --- a/src/turfs.rs +++ b/src/turfs.rs @@ -16,7 +16,6 @@ mod superconduct; use byondapi::prelude::*; -use byondapi::typecheck_trait::ByondTypeCheck; use rayon::prelude::*; use crate::{constants::*, gas::Mixture, GasArena}; diff --git a/src/turfs/processing.rs b/src/turfs/processing.rs index d1086acb..ed1a953f 100644 --- a/src/turfs/processing.rs +++ b/src/turfs/processing.rs @@ -313,10 +313,10 @@ fn fdm( .for_each(|(id, diffs)| { let sender = byond_callback_sender(); drop(sender.try_send(Box::new(move || { - let turf = ByondValue::new_ref(0x01, id); + let turf = ByondValue::new_ref(ValueType::Turf, id); for (id, diff) in diffs.iter().copied() { if id != 0 { - let enemy_tile = ByondValue::new_ref(0x01, id); + let enemy_tile = ByondValue::new_ref(ValueType::Turf, id); if diff > 5.0 { turf.call_id( byond_string!("consider_pressure_difference"), @@ -389,7 +389,7 @@ fn post_process() { if should_react { drop(sender.try_send(Box::new(move || { - let turf = ByondValue::new_ref(0x01, id); + let turf = ByondValue::new_ref(ValueType::Turf, id); turf.read_var_id(byond_string!("air"))? .call_id(byond_string!("react"), &[turf])?; Ok(()) @@ -398,7 +398,7 @@ fn post_process() { if should_update_vis { drop(sender.send(Box::new(move || { - let turf = ByondValue::new_ref(0x01, id); + let turf = ByondValue::new_ref(ValueType::Turf, id); update_visuals(turf)?; Ok(()) })));