@etothepii/satisfactory-file-parser 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ U8 has only read support so far and only for save files, not for blueprint files
|
|
|
19
19
|
|:--------------:|:-----------------------------|
|
|
20
20
|
| <= U5 | ❌ |
|
|
21
21
|
| U6 + U7 | ✅ 0.0.1 - 0.0.34 |
|
|
22
|
-
| U8 | ⚠️ >= 0.1.
|
|
22
|
+
| U8 | ⚠️ >= 0.1.12 (Reading only) |
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
## Installation via npm
|
|
@@ -245,6 +245,8 @@ export declare class SetProperty<T> extends BasicProperty {
|
|
|
245
245
|
static CalcOverhead(property: SetProperty<any>): number;
|
|
246
246
|
static Serialize(writer: ByteWriter, property: SetProperty<any>): void;
|
|
247
247
|
}
|
|
248
|
+
export type GENERIC_MAP_KEY_TYPE = number | ObjectReference | boolean | GENERIC_STRUCT_PROPERTY_VALUE;
|
|
249
|
+
export type GENERIC_MAP_VALUE_TYPE = number | ObjectReference | boolean | GENERIC_STRUCT_PROPERTY_VALUE;
|
|
248
250
|
export declare class MapProperty extends BasicProperty {
|
|
249
251
|
keyType: string;
|
|
250
252
|
valueType: string;
|
|
@@ -253,10 +255,7 @@ export declare class MapProperty extends BasicProperty {
|
|
|
253
255
|
modeUnk2: string;
|
|
254
256
|
modeUnk3: string;
|
|
255
257
|
remainingData: number[];
|
|
256
|
-
values:
|
|
257
|
-
key: any;
|
|
258
|
-
value: any;
|
|
259
|
-
}[];
|
|
258
|
+
values: [key: GENERIC_MAP_KEY_TYPE, value: GENERIC_MAP_VALUE_TYPE][];
|
|
260
259
|
constructor(keyType: string, valueType: string, ueType: string, index: number);
|
|
261
260
|
static Parse(reader: BinaryReadable, propertyName: string, buildVersion: number, size: number, ueType?: string, index?: number): MapProperty;
|
|
262
261
|
static CalcOverhead(property: MapProperty): number;
|
|
@@ -898,7 +898,7 @@ class MapProperty extends BasicProperty {
|
|
|
898
898
|
super('MapProperty', ueType, undefined, index);
|
|
899
899
|
this.keyType = keyType;
|
|
900
900
|
this.valueType = valueType;
|
|
901
|
-
this.modeType =
|
|
901
|
+
this.modeType = 0;
|
|
902
902
|
this.modeUnk2 = '';
|
|
903
903
|
this.modeUnk3 = '';
|
|
904
904
|
this.remainingData = [];
|
|
@@ -916,7 +916,8 @@ class MapProperty extends BasicProperty {
|
|
|
916
916
|
switch (property.keyType) {
|
|
917
917
|
case 'StructProperty':
|
|
918
918
|
if (propertyName === 'mSaveData' || propertyName === 'mUnresolvedSaveData') {
|
|
919
|
-
key =
|
|
919
|
+
key = propertyName;
|
|
920
|
+
reader.skipBytes(12);
|
|
920
921
|
}
|
|
921
922
|
else {
|
|
922
923
|
key = (0, exports.ParseDynamicStructData)(reader, 0, 'MapPropertyKey-' + property.keyType);
|
|
@@ -966,6 +967,7 @@ class MapProperty extends BasicProperty {
|
|
|
966
967
|
default:
|
|
967
968
|
throw new Error(`not implemented map value type ${property.valueType}`);
|
|
968
969
|
}
|
|
970
|
+
property.values.push([key, value]);
|
|
969
971
|
}
|
|
970
972
|
return property;
|
|
971
973
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etothepii/satisfactory-file-parser",
|
|
3
3
|
"author": "etothepii",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.12",
|
|
5
5
|
"description": "A file parser for satisfactory files. Includes save files and blueprint files.",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"main": "./build/index.js",
|