@etothepii/satisfactory-file-parser 3.3.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +6 -0
- package/CHANGELOG.md +35 -4
- package/GUIDE.md +11 -7
- package/README.md +8 -6
- package/build/index.d.ts +112 -101
- package/build/index.d.ts.map +1 -1
- package/build/index.js +43 -40
- package/build/index.js.map +1 -1
- package/build/parser/byte/binary-readable.interface.d.ts +1 -0
- package/build/parser/byte/binary-readable.interface.d.ts.map +1 -1
- package/build/parser/byte/binary-readable.interface.js.map +1 -1
- package/build/parser/byte/byte-reader.class.d.ts +1 -0
- package/build/parser/byte/byte-reader.class.d.ts.map +1 -1
- package/build/parser/byte/byte-reader.class.js +6 -2
- package/build/parser/byte/byte-reader.class.js.map +1 -1
- package/build/parser/byte/byte-writer.class.d.ts +1 -0
- package/build/parser/byte/byte-writer.class.d.ts.map +1 -1
- package/build/parser/byte/byte-writer.class.js +6 -0
- package/build/parser/byte/byte-writer.class.js.map +1 -1
- package/build/parser/context/context-reader.d.ts +1 -1
- package/build/parser/context/context-reader.d.ts.map +1 -1
- package/build/parser/context/context-reader.js.map +1 -1
- package/build/parser/context/context-writer.d.ts +1 -1
- package/build/parser/context/context-writer.d.ts.map +1 -1
- package/build/parser/context/context-writer.js.map +1 -1
- package/build/parser/context/hierarchical-version-context.d.ts +11 -0
- package/build/parser/context/hierarchical-version-context.d.ts.map +1 -0
- package/build/parser/context/hierarchical-version-context.js +24 -0
- package/build/parser/context/hierarchical-version-context.js.map +1 -0
- package/build/parser/context/{context.d.ts → reader-writer-context.d.ts} +5 -3
- package/build/parser/context/reader-writer-context.d.ts.map +1 -0
- package/build/parser/context/{context.js → reader-writer-context.js} +1 -1
- package/build/parser/context/reader-writer-context.js.map +1 -0
- package/build/parser/parser.d.ts.map +1 -1
- package/build/parser/parser.js +36 -20
- package/build/parser/parser.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-config-version.d.ts +4 -2
- package/build/parser/satisfactory/blueprint/blueprint-config-version.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-config-version.js +4 -2
- package/build/parser/satisfactory/blueprint/blueprint-config-version.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-config.d.ts +4 -5
- package/build/parser/satisfactory/blueprint/blueprint-config.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-config.js +16 -14
- package/build/parser/satisfactory/blueprint/blueprint-config.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-header.d.ts +2 -0
- package/build/parser/satisfactory/blueprint/blueprint-header.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-header.js +18 -2
- package/build/parser/satisfactory/blueprint/blueprint-header.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-reader.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-reader.js +6 -2
- package/build/parser/satisfactory/blueprint/blueprint-reader.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-writer.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-writer.js +5 -2
- package/build/parser/satisfactory/blueprint/blueprint-writer.js.map +1 -1
- package/build/parser/satisfactory/save/data-blob.d.ts +17 -0
- package/build/parser/satisfactory/save/data-blob.d.ts.map +1 -0
- package/build/parser/satisfactory/save/data-blob.js +137 -0
- package/build/parser/satisfactory/save/data-blob.js.map +1 -0
- package/build/parser/satisfactory/save/level.d.ts +5 -10
- package/build/parser/satisfactory/save/level.d.ts.map +1 -1
- package/build/parser/satisfactory/save/level.js +52 -180
- package/build/parser/satisfactory/save/level.js.map +1 -1
- package/build/parser/satisfactory/save/satisfactory-save-header.d.ts.map +1 -1
- package/build/parser/satisfactory/save/satisfactory-save-header.js +5 -3
- package/build/parser/satisfactory/save/satisfactory-save-header.js.map +1 -1
- package/build/parser/satisfactory/save/satisfactory-save.d.ts +3 -1
- package/build/parser/satisfactory/save/satisfactory-save.d.ts.map +1 -1
- package/build/parser/satisfactory/save/satisfactory-save.js.map +1 -1
- package/build/parser/satisfactory/save/save-body-chunks.js +2 -2
- package/build/parser/satisfactory/save/save-body-chunks.js.map +1 -1
- package/build/parser/satisfactory/save/save-custom-version.d.ts +8 -2
- package/build/parser/satisfactory/save/save-custom-version.d.ts.map +1 -1
- package/build/parser/satisfactory/save/save-custom-version.js +8 -2
- package/build/parser/satisfactory/save/save-custom-version.js.map +1 -1
- package/build/parser/satisfactory/save/save-reader.d.ts +2 -2
- package/build/parser/satisfactory/save/save-reader.d.ts.map +1 -1
- package/build/parser/satisfactory/save/save-reader.js +16 -13
- package/build/parser/satisfactory/save/save-reader.js.map +1 -1
- package/build/parser/satisfactory/save/save-writer.d.ts.map +1 -1
- package/build/parser/satisfactory/save/save-writer.js +4 -1
- package/build/parser/satisfactory/save/save-writer.js.map +1 -1
- package/build/parser/satisfactory/save/save.types.d.ts +1 -1
- package/build/parser/satisfactory/save/save.types.d.ts.map +1 -1
- package/build/parser/satisfactory/save/save.types.js.map +1 -1
- package/build/parser/satisfactory/save/toc-blob.d.ts +18 -0
- package/build/parser/satisfactory/save/toc-blob.d.ts.map +1 -0
- package/build/parser/satisfactory/save/toc-blob.js +97 -0
- package/build/parser/satisfactory/save/toc-blob.js.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts +4 -0
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts.map +1 -1
- package/build/parser/satisfactory/types/objects/SaveObject.js +19 -5
- package/build/parser/satisfactory/types/objects/SaveObject.js.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts +4 -4
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.js +73 -114
- package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts +9 -12
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js +12 -7
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts +10 -5
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js +20 -23
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +12 -7
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js +37 -34
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js +15 -23
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +10 -5
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js +17 -23
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js +15 -23
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int64Property.js +15 -23
- package/build/parser/satisfactory/types/property/generic/Int64Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts +8 -4
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int8Property.js +11 -20
- package/build/parser/satisfactory/types/property/generic/Int8Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/IntProperty.d.ts +20 -0
- package/build/parser/satisfactory/types/property/generic/IntProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/IntProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/IntProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/InterfaceProperty.d.ts +21 -0
- package/build/parser/satisfactory/types/property/generic/InterfaceProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/InterfaceProperty.js +26 -0
- package/build/parser/satisfactory/types/property/generic/InterfaceProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/NameProperty.d.ts +20 -0
- package/build/parser/satisfactory/types/property/generic/NameProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/NameProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/NameProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js +15 -23
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SingleProperty.d.ts +20 -0
- package/build/parser/satisfactory/types/property/generic/SingleProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SingleProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/SingleProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js +15 -23
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StrProperty.js +15 -23
- package/build/parser/satisfactory/types/property/generic/StrProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.js +38 -45
- package/build/parser/satisfactory/types/property/generic/TextProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js +15 -23
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js +14 -22
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts +9 -5
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js +14 -22
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/containers/ArrayProperty.d.ts +15 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayProperty.js +129 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayPropertySpecificTypes.d.ts +55 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayPropertySpecificTypes.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayPropertySpecificTypes.js +24 -0
- package/build/parser/satisfactory/types/property/generic/containers/ArrayPropertySpecificTypes.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/MapProperty.d.ts +20 -0
- package/build/parser/satisfactory/types/property/generic/containers/MapProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/{MapProperty.js → containers/MapProperty.js} +52 -61
- package/build/parser/satisfactory/types/property/generic/containers/MapProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetProperty.js +90 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetPropertySpecificTypes.d.ts +34 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetPropertySpecificTypes.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetPropertySpecificTypes.js +17 -0
- package/build/parser/satisfactory/types/property/generic/containers/SetPropertySpecificTypes.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/containers/StructProperty.d.ts +59 -0
- package/build/parser/satisfactory/types/property/generic/containers/StructProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/{StructProperty.js → containers/StructProperty.js} +69 -82
- package/build/parser/satisfactory/types/property/generic/containers/StructProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.d.ts +2 -0
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.js +14 -5
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.js.map +1 -1
- package/build/parser/satisfactory/types/property/special/PlayerSpecialProperties.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/special/PlayerSpecialProperties.js.map +1 -1
- package/build/parser/satisfactory/types/property/special/PowerLineSpecialProperties.js +2 -2
- package/build/parser/satisfactory/types/property/special/PowerLineSpecialProperties.js.map +1 -1
- package/build/parser/satisfactory/types/property/special/runtime-buildable-instance-data-version.d.ts +4 -2
- package/build/parser/satisfactory/types/property/special/runtime-buildable-instance-data-version.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/special/runtime-buildable-instance-data-version.js +4 -2
- package/build/parser/satisfactory/types/property/special/runtime-buildable-instance-data-version.js.map +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts +4 -4
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.js +6 -6
- package/build/parser/satisfactory/types/structs/GUIDInfo.js.map +1 -1
- package/build/parser/satisfactory/types/structs/SaveBodyValidation.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/SaveBodyValidation.js +0 -2
- package/build/parser/satisfactory/types/structs/SaveBodyValidation.js.map +1 -1
- package/build/parser/satisfactory/types/structs/SoftObjectReference.d.ts +1 -1
- package/build/parser/satisfactory/types/structs/SoftObjectReference.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/SoftObjectReference.js +2 -2
- package/build/parser/satisfactory/types/structs/SoftObjectReference.js.map +1 -1
- package/build/parser/satisfactory/types/structs/binary/FCustomVersion.d.ts +12 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersion.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersion.js +21 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersion.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersionContainer.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersionContainer.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersionContainer.js +22 -0
- package/build/parser/satisfactory/types/structs/binary/FCustomVersionContainer.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FEngineVersion.d.ts +14 -0
- package/build/parser/satisfactory/types/structs/binary/FEngineVersion.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FEngineVersion.js +24 -0
- package/build/parser/satisfactory/types/structs/binary/FEngineVersion.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FLocalUserNetIdBundle.d.ts +12 -0
- package/build/parser/satisfactory/types/structs/binary/FLocalUserNetIdBundle.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FLocalUserNetIdBundle.js +22 -0
- package/build/parser/satisfactory/types/structs/binary/FLocalUserNetIdBundle.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPackageFileVersion.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/binary/FPackageFileVersion.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPackageFileVersion.js +18 -0
- package/build/parser/satisfactory/types/structs/binary/FPackageFileVersion.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPlayerInfoHandle.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/binary/FPlayerInfoHandle.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPlayerInfoHandle.js +38 -0
- package/build/parser/satisfactory/types/structs/binary/FPlayerInfoHandle.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTag.d.ts +30 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTag.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTag.js +182 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTag.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTagNode.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTagNode.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTagNode.js +26 -0
- package/build/parser/satisfactory/types/structs/binary/FPropertyTagNode.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FSaveObjectVersionData.d.ts +17 -0
- package/build/parser/satisfactory/types/structs/binary/FSaveObjectVersionData.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FSaveObjectVersionData.js +27 -0
- package/build/parser/satisfactory/types/structs/binary/FSaveObjectVersionData.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FUniqueNetIdRepl.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/binary/FUniqueNetIdRepl.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FUniqueNetIdRepl.js +21 -0
- package/build/parser/satisfactory/types/structs/binary/FUniqueNetIdRepl.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/LBBalancerIndexing.d.ts +12 -0
- package/build/parser/satisfactory/types/structs/binary/LBBalancerIndexing.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/LBBalancerIndexing.js +22 -0
- package/build/parser/satisfactory/types/structs/binary/LBBalancerIndexing.js.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.d.ts +22 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.js +40 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.js.map +1 -0
- package/build/parser/stream/reworked/readable-stream-parser.d.ts +2 -3
- package/build/parser/stream/reworked/readable-stream-parser.d.ts.map +1 -1
- package/build/parser/stream/reworked/readable-stream-parser.js +90 -50
- package/build/parser/stream/reworked/readable-stream-parser.js.map +1 -1
- package/build/parser/unreal-engine/ETextHistoryType.d.ts +17 -0
- package/build/parser/unreal-engine/ETextHistoryType.d.ts.map +1 -0
- package/build/parser/unreal-engine/ETextHistoryType.js +21 -0
- package/build/parser/unreal-engine/ETextHistoryType.js.map +1 -0
- package/build/parser/unreal-engine/EUnrealEngineObjectUE5Version.d.ts +24 -0
- package/build/parser/unreal-engine/EUnrealEngineObjectUE5Version.d.ts.map +1 -0
- package/build/parser/unreal-engine/EUnrealEngineObjectUE5Version.js +29 -0
- package/build/parser/unreal-engine/EUnrealEngineObjectUE5Version.js.map +1 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BlueprintConfigReader.html +4 -4
- package/docs/classes/BlueprintReader.html +4 -4
- package/docs/classes/CompressionLibraryError.html +27 -6
- package/docs/classes/ContextReader.html +4 -4
- package/docs/classes/ContextWriter.html +4 -4
- package/docs/classes/CorruptBlueprintError.html +27 -6
- package/docs/classes/CorruptSaveError.html +27 -6
- package/docs/classes/Parser.html +6 -6
- package/docs/classes/ParserError.html +27 -6
- package/docs/classes/ReadableStreamParser.html +2 -2
- package/docs/classes/SatisfactorySave.html +2 -2
- package/docs/classes/SaveComponent.html +2 -2
- package/docs/classes/SaveEntity.html +2 -2
- package/docs/classes/SaveObject.html +2 -2
- package/docs/classes/SaveReader.html +4 -4
- package/docs/classes/SaveStreamJsonStringifier.html +2 -2
- package/docs/classes/SaveStreamWriter.html +2 -2
- package/docs/classes/SaveWriter.html +4 -4
- package/docs/classes/TimeoutError.html +27 -6
- package/docs/classes/UnimplementedError.html +27 -6
- package/docs/classes/UnsupportedVersionError.html +27 -6
- package/docs/enums/Alignment.html +2 -2
- package/docs/enums/BlueprintConfigVersion.html +2 -2
- package/docs/enums/BlueprintHeaderVersion.html +2 -2
- package/docs/enums/CompressionAlgorithmCode.html +2 -2
- package/docs/enums/FactoryGameCustomVersion.html +2 -2
- package/docs/enums/RuntimeBuildableInstanceDataVersion.html +2 -2
- package/docs/enums/SaveCustomVersion.html +10 -10
- package/docs/enums/SaveHeaderType.html +2 -2
- package/docs/functions/AbstractBaseProperty.Create.html +1 -1
- package/docs/functions/ArrayProperty.CalcOverhead.html +1 -1
- package/docs/functions/ArrayProperty.Parse.html +1 -1
- package/docs/functions/ArrayProperty.Serialize.html +1 -1
- package/docs/functions/BlueprintConfig.Parse.html +1 -1
- package/docs/functions/BlueprintConfig.Serialize.html +1 -1
- package/docs/functions/BlueprintHeader.Parse.html +1 -1
- package/docs/functions/BlueprintHeader.Serialize.html +1 -1
- package/docs/functions/BoolArrayProperty.Parse.html +1 -1
- package/docs/functions/BoolArrayProperty.Serialize.html +1 -1
- package/docs/functions/BoolProperty.CalcOverhead.html +1 -1
- package/docs/functions/BoolProperty.Parse.html +1 -1
- package/docs/functions/BoolProperty.ReadValue.html +1 -1
- package/docs/functions/BoolProperty.Serialize.html +1 -1
- package/docs/functions/BoolProperty.SerializeValue.html +1 -1
- package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -1
- package/docs/functions/BuildableSubsystemSpecialProperties.Serialize.html +1 -1
- package/docs/functions/BuildableTypeInstance.Parse.html +1 -1
- package/docs/functions/BuildableTypeInstance.Serialize.html +1 -1
- package/docs/functions/ByteArrayProperty.Parse.html +1 -1
- package/docs/functions/ByteArrayProperty.Serialize.html +1 -1
- package/docs/functions/ByteProperty.CalcOverhead.html +1 -1
- package/docs/functions/ByteProperty.Parse.html +1 -1
- package/docs/functions/ByteProperty.ReadValue.html +1 -1
- package/docs/functions/ByteProperty.Serialize.html +1 -1
- package/docs/functions/ByteProperty.SerializeValue.html +1 -1
- package/docs/functions/CircuitSpecialProperties.Parse.html +1 -1
- package/docs/functions/CircuitSpecialProperties.Serialize.html +1 -1
- package/docs/functions/ConveyorChainActorSpecialProperties.Parse.html +1 -1
- package/docs/functions/ConveyorChainActorSpecialProperties.Serialize.html +1 -1
- package/docs/functions/ConveyorSpecialProperties.Parse.html +1 -1
- package/docs/functions/ConveyorSpecialProperties.Serialize.html +1 -1
- package/docs/functions/DoubleArrayProperty.Parse.html +1 -1
- package/docs/functions/DoubleArrayProperty.Serialize.html +1 -1
- package/docs/functions/DoubleProperty.CalcOverhead.html +1 -1
- package/docs/functions/DoubleProperty.Parse.html +1 -1
- package/docs/functions/DoubleProperty.ReadValue.html +1 -1
- package/docs/functions/DoubleProperty.Serialize.html +1 -1
- package/docs/functions/DoubleProperty.SerializeValue.html +1 -1
- package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
- package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
- package/docs/functions/EmptySpecialProperties.Parse.html +1 -1
- package/docs/functions/EmptySpecialProperties.Serialize.html +1 -1
- package/docs/functions/EnumArrayProperty.Parse.html +1 -1
- package/docs/functions/EnumArrayProperty.Serialize.html +1 -1
- package/docs/functions/EnumProperty.CalcOverhead.html +1 -1
- package/docs/functions/EnumProperty.Parse.html +1 -1
- package/docs/functions/EnumProperty.ReadValue.html +1 -1
- package/docs/functions/EnumProperty.Serialize.html +1 -1
- package/docs/functions/EnumProperty.SerializeValue.html +1 -1
- package/docs/functions/FClientIdentityInfo.read.html +1 -1
- package/docs/functions/FClientIdentityInfo.write.html +1 -1
- package/docs/functions/FColor.read.html +1 -1
- package/docs/functions/FColor.write.html +1 -1
- package/docs/functions/FGDynamicStruct.Parse.html +1 -1
- package/docs/functions/FGDynamicStruct.Serialize.html +1 -1
- package/docs/functions/FICFrameRange.read.html +1 -1
- package/docs/functions/FICFrameRange.write.html +1 -1
- package/docs/functions/FINGPUT1BufferPixel.read.html +1 -1
- package/docs/functions/FINGPUT1BufferPixel.write.html +1 -1
- package/docs/functions/FINItemStateFileSystem.IsFINItemStateFileSystem.html +1 -1
- package/docs/functions/FINItemStateFileSystem.read.html +1 -1
- package/docs/functions/FINItemStateFileSystem.write.html +1 -1
- package/docs/functions/FINNetworkTrace.read.html +1 -1
- package/docs/functions/FINNetworkTrace.write.html +1 -1
- package/docs/functions/FLBBalancerIndexing.read.html +1 -1
- package/docs/functions/FLBBalancerIndexing.write.html +1 -1
- package/docs/functions/FLinearColor.read.html +1 -1
- package/docs/functions/FLinearColor.write.html +1 -1
- package/docs/functions/FloatArrayProperty.Parse.html +1 -1
- package/docs/functions/FloatArrayProperty.Serialize.html +1 -1
- package/docs/functions/FloatProperty.CalcOverhead.html +1 -1
- package/docs/functions/FloatProperty.Parse.html +1 -1
- package/docs/functions/FloatProperty.ReadValue.html +1 -1
- package/docs/functions/FloatProperty.Serialize.html +1 -1
- package/docs/functions/FloatProperty.SerializeValue.html +1 -1
- package/docs/functions/GUID.read.html +1 -1
- package/docs/functions/GUID.write.html +1 -1
- package/docs/functions/GUIDInfo.read.html +1 -1
- package/docs/functions/GUIDInfo.write.html +1 -1
- package/docs/functions/Int32ArrayProperty.Parse.html +1 -1
- package/docs/functions/Int32ArrayProperty.Serialize.html +1 -1
- package/docs/functions/Int32Property.CalcOverhead.html +1 -1
- package/docs/functions/Int32Property.Parse.html +1 -1
- package/docs/functions/Int32Property.ReadValue.html +1 -1
- package/docs/functions/Int32Property.Serialize.html +1 -1
- package/docs/functions/Int32Property.SerializeValue.html +1 -1
- package/docs/functions/Int32SetProperty.Parse.html +1 -1
- package/docs/functions/Int32SetProperty.Serialize.html +1 -1
- package/docs/functions/Int64ArrayProperty.Parse.html +1 -1
- package/docs/functions/Int64ArrayProperty.Serialize.html +1 -1
- package/docs/functions/Int64Property.CalcOverhead.html +1 -1
- package/docs/functions/Int64Property.Parse.html +1 -1
- package/docs/functions/Int64Property.ReadValue.html +1 -1
- package/docs/functions/Int64Property.Serialize.html +1 -1
- package/docs/functions/Int64Property.SerializeValue.html +1 -1
- package/docs/functions/Int8Property.CalcOverhead.html +1 -1
- package/docs/functions/Int8Property.Parse.html +1 -1
- package/docs/functions/Int8Property.ReadValue.html +1 -1
- package/docs/functions/Int8Property.Serialize.html +1 -1
- package/docs/functions/Int8Property.SerializeValue.html +1 -1
- package/docs/functions/Level.ReadAllObjectContents.html +1 -1
- package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
- package/docs/functions/Level.ReadLevel.html +1 -1
- package/docs/functions/Level.ReadNObjectContents.html +1 -1
- package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
- package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeLevel.html +1 -1
- package/docs/functions/LevelToDestroyedActorsMap.read.html +1 -1
- package/docs/functions/LevelToDestroyedActorsMap.write.html +1 -1
- package/docs/functions/MD5Hash.read.html +1 -1
- package/docs/functions/MD5Hash.write.html +1 -1
- package/docs/functions/MapProperty.CalcOverhead.html +1 -1
- package/docs/functions/MapProperty.Parse.html +1 -1
- package/docs/functions/MapProperty.Serialize.html +1 -1
- package/docs/functions/ObjectArrayProperty.Parse.html +1 -1
- package/docs/functions/ObjectArrayProperty.Serialize.html +1 -1
- package/docs/functions/ObjectProperty.CalcOverhead.html +1 -1
- package/docs/functions/ObjectProperty.Parse.html +1 -1
- package/docs/functions/ObjectProperty.ReadValue.html +1 -1
- package/docs/functions/ObjectProperty.Serialize.html +1 -1
- package/docs/functions/ObjectProperty.SerializeValue.html +1 -1
- package/docs/functions/ObjectReference.IsEqual.html +1 -1
- package/docs/functions/ObjectReference.read.html +1 -1
- package/docs/functions/ObjectReference.write.html +1 -1
- package/docs/functions/ObjectSetProperty.Parse.html +1 -1
- package/docs/functions/ObjectSetProperty.Serialize.html +1 -1
- package/docs/functions/ObjectsListSpecialProperties.Parse.html +1 -1
- package/docs/functions/ObjectsListSpecialProperties.Serialize.html +1 -1
- package/docs/functions/PlayerSpecialProperties.Parse.html +1 -1
- package/docs/functions/PlayerSpecialProperties.Serialize.html +1 -1
- package/docs/functions/PowerLineSpecialProperties.Parse.html +1 -1
- package/docs/functions/PowerLineSpecialProperties.Serialize.html +1 -1
- package/docs/functions/PropertiesList.ParseList.html +1 -1
- package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
- package/docs/functions/PropertiesList.SerializeList.html +1 -1
- package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
- package/docs/functions/SatisfactorySaveHeader.Parse.html +1 -1
- package/docs/functions/SatisfactorySaveHeader.Serialize.html +1 -1
- package/docs/functions/SaveBodyChunks.CompressDataIntoChunks.html +1 -1
- package/docs/functions/SaveBodyChunks.DecompressChunks.html +1 -1
- package/docs/functions/SaveBodyValidation.Parse.html +1 -1
- package/docs/functions/SaveBodyValidation.Serialize.html +1 -1
- package/docs/functions/SetProperty.CalcOverhead.html +1 -1
- package/docs/functions/SetProperty.Parse.html +1 -1
- package/docs/functions/SetProperty.Serialize.html +1 -1
- package/docs/functions/SoftObjectArrayProperty.Parse.html +1 -1
- package/docs/functions/SoftObjectArrayProperty.Serialize.html +1 -1
- package/docs/functions/SoftObjectProperty.CalcOverhead.html +1 -0
- package/docs/functions/SoftObjectProperty.Parse.html +1 -0
- package/docs/functions/SoftObjectProperty.ReadValue.html +1 -0
- package/docs/functions/SoftObjectProperty.Serialize.html +1 -0
- package/docs/functions/SoftObjectProperty.SerializeValue.html +1 -0
- package/docs/functions/SoftObjectReference.read.html +1 -1
- package/docs/functions/SoftObjectReference.write.html +1 -1
- package/docs/functions/SpecialDroneActionProperties.Parse.html +1 -1
- package/docs/functions/SpecialDroneActionProperties.Serialize.html +1 -1
- package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
- package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
- package/docs/functions/StrArrayProperty.Parse.html +1 -1
- package/docs/functions/StrArrayProperty.Serialize.html +1 -1
- package/docs/functions/StrProperty.CalcOverhead.html +1 -1
- package/docs/functions/StrProperty.Parse.html +1 -1
- package/docs/functions/StrProperty.ReadValue.html +1 -1
- package/docs/functions/StrProperty.Serialize.html +1 -1
- package/docs/functions/StrProperty.SerializeValue.html +1 -1
- package/docs/functions/StrSetProperty.Parse.html +1 -1
- package/docs/functions/StrSetProperty.Serialize.html +1 -1
- package/docs/functions/StructArrayProperty.Parse.html +1 -1
- package/docs/functions/StructArrayProperty.Serialize.html +1 -1
- package/docs/functions/StructProperty.CalcOverhead.html +1 -1
- package/docs/functions/StructProperty.Parse.html +1 -1
- package/docs/functions/StructProperty.ParseValue.html +1 -1
- package/docs/functions/StructProperty.Serialize.html +1 -1
- package/docs/functions/StructProperty.SerializeValue.html +1 -1
- package/docs/functions/StructSetProperty.Parse.html +1 -1
- package/docs/functions/StructSetProperty.Serialize.html +1 -1
- package/docs/functions/TextArrayProperty.Parse.html +1 -1
- package/docs/functions/TextArrayProperty.Serialize.html +1 -1
- package/docs/functions/TextProperty.CalcOverhead.html +1 -1
- package/docs/functions/TextProperty.Parse.html +1 -1
- package/docs/functions/TextProperty.ReadValue.html +1 -1
- package/docs/functions/TextProperty.Serialize.html +1 -1
- package/docs/functions/TextProperty.SerializeValue.html +1 -1
- package/docs/functions/Transform.Parse.html +1 -1
- package/docs/functions/Transform.ParseF.html +1 -1
- package/docs/functions/Transform.Serialize.html +1 -1
- package/docs/functions/Transform.SerializeF.html +1 -1
- package/docs/functions/Uint32Property.CalcOverhead.html +1 -1
- package/docs/functions/Uint32Property.Parse.html +1 -1
- package/docs/functions/Uint32Property.ReadValue.html +1 -1
- package/docs/functions/Uint32Property.Serialize.html +1 -1
- package/docs/functions/Uint32Property.SerializeValue.html +1 -1
- package/docs/functions/Uint32SetProperty.Parse.html +1 -1
- package/docs/functions/Uint32SetProperty.Serialize.html +1 -1
- package/docs/functions/Uint64Property.CalcOverhead.html +1 -1
- package/docs/functions/Uint64Property.Parse.html +1 -1
- package/docs/functions/Uint64Property.ReadValue.html +1 -1
- package/docs/functions/Uint64Property.Serialize.html +1 -1
- package/docs/functions/Uint64Property.SerializeValue.html +1 -1
- package/docs/functions/Uint8Property.CalcOverhead.html +1 -1
- package/docs/functions/Uint8Property.Parse.html +1 -1
- package/docs/functions/Uint8Property.ReadValue.html +1 -1
- package/docs/functions/Uint8Property.Serialize.html +1 -1
- package/docs/functions/Uint8Property.SerializeValue.html +1 -1
- package/docs/functions/VehiclePhysicsData.Parse.html +1 -1
- package/docs/functions/VehiclePhysicsData.Serialize.html +1 -1
- package/docs/functions/VehicleSpecialProperties.Parse.html +1 -1
- package/docs/functions/VehicleSpecialProperties.Serialize.html +1 -1
- package/docs/functions/col4.ParseBGRA.html +1 -1
- package/docs/functions/col4.ParseRGBA.html +1 -1
- package/docs/functions/col4.SerializeBGRA.html +1 -1
- package/docs/functions/col4.SerializeRGBA.html +1 -1
- package/docs/functions/isArrayProperty.html +1 -1
- package/docs/functions/isBoolArrayProperty.html +1 -1
- package/docs/functions/isBoolProperty.html +1 -1
- package/docs/functions/isBuildableSubsystemSpecialProperties.html +1 -1
- package/docs/functions/isByteArrayProperty.html +1 -1
- package/docs/functions/isByteProperty.html +1 -1
- package/docs/functions/isCircuitSpecialProperties.html +1 -1
- package/docs/functions/isConveyorChainActorSpecialProperties.html +1 -1
- package/docs/functions/isConveyorSpecialProperties.html +1 -1
- package/docs/functions/isDoubleArrayProperty.html +1 -1
- package/docs/functions/isDoubleProperty.html +1 -1
- package/docs/functions/isEmptySpecialProperties.html +1 -1
- package/docs/functions/isEnumArrayProperty.html +1 -1
- package/docs/functions/isEnumProperty.html +1 -1
- package/docs/functions/isFloatArrayProperty.html +1 -1
- package/docs/functions/isFloatProperty.html +1 -1
- package/docs/functions/isInt32ArrayProperty.html +1 -1
- package/docs/functions/isInt32Property.html +1 -1
- package/docs/functions/isInt32SetProperty.html +1 -1
- package/docs/functions/isInt64ArrayProperty.html +1 -1
- package/docs/functions/isInt64Property.html +1 -1
- package/docs/functions/isInt8Property.html +1 -1
- package/docs/functions/isMapProperty.html +1 -1
- package/docs/functions/isObjectArrayProperty.html +1 -1
- package/docs/functions/isObjectProperty.html +1 -1
- package/docs/functions/isObjectSetProperty.html +1 -1
- package/docs/functions/isObjectsListSpecialProperties.html +1 -1
- package/docs/functions/isPlayerSpecialProperties.html +1 -1
- package/docs/functions/isPowerLineSpecialProperties.html +1 -1
- package/docs/functions/isSaveComponent.html +1 -1
- package/docs/functions/isSaveEntity.html +1 -1
- package/docs/functions/isSetProperty.html +1 -1
- package/docs/functions/isSoftObjectArrayProperty.html +1 -1
- package/docs/functions/isSoftObjectProperty.html +1 -0
- package/docs/functions/isSpecialDroneActionProperties.html +1 -1
- package/docs/functions/isStrArrayProperty.html +1 -1
- package/docs/functions/isStrProperty.html +1 -1
- package/docs/functions/isStrSetProperty.html +1 -1
- package/docs/functions/isStructArrayProperty.html +1 -1
- package/docs/functions/isStructProperty.html +1 -1
- package/docs/functions/isStructSetProperty.html +1 -1
- package/docs/functions/isTextArrayProperty.html +1 -1
- package/docs/functions/isTextProperty.html +1 -1
- package/docs/functions/isUInt64Property.html +1 -1
- package/docs/functions/isUint32Property.html +1 -1
- package/docs/functions/isUint32SetProperty.html +1 -1
- package/docs/functions/isUint8Property.html +1 -1
- package/docs/functions/isVehicleSpecialProperties.html +1 -1
- package/docs/functions/vec2.Parse.html +1 -1
- package/docs/functions/vec2.ParseF.html +1 -1
- package/docs/functions/vec2.Serialize.html +1 -1
- package/docs/functions/vec2.SerializeF.html +1 -1
- package/docs/functions/vec3.Parse.html +1 -1
- package/docs/functions/vec3.ParseF.html +1 -1
- package/docs/functions/vec3.ParseInt.html +1 -1
- package/docs/functions/vec3.Serialize.html +1 -1
- package/docs/functions/vec3.SerializeF.html +1 -1
- package/docs/functions/vec3.SerializeInt.html +1 -1
- package/docs/functions/vec3.add.html +1 -1
- package/docs/functions/vec3.length.html +1 -1
- package/docs/functions/vec3.mult.html +1 -1
- package/docs/functions/vec3.norm.html +1 -1
- package/docs/functions/vec3.sub.html +1 -1
- package/docs/functions/vec4.Parse.html +1 -1
- package/docs/functions/vec4.ParseF.html +1 -1
- package/docs/functions/vec4.Serialize.html +1 -1
- package/docs/functions/vec4.SerializeF.html +1 -1
- package/docs/index.html +3 -2
- package/docs/interfaces/Blueprint.html +2 -2
- package/docs/interfaces/BlueprintConfig-1.html +2 -2
- package/docs/interfaces/SaveComponentHeader.html +2 -2
- package/docs/interfaces/SaveEntityHeader.html +2 -2
- package/docs/interfaces/SaveObjectHeader.html +2 -2
- package/docs/modules/AbstractBaseProperty.html +1 -1
- package/docs/modules/ArrayProperty.html +1 -1
- package/docs/modules/BlueprintConfig.html +1 -1
- package/docs/modules/BlueprintHeader.html +1 -1
- package/docs/modules/BoolArrayProperty.html +1 -1
- package/docs/modules/BoolProperty.html +1 -1
- package/docs/modules/BuildableSubsystemSpecialProperties.html +1 -1
- package/docs/modules/BuildableTypeInstance.html +1 -1
- package/docs/modules/ByteArrayProperty.html +1 -1
- package/docs/modules/ByteProperty.html +1 -1
- package/docs/modules/CircuitSpecialProperties.html +1 -1
- package/docs/modules/ConveyorChainActorSpecialProperties.html +1 -1
- package/docs/modules/ConveyorSpecialProperties.html +1 -1
- package/docs/modules/DoubleArrayProperty.html +1 -1
- package/docs/modules/DoubleProperty.html +1 -1
- package/docs/modules/DynamicStructPropertyValue.html +1 -1
- package/docs/modules/EmptySpecialProperties.html +1 -1
- package/docs/modules/EnumArrayProperty.html +1 -1
- package/docs/modules/EnumProperty.html +1 -1
- package/docs/modules/FClientIdentityInfo.html +1 -1
- package/docs/modules/FColor.html +1 -1
- package/docs/modules/FGDynamicStruct.html +1 -1
- package/docs/modules/FICFrameRange.html +1 -1
- package/docs/modules/FINGPUT1BufferPixel.html +1 -1
- package/docs/modules/FINItemStateFileSystem.html +1 -1
- package/docs/modules/FINNetworkTrace.html +1 -1
- package/docs/modules/FLBBalancerIndexing.html +1 -1
- package/docs/modules/FLinearColor.html +1 -1
- package/docs/modules/FloatArrayProperty.html +1 -1
- package/docs/modules/FloatProperty.html +1 -1
- package/docs/modules/GUID.html +1 -1
- package/docs/modules/GUIDInfo.html +1 -1
- package/docs/modules/Int32ArrayProperty.html +1 -1
- package/docs/modules/Int32Property.html +1 -1
- package/docs/modules/Int32SetProperty.html +1 -1
- package/docs/modules/Int64ArrayProperty.html +1 -1
- package/docs/modules/Int64Property.html +1 -1
- package/docs/modules/Int8Property.html +1 -1
- package/docs/modules/Level.html +1 -1
- package/docs/modules/LevelToDestroyedActorsMap.html +1 -1
- package/docs/modules/MD5Hash.html +1 -1
- package/docs/modules/MapProperty.html +1 -1
- package/docs/modules/ObjectArrayProperty.html +1 -1
- package/docs/modules/ObjectProperty.html +1 -1
- package/docs/modules/ObjectReference.html +1 -1
- package/docs/modules/ObjectSetProperty.html +1 -1
- package/docs/modules/ObjectsListSpecialProperties.html +1 -1
- package/docs/modules/PlayerSpecialProperties.html +1 -1
- package/docs/modules/PowerLineSpecialProperties.html +1 -1
- package/docs/modules/PropertiesList.html +1 -1
- package/docs/modules/SatisfactorySaveHeader.html +1 -1
- package/docs/modules/SaveBodyChunks.html +1 -1
- package/docs/modules/SaveBodyValidation.html +1 -1
- package/docs/modules/SetProperty.html +1 -1
- package/docs/modules/SoftObjectArrayProperty.html +1 -1
- package/docs/modules/SoftObjectProperty.html +6 -0
- package/docs/modules/SoftObjectReference.html +1 -1
- package/docs/modules/SpecialDroneActionProperties.html +1 -1
- package/docs/modules/SpecialProperties.html +1 -1
- package/docs/modules/StrArrayProperty.html +1 -1
- package/docs/modules/StrProperty.html +1 -1
- package/docs/modules/StrSetProperty.html +1 -1
- package/docs/modules/StructArrayProperty.html +1 -1
- package/docs/modules/StructProperty.html +1 -1
- package/docs/modules/StructSetProperty.html +1 -1
- package/docs/modules/TextArrayProperty.html +1 -1
- package/docs/modules/TextProperty.html +1 -1
- package/docs/modules/Transform.html +1 -1
- package/docs/modules/Uint32Property.html +1 -1
- package/docs/modules/Uint32SetProperty.html +1 -1
- package/docs/modules/Uint64Property.html +1 -1
- package/docs/modules/Uint8Property.html +1 -1
- package/docs/modules/VehiclePhysicsData.html +1 -1
- package/docs/modules/VehicleSpecialProperties.html +1 -1
- package/docs/modules/col4.html +1 -1
- package/docs/modules/vec2.html +1 -1
- package/docs/modules/vec3.html +1 -1
- package/docs/modules/vec4.html +1 -1
- package/docs/modules.html +3 -0
- package/docs/types/AbstractBaseProperty-1.html +1 -1
- package/docs/types/ArrayProperty.AvailableArrayPropertyTypes.html +1 -1
- package/docs/types/ArrayPropertyStructValueFields.html +1 -1
- package/docs/types/BasicMultipleStructPropertyValue.html +1 -1
- package/docs/types/BasicStructPropertyValue.html +1 -1
- package/docs/types/BlueprintHeader-1.html +1 -1
- package/docs/types/BlueprintReaderWriterContext.html +1 -1
- package/docs/types/BoolArrayProperty-1.html +1 -1
- package/docs/types/BoolProperty-1.html +1 -1
- package/docs/types/BoxStructPropertyValue.html +1 -1
- package/docs/types/BuildableSubsystemSpecialProperties-1.html +1 -1
- package/docs/types/BuildableTypeInstance-1.html +1 -1
- package/docs/types/ByteArrayProperty-1.html +1 -1
- package/docs/types/ByteProperty-1.html +1 -1
- package/docs/types/BytePropertyValue.html +1 -1
- package/docs/types/ChunkCompressionInfo.html +1 -1
- package/docs/types/ChunkSummary.html +1 -1
- package/docs/types/CircuitSpecialProperties-1.html +1 -1
- package/docs/types/ConveyorChainActorSpecialProperties-1.html +1 -1
- package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -1
- package/docs/types/ConveyorItemSpecialProperties.html +1 -1
- package/docs/types/ConveyorSpecialProperties-1.html +1 -1
- package/docs/types/DoubleArrayProperty-1.html +1 -1
- package/docs/types/DoubleProperty-1.html +1 -1
- package/docs/types/DynamicStructPropertyValue-1.html +1 -1
- package/docs/types/EmptySpecialProperties-1.html +1 -1
- package/docs/types/EnumArrayProperty-1.html +1 -1
- package/docs/types/EnumProperty-1.html +1 -1
- package/docs/types/FClientIdentityInfo-1.html +1 -1
- package/docs/types/FColor-1.html +1 -1
- package/docs/types/FGDynamicStruct-1.html +1 -1
- package/docs/types/FICFrameRange-1.html +1 -1
- package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
- package/docs/types/FINGPUT1BufferPixel-1.html +1 -1
- package/docs/types/FINItemStateFileSystem-1.html +1 -1
- package/docs/types/FINNetworkTrace-1.html +1 -1
- package/docs/types/FLBBalancerIndexing-1.html +1 -1
- package/docs/types/FLinearColor-1.html +1 -1
- package/docs/types/FloatArrayProperty-1.html +1 -1
- package/docs/types/FloatProperty-1.html +1 -1
- package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
- package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
- package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
- package/docs/types/GUID-1.html +1 -1
- package/docs/types/GUIDInfo-1.html +1 -1
- package/docs/types/Grids.html +1 -1
- package/docs/types/Int32ArrayProperty-1.html +1 -1
- package/docs/types/Int32Property-1.html +1 -1
- package/docs/types/Int32SetProperty-1.html +1 -1
- package/docs/types/Int64ArrayProperty-1.html +1 -1
- package/docs/types/Int64Property-1.html +1 -1
- package/docs/types/Int8Property-1.html +1 -1
- package/docs/types/InventoryItemStructPropertyValue.html +1 -1
- package/docs/types/Level-1.html +1 -1
- package/docs/types/LevelToDestroyedActorsMap-1.html +1 -1
- package/docs/types/Levels.html +1 -1
- package/docs/types/MAP_STRUCT_PROXY.html +1 -1
- package/docs/types/MD5Hash-1.html +1 -1
- package/docs/types/MapProperty-1.html +1 -1
- package/docs/types/ModData.html +1 -1
- package/docs/types/ObjectArrayProperty-1.html +1 -1
- package/docs/types/ObjectProperty-1.html +1 -1
- package/docs/types/ObjectReference-1.html +1 -1
- package/docs/types/ObjectSetProperty-1.html +1 -1
- package/docs/types/ObjectsListSpecialProperties-1.html +1 -1
- package/docs/types/PlayerSpecialProperties-1.html +1 -1
- package/docs/types/PowerLineSpecialProperties-1.html +1 -1
- package/docs/types/PropertiesMap.html +1 -1
- package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -1
- package/docs/types/ReaderWriterContext.html +1 -1
- package/docs/types/RoughSaveVersion.html +1 -1
- package/docs/types/SatisfactoryModMetadata.html +1 -1
- package/docs/types/SatisfactorySaveHeader-1.html +1 -1
- package/docs/types/SaveBodyChunks-1.html +1 -1
- package/docs/types/SaveBodyValidation-1.html +1 -1
- package/docs/types/SaveReaderWriterContext.html +1 -1
- package/docs/types/SetProperty.AvailableSetPropertyTypes.html +1 -1
- package/docs/types/SoftObjectArrayProperty-1.html +1 -1
- package/docs/types/SoftObjectProperty-1.html +1 -0
- package/docs/types/SoftObjectReference-1.html +1 -1
- package/docs/types/SpecialDroneAction.html +1 -1
- package/docs/types/SpecialDroneActionProperties-1.html +1 -1
- package/docs/types/SpecialProperties.AvailableSpecialPropertiesTypes.html +1 -1
- package/docs/types/StrArrayProperty-1.html +1 -1
- package/docs/types/StrProperty-1.html +1 -1
- package/docs/types/StrSetProperty-1.html +1 -1
- package/docs/types/StructArrayProperty-1.html +1 -1
- package/docs/types/StructProperty-1.html +1 -1
- package/docs/types/StructSetProperty-1.html +1 -1
- package/docs/types/TextArrayProperty-1.html +1 -1
- package/docs/types/TextProperty-1.html +1 -1
- package/docs/types/TextPropertyValue.html +1 -1
- package/docs/types/Transform-1.html +1 -1
- package/docs/types/Uint32Property-1.html +1 -1
- package/docs/types/Uint32SetProperty-1.html +1 -1
- package/docs/types/Uint64Property-1.html +1 -1
- package/docs/types/Uint8Property-1.html +1 -1
- package/docs/types/VehiclePhysicsData-1.html +1 -1
- package/docs/types/VehicleSpecialProperties-1.html +1 -1
- package/docs/types/col4-1.html +1 -1
- package/docs/types/vec2-1.html +1 -1
- package/docs/types/vec3-1.html +1 -1
- package/docs/types/vec4-1.html +1 -1
- package/docs/variables/DEFAULT_SATISFACTORY_CHUNK_HEADER_SIZE.html +1 -1
- package/docs/variables/EDIT.html +1 -1
- package/docs/variables/FINItemStateFileSystem.ExactStructReference.html +1 -1
- package/docs/variables/SaveBodyChunks.HEADER_V1.html +1 -1
- package/docs/variables/SaveBodyChunks.HEADER_V2.html +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -5
- package/tsconfig.test.json +13 -0
- package/build/parser/context/context.d.ts.map +0 -1
- package/build/parser/context/context.js.map +0 -1
- package/build/parser/file.types.d.ts +0 -14
- package/build/parser/file.types.d.ts.map +0 -1
- package/build/parser/file.types.js +0 -8
- package/build/parser/file.types.js.map +0 -1
- package/build/parser/satisfactory/save/level.class.d.ts +0 -29
- package/build/parser/satisfactory/save/level.class.d.ts.map +0 -1
- package/build/parser/satisfactory/save/level.class.js +0 -204
- package/build/parser/satisfactory/save/level.class.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts +0 -22
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js +0 -127
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.d.ts +0 -15
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.d.ts +0 -15
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.d.ts +0 -26
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js +0 -75
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.d.ts +0 -15
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts +0 -16
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/Int32Property.js +0 -33
- package/build/parser/satisfactory/types/property/generic/Int32Property.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +0 -25
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.d.ts +0 -15
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts +0 -15
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js +0 -75
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js +0 -42
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.d.ts +0 -14
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.js +0 -23
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +0 -59
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +0 -1
- package/build/parser/satisfactory/types/structs/GUID.d.ts +0 -8
- package/build/parser/satisfactory/types/structs/GUID.d.ts.map +0 -1
- package/build/parser/satisfactory/types/structs/GUID.js +0 -22
- package/build/parser/satisfactory/types/structs/GUID.js.map +0 -1
- package/build/parser/stream/reworked/save-stream-json-stringifier.d.ts +0 -6
- package/build/parser/stream/reworked/save-stream-json-stringifier.d.ts.map +0 -1
- package/build/parser/stream/reworked/save-stream-json-stringifier.js +0 -35
- package/build/parser/stream/reworked/save-stream-json-stringifier.js.map +0 -1
- package/build/parser/stream/reworked/save-stream-writer.class.d.ts +0 -28
- package/build/parser/stream/reworked/save-stream-writer.class.d.ts.map +0 -1
- package/build/parser/stream/reworked/save-stream-writer.class.js +0 -84
- package/build/parser/stream/reworked/save-stream-writer.class.js.map +0 -1
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,+DAA6C;AAC7C,2DAAyC;AACzC,kEAAgD;AAChD,kEAAgD;AAChD,mFAAiE;AACjE,2FAAyE;AACzE,mFAAiE;AACjE,2FAAyE;AACzE,kFAAgE;AAChE,yFAAuE;AACvE,mEAAiD;AACjD,2FAAyE;AACzE,+EAA6D;AAC7D,sFAAoE;AACpE,8EAA4D;AAC5D,iFAA+D;AAC/D,8EAA4D;AAC5D,wEAAsD;AACtD,oFAAkE;AAClE,iFAA+D;AAC/D,iFAA+D;AAC/D,oGAAkF;AAClF,2GAAyF;AACzF,+GAA6F;AAC7F,+GAA6F;AAC7F,iHAA+F;AAC/F,+GAA6F;AAC7F,gHAA8F;AAC9F,gHAA8F;AAC9F,gHAA8F;AAC9F,iHAA+F;AAC/F,qHAAmG;AACnG,8GAA4F;AAC5F,iHAA+F;AAC/F,+GAA6F;AAC7F,4FAA0E;AAC1E,4FAA0E;AAC1E,8FAA4E;AAC5E,4FAA0E;AAC1E,6FAA2E;AAC3E,6FAA2E;AAC3E,6FAA2E;AAC3E,4FAA0E;AAC1E,2FAAyE;AACzE,8FAA4E;AAC5E,4GAA0F;AAC1F,6GAA2F;AAC3F,uGAAqF;AACrF,0GAAwF;AACxF,6GAA2F;AAC3F,6GAA2F;AAC3F,2FAAyE;AACzE,8FAA4E;AAC5E,4FAA0E;AAC1E,8FAA4E;AAC5E,8FAA4E;AAC5E,6FAA2E;AAC3E,sFAAoE;AACpE,mHAAiG;AACjG,wGAAsF;AACtF,mHAAiG;AACjG,yGAAuF;AACvF,sGAAoF;AACpF,4GAA0F;AAC1F,uGAAqF;AACrF,0GAAwF;AACxF,uHAAqG;AACrG,4GAA0F;AAC1F,iGAA+E;AAC/E,wGAAsF;AACtF,iGAA+E;AAC/E,oFAAkE;AAClE,0FAAwE;AACxE,kFAAgE;AAChE,2EAAyD;AACzD,iGAA+E;AAC/E,sFAAoE;AACpE,+EAA6D;AAC7D,8EAA4D;AAC5D,mGAAiF;AACjF,8GAA4F;AAC5F,iHAA+F;AAC/F,0GAAwF;AACxF,oHAAkG;AAClG,sFAAoE;AACpE,yFAAuE;AACvE,0FAAwE;AACxE,gFAA8D;AAC9D,2EAAyD;AACzD,2EAAyD;AACzD,2EAAyD;AACzD,yFAAuE;AAGvE,qFAA0G;AAAjG,yHAAA,qBAAqB,OAAA;AAAE,mHAAA,eAAe,OAAA;AAC/C,yEAAuD;AACvD,sEAAoE;AAA3D,yGAAA,UAAU,OAAA;AACnB,sGAAkG;AAAzF,yIAAA,yBAAyB,OAAA;AAClC,8FAAqF;AAA5E,4HAAA,gBAAgB,OAAA;AAGzB,8DAA4C;AAG5C,0CAAyC;AAAhC,gGAAA,MAAM,OAAA;AACf,0FAAuF;AAA9E,8HAAA,oBAAoB,OAAA;AAG7B,4EAA0D","sourcesContent":["// types & classes for convenience\nexport * from './parser/byte/alignment.enum';\nexport * from './parser/context/context';\nexport * from './parser/context/context-reader';\nexport * from './parser/context/context-writer';\nexport * from './parser/satisfactory/blueprint/blueprint-config';\nexport * from './parser/satisfactory/blueprint/blueprint-config-version';\nexport * from './parser/satisfactory/blueprint/blueprint-header';\nexport * from './parser/satisfactory/blueprint/blueprint-header-version';\nexport * from './parser/satisfactory/blueprint/blueprint.types';\nexport * from './parser/satisfactory/save/factory-game-custom-version';\nexport * from './parser/satisfactory/save/level';\nexport * from './parser/satisfactory/save/level-to-destroyed-actors-map';\nexport * from './parser/satisfactory/save/satisfactory-save';\nexport * from './parser/satisfactory/save/satisfactory-save-header';\nexport * from './parser/satisfactory/save/save-body-chunks';\nexport * from './parser/satisfactory/save/save-custom-version';\nexport * from './parser/satisfactory/save/save-header-type';\nexport * from './parser/satisfactory/save/save.types';\nexport * from './parser/satisfactory/types/objects/SaveComponent';\nexport * from './parser/satisfactory/types/objects/SaveEntity';\nexport * from './parser/satisfactory/types/objects/SaveObject';\nexport * from './parser/satisfactory/types/property/generic/AbstractBaseProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty';\nexport * from './parser/satisfactory/types/property/generic/BoolProperty';\nexport * from './parser/satisfactory/types/property/generic/ByteProperty';\nexport * from './parser/satisfactory/types/property/generic/DoubleProperty';\nexport * from './parser/satisfactory/types/property/generic/EnumProperty';\nexport * from './parser/satisfactory/types/property/generic/FloatProperty';\nexport * from './parser/satisfactory/types/property/generic/Int32Property';\nexport * from './parser/satisfactory/types/property/generic/Int64Property';\nexport * from './parser/satisfactory/types/property/generic/Int8Property';\nexport * from './parser/satisfactory/types/property/generic/MapProperty';\nexport * from './parser/satisfactory/types/property/generic/ObjectProperty';\nexport * from './parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty';\nexport * from './parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty';\nexport * from './parser/satisfactory/types/property/generic/SetProperty/SetProperty';\nexport * from './parser/satisfactory/types/property/generic/SetProperty/StrSetProperty';\nexport * from './parser/satisfactory/types/property/generic/SetProperty/StructSetProperty';\nexport * from './parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty';\nexport * from './parser/satisfactory/types/property/generic/StrProperty';\nexport * from './parser/satisfactory/types/property/generic/StructProperty';\nexport * from './parser/satisfactory/types/property/generic/TextProperty';\nexport * from './parser/satisfactory/types/property/generic/Uint32Property';\nexport * from './parser/satisfactory/types/property/generic/Uint64Property';\nexport * from './parser/satisfactory/types/property/generic/Uint8Property';\nexport * from './parser/satisfactory/types/property/PropertiesList';\nexport * from './parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/CircuitSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/ConveyorSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/EmptySpecialProperties';\nexport * from './parser/satisfactory/types/property/special/ObjectsListSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/PlayerSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/PowerLineSpecialProperties';\nexport * from './parser/satisfactory/types/property/special/runtime-buildable-instance-data-version';\nexport * from './parser/satisfactory/types/property/special/SpecialDroneActionProperties';\nexport * from './parser/satisfactory/types/property/special/SpecialProperties';\nexport * from './parser/satisfactory/types/property/special/VehicleSpecialProperties';\nexport * from './parser/satisfactory/types/structs/binary/FClientIdentityInfo';\nexport * from './parser/satisfactory/types/structs/binary/FColor';\nexport * from './parser/satisfactory/types/structs/binary/FLinearColor';\nexport * from './parser/satisfactory/types/structs/binary/GUID';\nexport * from './parser/satisfactory/types/structs/col4';\nexport * from './parser/satisfactory/types/structs/DynamicStructPropertyValue';\nexport * from './parser/satisfactory/types/structs/FGDynamicStruct';\nexport * from './parser/satisfactory/types/structs/GUIDInfo';\nexport * from './parser/satisfactory/types/structs/MD5Hash';\nexport * from './parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange';\nexport * from './parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel';\nexport * from './parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem';\nexport * from './parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace';\nexport * from './parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing';\nexport * from './parser/satisfactory/types/structs/ObjectReference';\nexport * from './parser/satisfactory/types/structs/SaveBodyValidation';\nexport * from './parser/satisfactory/types/structs/SoftObjectReference';\nexport * from './parser/satisfactory/types/structs/Transform';\nexport * from './parser/satisfactory/types/structs/vec2';\nexport * from './parser/satisfactory/types/structs/vec3';\nexport * from './parser/satisfactory/types/structs/vec4';\nexport * from './parser/satisfactory/types/structs/VehiclePhysicsData';\n\n// should better be removed in a future update to prevent shenanigans.\nexport { BlueprintConfigReader, BlueprintReader } from './parser/satisfactory/blueprint/blueprint-reader';\nexport * from './parser/satisfactory/save/save-reader';\nexport { SaveWriter } from './parser/satisfactory/save/save-writer';\nexport { SaveStreamJsonStringifier } from './parser/stream/reworked/save-stream-json-stringifier';\nexport { SaveStreamWriter } from './parser/stream/reworked/save-stream-writer.class';\n\n// errors\nexport * from './parser/error/parser.error';\n\n// facade\nexport { Parser } from './parser/parser';\nexport { ReadableStreamParser } from './parser/stream/reworked/readable-stream-parser';\n\n// edit\nexport * from './parser/satisfactory/edit/edit-constants';\n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oFAAkE;AAClE,4FAA0E;AAC1E,qGAAmF;AACnF,4FAA0E;AAC1E,0FAAwE;AACxE,mGAAiF;AACjF,iGAA+E;AAC/E,+FAA6E;AAC7E,0FAAwE;AACxE,8FAA4E;AAC5E,oGAAkF;AAClF,8FAA4E;AAC5E,kFAAgE;AAChE,gGAA8E;AAC9E,2EAAyD;AACzD,iGAA+E;AAC/E,sFAAoE;AACpE,+EAA6D;AAC7D,8EAA4D;AAC5D,mGAAiF;AACjF,8GAA4F;AAC5F,iHAA+F;AAC/F,wHAAsG;AACtG,0GAAwF;AACxF,oHAAkG;AAClG,sFAAoE;AACpE,yFAAuE;AACvE,0FAAwE;AACxE,gFAA8D;AAC9D,2EAAyD;AACzD,2EAAyD;AACzD,2EAAyD;AACzD,yFAAuE;AACvE,kFAAgE;AAChE,0EAAwD;AACxD,uFAAqE","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./parser/byte/alignment.enum\";\nexport * from \"./parser/byte/binary-operable.interface\";\nexport * from \"./parser/byte/binary-readable.interface\";\nexport * from \"./parser/byte/binary-writable.interface\";\nexport * from \"./parser/byte/byte-reader.class\";\nexport * from \"./parser/byte/byte-writer.class\";\nexport * from \"./parser/context/context-reader\";\nexport * from \"./parser/context/context-writer\";\nexport * from \"./parser/context/hierarchical-version-context\";\nexport * from \"./parser/context/reader-writer-context\";\nexport * from \"./parser/error/parser.error\";\nexport * from \"./parser/parser\";\nexport * from \"./parser/satisfactory/blueprint/blueprint-config\";\nexport * from \"./parser/satisfactory/blueprint/blueprint-config-version\";\nexport * from \"./parser/satisfactory/blueprint/blueprint-header\";\nexport * from \"./parser/satisfactory/blueprint/blueprint-header-version\";\nexport * from \"./parser/satisfactory/blueprint/blueprint-reader\";\nexport * from \"./parser/satisfactory/blueprint/blueprint-writer\";\nexport * from \"./parser/satisfactory/blueprint/blueprint.types\";\nexport * from \"./parser/satisfactory/edit/edit-constants\";\nexport * from \"./parser/satisfactory/save/data-blob\";\nexport * from \"./parser/satisfactory/save/factory-game-custom-version\";\nexport * from \"./parser/satisfactory/save/level\";\nexport * from \"./parser/satisfactory/save/level-to-destroyed-actors-map\";\nexport * from \"./parser/satisfactory/save/object-references-list\";\nexport * from \"./parser/satisfactory/save/satisfactory-save\";\nexport * from \"./parser/satisfactory/save/satisfactory-save-header\";\nexport * from \"./parser/satisfactory/save/save-body-chunks\";\nexport * from \"./parser/satisfactory/save/save-custom-version\";\nexport * from \"./parser/satisfactory/save/save-header-type\";\nexport * from \"./parser/satisfactory/save/save-reader\";\nexport * from \"./parser/satisfactory/save/save-writer\";\nexport * from \"./parser/satisfactory/save/save.types\";\nexport * from \"./parser/satisfactory/save/toc-blob\";\nexport * from \"./parser/satisfactory/types/objects/SaveComponent\";\nexport * from \"./parser/satisfactory/types/objects/SaveEntity\";\nexport * from \"./parser/satisfactory/types/objects/SaveObject\";\nexport * from \"./parser/satisfactory/types/property/generic/AbstractBaseProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/BoolProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/ByteProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/containers/ArrayProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/containers/ArrayPropertySpecificTypes\";\nexport * from \"./parser/satisfactory/types/property/generic/containers/MapProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/containers/SetProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/containers/SetPropertySpecificTypes\";\nexport * from \"./parser/satisfactory/types/property/generic/containers/StructProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/DoubleProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/EnumProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/FloatProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/Int64Property\";\nexport * from \"./parser/satisfactory/types/property/generic/Int8Property\";\nexport * from \"./parser/satisfactory/types/property/generic/InterfaceProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/IntProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/NameProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/ObjectProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/SingleProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/SoftObjectProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/StrProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/TextProperty\";\nexport * from \"./parser/satisfactory/types/property/generic/Uint32Property\";\nexport * from \"./parser/satisfactory/types/property/generic/Uint64Property\";\nexport * from \"./parser/satisfactory/types/property/generic/Uint8Property\";\nexport * from \"./parser/satisfactory/types/property/PropertiesList\";\nexport * from \"./parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/CircuitSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/ConveyorSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/EmptySpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/ObjectsListSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/PlayerSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/PowerLineSpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/runtime-buildable-instance-data-version\";\nexport * from \"./parser/satisfactory/types/property/special/SpecialDroneActionProperties\";\nexport * from \"./parser/satisfactory/types/property/special/SpecialProperties\";\nexport * from \"./parser/satisfactory/types/property/special/VehicleSpecialProperties\";\nexport * from \"./parser/satisfactory/types/structs/binary/FClientIdentityInfo\";\nexport * from \"./parser/satisfactory/types/structs/binary/FColor\";\nexport * from \"./parser/satisfactory/types/structs/binary/FCustomVersion\";\nexport * from \"./parser/satisfactory/types/structs/binary/FCustomVersionContainer\";\nexport * from \"./parser/satisfactory/types/structs/binary/FEngineVersion\";\nexport * from \"./parser/satisfactory/types/structs/binary/FLinearColor\";\nexport * from \"./parser/satisfactory/types/structs/binary/FLocalUserNetIdBundle\";\nexport * from \"./parser/satisfactory/types/structs/binary/FPackageFileVersion\";\nexport * from \"./parser/satisfactory/types/structs/binary/FPlayerInfoHandle\";\nexport * from \"./parser/satisfactory/types/structs/binary/FPropertyTag\";\nexport * from \"./parser/satisfactory/types/structs/binary/FPropertyTagNode\";\nexport * from \"./parser/satisfactory/types/structs/binary/FSaveObjectVersionData\";\nexport * from \"./parser/satisfactory/types/structs/binary/FUniqueNetIdRepl\";\nexport * from \"./parser/satisfactory/types/structs/binary/GUID\";\nexport * from \"./parser/satisfactory/types/structs/binary/LBBalancerIndexing\";\nexport * from \"./parser/satisfactory/types/structs/col4\";\nexport * from \"./parser/satisfactory/types/structs/DynamicStructPropertyValue\";\nexport * from \"./parser/satisfactory/types/structs/FGDynamicStruct\";\nexport * from \"./parser/satisfactory/types/structs/GUIDInfo\";\nexport * from \"./parser/satisfactory/types/structs/MD5Hash\";\nexport * from \"./parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange\";\nexport * from \"./parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel\";\nexport * from \"./parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem\";\nexport * from \"./parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState\";\nexport * from \"./parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace\";\nexport * from \"./parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing\";\nexport * from \"./parser/satisfactory/types/structs/ObjectReference\";\nexport * from \"./parser/satisfactory/types/structs/SaveBodyValidation\";\nexport * from \"./parser/satisfactory/types/structs/SoftObjectReference\";\nexport * from \"./parser/satisfactory/types/structs/Transform\";\nexport * from \"./parser/satisfactory/types/structs/vec2\";\nexport * from \"./parser/satisfactory/types/structs/vec3\";\nexport * from \"./parser/satisfactory/types/structs/vec4\";\nexport * from \"./parser/satisfactory/types/structs/VehiclePhysicsData\";\nexport * from \"./parser/stream/reworked/readable-stream-parser\";\nexport * from \"./parser/unreal-engine/ETextHistoryType\";\nexport * from \"./parser/unreal-engine/EUnrealEngineObjectUE5Version\";\n\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BinaryOperable } from "./binary-operable.interface";
|
|
2
2
|
export interface BinaryReadable extends BinaryOperable {
|
|
3
3
|
skipBytes: (count?: number) => void;
|
|
4
|
+
jumpTo(position: number): void;
|
|
4
5
|
readBytes: (count: number) => Uint8Array;
|
|
5
6
|
readByte: () => number;
|
|
6
7
|
readHex: (count: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-readable.interface.d.ts","sourceRoot":"","sources":["../../../src/parser/byte/binary-readable.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,MAAM,WAAW,cAAe,SAAQ,cAAc;IAElD,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC;IACzC,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,MAAM,CAAC;IAEzB,iBAAiB,EAAE,MAAM,MAAM,CAAC;CACnC"}
|
|
1
|
+
{"version":3,"file":"binary-readable.interface.d.ts","sourceRoot":"","sources":["../../../src/parser/byte/binary-readable.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,MAAM,WAAW,cAAe,SAAQ,cAAc;IAElD,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC;IACzC,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,MAAM,CAAC;IAEzB,iBAAiB,EAAE,MAAM,MAAM,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-readable.interface.js","sourceRoot":"","sources":["../../../src/parser/byte/binary-readable.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { BinaryOperable } from \"./binary-operable.interface\";\n\n/**\n * Describes the ability to read bytes in different forms.\n */\nexport interface BinaryReadable extends BinaryOperable {\n\n skipBytes: (count?: number) => void;\n readBytes: (count: number) => Uint8Array;\n readByte: () => number;\n readHex: (count: number) => string;\n readInt8: () => number;\n readUint8: () => number;\n readInt16: () => number;\n readUint16: () => number;\n readInt32: () => number;\n readUint32: () => number;\n readInt64: () => bigint;\n readUint64: () => bigint;\n readFloat32: () => number;\n readDouble: () => number;\n readString: () => string;\n\n getBufferProgress: () => number;\n}"]}
|
|
1
|
+
{"version":3,"file":"binary-readable.interface.js","sourceRoot":"","sources":["../../../src/parser/byte/binary-readable.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { BinaryOperable } from \"./binary-operable.interface\";\n\n/**\n * Describes the ability to read bytes in different forms.\n */\nexport interface BinaryReadable extends BinaryOperable {\n\n skipBytes: (count?: number) => void;\n jumpTo(position: number): void;\n readBytes: (count: number) => Uint8Array;\n readByte: () => number;\n readHex: (count: number) => string;\n readInt8: () => number;\n readUint8: () => number;\n readInt16: () => number;\n readUint16: () => number;\n readInt32: () => number;\n readUint32: () => number;\n readInt64: () => bigint;\n readUint64: () => bigint;\n readFloat32: () => number;\n readDouble: () => number;\n readString: () => string;\n\n getBufferProgress: () => number;\n}"]}
|
|
@@ -11,6 +11,7 @@ export declare abstract class ByteReader implements BinaryReadable {
|
|
|
11
11
|
constructor(fileBuffer: ArrayBufferLike, alignment: Alignment);
|
|
12
12
|
reset(newFileBuffer: ArrayBufferLike): void;
|
|
13
13
|
skipBytes(byteLength?: number): void;
|
|
14
|
+
jumpTo(pos: number): void;
|
|
14
15
|
readByte(): number;
|
|
15
16
|
readBytes(count: number): Uint8Array;
|
|
16
17
|
bytesToHexRepresentation(bytes: number[]): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byte-reader.class.d.ts","sourceRoot":"","sources":["../../../src/parser/byte/byte-reader.class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,8BAAsB,UAAW,YAAW,cAAc;IAEzD,SAAS,CAAC,UAAU,EAAG,QAAQ,CAAC;IAChC,SAAS,CAAC,UAAU,EAAG,e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O,MAAM,CAAsC;IAElE,SAAS,QAAO,eAAe,CAA2B;CACjE"}
|
|
@@ -27,6 +27,10 @@ class ByteReader {
|
|
|
27
27
|
this.currentByte += byteLength;
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
+
jumpTo(pos) {
|
|
31
|
+
const count = pos - this.getBufferPosition();
|
|
32
|
+
this.skipBytes(count);
|
|
33
|
+
}
|
|
30
34
|
readByte() {
|
|
31
35
|
return this.readUint8();
|
|
32
36
|
}
|
|
@@ -103,12 +107,12 @@ class ByteReader {
|
|
|
103
107
|
throw new Error(errorMessage);
|
|
104
108
|
}
|
|
105
109
|
if (strLength < 0) {
|
|
106
|
-
const string = new Array(-strLength - 1).fill('').map(c => String.
|
|
110
|
+
const string = new Array(-strLength - 1).fill('').map(c => String.fromCodePoint(this.readUint16()));
|
|
107
111
|
this.currentByte += 2;
|
|
108
112
|
return string.join('');
|
|
109
113
|
}
|
|
110
114
|
try {
|
|
111
|
-
const string = new Array(strLength - 1).fill('').map(c => String.
|
|
115
|
+
const string = new Array(strLength - 1).fill('').map(c => String.fromCodePoint(this.readUint8()));
|
|
112
116
|
this.currentByte += 1;
|
|
113
117
|
return string.join('');
|
|
114
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byte-reader.class.js","sourceRoot":"","sources":["../../../src/parser/byte/byte-reader.class.ts"],"names":[],"mappings":";;;AAAA,wDAAyD;AACzD,qDAA6C;AAI7C,MAAsB,UAAU;IAW/B,YAAY,UAA2B,EAAE,SAAoB;QAJnD,gBAAW,GAAW,CAAC,CAAC;QACxB,gBAAW,GAAW,CAAC,CAAC;QACxB,YAAO,GAAW,CAAC,CAAC;QA+HvB,sBAAiB,GAAG,GAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;QAEnD,mBAAc,GAAG,CAAC,KAAa,EAAE,GAAuB,EAAmB,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EA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AE,CAAC;YACd,MAAM,IAAI,+BAAgB,CAAC,qCAAqC,SAAS,gBAAgB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QAC/G,CAAC;IACF,CAAC;CAWD;AAjJD,gCAiJC","sourcesContent":["import { CorruptSaveError } from '../error/parser.error';\nimport { Alignment } from \"./alignment.enum\";\nimport { BinaryReadable } from \"./binary-readable.interface\";\n\n/** @public */\nexport abstract class ByteReader implements BinaryReadable {\n\n\tprotected bufferView!: DataView;\n\tprotected fileBuffer!: ArrayBufferLike;\n\tpublic alignment: Alignment;\n\tpublic context: any;\n\n\tprotected currentByte: number = 0;\n\tprotected handledByte: number = 0;\n\tprotected maxByte: number = 0;\n\n\tconstructor(fileBuffer: ArrayBufferLike, alignment: Alignment) {\n\t\tthis.alignment = alignment;\n\t\tthis.reset(fileBuffer);\n\t}\n\n\t/**\n\t * Resets the reader on the given arraybuffer to start from the beginning.\n\t * @param newFileBuffer the new array buffer to be read.\n\t */\n\tpublic reset(newFileBuffer: ArrayBufferLike) {\n\t\tthis.fileBuffer = newFileBuffer;\n\t\tthis.bufferView = new DataView(this.fileBuffer, 0, this.fileBuffer.byteLength);\n\t\tthis.maxByte = newFileBuffer.byteLength;\n\t\tthis.currentByte = 0;\n\t\tthis.handledByte = 0;\n\t}\n\n\t/*\n\t * Byte Manipulation\n\t */\n\tpublic skipBytes(byteLength = 1): void {\n\t\tthis.currentByte += byteLength;\n\t\treturn;\n\t}\n\tpublic readByte(): number {\n\t\treturn this.readUint8();\n\t}\n\tpublic readBytes(count: number): Uint8Array {\n\t\treturn new Uint8Array(new Array(count).fill(0).map(pl => this.readByte()));\n\t}\n\tpublic bytesToHexRepresentation(bytes: number[]): string[] {\n\t\treturn bytes.map(byte => ('0' + byte.toString(16)).slice(-2));\n\t}\n\tpublic readHex(byteLength: number, hexSeparator: string = ' '): string {\n\t\treturn this.bytesToHexRepresentation(Array.from(this.readBytes(byteLength))).join(hexSeparator);\n\t}\n\tpublic readInt8(): number {\n\t\tlet data = this.bufferView.getInt8(this.currentByte++);\n\t\treturn data;\n\t}\n\tpublic readUint8(): number {\n\t\tlet data = this.bufferView.getUint8(this.currentByte++);\n\t\treturn data;\n\t}\n\tpublic readInt16(): number {\n\t\tlet data = this.bufferView.getInt16(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t\treturn data;\n\t}\n\tpublic readUint16(): number {\n\t\tlet data = this.bufferView.getUint16(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t\treturn data;\n\t}\n\tpublic readInt32(): number {\n\t\tlet data = this.bufferView.getInt32(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t\treturn data;\n\t}\n\t/**\n\t * Reads an int32 and we dismiss it, because its always 0.\n\t */\n\tpublic readInt32Zero(): void {\n\t\tthis.readInt32();\n\t}\n\tpublic readUint32(): number {\n\t\tlet data = this.bufferView.getUint32(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t\treturn data;\n\t}\n\tpublic readLong(): bigint {\n\t\tlet data = this.bufferView.getBigInt64(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t\treturn data;\n\t}\n\tpublic readInt64(): bigint {\n\t\treturn this.readLong();\n\t}\n\tpublic readUint64(): bigint {\n\t\tlet data = this.bufferView.getBigUint64(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t\treturn data;\n\t}\n\n\tpublic readFloat32(): number {\n\t\tlet data = this.bufferView.getFloat32(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t\treturn data;\n\t}\n\tpublic readDouble(): number {\n\t\tlet data = this.bufferView.getFloat64(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t\treturn data;\n\t}\n\tpublic readString(): string {\n\t\tlet strLength = this.readInt32();\n\n\t\tif (strLength === 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// Range error!\n\t\tif (strLength > (this.bufferView.buffer.byteLength - this.currentByte)) {\n\t\t\tlet errorMessage = `Cannot read string of length ${strLength} at position ${this.currentByte} as it exceeds the end at ${this.bufferView.buffer.byteLength}`;\n\t\t\tthrow new Error(errorMessage);\n\t\t}\n\n\t\t// it uses UTF16 if text is non-ascii, even if it would fit into UTF8.\n\t\tif (strLength < 0) {\n\t\t\tconst string = new Array(-strLength - 1).fill('').map(c => String.fromCharCode(this.readUint16()));\n\t\t\tthis.currentByte += 2;\n\t\t\treturn string.join('');\n\t\t}\n\n\t\t//default UTF-8\n\t\ttry {\n\t\t\tconst string = new Array(strLength - 1).fill('').map(c => String.fromCharCode(this.readUint8()));\n\t\t\tthis.currentByte += 1;\n\t\t\treturn string.join('');\n\t\t}\n\t\tcatch (error) {\n\t\t\tthrow new CorruptSaveError(`Cannot read UTF8 string of length ${strLength} at position ${this.currentByte}.`);\n\t\t}\n\t}\n\n\tpublic getBufferPosition = (): number => this.currentByte;\n\n\tpublic getBufferSlice = (begin: number, end: number | undefined): ArrayBufferLike => this.bufferView.buffer.slice(begin, end);\n\n\tpublic getBufferProgress = (): number => this.currentByte / this.bufferView.buffer.byteLength;\n\n\tpublic getBufferLength = (): number => this.bufferView.buffer.byteLength;\n\n\tpublic getBuffer = (): ArrayBufferLike => this.bufferView.buffer;\n}"]}
|
|
1
|
+
{"version":3,"file":"byte-reader.class.js","sourceRoot":"","sources":["../../../src/parser/byte/byte-reader.class.ts"],"names":[],"mappings":";;;AAAA,wDAAyD;AACzD,qDAA6C;AAI7C,MAAsB,UAAU;IAW/B,YAAY,UAA2B,EAAE,SAAoB;QAJnD,gBAAW,GAAW,CAAC,CAAC;QACxB,gBAAW,GAAW,CAAC,CAAC;QACxB,YAAO,GAAW,CAAC,CAAC;QAmIvB,sBAAiB,GAAG,GAAW,EAAE,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AI,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAClG,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC;YACtB,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,KAAK,EAAE,CAAC;YACd,MAAM,IAAI,+BAAgB,CAAC,qCAAqC,SAAS,gBAAgB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QAC/G,CAAC;IACF,CAAC;CAWD;AArJD,gCAqJC","sourcesContent":["import { CorruptSaveError } from '../error/parser.error';\nimport { Alignment } from \"./alignment.enum\";\nimport { BinaryReadable } from \"./binary-readable.interface\";\n\n/** @public */\nexport abstract class ByteReader implements BinaryReadable {\n\n\tprotected bufferView!: DataView;\n\tprotected fileBuffer!: ArrayBufferLike;\n\tpublic alignment: Alignment;\n\tpublic context: any;\n\n\tprotected currentByte: number = 0;\n\tprotected handledByte: number = 0;\n\tprotected maxByte: number = 0;\n\n\tconstructor(fileBuffer: ArrayBufferLike, alignment: Alignment) {\n\t\tthis.alignment = alignment;\n\t\tthis.reset(fileBuffer);\n\t}\n\n\t/**\n\t * Resets the reader on the given arraybuffer to start from the beginning.\n\t * @param newFileBuffer the new array buffer to be read.\n\t */\n\tpublic reset(newFileBuffer: ArrayBufferLike) {\n\t\tthis.fileBuffer = newFileBuffer;\n\t\tthis.bufferView = new DataView(this.fileBuffer, 0, this.fileBuffer.byteLength);\n\t\tthis.maxByte = newFileBuffer.byteLength;\n\t\tthis.currentByte = 0;\n\t\tthis.handledByte = 0;\n\t}\n\n\t/*\n\t * Byte Manipulation\n\t */\n\tpublic skipBytes(byteLength = 1): void {\n\t\tthis.currentByte += byteLength;\n\t\treturn;\n\t}\n\tpublic jumpTo(pos: number): void {\n\t\tconst count = pos - this.getBufferPosition();\n\t\tthis.skipBytes(count);\n\t}\n\tpublic readByte(): number {\n\t\treturn this.readUint8();\n\t}\n\tpublic readBytes(count: number): Uint8Array {\n\t\treturn new Uint8Array(new Array(count).fill(0).map(pl => this.readByte()));\n\t}\n\tpublic bytesToHexRepresentation(bytes: number[]): string[] {\n\t\treturn bytes.map(byte => ('0' + byte.toString(16)).slice(-2));\n\t}\n\tpublic readHex(byteLength: number, hexSeparator: string = ' '): string {\n\t\treturn this.bytesToHexRepresentation(Array.from(this.readBytes(byteLength))).join(hexSeparator);\n\t}\n\tpublic readInt8(): number {\n\t\tlet data = this.bufferView.getInt8(this.currentByte++);\n\t\treturn data;\n\t}\n\tpublic readUint8(): number {\n\t\tlet data = this.bufferView.getUint8(this.currentByte++);\n\t\treturn data;\n\t}\n\tpublic readInt16(): number {\n\t\tlet data = this.bufferView.getInt16(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t\treturn data;\n\t}\n\tpublic readUint16(): number {\n\t\tlet data = this.bufferView.getUint16(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t\treturn data;\n\t}\n\tpublic readInt32(): number {\n\t\tlet data = this.bufferView.getInt32(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t\treturn data;\n\t}\n\t/**\n\t * Reads an int32 and we dismiss it, because its always 0.\n\t */\n\tpublic readInt32Zero(): void {\n\t\tthis.readInt32();\n\t}\n\tpublic readUint32(): number {\n\t\tlet data = this.bufferView.getUint32(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t\treturn data;\n\t}\n\tpublic readLong(): bigint {\n\t\tlet data = this.bufferView.getBigInt64(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t\treturn data;\n\t}\n\tpublic readInt64(): bigint {\n\t\treturn this.readLong();\n\t}\n\tpublic readUint64(): bigint {\n\t\tlet data = this.bufferView.getBigUint64(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t\treturn data;\n\t}\n\n\tpublic readFloat32(): number {\n\t\tlet data = this.bufferView.getFloat32(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t\treturn data;\n\t}\n\tpublic readDouble(): number {\n\t\tlet data = this.bufferView.getFloat64(this.currentByte, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t\treturn data;\n\t}\n\tpublic readString(): string {\n\t\tlet strLength = this.readInt32();\n\n\t\tif (strLength === 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// Range error!\n\t\tif (strLength > (this.bufferView.buffer.byteLength - this.currentByte)) {\n\t\t\tlet errorMessage = `Cannot read string of length ${strLength} at position ${this.currentByte} as it exceeds the end at ${this.bufferView.buffer.byteLength}`;\n\t\t\tthrow new Error(errorMessage);\n\t\t}\n\n\t\t// it uses UTF16 if text is non-ascii, even if it would fit into UTF8.\n\t\tif (strLength < 0) {\n\t\t\tconst string = new Array(-strLength - 1).fill('').map(c => String.fromCodePoint(this.readUint16()));\n\t\t\tthis.currentByte += 2;\n\t\t\treturn string.join('');\n\t\t}\n\n\t\t//default UTF-8\n\t\ttry {\n\t\t\tconst string = new Array(strLength - 1).fill('').map(c => String.fromCodePoint(this.readUint8()));\n\t\t\tthis.currentByte += 1;\n\t\t\treturn string.join('');\n\t\t}\n\t\tcatch (error) {\n\t\t\tthrow new CorruptSaveError(`Cannot read UTF8 string of length ${strLength} at position ${this.currentByte}.`);\n\t\t}\n\t}\n\n\tpublic getBufferPosition = (): number => this.currentByte;\n\n\tpublic getBufferSlice = (begin: number, end: number | undefined): ArrayBufferLike => this.bufferView.buffer.slice(begin, end);\n\n\tpublic getBufferProgress = (): number => this.currentByte / this.bufferView.buffer.byteLength;\n\n\tpublic getBufferLength = (): number => this.bufferView.buffer.byteLength;\n\n\tpublic getBuffer = (): ArrayBufferLike => this.bufferView.buffer;\n}"]}
|
|
@@ -31,6 +31,7 @@ export declare abstract class ByteWriter implements BinaryWritable {
|
|
|
31
31
|
getBufferLength: () => number;
|
|
32
32
|
getBufferProgress: () => number;
|
|
33
33
|
writeBinarySizeFromPosition(lenIndicatorPos: number, start: number): void;
|
|
34
|
+
writeInt32At(position: number, value: number): void;
|
|
34
35
|
protected extendBufferIfNeeded(countNeededBytes: number, factor?: number): void;
|
|
35
36
|
protected truncateBuffer(): void;
|
|
36
37
|
endWriting(): ArrayBuffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byte-writer.class.d.ts","sourceRoot":"","sources":["../../../src/parser/byte/byte-writer.class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,8BAAsB,UAAW,YAAW,cAAc;IAElD,SAAS,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IACnC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC;IAE/B,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;gBAElB,SAAS,EAAE,SAAS,EAAE,UAAU,GAAE,MAAY;IAUnD,SAAS,CAAC,KAAK,GAAE,MAAU,GAAG,IAAI;IAIlC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK9B,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAGtC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAInC,8BAA8B,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,MAAY,GAAG,MAAM,EAAE;IAKjF,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,G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AiB,QAAO,MAAM,CAAmD;IAEjF,2BAA2B,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQzE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAYnD,SAAS,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,IAAI;IAOpF,SAAS,CAAC,cAAc,IAAI,IAAI;IAIzB,UAAU,IAAI,WAAW;WAKlB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU;WAShC,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,WAAW;CAMnF"}
|
|
@@ -119,6 +119,12 @@ class ByteWriter {
|
|
|
119
119
|
this.writeInt32(writtenBytes);
|
|
120
120
|
this.jumpTo(after);
|
|
121
121
|
}
|
|
122
|
+
writeInt32At(position, value) {
|
|
123
|
+
const here = this.getBufferPosition();
|
|
124
|
+
this.jumpTo(position);
|
|
125
|
+
this.writeInt32(value);
|
|
126
|
+
this.jumpTo(here);
|
|
127
|
+
}
|
|
122
128
|
extendBufferIfNeeded(countNeededBytes, factor = 1.5) {
|
|
123
129
|
if (this.currentByte + countNeededBytes > this.bufferView.byteLength) {
|
|
124
130
|
this.bufferArray = ByteWriter.AppendBuffer(this.bufferArray, new ArrayBuffer(factor * this.bufferArray.byteLength));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"byte-writer.class.js","sourceRoot":"","sources":["../../../src/parser/byte/byte-writer.class.ts"],"names":[],"mappings":";;;AACA,qDAA6C;AAI7C,MAAsB,UAAU;IAQ/B,YAAY,SAAoB,EAAE,aAAqB,GAAG;QAsHnD,sBAAiB,GAAG,GAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;QAEnD,mBAAc,GAAG,CAAC,KAAa,EAAE,GAAY,EAAe,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CA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ChE,CAAC;IAEM,UAAU;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,GAAW;QAChC,OAAO,IAAI,UAAU,CAAC;YACrB,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE;YACxB,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE;YACxB,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC;YACvB,CAAC,GAAG,GAAG,UAAU,CAAC;SAClB,CAAC,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,YAAY,CAAC,OAAoB,EAAE,OAAoB;QACpE,IAAI,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAClE,GAAG,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,GAAG,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACrD,OAAO,GAAG,CAAC,MAAM,CAAC;IACnB,CAAC;IAAA,CAAC;;AAjLH,gCAkLC;AAtDc,4BAAiB,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,AAA3D,CAA4D","sourcesContent":["\nimport { Alignment } from \"./alignment.enum\";\nimport { BinaryWritable } from './binary-writable.interface';\n\n/** @public */\nexport abstract class ByteWriter implements BinaryWritable {\n\n\tpublic alignment: Alignment;\n\tprotected bufferArray: ArrayBuffer;\n\tprotected bufferView: DataView;\n\n\tprotected currentByte: number;\n\n\tconstructor(alignment: Alignment, bufferSize: number = 500) {\n\t\tthis.alignment = alignment;\n\t\tthis.bufferArray = new ArrayBuffer(bufferSize);\n\t\tthis.bufferView = new DataView(this.bufferArray);\n\t\tthis.currentByte = 0;\n\t}\n\n\t/*\n\t * Byte Manipulation\n\t */\n\tpublic skipBytes(count: number = 1): void {\n\t\tthis.extendBufferIfNeeded(count);\n\t\tthis.currentByte += count;\n\t}\n\tpublic jumpTo(pos: number): void {\n\t\tconst count = pos - this.getBufferPosition();\n\t\tthis.skipBytes(count);\n\t}\n\tpublic writeByte(value: number): void {\n\t\tthis.extendBufferIfNeeded(1);\n\t\tthis.bufferView.setUint8(this.currentByte, value);\n\t\tthis.currentByte += 1;\n\t}\n\tpublic writeBytesArray(bytes: number[]): void {\n\t\tthis.writeBytes(new Uint8Array(bytes));\n\t}\n\tpublic writeBytes(bytes: Uint8Array): void {\n\t\tthis.extendBufferIfNeeded(bytes.length);\n\t\tbytes.forEach(byte => this.bufferView.setUint8(this.currentByte++, byte));\n\t}\n\tpublic hexStringRepresentationToBytes(hex: string, hexSeparator: string = ' '): number[] {\n\t\tconst cleanHex = hex.split(hexSeparator).join('').replace(/\\s+/g, '');\n\t\tconst bytes = Array.from({ length: cleanHex.length / 2 }, (_, i) => parseInt(cleanHex.slice(i * 2, i * 2 + 2), 16));\n\t\treturn bytes;\n\t}\n\tpublic writeHex(hex: string, hexSeparator: string = ' '): void {\n\t\tthis.writeBytesArray(this.hexStringRepresentationToBytes(hex, hexSeparator));\n\t}\n\tpublic writeInt8(value: number): void {\n\t\tthis.extendBufferIfNeeded(1);\n\t\tthis.bufferView.setInt8(this.currentByte, value);\n\t\tthis.currentByte += 1;\n\t}\n\tpublic writeUint8(value: number): void {\n\t\tthis.writeByte(value);\n\t}\n\tpublic writeInt16(value: number): void {\n\t\tthis.extendBufferIfNeeded(2);\n\t\tthis.bufferView.setInt16(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t}\n\tpublic writeUint16(value: number): void {\n\t\tthis.extendBufferIfNeeded(2);\n\t\tthis.bufferView.setUint16(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t}\n\tpublic writeInt32(value: number): void {\n\t\tthis.extendBufferIfNeeded(4);\n\t\tthis.bufferView.setInt32(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t}\n\t/**\n\t * Writes an int32 and we dismiss it, because its always 0.\n\t */\n\tpublic writeInt32Zero(): void {\n\t\tthis.writeInt32(0);\n\t}\n\tpublic writeUint32(value: number): void {\n\t\tthis.extendBufferIfNeeded(4);\n\t\tthis.bufferView.setUint32(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t}\n\tpublic writeInt64(value: bigint): void {\n\t\tthis.extendBufferIfNeeded(8);\n\t\tthis.bufferView.setBigInt64(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t}\n\tpublic writeUint64(value: bigint): void {\n\t\tthis.extendBufferIfNeeded(8);\n\t\tthis.bufferView.setBigUint64(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t}\n\tpublic writeFloat32(value: number): void {\n\t\tthis.extendBufferIfNeeded(4);\n\t\tthis.bufferView.setFloat32(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t}\n\tpublic writeDouble(value: number): void {\n\t\tthis.extendBufferIfNeeded(8);\n\t\tthis.bufferView.setFloat64(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t}\n\tpublic writeString(value: string) {\n\t\tif (value.length === 0) {\n\t\t\tthis.writeInt32(0);\n\t\t\treturn;\n\t\t}\n\n\t\t// if it's safe to use ASCII, use UTF8.\n\t\tif (ByteWriter.IsASCIICompatible(value)) {\n\t\t\tthis.writeInt32(value.length + 1);\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tthis.writeByte(value.charCodeAt(i));\n\t\t\t}\n\t\t\tthis.writeUint8(0);\n\t\t}\n\t\t// write UTF16\n\t\telse {\n\t\t\tthis.writeInt32(-value.length - 1);\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tthis.writeUint16(value.charCodeAt(i));\n\t\t\t}\n\t\t\tthis.writeUint16(0);\n\t\t}\n\t}\n\n\tpublic static IsASCIICompatible = (value: string): boolean => /^[\\x00-\\x7F]*$/.test(value);\n\n\tpublic getBufferPosition = (): number => this.currentByte;\n\n\tpublic getBufferSlice = (start: number, end?: number): ArrayBuffer => this.bufferArray.slice(start, end);\n\n\tpublic getBufferLength = (): number => this.bufferArray.byteLength;\n\n\tpublic getBufferProgress = (): number => this.currentByte / this.bufferArray.byteLength;\n\n\tpublic writeBinarySizeFromPosition(lenIndicatorPos: number, start: number): void {\n\t\tconst after = this.getBufferPosition();\n\t\tconst writtenBytes = after - start;\n\t\tthis.jumpTo(lenIndicatorPos);\n\t\tthis.writeInt32(writtenBytes);\n\t\tthis.jumpTo(after);\n\t}\n\n\t/**\n\t * automatically extends the current buffer if the given space exceeds the available rest capacity of the current buffer.\n\t * @param countNeededBytes the needed space\n\t * @param factor how big the appended buffer should be in comparison to the current one. Values >= 1 make sense.\n\t */\n\tprotected extendBufferIfNeeded(countNeededBytes: number, factor: number = 1.5): void {\n\t\tif (this.currentByte + countNeededBytes > this.bufferView.byteLength) {\n\t\t\tthis.bufferArray = ByteWriter.AppendBuffer(this.bufferArray, new ArrayBuffer(factor * this.bufferArray.byteLength));\n\t\t\tthis.bufferView = new DataView(this.bufferArray);\n\t\t}\n\t}\n\n\tprotected truncateBuffer(): void {\n\t\tthis.bufferArray = this.bufferArray.slice(0, this.currentByte);\n\t}\n\n\tpublic endWriting(): ArrayBuffer {\n\t\tthis.truncateBuffer();\n\t\treturn this.bufferArray;\n\t}\n\n\tpublic static ToInt32(num: number): Uint8Array {\n\t\treturn new Uint8Array([\n\t\t\t(num & 0xff000000) >> 24,\n\t\t\t(num & 0x00ff0000) >> 16,\n\t\t\t(num & 0x0000ff00) >> 8,\n\t\t\t(num & 0x000000ff)\n\t\t]);\n\t}\n\n\tpublic static AppendBuffer(buffer1: ArrayBuffer, buffer2: ArrayBuffer): ArrayBuffer {\n\t\tvar tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);\n\t\ttmp.set(new Uint8Array(buffer1), 0);\n\t\ttmp.set(new Uint8Array(buffer2), buffer1.byteLength);\n\t\treturn tmp.buffer;\n\t};\n}"]}
|
|
1
|
+
{"version":3,"file":"byte-writer.class.js","sourceRoot":"","sources":["../../../src/parser/byte/byte-writer.class.ts"],"names":[],"mappings":";;;AACA,qDAA6C;AAI7C,MAAsB,UAAU;IAQ/B,YAAY,SAAoB,EAAE,aAAqB,GAAG;QAsHnD,sBAAiB,GAAG,GAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;QAEnD,mBAAc,GAAG,CAAC,KAAa,EAAE,GAAY,EAAe,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElG,oBAAe,GAAG,GAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;QAE5D,sBAAiB,GAAG,GAAW,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;QA3HvF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACtB,CAAC;IAKM,SAAS,CAAC,QAAgB,CAAC;QACjC,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC;IAC3B,CAAC;IACM,MAAM,CAAC,GAAW;QACxB,MAAM,KAAK,GAAG,G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,MAAM,CAAC,YAAY,CAAC,OAAoB,EAAE,OAAoB;QACpE,IAAI,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAClE,GAAG,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,GAAG,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QACrD,OAAO,GAAG,CAAC,MAAM,CAAC;IACnB,CAAC;IAAA,CAAC;;AAxLH,gCAyLC;AA7Dc,4BAAiB,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,AAA3D,CAA4D","sourcesContent":["\nimport { Alignment } from \"./alignment.enum\";\nimport { BinaryWritable } from './binary-writable.interface';\n\n/** @public */\nexport abstract class ByteWriter implements BinaryWritable {\n\n\tpublic alignment: Alignment;\n\tprotected bufferArray: ArrayBuffer;\n\tprotected bufferView: DataView;\n\n\tprotected currentByte: number;\n\n\tconstructor(alignment: Alignment, bufferSize: number = 500) {\n\t\tthis.alignment = alignment;\n\t\tthis.bufferArray = new ArrayBuffer(bufferSize);\n\t\tthis.bufferView = new DataView(this.bufferArray);\n\t\tthis.currentByte = 0;\n\t}\n\n\t/*\n\t * Byte Manipulation\n\t */\n\tpublic skipBytes(count: number = 1): void {\n\t\tthis.extendBufferIfNeeded(count);\n\t\tthis.currentByte += count;\n\t}\n\tpublic jumpTo(pos: number): void {\n\t\tconst count = pos - this.getBufferPosition();\n\t\tthis.skipBytes(count);\n\t}\n\tpublic writeByte(value: number): void {\n\t\tthis.extendBufferIfNeeded(1);\n\t\tthis.bufferView.setUint8(this.currentByte, value);\n\t\tthis.currentByte += 1;\n\t}\n\tpublic writeBytesArray(bytes: number[]): void {\n\t\tthis.writeBytes(new Uint8Array(bytes));\n\t}\n\tpublic writeBytes(bytes: Uint8Array): void {\n\t\tthis.extendBufferIfNeeded(bytes.length);\n\t\tbytes.forEach(byte => this.bufferView.setUint8(this.currentByte++, byte));\n\t}\n\tpublic hexStringRepresentationToBytes(hex: string, hexSeparator: string = ' '): number[] {\n\t\tconst cleanHex = hex.split(hexSeparator).join('').replace(/\\s+/g, '');\n\t\tconst bytes = Array.from({ length: cleanHex.length / 2 }, (_, i) => parseInt(cleanHex.slice(i * 2, i * 2 + 2), 16));\n\t\treturn bytes;\n\t}\n\tpublic writeHex(hex: string, hexSeparator: string = ' '): void {\n\t\tthis.writeBytesArray(this.hexStringRepresentationToBytes(hex, hexSeparator));\n\t}\n\tpublic writeInt8(value: number): void {\n\t\tthis.extendBufferIfNeeded(1);\n\t\tthis.bufferView.setInt8(this.currentByte, value);\n\t\tthis.currentByte += 1;\n\t}\n\tpublic writeUint8(value: number): void {\n\t\tthis.writeByte(value);\n\t}\n\tpublic writeInt16(value: number): void {\n\t\tthis.extendBufferIfNeeded(2);\n\t\tthis.bufferView.setInt16(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t}\n\tpublic writeUint16(value: number): void {\n\t\tthis.extendBufferIfNeeded(2);\n\t\tthis.bufferView.setUint16(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 2;\n\t}\n\tpublic writeInt32(value: number): void {\n\t\tthis.extendBufferIfNeeded(4);\n\t\tthis.bufferView.setInt32(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t}\n\t/**\n\t * Writes an int32 and we dismiss it, because its always 0.\n\t */\n\tpublic writeInt32Zero(): void {\n\t\tthis.writeInt32(0);\n\t}\n\tpublic writeUint32(value: number): void {\n\t\tthis.extendBufferIfNeeded(4);\n\t\tthis.bufferView.setUint32(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t}\n\tpublic writeInt64(value: bigint): void {\n\t\tthis.extendBufferIfNeeded(8);\n\t\tthis.bufferView.setBigInt64(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t}\n\tpublic writeUint64(value: bigint): void {\n\t\tthis.extendBufferIfNeeded(8);\n\t\tthis.bufferView.setBigUint64(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t}\n\tpublic writeFloat32(value: number): void {\n\t\tthis.extendBufferIfNeeded(4);\n\t\tthis.bufferView.setFloat32(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 4;\n\t}\n\tpublic writeDouble(value: number): void {\n\t\tthis.extendBufferIfNeeded(8);\n\t\tthis.bufferView.setFloat64(this.currentByte, value, this.alignment === Alignment.LITTLE_ENDIAN);\n\t\tthis.currentByte += 8;\n\t}\n\tpublic writeString(value: string) {\n\t\tif (value.length === 0) {\n\t\t\tthis.writeInt32(0);\n\t\t\treturn;\n\t\t}\n\n\t\t// if it's safe to use ASCII, use UTF8.\n\t\tif (ByteWriter.IsASCIICompatible(value)) {\n\t\t\tthis.writeInt32(value.length + 1);\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tthis.writeByte(value.charCodeAt(i));\n\t\t\t}\n\t\t\tthis.writeUint8(0);\n\t\t}\n\t\t// write UTF16\n\t\telse {\n\t\t\tthis.writeInt32(-value.length - 1);\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tthis.writeUint16(value.charCodeAt(i));\n\t\t\t}\n\t\t\tthis.writeUint16(0);\n\t\t}\n\t}\n\n\tpublic static IsASCIICompatible = (value: string): boolean => /^[\\x00-\\x7F]*$/.test(value);\n\n\tpublic getBufferPosition = (): number => this.currentByte;\n\n\tpublic getBufferSlice = (start: number, end?: number): ArrayBuffer => this.bufferArray.slice(start, end);\n\n\tpublic getBufferLength = (): number => this.bufferArray.byteLength;\n\n\tpublic getBufferProgress = (): number => this.currentByte / this.bufferArray.byteLength;\n\n\tpublic writeBinarySizeFromPosition(lenIndicatorPos: number, start: number): void {\n\t\tconst after = this.getBufferPosition();\n\t\tconst writtenBytes = after - start;\n\t\tthis.jumpTo(lenIndicatorPos);\n\t\tthis.writeInt32(writtenBytes);\n\t\tthis.jumpTo(after);\n\t}\n\n\tpublic writeInt32At(position: number, value: number) {\n\t\tconst here = this.getBufferPosition();\n\t\tthis.jumpTo(position);\n\t\tthis.writeInt32(value);\n\t\tthis.jumpTo(here);\n\t}\n\n\t/**\n\t * automatically extends the current buffer if the given space exceeds the available rest capacity of the current buffer.\n\t * @param countNeededBytes the needed space\n\t * @param factor how big the appended buffer should be in comparison to the current one. Values >= 1 make sense.\n\t */\n\tprotected extendBufferIfNeeded(countNeededBytes: number, factor: number = 1.5): void {\n\t\tif (this.currentByte + countNeededBytes > this.bufferView.byteLength) {\n\t\t\tthis.bufferArray = ByteWriter.AppendBuffer(this.bufferArray, new ArrayBuffer(factor * this.bufferArray.byteLength));\n\t\t\tthis.bufferView = new DataView(this.bufferArray);\n\t\t}\n\t}\n\n\tprotected truncateBuffer(): void {\n\t\tthis.bufferArray = this.bufferArray.slice(0, this.currentByte);\n\t}\n\n\tpublic endWriting(): ArrayBuffer {\n\t\tthis.truncateBuffer();\n\t\treturn this.bufferArray;\n\t}\n\n\tpublic static ToInt32(num: number): Uint8Array {\n\t\treturn new Uint8Array([\n\t\t\t(num & 0xff000000) >> 24,\n\t\t\t(num & 0x00ff0000) >> 16,\n\t\t\t(num & 0x0000ff00) >> 8,\n\t\t\t(num & 0x000000ff)\n\t\t]);\n\t}\n\n\tpublic static AppendBuffer(buffer1: ArrayBuffer, buffer2: ArrayBuffer): ArrayBuffer {\n\t\tvar tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);\n\t\ttmp.set(new Uint8Array(buffer1), 0);\n\t\ttmp.set(new Uint8Array(buffer2), buffer1.byteLength);\n\t\treturn tmp.buffer;\n\t};\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ByteReader } from '../byte/byte-reader.class';
|
|
2
|
-
import { ReaderWriterContext } from './context';
|
|
2
|
+
import { ReaderWriterContext } from './reader-writer-context';
|
|
3
3
|
export declare abstract class ContextReader extends ByteReader {
|
|
4
4
|
context: ReaderWriterContext;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-reader.d.ts","sourceRoot":"","sources":["../../../src/parser/context/context-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"context-reader.d.ts","sourceRoot":"","sources":["../../../src/parser/context/context-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,8BAAsB,aAAc,SAAQ,UAAU;IAC3C,OAAO,EAAE,mBAAmB,CAA6B;CACnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-reader.js","sourceRoot":"","sources":["../../../src/parser/context/context-reader.ts"],"names":[],"mappings":";;;AAAA,iEAAuD;AAIvD,MAAsB,aAAc,SAAQ,8BAAU;IAAtD;;QACW,YAAO,GAAwB,EAAyB,CAAC;IACpE,CAAC;CAAA;AAFD,sCAEC;AAAA,CAAC","sourcesContent":["import { ByteReader } from '../byte/byte-reader.class';\nimport { ReaderWriterContext } from './context';\n\n\nexport abstract class ContextReader extends ByteReader {\n public context: ReaderWriterContext = {} as ReaderWriterContext;\n};"]}
|
|
1
|
+
{"version":3,"file":"context-reader.js","sourceRoot":"","sources":["../../../src/parser/context/context-reader.ts"],"names":[],"mappings":";;;AAAA,iEAAuD;AAIvD,MAAsB,aAAc,SAAQ,8BAAU;IAAtD;;QACW,YAAO,GAAwB,EAAyB,CAAC;IACpE,CAAC;CAAA;AAFD,sCAEC;AAAA,CAAC","sourcesContent":["import { ByteReader } from '../byte/byte-reader.class';\nimport { ReaderWriterContext } from './reader-writer-context';\n\n\nexport abstract class ContextReader extends ByteReader {\n public context: ReaderWriterContext = {} as ReaderWriterContext;\n};"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ByteWriter } from '../byte/byte-writer.class';
|
|
2
|
-
import { ReaderWriterContext } from './context';
|
|
2
|
+
import { ReaderWriterContext } from './reader-writer-context';
|
|
3
3
|
export declare abstract class ContextWriter extends ByteWriter {
|
|
4
4
|
context: ReaderWriterContext;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-writer.d.ts","sourceRoot":"","sources":["../../../src/parser/context/context-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"context-writer.d.ts","sourceRoot":"","sources":["../../../src/parser/context/context-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,8BAAsB,aAAc,SAAQ,UAAU;IAC3C,OAAO,EAAE,mBAAmB,CAA6B;CACnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-writer.js","sourceRoot":"","sources":["../../../src/parser/context/context-writer.ts"],"names":[],"mappings":";;;AAAA,iEAAuD;AAGvD,MAAsB,aAAc,SAAQ,8BAAU;IAAtD;;QACW,YAAO,GAAwB,EAAyB,CAAC;IACpE,CAAC;CAAA;AAFD,sCAEC;AAAA,CAAC","sourcesContent":["import { ByteWriter } from '../byte/byte-writer.class';\nimport { ReaderWriterContext } from './context';\n\nexport abstract class ContextWriter extends ByteWriter {\n public context: ReaderWriterContext = {} as ReaderWriterContext;\n};"]}
|
|
1
|
+
{"version":3,"file":"context-writer.js","sourceRoot":"","sources":["../../../src/parser/context/context-writer.ts"],"names":[],"mappings":";;;AAAA,iEAAuD;AAGvD,MAAsB,aAAc,SAAQ,8BAAU;IAAtD;;QACW,YAAO,GAAwB,EAAyB,CAAC;IACpE,CAAC;CAAA;AAFD,sCAEC;AAAA,CAAC","sourcesContent":["import { ByteWriter } from '../byte/byte-writer.class';\nimport { ReaderWriterContext } from './reader-writer-context';\n\nexport abstract class ContextWriter extends ByteWriter {\n public context: ReaderWriterContext = {} as ReaderWriterContext;\n};"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type HierarchyVersion = {
|
|
2
|
+
header: number;
|
|
3
|
+
level: number;
|
|
4
|
+
object: number;
|
|
5
|
+
};
|
|
6
|
+
export declare namespace HierarchyVersion {
|
|
7
|
+
function CreateOnHeader(version: number): HierarchyVersion;
|
|
8
|
+
function SetOnLevel(context: HierarchyVersion, version: number | undefined): void;
|
|
9
|
+
function SetOnObject(context: HierarchyVersion, version: number | undefined): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=hierarchical-version-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchical-version-context.d.ts","sourceRoot":"","sources":["../../../src/parser/context/hierarchical-version-context.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,gBAAgB,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,yBAAiB,gBAAgB,CAAC;IAC9B,SAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAMhE;IAED,SAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAGvF;IAED,SAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAExF;CACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HierarchyVersion = void 0;
|
|
4
|
+
var HierarchyVersion;
|
|
5
|
+
(function (HierarchyVersion) {
|
|
6
|
+
function CreateOnHeader(version) {
|
|
7
|
+
return {
|
|
8
|
+
header: version,
|
|
9
|
+
level: version,
|
|
10
|
+
object: version
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
HierarchyVersion.CreateOnHeader = CreateOnHeader;
|
|
14
|
+
function SetOnLevel(context, version) {
|
|
15
|
+
context.level = version ?? context.header;
|
|
16
|
+
context.object = version ?? context.header;
|
|
17
|
+
}
|
|
18
|
+
HierarchyVersion.SetOnLevel = SetOnLevel;
|
|
19
|
+
function SetOnObject(context, version) {
|
|
20
|
+
context.object = version ?? context.level;
|
|
21
|
+
}
|
|
22
|
+
HierarchyVersion.SetOnObject = SetOnObject;
|
|
23
|
+
})(HierarchyVersion || (exports.HierarchyVersion = HierarchyVersion = {}));
|
|
24
|
+
//# sourceMappingURL=hierarchical-version-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchical-version-context.js","sourceRoot":"","sources":["../../../src/parser/context/hierarchical-version-context.ts"],"names":[],"mappings":";;;AAUA,IAAiB,gBAAgB,CAiBhC;AAjBD,WAAiB,gBAAgB;IAC7B,SAAgB,cAAc,CAAC,OAAe;QAC1C,OAAO;YACH,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,OAAO;SAClB,CAAA;IACL,CAAC;IANe,+BAAc,iBAM7B,CAAA;IAED,SAAgB,UAAU,CAAC,OAAyB,EAAE,OAA2B;QAC7E,OAAO,CAAC,KAAK,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;QAC1C,OAAO,CAAC,MAAM,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAC/C,CAAC;IAHe,2BAAU,aAGzB,CAAA;IAED,SAAgB,WAAW,CAAC,OAAyB,EAAE,OAA2B;QAC9E,OAAO,CAAC,MAAM,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC;IAC9C,CAAC;IAFe,4BAAW,cAE1B,CAAA;AACL,CAAC,EAjBgB,gBAAgB,gCAAhB,gBAAgB,QAiBhC","sourcesContent":["\n/**\n * Holds context during parsing. since levels and objects on individual basis can have varying versions (saveVersion, ue5packageVersion)\n */\nexport type HierarchyVersion = {\n header: number;\n level: number;\n object: number;\n};\n\nexport namespace HierarchyVersion {\n export function CreateOnHeader(version: number): HierarchyVersion {\n return {\n header: version,\n level: version,\n object: version\n }\n }\n\n export function SetOnLevel(context: HierarchyVersion, version: number | undefined): void {\n context.level = version ?? context.header;\n context.object = version ?? context.header;\n }\n\n export function SetOnObject(context: HierarchyVersion, version: number | undefined): void {\n context.object = version ?? context.level;\n }\n}\n\n"]}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { ChunkCompressionInfo } from "../satisfactory/save/save-body-chunks";
|
|
2
|
+
import { HierarchyVersion } from "./hierarchical-version-context";
|
|
2
3
|
export type ReaderWriterContext = SaveReaderWriterContext & BlueprintReaderWriterContext;
|
|
3
4
|
export type SaveReaderWriterContext = {
|
|
4
5
|
throwErrors: boolean;
|
|
5
6
|
saveHeaderType: number;
|
|
6
|
-
saveVersion:
|
|
7
|
+
saveVersion: HierarchyVersion;
|
|
7
8
|
buildVersion: number;
|
|
8
9
|
mods: Record<string, string>;
|
|
9
10
|
mapName?: string;
|
|
10
11
|
compressionInfo?: ChunkCompressionInfo;
|
|
12
|
+
packageFileVersionUE5: HierarchyVersion;
|
|
11
13
|
};
|
|
12
14
|
export type BlueprintReaderWriterContext = {
|
|
13
15
|
throwErrors: boolean;
|
|
14
16
|
headerVersion: number;
|
|
15
|
-
saveVersion:
|
|
17
|
+
saveVersion: HierarchyVersion;
|
|
16
18
|
buildVersion: number;
|
|
17
19
|
blueprintConfigVersion: number;
|
|
18
20
|
};
|
|
19
|
-
//# sourceMappingURL=context.d.ts.map
|
|
21
|
+
//# sourceMappingURL=reader-writer-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader-writer-context.d.ts","sourceRoot":"","sources":["../../../src/parser/context/reader-writer-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAKlE,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG,4BAA4B,CAAA;AAOxF,MAAM,MAAM,uBAAuB,GAAG;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,qBAAqB,EAAE,gBAAgB,CAAC;CAC3C,CAAA;AAKD,MAAM,MAAM,4BAA4B,GAAG;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB,EAAE,MAAM,CAAC;CAClC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader-writer-context.js","sourceRoot":"","sources":["../../../src/parser/context/reader-writer-context.ts"],"names":[],"mappings":"","sourcesContent":["import { ChunkCompressionInfo } from \"../satisfactory/save/save-body-chunks\";\nimport { HierarchyVersion } from \"./hierarchical-version-context\";\n\n/**\n * Merged Context Type for Saves and Blueprints.\n */\nexport type ReaderWriterContext = SaveReaderWriterContext & BlueprintReaderWriterContext\n\n/**\n * Context for reading/writing save files.\n * \n * @param mods describes a list of mod names to their versions. Some mods have special needs.\n */\nexport type SaveReaderWriterContext = {\n throwErrors: boolean;\n saveHeaderType: number;\n saveVersion: HierarchyVersion;\n buildVersion: number;\n mods: Record<string, string>;\n mapName?: string;\n compressionInfo?: ChunkCompressionInfo;\n packageFileVersionUE5: HierarchyVersion;\n}\n\n/**\n * Context for reading/writing blueprint files.\n */\nexport type BlueprintReaderWriterContext = {\n throwErrors: boolean;\n headerVersion: number;\n saveVersion: HierarchyVersion;\n buildVersion: number;\n blueprintConfigVersion: number;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/parser/parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/parser/parser.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAUpE,qBAAa,MAAM;WASJ,SAAS,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,eAAe,EACtB,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,sBAAsB,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;QAC1D,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QAC7D,WAAW,EAAE,OAAO,CAAA;KACpB,CAAC,GACA,gBAAgB;WAkEL,SAAS,CAAC,IAAI,EAAE,gBAAgB,EAC7C,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EACtC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACpC,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,yBAAyB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;KACzD,CAAC,GACA,YAAY,EAAE;WAgDH,mBAAmB,CAChC,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EAC9C,eAAe,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,iCAAiC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;KACjE,CAAC,GACA;QACF,oBAAoB,EAAE,YAAY,EAAE,CAAC;QACrC,gBAAgB,EAAE,WAAW,CAAA;KAC7B;WA+Ca,mBAAmB,CAChC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,eAAe,EAC9B,mBAAmB,EAAE,eAAe,EACpC,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,2BAA2B,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;QAC/D,WAAW,EAAE,OAAO,CAAC;KACrB,CAAC,GACA,SAAS;IA0CZ,OAAc,qBAAqB,QAAS,GAAG,WAAU,MAAM,KAAO,MAAM,CAQjE;CAEX"}
|
package/build/parser/parser.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Parser = void 0;
|
|
4
|
+
const hierarchical_version_context_1 = require("./context/hierarchical-version-context");
|
|
4
5
|
const parser_error_1 = require("./error/parser.error");
|
|
5
6
|
const blueprint_config_1 = require("./satisfactory/blueprint/blueprint-config");
|
|
6
7
|
const blueprint_header_1 = require("./satisfactory/blueprint/blueprint-header");
|
|
@@ -11,6 +12,7 @@ const satisfactory_save_header_1 = require("./satisfactory/save/satisfactory-sav
|
|
|
11
12
|
const save_custom_version_1 = require("./satisfactory/save/save-custom-version");
|
|
12
13
|
const save_reader_1 = require("./satisfactory/save/save-reader");
|
|
13
14
|
const save_writer_1 = require("./satisfactory/save/save-writer");
|
|
15
|
+
const FSaveObjectVersionData_1 = require("./satisfactory/types/structs/binary/FSaveObjectVersionData");
|
|
14
16
|
const ObjectReference_1 = require("./satisfactory/types/structs/ObjectReference");
|
|
15
17
|
const SaveBodyValidation_1 = require("./satisfactory/types/structs/SaveBodyValidation");
|
|
16
18
|
class Parser {
|
|
@@ -19,7 +21,7 @@ class Parser {
|
|
|
19
21
|
reader.context.throwErrors = options?.throwErrors !== undefined ? options.throwErrors : false;
|
|
20
22
|
const header = satisfactory_save_header_1.SatisfactorySaveHeader.Parse(reader);
|
|
21
23
|
const save = new satisfactory_save_1.SatisfactorySave(name, header);
|
|
22
|
-
const roughSaveVersion = save_reader_1.SaveReader.
|
|
24
|
+
const roughSaveVersion = save_reader_1.SaveReader.GetApproximateSaveVersion(header.saveVersion);
|
|
23
25
|
if (roughSaveVersion === '<U6') {
|
|
24
26
|
throw new parser_error_1.UnsupportedVersionError('Game Version < U6 is not supported in the parser. Please save the file in a newer game version.');
|
|
25
27
|
}
|
|
@@ -28,15 +30,24 @@ class Parser {
|
|
|
28
30
|
if (options?.onDecompressedSaveBody !== undefined) {
|
|
29
31
|
options.onDecompressedSaveBody(reader.getBuffer());
|
|
30
32
|
}
|
|
31
|
-
if (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.
|
|
33
|
+
if (reader.context.saveVersion.header >= save_custom_version_1.SaveCustomVersion.UnrealEngine5) {
|
|
34
|
+
reader.readInt32();
|
|
35
|
+
}
|
|
36
|
+
if (reader.context.saveVersion.header >= save_custom_version_1.SaveCustomVersion.SerializeDataPackageVersionAndCustomVersions) {
|
|
37
|
+
save.objectVersionData = FSaveObjectVersionData_1.FSaveObjectVersionData.read(reader);
|
|
38
|
+
reader.context.packageFileVersionUE5 = hierarchical_version_context_1.HierarchyVersion.CreateOnHeader(save.objectVersionData.packageFileVersion.ue5Version);
|
|
39
|
+
}
|
|
40
|
+
if (reader.context.saveVersion.header >= save_custom_version_1.SaveCustomVersion.IntroducedWorldPartition) {
|
|
32
41
|
save.saveBodyValidation = SaveBodyValidation_1.SaveBodyValidation.Parse(reader);
|
|
33
42
|
}
|
|
34
43
|
save.levels = reader.readLevels();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
if (reader.getBufferPosition() < reader.getBufferLength()) {
|
|
45
|
+
const countUnresolvedWorldSaveData = reader.readInt32();
|
|
46
|
+
if (countUnresolvedWorldSaveData) {
|
|
47
|
+
save.unresolvedWorldSaveData = [];
|
|
48
|
+
for (let i = 0; i < countUnresolvedWorldSaveData; i++) {
|
|
49
|
+
save.unresolvedWorldSaveData.push(ObjectReference_1.ObjectReference.read(reader));
|
|
50
|
+
}
|
|
40
51
|
}
|
|
41
52
|
}
|
|
42
53
|
reader.onProgressCallback(reader.getBufferProgress(), 'finished parsing.');
|
|
@@ -45,21 +56,26 @@ class Parser {
|
|
|
45
56
|
static WriteSave(save, onHeader, onChunk, options) {
|
|
46
57
|
const writer = new save_writer_1.SaveWriter();
|
|
47
58
|
writer.context.saveHeaderType = save.header.saveHeaderType;
|
|
48
|
-
writer.context.saveVersion = save.header.saveVersion;
|
|
59
|
+
writer.context.saveVersion = hierarchical_version_context_1.HierarchyVersion.CreateOnHeader(save.header.saveVersion);
|
|
49
60
|
writer.context.buildVersion = save.header.buildVersion;
|
|
50
61
|
writer.context.mapName = save.header.mapName;
|
|
51
62
|
writer.context.mods = Object.fromEntries(save.header.modMetadata?.Mods?.map(mod => [mod.Reference, mod.Version]) ?? []);
|
|
52
63
|
satisfactory_save_header_1.SatisfactorySaveHeader.Serialize(writer, save.header);
|
|
53
64
|
const posAfterHeader = writer.getBufferPosition();
|
|
54
|
-
if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.
|
|
65
|
+
if (writer.context.saveVersion.header >= save_custom_version_1.SaveCustomVersion.UnrealEngine5) {
|
|
66
|
+
writer.writeInt32(0);
|
|
67
|
+
}
|
|
68
|
+
if (writer.context.saveVersion.header >= save_custom_version_1.SaveCustomVersion.SerializeDataPackageVersionAndCustomVersions) {
|
|
69
|
+
FSaveObjectVersionData_1.FSaveObjectVersionData.write(writer, save.objectVersionData);
|
|
70
|
+
writer.context.packageFileVersionUE5 = hierarchical_version_context_1.HierarchyVersion.CreateOnHeader(save.objectVersionData.packageFileVersion.ue5Version);
|
|
71
|
+
}
|
|
72
|
+
if (writer.context.saveVersion.header >= save_custom_version_1.SaveCustomVersion.IntroducedWorldPartition) {
|
|
55
73
|
SaveBodyValidation_1.SaveBodyValidation.Serialize(writer, save.saveBodyValidation);
|
|
56
74
|
}
|
|
57
75
|
save_writer_1.SaveWriter.WriteLevels(writer, save);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
ObjectReference_1.ObjectReference.write(writer, actor);
|
|
62
|
-
}
|
|
76
|
+
writer.writeInt32(save.unresolvedWorldSaveData?.length ?? 0);
|
|
77
|
+
for (const actor of save.unresolvedWorldSaveData ?? []) {
|
|
78
|
+
ObjectReference_1.ObjectReference.write(writer, actor);
|
|
63
79
|
}
|
|
64
80
|
writer.endWriting();
|
|
65
81
|
const chunkSummary = writer.generateChunks(save.compressionInfo, posAfterHeader, options?.onBinaryBeforeCompressing ?? (() => { }), onHeader, onChunk);
|
|
@@ -68,7 +84,7 @@ class Parser {
|
|
|
68
84
|
static WriteBlueprintFiles(blueprint, onMainFileHeader, onMainFileChunk, options) {
|
|
69
85
|
const blueprintWriter = new blueprint_writer_1.BlueprintWriter();
|
|
70
86
|
blueprintWriter.context.blueprintConfigVersion = blueprint.config.configVersion;
|
|
71
|
-
blueprintWriter.context.saveVersion = blueprint.header.saveVersion;
|
|
87
|
+
blueprintWriter.context.saveVersion = hierarchical_version_context_1.HierarchyVersion.CreateOnHeader(blueprint.header.saveVersion);
|
|
72
88
|
blueprintWriter.context.buildVersion = blueprint.header.buildVersion;
|
|
73
89
|
blueprint_header_1.BlueprintHeader.Serialize(blueprintWriter, blueprint.header);
|
|
74
90
|
const saveBodyPos = blueprintWriter.getBufferPosition();
|
|
@@ -83,8 +99,8 @@ class Parser {
|
|
|
83
99
|
});
|
|
84
100
|
const configWriter = new blueprint_writer_1.BlueprintConfigWriter();
|
|
85
101
|
configWriter.context.blueprintConfigVersion = blueprint.config.configVersion;
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
configWriter.context.saveVersion = hierarchical_version_context_1.HierarchyVersion.CreateOnHeader(blueprint.header.saveVersion);
|
|
103
|
+
configWriter.context.buildVersion = blueprint.header.buildVersion;
|
|
88
104
|
blueprint_config_1.BlueprintConfig.Serialize(configWriter, blueprint.config);
|
|
89
105
|
const configFileBinary = configWriter.endWriting();
|
|
90
106
|
return {
|
|
@@ -93,10 +109,7 @@ class Parser {
|
|
|
93
109
|
};
|
|
94
110
|
}
|
|
95
111
|
static ParseBlueprintFiles(name, blueprintFile, blueprintConfigFile, options) {
|
|
96
|
-
const blueprintConfigReader = new blueprint_reader_1.BlueprintConfigReader(blueprintConfigFile);
|
|
97
|
-
const config = blueprint_config_1.BlueprintConfig.Parse(blueprintConfigReader);
|
|
98
112
|
const blueprintReader = new blueprint_reader_1.BlueprintReader(blueprintFile);
|
|
99
|
-
blueprintReader.context.blueprintConfigVersion = config.configVersion;
|
|
100
113
|
blueprintReader.context.throwErrors = options?.throwErrors !== undefined ? options.throwErrors : false;
|
|
101
114
|
const header = blueprint_header_1.BlueprintHeader.Parse(blueprintReader);
|
|
102
115
|
const inflateResult = blueprintReader.inflateChunks();
|
|
@@ -104,6 +117,9 @@ class Parser {
|
|
|
104
117
|
options.onDecompressedBlueprintBody(inflateResult.inflatedData);
|
|
105
118
|
}
|
|
106
119
|
const blueprintObjects = blueprint_reader_1.BlueprintReader.ParseObjects(blueprintReader);
|
|
120
|
+
const blueprintConfigReader = new blueprint_reader_1.BlueprintConfigReader(blueprintConfigFile);
|
|
121
|
+
blueprintConfigReader.context.saveVersion = hierarchical_version_context_1.HierarchyVersion.CreateOnHeader(header.saveVersion);
|
|
122
|
+
const config = blueprint_config_1.BlueprintConfig.Parse(blueprintConfigReader);
|
|
107
123
|
const blueprint = {
|
|
108
124
|
name,
|
|
109
125
|
compressionInfo: blueprintReader.compressionInfo,
|