Squash of test/main-merge-2026-10-25 onto aelrynth main 2026.11.19.1 for the standing sk PR. Includes Trade Shop Storefront, loot checklist editor, chat routing, window placements, and related engine work. See Changelog/2026-11-22-sk-backlog-test-merge.md.
47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
// The two engine pieces ChatRouting.cs calls, without the engine. ChatModel's are copies
|
|
// of the real ones in src/RynthCore.Engine/UI/Data/ChatData.cs (MentionEligible, and
|
|
// LineInTab / LineVisible, which the chat face filters with).
|
|
|
|
namespace RynthCore.Engine.Compatibility
|
|
{
|
|
internal static class RynthLog
|
|
{
|
|
public static int Lines;
|
|
public static void UI(string message) { Lines++; }
|
|
public static void Info(string message) { Lines++; }
|
|
}
|
|
}
|
|
|
|
namespace RynthCore.Engine.UI.Panels
|
|
{
|
|
/// <summary>The standard filters ChatRouter checks after the rules: none enabled here.</summary>
|
|
internal static class RynthChatPresets
|
|
{
|
|
internal sealed class Preset
|
|
{
|
|
internal string Tab { get; } = "";
|
|
internal string Label { get; } = "";
|
|
}
|
|
|
|
internal static Preset? FirstMatch(string text, string channel) => null;
|
|
}
|
|
}
|
|
|
|
namespace RynthCore.Engine.UI.Data
|
|
{
|
|
internal static class ChatModel
|
|
{
|
|
public static int FilterBumps;
|
|
|
|
internal static bool MentionEligible(string channel, int chatType) =>
|
|
(channel == "Chat" || channel == "Channels") && chatType is not (4 or 9 or 11);
|
|
|
|
internal static void BumpFiltersVersion() => FilterBumps++;
|
|
|
|
public static bool LineInTab(ChatLine line, string tab) => line.Route.ShowsIn(tab, line.Channel);
|
|
|
|
public static bool LineVisible(ChatLine line, string tab, string search) =>
|
|
LineInTab(line, tab)
|
|
&& (search.Length == 0 || line.FormattedText.Contains(search, StringComparison.OrdinalIgnoreCase));
|
|
}
|
|
}
|