Rename ChatService and move some support buttons to OtterGui.

This commit is contained in:
Ottermandias 2023-06-18 13:24:13 +02:00
parent 3f1d84343a
commit 5f916efb13
22 changed files with 56 additions and 104 deletions

View file

@ -84,7 +84,7 @@ public class ModMerger : IDisposable
catch (Exception ex)
{
Error = ex;
Penumbra.ChatService.NotificationMessage(
Penumbra.Chat.NotificationMessage(
$"Could not merge {MergeFromMod!.Name} into {MergeToMod!.Name}, cleaning up changes.:\n{ex}", "Failure",
NotificationType.Error);
FailureCleanup();

View file

@ -77,7 +77,7 @@ public class ModNormalizer
}
catch (Exception e)
{
Penumbra.ChatService.NotificationMessage($"Could not normalize mod:\n{e}", "Failure", NotificationType.Error);
Penumbra.Chat.NotificationMessage($"Could not normalize mod:\n{e}", "Failure", NotificationType.Error);
}
finally
{
@ -90,7 +90,7 @@ public class ModNormalizer
{
if (Directory.Exists(_normalizationDirName))
{
Penumbra.ChatService.NotificationMessage("Could not normalize mod:\n"
Penumbra.Chat.NotificationMessage("Could not normalize mod:\n"
+ "The directory TmpNormalization may not already exist when normalizing a mod.", "Failure",
NotificationType.Error);
return false;
@ -98,7 +98,7 @@ public class ModNormalizer
if (Directory.Exists(_oldDirName))
{
Penumbra.ChatService.NotificationMessage("Could not normalize mod:\n"
Penumbra.Chat.NotificationMessage("Could not normalize mod:\n"
+ "The directory TmpNormalizationOld may not already exist when normalizing a mod.", "Failure",
NotificationType.Error);
return false;
@ -204,7 +204,7 @@ public class ModNormalizer
}
catch (Exception e)
{
Penumbra.ChatService.NotificationMessage($"Could not normalize mod:\n{e}", "Failure", NotificationType.Error);
Penumbra.Chat.NotificationMessage($"Could not normalize mod:\n{e}", "Failure", NotificationType.Error);
}
return false;
@ -232,7 +232,7 @@ public class ModNormalizer
}
catch (Exception e)
{
Penumbra.ChatService.NotificationMessage($"Could not move old files out of the way while normalizing mod mod:\n{e}", "Failure",
Penumbra.Chat.NotificationMessage($"Could not move old files out of the way while normalizing mod mod:\n{e}", "Failure",
NotificationType.Error);
}
@ -256,7 +256,7 @@ public class ModNormalizer
}
catch (Exception e)
{
Penumbra.ChatService.NotificationMessage($"Could not move new files into the mod while normalizing mod mod:\n{e}", "Failure",
Penumbra.Chat.NotificationMessage($"Could not move new files into the mod while normalizing mod mod:\n{e}", "Failure",
NotificationType.Error);
foreach (var dir in Mod.ModPath.EnumerateDirectories())
{

View file

@ -48,7 +48,7 @@ public class ModImportManager : IDisposable
if (File.Exists(s))
return true;
Penumbra.ChatService.NotificationMessage($"Failed to import queued mod at {s}, the file does not exist.", "Warning",
Penumbra.Chat.NotificationMessage($"Failed to import queued mod at {s}, the file does not exist.", "Warning",
NotificationType.Warning);
return false;
}).Select(s => new FileInfo(s)).ToArray();

View file

@ -398,7 +398,7 @@ public class ModOptionEditor
return true;
if (message)
Penumbra.ChatService.NotificationMessage(
Penumbra.Chat.NotificationMessage(
$"Could not name option {newName} because option with same filename {path} already exists.",
"Warning", NotificationType.Warning);

View file

@ -51,7 +51,7 @@ public partial class ModCreator
}
catch (Exception e)
{
Penumbra.ChatService.NotificationMessage($"Could not create directory for new Mod {newName}:\n{e}", "Failure",
Penumbra.Chat.NotificationMessage($"Could not create directory for new Mod {newName}:\n{e}", "Failure",
NotificationType.Error);
return null;
}

View file

@ -59,7 +59,7 @@ public sealed class MultiModGroup : IModGroup
{
if (ret.PrioritizedOptions.Count == IModGroup.MaxMultiOptions)
{
Penumbra.ChatService.NotificationMessage(
Penumbra.Chat.NotificationMessage(
$"Multi Group {ret.Name} has more than {IModGroup.MaxMultiOptions} options, ignoring excessive options.", "Warning",
NotificationType.Warning);
break;