v0.5.1 place includes services... duh
This commit is contained in:
parent
7a3184efd5
commit
c149064c38
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -571,9 +571,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "roblox_emulator"
|
name = "roblox_emulator"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"
|
source = "sparse+https://git.itzana.me/api/packages/strafesnet/cargo/"
|
||||||
checksum = "ba81a9134bb07930669340c7aad34719e74690f68771c6ef7b093f00ddba9e65"
|
checksum = "b58d7bb42d458984e629a012757474710fd0e429c2c824a2529574be5e7c2fd6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glam",
|
"glam",
|
||||||
"mlua",
|
"mlua",
|
||||||
|
@ -18,5 +18,5 @@ rbx_dom_weak = { version = "2.7.0", registry = "strafesnet" }
|
|||||||
rbx_mesh = "0.1.2"
|
rbx_mesh = "0.1.2"
|
||||||
rbx_reflection_database = { version = "0.2.10", registry = "strafesnet" }
|
rbx_reflection_database = { version = "0.2.10", registry = "strafesnet" }
|
||||||
rbx_xml = { version = "0.13.3", registry = "strafesnet" }
|
rbx_xml = { version = "0.13.3", registry = "strafesnet" }
|
||||||
roblox_emulator = { version = "0.3.0", registry = "strafesnet" }
|
roblox_emulator = { version = "0.3.1", registry = "strafesnet" }
|
||||||
strafesnet_common = { version = "0.5.1", registry = "strafesnet" }
|
strafesnet_common = { version = "0.5.1", registry = "strafesnet" }
|
||||||
|
10
src/lib.rs
10
src/lib.rs
@ -24,9 +24,9 @@ impl Model{
|
|||||||
fn new(dom:WeakDom)->Self{
|
fn new(dom:WeakDom)->Self{
|
||||||
Self{dom}
|
Self{dom}
|
||||||
}
|
}
|
||||||
pub fn into_place(self)->(Place,roblox_emulator::place::Services){
|
pub fn into_place(self)->Place{
|
||||||
let (dom,services)=roblox_emulator::place::new_place_with_instances_in_workspace(self.dom);
|
let (dom,services)=roblox_emulator::place::new_place_with_instances_in_workspace(self.dom);
|
||||||
(Place{dom},services)
|
Place{dom,services}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl AsRef<WeakDom> for Model{
|
impl AsRef<WeakDom> for Model{
|
||||||
@ -37,11 +37,13 @@ impl AsRef<WeakDom> for Model{
|
|||||||
|
|
||||||
pub struct Place{
|
pub struct Place{
|
||||||
dom:WeakDom,
|
dom:WeakDom,
|
||||||
|
services:roblox_emulator::place::Services,
|
||||||
}
|
}
|
||||||
impl Place{
|
impl Place{
|
||||||
pub fn run_scripts(&mut self,services:roblox_emulator::place::Services){
|
pub fn run_scripts(&mut self){
|
||||||
|
let Place{dom,services}=self;
|
||||||
let runner=roblox_emulator::runner::Runner::new().unwrap();
|
let runner=roblox_emulator::runner::Runner::new().unwrap();
|
||||||
let context=roblox_emulator::context::Context::from_mut(&mut self.dom);
|
let context=roblox_emulator::context::Context::from_mut(dom);
|
||||||
let scripts=context.scripts();
|
let scripts=context.scripts();
|
||||||
let runnable=runner.runnable_context(context,services).unwrap();
|
let runnable=runner.runnable_context(context,services).unwrap();
|
||||||
for script in scripts{
|
for script in scripts{
|
||||||
|
Loading…
Reference in New Issue
Block a user