From daf1cf8a11e956aa21b2f694a7ec236c12ad6133 Mon Sep 17 00:00:00 2001 From: jvyden Date: Fri, 18 Mar 2022 16:26:47 -0400 Subject: [PATCH] Add configuration option to disable asset conversion on startup --- ProjectLighthouse/Program.cs | 2 +- ProjectLighthouse/Types/Settings/ServerSettings.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ProjectLighthouse/Program.cs b/ProjectLighthouse/Program.cs index 0fcfaab5..020dc50b 100644 --- a/ProjectLighthouse/Program.cs +++ b/ProjectLighthouse/Program.cs @@ -78,7 +78,7 @@ public static class Program return; } - FileHelper.ConvertAllTexturesToPng(); + if (ServerSettings.Instance.ConvertAssetsOnStartup) FileHelper.ConvertAllTexturesToPng(); Logger.Log("Starting room cleanup thread...", LoggerLevelStartup.Instance); RoomHelper.StartCleanupThread(); diff --git a/ProjectLighthouse/Types/Settings/ServerSettings.cs b/ProjectLighthouse/Types/Settings/ServerSettings.cs index 06c7ff72..fc356ac8 100644 --- a/ProjectLighthouse/Types/Settings/ServerSettings.cs +++ b/ProjectLighthouse/Types/Settings/ServerSettings.cs @@ -5,7 +5,6 @@ using System.Text.Json; using System.Text.Json.Serialization; using JetBrains.Annotations; using Kettu; -using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Logging; namespace LBPUnion.ProjectLighthouse.Types.Settings; @@ -13,7 +12,7 @@ namespace LBPUnion.ProjectLighthouse.Types.Settings; [Serializable] public class ServerSettings { - public const int CurrentConfigVersion = 25; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE! + public const int CurrentConfigVersion = 26; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE! private static FileSystemWatcher fileWatcher; static ServerSettings() { @@ -163,6 +162,8 @@ public class ServerSettings public string ServerListenUrl { get; set; } = "http://localhost:10060"; + public bool ConvertAssetsOnStartup { get; set; } = true; + #region SMTP public bool SMTPEnabled { get; set; }