Open abesto opened 4 years ago
Managed to dig out the .lua
source for the recipe in the example:
{
type = "recipe",
name = "cobalt-oxide-from-copper",
icon = "__bobplates__/graphics/icons/copper-cobalt-oxide.png",
icon_size = 32,
subgroup = "bob-material-chemical",
order = "c-b[cobalt-oxide-from-copper]",
category = "chemical-furnace",
energy_required = 25,
enabled = false,
ingredients =
{
{type = "item", name = "copper-ore", amount = 7},
{type = "item", name = "stone", amount = 1},
{type = "item", name = "carbon", amount = 1},
{type = "fluid", name = "hydrogen", amount = 5},
},
results=
{
{type = "item", name = "copper-plate", amount_min = 7, amount_max = 11},
{type = "item", name = "cobalt-oxide", amount_min = 1, amount_max = 3},
},
main_product= "copper-plate",
allow_decomposition = false
},
And verified with an fmt.Println
that the incorrect data is already present in getJSON()
after executing the Lua stuff.
The output of
factoriodump
on my (heavily modded, details below) installation includes entries with"results": [ [] ]
that he web UI barfs on. Looking at the rest of the JSON file, it looks like this is indeed not valid content.local-0.17.66.json
: https://gist.github.com/abesto/df511c5a0c5cac980ed643401b23bf3cfactoriodump -v
: https://gist.github.com/abesto/eb2eba85dd2300f9343969217d88f08eExample
Environment
ls mods
,mod-list.json
factorio-tools
: 8c66310f5e024dc5772787682acfd62e66bc0a20factorio-tools
was built and executed in a Docker image built from thisDockerfile
: https://gist.github.com/abesto/d249d7add8ef2b10b8e71b08b9690876Side-note
I understand this is probably a weird edge-case that only comes up with tons of complex mods. Then again, a calculator is especially useful in such a playthrough. And who knows, maybe it's an easy fix, or highlights some other problem that was hiding so far, so thought I'd submit this anyway.
🌈