Skip to content

Commit

Permalink
Merge pull request #181 from KrisCris/patch-1
Browse files Browse the repository at this point in the history
Allow type_name == "UInt32Property" in archive::property
  • Loading branch information
cheahjs committed Jul 8, 2024
2 parents b85ba14 + 891f579 commit 1534004
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions palworld_save_tools/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,11 @@ def property(
"id": self.optional_guid(),
"value": self.i32(),
}
elif type_name == "UInt32Property":
value = {
"id": self.optional_guid(),
"value": self.u32(),
}
elif type_name == "Int64Property":
value = {
"id": self.optional_guid(),
Expand Down Expand Up @@ -831,6 +836,10 @@ def property_inner(self, property_type: str, property: dict[str, Any]) -> int:
self.optional_guid(property.get("id", None))
self.i32(property["value"])
size = 4
elif property_type == "UInt32Property":
self.optional_guid(property.get("id", None))
self.u32(property["value"])
size = 4
elif property_type == "Int64Property":
self.optional_guid(property.get("id", None))
self.i64(property["value"])
Expand Down Expand Up @@ -951,6 +960,8 @@ def array_value(self, array_type: str, count: int, values: list[Any]):
for i in range(count):
if array_type == "IntProperty":
self.i32(values[i])
elif array_type == "UInt32Property":
self.u32(values[i])
elif array_type == "Int64Property":
self.i64(values[i])
elif array_type == "FloatProperty":
Expand Down

0 comments on commit 1534004

Please sign in to comment.