00-Evan / shattered-pixel-dungeon

Shattered Pixel Dungeon is an open-source traditional roguelike dungeon crawler with randomized levels and enemies, and hundreds of items to collect and use. It's based on the source code of Pixel Dungeon, by Watabou.
https://shatteredpixel.com/shatteredpd/
GNU General Public License v3.0
4.77k stars 1.12k forks source link

[Very minor] Missing `lastEntry.setHightlighting(false)` on `recreateLines()` in `GameLog.java` #1851

Closed Oxtaly closed 1 month ago

Oxtaly commented 1 month ago

Did not meant to press enter this early ^^', but the title pretty much explains it;

TLDR: Very very minor/impossible bug in vanilla game with line drawings's Hightlighting

In the recreateLines() method in GameLog.java, the entry's Hightlighting does not get set to false, leading to a rare (potentially impossible in the base game) bug where a line containing an underscore gets rendered properly on first pass through (as setHightlighting(false) is ran on creation, on line 98) but gets rendered incorrectly when redrawned (like when changing dungeons floors), as the entry's Hightlighting is never set to false.

A simple fix would be to add the line lastEntry.setHightlighting( false ); at line 138.

Thank you for your time, if this issue is too inconsequential, feel free to close it, and have a good day ^^

Oxtaly commented 1 month ago

Added pictures below that display how the bug looks first_render recreateLine_render

00-Evan commented 1 month ago

Thank you for the report, but please don't make code suggestions. For copyright reasons I cannot accept them, and in-fact you mentioning a solution means I have to address an issue in another way.

Oxtaly commented 1 month ago

Ah, my apologies, I thought that only applied to pull requests, I will refrain from doing so in the future.

Is there a way to talk about potential solutions without creating any copyright issues like avoiding specifying lines of codes, or just simply mentioning an idea would fall under copyright?

Thank you for your time again, and my apologies once more ^^'

00-Evan commented 1 month ago

Thank but I'm not looking for help developing the game. User bug reports are very helpful of course, but I can figure out solutions on my own.

Oxtaly commented 1 month ago

Fair enough! If I find other bugs I'll simply make a report, have a good day ^^

SomeTroglodyte commented 1 month ago

A poster explicitly declaring a suggestion public domain or CC0 no-attribution should be enough? "have to address an issue in another way" might lead to worse code, and as this case seems limited in (code)scope, there likely won't be many feasible solutions?

00-Evan commented 1 month ago

A poster explicitly declaring a suggestion public domain or CC0 no-attribution should be enough? "have to address an issue in another way" might lead to worse code, and as this case seems limited in (code)scope, there likely won't be many feasible solutions?

Shattered's always been intended as a solo project, so I'd rather just be able to say that all of Shattered's code is by me or Watabou and leave it at that. I'd rather not bother with CLAs or similar when I'm not really interested in pull requests anyway.

00-Evan commented 1 month ago

fixed in commit 217c650f114fee8f7afaf2f0ed624adbc40c1fb2