mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
Implement mod pack loading for shared mods
Wipe and reconstruct the instances' mods/ folder using the configured ModPack for the case were the mods folder is shared with the master server. This assumes the master server will check the mod checksums before sending the start request.
This commit is contained in:
1 parent
0ebb2f5858
commit
fb4ffaffed
14 files changed
+124
-165
No files matched your search
@@ -265,6 +265,7 @@ describe("Integration of Clusterio", function() {
|
||||
);
|
||||
await execCtl(`instance config set-prop test factorio.settings visibility "'${value}'"`);
|
||||
await execCtl("instance config set-prop test factorio.settings require_user_verification false");
|
||||
await execCtl("instance config set test factorio.mod_pack 12");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ const phin = require("phin");
|
||||
const util = require("util");
|
||||
const events = require("events");
|
||||
|
||||
const libData = require("@clusterio/lib/data");
|
||||
const libLink = require("@clusterio/lib/link");
|
||||
const { LineSplitter } = require("@clusterio/lib/stream");
|
||||
const { ConsoleTransport, logger } = require("@clusterio/lib/logging");
|
||||
@@ -220,6 +221,14 @@ before(async function() {
|
||||
controlConnector.token = controlToken;
|
||||
control = new TestControl(controlConnector);
|
||||
await controlConnector.connect();
|
||||
|
||||
const testPack = new libData.ModPack();
|
||||
testPack.id = 12;
|
||||
testPack.name = "subspace_storage-pack";
|
||||
testPack.factorioVersion = "1.1.0";
|
||||
testPack.mods.set("subspace_storage", { name: "clusterio_lib", enabled: true, version: "0.1.2" });
|
||||
testPack.mods.set("subspace_storage", { name: "subspace_storage", enabled: true, version: "1.99.8" });
|
||||
libLink.messages.createModPack.send(control, { mod_pack: testPack.toJSON() });
|
||||
});
|
||||
|
||||
after(async function() {
|
||||
|
||||
Reference in new issue
Block a user