@etothepii/satisfactory-file-parser 0.4.21 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/build/index.d.ts +5 -2
- package/build/index.js +5 -2
- package/build/parser/satisfactory/blueprint/blueprint-reader.js +6 -5
- package/build/parser/satisfactory/blueprint/blueprint-writer.js +2 -2
- package/build/parser/satisfactory/blueprint/blueprint.types.d.ts +2 -2
- package/build/parser/satisfactory/types/objects/SaveEntity.js +5 -5
- package/build/parser/satisfactory/types/objects/SaveObject.d.ts +2 -2
- package/build/parser/satisfactory/types/objects/SaveObject.js +19 -3
- package/build/parser/satisfactory/types/property/PropertiesList.d.ts +11 -0
- package/build/parser/satisfactory/types/property/PropertiesList.js +249 -0
- package/build/parser/satisfactory/types/property/generic/ArrayProperty.js +4 -4
- package/build/parser/satisfactory/types/property/generic/BoolProperty.js +1 -1
- package/build/parser/satisfactory/types/property/generic/EnumProperty.js +1 -1
- package/build/parser/satisfactory/types/property/generic/MapProperty.js +11 -5
- package/build/parser/satisfactory/types/property/generic/ObjectProperty.js +3 -7
- package/build/parser/satisfactory/types/property/generic/SetProperty.js +2 -2
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.d.ts +2 -0
- package/build/parser/satisfactory/types/property/generic/SoftObjectProperty.js +6 -0
- package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +2 -11
- package/build/parser/satisfactory/types/property/generic/StructProperty.js +14 -119
- package/build/parser/satisfactory/types/property/generic/TextProperty.d.ts +1 -1
- package/build/parser/satisfactory/types/property/generic/TextProperty.js +5 -5
- package/build/parser/satisfactory/types/property/generic/Uint8Property.js +1 -1
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.d.ts +54 -0
- package/build/parser/satisfactory/types/property/special/SpecialAnyProperties.js +2 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.d.ts +7 -0
- package/build/parser/satisfactory/types/property/special/SpecialProperties.js +234 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.d.ts +11 -0
- package/build/parser/satisfactory/types/structs/DynamicStructPropertyValue.js +37 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts +10 -0
- package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamicStructPropertyValue = void 0;
|
|
4
|
+
const PropertiesList_1 = require("../property/PropertiesList");
|
|
5
|
+
var DynamicStructPropertyValue;
|
|
6
|
+
(function (DynamicStructPropertyValue) {
|
|
7
|
+
DynamicStructPropertyValue.read = (reader, buildVersion, type) => {
|
|
8
|
+
const data = {
|
|
9
|
+
type, properties: {}
|
|
10
|
+
};
|
|
11
|
+
let propertyName = reader.readString();
|
|
12
|
+
while (propertyName !== 'None') {
|
|
13
|
+
const parsedProperty = PropertiesList_1.PropertiesList.ParseSingleProperty(reader, buildVersion, propertyName);
|
|
14
|
+
if (data.properties[propertyName]) {
|
|
15
|
+
if (!Array.isArray(data.properties[propertyName])) {
|
|
16
|
+
data.properties[propertyName] = [data.properties[propertyName]];
|
|
17
|
+
}
|
|
18
|
+
data.properties[propertyName].push(parsedProperty);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
data.properties[propertyName] = parsedProperty;
|
|
22
|
+
}
|
|
23
|
+
propertyName = reader.readString();
|
|
24
|
+
}
|
|
25
|
+
return data;
|
|
26
|
+
};
|
|
27
|
+
DynamicStructPropertyValue.write = (writer, buildVersion, data) => {
|
|
28
|
+
for (const key in data.properties) {
|
|
29
|
+
for (const prop of (Array.isArray(data.properties[key]) ? data.properties[key] : [data.properties[key]])) {
|
|
30
|
+
writer.writeString(key);
|
|
31
|
+
PropertiesList_1.PropertiesList.SerializeSingleProperty(writer, prop, key, buildVersion);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
writer.writeString('None');
|
|
35
|
+
};
|
|
36
|
+
})(DynamicStructPropertyValue || (exports.DynamicStructPropertyValue = DynamicStructPropertyValue = {}));
|
|
37
|
+
;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BinaryReadable } from '../../../../../byte/binary-readable.interface';
|
|
2
|
+
import { ByteWriter } from '../../../../../byte/byte-writer.class';
|
|
3
|
+
export type FICFrameRange = {
|
|
4
|
+
begin: string;
|
|
5
|
+
end: string;
|
|
6
|
+
};
|
|
7
|
+
export declare namespace FICFrameRange {
|
|
8
|
+
const Parse: (reader: BinaryReadable) => FICFrameRange;
|
|
9
|
+
const Serialize: (writer: ByteWriter, value: FICFrameRange) => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FICFrameRange = void 0;
|
|
4
|
+
var FICFrameRange;
|
|
5
|
+
(function (FICFrameRange) {
|
|
6
|
+
FICFrameRange.Parse = (reader) => {
|
|
7
|
+
return {
|
|
8
|
+
begin: reader.readInt64().toString(),
|
|
9
|
+
end: reader.readInt64().toString(),
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
FICFrameRange.Serialize = (writer, value) => {
|
|
13
|
+
writer.writeInt64(BigInt(value.begin));
|
|
14
|
+
writer.writeInt64(BigInt(value.end));
|
|
15
|
+
};
|
|
16
|
+
})(FICFrameRange || (exports.FICFrameRange = FICFrameRange = {}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etothepii/satisfactory-file-parser",
|
|
3
3
|
"author": "etothepii",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.1",
|
|
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",
|