Add checks for updated version on disk

This commit is contained in:
Cooldude2606 committed 2025-04-27 23:57:58 +01:00
1 parent 96c5f33dbe
commit c120443657
5 files changed
+42 -1

No files matched your search

+14
View File
@@ -4,6 +4,7 @@ import type { PluginNodeEnvInfo, PluginWebpackEnvInfo } from "../plugin";
import { Static } from "@sinclair/typebox";
export interface ControllerConfigFields {
"controller.version": string;
"controller.name": string;
"controller.mods_directory": string;
"controller.database_directory": string;
@@ -46,6 +47,12 @@ export class ControllerConfig extends classes.Config<ControllerConfigFields> {
}
static fieldDefinitions: classes.ConfigDefs<ControllerConfigFields> = {
"controller.version": {
type: "string",
initialValue: "", // Set on start
readonly: ["controller"],
hidden: true,
},
"controller.name": {
title: "Name",
description: "Name of the cluster.",
@@ -215,6 +222,7 @@ export class ControllerConfig extends classes.Config<ControllerConfigFields> {
}
export interface HostConfigFields {
"host.version": string;
"host.name": string;
"host.id": number;
"host.factorio_directory": string;
@@ -237,6 +245,12 @@ export interface HostConfigFields {
export class HostConfig extends classes.Config<HostConfigFields> {
declare static fromJSON: (json: classes.ConfigSchema, location: classes.ConfigLocation) => HostConfig;
static fieldDefinitions: classes.ConfigDefs<HostConfigFields> = {
"host.version": {
type: "string",
initialValue: "", // Set on start
readonly: ["host"],
hidden: true,
},
"host.name": {
description: "Name of the host",
type: "string",