satisfactory-json
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -457,2 +457,7 @@ "use strict"; | ||
writeRailroadSubsystemExtra(entity) { | ||
// Workaround for broken savegames in the experimental version | ||
if (entity.extra === undefined) { | ||
this.buffer.writeInt(0); | ||
return; | ||
} | ||
this.buffer.writeInt(entity.extra.trains.length); | ||
@@ -459,0 +464,0 @@ for (const train of entity.extra.trains) { |
@@ -188,2 +188,5 @@ "use strict"; | ||
saveJson.missing = this.buffer.readHex(this.buffer.buffer.length - this.buffer.cursor); | ||
if (this.buffer.buffer.length - this.buffer.cursor > 0) { | ||
console.warn('global missing data found: ' + saveJson.missing); | ||
} | ||
return saveJson; | ||
@@ -252,2 +255,4 @@ } | ||
entity.missing = buffer.readHex(missing); | ||
console.warn('missing data found in entity of type ' + className + | ||
': ' + entity.missing); | ||
} | ||
@@ -676,3 +681,3 @@ else if (missing < 0) { | ||
case '/Game/FactoryGame/-Shared/Blueprint/BP_RailroadSubsystem.BP_RailroadSubsystem_C': | ||
this.readRailroadSubsystemExtra(entity); | ||
this.readRailroadSubsystemExtra(entity, length); | ||
break; | ||
@@ -751,3 +756,7 @@ case '/Game/FactoryGame/Character/Player/BP_PlayerState.BP_PlayerState_C': | ||
} | ||
readRailroadSubsystemExtra(entity) { | ||
readRailroadSubsystemExtra(entity, length) { | ||
// Workaround for broken savegames in the experimental version | ||
if (this.buffer.bytesRead >= length) { | ||
return; | ||
} | ||
const trainCount = this.buffer.readInt(); | ||
@@ -754,0 +763,0 @@ const trains = []; |
{ | ||
"name": "satisfactory-json", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Convert Satisfactory save files to JSON and back", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63422
1542