Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ repository = "https://github.com/localcc/gvas"
readme = "README.md"
license = "MIT"
version = "0.10.0"
edition = "2021"
edition = "2024"

[dependencies]
enum_dispatch = "0.3.13"
byteorder = "1.5.0"
ordered-float = "4.4.0"
ordered-float = "5.0.0"
serde = { version = "1.0.210", optional = true, features = ["derive"] }
serde_with = { version = "3.11.0", optional = true, features = ["hex"] }
indexmap = "2.6.0"
thiserror = "1.0.64"
thiserror = "2.0.12"
num_enum = "0.7.3"
flate2 = "1.0.34"
cfg_eval = "0.1.2"
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{
io,
string::{FromUtf16Error, FromUtf8Error},
string::{FromUtf8Error, FromUtf16Error},
};

use thiserror::Error;
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ use std::{
};

use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use flate2::Compression;
use flate2::read::ZlibDecoder;
use flate2::write::ZlibEncoder;
use flate2::Compression;

use crate::{
cursor_ext::{ReadExt, WriteExt},
custom_version::FCustomVersion,
engine_version::FEngineVersion,
error::{DeserializeError, Error},
game_version::{DeserializedGameVersion, GameVersion, PalworldCompressionType, PLZ_MAGIC},
game_version::{DeserializedGameVersion, GameVersion, PLZ_MAGIC, PalworldCompressionType},
object_version::EUnrealEngineObjectUE5Version,
ord_ext::OrdExt,
properties::{Property, PropertyOptions, PropertyTrait},
savegame_version::SaveGameVersion,
types::{map::HashableIndexMap, Guid},
types::{Guid, map::HashableIndexMap},
};

/// The four bytes 'GVAS' appear at the beginning of every GVAS file.
Expand Down
2 changes: 1 addition & 1 deletion src/properties/array_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ use crate::{
};

use super::{
Property, PropertyOptions, PropertyTrait,
enum_property::EnumProperty,
impl_read_header, impl_write, impl_write_header_part,
int_property::{BoolProperty, ByteProperty, BytePropertyValue, FloatProperty, IntProperty},
name_property::NameProperty,
str_property::StrProperty,
struct_property::{StructProperty, StructPropertyValue},
Property, PropertyOptions, PropertyTrait,
};

#[cfg(feature = "serde")]
Expand Down
2 changes: 1 addition & 1 deletion src/properties/delegate_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
error::Error,
};

use super::{impl_read, impl_read_header, impl_write, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read, impl_read_header, impl_write};

/// An Unreal script delegate
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion src/properties/enum_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
error::Error,
};

use super::{impl_read_header, impl_write, impl_write_header_part, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read_header, impl_write, impl_write_header_part};

/// A property that holds an enum value.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion src/properties/field_path_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
error::Error,
};

use super::{impl_read, impl_read_header, impl_write, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read, impl_read_header, impl_write};

/// Field path
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
3 changes: 1 addition & 2 deletions src/properties/int_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use ordered_float::OrderedFloat;

