Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Chapter 66] Tooltip bug on casting a targeted spell

オープン
#231 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
game-dev

調査の方向性

chapter-66-spells/src/inventory_system/mod.rs の 41 行目と chapter-66-spells/src/gui.rs の 51 行目から始め、draw_tooltips、get_item_display_name、obfuscate_name が Position はあるものの Name がないエンティティをどのように扱っているかを追ってください。タイルにカーソルを合わせた状態で、Zap のような対象指定の呪文を詠唱して問題を再現します。完了条件は、期待されるパーティクルによって Nameless item (bug) ツールチップが表示されなくなり、名前付きの関数が報告されたバグを回避するようリファクタリングされていることです。

索引モデルが issue の本文から書いたものです。

説明

https://github.com/amethyst/rustrogueliketutorial/blob/33872fe582f226178436847e1f74eafcbf9c0d1a/chapter-66-spells/src/inventory_system/mod.rs#L41
https://github.com/amethyst/rustrogueliketutorial/blob/33872fe582f226178436847e1f74eafcbf9c0d1a/chapter-66-spells/src/gui.rs#L51

When casting a targeted spell (like Zap), a tooltip will be displayed with the Nameless item (bug) string.

This is because the tooltip logic will loop on every entity with a Position component and try to display it.
However, when spawning a Particle, it is expected for it to have a Position but no Name.
When casting the spell, a Particle is spawned on the exact tile the player is hovering, so the draw_tooltips logic catches it and tries to display it. But since it has no Name (which is expected), it displays this string.

We need to either:

  1. Filter entities we pass to get_item_display_name differently so particles are omitted
  2. Return None for an entity with no Name component

Additionally, the code for get_item_display_name and obfuscate_name should be refactored to avoid bugs.
(get_item_display_name could simply get the proper stores and call obfuscate_name.)

主要言語
Rust
スター
968
フォーク
166
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

amethyst/rustrogueliketutorial のほかの issue

amethyst/rustrogueliketutorial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。