@etothepii/satisfactory-file-parser
Advanced tools
Comparing version 0.4.22 to 0.5.1
@@ -7,3 +7,2 @@ export * from './parser/satisfactory/blueprint/blueprint.types'; | ||
export * from './parser/satisfactory/types/objects/SaveEntity'; | ||
export * from './parser/satisfactory/types/property/DataFields'; | ||
export * from './parser/satisfactory/types/property/generic/ArrayProperty'; | ||
@@ -28,7 +27,11 @@ export * from './parser/satisfactory/types/property/generic/BasicProperty'; | ||
export * from './parser/satisfactory/types/property/generic/Uint8Property'; | ||
export * from './parser/satisfactory/types/property/special/SpecialAnyProperty'; | ||
export * from './parser/satisfactory/types/property/PropertiesList'; | ||
export * from './parser/satisfactory/types/property/special/SpecialAnyProperties'; | ||
export * from './parser/satisfactory/types/property/special/SpecialProperties'; | ||
export * from './parser/satisfactory/types/structs/col4'; | ||
export * from './parser/satisfactory/types/structs/DynamicStructPropertyValue'; | ||
export * from './parser/satisfactory/types/structs/GUID'; | ||
export * from './parser/satisfactory/types/structs/GUIDInfo'; | ||
export * from './parser/satisfactory/types/structs/MD5Hash'; | ||
export * from './parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange'; | ||
export * from './parser/satisfactory/types/structs/ObjectReference'; | ||
@@ -35,0 +38,0 @@ export * from './parser/satisfactory/types/structs/SoftObjectReference'; |
@@ -24,3 +24,2 @@ "use strict"; | ||
__exportStar(require("./parser/satisfactory/types/objects/SaveEntity"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/DataFields"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/generic/ArrayProperty"), exports); | ||
@@ -45,7 +44,11 @@ __exportStar(require("./parser/satisfactory/types/property/generic/BasicProperty"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/generic/Uint8Property"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/special/SpecialAnyProperty"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/PropertiesList"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/special/SpecialAnyProperties"), exports); | ||
__exportStar(require("./parser/satisfactory/types/property/special/SpecialProperties"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/col4"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/DynamicStructPropertyValue"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/GUID"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/GUIDInfo"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/MD5Hash"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange"), exports); | ||
__exportStar(require("./parser/satisfactory/types/structs/ObjectReference"), exports); | ||
@@ -52,0 +55,0 @@ __exportStar(require("./parser/satisfactory/types/structs/SoftObjectReference"), exports); |
@@ -37,3 +37,3 @@ "use strict"; | ||
static ParseData(entity, length, reader, buildVersion, typePath) { | ||
const afterSizeIndicator = reader.getBufferPosition(); | ||
const start = reader.getBufferPosition(); | ||
entity.parentObjectRoot = reader.readString(); | ||
@@ -46,3 +46,3 @@ entity.parentObjectName = reader.readString(); | ||
} | ||
const remainingSize = length - (reader.getBufferPosition() - afterSizeIndicator); | ||
const remainingSize = length - (reader.getBufferPosition() - start); | ||
return SaveObject_1.SaveObject.ParseData(entity, remainingSize, reader, buildVersion, typePath); | ||
@@ -60,5 +60,5 @@ } | ||
writer.writeInt32(entity.components.length); | ||
for (const com of entity.components) { | ||
writer.writeString(com.levelName); | ||
writer.writeString(com.pathName); | ||
for (const component of entity.components) { | ||
writer.writeString(component.levelName); | ||
writer.writeString(component.pathName); | ||
} | ||
@@ -65,0 +65,0 @@ SaveObject_1.SaveObject.SerializeData(writer, entity, buildVersion); |
import { BinaryReadable } from "../../../byte/binary-readable.interface"; | ||
import { ByteWriter } from "../../../byte/byte-writer.class"; | ||
import { PropertiesMap } from "../property/generic/BasicProperty"; | ||
import { SpecialAnyProperty } from '../property/special/SpecialAnyProperty'; | ||
import { SpecialAnyProperties } from '../property/special/SpecialAnyProperties'; | ||
export interface SaveObjectHeader { | ||
@@ -15,3 +15,3 @@ typePath: string; | ||
properties: PropertiesMap; | ||
specialProperties: SpecialAnyProperty; | ||
specialProperties: SpecialAnyProperties; | ||
trailingData: number[]; | ||
@@ -18,0 +18,0 @@ objectVersion: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SaveObject = void 0; | ||
const DataFields_1 = require("../property/DataFields"); | ||
const parser_error_1 = require("../../../error/parser.error"); | ||
const PropertiesList_1 = require("../property/PropertiesList"); | ||
const SpecialProperties_1 = require("../property/special/SpecialProperties"); | ||
class SaveObject { | ||
@@ -27,8 +29,22 @@ constructor(typePath, rootObject, instanceName) { | ||
static ParseData(obj, length, reader, buildVersion, typePath) { | ||
DataFields_1.DataFields.ParseProperties(obj, length, reader, buildVersion, typePath); | ||
const start = reader.getBufferPosition(); | ||
PropertiesList_1.PropertiesList.ParseList(obj, length, reader, buildVersion, typePath); | ||
reader.readInt32(); | ||
let remainingSize = length - (reader.getBufferPosition() - start); | ||
obj.specialProperties = SpecialProperties_1.SpecialProperties.ParseClassSpecificSpecialProperties(reader, typePath, remainingSize); | ||
remainingSize = length - (reader.getBufferPosition() - start); | ||
if (remainingSize > 0) { | ||
obj.trailingData = Array.from(reader.readBytes(remainingSize)); | ||
} | ||
else if (remainingSize < 0) { | ||
throw new parser_error_1.ParserError('ParserError', `Unexpected. Read more bytes than are indicated for entity ${obj.instanceName}. bytes left to read is ${remainingSize}`); | ||
} | ||
} | ||
static SerializeData(writer, obj, buildVersion) { | ||
DataFields_1.DataFields.Serialize(obj, writer, buildVersion, obj.typePath); | ||
PropertiesList_1.PropertiesList.SerializeList(obj, writer, buildVersion, obj.typePath); | ||
writer.writeInt32(0); | ||
SpecialProperties_1.SpecialProperties.SerializeClassSpecificSpecialProperties(writer, obj.typePath, obj.specialProperties); | ||
writer.writeBytesArray(obj.trailingData); | ||
} | ||
} | ||
exports.SaveObject = SaveObject; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ArrayProperty = exports.isArrayProperty = void 0; | ||
const SoftObjectReference_1 = require("../../structs/SoftObjectReference"); | ||
const BasicProperty_1 = require("./BasicProperty"); | ||
@@ -14,2 +13,3 @@ const BoolProperty_1 = require("./BoolProperty"); | ||
const ObjectProperty_1 = require("./ObjectProperty"); | ||
const SoftObjectProperty_1 = require("./SoftObjectProperty"); | ||
const StrProperty_1 = require("./StrProperty"); | ||
@@ -58,3 +58,3 @@ const StructProperty_1 = require("./StructProperty"); | ||
case "TextProperty": | ||
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => TextProperty_1.TextProperty.ParseValue(reader)), ueType, index); | ||
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => TextProperty_1.TextProperty.ReadValue(reader)), ueType, index); | ||
break; | ||
@@ -66,3 +66,3 @@ case "InterfaceProperty": | ||
case "SoftObjectProperty": | ||
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => SoftObjectReference_1.SoftObjectReference.read(reader)), ueType, index); | ||
property = new ArrayProperty(subtype, new Array(elementCount).fill(0).map(() => SoftObjectProperty_1.SoftObjectProperty.ReadValue(reader)), ueType, index); | ||
break; | ||
@@ -151,3 +151,3 @@ case "StructProperty": | ||
case "SoftObjectProperty": | ||
property.values.forEach(v => SoftObjectReference_1.SoftObjectReference.write(writer, v)); | ||
property.values.forEach(v => SoftObjectProperty_1.SoftObjectProperty.SerializeValue(writer, v)); | ||
break; | ||
@@ -154,0 +154,0 @@ case "StructProperty": |
@@ -22,3 +22,3 @@ "use strict"; | ||
static CalcOverhead(property) { | ||
return 2; | ||
return 1 + 1; | ||
} | ||
@@ -25,0 +25,0 @@ static Serialize(writer, property) { |
@@ -24,3 +24,3 @@ "use strict"; | ||
static CalcOverhead(property) { | ||
return property.value.name.length + 6; | ||
return property.value.name.length + 5 + 1; | ||
} | ||
@@ -27,0 +27,0 @@ static Serialize(writer, property) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MapProperty = exports.isMapProperty = void 0; | ||
const DynamicStructPropertyValue_1 = require("../../structs/DynamicStructPropertyValue"); | ||
const BasicProperty_1 = require("./BasicProperty"); | ||
@@ -11,3 +12,2 @@ const ByteProperty_1 = require("./ByteProperty"); | ||
const StrProperty_1 = require("./StrProperty"); | ||
const StructProperty_1 = require("./StructProperty"); | ||
const isMapProperty = (property) => property.type === 'MapProperty'; | ||
@@ -40,3 +40,3 @@ exports.isMapProperty = isMapProperty; | ||
else { | ||
key = (0, StructProperty_1.ParseDynamicStructData)(reader, 0, property.keyType); | ||
key = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, 0, property.keyType); | ||
} | ||
@@ -58,2 +58,5 @@ break; | ||
break; | ||
case 'Int64Property': | ||
key = Int64Property_1.Int64Property.ReadValue(reader); | ||
break; | ||
case 'ByteProperty': | ||
@@ -67,3 +70,3 @@ key = ByteProperty_1.ByteProperty.ReadValue(reader); | ||
case 'StructProperty': | ||
value = (0, StructProperty_1.ParseDynamicStructData)(reader, 0, property.valueType); | ||
value = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, 0, property.valueType); | ||
break; | ||
@@ -113,3 +116,3 @@ case 'ObjectProperty': | ||
else { | ||
(0, StructProperty_1.SerializeDynamicStructData)(writer, 0, entry[0]); | ||
DynamicStructPropertyValue_1.DynamicStructPropertyValue.write(writer, 0, entry[0]); | ||
} | ||
@@ -131,2 +134,5 @@ break; | ||
break; | ||
case 'Int64Property': | ||
Int64Property_1.Int64Property.SerializeValue(writer, entry[0]); | ||
break; | ||
case 'ByteProperty': | ||
@@ -140,3 +146,3 @@ ByteProperty_1.ByteProperty.SerializeValue(writer, entry[0]); | ||
case 'StructProperty': | ||
(0, StructProperty_1.SerializeDynamicStructData)(writer, 0, entry[1]); | ||
DynamicStructPropertyValue_1.DynamicStructPropertyValue.write(writer, 0, entry[1]); | ||
break; | ||
@@ -143,0 +149,0 @@ case 'ObjectProperty': |
@@ -5,2 +5,3 @@ "use strict"; | ||
const GUIDInfo_1 = require("../../structs/GUIDInfo"); | ||
const ObjectReference_1 = require("../../structs/ObjectReference"); | ||
const BasicProperty_1 = require("./BasicProperty"); | ||
@@ -20,7 +21,3 @@ const isObjectProperty = (property) => property.type === 'ObjectProperty'; | ||
static ReadValue(reader) { | ||
const x = { | ||
levelName: reader.readString(), | ||
pathName: reader.readString() | ||
}; | ||
return x; | ||
return ObjectReference_1.ObjectReference.read(reader); | ||
} | ||
@@ -35,6 +32,5 @@ static CalcOverhead(property) { | ||
static SerializeValue(writer, value) { | ||
writer.writeString(value.levelName); | ||
writer.writeString(value.pathName); | ||
ObjectReference_1.ObjectReference.write(writer, value); | ||
} | ||
} | ||
exports.ObjectProperty = ObjectProperty; |
@@ -21,4 +21,4 @@ "use strict"; | ||
const subtype = reader.readString(); | ||
const unk2 = reader.skipBytes(1); | ||
const unk3 = reader.skipBytes(4); | ||
reader.skipBytes(1); | ||
reader.skipBytes(4); | ||
const elementCount = reader.readInt32(); | ||
@@ -25,0 +25,0 @@ let property; |
@@ -11,4 +11,6 @@ import { BinaryReadable } from '../../../../byte/binary-readable.interface'; | ||
static Parse(reader: BinaryReadable, ueType: string, index?: number): SoftObjectProperty; | ||
static ReadValue(reader: BinaryReadable): SoftObjectReference; | ||
static CalcOverhead(property: SoftObjectProperty): number; | ||
static Serialize(writer: ByteWriter, property: SoftObjectProperty): void; | ||
static SerializeValue(writer: ByteWriter, value: SoftObjectReference): void; | ||
} |
@@ -19,2 +19,5 @@ "use strict"; | ||
} | ||
static ReadValue(reader) { | ||
return SoftObjectReference_1.SoftObjectReference.read(reader); | ||
} | ||
static CalcOverhead(property) { | ||
@@ -27,3 +30,6 @@ return 1; | ||
} | ||
static SerializeValue(writer, value) { | ||
SoftObjectReference_1.SoftObjectReference.write(writer, value); | ||
} | ||
} | ||
exports.SoftObjectProperty = SoftObjectProperty; |
import { BinaryReadable } from '../../../../byte/binary-readable.interface'; | ||
import { ByteWriter } from '../../../../byte/byte-writer.class'; | ||
import { col4 } from '../../structs/col4'; | ||
import { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue'; | ||
import { vec3 } from '../../structs/vec3'; | ||
import { vec4 } from '../../structs/vec4'; | ||
import { AbstractBaseProperty, PropertiesMap } from './BasicProperty'; | ||
import { AbstractBaseProperty } from './BasicProperty'; | ||
export type BasicMultipleStructPropertyValue = { | ||
@@ -39,6 +40,2 @@ values: any; | ||
}; | ||
export type DynamicStructPropertyValue = { | ||
type: string; | ||
properties: PropertiesMap; | ||
}; | ||
export type ClientIdentityInfo = { | ||
@@ -65,7 +62,1 @@ offlineId: string; | ||
} | ||
export declare const ParseDynamicStructData: (reader: BinaryReadable, buildVersion: number, type: string) => DynamicStructPropertyValue; | ||
export declare const SerializeDynamicStructData: (writer: ByteWriter, buildVersion: number, data: DynamicStructPropertyValue) => void; | ||
export declare const ReadFINNetworkTrace: (reader: BinaryReadable) => any; | ||
export declare const SerializeFINNetworkTrace: (writer: ByteWriter, obj: any) => void; | ||
export declare const ReadFINLuaProcessorStateStorage: (reader: BinaryReadable, size: number) => any; | ||
export declare const SerializeFINLuaProcessorStateStorage: (writer: ByteWriter, stateStorage: any) => void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SerializeFINLuaProcessorStateStorage = exports.ReadFINLuaProcessorStateStorage = exports.SerializeFINNetworkTrace = exports.ReadFINNetworkTrace = exports.SerializeDynamicStructData = exports.ParseDynamicStructData = exports.StructProperty = exports.isStructProperty = void 0; | ||
exports.StructProperty = exports.isStructProperty = void 0; | ||
const parser_error_1 = require("../../../../error/parser.error"); | ||
const col4_1 = require("../../structs/col4"); | ||
const ObjectReference_1 = require("../../structs/ObjectReference"); | ||
const DynamicStructPropertyValue_1 = require("../../structs/DynamicStructPropertyValue"); | ||
const FICFrameRange_1 = require("../../structs/mods/FicsItCam/FICFrameRange"); | ||
const vec3_1 = require("../../structs/vec3"); | ||
const vec4_1 = require("../../structs/vec4"); | ||
const DataFields_1 = require("../DataFields"); | ||
const BasicProperty_1 = require("./BasicProperty"); | ||
@@ -57,2 +57,5 @@ const isStructProperty = (property) => property.type === 'StructProperty'; | ||
break; | ||
case 'IntPoint': | ||
value = reader.readInt64().toString(); | ||
break; | ||
case 'LinearColor': | ||
@@ -148,18 +151,7 @@ value = col4_1.col4.ParseRGBA(reader); | ||
break; | ||
case 'FINNetworkTrace': | ||
value = (0, exports.ReadFINNetworkTrace)(reader); | ||
break; | ||
case 'FINLuaProcessorStateStorage': | ||
value = { | ||
values: (0, exports.ReadFINLuaProcessorStateStorage)(reader, size) | ||
}; | ||
break; | ||
case 'FICFrameRange': | ||
value = { | ||
begin: reader.readInt64().toString(), | ||
end: reader.readInt64().toString(), | ||
}; | ||
value = FICFrameRange_1.FICFrameRange.Parse(reader); | ||
break; | ||
default: | ||
value = (0, exports.ParseDynamicStructData)(reader, 0, subtype); | ||
value = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, 0, subtype); | ||
} | ||
@@ -169,3 +161,3 @@ return value; | ||
static CalcOverhead(property) { | ||
return property.subtype.length + 5 + 17; | ||
return property.subtype.length + 5 + 4 + 4 + 4 + 4 + 1; | ||
} | ||
@@ -187,2 +179,5 @@ static Serialize(writer, property) { | ||
break; | ||
case 'IntPoint': | ||
writer.writeInt64(BigInt(value)); | ||
break; | ||
case 'LinearColor': | ||
@@ -259,18 +254,9 @@ value = value; | ||
break; | ||
case 'FINNetworkTrace': | ||
value = value; | ||
(0, exports.SerializeFINNetworkTrace)(writer, value); | ||
break; | ||
case 'FINLuaProcessorStateStorage': | ||
value = value; | ||
(0, exports.SerializeFINLuaProcessorStateStorage)(writer, value.values); | ||
break; | ||
case 'FICFrameRange': | ||
value = value; | ||
writer.writeInt64(BigInt(value.begin)); | ||
writer.writeInt64(BigInt(value.end)); | ||
FICFrameRange_1.FICFrameRange.Serialize(writer, value); | ||
break; | ||
default: | ||
value = value; | ||
(0, exports.SerializeDynamicStructData)(writer, 0, value); | ||
DynamicStructPropertyValue_1.DynamicStructPropertyValue.write(writer, 0, value); | ||
} | ||
@@ -280,92 +266,1 @@ } | ||
exports.StructProperty = StructProperty; | ||
const ParseDynamicStructData = (reader, buildVersion, type) => { | ||
const data = { | ||
type, properties: {} | ||
}; | ||
const pos = reader.getBufferPosition(); | ||
let propertyName = reader.readString(); | ||
while (propertyName !== 'None') { | ||
const parsedProperty = DataFields_1.DataFields.ParseProperty(reader, buildVersion, propertyName); | ||
if (data.properties[propertyName]) { | ||
if (!Array.isArray(data.properties[propertyName])) { | ||
data.properties[propertyName] = [data.properties[propertyName]]; | ||
} | ||
data.properties[propertyName].push(parsedProperty); | ||
} | ||
else { | ||
data.properties[propertyName] = parsedProperty; | ||
} | ||
propertyName = reader.readString(); | ||
} | ||
return data; | ||
}; | ||
exports.ParseDynamicStructData = ParseDynamicStructData; | ||
const SerializeDynamicStructData = (writer, buildVersion, data) => { | ||
for (const key in data.properties) { | ||
for (const prop of (Array.isArray(data.properties[key]) ? data.properties[key] : [data.properties[key]])) { | ||
writer.writeString(key); | ||
DataFields_1.DataFields.SerializeProperty(writer, prop, key, buildVersion); | ||
} | ||
} | ||
writer.writeString('None'); | ||
}; | ||
exports.SerializeDynamicStructData = SerializeDynamicStructData; | ||
const ReadFINNetworkTrace = (reader) => { | ||
const networkTrace = {}; | ||
networkTrace.ref = ObjectReference_1.ObjectReference.read(reader); | ||
networkTrace.hasPrev = reader.readInt32(); | ||
if (networkTrace.hasPrev) { | ||
networkTrace.prev = (0, exports.ReadFINNetworkTrace)(reader); | ||
} | ||
networkTrace.hasStep = reader.readInt32(); | ||
if (networkTrace.hasStep) { | ||
networkTrace.step = reader.readString(); | ||
} | ||
return networkTrace; | ||
}; | ||
exports.ReadFINNetworkTrace = ReadFINNetworkTrace; | ||
const SerializeFINNetworkTrace = (writer, obj) => { | ||
const networkTrace = {}; | ||
ObjectReference_1.ObjectReference.write(writer, obj.ref); | ||
writer.writeInt32(obj.hasPrev); | ||
if (obj.hasPrev) { | ||
(0, exports.SerializeFINNetworkTrace)(writer, obj.prev); | ||
} | ||
writer.writeInt32(obj.hasStep); | ||
if (obj.hasStep) { | ||
writer.writeString(obj.step); | ||
} | ||
}; | ||
exports.SerializeFINNetworkTrace = SerializeFINNetworkTrace; | ||
const ReadFINLuaProcessorStateStorage = (reader, size) => { | ||
const stateStorage = { traces: [], references: [], thread: '', globals: '', remainingStructData: {} }; | ||
const start = reader.getBufferPosition(); | ||
const traceCount = reader.readInt32(); | ||
for (let i = 0; i < traceCount; i++) { | ||
stateStorage.traces.push((0, exports.ReadFINNetworkTrace)(reader)); | ||
} | ||
const refCount = reader.readInt32(); | ||
for (let i = 0; i < refCount; i++) { | ||
stateStorage.references.push(ObjectReference_1.ObjectReference.read(reader)); | ||
} | ||
stateStorage.thread = reader.readString(); | ||
stateStorage.globals = reader.readString(); | ||
const remaining = size - (reader.getBufferPosition() - start); | ||
stateStorage.remainingStructData = reader.readBytes(remaining); | ||
return stateStorage; | ||
}; | ||
exports.ReadFINLuaProcessorStateStorage = ReadFINLuaProcessorStateStorage; | ||
const SerializeFINLuaProcessorStateStorage = (writer, stateStorage) => { | ||
writer.writeInt32(stateStorage.traces.length); | ||
for (const trace of stateStorage.traces) { | ||
(0, exports.SerializeFINNetworkTrace)(writer, trace); | ||
} | ||
writer.writeInt32(stateStorage.references.length); | ||
for (const ref of stateStorage.references) { | ||
ObjectReference_1.ObjectReference.write(writer, ref); | ||
} | ||
writer.writeString(stateStorage.thread); | ||
writer.writeString(stateStorage.globals); | ||
writer.writeBytes(stateStorage.remainingStructData); | ||
}; | ||
exports.SerializeFINLuaProcessorStateStorage = SerializeFINLuaProcessorStateStorage; |
@@ -10,3 +10,3 @@ import { BinaryReadable } from '../../../../byte/binary-readable.interface'; | ||
static Parse(reader: BinaryReadable, ueType: string, index?: number): TextProperty; | ||
static ParseValue(reader: BinaryReadable): TextPropertyValue; | ||
static ReadValue(reader: BinaryReadable): TextPropertyValue; | ||
static CalcOverhead(property: TextProperty): number; | ||
@@ -13,0 +13,0 @@ static Serialize(writer: ByteWriter, property: TextProperty): void; |
@@ -15,6 +15,6 @@ "use strict"; | ||
const guidInfo = GUIDInfo_1.GUIDInfo.read(reader); | ||
const value = TextProperty.ParseValue(reader); | ||
const value = TextProperty.ReadValue(reader); | ||
return new TextProperty(value, ueType, guidInfo, index); | ||
} | ||
static ParseValue(reader) { | ||
static ReadValue(reader) { | ||
const prop = { | ||
@@ -32,3 +32,3 @@ flags: reader.readInt32(), | ||
case 3: | ||
prop.sourceFmt = TextProperty.ParseValue(reader); | ||
prop.sourceFmt = TextProperty.ReadValue(reader); | ||
const argumentsCount = reader.readInt32(); | ||
@@ -42,3 +42,3 @@ prop.arguments = []; | ||
case 4: | ||
currentArgumentsData.argumentValue = TextProperty.ParseValue(reader); | ||
currentArgumentsData.argumentValue = TextProperty.ReadValue(reader); | ||
break; | ||
@@ -52,3 +52,3 @@ default: | ||
case 10: | ||
prop.sourceText = TextProperty.ParseValue(reader); | ||
prop.sourceText = TextProperty.ReadValue(reader); | ||
prop.transformType = reader.readByte(); | ||
@@ -55,0 +55,0 @@ break; |
@@ -22,3 +22,3 @@ "use strict"; | ||
static CalcOverhead(property) { | ||
throw new Error('Unimplemented.'); | ||
return 1; | ||
} | ||
@@ -25,0 +25,0 @@ static Serialize(writer, property) { |
{ | ||
"name": "@etothepii/satisfactory-file-parser", | ||
"author": "etothepii", | ||
"version": "0.4.22", | ||
"version": "0.5.1", | ||
"description": "A file parser for satisfactory files. Includes save files and blueprint files.", | ||
@@ -6,0 +6,0 @@ "types": "./build/index.d.ts", |
@@ -143,3 +143,21 @@ # Satisfactory File Parser | ||
# Explicitly Supported/Tested Mods (No guarantee for other mods) | ||
### Ficsit-Cam (`FicsItCam`) | ||
### Structural Solutions (`SS_Mod`) | ||
### Linear Motion (`LinearMotion`) | ||
### Container Screens (`ContainerScreen`) | ||
### Conveyor Wall Hole (`WallHoleConveyor`) | ||
### X3-Signs (`x3_signs`) | ||
### X3-Roads (`x3_roads`) | ||
# Changelog | ||
### [0.5.1] (2024-10-15) | ||
#### Added Mod Support | ||
#### Internal Renamings | ||
* `DynamicStructPropertyValue` extracted to own file. | ||
* Parsing of object data partially moved to `SaveObject`. | ||
* Renamed `DataFields` class to `PropertiesList`. | ||
* Moved parsing of class-specific properties into own namespace. | ||
* `ObjectProperty` and `SoftObjectProperty` now reuse the correct method for parsing/serializing the reference value. | ||
### [0.4.22] (2024-10-07) | ||
@@ -193,3 +211,3 @@ #### compatibility fix | ||
Copyright (c) 2024 etothepii | ||
Copyright (c) 2021-2024 etothepii | ||
@@ -196,0 +214,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
711740
190
12932
228