From 652bf5a0d367938c7fc52fab544272431a823d1d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 21 Sep 2024 12:40:51 -0700 Subject: [PATCH] v0.3.6 update roblox emulator api --- Cargo.lock | 6 +++--- Cargo.toml | 4 ++-- src/lib.rs | 9 +++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9293a4d..d8f560a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -527,9 +527,9 @@ dependencies = [ [[package]] name = "roblox_emulator" -version = "0.1.0" +version = "0.2.0" source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/" -checksum = "9071bd2716bfd691b4ec872dfb8141188294bb050a6fba0ae3bb0c956c109a3d" +checksum = "62ab7e851fb72ba7d690734e1d33d8bd47e83a25b7dbdb28b4771fd3425f7538" dependencies = [ "glam", "mlua", @@ -585,7 +585,7 @@ dependencies = [ [[package]] name = "strafesnet_rbx_loader" -version = "0.3.5" +version = "0.3.6" dependencies = [ "bytemuck", "glam", diff --git a/Cargo.toml b/Cargo.toml index 4cff0ea..d6633c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strafesnet_rbx_loader" -version = "0.3.5" +version = "0.3.6" edition = "2021" repository = "https://git.itzana.me/StrafesNET/rbx_loader" license = "MIT OR Apache-2.0" @@ -18,5 +18,5 @@ rbx_dom_weak = { version = "2.7.0", registry = "strafesnet" } rbx_mesh = "0.1.2" rbx_reflection_database = { version = "0.2.10", registry = "strafesnet" } rbx_xml = { version = "0.13.3", registry = "strafesnet" } -roblox_emulator = { version = "0.1.0", registry = "strafesnet" } +roblox_emulator = { version = "0.2.0", registry = "strafesnet" } strafesnet_common = { version = "0.4.0", registry = "strafesnet" } diff --git a/src/lib.rs b/src/lib.rs index 885c463..28e9a72 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,17 +18,14 @@ pub mod data{ pub struct Dom(rbx_dom_weak::WeakDom); impl Dom{ - pub fn run_scripts(self)->Self{ + pub fn run_scripts(&mut self){ let runner=roblox_emulator::runner::Runner::new().unwrap(); - let mut context=roblox_emulator::context::Context::new(self.0); + let context=roblox_emulator::context::Context::from_mut(&mut self.0); for script in context.scripts(){ - let (modified_context,script_error)=runner.run_script(script,context); - context=modified_context; - if let Err(e)=script_error{ + if let Err(e)=runner.run_script(script,context){ e.print(); } } - Self(context.into_inner()) } }