[PR #4895] [MERGED] Roll a villager's offers when it shows trades #5925

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

📋 Pull Request Information

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

Base: main ← Head: fix/villager-show-trades-offers


📝 Commits (2)

  • cfb61d6 Roll a villager's offers when it shows trades
  • 9d9fe22 Merge main

📊 Changes

3 files changed (+17 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+5 -0)
📝 crates/horizon-client/src/mobs.rs (+6 -0)
📝 crates/horizon-client/src/mobs/villager_brain.rs (+6 -1)

📄 Description

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

What and why

  • A villager showing trades only read m.extra.trade, so one whose offers were never rolled (nobody opened its trade screen) held up nothing when the player held a cost item. Vanilla's AbstractVillager.getOffers makes them on first use. The brain now asks the level via MobEvent::VillagerOffers, which runs ensure_offers, and compares costs from the next tick.

Remaining part of #4198, whose other changes landed on main.

Self-check

Not built or run: cargo check fails on main already (horizon-client-render/src/streaming.rs:1472, SectionMask vs u32). To check in game: spawn a fresh villager, hold an emerald or wheat in front of it and see it hold up an offer.

🤖 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/4895 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/villager-show-trades-offers` --- ### 📝 Commits (2) - [`cfb61d6`](https://github.com/horizon-rust/horizon/commit/cfb61d623a160adf66a81660ef83a5630aaa99dc) Roll a villager's offers when it shows trades - [`9d9fe22`](https://github.com/horizon-rust/horizon/commit/9d9fe2298e2a0ed71ccda44e79603b350f84e588) Merge main ### 📊 Changes **3 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs.rs` (+6 -0) 📝 `crates/horizon-client/src/mobs/villager_brain.rs` (+6 -1) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Sonnet 5.5), not by rdbtCVS personally. ## What and why - A villager showing trades only read `m.extra.trade`, so one whose offers were never rolled (nobody opened its trade screen) held up nothing when the player held a cost item. Vanilla's `AbstractVillager.getOffers` makes them on first use. The brain now asks the level via `MobEvent::VillagerOffers`, which runs `ensure_offers`, and compares costs from the next tick. Remaining part of #4198, whose other changes landed on main. ## Self-check Not built or run: `cargo check` fails on main already (`horizon-client-render/src/streaming.rs:1472`, `SectionMask` vs `u32`). To check in game: spawn a fresh villager, hold an emerald or wheat in front of it and see it hold up an offer. 🤖 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:15:58 +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#5925
No description provided.