Skip to content

Subsystem 6d: Smelting calculator (/smelt + in-game, schema v4) - #31

Merged
HandyS11 merged 9 commits into
developfrom
feat/item-database-4
Jun 28, 2026
Merged

Subsystem 6d: Smelting calculator (/smelt + in-game, schema v4)#31
HandyS11 merged 9 commits into
developfrom
feat/item-database-4

Conversation

@HandyS11

Copy link
Copy Markdown
Owner

Subsystem 6d — Item Database Calculators pt.4 (Smelting)

Fourth slice of the Item Database subsystem, a faithful mirror of 6a/6b/6c (#28/#29/#30). Ships a smelter-keyed smelting calculator: in-game !smelt <smelter> and Discord /smelt <smelter> list every conversion a smelter performs (input → output, quantity/probability, wood/fuel, time).

Approach

Smelting data is natively keyed by smelter and the same input name appears under different item ids across smelters, so it does not hang off ItemRecord — it gets its own top-level Smelters table resolved by name, exactly like 6c's RaidTargets. No Kind enum (all 10 smelters are items). Sourced offline from rustlabsSmeltingData.json (28.5 KB, 10 smelters), SmeltingAsOf = 2023-11-05.

What's in it

  • Schema v3 → v4: new Smelter/SmeltConversion records + Smelters table; DatasetSources.SmeltingAsOf.
  • Generator: ISmeltingSource/OfflineSmeltingSource (per-smelter projection, orphan-drop), DatasetValidator smelter checks (MinSmelterCount: 8 floor + per-conversion validation), regenerated embedded item-data.json.
  • Lookup: SmeltMatch/SmeltLookup + IItemDatabase.ResolveSmelter (mirrors RaidLookup/RaidMatch).
  • Formatter: new shared DurationFormat.Seconds(double) (sub-minute aware) used by a refactored DurabilityLine and the new SmeltLine.
  • Surfaces: SmeltCommandHandler (!smelt) + /smelt slash (RespondForSmeltAsync), /help rows, EN/FR resx keys.

Tests & gates

Full TDD throughout. Suite 666 tests / 16 assemblies green; build -warnaserror 0 warnings; jb cleanupcode clean.

Deferred

Input-keyed "where can I smelt X" view, slot-count/throughput math, and CCTV (the last open subsystem-6 item).

🤖 Generated with Claude Code

@HandyS11
HandyS11 merged commit 0458284 into develop Jun 28, 2026
3 checks passed
@HandyS11
HandyS11 deleted the feat/item-database-4 branch June 28, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant