update logging and add pl splash as the main one
All checks were successful
Build / Build Launcher (push) Successful in 2m31s

This commit is contained in:
zznty
2024-05-31 17:12:08 +07:00
parent fc69ee8e83
commit 9fb29d2011
28 changed files with 364 additions and 318 deletions

View File

@@ -34,9 +34,9 @@ public static class StatsClient
public static bool Consent(bool consent)
{
if (consent)
LogFile.WriteLine("Registering player consent on the statistics server");
LogFile.Log.Debug("Registering player consent on the statistics server");
else
LogFile.WriteLine("Withdrawing player consent, removing user data from the statistics server");
LogFile.Log.Debug("Withdrawing player consent, removing user data from the statistics server");
var consentRequest = new ConsentRequest
{
@@ -52,12 +52,12 @@ public static class StatsClient
{
if (!PlayerConsent.ConsentGiven)
{
LogFile.WriteGameLog("Downloading plugin statistics anonymously...");
LogFile.Log.Info("Downloading plugin statistics anonymously...");
votingToken = null;
return SimpleHttpClient.Get<PluginStats>(StatsUri);
}
LogFile.WriteGameLog("Downloading plugin statistics, ratings and votes for " + PlayerHash);
LogFile.Log.Info("Downloading plugin statistics, ratings and votes for " + PlayerHash);
var parameters = new Dictionary<string, string> { ["playerHash"] = PlayerHash };
var pluginStats = SimpleHttpClient.Get<PluginStats>(StatsUri, parameters);
@@ -82,11 +82,11 @@ public static class StatsClient
{
if (votingToken == null)
{
LogFile.WriteLine("Voting token is not available, cannot vote");
LogFile.Log.Debug("Voting token is not available, cannot vote");
return null;
}
LogFile.WriteLine($"Voting {vote} on plugin {pluginId}");
LogFile.Log.Debug($"Voting {vote} on plugin {pluginId}");
var voteRequest = new VoteRequest
{
PlayerHash = PlayerHash,