New exchange string format for enemy expansion settings

This commit is contained in:
Cooldude2606 committed 2026-07-18 22:12:15 +01:00
1 parent 07b030d045
commit 8b4c8ad337
8 files changed
+255 -17

No files matched your search

+9 -2
View File
@@ -1150,8 +1150,15 @@ describe("Integration of Clusterio", function() {
await execCtl("instance start 44");
const instance = (await getInstances()).get(44);
const isV2 = lib.integerPartialVersion(instance.factorioVersion) > lib.integerPartialVersion("2.0");
const exchangeString = (isV2 ? testStrings.modified_v2 : testStrings.modified).replace(/[\n\r]+/g, "");
const args = `base/freeplay --seed 1234 --map-exchange-string "${exchangeString}"`;
const isV2_1 = lib.integerPartialVersion(instance.factorioVersion) > lib.integerPartialVersion("2.1");
let exchangeString = testStrings.modified;
if (isV2_1) {
exchangeString = testStrings.modified_v2_1;
} else if (isV2) {
exchangeString = testStrings.modified_v2;
}
// eslint-disable-next-line max-len
const args = `base/freeplay --seed 1234 --map-exchange-string "${exchangeString.replace(/[\n\r]+/g, "")}"`;
await execCtl("instance stop 44");
await execCtl(`instance load-scenario test ${args}`);
+2 -2
View File
@@ -382,8 +382,8 @@ before(async function() {
const testPack = lib.ModPack.fromJSON({});
testPack.id = 12;
testPack.name = "subspace_storage-pack";
testPack.factorioVersion = "2.0.0";
testPack.mods.set("clusterio_lib", { name: "clusterio_lib", enabled: true, version: "2.0.20" });
testPack.factorioVersion = "2.1";
testPack.mods.set("clusterio_lib", { name: "clusterio_lib", enabled: true, version: "2.0.21" });
await control.sendTo("controller", new lib.ModPackCreateRequest(testPack));
await control.sendTo(
"controller",