[PR #4263] [MERGED] Close the lectern book screen after taking the book #5526

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-4251-lectern-take-book


📝 Commits (1)

  • 8e10fc9 Lectern: close the book screen after Take Book

📊 Changes

1 file changed (+19 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/books.rs (+19 -3)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #4251

Cause: the Take Book click sent lectern button 3 but never closed the book screen, unlike the Done branch. In single player follow_lectern already closes it. On a server, or for a LAN guest, the screen stayed open until a server close arrived, and the issue says it never closed.

Change: books.rs adds take_lectern_book, which sends button 3 and then closes the book screen only if the lectern view is still open and the player may build. The click handler and the book control command's take both use it. lan_stations.rs is unchanged; the LAN host already closes the guest window once the book is gone.

Tested: cargo fmt --check and cargo clippy -p horizon-client --all-targets -- -D warnings pass, and cargo test -p horizon-client --lib --bins book passes (8 existing book tests). The code paths for single player, remote and LAN were traced by reading only. No unit test covers the Take Book path.

Not tested: no in-game run, so the reporter's mode is not confirmed and the fix is not seen working. If the server refuses the take, the screen stays open. tools/pr_ready.py not run.


🔄 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/4263 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/issue-4251-lectern-take-book` --- ### 📝 Commits (1) - [`8e10fc9`](https://github.com/horizon-rust/horizon/commit/8e10fc9924acf4fe57804c7d8dfed08363f14727) Lectern: close the book screen after Take Book ### 📊 Changes **1 file changed** (+19 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/books.rs` (+19 -3) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #4251 **Cause:** the Take Book click sent lectern button 3 but never closed the book screen, unlike the Done branch. In single player `follow_lectern` already closes it. On a server, or for a LAN guest, the screen stayed open until a server close arrived, and the issue says it never closed. **Change:** `books.rs` adds `take_lectern_book`, which sends button 3 and then closes the book screen only if the lectern view is still open and the player may build. The click handler and the `book` control command's take both use it. `lan_stations.rs` is unchanged; the LAN host already closes the guest window once the book is gone. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-client --all-targets -- -D warnings` pass, and `cargo test -p horizon-client --lib --bins book` passes (8 existing book tests). The code paths for single player, remote and LAN were traced by reading only. No unit test covers the Take Book path. **Not tested:** no in-game run, so the reporter's mode is not confirmed and the fix is not seen working. If the server refuses the take, the screen stays open. `tools/pr_ready.py` not run. --- <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:12 +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#5526
No description provided.