@etothepii/satisfactory-file-parser 0.0.24 → 0.0.26

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.
Files changed (49) hide show
  1. package/LICENCE.md +21 -0
  2. package/README.md +22 -4
  3. package/dist/index.d.ts +774 -0
  4. package/dist/index.js +1 -0
  5. package/package.json +13 -8
  6. package/build/index.d.ts +0 -19
  7. package/build/index.js +0 -52
  8. package/build/parser/byte/alignment.enum.d.ts +0 -4
  9. package/build/parser/byte/alignment.enum.js +0 -8
  10. package/build/parser/byte/byte-reader.class.d.ts +0 -34
  11. package/build/parser/byte/byte-reader.class.js +0 -121
  12. package/build/parser/byte/byte-writer.class.d.ts +0 -33
  13. package/build/parser/byte/byte-writer.class.js +0 -139
  14. package/build/parser/error/parser.error.d.ts +0 -12
  15. package/build/parser/error/parser.error.js +0 -28
  16. package/build/parser/file.types.d.ts +0 -9
  17. package/build/parser/file.types.js +0 -2
  18. package/build/parser/parser.d.ts +0 -16
  19. package/build/parser/parser.js +0 -88
  20. package/build/parser/satisfactory/blueprint/blueprint-reader.d.ts +0 -18
  21. package/build/parser/satisfactory/blueprint/blueprint-reader.js +0 -124
  22. package/build/parser/satisfactory/blueprint/blueprint-writer.d.ts +0 -15
  23. package/build/parser/satisfactory/blueprint/blueprint-writer.js +0 -63
  24. package/build/parser/satisfactory/blueprint/blueprint.types.d.ts +0 -20
  25. package/build/parser/satisfactory/blueprint/blueprint.types.js +0 -2
  26. package/build/parser/satisfactory/objects/DataFields.d.ts +0 -13
  27. package/build/parser/satisfactory/objects/DataFields.js +0 -224
  28. package/build/parser/satisfactory/objects/ObjectReference.d.ts +0 -9
  29. package/build/parser/satisfactory/objects/ObjectReference.js +0 -17
  30. package/build/parser/satisfactory/objects/Property.d.ts +0 -270
  31. package/build/parser/satisfactory/objects/Property.js +0 -1001
  32. package/build/parser/satisfactory/objects/SaveComponent.d.ts +0 -16
  33. package/build/parser/satisfactory/objects/SaveComponent.js +0 -31
  34. package/build/parser/satisfactory/objects/SaveEntity.d.ts +0 -25
  35. package/build/parser/satisfactory/objects/SaveEntity.js +0 -70
  36. package/build/parser/satisfactory/objects/SaveObject.d.ts +0 -14
  37. package/build/parser/satisfactory/objects/SaveObject.js +0 -29
  38. package/build/parser/satisfactory/save/level.class.d.ts +0 -21
  39. package/build/parser/satisfactory/save/level.class.js +0 -138
  40. package/build/parser/satisfactory/save/satisfactory-save.d.ts +0 -11
  41. package/build/parser/satisfactory/save/satisfactory-save.js +0 -11
  42. package/build/parser/satisfactory/save/save-reader.d.ts +0 -44
  43. package/build/parser/satisfactory/save/save-reader.js +0 -233
  44. package/build/parser/satisfactory/save/save-writer.d.ts +0 -12
  45. package/build/parser/satisfactory/save/save-writer.js +0 -112
  46. package/build/parser/satisfactory/save/save.types.d.ts +0 -49
  47. package/build/parser/satisfactory/save/save.types.js +0 -2
  48. package/build/parser/satisfactory/structs/util.types.d.ts +0 -40
  49. package/build/parser/satisfactory/structs/util.types.js +0 -95
