@etothepii/satisfactory-file-parser 2.0.1 → 2.1.2
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 +12 -1
- package/GUIDE.md +81 -0
- package/README.md +86 -41
- package/build/parser/satisfactory/blueprint/blueprint-reader.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-reader.js +5 -6
- package/build/parser/satisfactory/blueprint/blueprint-reader.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-writer.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint-writer.js +3 -4
- package/build/parser/satisfactory/blueprint/blueprint-writer.js.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint.types.d.ts +3 -2
- package/build/parser/satisfactory/blueprint/blueprint.types.d.ts.map +1 -1
- package/build/parser/satisfactory/blueprint/blueprint.types.js.map +1 -1
- package/build/parser/satisfactory/edit/edit-constants.d.ts +4 -0
- package/build/parser/satisfactory/edit/edit-constants.d.ts.map +1 -1
- package/build/parser/satisfactory/edit/edit-constants.js +4 -0
- package/build/parser/satisfactory/edit/edit-constants.js.map +1 -1
- package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts +6 -4
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js +10 -19
- package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/BoolArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ByteArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/DoubleArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/EnumArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/FloatArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int32ArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/Int64ArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/ObjectArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/SoftObjectArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StrArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js +10 -7
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/ArrayProperty/TextArrayProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/BoolProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js +18 -18
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js +18 -19
- package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js +18 -18
- package/build/parser/satisfactory/types/property/generic/DoubleProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +9 -11
- package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js +18 -19
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/FloatProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js +18 -18
- package/build/parser/satisfactory/types/property/generic/FloatProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/Int32Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int32Property.js +18 -18
- package/build/parser/satisfactory/types/property/generic/Int32Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/Int64Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int64Property.js +18 -18
- package/build/parser/satisfactory/types/property/generic/Int64Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/Int8Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Int8Property.js +18 -18
- package/build/parser/satisfactory/types/property/generic/Int8Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +7 -5
- package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.js +22 -20
- package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js +18 -18
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.d.ts +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.js +5 -7
- package/build/parser/satisfactory/types/property/generic/SetProperty/Int32SetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/SetProperty/ObjectSetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/SetProperty/StrSetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.js +3 -5
- package/build/parser/satisfactory/types/property/generic/SetProperty/Uint32SetProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js +20 -20
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/StrProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StrProperty.js +18 -18
- package/build/parser/satisfactory/types/property/generic/StrProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/StructProperty.js +21 -19
- package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.js +18 -18
- package/build/parser/satisfactory/types/property/generic/TextProperty.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/Uint32Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js +18 -18
- package/build/parser/satisfactory/types/property/generic/Uint32Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/Uint64Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js +18 -18
- package/build/parser/satisfactory/types/property/generic/Uint64Property.js.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts +9 -8
- package/build/parser/satisfactory/types/property/generic/Uint8Property.d.ts.map +1 -1
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js +18 -18
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js.map +1 -1
- package/docs/assets/highlight.css +7 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BlueprintConfigReader.html +3 -3
- package/docs/classes/BlueprintConfigWriter.html +3 -3
- package/docs/classes/BlueprintReader.html +3 -3
- package/docs/classes/BlueprintWriter.html +3 -3
- package/docs/classes/CompressionLibraryError.html +2 -2
- package/docs/classes/CorruptSaveError.html +2 -2
- package/docs/classes/Parser.html +6 -6
- package/docs/classes/ParserError.html +2 -2
- package/docs/classes/ReadableStreamParser.html +2 -2
- package/docs/classes/SatisfactorySave.html +2 -2
- package/docs/classes/SaveComponent.html +2 -2
- package/docs/classes/SaveEntity.html +2 -2
- package/docs/classes/SaveObject.html +2 -2
- package/docs/classes/SaveReader.html +3 -3
- package/docs/classes/SaveStreamJsonStringifier.html +2 -2
- package/docs/classes/SaveStreamWriter.html +2 -2
- package/docs/classes/SaveWriter.html +3 -3
- package/docs/classes/TimeoutError.html +2 -2
- package/docs/classes/UnimplementedError.html +2 -2
- package/docs/classes/UnsupportedVersionError.html +2 -2
- package/docs/functions/AbstractBaseProperty.Create.html +1 -0
- 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/BoolArrayProperty.Parse.html +1 -1
- package/docs/functions/BoolArrayProperty.Serialize.html +1 -1
- package/docs/functions/BoolProperty.CalcOverhead.html +1 -0
- package/docs/functions/BoolProperty.Parse.html +1 -0
- package/docs/functions/BoolProperty.ReadValue.html +1 -0
- package/docs/functions/BoolProperty.Serialize.html +1 -0
- package/docs/functions/BoolProperty.SerializeValue.html +1 -0
- package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -1
- package/docs/functions/BuildableSubsystemSpecialProperties.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 -0
- package/docs/functions/ByteProperty.Parse.html +1 -0
- package/docs/functions/ByteProperty.ReadValue.html +1 -0
- package/docs/functions/ByteProperty.Serialize.html +1 -0
- package/docs/functions/ByteProperty.SerializeValue.html +1 -0
- 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 -0
- package/docs/functions/DoubleProperty.Parse.html +1 -0
- package/docs/functions/DoubleProperty.ReadValue.html +1 -0
- package/docs/functions/DoubleProperty.Serialize.html +1 -0
- package/docs/functions/DoubleProperty.SerializeValue.html +1 -0
- package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
- package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
- package/docs/functions/EmptySpecialProperties.Parse.html +1 -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 -0
- package/docs/functions/EnumProperty.Parse.html +1 -0
- package/docs/functions/EnumProperty.ReadValue.html +1 -0
- package/docs/functions/EnumProperty.Serialize.html +1 -0
- package/docs/functions/EnumProperty.SerializeValue.html +1 -0
- package/docs/functions/FICFrameRange.Parse.html +1 -1
- package/docs/functions/FICFrameRange.Serialize.html +1 -1
- package/docs/functions/FloatArrayProperty.Parse.html +1 -1
- package/docs/functions/FloatArrayProperty.Serialize.html +1 -1
- package/docs/functions/FloatProperty.CalcOverhead.html +1 -0
- package/docs/functions/FloatProperty.Parse.html +1 -0
- package/docs/functions/FloatProperty.ReadValue.html +1 -0
- package/docs/functions/FloatProperty.Serialize.html +1 -0
- package/docs/functions/FloatProperty.SerializeValue.html +1 -0
- package/docs/functions/GUID.read.html +1 -1
- package/docs/functions/GUID.write.html +1 -1
- package/docs/functions/GUIDInfo.read.html +1 -1
- package/docs/functions/GUIDInfo.write.html +1 -1
- package/docs/functions/Int32ArrayProperty.Parse.html +1 -1
- package/docs/functions/Int32ArrayProperty.Serialize.html +1 -1
- package/docs/functions/Int32Property.CalcOverhead.html +1 -0
- package/docs/functions/Int32Property.Parse.html +1 -0
- package/docs/functions/Int32Property.ReadValue.html +1 -0
- package/docs/functions/Int32Property.Serialize.html +1 -0
- package/docs/functions/Int32Property.SerializeValue.html +1 -0
- 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 -0
- package/docs/functions/Int64Property.Parse.html +1 -0
- package/docs/functions/Int64Property.ReadValue.html +1 -0
- package/docs/functions/Int64Property.Serialize.html +1 -0
- package/docs/functions/Int64Property.SerializeValue.html +1 -0
- package/docs/functions/Int8Property.CalcOverhead.html +1 -0
- package/docs/functions/Int8Property.Parse.html +1 -0
- package/docs/functions/Int8Property.ReadValue.html +1 -0
- package/docs/functions/Int8Property.Serialize.html +1 -0
- package/docs/functions/Int8Property.SerializeValue.html +1 -0
- package/docs/functions/Level.ReadAllObjectContents.html +1 -1
- package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
- package/docs/functions/Level.ReadLevel.html +1 -1
- package/docs/functions/Level.ReadNObjectContents.html +1 -1
- package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
- package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
- package/docs/functions/Level.SerializeLevel.html +1 -1
- package/docs/functions/MD5Hash.read.html +1 -1
- package/docs/functions/MD5Hash.write.html +1 -1
- package/docs/functions/MapProperty.CalcOverhead.html +1 -0
- package/docs/functions/MapProperty.Parse.html +1 -0
- package/docs/functions/MapProperty.Serialize.html +1 -0
- package/docs/functions/ObjectArrayProperty.Parse.html +1 -1
- package/docs/functions/ObjectArrayProperty.Serialize.html +1 -1
- package/docs/functions/ObjectProperty.CalcOverhead.html +1 -0
- package/docs/functions/ObjectProperty.Parse.html +1 -0
- package/docs/functions/ObjectProperty.ReadValue.html +1 -0
- package/docs/functions/ObjectProperty.Serialize.html +1 -0
- package/docs/functions/ObjectProperty.SerializeValue.html +1 -0
- package/docs/functions/ObjectReference.read.html +1 -1
- package/docs/functions/ObjectReference.write.html +1 -1
- package/docs/functions/ObjectSetProperty.Parse.html +1 -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/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 -0
- package/docs/functions/StrProperty.Parse.html +1 -0
- package/docs/functions/StrProperty.ReadValue.html +1 -0
- package/docs/functions/StrProperty.Serialize.html +1 -0
- package/docs/functions/StrProperty.SerializeValue.html +1 -0
- 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 -0
- package/docs/functions/StructProperty.Parse.html +1 -0
- package/docs/functions/StructProperty.ParseValue.html +1 -0
- package/docs/functions/StructProperty.Serialize.html +1 -0
- package/docs/functions/StructProperty.SerializeValue.html +1 -0
- 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 -0
- package/docs/functions/TextProperty.Parse.html +1 -0
- package/docs/functions/TextProperty.ReadValue.html +1 -0
- package/docs/functions/TextProperty.Serialize.html +1 -0
- package/docs/functions/TextProperty.SerializeValue.html +1 -0
- package/docs/functions/Transform.Parse.html +1 -1
- package/docs/functions/Transform.ParseF.html +1 -1
- package/docs/functions/Transform.Serialize.html +1 -1
- package/docs/functions/Transform.SerializeF.html +1 -1
- package/docs/functions/Uint32Property.CalcOverhead.html +1 -0
- package/docs/functions/Uint32Property.Parse.html +1 -0
- package/docs/functions/Uint32Property.ReadValue.html +1 -0
- package/docs/functions/Uint32Property.Serialize.html +1 -0
- package/docs/functions/Uint32Property.SerializeValue.html +1 -0
- package/docs/functions/Uint32SetProperty.Parse.html +1 -1
- package/docs/functions/Uint32SetProperty.Serialize.html +1 -1
- package/docs/functions/Uint64Property.CalcOverhead.html +1 -0
- package/docs/functions/Uint64Property.Parse.html +1 -0
- package/docs/functions/Uint64Property.ReadValue.html +1 -0
- package/docs/functions/Uint64Property.Serialize.html +1 -0
- package/docs/functions/Uint64Property.SerializeValue.html +1 -0
- package/docs/functions/Uint8Property.CalcOverhead.html +1 -0
- package/docs/functions/Uint8Property.Parse.html +1 -0
- package/docs/functions/Uint8Property.ReadValue.html +1 -0
- package/docs/functions/Uint8Property.Serialize.html +1 -0
- package/docs/functions/Uint8Property.SerializeValue.html +1 -0
- 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 +24 -29
- package/docs/interfaces/Blueprint.html +2 -2
- package/docs/interfaces/BlueprintConfig.html +2 -2
- package/docs/interfaces/ModData.html +2 -2
- package/docs/interfaces/SatisfactoryModMetadata.html +2 -2
- package/docs/interfaces/SatisfactorySaveHeader.html +2 -2
- package/docs/interfaces/SaveComponentHeader.html +2 -2
- package/docs/interfaces/SaveEntityHeader.html +2 -2
- package/docs/interfaces/SaveObjectHeader.html +2 -2
- package/docs/modules/AbstractBaseProperty.html +2 -0
- package/docs/modules/ArrayProperty.html +1 -1
- package/docs/modules/BoolArrayProperty.html +1 -1
- package/docs/modules/BoolProperty.html +6 -0
- package/docs/modules/BuildableSubsystemSpecialProperties.html +1 -1
- package/docs/modules/ByteArrayProperty.html +1 -1
- package/docs/modules/ByteProperty.html +6 -0
- 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 +6 -0
- 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 +6 -0
- package/docs/modules/FICFrameRange.html +1 -1
- package/docs/modules/FloatArrayProperty.html +1 -1
- package/docs/modules/FloatProperty.html +6 -0
- 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 +6 -0
- package/docs/modules/Int32SetProperty.html +1 -1
- package/docs/modules/Int64ArrayProperty.html +1 -1
- package/docs/modules/Int64Property.html +6 -0
- package/docs/modules/Int8Property.html +6 -0
- package/docs/modules/Level.html +1 -1
- package/docs/modules/MD5Hash.html +1 -1
- package/docs/modules/MapProperty.html +4 -0
- package/docs/modules/ObjectArrayProperty.html +1 -1
- package/docs/modules/ObjectProperty.html +6 -0
- 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/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 +6 -0
- package/docs/modules/StrSetProperty.html +1 -1
- package/docs/modules/StructArrayProperty.html +1 -1
- package/docs/modules/StructProperty.html +6 -0
- package/docs/modules/StructSetProperty.html +1 -1
- package/docs/modules/TextArrayProperty.html +1 -1
- package/docs/modules/TextProperty.html +6 -0
- package/docs/modules/Transform.html +1 -1
- package/docs/modules/Uint32Property.html +6 -0
- package/docs/modules/Uint32SetProperty.html +1 -1
- package/docs/modules/Uint64Property.html +6 -0
- package/docs/modules/Uint8Property.html +6 -0
- 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 +37 -20
- package/docs/types/AbstractBaseProperty-1.html +1 -0
- 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.html +1 -1
- package/docs/types/BoolArrayProperty-1.html +1 -1
- package/docs/types/BoolProperty-1.html +1 -0
- package/docs/types/BoxStructPropertyValue.html +1 -1
- package/docs/types/BuildableSubsystemSpecialProperties-1.html +1 -1
- package/docs/types/BuildableTypeInstance.html +1 -1
- package/docs/types/ByteArrayProperty-1.html +1 -1
- package/docs/types/ByteProperty-1.html +1 -0
- package/docs/types/BytePropertyValue.html +1 -1
- package/docs/types/CircuitSpecialProperties-1.html +1 -1
- package/docs/types/ClientIdentityInfo.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 -0
- 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 -0
- package/docs/types/FICFrameRange-1.html +1 -1
- package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
- package/docs/types/FloatArrayProperty-1.html +1 -1
- package/docs/types/FloatProperty-1.html +1 -0
- package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
- package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
- package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
- package/docs/types/GUID-1.html +1 -1
- package/docs/types/GUIDInfo-1.html +1 -1
- package/docs/types/Int32ArrayProperty-1.html +1 -1
- package/docs/types/Int32Property-1.html +1 -0
- package/docs/types/Int32SetProperty-1.html +1 -1
- package/docs/types/Int64ArrayProperty-1.html +1 -1
- package/docs/types/Int64Property-1.html +1 -0
- package/docs/types/Int8Property-1.html +1 -0
- package/docs/types/InventoryItemStructPropertyValue.html +1 -1
- package/docs/types/Level-1.html +1 -1
- package/docs/types/MAP_STRUCT_KEY_PROXY.html +1 -1
- package/docs/types/MD5Hash-1.html +1 -1
- package/docs/types/MapProperty-1.html +1 -0
- package/docs/types/ObjectArrayProperty-1.html +1 -1
- package/docs/types/ObjectProperty-1.html +1 -0
- 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/RoughSaveVersion.html +1 -1
- 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 -0
- package/docs/types/StrSetProperty-1.html +1 -1
- package/docs/types/StructArrayProperty-1.html +1 -1
- package/docs/types/StructProperty-1.html +1 -0
- package/docs/types/StructSetProperty-1.html +1 -1
- package/docs/types/TextArrayProperty-1.html +1 -1
- package/docs/types/TextProperty-1.html +1 -0
- package/docs/types/TextPropertyValue.html +1 -1
- package/docs/types/Transform-1.html +1 -1
- package/docs/types/Uint32Property-1.html +1 -0
- package/docs/types/Uint32SetProperty-1.html +1 -1
- package/docs/types/Uint64Property-1.html +1 -0
- package/docs/types/Uint8Property-1.html +1 -0
- 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/EDIT.html +1 -1
- package/package.json +2 -2
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.d.ts +0 -23
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.js +0 -172
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/BasicProperty.d.ts +0 -26
- package/build/parser/satisfactory/types/property/generic/BasicProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/BasicProperty.js +0 -29
- package/build/parser/satisfactory/types/property/generic/BasicProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty.d.ts +0 -13
- package/build/parser/satisfactory/types/property/generic/SetProperty.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/generic/SetProperty.js +0 -95
- package/build/parser/satisfactory/types/property/generic/SetProperty.js.map +0 -1
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.d.ts +0 -55
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.d.ts.map +0 -1
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.js +0 -3
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.js.map +0 -1
- package/docs/classes/AbstractBaseProperty.html +0 -7
- package/docs/classes/BoolProperty.html +0 -13
- package/docs/classes/ByteProperty.html +0 -13
- package/docs/classes/DoubleProperty.html +0 -13
- package/docs/classes/EnumProperty.html +0 -13
- package/docs/classes/FloatProperty.html +0 -13
- package/docs/classes/Int32Property.html +0 -13
- package/docs/classes/Int64Property.html +0 -13
- package/docs/classes/Int8Property.html +0 -13
- package/docs/classes/MapProperty.html +0 -17
- package/docs/classes/ObjectProperty.html +0 -13
- package/docs/classes/StrProperty.html +0 -13
- package/docs/classes/StructProperty.html +0 -18
- package/docs/classes/TextProperty.html +0 -13
- package/docs/classes/Uint32Property.html +0 -13
- package/docs/classes/Uint64Property.html +0 -13
- package/docs/classes/Uint8Property.html +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoftObjectProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/SoftObjectProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,2EAAwE;AACxE,iEAA8D;AAEvD,MAAM,oBAAoB,GAAG,CAAC,QAAa,EAAkC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,oBAAoB,CAAC;AAA7I,QAAA,oBAAoB,wBAAyH;
|
|
1
|
+
{"version":3,"file":"SoftObjectProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/SoftObjectProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,2EAAwE;AACxE,iEAA8D;AAEvD,MAAM,oBAAoB,GAAG,CAAC,QAAa,EAAkC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,oBAAoB,CAAC;AAA7I,QAAA,oBAAoB,wBAAyH;AAO1J,IAAiB,kBAAkB,CA8BlC;AA9BD,WAAiB,kBAAkB;IAGlB,wBAAK,GAAG,CAAC,MAAsB,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAsB,EAAE;QACnG,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,mBAAA,SAAS,CAAC,MAAM,CAAC,CAAC;QAEhC,OAAO;YACH,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,oBAAoB;YAC1B,KAAK;SACqB,CAAC;IACnC,CAAC,CAAA;IAEY,4BAAS,GAAG,CAAC,MAAsB,EAAuB,EAAE;QACrE,OAAO,yCAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC,CAAA;IAEY,+BAAY,GAAG,CAAC,QAA4B,EAAU,EAAE;QACjE,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;IAEY,4BAAS,GAAG,CAAC,MAAkB,EAAE,QAA4B,EAAQ,EAAE;QAChF,mBAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,mBAAA,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAA;IAEY,iCAAc,GAAG,CAAC,MAAkB,EAAE,KAA0B,EAAQ,EAAE;QACnF,yCAAmB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAA;AACL,CAAC,EA9BgB,kBAAkB,kCAAlB,kBAAkB,QA8BlC","sourcesContent":["import { BinaryReadable } from '../../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../../byte/byte-writer.class';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { SoftObjectReference } from '../../structs/SoftObjectReference';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\nexport const isSoftObjectProperty = (property: any): property is SoftObjectProperty => !Array.isArray(property) && property.type === 'SoftObjectProperty';\n\nexport type SoftObjectProperty = AbstractBaseProperty & {\n type: 'SoftObjectProperty';\n value: SoftObjectReference;\n};\n\nexport namespace SoftObjectProperty {\n\n\n export const Parse = (reader: BinaryReadable, ueType: string, index: number = 0): SoftObjectProperty => {\n const guidInfo = GUIDInfo.read(reader);\n const value = ReadValue(reader);\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'SoftObjectProperty',\n value,\n } satisfies SoftObjectProperty;\n }\n\n export const ReadValue = (reader: BinaryReadable): SoftObjectReference => {\n return SoftObjectReference.read(reader);\n }\n\n export const CalcOverhead = (property: SoftObjectProperty): number => {\n return 1;\n }\n\n export const Serialize = (writer: ByteWriter, property: SoftObjectProperty): void => {\n GUIDInfo.write(writer, property.guidInfo);\n SerializeValue(writer, property.value);\n }\n\n export const SerializeValue = (writer: ByteWriter, value: SoftObjectReference): void => {\n SoftObjectReference.write(writer, value);\n }\n}\n"]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { BinaryReadable } from '../../../../byte/binary-readable.interface';
|
|
2
2
|
import { ByteWriter } from '../../../../byte/byte-writer.class';
|
|
3
|
-
import { GUIDInfo } from '../../structs/GUIDInfo';
|
|
4
3
|
import { AbstractBaseProperty } from './AbstractBaseProperty';
|
|
5
4
|
export declare const isStrProperty: (property: any) => property is StrProperty;
|
|
6
|
-
export
|
|
5
|
+
export type StrProperty = AbstractBaseProperty & {
|
|
6
|
+
type: 'StrProperty';
|
|
7
7
|
value: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
};
|
|
9
|
+
export declare namespace StrProperty {
|
|
10
|
+
const Parse: (reader: BinaryReadable, ueType: string, index?: number) => StrProperty;
|
|
11
|
+
const ReadValue: (reader: BinaryReadable) => string;
|
|
12
|
+
const CalcOverhead: (property: StrProperty) => number;
|
|
13
|
+
const Serialize: (writer: ByteWriter, property: StrProperty) => void;
|
|
14
|
+
const SerializeValue: (writer: ByteWriter, value: string) => void;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=StrProperty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StrProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StrProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"StrProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StrProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,aAAa,aAAc,GAAG,KAAG,QAAQ,IAAI,WAA0E,CAAC;AAErI,MAAM,MAAM,WAAW,GAAG,oBAAoB,GAAG;IAC7C,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,WAAW,CAAC;IAElB,MAAM,KAAK,WAAY,cAAc,UAAU,MAAM,UAAS,MAAM,KAAO,WASjF,CAAA;IAEM,MAAM,SAAS,WAAY,cAAc,KAAG,MAElD,CAAA;IAEM,MAAM,YAAY,aAAc,WAAW,KAAG,MAEpD,CAAA;IAEM,MAAM,SAAS,WAAY,UAAU,YAAY,WAAW,KAAG,IAGrE,CAAA;IAEM,MAAM,cAAc,WAAY,UAAU,SAAS,MAAM,KAAG,IAElE,CAAA;CACJ"}
|
|
@@ -5,29 +5,29 @@ const GUIDInfo_1 = require("../../structs/GUIDInfo");
|
|
|
5
5
|
const AbstractBaseProperty_1 = require("./AbstractBaseProperty");
|
|
6
6
|
const isStrProperty = (property) => !Array.isArray(property) && property.type === 'StrProperty';
|
|
7
7
|
exports.isStrProperty = isStrProperty;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.value = value;
|
|
12
|
-
}
|
|
13
|
-
static Parse(reader, ueType, index = 0) {
|
|
8
|
+
var StrProperty;
|
|
9
|
+
(function (StrProperty) {
|
|
10
|
+
StrProperty.Parse = (reader, ueType, index = 0) => {
|
|
14
11
|
const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
|
|
15
12
|
const value = StrProperty.ReadValue(reader);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
return {
|
|
14
|
+
...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),
|
|
15
|
+
type: 'StrProperty',
|
|
16
|
+
value,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
StrProperty.ReadValue = (reader) => {
|
|
19
20
|
return reader.readString();
|
|
20
|
-
}
|
|
21
|
-
|
|
21
|
+
};
|
|
22
|
+
StrProperty.CalcOverhead = (property) => {
|
|
22
23
|
return 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
24
|
+
};
|
|
25
|
+
StrProperty.Serialize = (writer, property) => {
|
|
25
26
|
GUIDInfo_1.GUIDInfo.write(writer, property.guidInfo);
|
|
26
27
|
StrProperty.SerializeValue(writer, property.value);
|
|
27
|
-
}
|
|
28
|
-
|
|
28
|
+
};
|
|
29
|
+
StrProperty.SerializeValue = (writer, value) => {
|
|
29
30
|
writer.writeString(value);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.StrProperty = StrProperty;
|
|
31
|
+
};
|
|
32
|
+
})(StrProperty || (exports.StrProperty = StrProperty = {}));
|
|
33
33
|
//# sourceMappingURL=StrProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StrProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StrProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAEvD,MAAM,aAAa,GAAG,CAAC,QAAa,EAA2B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC;AAAxH,QAAA,aAAa,iBAA2G;
|
|
1
|
+
{"version":3,"file":"StrProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StrProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAEvD,MAAM,aAAa,GAAG,CAAC,QAAa,EAA2B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC;AAAxH,QAAA,aAAa,iBAA2G;AAOrI,IAAiB,WAAW,CA6B3B;AA7BD,WAAiB,WAAW;IAEX,iBAAK,GAAG,CAAC,MAAsB,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAe,EAAE;QAC5F,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,YAAA,SAAS,CAAC,MAAM,CAAC,CAAC;QAEhC,OAAO;YACH,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,aAAa;YACnB,KAAK;SACc,CAAC;IAC5B,CAAC,CAAA;IAEY,qBAAS,GAAG,CAAC,MAAsB,EAAU,EAAE;QACxD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAA;IAEY,wBAAY,GAAG,CAAC,QAAqB,EAAU,EAAE;QAC1D,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;IAEY,qBAAS,GAAG,CAAC,MAAkB,EAAE,QAAqB,EAAQ,EAAE;QACzE,mBAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,YAAA,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAA;IAEY,0BAAc,GAAG,CAAC,MAAkB,EAAE,KAAa,EAAQ,EAAE;QACtE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAA;AACL,CAAC,EA7BgB,WAAW,2BAAX,WAAW,QA6B3B","sourcesContent":["import { BinaryReadable } from '../../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../../byte/byte-writer.class';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\nexport const isStrProperty = (property: any): property is StrProperty => !Array.isArray(property) && property.type === 'StrProperty';\n\nexport type StrProperty = AbstractBaseProperty & {\n type: 'StrProperty';\n value: string;\n};\n\nexport namespace StrProperty {\n\n export const Parse = (reader: BinaryReadable, ueType: string, index: number = 0): StrProperty => {\n const guidInfo = GUIDInfo.read(reader);\n const value = ReadValue(reader);\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'StrProperty',\n value,\n } satisfies StrProperty;\n }\n\n export const ReadValue = (reader: BinaryReadable): string => {\n return reader.readString();\n }\n\n export const CalcOverhead = (property: StrProperty): number => {\n return 1;\n }\n\n export const Serialize = (writer: ByteWriter, property: StrProperty): void => {\n GUIDInfo.write(writer, property.guidInfo);\n SerializeValue(writer, property.value);\n }\n\n export const SerializeValue = (writer: ByteWriter, value: string): void => {\n writer.writeString(value);\n }\n}\n"]}
|
|
@@ -2,7 +2,6 @@ import { BinaryReadable } from '../../../../byte/binary-readable.interface';
|
|
|
2
2
|
import { ByteWriter } from '../../../../byte/byte-writer.class';
|
|
3
3
|
import { col4 } from '../../structs/col4';
|
|
4
4
|
import { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';
|
|
5
|
-
import { GUIDInfo } from '../../structs/GUIDInfo';
|
|
6
5
|
import { vec3 } from '../../structs/vec3';
|
|
7
6
|
import { vec4 } from '../../structs/vec4';
|
|
8
7
|
import { AbstractBaseProperty } from './AbstractBaseProperty';
|
|
@@ -44,18 +43,20 @@ export type ClientIdentityInfo = {
|
|
|
44
43
|
};
|
|
45
44
|
export type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue | InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | ClientIdentityInfo | DynamicStructPropertyValue | col4 | vec3 | vec4 | string;
|
|
46
45
|
export declare const isStructProperty: (property: any) => property is StructProperty;
|
|
47
|
-
export
|
|
46
|
+
export type StructProperty = AbstractBaseProperty & {
|
|
47
|
+
type: 'StructProperty';
|
|
48
48
|
subtype: string;
|
|
49
49
|
value: GENERIC_STRUCT_PROPERTY_VALUE;
|
|
50
50
|
unk1?: number;
|
|
51
51
|
unk2?: number;
|
|
52
52
|
unk3?: number;
|
|
53
53
|
unk4?: number;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
};
|
|
55
|
+
export declare namespace StructProperty {
|
|
56
|
+
const Parse: (reader: BinaryReadable, ueType: string, index: number, size: number) => StructProperty;
|
|
57
|
+
const ParseValue: (reader: BinaryReadable, subtype: string, size: number) => GENERIC_STRUCT_PROPERTY_VALUE;
|
|
58
|
+
const CalcOverhead: (property: StructProperty) => number;
|
|
59
|
+
const Serialize: (writer: ByteWriter, property: StructProperty) => void;
|
|
60
|
+
const SerializeValue: (writer: ByteWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE) => void;
|
|
60
61
|
}
|
|
61
62
|
//# sourceMappingURL=StructProperty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StructProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"StructProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAGtF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAA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AAG,IAAI,GAAG,MAAM,CAAC;AAExJ,eAAO,MAAM,gBAAgB,aAAc,GAAG,KAAG,QAAQ,IAAI,cAAgF,CAAC;AAE9I,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG;IAChD,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,6BAA6B,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,cAAc,CAAC;IAErB,MAAM,KAAK,WAAY,cAAc,UAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,KAAG,cA4C3F,CAAA;IAEM,MAAM,UAAU,WAAY,cAAc,WAAW,MAAM,QAAQ,MAAM,KAAG,6BAsIlF,CAAA;IAEM,MAAM,YAAY,aAAc,cAAc,KAAG,MAEvD,CAAA;IAEM,MAAM,SAAS,WAAY,UAAU,YAAY,cAAc,KAAG,IAUxE,CAAA;IAEM,MAAM,cAAc,WAAY,UAAU,WAAW,MAAM,SAAS,6BAA6B,KAAG,IA4G1G,CAAA;CACJ"}
|
|
@@ -11,14 +11,17 @@ const vec4_1 = require("../../structs/vec4");
|
|
|
11
11
|
const AbstractBaseProperty_1 = require("./AbstractBaseProperty");
|
|
12
12
|
const isStructProperty = (property) => !Array.isArray(property) && property.type === 'StructProperty';
|
|
13
13
|
exports.isStructProperty = isStructProperty;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
var StructProperty;
|
|
15
|
+
(function (StructProperty) {
|
|
16
|
+
StructProperty.Parse = (reader, ueType, index, size) => {
|
|
17
|
+
const subtype = reader.readString();
|
|
18
|
+
const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
|
|
19
|
+
const struct = {
|
|
20
|
+
...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),
|
|
21
|
+
type: 'StructProperty',
|
|
22
|
+
value: { values: [] },
|
|
23
|
+
subtype
|
|
24
|
+
};
|
|
22
25
|
const unk1 = reader.readInt32();
|
|
23
26
|
if (unk1 !== 0) {
|
|
24
27
|
struct.unk1 = unk1;
|
|
@@ -47,8 +50,8 @@ class StructProperty extends AbstractBaseProperty_1.AbstractBaseProperty {
|
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
return struct;
|
|
50
|
-
}
|
|
51
|
-
|
|
53
|
+
};
|
|
54
|
+
StructProperty.ParseValue = (reader, subtype, size) => {
|
|
52
55
|
let value;
|
|
53
56
|
switch (subtype) {
|
|
54
57
|
case 'Color':
|
|
@@ -154,11 +157,11 @@ class StructProperty extends AbstractBaseProperty_1.AbstractBaseProperty {
|
|
|
154
157
|
value = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, 0, subtype);
|
|
155
158
|
}
|
|
156
159
|
return value;
|
|
157
|
-
}
|
|
158
|
-
|
|
160
|
+
};
|
|
161
|
+
StructProperty.CalcOverhead = (property) => {
|
|
159
162
|
return property.subtype.length + 5 + 4 + 4 + 4 + 4 + 1;
|
|
160
|
-
}
|
|
161
|
-
|
|
163
|
+
};
|
|
164
|
+
StructProperty.Serialize = (writer, property) => {
|
|
162
165
|
writer.writeString(property.subtype);
|
|
163
166
|
GUIDInfo_1.GUIDInfo.write(writer, property.guidInfo);
|
|
164
167
|
writer.writeInt32(property.unk1 ?? 0);
|
|
@@ -166,8 +169,8 @@ class StructProperty extends AbstractBaseProperty_1.AbstractBaseProperty {
|
|
|
166
169
|
writer.writeInt32(property.unk3 ?? 0);
|
|
167
170
|
writer.writeInt32(property.unk4 ?? 0);
|
|
168
171
|
StructProperty.SerializeValue(writer, property.subtype, property.value);
|
|
169
|
-
}
|
|
170
|
-
|
|
172
|
+
};
|
|
173
|
+
StructProperty.SerializeValue = (writer, subtype, value) => {
|
|
171
174
|
switch (subtype) {
|
|
172
175
|
case 'Color':
|
|
173
176
|
value = value;
|
|
@@ -255,7 +258,6 @@ class StructProperty extends AbstractBaseProperty_1.AbstractBaseProperty {
|
|
|
255
258
|
value = value;
|
|
256
259
|
DynamicStructPropertyValue_1.DynamicStructPropertyValue.write(writer, 0, value);
|
|
257
260
|
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
exports.StructProperty = StructProperty;
|
|
261
|
+
};
|
|
262
|
+
})(StructProperty || (exports.StructProperty = StructProperty = {}));
|
|
261
263
|
//# sourceMappingURL=StructProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StructProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":";;;AAEA,iEAAkE;AAClE,6CAA0C;AAC1C,yFAAsF;AACtF,qDAAkD;AAClD,8EAA2E;AAC3E,6CAA0C;AAC1C,6CAA0C;AAC1C,iEAA8D;AAiDvD,MAAM,gBAAgB,GAAG,CAAC,QAAa,EAA8B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAAjI,QAAA,gBAAgB,oBAAiH;AAE9I,MAAa,cAAe,SAAQ,2CAAoB;IASpD,YAAmB,OAAe,EAAE,SAAiB,gBAAgB,EAAE,QAAgB,CAAC,EAAE,WAAqB,SAAS;QACpH,KAAK,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAD5C,YAAO,GAAP,OAAO,CAAQ;QAP3B,UAAK,GAAkC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAS7D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,MAAsB,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY;QACnF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,SAAU,CAAC,QAAQ,CAAC,CAAC;oBAC9C,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,SAAU,CAAC,UAAU,CAAC,CAAC;oBAC/C,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,SAAU,CAAC,YAAY,CAAC,CAAC;gBAC1D,CAAC;gBACD,MAAM;YAEV,KAAK,UAAU;gBACX,KAAK,GAAG,KAAiC,CAAC;gBAC1C,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACjC,MAAM;YAEV,KAAK,YAAY;gBACb,KAAK,GAAG,KAAe,CAAC;gBACxB,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC1B,MAAM;YAEV,KAAK,UAAU;gBACX,KAAK,GAAG,KAAe,CAAC;gBACxB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBACjC,MAAM;YAGV,KAAK,eAAe;gBAChB,KAAK,GAAG,KAAsB,CAAC;gBAC/B,6BAAa,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACvC,MAAM;YAEV;gBAEI,KAAK,GAAG,KAAmC,CAAC;gBAC5C,uDAA0B,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC;CACJ;AA7TD,wCA6TC","sourcesContent":["import { BinaryReadable } from '../../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../../byte/byte-writer.class';\nimport { CorruptSaveError } from '../../../../error/parser.error';\nimport { col4 } from '../../structs/col4';\nimport { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { FICFrameRange } from '../../structs/mods/FicsItCam/FICFrameRange';\nimport { vec3 } from '../../structs/vec3';\nimport { vec4 } from '../../structs/vec4';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\n\nexport type BasicMultipleStructPropertyValue = {\n values: any;\n};\n\nexport type BasicStructPropertyValue = {\n value: any;\n};\n\nexport type BoxStructPropertyValue = {\n min: vec3;\n max: vec3;\n isValid: boolean;\n};\n\nexport type RailroadTrackPositionStructPropertyValue = {\n root: string;\n instanceName: string;\n offset: number;\n forward: number;\n};\n\nexport type InventoryItemStructPropertyValue = {\n unk1: number;\n itemName: string;\n hasItemState: number;\n itemState?: {\n unk: number;\n pathName: string;\n binarySize: number;\n itemStateRaw: number[];\n };\n};\n\nexport type FICFrameRangeStructPropertyValue = {\n begin: string;\n end: string;\n};\n\nexport type ClientIdentityInfo = {\n offlineId: string;\n accountIds: Record<number, number[]>;\n};\n\nexport type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue |\n InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | ClientIdentityInfo | DynamicStructPropertyValue | col4 | vec3 | vec4 | string;\n\nexport const isStructProperty = (property: any): property is StructProperty => !Array.isArray(property) && property.type === 'StructProperty';\n\nexport class StructProperty extends AbstractBaseProperty {\n\n public value: GENERIC_STRUCT_PROPERTY_VALUE = { values: {} };\n\n public unk1?: number;\n public unk2?: number;\n public unk3?: number;\n public unk4?: number;\n\n constructor(public subtype: string, ueType: string = 'StructProperty', index: number = 0, guidInfo: GUIDInfo = undefined) {\n super({ type: 'StructProperty', ueType, index, guidInfo });\n }\n\n public static Parse(reader: BinaryReadable, ueType: string, index: number, size: number): StructProperty {\n const struct = new StructProperty(\n reader.readString(),\n ueType,\n index,\n GUIDInfo.read(reader)\n );\n\n const unk1 = reader.readInt32();\n if (unk1 !== 0) {\n struct.unk1 = unk1;\n }\n\n const unk2 = reader.readInt32();\n if (unk2 !== 0) {\n struct.unk2 = unk2;\n }\n\n const unk3 = reader.readInt32();\n if (unk3 !== 0) {\n struct.unk3 = unk3;\n }\n\n const unk4 = reader.readInt32();\n if (unk4 !== 0) {\n struct.unk4 = unk4;\n }\n\n const before = reader.getBufferPosition();\n struct.value = StructProperty.ParseValue(reader, struct.subtype, size);\n const readBytes = reader.getBufferPosition() - before;\n if (readBytes !== size) {\n if (size - readBytes === 4) {\n // U8, fine\n reader.skipBytes(size - readBytes);\n } else {\n throw new Error(`possibly corrupt. Read ${readBytes} for StructProperty Content of ${struct.subtype}, but ${size} were indicated.`);\n }\n }\n\n return struct;\n }\n\n public static ParseValue(reader: BinaryReadable, subtype: string, size: number): GENERIC_STRUCT_PROPERTY_VALUE {\n\n let value: GENERIC_STRUCT_PROPERTY_VALUE;\n\n switch (subtype) {\n case 'Color':\n value = col4.ParseBGRA(reader);\n break;\n\n case 'IntPoint':\n value = reader.readInt64().toString();\n break;\n\n case 'LinearColor':\n value = col4.ParseRGBA(reader);\n break;\n\n case 'Vector':\n case 'Rotator':\n case 'Vector2D':\n value = (size === 12) ? vec3.ParseF(reader) : vec3.Parse(reader);\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = (size === 16) ? vec4.ParseF(reader) : vec4.Parse(reader);\n break;\n\n case 'Box':\n value = ((size === 25) ? {\n min: vec3.ParseF(reader),\n max: vec3.ParseF(reader),\n isValid: reader.readByte() >= 1\n } : {\n min: vec3.Parse(reader),\n max: vec3.Parse(reader),\n isValid: reader.readByte() >= 1\n }) satisfies BoxStructPropertyValue;\n break;\n\n case 'RailroadTrackPosition':\n value = {\n root: reader.readString(),\n instanceName: reader.readString(),\n offset: reader.readFloat32(),\n forward: reader.readFloat32()\n };\n break;\n\n case 'TimerHandle':\n value = reader.readString();\n break;\n\n case 'Guid':\n value = reader.readString();\n break;\n\n case 'ClientIdentityInfo':\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 value = {\n offlineId,\n accountIds\n } satisfies ClientIdentityInfo;\n break;\n\n case 'InventoryItem':\n const before = reader.getBufferPosition();\n\n value = {\n unk1: reader.readInt32(),\n itemName: reader.readString(),\n hasItemState: reader.readInt32(), // this indicates whether more properties follow\n } satisfies InventoryItemStructPropertyValue;\n\n if (value.hasItemState >= 1) {\n const stateUnk = reader.readInt32(); // 0\n const statePathName = reader.readString();\n const stateBinarySize = reader.readInt32();\n const itemStateRaw = Array.from(reader.readBytes(stateBinarySize)); // TODO: learn to parse these properties\n\n value.itemState = {\n unk: stateUnk,\n pathName: statePathName,\n binarySize: stateBinarySize,\n itemStateRaw: itemStateRaw\n };\n }\n\n // some have a 0 here. Only applies to ported saves from U8 i think.\n const bytesLeft = size - (reader.getBufferPosition() - before);\n if (bytesLeft === 0 || (bytesLeft === 4 && reader.readInt32() === 0)) {\n // fine\n } else {\n throw new CorruptSaveError(`save may be corrupt. InventoryItem has weird format that was not seen so far and therefore not implemented. Could be that the save is ported from way before U8.`);\n }\n\n break;\n\n case 'FluidBox':\n value = {\n value: reader.readFloat32()\n };\n break;\n\n case 'SlateBrush':\n value = reader.readString();\n break;\n\n case 'DateTime':\n value = reader.readInt64().toString();\n break;\n\n // MODS\n case 'FICFrameRange': // https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n value = FICFrameRange.Parse(reader);\n break;\n\n default:\n //TODO: use buildversion\n value = DynamicStructPropertyValue.read(reader, 0, subtype);\n }\n\n return value;\n }\n\n public static CalcOverhead(property: StructProperty): number {\n return property.subtype.length + 5 + 4 + 4 + 4 + 4 + 1;\n }\n\n public static Serialize(writer: ByteWriter, property: StructProperty): void {\n writer.writeString(property.subtype);\n GUIDInfo.write(writer, property.guidInfo);\n\n writer.writeInt32(property.unk1 ?? 0);\n writer.writeInt32(property.unk2 ?? 0);\n writer.writeInt32(property.unk3 ?? 0);\n writer.writeInt32(property.unk4 ?? 0);\n\n StructProperty.SerializeValue(writer, property.subtype, property.value);\n }\n\n public static SerializeValue(writer: ByteWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE): void {\n\n switch (subtype) {\n case 'Color':\n value = value as col4;\n col4.SerializeBGRA(writer, value);\n break;\n\n case 'IntPoint':\n writer.writeInt64(BigInt(value as string))\n break;\n\n case 'LinearColor':\n value = value as col4;\n col4.SerializeRGBA(writer, value);\n break;\n\n case 'Vector':\n case 'Rotator':\n case 'Vector2D':\n value = value as vec3;\n vec3.Serialize(writer, value);\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = value as vec4;\n vec4.Serialize(writer, value as vec4);\n break;\n\n case 'Box':\n value = value as BoxStructPropertyValue;\n vec3.Serialize(writer, value.min);\n vec3.Serialize(writer, value.max);\n writer.writeByte(value.isValid ? 1 : 0);\n break;\n\n case 'RailroadTrackPosition':\n value = value as RailroadTrackPositionStructPropertyValue;\n writer.writeString(value.root);\n writer.writeString(value.instanceName);\n writer.writeFloat32(value.offset);\n writer.writeFloat32(value.forward);\n break;\n\n case 'TimerHandle':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'Guid':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'ClientIdentityInfo':\n value = value as ClientIdentityInfo;\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 break;\n\n case 'InventoryItem':\n value = value as InventoryItemStructPropertyValue;\n writer.writeInt32(value.unk1);\n writer.writeString(value.itemName);\n writer.writeInt32(value.hasItemState);\n\n if (value.hasItemState >= 1) {\n writer.writeInt32(value.itemState!.unk);\n writer.writeString(value.itemState!.pathName);\n writer.writeInt32(value.itemState!.binarySize);\n writer.writeBytesArray(value.itemState!.itemStateRaw);\n }\n break;\n\n case 'FluidBox':\n value = value as BasicStructPropertyValue;\n writer.writeFloat32(value.value);\n break;\n\n case 'SlateBrush':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'DateTime':\n value = value as string;\n writer.writeInt64(BigInt(value));\n break;\n\n // MODS\n case 'FICFrameRange': // https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n value = value as FICFrameRange;\n FICFrameRange.Serialize(writer, value);\n break;\n\n default:\n //TODO: use buildversion\n value = value as DynamicStructPropertyValue;\n DynamicStructPropertyValue.write(writer, 0, value);\n }\n }\n}\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"StructProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":";;;AAEA,iEAAkE;AAClE,6CAA0C;AAC1C,yFAAsF;AACtF,qDAAkD;AAClD,8EAA2E;AAC3E,6CAA0C;AAC1C,6CAA0C;AAC1C,iEAA8D;AAiDvD,MAAM,gBAAgB,GAAG,CAAC,QAAa,EAA8B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAAjI,QAAA,gBAAgB,oBAAiH;AAY9I,IAAiB,cAAc,CAqT9B;AArTD,WAAiB,cAAc;IAEd,oBAAK,GAAG,CAAC,MAAsB,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAkB,EAAE;QACzG,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEvC,MAAM,MAAM,GAAmB;YAC3B,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,EAAE,MA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AM,CAAC,UAAU,CAAC,KAAK,CAAC,SAAU,CAAC,UAAU,CAAC,CAAC;oBAC/C,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,SAAU,CAAC,YAAY,CAAC,CAAC;gBAC1D,CAAC;gBACD,MAAM;YAEV,KAAK,UAAU;gBACX,KAAK,GAAG,KAAiC,CAAC;gBAC1C,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACjC,MAAM;YAEV,KAAK,YAAY;gBACb,KAAK,GAAG,KAAe,CAAC;gBACxB,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC1B,MAAM;YAEV,KAAK,UAAU;gBACX,KAAK,GAAG,KAAe,CAAC;gBACxB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBACjC,MAAM;YAGV,KAAK,eAAe;gBAChB,KAAK,GAAG,KAAsB,CAAC;gBAC/B,6BAAa,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACvC,MAAM;YAEV;gBAEI,KAAK,GAAG,KAAmC,CAAC;gBAC5C,uDAA0B,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EArTgB,cAAc,8BAAd,cAAc,QAqT9B","sourcesContent":["import { BinaryReadable } from '../../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../../byte/byte-writer.class';\nimport { CorruptSaveError } from '../../../../error/parser.error';\nimport { col4 } from '../../structs/col4';\nimport { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { FICFrameRange } from '../../structs/mods/FicsItCam/FICFrameRange';\nimport { vec3 } from '../../structs/vec3';\nimport { vec4 } from '../../structs/vec4';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\n\nexport type BasicMultipleStructPropertyValue = {\n values: any;\n};\n\nexport type BasicStructPropertyValue = {\n value: any;\n};\n\nexport type BoxStructPropertyValue = {\n min: vec3;\n max: vec3;\n isValid: boolean;\n};\n\nexport type RailroadTrackPositionStructPropertyValue = {\n root: string;\n instanceName: string;\n offset: number;\n forward: number;\n};\n\nexport type InventoryItemStructPropertyValue = {\n unk1: number;\n itemName: string;\n hasItemState: number;\n itemState?: {\n unk: number;\n pathName: string;\n binarySize: number;\n itemStateRaw: number[];\n };\n};\n\nexport type FICFrameRangeStructPropertyValue = {\n begin: string;\n end: string;\n};\n\nexport type ClientIdentityInfo = {\n offlineId: string;\n accountIds: Record<number, number[]>;\n};\n\nexport type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue |\n InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | ClientIdentityInfo | DynamicStructPropertyValue | col4 | vec3 | vec4 | string;\n\nexport const isStructProperty = (property: any): property is StructProperty => !Array.isArray(property) && property.type === 'StructProperty';\n\nexport type StructProperty = AbstractBaseProperty & {\n type: 'StructProperty';\n subtype: string;\n value: GENERIC_STRUCT_PROPERTY_VALUE;\n unk1?: number;\n unk2?: number;\n unk3?: number;\n unk4?: number;\n};\n\nexport namespace StructProperty {\n\n export const Parse = (reader: BinaryReadable, ueType: string, index: number, size: number): StructProperty => {\n const subtype = reader.readString();\n const guidInfo = GUIDInfo.read(reader);\n\n const struct: StructProperty = {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'StructProperty',\n value: { values: [] },\n subtype\n };\n\n const unk1 = reader.readInt32();\n if (unk1 !== 0) {\n struct.unk1 = unk1;\n }\n\n const unk2 = reader.readInt32();\n if (unk2 !== 0) {\n struct.unk2 = unk2;\n }\n\n const unk3 = reader.readInt32();\n if (unk3 !== 0) {\n struct.unk3 = unk3;\n }\n\n const unk4 = reader.readInt32();\n if (unk4 !== 0) {\n struct.unk4 = unk4;\n }\n\n const before = reader.getBufferPosition();\n struct.value = ParseValue(reader, struct.subtype, size);\n const readBytes = reader.getBufferPosition() - before;\n if (readBytes !== size) {\n if (size - readBytes === 4) {\n // U8, fine\n reader.skipBytes(size - readBytes);\n } else {\n throw new Error(`possibly corrupt. Read ${readBytes} for StructProperty Content of ${struct.subtype}, but ${size} were indicated.`);\n }\n }\n\n return struct;\n }\n\n export const ParseValue = (reader: BinaryReadable, subtype: string, size: number): GENERIC_STRUCT_PROPERTY_VALUE => {\n\n let value: GENERIC_STRUCT_PROPERTY_VALUE;\n\n switch (subtype) {\n case 'Color':\n value = col4.ParseBGRA(reader);\n break;\n\n case 'IntPoint':\n value = reader.readInt64().toString();\n break;\n\n case 'LinearColor':\n value = col4.ParseRGBA(reader);\n break;\n\n case 'Vector':\n case 'Rotator':\n case 'Vector2D':\n value = (size === 12) ? vec3.ParseF(reader) : vec3.Parse(reader);\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = (size === 16) ? vec4.ParseF(reader) : vec4.Parse(reader);\n break;\n\n case 'Box':\n value = ((size === 25) ? {\n min: vec3.ParseF(reader),\n max: vec3.ParseF(reader),\n isValid: reader.readByte() >= 1\n } : {\n min: vec3.Parse(reader),\n max: vec3.Parse(reader),\n isValid: reader.readByte() >= 1\n }) satisfies BoxStructPropertyValue;\n break;\n\n case 'RailroadTrackPosition':\n value = {\n root: reader.readString(),\n instanceName: reader.readString(),\n offset: reader.readFloat32(),\n forward: reader.readFloat32()\n };\n break;\n\n case 'TimerHandle':\n value = reader.readString();\n break;\n\n case 'Guid':\n value = reader.readString();\n break;\n\n case 'ClientIdentityInfo':\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 value = {\n offlineId,\n accountIds\n } satisfies ClientIdentityInfo;\n break;\n\n case 'InventoryItem':\n const before = reader.getBufferPosition();\n\n value = {\n unk1: reader.readInt32(),\n itemName: reader.readString(),\n hasItemState: reader.readInt32(), // this indicates whether more properties follow\n } satisfies InventoryItemStructPropertyValue;\n\n if (value.hasItemState >= 1) {\n const stateUnk = reader.readInt32(); // 0\n const statePathName = reader.readString();\n const stateBinarySize = reader.readInt32();\n const itemStateRaw = Array.from(reader.readBytes(stateBinarySize)); // TODO: learn to parse these properties\n\n value.itemState = {\n unk: stateUnk,\n pathName: statePathName,\n binarySize: stateBinarySize,\n itemStateRaw: itemStateRaw\n };\n }\n\n // some have a 0 here. Only applies to ported saves from U8 i think.\n const bytesLeft = size - (reader.getBufferPosition() - before);\n if (bytesLeft === 0 || (bytesLeft === 4 && reader.readInt32() === 0)) {\n // fine\n } else {\n throw new CorruptSaveError(`save may be corrupt. InventoryItem has weird format that was not seen so far and therefore not implemented. Could be that the save is ported from way before U8.`);\n }\n\n break;\n\n case 'FluidBox':\n value = {\n value: reader.readFloat32()\n };\n break;\n\n case 'SlateBrush':\n value = reader.readString();\n break;\n\n case 'DateTime':\n value = reader.readInt64().toString();\n break;\n\n // MODS\n case 'FICFrameRange': // https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n value = FICFrameRange.Parse(reader);\n break;\n\n default:\n //TODO: use buildversion\n value = DynamicStructPropertyValue.read(reader, 0, subtype);\n }\n\n return value;\n }\n\n export const CalcOverhead = (property: StructProperty): number => {\n return property.subtype.length + 5 + 4 + 4 + 4 + 4 + 1;\n }\n\n export const Serialize = (writer: ByteWriter, property: StructProperty): void => {\n writer.writeString(property.subtype);\n GUIDInfo.write(writer, property.guidInfo);\n\n writer.writeInt32(property.unk1 ?? 0);\n writer.writeInt32(property.unk2 ?? 0);\n writer.writeInt32(property.unk3 ?? 0);\n writer.writeInt32(property.unk4 ?? 0);\n\n StructProperty.SerializeValue(writer, property.subtype, property.value);\n }\n\n export const SerializeValue = (writer: ByteWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE): void => {\n\n switch (subtype) {\n case 'Color':\n value = value as col4;\n col4.SerializeBGRA(writer, value);\n break;\n\n case 'IntPoint':\n writer.writeInt64(BigInt(value as string))\n break;\n\n case 'LinearColor':\n value = value as col4;\n col4.SerializeRGBA(writer, value);\n break;\n\n case 'Vector':\n case 'Rotator':\n case 'Vector2D':\n value = value as vec3;\n vec3.Serialize(writer, value);\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = value as vec4;\n vec4.Serialize(writer, value as vec4);\n break;\n\n case 'Box':\n value = value as BoxStructPropertyValue;\n vec3.Serialize(writer, value.min);\n vec3.Serialize(writer, value.max);\n writer.writeByte(value.isValid ? 1 : 0);\n break;\n\n case 'RailroadTrackPosition':\n value = value as RailroadTrackPositionStructPropertyValue;\n writer.writeString(value.root);\n writer.writeString(value.instanceName);\n writer.writeFloat32(value.offset);\n writer.writeFloat32(value.forward);\n break;\n\n case 'TimerHandle':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'Guid':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'ClientIdentityInfo':\n value = value as ClientIdentityInfo;\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 break;\n\n case 'InventoryItem':\n value = value as InventoryItemStructPropertyValue;\n writer.writeInt32(value.unk1);\n writer.writeString(value.itemName);\n writer.writeInt32(value.hasItemState);\n\n if (value.hasItemState >= 1) {\n writer.writeInt32(value.itemState!.unk);\n writer.writeString(value.itemState!.pathName);\n writer.writeInt32(value.itemState!.binarySize);\n writer.writeBytesArray(value.itemState!.itemStateRaw);\n }\n break;\n\n case 'FluidBox':\n value = value as BasicStructPropertyValue;\n writer.writeFloat32(value.value);\n break;\n\n case 'SlateBrush':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'DateTime':\n value = value as string;\n writer.writeInt64(BigInt(value));\n break;\n\n // MODS\n case 'FICFrameRange': // https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n value = value as FICFrameRange;\n FICFrameRange.Serialize(writer, value);\n break;\n\n default:\n //TODO: use buildversion\n value = value as DynamicStructPropertyValue;\n DynamicStructPropertyValue.write(writer, 0, value);\n }\n }\n}\n\n\n"]}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { BinaryReadable } from '../../../../byte/binary-readable.interface';
|
|
2
2
|
import { ByteWriter } from '../../../../byte/byte-writer.class';
|
|
3
|
-
import { GUIDInfo } from '../../structs/GUIDInfo';
|
|
4
3
|
import { AbstractBaseProperty } from './AbstractBaseProperty';
|
|
5
4
|
export declare const isTextProperty: (property: any) => property is TextProperty;
|
|
6
|
-
export
|
|
5
|
+
export type TextProperty = AbstractBaseProperty & {
|
|
6
|
+
type: 'TextProperty';
|
|
7
7
|
value: TextPropertyValue;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
};
|
|
9
|
+
export declare namespace TextProperty {
|
|
10
|
+
const Parse: (reader: BinaryReadable, ueType: string, index?: number) => TextProperty;
|
|
11
|
+
const ReadValue: (reader: BinaryReadable) => TextPropertyValue;
|
|
12
|
+
const CalcOverhead: (property: TextProperty) => number;
|
|
13
|
+
const Serialize: (writer: ByteWriter, property: TextProperty) => void;
|
|
14
|
+
const SerializeValue: (writer: ByteWriter, value: TextPropertyValue) => void;
|
|
14
15
|
}
|
|
15
16
|
export type TextPropertyValue = {
|
|
16
17
|
flags: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/TextProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"TextProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/TextProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,cAAc,aAAc,GAAG,KAAG,QAAQ,IAAI,YAA4E,CAAC;AAExI,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAC9C,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,yBAAiB,YAAY,CAAC;IAEnB,MAAM,KAAK,WAAY,cAAc,UAAU,MAAM,UAAS,MAAM,KAAO,YASjF,CAAA;IAEM,MAAM,SAAS,WAAY,cAAc,KAAG,iBA6DlD,CAAA;IAEM,MAAM,YAAY,aAAc,YAAY,KAAG,MAErD,CAAA;IAEM,MAAM,SAAS,WAAY,UAAU,YAAY,YAAY,KAAG,IAGtE,CAAA;IAEM,MAAM,cAAc,WAAY,UAAU,SAAS,iBAAiB,KAAG,IAsD7E,CAAA;CACJ;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAGpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,iBAAiB,CAAC;KAAE,EAAE,CAAC;IAGrF,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC"}
|
|
@@ -5,17 +5,18 @@ const GUIDInfo_1 = require("../../structs/GUIDInfo");
|
|
|
5
5
|
const AbstractBaseProperty_1 = require("./AbstractBaseProperty");
|
|
6
6
|
const isTextProperty = (property) => !Array.isArray(property) && property.type === 'TextProperty';
|
|
7
7
|
exports.isTextProperty = isTextProperty;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.value = value;
|
|
12
|
-
}
|
|
13
|
-
static Parse(reader, ueType, index = 0) {
|
|
8
|
+
var TextProperty;
|
|
9
|
+
(function (TextProperty) {
|
|
10
|
+
TextProperty.Parse = (reader, ueType, index = 0) => {
|
|
14
11
|
const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
|
|
15
12
|
const value = TextProperty.ReadValue(reader);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
return {
|
|
14
|
+
...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),
|
|
15
|
+
type: 'TextProperty',
|
|
16
|
+
value,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
TextProperty.ReadValue = (reader) => {
|
|
19
20
|
const prop = {
|
|
20
21
|
flags: reader.readInt32(),
|
|
21
22
|
historyType: reader.readByte()
|
|
@@ -59,15 +60,15 @@ class TextProperty extends AbstractBaseProperty_1.AbstractBaseProperty {
|
|
|
59
60
|
throw new Error('Unimplemented historyType `' + prop.historyType);
|
|
60
61
|
}
|
|
61
62
|
return prop;
|
|
62
|
-
}
|
|
63
|
-
|
|
63
|
+
};
|
|
64
|
+
TextProperty.CalcOverhead = (property) => {
|
|
64
65
|
return 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
66
|
+
};
|
|
67
|
+
TextProperty.Serialize = (writer, property) => {
|
|
67
68
|
GUIDInfo_1.GUIDInfo.write(writer, property.guidInfo);
|
|
68
69
|
TextProperty.SerializeValue(writer, property.value);
|
|
69
|
-
}
|
|
70
|
-
|
|
70
|
+
};
|
|
71
|
+
TextProperty.SerializeValue = (writer, value) => {
|
|
71
72
|
writer.writeInt32(value.flags);
|
|
72
73
|
writer.writeByte(value.historyType);
|
|
73
74
|
switch (value.historyType) {
|
|
@@ -106,7 +107,6 @@ class TextProperty extends AbstractBaseProperty_1.AbstractBaseProperty {
|
|
|
106
107
|
default:
|
|
107
108
|
throw new Error('Unimplemented historyType `' + value.historyType);
|
|
108
109
|
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.TextProperty = TextProperty;
|
|
110
|
+
};
|
|
111
|
+
})(TextProperty || (exports.TextProperty = TextProperty = {}));
|
|
112
112
|
//# sourceMappingURL=TextProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/TextProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAEvD,MAAM,cAAc,GAAG,CAAC,QAAa,EAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC;AAA3H,QAAA,cAAc,kBAA6G;AAExI,MAAa,YAAa,SAAQ,2CAAoB;IAElD,YAAmB,KAAwB,EAAE,SAAiB,cAAc,EAAE,WAAqB,SAAS,EAAE,QAAgB,CAAC;QAC3H,KAAK,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;QAD1C,UAAK,GAAL,KAAK,CAAmB;IAE3C,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAE3D,IAAI,KAAK,CAAC,yBAAyB,EAAE,CAAC;oBAClC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,KAAM,CAAC,CAAC;gBACrC,CAAC;gBACD,MAAM;YACV;gBACI,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;QAC3E,CAAC;IACL,CAAC;CACJ;AA3ID,oCA2IC","sourcesContent":["import { BinaryReadable } from '../../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../../byte/byte-writer.class';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\nexport const isTextProperty = (property: any): property is TextProperty => !Array.isArray(property) && property.type === 'TextProperty';\n\nexport class TextProperty extends AbstractBaseProperty {\n\n constructor(public value: TextPropertyValue, ueType: string = 'TextProperty', guidInfo: GUIDInfo = undefined, index: number = 0) {\n super({ type: 'TextProperty', ueType, guidInfo, index });\n }\n\n public static Parse(reader: BinaryReadable, ueType: string, index: number = 0): TextProperty {\n const guidInfo = GUIDInfo.read(reader);\n const value = TextProperty.ReadValue(reader);\n return new TextProperty(value, ueType, guidInfo, index);\n }\n\n public static ReadValue(reader: BinaryReadable): TextPropertyValue {\n const prop: TextPropertyValue = {\n flags: reader.readInt32(),\n historyType: reader.readByte()\n };\n\n switch (prop.historyType) {\n // HISTORYTYPE_BASE\n case 0:\n prop.namespace = reader.readString();\n prop.key = reader.readString();\n prop.value = reader.readString();\n break;\n // HISTORYTYPE_NAMEDFORMAT\n case 1:\n // HISTORYTYPE_ARGUMENTFORMAT\n case 3:\n prop.sourceFmt = TextProperty.ReadValue(reader);\n\n const argumentsCount = reader.readInt32();\n prop.arguments = [];\n\n for (let i = 0; i < argumentsCount; i++) {\n let currentArgumentsData: any = {};\n currentArgumentsData.name = reader.readString();\n currentArgumentsData.valueType = reader.readByte();\n\n switch (currentArgumentsData.valueType) {\n case 4:\n currentArgumentsData.argumentValue = TextProperty.ReadValue(reader);\n break;\n default:\n\n throw new Error('Unimplemented FormatArgumentType `' + currentArgumentsData.valueType);\n }\n\n prop.arguments.push(currentArgumentsData);\n }\n break;\n // see https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/TextHistory.cpp#L2268\n // HISTORYTYPE_TRANSFORM\n case 10:\n prop.sourceText = TextProperty.ReadValue(reader);\n prop.transformType = reader.readByte();\n break;\n // HISTORYTYPE_NONE\n case 255:\n // See: https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L894\n\n prop.hasCultureInvariantString = reader.readInt32() === 1;\n\n if (prop.hasCultureInvariantString) {\n prop.value = reader.readString();\n }\n break;\n\n default:\n throw new Error('Unimplemented historyType `' + prop.historyType);\n }\n\n return prop;\n }\n\n public static CalcOverhead(property: TextProperty): number {\n return 1;\n }\n\n public static Serialize(writer: ByteWriter, property: TextProperty): void {\n GUIDInfo.write(writer, property.guidInfo);\n TextProperty.SerializeValue(writer, property.value);\n }\n\n public static SerializeValue(writer: ByteWriter, value: TextPropertyValue): void {\n writer.writeInt32(value.flags);\n writer.writeByte(value.historyType);\n\n\n switch (value.historyType) {\n // HISTORYTYPE_BASE\n case 0:\n writer.writeString(value.namespace!);\n writer.writeString(value.key!);\n writer.writeString(value.value!);\n break;\n // HISTORYTYPE_NAMEDFORMAT\n case 1:\n // HISTORYTYPE_ARGUMENTFORMAT\n case 3:\n TextProperty.SerializeValue(writer, value.sourceFmt!);\n\n writer.writeInt32(value.arguments!.length);\n\n for (const arg of value.arguments!) {\n let currentArgumentsData: any = {};\n writer.writeString(arg.name);\n writer.writeByte(arg.valueType);\n\n switch (arg.valueType) {\n case 4:\n TextProperty.SerializeValue(writer, arg.argumentValue!);\n break;\n default:\n\n throw new Error('Unimplemented FormatArgumentType `' + currentArgumentsData.valueType);\n }\n }\n break;\n // see https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/TextHistory.cpp#L2268\n // HISTORYTYPE_TRANSFORM\n case 10:\n TextProperty.SerializeValue(writer, value.sourceText!);\n writer.writeByte(value.transformType!);\n break;\n // HISTORYTYPE_NONE\n case 255:\n // See: https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L894\n\n writer.writeInt32(value.hasCultureInvariantString ? 1 : 0);\n\n if (value.hasCultureInvariantString) {\n writer.writeString(value.value!);\n }\n break;\n default:\n throw new Error('Unimplemented historyType `' + value.historyType);\n }\n }\n}\nexport type TextPropertyValue = {\n flags: number;\n historyType: number;\n\n // flag 0\n namespace?: string;\n key?: string;\n value?: string;\n\n // flag 1 + 3\n sourceFmt?: TextPropertyValue;\n arguments?: { name: string; valueType: number; argumentValue: TextPropertyValue; }[];\n\n // flag 10\n sourceText?: TextPropertyValue;\n transformType?: number;\n\n // flag 255, reusing value\n hasCultureInvariantString?: boolean;\n};\n\n"]}
|
|
1
|
+
{"version":3,"file":"TextProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/TextProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAEvD,MAAM,cAAc,GAAG,CAAC,QAAa,EAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC;AAA3H,QAAA,cAAc,kBAA6G;AAOxI,IAAiB,YAAY,CA4I5B;AA5ID,WAAiB,YAAY;IAEZ,kBAAK,GAAG,CAAC,MAAsB,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAgB,EAAE;QAC7F,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE7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BAAyB,EAAE,CAAC;oBAClC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,KAAM,CAAC,CAAC;gBACrC,CAAC;gBACD,MAAM;YACV;gBACI,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;QAC3E,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA5IgB,YAAY,4BAAZ,YAAY,QA4I5B","sourcesContent":["import { BinaryReadable } from '../../../../byte/binary-readable.interface';\nimport { ByteWriter } from '../../../../byte/byte-writer.class';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\nexport const isTextProperty = (property: any): property is TextProperty => !Array.isArray(property) && property.type === 'TextProperty';\n\nexport type TextProperty = AbstractBaseProperty & {\n type: 'TextProperty';\n value: TextPropertyValue;\n};\n\nexport namespace TextProperty {\n\n export const Parse = (reader: BinaryReadable, ueType: string, index: number = 0): TextProperty => {\n const guidInfo = GUIDInfo.read(reader);\n const value = TextProperty.ReadValue(reader);\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'TextProperty',\n value,\n } satisfies TextProperty;\n }\n\n export const ReadValue = (reader: BinaryReadable): TextPropertyValue => {\n const prop: TextPropertyValue = {\n flags: reader.readInt32(),\n historyType: reader.readByte()\n };\n\n switch (prop.historyType) {\n // HISTORYTYPE_BASE\n case 0:\n prop.namespace = reader.readString();\n prop.key = reader.readString();\n prop.value = reader.readString();\n break;\n // HISTORYTYPE_NAMEDFORMAT\n case 1:\n // HISTORYTYPE_ARGUMENTFORMAT\n case 3:\n prop.sourceFmt = ReadValue(reader);\n\n const argumentsCount = reader.readInt32();\n prop.arguments = [];\n\n for (let i = 0; i < argumentsCount; i++) {\n let currentArgumentsData: any = {};\n currentArgumentsData.name = reader.readString();\n currentArgumentsData.valueType = reader.readByte();\n\n switch (currentArgumentsData.valueType) {\n case 4:\n currentArgumentsData.argumentValue = ReadValue(reader);\n break;\n default:\n\n throw new Error('Unimplemented FormatArgumentType `' + currentArgumentsData.valueType);\n }\n\n prop.arguments.push(currentArgumentsData);\n }\n break;\n // see https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/TextHistory.cpp#L2268\n // HISTORYTYPE_TRANSFORM\n case 10:\n prop.sourceText = ReadValue(reader);\n prop.transformType = reader.readByte();\n break;\n // HISTORYTYPE_NONE\n case 255:\n // See: https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L894\n\n prop.hasCultureInvariantString = reader.readInt32() === 1;\n\n if (prop.hasCultureInvariantString) {\n prop.value = reader.readString();\n }\n break;\n\n default:\n throw new Error('Unimplemented historyType `' + prop.historyType);\n }\n\n return prop;\n }\n\n export const CalcOverhead = (property: TextProperty): number => {\n return 1;\n }\n\n export const Serialize = (writer: ByteWriter, property: TextProperty): void => {\n GUIDInfo.write(writer, property.guidInfo);\n SerializeValue(writer, property.value);\n }\n\n export const SerializeValue = (writer: ByteWriter, value: TextPropertyValue): void => {\n writer.writeInt32(value.flags);\n writer.writeByte(value.historyType);\n\n\n switch (value.historyType) {\n // HISTORYTYPE_BASE\n case 0:\n writer.writeString(value.namespace!);\n writer.writeString(value.key!);\n writer.writeString(value.value!);\n break;\n // HISTORYTYPE_NAMEDFORMAT\n case 1:\n // HISTORYTYPE_ARGUMENTFORMAT\n case 3:\n SerializeValue(writer, value.sourceFmt!);\n\n writer.writeInt32(value.arguments!.length);\n\n for (const arg of value.arguments!) {\n let currentArgumentsData: any = {};\n writer.writeString(arg.name);\n writer.writeByte(arg.valueType);\n\n switch (arg.valueType) {\n case 4:\n SerializeValue(writer, arg.argumentValue!);\n break;\n default:\n\n throw new Error('Unimplemented FormatArgumentType `' + currentArgumentsData.valueType);\n }\n }\n break;\n // see https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/TextHistory.cpp#L2268\n // HISTORYTYPE_TRANSFORM\n case 10:\n SerializeValue(writer, value.sourceText!);\n writer.writeByte(value.transformType!);\n break;\n // HISTORYTYPE_NONE\n case 255:\n // See: https://github.com/EpicGames/UnrealEngine/blob/4.25/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L894\n\n writer.writeInt32(value.hasCultureInvariantString ? 1 : 0);\n\n if (value.hasCultureInvariantString) {\n writer.writeString(value.value!);\n }\n break;\n default:\n throw new Error('Unimplemented historyType `' + value.historyType);\n }\n }\n}\n\nexport type TextPropertyValue = {\n flags: number;\n historyType: number;\n\n // flag 0\n namespace?: string;\n key?: string;\n value?: string;\n\n // flag 1 + 3\n sourceFmt?: TextPropertyValue;\n arguments?: { name: string; valueType: number; argumentValue: TextPropertyValue; }[];\n\n // flag 10\n sourceText?: TextPropertyValue;\n transformType?: number;\n\n // flag 255, reusing value\n hasCultureInvariantString?: boolean;\n};\n\n"]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { BinaryReadable } from '../../../../byte/binary-readable.interface';
|
|
2
2
|
import { ByteWriter } from '../../../../byte/byte-writer.class';
|
|
3
|
-
import { GUIDInfo } from '../../structs/GUIDInfo';
|
|
4
3
|
import { AbstractBaseProperty } from './AbstractBaseProperty';
|
|
5
4
|
export declare const isUint32Property: (property: any) => property is Uint32Property;
|
|
6
|
-
export
|
|
5
|
+
export type Uint32Property = AbstractBaseProperty & {
|
|
6
|
+
type: 'Uint32Property';
|
|
7
7
|
value: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
};
|
|
9
|
+
export declare namespace Uint32Property {
|
|
10
|
+
const Parse: (reader: BinaryReadable, ueType: string, index?: number) => Uint32Property;
|
|
11
|
+
const ReadValue: (reader: BinaryReadable) => number;
|
|
12
|
+
const CalcOverhead: (property: Uint32Property) => number;
|
|
13
|
+
const Serialize: (writer: ByteWriter, property: Uint32Property) => void;
|
|
14
|
+
const SerializeValue: (writer: ByteWriter, value: number) => void;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Uint32Property.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Uint32Property.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/Uint32Property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"Uint32Property.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/Uint32Property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,gBAAgB,aAAc,GAAG,KAAG,QAAQ,IAAI,cAAgF,CAAC;AAE9I,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG;IAChD,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,cAAc,CAAC;IAErB,MAAM,KAAK,WAAY,cAAc,UAAU,MAAM,UAAS,MAAM,KAAO,cASjF,CAAA;IAGM,MAAM,SAAS,WAAY,cAAc,KAAG,MAElD,CAAA;IAEM,MAAM,YAAY,aAAc,cAAc,KAAG,MAEvD,CAAA;IAEM,MAAM,SAAS,WAAY,UAAU,YAAY,cAAc,KAAG,IAGxE,CAAA;IAEM,MAAM,cAAc,WAAY,UAAU,SAAS,MAAM,KAAG,IAElE,CAAA;CACJ"}
|
|
@@ -5,29 +5,29 @@ const GUIDInfo_1 = require("../../structs/GUIDInfo");
|
|
|
5
5
|
const AbstractBaseProperty_1 = require("./AbstractBaseProperty");
|
|
6
6
|
const isUint32Property = (property) => !Array.isArray(property) && property.type === 'UInt32Property';
|
|
7
7
|
exports.isUint32Property = isUint32Property;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.value = value;
|
|
12
|
-
}
|
|
13
|
-
static Parse(reader, ueType, index = 0) {
|
|
8
|
+
var Uint32Property;
|
|
9
|
+
(function (Uint32Property) {
|
|
10
|
+
Uint32Property.Parse = (reader, ueType, index = 0) => {
|
|
14
11
|
const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
|
|
15
12
|
const value = Uint32Property.ReadValue(reader);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
return {
|
|
14
|
+
...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),
|
|
15
|
+
type: 'Uint32Property',
|
|
16
|
+
value,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
Uint32Property.ReadValue = (reader) => {
|
|
19
20
|
return reader.readUint32();
|
|
20
|
-
}
|
|
21
|
-
|
|
21
|
+
};
|
|
22
|
+
Uint32Property.CalcOverhead = (property) => {
|
|
22
23
|
return 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
24
|
+
};
|
|
25
|
+
Uint32Property.Serialize = (writer, property) => {
|
|
25
26
|
GUIDInfo_1.GUIDInfo.write(writer, property.guidInfo);
|
|
26
27
|
Uint32Property.SerializeValue(writer, property.value);
|
|
27
|
-
}
|
|
28
|
-
|
|
28
|
+
};
|
|
29
|
+
Uint32Property.SerializeValue = (writer, value) => {
|
|
29
30
|
writer.writeUint32(value);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.Uint32Property = Uint32Property;
|
|
31
|
+
};
|
|
32
|
+
})(Uint32Property || (exports.Uint32Property = Uint32Property = {}));
|
|
33
33
|
//# sourceMappingURL=Uint32Property.js.map
|