@etothepii/satisfactory-file-parser 0.4.17 → 0.4.20
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/LICENSE +21 -0
- package/README.md +11 -1
- package/build/parser/satisfactory/blueprint/blueprint-reader.js +4 -0
- package/build/parser/satisfactory/blueprint/blueprint-writer.js +2 -0
- package/build/parser/satisfactory/blueprint/blueprint.types.d.ts +2 -0
- package/build/parser/satisfactory/edit/edit-constants.d.ts +4 -0
- package/build/parser/satisfactory/edit/edit-constants.js +4 -0
- package/build/parser/satisfactory/objects/DataFields.js +1 -2
- package/build/parser/satisfactory/save/save-reader.d.ts +0 -5
- package/build/parser/satisfactory/save/save-reader.js +1 -3
- package/package.json +4 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 etothepii
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Game Version Files of U5 and below are NOT supported.
|
|
|
18
18
|
| <= U5 | ❌ |
|
|
19
19
|
| U6 + U7 | ✅ 0.0.1 - 0.0.34 |
|
|
20
20
|
| U8 | ✅ 0.1.20 - 0.3.7 |
|
|
21
|
-
| U1.0 | ✅ >= 0.4.
|
|
21
|
+
| U1.0 | ✅ >= 0.4.20 |
|
|
22
22
|
|
|
23
23
|
# Installation via npm
|
|
24
24
|
`npm install @etothepii/satisfactory-file-parser`
|
|
@@ -143,6 +143,16 @@ So far this was just a private hobby project. But i figure some people actually
|
|
|
143
143
|
If you find a bug or have feedback about the parser, you can just hit me up on the satisfactory discord `etothepii`.
|
|
144
144
|
|
|
145
145
|
# Changelog
|
|
146
|
+
### [0.4.20] (2024-10-06)
|
|
147
|
+
#### bugfix
|
|
148
|
+
* added parsing of icon library reference to parsing blueprints.
|
|
149
|
+
|
|
150
|
+
### [0.4.19] (2024-10-06)
|
|
151
|
+
#### Migrated repo to public github
|
|
152
|
+
|
|
153
|
+
### [0.4.18] (2024-10-05)
|
|
154
|
+
#### updated README
|
|
155
|
+
|
|
146
156
|
### [0.4.17] (2024-10-05)
|
|
147
157
|
#### updated README
|
|
148
158
|
#### bugfix
|
|
@@ -137,10 +137,14 @@ class BlueprintConfigReader extends byte_reader_class_1.ByteReader {
|
|
|
137
137
|
const description = reader.readString();
|
|
138
138
|
const iconID = reader.readInt32();
|
|
139
139
|
const color = util_types_1.col4.ParseRGBA(reader);
|
|
140
|
+
const referencedIconLibrary = reader.readString();
|
|
141
|
+
const iconLibraryType = reader.readString();
|
|
140
142
|
return {
|
|
141
143
|
description,
|
|
142
144
|
color,
|
|
143
145
|
iconID,
|
|
146
|
+
referencedIconLibrary,
|
|
147
|
+
iconLibraryType
|
|
144
148
|
};
|
|
145
149
|
}
|
|
146
150
|
}
|
|
@@ -82,6 +82,8 @@ class BlueprintConfigWriter extends byte_writer_class_1.ByteWriter {
|
|
|
82
82
|
writer.writeString(config.description);
|
|
83
83
|
writer.writeInt32(config.iconID);
|
|
84
84
|
util_types_1.col4.SerializeRGBA(writer, config.color);
|
|
85
|
+
writer.writeString(config.referencedIconLibrary);
|
|
86
|
+
writer.writeString(config.iconLibraryType);
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
exports.BlueprintConfigWriter = BlueprintConfigWriter;
|
|
@@ -1807,6 +1807,10 @@ export declare const EDIT: {
|
|
|
1807
1807
|
readonly TYPE_PATH: "/Game/FactoryGame/Buildable/Factory/ProjectAssembly/BP_ProjectAssembly.BP_ProjectAssembly_C";
|
|
1808
1808
|
readonly CLASS_NAME: "BP_ProjectAssembly_C";
|
|
1809
1809
|
};
|
|
1810
|
+
readonly SPACE_ELEVATOR: {
|
|
1811
|
+
readonly TYPE_PATH: "/Game/FactoryGame/Buildable/Factory/SpaceElevator/Build_SpaceElevator.Build_SpaceElevator_C";
|
|
1812
|
+
readonly CLASS_NAME: "Build_SpaceElevator_C";
|
|
1813
|
+
};
|
|
1810
1814
|
readonly EXTRACTOR: {
|
|
1811
1815
|
readonly MINER_MK_1: {
|
|
1812
1816
|
readonly TYPE_PATH: "/Game/FactoryGame/Buildable/Factory/MinerMK1/Build_MinerMk1.Build_MinerMk1_C";
|
|
@@ -1813,6 +1813,10 @@ exports.EDIT = {
|
|
|
1813
1813
|
TYPE_PATH: '/Game/FactoryGame/Buildable/Factory/ProjectAssembly/BP_ProjectAssembly.BP_ProjectAssembly_C',
|
|
1814
1814
|
CLASS_NAME: 'BP_ProjectAssembly_C'
|
|
1815
1815
|
},
|
|
1816
|
+
SPACE_ELEVATOR: {
|
|
1817
|
+
TYPE_PATH: '/Game/FactoryGame/Buildable/Factory/SpaceElevator/Build_SpaceElevator.Build_SpaceElevator_C',
|
|
1818
|
+
CLASS_NAME: 'Build_SpaceElevator_C'
|
|
1819
|
+
},
|
|
1816
1820
|
EXTRACTOR: {
|
|
1817
1821
|
MINER_MK_1: {
|
|
1818
1822
|
TYPE_PATH: '/Game/FactoryGame/Buildable/Factory/MinerMK1/Build_MinerMk1.Build_MinerMk1_C'
|
|
@@ -50,8 +50,7 @@ class DataFields {
|
|
|
50
50
|
reader.readInt32();
|
|
51
51
|
const remainingLen = length - (reader.getBufferPosition() - start);
|
|
52
52
|
obj.specialProperties = DataFields.ParseAdditionalSpecialProperties(reader, typePath, remainingLen);
|
|
53
|
-
const
|
|
54
|
-
const remainingSize = length - (end - start);
|
|
53
|
+
const remainingSize = length - (reader.getBufferPosition() - start);
|
|
55
54
|
if (remainingSize > 0) {
|
|
56
55
|
obj.trailingData = Array.from(reader.readBytes(remainingSize));
|
|
57
56
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ByteReader } from "../../byte/byte-reader.class";
|
|
2
2
|
import { ChunkCompressionInfo } from "../../file.types";
|
|
3
|
-
import { ObjectReference } from "../objects/values/ObjectReference";
|
|
4
|
-
import { Level } from "./level.class";
|
|
5
3
|
import { RoughSaveVersion, SatisfactorySaveHeader } from "./save.types";
|
|
6
|
-
export type ReadMode = 'stream' | 'whole';
|
|
7
4
|
export declare const DEFAULT_SATISFACTORY_CHUNK_HEADER_SIZE = 49;
|
|
8
5
|
export type ByteArray4 = [number, number, number, number];
|
|
9
6
|
export type Grids = {
|
|
@@ -19,8 +16,6 @@ export type Grids = {
|
|
|
19
16
|
export declare class SaveReader extends ByteReader {
|
|
20
17
|
onProgressCallback: (progress: number, msg?: string) => void;
|
|
21
18
|
header: SatisfactorySaveHeader | undefined;
|
|
22
|
-
levels: Level[];
|
|
23
|
-
trailingCollectedObjects: ObjectReference[];
|
|
24
19
|
compressionInfo: ChunkCompressionInfo;
|
|
25
20
|
static readonly EPOCH_TICKS = 621355968000000000n;
|
|
26
21
|
constructor(fileBuffer: ArrayBuffer, onProgressCallback?: (progress: number, msg?: string) => void);
|
|
@@ -14,8 +14,6 @@ class SaveReader extends byte_reader_class_1.ByteReader {
|
|
|
14
14
|
constructor(fileBuffer, onProgressCallback = () => { }) {
|
|
15
15
|
super(fileBuffer, alignment_enum_1.Alignment.LITTLE_ENDIAN);
|
|
16
16
|
this.onProgressCallback = onProgressCallback;
|
|
17
|
-
this.levels = [];
|
|
18
|
-
this.trailingCollectedObjects = [];
|
|
19
17
|
this.compressionInfo = {
|
|
20
18
|
packageFileTag: 0,
|
|
21
19
|
maxUncompressedChunkContentSize: 0,
|
|
@@ -50,7 +48,7 @@ class SaveReader extends byte_reader_class_1.ByteReader {
|
|
|
50
48
|
readGrid(758);
|
|
51
49
|
readGrid(0);
|
|
52
50
|
readGrid(0);
|
|
53
|
-
|
|
51
|
+
this.readInt32();
|
|
54
52
|
return grids;
|
|
55
53
|
};
|
|
56
54
|
}
|
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.
|
|
4
|
+
"version": "0.4.20",
|
|
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",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "
|
|
24
|
+
"url": "https://github.com/etothepii4/satisfactory-file-parser.git"
|
|
25
25
|
},
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"bugs": {
|
|
28
|
-
"url": "https://
|
|
28
|
+
"url": "https://github.com/etothepii4/satisfactory-file-parser/issues"
|
|
29
29
|
},
|
|
30
|
-
"homepage": "https://
|
|
30
|
+
"homepage": "https://github.com/etothepii4/satisfactory-file-parser#readme",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/jest": "^29.5.0",
|
|
33
33
|
"@types/node": "^18.15.10",
|