Dont store the room list in RoomHelper

This commit is contained in:
jvyden 2022-06-01 16:45:31 -04:00
parent 48d8cb1a02
commit 422b1268ca
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
3 changed files with 6 additions and 6 deletions

View file

@ -28,9 +28,9 @@ public static class ServerStatics
public static bool IsUnitTesting => AppDomain.CurrentDomain.GetAssemblies().Any(assembly => assembly.FullName!.StartsWith("xunit")); public static bool IsUnitTesting => AppDomain.CurrentDomain.GetAssemblies().Any(assembly => assembly.FullName!.StartsWith("xunit"));
#if DEBUG #if DEBUG
public static readonly bool IsDebug = true; public const bool IsDebug = true;
#else #else
public static readonly bool IsDebug = false; public const bool IsDebug = false;
#endif #endif
/// <summary> /// <summary>

View file

@ -16,7 +16,7 @@ namespace LBPUnion.ProjectLighthouse.Match.Rooms;
public class RoomHelper public class RoomHelper
{ {
public static readonly StorableList<Room> Rooms = RoomStore.GetRooms(); public static StorableList<Room> Rooms => RoomStore.GetRooms();
public static void StartCleanupThread() public static void StartCleanupThread()
{ {

View file

@ -33,7 +33,7 @@ public static class StartupTasks
Logger.Info($"Welcome to the Project Lighthouse {serverType.ToString()}!", LogArea.Startup); Logger.Info($"Welcome to the Project Lighthouse {serverType.ToString()}!", LogArea.Startup);
Logger.Info($"You are running version {VersionHelper.FullVersion}", LogArea.Startup); Logger.Info($"You are running version {VersionHelper.FullVersion}", LogArea.Startup);
// Referencing ServerSettings.Instance here loads the config, see ServerSettings.cs for more information // Referencing ServerConfiguration.Instance here loads the config, see ServerConfiguration.cs for more information
Logger.Success("Loaded config file version " + ServerConfiguration.Instance.ConfigVersion, LogArea.Startup); Logger.Success("Loaded config file version " + ServerConfiguration.Instance.ConfigVersion, LogArea.Startup);
Logger.Info("Connecting to the database...", LogArea.Startup); Logger.Info("Connecting to the database...", LogArea.Startup);
@ -44,7 +44,7 @@ public static class StartupTasks
} }
else else
{ {
Logger.Success("Connected!", LogArea.Startup); Logger.Success("Connected to the database!", LogArea.Startup);
} }
if (!dbConnected) Environment.Exit(1); if (!dbConnected) Environment.Exit(1);
@ -95,7 +95,7 @@ public static class StartupTasks
Logger.Success($"Ready! Startup took {stopwatch.ElapsedMilliseconds}ms. Passing off control to ASP.NET...", LogArea.Startup); Logger.Success($"Ready! Startup took {stopwatch.ElapsedMilliseconds}ms. Passing off control to ASP.NET...", LogArea.Startup);
} }
private static void migrateDatabase(Database database) private static void migrateDatabase(DbContext database)
{ {
Stopwatch stopwatch = new(); Stopwatch stopwatch = new();
stopwatch.Start(); stopwatch.Start();