use super::{
impl_write,
PropertyOptions, PropertyTrait, impl_write,
struct_types::{unwrap_value, wrap_type, wrap_value},
PropertyOptions, PropertyTrait,
};
use crate::{
cursor_ext::{ReadExt, WriteExt},
Expand Down
2 changes: 1 addition & 1 deletion src/properties/map_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ use crate::{
cursor_ext::{ReadExt, WriteExt},
error::{DeserializeError, Error},
properties::{
Property, PropertyOptions, PropertyTrait,
enum_property::EnumProperty,
impl_read_header, impl_write, impl_write_header_part,
int_property::{BoolProperty, IntProperty},
name_property::NameProperty,
str_property::StrProperty,
Property, PropertyOptions, PropertyTrait,
},
scoped_stack_entry::ScopedStackEntry,
types::map::HashableIndexMap,
Expand Down
6 changes: 3 additions & 3 deletions src/properties/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
custom_version::{CustomVersionTrait, FCustomVersion},
error::{DeserializeError, Error},
scoped_stack_entry::ScopedStackEntry,
types::{map::HashableIndexMap, Guid},
types::{Guid, map::HashableIndexMap},
};

use self::{
Expand All @@ -22,8 +22,8 @@ use self::{
enum_property::EnumProperty,
field_path_property::FieldPathProperty,
int_property::{
BoolProperty, ByteProperty, DoubleProperty, FloatProperty, Int16Property, Int64Property,
Int8Property, IntProperty, UInt16Property, UInt32Property, UInt64Property,
BoolProperty, ByteProperty, DoubleProperty, FloatProperty, Int8Property, Int16Property,
Int64Property, IntProperty, UInt16Property, UInt32Property, UInt64Property,
},
map_property::MapProperty,
name_property::NameProperty,
Expand Down
2 changes: 1 addition & 1 deletion src/properties/name_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};

use crate::{cursor_ext::ReadExt, cursor_ext::WriteExt, error::Error};

use super::{impl_read, impl_read_header, impl_write, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read, impl_read_header, impl_write};

/// A property that holds a name.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion src/properties/object_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
error::Error,
};

use super::{impl_read, impl_read_header, impl_write, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read, impl_read_header, impl_write};

/// A property that describes a reference variable to another object which may be nil.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion src/properties/set_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
};

use super::{
impl_read_header, impl_write, impl_write_header_part, Property, PropertyOptions, PropertyTrait,
Property, PropertyOptions, PropertyTrait, impl_read_header, impl_write, impl_write_header_part,
};

/// A property that stores a set of properties.
Expand Down
2 changes: 1 addition & 1 deletion src/properties/str_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
error::Error,
};

use super::{impl_read, impl_read_header, impl_write, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read, impl_read_header, impl_write};

/// A property that holds a GVAS string value.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
5 changes: 2 additions & 3 deletions src/properties/struct_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ use crate::{
error::{DeserializeError, Error, SerializeError},
properties::{name_property::NameProperty, struct_types::LinearColor},
scoped_stack_entry::ScopedStackEntry,
types::{map::HashableIndexMap, Guid},
types::{Guid, map::HashableIndexMap},
};

use super::{
impl_write, impl_write_header_part, make_matcher,
Property, PropertyOptions, PropertyTrait, impl_write, impl_write_header_part, make_matcher,
struct_types::{
DateTime, IntPoint, QuatD, QuatF, RotatorD, RotatorF, Timespan, Vector2D, Vector2F,
VectorD, VectorF,
},
Property, PropertyOptions, PropertyTrait,
};

macro_rules! validate {
Expand Down
2 changes: 1 addition & 1 deletion src/properties/text_property.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
error::Error,
};

use super::{impl_read, impl_read_header, impl_write, PropertyOptions, PropertyTrait};
use super::{PropertyOptions, PropertyTrait, impl_read, impl_read_header, impl_write};

/// A property that stores GVAS Text.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down
6 changes: 3 additions & 3 deletions tests/common/delegate.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use gvas::{
GvasFile, GvasHeader,
engine_version::FEngineVersion,
game_version::DeserializedGameVersion,
properties::{
Property,
delegate_property::{
Delegate, DelegateProperty, MulticastInlineDelegateProperty, MulticastScriptDelegate,
MulticastSparseDelegateProperty,
},
Property,
},
types::{map::HashableIndexMap, Guid},
GvasFile, GvasHeader,
types::{Guid, map::HashableIndexMap},
};
use std::str::FromStr;

Expand Down
6 changes: 3 additions & 3 deletions tests/common/options.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use gvas::{
GvasFile, GvasHeader,
engine_version::FEngineVersion,
game_version::DeserializedGameVersion,
properties::{int_property::FloatProperty, Property},
types::{map::HashableIndexMap, Guid},
GvasFile, GvasHeader,
properties::{Property, int_property::FloatProperty},
types::{Guid, map::HashableIndexMap},
};
use std::str::FromStr;

Expand Down
Loading