Merge rynth/main (2026.10.8.1) into sk/features-on-rynth-main
Resolves the conflicts that kept PR #2 from merging. Where rynth/main already ships the same feature, its version wins: the shared read-only RynthInstallPaths, /ra iteminfo (PR #2's Mag-Tools item info window is dropped), pet essence refill trust, object filing, spell metadata and the Monster Editor's Category / MatchExpression. See Changelog/2026-10-08-merge-rynth-main-into-pr2.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
2e54796b15
160 changed files with 15447 additions and 2566 deletions
|
|
@ -1,36 +1,39 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace RynthCore.MonsterEditor;
|
||||
|
||||
/// <summary>The editor's copy of RynthAi's MonsterRule (Plugins/RynthCore.Plugin.RynthAi/LegacyUi/
|
||||
/// LegacyUiSettings.cs), read from and saved to the same monsters file. A field the plugin has and
|
||||
/// this class doesn't still survives a save, through <see cref="ExtraFields"/>.</summary>
|
||||
public class MonsterRule : INotifyPropertyChanged
|
||||
{
|
||||
private string _name = "New Monster";
|
||||
private string _category = "";
|
||||
private string _matchExpression = "";
|
||||
private int _priority = 1;
|
||||
private string _damageType = "Auto";
|
||||
private int _weaponId;
|
||||
private bool _fester, _broadside, _gravityWell, _imperil, _yield, _vuln;
|
||||
private bool _useArc, _useBolt = true, _useRing, _useStreak, _useBlast;
|
||||
private bool _useArc, _useBolt = true, _useRing, _useStreak, _useBlast, _useWall;
|
||||
private string _exVuln = "None";
|
||||
private int _offhandId;
|
||||
private int _preferredAmmoItemId;
|
||||
private string _petDamage = "PAuto";
|
||||
/// <summary>Dashboard-only label; optional (empty shows as "Default" in the game UI).</summary>
|
||||
private string _category = string.Empty;
|
||||
/// <summary>vTank-style match expression. Empty = for named rules, match on Name substring; for the Default row, it is the global fallback when nothing else matches.</summary>
|
||||
private string _matchExpression = string.Empty;
|
||||
|
||||
public string Name { get => _name; set { _name = value; OnPropertyChanged(); } }
|
||||
/// <summary>The plugin's rule group label. Kept and editable here (before 2026-10-05 an
|
||||
/// editor save dropped it).</summary>
|
||||
public string Category { get => _category; set { _category = value ?? ""; OnPropertyChanged(); } }
|
||||
/// <summary>The plugin's match expression (CombatManager.GetRuleForTarget): when set, the
|
||||
/// rule matches when the expression is true (and the name, if any, is in the target's).
|
||||
/// Empty = match by name only. Kept and editable here (before 2026-10-05 an editor save
|
||||
/// dropped it, so expression rules fell back to name-only).</summary>
|
||||
public string MatchExpression { get => _matchExpression; set { _matchExpression = value ?? ""; OnPropertyChanged(); } }
|
||||
public int Priority { get => _priority; set { _priority = value; OnPropertyChanged(); } }
|
||||
public string Category { get => _category; set { _category = value ?? string.Empty; OnPropertyChanged(); } }
|
||||
/// <summary>vTank-style match expression. Empty matches on the rule name.</summary>
|
||||
public string MatchExpression
|
||||
{
|
||||
get => _matchExpression;
|
||||
set { _matchExpression = value ?? string.Empty; OnPropertyChanged(); }
|
||||
}
|
||||
public string DamageType { get => _damageType; set { _damageType = value; OnPropertyChanged(); } }
|
||||
public int WeaponId { get => _weaponId; set { _weaponId = value; OnPropertyChanged(); } }
|
||||
public bool Fester { get => _fester; set { _fester = value; OnPropertyChanged(); } }
|
||||
|
|
@ -44,12 +47,18 @@ public class MonsterRule : INotifyPropertyChanged
|
|||
public bool UseRing { get => _useRing; set { _useRing = value; OnPropertyChanged(); } }
|
||||
public bool UseStreak { get => _useStreak; set { _useStreak = value; OnPropertyChanged(); } }
|
||||
public bool UseBlast { get => _useBlast; set { _useBlast = value; OnPropertyChanged(); } }
|
||||
public bool UseWall { get => _useWall; set { _useWall = value; OnPropertyChanged(); } }
|
||||
public string ExVuln { get => _exVuln; set { _exVuln = value; OnPropertyChanged(); } }
|
||||
public int OffhandId { get => _offhandId; set { _offhandId = value; OnPropertyChanged(); } }
|
||||
/// <summary>Optional loose ammo stack id for missile combat while this rule matches (0 = auto).</summary>
|
||||
public int PreferredAmmoItemId { get => _preferredAmmoItemId; set { _preferredAmmoItemId = value; OnPropertyChanged(); } }
|
||||
public string PetDamage { get => _petDamage; set { _petDamage = value; OnPropertyChanged(); } }
|
||||
|
||||
/// <summary>Every field in the file this class doesn't know (e.g. the plugin's CustomDebuffs,
|
||||
/// or one added later), written back unchanged.</summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement>? ExtraFields { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
/// <summary>True for the special row named "Default" — the catch-all when no other rule matches.</summary>
|
||||
public bool IsDefault => string.Equals(_name, "Default", System.StringComparison.OrdinalIgnoreCase);
|
||||
|
|
@ -76,10 +85,13 @@ public class MonsterRule : INotifyPropertyChanged
|
|||
UseRing = _useRing,
|
||||
UseStreak = _useStreak,
|
||||
UseBlast = _useBlast,
|
||||
UseWall = _useWall,
|
||||
ExVuln = _exVuln,
|
||||
OffhandId = _offhandId,
|
||||
PreferredAmmoItemId = _preferredAmmoItemId,
|
||||
PetDamage = _petDamage,
|
||||
// JsonElements are immutable, so a new dictionary over the same values is a full copy.
|
||||
ExtraFields = ExtraFields == null ? null : new Dictionary<string, JsonElement>(ExtraFields),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -104,6 +116,7 @@ public class MonsterRule : INotifyPropertyChanged
|
|||
UseRing = src.UseRing;
|
||||
UseStreak = src.UseStreak;
|
||||
UseBlast = src.UseBlast;
|
||||
UseWall = src.UseWall;
|
||||
ExVuln = src.ExVuln;
|
||||
OffhandId = src.OffhandId;
|
||||
PreferredAmmoItemId = src.PreferredAmmoItemId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue