[PR #2964] [MERGED] Show tutorial hints and track their progress #4718

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2964
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/tutorial-hints


📝 Commits (5)

  • 7974821 Show tutorial hints and track their progress
  • 49cf77a Merge main into this branch, stub the tutorial in the remote mining test
  • b5b762b Merge remote-tracking branch 'hr/main' into pr-2964
  • 479d10e Tutorial hints are recorded by the window only: the server thread no longer saves options.txt from its stale copy of the settings when a guest picks up a log or breaks one.
  • bda07e1 Tutorial: an in-frame host acting for a guest leaves its own tutorial alone

📊 Changes

6 files changed (+628 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+28 -0)
📝 crates/horizon-client/src/game/advancements.rs (+1 -1)
📝 crates/horizon-client/src/game/hand.rs (+13 -0)
📝 crates/horizon-client/src/game/remote.rs (+19 -1)
➕ crates/horizon-client/src/game/tutorial.rs (+565 -0)
📝 tests/test_remote_mining.py (+2 -0)

📄 Description

What and why

The tutorialStep option was saved but nothing ran the tutorial, so a new player never saw a hint. This adds the first six steps of the vanilla tutorial.

  • Move around, look around, find a tree, punch the tree, open the inventory, craft planks.
  • Each step shows its toast with the keys the player has bound, in the selected language, and moves on when the player does what it asks. The punch step shows the digging progress.
  • The step is written to the options as it changes, so it survives leaving a world. When a world or server is joined or left, the tutorial state is read again from the saved step.
  • Other toasts are placed in the slots the hint does not use.
  • Works in single player and on the server-thread client, including picking up or crafting items from the server's container updates.

This is the largest of the batch (about 600 lines, mostly the new game/tutorial.rs); it is one feature with no good split.

Vanilla reference

  • Tutorial.java:28-98: the step state and how the steps advance.
  • MovementTutorialStepInstance.java:31-126: move and look hints.
  • FindTreeTutorialStepInstance.java:36-91: looking at and collecting a log.
  • PunchTreeTutorialStepInstance.java:32-92: digging progress on a log.
  • OpenInventoryTutorialStep.java:24-48: the inventory hint.
  • CraftPlanksTutorialStep.java:32-79: the planks hint.
  • TutorialToast.java:28-118: the toast layout and progress bar.
  • ClientPacketListener.java:1417-1461: the item and container packets that count as picking up an item.

Self-check

clippy and fmt passed for horizon-client before the rebase onto current main, which was clean. Not run in game.


🔄 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/2964 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/tutorial-hints` --- ### 📝 Commits (5) - [`7974821`](https://github.com/horizon-rust/horizon/commit/797482183c4c3a003656aca3c6b67f967ddfae56) Show tutorial hints and track their progress - [`49cf77a`](https://github.com/horizon-rust/horizon/commit/49cf77a312c42820b98b2ec62a75528398f2c54b) Merge main into this branch, stub the tutorial in the remote mining test - [`b5b762b`](https://github.com/horizon-rust/horizon/commit/b5b762b84013f46b917fe21a14beafd4c50e6eb4) Merge remote-tracking branch 'hr/main' into pr-2964 - [`479d10e`](https://github.com/horizon-rust/horizon/commit/479d10e794f368ab244476745b6a489394233023) Tutorial hints are recorded by the window only: the server thread no longer saves options.txt from its stale copy of the settings when a guest picks up a log or breaks one. - [`bda07e1`](https://github.com/horizon-rust/horizon/commit/bda07e1a841df9eaadbcb4d749bf1c1b7bb83ecd) Tutorial: an in-frame host acting for a guest leaves its own tutorial alone ### 📊 Changes **6 files changed** (+628 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+28 -0) 📝 `crates/horizon-client/src/game/advancements.rs` (+1 -1) 📝 `crates/horizon-client/src/game/hand.rs` (+13 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+19 -1) ➕ `crates/horizon-client/src/game/tutorial.rs` (+565 -0) 📝 `tests/test_remote_mining.py` (+2 -0) </details> ### 📄 Description ## What and why The `tutorialStep` option was saved but nothing ran the tutorial, so a new player never saw a hint. This adds the first six steps of the vanilla tutorial. - Move around, look around, find a tree, punch the tree, open the inventory, craft planks. - Each step shows its toast with the keys the player has bound, in the selected language, and moves on when the player does what it asks. The punch step shows the digging progress. - The step is written to the options as it changes, so it survives leaving a world. When a world or server is joined or left, the tutorial state is read again from the saved step. - Other toasts are placed in the slots the hint does not use. - Works in single player and on the server-thread client, including picking up or crafting items from the server's container updates. This is the largest of the batch (about 600 lines, mostly the new `game/tutorial.rs`); it is one feature with no good split. ## Vanilla reference - `Tutorial.java:28-98`: the step state and how the steps advance. - `MovementTutorialStepInstance.java:31-126`: move and look hints. - `FindTreeTutorialStepInstance.java:36-91`: looking at and collecting a log. - `PunchTreeTutorialStepInstance.java:32-92`: digging progress on a log. - `OpenInventoryTutorialStep.java:24-48`: the inventory hint. - `CraftPlanksTutorialStep.java:32-79`: the planks hint. - `TutorialToast.java:28-118`: the toast layout and progress bar. - `ClientPacketListener.java:1417-1461`: the item and container packets that count as picking up an item. ## Self-check clippy and fmt passed for horizon-client before the rebase onto current main, which was clean. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:25 +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#4718
No description provided.