Skip to content
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

Merged
merged 4 commits into from Mar 14, 2019
Merged

Add sprite lab game type #27435

merged 4 commits into from Mar 14, 2019

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Mar 8, 2019

No description provided.

@ajpal ajpal requested a review from joshlory March 8, 2019 23:12
@@ -211,6 +211,8 @@ def new
@game = Game.eval
elsif @type_class <= Applab
@game = Game.applab
elsif @type_class <= GamelabJr
@game = Game.spritelab
Copy link
Contributor

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... 🤷‍♂️

@@ -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
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

@joshlory joshlory left a 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.

@ajpal
Copy link
Contributor Author

ajpal commented Mar 13, 2019

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.

@joshlory
Copy link
Contributor

Is this needed, or can line 297 of game.rb be Spritelab:gamelab?

@ajpal
Copy link
Contributor Author

ajpal commented Mar 13, 2019

Whoops, yeah that's much simpler. I didn't know that's how that worked 😄

@ajpal ajpal merged commit 661149d into staging Mar 14, 2019
@ajpal ajpal deleted the spritelab-game branch March 14, 2019 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants