mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Add warnings to web ui
This commit is contained in:
3 files changed
+15
-3
No files matched your search
@@ -3,7 +3,7 @@ import * as classes from "./classes";
|
||||
import * as validate from "./validators";
|
||||
import type { PluginNodeEnvInfo, PluginWebpackEnvInfo } from "../plugin";
|
||||
import { Static } from "@sinclair/typebox";
|
||||
import { isTargetVersion } from "../data";
|
||||
import { isTargetVersion } from "../data/version";
|
||||
|
||||
type configFromJSON<T> = (...args: Parameters<typeof classes.Config.fromJSON>) => T;
|
||||
type configFromFile<T> = (...args: Parameters<typeof classes.Config.fromFile>) => Promise<T>;
|
||||
@@ -574,7 +574,7 @@ export class InstanceConfig extends classes.Config<InstanceConfigFields> {
|
||||
initialValue: 5,
|
||||
extendedValidation: function(value, config) {
|
||||
const factorioSettings = config.get("factorio.settings");
|
||||
const autosaveSlots = factorioSettings.autosave_slot;
|
||||
const autosaveSlots = factorioSettings.autosave_slots;
|
||||
if (typeof autosaveSlots === "number" && value < autosaveSlots) {
|
||||
throw new Error("Value cannot be less than the number of autosave slots");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import path from "node:path";
|
||||
import path from "path";
|
||||
|
||||
/** Combine multiple validators into a single one. */
|
||||
export function all<V, C> (
|
||||
|
||||
Reference in new issue
Block a user