mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 07:30:41 +09:00
New exchange string format for enemy expansion settings
This commit is contained in:
8 files changed
+255
-17
No files matched your search
@@ -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}`);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user