mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-16 06:32:28 +00:00
Only convert assets on website startup, rename GameApi -> GameServer
This commit is contained in:
parent
a733eb21a4
commit
0efb64cb36
4 changed files with 8 additions and 4 deletions
|
@ -10,7 +10,7 @@ public static class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
StartupTasks.Run(args, ServerType.GameApi);
|
StartupTasks.Run(args, ServerType.GameServer);
|
||||||
|
|
||||||
CreateHostBuilder(args).Build().Run();
|
CreateHostBuilder(args).Build().Run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class DebugWarmupLifetime : IHostLifetime
|
||||||
|
|
||||||
string url = ServerType switch
|
string url = ServerType switch
|
||||||
{
|
{
|
||||||
ServerType.GameApi => ServerConfiguration.Instance.GameApiListenUrl,
|
ServerType.GameServer => ServerConfiguration.Instance.GameApiListenUrl,
|
||||||
ServerType.Website => ServerConfiguration.Instance.WebsiteListenUrl,
|
ServerType.Website => ServerConfiguration.Instance.WebsiteListenUrl,
|
||||||
ServerType.Api => ServerConfiguration.Instance.ApiListenUrl,
|
ServerType.Api => ServerConfiguration.Instance.ApiListenUrl,
|
||||||
_ => throw new ArgumentOutOfRangeException(),
|
_ => throw new ArgumentOutOfRangeException(),
|
||||||
|
|
|
@ -78,7 +78,11 @@ public static class StartupTasks
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ServerConfiguration.Instance.WebsiteConfiguration.ConvertAssetsOnStartup) FileHelper.ConvertAllTexturesToPng();
|
if (ServerConfiguration.Instance.WebsiteConfiguration.ConvertAssetsOnStartup
|
||||||
|
&& serverType == ServerType.Website)
|
||||||
|
{
|
||||||
|
FileHelper.ConvertAllTexturesToPng();
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Info("Starting room cleanup thread...", LogArea.Startup);
|
Logger.Info("Starting room cleanup thread...", LogArea.Startup);
|
||||||
RoomHelper.StartCleanupThread();
|
RoomHelper.StartCleanupThread();
|
||||||
|
|
|
@ -2,7 +2,7 @@ namespace LBPUnion.ProjectLighthouse.Types;
|
||||||
|
|
||||||
public enum ServerType
|
public enum ServerType
|
||||||
{
|
{
|
||||||
GameApi = 0,
|
GameServer = 0,
|
||||||
Website = 1,
|
Website = 1,
|
||||||
Api = 2,
|
Api = 2,
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue