mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Finish off bulk of metadata tracking in snapshot system
This commit is contained in:
parent
47ee8d54a8
commit
3e759b3e8e
5 changed files with 115 additions and 46 deletions
|
|
@ -100,6 +100,10 @@ fn apply_update_child(
|
|||
tree: &mut RojoTree,
|
||||
patch: &PatchUpdateInstance,
|
||||
) {
|
||||
if let Some(metadata) = &patch.changed_metadata {
|
||||
tree.update_metadata(patch.id, metadata.clone());
|
||||
}
|
||||
|
||||
let mut instance = tree
|
||||
.get_instance_mut(patch.id)
|
||||
.expect("Instance referred to by patch does not exist");
|
||||
|
|
@ -128,10 +132,7 @@ fn apply_update_child(
|
|||
);
|
||||
}
|
||||
Some(value) => {
|
||||
instance
|
||||
.instance
|
||||
.properties
|
||||
.insert(key.clone(), value.clone());
|
||||
instance.properties_mut().insert(key.clone(), value.clone());
|
||||
}
|
||||
None => {
|
||||
instance.properties_mut().remove(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue