Refuse to start without required mods and download them

requiredMods entries are now Factorio dependency strings, and a mod
listed twice gives a version range. The plugin loader validates them.

The host refuses to start an instance whose mod pack is missing a
required mod of a loaded plugin, has it disabled or has it outside the
version range.

On start the controller resolves the required mods of its plugins and
their dependencies for the default mod pack's Factorio version and
downloads the ones missing from the mod store. The resolver and portal
download move from the ControlConnection handlers into Controller
methods so both paths share them.

Subspace Storage requires subspace_storage >= 1.99.0, and the
integration tests build a stub of that mod for the test mod pack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-11-19 15:19:05 +00:00
1 parent a845b7ac52
commit bf33f4f52e
12 files changed
+437 -240

No files matched your search

+2 -2
View File
@@ -13,8 +13,8 @@ Run the following commands in the folder Clusterio is installed to:
Substitute clusteriocontroller with clusteriohost or clusterioctl if this a dedicate host or ctl installation respectively.
The plugin needs the [Subspace Storage mod](https://mods.factorio.com/mod/subspace_storage) in the mod pack of every instance it is loaded on.
Instances started without it log a warning, and the plugin's commands fail in game.
Set `subspace_storage.load_plugin` to false on instances that should not use it.
The controller downloads it from the mod portal on start if the Factorio credentials are configured, but you have to add it to the mod packs yourself.
Instances with the plugin loaded refuse to start without it. Set `subspace_storage.load_plugin` to false on instances that should not use it.
## Controller Configuration
+1 -1
View File
@@ -19,7 +19,7 @@ export const plugin: lib.PluginDeclaration = {
title: "Subspace Storage",
description: "Provides shared storage across instances for the Subspace Storage mod",
instanceEntrypoint: "dist/node/instance.js",
requiredMods: ["subspace_storage"],
requiredMods: ["subspace_storage >= 1.99.0"],
instanceConfigFields: {
"subspace_storage.log_item_transfers": {
title: "Log Item Transfers",