Compare commits
4 Commits
master
...
roblox-emu
Author | SHA1 | Date | |
---|---|---|---|
baea9e297c | |||
aa361bce77 | |||
555b9773e6 | |||
bdda966497 |
16
src/lib.rs
16
src/lib.rs
@ -17,6 +17,20 @@ pub mod data{
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct Dom(rbx_dom_weak::WeakDom);
|
pub struct Dom(rbx_dom_weak::WeakDom);
|
||||||
|
impl Dom{
|
||||||
|
pub fn run_scripts(self)->Self{
|
||||||
|
let runner=roblox_emulator::runner::Runner::new().unwrap();
|
||||||
|
let mut context=roblox_emulator::context::Context::new(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{
|
||||||
|
e.print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Self(context.into_inner())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum ReadError{
|
pub enum ReadError{
|
||||||
@ -54,4 +68,4 @@ where
|
|||||||
AcquireMeshId:FnMut(&str)->strafesnet_common::model::MeshId,
|
AcquireMeshId:FnMut(&str)->strafesnet_common::model::MeshId,
|
||||||
{
|
{
|
||||||
rbx::convert(&dom.0,acquire_render_config_id,acquire_mesh_id)
|
rbx::convert(&dom.0,acquire_render_config_id,acquire_mesh_id)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user