Add configurable build text colors

This commit is contained in:
Archangel
2025-08-09 14:57:07 +02:00
parent 39118c9d56
commit fbb0e6cd6a
2 changed files with 13 additions and 8 deletions
@@ -1,4 +1,5 @@
using SPTarkov.Server.Core.Models.Enums;
using SPTarkov.Server.Core.Models.Logging;
namespace SPTarkov.Server.Core.Utils;
@@ -81,4 +82,15 @@ public static partial class ProgramStatics
{
return BuildTime;
}
public static LogTextColor BUILD_TEXT_COLOR()
{
return BuildType switch
{
EntryType.RELEASE => LogTextColor.Yellow,
EntryType.LOCAL or EntryType.DEBUG => LogTextColor.Cyan,
EntryType.BLEEDINGEDGE or EntryType.BLEEDINGEDGEMODS => LogTextColor.Magenta,
_ => LogTextColor.Yellow,
};
}
}
@@ -81,14 +81,7 @@ public class Watermark(
SetTitle();
if (ProgramStatics.DEBUG())
{
Draw(LogTextColor.Magenta);
}
else
{
Draw();
}
Draw(ProgramStatics.BUILD_TEXT_COLOR());
return Task.CompletedTask;
}