Modify startAvatars to reflect custom cell sprites#9705
Merged
Conversation
52e35b5 to
c9bfdf6
Compare
| }); | ||
| if (cell.sprite !== undefined) { | ||
| presentAvatars[Studio.spriteCount] = | ||
| skin.avatarList[cell.sprite + level.firstSpriteIndex]; |
Contributor
There was a problem hiding this comment.
wouldn't we just want this to be cell.sprite? I thought the assigned sprites did not respect the offset
Contributor
Author
There was a problem hiding this comment.
They did respect the offset, but I guess that was a bug (particularly since they weren't shown to follow it in the level editor).
Fixed that, and checked that there are no published levels that use both an offset and assigned sprites, so I'm not messing up any existing levels by changing the displayed sprite.
Contributor
There was a problem hiding this comment.
Oh, dang, right you are! That was definitely an oversight on my part, thanks for catching it.
Contributor
|
one question, otherwise LGTM! |
This was referenced Aug 1, 2016
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.
startAvatarsis no longer reordered based onlevel.firstSpriteIndex, instead the sprite images are assigned usingi + level.firstSpriteIndexinstead of justi. This also fixes a bug where custom cell sprites were being affected by the offset when they should not have been.The block initialization code now just receives a separately constructed list of sprites that reflects the exact set of sprites available in the level, making the dropdowns accurate.