From 597251a0b5aa6cb2ee0954514c0f0652160b8df8 Mon Sep 17 00:00:00 2001 From: zingballyhoo Date: Sat, 16 Nov 2024 12:09:20 +0000 Subject: [PATCH] add a build-name value helper --- TACTLib/Client/ClientHandler.cs | 2 +- TACTLib/Config/BuildConfig.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TACTLib/Client/ClientHandler.cs b/TACTLib/Client/ClientHandler.cs index fde06f0..46aa2b8 100644 --- a/TACTLib/Client/ClientHandler.cs +++ b/TACTLib/Client/ClientHandler.cs @@ -135,7 +135,7 @@ public ClientHandler(string? basePath, ClientCreateArgs createArgs) { if (IsStaticContainer) { InstallationInfo = new InstallationInfo(new Dictionary { - {"Version", ConfigHandler!.BuildConfig.Values["build-name"][0]} + {"Version", ConfigHandler!.BuildConfig.GetBuildName()} }); } else if (CreateArgs.VersionSource == ClientCreateArgs.InstallMode.Local) { InstallationInfo = new InstallationInfo(InstallationInfoFile!.Values, ProductCode!); diff --git a/TACTLib/Config/BuildConfig.cs b/TACTLib/Config/BuildConfig.cs index 61e31e2..e11a857 100644 --- a/TACTLib/Config/BuildConfig.cs +++ b/TACTLib/Config/BuildConfig.cs @@ -12,6 +12,8 @@ public class BuildConfig : Config { public SizeRecord? EncodingSize; public FileRecord? VFSRoot; + public string GetBuildName() => Values["build-name"][0]; + public BuildConfig(Stream? stream) : base(stream) { GetFileRecord("root", out var root); GetFileRecord("install", out Install);