acdream/tests/AcDream.Plugins.MossTank.Tests
Erik e1d0c703f9 fix(vt): D CreateNew seeds from VTank's real defaultsettings.usd
Item D (slice-1 fix round). CreateNew built ONLY a bespoke 4-column
Settings table (empty Description, hardcoded SettingType=1/Bool for
every row regardless of the setting's real declared type) and had no
representation of the other nine tables VTank ships at all (MyMonsters,
GemFoodItems, ExtraBuffSpells, AntiExtraBuffSpells, ItemUseSpecifiers,
SettingsCategories, SettingsEnumInfo, AssistItems, BuffedItems).
Separately, VitalSettings.RechargeHandlerRows defaulted to an empty
list, so a freshly-constructed VitalSettings (not loaded from a real
.usd) always fell back to VitalRechargePlanner's own hand-ported
handler-order switch instead of VTank's real 26-row table.

- VtankDefaultSettings.usd: the real uTank2.Resources.defaultsettings.usd
  (already committed as a test fixture) copied into the plugin project as
  an EmbeddedResource, following the existing VtankCraftRecipes.tsv/
  VtankAmmunitionOptions.tsv pattern.
- New VtankDefaultSettingsDatabase: loads the embedded text once (Lazy),
  exposes Parse() (a fresh, independently mutable VtankDatabase per call)
  and DefaultRechargeHandlerRows (the real RechargeHandlerSet table,
  parsed once via VtankSettingsProfileSerializer.ParseRechargeHandlerSet).
- VtankSettingsProfileSerializer.CreateNew now parses the embedded
  document and calls the existing Save(document, source) against it —
  every table, every row's real Description/SettingType survive
  untouched; only the Settings table's Value cells get overwritten from
  the live source, exactly as re-saving an existing profile would.
  DefaultCell (the hand-typed per-catalog-kind cell builder CreateNew
  used before) is deleted as dead code.
- VitalSettings.RechargeHandlerRows now defaults to
  VtankDefaultSettingsDatabase.DefaultRechargeHandlerRows instead of [].
  VitalRechargePlanner.Handlers' hardcoded switch-based defaults are kept
  (not deleted) as a documented, genuinely defensive fallback for the
  case where a caller explicitly clears the row list or an
  (vital, stance, percent) combination the real table happens not to
  cover — no longer the primary source of truth it used to be, and the
  doc comment says so.
- RenderRechargeHandlerSet (a write-back helper for the RechargeHandlerSet
  table, never called anywhere) is deleted rather than wired into
  Capture(): docs/research/vtank-kb/01-settings-and-profiles.md section 2
  row 137 confirms real VTank has NO save path for this table at all
  (tCustom has no case in the Advanced Options editor or "/vt opt set";
  it's owned by a dedicated cRechargeManager object). Wiring a write-back
  would be a MossTank invention, not a retail port, so Capture() keeps
  deliberately leaving this row untouched.

New CreateNewHasTheSameTableSetAsTheDefaultFixture test: asserts
CreateNew's table set matches defaultsettings.usd's own table set
exactly, and that Settings rows carry real (non-empty) Description and a
real (non-Bool-for-everything) SettingType. Verified failing against the
prior 4-column-only implementation (temporarily restored, ran, reverted):
"Expected: [AntiExtraBuffSpells, AssistItems, ...] / Actual: [Settings]".

Full MossTank suite: 570/570 passing (569 -> 570, one new test).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 22:33:31 +02:00
..
Fixtures/vtank feat(vt): A1 .usd engine + A3 metaf .af engine, real VTank/metas fixtures 2026-09-06 20:52:51 +02:00
AcDream.Plugins.MossTank.Tests.csproj feat(vt): A1 .usd engine + A3 metaf .af engine, real VTank/metas fixtures 2026-09-06 20:52:51 +02:00
AttackSpellCatalogTests.cs fix(vt): model UseArcs as VTank's real 3-way enum, not a collapsed bool 2026-09-06 21:47:03 +02:00
AutoAttackPowerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
BuffPlanTests.cs feat: regen buffs, wand aura, spellbook assess, indicator press flash 2026-08-20 20:38:28 +02:00
CombatControllerTests.cs feat(mosstank): buff-caster preparer and single idle-peace arbiter — wield from the Items profile, enter magic/peace mode by itself 2026-09-06 19:02:18 +02:00
CombatFailureTrackerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
CombatItemDebuffPlannerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
CraftingTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
DebuffSchedulerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
DispelControllerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
ExpressionEngineTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
FellowshipManagerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
GrenadeCatalogTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
HostExpressionFunctionsTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
InventoryMaintenanceTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
ItemManaRechargeTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
LootingTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
MetaEngineTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
MetafSerializerTests.cs fix(vt): B typed MetaAction.EmbeddedRoute replaces the binary nav blob 2026-09-06 22:22:39 +02:00
MetaViewManagerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
MonsterExpressionTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
MossTankMarkupContractTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
MossTankPanelTests.cs fix(vt): C separate exports/meta/ and exports/nav/ .af directories 2026-09-06 22:26:17 +02:00
NavigationTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
packages.neutral.lock.json feat(plugins): MossTank — a self-buffing plugin, and the automation surface it needed 2026-08-20 16:22:28 +02:00
PetAutomationTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
ProfileGiveControllerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
VitalPlanTests.cs feat(mosstank): banes, protections and weapon auras 2026-08-20 19:49:51 +02:00
VitalRechargeTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
VtankAmmunitionDatabaseTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
VtankDamageDatabaseTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
VtankLootProfileSerializerTests.cs feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
VtankLootRequirementEvaluatorTests.cs feat(vt): A1 .usd engine + A3 metaf .af engine, real VTank/metas fixtures 2026-09-06 20:52:51 +02:00
VtankNavRouteSerializerTests.cs fix(vt): A ptl/tlk carry two coordinate triples, jmp direction loss recorded 2026-09-06 22:13:48 +02:00
VtankProfileDirectoryTests.cs feat(vt): A2 VTank profile directory resolution + naming rules 2026-09-06 21:03:16 +02:00
VtankSettingsProfileSerializerTests.cs fix(vt): D CreateNew seeds from VTank's real defaultsettings.usd 2026-09-06 22:33:31 +02:00
VtankUsdDocumentTests.cs fix(vt): make the .usd cursor character-oriented for ba blobs and unknown tags 2026-09-06 21:52:39 +02:00