Socket
Socket
Sign inDemoInstall

satisfactory-json

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

satisfactory-json - npm Package Compare versions

Comparing version 0.0.38 to 0.0.39

43

lib/transforms/transform.js

@@ -64,4 +64,8 @@ "use strict";

.arr('actors')
.elem('_index')
.exec(function (ctx) { return (ctx.obj.type = ctx.tmp._type); });
.elem('_actorIndex')
.exec(function (ctx) {
ctx.obj.type = ctx.tmp._type;
ctx.tmp._objectTypes[ctx.tmp._index] = 1;
ctx.tmp._actorIndex++;
});
transformActor(bldr);

@@ -72,8 +76,9 @@ bldr.endElem().endArr();

bldr
.exec(function (ctx) {
return (ctx.tmp._componentIndex = ctx.tmp._index - ctx.obj.actors.length);
})
.arr('components')
.elem('_componentIndex')
.exec(function (ctx) { return (ctx.obj.type = ctx.tmp._type); });
.exec(function (ctx) {
ctx.obj.type = ctx.tmp._type;
ctx.tmp._componentIndex++;
ctx.tmp._objectTypes[ctx.tmp._index] = 0;
});
transformComponent(bldr);

@@ -88,2 +93,9 @@ bldr.endElem().endArr();

.int('_entryCount', function (ctx) { return ctx.obj.actors.length + ctx.obj.components.length; })
.exec(function (ctx) {
// In very rare cases, actors can follow the components. Therefore we need to count the indices seperately and cannot rely on _componentIndex = _index - ctx.actors.length
ctx.tmp._actorIndex = 0;
ctx.tmp._componentIndex = 0;
// To correctly assign the entities, we still need to store whether it was an entity or a component
ctx.tmp._objectTypes = [];
})
.loop('_entryCount', function (builder) {

@@ -95,11 +107,17 @@ builder

.int('_entryCount')
.exec(function (ctx) {
ctx.tmp._actorIndex = 0;
ctx.tmp._componentIndex = 0;
})
.loop('_entryCount', function (builder) {
builder.emitEntityProgress(50, 50).if(function (ctx) { return ctx.tmp._index < ctx.obj.actors.length; }, function (builder) {
builder.emitEntityProgress(50, 50).if(function (ctx) { return ctx.tmp._objectTypes[ctx.tmp._index] === 1; }, //ctx.tmp._index < ctx.obj.actors.length,
function (builder) {
builder
.exec(function (ctx) {
ctx.tmp._withNames = true;
ctx.tmp._className = ctx.obj.actors[ctx.tmp._index].className;
ctx.tmp._className =
ctx.obj.actors[ctx.tmp._actorIndex].className;
})
.obj('actors')
.elem('_index')
.elem('_actorIndex')
.obj('entity')

@@ -109,3 +127,4 @@ .call(TransformationEngine_1.RegisteredFunction.transformEntity)

.endElem()
.endObj();
.endObj()
.exec(function (ctx) { return ctx.tmp._actorIndex++; });
}, function (builder) {

@@ -115,3 +134,2 @@ builder

ctx.tmp._withNames = false;
ctx.tmp._componentIndex = ctx.tmp._index - ctx.obj.actors.length;
ctx.tmp._className =

@@ -126,3 +144,4 @@ ctx.obj.components[ctx.tmp._componentIndex].className;

.endElem()
.endObj();
.endObj()
.exec(function (ctx) { return ctx.tmp._componentIndex++; });
});

@@ -129,0 +148,0 @@ })

{
"name": "satisfactory-json",
"version": "0.0.39",
"description": "Convert Satisfactory save files to JSON and back",
"author": "ficsit-felix",

@@ -7,3 +10,2 @@ "dependencies": {

},
"description": "Convert Satisfactory save files to JSON and back",
"devDependencies": {

@@ -28,3 +30,2 @@ "@types/node": "^14.0.1",

"main": "lib/index.js",
"name": "satisfactory-json",
"publishConfig": {

@@ -49,4 +50,3 @@ "access": "public"

"minimist": "1.2.5"
},
"version": "0.0.38"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc