throw fists when penumbra or glamourer isn't active

This commit is contained in:
Stanley Dimant
2024-07-19 01:07:26 +02:00
parent c658c7c622
commit bbab9d0b26
6 changed files with 37 additions and 7 deletions

View File

@@ -383,6 +383,7 @@ public sealed class FileCacheManager : IHostedService
public Task StartAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("Starting FileCacheManager");
lock (_fileWriteLock)
{
try
@@ -413,6 +414,13 @@ public sealed class FileCacheManager : IHostedService
if (File.Exists(_csvPath))
{
if (!_ipcManager.Penumbra.APIAvailable || string.IsNullOrEmpty(_ipcManager.Penumbra.ModDirectory))
{
_mareMediator.Publish(new NotificationMessage("Penumbra not connected",
"Could not load local file cache data. Penumbra is not connected or not properly set up. Please enable and/or configure Penumbra properly to use Mare. After, reload Mare in the Plugin installer.",
MareConfiguration.Models.NotificationType.Error));
}
_logger.LogInformation("{csvPath} found, parsing", _csvPath);
bool success = false;