Chat notification for testing version

This commit is contained in:
RisaDev
2024-10-26 00:01:49 +03:00
parent 803962c63e
commit 55adf2828e
3 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
using System;
using CustomizePlus.Core.Helpers;
using CustomizePlus.Game.Services;
using Dalamud.Plugin.Services;
namespace CustomizePlus.Core.Services;
public class TestingVersionNotifierService : IDisposable
{
private readonly IClientState _clientState;
private readonly ChatService _chatService;
public TestingVersionNotifierService(IClientState clientState, ChatService chatService)
{
_clientState = clientState;
_chatService = chatService;
_clientState.Login += OnLogin;
}
public void Dispose()
{
_clientState.Login -= OnLogin;
}
private void OnLogin()
{
if (VersionHelper.IsTesting)
_chatService.PrintInChat($"You are running testing version of Customize+! Some features like integration with other plugins might not function correctly.",
ChatService.ChatMessageColor.Warning);
}
}