Implement export of item icons and locale

Add mod and command for exporting the Factorio locale including mods,
and item icons assemled into a sprite sheet including mods.
This commit is contained in:
Hornwitser committed 2020-05-26 01:11:49 +02:00
1 parent d1b851d890
commit 260f976fa3
28 files changed
+642 -247

No files matched your search

+8 -13
View File
@@ -8,19 +8,6 @@ const { slowTest, get, exec, controlConfigPath, instancesDir } = require("./inde
describe("Integration of Clusterio", function() {
describe("master http api", function() {
describe("GET /api/getFactorioLocale", function() {
it("should get the basegame factorio locale", async function() {
let res = await get("/api/getFactorioLocale");
let object = res.body;
// test that it is looks like a factorio locale
assert.equal(typeof object, "object");
assert.equal(object["entity-name"]["fish"], "Fish");
assert.equal(object["entity-name"]["small-lamp"], "Lamp");
});
});
});
parallel("master web interface", function() {
this.timeout(6000);
@@ -71,6 +58,14 @@ describe("Integration of Clusterio", function() {
});
});
describe("export-data", function() {
it("exports the data", async function() {
slowTest(this);
await exec(`node clusterctl --config ${controlConfigPath} export-data --instance test`);
assert(await fs.exists(path.join("temp", "export.zip")), "Export was not created");
});
});
describe("start-instance", function() {
it("starts the instance", async function() {
slowTest(this);