Pet Nicknames IPC implementation (#74)

This commit is contained in:
Amber
2024-09-10 09:13:34 +02:00
committed by Loporrit
parent 498fab2a1b
commit 28828a620b
11 changed files with 214 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ public record HeelsOffsetMessage : MessageBase;
public record PenumbraResourceLoadMessage(IntPtr GameObject, string GamePath, string FilePath) : SameThreadMessage;
public record CustomizePlusMessage(string ProfileName) : MessageBase;
public record HonorificMessage(string NewHonorificTitle) : MessageBase;
public record PetNamesMessage(string PetNicknamesData) : MessageBase;
public record HonorificReadyMessage : MessageBase;
public record PlayerChangedMessage(CharacterData Data) : MessageBase;
public record CharacterChangedMessage(GameObjectHandler GameObjectHandler) : MessageBase;

View File

@@ -31,6 +31,7 @@ public class PluginWarningNotificationService
ShownCustomizePlusWarning = _mareConfigService.Current.DisableOptionalPluginWarnings,
ShownHeelsWarning = _mareConfigService.Current.DisableOptionalPluginWarnings,
ShownHonorificWarning = _mareConfigService.Current.DisableOptionalPluginWarnings,
ShowPetNicknamesWarning = _mareConfigService.Current.DisableOptionalPluginWarnings
};
}
@@ -52,6 +53,12 @@ public class PluginWarningNotificationService
warning.ShownHonorificWarning = true;
}
if (changes.Contains(PlayerChanges.PetNames) && !warning.ShowPetNicknamesWarning && !_ipcManager.PetNames.APIAvailable)
{
missingPluginsForData.Add("PetNicknames");
warning.ShowPetNicknamesWarning = true;
}
if (missingPluginsForData.Any())
{
_mediator.Publish(new NotificationMessage("Missing plugins for " + playerName,