@etothepii/satisfactory-file-parser 1.0.3 → 2.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/.github/workflows/tests.yml +24 -0
- package/CHANGELOG.md +88 -0
- package/LICENCE.md +1 -1
- package/README.md +6 -74
- package/build/index.d.ts +31 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +31 -4
- package/build/index.js.map +1 -1
- package/build/parser/byte/byte-reader.class.d.ts +1 -1
- package/build/parser/byte/byte-reader.class.d.ts.map +1 -1
- package/build/parser/byte/byte-reader.class.js +4 -4
- package/build/parser/byte/byte-reader.class.js.map +1 -1
- package/build/parser/parser.d.ts +1 -1
- package/build/parser/parser.d.ts.map +1 -1
- package/build/parser/parser.js +1 -1
- package/build/parser/parser.js.map +1 -1
- package/build/parser/satisfactory/save/level.class.d.ts.map +1 -1
- package/build/parser/satisfactory/save/level.class.js +3 -1
- package/build/parser/satisfactory/save/level.class.js.map +1 -1
- package/build/parser/satisfactory/save/object-references-list.d.ts +2 -2
- package/build/parser/satisfactory/save/object-references-list.d.ts.map +1 -1
- package/build/parser/satisfactory/save/object-references-list.js.map +1 -1
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts +3 -3
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts.map +1 -1
- package/build/parser/satisfactory/types/objects/SaveObject.js +3 -3
- package/build/parser/satisfactory/types/objects/SaveObject.js.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts +4 -6
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.js +16 -19
- package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts +21 -0
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js +23 -0
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts +22 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js +128 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.d.ts +15 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.d.ts +15 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.d.ts +26 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js +72 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.d.ts +15 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int32Property.js +3 -3
- package/build/parser/satisfactory/types/property/generic/Int32Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int64Property.js +3 -3
- package/build/parser/satisfactory/types/property/generic/Int64Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int8Property.js +3 -3
- package/build/parser/satisfactory/types/property/generic/Int8Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.d.ts +15 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts +15 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js +73 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js +45 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.d.ts +14 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.js +25 -0
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.js.map +1 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StrProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/StrProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +4 -4
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.js +10 -10
- package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.js +3 -3
- package/build/parser/satisfactory/types/property/generic/TextProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js +3 -3
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js +3 -3
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts +3 -3
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js +3 -3
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.d.ts +31 -0
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.js +81 -0
- package/build/parser/satisfactory/types/property/special/BuildableSubsystemSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/CircuitSpecialProperties.d.ts +16 -0
- package/build/parser/satisfactory/types/property/special/CircuitSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/CircuitSpecialProperties.js +31 -0
- package/build/parser/satisfactory/types/property/special/CircuitSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.d.ts +40 -0
- package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.js +101 -0
- package/build/parser/satisfactory/types/property/special/ConveyorChainActorSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/ConveyorSpecialProperties.d.ts +11 -0
- package/build/parser/satisfactory/types/property/special/ConveyorSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/ConveyorSpecialProperties.js +18 -0
- package/build/parser/satisfactory/types/property/special/ConveyorSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/EmptySpecialProperties.d.ts +11 -0
- package/build/parser/satisfactory/types/property/special/EmptySpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/EmptySpecialProperties.js +15 -0
- package/build/parser/satisfactory/types/property/special/EmptySpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/ObjectsListSpecialProperties.d.ts +13 -0
- package/build/parser/satisfactory/types/property/special/ObjectsListSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/ObjectsListSpecialProperties.js +20 -0
- package/build/parser/satisfactory/types/property/special/ObjectsListSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/PlayerSpecialProperties.d.ts +14 -0
- package/build/parser/satisfactory/types/property/special/PlayerSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/PlayerSpecialProperties.js +40 -0
- package/build/parser/satisfactory/types/property/special/PlayerSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/PowerLineSpecialProperties.d.ts +17 -0
- package/build/parser/satisfactory/types/property/special/PowerLineSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/PowerLineSpecialProperties.js +28 -0
- package/build/parser/satisfactory/types/property/special/PowerLineSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/SpecialDroneActionProperties.d.ts +18 -0
- package/build/parser/satisfactory/types/property/special/SpecialDroneActionProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/SpecialDroneActionProperties.js +47 -0
- package/build/parser/satisfactory/types/property/special/SpecialDroneActionProperties.js.map +1 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.d.ts +13 -3
- package/build/parser/satisfactory/types/property/special/SpecialProperties.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/special/SpecialProperties.js +75 -195
- package/build/parser/satisfactory/types/property/special/SpecialProperties.js.map +1 -1
- package/build/parser/satisfactory/types/property/special/VehicleSpecialProperties.d.ts +19 -0
- package/build/parser/satisfactory/types/property/special/VehicleSpecialProperties.d.ts.map +1 -0
- package/build/parser/satisfactory/types/property/special/VehicleSpecialProperties.js +46 -0
- package/build/parser/satisfactory/types/property/special/VehicleSpecialProperties.js.map +1 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.d.ts +1 -1
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.js +2 -21
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.js.map +1 -1
- package/build/parser/satisfactory/types/structs/GUID.d.ts +2 -2
- package/build/parser/satisfactory/types/structs/GUID.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/GUID.js.map +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts +2 -2
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.js.map +1 -1
- package/build/parser/satisfactory/types/structs/ObjectReference.d.ts +2 -2
- package/build/parser/satisfactory/types/structs/ObjectReference.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/ObjectReference.js.map +1 -1
- package/build/parser/satisfactory/types/structs/Transform.d.ts +3 -3
- package/build/parser/satisfactory/types/structs/Transform.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/Transform.js.map +1 -1
- package/build/parser/satisfactory/types/structs/col4.d.ts +3 -3
- package/build/parser/satisfactory/types/structs/col4.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/col4.js.map +1 -1
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts +2 -2
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js.map +1 -1
- package/build/parser/satisfactory/types/structs/vec2.d.ts +3 -3
- package/build/parser/satisfactory/types/structs/vec2.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/vec2.js.map +1 -1
- package/build/parser/satisfactory/types/structs/vec3.d.ts +4 -4
- package/build/parser/satisfactory/types/structs/vec3.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/vec3.js.map +1 -1
- package/build/parser/satisfactory/types/structs/vec4.d.ts +3 -3
- package/build/parser/satisfactory/types/structs/vec4.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/vec4.js.map +1 -1
- package/build/parser/stream/reworked/readable-stream-parser.d.ts +1 -1
- package/build/parser/stream/reworked/readable-stream-parser.d.ts.map +1 -1
- package/build/parser/stream/reworked/readable-stream-parser.js +1 -1
- package/build/parser/stream/reworked/readable-stream-parser.js.map +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AbstractBaseProperty.html +5 -4
- package/docs/classes/BlueprintConfigReader.html +5 -4
- package/docs/classes/BlueprintConfigWriter.html +3 -3
- package/docs/classes/BlueprintReader.html +5 -4
- package/docs/classes/BlueprintWriter.html +3 -3
- package/docs/classes/BoolProperty.html +3 -3
- package/docs/classes/ByteProperty.html +3 -3
- package/docs/classes/CompressionLibraryError.html +2 -2
- package/docs/classes/CorruptSaveError.html +2 -2
- package/docs/classes/DoubleProperty.html +3 -3
- package/docs/classes/EnumProperty.html +3 -3
- package/docs/classes/FloatProperty.html +3 -3
- package/docs/classes/Int32Property.html +3 -3
- package/docs/classes/Int64Property.html +3 -3
- package/docs/classes/Int8Property.html +3 -3
- package/docs/classes/MapProperty.html +3 -3
- package/docs/classes/ObjectProperty.html +3 -3
- package/docs/classes/Parser.html +7 -7
- package/docs/classes/ParserError.html +2 -2
- package/docs/classes/ReadableStreamParser.html +3 -3
- package/docs/classes/SatisfactorySave.html +2 -2
- package/docs/classes/SaveComponent.html +2 -2
- package/docs/classes/SaveEntity.html +2 -2
- package/docs/classes/SaveObject.html +14 -0
- package/docs/classes/SaveReader.html +5 -4
- package/docs/classes/SaveStreamJsonStringifier.html +2 -2
- package/docs/classes/SaveStreamWriter.html +2 -2
- package/docs/classes/SaveWriter.html +3 -3
- package/docs/classes/StrProperty.html +3 -3
- package/docs/classes/StructProperty.html +4 -4
- package/docs/classes/TextProperty.html +3 -3
- package/docs/classes/TimeoutError.html +2 -2
- package/docs/classes/Uint32Property.html +3 -3
- package/docs/classes/Uint64Property.html +3 -3
- package/docs/classes/Uint8Property.html +3 -3
- package/docs/classes/UnimplementedError.html +2 -2
- package/docs/classes/UnsupportedVersionError.html +2 -2
- package/docs/functions/ArrayProperty.CalcOverhead.html +1 -0
- package/docs/functions/ArrayProperty.Parse.html +1 -0
- package/docs/functions/ArrayProperty.Serialize.html +1 -0
- package/docs/functions/BoolArrayProperty.Parse.html +1 -0
- package/docs/functions/BoolArrayProperty.Serialize.html +1 -0
- package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -0
- package/docs/functions/BuildableSubsystemSpecialProperties.Serialize.html +1 -0
- package/docs/functions/ByteArrayProperty.Parse.html +1 -0
- package/docs/functions/ByteArrayProperty.Serialize.html +1 -0
- package/docs/functions/CircuitSpecialProperties.Parse.html +1 -0
- package/docs/functions/CircuitSpecialProperties.Serialize.html +1 -0
- package/docs/functions/ConveyorChainActorSpecialProperties.Parse.html +1 -0
- package/docs/functions/ConveyorChainActorSpecialProperties.Serialize.html +1 -0
- package/docs/functions/ConveyorSpecialProperties.Parse.html +1 -0
- package/docs/functions/ConveyorSpecialProperties.Serialize.html +1 -0
- package/docs/functions/DoubleArrayProperty.Parse.html +1 -0
- package/docs/functions/DoubleArrayProperty.Serialize.html +1 -0
- package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
- package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
- package/docs/functions/EmptySpecialProperties.Parse.html +1 -0
- package/docs/functions/EmptySpecialProperties.Serialize.html +1 -0
- package/docs/functions/EnumArrayProperty.Parse.html +1 -0
- package/docs/functions/EnumArrayProperty.Serialize.html +1 -0
- package/docs/functions/FICFrameRange.Parse.html +1 -1
- package/docs/functions/FICFrameRange.Serialize.html +1 -1
- package/docs/functions/FloatArrayProperty.Parse.html +1 -0
- package/docs/functions/FloatArrayProperty.Serialize.html +1 -0
- package/docs/functions/GUID.read.html +1 -1
- package/docs/functions/GUID.write.html +1 -1
- package/docs/functions/GUIDInfo.read.html +1 -1
- package/docs/functions/GUIDInfo.write.html +1 -1
- package/docs/functions/Int32ArrayProperty.Parse.html +1 -0
- package/docs/functions/Int32ArrayProperty.Serialize.html +1 -0
- package/docs/functions/Int32SetProperty.Parse.html +1 -0
- package/docs/functions/Int32SetProperty.Serialize.html +1 -0
- package/docs/functions/Int64ArrayProperty.Parse.html +1 -0
- package/docs/functions/Int64ArrayProperty.Serialize.html +1 -0
- package/docs/functions/Level.ReadAllObjectContents.html +1 -1
- package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
- package/docs/functions/Level.ReadLevel.html +1 -1
- package/docs/functions/Level.ReadNObjectContents.html +1 -1
- package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
- package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeLevel.html +1 -1
- package/docs/functions/MD5Hash.read.html +1 -1
- package/docs/functions/MD5Hash.write.html +1 -1
- package/docs/functions/ObjectArrayProperty.Parse.html +1 -0
- package/docs/functions/ObjectArrayProperty.Serialize.html +1 -0
- package/docs/functions/ObjectReference.read.html +1 -1
- package/docs/functions/ObjectReference.write.html +1 -1
- package/docs/functions/ObjectSetProperty.Parse.html +1 -0
- package/docs/functions/ObjectSetProperty.Serialize.html +1 -0
- package/docs/functions/ObjectsListSpecialProperties.Parse.html +1 -0
- package/docs/functions/ObjectsListSpecialProperties.Serialize.html +1 -0
- package/docs/functions/PlayerSpecialProperties.Parse.html +1 -0
- package/docs/functions/PlayerSpecialProperties.Serialize.html +1 -0
- package/docs/functions/PowerLineSpecialProperties.Parse.html +1 -0
- package/docs/functions/PowerLineSpecialProperties.Serialize.html +1 -0
- package/docs/functions/PropertiesList.ParseList.html +1 -1
- package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
- package/docs/functions/PropertiesList.SerializeList.html +1 -1
- package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
- package/docs/functions/SetProperty.CalcOverhead.html +1 -0
- package/docs/functions/SetProperty.Parse.html +1 -0
- package/docs/functions/SetProperty.Serialize.html +1 -0
- package/docs/functions/SoftObjectArrayProperty.Parse.html +1 -0
- package/docs/functions/SoftObjectArrayProperty.Serialize.html +1 -0
- package/docs/functions/SoftObjectReference.read.html +1 -1
- package/docs/functions/SoftObjectReference.write.html +1 -1
- package/docs/functions/SpecialDroneActionProperties.Parse.html +1 -0
- package/docs/functions/SpecialDroneActionProperties.Serialize.html +1 -0
- package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
- package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
- package/docs/functions/StrArrayProperty.Parse.html +1 -0
- package/docs/functions/StrArrayProperty.Serialize.html +1 -0
- package/docs/functions/StrSetProperty.Parse.html +1 -0
- package/docs/functions/StrSetProperty.Serialize.html +1 -0
- package/docs/functions/StructArrayProperty.Parse.html +1 -0
- package/docs/functions/StructArrayProperty.Serialize.html +1 -0
- package/docs/functions/StructSetProperty.Parse.html +1 -0
- package/docs/functions/StructSetProperty.Serialize.html +1 -0
- package/docs/functions/TextArrayProperty.Parse.html +1 -0
- package/docs/functions/TextArrayProperty.Serialize.html +1 -0
- package/docs/functions/Transform.Parse.html +1 -1
- package/docs/functions/Transform.ParseF.html +1 -1
- package/docs/functions/Transform.Serialize.html +1 -1
- package/docs/functions/Transform.SerializeF.html +1 -1
- package/docs/functions/Uint32SetProperty.Parse.html +1 -0
- package/docs/functions/Uint32SetProperty.Serialize.html +1 -0
- package/docs/functions/VehicleSpecialProperties.Parse.html +1 -0
- package/docs/functions/VehicleSpecialProperties.Serialize.html +1 -0
- package/docs/functions/col4.ParseBGRA.html +1 -1
- package/docs/functions/col4.ParseRGBA.html +1 -1
- package/docs/functions/col4.SerializeBGRA.html +1 -1
- package/docs/functions/col4.SerializeRGBA.html +1 -1
- package/docs/functions/isArrayProperty.html +1 -1
- package/docs/functions/isBoolArrayProperty.html +1 -0
- package/docs/functions/isBoolProperty.html +1 -1
- package/docs/functions/isBuildableSubsystemSpecialProperties.html +1 -0
- package/docs/functions/isByteArrayProperty.html +1 -0
- package/docs/functions/isByteProperty.html +1 -1
- package/docs/functions/isCircuitSpecialProperties.html +1 -0
- package/docs/functions/isConveyorChainActorSpecialProperties.html +1 -0
- package/docs/functions/isConveyorSpecialProperties.html +1 -0
- package/docs/functions/isDoubleArrayProperty.html +1 -0
- package/docs/functions/isDoubleProperty.html +1 -1
- package/docs/functions/isEmptySpecialProperties.html +1 -0
- package/docs/functions/isEnumArrayProperty.html +1 -0
- package/docs/functions/isEnumProperty.html +1 -1
- package/docs/functions/isFloatArrayProperty.html +1 -0
- package/docs/functions/isFloatProperty.html +1 -1
- package/docs/functions/isInt32ArrayProperty.html +1 -0
- package/docs/functions/isInt32Property.html +1 -1
- package/docs/functions/isInt32SetProperty.html +1 -0
- package/docs/functions/isInt64ArrayProperty.html +1 -0
- package/docs/functions/isInt64Property.html +1 -1
- package/docs/functions/isInt8Property.html +1 -1
- package/docs/functions/isMapProperty.html +1 -1
- package/docs/functions/isObjectArrayProperty.html +1 -0
- package/docs/functions/isObjectProperty.html +1 -1
- package/docs/functions/isObjectSetProperty.html +1 -0
- package/docs/functions/isObjectsListSpecialProperties.html +1 -0
- package/docs/functions/isPlayerSpecialProperties.html +1 -0
- package/docs/functions/isPowerLineSpecialProperties.html +1 -0
- package/docs/functions/isSaveComponent.html +1 -1
- package/docs/functions/isSaveEntity.html +1 -1
- package/docs/functions/isSetProperty.html +1 -1
- package/docs/functions/isSoftObjectArrayProperty.html +1 -0
- package/docs/functions/isSpecialDroneActionProperties.html +1 -0
- package/docs/functions/isStrArrayProperty.html +1 -0
- package/docs/functions/isStrProperty.html +1 -1
- package/docs/functions/isStrSetProperty.html +1 -0
- package/docs/functions/isStructArrayProperty.html +1 -0
- package/docs/functions/isStructProperty.html +1 -1
- package/docs/functions/isStructSetProperty.html +1 -0
- package/docs/functions/isTextArrayProperty.html +1 -0
- package/docs/functions/isTextProperty.html +1 -1
- package/docs/functions/isUInt64Property.html +1 -1
- package/docs/functions/isUint32Property.html +1 -1
- package/docs/functions/isUint32SetProperty.html +1 -0
- package/docs/functions/isUint8Property.html +1 -1
- package/docs/functions/isVehicleSpecialProperties.html +1 -0
- package/docs/functions/vec2.Parse.html +1 -1
- package/docs/functions/vec2.ParseF.html +1 -1
- package/docs/functions/vec2.Serialize.html +1 -1
- package/docs/functions/vec2.SerializeF.html +1 -1
- package/docs/functions/vec3.Parse.html +1 -1
- package/docs/functions/vec3.ParseF.html +1 -1
- package/docs/functions/vec3.ParseInt.html +1 -1
- package/docs/functions/vec3.Serialize.html +1 -1
- package/docs/functions/vec3.SerializeF.html +1 -1
- package/docs/functions/vec3.SerializeInt.html +1 -1
- package/docs/functions/vec3.add.html +1 -1
- package/docs/functions/vec3.length.html +1 -1
- package/docs/functions/vec3.mult.html +1 -1
- package/docs/functions/vec3.norm.html +1 -1
- package/docs/functions/vec3.sub.html +1 -1
- package/docs/functions/vec4.Parse.html +1 -1
- package/docs/functions/vec4.ParseF.html +1 -1
- package/docs/functions/vec4.Serialize.html +1 -1
- package/docs/functions/vec4.SerializeF.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +5 -56
- package/docs/interfaces/Blueprint.html +2 -2
- package/docs/interfaces/BlueprintConfig.html +2 -2
- package/docs/interfaces/ModData.html +2 -2
- package/docs/interfaces/SatisfactoryModMetadata.html +2 -2
- package/docs/interfaces/SatisfactorySaveHeader.html +2 -2
- package/docs/interfaces/SaveComponentHeader.html +2 -2
- package/docs/interfaces/SaveEntityHeader.html +2 -2
- package/docs/interfaces/SaveObjectHeader.html +4 -0
- package/docs/modules/ArrayProperty.html +5 -0
- package/docs/modules/BoolArrayProperty.html +3 -0
- package/docs/modules/BuildableSubsystemSpecialProperties.html +3 -0
- package/docs/modules/ByteArrayProperty.html +3 -0
- package/docs/modules/CircuitSpecialProperties.html +3 -0
- package/docs/modules/ConveyorChainActorSpecialProperties.html +3 -0
- package/docs/modules/ConveyorSpecialProperties.html +3 -0
- package/docs/modules/DoubleArrayProperty.html +3 -0
- package/docs/modules/DynamicStructPropertyValue.html +1 -1
- package/docs/modules/EmptySpecialProperties.html +3 -0
- package/docs/modules/EnumArrayProperty.html +3 -0
- package/docs/modules/FICFrameRange.html +1 -1
- package/docs/modules/FloatArrayProperty.html +3 -0
- package/docs/modules/GUID.html +1 -1
- package/docs/modules/GUIDInfo.html +1 -1
- package/docs/modules/Int32ArrayProperty.html +3 -0
- package/docs/modules/Int32SetProperty.html +3 -0
- package/docs/modules/Int64ArrayProperty.html +3 -0
- package/docs/modules/Level.html +1 -1
- package/docs/modules/MD5Hash.html +1 -1
- package/docs/modules/ObjectArrayProperty.html +3 -0
- package/docs/modules/ObjectReference.html +1 -1
- package/docs/modules/ObjectSetProperty.html +3 -0
- package/docs/modules/ObjectsListSpecialProperties.html +3 -0
- package/docs/modules/PlayerSpecialProperties.html +3 -0
- package/docs/modules/PowerLineSpecialProperties.html +3 -0
- package/docs/modules/PropertiesList.html +1 -1
- package/docs/modules/SetProperty.html +5 -0
- package/docs/modules/SoftObjectArrayProperty.html +3 -0
- package/docs/modules/SoftObjectReference.html +1 -1
- package/docs/modules/SpecialDroneActionProperties.html +3 -0
- package/docs/modules/SpecialProperties.html +2 -1
- package/docs/modules/StrArrayProperty.html +3 -0
- package/docs/modules/StrSetProperty.html +3 -0
- package/docs/modules/StructArrayProperty.html +3 -0
- package/docs/modules/StructSetProperty.html +3 -0
- package/docs/modules/TextArrayProperty.html +3 -0
- package/docs/modules/Transform.html +1 -1
- package/docs/modules/Uint32SetProperty.html +3 -0
- package/docs/modules/VehicleSpecialProperties.html +3 -0
- package/docs/modules/col4.html +1 -1
- package/docs/modules/vec2.html +1 -1
- package/docs/modules/vec3.html +1 -1
- package/docs/modules/vec4.html +1 -1
- package/docs/modules.html +87 -11
- package/docs/types/ArrayProperty.AvailableArrayPropertyTypes.html +1 -0
- package/docs/types/ArrayPropertyStructValueFields.html +1 -1
- package/docs/types/BasicMultipleStructPropertyValue.html +1 -1
- package/docs/types/BasicStructPropertyValue.html +1 -1
- package/docs/types/BlueprintHeader.html +1 -1
- package/docs/types/BoolArrayProperty-1.html +1 -0
- package/docs/types/BoxStructPropertyValue.html +1 -1
- package/docs/types/BuildableSubsystemSpecialProperties-1.html +1 -0
- package/docs/types/BuildableTypeInstance.html +1 -1
- package/docs/types/ByteArrayProperty-1.html +1 -0
- package/docs/types/BytePropertyValue.html +1 -1
- package/docs/types/CircuitSpecialProperties-1.html +1 -0
- package/docs/types/ClientIdentityInfo.html +1 -1
- package/docs/types/ConveyorChainActorSpecialProperties-1.html +1 -0
- package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -1
- package/docs/types/ConveyorItemSpecialProperties.html +1 -1
- package/docs/types/ConveyorSpecialProperties-1.html +1 -0
- package/docs/types/DoubleArrayProperty-1.html +1 -0
- package/docs/types/DynamicStructPropertyValue-1.html +1 -1
- package/docs/types/EmptySpecialProperties-1.html +1 -0
- package/docs/types/EnumArrayProperty-1.html +1 -0
- package/docs/types/FICFrameRange-1.html +1 -1
- package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
- package/docs/types/FloatArrayProperty-1.html +1 -0
- package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
- package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
- package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
- package/docs/types/GUID-1.html +1 -1
- package/docs/types/GUIDInfo-1.html +1 -1
- package/docs/types/Int32ArrayProperty-1.html +1 -0
- package/docs/types/Int32SetProperty-1.html +1 -0
- package/docs/types/Int64ArrayProperty-1.html +1 -0
- package/docs/types/InventoryItemStructPropertyValue.html +1 -1
- package/docs/types/Level-1.html +1 -1
- package/docs/types/MAP_STRUCT_KEY_PROXY.html +1 -1
- package/docs/types/MD5Hash-1.html +1 -1
- package/docs/types/ObjectArrayProperty-1.html +1 -0
- package/docs/types/ObjectReference-1.html +1 -1
- package/docs/types/ObjectSetProperty-1.html +1 -0
- package/docs/types/ObjectsListSpecialProperties-1.html +1 -0
- package/docs/types/PlayerSpecialProperties-1.html +1 -0
- package/docs/types/PowerLineSpecialProperties-1.html +1 -0
- package/docs/types/PropertiesMap.html +1 -1
- package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -1
- package/docs/types/RoughSaveVersion.html +1 -1
- package/docs/types/SetProperty.AvailableSetPropertyTypes.html +1 -0
- package/docs/types/SoftObjectArrayProperty-1.html +1 -0
- package/docs/types/SoftObjectReference-1.html +1 -1
- package/docs/types/SpecialDroneAction.html +1 -0
- package/docs/types/SpecialDroneActionProperties-1.html +1 -0
- package/docs/types/SpecialProperties.AvailableSpecialPropertiesTypes.html +1 -0
- package/docs/types/StrArrayProperty-1.html +1 -0
- package/docs/types/StrSetProperty-1.html +1 -0
- package/docs/types/StructArrayProperty-1.html +1 -0
- package/docs/types/StructSetProperty-1.html +1 -0
- package/docs/types/TextArrayProperty-1.html +1 -0
- package/docs/types/TextPropertyValue.html +1 -1
- package/docs/types/Transform-1.html +1 -1
- package/docs/types/Uint32SetProperty-1.html +1 -0
- package/docs/types/VehicleSpecialProperties-1.html +1 -0
- package/docs/types/col4-1.html +1 -1
- package/docs/types/vec2-1.html +1 -1
- package/docs/types/vec3-1.html +1 -1
- package/docs/types/vec4-1.html +1 -1
- package/docs/variables/EDIT.html +1 -1
- package/package.json +2 -2
- package/LICENSE +0 -21
- package/docs/classes/AbstractProperty.html +0 -4
- package/docs/classes/ArrayProperty.html +0 -13
- package/docs/classes/BasicProperty.html +0 -7
- package/docs/classes/SetProperty.html +0 -12
- package/docs/types/BuildableSubsystemSpecialProperties.html +0 -1
- package/docs/types/ConveyorChainActorSpecialProperties.html +0 -1
- package/docs/types/EmptySpecialProperties.html +0 -1
- package/docs/types/PlayerSpecialProperties.html +0 -1
- package/docs/types/PowerLineSpecialProperties.html +0 -1
- package/docs/types/SpecialAnyProperties.html +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"level.class.js","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/level.class.ts"],"names":[],"mappings":";;;AAGA,2DAAgF;AAChF,kEAAgF;AAChF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6BAAa,CAAC,MAAM,CAAC,CAAC;oBACxC,6BAAa,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;oBAC3C,MAAM;gBACP;oBACC,MAAM,IAAI,iCAAkB,CAAC,uBAAwB,GAAsB,CAAC,IAAI,oBAAoB,CAAC,CAAC;oBACtG,MAAM;YACR,CAAC;QACF,CAAC;IACF,CAAC,CAAA;AACF,CAAC,EA7LgB,KAAK,qBAAL,KAAK,QA6LrB","sourcesContent":["\nimport { BinaryReadable } from \"../../byte/binary-readable.interface\";\nimport { ByteWriter } from \"../../byte/byte-writer.class\";\nimport { CorruptSaveError, UnimplementedError } from '../../error/parser.error';\nimport { SaveComponent, isSaveComponent } from \"../types/objects/SaveComponent\";\nimport { SaveEntity, isSaveEntity } from \"../types/objects/SaveEntity\";\nimport { SaveObject } from \"../types/objects/SaveObject\";\nimport { ObjectReference } from \"../types/structs/ObjectReference\";\nimport { ObjectReferencesList } from './object-references-list';\nimport { SaveReader } from './save-reader';\n\nexport type Level = {\n\tname: string;\n\tobjects: (SaveEntity | SaveComponent)[];\n\tcollectables: ObjectReference[];\n}\n\nexport namespace Level {\n\n\texport const ReadLevel = (reader: SaveReader, levelName: string, buildVersion: number): Level => {\n\t\tconst level: Level = {\n\t\t\tname: levelName,\n\t\t\tobjects: [],\n\t\t\tcollectables: []\n\t\t}\n\n\t\t// checksum object headers.\n\t\tconst headersBinLen = reader.readInt32(); // object headers + binary length\n\t\treader.readInt32();\t// 0\n\n\t\t// object headers\n\t\tconst posBeforeHeaders = reader.getBufferPosition();\n\t\tReadAllObjectHeaders(reader, level.objects);\n\n\t\t// collected, like slugs Only listed here since U8.\n\t\tlet remainingSize = headersBinLen - (reader.getBufferPosition() - posBeforeHeaders);\n\t\tif (remainingSize > 0) {\n\t\t\tconst doubledCollectablesIgnored = ObjectReferencesList.ReadList(reader);\n\t\t} else {\n\t\t\t// its perfectly possible for ported saves to have nothing here.\n\t\t}\n\n\t\tremainingSize = headersBinLen - (reader.getBufferPosition() - posBeforeHeaders);\n\t\tif (remainingSize !== 0) {\n\t\t\tconsole.warn('remaining size not 0. Save may be corrupt.', remainingSize, levelName);\n\t\t}\n\n\t\t// checksum for object content size\n\t\tconst objectContentsBinLen = reader.readInt32();\n\t\treader.readInt32();\t// 0\n\n\t\t// objects contents\n\t\tconst posBeforeContents = reader.getBufferPosition();\n\t\tReadAllObjectContents(levelName, reader, level.objects, buildVersion, reader.onProgressCallback);\n\t\tconst posAfterContents = reader.getBufferPosition();\n\t\tif (posAfterContents - posBeforeContents !== objectContentsBinLen) {\n\t\t\t//WARNING\n\t\t\tconsole.warn('save seems corrupt.', level.name);\n\t\t}\n\n\t\t// collectables 2nd time. Listed here since < U8 and in U8 as well. So this is the best list you can rely on.\n\t\tlevel.collectables = ObjectReferencesList.ReadList(reader);\n\n\t\treturn level;\n\t}\n\n\texport const SerializeLevel = (writer: ByteWriter, level: Level, buildVersion: number) => {\n\t\tconst lenIndicatorHeaderAndDestroyedEntitiesSize = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\t// len indicator\n\t\twriter.writeInt32(0);\t// unk\n\n\t\tSerializeAllObjectHeaders(writer, level.objects);\n\n\t\t// <--- destroyed actors is the same as collectables list.\n\t\tObjectReferencesList.SerializeList(writer, level.collectables);\n\n\t\t// replace binary size from earlier for - object headers + collectables\n\t\twriter.writeBinarySizeFromPosition(lenIndicatorHeaderAndDestroyedEntitiesSize, lenIndicatorHeaderAndDestroyedEntitiesSize + 8);\n\n\t\t// write entities\n\t\tSerializeAllObjectContents(writer, level.objects, buildVersion, level.name);\n\n\t\tObjectReferencesList.SerializeList(writer, level.collectables);\n\t}\n\n\texport const ReadAllObjectContents = (levelName: string, reader: BinaryReadable, objectsList: SaveObject[], buildVersion: number, onProgressCallback: (progress: number, msg?: string) => void): void => {\n\t\tconst countEntities = reader.readInt32();\n\t\tif (countEntities !== objectsList.length) {\n\t\t\tthrow new Error(`possibly corrupt. entity content count ${countEntities} does not equal object count of ${objectsList.length}`);\n\t\t}\n\n\t\t// read in batches\n\t\tconst batchSize = 10000;\n\t\tlet readObjectsCount = 0;\n\t\tlet lastProgressReport = 0;\n\t\twhile (readObjectsCount < countEntities) {\n\t\t\tReadNObjectContents(reader, Math.min(batchSize, countEntities - readObjectsCount), objectsList, readObjectsCount);\n\t\t\treadObjectsCount += Math.min(batchSize, countEntities - readObjectsCount);\n\n\t\t\tif (readObjectsCount - lastProgressReport > batchSize) {\n\t\t\t\tonProgressCallback(reader.getBufferProgress(), `read object count [${(readObjectsCount)}/${(countEntities)}] in level ${levelName}`);\n\t\t\t\tlastProgressReport = readObjectsCount;\n\t\t\t}\n\t\t}\n\t}\n\n\texport const ReadNObjectContents = (reader: BinaryReadable, count: number, objects: SaveObject[], objectListOffset: number = 0, buildVersion: number = 0) => {\n\t\tfor (let i = 0; i < count; i++) {\n\t\t\tobjects[i + objectListOffset].objectVersion = reader.readInt32();\t// 36, 41..... 42, 46 at 1.0 Release - so its probably an object version\n\t\t\tobjects[i + objectListOffset].unknownType2 = reader.readInt32();\t//1 - //occasionally 0 ?\n\t\t\tconst binarySize = reader.readInt32();\n\n\t\t\tconst before = reader.getBufferPosition();\n\t\t\tif (isSaveEntity(objects[i + objectListOffset])) {\n\t\t\t\tSaveEntity.ParseData(objects[i + objectListOffset] as SaveEntity, binarySize, reader, buildVersion, objects[i + objectListOffset].typePath);\n\t\t\t} else if (isSaveComponent(objects[i + objectListOffset])) {\n\t\t\t\tSaveComponent.ParseData(objects[i + objectListOffset] as SaveComponent, binarySize, reader, buildVersion, objects[i + objectListOffset].typePath);\n\t\t\t}\n\n\t\t\tconst after = reader.getBufferPosition();\n\t\t\tif (after - before !== binarySize) {\n\t\t\t\tthrow new CorruptSaveError(`Could not read entity ${objects[i + objectListOffset].instanceName}, as ${after - before} bytes were read, but ${binarySize} bytes were indicated.`);\n\t\t\t}\n\t\t}\n\t}\n\n\texport const SerializeAllObjectContents = (writer: ByteWriter, objects: (SaveEntity | SaveComponent)[], buildVersion: number, levelName: string): void => {\n\t\tconst lenIndicatorEntities = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\n\n\t\twriter.writeInt32(0);\t// 0\n\n\t\twriter.writeInt32(objects.length);\n\t\tfor (const obj of objects) {\n\n\t\t\twriter.writeInt32(obj.objectVersion);\n\t\t\twriter.writeInt32(obj.unknownType2);\n\t\t\tconst lenReplacementPosition = writer.getBufferPosition();\n\t\t\twriter.writeInt32(0);\n\n\t\t\tif (isSaveEntity(obj)) {\n\t\t\t\tSaveEntity.SerializeData(writer, obj, buildVersion);\n\t\t\t} else if (isSaveComponent(obj)) {\n\t\t\t\tSaveComponent.SerializeData(writer, obj, buildVersion);\n\t\t\t}\n\n\t\t\twriter.writeBinarySizeFromPosition(lenReplacementPosition, lenReplacementPosition + 4);\n\t\t}\n\t\twriter.writeBinarySizeFromPosition(lenIndicatorEntities, lenIndicatorEntities + 8);\n\t}\n\n\texport const ReadAllObjectHeaders = (reader: BinaryReadable, objectsList: SaveObject[]): void => {\n\t\tlet countObjectHeaders = reader.readInt32();\n\n\t\t// read in batches\n\t\tconst batchSize = 10000;\n\t\tlet readObjectHeadersCount = 0;\n\t\twhile (readObjectHeadersCount < countObjectHeaders) {\n\t\t\tobjectsList.push(...ReadNObjectHeaders(reader, Math.min(batchSize, countObjectHeaders - readObjectHeadersCount)));\n\t\t\treadObjectHeadersCount += Math.min(batchSize, countObjectHeaders - readObjectHeadersCount);\n\t\t}\n\t}\n\n\texport const ReadNObjectHeaders = (reader: BinaryReadable, count: number): (SaveEntity | SaveComponent)[] => {\n\t\tlet objects: (SaveEntity | SaveComponent)[] = [];\n\t\tlet objectsRead = 0;\n\t\tfor (; objectsRead < count; objectsRead++) {\n\n\t\t\tlet obj: SaveEntity | SaveComponent;\n\t\t\tlet objectType = reader.readInt32();\n\t\t\tswitch (objectType) {\n\t\t\t\tcase SaveEntity.TypeID:\n\t\t\t\t\tobj = new SaveEntity('', '', '', '');\n\t\t\t\t\tSaveEntity.ParseHeader(reader, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SaveComponent.TypeID:\n\t\t\t\t\tobj = new SaveComponent('', '', '', '');\n\t\t\t\t\tSaveComponent.ParseHeader(reader, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new CorruptSaveError('Unknown object type' + objectType);\n\t\t\t}\n\t\t\tobjects.push(obj);\n\t\t}\n\t\treturn objects;\n\t}\n\n\texport const SerializeAllObjectHeaders = (writer: ByteWriter, objects: (SaveEntity | SaveComponent)[]): void => {\n\t\twriter.writeInt32(objects.length);\n\t\tfor (const obj of objects) {\n\n\t\t\tswitch (obj.type) {\n\t\t\t\tcase 'SaveEntity':\n\t\t\t\t\twriter.writeInt32(SaveEntity.TypeID);\n\t\t\t\t\tSaveEntity.SerializeHeader(writer, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'SaveComponent':\n\t\t\t\t\twriter.writeInt32(SaveComponent.TypeID);\n\t\t\t\t\tSaveComponent.SerializeHeader(writer, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new UnimplementedError(`Unknown object type ${(obj as unknown as any).type}. Not implemented.`);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"]}
|
|
1
|
+
{"version":3,"file":"level.class.js","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/level.class.ts"],"names":[],"mappings":";;;AAGA,2DAAgF;AAChF,kEAAgF;AAChF,4DAAuE;AAGvE,qEAAgE;AAShE,IAAiB,KAAK,CA+LrB;AA/LD,WAAiB,KAAK;IAER,eAAS,GAAG,CAAC,MAAkB,EAAE,SAAiB,EAAE,YAAoB,EAAS,EAAE;QAC/F,MAAM,KAAK,GAAU;YACpB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,EAAE;YACX,YAAY,EAAE,EAAE;SAChB,CAAA;QAGD,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACzC,MAA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AAC,CAAA;AACF,CAAC,EA/LgB,KAAK,qBAAL,KAAK,QA+LrB","sourcesContent":["\nimport { BinaryReadable } from \"../../byte/binary-readable.interface\";\nimport { ByteWriter } from \"../../byte/byte-writer.class\";\nimport { CorruptSaveError, UnimplementedError } from '../../error/parser.error';\nimport { SaveComponent, isSaveComponent } from \"../types/objects/SaveComponent\";\nimport { SaveEntity, isSaveEntity } from \"../types/objects/SaveEntity\";\nimport { SaveObject } from \"../types/objects/SaveObject\";\nimport { ObjectReference } from \"../types/structs/ObjectReference\";\nimport { ObjectReferencesList } from './object-references-list';\nimport { SaveReader } from './save-reader';\n\nexport type Level = {\n\tname: string;\n\tobjects: (SaveEntity | SaveComponent)[];\n\tcollectables: ObjectReference[];\n}\n\nexport namespace Level {\n\n\texport const ReadLevel = (reader: SaveReader, levelName: string, buildVersion: number): Level => {\n\t\tconst level: Level = {\n\t\t\tname: levelName,\n\t\t\tobjects: [],\n\t\t\tcollectables: []\n\t\t}\n\n\t\t// checksum object headers.\n\t\tconst headersBinLen = reader.readInt32(); // object headers + binary length\n\t\treader.readInt32();\t// 0\n\n\t\t// object headers\n\t\tconst posBeforeHeaders = reader.getBufferPosition();\n\t\tReadAllObjectHeaders(reader, level.objects);\n\n\t\t// collected, like slugs Only listed here since U8.\n\t\tlet remainingSize = headersBinLen - (reader.getBufferPosition() - posBeforeHeaders);\n\t\tif (remainingSize > 0) {\n\t\t\tconst doubledCollectablesIgnored = ObjectReferencesList.ReadList(reader);\n\t\t} else {\n\t\t\t// its perfectly possible for ported saves to have nothing here.\n\t\t}\n\n\t\tremainingSize = headersBinLen - (reader.getBufferPosition() - posBeforeHeaders);\n\t\tif (remainingSize !== 0) {\n\t\t\tconsole.warn('remaining size not 0. Save may be corrupt.', remainingSize, levelName);\n\t\t}\n\n\t\t// checksum for object content size\n\t\tconst objectContentsBinLen = reader.readInt32();\n\t\treader.readInt32();\t// 0\n\n\t\t// objects contents\n\t\tconst posBeforeContents = reader.getBufferPosition();\n\t\tReadAllObjectContents(levelName, reader, level.objects, buildVersion, reader.onProgressCallback);\n\t\tconst posAfterContents = reader.getBufferPosition();\n\t\tif (posAfterContents - posBeforeContents !== objectContentsBinLen) {\n\t\t\t//WARNING\n\t\t\tconsole.warn('save seems corrupt.', level.name);\n\t\t}\n\n\t\t// collectables 2nd time. Listed here since < U8 and in U8 as well. So this is the best list you can rely on.\n\t\tlevel.collectables = ObjectReferencesList.ReadList(reader);\n\n\t\treturn level;\n\t}\n\n\texport const SerializeLevel = (writer: ByteWriter, level: Level, buildVersion: number) => {\n\t\tconst lenIndicatorHeaderAndDestroyedEntitiesSize = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\t// len indicator\n\t\twriter.writeInt32(0);\t// unk\n\n\t\tSerializeAllObjectHeaders(writer, level.objects);\n\n\t\t// <--- destroyed actors is the same as collectables list. Seems like its not there if count 0.\n\t\tif (level.collectables.length > 0) {\n\t\t\tObjectReferencesList.SerializeList(writer, level.collectables);\n\t\t}\n\n\t\t// replace binary size from earlier for - object headers + collectables\n\t\twriter.writeBinarySizeFromPosition(lenIndicatorHeaderAndDestroyedEntitiesSize, lenIndicatorHeaderAndDestroyedEntitiesSize + 8);\n\n\t\t// write entities\n\t\tSerializeAllObjectContents(writer, level.objects, buildVersion, level.name);\n\n\t\tObjectReferencesList.SerializeList(writer, level.collectables);\n\t}\n\n\texport const ReadAllObjectContents = (levelName: string, reader: BinaryReadable, objectsList: SaveObject[], buildVersion: number, onProgressCallback: (progress: number, msg?: string) => void): void => {\n\t\tconst countEntities = reader.readInt32();\n\t\tif (countEntities !== objectsList.length) {\n\t\t\tthrow new Error(`possibly corrupt. entity content count ${countEntities} does not equal object count of ${objectsList.length}`);\n\t\t}\n\n\t\t// read in batches\n\t\tconst batchSize = 10000;\n\t\tlet readObjectsCount = 0;\n\t\tlet lastProgressReport = 0;\n\t\twhile (readObjectsCount < countEntities) {\n\t\t\tReadNObjectContents(reader, Math.min(batchSize, countEntities - readObjectsCount), objectsList, readObjectsCount);\n\t\t\treadObjectsCount += Math.min(batchSize, countEntities - readObjectsCount);\n\n\t\t\tif (readObjectsCount - lastProgressReport > batchSize) {\n\t\t\t\tonProgressCallback(reader.getBufferProgress(), `read object count [${(readObjectsCount)}/${(countEntities)}] in level ${levelName}`);\n\t\t\t\tlastProgressReport = readObjectsCount;\n\t\t\t}\n\t\t}\n\t}\n\n\texport const ReadNObjectContents = (reader: BinaryReadable, count: number, objects: SaveObject[], objectListOffset: number = 0, buildVersion: number = 0) => {\n\t\tfor (let i = 0; i < count; i++) {\n\t\t\tobjects[i + objectListOffset].objectVersion = reader.readInt32();\t// 36, 41..... 42, 46 at 1.0 Release - so its probably an object version\n\t\t\tobjects[i + objectListOffset].unknownType2 = reader.readInt32();\t//1 - //occasionally 0 ?\n\t\t\tconst binarySize = reader.readInt32();\n\n\t\t\tconst before = reader.getBufferPosition();\n\t\t\tif (isSaveEntity(objects[i + objectListOffset])) {\n\t\t\t\tSaveEntity.ParseData(objects[i + objectListOffset] as SaveEntity, binarySize, reader, buildVersion, objects[i + objectListOffset].typePath);\n\t\t\t} else if (isSaveComponent(objects[i + objectListOffset])) {\n\t\t\t\tSaveComponent.ParseData(objects[i + objectListOffset] as SaveComponent, binarySize, reader, buildVersion, objects[i + objectListOffset].typePath);\n\t\t\t}\n\n\t\t\tconst after = reader.getBufferPosition();\n\t\t\tif (after - before !== binarySize) {\n\t\t\t\tthrow new CorruptSaveError(`Could not read entity ${objects[i + objectListOffset].instanceName}, as ${after - before} bytes were read, but ${binarySize} bytes were indicated.`);\n\t\t\t}\n\t\t}\n\t}\n\n\texport const SerializeAllObjectContents = (writer: ByteWriter, objects: (SaveEntity | SaveComponent)[], buildVersion: number, levelName: string): void => {\n\t\tconst lenIndicatorEntities = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\n\n\t\twriter.writeInt32(0);\t// 0\n\n\t\twriter.writeInt32(objects.length);\n\t\tfor (const obj of objects) {\n\n\t\t\twriter.writeInt32(obj.objectVersion);\n\t\t\twriter.writeInt32(obj.unknownType2);\n\t\t\tconst lenReplacementPosition = writer.getBufferPosition();\n\t\t\twriter.writeInt32(0);\n\n\t\t\tif (isSaveEntity(obj)) {\n\t\t\t\tSaveEntity.SerializeData(writer, obj, buildVersion);\n\t\t\t} else if (isSaveComponent(obj)) {\n\t\t\t\tSaveComponent.SerializeData(writer, obj, buildVersion);\n\t\t\t}\n\n\t\t\twriter.writeBinarySizeFromPosition(lenReplacementPosition, lenReplacementPosition + 4);\n\t\t}\n\t\twriter.writeBinarySizeFromPosition(lenIndicatorEntities, lenIndicatorEntities + 8);\n\t}\n\n\texport const ReadAllObjectHeaders = (reader: BinaryReadable, objectsList: SaveObject[]): void => {\n\t\tlet countObjectHeaders = reader.readInt32();\n\n\t\t// read in batches\n\t\tconst batchSize = 10000;\n\t\tlet readObjectHeadersCount = 0;\n\t\twhile (readObjectHeadersCount < countObjectHeaders) {\n\t\t\tobjectsList.push(...ReadNObjectHeaders(reader, Math.min(batchSize, countObjectHeaders - readObjectHeadersCount)));\n\t\t\treadObjectHeadersCount += Math.min(batchSize, countObjectHeaders - readObjectHeadersCount);\n\t\t}\n\t}\n\n\texport const ReadNObjectHeaders = (reader: BinaryReadable, count: number): (SaveEntity | SaveComponent)[] => {\n\t\tlet objects: (SaveEntity | SaveComponent)[] = [];\n\t\tlet objectsRead = 0;\n\t\tfor (; objectsRead < count; objectsRead++) {\n\n\t\t\tlet obj: SaveEntity | SaveComponent;\n\t\t\tlet objectType = reader.readInt32();\n\t\t\tswitch (objectType) {\n\t\t\t\tcase SaveEntity.TypeID:\n\t\t\t\t\tobj = new SaveEntity('', '', '', '');\n\t\t\t\t\tSaveEntity.ParseHeader(reader, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SaveComponent.TypeID:\n\t\t\t\t\tobj = new SaveComponent('', '', '', '');\n\t\t\t\t\tSaveComponent.ParseHeader(reader, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new CorruptSaveError('Unknown object type' + objectType);\n\t\t\t}\n\t\t\tobjects.push(obj);\n\t\t}\n\t\treturn objects;\n\t}\n\n\texport const SerializeAllObjectHeaders = (writer: ByteWriter, objects: (SaveEntity | SaveComponent)[]): void => {\n\t\twriter.writeInt32(objects.length);\n\t\tfor (const obj of objects) {\n\n\t\t\tswitch (obj.type) {\n\t\t\t\tcase 'SaveEntity':\n\t\t\t\t\twriter.writeInt32(SaveEntity.TypeID);\n\t\t\t\t\tSaveEntity.SerializeHeader(writer, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'SaveComponent':\n\t\t\t\t\twriter.writeInt32(SaveComponent.TypeID);\n\t\t\t\t\tSaveComponent.SerializeHeader(writer, obj);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new UnimplementedError(`Unknown object type ${(obj as unknown as any).type}. Not implemented.`);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BinaryReadable } from '../../byte/binary-readable.interface';
|
|
2
|
-
import {
|
|
2
|
+
import { BinaryWritable } from '../../byte/binary-writable.interface';
|
|
3
3
|
import { ObjectReference } from '../types/structs/ObjectReference';
|
|
4
4
|
export declare namespace ObjectReferencesList {
|
|
5
|
-
const SerializeList: (writer:
|
|
5
|
+
const SerializeList: (writer: BinaryWritable, collectables: ObjectReference[]) => void;
|
|
6
6
|
const ReadList: (reader: BinaryReadable) => ObjectReference[];
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=object-references-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-references-list.d.ts","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/object-references-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"object-references-list.d.ts","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/object-references-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,yBAAiB,oBAAoB,CAAC;IAE3B,MAAM,aAAa,WAAY,cAAc,gBAAgB,eAAe,EAAE,KAAG,IAKvF,CAAA;IAEM,MAAM,QAAQ,WAAY,cAAc,KAAG,eAAe,EAOhE,CAAA;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-references-list.js","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/object-references-list.ts"],"names":[],"mappings":";;;AAEA,sEAAmE;AAEnE,IAAiB,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;IAEpB,kCAAa,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"object-references-list.js","sourceRoot":"","sources":["../../../../src/parser/satisfactory/save/object-references-list.ts"],"names":[],"mappings":";;;AAEA,sEAAmE;AAEnE,IAAiB,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;IAEpB,kCAAa,GAAG,CAAC,MAAsB,EAAE,YAA+B,EAAQ,EAAE;QAC3F,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACvC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACrC,iCAAe,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC,CAAA;IAEY,6BAAQ,GAAG,CAAC,MAAsB,EAAqB,EAAE;QAClE,MAAM,SAAS,GAAsB,EAAE,CAAC;QACxC,IAAI,KAAK,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAC/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7B,SAAS,CAAC,IAAI,CAAC,iCAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC,CAAA;AACL,CAAC,EAjBgB,oBAAoB,oCAApB,oBAAoB,QAiBpC","sourcesContent":["import { BinaryReadable } from '../../byte/binary-readable.interface';\r\nimport { BinaryWritable } from '../../byte/binary-writable.interface';\r\nimport { ObjectReference } from '../types/structs/ObjectReference';\r\n\r\nexport namespace ObjectReferencesList {\r\n\r\n export const SerializeList = (writer: BinaryWritable, collectables: ObjectReference[]): void => {\r\n writer.writeInt32(collectables.length);\r\n for (const collectable of collectables) {\r\n ObjectReference.write(writer, collectable);\r\n }\r\n }\r\n\r\n export const ReadList = (reader: BinaryReadable): ObjectReference[] => {\r\n const collected: ObjectReference[] = [];\r\n let count = reader.readInt32();\r\n for (let i = 0; i < count; i++) {\r\n collected.push(ObjectReference.read(reader));\r\n }\r\n return collected;\r\n }\r\n}"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BinaryReadable } from "../../../byte/binary-readable.interface";
|
|
2
2
|
import { ByteWriter } from "../../../byte/byte-writer.class";
|
|
3
|
-
import { PropertiesMap } from "../property/generic/
|
|
4
|
-
import {
|
|
3
|
+
import { PropertiesMap } from "../property/generic/AbstractBaseProperty";
|
|
4
|
+
import { SpecialProperties } from '../property/special/SpecialProperties';
|
|
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: SpecialProperties.AvailableSpecialPropertiesTypes;
|
|
16
16
|
trailingData: number[];
|
|
17
17
|
objectVersion: number;
|
|
18
18
|
unknownType2: number;
|
|
@@ -1 +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;
|
|
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;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,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,iBAAiB,CAAC,+BAA+B,CAAsC;IAC1G,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"}
|
|
@@ -10,7 +10,7 @@ class SaveObject {
|
|
|
10
10
|
this.rootObject = rootObject;
|
|
11
11
|
this.instanceName = instanceName;
|
|
12
12
|
this.properties = {};
|
|
13
|
-
this.specialProperties = {};
|
|
13
|
+
this.specialProperties = { type: 'EmptySpecialProperties' };
|
|
14
14
|
this.trailingData = [];
|
|
15
15
|
this.objectVersion = 0;
|
|
16
16
|
this.unknownType2 = 0;
|
|
@@ -27,7 +27,7 @@ class SaveObject {
|
|
|
27
27
|
}
|
|
28
28
|
static ParseData(obj, length, reader, buildVersion, typePath) {
|
|
29
29
|
const start = reader.getBufferPosition();
|
|
30
|
-
PropertiesList_1.PropertiesList.ParseList(
|
|
30
|
+
obj.properties = PropertiesList_1.PropertiesList.ParseList(reader, buildVersion);
|
|
31
31
|
reader.readInt32();
|
|
32
32
|
let remainingSize = length - (reader.getBufferPosition() - start);
|
|
33
33
|
obj.specialProperties = SpecialProperties_1.SpecialProperties.ParseClassSpecificSpecialProperties(reader, typePath, remainingSize);
|
|
@@ -40,7 +40,7 @@ class SaveObject {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
static SerializeData(writer, obj, buildVersion) {
|
|
43
|
-
PropertiesList_1.PropertiesList.SerializeList(obj, writer, buildVersion
|
|
43
|
+
PropertiesList_1.PropertiesList.SerializeList(obj.properties, writer, buildVersion);
|
|
44
44
|
writer.writeInt32(0);
|
|
45
45
|
SpecialProperties_1.SpecialProperties.SerializeClassSpecificSpecialProperties(writer, obj.typePath, obj.specialProperties);
|
|
46
46
|
writer.writeBytesArray(obj.trailingData);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveObject.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveObject.ts"],"names":[],"mappings":";;;AAEA,8DAA0D;
|
|
1
|
+
{"version":3,"file":"SaveObject.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/objects/SaveObject.ts"],"names":[],"mappings":";;;AAEA,8DAA0D;AAE1D,+DAA4D;AAC5D,6EAA0E;AAQ1E,MAAsB,UAAU;IAS/B,YAAmB,QAAgB,EAAS,UAAkB,EAAS,YAAoB;QAAxE,aAAQ,GAAR,QAAQ,CAAQ;QAAS,eAAU,GAAV,UAAU,CAAQ;QAAS,iBAAY,GAAZ,YAAY,CAAQ;QAPpF,eAAU,GAAkB,EAAE,CAAC;QAC/B,sBAAiB,GAAsD,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;QAC1G,iBAAY,GAAa,EAAE,CAAC;QAE5B,kBAAa,GAAW,CAAC,CAAC;QAC1B,iBAAY,GAAW,CAAC,CAAC;IAIhC,CAAC;IAES,MAAM,CAAC,WAAW,CAAC,MAAsB,EAAE,GAAe;QACnE,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACnC,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACrC,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC;IAES,MAAM,CAAC,eAAe,CAAC,MAAkB,EAAE,GAAe;QACnE,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACnC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,GAAe,EAAE,MAAc,EAAE,MAAsB,EAAE,YAAoB,EAAE,QAAgB;QACtH,MA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ByteWriter } from \"../../../byte/byte-writer.class\";\nimport { ParserError } from '../../../error/parser.error';\nimport { PropertiesMap } from \"../property/generic/AbstractBaseProperty\";\nimport { PropertiesList } from '../property/PropertiesList';\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: SpecialProperties.AvailableSpecialPropertiesTypes = { type: 'EmptySpecialProperties' };\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\tobj.properties = PropertiesList.ParseList(reader, buildVersion);\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.properties, writer, buildVersion);\n\t\twriter.writeInt32(0);\n\t\tSpecialProperties.SerializeClassSpecificSpecialProperties(writer, obj.typePath, obj.specialProperties);\n\t\twriter.writeBytesArray(obj.trailingData);\n\t}\n}\n"]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { BinaryReadable } from '../../../byte/binary-readable.interface';
|
|
2
2
|
import { ByteWriter } from '../../../byte/byte-writer.class';
|
|
3
|
-
import {
|
|
4
|
-
import { SaveObject } from '../objects/SaveObject';
|
|
5
|
-
import { AbstractBaseProperty } from './generic/BasicProperty';
|
|
3
|
+
import { AbstractBaseProperty, PropertiesMap } from './generic/AbstractBaseProperty';
|
|
6
4
|
export declare namespace PropertiesList {
|
|
7
|
-
const ParseList: (
|
|
8
|
-
const SerializeList: (
|
|
5
|
+
const ParseList: (reader: BinaryReadable, buildVersion: number) => PropertiesMap;
|
|
6
|
+
const SerializeList: (properties: PropertiesMap, writer: ByteWriter, buildVersion: number) => void;
|
|
9
7
|
const ParseSingleProperty: (reader: BinaryReadable, buildVersion: number, propertyName: string) => AbstractBaseProperty;
|
|
10
|
-
const SerializeSingleProperty: (writer: ByteWriter, property: AbstractBaseProperty,
|
|
8
|
+
const SerializeSingleProperty: (writer: ByteWriter, property: AbstractBaseProperty, buildVersion: number) => void;
|
|
11
9
|
}
|
|
12
10
|
//# sourceMappingURL=PropertiesList.d.ts.map
|
|
@@ -1 +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,
|
|
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,oBAAoB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAsBrF,yBAAiB,cAAc,CAAC;IAExB,MAAM,SAAS,WAAY,cAAc,gBAAgB,MAAM,KAAG,aAqBxE,CAAA;IAEM,MAAM,aAAa,eAAgB,aAAa,UAAU,UAAU,gBAAgB,MAAM,KAAG,IAMnG,CAAA;IAEM,MAAM,mBAAmB,WAAY,cAAc,gBAAgB,MAAM,gBAAgB,MAAM,KAAG,oBA4HxG,CAAA;IAEM,MAAM,uBAAuB,WAAY,UAAU,YAAY,oBAAoB,gBAAgB,MAAM,KAAG,IA4HlH,CAAA;CACD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PropertiesList = void 0;
|
|
4
4
|
const parser_error_1 = require("../../../error/parser.error");
|
|
5
|
-
const ArrayProperty_1 = require("./generic/ArrayProperty");
|
|
5
|
+
const ArrayProperty_1 = require("./generic/ArrayProperty/ArrayProperty");
|
|
6
6
|
const BoolProperty_1 = require("./generic/BoolProperty");
|
|
7
7
|
const ByteProperty_1 = require("./generic/ByteProperty");
|
|
8
8
|
const DoubleProperty_1 = require("./generic/DoubleProperty");
|
|
@@ -13,7 +13,7 @@ const Int64Property_1 = require("./generic/Int64Property");
|
|
|
13
13
|
const Int8Property_1 = require("./generic/Int8Property");
|
|
14
14
|
const MapProperty_1 = require("./generic/MapProperty");
|
|
15
15
|
const ObjectProperty_1 = require("./generic/ObjectProperty");
|
|
16
|
-
const SetProperty_1 = require("./generic/SetProperty");
|
|
16
|
+
const SetProperty_1 = require("./generic/SetProperty/SetProperty");
|
|
17
17
|
const SoftObjectProperty_1 = require("./generic/SoftObjectProperty");
|
|
18
18
|
const StrProperty_1 = require("./generic/StrProperty");
|
|
19
19
|
const StructProperty_1 = require("./generic/StructProperty");
|
|
@@ -23,31 +23,28 @@ const Uint64Property_1 = require("./generic/Uint64Property");
|
|
|
23
23
|
const Uint8Property_1 = require("./generic/Uint8Property");
|
|
24
24
|
var PropertiesList;
|
|
25
25
|
(function (PropertiesList) {
|
|
26
|
-
PropertiesList.ParseList = (
|
|
27
|
-
|
|
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
|
-
}
|
|
26
|
+
PropertiesList.ParseList = (reader, buildVersion) => {
|
|
27
|
+
const properties = {};
|
|
32
28
|
let propertyName = reader.readString();
|
|
33
29
|
while (propertyName !== 'None') {
|
|
34
30
|
const parsedProperty = PropertiesList.ParseSingleProperty(reader, buildVersion, propertyName);
|
|
35
|
-
if (
|
|
36
|
-
if (!Array.isArray(
|
|
37
|
-
|
|
31
|
+
if (properties[propertyName]) {
|
|
32
|
+
if (!Array.isArray(properties[propertyName])) {
|
|
33
|
+
properties[propertyName] = [properties[propertyName]];
|
|
38
34
|
}
|
|
39
|
-
|
|
35
|
+
properties[propertyName].push(parsedProperty);
|
|
40
36
|
}
|
|
41
37
|
else {
|
|
42
|
-
|
|
38
|
+
properties[propertyName] = parsedProperty;
|
|
43
39
|
}
|
|
44
40
|
propertyName = reader.readString();
|
|
45
41
|
}
|
|
42
|
+
return properties;
|
|
46
43
|
};
|
|
47
|
-
PropertiesList.SerializeList = (
|
|
48
|
-
for (const property of Object.values(
|
|
44
|
+
PropertiesList.SerializeList = (properties, writer, buildVersion) => {
|
|
45
|
+
for (const property of Object.values(properties).flatMap(val => Array.isArray(val) ? val : [val])) {
|
|
49
46
|
writer.writeString(property.name);
|
|
50
|
-
PropertiesList.SerializeSingleProperty(writer, property,
|
|
47
|
+
PropertiesList.SerializeSingleProperty(writer, property, buildVersion);
|
|
51
48
|
}
|
|
52
49
|
writer.writeString('None');
|
|
53
50
|
};
|
|
@@ -123,7 +120,7 @@ var PropertiesList;
|
|
|
123
120
|
overhead = StructProperty_1.StructProperty.CalcOverhead(currentProperty);
|
|
124
121
|
break;
|
|
125
122
|
case 'ArrayProperty':
|
|
126
|
-
currentProperty = ArrayProperty_1.ArrayProperty.Parse(reader, propertyType, index,
|
|
123
|
+
currentProperty = ArrayProperty_1.ArrayProperty.Parse(reader, propertyType, index, binarySize);
|
|
127
124
|
overhead = ArrayProperty_1.ArrayProperty.CalcOverhead(currentProperty);
|
|
128
125
|
break;
|
|
129
126
|
case 'MapProperty':
|
|
@@ -149,7 +146,7 @@ var PropertiesList;
|
|
|
149
146
|
}
|
|
150
147
|
return currentProperty;
|
|
151
148
|
};
|
|
152
|
-
PropertiesList.SerializeSingleProperty = (writer, property,
|
|
149
|
+
PropertiesList.SerializeSingleProperty = (writer, property, buildVersion) => {
|
|
153
150
|
writer.writeString(property.ueType);
|
|
154
151
|
const lenIndicator = writer.getBufferPosition();
|
|
155
152
|
writer.writeInt32(0);
|
|
@@ -227,7 +224,7 @@ var PropertiesList;
|
|
|
227
224
|
break;
|
|
228
225
|
case 'ArrayProperty':
|
|
229
226
|
overhead = ArrayProperty_1.ArrayProperty.CalcOverhead(property);
|
|
230
|
-
ArrayProperty_1.ArrayProperty.Serialize(writer, property
|
|
227
|
+
ArrayProperty_1.ArrayProperty.Serialize(writer, property);
|
|
231
228
|
break;
|
|
232
229
|
case 'MapProperty':
|
|
233
230
|
overhead = MapProperty_1.MapProperty.CalcOverhead(property);
|
|
@@ -1 +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;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C,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"]}
|
|
1
|
+
{"version":3,"file":"PropertiesList.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/property/PropertiesList.ts"],"names":[],"mappings":";;;AAEA,8DAA0D;AAE1D,yEAAsE;AACtE,yDAAsD;AACtD,yDAAsD;AACtD,6DAA0D;AAC1D,yDAAsD;AACtD,2DAAwD;AACxD,2DAAwD;AACxD,2DAAwD;AACxD,yDAAsD;AACtD,uDAAoD;AACpD,6DAA0D;AAC1D,mEAAgE;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KAAK,GAAG,QAAQ,CAAC,CAAC;IACpE,CAAC,CAAA;AACF,CAAC,EA5RgB,cAAc,8BAAd,cAAc,QA4R9B","sourcesContent":["import { BinaryReadable } from '../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../byte/byte-writer.class';\nimport { ParserError } from '../../../error/parser.error';\nimport { AbstractBaseProperty, PropertiesMap } from './generic/AbstractBaseProperty';\nimport { ArrayProperty } from './generic/ArrayProperty/ArrayProperty';\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/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 = (reader: BinaryReadable, buildVersion: number): PropertiesMap => {\n\n\t\tconst properties: PropertiesMap = {};\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 (properties[propertyName]) {\n\t\t\t\tif (!Array.isArray(properties[propertyName])) {\n\t\t\t\t\tproperties[propertyName] = [properties[propertyName] as AbstractBaseProperty];\n\t\t\t\t}\n\t\t\t\t(properties[propertyName] as AbstractBaseProperty[]).push(parsedProperty);\n\t\t\t} else {\n\t\t\t\tproperties[propertyName] = parsedProperty;\n\t\t\t}\n\n\t\t\tpropertyName = reader.readString();\n\t\t}\n\n\t\treturn properties;\n\t}\n\n\texport const SerializeList = (properties: PropertiesMap, writer: ByteWriter, buildVersion: number): void => {\n\t\tfor (const property of Object.values(properties).flatMap(val => Array.isArray(val) ? val : [val])) {\n\t\t\twriter.writeString(property.name);\n\t\t\tPropertiesList.SerializeSingleProperty(writer, property, 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, binarySize);\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, 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.AvailableArrayPropertyTypes);\n\t\t\t\tArrayProperty.Serialize(writer, property as ArrayProperty.AvailableArrayPropertyTypes);\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.AvailableSetPropertyTypes);\n\t\t\t\tSetProperty.Serialize(writer, property as SetProperty.AvailableSetPropertyTypes);\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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GUIDInfo } from '../../structs/GUIDInfo';
|
|
2
|
+
export type PropertiesMap = {
|
|
3
|
+
[name: string]: AbstractBaseProperty | AbstractBaseProperty[];
|
|
4
|
+
};
|
|
5
|
+
type AbstractBasePropertyOptions = {
|
|
6
|
+
type: string;
|
|
7
|
+
ueType: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
guidInfo?: GUIDInfo;
|
|
10
|
+
index?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare abstract class AbstractBaseProperty {
|
|
13
|
+
type: string;
|
|
14
|
+
ueType: string;
|
|
15
|
+
name: string;
|
|
16
|
+
index: number | undefined;
|
|
17
|
+
guidInfo: GUIDInfo;
|
|
18
|
+
constructor(options: AbstractBasePropertyOptions);
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=AbstractBaseProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractBaseProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/AbstractBaseProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,MAAM,aAAa,GAAG;IAC3B,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,GAAG,oBAAoB,EAAE,CAAC;CAC9D,CAAC;AAUF,KAAK,2BAA2B,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,8BAAsB,oBAAoB;IAElC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAM;IAClB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAa;IACtC,QAAQ,EAAE,QAAQ,CAAa;gBAE1B,OAAO,EAAE,2BAA2B;CAahD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractBaseProperty = void 0;
|
|
4
|
+
class AbstractBaseProperty {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
this.name = '';
|
|
7
|
+
this.index = undefined;
|
|
8
|
+
this.guidInfo = undefined;
|
|
9
|
+
this.type = options.type;
|
|
10
|
+
this.ueType = options.ueType;
|
|
11
|
+
if (options.name !== undefined && options.name !== null) {
|
|
12
|
+
this.name = options.name;
|
|
13
|
+
}
|
|
14
|
+
if (options.index !== undefined && options.index !== null && options.index !== 0) {
|
|
15
|
+
this.index = options.index;
|
|
16
|
+
}
|
|
17
|
+
if (options.guidInfo !== undefined) {
|
|
18
|
+
this.guidInfo = options.guidInfo;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.AbstractBaseProperty = AbstractBaseProperty;
|
|
23
|
+
//# sourceMappingURL=AbstractBaseProperty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractBaseProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/AbstractBaseProperty.ts"],"names":[],"mappings":";;;AAuBA,MAAsB,oBAAoB;IAQzC,YAAY,OAAoC;QAJzC,SAAI,GAAW,EAAE,CAAC;QAClB,UAAK,GAAuB,SAAS,CAAC;QACtC,aAAQ,GAAa,SAAS,CAAC;QAGrC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACzD,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,CAAC;QACD,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YAClF,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,CAAC;QACD,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAClC,CAAC;IACF,CAAC;CACD;AArBD,oDAqBC","sourcesContent":["import { GUIDInfo } from '../../structs/GUIDInfo';\n\n\nexport type PropertiesMap = {\n\t[name: string]: AbstractBaseProperty | AbstractBaseProperty[];\n};\n\n\n/**\n * @type denotes our internal type.\n * @ueType denotes the type like Unreal Engine calls it, like IntProperty\n * @name property name\n * @guidInfo denotes the GUID info of this property, i think there never was one observed. they always were not defined.\n * @index index of a property, in case it is part of an array.\n */\ntype AbstractBasePropertyOptions = {\n\ttype: string;\n\tueType: string;\n\tname?: string;\n\tguidInfo?: GUIDInfo;\n\tindex?: number;\n};\n\nexport abstract class AbstractBaseProperty {\n\n\tpublic type: string;\n\tpublic ueType: string;\n\tpublic name: string = '';\n\tpublic index: number | undefined = undefined;\n\tpublic guidInfo: GUIDInfo = undefined;\n\n\tconstructor(options: AbstractBasePropertyOptions) {\n\t\tthis.type = options.type;\n\t\tthis.ueType = options.ueType;\n\t\tif (options.name !== undefined && options.name !== null) {\n\t\t\tthis.name = options.name;\n\t\t}\n\t\tif (options.index !== undefined && options.index !== null && options.index !== 0) {\n\t\t\tthis.index = options.index;\n\t\t}\n\t\tif (options.guidInfo !== undefined) {\n\t\t\tthis.guidInfo = options.guidInfo;\n\t\t}\n\t}\n}"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BinaryReadable } from '../../../../../byte/binary-readable.interface';
|
|
2
|
+
import { ByteWriter } from '../../../../../byte/byte-writer.class';
|
|
3
|
+
import { BoolArrayProperty } from './BoolArrayProperty';
|
|
4
|
+
import { ByteArrayProperty } from './ByteArrayProperty';
|
|
5
|
+
import { DoubleArrayProperty } from './DoubleArrayProperty';
|
|
6
|
+
import { EnumArrayProperty } from './EnumArrayProperty';
|
|
7
|
+
import { FloatArrayProperty } from './FloatArrayProperty';
|
|
8
|
+
import { Int32ArrayProperty } from './Int32ArrayProperty';
|
|
9
|
+
import { Int64ArrayProperty } from './Int64ArrayProperty';
|
|
10
|
+
import { ObjectArrayProperty } from './ObjectArrayProperty';
|
|
11
|
+
import { SoftObjectArrayProperty } from './SoftObjectArrayProperty';
|
|
12
|
+
import { StrArrayProperty } from './StrArrayProperty';
|
|
13
|
+
import { StructArrayProperty } from './StructArrayProperty';
|
|
14
|
+
import { TextArrayProperty } from './TextArrayProperty';
|
|
15
|
+
export declare const isArrayProperty: (obj: any) => obj is BoolArrayProperty | ByteArrayProperty | DoubleArrayProperty | EnumArrayProperty | FloatArrayProperty | Int32ArrayProperty | Int64ArrayProperty | ObjectArrayProperty | SoftObjectArrayProperty | StrArrayProperty | StructArrayProperty | TextArrayProperty;
|
|
16
|
+
export declare namespace ArrayProperty {
|
|
17
|
+
type AvailableArrayPropertyTypes = ReturnType<typeof Parse>;
|
|
18
|
+
const Parse: (reader: BinaryReadable, ueType: string, index: number, size: number) => BoolArrayProperty | ByteArrayProperty | DoubleArrayProperty | EnumArrayProperty | FloatArrayProperty | Int32ArrayProperty | Int64ArrayProperty | ObjectArrayProperty | SoftObjectArrayProperty | StrArrayProperty | StructArrayProperty | TextArrayProperty;
|
|
19
|
+
const CalcOverhead: (property: AvailableArrayPropertyTypes) => number;
|
|
20
|
+
const Serialize: (writer: ByteWriter, property: AvailableArrayPropertyTypes) => void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ArrayProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayProperty.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAyB,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAyB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAA6B,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAsB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAyB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,eAAO,MAAM,eAAe,QAAS,GAAG,uQAYT,CAAC;AAEhC,yBAAiB,aAAa,CAAC;IAE3B,KAAY,2BAA2B,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;IAE5D,MAAM,KAAK,WAAY,cAAc,UAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,gQA+DxF,CAAA;IAEM,MAAM,YAAY,aAAc,2BAA2B,KAAG,MAEpE,CAAA;IAEM,MAAM,SAAS,WAAY,UAAU,YAAY,2BAA2B,KAAG,IAiCrF,CAAA;CACJ"}
|