forked from rojo-rbx/rojo
Turn messages into stub SubscribeMessage struct
This commit is contained in:
@@ -60,6 +60,7 @@ pub struct PatchUpdate {
|
||||
///
|
||||
// TODO: Introduce machinery to detect conflicts, like keeping previous +
|
||||
// current values in all fields.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AppliedPatchSet {
|
||||
pub removed: Vec<RbxId>,
|
||||
pub added: Vec<AppliedPatchAdd>,
|
||||
@@ -76,10 +77,12 @@ impl AppliedPatchSet {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AppliedPatchAdd {
|
||||
pub instance_id: RbxId,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AppliedPatchUpdate {
|
||||
pub id: RbxId,
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ use std::collections::HashMap;
|
||||
use rbx_dom_weak::{RbxId, RbxInstanceProperties, RbxValue};
|
||||
|
||||
use super::{
|
||||
patch::{PatchSet, PatchUpdate},
|
||||
patch::{AppliedPatchSet, PatchSet, PatchUpdate},
|
||||
InstancePropertiesWithMeta, InstanceSnapshot, RojoTree,
|
||||
};
|
||||
|
||||
pub fn apply_patch_set(tree: &mut RojoTree, patch_set: PatchSet) {
|
||||
pub fn apply_patch_set(tree: &mut RojoTree, patch_set: PatchSet) -> AppliedPatchSet {
|
||||
let mut context = PatchApplyContext::default();
|
||||
|
||||
for removed_id in patch_set.removed_instances {
|
||||
@@ -25,6 +25,9 @@ pub fn apply_patch_set(tree: &mut RojoTree, patch_set: PatchSet) {
|
||||
}
|
||||
|
||||
apply_deferred_properties(context, tree);
|
||||
|
||||
// TODO: Actually calculate patch set
|
||||
AppliedPatchSet::new()
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
||||
Reference in New Issue
Block a user