From 288e679653555fcd2af8dd8de041593d65c69f95 Mon Sep 17 00:00:00 2001 From: Joe Date: Sat, 28 Feb 2026 12:30:17 -0600 Subject: [PATCH] Add script reference handling in RojoTree during snapshot insertion - Implemented logic to insert script references into the tree when a snapshot of a script class is processed. - Enhanced the existing snapshot insertion method to ensure proper tracking of script instances. These changes aim to improve the management of script references within the RojoTree structure. --- src/snapshot/tree.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/snapshot/tree.rs b/src/snapshot/tree.rs index 169b94a4..a40aeea9 100644 --- a/src/snapshot/tree.rs +++ b/src/snapshot/tree.rs @@ -69,6 +69,10 @@ impl RojoTree { tree.insert_metadata(root_ref, snapshot.metadata); + if is_script_class(snapshot.class_name.as_ref()) { + tree.script_refs.insert(root_ref); + } + for child in snapshot.children { tree.insert_instance(root_ref, child); }