- Check auto translation for commands and execute them instead of sending

- Plugin commands trigger the command helper window now
- Fix auto translation with empty text appearing
- Switch up all dalamud payload usage to ROSS if possible
- Prepare 7.5 changes
- Cleanup
This commit is contained in:
Infi
2026-04-08 21:15:28 +02:00
parent 9f7a6267f6
commit c424311b24
52 changed files with 614 additions and 423 deletions
-1
View File
@@ -1,6 +1,5 @@
namespace ChatTwo.Code;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1028:Enum Storage should be Int32")]
[Flags]
public enum ChatSource : ushort
{
+4 -11
View File
@@ -5,17 +5,10 @@ namespace ChatTwo.Code;
internal static class ChatSourceExt
{
internal const ChatSource All =
ChatSource.Self
| ChatSource.PartyMember
| ChatSource.AllianceMember
| ChatSource.Other
| ChatSource.EngagedEnemy
| ChatSource.UnengagedEnemy
| ChatSource.FriendlyNpc
| ChatSource.SelfPet
| ChatSource.PartyPet
| ChatSource.AlliancePet
| ChatSource.OtherPet;
ChatSource.Self | ChatSource.PartyMember | ChatSource.AllianceMember |
ChatSource.Other | ChatSource.EngagedEnemy | ChatSource.UnengagedEnemy |
ChatSource.FriendlyNpc | ChatSource.SelfPet | ChatSource.PartyPet |
ChatSource.AlliancePet | ChatSource.OtherPet;
internal static string Name(this ChatSource source) => source switch
{
-1
View File
@@ -1,6 +1,5 @@
namespace ChatTwo.Code;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1028:Enum Storage should be Int32")]
public enum ChatType : ushort
{
Debug = 1,
+12 -17
View File
@@ -6,14 +6,9 @@ namespace ChatTwo.Code;
internal static class ChatTypeExt
{
internal static IEnumerable<(string, ChatType[])> SortOrder => new[]
{
(Language.Options_Tabs_ChannelTypes_Special,
[
ChatType.Debug,
ChatType.Urgent,
ChatType.Notice
]),
internal static IEnumerable<(string, ChatType[])> SortOrder =>
[
(Language.Options_Tabs_ChannelTypes_Special, [ChatType.Debug, ChatType.Urgent, ChatType.Notice]),
(Language.Options_Tabs_ChannelTypes_Chat,
[
@@ -48,8 +43,8 @@ internal static class ChatTypeExt
ChatType.CustomEmote
]),
(Language.Options_Tabs_ChannelTypes_Battle, new[]
{
(Language.Options_Tabs_ChannelTypes_Battle,
[
ChatType.Damage,
ChatType.Miss,
ChatType.Action,
@@ -58,11 +53,11 @@ internal static class ChatTypeExt
ChatType.GainBuff,
ChatType.LoseBuff,
ChatType.GainDebuff,
ChatType.LoseDebuff,
}),
ChatType.LoseDebuff
]),
(Language.Options_Tabs_ChannelTypes_Announcements, new[]
{
(Language.Options_Tabs_ChannelTypes_Announcements,
[
ChatType.System,
ChatType.BattleSystem,
ChatType.GatheringSystem,
@@ -87,11 +82,11 @@ internal static class ChatTypeExt
ChatType.Orchestrion,
ChatType.MessageBook,
ChatType.Alarm,
ChatType.GlamourNotifications,
}),
ChatType.GlamourNotifications
])
// Note: ExtraChat linkshells are handled separately in the tab settings
// UI.
};
];
internal static string Name(this ChatType type)
{
+2 -5
View File
@@ -1,4 +1,3 @@
using Dalamud.Plugin.Services;
using Lumina.Excel.Sheets;
namespace ChatTwo.Code;
@@ -108,11 +107,10 @@ internal static class InputChannelExt
InputChannel.ExtraChatLinkshell6 => "/ecl6",
InputChannel.ExtraChatLinkshell7 => "/ecl7",
InputChannel.ExtraChatLinkshell8 => "/ecl8",
InputChannel.Invalid => "/e",
_ => "/e",
};
public static IEnumerable<TextCommand>? TextCommands(this InputChannel channel, IDataManager data)
public static IEnumerable<TextCommand>? TextCommands(this InputChannel channel)
{
var ids = channel switch
{
@@ -147,8 +145,7 @@ internal static class InputChannelExt
if (ids.Length == 0)
return null;
var cmds = data.GetExcelSheet<TextCommand>();
return ids.Where(id => cmds.HasRow(id)).Select(id => cmds.GetRow(id));
return ids.Where(id => Sheets.TextCommandSheet.HasRow(id)).Select(id => Sheets.TextCommandSheet.GetRow(id));
}
internal static bool IsLinkshell(this InputChannel channel) => channel switch