feat: smelting, and the anvil specials #103
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/smithing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Smithing's first half: interface
311's nine metals, and the anvil work thatis not a bar — six godsword welds, the dragon square shield, the dragonfire
shield, the four hilts and cannonballs.
The levels were not sourced
311states each metal's requirement in its owncs1gate.cs1_insis[1, 13, 0]on every row — current level in skill 13, which is Smithing —and op
3is greater-than, so each threshold reads one below the requirement:All eight are read back out of the operator's own cache by the suite; the wiki
merely concurs. Blurite is the one row with no gate at all, because it is
quest-gated rather than level-gated, so 13 is the only level here taken from
outside.
311is:label_in_op, the same layout154uses — the label prefixgeneralised from
MaketoMake/Smeltand the quantity parser becameverb-agnostic, which is the whole of the reader change.
An anvil is the facility, not a held item
A weld is an item used on a loc with a hammer in the pack, not an item on
an item — which is what stops a player forging a godsword blade in a bank. So
the welds, the square shield and the dragonfire shield are an
:anvilstation keyed on
loc_items, and the seven anvil locs are every loc in thecache carrying a
Smithaction, pinned by a test.Attaching a hilt is a separate action needing no level, no anvil and no
hammer, so those four stay pairs — and the finished swords carry the
Dismantleop that reverses it, which is the cache agreeing.The shards combine pairwise and the cache says so itself: it holds a named
item for each of the three intermediates, so the shape needed no source.
Three generalisations fell over
A station screen is not always a main-slot panel.
311bottoms out at117 and binds to the chatbox, so the geometry bands are three rather than two
— pickers 95-96, smelt 117, panels 320-335. The rule was right; the
conclusion drawn from five samples that all happened to be panels was not.
The test now measures the margin across the union of both families instead of
assuming which family an interface belongs to.
The furnace has four tenants. Declaring
locswithoutloc_itemsreadsas any item on these locs, so Smithing would have swallowed every Crafting
click at every furnace in the world. The suite caught it — that is what
a bar on a furnace reaches its own screen and not the other twowas writtenfor.
The verb fallback was safe only while nothing owned the furnace click.
With a verb-owning tenant, coins on a furnace opened the smelt screen.
screen_for_item_on_loc/2now refuses the fallback on a loc whose screensname their items: such a loc has declared itself completely. Locs with no
itemised tenant — spinning wheels — are unchanged.
One test flipped rather than broke.
clicking a furnace opens nothing, because Smelt belongs to Smithingwas arefuteholding a place for exactlythis branch, and now asserts the furnace answers its own verb.
Stated and deliberately not wired
Iron smelting fails half the time at any level, and
Contract.Productionmust keep its no-roll invariant — that is what makes
runs/2andnet_slots/2arithmetic. Sochance: 128andcertain_with: [2568]sit inthe data for the loop to read through
Contract.Skilling.success?/2, thesame roll every gathering skill already takes, before the contract is asked
anything. Until the loop reads them, iron smelts with certainty and the
table says so in its header.
Unverified, and flagged in the file
25.5— the wiki states the level, the yield and the10-tick speed but never prints the experience.
899and898are reference-derived and cosmetic.picker of whatever is makeable; it may simply make one without asking.
A sitting settles it and it changes no number.
Two wiki pages disagree on the godsword blade's experience.
Godsword shard 1says 100 total;Godsword bladestates the mechanism — 100 per weld, 200for a blade — and reconciles both, so it is taken and the loser is recorded
rather than dropped.
Era
The cache did the filtering unprompted, three times.
311draws nine metalsand the three it omits are all correctly out: Lead and Cupronickel are
Sailing and neither ore exists here; Elemental is in era but quest-gated and
is declared rather than smuggled in ungated; Lovakite is in era and not on
this screen at all, so Lovakengj smelts by some other route and whoever
builds Shayzien armour starts by finding out what it is.
The double ammo mould is absent, so cannonballs are 4 per bar. The Ancient
godsword is absent, so there are four hilts and not five.
Not in this branch
The anvil grid, interface
312— 30 slots in a 6x5 grid whose contents noscript in the cache references, so the server fills them and the table has to
be sourced rather than derived. That is the remaining bulk of the skill.
Checks
mix revenant.ci --gatespasses every leg, Dialyzer included. 77 tests in thetouched files.
The suite has four pre-existing failures on
mainthat this branchneither causes nor fixes — verified by stashing the whole diff and
reproducing them on the bare base. Three assert that a make completes inline
on the click, which the skilling clock deliberately ended; one is a
Firemaking retry. Worth their own issue.
CLAUDE.md's note that one failingtest is the expected state is stale in both directions: it names a test that
now passes, and the count is four.