-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update craft #25089
Update craft #25089
Conversation
Includes new player aquatic movement (rowing and swimming) and treasure chests.
+cc @ryansloan |
@@ -533,6 +534,10 @@ Craft.executeUserCode = function () { | |||
}, | |||
}; | |||
|
|||
const isWalkable = block => { | |||
return block && block.isWalkable; | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this change be replicated in the other craft.js
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first year we've used isWalkable
.
@@ -374,7 +375,7 @@ Craft.initializeAppLevel = function (levelConfig) { | |||
entities: levelConfig.entities, | |||
playerStartPosition: levelConfig.playerStartPosition, | |||
playerStartDirection: levelConfig.playerStartDirection, | |||
playerName: Craft.getCurrentCharacter(), | |||
playerName: Craft.getCurrentCharacter() + 'Aquatic', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a specific reason this is added here an not in getCurrentCharacter
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because we still key the skin avatars off the base name:
code-dot-org/apps/src/craft/aquatic/craft.js
Lines 199 to 203 in ca82a02
var character = characters[Craft.getCurrentCharacter()]; | |
config.skin.staticAvatar = character.staticAvatar; | |
config.skin.smallStaticAvatar = character.smallStaticAvatar; | |
config.skin.failureAvatar = character.failureAvatar; | |
config.skin.winAvatar = character.winAvatar; |
This is following the pattern in the Designer & Hero levels:
code-dot-org/apps/src/craft/designer/craft.js
Line 529 in ca82a02
playerName: Craft.getCurrentCharacter() + 'Events', |
Includes new player aquatic movement (rowing and swimming) and treasure chests.