[PR #4340] [MERGED] Smithing table: the empty slots cycle their icons, as CyclingSlotBackground does #5572

Closed
opened 2026-11-03 05:13:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4340
Author: @xFedeT
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/smithing-cycling-icons


📝 Commits (2)

  • cfcd6c9 Smithing table: the empty slots cycle their icons, as CyclingSlotBackground does
  • 1c27a0c clippy: is_multiple_of in CyclingSlot

📊 Changes

2 files changed (+193 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game/stations.rs (+190 -5)
📝 tools/port_map/game2-009.tsv (+3 -3)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally.

Refs #3515 (three rows: SmithingTemplateItem.createArmorTrimTemplate, createNetheriteUpgradeTemplate, createNetheriteUpgradeIconList). Part of #3601. No other open PR touches the smithing table's icons.

What and why

An empty slot of the smithing table showed one fixed netherite template icon in the template slot and nothing in the other two. In vanilla SmithingScreen has three CyclingSlotBackgrounds: an empty slot cycles a list of icons, one every 30 ticks, the next fading in over 4 ticks while the one before fades out.

Change

  • game/stations.rs: CyclingSlot (CyclingSlotBackground.tick and extractRenderState) kept per smithing table station, advanced with the client tick; the three slots follow SmithingScreen.containerTick:
    • the template slot cycles the armour trim and the netherite upgrade template icons;
    • with a template in the table, the base slot cycles what it takes (netherite upgrade: the 11 tools and armour, in createNetheriteUpgradeIconList order; trim: helmet, chestplate, leggings, boots) and the additions slot the ingot, or the seven trim materials.
  • tools/port_map/game2-009.tsv: the three rows from missing/gap to port.

Vanilla reference

SmithingScreen.containerTick / extractBackground, CyclingSlotBackground, SmithingTemplateItem.createNetheriteUpgradeIconList, createArmorTrimTemplate, createNetheriteUpgradeTemplate.

Testing

  • Two unit tests: the 30-tick cycle with the 4-tick fade (alphas at partial 0, 2 and 4, the list change restarting at its first icon) and the icon lists of the two template kinds.
  • In a LAN game (lan_e2e open of a smithing table): an empty table shows the armour trim template icon in the template slot, and 40 ticks after a netherite upgrade template is put in, the base slot shows the sword (the second icon) and the additions slot the ingot. I did not add the screenshot flow to lan_e2e (it only takes pictures).
  • pr_ready --quick (Python 3.12): Python tests (480), rustfmt, clippy and the Rust tests (978) pass; port_ledger check reports no regression.

Not done here

The onboarding tooltips of the screen (hovering an empty template slot says a template is missing; an empty base or additions slot says what it takes) are separate rows' work.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4340 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/smithing-cycling-icons` --- ### 📝 Commits (2) - [`cfcd6c9`](https://github.com/horizon-rust/horizon/commit/cfcd6c9112a205a0f17834956c401d7c4e24fa40) Smithing table: the empty slots cycle their icons, as CyclingSlotBackground does - [`1c27a0c`](https://github.com/horizon-rust/horizon/commit/1c27a0c66df45bbc3c8f1b1b58fcd106c4a8a7be) clippy: is_multiple_of in CyclingSlot ### 📊 Changes **2 files changed** (+193 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/stations.rs` (+190 -5) 📝 `tools/port_map/game2-009.tsv` (+3 -3) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally. Refs #3515 (three rows: `SmithingTemplateItem.createArmorTrimTemplate`, `createNetheriteUpgradeTemplate`, `createNetheriteUpgradeIconList`). Part of #3601. No other open PR touches the smithing table's icons. ## What and why An empty slot of the smithing table showed one fixed netherite template icon in the template slot and nothing in the other two. In vanilla `SmithingScreen` has three `CyclingSlotBackground`s: an empty slot cycles a list of icons, one every 30 ticks, the next fading in over 4 ticks while the one before fades out. ## Change - `game/stations.rs`: `CyclingSlot` (`CyclingSlotBackground.tick` and `extractRenderState`) kept per smithing table station, advanced with the client tick; the three slots follow `SmithingScreen.containerTick`: - the template slot cycles the armour trim and the netherite upgrade template icons; - with a template in the table, the base slot cycles what it takes (netherite upgrade: the 11 tools and armour, in `createNetheriteUpgradeIconList` order; trim: helmet, chestplate, leggings, boots) and the additions slot the ingot, or the seven trim materials. - `tools/port_map/game2-009.tsv`: the three rows from `missing`/`gap` to `port`. ## Vanilla reference `SmithingScreen.containerTick` / `extractBackground`, `CyclingSlotBackground`, `SmithingTemplateItem.createNetheriteUpgradeIconList`, `createArmorTrimTemplate`, `createNetheriteUpgradeTemplate`. ## Testing - Two unit tests: the 30-tick cycle with the 4-tick fade (alphas at partial 0, 2 and 4, the list change restarting at its first icon) and the icon lists of the two template kinds. - In a LAN game (`lan_e2e` open of a smithing table): an empty table shows the armour trim template icon in the template slot, and 40 ticks after a netherite upgrade template is put in, the base slot shows the sword (the second icon) and the additions slot the ingot. I did not add the screenshot flow to `lan_e2e` (it only takes pictures). - `pr_ready --quick` (Python 3.12): Python tests (480), rustfmt, clippy and the Rust tests (978) pass; `port_ledger check` reports no regression. ## Not done here The onboarding tooltips of the screen (hovering an empty template slot says a template is missing; an empty base or additions slot says what it takes) are separate rows' work. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:29 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5572
No description provided.