mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 07:06:12 +00:00
server: Make servePlaceId into a list of IDs, servePlaceIds
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::{HashMap, HashSet},
|
||||||
fs,
|
fs,
|
||||||
io,
|
io,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
@@ -78,6 +78,7 @@ struct SourceProject {
|
|||||||
name: String,
|
name: String,
|
||||||
tree: SourceProjectNode,
|
tree: SourceProjectNode,
|
||||||
serve_port: Option<u16>,
|
serve_port: Option<u16>,
|
||||||
|
serve_place_ids: Option<HashSet<u64>>,
|
||||||
serve_place_id: Option<u64>,
|
serve_place_id: Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@ impl SourceProject {
|
|||||||
name: self.name,
|
name: self.name,
|
||||||
tree,
|
tree,
|
||||||
serve_port: self.serve_port,
|
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),
|
file_location: PathBuf::from(project_file_location),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -174,7 +175,7 @@ pub struct Project {
|
|||||||
pub name: String,
|
pub name: String,
|
||||||
pub tree: ProjectNode,
|
pub tree: ProjectNode,
|
||||||
pub serve_port: Option<u16>,
|
pub serve_port: Option<u16>,
|
||||||
pub serve_place_id: Option<u64>,
|
pub serve_place_ids: Option<HashSet<u64>>,
|
||||||
pub file_location: PathBuf,
|
pub file_location: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
collections::HashMap,
|
collections::{HashMap, HashSet},
|
||||||
sync::{mpsc, Arc},
|
sync::{mpsc, Arc},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -26,6 +26,7 @@ pub struct ServerInfoResponse<'a> {
|
|||||||
pub session_id: SessionId,
|
pub session_id: SessionId,
|
||||||
pub server_version: &'a str,
|
pub server_version: &'a str,
|
||||||
pub protocol_version: u64,
|
pub protocol_version: u64,
|
||||||
|
pub expected_place_ids: Option<HashSet<u64>>,
|
||||||
pub root_instance_id: RbxId,
|
pub root_instance_id: RbxId,
|
||||||
pub instance_metadata_map: Cow<'a, HashMap<RbxId, InstanceProjectNodeMetadata>>,
|
pub instance_metadata_map: Cow<'a, HashMap<RbxId, InstanceProjectNodeMetadata>>,
|
||||||
}
|
}
|
||||||
@@ -78,6 +79,7 @@ impl Server {
|
|||||||
server_version: self.server_version,
|
server_version: self.server_version,
|
||||||
protocol_version: 2,
|
protocol_version: 2,
|
||||||
session_id: self.session.session_id,
|
session_id: self.session.session_id,
|
||||||
|
expected_place_ids: self.session.project.serve_place_ids.clone(),
|
||||||
root_instance_id: tree.get_root_id(),
|
root_instance_id: tree.get_root_id(),
|
||||||
instance_metadata_map: Cow::Borrowed(rbx_session.get_instance_metadata_map()),
|
instance_metadata_map: Cow::Borrowed(rbx_session.get_instance_metadata_map()),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user