@etothepii/satisfactory-file-parser 0.4.22 → 1.0.1
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/README.md +76 -33
- package/build/index.d.ts +6 -2
- package/build/index.d.ts.map +1 -0
- package/build/index.js +6 -2
- package/build/index.js.map +1 -0
- package/build/parser/byte/alignment.enum.d.ts +1 -0
- package/build/parser/byte/alignment.enum.d.ts.map +1 -0
- package/build/parser/byte/alignment.enum.js +1 -0
- package/build/parser/byte/alignment.enum.js.map +1 -0
- package/build/parser/byte/binary-operable.interface.d.ts +1 -0
- package/build/parser/byte/binary-operable.interface.d.ts.map +1 -0
- package/build/parser/byte/binary-operable.interface.js +1 -0
- package/build/parser/byte/binary-operable.interface.js.map +1 -0
- package/build/parser/byte/binary-readable.interface.d.ts +1 -0
- package/build/parser/byte/binary-readable.interface.d.ts.map +1 -0
- package/build/parser/byte/binary-readable.interface.js +1 -0
- package/build/parser/byte/binary-readable.interface.js.map +1 -0
- package/build/parser/byte/binary-writable.interface.d.ts +1 -0
- package/build/parser/byte/binary-writable.interface.d.ts.map +1 -0
- package/build/parser/byte/binary-writable.interface.js +1 -0
- package/build/parser/byte/binary-writable.interface.js.map +1 -0
- package/build/parser/byte/byte-reader.class.d.ts +1 -0
- package/build/parser/byte/byte-reader.class.d.ts.map +1 -0
- package/build/parser/byte/byte-reader.class.js +4 -4
- package/build/parser/byte/byte-reader.class.js.map +1 -0
- package/build/parser/byte/byte-writer.class.d.ts +1 -0
- package/build/parser/byte/byte-writer.class.d.ts.map +1 -0
- package/build/parser/byte/byte-writer.class.js +1 -0
- package/build/parser/byte/byte-writer.class.js.map +1 -0
- package/build/parser/error/parser.error.d.ts +1 -0
- package/build/parser/error/parser.error.d.ts.map +1 -0
- package/build/parser/error/parser.error.js +1 -0
- package/build/parser/error/parser.error.js.map +1 -0
- package/build/parser/file.types.d.ts +1 -0
- package/build/parser/file.types.d.ts.map +1 -0
- package/build/parser/file.types.js +1 -0
- package/build/parser/file.types.js.map +1 -0
- package/build/parser/parser.d.ts +18 -3
- package/build/parser/parser.d.ts.map +1 -0
- package/build/parser/parser.js +40 -6
- package/build/parser/parser.js.map +1 -0
- package/build/parser/satisfactory/blueprint/blueprint-reader.d.ts +1 -0
- package/build/parser/satisfactory/blueprint/blueprint-reader.d.ts.map +1 -0
- package/build/parser/satisfactory/blueprint/blueprint-reader.js +2 -1
- package/build/parser/satisfactory/blueprint/blueprint-reader.js.map +1 -0
- package/build/parser/satisfactory/blueprint/blueprint-writer.d.ts +6 -1
- package/build/parser/satisfactory/blueprint/blueprint-writer.d.ts.map +1 -0
- package/build/parser/satisfactory/blueprint/blueprint-writer.js +7 -4
- package/build/parser/satisfactory/blueprint/blueprint-writer.js.map +1 -0
- package/build/parser/satisfactory/blueprint/blueprint.types.d.ts +1 -0
- package/build/parser/satisfactory/blueprint/blueprint.types.d.ts.map +1 -0
- package/build/parser/satisfactory/blueprint/blueprint.types.js +1 -0
- package/build/parser/satisfactory/blueprint/blueprint.types.js.map +1 -0
- package/build/parser/satisfactory/edit/edit-constants.d.ts +1 -0
- package/build/parser/satisfactory/edit/edit-constants.d.ts.map +1 -0
- package/build/parser/satisfactory/edit/edit-constants.js +1 -0
- package/build/parser/satisfactory/edit/edit-constants.js.map +1 -0
- package/build/parser/satisfactory/save/level.class.d.ts +13 -8
- package/build/parser/satisfactory/save/level.class.d.ts.map +1 -0
- package/build/parser/satisfactory/save/level.class.js +104 -48
- package/build/parser/satisfactory/save/level.class.js.map +1 -0
- package/build/parser/satisfactory/save/object-references-list.d.ts +8 -0
- package/build/parser/satisfactory/save/object-references-list.d.ts.map +1 -0
- package/build/parser/satisfactory/save/object-references-list.js +22 -0
- package/build/parser/satisfactory/save/object-references-list.js.map +1 -0
- package/build/parser/satisfactory/save/satisfactory-save.d.ts +4 -3
- package/build/parser/satisfactory/save/satisfactory-save.d.ts.map +1 -0
- package/build/parser/satisfactory/save/satisfactory-save.js +2 -1
- package/build/parser/satisfactory/save/satisfactory-save.js.map +1 -0
- package/build/parser/satisfactory/save/save-reader.d.ts +11 -3
- package/build/parser/satisfactory/save/save-reader.d.ts.map +1 -0
- package/build/parser/satisfactory/save/save-reader.js +59 -21
- package/build/parser/satisfactory/save/save-reader.js.map +1 -0
- package/build/parser/satisfactory/save/save-writer.d.ts +3 -2
- package/build/parser/satisfactory/save/save-writer.d.ts.map +1 -0
- package/build/parser/satisfactory/save/save-writer.js +12 -12
- package/build/parser/satisfactory/save/save-writer.js.map +1 -0
- package/build/parser/satisfactory/save/save.types.d.ts +1 -0
- package/build/parser/satisfactory/save/save.types.d.ts.map +1 -0
- package/build/parser/satisfactory/save/save.types.js +1 -0
- package/build/parser/satisfactory/save/save.types.js.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveComponent.d.ts +1 -0
- package/build/parser/satisfactory/types/objects/SaveComponent.d.ts.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveComponent.js +1 -0
- package/build/parser/satisfactory/types/objects/SaveComponent.js.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveEntity.d.ts +1 -0
- package/build/parser/satisfactory/types/objects/SaveEntity.d.ts.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveEntity.js +6 -5
- package/build/parser/satisfactory/types/objects/SaveEntity.js.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts +3 -2
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts.map +1 -0
- package/build/parser/satisfactory/types/objects/SaveObject.js +20 -3
- package/build/parser/satisfactory/types/objects/SaveObject.js.map +1 -0
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts +12 -0
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/PropertiesList.js +250 -0
- package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.js +7 -6
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/BasicProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/BasicProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/BasicProperty.js +1 -0
- package/build/parser/satisfactory/types/property/generic/BasicProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js +2 -1
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js +1 -0
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js +1 -0
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js +2 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js +1 -0
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Int32Property.js +1 -0
- package/build/parser/satisfactory/types/property/generic/Int32Property.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Int64Property.js +1 -0
- package/build/parser/satisfactory/types/property/generic/Int64Property.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Int8Property.js +1 -0
- package/build/parser/satisfactory/types/property/generic/Int8Property.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/MapProperty.js +12 -5
- package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js +4 -7
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty.js +3 -2
- package/build/parser/satisfactory/types/property/generic/SetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts +3 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js +7 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/StrProperty.js +1 -0
- package/build/parser/satisfactory/types/property/generic/StrProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +3 -11
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/StructProperty.js +15 -119
- package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts +2 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/TextProperty.js +6 -5
- package/build/parser/satisfactory/types/property/generic/TextProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js +2 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/{SpecialAnyProperty.d.ts → SpecialAnyProperties.d.ts} +11 -10
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/{objects/property/special/SpecialAnyProperty.js → types/property/special/SpecialAnyProperties.js} +1 -0
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.d.ts +8 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.js +235 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.d.ts +12 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.js +38 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.js.map +1 -0
- package/build/parser/satisfactory/types/structs/GUID.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/GUID.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/GUID.js +1 -0
- package/build/parser/satisfactory/types/structs/GUID.js.map +1 -0
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/GUIDInfo.js +1 -0
- package/build/parser/satisfactory/types/structs/GUIDInfo.js.map +1 -0
- package/build/parser/satisfactory/types/structs/MD5Hash.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/MD5Hash.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/MD5Hash.js +1 -0
- package/build/parser/satisfactory/types/structs/MD5Hash.js.map +1 -0
- package/build/parser/satisfactory/types/structs/ObjectReference.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/ObjectReference.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/ObjectReference.js +1 -0
- package/build/parser/satisfactory/types/structs/ObjectReference.js.map +1 -0
- package/build/parser/satisfactory/types/structs/SoftObjectReference.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/SoftObjectReference.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/SoftObjectReference.js +1 -0
- package/build/parser/satisfactory/types/structs/SoftObjectReference.js.map +1 -0
- package/build/parser/satisfactory/types/structs/Transform.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/Transform.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/Transform.js +1 -0
- package/build/parser/satisfactory/types/structs/Transform.js.map +1 -0
- package/build/parser/satisfactory/types/structs/col4.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/col4.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/col4.js +1 -0
- package/build/parser/satisfactory/types/structs/col4.js.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js +17 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js.map +1 -0
- package/build/parser/satisfactory/types/structs/vec2.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/vec2.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/vec2.js +1 -0
- package/build/parser/satisfactory/types/structs/vec2.js.map +1 -0
- package/build/parser/satisfactory/types/structs/vec3.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/vec3.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/vec3.js +1 -0
- package/build/parser/satisfactory/types/structs/vec3.js.map +1 -0
- package/build/parser/satisfactory/types/structs/vec4.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/vec4.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/vec4.js +1 -0
- package/build/parser/satisfactory/types/structs/vec4.js.map +1 -0
- package/build/parser/stream/reworked/readable-stream-parser.d.ts +6 -5
- package/build/parser/stream/reworked/readable-stream-parser.d.ts.map +1 -0
- package/build/parser/stream/reworked/readable-stream-parser.js +21 -66
- package/build/parser/stream/reworked/readable-stream-parser.js.map +1 -0
- package/build/parser/stream/reworked/save-stream-json-stringifier.d.ts +1 -0
- package/build/parser/stream/reworked/save-stream-json-stringifier.d.ts.map +1 -0
- package/build/parser/stream/reworked/save-stream-json-stringifier.js +1 -0
- package/build/parser/stream/reworked/save-stream-json-stringifier.js.map +1 -0
- package/build/parser/stream/reworked/save-stream-writer.class.d.ts +3 -2
- package/build/parser/stream/reworked/save-stream-writer.class.d.ts.map +1 -0
- package/build/parser/stream/reworked/save-stream-writer.class.js +1 -0
- package/build/parser/stream/reworked/save-stream-writer.class.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1493 -0
- package/docs/classes/AbstractBaseProperty.html +6 -0
- package/docs/classes/AbstractProperty.html +4 -0
- package/docs/classes/ArrayProperty.html +13 -0
- package/docs/classes/BasicProperty.html +7 -0
- package/docs/classes/BlueprintConfigReader.html +35 -0
- package/docs/classes/BlueprintConfigWriter.html +37 -0
- package/docs/classes/BlueprintReader.html +36 -0
- package/docs/classes/BlueprintWriter.html +40 -0
- package/docs/classes/BoolProperty.html +13 -0
- package/docs/classes/ByteProperty.html +13 -0
- package/docs/classes/CompressionLibraryError.html +11 -0
- package/docs/classes/CorruptSaveError.html +11 -0
- package/docs/classes/DoubleProperty.html +13 -0
- package/docs/classes/EnumProperty.html +13 -0
- package/docs/classes/FloatProperty.html +13 -0
- package/docs/classes/Int32Property.html +13 -0
- package/docs/classes/Int64Property.html +13 -0
- package/docs/classes/Int8Property.html +13 -0
- package/docs/classes/MapProperty.html +17 -0
- package/docs/classes/ObjectProperty.html +13 -0
- package/docs/classes/Parser.html +35 -0
- package/docs/classes/ParserError.html +11 -0
- package/docs/classes/ReadableStreamParser.html +8 -0
- package/docs/classes/SatisfactorySave.html +8 -0
- package/docs/classes/SaveComponent.html +17 -0
- package/docs/classes/SaveEntity.html +23 -0
- package/docs/classes/SaveReader.html +43 -0
- package/docs/classes/SaveStreamJsonStringifier.html +4 -0
- package/docs/classes/SaveStreamWriter.html +16 -0
- package/docs/classes/SaveWriter.html +42 -0
- package/docs/classes/SetProperty.html +12 -0
- package/docs/classes/StrProperty.html +13 -0
- package/docs/classes/StructProperty.html +18 -0
- package/docs/classes/TextProperty.html +13 -0
- package/docs/classes/TimeoutError.html +11 -0
- package/docs/classes/Uint32Property.html +13 -0
- package/docs/classes/Uint64Property.html +13 -0
- package/docs/classes/Uint8Property.html +13 -0
- package/docs/classes/UnimplementedError.html +11 -0
- package/docs/classes/UnsupportedVersionError.html +11 -0
- package/docs/functions/DynamicStructPropertyValue.read.html +1 -0
- package/docs/functions/DynamicStructPropertyValue.write.html +1 -0
- package/docs/functions/FICFrameRange.Parse.html +1 -0
- package/docs/functions/FICFrameRange.Serialize.html +1 -0
- package/docs/functions/GUID.read.html +1 -0
- package/docs/functions/GUID.write.html +1 -0
- package/docs/functions/GUIDInfo.read.html +1 -0
- package/docs/functions/GUIDInfo.write.html +1 -0
- package/docs/functions/Level.ReadAllObjectContents.html +1 -0
- package/docs/functions/Level.ReadAllObjectHeaders.html +1 -0
- package/docs/functions/Level.ReadLevel.html +1 -0
- package/docs/functions/Level.ReadNObjectContents.html +1 -0
- package/docs/functions/Level.ReadNObjectHeaders.html +1 -0
- package/docs/functions/Level.SerializeAllObjectContents.html +1 -0
- package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -0
- package/docs/functions/Level.SerializeLevel.html +1 -0
- package/docs/functions/MD5Hash.read.html +1 -0
- package/docs/functions/MD5Hash.write.html +1 -0
- package/docs/functions/ObjectReference.read.html +1 -0
- package/docs/functions/ObjectReference.write.html +1 -0
- package/docs/functions/PropertiesList.ParseList.html +1 -0
- package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -0
- package/docs/functions/PropertiesList.SerializeList.html +1 -0
- package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -0
- package/docs/functions/SoftObjectReference.read.html +1 -0
- package/docs/functions/SoftObjectReference.write.html +1 -0
- package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -0
- package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -0
- package/docs/functions/Transform.Parse.html +1 -0
- package/docs/functions/Transform.ParseF.html +1 -0
- package/docs/functions/Transform.Serialize.html +1 -0
- package/docs/functions/Transform.SerializeF.html +1 -0
- package/docs/functions/col4.ParseBGRA.html +1 -0
- package/docs/functions/col4.ParseRGBA.html +1 -0
- package/docs/functions/col4.SerializeBGRA.html +1 -0
- package/docs/functions/col4.SerializeRGBA.html +1 -0
- package/docs/functions/isArrayProperty.html +1 -0
- package/docs/functions/isBoolProperty.html +1 -0
- package/docs/functions/isByteProperty.html +1 -0
- package/docs/functions/isDoubleProperty.html +1 -0
- package/docs/functions/isEnumProperty.html +1 -0
- package/docs/functions/isFloatProperty.html +1 -0
- package/docs/functions/isInt32Property.html +1 -0
- package/docs/functions/isInt64Property.html +1 -0
- package/docs/functions/isInt8Property.html +1 -0
- package/docs/functions/isMapProperty.html +1 -0
- package/docs/functions/isObjectProperty.html +1 -0
- package/docs/functions/isSaveComponent.html +1 -0
- package/docs/functions/isSaveEntity.html +1 -0
- package/docs/functions/isSetProperty.html +1 -0
- package/docs/functions/isStrProperty.html +1 -0
- package/docs/functions/isStructProperty.html +1 -0
- package/docs/functions/isTextProperty.html +1 -0
- package/docs/functions/isUInt64Property.html +1 -0
- package/docs/functions/isUint32Property.html +1 -0
- package/docs/functions/isUint8Property.html +1 -0
- package/docs/functions/vec2.Parse.html +1 -0
- package/docs/functions/vec2.ParseF.html +1 -0
- package/docs/functions/vec2.Serialize.html +1 -0
- package/docs/functions/vec2.SerializeF.html +1 -0
- package/docs/functions/vec3.Parse.html +1 -0
- package/docs/functions/vec3.ParseF.html +1 -0
- package/docs/functions/vec3.ParseInt.html +1 -0
- package/docs/functions/vec3.Serialize.html +1 -0
- package/docs/functions/vec3.SerializeF.html +1 -0
- package/docs/functions/vec3.SerializeInt.html +1 -0
- package/docs/functions/vec3.add.html +1 -0
- package/docs/functions/vec3.length.html +1 -0
- package/docs/functions/vec3.mult.html +1 -0
- package/docs/functions/vec3.norm.html +1 -0
- package/docs/functions/vec3.sub.html +1 -0
- package/docs/functions/vec4.Parse.html +1 -0
- package/docs/functions/vec4.ParseF.html +1 -0
- package/docs/functions/vec4.Serialize.html +1 -0
- package/docs/functions/vec4.SerializeF.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +146 -0
- package/docs/interfaces/Blueprint.html +6 -0
- package/docs/interfaces/BlueprintConfig.html +6 -0
- package/docs/interfaces/ModData.html +4 -0
- package/docs/interfaces/SatisfactoryModMetadata.html +4 -0
- package/docs/interfaces/SatisfactorySaveHeader.html +18 -0
- package/docs/interfaces/SaveComponentHeader.html +5 -0
- package/docs/interfaces/SaveEntityHeader.html +7 -0
- package/docs/modules/DynamicStructPropertyValue.html +3 -0
- package/docs/modules/FICFrameRange.html +3 -0
- package/docs/modules/GUID.html +3 -0
- package/docs/modules/GUIDInfo.html +3 -0
- package/docs/modules/Level.html +9 -0
- package/docs/modules/MD5Hash.html +3 -0
- package/docs/modules/ObjectReference.html +3 -0
- package/docs/modules/PropertiesList.html +5 -0
- package/docs/modules/SoftObjectReference.html +3 -0
- package/docs/modules/SpecialProperties.html +3 -0
- package/docs/modules/Transform.html +5 -0
- package/docs/modules/col4.html +5 -0
- package/docs/modules/vec2.html +5 -0
- package/docs/modules/vec3.html +12 -0
- package/docs/modules/vec4.html +5 -0
- package/docs/modules.html +123 -0
- package/docs/types/ArrayPropertyStructValueFields.html +1 -0
- package/docs/types/BasicMultipleStructPropertyValue.html +1 -0
- package/docs/types/BasicStructPropertyValue.html +1 -0
- package/docs/types/BlueprintHeader.html +1 -0
- package/docs/types/BoxStructPropertyValue.html +1 -0
- package/docs/types/BuildableSubsystemSpecialProperties.html +1 -0
- package/docs/types/BuildableTypeInstance.html +1 -0
- package/docs/types/BytePropertyValue.html +1 -0
- package/docs/types/ClientIdentityInfo.html +1 -0
- package/docs/types/ConveyorChainActorSpecialProperties.html +1 -0
- package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -0
- package/docs/types/ConveyorItemSpecialProperties.html +1 -0
- package/docs/types/DynamicStructPropertyValue-1.html +1 -0
- package/docs/types/EmptySpecialProperties.html +1 -0
- package/docs/types/FICFrameRange-1.html +1 -0
- package/docs/types/FICFrameRangeStructPropertyValue.html +1 -0
- package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -0
- package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -0
- package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -0
- package/docs/types/GUID-1.html +1 -0
- package/docs/types/GUIDInfo-1.html +1 -0
- package/docs/types/InventoryItemStructPropertyValue.html +1 -0
- package/docs/types/Level-1.html +1 -0
- package/docs/types/MAP_STRUCT_KEY_PROXY.html +1 -0
- package/docs/types/MD5Hash-1.html +1 -0
- package/docs/types/ObjectReference-1.html +1 -0
- package/docs/types/PlayerSpecialProperties.html +1 -0
- package/docs/types/PowerLineSpecialProperties.html +1 -0
- package/docs/types/PropertiesMap.html +1 -0
- package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -0
- package/docs/types/RoughSaveVersion.html +1 -0
- package/docs/types/SoftObjectReference-1.html +1 -0
- package/docs/types/SpecialAnyProperties.html +1 -0
- package/docs/types/TextPropertyValue.html +1 -0
- package/docs/types/Transform-1.html +1 -0
- package/docs/types/col4-1.html +1 -0
- package/docs/types/vec2-1.html +1 -0
- package/docs/types/vec3-1.html +1 -0
- package/docs/types/vec4-1.html +1 -0
- package/docs/variables/EDIT.html +1 -0
- package/package.json +5 -10
- package/build/parser/satisfactory/objects/DataFields.d.ts +0 -15
- package/build/parser/satisfactory/objects/DataFields.js +0 -491
- package/build/parser/satisfactory/objects/GUIDInfo.d.ts +0 -8
- package/build/parser/satisfactory/objects/GUIDInfo.js +0 -26
- package/build/parser/satisfactory/objects/SaveComponent.d.ts +0 -19
- package/build/parser/satisfactory/objects/SaveComponent.js +0 -31
- package/build/parser/satisfactory/objects/SaveEntity.d.ts +0 -30
- package/build/parser/satisfactory/objects/SaveEntity.js +0 -66
- package/build/parser/satisfactory/objects/SaveObject.d.ts +0 -24
- package/build/parser/satisfactory/objects/SaveObject.js +0 -33
- package/build/parser/satisfactory/objects/property/generic/ArrayProperty.d.ts +0 -21
- package/build/parser/satisfactory/objects/property/generic/ArrayProperty.js +0 -169
- package/build/parser/satisfactory/objects/property/generic/BasicProperty.d.ts +0 -25
- package/build/parser/satisfactory/objects/property/generic/BasicProperty.js +0 -27
- package/build/parser/satisfactory/objects/property/generic/BoolProperty.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/BoolProperty.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/ByteProperty.d.ts +0 -17
- package/build/parser/satisfactory/objects/property/generic/ByteProperty.js +0 -50
- package/build/parser/satisfactory/objects/property/generic/DoubleProperty.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/DoubleProperty.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/EnumProperty.d.ts +0 -19
- package/build/parser/satisfactory/objects/property/generic/EnumProperty.js +0 -33
- package/build/parser/satisfactory/objects/property/generic/FloatProperty.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/FloatProperty.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/Int32Property.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/Int32Property.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/Int64Property.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/Int64Property.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/Int8Property.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/Int8Property.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/MapProperty.d.ts +0 -21
- package/build/parser/satisfactory/objects/property/generic/MapProperty.js +0 -160
- package/build/parser/satisfactory/objects/property/generic/ObjectProperty.d.ts +0 -14
- package/build/parser/satisfactory/objects/property/generic/ObjectProperty.js +0 -35
- package/build/parser/satisfactory/objects/property/generic/SetProperty.d.ts +0 -11
- package/build/parser/satisfactory/objects/property/generic/SetProperty.js +0 -92
- package/build/parser/satisfactory/objects/property/generic/SoftObjectProperty.d.ts +0 -12
- package/build/parser/satisfactory/objects/property/generic/SoftObjectProperty.js +0 -25
- package/build/parser/satisfactory/objects/property/generic/StrProperty.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/StrProperty.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/StructProperty.d.ts +0 -66
- package/build/parser/satisfactory/objects/property/generic/StructProperty.js +0 -361
- package/build/parser/satisfactory/objects/property/generic/TextProperty.d.ts +0 -29
- package/build/parser/satisfactory/objects/property/generic/TextProperty.js +0 -109
- package/build/parser/satisfactory/objects/property/generic/Uint32Property.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/Uint32Property.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/Uint64Property.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/Uint64Property.js +0 -30
- package/build/parser/satisfactory/objects/property/generic/Uint8Property.d.ts +0 -13
- package/build/parser/satisfactory/objects/property/generic/Uint8Property.js +0 -30
- package/build/parser/satisfactory/objects/property/special/SpecialAnyProperty.d.ts +0 -52
- package/build/parser/satisfactory/objects/ue/MD5Hash.d.ts +0 -10
- package/build/parser/satisfactory/objects/ue/MD5Hash.js +0 -21
- package/build/parser/satisfactory/objects/values/GUID.d.ts +0 -7
- package/build/parser/satisfactory/objects/values/GUID.js +0 -21
- package/build/parser/satisfactory/objects/values/ObjectReference.d.ts +0 -10
- package/build/parser/satisfactory/objects/values/ObjectReference.js +0 -17
- package/build/parser/satisfactory/objects/values/SoftObjectReference.d.ts +0 -11
- package/build/parser/satisfactory/objects/values/SoftObjectReference.js +0 -19
- package/build/parser/satisfactory/structs/util.types.d.ts +0 -60
- package/build/parser/satisfactory/structs/util.types.js +0 -147
- package/build/parser/satisfactory/types/property/DataFields.d.ts +0 -15
- package/build/parser/satisfactory/types/property/DataFields.js +0 -493
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperty.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-writer.js","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/save-writer.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,8DAAsD;AACtD,oEAA0D;AAC1D,2DAAyG;AACzG,iDAAgG;AAChG,sDAAmD;AACnD,+CAAsC;AAEtC,+CAAsE;AAItE,MAAa,UAAW,SAAQ,8BAAU;IAEzC;QACC,KAAK,CAAC,0BAAS,CAAC,aAAa,CAAC,CAAC;IAChC,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,MAAkB,EAAE,MAA8B;QAE3E,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACtC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACvC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACvC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAC9C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,GAAG,wBAAU,CAAC,WAAW,CAAC,CAAC;QACjF,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAE3C,IAAI,MAAM,CAAC,cAAc,IAAI,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,UAA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CAAC,CAAC,QAAQ,CAAC,CAAC;QAE1C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;QAChE,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3D,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7B,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC;IACF,CAAC;AACF,CAAC,CAAC","sourcesContent":["import Pako from \"pako\";\nimport { Alignment } from \"../../byte/alignment.enum\";\nimport { ByteWriter } from \"../../byte/byte-writer.class\";\nimport { CompressionLibraryError, ParserError, UnsupportedVersionError } from \"../../error/parser.error\";\nimport { ChunkCompressionInfo, ChunkSummary, CompressionAlgorithmCode } from \"../../file.types\";\nimport { MD5Hash } from '../types/structs/MD5Hash';\nimport { Level } from './level.class';\nimport { SatisfactorySave } from \"./satisfactory-save\";\nimport { Grids, SaveBodyValidation, SaveReader } from \"./save-reader\";\nimport { SatisfactorySaveHeader } from \"./save.types\";\n\n\nexport class SaveWriter extends ByteWriter {\n\n\tconstructor() {\n\t\tsuper(Alignment.LITTLE_ENDIAN);\n\t}\n\n\tpublic static WriteHeader(writer: ByteWriter, header: SatisfactorySaveHeader): void {\n\n\t\twriter.writeInt32(header.saveHeaderType);\n\t\twriter.writeInt32(header.saveVersion);\n\t\twriter.writeInt32(header.buildVersion);\n\t\twriter.writeString(header.mapName);\n\t\twriter.writeString(header.mapOptions);\n\t\twriter.writeString(header.sessionName);\n\t\twriter.writeInt32(header.playDurationSeconds);\n\t\twriter.writeInt64(BigInt(header.saveDateTime) * 10000n + SaveReader.EPOCH_TICKS);\n\t\twriter.writeByte(header.sessionVisibility);\n\n\t\tif (header.saveHeaderType >= 7) {\n\t\t\twriter.writeInt32(header.fEditorObjectVersion!);\n\t\t}\n\t\tif (header.saveHeaderType >= 8) {\n\t\t\tif (header.modMetadata) {\n\t\t\t\twriter.writeString(JSON.stringify(header.modMetadata));\n\t\t\t} else {\n\t\t\t\twriter.writeString(header.rawModMetadataString!);\n\t\t\t}\n\t\t\twriter.writeInt32(header.isModdedSave!);\n\t\t}\n\t\tif (header.saveHeaderType >= 10) {\n\t\t\twriter.writeString(header.saveIdentifier!);\n\t\t}\n\n\t\t// U8 jumped directly to 13.\n\t\tif (header.saveHeaderType >= 11) {\n\t\t\twriter.writeInt32(header.partitionEnabledFlag ? 1 : 0);\n\t\t}\n\n\t\tif (header.saveHeaderType >= 12) {\n\t\t\tMD5Hash.write(writer, header.consistencyHashBytes!);\n\t\t}\n\n\t\t// 13 is U8 Experimental First Release\n\t\tif (header.saveHeaderType >= 13) {\n\t\t\twriter.writeInt32(header.creativeModeEnabled ? 1 : 0);\n\t\t}\n\n\t\tif (header.saveVersion >= 21) {\n\t\t\t// ready to write levels now.\n\t\t} else {\n\t\t\tthrow new UnsupportedVersionError(\"The save version is too old to be supported currently.\");\n\t\t}\n\t}\n\n\tpublic static WriteSaveBodyHash = (writer: ByteWriter, saveBodyValidation: SaveBodyValidation): void => {\n\t\twriter.writeInt32(0);\n\t\twriter.writeInt32(saveBodyValidation.version);\n\t\twriter.writeString('None');\n\t\twriter.writeInt32(0);\n\t\twriter.writeBytesArray(saveBodyValidation.hash1);\n\t\twriter.writeInt32(1);\n\t\twriter.writeString('None');\n\t\twriter.writeBytesArray(saveBodyValidation.hash2);\n\t}\n\n\tpublic static WriteGrids = (writer: ByteWriter, grids: Grids): void => {\n\t\tfor (const gridEntry of Object.entries(grids)) {\n\t\t\twriter.writeString(gridEntry[0]);\n\t\t\twriter.writeInt32(gridEntry[1].cellSize);\n\t\t\twriter.writeUint32(gridEntry[1].gridHash);\n\n\t\t\twriter.writeUint32(Object.values(gridEntry[1].children).length);\n\t\t\tfor (const child of Object.entries(gridEntry[1].children)) {\n\t\t\t\twriter.writeString(child[0]);\n\t\t\t\twriter.writeUint32(child[1]);\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic static WriteLevels(writer: ByteWriter, save: SatisfactorySave, buildVersion: number): void {\n\t\twriter.writeInt32(save.levels.length - 1);\n\t\tfor (const level of save.levels) {\n\t\t\tif (level.name !== save.header.mapName) {\n\t\t\t\twriter.writeString(level.name);\n\t\t\t}\n\t\t\tLevel.SerializeLevel(writer, level, buildVersion);\n\t\t}\n\t}\n\n\tpublic static GenerateCompressedChunksFromData(\n\t\tbufferArray: ArrayBuffer,\n\t\tcompressionInfo: ChunkCompressionInfo,\n\t\tonBinaryBeforeCompressing: (binary: ArrayBuffer) => void,\n\t\tonChunk: (chunk: Uint8Array) => void,\n\t\talignment: Alignment = Alignment.LITTLE_ENDIAN\n\t): ChunkSummary[] {\n\n\t\tconst totalUncompressedSize = bufferArray.byteLength;\n\n\t\tconst saveBody = new Uint8Array(bufferArray.byteLength + 8);\n\t\tsaveBody.set(new Uint8Array(bufferArray), 4);\n\t\tconst miniView = new DataView(saveBody.buffer);\n\t\tminiView.setInt32(0, totalUncompressedSize, alignment === Alignment.LITTLE_ENDIAN);\n\t\tonBinaryBeforeCompressing(saveBody.buffer);\n\n\t\t// collect slices of chunks with help of compression info for max chunk size\n\t\tlet handledByte = 0;\n\t\tconst chunkSummary: {\n\t\t\tuncompressedSize: number,\n\t\t\tcompressedSize: number\n\t\t}[] = [];\n\t\twhile (handledByte < saveBody.byteLength) {\n\n\t\t\t// create uncompressed chunk.\n\t\t\tconst uncompressedContentSize = Math.min(compressionInfo.maxUncompressedChunkContentSize, saveBody.byteLength - handledByte);\n\t\t\tconst uncompressedChunk = saveBody.buffer.slice(handledByte, handledByte + uncompressedContentSize);\n\n\t\t\t// deflate chunk while we're at it.\n\t\t\tlet compressedChunk: Uint8Array = new Uint8Array(0);\n\t\t\ttry {\n\t\t\t\tcompressedChunk = Pako.deflate(uncompressedChunk);\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t\tthrow new CompressionLibraryError(\"Could not compress save data. \" + err);\n\t\t\t}\n\n\t\t\tconst chunk = new Uint8Array(compressionInfo.chunkHeaderSize + compressedChunk.byteLength);\n\t\t\tchunk.set(compressedChunk, compressionInfo.chunkHeaderSize);\n\n\t\t\t// write header\n\t\t\tconst view = new DataView(chunk.buffer);\n\t\t\tview.setInt32(0, compressionInfo.packageFileTag, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(4, 0x22222222, alignment === Alignment.LITTLE_ENDIAN);\t\t//v1 header is 0x00000000, v2 is 0x22222222\n\t\t\tview.setInt32(8, compressionInfo.maxUncompressedChunkContentSize, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(12, 0, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setUint8(16, CompressionAlgorithmCode.ZLIB);\t// compression algo, came with U8, only present if header v2. Which means the header is actually 48 bytes long if header is not v2\n\t\t\tview.setInt32(17, compressedChunk.byteLength, alignment === Alignment.LITTLE_ENDIAN); // E0 3A 00 00 / 03 78 64 00\n\t\t\tview.setInt32(21, 0, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(25, uncompressedContentSize, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(29, 0, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(33, compressedChunk.byteLength, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(37, 0, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(41, uncompressedContentSize, alignment === Alignment.LITTLE_ENDIAN);\n\t\t\tview.setInt32(45, 0, alignment === Alignment.LITTLE_ENDIAN);\n\n\t\t\tonChunk(chunk);\n\t\t\tchunkSummary.push({\n\t\t\t\tuncompressedSize: uncompressedContentSize + compressionInfo.chunkHeaderSize,\n\t\t\t\tcompressedSize: compressedChunk.byteLength + compressionInfo.chunkHeaderSize\n\t\t\t});\n\t\t\thandledByte += uncompressedContentSize;\n\t\t}\n\n\t\treturn chunkSummary;\n\t}\n\n\tpublic generateChunks(\n\t\tcompressionInfo: ChunkCompressionInfo,\n\t\tposAfterHeader: number,\n\n\t\tonBinaryBeforeCompressing: (binary: ArrayBuffer) => void,\n\t\tonHeader: (header: Uint8Array) => void,\n\t\tonChunk: (chunk: Uint8Array) => void\n\t): ChunkSummary[] {\n\n\t\tif (posAfterHeader <= 0) {\n\t\t\tthrow new ParserError('ParserError', 'Seems like this buffer has no header. Please write the header first before you can generate chunks.');\n\t\t}\n\n\t\t// send plain header first.\n\t\tconst header = new Uint8Array(this.bufferArray.slice(0, posAfterHeader));\n\t\tonHeader(header);\n\n\t\t// create save body\n\t\tthis.bufferArray = this.bufferArray.slice(posAfterHeader);\n\t\tconst chunkSummary = SaveWriter.GenerateCompressedChunksFromData(this.bufferArray, compressionInfo, onBinaryBeforeCompressing, onChunk, this.alignment);\n\n\t\treturn chunkSummary;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save.types.d.ts","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/save.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGnD,MAAM,WAAW,OAAO;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,EAAE,CAAC;CACnB;AAGD,MAAM,WAAW,sBAAsB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save.types.js","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/save.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MD5Hash } from '../types/structs/MD5Hash';\n\n/** @public */\nexport interface ModData {\n Reference: string;\n Name: string;\n Version: string;\n}\n\n/** @public */\nexport interface SatisfactoryModMetadata {\n Version: number;\n FullMapName: string;\n Mods: ModData[];\n}\n\n/** @public */\nexport interface SatisfactorySaveHeader {\n saveHeaderType: number;\n saveVersion: number;\n buildVersion: number;\n mapName: string;\n mapOptions: string;\n sessionName: string;\n playDurationSeconds: number;\n saveDateTime: string;\n sessionVisibility: number;\n rawModMetadataString?: string;\n modMetadata?: SatisfactoryModMetadata;\n isModdedSave?: number;\n saveIdentifier?: string;\n fEditorObjectVersion?: number;\n partitionEnabledFlag?: boolean;\n consistencyHashBytes?: MD5Hash;\n creativeModeEnabled?: boolean;\n}\n\n/** @public */\nexport type RoughSaveVersion = '<U6' | 'U6/U7' | 'U8' | 'U1.0+';"]}
|
|
@@ -17,3 +17,4 @@ export declare class SaveComponent extends SaveObject implements SaveComponentHe
|
|
|
17
17
|
static SerializeHeader(writer: ByteWriter, component: SaveComponent): void;
|
|
18
18
|
static ParseData(component: SaveComponent, length: number, reader: BinaryReadable, buildVersion: number, typePath: string): void;
|
|
19
19
|
}
|
|
20
|
+
//# sourceMappingURL=SaveComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveComponent.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE5D,eAAO,MAAM,eAAe,QAAS,GAAG,KAAG,GAAG,IAAI,aAEjD,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC5D,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,aAAc,SAAQ,UAAW,YAAW,mBAAmB;IAKxD,QAAQ,EAAE,MAAM;IAAS,UAAU,EAAE,MAAM;IAAS,YAAY,EAAE,MAAM;IAAS,gBAAgB;IAJpH,gBAAuB,MAAM,KAAK;IAElC,SAAgB,IAAI,mBAAmB;gBAEpB,QAAQ,EAAE,MAAM,EAAS,UAAU,EAAE,MAAM,EAAS,YAAY,EAAE,MAAM,EAAS,gBAAgB,SAAK;WAI3G,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI;WAK7D,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa;WAK5D,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAGvI"}
|
|
@@ -0,0 +1 @@
|
|
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","sourcesContent":["import { BinaryReadable } from \"../../../byte/binary-readable.interface\";\nimport { ByteWriter } from \"../../../byte/byte-writer.class\";\nimport { SaveObject, SaveObjectHeader } from \"./SaveObject\";\n\nexport const isSaveComponent = (obj: any): obj is SaveComponent => {\n\treturn obj.type === 'SaveComponent';\n}\n\nexport interface SaveComponentHeader extends SaveObjectHeader {\n\tparentEntityName: string;\n}\n\nexport class SaveComponent extends SaveObject implements SaveComponentHeader {\n\tpublic static readonly TypeID = 0;\n\n\tpublic readonly type = 'SaveComponent';\n\n\tconstructor(public typePath: string, public rootObject: string, public instanceName: string, public parentEntityName = '') {\n\t\tsuper(typePath, rootObject, instanceName);\n\t}\n\n\tpublic static ParseHeader(reader: BinaryReadable, obj: SaveComponent): void {\n\t\tSaveObject.ParseHeader(reader, obj);\n\t\tobj.parentEntityName = reader.readString();\n\t}\n\n\tpublic static SerializeHeader(writer: ByteWriter, component: SaveComponent) {\n\t\tSaveObject.SerializeHeader(writer, component);\n\t\twriter.writeString(component.parentEntityName);\n\t}\n\n\tpublic static ParseData(component: SaveComponent, length: number, reader: BinaryReadable, buildVersion: number, typePath: string): void {\n\t\tSaveObject.ParseData(component, length, reader, buildVersion, typePath);\n\t}\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveEntity.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE5D,eAAO,MAAM,YAAY,QAAS,GAAG,KAAG,GAAG,IAAI,UAE9C,CAAA;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACzD,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;CAC1B;AAED,qBAAa,UAAW,SAAQ,UAAU;IAYtB,QAAQ,EAAE,MAAM;IAAS,UAAU,EAAE,MAAM;IAAS,YAAY,EAAE,MAAM;IAAS,gBAAgB;IAXpH,gBAAuB,MAAM,KAAK;IAElC,SAAgB,IAAI,gBAAgB;IAE7B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,eAAe,EAAE,CAAC;gBAElB,QAAQ,EAAE,MAAM,EAAS,UAAU,EAAE,MAAM,EAAS,YAAY,EAAE,MAAM,EAAS,gBAAgB,SAAK,EAAE,cAAc,GAAE,OAAe;WAc5I,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;WAO1D,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;WAiBnH,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI;WAQ7D,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;CAY/F"}
|
|
@@ -34,7 +34,7 @@ class SaveEntity extends SaveObject_1.SaveObject {
|
|
|
34
34
|
obj.wasPlacedInLevel = reader.readInt32() == 1;
|
|
35
35
|
}
|
|
36
36
|
static ParseData(entity, length, reader, buildVersion, typePath) {
|
|
37
|
-
const
|
|
37
|
+
const start = reader.getBufferPosition();
|
|
38
38
|
entity.parentObjectRoot = reader.readString();
|
|
39
39
|
entity.parentObjectName = reader.readString();
|
|
40
40
|
var componentCount = reader.readInt32();
|
|
@@ -42,7 +42,7 @@ class SaveEntity extends SaveObject_1.SaveObject {
|
|
|
42
42
|
var componentRef = ObjectReference_1.ObjectReference.read(reader);
|
|
43
43
|
entity.components.push(componentRef);
|
|
44
44
|
}
|
|
45
|
-
const remainingSize = length - (reader.getBufferPosition() -
|
|
45
|
+
const remainingSize = length - (reader.getBufferPosition() - start);
|
|
46
46
|
return SaveObject_1.SaveObject.ParseData(entity, remainingSize, reader, buildVersion, typePath);
|
|
47
47
|
}
|
|
48
48
|
static SerializeHeader(writer, entity) {
|
|
@@ -55,12 +55,13 @@ class SaveEntity extends SaveObject_1.SaveObject {
|
|
|
55
55
|
writer.writeString(entity.parentObjectRoot);
|
|
56
56
|
writer.writeString(entity.parentObjectName);
|
|
57
57
|
writer.writeInt32(entity.components.length);
|
|
58
|
-
for (const
|
|
59
|
-
writer.writeString(
|
|
60
|
-
writer.writeString(
|
|
58
|
+
for (const component of entity.components) {
|
|
59
|
+
writer.writeString(component.levelName);
|
|
60
|
+
writer.writeString(component.pathName);
|
|
61
61
|
}
|
|
62
62
|
SaveObject_1.SaveObject.SerializeData(writer, entity, buildVersion);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
exports.SaveEntity = SaveEntity;
|
|
66
66
|
SaveEntity.TypeID = 1;
|
|
67
|
+
//# sourceMappingURL=SaveEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveEntity.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveEntity.ts"],"names":[],"mappings":";;;AAGA,gEAA6D;AAC7D,oDAAiD;AACjD,6CAA4D;AAErD,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAqB,EAAE;IAC3D,OAAO,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC;AAClC,CAAC,CAAA;AAFY,QAAA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C,CAAC;IACpD,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,MAAkB,EAAE,MAAkB,EAAE,YAAoB;QACvF,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC5C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAE5C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5C,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC3C,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACxC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAED,uBAAU,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;;AArEF,gCAsEC;AArEuB,iBAAM,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["\nimport { BinaryReadable } from \"../../../byte/binary-readable.interface\";\nimport { ByteWriter } from \"../../../byte/byte-writer.class\";\nimport { ObjectReference } from \"../structs/ObjectReference\";\nimport { Transform } from '../structs/Transform';\nimport { SaveObject, SaveObjectHeader } from \"./SaveObject\";\n\nexport const isSaveEntity = (obj: any): obj is SaveEntity => {\n\treturn obj.type === 'SaveEntity';\n}\n\nexport interface SaveEntityHeader extends SaveObjectHeader {\n\tneedTransform: boolean;\n\ttransform: Transform;\n\twasPlacedInLevel: boolean;\n}\n\nexport class SaveEntity extends SaveObject {\n\tpublic static readonly TypeID = 1;\n\n\tpublic readonly type = 'SaveEntity';\n\n\tpublic needTransform: boolean;\n\tpublic transform: Transform;\n\tpublic wasPlacedInLevel: boolean;\n\tpublic parentObjectRoot: string;\n\tpublic parentObjectName: string;\n\tpublic components: ObjectReference[];\n\n\tconstructor(public typePath: string, public rootObject: string, public instanceName: string, public parentEntityName = '', needsTransform: boolean = false) {\n\t\tsuper(typePath, rootObject, instanceName);\n\t\tthis.needTransform = needsTransform;\n\t\tthis.wasPlacedInLevel = false;\n\t\tthis.parentObjectRoot = '';\n\t\tthis.parentObjectName = '';\n\t\tthis.transform = {\n\t\t\trotation: { x: 0, y: 0, z: 0, w: 1 },\n\t\t\ttranslation: { x: 0, y: 0, z: 0 },\n\t\t\tscale3d: { x: 1, y: 1, z: 1 }\n\t\t}\n\t\tthis.components = [];\n\t}\n\n\tpublic static ParseHeader(reader: BinaryReadable, obj: SaveEntity): void {\n\t\tSaveObject.ParseHeader(reader, obj);\n\t\tobj.needTransform = reader.readInt32() == 1;\n\t\tobj.transform = Transform.ParseF(reader);\n\t\tobj.wasPlacedInLevel = reader.readInt32() == 1;\n\t}\n\n\tpublic static ParseData(entity: SaveEntity, length: number, reader: BinaryReadable, buildVersion: number, typePath: string): void {\n\n\t\tconst start = reader.getBufferPosition();\n\n\t\tentity.parentObjectRoot = reader.readString();\n\t\tentity.parentObjectName = reader.readString();\n\n\t\tvar componentCount = reader.readInt32();\n\t\tfor (let i = 0; i < componentCount; i++) {\n\t\t\tvar componentRef = ObjectReference.read(reader);\n\t\t\tentity.components.push(componentRef);\n\t\t}\n\n\t\tconst remainingSize = length - (reader.getBufferPosition() - start);\n\t\treturn SaveObject.ParseData(entity, remainingSize, reader, buildVersion, typePath);\n\t}\n\n\tpublic static SerializeHeader(writer: ByteWriter, entity: SaveEntity): void {\n\t\tSaveObject.SerializeHeader(writer, entity);\n\n\t\twriter.writeInt32(entity.needTransform ? 1 : 0);\n\t\tTransform.SerializeF(writer, entity.transform);\n\t\twriter.writeInt32(entity.wasPlacedInLevel ? 1 : 0);\n\t}\n\n\tpublic static SerializeData(writer: ByteWriter, entity: SaveEntity, buildVersion: number): void {\n\t\twriter.writeString(entity.parentObjectRoot);\n\t\twriter.writeString(entity.parentObjectName);\n\n\t\twriter.writeInt32(entity.components.length);\n\t\tfor (const component of entity.components) {\n\t\t\twriter.writeString(component.levelName);\n\t\t\twriter.writeString(component.pathName);\n\t\t}\n\n\t\tSaveObject.SerializeData(writer, entity, buildVersion);\n\t}\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BinaryReadable } from "../../../byte/binary-readable.interface";
|
|
2
2
|
import { ByteWriter } from "../../../byte/byte-writer.class";
|
|
3
3
|
import { PropertiesMap } from "../property/generic/BasicProperty";
|
|
4
|
-
import {
|
|
4
|
+
import { SpecialAnyProperties } from '../property/special/SpecialAnyProperties';
|
|
5
5
|
export interface SaveObjectHeader {
|
|
6
6
|
typePath: string;
|
|
7
7
|
rootObject: string;
|
|
@@ -12,7 +12,7 @@ export declare abstract class SaveObject implements SaveObjectHeader {
|
|
|
12
12
|
rootObject: string;
|
|
13
13
|
instanceName: string;
|
|
14
14
|
properties: PropertiesMap;
|
|
15
|
-
specialProperties:
|
|
15
|
+
specialProperties: SpecialAnyProperties;
|
|
16
16
|
trailingData: number[];
|
|
17
17
|
objectVersion: number;
|
|
18
18
|
unknownType2: number;
|
|
@@ -22,3 +22,4 @@ export declare abstract class SaveObject implements SaveObjectHeader {
|
|
|
22
22
|
static ParseData(obj: SaveObject, length: number, reader: BinaryReadable, buildVersion: number, typePath: string): void;
|
|
23
23
|
static SerializeData(writer: any, obj: SaveObject, buildVersion: number): void;
|
|
24
24
|
}
|
|
25
|
+
//# sourceMappingURL=SaveObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveObject.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAGhF,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,8BAAsB,UAAW,YAAW,gBAAgB;IASxC,QAAQ,EAAE,MAAM;IAAS,UAAU,EAAE,MAAM;IAAS,YAAY,EAAE,MAAM;IAPpF,UAAU,EAAE,aAAa,CAAM;IAC/B,iBAAiB,EAAE,oBAAoB,CAAM;IAC7C,YAAY,EAAE,MAAM,EAAE,CAAM;IAE5B,aAAa,EAAE,MAAM,CAAK;IAC1B,YAAY,EAAE,MAAM,CAAK;gBAEb,QAAQ,EAAE,MAAM,EAAS,UAAU,EAAE,MAAM,EAAS,YAAY,EAAE,MAAM;IAI3F,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;IAM3E,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;WAM7D,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;WAkBhH,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;CAMrF"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SaveObject = void 0;
|
|
4
|
-
const
|
|
4
|
+
const parser_error_1 = require("../../../error/parser.error");
|
|
5
|
+
const PropertiesList_1 = require("../property/PropertiesList");
|
|
6
|
+
const SpecialProperties_1 = require("../property/special/SpecialProperties");
|
|
5
7
|
class SaveObject {
|
|
6
8
|
constructor(typePath, rootObject, instanceName) {
|
|
7
9
|
this.typePath = typePath;
|
|
@@ -24,10 +26,25 @@ class SaveObject {
|
|
|
24
26
|
writer.writeString(obj.instanceName);
|
|
25
27
|
}
|
|
26
28
|
static ParseData(obj, length, reader, buildVersion, typePath) {
|
|
27
|
-
|
|
29
|
+
const start = reader.getBufferPosition();
|
|
30
|
+
PropertiesList_1.PropertiesList.ParseList(obj, length, reader, buildVersion, typePath);
|
|
31
|
+
reader.readInt32();
|
|
32
|
+
let remainingSize = length - (reader.getBufferPosition() - start);
|
|
33
|
+
obj.specialProperties = SpecialProperties_1.SpecialProperties.ParseClassSpecificSpecialProperties(reader, typePath, remainingSize);
|
|
34
|
+
remainingSize = length - (reader.getBufferPosition() - start);
|
|
35
|
+
if (remainingSize > 0) {
|
|
36
|
+
obj.trailingData = Array.from(reader.readBytes(remainingSize));
|
|
37
|
+
}
|
|
38
|
+
else if (remainingSize < 0) {
|
|
39
|
+
throw new parser_error_1.ParserError('ParserError', `Unexpected. Read more bytes than are indicated for entity ${obj.instanceName}. bytes left to read is ${remainingSize}`);
|
|
40
|
+
}
|
|
28
41
|
}
|
|
29
42
|
static SerializeData(writer, obj, buildVersion) {
|
|
30
|
-
|
|
43
|
+
PropertiesList_1.PropertiesList.SerializeList(obj, writer, buildVersion, obj.typePath);
|
|
44
|
+
writer.writeInt32(0);
|
|
45
|
+
SpecialProperties_1.SpecialProperties.SerializeClassSpecificSpecialProperties(writer, obj.typePath, obj.specialProperties);
|
|
46
|
+
writer.writeBytesArray(obj.trailingData);
|
|
31
47
|
}
|
|
32
48
|
}
|
|
33
49
|
exports.SaveObject = SaveObject;
|
|
50
|
+
//# sourceMappingURL=SaveObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveObject.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveObject.ts"],"names":[],"mappings":";;;AAEA,8DAA0D;AAC1D,+DAA4D;AAG5D,6EAA0E;AAQ1E,MAAsB,UAAU;IAS/B,YAAmB,QAAgB,EAAS,UAAkB,EAAS,YAAo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CAAC,CAAC;QAE/G,aAAa,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAC,CAAC;QAC9D,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;YACvB,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QAChE,CAAC;aAAM,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,0BAAW,CAAC,aAAa,EAAE,6DAA6D,GAAG,CAAC,YAAY,2BAA2B,aAAa,EAAE,CAAC,CAAC;QAC/J,CAAC;IACF,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,MAAW,EAAE,GAAe,EAAE,YAAoB;QAC7E,+BAAc,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QACtE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrB,qCAAiB,CAAC,uCAAuC,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACvG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;CACD;AAjDD,gCAiDC","sourcesContent":["import { BinaryReadable } from \"../../../byte/binary-readable.interface\";\nimport { ByteWriter } from \"../../../byte/byte-writer.class\";\nimport { ParserError } from '../../../error/parser.error';\nimport { PropertiesList } from '../property/PropertiesList';\nimport { PropertiesMap } from \"../property/generic/BasicProperty\";\nimport { SpecialAnyProperties } from '../property/special/SpecialAnyProperties';\nimport { SpecialProperties } from '../property/special/SpecialProperties';\n\nexport interface SaveObjectHeader {\n\ttypePath: string;\n\trootObject: string;\n\tinstanceName: string;\n}\n\nexport abstract class SaveObject implements SaveObjectHeader {\n\n\tpublic properties: PropertiesMap = {};\n\tpublic specialProperties: SpecialAnyProperties = {};\n\tpublic trailingData: number[] = [];\n\n\tpublic objectVersion: number = 0;\n\tpublic unknownType2: number = 0;\n\n\tconstructor(public typePath: string, public rootObject: string, public instanceName: string) {\n\n\t}\n\n\tprotected static ParseHeader(reader: BinaryReadable, obj: SaveObject): void {\n\t\tobj.typePath = reader.readString();\n\t\tobj.rootObject = reader.readString();\n\t\tobj.instanceName = reader.readString();\n\t}\n\n\tprotected static SerializeHeader(writer: ByteWriter, obj: SaveObject): void {\n\t\twriter.writeString(obj.typePath);\n\t\twriter.writeString(obj.rootObject);\n\t\twriter.writeString(obj.instanceName);\n\t}\n\n\tpublic static ParseData(obj: SaveObject, length: number, reader: BinaryReadable, buildVersion: number, typePath: string): void {\n\t\tconst start = reader.getBufferPosition();\n\n\t\tPropertiesList.ParseList(obj, length, reader, buildVersion, typePath);\n\n\t\treader.readInt32(); // 0\n\n\t\tlet remainingSize = length - (reader.getBufferPosition() - start);\n\t\tobj.specialProperties = SpecialProperties.ParseClassSpecificSpecialProperties(reader, typePath, remainingSize);\n\n\t\tremainingSize = length - (reader.getBufferPosition() - start);\n\t\tif (remainingSize > 0) {\n\t\t\tobj.trailingData = Array.from(reader.readBytes(remainingSize));\n\t\t} else if (remainingSize < 0) {\n\t\t\tthrow new ParserError('ParserError', `Unexpected. Read more bytes than are indicated for entity ${obj.instanceName}. bytes left to read is ${remainingSize}`);\n\t\t}\n\t}\n\n\tpublic static SerializeData(writer: any, obj: SaveObject, buildVersion: number): void {\n\t\tPropertiesList.SerializeList(obj, writer, buildVersion, obj.typePath);\n\t\twriter.writeInt32(0);\n\t\tSpecialProperties.SerializeClassSpecificSpecialProperties(writer, obj.typePath, obj.specialProperties);\n\t\twriter.writeBytesArray(obj.trailingData);\n\t}\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BinaryReadable } from '../../../byte/binary-readable.interface';
|
|
2
|
+
import { ByteWriter } from '../../../byte/byte-writer.class';
|
|
3
|
+
import { SaveWriter } from '../../save/save-writer';
|
|
4
|
+
import { SaveObject } from '../objects/SaveObject';
|
|
5
|
+
import { AbstractBaseProperty } from './generic/BasicProperty';
|
|
6
|
+
export declare namespace PropertiesList {
|
|
7
|
+
const ParseList: (obj: SaveObject, length: number, reader: BinaryReadable, buildVersion: number, typePath: string) => void;
|
|
8
|
+
const SerializeList: (obj: SaveObject, writer: SaveWriter, buildVersion: number, typePath: string) => void;
|
|
9
|
+
const ParseSingleProperty: (reader: BinaryReadable, buildVersion: number, propertyName: string) => AbstractBaseProperty;
|
|
10
|
+
const SerializeSingleProperty: (writer: ByteWriter, property: AbstractBaseProperty, propertyName: string, buildVersion: number) => void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=PropertiesList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertiesList.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/property/PropertiesList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAqB/D,yBAAiB,cAAc,CAAC;IAExB,MAAM,SAAS,QAAS,UAAU,UAAU,MAAM,UAAU,cAAc,gBAAgB,MAAM,YAAY,MAAM,KAAG,IAyB3H,CAAA;IAEM,MAAM,aAAa,QAAS,UAAU,UAAU,UAAU,gBAAgB,MAAM,YAAY,MAAM,KAAG,IAM3G,CAAA;IAEM,MAAM,mBAAmB,WAAY,cAAc,gBAAgB,MAAM,gBAAgB,MAAM,KAAG,oBA4HxG,CAAA;IAEM,MAAM,uBAAuB,WAAY,UAAU,YAAY,oBAAoB,gBAAgB,MAAM,gBAAgB,MAAM,KAAG,IA4HxI,CAAA;CACD"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertiesList = void 0;
|
|
4
|
+
const parser_error_1 = require("../../../error/parser.error");
|
|
5
|
+
const ArrayProperty_1 = require("./generic/ArrayProperty");
|
|
6
|
+
const BoolProperty_1 = require("./generic/BoolProperty");
|
|
7
|
+
const ByteProperty_1 = require("./generic/ByteProperty");
|
|
8
|
+
const DoubleProperty_1 = require("./generic/DoubleProperty");
|
|
9
|
+
const EnumProperty_1 = require("./generic/EnumProperty");
|
|
10
|
+
const FloatProperty_1 = require("./generic/FloatProperty");
|
|
11
|
+
const Int32Property_1 = require("./generic/Int32Property");
|
|
12
|
+
const Int64Property_1 = require("./generic/Int64Property");
|
|
13
|
+
const Int8Property_1 = require("./generic/Int8Property");
|
|
14
|
+
const MapProperty_1 = require("./generic/MapProperty");
|
|
15
|
+
const ObjectProperty_1 = require("./generic/ObjectProperty");
|
|
16
|
+
const SetProperty_1 = require("./generic/SetProperty");
|
|
17
|
+
const SoftObjectProperty_1 = require("./generic/SoftObjectProperty");
|
|
18
|
+
const StrProperty_1 = require("./generic/StrProperty");
|
|
19
|
+
const StructProperty_1 = require("./generic/StructProperty");
|
|
20
|
+
const TextProperty_1 = require("./generic/TextProperty");
|
|
21
|
+
const Uint32Property_1 = require("./generic/Uint32Property");
|
|
22
|
+
const Uint64Property_1 = require("./generic/Uint64Property");
|
|
23
|
+
const Uint8Property_1 = require("./generic/Uint8Property");
|
|
24
|
+
var PropertiesList;
|
|
25
|
+
(function (PropertiesList) {
|
|
26
|
+
PropertiesList.ParseList = (obj, length, reader, buildVersion, typePath) => {
|
|
27
|
+
obj.properties = {};
|
|
28
|
+
if (length === 0) {
|
|
29
|
+
console.warn(`properties length for object ${obj.instanceName} was indicated as 0. Which is suspicious. Skipping object properties.`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let propertyName = reader.readString();
|
|
33
|
+
while (propertyName !== 'None') {
|
|
34
|
+
const parsedProperty = PropertiesList.ParseSingleProperty(reader, buildVersion, propertyName);
|
|
35
|
+
if (obj.properties[propertyName]) {
|
|
36
|
+
if (!Array.isArray(obj.properties[propertyName])) {
|
|
37
|
+
obj.properties[propertyName] = [obj.properties[propertyName]];
|
|
38
|
+
}
|
|
39
|
+
obj.properties[propertyName].push(parsedProperty);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
obj.properties[propertyName] = parsedProperty;
|
|
43
|
+
}
|
|
44
|
+
propertyName = reader.readString();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
PropertiesList.SerializeList = (obj, writer, buildVersion, typePath) => {
|
|
48
|
+
for (const property of Object.values(obj.properties).flatMap(val => Array.isArray(val) ? val : [val])) {
|
|
49
|
+
writer.writeString(property.name);
|
|
50
|
+
PropertiesList.SerializeSingleProperty(writer, property, property.name, buildVersion);
|
|
51
|
+
}
|
|
52
|
+
writer.writeString('None');
|
|
53
|
+
};
|
|
54
|
+
PropertiesList.ParseSingleProperty = (reader, buildVersion, propertyName) => {
|
|
55
|
+
let currentProperty = {};
|
|
56
|
+
const propertyType = reader.readString();
|
|
57
|
+
const binarySize = reader.readInt32();
|
|
58
|
+
const index = reader.readInt32();
|
|
59
|
+
const before = reader.getBufferPosition();
|
|
60
|
+
let overhead = 0;
|
|
61
|
+
switch (propertyType) {
|
|
62
|
+
case 'BoolProperty':
|
|
63
|
+
currentProperty = BoolProperty_1.BoolProperty.Parse(reader, propertyType, index);
|
|
64
|
+
overhead = BoolProperty_1.BoolProperty.CalcOverhead(currentProperty);
|
|
65
|
+
break;
|
|
66
|
+
case 'ByteProperty':
|
|
67
|
+
currentProperty = ByteProperty_1.ByteProperty.Parse(reader, propertyType, index);
|
|
68
|
+
overhead = ByteProperty_1.ByteProperty.CalcOverhead(currentProperty);
|
|
69
|
+
break;
|
|
70
|
+
case 'Int8Property':
|
|
71
|
+
currentProperty = Int8Property_1.Int8Property.Parse(reader, propertyType, index);
|
|
72
|
+
overhead = Int8Property_1.Int8Property.CalcOverhead(currentProperty);
|
|
73
|
+
break;
|
|
74
|
+
case 'UInt8Property':
|
|
75
|
+
currentProperty = Uint8Property_1.Uint8Property.Parse(reader, propertyType, index);
|
|
76
|
+
overhead = Uint8Property_1.Uint8Property.CalcOverhead(currentProperty);
|
|
77
|
+
break;
|
|
78
|
+
case 'IntProperty':
|
|
79
|
+
case 'Int32Property':
|
|
80
|
+
currentProperty = Int32Property_1.Int32Property.Parse(reader, propertyType, index);
|
|
81
|
+
overhead = Int32Property_1.Int32Property.CalcOverhead(currentProperty);
|
|
82
|
+
break;
|
|
83
|
+
case 'UInt32Property':
|
|
84
|
+
currentProperty = Uint32Property_1.Uint32Property.Parse(reader, propertyType, index);
|
|
85
|
+
overhead = Uint32Property_1.Uint32Property.CalcOverhead(currentProperty);
|
|
86
|
+
break;
|
|
87
|
+
case 'Int64Property':
|
|
88
|
+
currentProperty = Int64Property_1.Int64Property.Parse(reader, propertyType, index);
|
|
89
|
+
overhead = Int64Property_1.Int64Property.CalcOverhead(currentProperty);
|
|
90
|
+
break;
|
|
91
|
+
case 'UInt64Property':
|
|
92
|
+
currentProperty = Uint64Property_1.Uint64Property.Parse(reader, propertyType, index);
|
|
93
|
+
break;
|
|
94
|
+
case 'SingleProperty':
|
|
95
|
+
case 'FloatProperty':
|
|
96
|
+
currentProperty = FloatProperty_1.FloatProperty.Parse(reader, propertyType, index);
|
|
97
|
+
overhead = FloatProperty_1.FloatProperty.CalcOverhead(currentProperty);
|
|
98
|
+
break;
|
|
99
|
+
case 'DoubleProperty':
|
|
100
|
+
currentProperty = DoubleProperty_1.DoubleProperty.Parse(reader, propertyType, index);
|
|
101
|
+
overhead = DoubleProperty_1.DoubleProperty.CalcOverhead(currentProperty);
|
|
102
|
+
break;
|
|
103
|
+
case 'StrProperty':
|
|
104
|
+
case 'NameProperty':
|
|
105
|
+
currentProperty = StrProperty_1.StrProperty.Parse(reader, propertyType, index);
|
|
106
|
+
overhead = StrProperty_1.StrProperty.CalcOverhead(currentProperty);
|
|
107
|
+
break;
|
|
108
|
+
case 'ObjectProperty':
|
|
109
|
+
case 'InterfaceProperty':
|
|
110
|
+
currentProperty = ObjectProperty_1.ObjectProperty.Parse(reader, propertyType, index);
|
|
111
|
+
overhead = ObjectProperty_1.ObjectProperty.CalcOverhead(currentProperty);
|
|
112
|
+
break;
|
|
113
|
+
case 'SoftObjectProperty':
|
|
114
|
+
currentProperty = SoftObjectProperty_1.SoftObjectProperty.Parse(reader, propertyType, index);
|
|
115
|
+
overhead = SoftObjectProperty_1.SoftObjectProperty.CalcOverhead(currentProperty);
|
|
116
|
+
break;
|
|
117
|
+
case 'EnumProperty':
|
|
118
|
+
currentProperty = EnumProperty_1.EnumProperty.Parse(reader, propertyType, index);
|
|
119
|
+
overhead = EnumProperty_1.EnumProperty.CalcOverhead(currentProperty);
|
|
120
|
+
break;
|
|
121
|
+
case 'StructProperty':
|
|
122
|
+
currentProperty = StructProperty_1.StructProperty.Parse(reader, propertyType, index, binarySize);
|
|
123
|
+
overhead = StructProperty_1.StructProperty.CalcOverhead(currentProperty);
|
|
124
|
+
break;
|
|
125
|
+
case 'ArrayProperty':
|
|
126
|
+
currentProperty = ArrayProperty_1.ArrayProperty.Parse(reader, propertyType, index, propertyName);
|
|
127
|
+
overhead = ArrayProperty_1.ArrayProperty.CalcOverhead(currentProperty);
|
|
128
|
+
break;
|
|
129
|
+
case 'MapProperty':
|
|
130
|
+
currentProperty = MapProperty_1.MapProperty.Parse(reader, propertyName, buildVersion, binarySize);
|
|
131
|
+
overhead = MapProperty_1.MapProperty.CalcOverhead(currentProperty);
|
|
132
|
+
break;
|
|
133
|
+
case 'TextProperty':
|
|
134
|
+
currentProperty = TextProperty_1.TextProperty.Parse(reader, propertyType, index);
|
|
135
|
+
overhead = TextProperty_1.TextProperty.CalcOverhead(currentProperty);
|
|
136
|
+
break;
|
|
137
|
+
case 'SetProperty':
|
|
138
|
+
currentProperty = SetProperty_1.SetProperty.Parse(reader, propertyType, index, propertyName);
|
|
139
|
+
overhead = SetProperty_1.SetProperty.CalcOverhead(currentProperty);
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
throw new Error(`Unimplemented type ${propertyType}`);
|
|
143
|
+
}
|
|
144
|
+
currentProperty.name = propertyName;
|
|
145
|
+
const readBytes = reader.getBufferPosition() - before - overhead;
|
|
146
|
+
if (readBytes !== binarySize) {
|
|
147
|
+
console.warn(`possibly corrupt. Read ${readBytes} for ${propertyType} ${propertyName}, but ${binarySize} were indicated.`);
|
|
148
|
+
throw new parser_error_1.ParserError('ParserError', `possibly corrupt. Read ${readBytes} bytes for ${propertyType} ${propertyName}, but ${binarySize} bytes were indicated.`);
|
|
149
|
+
}
|
|
150
|
+
return currentProperty;
|
|
151
|
+
};
|
|
152
|
+
PropertiesList.SerializeSingleProperty = (writer, property, propertyName, buildVersion) => {
|
|
153
|
+
writer.writeString(property.ueType);
|
|
154
|
+
const lenIndicator = writer.getBufferPosition();
|
|
155
|
+
writer.writeInt32(0);
|
|
156
|
+
writer.writeInt32(property.index ?? 0);
|
|
157
|
+
const start = writer.getBufferPosition();
|
|
158
|
+
let overhead = 0;
|
|
159
|
+
switch (property.ueType) {
|
|
160
|
+
case 'BoolProperty':
|
|
161
|
+
overhead = BoolProperty_1.BoolProperty.CalcOverhead(property);
|
|
162
|
+
BoolProperty_1.BoolProperty.Serialize(writer, property);
|
|
163
|
+
break;
|
|
164
|
+
case 'ByteProperty':
|
|
165
|
+
overhead = ByteProperty_1.ByteProperty.CalcOverhead(property);
|
|
166
|
+
ByteProperty_1.ByteProperty.Serialize(writer, property);
|
|
167
|
+
break;
|
|
168
|
+
case 'Int8Property':
|
|
169
|
+
overhead = Int8Property_1.Int8Property.CalcOverhead(property);
|
|
170
|
+
Int8Property_1.Int8Property.Serialize(writer, property);
|
|
171
|
+
break;
|
|
172
|
+
case 'UInt8Property':
|
|
173
|
+
overhead = Uint8Property_1.Uint8Property.CalcOverhead(property);
|
|
174
|
+
Uint8Property_1.Uint8Property.Serialize(writer, property);
|
|
175
|
+
break;
|
|
176
|
+
case 'IntProperty':
|
|
177
|
+
case 'Int32Property':
|
|
178
|
+
overhead = Int32Property_1.Int32Property.CalcOverhead(property);
|
|
179
|
+
Int32Property_1.Int32Property.Serialize(writer, property);
|
|
180
|
+
break;
|
|
181
|
+
case 'UInt32Property':
|
|
182
|
+
overhead = Uint32Property_1.Uint32Property.CalcOverhead(property);
|
|
183
|
+
Uint32Property_1.Uint32Property.Serialize(writer, property);
|
|
184
|
+
break;
|
|
185
|
+
case 'Int64Property':
|
|
186
|
+
overhead = Int64Property_1.Int64Property.CalcOverhead(property);
|
|
187
|
+
Int64Property_1.Int64Property.Serialize(writer, property);
|
|
188
|
+
break;
|
|
189
|
+
case 'UInt64PRoperty':
|
|
190
|
+
overhead = Uint64Property_1.Uint64Property.CalcOverhead(property);
|
|
191
|
+
Uint64Property_1.Uint64Property.Serialize(writer, property);
|
|
192
|
+
break;
|
|
193
|
+
case 'SingleProperty':
|
|
194
|
+
case 'FloatProperty':
|
|
195
|
+
overhead = FloatProperty_1.FloatProperty.CalcOverhead(property);
|
|
196
|
+
FloatProperty_1.FloatProperty.Serialize(writer, property);
|
|
197
|
+
break;
|
|
198
|
+
case 'DoubleProperty':
|
|
199
|
+
overhead = DoubleProperty_1.DoubleProperty.CalcOverhead(property);
|
|
200
|
+
DoubleProperty_1.DoubleProperty.Serialize(writer, property);
|
|
201
|
+
break;
|
|
202
|
+
case 'StrProperty':
|
|
203
|
+
case 'NameProperty':
|
|
204
|
+
overhead = StrProperty_1.StrProperty.CalcOverhead(property);
|
|
205
|
+
StrProperty_1.StrProperty.Serialize(writer, property);
|
|
206
|
+
break;
|
|
207
|
+
case 'ObjectProperty':
|
|
208
|
+
case 'InterfaceProperty':
|
|
209
|
+
overhead = ObjectProperty_1.ObjectProperty.CalcOverhead(property);
|
|
210
|
+
ObjectProperty_1.ObjectProperty.Serialize(writer, property);
|
|
211
|
+
break;
|
|
212
|
+
case 'SoftObjectProperty':
|
|
213
|
+
overhead = SoftObjectProperty_1.SoftObjectProperty.CalcOverhead(property);
|
|
214
|
+
SoftObjectProperty_1.SoftObjectProperty.Serialize(writer, property);
|
|
215
|
+
break;
|
|
216
|
+
case 'EnumProperty':
|
|
217
|
+
overhead = EnumProperty_1.EnumProperty.CalcOverhead(property);
|
|
218
|
+
EnumProperty_1.EnumProperty.Serialize(writer, property);
|
|
219
|
+
break;
|
|
220
|
+
case 'ByteProperty':
|
|
221
|
+
overhead = ByteProperty_1.ByteProperty.CalcOverhead(property);
|
|
222
|
+
ByteProperty_1.ByteProperty.Serialize(writer, property);
|
|
223
|
+
break;
|
|
224
|
+
case 'StructProperty':
|
|
225
|
+
overhead = StructProperty_1.StructProperty.CalcOverhead(property);
|
|
226
|
+
StructProperty_1.StructProperty.Serialize(writer, property);
|
|
227
|
+
break;
|
|
228
|
+
case 'ArrayProperty':
|
|
229
|
+
overhead = ArrayProperty_1.ArrayProperty.CalcOverhead(property);
|
|
230
|
+
ArrayProperty_1.ArrayProperty.Serialize(writer, property, propertyName);
|
|
231
|
+
break;
|
|
232
|
+
case 'MapProperty':
|
|
233
|
+
overhead = MapProperty_1.MapProperty.CalcOverhead(property);
|
|
234
|
+
MapProperty_1.MapProperty.Serialize(writer, property);
|
|
235
|
+
break;
|
|
236
|
+
case 'TextProperty':
|
|
237
|
+
overhead = TextProperty_1.TextProperty.CalcOverhead(property);
|
|
238
|
+
TextProperty_1.TextProperty.Serialize(writer, property);
|
|
239
|
+
break;
|
|
240
|
+
case 'SetProperty':
|
|
241
|
+
overhead = SetProperty_1.SetProperty.CalcOverhead(property);
|
|
242
|
+
SetProperty_1.SetProperty.Serialize(writer, property);
|
|
243
|
+
break;
|
|
244
|
+
default:
|
|
245
|
+
throw new Error(`Unimplemented type ${property.type}`);
|
|
246
|
+
}
|
|
247
|
+
writer.writeBinarySizeFromPosition(lenIndicator, start + overhead);
|
|
248
|
+
};
|
|
249
|
+
})(PropertiesList || (exports.PropertiesList = PropertiesList = {}));
|
|
250
|
+
//# sourceMappingURL=PropertiesList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertiesList.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/property/PropertiesList.ts"],"names":[],"mappings":";;;AAEA,8DAA0D;AAG1D,2DAAwD;AAExD,yDAAsD;AACtD,yDAAsD;AACtD,6DAA0D;AAC1D,yDAAsD;AACtD,2DAAwD;AACxD,2DAAwD;AACxD,2DAAwD;AACxD,yDAAsD;AACtD,uDAAoD;AACpD,6DAA0D;AAC1D,uDAAoD;AACpD,qEAAkE;AAClE,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,6DAA0D;AAC1D,6DAA0D;AAC1D,2DAAwD;AAGxD,IAAiB,cAAc,CAgS9B;AAhSD,WAAiB,cAAc;IAEjB,wBAAS,GAAG,CAAC,GAAe,EAAE,MAAc,EAAE,MAAsB,EAAE,YAAoB,EAAE,QAAgB,EAAQ,EAAE;QAElI,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC;QACpB,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,gCAAgC,GAAG,CAAC,YAAY,uEAAuE,CAAC,CAAC;YACtI,OAAO;QACR,CAAC;QAED,IAAI,YAAY,GAAW,MAAM,CAAC,UAAU,EAAE,CAAC;QAC/C,OAAO,YAAY,KAAK,MAAM,EAAE,CAAC;YAChC,MAAM,cAAc,GAAG,cAAc,CAAC,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;YAG9F,IAAI,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;oBAClD,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YAAY,CAAC,QAA8B,CAAC,CAAC;gBACtE,6BAAa,CAAC,SAAS,CAAC,MAAM,EAAE,QAA8B,EAAE,YAAY,CAAC,CAAC;gBAC9E,MAAM;YAEP,KAAK,aAAa;gBACjB,QAAQ,GAAG,yBAAW,CAAC,YAAY,CAAC,QAAuB,CAAC,CAAC;gBAC7D,yBAAW,CAAC,SAAS,CAAC,MAAM,EAAE,QAAuB,CAAC,CAAC;gBACvD,MAAM;YAEP,KAAK,cAAc;gBAClB,QAAQ,GAAG,2BAAY,CAAC,YAAY,CAAC,QAAwB,CAAC,CAAC;gBAC/D,2BAAY,CAAC,SAAS,CAAC,MAAM,EAAE,QAAwB,CAAC,CAAC;gBACzD,MAAM;YAEP,KAAK,aAAa;gBACjB,QAAQ,GAAG,yBAAW,CAAC,YAAY,CAAC,QAA4B,CAAC,CAAC;gBAClE,yBAAW,CAAC,SAAS,CAAC,MAAM,EAAE,QAA4B,CAAC,CAAC;gBAC5D,MAAM;YAEP;gBACC,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC;QAGD,MAAM,CAAC,2BAA2B,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;IACpE,CAAC,CAAA;AACF,CAAC,EAhSgB,cAAc,8BAAd,cAAc,QAgS9B","sourcesContent":["import { BinaryReadable } from '../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../byte/byte-writer.class';\nimport { ParserError } from '../../../error/parser.error';\nimport { SaveWriter } from '../../save/save-writer';\nimport { SaveObject } from '../objects/SaveObject';\nimport { ArrayProperty } from './generic/ArrayProperty';\nimport { AbstractBaseProperty } from './generic/BasicProperty';\nimport { BoolProperty } from './generic/BoolProperty';\nimport { ByteProperty } from './generic/ByteProperty';\nimport { DoubleProperty } from './generic/DoubleProperty';\nimport { EnumProperty } from './generic/EnumProperty';\nimport { FloatProperty } from './generic/FloatProperty';\nimport { Int32Property } from './generic/Int32Property';\nimport { Int64Property } from './generic/Int64Property';\nimport { Int8Property } from './generic/Int8Property';\nimport { MapProperty } from './generic/MapProperty';\nimport { ObjectProperty } from './generic/ObjectProperty';\nimport { SetProperty } from './generic/SetProperty';\nimport { SoftObjectProperty } from './generic/SoftObjectProperty';\nimport { StrProperty } from './generic/StrProperty';\nimport { StructProperty } from './generic/StructProperty';\nimport { TextProperty } from './generic/TextProperty';\nimport { Uint32Property } from './generic/Uint32Property';\nimport { Uint64Property } from './generic/Uint64Property';\nimport { Uint8Property } from './generic/Uint8Property';\n\n\nexport namespace PropertiesList {\n\n\texport const ParseList = (obj: SaveObject, length: number, reader: BinaryReadable, buildVersion: number, typePath: string): void => {\n\n\t\tobj.properties = {};\n\t\tif (length === 0) {\n\t\t\tconsole.warn(`properties length for object ${obj.instanceName} was indicated as 0. Which is suspicious. Skipping object properties.`);\n\t\t\treturn;\n\t\t}\n\n\t\tlet propertyName: string = reader.readString();\n\t\twhile (propertyName !== 'None') {\n\t\t\tconst parsedProperty = PropertiesList.ParseSingleProperty(reader, buildVersion, propertyName);\n\n\t\t\t// if it already exists, make it an array.\n\t\t\tif (obj.properties[propertyName]) {\n\t\t\t\tif (!Array.isArray(obj.properties[propertyName])) {\n\t\t\t\t\tobj.properties[propertyName] = [obj.properties[propertyName] as AbstractBaseProperty];\n\t\t\t\t}\n\t\t\t\t(obj.properties[propertyName] as AbstractBaseProperty[]).push(parsedProperty);\n\t\t\t} else {\n\t\t\t\tobj.properties[propertyName] = parsedProperty;\n\t\t\t}\n\n\t\t\tpropertyName = reader.readString();\n\t\t}\n\n\t}\n\n\texport const SerializeList = (obj: SaveObject, writer: SaveWriter, buildVersion: number, typePath: string): void => {\n\t\tfor (const property of Object.values(obj.properties).flatMap(val => Array.isArray(val) ? val : [val])) {\n\t\t\twriter.writeString(property.name);\n\t\t\tPropertiesList.SerializeSingleProperty(writer, property, property.name, buildVersion);\n\t\t}\n\t\twriter.writeString('None');\n\t}\n\n\texport const ParseSingleProperty = (reader: BinaryReadable, buildVersion: number, propertyName: string): AbstractBaseProperty => {\n\t\tlet currentProperty: any = {};\n\n\t\t//TODO assign type and index after parsing.\n\t\tconst propertyType = reader.readString();\n\t\tconst binarySize = reader.readInt32();\n\n\t\tconst index = reader.readInt32();\n\t\tconst before = reader.getBufferPosition();\n\n\t\tlet overhead = 0;\n\t\tswitch (propertyType) {\n\t\t\tcase 'BoolProperty':\n\t\t\t\tcurrentProperty = BoolProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = BoolProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\tcurrentProperty = ByteProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = ByteProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int8Property':\n\t\t\t\tcurrentProperty = Int8Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Int8Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'UInt8Property':\n\t\t\t\tcurrentProperty = Uint8Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Uint8Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'IntProperty':\n\t\t\tcase 'Int32Property':\n\t\t\t\tcurrentProperty = Int32Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Int32Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt32Property':\n\t\t\t\tcurrentProperty = Uint32Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Uint32Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int64Property':\n\t\t\t\tcurrentProperty = Int64Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Int64Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt64Property':\n\t\t\t\tcurrentProperty = Uint64Property.Parse(reader, propertyType, index);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SingleProperty':\n\t\t\tcase 'FloatProperty':\n\t\t\t\tcurrentProperty = FloatProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = FloatProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'DoubleProperty':\n\t\t\t\tcurrentProperty = DoubleProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = DoubleProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StrProperty':\n\t\t\tcase 'NameProperty':\n\t\t\t\tcurrentProperty = StrProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = StrProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ObjectProperty':\n\t\t\tcase 'InterfaceProperty':\n\t\t\t\tcurrentProperty = ObjectProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = ObjectProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SoftObjectProperty':\n\t\t\t\tcurrentProperty = SoftObjectProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = SoftObjectProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'EnumProperty':\n\t\t\t\tcurrentProperty = EnumProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = EnumProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StructProperty':\n\t\t\t\tcurrentProperty = StructProperty.Parse(reader, propertyType, index, binarySize);\n\t\t\t\toverhead = StructProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrayProperty':\n\t\t\t\tcurrentProperty = ArrayProperty.Parse(reader, propertyType, index, propertyName);\n\t\t\t\toverhead = ArrayProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'MapProperty':\n\t\t\t\tcurrentProperty = MapProperty.Parse(reader, propertyName, buildVersion, binarySize);\n\t\t\t\toverhead = MapProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'TextProperty':\n\t\t\t\tcurrentProperty = TextProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = TextProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SetProperty':\n\t\t\t\tcurrentProperty = SetProperty.Parse(reader, propertyType, index, propertyName);\n\t\t\t\toverhead = SetProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unimplemented type ${propertyType}`);\n\t\t}\n\n\t\tcurrentProperty.name = propertyName;\n\n\t\tconst readBytes = reader.getBufferPosition() - before - overhead;\n\t\tif (readBytes !== binarySize) {\n\t\t\tconsole.warn(`possibly corrupt. Read ${readBytes} for ${propertyType} ${propertyName}, but ${binarySize} were indicated.`);\n\t\t\tthrow new ParserError('ParserError', `possibly corrupt. Read ${readBytes} bytes for ${propertyType} ${propertyName}, but ${binarySize} bytes were indicated.`);\n\t\t}\n\n\t\treturn currentProperty;\n\t}\n\n\texport const SerializeSingleProperty = (writer: ByteWriter, property: AbstractBaseProperty, propertyName: string, buildVersion: number): void => {\n\n\t\twriter.writeString(property.ueType);\n\n\t\t// binary length indicator\n\t\tconst lenIndicator = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\n\n\t\t// write index if it is not 0. Since it normally is.\n\t\twriter.writeInt32(property.index ?? 0);\n\n\t\tconst start = writer.getBufferPosition();\n\t\tlet overhead = 0;\n\t\tswitch (property.ueType) {\n\t\t\tcase 'BoolProperty':\n\t\t\t\toverhead = BoolProperty.CalcOverhead(property as BoolProperty);\n\t\t\t\tBoolProperty.Serialize(writer, property as BoolProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\toverhead = ByteProperty.CalcOverhead(property as ByteProperty);\n\t\t\t\tByteProperty.Serialize(writer, property as ByteProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int8Property':\n\t\t\t\toverhead = Int8Property.CalcOverhead(property as Int8Property);\n\t\t\t\tInt8Property.Serialize(writer, property as Int8Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt8Property':\n\t\t\t\toverhead = Uint8Property.CalcOverhead(property as Uint8Property);\n\t\t\t\tUint8Property.Serialize(writer, property as Uint8Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'IntProperty':\n\t\t\tcase 'Int32Property':\n\t\t\t\toverhead = Int32Property.CalcOverhead(property as Int32Property);\n\t\t\t\tInt32Property.Serialize(writer, property as Int32Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt32Property':\n\t\t\t\toverhead = Uint32Property.CalcOverhead(property as Uint32Property);\n\t\t\t\tUint32Property.Serialize(writer, property as Uint32Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int64Property':\n\t\t\t\toverhead = Int64Property.CalcOverhead(property as Int64Property);\n\t\t\t\tInt64Property.Serialize(writer, property as Int64Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt64PRoperty':\n\t\t\t\toverhead = Uint64Property.CalcOverhead(property as Int64Property);\n\t\t\t\tUint64Property.Serialize(writer, property as Int64Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SingleProperty':\n\t\t\tcase 'FloatProperty':\n\t\t\t\toverhead = FloatProperty.CalcOverhead(property as FloatProperty);\n\t\t\t\tFloatProperty.Serialize(writer, property as FloatProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'DoubleProperty':\n\t\t\t\toverhead = DoubleProperty.CalcOverhead(property as DoubleProperty);\n\t\t\t\tDoubleProperty.Serialize(writer, property as DoubleProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StrProperty':\n\t\t\tcase 'NameProperty':\n\t\t\t\toverhead = StrProperty.CalcOverhead(property as StrProperty);\n\t\t\t\tStrProperty.Serialize(writer, property as StrProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ObjectProperty':\n\t\t\tcase 'InterfaceProperty':\n\t\t\t\toverhead = ObjectProperty.CalcOverhead(property as ObjectProperty);\n\t\t\t\tObjectProperty.Serialize(writer, property as ObjectProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SoftObjectProperty':\n\t\t\t\toverhead = SoftObjectProperty.CalcOverhead(property as SoftObjectProperty);\n\t\t\t\tSoftObjectProperty.Serialize(writer, property as SoftObjectProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'EnumProperty':\n\t\t\t\toverhead = EnumProperty.CalcOverhead(property as EnumProperty);\n\t\t\t\tEnumProperty.Serialize(writer, property as EnumProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\toverhead = ByteProperty.CalcOverhead(property as ByteProperty);\n\t\t\t\tByteProperty.Serialize(writer, property as ByteProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StructProperty':\n\t\t\t\toverhead = StructProperty.CalcOverhead(property as StructProperty);\n\t\t\t\tStructProperty.Serialize(writer, property as StructProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrayProperty':\n\t\t\t\toverhead = ArrayProperty.CalcOverhead(property as ArrayProperty<any>);\n\t\t\t\tArrayProperty.Serialize(writer, property as ArrayProperty<any>, propertyName);\n\t\t\t\tbreak;\n\n\t\t\tcase 'MapProperty':\n\t\t\t\toverhead = MapProperty.CalcOverhead(property as MapProperty);\n\t\t\t\tMapProperty.Serialize(writer, property as MapProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'TextProperty':\n\t\t\t\toverhead = TextProperty.CalcOverhead(property as TextProperty);\n\t\t\t\tTextProperty.Serialize(writer, property as TextProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SetProperty':\n\t\t\t\toverhead = SetProperty.CalcOverhead(property as SetProperty<any>);\n\t\t\t\tSetProperty.Serialize(writer, property as SetProperty<any>);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unimplemented type ${property.type}`);\n\t\t}\n\n\t\t// replace len indicator.\n\t\twriter.writeBinarySizeFromPosition(lenIndicator, start + overhead);\n\t}\n}\n\n"]}
|
|
@@ -20,3 +20,4 @@ export declare class ArrayProperty<T> extends BasicProperty {
|
|
|
20
20
|
static CalcOverhead(property: ArrayProperty<any>): number;
|
|
21
21
|
static Serialize(writer: ByteWriter, property: ArrayProperty<any>, propertyName: string): void;
|
|
22
22
|
}
|
|
23
|
+
//# sourceMappingURL=ArrayProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAIhE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAehD,MAAM,MAAM,8BAA8B,GAAG;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,aAAa,KAAG,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAsC,CAAC;AAE9H,qBAAa,aAAa,CAAC,CAAC,CAAE,SAAQ,aAAa;IAE5B,OAAO,EAAE,MAAM;IAAS,MAAM,EAAE,CAAC,EAAE;IAA8D,iBAAiB,CAAC,EAAE,8BAA8B;gBAAnJ,OAAO,EAAE,MAAM,EAAS,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,GAAE,MAAwB,EAAE,KAAK,GAAE,MAAU,EAAS,iBAAiB,CAAC,EAAE,8BAA8B,YAAA;WAIxJ,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC;WA8GtG,YAAY,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM;WAIlD,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI;CA8ExG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ArrayProperty = exports.isArrayProperty = void 0;
|
|
4
|
-
const
|
|
4
|
+
const parser_error_1 = require("../../../../error/parser.error");
|
|
5
5
|
const BasicProperty_1 = require("./BasicProperty");
|
|
6
6
|
const BoolProperty_1 = require("./BoolProperty");
|
|
7
7
|
const ByteProperty_1 = require("./ByteProperty");
|
|
@@ -11,6 +11,7 @@ const FloatProperty_1 = require("./FloatProperty");
|
|
|
11
11
|
const Int32Property_1 = require("./Int32Property");
|
|
12
12
|
const Int64Property_1 = require("./Int64Property");
|
|
13
13
|
const ObjectProperty_1 = require("./ObjectProperty");
|
|
14
|
+
const SoftObjectProperty_1 = require("./SoftObjectProperty");
|
|
14
15
|
const StrProperty_1 = require("./StrProperty");
|
|
15
16
|
const StructProperty_1 = require("./StructProperty");
|
|
16
17
|
const TextProperty_1 = require("./TextProperty");
|
|
@@ -54,14 +55,14 @@ class ArrayProperty extends BasicProperty_1.BasicProperty {
|
|
|
54
55
|
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => EnumProperty_1.EnumProperty.ReadValue(reader)), ueType, index);
|
|
55
56
|
break;
|
|
56
57
|
case "TextProperty":
|
|
57
|
-
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => TextProperty_1.TextProperty.
|
|
58
|
+
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => TextProperty_1.TextProperty.ReadValue(reader)), ueType, index);
|
|
58
59
|
break;
|
|
59
60
|
case "InterfaceProperty":
|
|
60
61
|
case "ObjectProperty":
|
|
61
62
|
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => ObjectProperty_1.ObjectProperty.ReadValue(reader)), ueType, index);
|
|
62
63
|
break;
|
|
63
64
|
case "SoftObjectProperty":
|
|
64
|
-
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() =>
|
|
65
|
+
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => SoftObjectProperty_1.SoftObjectProperty.ReadValue(reader)), ueType, index);
|
|
65
66
|
break;
|
|
66
67
|
case "StructProperty":
|
|
67
68
|
const name = reader.readString();
|
|
@@ -100,8 +101,7 @@ class ArrayProperty extends BasicProperty_1.BasicProperty {
|
|
|
100
101
|
property = new ArrayProperty(subtype, maArr, ueType, index, innerStructValueFields);
|
|
101
102
|
break;
|
|
102
103
|
default:
|
|
103
|
-
|
|
104
|
-
throw new Error();
|
|
104
|
+
throw new parser_error_1.UnimplementedError(`Unknown subtype ${subtype} for ${ueType}. Not implemented.`);
|
|
105
105
|
}
|
|
106
106
|
return property;
|
|
107
107
|
}
|
|
@@ -145,7 +145,7 @@ class ArrayProperty extends BasicProperty_1.BasicProperty {
|
|
|
145
145
|
property.values.forEach(v => ObjectProperty_1.ObjectProperty.SerializeValue(writer, v));
|
|
146
146
|
break;
|
|
147
147
|
case "SoftObjectProperty":
|
|
148
|
-
property.values.forEach(v =>
|
|
148
|
+
property.values.forEach(v => SoftObjectProperty_1.SoftObjectProperty.SerializeValue(writer, v));
|
|
149
149
|
break;
|
|
150
150
|
case "StructProperty":
|
|
151
151
|
writer.writeString(propertyName);
|
|
@@ -169,3 +169,4 @@ class ArrayProperty extends BasicProperty_1.BasicProperty {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
exports.ArrayProperty = ArrayProperty;
|
|
172
|
+
//# sourceMappingURL=ArrayProperty.js.map
|