RynthSuite as of 2026-11-08 (internal 6ec9b64): release 2026.11.8.1

This commit is contained in:
Tom Bohar 2026-11-08 15:48:47 -05:00
commit f8fa62b64c
196 changed files with 24980 additions and 633 deletions

View file

@ -28,6 +28,13 @@ internal sealed class BarSettingsView
public Action<string> Tell = _ => { };
/// <summary>Opens the weapon picker (/rdef weapons).</summary>
public Action ShowWeapons = () => { };
/// <summary>Adds an extra Shortcuts bar (it opens once the engine hosts it; the plugin says so in chat).</summary>
public Action AddBar = () => { };
/// <summary>Removes extra bar N and forgets its slots.</summary>
public Action<int> RemoveBar = _ => { };
/// <summary>The extra bar whose Remove was pressed: it asks once more (0 = none).</summary>
private int _confirmRemove;
public BarSettingsView(DefSession session) => _s = session;
@ -81,6 +88,9 @@ internal sealed class BarSettingsView
}
w.SliderInt("Slot picture size", "set.button", st.ButtonSize, DefSettings.ButtonMin, DefSettings.ButtonMax, v => { st.ButtonSize = v; Changed(); });
w.Tooltip("Ctrl+wheel over the bar's title makes the whole bar bigger or smaller.");
ClearBusyBox(w, st, Changed);
MoreBars(w, Changed);
w.SeparatorText("Weapons");
w.SmallButton("Weapon picker...", "set.weapons", () => ShowWeapons());
@ -97,6 +107,56 @@ internal sealed class BarSettingsView
+ "/rdef qty, /rdef split, /rdef give, /rdef buy, /rdef help.");
}
/// <summary>
/// The extra Shortcuts bars (2026-11-04): add one, and for each: shown, how many slots, remove (asked
/// once more when it holds something). Only where the engine has the Shortcuts bar (they are its kind
/// of window).
/// </summary>
private void MoreBars(UiWindow w, Action changed)
{
if (WindowShown(BarTitle) == null) return;
w.SeparatorText("More shortcut bars");
w.TextWrapped($"Up to {ExtraBar.Max} bars of their own, anywhere on screen. Fill them as the Shortcuts bar: drag items from your pack "
+ "onto a slot, or right-click it for the selected item or one of your spells. Their slots are clicked; they have no keys.");
foreach (ExtraBar bar in _s.Data.ExtraBars)
{
int n = bar.Number;
WindowBox(w, bar.Title, $"Shortcuts bar {n}", $"set.xbar.{n}.shown", $"Shows or hides Shortcuts bar {n} (/rdef bars show {n}).");
if (WindowShown(bar.Title) == null) w.TextDisabled($"Shortcuts bar {n}: opening...");
w.SliderInt($"Bar {n} slots", $"set.xbar.{n}.slots", bar.SlotCount, ExtraBar.SlotsMin, ExtraBar.SlotsMax, v => { bar.SlotCount = v; changed(); });
w.Tooltip($"How many slots Shortcuts bar {n} shows. Fewer hides the last ones; their items stay (/rdef bars slots {n} <count>).");
if (_confirmRemove == n)
{
int filled = bar.Filled;
w.TextColored(SlotText.Waiting, filled > 0
? $"Remove Shortcuts bar {n}? {filled} of its slots hold an item or a spell: they are forgotten (the items stay in your pack)."
: $"Remove Shortcuts bar {n}?");
w.SmallButton("Remove it", $"set.xbar.{n}.yes", () => { _confirmRemove = 0; RemoveBar(n); });
w.SameLine();
w.SmallButton("Keep it", $"set.xbar.{n}.no", () => _confirmRemove = 0);
}
else w.SmallButton($"Remove bar {n}...", $"set.xbar.{n}.remove", () => _confirmRemove = n);
}
if (_s.Data.ExtraBars.Count < ExtraBar.Max)
{
w.SmallButton("Add a shortcut bar", "set.xbar.add", () => AddBar());
w.Tooltip($"Another bar of {ExtraBar.DefaultSlots} slots in a window of its own (/rdef bars add). It opens in a moment: drag its title to move it.");
}
else w.TextDisabled($"{ExtraBar.Max} extra bars: as many as there can be.");
}
/// <summary>"Shortcuts clear a stuck busy state" (DefSettings.ClearStuckBusy): here and on the script-window bar's settings.</summary>
internal static void ClearBusyBox(UiWindow w, DefSettings st, Action changed)
{
w.Checkbox("Shortcuts clear a stuck busy state", "set.clearbusy", st.ClearStuckBusy, v => { st.ClearStuckBusy = v; changed(); });
w.Tooltip("On: a slot pressed while only the client's busy count holds it (after a death or a login the count can stay up with\n"
+ "nothing happening; nothing of RynthDefective's or RynthAi's in flight, no animation, no 'You're too busy' from the server\n"
+ "just now) resets the count as /ra clearbusy does, then the item is used. Once per press, logged.\n"
+ "Off (the default): such a count holds a press for up to 4 s, then is ignored. Off because a reset also wipes actions the\n"
+ "server hasn't answered that RynthDefective can't see (a click in the game's own windows, its toolbar keys, another\n"
+ "plugin's), and their late answers then take the count below zero. Kept for this character. Also: /rdef shortcuts clearbusy on|off.");
}
private void WindowBox(UiWindow w, string title, string label, string id, string tip)
{
bool? shown = WindowShown(title);

View file

@ -41,6 +41,7 @@ internal sealed class SettingsPanel
w.Checkbox("Show counts and keys under the slots", "set.counts", st.ShowCounts, v => { st.ShowCounts = v; Changed(true); });
w.Checkbox("Allow weapon swaps while RynthAi's macro runs", "set.swap", st.SwapWhileBotRuns, v => { st.SwapWhileBotRuns = v; Changed(false); });
w.Tooltip("Off (the default): a weapon, wand or shield is not wielded while the RynthAi macro runs - it picks the weapon itself and would swap back. Kits, potions and other items always work.");
BarSettingsView.ClearBusyBox(w, st, () => Changed(false));
w.SeparatorText("About");
w.TextWrapped(Credit);

View file

@ -56,7 +56,8 @@ internal static class SlotText
return sb.Length == 0 ? "?" : sb.ToString();
}
public static string Tooltip(int number, ItemRef? item, SlotStatus s, UseMode mode, string? key)
/// <param name="keys">The slot can have a key (an extra Shortcuts bar's can't: clicks only).</param>
public static string Tooltip(int number, ItemRef? item, SlotStatus s, UseMode mode, string? key, bool keys = true)
{
if (item == null) return $"Slot {number}: empty. Click to set it up.";
var sb = new StringBuilder();
@ -69,12 +70,12 @@ internal static class SlotText
{
ItemKind kind = ItemKinds.Classify(s.Item);
UseAction action = UseModes.ActionFor(mode, kind);
sb.Append("\nClick or press the key: ").Append(UseModes.Describe(action).Replace("used", "use it").Replace("wielded", "wield it"));
sb.Append(keys ? "\nClick or press the key: " : "\nClick: ").Append(UseModes.Describe(action).Replace("used", "use it").Replace("wielded", "wield it"));
if (s.Item.MaxUses > 0) sb.Append("\n").Append(s.Uses).Append(" uses left");
if (s.Count > 1 || s.Item.MaxStack > 1) sb.Append(s.Item.MaxUses > 0 ? ", " : "\n").Append(s.Count).Append(" carried");
if (s.Item.Wielded) sb.Append("\nIn your hands now.");
}
sb.Append(key != null ? "\nKey: " + key : "\nNo key yet (Edit slots).");
if (keys) sb.Append(key != null ? "\nKey: " + key : "\nNo key yet (Edit slots).");
return sb.ToString();
}
}