Server component of config maps

This commit is contained in:
Lucien Greathouse
2018-12-30 22:43:23 -08:00
parent 01dd603bd5
commit 4453211c0d
4 changed files with 53 additions and 16 deletions

View File

@@ -40,7 +40,7 @@ enum SourceProjectNode {
impl SourceProjectNode {
pub fn into_project_node(self, project_file_location: &Path) -> ProjectNode {
match self {
SourceProjectNode::Instance { class_name, mut children, properties, .. } => {
SourceProjectNode::Instance { class_name, mut children, properties, ignore_unknown } => {
let mut new_children = HashMap::new();
for (node_name, node) in children.drain() {
@@ -51,6 +51,9 @@ impl SourceProjectNode {
class_name,
children: new_children,
properties,
config: InstanceProjectNodeConfig {
ignore_unknown,
},
})
},
SourceProjectNode::SyncPoint { path: source_path } => {
@@ -126,6 +129,11 @@ pub struct ProjectInitError;
#[fail(display = "Project save error")]
pub struct ProjectSaveError;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct InstanceProjectNodeConfig {
pub ignore_unknown: bool,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum ProjectNode {
@@ -139,7 +147,7 @@ pub struct InstanceProjectNode {
pub class_name: String,
pub children: HashMap<String, ProjectNode>,
pub properties: HashMap<String, RbxValue>,
// ignore_unknown: bool,
pub config: InstanceProjectNodeConfig,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]