Subsystem 6c: Durability (raid-cost) calculator (/durability + in-game, schema v3) - #30
Merged
Conversation
…raid targets) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds DurabilityAsync slash command to ItemCommandModule with a parallel RespondForRaidAsync helper (ResolveRaidTarget + DurabilityLine.Format + DurabilityAsOf footer). Adds help.slash.durability resx key (EN+FR) and Slash catalog entry; bumps parity count assertion 240→241. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…EADME - Add /durability to the calculators list in the opening sentence - Add rustlabsDurabilityData.json row to the source-files table - Extend validation description to mention raid-target count floor and per-cost quantity/tool-id checks - Add DurabilityAsOf to the provenance section constant list - Note durability is trimmed to the explosive group and projected into RaidTargets (item/building-block/vehicle); raw source ~19 MB never bundled - Fix CommandHelpCatalogTests HandlerNames doc-comment: 19 → 20 - Apply cleanupcode ReformatAndReorder (method params, collection literals, raw-string indent) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third slice of the Item Database subsystem (after 6a #28, 6b #29). Ships the durability calculator — in practice a raid-cost calculator: given a target (deployable item, building block, or vehicle), it lists the explosives needed to destroy it with quantity, sulfur, and time. Surfaces: in-game
!durability <target>and Discord/durability <target>.What it does
/durability stone wall→Timed Explosive Charge ×2 — 4400 sulfur (11.5s),Satchel Charge ×10 — 4800 sulfur (22.5s),Rocket ×4 — 5600 sulfur (18s), … (cheapest-by-sulfur first; soft/hard side annotated for building blocks).Design (locked in brainstorming)
RaidTargetstable on the embedded dataset (Approach A) —ItemRecorduntouched — because the core raid targets (walls/doors) are name-keyed building grades, not item-DB items. 416 targets: 299 items + 100 building blocks + 17 vehicles.explosivetool group only (drops guns/melee/throw/torpedo/turret) → ~1 MB projection. Never bundled raw.ItemLookup's matcher generalized into a sharedNameMatcher(with a per-type tiebreak comparer) and reused by a newRaidLookup— behavior of the existing item lookup preserved (its tests are the safety net).RaidTargets, loader expects v3, bundle regenerated together). NewDurabilityAsOfprovenance date./durabilityfor roadmap continuity; internal types namedRaid*.quantityTypeId/HP dropped (unpopulated for explosives)./cctvexplicitly deferred to their own later slices.Validation & safety
Features.ItemDatastays a leaf.Gates
-maxcpucount:1).jb cleanupcode --profile=ReformatAndReorderclean (zero diff); build-warnaserror.schemaVersion: 3, 416 raid targets./helprows + drift guards.Built subagent-driven (8 tasks, per-task spec+quality review). The final whole-branch review (opus) caught one cross-task bug the per-task reviews structurally couldn't see — sub-minute raid times rendering as
(0m)because the sharedDurationFormat.Compactfloors to whole minutes — fixed locally inDurabilityLine(seconds for <60s,Xm Ysabove) with a regression test, leaving the shared helper untouched.🤖 Generated with Claude Code