mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
server: Make servePlaceId into a list of IDs, servePlaceIds
This commit is contained in:
parent
1138c05dff
commit
b8025452bf
2 changed files with 7 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use std::{
|
||||
collections::HashMap,
|
||||
collections::{HashMap, HashSet},
|
||||
fs,
|
||||
io,
|
||||
path::{Path, PathBuf},
|
||||
|
|
@ -78,6 +78,7 @@ struct SourceProject {
|
|||
name: String,
|
||||
tree: SourceProjectNode,
|
||||
serve_port: Option<u16>,
|
||||
serve_place_ids: Option<HashSet<u64>>,
|
||||
serve_place_id: Option<u64>,
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +90,7 @@ impl SourceProject {
|
|||
name: self.name,
|
||||
tree,
|
||||
serve_port: self.serve_port,
|
||||
serve_place_id: self.serve_place_id,
|
||||
serve_place_ids: self.serve_place_ids,
|
||||
file_location: PathBuf::from(project_file_location),
|
||||
}
|
||||
}
|
||||
|
|
@ -174,7 +175,7 @@ pub struct Project {
|
|||
pub name: String,
|
||||
pub tree: ProjectNode,
|
||||
pub serve_port: Option<u16>,
|
||||
pub serve_place_id: Option<u64>,
|
||||
pub serve_place_ids: Option<HashSet<u64>>,
|
||||
pub file_location: PathBuf,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::{
|
||||
borrow::Cow,
|
||||
collections::HashMap,
|
||||
collections::{HashMap, HashSet},
|
||||
sync::{mpsc, Arc},
|
||||
};
|
||||
|
||||
|
|
@ -26,6 +26,7 @@ pub struct ServerInfoResponse<'a> {
|
|||
pub session_id: SessionId,
|
||||
pub server_version: &'a str,
|
||||
pub protocol_version: u64,
|
||||
pub expected_place_ids: Option<HashSet<u64>>,
|
||||
pub root_instance_id: RbxId,
|
||||
pub instance_metadata_map: Cow<'a, HashMap<RbxId, InstanceProjectNodeMetadata>>,
|
||||
}
|
||||
|
|
@ -78,6 +79,7 @@ impl Server {
|
|||
server_version: self.server_version,
|
||||
protocol_version: 2,
|
||||
session_id: self.session.session_id,
|
||||
expected_place_ids: self.session.project.serve_place_ids.clone(),
|
||||
root_instance_id: tree.get_root_id(),
|
||||
instance_metadata_map: Cow::Borrowed(rbx_session.get_instance_metadata_map()),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue