mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add option to disable save patching
Add factorio.enable_save_patching config entry to allow disabling the save patching done on startup. This is for running vannila games or scenarios that are not compatible with Clusterio.
This commit is contained in:
1 parent
0969e07d79
commit
9458155a1b
6 files changed
+43
-2
No files matched your search
@@ -195,6 +195,20 @@ where appropriate. See [Configuration System](configuration-system.md)
|
||||
for more details on how this system works.
|
||||
|
||||
|
||||
### Handling Invalid Configuration
|
||||
|
||||
If the plugin requires a certain feature to be enabled to function it
|
||||
should throw an error during init if this is not the case. The most
|
||||
common such feature is the save patching, which can be disabled to run
|
||||
vanilla or scenarios not compatible with Clusterio. For example:
|
||||
|
||||
async init() {
|
||||
if (!this.instance.config.get("factorio.enable_save_patching")) {
|
||||
throw new Error("foo_frobber plugin requires save patching.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Communicating with Factorio
|
||||
---------------------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user