RynthSuite as of 2026-10-04 (internal c94715f): RynthOracle (based on Oracle of Dereth by Advis Eveldan) and RynthInventory, RynthAi patrol doorways and rooms, healing priority, strict monster priority, finish the wounded target, slayer weapons, arcs when clear, blasts like rings, learn unknown spells, looting fixes, release 2026.10.4.6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c33e24a610
commit
12ca25f911
426 changed files with 108239 additions and 7521 deletions
67
Plugins/Shared/RynthAiScriptApi.cs
Normal file
67
Plugins/Shared/RynthAiScriptApi.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
// ============================================================================
|
||||
// RynthSuite - Plugins/Shared/RynthAiScriptApi.cs
|
||||
// The "RynthAi.Script" interface: what RynthAi offers a scripting plugin
|
||||
// (RynthLua) through the host's GetPluginInterface (API v68). Compiled into
|
||||
// both plugins (linked source), so the layout can't drift between them.
|
||||
//
|
||||
// Rules:
|
||||
// - Append-only: new functions go at the end, and Version goes up. A caller
|
||||
// checks StructSize before using a field past the ones it knows.
|
||||
// - Strings are UTF-8, NUL-terminated. A string handed back through a byte**
|
||||
// belongs to RynthAi and stays valid only until the next call into this
|
||||
// table: copy it at once.
|
||||
// - Call only from the plugin pump thread (OnTick and the events it drains),
|
||||
// never from OnChatBarEnter (AC's thread) or Render.
|
||||
// - Every function returns safely (no exception crosses the boundary).
|
||||
// ============================================================================
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace RynthCore.Plugin.Shared;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct RynthAiScriptApiV1
|
||||
{
|
||||
public const string InterfaceName = "RynthAi.Script";
|
||||
public const uint InterfaceVersion = 1;
|
||||
|
||||
public uint Version; // InterfaceVersion of the table RynthAi filled
|
||||
public uint StructSize; // sizeof(RynthAiScriptApiV1) as RynthAi built it
|
||||
|
||||
/// <summary>Evaluates a meta expression. 1 = ok (result in *result), 0 = error (message in *result).</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, byte**, int> Evaluate;
|
||||
|
||||
/// <summary>A setting from the meta settings map (getsetting names). 1 = found.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, byte**, int> GetSetting;
|
||||
|
||||
/// <summary>Sets a setting and saves the profile. 1 = ok, 0 = no such setting.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, byte*, int> SetSetting;
|
||||
|
||||
/// <summary>Every setting name, newline separated. 1 = ok.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> GetSettingNames;
|
||||
|
||||
/// <summary>1 while the macro is running.</summary>
|
||||
public delegate* unmanaged[Cdecl]<int> IsMacroRunning;
|
||||
|
||||
/// <summary>Starts (1) or stops (0) the macro.</summary>
|
||||
public delegate* unmanaged[Cdecl]<int, void> SetMacroRunning;
|
||||
|
||||
/// <summary>Walk to a spot: a one-point route, macro started. Coordinates are signed (S/W negative). 1 = ok.</summary>
|
||||
public delegate* unmanaged[Cdecl]<double, double, int> NavGoTo;
|
||||
|
||||
/// <summary>Stop navigation (and the macro when it's running).</summary>
|
||||
public delegate* unmanaged[Cdecl]<void> NavStop;
|
||||
|
||||
/// <summary>Nearest object with a position whose name contains the text. flags: 1 = portals and NPCs only.
|
||||
/// 1 = found (*id, *distance in metres).</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, int, uint*, double*, int> FindNearest;
|
||||
|
||||
/// <summary>Metres from the player to an object, -1 when unknown.</summary>
|
||||
public delegate* unmanaged[Cdecl]<uint, double> DistanceTo;
|
||||
|
||||
/// <summary>Line of sight to an object: 1 clear, 0 blocked (1 when raycasting isn't ready).</summary>
|
||||
public delegate* unmanaged[Cdecl]<uint, int> IsPathClear;
|
||||
|
||||
/// <summary>A chat line as if typed: /ra, /ub, /mt, /vt run in RynthAi now; anything else goes to AC's parser. 1 = sent.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> SubmitCommand;
|
||||
}
|
||||
33
Plugins/Shared/RynthAiStatusApi.cs
Normal file
33
Plugins/Shared/RynthAiStatusApi.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// ============================================================================
|
||||
// RynthSuite - Plugins/Shared/RynthAiStatusApi.cs
|
||||
// The "RynthAi.Status" interface: a compact, read-only summary of what the bot
|
||||
// is doing, for plugins that share it (RynthNet's status to other clients).
|
||||
// Its own interface rather than a new field of RynthAi.Script, so RynthLua's
|
||||
// RynthAi.Script v1 request keeps working against any RynthAi build.
|
||||
//
|
||||
// Rules: as RynthAi.Script (Shared/RynthAiScriptApi.cs): append-only, UTF-8,
|
||||
// a returned string is valid until the next call, pump thread only, resolve
|
||||
// the table again every tick.
|
||||
// ============================================================================
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace RynthCore.Plugin.Shared;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct RynthAiStatusApiV1
|
||||
{
|
||||
public const string InterfaceName = "RynthAi.Status";
|
||||
public const uint InterfaceVersion = 1;
|
||||
|
||||
public uint Version; // InterfaceVersion of the table RynthAi filled
|
||||
public uint StructSize; // sizeof(RynthAiStatusApiV1) as RynthAi built it
|
||||
|
||||
/// <summary>
|
||||
/// The bot's state as one JSON object:
|
||||
/// {macro,action,state,combat,buff,nav,loot,meta,navFile,metaFile,lootFile}
|
||||
/// (action = what it is doing now: Default/Combat/Looting/Navigating/Buffing...; state = meta state).
|
||||
/// 1 = ok, 0 = not ready (not logged in yet).
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> GetStatusJson;
|
||||
}
|
||||
50
Plugins/Shared/RynthNavPathApi.cs
Normal file
50
Plugins/Shared/RynthNavPathApi.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
// ============================================================================
|
||||
// RynthSuite - Plugins/Shared/RynthNavPathApi.cs
|
||||
// The "RynthNav.Path" interface: RynthNav's landscape navmesh offered to other
|
||||
// plugins through the host's GetPluginInterface (API v68). RynthAi uses it to
|
||||
// plan a way back to its route when it gets stuck outdoors. Compiled into both
|
||||
// plugins (linked source), so the layout can't drift between them.
|
||||
//
|
||||
// Rules (same as RynthAi.Script):
|
||||
// - Append-only: new functions go at the end, and Version goes up. A caller
|
||||
// checks StructSize before using a field past the ones it knows.
|
||||
// - Call only from the plugin pump thread (OnTick and the events it drains).
|
||||
// RynthNav touches its navmesh only on that thread.
|
||||
// - Resolve the table again every time it is needed; never keep the pointer
|
||||
// across ticks. RynthNav may not be loaded, or may be reloaded.
|
||||
// - Every function returns safely (no exception crosses the boundary).
|
||||
//
|
||||
// World units: x = east (landblockX * 192 + local x),
|
||||
// y = north (landblockY * 192 + local y),
|
||||
// z = height (the pose z).
|
||||
// ============================================================================
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace RynthCore.Plugin.Shared;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct RynthNavPathApiV1
|
||||
{
|
||||
public const string PluginName = "RynthNav";
|
||||
public const string InterfaceName = "RynthNav.Path";
|
||||
public const uint InterfaceVersion = 1;
|
||||
|
||||
/// <summary>FindPath: a full path was found.</summary>
|
||||
public const int ResultOk = 1;
|
||||
/// <summary>FindPath: both ends are on the navmesh but the goal can't be reached (or only part of the way).</summary>
|
||||
public const int ResultNoPath = 0;
|
||||
/// <summary>FindPath: no navmesh at one of the ends (tile not baked, indoors, or no pose yet).</summary>
|
||||
public const int ResultNoMesh = -1;
|
||||
|
||||
public uint Version; // InterfaceVersion of the table RynthNav filled
|
||||
public uint StructSize; // sizeof(RynthNavPathApiV1) as RynthNav built it
|
||||
|
||||
/// <summary>
|
||||
/// Walkable path from (sx, sy, sz) to (gx, gy, gz) on the landscape navmesh.
|
||||
/// Writes the path corners as x,y,z triples into <c>points</c> (room for
|
||||
/// <c>maxPoints</c> corners, so 3 * maxPoints doubles), start first and goal last,
|
||||
/// and the corner count into <c>*count</c>. Returns ResultOk, ResultNoPath or ResultNoMesh.
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<double, double, double, double, double, double, double*, int, int*, int> FindPath;
|
||||
}
|
||||
90
Plugins/Shared/RynthNetApi.cs
Normal file
90
Plugins/Shared/RynthNetApi.cs
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
// ============================================================================
|
||||
// RynthSuite - Plugins/Shared/RynthNetApi.cs
|
||||
// The "RynthNet.Net" interface: what RynthNet offers other plugins (RynthLua's
|
||||
// future game.Network / UB-style UBNet module, RynthAi's netclients[]) through
|
||||
// the host's GetPluginInterface (API v68). Compiled into every plugin that uses
|
||||
// it (linked source), so the layout can't drift.
|
||||
//
|
||||
// Rules (same as RynthAi.Script):
|
||||
// - Append-only: new functions go at the end and Version goes up. A caller
|
||||
// checks StructSize before using a field past the ones it knows.
|
||||
// - Strings are UTF-8, NUL-terminated. A string handed back through a byte**
|
||||
// belongs to RynthNet and stays valid only until the next call into this
|
||||
// table: copy it at once.
|
||||
// - Call only from the plugin pump thread (OnTick and the events it drains).
|
||||
// Resolve the table again every tick: never keep the pointer across ticks
|
||||
// (RynthNet can be reloaded or unloaded between them).
|
||||
// - Nothing here calls back into the caller: messages are polled
|
||||
// (Subscribe + PollChannel), so no function pointer of another plugin is
|
||||
// ever held across an unload.
|
||||
// - Every function returns safely (no exception crosses the boundary).
|
||||
//
|
||||
// Targets (kind): 0 = every other client, 1 = clients with any of the tags in
|
||||
// target (comma separated), 2 = the client playing the character named target.
|
||||
// ============================================================================
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace RynthCore.Plugin.Shared;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct RynthNetApiV1
|
||||
{
|
||||
public const string PluginName = "RynthNet";
|
||||
public const string InterfaceName = "RynthNet.Net";
|
||||
public const uint InterfaceVersion = 1;
|
||||
|
||||
public const int TargetAll = 0;
|
||||
public const int TargetTags = 1;
|
||||
public const int TargetCharacter = 2;
|
||||
|
||||
/// <summary>SendCommand flag: also run the command on this client when the target matches it.</summary>
|
||||
public const int FlagIncludeSelf = 1;
|
||||
|
||||
public uint Version; // InterfaceVersion of the table RynthNet filled
|
||||
public uint StructSize; // sizeof(RynthNetApiV1) as RynthNet built it
|
||||
|
||||
/// <summary>1 while this client is on the local network (listening), else 0.</summary>
|
||||
public delegate* unmanaged[Cdecl]<int> IsOnline;
|
||||
|
||||
/// <summary>
|
||||
/// The other clients as a JSON array: [{node,pid,char,world,login,tags[],rtt,status:{...}|null}].
|
||||
/// status (when the client sent one): hp,hpMax,st,stMax,mp,mpMax,cell,ns,ew,z,heading,portal,busy,vitae,
|
||||
/// bot:{macro,action,state,...}|null, age (ms since it arrived). 1 = ok.
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> GetClientsJson;
|
||||
|
||||
/// <summary>This client: {node,pipe,char,world,login,tags[],online}. 1 = ok.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> GetSelfJson;
|
||||
|
||||
/// <summary>
|
||||
/// Runs a chat command (e.g. "/say hi", "/ra follow Bob") on the target clients; delayMs staggers
|
||||
/// them (the n-th gets n x delayMs). flags: FlagIncludeSelf. Returns how many clients it went to
|
||||
/// (this one included when it ran here), or -1 (bad arguments / RynthNet off).
|
||||
/// Args: (int kind, byte* target, byte* command, int delayMs, int flags).
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<int, byte*, byte*, int, int, int> SendCommand;
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message on a channel to the target clients. Clients that subscribed to the channel keep it
|
||||
/// for PollChannel. Returns how many clients it went to, or -1.
|
||||
/// Args: (byte* channel, byte* message, int kind, byte* target).
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, byte*, int, byte*, int> Publish;
|
||||
|
||||
/// <summary>Starts (1) or stops (0) keeping messages that arrive on a channel. 1 = ok.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, int, int> Subscribe;
|
||||
|
||||
/// <summary>
|
||||
/// Takes the messages kept for a channel since the last poll, oldest first:
|
||||
/// [{from,node,msg,at}] (at = ms tick when it arrived). At most 256 are kept per channel.
|
||||
/// 1 = ok ("[]" when none arrived), 0 = not subscribed to that channel.
|
||||
/// </summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, byte**, int> PollChannel;
|
||||
|
||||
/// <summary>This character's tags, newline separated. 1 = ok.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> GetTags;
|
||||
|
||||
/// <summary>Adds (on = 1) or removes (on = 0) a tag on this character and saves it. 1 = changed.</summary>
|
||||
public delegate* unmanaged[Cdecl]<byte*, int, int> SetTag;
|
||||
}
|
||||
190
Plugins/Shared/UseAudit.cs
Normal file
190
Plugins/Shared/UseAudit.cs
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
// ============================================================================
|
||||
// RynthSuite - Plugins/Shared/UseAudit.cs
|
||||
// One way for a plugin to use an object: host.UseFor(id, subsystem, why, kind).
|
||||
// Linked into each plugin that uses objects (RynthAi, RynthNav, RynthLua), so
|
||||
// every copy is the same and each plugin has its own state.
|
||||
//
|
||||
// Why (2026-10-04): doors and corpses opened and closed "on their own" around
|
||||
// logins and hot reloads for months and nothing could say who did it - no use
|
||||
// was logged anywhere. Now every use is one log line:
|
||||
//
|
||||
// [Use] RynthAi/Door 0x7860202C 'Door' (door) macro=on auto - nav detour asked for it
|
||||
//
|
||||
// plugin/subsystem, the object id and name, what kind of thing it is, whether
|
||||
// the macro is on (n/a for a plugin without one), auto (the bot decided) or
|
||||
// asked (a typed command, a meta or script the player started), and why.
|
||||
//
|
||||
// Guard: an AUTO use of a door or a corpse while the macro is off is refused
|
||||
// and logged as BLOCKED. With the macro off nothing may open a door or a
|
||||
// corpse unless the player asked for it.
|
||||
//
|
||||
// Throttle: the same object from the same subsystem logs at most once per
|
||||
// RepeatMs; repeats in between are counted on its next line. Past
|
||||
// MaxLinesPerWindow lines in WindowMs the rest are only counted, and the next
|
||||
// window's first line says how many were left out.
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RynthCore.PluginSdk;
|
||||
|
||||
namespace RynthCore.Plugin.Shared;
|
||||
|
||||
internal enum UseKind
|
||||
{
|
||||
/// <summary>The bot decided on its own (looting, doors, nav, combat swaps...).</summary>
|
||||
Auto,
|
||||
/// <summary>The player asked: a typed command, a meta or a script the player started.</summary>
|
||||
Asked,
|
||||
}
|
||||
|
||||
internal static class UseAudit
|
||||
{
|
||||
private const long RepeatMs = 5000;
|
||||
private const long WindowMs = 10_000;
|
||||
private const int MaxLinesPerWindow = 20;
|
||||
private const uint BfDoor = 0x1000;
|
||||
private const uint BfCorpse = 0x2000;
|
||||
|
||||
/// <summary>The plugin's name in every line. Set once at Init.</summary>
|
||||
public static string PluginName = "?";
|
||||
|
||||
/// <summary>
|
||||
/// Reads the macro state at the moment of the use; null for a plugin without a macro
|
||||
/// (no guard then). Cleared at Shutdown so a reused module never holds the old plugin.
|
||||
/// </summary>
|
||||
public static Func<bool>? MacroOn;
|
||||
|
||||
private static bool? MacroRunning
|
||||
{
|
||||
get { try { return MacroOn?.Invoke(); } catch { return false; } }
|
||||
}
|
||||
|
||||
/// <summary>Clock (ms); tests replace it.</summary>
|
||||
public static Func<long> NowMs = () => Environment.TickCount64;
|
||||
|
||||
private static readonly object Gate = new();
|
||||
private static readonly Dictionary<(uint Id, string Sub), (long LastMs, int Repeats)> Seen = new();
|
||||
private static long _windowStart = long.MinValue;
|
||||
private static int _windowLines;
|
||||
private static int _windowDropped;
|
||||
|
||||
/// <summary>Back to the state of a fresh load (Init, tests).</summary>
|
||||
public static void Reset(string pluginName, Func<bool>? macroOn)
|
||||
{
|
||||
lock (Gate)
|
||||
{
|
||||
PluginName = pluginName;
|
||||
MacroOn = macroOn;
|
||||
Seen.Clear();
|
||||
_windowStart = long.MinValue;
|
||||
_windowLines = 0;
|
||||
_windowDropped = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>UseObject with a log line and the door/corpse guard. False when refused or the engine said no.</summary>
|
||||
public static bool UseFor(this RynthCoreHost host, uint objectId, string subsystem, string why, UseKind kind = UseKind.Auto)
|
||||
{
|
||||
string what = Describe(host, objectId, out bool doorOrCorpse);
|
||||
if (kind == UseKind.Auto && doorOrCorpse && MacroRunning == false)
|
||||
{
|
||||
Write(host, objectId, subsystem, $"BLOCKED 0x{objectId:X8} {what} macro=off auto - {why} (with the macro off nothing opens a door or corpse unless you ask)", force: true);
|
||||
return false;
|
||||
}
|
||||
Write(host, objectId, subsystem, $"0x{objectId:X8} {what} macro={MacroText} {KindText(kind)} - {why}", force: false);
|
||||
return host.UseObject(objectId);
|
||||
}
|
||||
|
||||
/// <summary>UseObjectOn (item on a target) with a log line and the same guard on the target.</summary>
|
||||
public static bool UseOnFor(this RynthCoreHost host, uint sourceId, uint targetId, string subsystem, string why, UseKind kind = UseKind.Auto)
|
||||
{
|
||||
string src = Describe(host, sourceId, out _);
|
||||
string tgt = Describe(host, targetId, out bool doorOrCorpse);
|
||||
if (kind == UseKind.Auto && doorOrCorpse && MacroRunning == false)
|
||||
{
|
||||
Write(host, targetId, subsystem, $"BLOCKED 0x{sourceId:X8} {src} on 0x{targetId:X8} {tgt} macro=off auto - {why}", force: true);
|
||||
return false;
|
||||
}
|
||||
Write(host, targetId, subsystem, $"0x{sourceId:X8} {src} on 0x{targetId:X8} {tgt} macro={MacroText} {KindText(kind)} - {why}", force: false);
|
||||
return host.UseObjectOn(sourceId, targetId);
|
||||
}
|
||||
|
||||
private static string MacroText => MacroRunning switch { true => "on", false => "off", null => "n/a" };
|
||||
private static string KindText(UseKind k) => k == UseKind.Auto ? "auto" : "asked";
|
||||
|
||||
/// <summary>'Name' (door|corpse|portal) - what the object is, from its weenie flags, else its name.</summary>
|
||||
internal static string Describe(RynthCoreHost host, uint id, out bool doorOrCorpse)
|
||||
{
|
||||
string name = "?";
|
||||
try { if (host.HasGetObjectName && host.TryGetObjectName(id, out string n) && !string.IsNullOrWhiteSpace(n)) name = n; }
|
||||
catch { }
|
||||
|
||||
string kind = "";
|
||||
uint bf = 0;
|
||||
bool haveBf = false;
|
||||
try { haveBf = host.HasGetObjectBitfield && host.TryGetObjectBitfield(id, out bf); }
|
||||
catch { }
|
||||
if (haveBf && (bf & BfDoor) != 0) kind = "door";
|
||||
else if (haveBf && (bf & BfCorpse) != 0) kind = "corpse";
|
||||
else if (LooksLikeCorpse(name)) kind = "corpse";
|
||||
else if (id < 0x80000000u && LooksLikeDoor(name)) kind = "door"; // doors have static ids
|
||||
doorOrCorpse = kind.Length > 0;
|
||||
return kind.Length > 0 ? $"'{name}' ({kind})" : $"'{name}'";
|
||||
}
|
||||
|
||||
private static bool LooksLikeCorpse(string name) =>
|
||||
name.StartsWith("Corpse of ", StringComparison.OrdinalIgnoreCase)
|
||||
|| name.Equals("Corpse", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
private static bool LooksLikeDoor(string name)
|
||||
{
|
||||
string n = name.ToLowerInvariant();
|
||||
return n.Contains("door") || n.Contains("gate") || n.Contains("hatch") || n.Contains("portcullis");
|
||||
}
|
||||
|
||||
private static void Write(RynthCoreHost host, uint id, string subsystem, string body, bool force)
|
||||
{
|
||||
string? line = null;
|
||||
lock (Gate)
|
||||
{
|
||||
long now = NowMs();
|
||||
if (_windowStart == long.MinValue || now - _windowStart >= WindowMs)
|
||||
{
|
||||
if (_windowDropped > 0)
|
||||
line = $"[Use] {PluginName}: {_windowDropped} more use line(s) left out in the last {WindowMs / 1000}s (busy)\n";
|
||||
_windowStart = now;
|
||||
_windowLines = 0;
|
||||
_windowDropped = 0;
|
||||
}
|
||||
|
||||
var key = (id, subsystem);
|
||||
int repeats = 0;
|
||||
if (!force && Seen.TryGetValue(key, out var seen))
|
||||
{
|
||||
if (now - seen.LastMs < RepeatMs)
|
||||
{
|
||||
Seen[key] = (seen.LastMs, seen.Repeats + 1);
|
||||
return;
|
||||
}
|
||||
repeats = seen.Repeats;
|
||||
}
|
||||
if (!force && _windowLines >= MaxLinesPerWindow)
|
||||
{
|
||||
_windowDropped++;
|
||||
return;
|
||||
}
|
||||
if (Seen.Count > 512) Seen.Clear();
|
||||
Seen[key] = (now, 0);
|
||||
_windowLines++;
|
||||
string more = repeats > 0 ? $" (+{repeats} repeat(s) since its last line)" : "";
|
||||
line += $"[Use] {PluginName}/{subsystem} {body}{more}";
|
||||
}
|
||||
try
|
||||
{
|
||||
foreach (string l in line.Split('\n', StringSplitOptions.RemoveEmptyEntries))
|
||||
host.Log(l);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue