mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 07:06:12 +00:00
Flip project field of LiveSession private to prepare for multi-project future
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
use std::{
|
use std::{
|
||||||
|
collections::HashSet,
|
||||||
mem,
|
mem,
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
@@ -32,7 +33,7 @@ impl_from!(LiveSessionError {
|
|||||||
|
|
||||||
/// Contains all of the state for a Rojo live-sync session.
|
/// Contains all of the state for a Rojo live-sync session.
|
||||||
pub struct LiveSession {
|
pub struct LiveSession {
|
||||||
pub project: Arc<Project>,
|
project: Arc<Project>,
|
||||||
pub session_id: SessionId,
|
pub session_id: SessionId,
|
||||||
pub message_queue: Arc<MessageQueue<InstanceChanges>>,
|
pub message_queue: Arc<MessageQueue<InstanceChanges>>,
|
||||||
pub rbx_session: Arc<Mutex<RbxSession>>,
|
pub rbx_session: Arc<Mutex<RbxSession>>,
|
||||||
@@ -83,4 +84,8 @@ impl LiveSession {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn serve_place_ids(&self) -> &Option<HashSet<u64>> {
|
||||||
|
&self.project.serve_place_ids
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ impl ApiService {
|
|||||||
server_version: self.server_version,
|
server_version: self.server_version,
|
||||||
protocol_version: 2,
|
protocol_version: 2,
|
||||||
session_id: self.live_session.session_id,
|
session_id: self.live_session.session_id,
|
||||||
expected_place_ids: self.live_session.project.serve_place_ids.clone(),
|
expected_place_ids: self.live_session.serve_place_ids().clone(),
|
||||||
root_instance_id: tree.get_root_id(),
|
root_instance_id: tree.get_root_id(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user