From d5a3b797daf06a8552c5e125e2f04646059e64d0 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 3 Oct 2024 19:35:52 -0700 Subject: [PATCH] update roblox_emulator --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/lib.rs | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2633d59..196c7cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -571,9 +571,9 @@ dependencies = [ [[package]] name = "roblox_emulator" -version = "0.2.3" +version = "0.3.0" source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/" -checksum = "2fa2c785a17f607aad6bdd19eef6d19f9476f308ce38de139df931a99132bd46" +checksum = "ba81a9134bb07930669340c7aad34719e74690f68771c6ef7b093f00ddba9e65" dependencies = [ "glam", "mlua", diff --git a/Cargo.toml b/Cargo.toml index b13e466..3f868db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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.2.1", registry = "strafesnet" } +roblox_emulator = { version = "0.3.0", registry = "strafesnet" } strafesnet_common = { version = "0.5.1", registry = "strafesnet" } diff --git a/src/lib.rs b/src/lib.rs index 153f607..a4d5a3b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,9 +20,11 @@ pub struct Dom(rbx_dom_weak::WeakDom); impl Dom{ pub fn run_scripts(&mut self){ let runner=roblox_emulator::runner::Runner::new().unwrap(); - let context=roblox_emulator::context::Context::from_mut(&mut self.0); - for script in context.scripts(){ - if let Err(e)=runner.run_script(script,context){ + let context=roblox_emulator::context::Context::from_mut(&mut self.dom); + let scripts=context.scripts(); + let runnable=runner.runnable_context(context,services).unwrap(); + for script in scripts{ + if let Err(e)=runnable.run_script(script){ println!("runner error: {e}"); } }