Data Exporter to JSON


Outputs|Exports a JSON file to /script-output/recipe-lister that lists all recipes, crafting machines, mining drills, belts, inserters, resources, items, fluids, and technologies loaded on player creation. Settings for split files and toggles for each category

Utilities
3 years ago
0.16 - 1.1
777

i Export localised names

3 years ago

I've found a way to output localized names of prototypes to disk, how can I add this case here?

function printLocalisedName(folder, filename, object)
game.write_file(folder .. filename, object.name, true)
game.write_file(folder .. filename, "|", true)
if object.localised_name then
game.write_file(folder .. filename, {object.localised_name[1]}, true)
end
game.write_file(folder .. filename, "|", true)
if object.localised_description then
game.write_file(folder .. filename, {object.localised_description[1]}, true)
end
game.write_file(folder .. filename, "|\n", true)
return object.name
end

            outdata[t][prototype.name] = data

            printLocalisedName(folder, t .. ".txt",prototype)

New response