Skip to content

Commit e7744fe

Browse files
committed
Some more structs and fixes
1 parent c6bb98d commit e7744fe

3 files changed

Lines changed: 1410 additions & 240 deletions

File tree

uesave/src/archive.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ pub trait ArchiveType: Clone + PartialEq + std::fmt::Debug + Default + serde::Se
1616
+ serde::Serialize
1717
+ for<'de> serde::Deserialize<'de>;
1818

19+
/// Returns true if the given object reference is the null reference.
20+
fn is_null_object_ref(object_ref: &Self::ObjectRef) -> bool;
21+
1922
/// The type used to represent soft object paths in this archive format.
2023
/// - For save games: `SoftObjectPath` enum with asset paths
2124
/// - For assets: Could be different representation
@@ -120,6 +123,10 @@ pub struct SaveGameArchiveType;
120123
impl ArchiveType for SaveGameArchiveType {
121124
type ObjectRef = String;
122125
type SoftObjectPath = crate::SoftObjectPath;
126+
127+
fn is_null_object_ref(object_ref: &Self::ObjectRef) -> bool {
128+
object_ref.is_empty() || object_ref == "None"
129+
}
123130
}
124131

125132
impl<R> ArchiveReader for SaveGameArchive<R>

0 commit comments

Comments
 (0)