Add warnings to web ui

This commit is contained in:
Cooldude2606 committed 2026-03-04 00:28:29 +00:00
1 parent d0604f892b
commit b2daf26e6c
3 files changed
+15 -3

No files matched your search

+2 -2
View File
@@ -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 -1
View File
@@ -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> (