Fininsh config -> metadata migration

This commit is contained in:
Lucien Greathouse
2019-01-01 15:59:26 -08:00
parent 3be5988083
commit 20e9688268
5 changed files with 38 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ impl SourceProjectNode {
class_name,
children: new_children,
properties,
config: InstanceProjectNodeConfig {
metadata: InstanceProjectNodeMetadata {
ignore_unknown,
},
})
@@ -131,10 +131,18 @@ pub struct ProjectSaveError;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct InstanceProjectNodeConfig {
pub struct InstanceProjectNodeMetadata {
pub ignore_unknown: bool,
}
impl Default for InstanceProjectNodeMetadata {
fn default() -> InstanceProjectNodeMetadata {
InstanceProjectNodeMetadata {
ignore_unknown: true,
}
}
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum ProjectNode {
@@ -148,7 +156,7 @@ pub struct InstanceProjectNode {
pub class_name: String,
pub children: HashMap<String, ProjectNode>,
pub properties: HashMap<String, RbxValue>,
pub config: InstanceProjectNodeConfig,
pub metadata: InstanceProjectNodeMetadata,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]