WIP refactor getPokestopMarker to show both rocket + reward#548
Closed
yw2theorycrafter wants to merge 1 commit intopmsf:mainfrom
Closed
WIP refactor getPokestopMarker to show both rocket + reward#548yw2theorycrafter wants to merge 1 commit intopmsf:mainfrom
yw2theorycrafter wants to merge 1 commit intopmsf:mainfrom
Conversation
…d reward simultaneously
Contributor
|
Something to further consider, is that until two days ago all Pokestops had two possible quest rewards, depending only if the player had an 'AR Mapping' quest in their inventory or not. Niantic just disabled the 'AR' set of quests, but I expect it will return, and eventually we should be able to display A/B quest rewards as well. |
Collaborator
|
Would you be able to base this on staging/develop branch as those have a completely rewritten icon approach based on UICONS. |
2 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
getPokestopMarker has a lot of code duplication, in my opinion. This makes it hard to customize the appearance of pokestops. And, the existing implementation can't show both a rocket head + reward, and in this case it will only show the rocket head - which seems backwards, I'd prefer to see the quest reward!
This PR simplifies the whole thing to take a "merged" approach, where the html field of the marker icon is built up in stages. Rocket heads always go in the lower left, rewards on top of the marker.
TODO: This PR doesn't respect the "noRocket", etc. variables. I'm not sure it needs to, since aren't those things enforced in raw_data.php any way? Either way I didn't do it because I, personally, don't restrict them on my map.
TODO: I don't set the "class" correctly. If it has a rocket I set the rocket class, otherwise I just set the default marker class. I'm not convinced we're getting anything out of the custom CSS classes for the different marker categories, given that the thing you'd really want to customize is the size and placement of the rewards (which is hardcoded in getPokestopMarker...)
Some examples with this PR:

