@etothepii/satisfactory-file-parser 0.0.10 → 0.0.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/build/index.d.ts +15 -0
- package/build/index.js +49 -0
- package/build/parser/blueprint-reader.d.ts +18 -0
- package/build/parser/blueprint-reader.js +136 -0
- package/build/parser/blueprint-writer.d.ts +21 -0
- package/build/parser/blueprint-writer.js +69 -0
- package/build/parser/byte/alignment.enum.d.ts +4 -0
- package/build/parser/byte/alignment.enum.js +8 -0
- package/build/parser/byte/byte-reader.class.d.ts +38 -0
- package/build/parser/byte/byte-reader.class.js +132 -0
- package/build/parser/byte/byte-writer.class.d.ts +38 -0
- package/build/parser/byte/byte-writer.class.js +149 -0
- package/build/parser/error/parser.error.d.ts +12 -0
- package/build/parser/error/parser.error.js +28 -0
- package/build/parser/parser.d.ts +44 -0
- package/build/parser/parser.js +84 -0
- package/build/parser/satisfactory/blueprint/blueprint.d.ts +20 -0
- package/build/parser/satisfactory/blueprint/blueprint.js +2 -0
- package/build/parser/satisfactory/level.class.d.ts +21 -0
- package/build/parser/satisfactory/level.class.js +148 -0
- package/build/parser/satisfactory/objects/DataFields.d.ts +13 -0
- package/build/parser/satisfactory/objects/DataFields.js +249 -0
- package/build/parser/satisfactory/objects/ObjectReference.d.ts +9 -0
- package/build/parser/satisfactory/objects/ObjectReference.js +17 -0
- package/build/parser/satisfactory/objects/Property.d.ts +270 -0
- package/build/parser/satisfactory/objects/Property.js +1150 -0
- package/build/parser/satisfactory/objects/SaveComponent.d.ts +16 -0
- package/build/parser/satisfactory/objects/SaveComponent.js +31 -0
- package/build/parser/satisfactory/objects/SaveEntity.d.ts +25 -0
- package/build/parser/satisfactory/objects/SaveEntity.js +70 -0
- package/build/parser/satisfactory/objects/SaveObject.d.ts +14 -0
- package/build/parser/satisfactory/objects/SaveObject.js +29 -0
- package/build/parser/satisfactory/satisfactory-save.d.ts +57 -0
- package/build/parser/satisfactory/satisfactory-save.js +11 -0
- package/build/parser/satisfactory/static-data.d.ts +7 -0
- package/build/parser/satisfactory/static-data.js +2 -0
- package/build/parser/satisfactory/structs/util.types.d.ts +40 -0
- package/build/parser/satisfactory/structs/util.types.js +95 -0
- package/build/parser/save-reader.d.ts +43 -0
- package/build/parser/save-reader.js +251 -0
- package/build/parser/save-writer.d.ts +22 -0
- package/build/parser/save-writer.js +121 -0
- package/package.json +3 -3
- package/index.d.ts +0 -2356
- package/index.js +0 -2364
- package/rollup.config.mjs +0 -11
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataFields = void 0;
|
|
4
|
+
const Property_1 = require("./Property");
|
|
5
|
+
class DataFields {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.properties = [];
|
|
8
|
+
this.trailingData = [];
|
|
9
|
+
this.shouldBeNulled = false;
|
|
10
|
+
}
|
|
11
|
+
static Parse(length, reader, buildVersion) {
|
|
12
|
+
const start = reader.getBufferPosition();
|
|
13
|
+
const fields = new DataFields();
|
|
14
|
+
if (length === 0) {
|
|
15
|
+
//WARNING
|
|
16
|
+
fields.shouldBeNulled = true;
|
|
17
|
+
return fields;
|
|
18
|
+
}
|
|
19
|
+
let propertyName = reader.readString();
|
|
20
|
+
while (propertyName !== 'None') {
|
|
21
|
+
const property = DataFields.ParseProperty(reader, buildVersion, propertyName);
|
|
22
|
+
fields.properties.push(property);
|
|
23
|
+
propertyName = reader.readString();
|
|
24
|
+
}
|
|
25
|
+
let int1 = reader.readInt32();
|
|
26
|
+
if (int1 !== 0) {
|
|
27
|
+
//WARNING
|
|
28
|
+
}
|
|
29
|
+
const end = reader.getBufferPosition();
|
|
30
|
+
let remainingBytes = start + length - end;
|
|
31
|
+
fields.trailingData = Array.from(reader.readBytes(remainingBytes));
|
|
32
|
+
return fields;
|
|
33
|
+
}
|
|
34
|
+
static ParseProperty(reader, buildVersion, propertyName) {
|
|
35
|
+
let currentProperty = {};
|
|
36
|
+
if (currentProperty.name === 'None') {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
//TODO: What is this extra byte that is appearing sometime?
|
|
40
|
+
// i dont think there is an extra byte.
|
|
41
|
+
/*
|
|
42
|
+
let extraByteTest = reader.readByte();
|
|
43
|
+
if (extraByteTest !== 0) {
|
|
44
|
+
reader.currentByte -= 1;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
console.log('Property extra byte', currentProperty);
|
|
48
|
+
}
|
|
49
|
+
*/
|
|
50
|
+
//TODO assign type and index after parsing.
|
|
51
|
+
const propertyType = reader.readString();
|
|
52
|
+
const binarySize = reader.readInt32();
|
|
53
|
+
const index = reader.readInt32();
|
|
54
|
+
const before = reader.getBufferPosition();
|
|
55
|
+
let overhead = 0;
|
|
56
|
+
switch (propertyType) {
|
|
57
|
+
case 'BoolProperty':
|
|
58
|
+
currentProperty = Property_1.BoolProperty.Parse(reader, propertyType, index);
|
|
59
|
+
overhead = Property_1.BoolProperty.CalcOverhead(currentProperty);
|
|
60
|
+
break;
|
|
61
|
+
case 'ByteProperty':
|
|
62
|
+
currentProperty = Property_1.ByteProperty.Parse(reader, propertyType, index);
|
|
63
|
+
overhead = Property_1.ByteProperty.CalcOverhead(currentProperty);
|
|
64
|
+
break;
|
|
65
|
+
case 'Int8Property':
|
|
66
|
+
currentProperty = Property_1.Int8Property.Parse(reader, propertyType, index);
|
|
67
|
+
overhead = Property_1.Int8Property.CalcOverhead(currentProperty);
|
|
68
|
+
break;
|
|
69
|
+
case 'UInt8Property':
|
|
70
|
+
currentProperty = Property_1.Uint8Property.Parse(reader, propertyType, index);
|
|
71
|
+
overhead = Property_1.Uint8Property.CalcOverhead(currentProperty);
|
|
72
|
+
break;
|
|
73
|
+
case 'IntProperty':
|
|
74
|
+
case 'Int32Property':
|
|
75
|
+
currentProperty = Property_1.Int32Property.Parse(reader, propertyType, index);
|
|
76
|
+
overhead = Property_1.Int32Property.CalcOverhead(currentProperty);
|
|
77
|
+
break;
|
|
78
|
+
case 'UInt32Property':
|
|
79
|
+
currentProperty = Property_1.Uint32Property.Parse(reader, propertyType, index);
|
|
80
|
+
overhead = Property_1.Uint32Property.CalcOverhead(currentProperty);
|
|
81
|
+
break;
|
|
82
|
+
case 'Int64Property':
|
|
83
|
+
currentProperty = Property_1.Int64Property.Parse(reader, propertyType, index);
|
|
84
|
+
overhead = Property_1.Int64Property.CalcOverhead(currentProperty);
|
|
85
|
+
break;
|
|
86
|
+
// TODO
|
|
87
|
+
/*
|
|
88
|
+
case 'UInt64Property':
|
|
89
|
+
currentProperty = Int64Property.Parse(reader, propertyType, index);
|
|
90
|
+
break;
|
|
91
|
+
*/
|
|
92
|
+
case 'SingleProperty':
|
|
93
|
+
case 'FloatProperty':
|
|
94
|
+
currentProperty = Property_1.FloatProperty.Parse(reader, propertyType, index);
|
|
95
|
+
overhead = Property_1.FloatProperty.CalcOverhead(currentProperty);
|
|
96
|
+
break;
|
|
97
|
+
case 'DoubleProperty':
|
|
98
|
+
currentProperty = Property_1.DoubleProperty.Parse(reader, propertyType, index);
|
|
99
|
+
overhead = Property_1.DoubleProperty.CalcOverhead(currentProperty);
|
|
100
|
+
break;
|
|
101
|
+
case 'StrProperty':
|
|
102
|
+
case 'NameProperty':
|
|
103
|
+
currentProperty = Property_1.StrProperty.Parse(reader, propertyType, index);
|
|
104
|
+
overhead = Property_1.StrProperty.CalcOverhead(currentProperty);
|
|
105
|
+
break;
|
|
106
|
+
case 'ObjectProperty':
|
|
107
|
+
case 'InterfaceProperty':
|
|
108
|
+
currentProperty = Property_1.ObjectProperty.Parse(reader, propertyType, index);
|
|
109
|
+
overhead = Property_1.ObjectProperty.CalcOverhead(currentProperty);
|
|
110
|
+
break;
|
|
111
|
+
case 'EnumProperty':
|
|
112
|
+
currentProperty = Property_1.EnumProperty.Parse(reader, propertyType, index);
|
|
113
|
+
overhead = Property_1.EnumProperty.CalcOverhead(currentProperty);
|
|
114
|
+
break;
|
|
115
|
+
case 'StructProperty':
|
|
116
|
+
currentProperty = Property_1.StructProperty.Parse(reader, propertyType, index, binarySize);
|
|
117
|
+
overhead = Property_1.StructProperty.CalcOverhead(currentProperty);
|
|
118
|
+
break;
|
|
119
|
+
case 'ArrayProperty':
|
|
120
|
+
currentProperty = Property_1.ArrayProperty.Parse(reader, propertyType, index, propertyName);
|
|
121
|
+
overhead = Property_1.ArrayProperty.CalcOverhead(currentProperty);
|
|
122
|
+
break;
|
|
123
|
+
case 'MapProperty':
|
|
124
|
+
//currentProperty = reader.readMapProperty(currentProperty, '');
|
|
125
|
+
currentProperty = Property_1.MapProperty.Parse(reader, propertyName, buildVersion, binarySize);
|
|
126
|
+
overhead = Property_1.MapProperty.CalcOverhead(currentProperty);
|
|
127
|
+
break;
|
|
128
|
+
case 'TextProperty':
|
|
129
|
+
currentProperty = Property_1.TextProperty.Parse(reader, propertyType, index);
|
|
130
|
+
overhead = Property_1.TextProperty.CalcOverhead(currentProperty);
|
|
131
|
+
break;
|
|
132
|
+
case 'SetProperty':
|
|
133
|
+
currentProperty = Property_1.SetProperty.Parse(reader, propertyType, index, propertyName);
|
|
134
|
+
overhead = Property_1.SetProperty.CalcOverhead(currentProperty);
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
throw new Error(`Unimplemented type ${propertyType}`);
|
|
138
|
+
}
|
|
139
|
+
currentProperty.name = propertyName;
|
|
140
|
+
const readBytes = reader.getBufferPosition() - before - overhead;
|
|
141
|
+
if (readBytes !== binarySize) {
|
|
142
|
+
throw new Error(`possibly corrupt. Read ${readBytes} for ${propertyType} ${propertyName}, but ${binarySize} were indicated.`);
|
|
143
|
+
}
|
|
144
|
+
return currentProperty;
|
|
145
|
+
}
|
|
146
|
+
static Serialize(writer, fields, buildVersion) {
|
|
147
|
+
for (const property of fields.properties) {
|
|
148
|
+
writer.writeString(property.name);
|
|
149
|
+
DataFields.SerializeProperty(writer, property, property.name, buildVersion);
|
|
150
|
+
}
|
|
151
|
+
writer.writeString('None');
|
|
152
|
+
writer.writeInt32(0);
|
|
153
|
+
writer.writeBytesArray(fields.trailingData);
|
|
154
|
+
}
|
|
155
|
+
static SerializeProperty(writer, property, propertyName, buildVersion) {
|
|
156
|
+
writer.writeString(property.ueType);
|
|
157
|
+
// binary length indicator
|
|
158
|
+
const lenIndicator = writer.getBufferPosition();
|
|
159
|
+
writer.writeInt32(0);
|
|
160
|
+
// write index if it is not 0. Since it normally is.
|
|
161
|
+
writer.writeInt32(property.index ?? 0);
|
|
162
|
+
const start = writer.getBufferPosition();
|
|
163
|
+
let overhead = 0;
|
|
164
|
+
switch (property.ueType) {
|
|
165
|
+
case 'BoolProperty':
|
|
166
|
+
overhead = Property_1.BoolProperty.CalcOverhead(property);
|
|
167
|
+
Property_1.BoolProperty.Serialize(writer, property);
|
|
168
|
+
break;
|
|
169
|
+
case 'ByteProperty':
|
|
170
|
+
overhead = Property_1.ByteProperty.CalcOverhead(property);
|
|
171
|
+
Property_1.ByteProperty.Serialize(writer, property);
|
|
172
|
+
break;
|
|
173
|
+
case 'Int8Property':
|
|
174
|
+
overhead = Property_1.Int8Property.CalcOverhead(property);
|
|
175
|
+
Property_1.Int8Property.Serialize(writer, property);
|
|
176
|
+
break;
|
|
177
|
+
case 'UInt8Property':
|
|
178
|
+
overhead = Property_1.Uint8Property.CalcOverhead(property);
|
|
179
|
+
Property_1.Uint8Property.Serialize(writer, property);
|
|
180
|
+
break;
|
|
181
|
+
case 'IntProperty':
|
|
182
|
+
case 'Int32Property':
|
|
183
|
+
overhead = Property_1.Int32Property.CalcOverhead(property);
|
|
184
|
+
Property_1.Int32Property.Serialize(writer, property);
|
|
185
|
+
break;
|
|
186
|
+
case 'UInt32Property':
|
|
187
|
+
overhead = Property_1.Uint32Property.CalcOverhead(property);
|
|
188
|
+
Property_1.Uint32Property.Serialize(writer, property);
|
|
189
|
+
break;
|
|
190
|
+
case 'Int64Property':
|
|
191
|
+
overhead = Property_1.Int64Property.CalcOverhead(property);
|
|
192
|
+
Property_1.Int64Property.Serialize(writer, property);
|
|
193
|
+
break;
|
|
194
|
+
// TODO: uint64Property
|
|
195
|
+
case 'SingleProperty':
|
|
196
|
+
case 'FloatProperty':
|
|
197
|
+
overhead = Property_1.FloatProperty.CalcOverhead(property);
|
|
198
|
+
Property_1.FloatProperty.Serialize(writer, property);
|
|
199
|
+
break;
|
|
200
|
+
case 'DoubleProperty':
|
|
201
|
+
overhead = Property_1.DoubleProperty.CalcOverhead(property);
|
|
202
|
+
Property_1.DoubleProperty.Serialize(writer, property);
|
|
203
|
+
break;
|
|
204
|
+
case 'StrProperty':
|
|
205
|
+
case 'NameProperty':
|
|
206
|
+
overhead = Property_1.StrProperty.CalcOverhead(property);
|
|
207
|
+
Property_1.StrProperty.Serialize(writer, property);
|
|
208
|
+
break;
|
|
209
|
+
case 'ObjectProperty':
|
|
210
|
+
case 'InterfaceProperty':
|
|
211
|
+
overhead = Property_1.ObjectProperty.CalcOverhead(property);
|
|
212
|
+
Property_1.ObjectProperty.Serialize(writer, property);
|
|
213
|
+
break;
|
|
214
|
+
case 'EnumProperty':
|
|
215
|
+
overhead = Property_1.EnumProperty.CalcOverhead(property);
|
|
216
|
+
Property_1.EnumProperty.Serialize(writer, property);
|
|
217
|
+
break;
|
|
218
|
+
case 'ByteProperty':
|
|
219
|
+
overhead = Property_1.ByteProperty.CalcOverhead(property);
|
|
220
|
+
Property_1.ByteProperty.Serialize(writer, property);
|
|
221
|
+
break;
|
|
222
|
+
case 'StructProperty':
|
|
223
|
+
overhead = Property_1.StructProperty.CalcOverhead(property);
|
|
224
|
+
Property_1.StructProperty.Serialize(writer, property);
|
|
225
|
+
break;
|
|
226
|
+
case 'ArrayProperty':
|
|
227
|
+
overhead = Property_1.ArrayProperty.CalcOverhead(property);
|
|
228
|
+
Property_1.ArrayProperty.Serialize(writer, property, propertyName);
|
|
229
|
+
break;
|
|
230
|
+
case 'MapProperty':
|
|
231
|
+
overhead = Property_1.MapProperty.CalcOverhead(property);
|
|
232
|
+
Property_1.MapProperty.Serialize(writer, property);
|
|
233
|
+
break;
|
|
234
|
+
case 'TextProperty':
|
|
235
|
+
overhead = Property_1.TextProperty.CalcOverhead(property);
|
|
236
|
+
Property_1.TextProperty.Serialize(writer, property);
|
|
237
|
+
break;
|
|
238
|
+
case 'SetProperty':
|
|
239
|
+
overhead = Property_1.SetProperty.CalcOverhead(property);
|
|
240
|
+
Property_1.SetProperty.Serialize(writer, property);
|
|
241
|
+
break;
|
|
242
|
+
default:
|
|
243
|
+
throw new Error(`Unimplemented type ${property.type}`);
|
|
244
|
+
}
|
|
245
|
+
// replace len indicator.
|
|
246
|
+
writer.writeBinarySizeFromPosition(lenIndicator, start + overhead);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
exports.DataFields = DataFields;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ByteReader } from "../../byte/byte-reader.class";
|
|
2
|
+
import { ByteWriter } from "../../byte/byte-writer.class";
|
|
3
|
+
export declare class ObjectReference {
|
|
4
|
+
levelName: string;
|
|
5
|
+
pathName: string;
|
|
6
|
+
constructor(levelName: string, pathName: string);
|
|
7
|
+
static Parse(reader: ByteReader): ObjectReference;
|
|
8
|
+
static Serialize(writer: ByteWriter, ref: ObjectReference): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObjectReference = void 0;
|
|
4
|
+
class ObjectReference {
|
|
5
|
+
constructor(levelName, pathName) {
|
|
6
|
+
this.levelName = levelName;
|
|
7
|
+
this.pathName = pathName;
|
|
8
|
+
}
|
|
9
|
+
static Parse(reader) {
|
|
10
|
+
return new ObjectReference(reader.readString(), reader.readString());
|
|
11
|
+
}
|
|
12
|
+
static Serialize(writer, ref) {
|
|
13
|
+
writer.writeString(ref.levelName);
|
|
14
|
+
writer.writeString(ref.pathName);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ObjectReference = ObjectReference;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { ByteReader } from "../../byte/byte-reader.class";
|
|
2
|
+
import { SaveWriter } from "../../save-writer";
|
|
3
|
+
import { col4, vec3, vec4 } from "../structs/util.types";
|
|
4
|
+
import { ObjectReference } from "./ObjectReference";
|
|
5
|
+
export type Properties = {
|
|
6
|
+
[key: string]: string | number | boolean | any;
|
|
7
|
+
};
|
|
8
|
+
export declare abstract class AbstractProperty {
|
|
9
|
+
type: string;
|
|
10
|
+
index?: number | undefined;
|
|
11
|
+
constructor(type: string, index?: number | undefined);
|
|
12
|
+
}
|
|
13
|
+
export declare abstract class AbstractBaseProperty extends AbstractProperty {
|
|
14
|
+
ueType: string;
|
|
15
|
+
name: string;
|
|
16
|
+
constructor(type: string, ueType: string, index: number);
|
|
17
|
+
}
|
|
18
|
+
export declare abstract class BasicProperty extends AbstractBaseProperty {
|
|
19
|
+
guidInfo: GUID;
|
|
20
|
+
constructor(type: string, ueType: string, guidInfo: GUID, index?: number);
|
|
21
|
+
}
|
|
22
|
+
export type GUID = undefined | Uint8Array;
|
|
23
|
+
export declare const ParseGUID: (reader: ByteReader) => GUID;
|
|
24
|
+
export declare const SerializeGUID: (writer: SaveWriter, guid: GUID) => void;
|
|
25
|
+
export type OverheadResult = {
|
|
26
|
+
overhead: number;
|
|
27
|
+
};
|
|
28
|
+
export declare class BoolProperty extends BasicProperty {
|
|
29
|
+
value: boolean;
|
|
30
|
+
constructor(value: boolean, ueType?: string, guidInfo?: GUID, index?: number);
|
|
31
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): BoolProperty;
|
|
32
|
+
static ReadValue(reader: ByteReader): boolean;
|
|
33
|
+
static CalcOverhead(property: BoolProperty): number;
|
|
34
|
+
static Serialize(writer: SaveWriter, property: BoolProperty): void;
|
|
35
|
+
static SerializeValue(writer: SaveWriter, value: boolean): void;
|
|
36
|
+
}
|
|
37
|
+
export type BytePropertyValue = {
|
|
38
|
+
type: string;
|
|
39
|
+
value: string | number;
|
|
40
|
+
};
|
|
41
|
+
export declare class ByteProperty extends BasicProperty {
|
|
42
|
+
value: BytePropertyValue;
|
|
43
|
+
constructor(value: BytePropertyValue, ueType?: string, guidInfo?: GUID, index?: number);
|
|
44
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): ByteProperty;
|
|
45
|
+
static ReadValue(reader: ByteReader): number;
|
|
46
|
+
static CalcOverhead(property: ByteProperty): number;
|
|
47
|
+
static Serialize(writer: SaveWriter, property: ByteProperty): void;
|
|
48
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
49
|
+
}
|
|
50
|
+
export declare class Int8Property extends BasicProperty {
|
|
51
|
+
value: number;
|
|
52
|
+
constructor(value: number, ueType?: string, guidInfo?: GUID, index?: number);
|
|
53
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): Int8Property;
|
|
54
|
+
static ReadValue(reader: ByteReader): number;
|
|
55
|
+
static CalcOverhead(property: Int8Property): number;
|
|
56
|
+
static Serialize(writer: SaveWriter, property: Int8Property): void;
|
|
57
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
58
|
+
}
|
|
59
|
+
export declare class Uint8Property extends BasicProperty {
|
|
60
|
+
value: number;
|
|
61
|
+
constructor(value: number, ueType?: string, guidInfo?: GUID, index?: number);
|
|
62
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): Uint8Property;
|
|
63
|
+
static ReadValue(reader: ByteReader): number;
|
|
64
|
+
static CalcOverhead(property: Uint8Property): number;
|
|
65
|
+
static Serialize(writer: SaveWriter, property: Uint8Property): void;
|
|
66
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
67
|
+
}
|
|
68
|
+
export declare class Int32Property extends BasicProperty {
|
|
69
|
+
value: number;
|
|
70
|
+
constructor(value: number, ueType?: string, guidInfo?: GUID, index?: number);
|
|
71
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): Int32Property;
|
|
72
|
+
static ReadValue(reader: ByteReader): number;
|
|
73
|
+
static CalcOverhead(property: Int32Property): number;
|
|
74
|
+
static Serialize(writer: SaveWriter, property: Int32Property): void;
|
|
75
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
76
|
+
}
|
|
77
|
+
export declare class Uint32Property extends BasicProperty {
|
|
78
|
+
value: number;
|
|
79
|
+
constructor(value: number, ueType?: string, guidInfo?: GUID, index?: number);
|
|
80
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): Uint32Property;
|
|
81
|
+
static ReadValue(reader: ByteReader): number;
|
|
82
|
+
static CalcOverhead(property: Uint32Property): number;
|
|
83
|
+
static Serialize(writer: SaveWriter, property: Uint32Property): void;
|
|
84
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
85
|
+
}
|
|
86
|
+
export declare class Int64Property extends BasicProperty {
|
|
87
|
+
value: string;
|
|
88
|
+
constructor(value: string, ueType?: string, guidInfo?: GUID, index?: number);
|
|
89
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): Int64Property;
|
|
90
|
+
static ReadValue(reader: ByteReader): string;
|
|
91
|
+
static CalcOverhead(property: Int64Property): number;
|
|
92
|
+
static Serialize(writer: SaveWriter, property: Int64Property): void;
|
|
93
|
+
static SerializeValue(writer: SaveWriter, value: string): void;
|
|
94
|
+
}
|
|
95
|
+
export declare class FloatProperty extends BasicProperty {
|
|
96
|
+
value: number;
|
|
97
|
+
constructor(value: number, ueType?: string, guidInfo?: GUID, index?: number);
|
|
98
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): FloatProperty;
|
|
99
|
+
static CalcOverhead(property: FloatProperty): number;
|
|
100
|
+
static ReadValue(reader: ByteReader): number;
|
|
101
|
+
static Serialize(writer: SaveWriter, property: FloatProperty): void;
|
|
102
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
103
|
+
}
|
|
104
|
+
export declare class DoubleProperty extends BasicProperty {
|
|
105
|
+
value: number;
|
|
106
|
+
constructor(value: number, ueType?: string, guidInfo?: GUID, index?: number);
|
|
107
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): DoubleProperty;
|
|
108
|
+
static ReadValue(reader: ByteReader): number;
|
|
109
|
+
static CalcOverhead(property: DoubleProperty): number;
|
|
110
|
+
static Serialize(writer: SaveWriter, property: DoubleProperty): void;
|
|
111
|
+
static SerializeValue(writer: SaveWriter, value: number): void;
|
|
112
|
+
}
|
|
113
|
+
export declare class StrProperty extends BasicProperty {
|
|
114
|
+
value: string;
|
|
115
|
+
constructor(value: string, ueType?: string, guidInfo?: GUID, index?: number);
|
|
116
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): StrProperty;
|
|
117
|
+
static ReadValue(reader: ByteReader): string;
|
|
118
|
+
static CalcOverhead(property: StrProperty): number;
|
|
119
|
+
static Serialize(writer: SaveWriter, property: StrProperty): void;
|
|
120
|
+
static SerializeValue(writer: SaveWriter, value: string): void;
|
|
121
|
+
}
|
|
122
|
+
export declare class ObjectProperty extends BasicProperty {
|
|
123
|
+
value: ObjectReference;
|
|
124
|
+
constructor(value: ObjectReference, ueType?: string, guidInfo?: GUID, index?: number);
|
|
125
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): ObjectProperty;
|
|
126
|
+
static ReadValue(reader: ByteReader): ObjectReference;
|
|
127
|
+
static CalcOverhead(property: ObjectProperty): number;
|
|
128
|
+
static Serialize(writer: SaveWriter, property: ObjectProperty): void;
|
|
129
|
+
static SerializeValue(writer: SaveWriter, value: {
|
|
130
|
+
levelName: string;
|
|
131
|
+
pathName: string;
|
|
132
|
+
}): void;
|
|
133
|
+
}
|
|
134
|
+
export declare class EnumProperty extends BasicProperty {
|
|
135
|
+
value: {
|
|
136
|
+
name: string;
|
|
137
|
+
value: string;
|
|
138
|
+
};
|
|
139
|
+
constructor(value: {
|
|
140
|
+
name: string;
|
|
141
|
+
value: string;
|
|
142
|
+
}, ueType?: string, guidInfo?: GUID, index?: number);
|
|
143
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): EnumProperty;
|
|
144
|
+
static ReadValue(reader: ByteReader): string;
|
|
145
|
+
static CalcOverhead(property: EnumProperty): number;
|
|
146
|
+
static Serialize(writer: SaveWriter, property: EnumProperty): void;
|
|
147
|
+
static SerializeValue(writer: SaveWriter, value: string): void;
|
|
148
|
+
}
|
|
149
|
+
export type TextPropertyValue = {
|
|
150
|
+
flags: number;
|
|
151
|
+
historyType: number;
|
|
152
|
+
namespace?: string;
|
|
153
|
+
key?: string;
|
|
154
|
+
value?: string;
|
|
155
|
+
sourceFmt?: TextPropertyValue;
|
|
156
|
+
arguments?: {
|
|
157
|
+
name: string;
|
|
158
|
+
valueType: number;
|
|
159
|
+
argumentValue: TextPropertyValue;
|
|
160
|
+
}[];
|
|
161
|
+
sourceText?: TextPropertyValue;
|
|
162
|
+
transformType?: number;
|
|
163
|
+
hasCultureInvariantString?: boolean;
|
|
164
|
+
};
|
|
165
|
+
export declare class TextProperty extends BasicProperty {
|
|
166
|
+
value: TextPropertyValue;
|
|
167
|
+
constructor(value: TextPropertyValue, ueType?: string, guidInfo?: GUID, index?: number);
|
|
168
|
+
static Parse(reader: ByteReader, ueType: string, index?: number): TextProperty;
|
|
169
|
+
static ParseValue(reader: ByteReader): TextPropertyValue;
|
|
170
|
+
static CalcOverhead(property: TextProperty): number;
|
|
171
|
+
static Serialize(writer: SaveWriter, property: TextProperty): void;
|
|
172
|
+
static SerializeValue(writer: SaveWriter, value: TextPropertyValue): void;
|
|
173
|
+
}
|
|
174
|
+
export type BasicMultipleStructPropertyValue = {
|
|
175
|
+
values: any;
|
|
176
|
+
};
|
|
177
|
+
export type BasicStructPropertyValue = {
|
|
178
|
+
value: any;
|
|
179
|
+
};
|
|
180
|
+
export type BoxStructPropertyValue = {
|
|
181
|
+
min: vec3;
|
|
182
|
+
max: vec3;
|
|
183
|
+
isValid: boolean;
|
|
184
|
+
};
|
|
185
|
+
export type RailroadTrackPositionStructPropertyValue = {
|
|
186
|
+
root: string;
|
|
187
|
+
instanceName: string;
|
|
188
|
+
offset: number;
|
|
189
|
+
forward: number;
|
|
190
|
+
};
|
|
191
|
+
export type InventoryItemStructPropertyValue = {
|
|
192
|
+
unk1: number;
|
|
193
|
+
itemName: string;
|
|
194
|
+
unk2: string;
|
|
195
|
+
unk3: string;
|
|
196
|
+
properties: any[];
|
|
197
|
+
};
|
|
198
|
+
export type FICFrameRangeStructPropertyValue = {
|
|
199
|
+
begin: string;
|
|
200
|
+
end: string;
|
|
201
|
+
};
|
|
202
|
+
export type DynamicStructPropertyValue = {
|
|
203
|
+
type: string;
|
|
204
|
+
properties: Properties;
|
|
205
|
+
};
|
|
206
|
+
export type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue | InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | DynamicStructPropertyValue | col4 | vec3 | vec4 | string;
|
|
207
|
+
export declare class StructProperty extends AbstractBaseProperty {
|
|
208
|
+
subtype: string;
|
|
209
|
+
guid: number;
|
|
210
|
+
value: GENERIC_STRUCT_PROPERTY_VALUE;
|
|
211
|
+
unk1?: number;
|
|
212
|
+
unk2?: number;
|
|
213
|
+
unk3?: number;
|
|
214
|
+
unk4?: number;
|
|
215
|
+
constructor(subtype: string, ueType?: string, index?: number, guid?: number);
|
|
216
|
+
static Parse(reader: ByteReader, ueType: string, index: number, size: number): StructProperty;
|
|
217
|
+
static ParseValue(reader: ByteReader, subtype: string, size: number): GENERIC_STRUCT_PROPERTY_VALUE;
|
|
218
|
+
static CalcOverhead(property: StructProperty): number;
|
|
219
|
+
static Serialize(writer: SaveWriter, property: StructProperty): void;
|
|
220
|
+
static SerializeValue(writer: SaveWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE): void;
|
|
221
|
+
}
|
|
222
|
+
export type ArrayPropertyStructValueFields = {
|
|
223
|
+
allStructType: string;
|
|
224
|
+
allIndex: number;
|
|
225
|
+
allGuid: number;
|
|
226
|
+
allUnk1?: number;
|
|
227
|
+
allUnk2?: number;
|
|
228
|
+
allUnk3?: number;
|
|
229
|
+
allUnk4?: number;
|
|
230
|
+
};
|
|
231
|
+
export declare class ArrayProperty<T> extends BasicProperty {
|
|
232
|
+
subtype: string;
|
|
233
|
+
values: T[];
|
|
234
|
+
structValueFields?: ArrayPropertyStructValueFields | undefined;
|
|
235
|
+
constructor(subtype: string, values: T[], ueType?: string, index?: number, structValueFields?: ArrayPropertyStructValueFields | undefined);
|
|
236
|
+
static Parse(reader: ByteReader, ueType: string, index: number, propertyName: string): ArrayProperty<any>;
|
|
237
|
+
static CalcOverhead(property: ArrayProperty<any>): number;
|
|
238
|
+
static Serialize(writer: SaveWriter, property: ArrayProperty<any>, propertyName: string): void;
|
|
239
|
+
}
|
|
240
|
+
export declare class SetProperty<T> extends BasicProperty {
|
|
241
|
+
subtype: string;
|
|
242
|
+
values: T[];
|
|
243
|
+
constructor(subtype: string, values: T[], ueType: string, index: number);
|
|
244
|
+
static Parse(reader: ByteReader, ueType: string, index: number, propertyName: string): SetProperty<any>;
|
|
245
|
+
static CalcOverhead(property: SetProperty<any>): number;
|
|
246
|
+
static Serialize(writer: SaveWriter, property: SetProperty<any>): void;
|
|
247
|
+
}
|
|
248
|
+
export declare class MapProperty extends BasicProperty {
|
|
249
|
+
keyType: string;
|
|
250
|
+
valueType: string;
|
|
251
|
+
modeType: number;
|
|
252
|
+
modeUnk1: string | undefined;
|
|
253
|
+
modeUnk2: string;
|
|
254
|
+
modeUnk3: string;
|
|
255
|
+
remainingData: number[];
|
|
256
|
+
values: {
|
|
257
|
+
key: any;
|
|
258
|
+
value: any;
|
|
259
|
+
}[];
|
|
260
|
+
constructor(keyType: string, valueType: string, ueType: string, index: number);
|
|
261
|
+
static Parse(reader: ByteReader, propertyName: string, buildVersion: number, size: number, ueType?: string, index?: number): MapProperty;
|
|
262
|
+
static CalcOverhead(property: MapProperty): number;
|
|
263
|
+
static Serialize(writer: SaveWriter, property: MapProperty): void;
|
|
264
|
+
}
|
|
265
|
+
export declare const ParseDynamicStructData: (reader: ByteReader, buildVersion: number, type: string) => DynamicStructPropertyValue;
|
|
266
|
+
export declare const SerializeDynamicStructData: (writer: SaveWriter, buildVersion: number, data: DynamicStructPropertyValue) => void;
|
|
267
|
+
export declare const ReadFINNetworkTrace: (reader: ByteReader) => any;
|
|
268
|
+
export declare const SerializeFINNetworkTrace: (writer: SaveWriter, obj: any) => void;
|
|
269
|
+
export declare const ReadFINLuaProcessorStateStorage: (reader: ByteReader, size: number) => any;
|
|
270
|
+
export declare const SerializeFINLuaProcessorStateStorage: (writer: SaveWriter, stateStorage: any) => void;
|