Fix unexpected popup when trying to sleep while E-ink PC music is on (#18033) #21014
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.
Fixes #18033. The code did not check whether it's the player who is activating the E-ink PC, and when the code checks the reversibility of active items before sleep, the code creates an npc to activate the reverted form of the item, which causes the unexpected popup if the item is an E-ink PC.
On a side note, the current way the code checks for item reversibility is arguably a bit hacky. Perhaps we should create a flag to specifically serve this purpose