|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | | -from typing import TYPE_CHECKING, Generic, List, Optional, TypeVar, Union |
| 3 | +from typing import TYPE_CHECKING, Generic, List, Optional, Tuple, TypeVar, Union |
4 | 4 |
|
5 | 5 | from ..enums import ClassIDType |
6 | 6 | from ..exceptions import TypeTreeError |
|
10 | 10 | from ..streams import EndianBinaryReader, EndianBinaryWriter |
11 | 11 |
|
12 | 12 | if TYPE_CHECKING: |
13 | | - from ..files import SerializedFile |
| 13 | + from ..enums import BuildTarget |
| 14 | + from ..files.SerializedFile import BuildType, SerializedFile, SerializedType |
14 | 15 |
|
15 | 16 | T = TypeVar("T") |
16 | 17 |
|
17 | 18 |
|
18 | 19 | class ObjectReader(Generic[T]): |
| 20 | + assets_file: SerializedFile |
| 21 | + reader: EndianBinaryReader |
| 22 | + data: bytes |
| 23 | + version: Tuple[int, int, int, int] |
| 24 | + version2: int |
| 25 | + platform: BuildTarget |
| 26 | + build_type: BuildType |
| 27 | + path_id: int |
| 28 | + byte_start_offset: Tuple[int, int] |
19 | 29 | byte_start: int |
| 30 | + byte_size_offset: Tuple[int, int] |
20 | 31 | byte_size: int |
21 | 32 | type_id: int |
| 33 | + serialized_type: Optional[SerializedType] |
22 | 34 | class_id: int |
23 | 35 | type: ClassIDType |
24 | | - path_id: int |
25 | | - assets_file: SerializedFile |
26 | | - _read_until: int |
| 36 | + is_destroyed: Optional[int] |
| 37 | + is_stripped: Optional[int] |
27 | 38 |
|
28 | 39 | # saves where the parser stopped |
29 | 40 | # in case that not all data is read |
|
0 commit comments