Squash of test/hotbuild-2026-10-16 as merged onto aelrynth main 2026.10.17.1, matching the 2026.10.18.24 test installer. The test branch wins where both changed the same lines; sk-only changes kept; duplicate features cut to the test branch's copy. RynthAi HandWrittenVersion stays 0.5.0-legacy-ui on sk. Highlights: RynthOracle 0.6.0 (Legendary, Markers, Dynamic Stamps and Temple guardians merged into the Quests list, RynthNav Go to), RynthILT 0.2.20 (ub-IT auto-chunk rules, rating level, RynthILT.Data v3), RynthAi ub-IT /ub and VT/MT meta compatibility and the loot attribute checklist, RynthNav destination alternatives. Changelog/2026-10-18-sk-port-test-branch-2026.10.18.24.md.
55 lines
2.4 KiB
C#
55 lines
2.4 KiB
C#
using System;
|
|
using RynthCore.Plugin.RynthInventory.Data;
|
|
using RynthCore.PluginSdk;
|
|
|
|
namespace RynthCore.Plugin.RynthInventory;
|
|
|
|
/// <summary>What the window reads and the actions it can take. Plugin pump thread only.</summary>
|
|
internal sealed class InventoryContext
|
|
{
|
|
public RynthCoreHost Host;
|
|
public readonly InventorySettings Settings = new();
|
|
public InventoryStore Store = new();
|
|
|
|
/// <summary>The merged view of every file (and this client's live snapshot); null until first built.</summary>
|
|
public InventoryIndex? Index;
|
|
/// <summary>Bumped whenever <see cref="Index"/> is replaced.</summary>
|
|
public int IndexRevision;
|
|
public int BrokenFiles;
|
|
public bool Loading;
|
|
|
|
public bool InWorld;
|
|
public uint Player;
|
|
public string Server = string.Empty;
|
|
public string Account = string.Empty;
|
|
public string Character = string.Empty;
|
|
/// <summary>This character's latest snapshot (never changed once published; a change makes a new one).</summary>
|
|
public CharacterSnapshot? Live;
|
|
public DateTime LastSavedUtc;
|
|
public string LastSaveError = string.Empty;
|
|
/// <summary>The storage container open right now, if it is being recorded (0 none).</summary>
|
|
public uint OpenStorage;
|
|
public string OpenStorageLabel = string.Empty;
|
|
|
|
/// <summary>The engine draws icons in script windows (op level 2).</summary>
|
|
public bool IconsAvailable;
|
|
public DateTime UtcNow;
|
|
|
|
/// <summary>RynthILT's "RynthILT.Data" (the Banking tab's balances and bank commands).</summary>
|
|
public readonly RynthCore.Plugin.Shared.RynthIltDataClient IltData = new();
|
|
/// <summary>The bank RynthILT last reported (None without RynthILT); read while the window shows.</summary>
|
|
public RynthCore.Plugin.Shared.IltBankView Bank = RynthCore.Plugin.Shared.IltBankView.None;
|
|
/// <summary>Set by the plugin: queues a bank verb with RynthILT (IltBankView.*Verb); false when refused.</summary>
|
|
public Func<string, bool> BankCommand = _ => false;
|
|
|
|
public Action RequestRescan = () => { };
|
|
public Action RequestReload = () => { };
|
|
/// <summary>Forgets a character (moves its file aside). Returns a message for the player.</summary>
|
|
public Func<CharacterInfo, string> Forget = _ => string.Empty;
|
|
|
|
public void Print(string text)
|
|
{
|
|
if (!Host.WriteToChat("[RynthInventory] " + text, 1))
|
|
Host.Log("[RynthInventory] " + text);
|
|
}
|
|
}
|