@etothepii/satisfactory-file-parser 3.2.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/README.md +16 -1
- package/build/index.d.ts +13 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +14 -6
- package/build/index.js.map +1 -1
- package/build/parser/byte/byte-writer.class.d.ts +2 -0
- package/build/parser/byte/byte-writer.class.d.ts.map +1 -1
- package/build/parser/byte/byte-writer.class.js +8 -0
- package/build/parser/byte/byte-writer.class.js.map +1 -1
- package/build/parser/context/context.d.ts +2 -0
- package/build/parser/context/context.d.ts.map +1 -1
- package/build/parser/context/context.js.map +1 -1
- package/build/parser/parser.d.ts +2 -0
- package/build/parser/parser.d.ts.map +1 -1
- package/build/parser/parser.js +2 -0
- package/build/parser/parser.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-header.js +5 -5
- package/build/parser/satisfactory/blueprint/blueprint-header.js.map +1 -1
- package/build/parser/satisfactory/save/level.d.ts.map +1 -1
- package/build/parser/satisfactory/save/level.js +32 -17
- package/build/parser/satisfactory/save/level.js.map +1 -1
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts.map +1 -1
- package/build/parser/satisfactory/types/objects/SaveObject.js +24 -5
- package/build/parser/satisfactory/types/objects/SaveObject.js.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.js +118 -97
- package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts +2 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts +2 -2
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js +3 -4
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +2 -2
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js +3 -4
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +2 -2
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js +3 -4
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +2 -2
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.js +8 -5
- package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts +2 -2
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js +3 -4
- package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +8 -7
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.js +71 -47
- package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +1 -1
- package/build/parser/satisfactory/types/structs/FGDynamicStruct.d.ts +1 -0
- package/build/parser/satisfactory/types/structs/FGDynamicStruct.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/FGDynamicStruct.js +20 -13
- package/build/parser/satisfactory/types/structs/FGDynamicStruct.js.map +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts.map +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.js +1 -1
- package/build/parser/satisfactory/types/structs/GUIDInfo.js.map +1 -1
- package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.js +31 -0
- package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FColor.d.ts +9 -0
- package/build/parser/satisfactory/types/structs/binary/FColor.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FColor.js +14 -0
- package/build/parser/satisfactory/types/structs/binary/FColor.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FLinearColor.d.ts +9 -0
- package/build/parser/satisfactory/types/structs/binary/FLinearColor.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/FLinearColor.js +14 -0
- package/build/parser/satisfactory/types/structs/binary/FLinearColor.js.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/GUID.d.ts +8 -0
- package/build/parser/satisfactory/types/structs/binary/GUID.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/binary/GUID.js +22 -0
- package/build/parser/satisfactory/types/structs/binary/GUID.js.map +1 -0
- 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 +2 -2
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js.map +1 -1
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts +13 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js +21 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts +12 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js +22 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.d.ts +13 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.js +35 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.js.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts +12 -0
- package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts.map +1 -0
- package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js +20 -0
- package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js.map +1 -0
- package/build/parser/stream/reworked/readable-stream-parser.d.ts.map +1 -1
- package/build/parser/stream/reworked/readable-stream-parser.js +6 -5
- 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/BlueprintConfigReader.html +4 -4
- package/docs/classes/BlueprintReader.html +4 -4
- package/docs/classes/CompressionLibraryError.html +2 -2
- package/docs/classes/ContextReader.html +36 -0
- package/docs/classes/ContextWriter.html +41 -0
- package/docs/classes/CorruptBlueprintError.html +2 -2
- package/docs/classes/CorruptSaveError.html +2 -2
- package/docs/classes/Parser.html +8 -8
- package/docs/classes/ParserError.html +2 -2
- package/docs/classes/ReadableStreamParser.html +2 -2
- package/docs/classes/SatisfactorySave.html +3 -4
- package/docs/classes/SaveComponent.html +2 -2
- package/docs/classes/SaveEntity.html +2 -2
- package/docs/classes/SaveObject.html +2 -2
- package/docs/classes/SaveReader.html +4 -5
- package/docs/classes/SaveStreamJsonStringifier.html +2 -2
- package/docs/classes/SaveStreamWriter.html +3 -4
- package/docs/classes/SaveWriter.html +6 -5
- package/docs/classes/TimeoutError.html +2 -2
- package/docs/classes/UnimplementedError.html +2 -2
- package/docs/classes/UnsupportedVersionError.html +2 -2
- package/docs/enums/Alignment.html +3 -0
- package/docs/enums/BlueprintConfigVersion.html +2 -2
- package/docs/enums/BlueprintHeaderVersion.html +2 -2
- package/docs/enums/CompressionAlgorithmCode.html +2 -2
- package/docs/enums/FactoryGameCustomVersion.html +2 -2
- package/docs/enums/RuntimeBuildableInstanceDataVersion.html +2 -2
- package/docs/enums/SaveCustomVersion.html +10 -10
- package/docs/enums/SaveHeaderType.html +2 -2
- package/docs/functions/AbstractBaseProperty.Create.html +1 -1
- package/docs/functions/ArrayProperty.CalcOverhead.html +1 -1
- package/docs/functions/ArrayProperty.Parse.html +1 -1
- package/docs/functions/ArrayProperty.Serialize.html +1 -1
- package/docs/functions/BlueprintConfig.Parse.html +1 -1
- package/docs/functions/BlueprintConfig.Serialize.html +1 -1
- package/docs/functions/BlueprintHeader.Parse.html +1 -1
- package/docs/functions/BlueprintHeader.Serialize.html +1 -1
- package/docs/functions/BoolArrayProperty.Parse.html +1 -1
- package/docs/functions/BoolArrayProperty.Serialize.html +1 -1
- package/docs/functions/BoolProperty.CalcOverhead.html +1 -1
- package/docs/functions/BoolProperty.Parse.html +1 -1
- package/docs/functions/BoolProperty.ReadValue.html +1 -1
- package/docs/functions/BoolProperty.Serialize.html +1 -1
- package/docs/functions/BoolProperty.SerializeValue.html +1 -1
- package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -1
- package/docs/functions/BuildableSubsystemSpecialProperties.Serialize.html +1 -1
- package/docs/functions/BuildableTypeInstance.Parse.html +1 -1
- package/docs/functions/BuildableTypeInstance.Serialize.html +1 -1
- package/docs/functions/ByteArrayProperty.Parse.html +1 -1
- package/docs/functions/ByteArrayProperty.Serialize.html +1 -1
- package/docs/functions/ByteProperty.CalcOverhead.html +1 -1
- package/docs/functions/ByteProperty.Parse.html +1 -1
- package/docs/functions/ByteProperty.ReadValue.html +1 -1
- package/docs/functions/ByteProperty.Serialize.html +1 -1
- package/docs/functions/ByteProperty.SerializeValue.html +1 -1
- package/docs/functions/CircuitSpecialProperties.Parse.html +1 -1
- package/docs/functions/CircuitSpecialProperties.Serialize.html +1 -1
- package/docs/functions/ConveyorChainActorSpecialProperties.Parse.html +1 -1
- package/docs/functions/ConveyorChainActorSpecialProperties.Serialize.html +1 -1
- package/docs/functions/ConveyorSpecialProperties.Parse.html +1 -1
- package/docs/functions/ConveyorSpecialProperties.Serialize.html +1 -1
- package/docs/functions/DoubleArrayProperty.Parse.html +1 -1
- package/docs/functions/DoubleArrayProperty.Serialize.html +1 -1
- package/docs/functions/DoubleProperty.CalcOverhead.html +1 -1
- package/docs/functions/DoubleProperty.Parse.html +1 -1
- package/docs/functions/DoubleProperty.ReadValue.html +1 -1
- package/docs/functions/DoubleProperty.Serialize.html +1 -1
- package/docs/functions/DoubleProperty.SerializeValue.html +1 -1
- package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
- package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
- package/docs/functions/EmptySpecialProperties.Parse.html +1 -1
- package/docs/functions/EmptySpecialProperties.Serialize.html +1 -1
- package/docs/functions/EnumArrayProperty.Parse.html +1 -1
- package/docs/functions/EnumArrayProperty.Serialize.html +1 -1
- package/docs/functions/EnumProperty.CalcOverhead.html +1 -1
- package/docs/functions/EnumProperty.Parse.html +1 -1
- package/docs/functions/EnumProperty.ReadValue.html +1 -1
- package/docs/functions/EnumProperty.Serialize.html +1 -1
- package/docs/functions/EnumProperty.SerializeValue.html +1 -1
- package/docs/functions/FClientIdentityInfo.read.html +1 -0
- package/docs/functions/FClientIdentityInfo.write.html +1 -0
- package/docs/functions/FColor.read.html +1 -0
- package/docs/functions/FColor.write.html +1 -0
- package/docs/functions/FGDynamicStruct.Parse.html +1 -1
- package/docs/functions/FGDynamicStruct.Serialize.html +1 -1
- package/docs/functions/FICFrameRange.read.html +1 -0
- package/docs/functions/FICFrameRange.write.html +1 -0
- package/docs/functions/FINGPUT1BufferPixel.read.html +1 -0
- package/docs/functions/FINGPUT1BufferPixel.write.html +1 -0
- package/docs/functions/FINItemStateFileSystem.IsFINItemStateFileSystem.html +1 -0
- package/docs/functions/FINItemStateFileSystem.read.html +1 -0
- package/docs/functions/FINItemStateFileSystem.write.html +1 -0
- package/docs/functions/FINNetworkTrace.read.html +1 -0
- package/docs/functions/FINNetworkTrace.write.html +1 -0
- package/docs/functions/FLBBalancerIndexing.read.html +1 -0
- package/docs/functions/FLBBalancerIndexing.write.html +1 -0
- package/docs/functions/FLinearColor.read.html +1 -0
- package/docs/functions/FLinearColor.write.html +1 -0
- package/docs/functions/FloatArrayProperty.Parse.html +1 -1
- package/docs/functions/FloatArrayProperty.Serialize.html +1 -1
- package/docs/functions/FloatProperty.CalcOverhead.html +1 -1
- package/docs/functions/FloatProperty.Parse.html +1 -1
- package/docs/functions/FloatProperty.ReadValue.html +1 -1
- package/docs/functions/FloatProperty.Serialize.html +1 -1
- package/docs/functions/FloatProperty.SerializeValue.html +1 -1
- package/docs/functions/GUID.read.html +1 -1
- package/docs/functions/GUID.write.html +1 -1
- package/docs/functions/GUIDInfo.read.html +1 -1
- package/docs/functions/GUIDInfo.write.html +1 -1
- package/docs/functions/Int32ArrayProperty.Parse.html +1 -1
- package/docs/functions/Int32ArrayProperty.Serialize.html +1 -1
- package/docs/functions/Int32Property.CalcOverhead.html +1 -1
- package/docs/functions/Int32Property.Parse.html +1 -1
- package/docs/functions/Int32Property.ReadValue.html +1 -1
- package/docs/functions/Int32Property.Serialize.html +1 -1
- package/docs/functions/Int32Property.SerializeValue.html +1 -1
- package/docs/functions/Int32SetProperty.Parse.html +1 -1
- package/docs/functions/Int32SetProperty.Serialize.html +1 -1
- package/docs/functions/Int64ArrayProperty.Parse.html +1 -1
- package/docs/functions/Int64ArrayProperty.Serialize.html +1 -1
- package/docs/functions/Int64Property.CalcOverhead.html +1 -1
- package/docs/functions/Int64Property.Parse.html +1 -1
- package/docs/functions/Int64Property.ReadValue.html +1 -1
- package/docs/functions/Int64Property.Serialize.html +1 -1
- package/docs/functions/Int64Property.SerializeValue.html +1 -1
- package/docs/functions/Int8Property.CalcOverhead.html +1 -1
- package/docs/functions/Int8Property.Parse.html +1 -1
- package/docs/functions/Int8Property.ReadValue.html +1 -1
- package/docs/functions/Int8Property.Serialize.html +1 -1
- package/docs/functions/Int8Property.SerializeValue.html +1 -1
- package/docs/functions/Level.ReadAllObjectContents.html +1 -1
- package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
- package/docs/functions/Level.ReadLevel.html +1 -1
- package/docs/functions/Level.ReadNObjectContents.html +1 -1
- package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
- package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeLevel.html +1 -1
- package/docs/functions/LevelToDestroyedActorsMap.read.html +1 -1
- package/docs/functions/LevelToDestroyedActorsMap.write.html +1 -1
- package/docs/functions/MD5Hash.read.html +1 -1
- package/docs/functions/MD5Hash.write.html +1 -1
- package/docs/functions/MapProperty.CalcOverhead.html +1 -1
- package/docs/functions/MapProperty.Parse.html +1 -1
- package/docs/functions/MapProperty.Serialize.html +1 -1
- package/docs/functions/ObjectArrayProperty.Parse.html +1 -1
- package/docs/functions/ObjectArrayProperty.Serialize.html +1 -1
- package/docs/functions/ObjectProperty.CalcOverhead.html +1 -1
- package/docs/functions/ObjectProperty.Parse.html +1 -1
- package/docs/functions/ObjectProperty.ReadValue.html +1 -1
- package/docs/functions/ObjectProperty.Serialize.html +1 -1
- package/docs/functions/ObjectProperty.SerializeValue.html +1 -1
- package/docs/functions/ObjectReference.IsEqual.html +1 -1
- package/docs/functions/ObjectReference.read.html +1 -1
- package/docs/functions/ObjectReference.write.html +1 -1
- package/docs/functions/ObjectSetProperty.Parse.html +1 -1
- package/docs/functions/ObjectSetProperty.Serialize.html +1 -1
- package/docs/functions/ObjectsListSpecialProperties.Parse.html +1 -1
- package/docs/functions/ObjectsListSpecialProperties.Serialize.html +1 -1
- package/docs/functions/PlayerSpecialProperties.Parse.html +1 -1
- package/docs/functions/PlayerSpecialProperties.Serialize.html +1 -1
- package/docs/functions/PowerLineSpecialProperties.Parse.html +1 -1
- package/docs/functions/PowerLineSpecialProperties.Serialize.html +1 -1
- package/docs/functions/PropertiesList.ParseList.html +1 -1
- package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
- package/docs/functions/PropertiesList.SerializeList.html +1 -1
- package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
- package/docs/functions/SatisfactorySaveHeader.Parse.html +1 -1
- package/docs/functions/SatisfactorySaveHeader.Serialize.html +1 -1
- package/docs/functions/SaveBodyChunks.CompressDataIntoChunks.html +1 -1
- package/docs/functions/SaveBodyChunks.DecompressChunks.html +1 -1
- package/docs/functions/SaveBodyValidation.Parse.html +1 -0
- package/docs/functions/SaveBodyValidation.Serialize.html +1 -0
- package/docs/functions/SetProperty.CalcOverhead.html +1 -1
- package/docs/functions/SetProperty.Parse.html +1 -1
- package/docs/functions/SetProperty.Serialize.html +1 -1
- package/docs/functions/SoftObjectArrayProperty.Parse.html +1 -1
- package/docs/functions/SoftObjectArrayProperty.Serialize.html +1 -1
- package/docs/functions/SoftObjectReference.read.html +1 -1
- package/docs/functions/SoftObjectReference.write.html +1 -1
- package/docs/functions/SpecialDroneActionProperties.Parse.html +1 -1
- package/docs/functions/SpecialDroneActionProperties.Serialize.html +1 -1
- package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
- package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
- package/docs/functions/StrArrayProperty.Parse.html +1 -1
- package/docs/functions/StrArrayProperty.Serialize.html +1 -1
- package/docs/functions/StrProperty.CalcOverhead.html +1 -1
- package/docs/functions/StrProperty.Parse.html +1 -1
- package/docs/functions/StrProperty.ReadValue.html +1 -1
- package/docs/functions/StrProperty.Serialize.html +1 -1
- package/docs/functions/StrProperty.SerializeValue.html +1 -1
- package/docs/functions/StrSetProperty.Parse.html +1 -1
- package/docs/functions/StrSetProperty.Serialize.html +1 -1
- package/docs/functions/StructArrayProperty.Parse.html +1 -1
- package/docs/functions/StructArrayProperty.Serialize.html +1 -1
- package/docs/functions/StructProperty.CalcOverhead.html +1 -1
- package/docs/functions/StructProperty.Parse.html +1 -1
- package/docs/functions/StructProperty.ParseValue.html +1 -1
- package/docs/functions/StructProperty.Serialize.html +1 -1
- package/docs/functions/StructProperty.SerializeValue.html +1 -1
- package/docs/functions/StructSetProperty.Parse.html +1 -1
- package/docs/functions/StructSetProperty.Serialize.html +1 -1
- package/docs/functions/TextArrayProperty.Parse.html +1 -1
- package/docs/functions/TextArrayProperty.Serialize.html +1 -1
- package/docs/functions/TextProperty.CalcOverhead.html +1 -1
- package/docs/functions/TextProperty.Parse.html +1 -1
- package/docs/functions/TextProperty.ReadValue.html +1 -1
- package/docs/functions/TextProperty.Serialize.html +1 -1
- package/docs/functions/TextProperty.SerializeValue.html +1 -1
- package/docs/functions/Transform.Parse.html +1 -1
- package/docs/functions/Transform.ParseF.html +1 -1
- package/docs/functions/Transform.Serialize.html +1 -1
- package/docs/functions/Transform.SerializeF.html +1 -1
- package/docs/functions/Uint32Property.CalcOverhead.html +1 -1
- package/docs/functions/Uint32Property.Parse.html +1 -1
- package/docs/functions/Uint32Property.ReadValue.html +1 -1
- package/docs/functions/Uint32Property.Serialize.html +1 -1
- package/docs/functions/Uint32Property.SerializeValue.html +1 -1
- package/docs/functions/Uint32SetProperty.Parse.html +1 -1
- package/docs/functions/Uint32SetProperty.Serialize.html +1 -1
- package/docs/functions/Uint64Property.CalcOverhead.html +1 -1
- package/docs/functions/Uint64Property.Parse.html +1 -1
- package/docs/functions/Uint64Property.ReadValue.html +1 -1
- package/docs/functions/Uint64Property.Serialize.html +1 -1
- package/docs/functions/Uint64Property.SerializeValue.html +1 -1
- package/docs/functions/Uint8Property.CalcOverhead.html +1 -1
- package/docs/functions/Uint8Property.Parse.html +1 -1
- package/docs/functions/Uint8Property.ReadValue.html +1 -1
- package/docs/functions/Uint8Property.Serialize.html +1 -1
- package/docs/functions/Uint8Property.SerializeValue.html +1 -1
- package/docs/functions/VehiclePhysicsData.Parse.html +1 -1
- package/docs/functions/VehiclePhysicsData.Serialize.html +1 -1
- package/docs/functions/VehicleSpecialProperties.Parse.html +1 -1
- package/docs/functions/VehicleSpecialProperties.Serialize.html +1 -1
- package/docs/functions/col4.ParseBGRA.html +1 -1
- package/docs/functions/col4.ParseRGBA.html +1 -1
- package/docs/functions/col4.SerializeBGRA.html +1 -1
- package/docs/functions/col4.SerializeRGBA.html +1 -1
- package/docs/functions/isArrayProperty.html +1 -1
- package/docs/functions/isBoolArrayProperty.html +1 -1
- package/docs/functions/isBoolProperty.html +1 -1
- package/docs/functions/isBuildableSubsystemSpecialProperties.html +1 -1
- package/docs/functions/isByteArrayProperty.html +1 -1
- package/docs/functions/isByteProperty.html +1 -1
- package/docs/functions/isCircuitSpecialProperties.html +1 -1
- package/docs/functions/isConveyorChainActorSpecialProperties.html +1 -1
- package/docs/functions/isConveyorSpecialProperties.html +1 -1
- package/docs/functions/isDoubleArrayProperty.html +1 -1
- package/docs/functions/isDoubleProperty.html +1 -1
- package/docs/functions/isEmptySpecialProperties.html +1 -1
- package/docs/functions/isEnumArrayProperty.html +1 -1
- package/docs/functions/isEnumProperty.html +1 -1
- package/docs/functions/isFloatArrayProperty.html +1 -1
- package/docs/functions/isFloatProperty.html +1 -1
- package/docs/functions/isInt32ArrayProperty.html +1 -1
- package/docs/functions/isInt32Property.html +1 -1
- package/docs/functions/isInt32SetProperty.html +1 -1
- package/docs/functions/isInt64ArrayProperty.html +1 -1
- package/docs/functions/isInt64Property.html +1 -1
- package/docs/functions/isInt8Property.html +1 -1
- package/docs/functions/isMapProperty.html +1 -1
- package/docs/functions/isObjectArrayProperty.html +1 -1
- package/docs/functions/isObjectProperty.html +1 -1
- package/docs/functions/isObjectSetProperty.html +1 -1
- package/docs/functions/isObjectsListSpecialProperties.html +1 -1
- package/docs/functions/isPlayerSpecialProperties.html +1 -1
- package/docs/functions/isPowerLineSpecialProperties.html +1 -1
- package/docs/functions/isSaveComponent.html +1 -1
- package/docs/functions/isSaveEntity.html +1 -1
- package/docs/functions/isSetProperty.html +1 -1
- package/docs/functions/isSoftObjectArrayProperty.html +1 -1
- package/docs/functions/isSpecialDroneActionProperties.html +1 -1
- package/docs/functions/isStrArrayProperty.html +1 -1
- package/docs/functions/isStrProperty.html +1 -1
- package/docs/functions/isStrSetProperty.html +1 -1
- package/docs/functions/isStructArrayProperty.html +1 -1
- package/docs/functions/isStructProperty.html +1 -1
- package/docs/functions/isStructSetProperty.html +1 -1
- package/docs/functions/isTextArrayProperty.html +1 -1
- package/docs/functions/isTextProperty.html +1 -1
- package/docs/functions/isUInt64Property.html +1 -1
- package/docs/functions/isUint32Property.html +1 -1
- package/docs/functions/isUint32SetProperty.html +1 -1
- package/docs/functions/isUint8Property.html +1 -1
- package/docs/functions/isVehicleSpecialProperties.html +1 -1
- package/docs/functions/vec2.Parse.html +1 -1
- package/docs/functions/vec2.ParseF.html +1 -1
- package/docs/functions/vec2.Serialize.html +1 -1
- package/docs/functions/vec2.SerializeF.html +1 -1
- package/docs/functions/vec3.Parse.html +1 -1
- package/docs/functions/vec3.ParseF.html +1 -1
- package/docs/functions/vec3.ParseInt.html +1 -1
- package/docs/functions/vec3.Serialize.html +1 -1
- package/docs/functions/vec3.SerializeF.html +1 -1
- package/docs/functions/vec3.SerializeInt.html +1 -1
- package/docs/functions/vec3.add.html +1 -1
- package/docs/functions/vec3.length.html +1 -1
- package/docs/functions/vec3.mult.html +1 -1
- package/docs/functions/vec3.norm.html +1 -1
- package/docs/functions/vec3.sub.html +1 -1
- package/docs/functions/vec4.Parse.html +1 -1
- package/docs/functions/vec4.ParseF.html +1 -1
- package/docs/functions/vec4.Serialize.html +1 -1
- package/docs/functions/vec4.SerializeF.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +17 -5
- package/docs/interfaces/Blueprint.html +2 -2
- package/docs/interfaces/BlueprintConfig-1.html +2 -2
- package/docs/interfaces/SaveComponentHeader.html +2 -2
- package/docs/interfaces/SaveEntityHeader.html +2 -2
- package/docs/interfaces/SaveObjectHeader.html +2 -2
- package/docs/modules/AbstractBaseProperty.html +1 -1
- package/docs/modules/ArrayProperty.html +1 -1
- package/docs/modules/BlueprintConfig.html +1 -1
- package/docs/modules/BlueprintHeader.html +1 -1
- package/docs/modules/BoolArrayProperty.html +1 -1
- package/docs/modules/BoolProperty.html +1 -1
- package/docs/modules/BuildableSubsystemSpecialProperties.html +1 -1
- package/docs/modules/BuildableTypeInstance.html +1 -1
- package/docs/modules/ByteArrayProperty.html +1 -1
- package/docs/modules/ByteProperty.html +1 -1
- package/docs/modules/CircuitSpecialProperties.html +1 -1
- package/docs/modules/ConveyorChainActorSpecialProperties.html +1 -1
- package/docs/modules/ConveyorSpecialProperties.html +1 -1
- package/docs/modules/DoubleArrayProperty.html +1 -1
- package/docs/modules/DoubleProperty.html +1 -1
- package/docs/modules/DynamicStructPropertyValue.html +1 -1
- package/docs/modules/EmptySpecialProperties.html +1 -1
- package/docs/modules/EnumArrayProperty.html +1 -1
- package/docs/modules/EnumProperty.html +1 -1
- package/docs/modules/FClientIdentityInfo.html +3 -0
- package/docs/modules/FColor.html +3 -0
- package/docs/modules/FGDynamicStruct.html +1 -1
- package/docs/modules/FICFrameRange.html +3 -2
- package/docs/modules/FINGPUT1BufferPixel.html +4 -0
- package/docs/modules/FINItemStateFileSystem.html +5 -0
- package/docs/modules/FINNetworkTrace.html +4 -0
- package/docs/modules/FLBBalancerIndexing.html +3 -0
- package/docs/modules/FLinearColor.html +3 -0
- package/docs/modules/FloatArrayProperty.html +1 -1
- package/docs/modules/FloatProperty.html +1 -1
- package/docs/modules/GUID.html +1 -1
- package/docs/modules/GUIDInfo.html +1 -1
- package/docs/modules/Int32ArrayProperty.html +1 -1
- package/docs/modules/Int32Property.html +1 -1
- package/docs/modules/Int32SetProperty.html +1 -1
- package/docs/modules/Int64ArrayProperty.html +1 -1
- package/docs/modules/Int64Property.html +1 -1
- package/docs/modules/Int8Property.html +1 -1
- package/docs/modules/Level.html +1 -1
- package/docs/modules/LevelToDestroyedActorsMap.html +1 -1
- package/docs/modules/MD5Hash.html +1 -1
- package/docs/modules/MapProperty.html +1 -1
- package/docs/modules/ObjectArrayProperty.html +1 -1
- package/docs/modules/ObjectProperty.html +1 -1
- package/docs/modules/ObjectReference.html +1 -1
- package/docs/modules/ObjectSetProperty.html +1 -1
- package/docs/modules/ObjectsListSpecialProperties.html +1 -1
- package/docs/modules/PlayerSpecialProperties.html +1 -1
- package/docs/modules/PowerLineSpecialProperties.html +1 -1
- package/docs/modules/PropertiesList.html +1 -1
- package/docs/modules/SatisfactorySaveHeader.html +1 -1
- package/docs/modules/SaveBodyChunks.html +1 -1
- package/docs/modules/SaveBodyValidation.html +6 -0
- package/docs/modules/SetProperty.html +1 -1
- package/docs/modules/SoftObjectArrayProperty.html +1 -1
- package/docs/modules/SoftObjectReference.html +1 -1
- package/docs/modules/SpecialDroneActionProperties.html +1 -1
- package/docs/modules/SpecialProperties.html +1 -1
- package/docs/modules/StrArrayProperty.html +1 -1
- package/docs/modules/StrProperty.html +1 -1
- package/docs/modules/StrSetProperty.html +1 -1
- package/docs/modules/StructArrayProperty.html +1 -1
- package/docs/modules/StructProperty.html +1 -1
- package/docs/modules/StructSetProperty.html +1 -1
- package/docs/modules/TextArrayProperty.html +1 -1
- package/docs/modules/TextProperty.html +1 -1
- package/docs/modules/Transform.html +1 -1
- package/docs/modules/Uint32Property.html +1 -1
- package/docs/modules/Uint32SetProperty.html +1 -1
- package/docs/modules/Uint64Property.html +1 -1
- package/docs/modules/Uint8Property.html +1 -1
- package/docs/modules/VehiclePhysicsData.html +1 -1
- package/docs/modules/VehicleSpecialProperties.html +1 -1
- package/docs/modules/col4.html +1 -1
- package/docs/modules/vec2.html +1 -1
- package/docs/modules/vec3.html +1 -1
- package/docs/modules/vec4.html +1 -1
- package/docs/modules.html +24 -7
- package/docs/types/AbstractBaseProperty-1.html +7 -1
- package/docs/types/ArrayProperty.AvailableArrayPropertyTypes.html +1 -1
- package/docs/types/ArrayPropertyStructValueFields.html +1 -1
- package/docs/types/BasicMultipleStructPropertyValue.html +1 -1
- package/docs/types/BasicStructPropertyValue.html +1 -1
- package/docs/types/BlueprintHeader-1.html +1 -1
- package/docs/types/BlueprintReaderWriterContext.html +2 -0
- package/docs/types/BoolArrayProperty-1.html +1 -1
- package/docs/types/BoolProperty-1.html +1 -1
- package/docs/types/BoxStructPropertyValue.html +1 -1
- package/docs/types/BuildableSubsystemSpecialProperties-1.html +1 -1
- package/docs/types/BuildableTypeInstance-1.html +1 -1
- package/docs/types/ByteArrayProperty-1.html +1 -1
- package/docs/types/ByteProperty-1.html +1 -1
- package/docs/types/BytePropertyValue.html +1 -1
- package/docs/types/ChunkCompressionInfo.html +1 -1
- package/docs/types/ChunkSummary.html +1 -1
- package/docs/types/CircuitSpecialProperties-1.html +1 -1
- package/docs/types/ConveyorChainActorSpecialProperties-1.html +1 -1
- package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -1
- package/docs/types/ConveyorItemSpecialProperties.html +1 -1
- package/docs/types/ConveyorSpecialProperties-1.html +1 -1
- package/docs/types/DoubleArrayProperty-1.html +1 -1
- package/docs/types/DoubleProperty-1.html +1 -1
- package/docs/types/DynamicStructPropertyValue-1.html +1 -1
- package/docs/types/EmptySpecialProperties-1.html +1 -1
- package/docs/types/EnumArrayProperty-1.html +1 -1
- package/docs/types/EnumProperty-1.html +1 -1
- package/docs/types/FClientIdentityInfo-1.html +2 -0
- package/docs/types/FColor-1.html +2 -0
- package/docs/types/FGDynamicStruct-1.html +6 -1
- package/docs/types/FICFrameRange-1.html +1 -1
- package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
- package/docs/types/FINGPUT1BufferPixel-1.html +1 -0
- package/docs/types/FINItemStateFileSystem-1.html +2 -0
- package/docs/types/FINNetworkTrace-1.html +1 -0
- package/docs/types/FLBBalancerIndexing-1.html +2 -0
- package/docs/types/FLinearColor-1.html +2 -0
- package/docs/types/FloatArrayProperty-1.html +1 -1
- package/docs/types/FloatProperty-1.html +1 -1
- package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
- package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
- package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
- package/docs/types/GUID-1.html +1 -1
- package/docs/types/GUIDInfo-1.html +1 -1
- package/docs/types/Grids.html +1 -1
- package/docs/types/Int32ArrayProperty-1.html +1 -1
- package/docs/types/Int32Property-1.html +1 -1
- package/docs/types/Int32SetProperty-1.html +1 -1
- package/docs/types/Int64ArrayProperty-1.html +1 -1
- package/docs/types/Int64Property-1.html +1 -1
- package/docs/types/Int8Property-1.html +1 -1
- package/docs/types/InventoryItemStructPropertyValue.html +1 -1
- package/docs/types/Level-1.html +1 -2
- package/docs/types/LevelToDestroyedActorsMap-1.html +1 -1
- package/docs/types/Levels.html +1 -1
- package/docs/types/MAP_STRUCT_PROXY.html +1 -0
- package/docs/types/MD5Hash-1.html +1 -1
- package/docs/types/MapProperty-1.html +1 -1
- package/docs/types/ModData.html +1 -1
- package/docs/types/ObjectArrayProperty-1.html +1 -1
- package/docs/types/ObjectProperty-1.html +1 -1
- package/docs/types/ObjectReference-1.html +1 -1
- package/docs/types/ObjectSetProperty-1.html +1 -1
- package/docs/types/ObjectsListSpecialProperties-1.html +1 -1
- package/docs/types/PlayerSpecialProperties-1.html +1 -1
- package/docs/types/PowerLineSpecialProperties-1.html +1 -1
- package/docs/types/PropertiesMap.html +1 -1
- package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -1
- package/docs/types/ReaderWriterContext.html +2 -0
- package/docs/types/RoughSaveVersion.html +1 -1
- package/docs/types/SatisfactoryModMetadata.html +1 -1
- package/docs/types/SatisfactorySaveHeader-1.html +1 -1
- package/docs/types/SaveBodyChunks-1.html +1 -1
- package/docs/types/SaveBodyValidation-1.html +1 -0
- package/docs/types/SaveReaderWriterContext.html +3 -0
- package/docs/types/SetProperty.AvailableSetPropertyTypes.html +1 -1
- package/docs/types/SoftObjectArrayProperty-1.html +1 -1
- package/docs/types/SoftObjectReference-1.html +1 -1
- package/docs/types/SpecialDroneAction.html +1 -1
- package/docs/types/SpecialDroneActionProperties-1.html +1 -1
- package/docs/types/SpecialProperties.AvailableSpecialPropertiesTypes.html +1 -1
- package/docs/types/StrArrayProperty-1.html +1 -1
- package/docs/types/StrProperty-1.html +1 -1
- package/docs/types/StrSetProperty-1.html +1 -1
- package/docs/types/StructArrayProperty-1.html +1 -1
- package/docs/types/StructProperty-1.html +1 -1
- package/docs/types/StructSetProperty-1.html +1 -1
- package/docs/types/TextArrayProperty-1.html +1 -1
- package/docs/types/TextProperty-1.html +1 -1
- package/docs/types/TextPropertyValue.html +1 -1
- package/docs/types/Transform-1.html +1 -1
- package/docs/types/Uint32Property-1.html +1 -1
- package/docs/types/Uint32SetProperty-1.html +1 -1
- package/docs/types/Uint64Property-1.html +1 -1
- package/docs/types/Uint8Property-1.html +1 -1
- package/docs/types/VehiclePhysicsData-1.html +1 -1
- package/docs/types/VehicleSpecialProperties-1.html +1 -1
- package/docs/types/col4-1.html +1 -1
- package/docs/types/vec2-1.html +1 -1
- package/docs/types/vec3-1.html +1 -1
- package/docs/types/vec4-1.html +1 -1
- package/docs/variables/DEFAULT_SATISFACTORY_CHUNK_HEADER_SIZE.html +1 -1
- package/docs/variables/EDIT.html +1 -1
- package/docs/variables/FINItemStateFileSystem.ExactStructReference.html +1 -0
- package/docs/variables/SaveBodyChunks.HEADER_V1.html +1 -1
- package/docs/variables/SaveBodyChunks.HEADER_V2.html +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/docs/classes/BlueprintConfigWriter.html +0 -39
- package/docs/classes/BlueprintWriter.html +0 -42
- package/docs/functions/FICFrameRange.Parse.html +0 -1
- package/docs/functions/FICFrameRange.Serialize.html +0 -1
- package/docs/types/ByteArray4.html +0 -1
- package/docs/types/ClientIdentityInfo.html +0 -1
- package/docs/types/MAP_STRUCT_KEY_PROXY.html +0 -1
- package/docs/types/SaveBodyValidation.html +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ContextReader } from "../../../../context/context-reader";
|
|
2
|
+
import { ContextWriter } from "../../../../context/context-writer";
|
|
3
|
+
export type FClientIdentityInfo = {
|
|
4
|
+
offlineId: string;
|
|
5
|
+
accountIds: Record<number, number[]>;
|
|
6
|
+
};
|
|
7
|
+
export declare namespace FClientIdentityInfo {
|
|
8
|
+
const read: (reader: ContextReader) => FClientIdentityInfo;
|
|
9
|
+
const write: (writer: ContextWriter, value: FClientIdentityInfo) => void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=FClientIdentityInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FClientIdentityInfo.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/FClientIdentityInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAOnE,MAAM,MAAM,mBAAmB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACxC,CAAC;AAEF,yBAAiB,mBAAmB,CAAC;IAE1B,MAAM,IAAI,WAAY,aAAa,KAAG,mBAgB5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,SAAS,mBAAmB,KAAG,IAQzE,CAAA;CACJ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FClientIdentityInfo = void 0;
|
|
4
|
+
var FClientIdentityInfo;
|
|
5
|
+
(function (FClientIdentityInfo) {
|
|
6
|
+
FClientIdentityInfo.read = (reader) => {
|
|
7
|
+
const offlineId = reader.readString();
|
|
8
|
+
const numAccountIds = reader.readInt32();
|
|
9
|
+
const accountIds = {};
|
|
10
|
+
for (let i = 0; i < numAccountIds; i++) {
|
|
11
|
+
const platformFlagMaybe = reader.readByte();
|
|
12
|
+
const idSize = reader.readInt32();
|
|
13
|
+
const accountId = Array.from(reader.readBytes(idSize));
|
|
14
|
+
accountIds[platformFlagMaybe] = accountId;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
offlineId,
|
|
18
|
+
accountIds
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
FClientIdentityInfo.write = (writer, value) => {
|
|
22
|
+
writer.writeString(value.offlineId);
|
|
23
|
+
writer.writeInt32(Object.values(value.accountIds).length);
|
|
24
|
+
for (const [platformFlagMaybe, accountId] of Object.entries(value.accountIds)) {
|
|
25
|
+
writer.writeByte(Number(platformFlagMaybe));
|
|
26
|
+
writer.writeInt32(accountId.length);
|
|
27
|
+
writer.writeBytesArray(accountId);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
})(FClientIdentityInfo || (exports.FClientIdentityInfo = FClientIdentityInfo = {}));
|
|
31
|
+
//# sourceMappingURL=FClientIdentityInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FClientIdentityInfo.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/FClientIdentityInfo.ts"],"names":[],"mappings":";;;AAaA,IAAiB,mBAAmB,CA6BnC;AA7BD,WAAiB,mBAAmB;IAEnB,wBAAI,GAAG,CAAC,MAAqB,EAAuB,EAAE;QAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACtC,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEzC,MAAM,UAAU,GAA6B,EAAE,CAAC;QAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,iBAAiB,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;YAClC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YACvD,UAAU,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC;QAC9C,CAAC;QAED,OAAO;YACH,SAAS;YACT,UAAU;SACiB,CAAC;IACpC,CAAC,CAAA;IAEY,yBAAK,GAAG,CAAC,MAAqB,EAAE,KAA0B,EAAQ,EAAE;QAC7E,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;QAC1D,KAAK,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5E,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC5C,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACpC,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA7BgB,mBAAmB,mCAAnB,mBAAmB,QA6BnC","sourcesContent":["import { ContextReader } from \"../../../../context/context-reader\";\nimport { ContextWriter } from \"../../../../context/context-writer\";\n\n\n/**\n * specific binary struct\n */\n\nexport type FClientIdentityInfo = {\n offlineId: string;\n accountIds: Record<number, number[]>;\n};\n\nexport namespace FClientIdentityInfo {\n\n export const read = (reader: ContextReader): FClientIdentityInfo => {\n const offlineId = reader.readString();\n const numAccountIds = reader.readInt32();\n\n const accountIds: Record<number, number[]> = {};\n for (let i = 0; i < numAccountIds; i++) {\n const platformFlagMaybe = reader.readByte(); // 1 for Epic, 6 for steam ? Only seen 1s and 6s so far.\n const idSize = reader.readInt32();\n const accountId = Array.from(reader.readBytes(idSize));\n accountIds[platformFlagMaybe] = accountId;\n }\n\n return {\n offlineId,\n accountIds\n } satisfies FClientIdentityInfo;\n }\n\n export const write = (writer: ContextWriter, value: FClientIdentityInfo): void => {\n writer.writeString(value.offlineId);\n writer.writeInt32(Object.values(value.accountIds).length);\n for (const [platformFlagMaybe, accountId] of Object.entries(value.accountIds)) {\n writer.writeByte(Number(platformFlagMaybe));\n writer.writeInt32(accountId.length);\n writer.writeBytesArray(accountId);\n }\n }\n}"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContextReader } from "../../../../context/context-reader";
|
|
2
|
+
import { ContextWriter } from "../../../../context/context-writer";
|
|
3
|
+
import { col4 } from "../col4";
|
|
4
|
+
export type FColor = col4;
|
|
5
|
+
export declare namespace FColor {
|
|
6
|
+
const read: (reader: ContextReader) => FColor;
|
|
7
|
+
const write: (writer: ContextWriter, value: FColor) => void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=FColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FColor.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/FColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC;AAE1B,yBAAiB,MAAM,CAAC;IAEb,MAAM,IAAI,WAAY,aAAa,KAAG,MAE5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,SAAS,MAAM,KAAG,IAE5D,CAAA;CACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FColor = void 0;
|
|
4
|
+
const col4_1 = require("../col4");
|
|
5
|
+
var FColor;
|
|
6
|
+
(function (FColor) {
|
|
7
|
+
FColor.read = (reader) => {
|
|
8
|
+
return col4_1.col4.ParseBGRA(reader);
|
|
9
|
+
};
|
|
10
|
+
FColor.write = (writer, value) => {
|
|
11
|
+
col4_1.col4.SerializeBGRA(writer, value);
|
|
12
|
+
};
|
|
13
|
+
})(FColor || (exports.FColor = FColor = {}));
|
|
14
|
+
//# sourceMappingURL=FColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FColor.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/FColor.ts"],"names":[],"mappings":";;;AAEA,kCAA+B;AAS/B,IAAiB,MAAM,CAStB;AATD,WAAiB,MAAM;IAEN,WAAI,GAAG,CAAC,MAAqB,EAAU,EAAE;QAClD,OAAO,WAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAA;IAEY,YAAK,GAAG,CAAC,MAAqB,EAAE,KAAa,EAAQ,EAAE;QAChE,WAAI,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC,CAAA;AACL,CAAC,EATgB,MAAM,sBAAN,MAAM,QAStB","sourcesContent":["import { ContextReader } from \"../../../../context/context-reader\";\nimport { ContextWriter } from \"../../../../context/context-writer\";\nimport { col4 } from \"../col4\";\n\n\n/**\n * specific binary struct\n */\n\nexport type FColor = col4;\n\nexport namespace FColor {\n\n export const read = (reader: ContextReader): FColor => {\n return col4.ParseBGRA(reader);\n }\n\n export const write = (writer: ContextWriter, value: FColor): void => {\n col4.SerializeBGRA(writer, value);\n }\n}"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContextReader } from "../../../../context/context-reader";
|
|
2
|
+
import { ContextWriter } from "../../../../context/context-writer";
|
|
3
|
+
import { col4 } from "../col4";
|
|
4
|
+
export type FLinearColor = col4;
|
|
5
|
+
export declare namespace FLinearColor {
|
|
6
|
+
const read: (reader: ContextReader) => FLinearColor;
|
|
7
|
+
const write: (writer: ContextWriter, value: FLinearColor) => void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=FLinearColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FLinearColor.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/FLinearColor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC;AAEhC,yBAAiB,YAAY,CAAC;IAEnB,MAAM,IAAI,WAAY,aAAa,KAAG,YAE5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,SAAS,YAAY,KAAG,IAElE,CAAA;CACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FLinearColor = void 0;
|
|
4
|
+
const col4_1 = require("../col4");
|
|
5
|
+
var FLinearColor;
|
|
6
|
+
(function (FLinearColor) {
|
|
7
|
+
FLinearColor.read = (reader) => {
|
|
8
|
+
return col4_1.col4.ParseRGBA(reader);
|
|
9
|
+
};
|
|
10
|
+
FLinearColor.write = (writer, value) => {
|
|
11
|
+
col4_1.col4.SerializeRGBA(writer, value);
|
|
12
|
+
};
|
|
13
|
+
})(FLinearColor || (exports.FLinearColor = FLinearColor = {}));
|
|
14
|
+
//# sourceMappingURL=FLinearColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FLinearColor.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/FLinearColor.ts"],"names":[],"mappings":";;;AAEA,kCAA+B;AAS/B,IAAiB,YAAY,CAS5B;AATD,WAAiB,YAAY;IAEZ,iBAAI,GAAG,CAAC,MAAqB,EAAgB,EAAE;QACxD,OAAO,WAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAA;IAEY,kBAAK,GAAG,CAAC,MAAqB,EAAE,KAAmB,EAAQ,EAAE;QACtE,WAAI,CAAC,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC,CAAA;AACL,CAAC,EATgB,YAAY,4BAAZ,YAAY,QAS5B","sourcesContent":["import { ContextReader } from \"../../../../context/context-reader\";\nimport { ContextWriter } from \"../../../../context/context-writer\";\nimport { col4 } from \"../col4\";\n\n\n/**\n * specific binary struct\n */\n\nexport type FLinearColor = col4;\n\nexport namespace FLinearColor {\n\n export const read = (reader: ContextReader): FLinearColor => {\n return col4.ParseRGBA(reader);\n }\n\n export const write = (writer: ContextWriter, value: FLinearColor): void => {\n col4.SerializeRGBA(writer, value);\n }\n}"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContextReader } from '../../../../context/context-reader';
|
|
2
|
+
import { ContextWriter } from '../../../../context/context-writer';
|
|
3
|
+
export type GUID = [number, number, number, number];
|
|
4
|
+
export declare namespace GUID {
|
|
5
|
+
const read: (reader: ContextReader) => GUID;
|
|
6
|
+
const write: (writer: ContextWriter, guid: GUID) => void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=GUID.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GUID.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/GUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAKnE,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,yBAAiB,IAAI,CAAC;IACX,MAAM,IAAI,WAAY,aAAa,KAAG,IAO5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,QAAQ,IAAI,KAAG,IAKzD,CAAA;CACJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GUID = void 0;
|
|
4
|
+
var GUID;
|
|
5
|
+
(function (GUID) {
|
|
6
|
+
GUID.read = (reader) => {
|
|
7
|
+
return [
|
|
8
|
+
reader.readUint32(),
|
|
9
|
+
reader.readUint32(),
|
|
10
|
+
reader.readUint32(),
|
|
11
|
+
reader.readUint32(),
|
|
12
|
+
];
|
|
13
|
+
};
|
|
14
|
+
GUID.write = (writer, guid) => {
|
|
15
|
+
writer.writeUint32(guid[0]);
|
|
16
|
+
writer.writeUint32(guid[1]);
|
|
17
|
+
writer.writeUint32(guid[2]);
|
|
18
|
+
writer.writeUint32(guid[3]);
|
|
19
|
+
};
|
|
20
|
+
})(GUID || (exports.GUID = GUID = {}));
|
|
21
|
+
;
|
|
22
|
+
//# sourceMappingURL=GUID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GUID.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/structs/binary/GUID.ts"],"names":[],"mappings":";;;AAQA,IAAiB,IAAI,CAgBpB;AAhBD,WAAiB,IAAI;IACJ,SAAI,GAAG,CAAC,MAAqB,EAAQ,EAAE;QAChD,OAAO;YACH,MAAM,CAAC,UAAU,EAAE;YACnB,MAAM,CAAC,UAAU,EAAE;YACnB,MAAM,CAAC,UAAU,EAAE;YACnB,MAAM,CAAC,UAAU,EAAE;SACtB,CAAC;IACN,CAAC,CAAA;IAEY,UAAK,GAAG,CAAC,MAAqB,EAAE,IAAU,EAAQ,EAAE;QAC7D,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC,CAAA;AACL,CAAC,EAhBgB,IAAI,oBAAJ,IAAI,QAgBpB;AAAA,CAAC","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\n\n/**\n * UE Guid structure, 4 uints.\n */\nexport type GUID = [number, number, number, number];\n\nexport namespace GUID {\n export const read = (reader: ContextReader): GUID => {\n return [\n reader.readUint32(),\n reader.readUint32(),\n reader.readUint32(),\n reader.readUint32(),\n ];\n }\n\n export const write = (writer: ContextWriter, guid: GUID): void => {\n writer.writeUint32(guid[0]);\n writer.writeUint32(guid[1]);\n writer.writeUint32(guid[2]);\n writer.writeUint32(guid[3]);\n }\n};"]}
|
|
@@ -5,7 +5,7 @@ export type FICFrameRange = {
|
|
|
5
5
|
end: string;
|
|
6
6
|
};
|
|
7
7
|
export declare namespace FICFrameRange {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const read: (reader: ContextReader) => FICFrameRange;
|
|
9
|
+
const write: (writer: ContextWriter, value: FICFrameRange) => void;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=FICFrameRange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FICFrameRange.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"FICFrameRange.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACf,CAAC;AAKF,yBAAiB,aAAa,CAAC;IAEpB,MAAM,IAAI,WAAY,aAAa,KAAG,aAK5C,CAAC;IAEK,MAAM,KAAK,WAAY,aAAa,SAAS,aAAa,KAAG,IAGnE,CAAC;CACL"}
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FICFrameRange = void 0;
|
|
4
4
|
var FICFrameRange;
|
|
5
5
|
(function (FICFrameRange) {
|
|
6
|
-
FICFrameRange.
|
|
6
|
+
FICFrameRange.read = (reader) => {
|
|
7
7
|
return {
|
|
8
8
|
begin: reader.readInt64().toString(),
|
|
9
9
|
end: reader.readInt64().toString(),
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
FICFrameRange.
|
|
12
|
+
FICFrameRange.write = (writer, value) => {
|
|
13
13
|
writer.writeInt64(BigInt(value.begin));
|
|
14
14
|
writer.writeInt64(BigInt(value.end));
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FICFrameRange.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"FICFrameRange.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.ts"],"names":[],"mappings":";;;AAWA,IAAiB,aAAa,CAa7B;AAbD,WAAiB,aAAa;IAEb,kBAAI,GAAG,CAAC,MAAqB,EAAiB,EAAE;QACzD,OAAO;YACH,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE;YACpC,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE;SACrC,CAAC;IACN,CAAC,CAAC;IAEW,mBAAK,GAAG,CAAC,MAAqB,EAAE,KAAoB,EAAQ,EAAE;QACvE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC;AACN,CAAC,EAbgB,aAAa,6BAAb,aAAa,QAa7B","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\n\nexport type FICFrameRange = {\n begin: string;\n end: string;\n};\n\n/**\n * declared at https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n */\nexport namespace FICFrameRange {\n\n export const read = (reader: ContextReader): FICFrameRange => {\n return {\n begin: reader.readInt64().toString(),\n end: reader.readInt64().toString(),\n };\n };\n\n export const write = (writer: ContextWriter, value: FICFrameRange): void => {\n writer.writeInt64(BigInt(value.begin));\n writer.writeInt64(BigInt(value.end));\n };\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ContextReader } from "../../../../../context/context-reader";
|
|
2
|
+
import { ContextWriter } from "../../../../../context/context-writer";
|
|
3
|
+
import { col4 } from "../../col4";
|
|
4
|
+
export type FINGPUT1BufferPixel = {
|
|
5
|
+
character: string;
|
|
6
|
+
foreGroundColor: col4;
|
|
7
|
+
backgroundColor: col4;
|
|
8
|
+
};
|
|
9
|
+
export declare namespace FINGPUT1BufferPixel {
|
|
10
|
+
const read: (reader: ContextReader) => FINGPUT1BufferPixel;
|
|
11
|
+
const write: (writer: ContextWriter, bufferpixel: FINGPUT1BufferPixel) => void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=FINGPUT1BufferPixel.d.ts.map
|
package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FINGPUT1BufferPixel.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,MAAM,mBAAmB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,IAAI,CAAC;IACtB,eAAe,EAAE,IAAI,CAAC;CACzB,CAAC;AAKF,yBAAiB,mBAAmB,CAAC;IAE1B,MAAM,IAAI,WAAY,aAAa,KAAG,mBAO5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,eAAe,mBAAmB,KAAG,IAI/E,CAAA;CACJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FINGPUT1BufferPixel = void 0;
|
|
4
|
+
const col4_1 = require("../../col4");
|
|
5
|
+
var FINGPUT1BufferPixel;
|
|
6
|
+
(function (FINGPUT1BufferPixel) {
|
|
7
|
+
FINGPUT1BufferPixel.read = (reader) => {
|
|
8
|
+
const bufferpixel = {
|
|
9
|
+
character: reader.readHex(2),
|
|
10
|
+
foreGroundColor: col4_1.col4.ParseRGBA(reader),
|
|
11
|
+
backgroundColor: col4_1.col4.ParseRGBA(reader)
|
|
12
|
+
};
|
|
13
|
+
return bufferpixel;
|
|
14
|
+
};
|
|
15
|
+
FINGPUT1BufferPixel.write = (writer, bufferpixel) => {
|
|
16
|
+
writer.writeHex(bufferpixel.character);
|
|
17
|
+
col4_1.col4.SerializeRGBA(writer, bufferpixel.foreGroundColor);
|
|
18
|
+
col4_1.col4.SerializeRGBA(writer, bufferpixel.backgroundColor);
|
|
19
|
+
};
|
|
20
|
+
})(FINGPUT1BufferPixel || (exports.FINGPUT1BufferPixel = FINGPUT1BufferPixel = {}));
|
|
21
|
+
//# sourceMappingURL=FINGPUT1BufferPixel.js.map
|
package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FINGPUT1BufferPixel.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.ts"],"names":[],"mappings":";;;AAEA,qCAAkC;AAWlC,IAAiB,mBAAmB,CAgBnC;AAhBD,WAAiB,mBAAmB;IAEnB,wBAAI,GAAG,CAAC,MAAqB,EAAuB,EAAE;QAC/D,MAAM,WAAW,GAAwB;YACrC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5B,eAAe,EAAE,WAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YACvC,eAAe,EAAE,WAAI,CAAC,SAAS,CAAC,MAAM,CAAC;SAC1C,CAAC;QACF,OAAO,WAAW,CAAC;IACvB,CAAC,CAAA;IAEY,yBAAK,GAAG,CAAC,MAAqB,EAAE,WAAgC,EAAQ,EAAE;QACnF,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACvC,WAAI,CAAC,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;QACxD,WAAI,CAAC,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;IAC5D,CAAC,CAAA;AACL,CAAC,EAhBgB,mBAAmB,mCAAnB,mBAAmB,QAgBnC","sourcesContent":["import { ContextReader } from \"../../../../../context/context-reader\";\nimport { ContextWriter } from \"../../../../../context/context-writer\";\nimport { col4 } from \"../../col4\";\n\nexport type FINGPUT1BufferPixel = {\n character: string;\n foreGroundColor: col4;\n backgroundColor: col4;\n};\n\n/**\n * declared at https://github.com/Panakotta00/FicsIt-Networks/blob/789c32fdc857fc9971f7f73fbbf3789c64f637bc/Source/FicsItReflection/Public/FIRTrace.h#L28\n */\nexport namespace FINGPUT1BufferPixel {\n\n export const read = (reader: ContextReader): FINGPUT1BufferPixel => {\n const bufferpixel: FINGPUT1BufferPixel = {\n character: reader.readHex(2),\n foreGroundColor: col4.ParseRGBA(reader),\n backgroundColor: col4.ParseRGBA(reader)\n };\n return bufferpixel;\n }\n\n export const write = (writer: ContextWriter, bufferpixel: FINGPUT1BufferPixel): void => {\n writer.writeHex(bufferpixel.character);\n col4.SerializeRGBA(writer, bufferpixel.foreGroundColor);\n col4.SerializeRGBA(writer, bufferpixel.backgroundColor);\n }\n}"]}
|
package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ContextReader } from "../../../../../context/context-reader";
|
|
2
|
+
import { ContextWriter } from "../../../../../context/context-writer";
|
|
3
|
+
import { FGDynamicStruct } from "../../FGDynamicStruct";
|
|
4
|
+
import { ObjectReference } from "../../ObjectReference";
|
|
5
|
+
export type FINItemStateFileSystem = number[];
|
|
6
|
+
export declare namespace FINItemStateFileSystem {
|
|
7
|
+
const ExactStructReference: ObjectReference;
|
|
8
|
+
const IsFINItemStateFileSystem: (struct: FGDynamicStruct) => boolean;
|
|
9
|
+
const read: (reader: ContextReader) => FINItemStateFileSystem;
|
|
10
|
+
const write: (writer: ContextWriter, rawBytes: FINItemStateFileSystem) => void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=FINItemStateFileSystem.d.ts.map
|
package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FINItemStateFileSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKxD,MAAM,MAAM,sBAAsB,GAAG,MAAM,EAAE,CAAC;AAE9C,yBAAiB,sBAAsB,CAAC;IAE7B,MAAM,oBAAoB,EAAE,eAGlC,CAAC;IAEK,MAAM,wBAAwB,WAAY,eAAe,KAAG,OAElE,CAAA;IAEM,MAAM,IAAI,WAAY,aAAa,KAAG,sBAG5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,YAAY,sBAAsB,KAAG,IAE/E,CAAA;CACJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FINItemStateFileSystem = void 0;
|
|
4
|
+
const ObjectReference_1 = require("../../ObjectReference");
|
|
5
|
+
var FINItemStateFileSystem;
|
|
6
|
+
(function (FINItemStateFileSystem) {
|
|
7
|
+
FINItemStateFileSystem.ExactStructReference = {
|
|
8
|
+
levelName: '',
|
|
9
|
+
pathName: '/Script/FicsItNetworksComputer.FINItemStateFileSystem'
|
|
10
|
+
};
|
|
11
|
+
FINItemStateFileSystem.IsFINItemStateFileSystem = (struct) => {
|
|
12
|
+
return ObjectReference_1.ObjectReference.IsEqual(struct.structReference, FINItemStateFileSystem.ExactStructReference);
|
|
13
|
+
};
|
|
14
|
+
FINItemStateFileSystem.read = (reader) => {
|
|
15
|
+
const numBytes = reader.readInt32();
|
|
16
|
+
return Array.from(reader.readBytes(numBytes));
|
|
17
|
+
};
|
|
18
|
+
FINItemStateFileSystem.write = (writer, rawBytes) => {
|
|
19
|
+
writer.writeBytesArray(rawBytes);
|
|
20
|
+
};
|
|
21
|
+
})(FINItemStateFileSystem || (exports.FINItemStateFileSystem = FINItemStateFileSystem = {}));
|
|
22
|
+
//# sourceMappingURL=FINItemStateFileSystem.js.map
|
package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FINItemStateFileSystem.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.ts"],"names":[],"mappings":";;;AAGA,2DAAwD;AAOxD,IAAiB,sBAAsB,CAmBtC;AAnBD,WAAiB,sBAAsB;IAEtB,2CAAoB,GAAoB;QACjD,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,uDAAuD;KACpE,CAAC;IAEW,+CAAwB,GAAG,CAAC,MAAuB,EAAW,EAAE;QACzE,OAAO,iCAAe,CAAC,OAAO,CAAC,MAAM,CAAC,eAAgB,EAAE,uBAAA,oBAAoB,CAAC,CAAC;IAClF,CAAC,CAAA;IAEY,2BAAI,GAAG,CAAC,MAAqB,EAA0B,EAAE;QAClE,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,CAAC,CAAA;IAEY,4BAAK,GAAG,CAAC,MAAqB,EAAE,QAAgC,EAAQ,EAAE;QACnF,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAA;AACL,CAAC,EAnBgB,sBAAsB,sCAAtB,sBAAsB,QAmBtC","sourcesContent":["import { ContextReader } from \"../../../../../context/context-reader\";\nimport { ContextWriter } from \"../../../../../context/context-writer\";\nimport { FGDynamicStruct } from \"../../FGDynamicStruct\";\nimport { ObjectReference } from \"../../ObjectReference\";\n\n/**\n * specifically the FileSystem item state of the FicsItNetworks mod has just raw bytes.\n */\nexport type FINItemStateFileSystem = number[];\n\nexport namespace FINItemStateFileSystem {\n\n export const ExactStructReference: ObjectReference = {\n levelName: '',\n pathName: '/Script/FicsItNetworksComputer.FINItemStateFileSystem'\n };\n\n export const IsFINItemStateFileSystem = (struct: FGDynamicStruct): boolean => {\n return ObjectReference.IsEqual(struct.structReference!, ExactStructReference);\n }\n\n export const read = (reader: ContextReader): FINItemStateFileSystem => {\n const numBytes = reader.readInt32();\n return Array.from(reader.readBytes(numBytes));\n }\n\n export const write = (writer: ContextWriter, rawBytes: FINItemStateFileSystem): void => {\n writer.writeBytesArray(rawBytes);\n }\n}"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ContextReader } from "../../../../../context/context-reader";
|
|
2
|
+
import { ContextWriter } from "../../../../../context/context-writer";
|
|
3
|
+
import { ObjectReference } from "../../ObjectReference";
|
|
4
|
+
export type FINNetworkTrace = {
|
|
5
|
+
reference: ObjectReference;
|
|
6
|
+
previous?: FINNetworkTrace;
|
|
7
|
+
step?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare namespace FINNetworkTrace {
|
|
10
|
+
const read: (reader: ContextReader) => FINNetworkTrace;
|
|
11
|
+
const write: (writer: ContextWriter, firTrace: FINNetworkTrace) => void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=FINNetworkTrace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FINNetworkTrace.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,eAAe,CAAC;IAC3B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAKF,yBAAiB,eAAe,CAAC;IAEtB,MAAM,IAAI,WAAY,aAAa,KAAG,eAgB5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,YAAY,eAAe,KAAG,IAcxE,CAAA;CACJ"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FINNetworkTrace = void 0;
|
|
4
|
+
const ObjectReference_1 = require("../../ObjectReference");
|
|
5
|
+
var FINNetworkTrace;
|
|
6
|
+
(function (FINNetworkTrace) {
|
|
7
|
+
FINNetworkTrace.read = (reader) => {
|
|
8
|
+
const firTrace = {
|
|
9
|
+
reference: ObjectReference_1.ObjectReference.read(reader)
|
|
10
|
+
};
|
|
11
|
+
const hasPrevious = reader.readInt32() >= 1;
|
|
12
|
+
if (hasPrevious) {
|
|
13
|
+
firTrace.previous = FINNetworkTrace.read(reader);
|
|
14
|
+
}
|
|
15
|
+
const hasStep = reader.readInt32() >= 1;
|
|
16
|
+
if (hasStep) {
|
|
17
|
+
firTrace.step = reader.readString();
|
|
18
|
+
}
|
|
19
|
+
return firTrace;
|
|
20
|
+
};
|
|
21
|
+
FINNetworkTrace.write = (writer, firTrace) => {
|
|
22
|
+
ObjectReference_1.ObjectReference.write(writer, firTrace.reference);
|
|
23
|
+
const hasPrevious = firTrace.previous !== undefined;
|
|
24
|
+
writer.writeInt32(hasPrevious ? 1 : 0);
|
|
25
|
+
if (hasPrevious) {
|
|
26
|
+
FINNetworkTrace.write(writer, firTrace.previous);
|
|
27
|
+
}
|
|
28
|
+
const hasStep = firTrace.step !== undefined;
|
|
29
|
+
writer.writeInt32(hasStep ? 1 : 0);
|
|
30
|
+
if (hasStep) {
|
|
31
|
+
writer.writeString(firTrace.step);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
})(FINNetworkTrace || (exports.FINNetworkTrace = FINNetworkTrace = {}));
|
|
35
|
+
//# sourceMappingURL=FINNetworkTrace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FINNetworkTrace.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.ts"],"names":[],"mappings":";;;AAEA,2DAAwD;AAWxD,IAAiB,eAAe,CAmC/B;AAnCD,WAAiB,eAAe;IAE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CgB,eAAe,+BAAf,eAAe,QAmC/B","sourcesContent":["import { ContextReader } from \"../../../../../context/context-reader\";\nimport { ContextWriter } from \"../../../../../context/context-writer\";\nimport { ObjectReference } from \"../../ObjectReference\";\n\nexport type FINNetworkTrace = {\n reference: ObjectReference;\n previous?: FINNetworkTrace;\n step?: string;\n};\n\n/**\n * declared at https://github.com/Panakotta00/FicsIt-Networks/blob/789c32fdc857fc9971f7f73fbbf3789c64f637bc/Source/FicsItReflection/Public/FIRTrace.h#L28\n */\nexport namespace FINNetworkTrace {\n\n export const read = (reader: ContextReader): FINNetworkTrace => {\n const firTrace: FINNetworkTrace = {\n reference: ObjectReference.read(reader)\n };\n\n const hasPrevious = reader.readInt32() >= 1;\n if (hasPrevious) {\n firTrace.previous = FINNetworkTrace.read(reader);\n }\n\n const hasStep = reader.readInt32() >= 1;\n if (hasStep) {\n firTrace.step = reader.readString();\n }\n\n return firTrace;\n }\n\n export const write = (writer: ContextWriter, firTrace: FINNetworkTrace): void => {\n ObjectReference.write(writer, firTrace.reference)\n\n const hasPrevious = firTrace.previous !== undefined;\n writer.writeInt32(hasPrevious ? 1 : 0);\n if (hasPrevious) {\n FINNetworkTrace.write(writer, firTrace.previous!);\n }\n\n const hasStep = firTrace.step !== undefined;\n writer.writeInt32(hasStep ? 1 : 0);\n if (hasStep) {\n writer.writeString(firTrace.step!);\n }\n }\n}"]}
|
package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ContextReader } from '../../../../../context/context-reader';
|
|
2
|
+
import { ContextWriter } from '../../../../../context/context-writer';
|
|
3
|
+
export type FLBBalancerIndexing = {
|
|
4
|
+
mNormalIndex: number;
|
|
5
|
+
mOverflowIndex: number;
|
|
6
|
+
mFilterIndex: number;
|
|
7
|
+
};
|
|
8
|
+
export declare namespace FLBBalancerIndexing {
|
|
9
|
+
const read: (reader: ContextReader) => FLBBalancerIndexing;
|
|
10
|
+
const write: (writer: ContextWriter, value: FLBBalancerIndexing) => void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=FLBBalancerIndexing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FLBBalancerIndexing.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAKtE,MAAM,MAAM,mBAAmB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,yBAAiB,mBAAmB,CAAC;IAC1B,MAAM,IAAI,WAAY,aAAa,KAAG,mBAM5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,SAAS,mBAAmB,KAAG,IAIzE,CAAA;CACJ"}
|
package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FLBBalancerIndexing = void 0;
|
|
4
|
+
var FLBBalancerIndexing;
|
|
5
|
+
(function (FLBBalancerIndexing) {
|
|
6
|
+
FLBBalancerIndexing.read = (reader) => {
|
|
7
|
+
return {
|
|
8
|
+
mNormalIndex: reader.readInt32(),
|
|
9
|
+
mOverflowIndex: reader.readInt32(),
|
|
10
|
+
mFilterIndex: reader.readInt32(),
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
FLBBalancerIndexing.write = (writer, value) => {
|
|
14
|
+
writer.writeInt32(value.mNormalIndex);
|
|
15
|
+
writer.writeInt32(value.mOverflowIndex);
|
|
16
|
+
writer.writeInt32(value.mFilterIndex);
|
|
17
|
+
};
|
|
18
|
+
})(FLBBalancerIndexing || (exports.FLBBalancerIndexing = FLBBalancerIndexing = {}));
|
|
19
|
+
;
|
|
20
|
+
//# sourceMappingURL=FLBBalancerIndexing.js.map
|
package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FLBBalancerIndexing.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.ts"],"names":[],"mappings":";;;AAYA,IAAiB,mBAAmB,CAcnC;AAdD,WAAiB,mBAAmB;IACnB,wBAAI,GAAG,CAAC,MAAqB,EAAuB,EAAE;QAC/D,OAAO;YACH,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE;YAChC,cAAc,EAAE,MAAM,CAAC,SAAS,EAAE;YAClC,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE;SACnC,CAAC;IACN,CAAC,CAAA;IAEY,yBAAK,GAAG,CAAC,MAAqB,EAAE,KAA0B,EAAQ,EAAE;QAC7E,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACtC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACxC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC,CAAA;AACL,CAAC,EAdgB,mBAAmB,mCAAnB,mBAAmB,QAcnC;AAAA,CAAC","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\n\n/**\n * specific binary struct.\n */\nexport type FLBBalancerIndexing = {\n mNormalIndex: number;\n mOverflowIndex: number;\n mFilterIndex: number;\n};\n\nexport namespace FLBBalancerIndexing {\n export const read = (reader: ContextReader): FLBBalancerIndexing => {\n return {\n mNormalIndex: reader.readInt32(),\n mOverflowIndex: reader.readInt32(),\n mFilterIndex: reader.readInt32(),\n };\n }\n\n export const write = (writer: ContextWriter, value: FLBBalancerIndexing): void => {\n writer.writeInt32(value.mNormalIndex);\n writer.writeInt32(value.mOverflowIndex);\n writer.writeInt32(value.mFilterIndex);\n }\n};"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readable-stream-parser.d.ts","sourceRoot":"","sources":["../../../../src/parser/stream/reworked/readable-stream-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,cAAc,EAAmC,MAAM,YAAY,CAAC;AAyD9F,qBAAa,oBAAoB;IAEhC,OAAO,CAAC,MAAM,CAAC,kCAAkC,CAgC/C;IAUF,OAAc,kCAAkC,SACzC,MAAM,SACL,eAAe,YACZ,OAAO,CAAC;QACjB,sBAAsB,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;QAC1D,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KACxD,CAAC,KACA;QAAE,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;QAAC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CA2FzE;IAGD,OAAO,CAAC,MAAM,CAAC,gCAAgC,CAQ9C;mBAEoB,eAAe;
|
|
1
|
+
{"version":3,"file":"readable-stream-parser.d.ts","sourceRoot":"","sources":["../../../../src/parser/stream/reworked/readable-stream-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,cAAc,EAAmC,MAAM,YAAY,CAAC;AAyD9F,qBAAa,oBAAoB;IAEhC,OAAO,CAAC,MAAM,CAAC,kCAAkC,CAgC/C;IAUF,OAAc,kCAAkC,SACzC,MAAM,SACL,eAAe,YACZ,OAAO,CAAC;QACjB,sBAAsB,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;QAC1D,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KACxD,CAAC,KACA;QAAE,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;QAAC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CA2FzE;IAGD,OAAO,CAAC,MAAM,CAAC,gCAAgC,CAQ9C;mBAEoB,eAAe;CA0IpC"}
|
|
@@ -59,6 +59,7 @@ class ReadableStreamParser {
|
|
|
59
59
|
let destroyedActorsMap = {};
|
|
60
60
|
for (let j = 0; j <= levelCount; j++) {
|
|
61
61
|
let levelName = (j === levelCount) ? '' + mapName : reader.readString();
|
|
62
|
+
const isPersistentLevel = levelName === mapName;
|
|
62
63
|
if (j % 500 === 0) {
|
|
63
64
|
reader.onProgressCallback(reader.getBufferProgress(), `reading level [${(j + 1)}/${(levelCount + 1)}] ${levelName}`);
|
|
64
65
|
}
|
|
@@ -82,7 +83,7 @@ class ReadableStreamParser {
|
|
|
82
83
|
if (countObjectHeaders === totalReadObjectsInLevel + objects.length) {
|
|
83
84
|
const bytesLeft = afterAllHeaders - reader.getBufferPosition();
|
|
84
85
|
if (bytesLeft > 0) {
|
|
85
|
-
if (
|
|
86
|
+
if (isPersistentLevel) {
|
|
86
87
|
destroyedActorsMap = level_to_destroyed_actors_map_1.LevelToDestroyedActorsMap.read(reader);
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
@@ -114,23 +115,23 @@ class ReadableStreamParser {
|
|
|
114
115
|
shouldWait = true;
|
|
115
116
|
writtenTotalObjectsSinceConsumerSync = 0;
|
|
116
117
|
}
|
|
117
|
-
await write(`${writtenObjectsInLevel > 0 ? ', ' : ''}${objects.map(obj => JSON.stringify(obj)).join(', ')}`, shouldWait);
|
|
118
|
+
await write(`${writtenObjectsInLevel > 0 ? ', ' : ''}${objects.filter(Boolean).map(obj => JSON.stringify(obj)).join(', ')}`, shouldWait);
|
|
118
119
|
writtenTotalObjectsSinceConsumerSync += objectCountToRead;
|
|
119
120
|
writtenObjectsInLevel += objectCountToRead;
|
|
120
121
|
} while (totalReadObjectsInLevel < countObjectHeaders);
|
|
121
122
|
await write('], ', false);
|
|
122
|
-
if (
|
|
123
|
+
if (!isPersistentLevel) {
|
|
123
124
|
if (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SerializePerStreamableLevelTOCVersion) {
|
|
124
125
|
const saveCustomVersion = reader.readInt32();
|
|
125
126
|
await write(`"saveCustomVersion": ${saveCustomVersion}, `, false);
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
|
-
if (
|
|
129
|
+
if (isPersistentLevel) {
|
|
129
130
|
destroyedActorsMap = level_to_destroyed_actors_map_1.LevelToDestroyedActorsMap.read(reader);
|
|
130
131
|
await write(`"destroyedActorsMap": ${JSON.stringify(destroyedActorsMap)}, `, false);
|
|
131
132
|
}
|
|
132
133
|
await write('"collectables": [', false);
|
|
133
|
-
if (
|
|
134
|
+
if (!isPersistentLevel) {
|
|
134
135
|
collectables = object_references_list_1.ObjectReferencesList.ReadList(reader);
|
|
135
136
|
}
|
|
136
137
|
await write(`${collectables.map(obj => JSON.stringify(obj)).join(', ')}`, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readable-stream-parser.js","sourceRoot":"","sources":["../../../../src/parser/stream/reworked/readable-stream-parser.ts"],"names":[],"mappings":";;;;AAAA,oCAA8F;AAC9F,2DAAmE;AACnE,yDAAsD;AACtD,yGAAkG;AAClG,2FAAsF;AACtF,iFAA6E;AAC7E,+FAA0F;AAE1F,qFAAgF;AAChF,qEAAiE;AACjE,sFAAmF;AACnF,4FAAyF;AAEzF,MAAM,0BAA0B,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;AACrD,MAAM,iCAAiC,GAAG,CAAC,gBAAwB,0BAA0B,GAAG,CAAC,EAA2B,EAAE,CAAC,CAAC;IAC/H,aAAa;IACb,IAAI,EAAE,CAAC,KAAyB,EAAE,EAAE;QACnC,IAAI,KAAK,KAAK,SA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C,CAkG/C;AAGc,qDAAgC,GAAG,KAAK,EACtD,KAA6E,EAC7E,IAAY,EACZ,eAAqC,EACrC,MAA8B,EAC9B,kBAAsC,EACrC,EAAE;IACH,OAAO,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,IAAI,yBAAyB,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AACjN,CAAC,AAR8C,CAQ9C","sourcesContent":["import { QueuingStrategy, ReadableStream, ReadableStreamDefaultController } from \"stream/web\";\nimport { UnsupportedVersionError } from '../../error/parser.error';\nimport { Level } from '../../satisfactory/save/level';\nimport { LevelToDestroyedActorsMap } from '../../satisfactory/save/level-to-destroyed-actors-map';\nimport { ObjectReferencesList } from '../../satisfactory/save/object-references-list';\nimport { SatisfactorySave } from \"../../satisfactory/save/satisfactory-save\";\nimport { SatisfactorySaveHeader } from '../../satisfactory/save/satisfactory-save-header';\nimport { ChunkCompressionInfo } from \"../../satisfactory/save/save-body-chunks\";\nimport { SaveCustomVersion } from '../../satisfactory/save/save-custom-version';\nimport { SaveReader } from '../../satisfactory/save/save-reader';\nimport { ObjectReference } from '../../satisfactory/types/structs/ObjectReference';\nimport { SaveBodyValidation } from \"../../satisfactory/types/structs/SaveBodyValidation\";\n\nconst DEFAULT_BYTE_HIGHWATERMARK = 1024 * 1024 * 200;\t// 200MiB\nconst createStringLengthQueuingStrategy = (highWaterMark: number = DEFAULT_BYTE_HIGHWATERMARK / 4): QueuingStrategy<string> => ({\n\thighWaterMark,\n\tsize: (chunk: string | undefined) => {\n\t\tif (chunk === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn chunk.length;\n\t}\n});\n\nclass SimpleWaitForConsumerLock {\n\tlocked: boolean = false;\n\tunlockWasCalledInTheMeantime: boolean = false;\n\texecutionFn: (() => void) | undefined = undefined;\n\n\t/** activate lock and set function to execute on unlock.\n\t * If at least 1 unlock was called before this call, immediately unlock.\n\t */\n\tpublic lock(executionFn: () => void) {\n\t\tthis.executionFn = executionFn;\n\t\tthis.locked = true;\n\t\tif (this.unlockWasCalledInTheMeantime) {\n\t\t\tthis.unlock();\n\t\t}\n\t}\n\n\t/**\n\t * unlock and execute stored function if present.\n\t */\n\tpublic unlock() {\n\t\tthis.locked = false;\n\t\tif (this.executionFn) {\n\t\t\tthis.executionFn();\n\t\t\tthis.executionFn = undefined;\n\t\t} else {\n\t\t\tthis.unlockWasCalledInTheMeantime = true;\n\t\t}\n\t}\n};\n\n/**\n * Creates a ReadableStream from Binary file, that actually waits until the reading operator has caught up before it pushes more.\n */\nexport class ReadableStreamParser {\n\n\tprivate static CreateReadableStreamForParsingSave = (\n\t\tonStart: (controller: ReadableStreamDefaultController<string>) => void,\n\t\tonCancel: (reason: any) => void,\n\t\tonPullRequest: (desiredSize: number) => void,\n\t\thighWaterMark = DEFAULT_BYTE_HIGHWATERMARK / 4\n\t) => {\n\t\tlet ourController: ReadableStreamDefaultController<string> | null = null;\n\t\tconst stream = new ReadableStream<string>({\n\t\t\tstart: (controller: ReadableStreamDefaultController<string>) => {\n\t\t\t\tourController = controller;\n\t\t\t\tonStart(ourController);\n\t\t\t},\n\t\t\tpull: (controller: ReadableStreamDefaultController<string>) => {\n\t\t\t\tonPullRequest(ourController!.desiredSize ?? 1);\n\t\t\t},\n\t\t\tcancel: (reason) => {\n\t\t\t\tconsole.warn('parsing stream was canceled!', reason);\n\t\t\t\tif (ourController !== null) {\n\t\t\t\t\tourController.close();\n\t\t\t\t}\n\t\t\t\tonCancel(reason);\n\t\t\t}\n\t\t}, createStringLengthQueuingStrategy(highWaterMark));\n\n\t\t// create handle to close source.\n\t\tconst finish = () => {\n\t\t\tif (ourController !== null) {\n\t\t\t\tourController?.close();\n\t\t\t}\n\t\t}\n\n\t\treturn { stream, controller: ourController!, finish };\n\t};\n\n\t/**\n\t * the more elegant way to parse saves, instead of using the plain ParseSave. Since streaming will not hold the converted JSON in memory at once.\n\t * @param name the save name\n\t * @param bytes the save file as UInt8Array\n\t * @param onDecompressedSaveBody a callback to report back on the decompressed binary save body.\n\t * @param onProgress a callback to report back on the parsing progress. Optionally contains a message.\n\t * @returns a WHATWG compliant readable stream of strings (They are valid JSON and represent a {@link SatisfactorySave} object). And a method to actually start the streaming for more precise control.\n\t */\n\tpublic static CreateReadableStreamFromSaveToJson = (\n\t\tname: string,\n\t\tbytes: ArrayBufferLike,\n\t\toptions?: Partial<{\n\t\t\tonDecompressedSaveBody: (buffer: ArrayBufferLike) => void,\n\t\t\tonProgress: (progress: number, message?: string) => void\n\t\t}>\n\t): { stream: ReadableStream<string>, startStreaming: () => Promise<void> } => {\n\n\t\t// create a simple lock to sync with consumer of the stream. Aka handle backpressure.\n\t\tconst waitForConsumerLock = new SimpleWaitForConsumerLock();\n\t\tconst waitForConsumer = async () => {\n\t\t\treturn new Promise<void>((resolve, reject) => {\n\t\t\t\twaitForConsumerLock.lock(resolve);\n\t\t\t});\n\t\t}\n\n\t\tconst { stream, controller, finish } = ReadableStreamParser.CreateReadableStreamForParsingSave(\n\t\t\t(controller) => {\n\t\t\t\t//startStreaming();\n\t\t\t},\n\t\t\t(reason) => { },\n\t\t\t(desiredSize) => {\n\t\t\t\t// consumer (to be more correct, the internal buffer!) is ready, unlock syncing lock.\n\t\t\t\twaitForConsumerLock.unlock();\n\t\t\t},\n\t\t);\n\n\t\t/**\n\t\t * pushes a value into the readable stream. Optionally waits for the \"pull\" signal of the stream before writing.\n\t\t * @param value the value to write\n\t\t * @param waitForConsumerToBeReady whether the process should wait until the \"pull\" signal of the stream.\n\t\t */\n\t\tconst write = async (value: string, waitForConsumerToBeReady = true): Promise<void> => {\n\t\t\tif (waitForConsumerToBeReady) {\n\t\t\t\tawait waitForConsumer();\n\t\t\t}\n\t\t\tcontroller.enqueue(value);\n\t\t}\n\n\t\tconst startStreaming = async (): Promise<void> => {\n\n\t\t\tconst reader = new SaveReader(bytes, options?.onProgress);\n\n\t\t\t// read header\n\t\t\tconst header = SatisfactorySaveHeader.Parse(reader);\n\t\t\tconst save = new SatisfactorySave(name, header);\n\n\t\t\t// guard save version\n\t\t\tconst roughSaveVersion = SaveReader.GetRoughSaveVersion(header.saveVersion);\n\t\t\tif (roughSaveVersion === '<U6') {\n\t\t\t\tthrow new UnsupportedVersionError('Game Version < U6 is not supported in the parser. Please save the file in a newer game version.');\n\t\t\t}\n\n\t\t\t// inflate chunks\n\t\t\tconst inflateResult = reader.inflateChunks();\n\t\t\tsave.compressionInfo = inflateResult.compressionInfo;\n\n\t\t\t// call callback on decompressed save body\n\t\t\tif (options?.onDecompressedSaveBody !== undefined) {\n\t\t\t\toptions.onDecompressedSaveBody(reader.getBuffer());\n\t\t\t}\n\n\t\t\tlet saveBodyValidation = save.saveBodyValidation;\n\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.IntroducedWorldPartition) {\n\t\t\t\tsaveBodyValidation = SaveBodyValidation.Parse(reader);\n\t\t\t}\n\n\t\t\tawait ReadableStreamParser.WriteHeaderAndSaveBodyValidation(write, name, inflateResult.compressionInfo, header, saveBodyValidation);\n\n\t\t\t// parse levels\n\t\t\tawait ReadableStreamParser.ReadWriteLevels(write, reader, save.header.mapName, save.header.buildVersion);\n\t\t\tawait write(`}`, false);\n\n\t\t\t// unresolved data\n\t\t\tconst countUnresolvedWorldSaveData = reader.readInt32();\n\t\t\tif (countUnresolvedWorldSaveData) {\n\t\t\t\tsave.unresolvedWorldSaveData = [];\n\t\t\t\tfor (let i = 0; i < countUnresolvedWorldSaveData; i++) {\n\t\t\t\t\tsave.unresolvedWorldSaveData.push(ObjectReference.read(reader));\n\t\t\t\t}\n\t\t\t\tawait write(`, \"unresolvedWorldSaveData\": ${JSON.stringify(save.unresolvedWorldSaveData)} `, false);\n\t\t\t}\n\n\t\t\tif (save.name !== undefined) {\n\t\t\t\tawait write(`, \"name\": \"${save.name}\" `, false);\n\t\t\t}\n\n\t\t\tif (options?.onProgress !== undefined) {\n\t\t\t\toptions.onProgress(1, 'finished parsing.');\n\t\t\t}\n\n\t\t\t// close save object.\n\t\t\tawait write(`}`, true);\n\t\t\tfinish();\n\t\t};\n\n\t\treturn { stream, startStreaming };\n\t}\n\n\n\tprivate static WriteHeaderAndSaveBodyValidation = async (\n\t\twrite: (value: string, waitTilConsumingEndIsReady?: boolean) => Promise<void>,\n\t\tname: string,\n\t\tcompressionInfo: ChunkCompressionInfo,\n\t\theader: SatisfactorySaveHeader,\n\t\tsaveBodyValidation: SaveBodyValidation\n\t) => {\n\t\treturn write(`{\"header\": ${JSON.stringify(header)}, \"name\": \"${name}\", \"compressionInfo\": ${JSON.stringify(compressionInfo)}, \"saveBodyValidation\": ${JSON.stringify(saveBodyValidation)}, \"levels\": {`, false);\n\t}\n\n\tprivate static async ReadWriteLevels(\n\t\twrite: (value: string, waitTilConsumingEndIsReady?: boolean) => Promise<void>,\n\t\treader: SaveReader,\n\t\tmapName: string,\n\t\tbuildVersion: number,\n\t): Promise<void> {\n\n\t\tconst batchingSizeOfObjects = 1000;\n\t\tconst thresholdOfWrittenObjectsUntilWaitingForConsumerAgain = 3 * batchingSizeOfObjects;\n\n\t\tconst levelCount = reader.readInt32();\n\t\treader.onProgressCallback(reader.getBufferProgress(), `reading pack of ${levelCount + 1} levels.`);\n\n\t\tlet writtenTotalObjectsSinceConsumerSync = 0;\n\t\tlet collectables: ObjectReference[] = [];\n\t\tlet destroyedActorsMap: LevelToDestroyedActorsMap = {};\n\t\tfor (let j = 0; j <= levelCount; j++) {\n\t\t\tlet levelName = (j === levelCount) ? '' + mapName : reader.readString();\n\n\t\t\tif (j % 500 === 0) {\n\t\t\t\treader.onProgressCallback(reader.getBufferProgress(), `reading level [${(j + 1)}/${(levelCount + 1)}] ${levelName}`);\n\t\t\t}\n\n\t\t\t// we will intentionally NOT wait for next pull request, since these few characters don't make waiting useful.\n\t\t\tawait write(`${j > 0 ? ', ' : ''}\"${levelName}\": {\"name\": \"${levelName}\", \"objects\": [`, false);\n\n\n\t\t\t// object headers\n\t\t\tconst headersBinLen = reader.readInt32(); // object headers + destroyed colelctables\n\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.UnrealEngine5) {\n\t\t\t\treader.readInt32Zero();\n\t\t\t}\n\n\t\t\tconst posBeforeHeaders = reader.getBufferPosition();\n\t\t\tconst afterAllHeaders = posBeforeHeaders + headersBinLen;\n\t\t\tlet countObjectHeaders = reader.readInt32();\n\n\t\t\tlet totalReadObjectsInLevel = 0;\n\t\t\tlet writtenObjectsInLevel = 0;\n\t\t\tlet afterHeadersOfBatch = reader.getBufferPosition();\t// at first no batch is read.\n\t\t\tlet afterObjectsOfBatch = -1;\n\n\t\t\tdo {\n\n\t\t\t\t// jump to after last read batch\n\t\t\t\treader.skipBytes(afterHeadersOfBatch - reader.getBufferPosition());\n\n\t\t\t\t// read batch\n\t\t\t\tconst objectCountToRead = Math.min(countObjectHeaders - totalReadObjectsInLevel, batchingSizeOfObjects);\n\t\t\t\tconst objects = Level.ReadNObjectHeaders(reader, objectCountToRead);\n\n\t\t\t\tafterHeadersOfBatch = reader.getBufferPosition();\n\n\n\t\t\t\t// after headers, there MAY be destroyed entities. don't have to.\n\t\t\t\t// But either way, we can safely ignore them.\n\t\t\t\tif (countObjectHeaders === totalReadObjectsInLevel + objects.length) {\n\t\t\t\t\tconst bytesLeft = afterAllHeaders - reader.getBufferPosition();\n\t\t\t\t\tif (bytesLeft > 0) {\n\t\t\t\t\t\tif (levelName === reader.context.mapName) {\n\t\t\t\t\t\t\tdestroyedActorsMap = LevelToDestroyedActorsMap.read(reader);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcollectables = ObjectReferencesList.ReadList(reader);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\tif (totalReadObjectsInLevel === 0) {\n\n\t\t\t\t\t// jump to after all headers\n\t\t\t\t\treader.skipBytes(afterAllHeaders - reader.getBufferPosition());\n\n\t\t\t\t\tconst objectContentsBinLen = reader.readInt32();\n\t\t\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.UnrealEngine5) {\n\t\t\t\t\t\treader.readInt32Zero();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst posBeforeContents = reader.getBufferPosition();\n\t\t\t\t\tconst countEntities = reader.readInt32();\n\t\t\t\t\tafterObjectsOfBatch = reader.getBufferPosition();\t// at first no batch is read.\n\t\t\t\t} else {\n\t\t\t\t\treader.skipBytes(afterObjectsOfBatch - reader.getBufferPosition());\n\t\t\t\t}\n\n\t\t\t\tLevel.ReadNObjectContents(reader, objectCountToRead, objects, 0);\n\t\t\t\tafterObjectsOfBatch = reader.getBufferPosition();\n\n\t\t\t\ttotalReadObjectsInLevel += objectCountToRead;\n\t\t\t\tif (countObjectHeaders > 10000 && totalReadObjectsInLevel % 10000 === 0) {\n\t\t\t\t\treader.onProgressCallback(reader.getBufferProgress(), `read object count [${(totalReadObjectsInLevel + 1)}/${(countObjectHeaders + 1)}] in level ${levelName}`);\n\t\t\t\t}\n\n\t\t\t\t// we should wait even if the objects of many levels accumulate to several hundred.\n\t\t\t\tlet shouldWait = false;\n\t\t\t\tif (writtenTotalObjectsSinceConsumerSync >= thresholdOfWrittenObjectsUntilWaitingForConsumerAgain) {\n\t\t\t\t\t// will wait til consumer catches up. Because we wrote ${writtenTotalObjectsSinceConsumerSync} objects without waiting.\n\t\t\t\t\tshouldWait = true;\n\t\t\t\t\twrittenTotalObjectsSinceConsumerSync = 0;\n\t\t\t\t}\n\t\t\t\tawait write(`${writtenObjectsInLevel > 0 ? ', ' : ''}${objects.map(obj => JSON.stringify(obj)).join(', ')}`, shouldWait);\n\t\t\t\twrittenTotalObjectsSinceConsumerSync += objectCountToRead;\n\t\t\t\twrittenObjectsInLevel += objectCountToRead;\n\n\t\t\t} while (totalReadObjectsInLevel < countObjectHeaders)\n\n\n\t\t\tawait write('], ', false);\n\n\t\t\t// only NOT in the persistent level, we have saveVersion\n\t\t\tif (levelName !== reader.context.mapName) {\n\t\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.SerializePerStreamableLevelTOCVersion) {\n\t\t\t\t\tconst saveCustomVersion = reader.readInt32();\n\t\t\t\t\tawait write(`\"saveCustomVersion\": ${saveCustomVersion}, `, false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// only in persistent level, we have LevelToDestroyedActorsMap\n\t\t\tif (levelName === reader.context.mapName) {\n\t\t\t\tdestroyedActorsMap = LevelToDestroyedActorsMap.read(reader);\n\t\t\t\tawait write(`\"destroyedActorsMap\": ${JSON.stringify(destroyedActorsMap)}, `, false);\n\t\t\t}\n\n\t\t\tawait write('\"collectables\": [', false);\n\n\t\t\t// only NOT in the persistent level, we have 2nd collectables.\n\t\t\tif (levelName !== reader.context.mapName) {\n\t\t\t\tcollectables = ObjectReferencesList.ReadList(reader);\n\t\t\t}\n\n\t\t\tawait write(`${collectables.map(obj => JSON.stringify(obj)).join(', ')}`, true);\n\n\t\t\tawait write(']', false);\n\t\t\tawait write('}', false);\n\t\t}\n\t}\n}"]}
|
|
1
|
+
{"version":3,"file":"readable-stream-parser.js","sourceRoot":"","sources":["../../../../src/parser/stream/reworked/readable-stream-parser.ts"],"names":[],"mappings":";;;;AAAA,oCAA8F;AAC9F,2DAAmE;AACnE,yDAAsD;AACtD,yGAAkG;AAClG,2FAAsF;AACtF,iFAA6E;AAC7E,+FAA0F;AAE1F,qFAAgF;AAChF,qEAAiE;AACjE,sFAAmF;AACnF,4FAAyF;AAEzF,MAAM,0BAA0B,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;AACrD,MAAM,iCAAiC,GAAG,CAAC,gBAAwB,0BAA0B,GAAG,CAAC,EAA2B,EAAE,CAAC,CAAC;IAC/H,aAAa;IACb,IAAI,EAAE,CAAC,KAAyB,EAAE,EAAE;QACnC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,CAAC,CAAC;QACV,CAAC;QACD,OAAO,KAA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EAAE;IACH,OAAO,KAAK,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,IAAI,yBAAyB,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AACjN,CAAC,AAR8C,CAQ9C","sourcesContent":["import { QueuingStrategy, ReadableStream, ReadableStreamDefaultController } from \"stream/web\";\nimport { UnsupportedVersionError } from '../../error/parser.error';\nimport { Level } from '../../satisfactory/save/level';\nimport { LevelToDestroyedActorsMap } from '../../satisfactory/save/level-to-destroyed-actors-map';\nimport { ObjectReferencesList } from '../../satisfactory/save/object-references-list';\nimport { SatisfactorySave } from \"../../satisfactory/save/satisfactory-save\";\nimport { SatisfactorySaveHeader } from '../../satisfactory/save/satisfactory-save-header';\nimport { ChunkCompressionInfo } from \"../../satisfactory/save/save-body-chunks\";\nimport { SaveCustomVersion } from '../../satisfactory/save/save-custom-version';\nimport { SaveReader } from '../../satisfactory/save/save-reader';\nimport { ObjectReference } from '../../satisfactory/types/structs/ObjectReference';\nimport { SaveBodyValidation } from \"../../satisfactory/types/structs/SaveBodyValidation\";\n\nconst DEFAULT_BYTE_HIGHWATERMARK = 1024 * 1024 * 200;\t// 200MiB\nconst createStringLengthQueuingStrategy = (highWaterMark: number = DEFAULT_BYTE_HIGHWATERMARK / 4): QueuingStrategy<string> => ({\n\thighWaterMark,\n\tsize: (chunk: string | undefined) => {\n\t\tif (chunk === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn chunk.length;\n\t}\n});\n\nclass SimpleWaitForConsumerLock {\n\tlocked: boolean = false;\n\tunlockWasCalledInTheMeantime: boolean = false;\n\texecutionFn: (() => void) | undefined = undefined;\n\n\t/** activate lock and set function to execute on unlock.\n\t * If at least 1 unlock was called before this call, immediately unlock.\n\t */\n\tpublic lock(executionFn: () => void) {\n\t\tthis.executionFn = executionFn;\n\t\tthis.locked = true;\n\t\tif (this.unlockWasCalledInTheMeantime) {\n\t\t\tthis.unlock();\n\t\t}\n\t}\n\n\t/**\n\t * unlock and execute stored function if present.\n\t */\n\tpublic unlock() {\n\t\tthis.locked = false;\n\t\tif (this.executionFn) {\n\t\t\tthis.executionFn();\n\t\t\tthis.executionFn = undefined;\n\t\t} else {\n\t\t\tthis.unlockWasCalledInTheMeantime = true;\n\t\t}\n\t}\n};\n\n/**\n * Creates a ReadableStream from Binary file, that actually waits until the reading operator has caught up before it pushes more.\n */\nexport class ReadableStreamParser {\n\n\tprivate static CreateReadableStreamForParsingSave = (\n\t\tonStart: (controller: ReadableStreamDefaultController<string>) => void,\n\t\tonCancel: (reason: any) => void,\n\t\tonPullRequest: (desiredSize: number) => void,\n\t\thighWaterMark = DEFAULT_BYTE_HIGHWATERMARK / 4\n\t) => {\n\t\tlet ourController: ReadableStreamDefaultController<string> | null = null;\n\t\tconst stream = new ReadableStream<string>({\n\t\t\tstart: (controller: ReadableStreamDefaultController<string>) => {\n\t\t\t\tourController = controller;\n\t\t\t\tonStart(ourController);\n\t\t\t},\n\t\t\tpull: (controller: ReadableStreamDefaultController<string>) => {\n\t\t\t\tonPullRequest(ourController!.desiredSize ?? 1);\n\t\t\t},\n\t\t\tcancel: (reason) => {\n\t\t\t\tconsole.warn('parsing stream was canceled!', reason);\n\t\t\t\tif (ourController !== null) {\n\t\t\t\t\tourController.close();\n\t\t\t\t}\n\t\t\t\tonCancel(reason);\n\t\t\t}\n\t\t}, createStringLengthQueuingStrategy(highWaterMark));\n\n\t\t// create handle to close source.\n\t\tconst finish = () => {\n\t\t\tif (ourController !== null) {\n\t\t\t\tourController?.close();\n\t\t\t}\n\t\t}\n\n\t\treturn { stream, controller: ourController!, finish };\n\t};\n\n\t/**\n\t * the more elegant way to parse saves, instead of using the plain ParseSave. Since streaming will not hold the converted JSON in memory at once.\n\t * @param name the save name\n\t * @param bytes the save file as UInt8Array\n\t * @param onDecompressedSaveBody a callback to report back on the decompressed binary save body.\n\t * @param onProgress a callback to report back on the parsing progress. Optionally contains a message.\n\t * @returns a WHATWG compliant readable stream of strings (They are valid JSON and represent a {@link SatisfactorySave} object). And a method to actually start the streaming for more precise control.\n\t */\n\tpublic static CreateReadableStreamFromSaveToJson = (\n\t\tname: string,\n\t\tbytes: ArrayBufferLike,\n\t\toptions?: Partial<{\n\t\t\tonDecompressedSaveBody: (buffer: ArrayBufferLike) => void,\n\t\t\tonProgress: (progress: number, message?: string) => void\n\t\t}>\n\t): { stream: ReadableStream<string>, startStreaming: () => Promise<void> } => {\n\n\t\t// create a simple lock to sync with consumer of the stream. Aka handle backpressure.\n\t\tconst waitForConsumerLock = new SimpleWaitForConsumerLock();\n\t\tconst waitForConsumer = async () => {\n\t\t\treturn new Promise<void>((resolve, reject) => {\n\t\t\t\twaitForConsumerLock.lock(resolve);\n\t\t\t});\n\t\t}\n\n\t\tconst { stream, controller, finish } = ReadableStreamParser.CreateReadableStreamForParsingSave(\n\t\t\t(controller) => {\n\t\t\t\t//startStreaming();\n\t\t\t},\n\t\t\t(reason) => { },\n\t\t\t(desiredSize) => {\n\t\t\t\t// consumer (to be more correct, the internal buffer!) is ready, unlock syncing lock.\n\t\t\t\twaitForConsumerLock.unlock();\n\t\t\t},\n\t\t);\n\n\t\t/**\n\t\t * pushes a value into the readable stream. Optionally waits for the \"pull\" signal of the stream before writing.\n\t\t * @param value the value to write\n\t\t * @param waitForConsumerToBeReady whether the process should wait until the \"pull\" signal of the stream.\n\t\t */\n\t\tconst write = async (value: string, waitForConsumerToBeReady = true): Promise<void> => {\n\t\t\tif (waitForConsumerToBeReady) {\n\t\t\t\tawait waitForConsumer();\n\t\t\t}\n\t\t\tcontroller.enqueue(value);\n\t\t}\n\n\t\tconst startStreaming = async (): Promise<void> => {\n\n\t\t\tconst reader = new SaveReader(bytes, options?.onProgress);\n\n\t\t\t// read header\n\t\t\tconst header = SatisfactorySaveHeader.Parse(reader);\n\t\t\tconst save = new SatisfactorySave(name, header);\n\n\t\t\t// guard save version\n\t\t\tconst roughSaveVersion = SaveReader.GetRoughSaveVersion(header.saveVersion);\n\t\t\tif (roughSaveVersion === '<U6') {\n\t\t\t\tthrow new UnsupportedVersionError('Game Version < U6 is not supported in the parser. Please save the file in a newer game version.');\n\t\t\t}\n\n\t\t\t// inflate chunks\n\t\t\tconst inflateResult = reader.inflateChunks();\n\t\t\tsave.compressionInfo = inflateResult.compressionInfo;\n\n\t\t\t// call callback on decompressed save body\n\t\t\tif (options?.onDecompressedSaveBody !== undefined) {\n\t\t\t\toptions.onDecompressedSaveBody(reader.getBuffer());\n\t\t\t}\n\n\t\t\tlet saveBodyValidation = save.saveBodyValidation;\n\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.IntroducedWorldPartition) {\n\t\t\t\tsaveBodyValidation = SaveBodyValidation.Parse(reader);\n\t\t\t}\n\n\t\t\tawait ReadableStreamParser.WriteHeaderAndSaveBodyValidation(write, name, inflateResult.compressionInfo, header, saveBodyValidation);\n\n\t\t\t// parse levels\n\t\t\tawait ReadableStreamParser.ReadWriteLevels(write, reader, save.header.mapName, save.header.buildVersion);\n\t\t\tawait write(`}`, false);\n\n\t\t\t// unresolved data\n\t\t\tconst countUnresolvedWorldSaveData = reader.readInt32();\n\t\t\tif (countUnresolvedWorldSaveData) {\n\t\t\t\tsave.unresolvedWorldSaveData = [];\n\t\t\t\tfor (let i = 0; i < countUnresolvedWorldSaveData; i++) {\n\t\t\t\t\tsave.unresolvedWorldSaveData.push(ObjectReference.read(reader));\n\t\t\t\t}\n\t\t\t\tawait write(`, \"unresolvedWorldSaveData\": ${JSON.stringify(save.unresolvedWorldSaveData)} `, false);\n\t\t\t}\n\n\t\t\tif (save.name !== undefined) {\n\t\t\t\tawait write(`, \"name\": \"${save.name}\" `, false);\n\t\t\t}\n\n\t\t\tif (options?.onProgress !== undefined) {\n\t\t\t\toptions.onProgress(1, 'finished parsing.');\n\t\t\t}\n\n\t\t\t// close save object.\n\t\t\tawait write(`}`, true);\n\t\t\tfinish();\n\t\t};\n\n\t\treturn { stream, startStreaming };\n\t}\n\n\n\tprivate static WriteHeaderAndSaveBodyValidation = async (\n\t\twrite: (value: string, waitTilConsumingEndIsReady?: boolean) => Promise<void>,\n\t\tname: string,\n\t\tcompressionInfo: ChunkCompressionInfo,\n\t\theader: SatisfactorySaveHeader,\n\t\tsaveBodyValidation: SaveBodyValidation\n\t) => {\n\t\treturn write(`{\"header\": ${JSON.stringify(header)}, \"name\": \"${name}\", \"compressionInfo\": ${JSON.stringify(compressionInfo)}, \"saveBodyValidation\": ${JSON.stringify(saveBodyValidation)}, \"levels\": {`, false);\n\t}\n\n\tprivate static async ReadWriteLevels(\n\t\twrite: (value: string, waitTilConsumingEndIsReady?: boolean) => Promise<void>,\n\t\treader: SaveReader,\n\t\tmapName: string,\n\t\tbuildVersion: number,\n\t): Promise<void> {\n\n\t\tconst batchingSizeOfObjects = 1000;\n\t\tconst thresholdOfWrittenObjectsUntilWaitingForConsumerAgain = 3 * batchingSizeOfObjects;\n\n\t\tconst levelCount = reader.readInt32();\n\t\treader.onProgressCallback(reader.getBufferProgress(), `reading pack of ${levelCount + 1} levels.`);\n\n\t\tlet writtenTotalObjectsSinceConsumerSync = 0;\n\t\tlet collectables: ObjectReference[] = [];\n\t\tlet destroyedActorsMap: LevelToDestroyedActorsMap = {};\n\t\tfor (let j = 0; j <= levelCount; j++) {\n\t\t\tlet levelName = (j === levelCount) ? '' + mapName : reader.readString();\n\t\t\tconst isPersistentLevel = levelName === mapName;\n\n\t\t\tif (j % 500 === 0) {\n\t\t\t\treader.onProgressCallback(reader.getBufferProgress(), `reading level [${(j + 1)}/${(levelCount + 1)}] ${levelName}`);\n\t\t\t}\n\n\t\t\t// we will intentionally NOT wait for next pull request, since these few characters don't make waiting useful.\n\t\t\tawait write(`${j > 0 ? ', ' : ''}\"${levelName}\": {\"name\": \"${levelName}\", \"objects\": [`, false);\n\n\n\t\t\t// object headers\n\t\t\tconst headersBinLen = reader.readInt32(); // object headers + destroyed colelctables\n\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.UnrealEngine5) {\n\t\t\t\treader.readInt32Zero();\n\t\t\t}\n\n\t\t\tconst posBeforeHeaders = reader.getBufferPosition();\n\t\t\tconst afterAllHeaders = posBeforeHeaders + headersBinLen;\n\t\t\tlet countObjectHeaders = reader.readInt32();\n\n\t\t\tlet totalReadObjectsInLevel = 0;\n\t\t\tlet writtenObjectsInLevel = 0;\n\t\t\tlet afterHeadersOfBatch = reader.getBufferPosition();\t// at first no batch is read.\n\t\t\tlet afterObjectsOfBatch = -1;\n\n\t\t\tdo {\n\n\t\t\t\t// jump to after last read batch\n\t\t\t\treader.skipBytes(afterHeadersOfBatch - reader.getBufferPosition());\n\n\t\t\t\t// read batch\n\t\t\t\tconst objectCountToRead = Math.min(countObjectHeaders - totalReadObjectsInLevel, batchingSizeOfObjects);\n\t\t\t\tconst objects = Level.ReadNObjectHeaders(reader, objectCountToRead);\n\n\t\t\t\tafterHeadersOfBatch = reader.getBufferPosition();\n\n\n\t\t\t\t// after headers, there MAY be destroyed entities. don't have to.\n\t\t\t\t// But either way, we can safely ignore them.\n\t\t\t\tif (countObjectHeaders === totalReadObjectsInLevel + objects.length) {\n\t\t\t\t\tconst bytesLeft = afterAllHeaders - reader.getBufferPosition();\n\t\t\t\t\tif (bytesLeft > 0) {\n\t\t\t\t\t\tif (isPersistentLevel) {\n\t\t\t\t\t\t\tdestroyedActorsMap = LevelToDestroyedActorsMap.read(reader);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcollectables = ObjectReferencesList.ReadList(reader);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\tif (totalReadObjectsInLevel === 0) {\n\n\t\t\t\t\t// jump to after all headers\n\t\t\t\t\treader.skipBytes(afterAllHeaders - reader.getBufferPosition());\n\n\t\t\t\t\tconst objectContentsBinLen = reader.readInt32();\n\t\t\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.UnrealEngine5) {\n\t\t\t\t\t\treader.readInt32Zero();\n\t\t\t\t\t}\n\n\t\t\t\t\tconst posBeforeContents = reader.getBufferPosition();\n\t\t\t\t\tconst countEntities = reader.readInt32();\n\t\t\t\t\tafterObjectsOfBatch = reader.getBufferPosition();\t// at first no batch is read.\n\t\t\t\t} else {\n\t\t\t\t\treader.skipBytes(afterObjectsOfBatch - reader.getBufferPosition());\n\t\t\t\t}\n\n\t\t\t\tLevel.ReadNObjectContents(reader, objectCountToRead, objects, 0);\n\t\t\t\tafterObjectsOfBatch = reader.getBufferPosition();\n\n\t\t\t\ttotalReadObjectsInLevel += objectCountToRead;\n\t\t\t\tif (countObjectHeaders > 10000 && totalReadObjectsInLevel % 10000 === 0) {\n\t\t\t\t\treader.onProgressCallback(reader.getBufferProgress(), `read object count [${(totalReadObjectsInLevel + 1)}/${(countObjectHeaders + 1)}] in level ${levelName}`);\n\t\t\t\t}\n\n\t\t\t\t// we should wait even if the objects of many levels accumulate to several hundred.\n\t\t\t\tlet shouldWait = false;\n\t\t\t\tif (writtenTotalObjectsSinceConsumerSync >= thresholdOfWrittenObjectsUntilWaitingForConsumerAgain) {\n\t\t\t\t\t// will wait til consumer catches up. Because we wrote ${writtenTotalObjectsSinceConsumerSync} objects without waiting.\n\t\t\t\t\tshouldWait = true;\n\t\t\t\t\twrittenTotalObjectsSinceConsumerSync = 0;\n\t\t\t\t}\n\t\t\t\tawait write(`${writtenObjectsInLevel > 0 ? ', ' : ''}${objects.filter(Boolean).map(obj => JSON.stringify(obj)).join(', ')}`, shouldWait);\n\t\t\t\twrittenTotalObjectsSinceConsumerSync += objectCountToRead;\n\t\t\t\twrittenObjectsInLevel += objectCountToRead;\n\n\t\t\t} while (totalReadObjectsInLevel < countObjectHeaders)\n\n\n\t\t\tawait write('], ', false);\n\n\t\t\t// only NOT in the persistent level, we have saveVersion\n\t\t\tif (!isPersistentLevel) {\n\t\t\t\tif (reader.context.saveVersion >= SaveCustomVersion.SerializePerStreamableLevelTOCVersion) {\n\t\t\t\t\tconst saveCustomVersion = reader.readInt32();\n\t\t\t\t\tawait write(`\"saveCustomVersion\": ${saveCustomVersion}, `, false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// only in persistent level, we have LevelToDestroyedActorsMap\n\t\t\tif (isPersistentLevel) {\n\t\t\t\tdestroyedActorsMap = LevelToDestroyedActorsMap.read(reader);\n\t\t\t\tawait write(`\"destroyedActorsMap\": ${JSON.stringify(destroyedActorsMap)}, `, false);\n\t\t\t}\n\n\t\t\tawait write('\"collectables\": [', false);\n\n\t\t\t// only NOT in the persistent level, we have 2nd collectables.\n\t\t\tif (!isPersistentLevel) {\n\t\t\t\tcollectables = ObjectReferencesList.ReadList(reader);\n\t\t\t}\n\n\t\t\tawait write(`${collectables.map(obj => JSON.stringify(obj)).join(', ')}`, true);\n\n\t\t\tawait write(']', false);\n\t\t\tawait write('}', false);\n\t\t}\n\t}\n}"]}
|