mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Unpatch saves started with save patching disabled
Turning factorio.enable_save_patching off did nothing to a save that was patched before. Its control.lua still loaded every module, so the clusterio_api interface, player_sync's join handling and the other module event handlers kept running with no plugin on the host side. When patching is disabled the instance now restores the original control.lua that patching kept as scenario.lua and removes the module files, locale files included, as listed in clusterio.json. The patch info stays with an empty module list so the patch number keeps counting. Otherwise patching the save again would reuse the number stored in the game and on_server_startup would not be raised. Data the modules put in storage is left alone. PatchInfo.fromSave dropped the version read from the save, so the check against newer patch versions never fired. It now keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6eaf48aefe
commit
ca3dbab49d
6 files changed
+229
-49
No files matched your search
@@ -27,6 +27,7 @@ The save patching is based on the built in [event_handler](https://github.com/wu
|
||||
Mods on the other hand work without modifications.
|
||||
|
||||
This can be disabled with the `factorio.enable_save_patching` config on a per instance basis, however disabling it means that modules are not loaded into the game and most plugins will not function.
|
||||
A save that was patched before has its modules removed again when it's started with save patching disabled.
|
||||
To use the modules outside of Clusterio the `npx clusteriohost create-scenario` command creates a scenario with the modules patched into it.
|
||||
Note that the IPC between the game and the host is not available outside of Clusterio, so modules that depend on it will not work as expected in such a scenario.
|
||||
|
||||
|
||||
Reference in new issue
Block a user