mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Allow disabling player online autosaves (#971)
This commit is contained in:
1 parent
03f2616f30
commit
0be4fd77e5
3 files changed
+11
-1
No files matched your search
@@ -575,7 +575,7 @@ export class InstanceConfig extends classes.Config<InstanceConfigFields> {
|
||||
validator: function(value, config) {
|
||||
const factorioSettings = config.get("factorio.settings");
|
||||
const autosaveSlots = factorioSettings.autosave_slots;
|
||||
if (typeof autosaveSlots === "number" && value < autosaveSlots) {
|
||||
if (value !== 0 && typeof autosaveSlots === "number" && value < autosaveSlots) {
|
||||
throw new Error("Value cannot be less than the number of autosave slots");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user