-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
| "Nameless item (bug)".to_string() |
| "Nameless item (bug)".to_string() |
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:
- Filter entities we pass to
get_item_display_namedifferently so particles are omitted - Return
Nonefor an entity with noNamecomponent
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.)
Metadata
Metadata
Assignees
Labels
No labels