fix(vtank): slice 7 round F item 2 — hide tString settings from Advanced Options
Owner's second live look: "Buff_Profile banes and prots got duplicated. Only the one with ALL works as intended." BuffProfile-Prots/-Banes are tString rows (VtankOptionCatalog.DeclaredType == String); VTank's own Advanced Options list has NO case for tString at all (KB 01-settings-and-profiles.md, db.cs:132-166 for the list switch and :201-203 for the click handler — both "Not exposed"), so the hyphen rows never belonged in the list next to their real tEnum twins (BuffProfile_Prots/_Banes) — that mismatched pair is the "duplicate" the owner saw. FilteredAdvancedOptionNames now excludes every tString row (also catches BlacklistedSpellComps, the catalog's third tString entry); the enum rows stay listed and clickable exactly as before. tString settings are unaffected otherwise — still real, still settable via `/vt opt set`, only no longer rendered in this list. Mutation shown to fail first: the new AdvancedOptionListHidesTStringSettingsButKeepsTheirEnumCounterparts test asserted BuffProfile-Prots/-Banes/BlacklistedSpellComps absent and the two enum names present against the UNCHANGED filter — failed with "BuffProfile-Prots" found in the collection — then passed once FilteredAdvancedOptionNames gained the DeclaredType != String guard. MossTank suite 722 -> 723 (one new pin); App markup/plugin filter 258/258 (unaffected — no App-side markup change). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
ad3f4df575
commit
9e23f0acb6
2 changed files with 39 additions and 3 deletions
|
|
@ -552,9 +552,20 @@ internal sealed partial class MossTankPanel
|
|||
enabledMask |= VtankOptionCatalog.CategoryBits[i];
|
||||
|
||||
return VtankOptionCatalog.Names.Where(name =>
|
||||
!VtankDefaultSettingsDatabase.SettingCategoryBitmasks.TryGetValue(name, out int mask)
|
||||
|| mask == 0
|
||||
|| (mask & enabledMask) != 0).ToArray();
|
||||
// Round F item 2 (owner's second live look: "Buff_Profile
|
||||
// banes and prots got duplicated. Only the one with ALL
|
||||
// works as intended."): VTank's own Advanced Options list
|
||||
// has NO case for tString at all (KB 01, db.cs:132-166,
|
||||
// :201-203 — "Not exposed"), so a tString row (the hyphen
|
||||
// BuffProfile-Prots/-Banes, BlacklistedSpellComps) never
|
||||
// belonged in this list — that mismatched twin next to the
|
||||
// real tEnum row (BuffProfile_Prots/_Banes) is what read as
|
||||
// a duplicate. tString settings stay real and settable via
|
||||
// `/vt opt set`; they just never render here.
|
||||
VtankOptionCatalog.DeclaredType(name) != VtankSettingValueType.String
|
||||
&& (!VtankDefaultSettingsDatabase.SettingCategoryBitmasks.TryGetValue(name, out int mask)
|
||||
|| mask == 0
|
||||
|| (mask & enabledMask) != 0)).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1332,6 +1332,31 @@ public sealed class MossTankPanelTests
|
|||
Assert.Contains("EnableNav", panel.AdvancedOptionNames);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AdvancedOptionListHidesTStringSettingsButKeepsTheirEnumCounterparts()
|
||||
{
|
||||
// Owner's second live look (2026-09-07): "Buff_Profile banes and
|
||||
// prots got duplicated. Only the one with ALL works as intended."
|
||||
// BuffProfile-Prots/BuffProfile-Banes are tString rows
|
||||
// (VtankSettingValueType.String); VTank's own Advanced Options
|
||||
// list has NO case for tString at all (KB 01,
|
||||
// db.cs:132-166/:201-203 — "Not exposed"), so they never
|
||||
// belonged in the list to begin with — that is the "duplicate"
|
||||
// the owner saw, not a real second setting. Every tString row
|
||||
// in the catalog (BuffProfile-Prots, BuffProfile-Banes,
|
||||
// BlacklistedSpellComps) follows the same rule; the enum
|
||||
// counterparts (BuffProfile_Prots/_Banes) stay listed and
|
||||
// clickable exactly as before.
|
||||
var panel = new MossTankPanel(new FakeHost(new FakeAutomation()));
|
||||
|
||||
Assert.DoesNotContain("BuffProfile-Prots", panel.AdvancedOptionNames);
|
||||
Assert.DoesNotContain("BuffProfile-Banes", panel.AdvancedOptionNames);
|
||||
Assert.DoesNotContain("BlacklistedSpellComps", panel.AdvancedOptionNames);
|
||||
|
||||
Assert.Contains("BuffProfile_Prots", panel.AdvancedOptionNames);
|
||||
Assert.Contains("BuffProfile_Banes", panel.AdvancedOptionNames);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AdvancedOptionCategoryEnabledIsNotTheMutableBackingArray()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue