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
Add sprite lab game type #27435
Add sprite lab game type #27435
Conversation
@@ -211,6 +211,8 @@ def new | |||
@game = Game.eval | |||
elsif @type_class <= Applab | |||
@game = Game.applab | |||
elsif @type_class <= GamelabJr | |||
@game = Game.spritelab |
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.
Are you sure this is needed? It may not be, since we unconditionally set game type in create!(...)
in gamelab_jr.rb below.
Why there are two different ways of setting the default, I don't know... 🤷♂️
dashboard/app/models/game.rb
Outdated
@@ -202,7 +208,7 @@ def uses_pusher? | |||
end | |||
|
|||
def uses_small_footer? | |||
[NETSIM, APPLAB, TEXT_COMPRESSION, GAMELAB, WEBLAB, SCRATCH, DANCE].include? app | |||
[NETSIM, APPLAB, TEXT_COMPRESSION, GAMELAB, WEBLAB, SCRATCH, DANCE, SPRITELAB].include? app |
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 we want to exclude Sprite Lab, here so we get the language dropdown for Sprite Lab levels.
@@ -294,7 +294,7 @@ def render_app_dependencies | |||
use_droplet = @level.uses_droplet? | |||
use_netsim = @level.game == Game.netsim | |||
use_applab = @level.game == Game.applab | |||
use_gamelab = @level.game.app == Game::GAMELAB | |||
use_gamelab = @level.is_a?(Gamelab) |
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.
👍
- Don't set game type in levels_controller because it is done in gamelab_jr.rb - Exclude spritelab from uses_small_footer
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.
UI test failure looks unrelated.
I added app code for the new spritelab game type so that new spritelab levels will actually work. Right now, mostly just points to Gamelab app code, but since we're going to start pulling Gamelab and Spritelab apart anyways, we'll now have somewhere to put Spritelab specific stuff. |
Is this needed, or can line 297 of game.rb be |
Whoops, yeah that's much simpler. I didn't know that's how that worked 😄 |
No description provided.