From 1a70f3f04f39c1ce31d9fcb2e69a22ad67d353a6 Mon Sep 17 00:00:00 2001 From: limepotato Date: Fri, 16 Feb 2024 14:02:09 -0700 Subject: [PATCH] Da config version --- src/main/kotlin/org/bm00/DataAccessor/Config.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/bm00/DataAccessor/Config.kt b/src/main/kotlin/org/bm00/DataAccessor/Config.kt index 694367c..2f7865f 100644 --- a/src/main/kotlin/org/bm00/DataAccessor/Config.kt +++ b/src/main/kotlin/org/bm00/DataAccessor/Config.kt @@ -41,7 +41,13 @@ class Config { } //Convert values from the config file to in-code variables, // so we can use them later, also make them public because I said so. - val configVersion: Int = (prop.getProperty("configVersion")).toInt() + val configVersion = + if ((prop.getProperty("configVersion")).toInt() == 1) { + println("Correct config version set!") + } + else { + throw Exception("The config version is not correct! Correct version is: " + 1) + } // Possible answers: SWING, XTERM, ECMA48 val backendType =