mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 09:15:15 +08:00
feat: add official resource sync pipeline
Add the production-facing official update service and bat-official-sync watch CLI for unattended resource synchronization. Support launcher-resource discovery without installing the launcher, remote marker snapshots, local manifest audit and repair, official seed hash validation, bootstrap caching, richer Addressables coverage, SQLite resource persistence, and FFI JSON helpers.
This commit is contained in:
@@ -218,7 +218,10 @@ fn read_serialized_type(
|
||||
if version >= 12 || version == 10 {
|
||||
let node_count = reader.read_i32("type_tree_node_count")?;
|
||||
if node_count < 0 {
|
||||
return Err(format!("Invalid Unity type tree node count: {}", node_count));
|
||||
return Err(format!(
|
||||
"Invalid Unity type tree node count: {}",
|
||||
node_count
|
||||
));
|
||||
}
|
||||
let string_buffer_size = reader.read_i32("type_tree_string_buffer_size")?;
|
||||
if string_buffer_size < 0 {
|
||||
@@ -229,10 +232,7 @@ fn read_serialized_type(
|
||||
}
|
||||
|
||||
let node_size = 2 + 1 + 1 + 4 + 4 + 4 + 4 + 4 + if version >= 19 { 8 } else { 0 };
|
||||
reader.read_bytes(
|
||||
node_count as usize * node_size,
|
||||
"type_tree_nodes",
|
||||
)?;
|
||||
reader.read_bytes(node_count as usize * node_size, "type_tree_nodes")?;
|
||||
reader.read_bytes(string_buffer_size as usize, "type_tree_strings")?;
|
||||
}
|
||||
|
||||
@@ -244,10 +244,7 @@ fn read_serialized_type(
|
||||
dependency_count
|
||||
));
|
||||
}
|
||||
reader.read_bytes(
|
||||
dependency_count as usize * 4,
|
||||
"type_tree_dependencies",
|
||||
)?;
|
||||
reader.read_bytes(dependency_count as usize * 4, "type_tree_dependencies")?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,9 +520,9 @@ mod tests {
|
||||
assert_eq!(
|
||||
&asset.bytes[..32],
|
||||
&[
|
||||
0x60, 0x23, 0x0a, 0x06, 0x95, 0x72, 0x83, 0x57, 0x54, 0x23, 0x49, 0x06,
|
||||
0xfc, 0x72, 0xb4, 0x57, 0x57, 0x23, 0x6b, 0x06, 0x98, 0x72, 0xb5, 0x57,
|
||||
0x71, 0x23, 0x1b, 0x06, 0xec, 0x72, 0xf6, 0x57,
|
||||
0x60, 0x23, 0x0a, 0x06, 0x95, 0x72, 0x83, 0x57, 0x54, 0x23, 0x49, 0x06, 0xfc, 0x72,
|
||||
0xb4, 0x57, 0x57, 0x23, 0x6b, 0x06, 0x98, 0x72, 0xb5, 0x57, 0x71, 0x23, 0x1b, 0x06,
|
||||
0xec, 0x72, 0xf6, 0x57,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user