0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-12 16:50:43 -05:00

Improve bot loading logging

This commit is contained in:
Dev 2023-06-25 13:49:48 +01:00
parent 42a3913ace
commit 4fd2a48972

View File

@ -5,6 +5,7 @@ using EFT;
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using Aki.SinglePlayer.Models.RaidFix;
using System;
namespace Aki.SinglePlayer.Patches.RaidFix
{
@ -65,13 +66,15 @@ namespace Aki.SinglePlayer.Patches.RaidFix
// load bundles for bot profile
var continuation = new BundleLoader(taskScheduler);
__result = taskAwaiter.ContinueWith(continuation.LoadBundles, taskScheduler).Unwrap();
return false;
}
private static Profile GetFirstResult(Task<Profile[]> task)
{
var result = task.Result[0];
Logger.LogInfo($"Loading bot profile from server. role: {result.Info.Settings.Role} side: {result.Side}");
Logger.LogInfo($"{DateTime.Now:T} Loading bot {result.Info.Nickname} profile from server. role: {result.Info.Settings.Role} side: {result.Side}");
return result;
}
}