protocol/config: ignoreUnknown -> ignoreUnknownInstances

This commit is contained in:
Lucien Greathouse
2019-01-04 14:30:00 -08:00
parent b5ae6a5785
commit 5c2bf65eaa
2 changed files with 7 additions and 7 deletions

View File

@@ -74,7 +74,7 @@ end
local function shouldClearUnknown(id, instanceMetadataMap) local function shouldClearUnknown(id, instanceMetadataMap)
if instanceMetadataMap[id] then if instanceMetadataMap[id] then
return not instanceMetadataMap[id].ignoreUnknown return not instanceMetadataMap[id].ignoreUnknownInstances
else else
return true return true
end end

View File

@@ -25,8 +25,8 @@ enum SourceProjectNode {
#[serde(rename = "$properties", default = "HashMap::new")] #[serde(rename = "$properties", default = "HashMap::new")]
properties: HashMap<String, RbxValue>, properties: HashMap<String, RbxValue>,
#[serde(rename = "$ignoreUnknown", default = "yeah")] #[serde(rename = "$ignoreUnknownInstances", default = "yeah")]
ignore_unknown: bool, ignore_unknown_instances: bool,
#[serde(flatten)] #[serde(flatten)]
children: HashMap<String, SourceProjectNode>, children: HashMap<String, SourceProjectNode>,
@@ -40,7 +40,7 @@ enum SourceProjectNode {
impl SourceProjectNode { impl SourceProjectNode {
pub fn into_project_node(self, project_file_location: &Path) -> ProjectNode { pub fn into_project_node(self, project_file_location: &Path) -> ProjectNode {
match self { match self {
SourceProjectNode::Instance { class_name, mut children, properties, ignore_unknown } => { SourceProjectNode::Instance { class_name, mut children, properties, ignore_unknown_instances } => {
let mut new_children = HashMap::new(); let mut new_children = HashMap::new();
for (node_name, node) in children.drain() { for (node_name, node) in children.drain() {
@@ -52,7 +52,7 @@ impl SourceProjectNode {
children: new_children, children: new_children,
properties, properties,
metadata: InstanceProjectNodeMetadata { metadata: InstanceProjectNodeMetadata {
ignore_unknown, ignore_unknown_instances,
}, },
}) })
}, },
@@ -137,13 +137,13 @@ pub struct ProjectSaveError;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct InstanceProjectNodeMetadata { pub struct InstanceProjectNodeMetadata {
pub ignore_unknown: bool, pub ignore_unknown_instances: bool,
} }
impl Default for InstanceProjectNodeMetadata { impl Default for InstanceProjectNodeMetadata {
fn default() -> InstanceProjectNodeMetadata { fn default() -> InstanceProjectNodeMetadata {
InstanceProjectNodeMetadata { InstanceProjectNodeMetadata {
ignore_unknown: true, ignore_unknown_instances: true,
} }
} }
} }