@@ -1,224 +0,0 @@
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
- fields.shouldBeNulled = true;
16
- return fields;
17
- }
18
- let propertyName = reader.readString();
19
- while (propertyName !== 'None') {
20
- const property = DataFields.ParseProperty(reader, buildVersion, propertyName);
21
- fields.properties.push(property);
22
- propertyName = reader.readString();
23
- }
24
- let int1 = reader.readInt32();
25
- if (int1 !== 0) {
26
- }
27
- const end = reader.getBufferPosition();
28
- let remainingBytes = start + length - end;
29
- fields.trailingData = Array.from(reader.readBytes(remainingBytes));
30
- return fields;
31
- }
32
- static ParseProperty(reader, buildVersion, propertyName) {
33
- let currentProperty = {};
34
- if (currentProperty.name === 'None') {
35
- return null;
36
- }
37
- const propertyType = reader.readString();
38
- const binarySize = reader.readInt32();
39
- const index = reader.readInt32();
40
- const before = reader.getBufferPosition();
41
- let overhead = 0;
42
- switch (propertyType) {
43
- case 'BoolProperty':
44
- currentProperty = Property_1.BoolProperty.Parse(reader, propertyType, index);
45
- overhead = Property_1.BoolProperty.CalcOverhead(currentProperty);
46
- break;
47
- case 'ByteProperty':
48
- currentProperty = Property_1.ByteProperty.Parse(reader, propertyType, index);
49
- overhead = Property_1.ByteProperty.CalcOverhead(currentProperty);
50
- break;
51
- case 'Int8Property':
52
- currentProperty = Property_1.Int8Property.Parse(reader, propertyType, index);
53
- overhead = Property_1.Int8Property.CalcOverhead(currentProperty);
54
- break;
55
- case 'UInt8Property':
56
- currentProperty = Property_1.Uint8Property.Parse(reader, propertyType, index);
57
- overhead = Property_1.Uint8Property.CalcOverhead(currentProperty);
58
- break;
59
- case 'IntProperty':
60
- case 'Int32Property':
61
- currentProperty = Property_1.Int32Property.Parse(reader, propertyType, index);
62
- overhead = Property_1.Int32Property.CalcOverhead(currentProperty);
63
- break;
64
- case 'UInt32Property':
65
- currentProperty = Property_1.Uint32Property.Parse(reader, propertyType, index);
66
- overhead = Property_1.Uint32Property.CalcOverhead(currentProperty);
67
- break;
68
- case 'Int64Property':
69
- currentProperty = Property_1.Int64Property.Parse(reader, propertyType, index);
70
- overhead = Property_1.Int64Property.CalcOverhead(currentProperty);
71
- break;
72
- case 'SingleProperty':
73
- case 'FloatProperty':
74
- currentProperty = Property_1.FloatProperty.Parse(reader, propertyType, index);
75
- overhead = Property_1.FloatProperty.CalcOverhead(currentProperty);
76
- break;
77
- case 'DoubleProperty':
78
- currentProperty = Property_1.DoubleProperty.Parse(reader, propertyType, index);
79
- overhead = Property_1.DoubleProperty.CalcOverhead(currentProperty);
80
- break;
81
- case 'StrProperty':
82
- case 'NameProperty':
83
- currentProperty = Property_1.StrProperty.Parse(reader, propertyType, index);
84
- overhead = Property_1.StrProperty.CalcOverhead(currentProperty);
85
- break;
86
- case 'ObjectProperty':
87
- case 'InterfaceProperty':
88
- currentProperty = Property_1.ObjectProperty.Parse(reader, propertyType, index);
89
- overhead = Property_1.ObjectProperty.CalcOverhead(currentProperty);
90
- break;
91
- case 'EnumProperty':
92
- currentProperty = Property_1.EnumProperty.Parse(reader, propertyType, index);
93
- overhead = Property_1.EnumProperty.CalcOverhead(currentProperty);
94
- break;
95
- case 'StructProperty':
96
- currentProperty = Property_1.StructProperty.Parse(reader, propertyType, index, binarySize);
97
- overhead = Property_1.StructProperty.CalcOverhead(currentProperty);
98
- break;
99
- case 'ArrayProperty':
100
- currentProperty = Property_1.ArrayProperty.Parse(reader, propertyType, index, propertyName);
101
- overhead = Property_1.ArrayProperty.CalcOverhead(currentProperty);
102
- break;
103
- case 'MapProperty':
104
- currentProperty = Property_1.MapProperty.Parse(reader, propertyName, buildVersion, binarySize);
105
- overhead = Property_1.MapProperty.CalcOverhead(currentProperty);
106
- break;
107
- case 'TextProperty':
108
- currentProperty = Property_1.TextProperty.Parse(reader, propertyType, index);
109
- overhead = Property_1.TextProperty.CalcOverhead(currentProperty);
110
- break;
111
- case 'SetProperty':
112
- currentProperty = Property_1.SetProperty.Parse(reader, propertyType, index, propertyName);
113
- overhead = Property_1.SetProperty.CalcOverhead(currentProperty);
114
- break;
115
- default:
116
- throw new Error(`Unimplemented type ${propertyType}`);
117
- }
118
- currentProperty.name = propertyName;
119
- const readBytes = reader.getBufferPosition() - before - overhead;
120
- if (readBytes !== binarySize) {
121
- throw new Error(`possibly corrupt. Read ${readBytes} for ${propertyType} ${propertyName}, but ${binarySize} were indicated.`);
122
- }
123
- return currentProperty;
124
- }
125
- static Serialize(writer, fields, buildVersion) {
126
- for (const property of fields.properties) {
127
- writer.writeString(property.name);
128
- DataFields.SerializeProperty(writer, property, property.name, buildVersion);
129
- }
130
- writer.writeString('None');
131
- writer.writeInt32(0);
132
- writer.writeBytesArray(fields.trailingData);
133
- }
134
- static SerializeProperty(writer, property, propertyName, buildVersion) {
135
- writer.writeString(property.ueType);
136
- const lenIndicator = writer.getBufferPosition();
137
- writer.writeInt32(0);
138
- writer.writeInt32(property.index ?? 0);
139
- const start = writer.getBufferPosition();
140
- let overhead = 0;
141
- switch (property.ueType) {
142
- case 'BoolProperty':
143
- overhead = Property_1.BoolProperty.CalcOverhead(property);
144
- Property_1.BoolProperty.Serialize(writer, property);
145
- break;
146
- case 'ByteProperty':
147
- overhead = Property_1.ByteProperty.CalcOverhead(property);
148
- Property_1.ByteProperty.Serialize(writer, property);
149
- break;
150
- case 'Int8Property':
151
- overhead = Property_1.Int8Property.CalcOverhead(property);
152
- Property_1.Int8Property.Serialize(writer, property);
153
- break;
154
- case 'UInt8Property':
155
- overhead = Property_1.Uint8Property.CalcOverhead(property);
156
- Property_1.Uint8Property.Serialize(writer, property);
157
- break;
158
- case 'IntProperty':
159
- case 'Int32Property':
160
- overhead = Property_1.Int32Property.CalcOverhead(property);
161
- Property_1.Int32Property.Serialize(writer, property);
162
- break;
163
- case 'UInt32Property':
164
- overhead = Property_1.Uint32Property.CalcOverhead(property);
165
- Property_1.Uint32Property.Serialize(writer, property);
166
- break;
167
- case 'Int64Property':
168
- overhead = Property_1.Int64Property.CalcOverhead(property);
169
- Property_1.Int64Property.Serialize(writer, property);
170
- break;
171
- case 'SingleProperty':
172
- case 'FloatProperty':
173
- overhead = Property_1.FloatProperty.CalcOverhead(property);
174
- Property_1.FloatProperty.Serialize(writer, property);
175
- break;
176
- case 'DoubleProperty':
177
- overhead = Property_1.DoubleProperty.CalcOverhead(property);
178
- Property_1.DoubleProperty.Serialize(writer, property);
179
- break;
180
- case 'StrProperty':
181
- case 'NameProperty':
182
- overhead = Property_1.StrProperty.CalcOverhead(property);
183
- Property_1.StrProperty.Serialize(writer, property);
184
- break;
185
- case 'ObjectProperty':
186
- case 'InterfaceProperty':
187
- overhead = Property_1.ObjectProperty.CalcOverhead(property);
188
- Property_1.ObjectProperty.Serialize(writer, property);
189
- break;
190
- case 'EnumProperty':
191
- overhead = Property_1.EnumProperty.CalcOverhead(property);
192
- Property_1.EnumProperty.Serialize(writer, property);
193
- break;
194
- case 'ByteProperty':
195
- overhead = Property_1.ByteProperty.CalcOverhead(property);
196
- Property_1.ByteProperty.Serialize(writer, property);
197
- break;
198
- case 'StructProperty':
199
- overhead = Property_1.StructProperty.CalcOverhead(property);
200
- Property_1.StructProperty.Serialize(writer, property);
201
- break;
202
- case 'ArrayProperty':
203
- overhead = Property_1.ArrayProperty.CalcOverhead(property);
204
- Property_1.ArrayProperty.Serialize(writer, property, propertyName);
205
- break;
206
- case 'MapProperty':
207
- overhead = Property_1.MapProperty.CalcOverhead(property);
208
- Property_1.MapProperty.Serialize(writer, property);
209
- break;
210
- case 'TextProperty':
211
- overhead = Property_1.TextProperty.CalcOverhead(property);
212
- Property_1.TextProperty.Serialize(writer, property);
213
- break;
214
- case 'SetProperty':
215
- overhead = Property_1.SetProperty.CalcOverhead(property);
216
- Property_1.SetProperty.Serialize(writer, property);
217
- break;
218
- default:
219
- throw new Error(`Unimplemented type ${property.type}`);
220
- }
221
- writer.writeBinarySizeFromPosition(lenIndicator, start + overhead);
222
- }
223
- }
224
- exports.DataFields = DataFields;
@@ -1,9 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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;
@@ -1,270 +0,0 @@
1
- import { ByteReader } from "../../byte/byte-reader.class";
2
- import { SaveWriter } from "../save/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;