v1.6.0 through v1.15.0 were never published. The whole window layer was being rewritten from ImGui defaults to custom drawing, and repo.json deliberately kept its links on v1.5.6 so nobody could update into a half-finished state. That work lands here in one release. The config is not migrated, it is replaced. A config carried across nine cycles of window rebuilds holds values chosen against surfaces that no longer exist, and starting over is the only way to be sure every install is on the same defaults. The message database is a separate file and is not touched. The old config is copied to HellionChat.json.pre-2.0.0.bak first, so rolling back to 1.5.6 stays a file copy rather than an evening of clicking settings back in. Config schema 27. The reset runs from the constructor, before LoadAsync seeds the default tabs, and the self-test now fails if the tab list is empty at /xlperf -- that ordering breaking would leave every user with no tabs and nothing else in the plugin would notice. Default layout gains an Emote tab: custom emotes, standard emotes and echo. A tester asked for it, emotes get lost between system notices otherwise. Manifest, README, roadmap and the four changelog consumers are on 2.0.0. The release notes lead with what was fixed rather than what was redrawn -- retroactive cleanup that could never be applied, a compaction that reported deleting nothing while deleting everything, pinned tell tabs that came up empty for a session. And with the one behaviour change users should know about: the channel grid is authoritative over storage now, so anyone who had unticked channels while the unknown-channel failsafe was on stores less than they did before.
231 lines
12 KiB
C#
Executable File
231 lines
12 KiB
C#
Executable File
using HellionChat.Code;
|
|
using HellionChat.Resources;
|
|
|
|
namespace HellionChat.Util;
|
|
|
|
public static class TabsUtil
|
|
{
|
|
public static Dictionary<ChatType, (ChatSource, ChatSource)> AllChannels()
|
|
{
|
|
var channels = new Dictionary<ChatType, (ChatSource, ChatSource)>();
|
|
foreach (var chatType in Enum.GetValues<ChatType>())
|
|
channels[chatType] = (ChatSourceExt.All, ChatSourceExt.All);
|
|
|
|
return channels;
|
|
}
|
|
|
|
// Public-chat-only: Say, Yell, Shout. Group/FC/Linkshell and gameplay
|
|
// events live in their own tabs to keep General focused on open-world chat.
|
|
public static Tab VanillaGeneral =>
|
|
new()
|
|
{
|
|
Name = Language.Tabs_Presets_General,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.Say] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Yell] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Shout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
};
|
|
|
|
public static Tab VanillaEvent =>
|
|
new()
|
|
{
|
|
Name = Language.Tabs_Presets_Event,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.NpcDialogue] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
};
|
|
|
|
public static Tab VanillaTellExclusive =>
|
|
new()
|
|
{
|
|
Name = Language.Tabs_Presets_Tell,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.TellIncoming] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.TellOutgoing] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
Channel = InputChannel.Tell,
|
|
AllSenderMessages = true,
|
|
};
|
|
|
|
// Hellion tab presets. Names live in HellionStrings (EN+DE) so upstream
|
|
// resource files stay untouched.
|
|
public static Tab HellionFreeCompany =>
|
|
new()
|
|
{
|
|
Name = HellionStrings.Tabs_Presets_FreeCompany,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.FreeCompany] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompanyAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompanyLoginLogout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
Channel = InputChannel.FreeCompany,
|
|
};
|
|
|
|
public static Tab HellionParty =>
|
|
new()
|
|
{
|
|
Name = HellionStrings.Tabs_Presets_Party,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.Party] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossParty] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Alliance] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeam] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeamAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeamLoginLogout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.LootNotice] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.LootRoll] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
// No input-channel switch: Party pulls in multiple channel types
|
|
// and auto-routing /party would surprise users wanting /alliance or /pvpteam.
|
|
};
|
|
|
|
public static Tab HellionBeginner =>
|
|
new()
|
|
{
|
|
Name = HellionStrings.Tabs_Presets_Beginner,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.NoviceNetwork] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.NoviceNetworkSystem] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
Channel = InputChannel.NoviceNetwork,
|
|
};
|
|
|
|
// Requested by a tester: emotes have their own rhythm and get lost between
|
|
// system notices. Echo rides along because /echo is where emote-adjacent
|
|
// output lands.
|
|
public static Tab HellionEmote =>
|
|
new()
|
|
{
|
|
Name = HellionStrings.Tabs_Presets_Emote,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.CustomEmote] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.StandardEmote] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Echo] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
};
|
|
|
|
public static Tab HellionSystem =>
|
|
new()
|
|
{
|
|
Name = HellionStrings.Tabs_Presets_System,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
// System noise
|
|
[ChatType.Debug] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Urgent] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Notice] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.System] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Error] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Echo] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.GatheringSystem] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.NoviceNetworkSystem] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.BattleSystem] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
// Login/logout/announcement noise
|
|
[ChatType.NpcAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompanyAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompanyLoginLogout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeamAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeamLoginLogout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.RetainerSale] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PeriodicRecruitmentNotification] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
// Gameplay event streams
|
|
[ChatType.NpcDialogue] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.LootNotice] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.LootRoll] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Crafting] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Gathering] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
// Misc
|
|
[ChatType.Progress] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.RandomNumber] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Orchestrion] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.MessageBook] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Alarm] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Sign] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.GlamourNotifications] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
};
|
|
|
|
public static Tab HellionLinkshell =>
|
|
new()
|
|
{
|
|
Name = HellionStrings.Tabs_Presets_Linkshell,
|
|
SelectedChannels = new Dictionary<ChatType, (ChatSource, ChatSource)>
|
|
{
|
|
[ChatType.Linkshell1] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell2] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell3] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell4] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell5] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell6] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell7] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell8] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell1] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell2] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell3] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell4] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell5] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell6] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell7] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell8] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
},
|
|
};
|
|
|
|
public static Dictionary<ChatType, (ChatSource, ChatSource)> MostlyPlayer =>
|
|
new()
|
|
{
|
|
// Special
|
|
[ChatType.Debug] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Urgent] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Notice] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
// Chat
|
|
[ChatType.Say] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Yell] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Shout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.TellIncoming] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.TellOutgoing] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Party] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossParty] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Alliance] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompany] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeam] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell1] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell2] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell3] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell4] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell5] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell6] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell7] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CrossLinkshell8] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell1] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell2] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell3] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell4] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell5] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell6] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell7] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Linkshell8] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.NoviceNetwork] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.StandardEmote] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.CustomEmote] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
// Announcements
|
|
[ChatType.System] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Error] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.Echo] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.NoviceNetworkSystem] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompanyAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeamAnnouncement] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.FreeCompanyLoginLogout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.PvpTeamLoginLogout] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.RandomNumber] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
[ChatType.MessageBook] = (ChatSourceExt.All, ChatSourceExt.All),
|
|
};
|
|
}
|