-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBootCodesPlugin.cs
29 lines (25 loc) · 928 Bytes
/
BootCodesPlugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Threading.Tasks;
using Impostor.Api.Plugins;
using Microsoft.Extensions.Logging;
namespace Boot.Codes
{
[ImpostorPlugin("at.duikbo.codes")]
public class BootCodesPlugin : PluginBase
{
private readonly ILogger<BootCodesPlugin> _logger;
private readonly IGameCodeManager _manager;
public BootCodesPlugin(ILogger<BootCodesPlugin> logger, IGameCodeManager manager)
{
this._logger = logger;
this._manager = manager;
}
public override ValueTask EnableAsync()
{
var sum = _manager.FourCharCodes + _manager.SixCharCodes;
_logger.LogInformation(
"Boot.Codes: loaded {FourCharCodes} 4-char codes and {SixCharCodes} 6-char codes [{Total} total] from {Path}!",
_manager.FourCharCodes, _manager.SixCharCodes, sum, _manager.Path);
return default;
}
}
}