Fixes electronic paper reader looping infinitely #11531
Open
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
the electronic paper reader currently has a problem with infinite looping
it has some logic that is supposed to split the paper in paragraphs and read out each one separately
however, it does not properly remove the elements from the list it builds
this means it will loop infinitely on the first element until interrupted with a click or by reading a blank paper
testing evidence shows both the bug and the behavior after fixing
PR represents a one-line fix to this problem
to_read.Remove(1)
seems to have been used with1
as an index in semanticsreplaced that
1
with ato_read[1]
to match the element semantics described in the documentation for thelist.Remove()
procWhy It's Good For The Game
this means no more annoying infinite reader spam and having to find workarounds the problem of it infinitely repeating such as by reading a blank paper
PR might not be desirable if the reader is intended to read in an infinite loop
Testing Photographs and Procedure
Screenshots&Videos
before the fix:
readerbug.mp4
after the fix:
readertesting.mp4
testing procedure involved testing with an empty paper (does nothing), then a paper with one paragraph, then one with multiple (such as video above), additionally one with a stamp (doesn't seem to be read out)
interrupting with a click also seems to work when reading out multiple paragraphs
Changelog
🆑 Aramix
fix: fixed the electronic paper reader infinitely reading out the first paragraph in a paper
/:cl: